aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore12
-rw-r--r--CREDITS5
-rw-r--r--Documentation/ABI/testing/sysfs-class-bdi4
-rw-r--r--Documentation/DocBook/kernel-locking.tmpl25
-rw-r--r--Documentation/DocBook/kgdb.tmpl20
-rw-r--r--Documentation/SubmittingPatches46
-rw-r--r--Documentation/accounting/taskstats-struct.txt6
-rw-r--r--Documentation/auxdisplay/cfag12864b4
-rw-r--r--Documentation/auxdisplay/cfag12864b-example.c2
-rw-r--r--Documentation/auxdisplay/ks01084
-rw-r--r--Documentation/cciss.txt5
-rw-r--r--Documentation/cgroups.txt4
-rw-r--r--Documentation/controllers/devices.txt8
-rw-r--r--Documentation/cpu-freq/governors.txt8
-rw-r--r--Documentation/cpusets.txt20
-rw-r--r--Documentation/feature-removal-schedule.txt9
-rw-r--r--Documentation/filesystems/ext4.txt12
-rw-r--r--Documentation/filesystems/sysfs-pci.txt1
-rw-r--r--Documentation/hwmon/ibmaem37
-rw-r--r--Documentation/hwmon/sysfs-interface33
-rw-r--r--Documentation/i2c/writing-clients18
-rw-r--r--Documentation/kernel-doc-nano-HOWTO.txt99
-rw-r--r--Documentation/kernel-docs.txt8
-rw-r--r--Documentation/kernel-parameters.txt8
-rw-r--r--Documentation/kobject.txt2
-rw-r--r--Documentation/laptops/thinkpad-acpi.txt2
-rw-r--r--Documentation/lguest/lguest.c12
-rw-r--r--Documentation/networking/arcnet.txt2
-rw-r--r--Documentation/networking/bridge.txt2
-rw-r--r--Documentation/networking/ip-sysctl.txt12
-rw-r--r--Documentation/networking/s2io.txt6
-rw-r--r--Documentation/video4linux/CARDLIST.au08282
-rw-r--r--Documentation/video4linux/CARDLIST.cx882
-rw-r--r--Documentation/video4linux/cx18.txt4
-rw-r--r--Documentation/vm/pagemap.txt77
-rw-r--r--Documentation/vm/slabinfo.c4
-rw-r--r--Documentation/vm/slub.txt2
-rw-r--r--Documentation/x86_64/mm.txt5
-rw-r--r--MAINTAINERS194
-rw-r--r--Makefile4
-rw-r--r--arch/alpha/Makefile1
-rw-r--r--arch/alpha/kernel/core_t2.c2
-rw-r--r--arch/alpha/kernel/pci.c17
-rw-r--r--arch/alpha/kernel/traps.c3
-rw-r--r--arch/alpha/kernel/vmlinux.lds.S14
-rw-r--r--arch/arm/boot/compressed/head-xscale.S4
-rw-r--r--arch/arm/common/dmabounce.c3
-rw-r--r--arch/arm/mach-at91/at91x40.c18
-rw-r--r--arch/arm/mach-integrator/impd1.c3
-rw-r--r--arch/arm/mach-integrator/pci_v3.c2
-rw-r--r--arch/arm/mach-omap1/board-palmte.c10
-rw-r--r--arch/arm/mach-omap2/gpmc.c2
-rw-r--r--arch/arm/mach-pxa/cm-x270.c2
-rw-r--r--arch/arm/mach-pxa/em-x270.c2
-rw-r--r--arch/arm/mach-pxa/spitz.c1
-rw-r--r--arch/arm/mach-pxa/ssp.c2
-rw-r--r--arch/arm/mach-pxa/tosa.c4
-rw-r--r--arch/arm/mach-realview/platsmp.c2
-rw-r--r--arch/arm/mach-s3c2410/mach-bast.c2
-rw-r--r--arch/arm/mach-s3c2410/mach-vr1000.c4
-rw-r--r--arch/arm/mach-sa1100/collie.c42
-rw-r--r--arch/arm/plat-omap/clock.c1
-rw-r--r--arch/arm/plat-omap/dma.c2
-rw-r--r--arch/arm/plat-s3c24xx/s3c244x.c1
-rw-r--r--arch/avr32/configs/atngw100_defconfig336
-rw-r--r--arch/avr32/configs/atstk1002_defconfig241
-rw-r--r--arch/avr32/configs/atstk1003_defconfig158
-rw-r--r--arch/avr32/configs/atstk1004_defconfig110
-rw-r--r--arch/avr32/kernel/avr32_ksyms.c4
-rw-r--r--arch/avr32/mach-at32ap/cpufreq.c3
-rw-r--r--arch/blackfin/kernel/cplb-nompu/cplbinit.c6
-rw-r--r--arch/blackfin/kernel/gptimers.c2
-rw-r--r--arch/blackfin/kernel/irqchip.c5
-rw-r--r--arch/blackfin/kernel/traps.c8
-rw-r--r--arch/blackfin/lib/outs.S2
-rw-r--r--arch/blackfin/mach-bf527/boards/ezkit.c13
-rw-r--r--arch/blackfin/mach-bf533/boards/ezkit.c6
-rw-r--r--arch/blackfin/mach-bf533/boards/stamp.c10
-rw-r--r--arch/blackfin/mach-bf537/boards/Makefile2
-rw-r--r--arch/blackfin/mach-bf537/boards/led.S183
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c9
-rw-r--r--arch/blackfin/mach-bf548/boards/Makefile2
-rw-r--r--arch/blackfin/mach-bf548/boards/cm_bf548.c2
-rw-r--r--arch/blackfin/mach-bf548/boards/ezkit.c10
-rw-r--r--arch/blackfin/mach-bf548/boards/led.S172
-rw-r--r--arch/blackfin/mach-bf561/boards/ezkit.c9
-rw-r--r--arch/frv/kernel/cmode.S2
-rw-r--r--arch/frv/kernel/sleep.S2
-rw-r--r--arch/frv/mb93090-mb00/pci-dma-nommu.c2
-rw-r--r--arch/frv/mm/init.c3
-rw-r--r--arch/ia64/Makefile1
-rw-r--r--arch/ia64/kernel/acpi.c9
-rw-r--r--arch/ia64/kernel/iosapic.c2
-rw-r--r--arch/ia64/kernel/ivt.S84
-rw-r--r--arch/ia64/kernel/minstate.h46
-rw-r--r--arch/ia64/kernel/patch.c23
-rw-r--r--arch/ia64/kernel/perfmon.c10
-rw-r--r--arch/ia64/kernel/sal.c7
-rw-r--r--arch/ia64/kernel/setup.c17
-rw-r--r--arch/ia64/kernel/time.c1
-rw-r--r--arch/ia64/kernel/vmlinux.lds.S7
-rw-r--r--arch/ia64/kvm/mmio.c3
-rw-r--r--arch/ia64/sn/kernel/sn2/sn2_smp.c2
-rw-r--r--arch/ia64/uv/kernel/setup.c12
-rw-r--r--arch/m68k/configs/amiga_defconfig6
-rw-r--r--arch/m68k/configs/apollo_defconfig6
-rw-r--r--arch/m68k/configs/atari_defconfig6
-rw-r--r--arch/m68k/configs/bvme6000_defconfig6
-rw-r--r--arch/m68k/configs/hp300_defconfig6
-rw-r--r--arch/m68k/configs/mac_defconfig6
-rw-r--r--arch/m68k/configs/multi_defconfig6
-rw-r--r--arch/m68k/configs/mvme147_defconfig6
-rw-r--r--arch/m68k/configs/mvme16x_defconfig6
-rw-r--r--arch/m68k/configs/q40_defconfig6
-rw-r--r--arch/m68k/configs/sun3_defconfig6
-rw-r--r--arch/m68k/configs/sun3x_defconfig6
-rw-r--r--arch/m68k/lib/string.c6
-rw-r--r--arch/m68knommu/platform/coldfire/timers.c8
-rw-r--r--arch/mips/Kconfig2
-rw-r--r--arch/mips/Makefile18
-rw-r--r--arch/mips/au1000/common/clocks.c1
-rw-r--r--arch/mips/au1000/common/dbdma.c11
-rw-r--r--arch/mips/au1000/common/platform.c4
-rw-r--r--arch/mips/configs/sb1250-swarm_defconfig676
-rw-r--r--arch/mips/configs/tb0219_defconfig192
-rw-r--r--arch/mips/configs/tb0226_defconfig192
-rw-r--r--arch/mips/configs/tb0287_defconfig207
-rw-r--r--arch/mips/fw/arc/identify.c5
-rw-r--r--arch/mips/kernel/Makefile1
-rw-r--r--arch/mips/kernel/cevt-txx9.c3
-rw-r--r--arch/mips/kernel/smp.c2
-rw-r--r--arch/mips/kernel/traps.c16
-rw-r--r--arch/mips/lasat/interrupt.c2
-rw-r--r--arch/mips/lasat/lasat_board.c13
-rw-r--r--arch/mips/lasat/sysctl.c172
-rw-r--r--arch/mips/lasat/sysctl.h24
-rw-r--r--arch/mips/mips-boards/generic/amon.c4
-rw-r--r--arch/mips/mips-boards/generic/time.c19
-rw-r--r--arch/mips/mips-boards/malta/Makefile3
-rw-r--r--arch/mips/mm/c-r4k.c33
-rw-r--r--arch/mips/mm/init.c1
-rw-r--r--arch/mips/mm/page.c10
-rw-r--r--arch/mips/mm/tlbex.c3
-rw-r--r--arch/mips/nxp/pnx8550/jbs/board_setup.c11
-rw-r--r--arch/mips/nxp/pnx8550/stb810/board_setup.c10
-rw-r--r--arch/mips/pci/ops-bridge.c20
-rw-r--r--arch/mips/pci/pci-ip27.c8
-rw-r--r--arch/mips/pci/pci-sb1250.c8
-rw-r--r--arch/mips/pci/pci-vr41xx.c14
-rw-r--r--arch/mips/sgi-ip27/ip27-init.c22
-rw-r--r--arch/mips/sgi-ip27/ip27-memory.c117
-rw-r--r--arch/mips/sgi-ip27/ip27-smp.c5
-rw-r--r--arch/mips/sgi-ip27/ip27-timer.c27
-rw-r--r--arch/mips/sgi-ip32/ip32-irq.c5
-rw-r--r--arch/mips/sibyte/swarm/Makefile4
-rw-r--r--arch/mn10300/kernel/mn10300_ksyms.c5
-rw-r--r--arch/mn10300/kernel/process.c2
-rw-r--r--arch/mn10300/kernel/setup.c1
-rw-r--r--arch/mn10300/lib/Makefile2
-rw-r--r--arch/mn10300/lib/__ucmpdi2.S43
-rw-r--r--arch/parisc/hpux/gate.S3
-rw-r--r--arch/parisc/hpux/wrappers.S3
-rw-r--r--arch/parisc/kernel/entry.S3
-rw-r--r--arch/parisc/kernel/head.S1
-rw-r--r--arch/parisc/kernel/hpmc.S3
-rw-r--r--arch/parisc/kernel/pacache.S3
-rw-r--r--arch/parisc/kernel/parisc_ksyms.c3
-rw-r--r--arch/parisc/kernel/perf_asm.S2
-rw-r--r--arch/parisc/kernel/real2.S13
-rw-r--r--arch/parisc/kernel/signal32.c4
-rw-r--r--arch/parisc/kernel/syscall.S5
-rw-r--r--arch/parisc/kernel/vmlinux.lds.S1
-rw-r--r--arch/parisc/lib/fixup.S3
-rw-r--r--arch/parisc/lib/lusercopy.S5
-rw-r--r--arch/parisc/mm/init.c1
-rw-r--r--arch/powerpc/Makefile4
-rw-r--r--arch/powerpc/boot/.gitignore8
-rw-r--r--arch/powerpc/boot/Makefile15
-rw-r--r--arch/powerpc/boot/crtsavres.S233
-rw-r--r--arch/powerpc/boot/dts/mpc8377_mds.dts18
-rw-r--r--arch/powerpc/boot/dts/mpc8377_rdb.dts8
-rw-r--r--arch/powerpc/boot/dts/mpc8378_rdb.dts8
-rw-r--r--arch/powerpc/boot/dts/mpc8379_rdb.dts8
-rw-r--r--arch/powerpc/boot/dts/mpc8548cds.dts4
-rw-r--r--arch/powerpc/boot/dts/mpc8610_hpcd.dts10
-rw-r--r--arch/powerpc/configs/83xx/mpc8313_rdb_defconfig155
-rw-r--r--arch/powerpc/configs/83xx/mpc8315_rdb_defconfig162
-rw-r--r--arch/powerpc/configs/83xx/mpc832x_mds_defconfig146
-rw-r--r--arch/powerpc/configs/83xx/mpc832x_rdb_defconfig150
-rw-r--r--arch/powerpc/configs/83xx/mpc834x_itx_defconfig157
-rw-r--r--arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig150
-rw-r--r--arch/powerpc/configs/83xx/mpc834x_mds_defconfig146
-rw-r--r--arch/powerpc/configs/83xx/mpc836x_mds_defconfig146
-rw-r--r--arch/powerpc/configs/83xx/mpc837x_mds_defconfig146
-rw-r--r--arch/powerpc/configs/83xx/mpc837x_rdb_defconfig224
-rw-r--r--arch/powerpc/configs/83xx/sbc834x_defconfig140
-rw-r--r--arch/powerpc/configs/85xx/ksi8560_defconfig168
-rw-r--r--arch/powerpc/configs/85xx/mpc8540_ads_defconfig133
-rw-r--r--arch/powerpc/configs/85xx/mpc8544_ds_defconfig210
-rw-r--r--arch/powerpc/configs/85xx/mpc8560_ads_defconfig135
-rw-r--r--arch/powerpc/configs/85xx/mpc8568mds_defconfig150
-rw-r--r--arch/powerpc/configs/85xx/mpc8572_ds_defconfig210
-rw-r--r--arch/powerpc/configs/85xx/mpc85xx_cds_defconfig137
-rw-r--r--arch/powerpc/configs/85xx/sbc8548_defconfig131
-rw-r--r--arch/powerpc/configs/85xx/sbc8560_defconfig135
-rw-r--r--arch/powerpc/configs/85xx/stx_gp3_defconfig152
-rw-r--r--arch/powerpc/configs/85xx/tqm8540_defconfig147
-rw-r--r--arch/powerpc/configs/85xx/tqm8541_defconfig146
-rw-r--r--arch/powerpc/configs/85xx/tqm8555_defconfig146
-rw-r--r--arch/powerpc/configs/85xx/tqm8560_defconfig146
-rw-r--r--arch/powerpc/configs/adder875_defconfig52
-rw-r--r--arch/powerpc/configs/chrp32_defconfig164
-rw-r--r--arch/powerpc/configs/ep8248e_defconfig124
-rw-r--r--arch/powerpc/configs/ep88xc_defconfig47
-rw-r--r--arch/powerpc/configs/g5_defconfig178
-rw-r--r--arch/powerpc/configs/iseries_defconfig146
-rw-r--r--arch/powerpc/configs/linkstation_defconfig172
-rw-r--r--arch/powerpc/configs/mpc7448_hpc2_defconfig136
-rw-r--r--arch/powerpc/configs/mpc8272_ads_defconfig126
-rw-r--r--arch/powerpc/configs/mpc83xx_defconfig151
-rw-r--r--arch/powerpc/configs/mpc85xx_defconfig230
-rw-r--r--arch/powerpc/configs/mpc8610_hpcd_defconfig316
-rw-r--r--arch/powerpc/configs/mpc8641_hpcn_defconfig210
-rw-r--r--arch/powerpc/configs/mpc866_ads_defconfig128
-rw-r--r--arch/powerpc/configs/mpc885_ads_defconfig47
-rw-r--r--arch/powerpc/configs/pasemi_defconfig172
-rw-r--r--arch/powerpc/configs/pmac32_defconfig174
-rw-r--r--arch/powerpc/configs/ppc64_defconfig198
-rw-r--r--arch/powerpc/configs/pq2fads_defconfig133
-rw-r--r--arch/powerpc/configs/prpmc2800_defconfig153
-rw-r--r--arch/powerpc/configs/pseries_defconfig224
-rw-r--r--arch/powerpc/configs/sbc8641d_defconfig150
-rw-r--r--arch/powerpc/configs/storcenter_defconfig71
-rw-r--r--arch/powerpc/kernel/head_44x.S7
-rw-r--r--arch/powerpc/kernel/irq.c2
-rw-r--r--arch/powerpc/kernel/legacy_serial.c5
-rw-r--r--arch/powerpc/kernel/pci_64.c2
-rw-r--r--arch/powerpc/kernel/ppc_ksyms.c2
-rw-r--r--arch/powerpc/kernel/prom_init_check.sh16
-rw-r--r--arch/powerpc/kernel/signal_64.c4
-rw-r--r--arch/powerpc/kernel/vdso.c2
-rw-r--r--arch/powerpc/kvm/44x_tlb.c9
-rw-r--r--arch/powerpc/kvm/booke_guest.c33
-rw-r--r--arch/powerpc/kvm/emulate.c12
-rw-r--r--arch/powerpc/lib/Makefile2
-rw-r--r--arch/powerpc/lib/crtsavres.S229
-rw-r--r--arch/powerpc/mm/hash_low_32.S2
-rw-r--r--arch/powerpc/mm/hash_low_64.S4
-rw-r--r--arch/powerpc/mm/mem.c3
-rw-r--r--arch/powerpc/mm/pgtable_32.c2
-rw-r--r--arch/powerpc/platforms/52xx/lite5200_pm.c14
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_gpio.c14
-rw-r--r--arch/powerpc/platforms/85xx/Kconfig1
-rw-r--r--arch/powerpc/platforms/cell/celleb_scc_pciex.c5
-rw-r--r--arch/powerpc/platforms/cell/spu_base.c44
-rw-r--r--arch/powerpc/platforms/cell/spufs/run.c21
-rw-r--r--arch/powerpc/platforms/cell/spufs/sched.c19
-rw-r--r--arch/powerpc/platforms/ps3/mm.c3
-rw-r--r--arch/powerpc/platforms/pseries/eeh_driver.c11
-rw-r--r--arch/powerpc/platforms/pseries/nvram.c4
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c2
-rw-r--r--arch/powerpc/sysdev/mpic.c20
-rw-r--r--arch/powerpc/xmon/xmon.c1
-rw-r--r--arch/ppc/kernel/ppc_ksyms.c2
-rw-r--r--arch/s390/Kconfig4
-rw-r--r--arch/s390/appldata/appldata_base.c8
-rw-r--r--arch/s390/defconfig11
-rw-r--r--arch/s390/kernel/dis.c2
-rw-r--r--arch/s390/kernel/smp.c4
-rw-r--r--arch/s390/kvm/diag.c2
-rw-r--r--arch/s390/kvm/interrupt.c7
-rw-r--r--arch/s390/kvm/kvm-s390.c13
-rw-r--r--arch/s390/mm/init.c49
-rw-r--r--arch/s390/mm/pgtable.c44
-rw-r--r--arch/s390/mm/vmem.c20
-rw-r--r--arch/sh/Kconfig1
-rw-r--r--arch/sh/Kconfig.debug2
-rw-r--r--arch/sh/Makefile2
-rw-r--r--arch/sh/boards/renesas/rts7751r2d/setup.c39
-rw-r--r--arch/sh/configs/migor_defconfig294
-rw-r--r--arch/sh/configs/rsk7203_defconfig841
-rw-r--r--arch/sh/configs/se7206_defconfig475
-rw-r--r--arch/sh/drivers/heartbeat.c2
-rw-r--r--arch/sh/kernel/cpu/irq/intc-sh5.c1
-rw-r--r--arch/sh/kernel/cpu/sh4/probe.c1
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7722.c2
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7723.c49
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7763.c9
-rw-r--r--arch/sh/kernel/module.c39
-rw-r--r--arch/sparc/Kconfig1
-rw-r--r--arch/sparc/boot/Makefile1
-rw-r--r--arch/sparc/boot/btfixupprep.c2
-rw-r--r--arch/sparc/boot/piggyback.c2
-rw-r--r--arch/sparc/kernel/ebus.c2
-rw-r--r--arch/sparc/kernel/etrap.S2
-rw-r--r--arch/sparc/kernel/head.S2
-rw-r--r--arch/sparc/kernel/idprom.c2
-rw-r--r--arch/sparc/kernel/ioport.c2
-rw-r--r--arch/sparc/kernel/irq.c2
-rw-r--r--arch/sparc/kernel/led.c34
-rw-r--r--arch/sparc/kernel/muldiv.c2
-rw-r--r--arch/sparc/kernel/rtrap.S2
-rw-r--r--arch/sparc/kernel/setup.c2
-rw-r--r--arch/sparc/kernel/sparc_ksyms.c2
-rw-r--r--arch/sparc/kernel/sun4d_irq.c2
-rw-r--r--arch/sparc/kernel/trampoline.S2
-rw-r--r--arch/sparc/kernel/traps.c2
-rw-r--r--arch/sparc/kernel/unaligned.c2
-rw-r--r--arch/sparc/kernel/wof.S2
-rw-r--r--arch/sparc/kernel/wuf.S2
-rw-r--r--arch/sparc/lib/Makefile1
-rw-r--r--arch/sparc/lib/ashldi3.S2
-rw-r--r--arch/sparc/lib/ashrdi3.S2
-rw-r--r--arch/sparc/lib/blockops.S2
-rw-r--r--arch/sparc/lib/locks.S2
-rw-r--r--arch/sparc/lib/lshrdi3.S1
-rw-r--r--arch/sparc/lib/memscan.S2
-rw-r--r--arch/sparc/lib/mul.S2
-rw-r--r--arch/sparc/lib/rem.S2
-rw-r--r--arch/sparc/lib/rwsem.S2
-rw-r--r--arch/sparc/lib/sdiv.S2
-rw-r--r--arch/sparc/lib/strncmp.S2
-rw-r--r--arch/sparc/lib/udiv.S2
-rw-r--r--arch/sparc/lib/umul.S2
-rw-r--r--arch/sparc/lib/urem.S2
-rw-r--r--arch/sparc/math-emu/ashldi3.S2
-rw-r--r--arch/sparc/mm/Makefile1
-rw-r--r--arch/sparc/mm/fault.c2
-rw-r--r--arch/sparc/mm/generic.c2
-rw-r--r--arch/sparc/mm/hypersparc.S2
-rw-r--r--arch/sparc/mm/init.c2
-rw-r--r--arch/sparc/mm/io-unit.c2
-rw-r--r--arch/sparc/mm/loadmmu.c2
-rw-r--r--arch/sparc/mm/nosrmmu.c2
-rw-r--r--arch/sparc/mm/nosun4c.c2
-rw-r--r--arch/sparc/mm/swift.S2
-rw-r--r--arch/sparc/mm/tsunami.S2
-rw-r--r--arch/sparc/mm/viking.S2
-rw-r--r--arch/sparc/prom/Makefile1
-rw-r--r--arch/sparc/prom/bootstr.c2
-rw-r--r--arch/sparc/prom/console.c2
-rw-r--r--arch/sparc/prom/devmap.c2
-rw-r--r--arch/sparc/prom/devops.c2
-rw-r--r--arch/sparc/prom/init.c2
-rw-r--r--arch/sparc/prom/misc.c2
-rw-r--r--arch/sparc/prom/mp.c2
-rw-r--r--arch/sparc/prom/palloc.c2
-rw-r--r--arch/sparc/prom/ranges.c2
-rw-r--r--arch/sparc/prom/segment.c2
-rw-r--r--arch/sparc/prom/tree.c2
-rw-r--r--arch/sparc64/Makefile1
-rw-r--r--arch/sparc64/boot/Makefile1
-rw-r--r--arch/sparc64/boot/piggyback.c2
-rw-r--r--arch/sparc64/kernel/dtlb_prot.S2
-rw-r--r--arch/sparc64/kernel/ebus.c2
-rw-r--r--arch/sparc64/kernel/etrap.S2
-rw-r--r--arch/sparc64/kernel/idprom.c2
-rw-r--r--arch/sparc64/kernel/process.c153
-rw-r--r--arch/sparc64/kernel/rtrap.S3
-rw-r--r--arch/sparc64/kernel/sbus.c2
-rw-r--r--arch/sparc64/kernel/setup.c2
-rw-r--r--arch/sparc64/kernel/signal.c2
-rw-r--r--arch/sparc64/kernel/smp.c10
-rw-r--r--arch/sparc64/kernel/stacktrace.c12
-rw-r--r--arch/sparc64/kernel/starfire.c2
-rw-r--r--arch/sparc64/kernel/sys32.S2
-rw-r--r--arch/sparc64/kernel/trampoline.S2
-rw-r--r--arch/sparc64/kernel/traps.c12
-rw-r--r--arch/sparc64/kernel/unaligned.c2
-rw-r--r--arch/sparc64/lib/PeeCeeI.c2
-rw-r--r--arch/sparc64/lib/VISsave.S2
-rw-r--r--arch/sparc64/lib/memcmp.S2
-rw-r--r--arch/sparc64/lib/memscan.S2
-rw-r--r--arch/sparc64/lib/strncmp.S2
-rw-r--r--arch/sparc64/lib/strncpy_from_user.S2
-rw-r--r--arch/sparc64/math-emu/math.c2
-rw-r--r--arch/sparc64/math-emu/sfp-util.h2
-rw-r--r--arch/sparc64/mm/Makefile1
-rw-r--r--arch/sparc64/mm/fault.c2
-rw-r--r--arch/sparc64/mm/generic.c2
-rw-r--r--arch/sparc64/mm/init.c2
-rw-r--r--arch/sparc64/mm/ultra.S31
-rw-r--r--arch/sparc64/prom/Makefile1
-rw-r--r--arch/sparc64/prom/bootstr.c2
-rw-r--r--arch/sparc64/prom/devops.c2
-rw-r--r--arch/sparc64/prom/init.c2
-rw-r--r--arch/sparc64/prom/misc.c2
-rw-r--r--arch/sparc64/prom/p1275.c2
-rw-r--r--arch/sparc64/prom/tree.c2
-rw-r--r--arch/um/Kconfig2
-rw-r--r--arch/um/drivers/pcap_user.c2
-rw-r--r--arch/um/drivers/ubd_kern.c1
-rw-r--r--arch/um/include/os.h2
-rw-r--r--arch/um/kernel/ksyms.c5
-rw-r--r--arch/um/kernel/um_arch.c2
-rw-r--r--arch/um/os-Linux/helper.c1
-rw-r--r--arch/um/os-Linux/skas/process.c2
-rw-r--r--arch/um/os-Linux/start_up.c25
-rw-r--r--arch/um/os-Linux/sys-i386/registers.c5
-rw-r--r--arch/um/os-Linux/sys-i386/task_size.c31
-rw-r--r--arch/um/os-Linux/sys-x86_64/task_size.c2
-rw-r--r--arch/um/os-Linux/time.c7
-rw-r--r--arch/um/sys-x86_64/ksyms.c10
-rw-r--r--arch/x86/Kconfig82
-rw-r--r--arch/x86/Kconfig.cpu4
-rw-r--r--arch/x86/Kconfig.debug20
-rw-r--r--arch/x86/Makefile4
-rw-r--r--arch/x86/boot/a20.c3
-rw-r--r--arch/x86/boot/compressed/head_64.S5
-rw-r--r--arch/x86/boot/printf.c2
-rw-r--r--arch/x86/boot/video-vga.c3
-rw-r--r--arch/x86/configs/i386_defconfig1711
-rw-r--r--arch/x86/configs/x86_64_defconfig1735
-rw-r--r--arch/x86/ia32/ia32entry.S6
-rw-r--r--arch/x86/kernel/Makefile4
-rw-r--r--arch/x86/kernel/acpi/boot.c16
-rw-r--r--arch/x86/kernel/acpi/realmode/wakeup.S38
-rw-r--r--arch/x86/kernel/acpi/realmode/wakeup.h5
-rw-r--r--arch/x86/kernel/acpi/sleep.c16
-rw-r--r--arch/x86/kernel/aperture_64.c307
-rw-r--r--arch/x86/kernel/apic_32.c12
-rw-r--r--arch/x86/kernel/apic_64.c38
-rw-r--r--arch/x86/kernel/apm_32.c25
-rw-r--r--arch/x86/kernel/cpu/Makefile4
-rw-r--r--arch/x86/kernel/cpu/addon_cpuid_features.c17
-rw-r--r--arch/x86/kernel/cpu/amd.c42
-rw-r--r--arch/x86/kernel/cpu/amd_64.c211
-rw-r--r--arch/x86/kernel/cpu/bugs.c27
-rw-r--r--arch/x86/kernel/cpu/bugs_64.c (renamed from arch/x86/kernel/bugs_64.c)0
-rw-r--r--arch/x86/kernel/cpu/centaur_64.c43
-rw-r--r--arch/x86/kernel/cpu/cpu.h5
-rw-r--r--arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c44
-rw-r--r--arch/x86/kernel/cpu/cpufreq/longrun.c2
-rw-r--r--arch/x86/kernel/cpu/cpufreq/powernow-k8.c15
-rw-r--r--arch/x86/kernel/cpu/intel_64.c103
-rw-r--r--arch/x86/kernel/cpu/intel_cacheinfo.c1
-rw-r--r--arch/x86/kernel/cpu/mcheck/k7.c36
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce_64.c24
-rw-r--r--arch/x86/kernel/cpu/mcheck/p4.c90
-rw-r--r--arch/x86/kernel/early-quirks.c13
-rw-r--r--arch/x86/kernel/efi_32.c8
-rw-r--r--arch/x86/kernel/entry_32.S1
-rw-r--r--arch/x86/kernel/entry_64.S5
-rw-r--r--arch/x86/kernel/geode_32.c5
-rw-r--r--arch/x86/kernel/head_32.S2
-rw-r--r--arch/x86/kernel/head_64.S29
-rw-r--r--arch/x86/kernel/hpet.c43
-rw-r--r--arch/x86/kernel/i387.c48
-rw-r--r--arch/x86/kernel/i8259.c (renamed from arch/x86/kernel/i8259_32.c)132
-rw-r--r--arch/x86/kernel/i8259_64.c512
-rw-r--r--arch/x86/kernel/io_apic_32.c474
-rw-r--r--arch/x86/kernel/io_apic_64.c132
-rw-r--r--arch/x86/kernel/ipi.c1
-rw-r--r--arch/x86/kernel/irq_32.c38
-rw-r--r--arch/x86/kernel/irq_64.c28
-rw-r--r--arch/x86/kernel/irqinit_32.c114
-rw-r--r--arch/x86/kernel/irqinit_64.c203
-rw-r--r--arch/x86/kernel/kvmclock.c93
-rw-r--r--arch/x86/kernel/ldt.c6
-rw-r--r--arch/x86/kernel/machine_kexec_32.c4
-rw-r--r--arch/x86/kernel/mfgpt_32.c2
-rw-r--r--arch/x86/kernel/microcode.c29
-rw-r--r--arch/x86/kernel/mmconf-fam10h_64.c1
-rw-r--r--arch/x86/kernel/nmi_32.c6
-rw-r--r--arch/x86/kernel/nmi_64.c11
-rw-r--r--arch/x86/kernel/paravirt.c4
-rw-r--r--arch/x86/kernel/pci-dma.c27
-rw-r--r--arch/x86/kernel/pci-gart_64.c108
-rw-r--r--arch/x86/kernel/process.c190
-rw-r--r--arch/x86/kernel/process_32.c67
-rw-r--r--arch/x86/kernel/process_64.c41
-rw-r--r--arch/x86/kernel/pvclock.c141
-rw-r--r--arch/x86/kernel/quirks.c58
-rw-r--r--arch/x86/kernel/reboot.c18
-rw-r--r--arch/x86/kernel/reboot_fixups_32.c4
-rw-r--r--arch/x86/kernel/rtc.c34
-rw-r--r--arch/x86/kernel/setup_32.c10
-rw-r--r--arch/x86/kernel/setup_64.c452
-rw-r--r--arch/x86/kernel/smpboot.c13
-rw-r--r--arch/x86/kernel/sys_i386_32.c64
-rw-r--r--arch/x86/kernel/time_32.c3
-rw-r--r--arch/x86/kernel/traps_32.c1
-rw-r--r--arch/x86/kernel/traps_64.c3
-rw-r--r--arch/x86/kernel/tsc_32.c29
-rw-r--r--arch/x86/kernel/tsc_64.c7
-rw-r--r--arch/x86/kernel/vmlinux_32.lds.S7
-rw-r--r--arch/x86/kernel/vmlinux_64.lds.S8
-rw-r--r--arch/x86/kernel/vsmp_64.c3
-rw-r--r--arch/x86/kvm/i8254.c23
-rw-r--r--arch/x86/kvm/irq.c6
-rw-r--r--arch/x86/kvm/irq.h2
-rw-r--r--arch/x86/kvm/lapic.c1
-rw-r--r--arch/x86/kvm/mmu.c24
-rw-r--r--arch/x86/kvm/paging_tmpl.h2
-rw-r--r--arch/x86/kvm/svm.c2
-rw-r--r--arch/x86/kvm/vmx.c22
-rw-r--r--arch/x86/kvm/x86.c93
-rw-r--r--arch/x86/kvm/x86_emulate.c3
-rw-r--r--arch/x86/lguest/boot.c5
-rw-r--r--arch/x86/lib/copy_user_64.S25
-rw-r--r--arch/x86/lib/copy_user_nocache_64.S25
-rw-r--r--arch/x86/lib/delay_32.c31
-rw-r--r--arch/x86/lib/delay_64.c30
-rw-r--r--arch/x86/math-emu/fpu_entry.c13
-rw-r--r--arch/x86/math-emu/reg_constant.c8
-rw-r--r--arch/x86/mm/dump_pagetables.c2
-rw-r--r--arch/x86/mm/fault.c9
-rw-r--r--arch/x86/mm/init_32.c18
-rw-r--r--arch/x86/mm/init_64.c26
-rw-r--r--arch/x86/mm/ioremap.c21
-rw-r--r--arch/x86/mm/k8topology_64.c13
-rw-r--r--arch/x86/mm/pageattr.c41
-rw-r--r--arch/x86/mm/pat.c392
-rw-r--r--arch/x86/mm/pgtable.c2
-rw-r--r--arch/x86/mm/srat_64.c30
-rw-r--r--arch/x86/pci/Makefile_321
-rw-r--r--arch/x86/pci/Makefile_642
-rw-r--r--arch/x86/pci/acpi.c1
-rw-r--r--arch/x86/pci/amd_bus.c (renamed from arch/x86/pci/k8-bus_64.c)32
-rw-r--r--arch/x86/pci/common.c16
-rw-r--r--arch/x86/pci/direct.c25
-rw-r--r--arch/x86/pci/i386.c4
-rw-r--r--arch/x86/pci/init.c3
-rw-r--r--arch/x86/pci/irq.c268
-rw-r--r--arch/x86/pci/mmconfig-shared.c2
-rw-r--r--arch/x86/pci/olpc.c5
-rw-r--r--arch/x86/pci/pci.h3
-rw-r--r--arch/x86/vdso/vclock_gettime.c6
-rw-r--r--arch/x86/vdso/vma.c2
-rw-r--r--arch/x86/xen/Kconfig13
-rw-r--r--arch/x86/xen/Makefile2
-rw-r--r--arch/x86/xen/enlighten.c184
-rw-r--r--arch/x86/xen/manage.c143
-rw-r--r--arch/x86/xen/mmu.c345
-rw-r--r--arch/x86/xen/mmu.h34
-rw-r--r--arch/x86/xen/multicalls.c40
-rw-r--r--arch/x86/xen/multicalls.h12
-rw-r--r--arch/x86/xen/setup.c5
-rw-r--r--arch/x86/xen/smp.c8
-rw-r--r--arch/x86/xen/suspend.c45
-rw-r--r--arch/x86/xen/time.c158
-rw-r--r--arch/x86/xen/xen-head.S11
-rw-r--r--arch/x86/xen/xen-ops.h11
-rw-r--r--block/as-iosched.c2
-rw-r--r--block/blk-core.c37
-rw-r--r--block/blktrace.c29
-rw-r--r--block/cfq-iosched.c36
-rw-r--r--block/elevator.c2
-rw-r--r--block/genhd.c2
-rw-r--r--crypto/cts.c6
-rw-r--r--drivers/acpi/ac.c8
-rw-r--r--drivers/acpi/bay.c19
-rw-r--r--drivers/acpi/dispatcher/dsfield.c5
-rw-r--r--drivers/acpi/dispatcher/dsmethod.c2
-rw-r--r--drivers/acpi/dock.c5
-rw-r--r--drivers/acpi/ec.c2
-rw-r--r--drivers/acpi/executer/exconfig.c10
-rw-r--r--drivers/acpi/executer/exmutex.c4
-rw-r--r--drivers/acpi/glue.c9
-rw-r--r--drivers/acpi/hardware/hwsleep.c8
-rw-r--r--drivers/acpi/numa.c31
-rw-r--r--drivers/acpi/parser/psargs.c4
-rw-r--r--drivers/acpi/processor_core.c1
-rw-r--r--drivers/acpi/processor_idle.c13
-rw-r--r--drivers/acpi/sleep/main.c5
-rw-r--r--drivers/acpi/sleep/proc.c11
-rw-r--r--drivers/acpi/system.c15
-rw-r--r--drivers/acpi/tables/tbinstal.c25
-rw-r--r--drivers/acpi/tables/tbxface.c2
-rw-r--r--drivers/acpi/thermal.c11
-rw-r--r--drivers/acpi/utilities/utmisc.c2
-rw-r--r--drivers/acpi/video.c3
-rw-r--r--drivers/ata/Kconfig10
-rw-r--r--drivers/ata/ahci.c191
-rw-r--r--drivers/ata/ata_piix.c16
-rw-r--r--drivers/ata/libata-acpi.c165
-rw-r--r--drivers/ata/libata-core.c6
-rw-r--r--drivers/ata/libata-pmp.c7
-rw-r--r--drivers/ata/libata-scsi.c19
-rw-r--r--drivers/ata/libata-sff.c145
-rw-r--r--drivers/ata/libata.h2
-rw-r--r--drivers/ata/pata_icside.c2
-rw-r--r--drivers/ata/pata_pcmcia.c2
-rw-r--r--drivers/ata/pata_rb532_cf.c4
-rw-r--r--drivers/ata/pata_scc.c5
-rw-r--r--drivers/ata/sata_fsl.c224
-rw-r--r--drivers/ata/sata_mv.c122
-rw-r--r--drivers/ata/sata_sil24.c1
-rw-r--r--drivers/ata/sata_uli.c1
-rw-r--r--drivers/atm/eni.h1
-rw-r--r--drivers/atm/fore200e.h1
-rw-r--r--drivers/atm/fore200e_mkfirm.c2
-rw-r--r--drivers/atm/he.c11
-rw-r--r--drivers/atm/he.h15
-rw-r--r--drivers/atm/idt77252.c7
-rw-r--r--drivers/atm/idt77252.h4
-rw-r--r--drivers/atm/iphase.c27
-rw-r--r--drivers/atm/iphase.h3
-rw-r--r--drivers/atm/nicstarmac.copyright2
-rw-r--r--drivers/auxdisplay/Kconfig2
-rw-r--r--drivers/auxdisplay/cfag12864b.c4
-rw-r--r--drivers/auxdisplay/cfag12864bfb.c4
-rw-r--r--drivers/auxdisplay/ks0108.c4
-rw-r--r--drivers/base/core.c109
-rw-r--r--drivers/base/node.c4
-rw-r--r--drivers/base/power/trace.c2
-rw-r--r--drivers/block/brd.c2
-rw-r--r--drivers/block/cciss.c81
-rw-r--r--drivers/block/viodasd.c2
-rw-r--r--drivers/block/virtio_blk.c7
-rw-r--r--drivers/cdrom/viocd.c2
-rw-r--r--drivers/char/Kconfig12
-rw-r--r--drivers/char/agp/agp.h6
-rw-r--r--drivers/char/agp/alpha-agp.c4
-rw-r--r--drivers/char/agp/amd-k7-agp.c4
-rw-r--r--drivers/char/agp/amd64-agp.c89
-rw-r--r--drivers/char/agp/ati-agp.c8
-rw-r--r--drivers/char/agp/backend.c16
-rw-r--r--drivers/char/agp/compat_ioctl.c2
-rw-r--r--drivers/char/agp/efficeon-agp.c6
-rw-r--r--drivers/char/agp/frontend.c12
-rw-r--r--drivers/char/agp/generic.c35
-rw-r--r--drivers/char/agp/hp-agp.c6
-rw-r--r--drivers/char/agp/i460-agp.c2
-rw-r--r--drivers/char/agp/intel-agp.c239
-rw-r--r--drivers/char/agp/nvidia-agp.c4
-rw-r--r--drivers/char/agp/parisc-agp.c6
-rw-r--r--drivers/char/agp/sgi-agp.c8
-rw-r--r--drivers/char/agp/sworks-agp.c6
-rw-r--r--drivers/char/agp/uninorth-agp.c10
-rw-r--r--drivers/char/agp/via-agp.c13
-rw-r--r--drivers/char/drm/ati_pcigart.c8
-rw-r--r--drivers/char/drm/drm.h2
-rw-r--r--drivers/char/drm/drm_drv.c7
-rw-r--r--drivers/char/drm/drm_pciids.h17
-rw-r--r--drivers/char/drm/drm_sysfs.c2
-rw-r--r--drivers/char/drm/i915_drv.c1
-rw-r--r--drivers/char/drm/i915_drv.h11
-rw-r--r--drivers/char/drm/i915_irq.c4
-rw-r--r--drivers/char/drm/r300_cmdbuf.c117
-rw-r--r--drivers/char/drm/r300_reg.h242
-rw-r--r--drivers/char/drm/radeon_cp.c1148
-rw-r--r--drivers/char/drm/radeon_drm.h8
-rw-r--r--drivers/char/drm/radeon_drv.h251
-rw-r--r--drivers/char/drm/radeon_irq.c2
-rw-r--r--drivers/char/drm/radeon_microcode.h1844
-rw-r--r--drivers/char/drm/radeon_state.c17
-rw-r--r--drivers/char/generic_nvram.c2
-rw-r--r--drivers/char/hvc_xen.c61
-rw-r--r--drivers/char/hw_random/Kconfig9
-rw-r--r--drivers/char/hw_random/Makefile1
-rw-r--r--drivers/char/hw_random/intel-rng.c2
-rw-r--r--drivers/char/hw_random/virtio-rng.c155
-rw-r--r--drivers/char/ip2/Makefile4
-rw-r--r--drivers/char/ip2/ip2main.c23
-rw-r--r--drivers/char/keyboard.c7
-rw-r--r--drivers/char/pcmcia/ipwireless/hardware.c20
-rw-r--r--drivers/char/sysrq.c1
-rw-r--r--drivers/char/tty_io.c2
-rw-r--r--drivers/char/tty_ioctl.c7
-rw-r--r--drivers/char/viocons.c2
-rw-r--r--drivers/char/viotape.c2
-rw-r--r--drivers/char/vt.c15
-rw-r--r--drivers/connector/connector.c40
-rw-r--r--drivers/cpufreq/cpufreq.c10
-rw-r--r--drivers/cpufreq/freq_table.c5
-rw-r--r--drivers/cpuidle/cpuidle.c40
-rw-r--r--drivers/dma/iop-adma.c6
-rw-r--r--drivers/edac/mpc85xx_edac.c3
-rw-r--r--drivers/firewire/Kconfig32
-rw-r--r--drivers/firewire/fw-cdev.c23
-rw-r--r--drivers/firewire/fw-ohci.c110
-rw-r--r--drivers/firewire/fw-sbp2.c3
-rw-r--r--drivers/firewire/fw-transaction.c52
-rw-r--r--drivers/firmware/edd.c2
-rw-r--r--drivers/gpio/Kconfig14
-rw-r--r--drivers/gpio/gpiolib.c6
-rw-r--r--drivers/gpio/mcp23s08.c2
-rw-r--r--drivers/gpio/pca953x.c3
-rw-r--r--drivers/hid/hid-debug.c2
-rw-r--r--drivers/hid/hid-input.c7
-rw-r--r--drivers/hid/usbhid/hid-quirks.c49
-rw-r--r--drivers/hid/usbhid/usbkbd.c2
-rw-r--r--drivers/hid/usbhid/usbmouse.c2
-rw-r--r--drivers/hwmon/Kconfig14
-rw-r--r--drivers/hwmon/Makefile1
-rw-r--r--drivers/hwmon/abituguru3.c18
-rw-r--r--drivers/hwmon/adt7473.c3
-rw-r--r--drivers/hwmon/hdaps.c8
-rw-r--r--drivers/hwmon/i5k_amb.c39
-rw-r--r--drivers/hwmon/ibmaem.c1111
-rw-r--r--drivers/hwmon/lm75.c20
-rw-r--r--drivers/hwmon/lm85.c25
-rw-r--r--drivers/i2c/busses/i2c-s3c2410.c28
-rw-r--r--drivers/ide/Kconfig1
-rw-r--r--drivers/ide/arm/bast-ide.c1
-rw-r--r--drivers/ide/arm/ide_arm.c1
-rw-r--r--drivers/ide/arm/palm_bk3710.c25
-rw-r--r--drivers/ide/ide-generic.c10
-rw-r--r--drivers/ide/ide-pnp.c1
-rw-r--r--drivers/ide/ide-probe.c13
-rw-r--r--drivers/ide/ide-proc.c3
-rw-r--r--drivers/ide/ide-taskfile.c6
-rw-r--r--drivers/ide/ide.c24
-rw-r--r--drivers/ide/legacy/buddha.c2
-rw-r--r--drivers/ide/legacy/falconide.c2
-rw-r--r--drivers/ide/legacy/gayle.c6
-rw-r--r--drivers/ide/legacy/ide-cs.c44
-rw-r--r--drivers/ide/legacy/macide.c2
-rw-r--r--drivers/ide/legacy/q40ide.c2
-rw-r--r--drivers/ide/pci/cmd640.c2
-rw-r--r--drivers/ide/pci/delkin_cb.c28
-rw-r--r--drivers/ide/pci/opti621.c221
-rw-r--r--drivers/ide/pci/sis5513.c5
-rw-r--r--drivers/ide/ppc/mpc8xx.c4
-rw-r--r--drivers/ide/ppc/pmac.c60
-rw-r--r--drivers/ieee1394/Kconfig118
-rw-r--r--drivers/ieee1394/sbp2.c20
-rw-r--r--drivers/infiniband/core/mad.c4
-rw-r--r--drivers/infiniband/core/umem.c2
-rw-r--r--drivers/infiniband/core/user_mad.c14
-rw-r--r--drivers/infiniband/core/uverbs_main.c13
-rw-r--r--drivers/infiniband/hw/amso1100/c2_rnic.c3
-rw-r--r--drivers/infiniband/hw/cxgb3/iwch_qp.c2
-rw-r--r--drivers/infiniband/hw/ehca/ehca_reqs.c6
-rw-r--r--drivers/infiniband/hw/ipath/ipath_kernel.h5
-rw-r--r--drivers/infiniband/hw/ipath/ipath_mad.c4
-rw-r--r--drivers/infiniband/hw/ipath/ipath_sdma.c16
-rw-r--r--drivers/infiniband/hw/ipath/ipath_uc.c4
-rw-r--r--drivers/infiniband/hw/ipath/ipath_verbs.c3
-rw-r--r--drivers/infiniband/hw/mlx4/qp.c15
-rw-r--r--drivers/infiniband/hw/mthca/mthca_main.c14
-rw-r--r--drivers/infiniband/hw/mthca/mthca_memfree.c6
-rw-r--r--drivers/infiniband/hw/nes/nes_verbs.c4
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_multicast.c6
-rw-r--r--drivers/input/ff-core.c18
-rw-r--r--drivers/input/keyboard/aaed2000_kbd.c2
-rw-r--r--drivers/input/keyboard/atkbd.c2
-rw-r--r--drivers/input/keyboard/corgikbd.c2
-rw-r--r--drivers/input/keyboard/jornada680_kbd.c2
-rw-r--r--drivers/input/keyboard/jornada720_kbd.c2
-rw-r--r--drivers/input/keyboard/pxa27x_keypad.c38
-rw-r--r--drivers/input/keyboard/spitzkbd.c2
-rw-r--r--drivers/input/misc/Kconfig1
-rw-r--r--drivers/input/misc/apanel.c1
-rw-r--r--drivers/input/mouse/appletouch.c49
-rw-r--r--drivers/input/serio/i8042-x86ia64io.h14
-rw-r--r--drivers/input/serio/i8042.c41
-rw-r--r--drivers/input/tablet/gtco.c17
-rw-r--r--drivers/input/touchscreen/jornada720_ts.c2
-rw-r--r--drivers/input/touchscreen/wm9713.c22
-rw-r--r--drivers/input/touchscreen/wm97xx-core.c25
-rw-r--r--drivers/input/xen-kbdfront.c20
-rw-r--r--drivers/isdn/capi/capiutil.c6
-rw-r--r--drivers/isdn/hardware/eicon/divasmain.c1
-rw-r--r--drivers/isdn/hardware/eicon/divasproc.c4
-rw-r--r--drivers/isdn/hysdn/Kconfig2
-rw-r--r--drivers/isdn/hysdn/boardergo.c14
-rw-r--r--drivers/isdn/hysdn/hycapi.c6
-rw-r--r--drivers/isdn/hysdn/hysdn_procconf.c29
-rw-r--r--drivers/isdn/sc/ioctl.c1
-rw-r--r--drivers/leds/led-class.c6
-rw-r--r--drivers/lguest/lg.h1
-rw-r--r--drivers/lguest/lguest_device.c25
-rw-r--r--drivers/lguest/x86/core.c15
-rw-r--r--drivers/macintosh/mediabay.c7
-rw-r--r--drivers/macintosh/smu.c5
-rw-r--r--drivers/macintosh/therm_adt746x.c13
-rw-r--r--drivers/md/bitmap.c17
-rw-r--r--drivers/md/dm-crypt.c1
-rw-r--r--drivers/md/md.c87
-rw-r--r--drivers/md/multipath.c3
-rw-r--r--drivers/md/raid1.c29
-rw-r--r--drivers/md/raid10.c16
-rw-r--r--drivers/md/raid5.c61
-rw-r--r--drivers/media/Makefile7
-rw-r--r--drivers/media/common/ir-keymaps.c38
-rw-r--r--drivers/media/common/tuners/Kconfig1
-rw-r--r--drivers/media/common/tuners/mxl5005s.c4
-rw-r--r--drivers/media/common/tuners/tda18271-common.c14
-rw-r--r--drivers/media/common/tuners/tda18271-fe.c53
-rw-r--r--drivers/media/common/tuners/tda827x.c4
-rw-r--r--drivers/media/common/tuners/tea5761.c2
-rw-r--r--drivers/media/common/tuners/tuner-i2c.h8
-rw-r--r--drivers/media/common/tuners/tuner-simple.c6
-rw-r--r--drivers/media/common/tuners/tuner-xc2028.c87
-rw-r--r--drivers/media/common/tuners/xc5000.c30
-rw-r--r--drivers/media/common/tuners/xc5000_priv.h1
-rw-r--r--drivers/media/dvb/b2c2/flexcop-usb.c2
-rw-r--r--drivers/media/dvb/cinergyT2/cinergyT2.c46
-rw-r--r--drivers/media/dvb/dvb-core/dvb_net.c12
-rw-r--r--drivers/media/dvb/dvb-usb/Kconfig2
-rw-r--r--drivers/media/dvb/dvb-usb/dib0700_devices.c21
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-firmware.c2
-rw-r--r--drivers/media/dvb/dvb-usb/gl861.c27
-rw-r--r--drivers/media/dvb/dvb-usb/gp8psk.c10
-rw-r--r--drivers/media/dvb/dvb-usb/m920x.c7
-rw-r--r--drivers/media/dvb/dvb-usb/umt-010.c2
-rw-r--r--drivers/media/dvb/frontends/au8522.c29
-rw-r--r--drivers/media/dvb/frontends/dib0070.h15
-rw-r--r--drivers/media/dvb/frontends/dib7000p.h15
-rw-r--r--drivers/media/dvb/frontends/or51132.c6
-rw-r--r--drivers/media/dvb/frontends/stv0299.c15
-rw-r--r--drivers/media/dvb/frontends/tda10023.c20
-rw-r--r--drivers/media/dvb/frontends/tda1004x.c29
-rw-r--r--drivers/media/dvb/ttpci/Kconfig1
-rw-r--r--drivers/media/dvb/ttpci/av7110.c9
-rw-r--r--drivers/media/dvb/ttpci/av7110_av.c34
-rw-r--r--drivers/media/dvb/ttpci/av7110_hw.c5
-rw-r--r--drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c2
-rw-r--r--drivers/media/dvb/ttusb-dec/Kconfig2
-rw-r--r--drivers/media/dvb/ttusb-dec/ttusb_dec.c25
-rw-r--r--drivers/media/dvb/ttusb-dec/ttusbdecfe.c10
-rw-r--r--drivers/media/video/Kconfig10
-rw-r--r--drivers/media/video/Makefile2
-rw-r--r--drivers/media/video/au0828/Kconfig2
-rw-r--r--drivers/media/video/au0828/au0828-cards.c18
-rw-r--r--drivers/media/video/au0828/au0828-dvb.c6
-rw-r--r--drivers/media/video/bt8xx/bttv-cards.c5
-rw-r--r--drivers/media/video/bt8xx/bttv-driver.c2
-rw-r--r--drivers/media/video/bt8xx/bttv-risc.c8
-rw-r--r--drivers/media/video/btcx-risc.c2
-rw-r--r--drivers/media/video/btcx-risc.h4
-rw-r--r--drivers/media/video/cx18/Kconfig4
-rw-r--r--drivers/media/video/cx18/cx18-av-core.c154
-rw-r--r--drivers/media/video/cx18/cx18-av-core.h16
-rw-r--r--drivers/media/video/cx18/cx18-cards.c88
-rw-r--r--drivers/media/video/cx18/cx18-cards.h50
-rw-r--r--drivers/media/video/cx18/cx18-controls.c6
-rw-r--r--drivers/media/video/cx18/cx18-driver.c26
-rw-r--r--drivers/media/video/cx18/cx18-driver.h9
-rw-r--r--drivers/media/video/cx18/cx18-dvb.c17
-rw-r--r--drivers/media/video/cx18/cx18-fileops.c13
-rw-r--r--drivers/media/video/cx18/cx18-gpio.c57
-rw-r--r--drivers/media/video/cx18/cx18-gpio.h1
-rw-r--r--drivers/media/video/cx18/cx18-i2c.c2
-rw-r--r--drivers/media/video/cx18/cx18-ioctl.c12
-rw-r--r--drivers/media/video/cx18/cx18-irq.c12
-rw-r--r--drivers/media/video/cx18/cx18-mailbox.c8
-rw-r--r--drivers/media/video/cx18/cx18-streams.c37
-rw-r--r--drivers/media/video/cx23885/cx23885-core.c8
-rw-r--r--drivers/media/video/cx25840/cx25840-core.c2
-rw-r--r--drivers/media/video/cx88/cx88-alsa.c6
-rw-r--r--drivers/media/video/cx88/cx88-cards.c13
-rw-r--r--drivers/media/video/cx88/cx88-core.c8
-rw-r--r--drivers/media/video/em28xx/em28xx-audio.c18
-rw-r--r--drivers/media/video/em28xx/em28xx-cards.c4
-rw-r--r--drivers/media/video/em28xx/em28xx-dvb.c10
-rw-r--r--drivers/media/video/em28xx/em28xx-reg.h1
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c32
-rw-r--r--drivers/media/video/ivtv/ivtv-driver.h10
-rw-r--r--drivers/media/video/ivtv/ivtv-fileops.c2
-rw-r--r--drivers/media/video/ivtv/ivtv-irq.c8
-rw-r--r--drivers/media/video/ivtv/ivtv-queue.c2
-rw-r--r--drivers/media/video/ivtv/ivtv-streams.c30
-rw-r--r--drivers/media/video/ivtv/ivtv-version.h4
-rw-r--r--drivers/media/video/ivtv/ivtv-yuv.c2
-rw-r--r--drivers/media/video/ivtv/ivtv-yuv.h2
-rw-r--r--drivers/media/video/pxa_camera.c4
-rw-r--r--drivers/media/video/saa7134/saa7134-alsa.c8
-rw-r--r--drivers/media/video/saa7134/saa7134-cards.c56
-rw-r--r--drivers/media/video/saa7134/saa7134-dvb.c43
-rw-r--r--drivers/media/video/saa7134/saa7134-empress.c40
-rw-r--r--drivers/media/video/saa7134/saa7134-input.c9
-rw-r--r--drivers/media/video/soc_camera.c16
-rw-r--r--drivers/media/video/tuner-core.c60
-rw-r--r--drivers/media/video/usbvideo/quickcam_messenger.c2
-rw-r--r--drivers/media/video/uvc/Makefile3
-rw-r--r--drivers/media/video/uvc/uvc_ctrl.c1256
-rw-r--r--drivers/media/video/uvc/uvc_driver.c1955
-rw-r--r--drivers/media/video/uvc/uvc_isight.c134
-rw-r--r--drivers/media/video/uvc/uvc_queue.c477
-rw-r--r--drivers/media/video/uvc/uvc_status.c207
-rw-r--r--drivers/media/video/uvc/uvc_v4l2.c1105
-rw-r--r--drivers/media/video/uvc/uvc_video.c934
-rw-r--r--drivers/media/video/uvc/uvcvideo.h796
-rw-r--r--drivers/media/video/videobuf-core.c3
-rw-r--r--drivers/media/video/videodev.c245
-rw-r--r--drivers/media/video/vivi.c7
-rw-r--r--drivers/media/video/zoran.h4
-rw-r--r--drivers/media/video/zoran_device.c2
-rw-r--r--drivers/media/video/zoran_driver.c10
-rw-r--r--drivers/message/fusion/mptfc.c2
-rw-r--r--drivers/message/fusion/mptsas.c2
-rw-r--r--drivers/message/fusion/mptscsih.c8
-rw-r--r--drivers/mfd/Kconfig2
-rw-r--r--drivers/misc/fujitsu-laptop.c6
-rw-r--r--drivers/misc/kgdbts.c33
-rw-r--r--drivers/misc/thinkpad_acpi.c496
-rw-r--r--drivers/mmc/card/block.c2
-rw-r--r--drivers/mmc/host/Kconfig2
-rw-r--r--drivers/mmc/host/pxamci.c13
-rw-r--r--drivers/mmc/host/sdhci.c34
-rw-r--r--drivers/mmc/host/wbsd.c21
-rw-r--r--drivers/mtd/devices/m25p80.c4
-rw-r--r--drivers/mtd/maps/ck804xrom.c18
-rw-r--r--drivers/mtd/maps/omap_nor.c2
-rw-r--r--drivers/mtd/nand/pxa3xx_nand.c2
-rw-r--r--drivers/mtd/onenand/generic.c2
-rw-r--r--drivers/mtd/redboot.c2
-rw-r--r--drivers/net/3c509.c17
-rw-r--r--drivers/net/3c59x.c5
-rw-r--r--drivers/net/7990.c6
-rw-r--r--drivers/net/Kconfig4
-rw-r--r--drivers/net/atlx/atl1.c21
-rw-r--r--drivers/net/au1000_eth.c7
-rw-r--r--drivers/net/bfin_mac.c1
-rw-r--r--drivers/net/bnx2.c9
-rw-r--r--drivers/net/bnx2.h1
-rw-r--r--drivers/net/bnx2x.c5
-rw-r--r--drivers/net/bnx2x.h3
-rw-r--r--drivers/net/bnx2x_init.h3
-rw-r--r--drivers/net/bonding/bond_sysfs.c12
-rw-r--r--drivers/net/cassini.c11
-rw-r--r--drivers/net/cpmac.c234
-rw-r--r--drivers/net/cs89x0.c10
-rw-r--r--drivers/net/dm9000.c2
-rw-r--r--drivers/net/e100.c2
-rw-r--r--drivers/net/e1000/e1000_ethtool.c2
-rw-r--r--drivers/net/e1000e/netdev.c7
-rw-r--r--drivers/net/ehea/ehea_main.c24
-rw-r--r--drivers/net/enc28j60.c87
-rw-r--r--drivers/net/fec_mpc52xx.c2
-rw-r--r--drivers/net/forcedeth.c21
-rw-r--r--drivers/net/fs_enet/fs_enet-main.c2
-rw-r--r--drivers/net/hamradio/baycom_epp.c2
-rw-r--r--drivers/net/hamradio/dmascc.c2
-rw-r--r--drivers/net/hamradio/scc.c3
-rw-r--r--drivers/net/ibm_newemac/Kconfig1
-rw-r--r--drivers/net/igb/igb_main.c3
-rw-r--r--drivers/net/ipg.c20
-rw-r--r--drivers/net/irda/Kconfig1
-rw-r--r--drivers/net/irda/irda-usb.c2
-rw-r--r--drivers/net/irda/irda-usb.h4
-rw-r--r--drivers/net/ixgbe/ixgbe_82598.c4
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c3
-rw-r--r--drivers/net/myri10ge/myri10ge.c4
-rw-r--r--drivers/net/netxen/netxen_nic.h18
-rw-r--r--drivers/net/netxen/netxen_nic_ethtool.c6
-rw-r--r--drivers/net/netxen/netxen_nic_hw.c112
-rw-r--r--drivers/net/netxen/netxen_nic_init.c46
-rw-r--r--drivers/net/netxen/netxen_nic_isr.c4
-rw-r--r--drivers/net/netxen/netxen_nic_main.c137
-rw-r--r--drivers/net/netxen/netxen_nic_niu.c22
-rw-r--r--drivers/net/pcmcia/axnet_cs.c2
-rw-r--r--drivers/net/pcmcia/fmvj18x_cs.c4
-rw-r--r--drivers/net/pcmcia/pcnet_cs.c3
-rw-r--r--drivers/net/pcmcia/xirc2ps_cs.c12
-rw-r--r--drivers/net/pcnet32.c4
-rw-r--r--drivers/net/phy/Kconfig2
-rw-r--r--drivers/net/phy/phy_device.c1
-rw-r--r--drivers/net/pppoe.c37
-rw-r--r--drivers/net/pppol2tp.c144
-rw-r--r--drivers/net/qla3xxx.c2
-rw-r--r--drivers/net/r6040.c4
-rw-r--r--drivers/net/s2io-regs.h2
-rw-r--r--drivers/net/s2io.c531
-rw-r--r--drivers/net/s2io.h26
-rw-r--r--drivers/net/sb1250-mac.c67
-rw-r--r--drivers/net/sc92031.c8
-rw-r--r--drivers/net/sfc/bitfield.h7
-rw-r--r--drivers/net/sfc/boards.c9
-rw-r--r--drivers/net/sfc/efx.c84
-rw-r--r--drivers/net/sfc/falcon.c91
-rw-r--r--drivers/net/sfc/falcon.h5
-rw-r--r--drivers/net/sfc/falcon_hwdefs.h4
-rw-r--r--drivers/net/sfc/falcon_io.h29
-rw-r--r--drivers/net/sfc/falcon_xmac.c12
-rw-r--r--drivers/net/sfc/net_driver.h44
-rw-r--r--drivers/net/sfc/rx.c48
-rw-r--r--drivers/net/sfc/selftest.c14
-rw-r--r--drivers/net/sfc/sfe4001.c14
-rw-r--r--drivers/net/sfc/tenxpress.c4
-rw-r--r--drivers/net/sfc/tx.c11
-rw-r--r--drivers/net/sfc/workarounds.h2
-rw-r--r--drivers/net/sfc/xfp_phy.c4
-rw-r--r--drivers/net/sky2.c32
-rw-r--r--drivers/net/smc911x.c24
-rw-r--r--drivers/net/smc91x.c17
-rw-r--r--drivers/net/smc91x.h8
-rw-r--r--drivers/net/sunhme.c4
-rw-r--r--drivers/net/tc35815.c4
-rw-r--r--drivers/net/tg3.c33
-rw-r--r--drivers/net/tokenring/3c359.h2
-rw-r--r--drivers/net/tokenring/olympic.h2
-rw-r--r--drivers/net/tulip/tulip_core.c12
-rw-r--r--drivers/net/tulip/uli526x.c16
-rw-r--r--drivers/net/tun.c15
-rw-r--r--drivers/net/ucc_geth.c9
-rw-r--r--drivers/net/ucc_geth_ethtool.c3
-rw-r--r--drivers/net/usb/asix.c4
-rw-r--r--drivers/net/usb/catc.c5
-rw-r--r--drivers/net/usb/cdc_subset.c2
-rw-r--r--drivers/net/usb/kaweth.c2
-rw-r--r--drivers/net/usb/rndis_host.c6
-rw-r--r--drivers/net/virtio_net.c91
-rw-r--r--drivers/net/wan/hdlc.c19
-rw-r--r--drivers/net/wan/hdlc_cisco.c82
-rw-r--r--drivers/net/wan/x25_asy.c3
-rw-r--r--drivers/net/wireless/airo.c3
-rw-r--r--drivers/net/wireless/ath5k/base.c2
-rw-r--r--drivers/net/wireless/ath5k/hw.c6
-rw-r--r--drivers/net/wireless/b43/Kconfig2
-rw-r--r--drivers/net/wireless/b43/b43.h2
-rw-r--r--drivers/net/wireless/b43/dma.c65
-rw-r--r--drivers/net/wireless/b43/leds.c3
-rw-r--r--drivers/net/wireless/b43/main.c98
-rw-r--r--drivers/net/wireless/b43legacy/Kconfig2
-rw-r--r--drivers/net/wireless/b43legacy/dma.c2
-rw-r--r--drivers/net/wireless/b43legacy/main.c23
-rw-r--r--drivers/net/wireless/hostap/hostap_80211_rx.c8
-rw-r--r--drivers/net/wireless/hostap/hostap_ap.c2
-rw-r--r--drivers/net/wireless/hostap/hostap_cs.c9
-rw-r--r--drivers/net/wireless/hostap/hostap_hw.c19
-rw-r--r--drivers/net/wireless/hostap/hostap_main.c13
-rw-r--r--drivers/net/wireless/ipw2200.c204
-rw-r--r--drivers/net/wireless/ipw2200.h6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945-led.c5
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965-rs.c3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c33
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c39
-rw-r--r--drivers/net/wireless/libertas/cmd.c5
-rw-r--r--drivers/net/wireless/libertas/debugfs.c4
-rw-r--r--drivers/net/wireless/libertas/ethtool.c27
-rw-r--r--drivers/net/wireless/libertas/main.c4
-rw-r--r--drivers/net/wireless/orinoco_cs.c1
-rw-r--r--drivers/net/wireless/p54/p54usb.c1
-rw-r--r--drivers/net/wireless/prism54/islpci_eth.c2
-rw-r--r--drivers/net/wireless/rndis_wlan.c65
-rw-r--r--drivers/net/wireless/rt2x00/Kconfig19
-rw-r--r--drivers/net/wireless/rt2x00/rt2500usb.c36
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00.h6
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00config.c1
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c46
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00mac.c5
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00pci.c3
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00usb.c6
-rw-r--r--drivers/net/wireless/rt2x00/rt73usb.c37
-rw-r--r--drivers/net/wireless/rtl8180_grf5101.c2
-rw-r--r--drivers/net/wireless/rtl8180_max2820.c5
-rw-r--r--drivers/net/wireless/rtl8180_sa2400.c2
-rw-r--r--drivers/net/wireless/rtl8187_dev.c14
-rw-r--r--drivers/net/wireless/zd1211rw/zd_mac.c4
-rw-r--r--drivers/net/wireless/zd1211rw/zd_usb.c2
-rw-r--r--drivers/net/xen-netfront.c6
-rw-r--r--drivers/of/of_i2c.c1
-rw-r--r--drivers/pci/access.c14
-rw-r--r--drivers/pci/hotplug/acpiphp_glue.c17
-rw-r--r--drivers/pci/hotplug/pci_hotplug_core.c7
-rw-r--r--drivers/pci/hotplug/pciehp.h11
-rw-r--r--drivers/pci/hotplug/pciehp_core.c6
-rw-r--r--drivers/pci/hotplug/pciehp_ctrl.c36
-rw-r--r--drivers/pci/hotplug/pciehp_hpc.c129
-rw-r--r--drivers/pci/hotplug/rpadlpar_sysfs.c8
-rw-r--r--drivers/pci/hotplug/shpchp_core.c4
-rw-r--r--drivers/pci/pci-driver.c2
-rw-r--r--drivers/pci/pci-sysfs.c89
-rw-r--r--drivers/pci/pci.h2
-rw-r--r--drivers/pci/pcie/aspm.c20
-rw-r--r--drivers/pci/quirks.c43
-rw-r--r--drivers/pcmcia/electra_cf.c1
-rw-r--r--drivers/pnp/pnpacpi/rsparser.c46
-rw-r--r--drivers/pnp/quirks.c2
-rw-r--r--drivers/pnp/system.c2
-rw-r--r--drivers/power/power_supply_core.c6
-rw-r--r--drivers/power/power_supply_sysfs.c2
-rw-r--r--drivers/rtc/Kconfig19
-rw-r--r--drivers/rtc/Makefile2
-rw-r--r--drivers/rtc/interface.c102
-rw-r--r--drivers/rtc/rtc-at32ap700x.c7
-rw-r--r--drivers/rtc/rtc-cmos.c31
-rw-r--r--drivers/rtc/rtc-ds1374.c2
-rw-r--r--drivers/rtc/rtc-fm3130.c501
-rw-r--r--drivers/rtc/rtc-ppc.c69
-rw-r--r--drivers/rtc/rtc-sa1100.c4
-rw-r--r--drivers/rtc/rtc-x1205.c111
-rw-r--r--drivers/s390/block/dasd.c28
-rw-r--r--drivers/s390/char/raw3270.c9
-rw-r--r--drivers/s390/char/sclp_config.c2
-rw-r--r--drivers/s390/char/sclp_vt220.c28
-rw-r--r--drivers/s390/char/tape.h3
-rw-r--r--drivers/s390/char/tape_3590.c2
-rw-r--r--drivers/s390/char/tape_block.c4
-rw-r--r--drivers/s390/char/tape_core.c16
-rw-r--r--drivers/s390/char/vmlogrdr.c9
-rw-r--r--drivers/s390/cio/blacklist.c6
-rw-r--r--drivers/s390/cio/cio.c20
-rw-r--r--drivers/s390/kvm/kvm_virtio.c18
-rw-r--r--drivers/s390/net/qeth_core_main.c49
-rw-r--r--drivers/s390/net/qeth_core_offl.c6
-rw-r--r--drivers/s390/net/qeth_core_sys.c12
-rw-r--r--drivers/s390/net/qeth_l2_main.c41
-rw-r--r--drivers/s390/net/qeth_l3_main.c75
-rw-r--r--drivers/s390/net/qeth_l3_sys.c24
-rw-r--r--drivers/s390/s390mach.c1
-rw-r--r--drivers/sbus/char/bpp.c6
-rw-r--r--drivers/scsi/3w-9xxx.c6
-rw-r--r--drivers/scsi/aha152x.c4
-rw-r--r--drivers/scsi/atp870u.c2
-rw-r--r--drivers/scsi/ch.c7
-rw-r--r--drivers/scsi/dpt/dptsig.h3
-rw-r--r--drivers/scsi/esp_scsi.c22
-rw-r--r--drivers/scsi/hosts.c9
-rw-r--r--drivers/scsi/hptiop.c12
-rw-r--r--drivers/scsi/ibmvscsi/ibmvscsi.c2
-rw-r--r--drivers/scsi/ibmvscsi/viosrp.h3
-rw-r--r--drivers/scsi/mac_esp.c2
-rw-r--r--drivers/scsi/osst.c3
-rw-r--r--drivers/scsi/qla1280.c2
-rw-r--r--drivers/scsi/qla2xxx/qla_attr.c13
-rw-r--r--drivers/scsi/qla2xxx/qla_def.h2
-rw-r--r--drivers/scsi/qla2xxx/qla_gbl.h3
-rw-r--r--drivers/scsi/qla2xxx/qla_inline.h4
-rw-r--r--drivers/scsi/qla2xxx/qla_isr.c63
-rw-r--r--drivers/scsi/qla2xxx/qla_mbx.c12
-rw-r--r--drivers/scsi/qla2xxx/qla_mid.c19
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c30
-rw-r--r--drivers/scsi/qla2xxx/qla_version.h2
-rw-r--r--drivers/scsi/scsi_sysfs.c7
-rw-r--r--drivers/scsi/ses.c2
-rw-r--r--drivers/scsi/sg.c11
-rw-r--r--drivers/scsi/sr.c3
-rw-r--r--drivers/scsi/st.c12
-rw-r--r--drivers/serial/8250.c4
-rw-r--r--drivers/serial/8250.h5
-rw-r--r--drivers/serial/8250_pci.c7
-rw-r--r--drivers/serial/atmel_serial.c2
-rw-r--r--drivers/serial/bfin_5xx.c80
-rw-r--r--drivers/serial/sb1250-duart.c2
-rw-r--r--drivers/serial/serial_core.c19
-rw-r--r--drivers/serial/sunhv.c1
-rw-r--r--drivers/serial/ucc_uart.c2
-rw-r--r--drivers/spi/spidev.c176
-rw-r--r--drivers/ssb/driver_pcicore.c4
-rw-r--r--drivers/ssb/main.c12
-rw-r--r--drivers/thermal/Kconfig9
-rw-r--r--drivers/thermal/thermal_sys.c4
-rw-r--r--drivers/uio/uio.c7
-rw-r--r--drivers/usb/c67x00/c67x00-ll-hpi.c12
-rw-r--r--drivers/usb/class/Kconfig11
-rw-r--r--drivers/usb/class/Makefile1
-rw-r--r--drivers/usb/class/cdc-acm.c3
-rw-r--r--drivers/usb/class/cdc-wdm.c740
-rw-r--r--drivers/usb/core/generic.c5
-rw-r--r--drivers/usb/core/hcd.c53
-rw-r--r--drivers/usb/core/hcd.h4
-rw-r--r--drivers/usb/core/hub.c85
-rw-r--r--drivers/usb/core/quirks.c7
-rw-r--r--drivers/usb/core/sysfs.c44
-rw-r--r--drivers/usb/gadget/fsl_usb2_udc.c2
-rw-r--r--drivers/usb/gadget/pxa27x_udc.c3
-rw-r--r--drivers/usb/host/Kconfig8
-rw-r--r--drivers/usb/host/ehci-au1xxx.c1
-rw-r--r--drivers/usb/host/ehci-fsl.c7
-rw-r--r--drivers/usb/host/ehci-hub.c16
-rw-r--r--drivers/usb/host/ehci-ixp4xx.c4
-rw-r--r--drivers/usb/host/ehci-orion.c10
-rw-r--r--drivers/usb/host/ehci-pci.c4
-rw-r--r--drivers/usb/host/ehci-ppc-of.c2
-rw-r--r--drivers/usb/host/ehci-ppc-soc.c1
-rw-r--r--drivers/usb/host/ehci-ps3.c1
-rw-r--r--drivers/usb/host/ehci-sched.c67
-rw-r--r--drivers/usb/host/ehci.h24
-rw-r--r--drivers/usb/host/isp1760-hcd.c8
-rw-r--r--drivers/usb/host/isp1760-if.c4
-rw-r--r--drivers/usb/host/ohci-at91.c1
-rw-r--r--drivers/usb/host/ohci-au1xxx.c1
-rw-r--r--drivers/usb/host/ohci-ep93xx.c1
-rw-r--r--drivers/usb/host/ohci-hcd.c15
-rw-r--r--drivers/usb/host/ohci-hub.c53
-rw-r--r--drivers/usb/host/ohci-lh7a404.c1
-rw-r--r--drivers/usb/host/ohci-omap.c1
-rw-r--r--drivers/usb/host/ohci-pci.c1
-rw-r--r--drivers/usb/host/ohci-pnx4008.c1
-rw-r--r--drivers/usb/host/ohci-pnx8550.c1
-rw-r--r--drivers/usb/host/ohci-ppc-of.c1
-rw-r--r--drivers/usb/host/ohci-ppc-soc.c1
-rw-r--r--drivers/usb/host/ohci-ps3.c1
-rw-r--r--drivers/usb/host/ohci-pxa27x.c1
-rw-r--r--drivers/usb/host/ohci-q.c12
-rw-r--r--drivers/usb/host/ohci-s3c2410.c1
-rw-r--r--drivers/usb/host/ohci-sa1111.c1
-rw-r--r--drivers/usb/host/ohci-sh.c1
-rw-r--r--drivers/usb/host/ohci-sm501.c1
-rw-r--r--drivers/usb/host/ohci-ssb.c1
-rw-r--r--drivers/usb/host/u132-hcd.c11
-rw-r--r--drivers/usb/misc/Kconfig12
-rw-r--r--drivers/usb/misc/Makefile1
-rw-r--r--drivers/usb/misc/isight_firmware.c140
-rw-r--r--drivers/usb/misc/phidgetkit.c6
-rw-r--r--drivers/usb/misc/phidgetmotorcontrol.c7
-rw-r--r--drivers/usb/misc/phidgetservo.c6
-rw-r--r--drivers/usb/misc/sisusbvga/sisusb.c2
-rw-r--r--drivers/usb/serial/ch341.c1
-rw-r--r--drivers/usb/serial/ftdi_sio.c266
-rw-r--r--drivers/usb/serial/ftdi_sio.h276
-rw-r--r--drivers/usb/serial/ipaq.c7
-rw-r--r--drivers/usb/serial/option.c42
-rw-r--r--drivers/usb/serial/pl2303.c3
-rw-r--r--drivers/usb/serial/pl2303.h3
-rw-r--r--drivers/usb/storage/unusual_devs.h18
-rw-r--r--drivers/video/Kconfig3
-rw-r--r--drivers/video/aty/atyfb_base.c2
-rw-r--r--drivers/video/aty/radeon_base.c4
-rw-r--r--drivers/video/cirrusfb.c6
-rw-r--r--drivers/video/console/fbcon.c4
-rw-r--r--drivers/video/display/display-sysfs.c10
-rw-r--r--drivers/video/fsl-diu-fb.c33
-rw-r--r--drivers/video/hgafb.c26
-rw-r--r--drivers/video/leo.c58
-rw-r--r--drivers/video/matrox/matroxfb_base.h2
-rw-r--r--drivers/video/modedb.c2
-rw-r--r--drivers/video/pxafb.c59
-rw-r--r--drivers/video/s3c2410fb.c130
-rw-r--r--drivers/video/s3c2410fb.h20
-rw-r--r--drivers/video/sis/sis_main.c2
-rw-r--r--drivers/video/sm501fb.c8
-rw-r--r--drivers/video/w100fb.c1
-rw-r--r--drivers/video/xen-fbfront.c211
-rw-r--r--drivers/virtio/virtio.c10
-rw-r--r--drivers/virtio/virtio_pci.c7
-rw-r--r--drivers/virtio/virtio_ring.c8
-rw-r--r--drivers/watchdog/Kconfig13
-rw-r--r--drivers/watchdog/Makefile1
-rw-r--r--drivers/watchdog/bfin_wdt.c111
-rw-r--r--drivers/watchdog/booke_wdt.c88
-rw-r--r--drivers/watchdog/geodewdt.c308
-rw-r--r--drivers/watchdog/hpwdt.c155
-rw-r--r--drivers/watchdog/iTCO_wdt.c14
-rw-r--r--drivers/watchdog/w83697hf_wdt.c38
-rw-r--r--drivers/xen/Makefile2
-rw-r--r--drivers/xen/balloon.c10
-rw-r--r--drivers/xen/events.c116
-rw-r--r--drivers/xen/grant-table.c4
-rw-r--r--drivers/xen/manage.c252
-rw-r--r--drivers/xen/xenbus/xenbus_comms.c23
-rw-r--r--fs/9p/v9fs_vfs.h2
-rw-r--r--fs/9p/vfs_file.c4
-rw-r--r--fs/9p/vfs_inode.c18
-rw-r--r--fs/Kconfig2
-rw-r--r--fs/Kconfig.binfmt2
-rw-r--r--fs/afs/callback.c2
-rw-r--r--fs/afs/inode.c2
-rw-r--r--fs/afs/super.c2
-rw-r--r--fs/aio.c4
-rw-r--r--fs/binfmt_elf.c3
-rw-r--r--fs/binfmt_elf_fdpic.c2
-rw-r--r--fs/binfmt_flat.c8
-rw-r--r--fs/block_dev.c16
-rw-r--r--fs/buffer.c13
-rw-r--r--fs/cifs/AUTHORS1
-rw-r--r--fs/cifs/CHANGES10
-rw-r--r--fs/cifs/README5
-rw-r--r--fs/cifs/TODO15
-rw-r--r--fs/cifs/asn1.c14
-rw-r--r--fs/cifs/cifs_dfs_ref.c49
-rw-r--r--fs/cifs/cifs_fs_sb.h1
-rw-r--r--fs/cifs/cifs_spnego.c3
-rw-r--r--fs/cifs/cifsfs.c65
-rw-r--r--fs/cifs/cifsfs.h3
-rw-r--r--fs/cifs/cifsglob.h4
-rw-r--r--fs/cifs/cifspdu.h48
-rw-r--r--fs/cifs/cifsproto.h13
-rw-r--r--fs/cifs/cifssmb.c339
-rw-r--r--fs/cifs/connect.c73
-rw-r--r--fs/cifs/dir.c34
-rw-r--r--fs/cifs/dns_resolve.c9
-rw-r--r--fs/cifs/file.c13
-rw-r--r--fs/cifs/inode.c567
-rw-r--r--fs/cifs/ioctl.c4
-rw-r--r--fs/cifs/link.c43
-rw-r--r--fs/cifs/misc.c3
-rw-r--r--fs/cifs/netmisc.c6
-rw-r--r--fs/cifs/ntlmssp.h4
-rw-r--r--fs/cifs/readdir.c84
-rw-r--r--fs/dcache.c68
-rw-r--r--fs/ecryptfs/crypto.c2
-rw-r--r--fs/ecryptfs/ecryptfs_kernel.h2
-rw-r--r--fs/ecryptfs/miscdev.c28
-rw-r--r--fs/ecryptfs/read_write.c22
-rw-r--r--fs/exec.c9
-rw-r--r--fs/ext3/resize.c3
-rw-r--r--fs/ext3/super.c4
-rw-r--r--fs/ext4/balloc.c71
-rw-r--r--fs/ext4/mballoc.c8
-rw-r--r--fs/ext4/resize.c6
-rw-r--r--fs/ext4/super.c40
-rw-r--r--fs/fat/file.c44
-rw-r--r--fs/fuse/inode.c11
-rw-r--r--fs/gfs2/bmap.c23
-rw-r--r--fs/gfs2/glops.c2
-rw-r--r--fs/gfs2/incore.h1
-rw-r--r--fs/gfs2/inode.c10
-rw-r--r--fs/gfs2/meta_io.c6
-rw-r--r--fs/gfs2/ops_fstype.c4
-rw-r--r--fs/gfs2/ops_super.c16
-rw-r--r--fs/gfs2/rgrp.c4
-rw-r--r--fs/hppfs/Makefile5
-rw-r--r--fs/jbd2/commit.c1
-rw-r--r--fs/jbd2/recovery.c12
-rw-r--r--fs/libfs.c46
-rw-r--r--fs/locks.c6
-rw-r--r--fs/namei.c26
-rw-r--r--fs/nfs/mount_clnt.c5
-rw-r--r--fs/nfs/super.c76
-rw-r--r--fs/nfs/write.c7
-rw-r--r--fs/nfsd/nfs4callback.c2
-rw-r--r--fs/ntfs/upcase.c5
-rw-r--r--fs/ocfs2/alloc.c4
-rw-r--r--fs/ocfs2/cluster/nodemanager.c74
-rw-r--r--fs/ocfs2/cluster/nodemanager.h4
-rw-r--r--fs/ocfs2/cluster/tcp.c28
-rw-r--r--fs/ocfs2/cluster/tcp.h12
-rw-r--r--fs/ocfs2/cluster/tcp_internal.h32
-rw-r--r--fs/ocfs2/dlm/dlmdebug.h12
-rw-r--r--fs/ocfs2/stack_o2cb.c41
-rw-r--r--fs/ocfs2/stack_user.c37
-rw-r--r--fs/ocfs2/stackglue.c119
-rw-r--r--fs/ocfs2/stackglue.h19
-rw-r--r--fs/open.c37
-rw-r--r--fs/pipe.c10
-rw-r--r--fs/proc/array.c2
-rw-r--r--fs/proc/base.c33
-rw-r--r--fs/proc/inode.c3
-rw-r--r--fs/proc/proc_misc.c24
-rw-r--r--fs/proc/task_mmu.c175
-rw-r--r--fs/reiserfs/super.c4
-rw-r--r--fs/select.c2
-rw-r--r--fs/splice.c17
-rw-r--r--fs/sysfs/dir.c6
-rw-r--r--fs/udf/super.c57
-rw-r--r--fs/udf/udfdecl.h2
-rw-r--r--fs/utimes.c59
-rw-r--r--fs/xfs/linux-2.6/xfs_buf.c24
-rw-r--r--fs/xfs/linux-2.6/xfs_buf.h19
-rw-r--r--fs/xfs/linux-2.6/xfs_file.c17
-rw-r--r--fs/xfs/linux-2.6/xfs_vnode.h8
-rw-r--r--fs/xfs/xfs_inode.c9
-rw-r--r--fs/xfs/xfs_vnodeops.c112
-rw-r--r--fs/xfs/xfs_vnodeops.h3
-rw-r--r--include/acpi/processor.h1
-rw-r--r--include/asm-alpha/core_mcpcia.h2
-rw-r--r--include/asm-alpha/core_t2.h14
-rw-r--r--include/asm-alpha/io.h6
-rw-r--r--include/asm-alpha/mmu_context.h6
-rw-r--r--include/asm-alpha/percpu.h74
-rw-r--r--include/asm-alpha/system.h10
-rw-r--r--include/asm-alpha/vga.h6
-rw-r--r--include/asm-arm/arch-at91/io.h2
-rw-r--r--include/asm-arm/arch-omap/board-palmte.h2
-rw-r--r--include/asm-arm/arch-omap/clock.h5
-rw-r--r--include/asm-arm/arch-omap/entry-macro.S1
-rw-r--r--include/asm-arm/arch-omap/gpio.h1
-rw-r--r--include/asm-arm/arch-omap/hardware.h1
-rw-r--r--include/asm-arm/arch-pxa/mfp-pxa27x.h1
-rw-r--r--include/asm-arm/arch-pxa/pxa2xx-gpio.h9
-rw-r--r--include/asm-arm/arch-pxa/regs-lcd.h5
-rw-r--r--include/asm-arm/arch-sa1100/collie.h4
-rw-r--r--include/asm-arm/page.h4
-rw-r--r--include/asm-arm/pgtable-nommu.h1
-rw-r--r--include/asm-arm/spinlock.h2
-rw-r--r--include/asm-arm/system.h29
-rw-r--r--include/asm-blackfin/bfin-global.h7
-rw-r--r--include/asm-blackfin/mach-bf527/anomaly.h5
-rw-r--r--include/asm-blackfin/mach-bf527/bfin_serial_5xx.h8
-rw-r--r--include/asm-blackfin/mach-bf533/anomaly.h31
-rw-r--r--include/asm-blackfin/mach-bf533/bfin_serial_5xx.h8
-rw-r--r--include/asm-blackfin/mach-bf537/anomaly.h10
-rw-r--r--include/asm-blackfin/mach-bf537/bfin_serial_5xx.h8
-rw-r--r--include/asm-blackfin/mach-bf548/anomaly.h2
-rw-r--r--include/asm-blackfin/mach-bf548/bfin_serial_5xx.h12
-rw-r--r--include/asm-blackfin/mach-bf561/anomaly.h2
-rw-r--r--include/asm-blackfin/mach-bf561/bfin_serial_5xx.h8
-rw-r--r--include/asm-frv/checksum.h2
-rw-r--r--include/asm-frv/mem-layout.h7
-rw-r--r--include/asm-generic/Kbuild.asm2
-rw-r--r--include/asm-generic/atomic.h2
-rw-r--r--include/asm-generic/gpio.h6
-rw-r--r--include/asm-generic/pgtable.h57
-rw-r--r--include/asm-generic/vmlinux.lds.h14
-rw-r--r--include/asm-h8300/cacheflush.h2
-rw-r--r--include/asm-ia64/patch.h1
-rw-r--r--include/asm-ia64/ptrace.h2
-rw-r--r--include/asm-ia64/sections.h1
-rw-r--r--include/asm-ia64/sn/simulator.h7
-rw-r--r--include/asm-m32r/uaccess.h2
-rw-r--r--include/asm-m68k/bitops.h45
-rw-r--r--include/asm-mips/atomic.h4
-rw-r--r--include/asm-mips/cpu-info.h4
-rw-r--r--include/asm-mips/gic.h6
-rw-r--r--include/asm-mips/lasat/serial.h4
-rw-r--r--include/asm-mips/mach-au1x00/au1000.h3
-rw-r--r--include/asm-mips/mach-au1x00/au1xxx_dbdma.h1
-rw-r--r--include/asm-mips/mipsregs.h3
-rw-r--r--include/asm-mips/pgtable-bits.h2
-rw-r--r--include/asm-mips/pgtable.h3
-rw-r--r--include/asm-mips/rtlx.h2
-rw-r--r--include/asm-mn10300/ipcbuf.h2
-rw-r--r--include/asm-parisc/checksum.h2
-rw-r--r--include/asm-powerpc/Kbuild1
-rw-r--r--include/asm-powerpc/io.h12
-rw-r--r--include/asm-powerpc/kvm_ppc.h1
-rw-r--r--include/asm-powerpc/mediabay.h12
-rw-r--r--include/asm-powerpc/mpic.h3
-rw-r--r--include/asm-powerpc/spu.h1
-rw-r--r--include/asm-powerpc/spu_csa.h2
-rw-r--r--include/asm-powerpc/system.h2
-rw-r--r--include/asm-s390/system.h8
-rw-r--r--include/asm-s390/types.h6
-rw-r--r--include/asm-sh/checksum_32.h2
-rw-r--r--include/asm-sparc/asi.h1
-rw-r--r--include/asm-sparc/auxio.h2
-rw-r--r--include/asm-sparc/bitops.h2
-rw-r--r--include/asm-sparc/btfixup.h2
-rw-r--r--include/asm-sparc/checksum.h1
-rw-r--r--include/asm-sparc/clock.h2
-rw-r--r--include/asm-sparc/contregs.h1
-rw-r--r--include/asm-sparc/cypress.h2
-rw-r--r--include/asm-sparc/delay.h2
-rw-r--r--include/asm-sparc/ebus.h2
-rw-r--r--include/asm-sparc/ecc.h2
-rw-r--r--include/asm-sparc/eeprom.h2
-rw-r--r--include/asm-sparc/elf.h1
-rw-r--r--include/asm-sparc/fcntl.h1
-rw-r--r--include/asm-sparc/head.h1
-rw-r--r--include/asm-sparc/idprom.h2
-rw-r--r--include/asm-sparc/io.h3
-rw-r--r--include/asm-sparc/ioctl.h1
-rw-r--r--include/asm-sparc/kdebug.h2
-rw-r--r--include/asm-sparc/machines.h2
-rw-r--r--include/asm-sparc/mbus.h2
-rw-r--r--include/asm-sparc/memreg.h1
-rw-r--r--include/asm-sparc/mman.h1
-rw-r--r--include/asm-sparc/mostek.h2
-rw-r--r--include/asm-sparc/mpmbox.h2
-rw-r--r--include/asm-sparc/msi.h2
-rw-r--r--include/asm-sparc/mxcc.h2
-rw-r--r--include/asm-sparc/namei.h2
-rw-r--r--include/asm-sparc/obio.h2
-rw-r--r--include/asm-sparc/openprom.h1
-rw-r--r--include/asm-sparc/oplib.h2
-rw-r--r--include/asm-sparc/page.h2
-rw-r--r--include/asm-sparc/param.h1
-rw-r--r--include/asm-sparc/pbm.h2
-rw-r--r--include/asm-sparc/pcic.h2
-rw-r--r--include/asm-sparc/pgalloc.h1
-rw-r--r--include/asm-sparc/pgtable.h1
-rw-r--r--include/asm-sparc/pgtsrmmu.h2
-rw-r--r--include/asm-sparc/pgtsun4.h2
-rw-r--r--include/asm-sparc/pgtsun4c.h2
-rw-r--r--include/asm-sparc/psr.h2
-rw-r--r--include/asm-sparc/ptrace.h1
-rw-r--r--include/asm-sparc/resource.h2
-rw-r--r--include/asm-sparc/ross.h2
-rw-r--r--include/asm-sparc/rtc.h3
-rw-r--r--include/asm-sparc/sbi.h2
-rw-r--r--include/asm-sparc/sbus.h2
-rw-r--r--include/asm-sparc/scatterlist.h1
-rw-r--r--include/asm-sparc/shmparam.h1
-rw-r--r--include/asm-sparc/sigcontext.h1
-rw-r--r--include/asm-sparc/siginfo.h4
-rw-r--r--include/asm-sparc/signal.h1
-rw-r--r--include/asm-sparc/smpprim.h2
-rw-r--r--include/asm-sparc/socket.h1
-rw-r--r--include/asm-sparc/stat.h1
-rw-r--r--include/asm-sparc/statfs.h1
-rw-r--r--include/asm-sparc/string.h2
-rw-r--r--include/asm-sparc/sun4paddr.h2
-rw-r--r--include/asm-sparc/sunbpp.h2
-rw-r--r--include/asm-sparc/sysen.h2
-rw-r--r--include/asm-sparc/termios.h1
-rw-r--r--include/asm-sparc/timer.h2
-rw-r--r--include/asm-sparc/traps.h2
-rw-r--r--include/asm-sparc/tsunami.h2
-rw-r--r--include/asm-sparc/turbosparc.h2
-rw-r--r--include/asm-sparc/types.h1
-rw-r--r--include/asm-sparc/uaccess.h2
-rw-r--r--include/asm-sparc/vac-ops.h1
-rw-r--r--include/asm-sparc/vaddrs.h1
-rw-r--r--include/asm-sparc/viking.h2
-rw-r--r--include/asm-sparc/winmacro.h2
-rw-r--r--include/asm-sparc64/apb.h2
-rw-r--r--include/asm-sparc64/asi.h1
-rw-r--r--include/asm-sparc64/auxio.h2
-rw-r--r--include/asm-sparc64/bbc.h2
-rw-r--r--include/asm-sparc64/bitops.h2
-rw-r--r--include/asm-sparc64/chafsr.h1
-rw-r--r--include/asm-sparc64/checksum.h1
-rw-r--r--include/asm-sparc64/chmctrl.h1
-rw-r--r--include/asm-sparc64/dcr.h1
-rw-r--r--include/asm-sparc64/display7seg.h2
-rw-r--r--include/asm-sparc64/dma.h2
-rw-r--r--include/asm-sparc64/ebus.h2
-rw-r--r--include/asm-sparc64/elf.h1
-rw-r--r--include/asm-sparc64/envctrl.h2
-rw-r--r--include/asm-sparc64/estate.h1
-rw-r--r--include/asm-sparc64/fcntl.h1
-rw-r--r--include/asm-sparc64/fhc.h2
-rw-r--r--include/asm-sparc64/head.h1
-rw-r--r--include/asm-sparc64/ide.h2
-rw-r--r--include/asm-sparc64/idprom.h2
-rw-r--r--include/asm-sparc64/io.h66
-rw-r--r--include/asm-sparc64/ioctl.h1
-rw-r--r--include/asm-sparc64/ioctls.h1
-rw-r--r--include/asm-sparc64/lsu.h1
-rw-r--r--include/asm-sparc64/mman.h1
-rw-r--r--include/asm-sparc64/mmu_context.h1
-rw-r--r--include/asm-sparc64/namei.h2
-rw-r--r--include/asm-sparc64/openprom.h1
-rw-r--r--include/asm-sparc64/page.h2
-rw-r--r--include/asm-sparc64/pgalloc.h1
-rw-r--r--include/asm-sparc64/pgtable.h2
-rw-r--r--include/asm-sparc64/pil.h1
-rw-r--r--include/asm-sparc64/processor.h2
-rw-r--r--include/asm-sparc64/psrcompat.h1
-rw-r--r--include/asm-sparc64/pstate.h1
-rw-r--r--include/asm-sparc64/ptrace.h25
-rw-r--r--include/asm-sparc64/reg.h2
-rw-r--r--include/asm-sparc64/resource.h2
-rw-r--r--include/asm-sparc64/rtc.h3
-rw-r--r--include/asm-sparc64/rwsem.h2
-rw-r--r--include/asm-sparc64/scatterlist.h1
-rw-r--r--include/asm-sparc64/shmparam.h1
-rw-r--r--include/asm-sparc64/sigcontext.h1
-rw-r--r--include/asm-sparc64/signal.h1
-rw-r--r--include/asm-sparc64/smp.h5
-rw-r--r--include/asm-sparc64/socket.h1
-rw-r--r--include/asm-sparc64/starfire.h2
-rw-r--r--include/asm-sparc64/stat.h1
-rw-r--r--include/asm-sparc64/statfs.h1
-rw-r--r--include/asm-sparc64/string.h2
-rw-r--r--include/asm-sparc64/sunbpp.h2
-rw-r--r--include/asm-sparc64/termios.h1
-rw-r--r--include/asm-sparc64/ttable.h1
-rw-r--r--include/asm-sparc64/types.h1
-rw-r--r--include/asm-sparc64/uaccess.h1
-rw-r--r--include/asm-sparc64/uctx.h2
-rw-r--r--include/asm-sparc64/utrap.h2
-rw-r--r--include/asm-sparc64/watchdog.h2
-rw-r--r--include/asm-um/mmu_context.h12
-rw-r--r--include/asm-v850/clinkage.h2
-rw-r--r--include/asm-x86/apic.h4
-rw-r--r--include/asm-x86/asm.h40
-rw-r--r--include/asm-x86/atomic_64.h6
-rw-r--r--include/asm-x86/bitops.h68
-rw-r--r--include/asm-x86/cpufeature.h4
-rw-r--r--include/asm-x86/current.h42
-rw-r--r--include/asm-x86/current_32.h17
-rw-r--r--include/asm-x86/current_64.h27
-rw-r--r--include/asm-x86/e820.h1
-rw-r--r--include/asm-x86/fixmap_32.h8
-rw-r--r--include/asm-x86/gart.h63
-rw-r--r--include/asm-x86/geode.h4
-rw-r--r--include/asm-x86/hardirq.h6
-rw-r--r--include/asm-x86/i387.h2
-rw-r--r--include/asm-x86/i8259.h2
-rw-r--r--include/asm-x86/io_apic.h13
-rw-r--r--include/asm-x86/kvm_host.h4
-rw-r--r--include/asm-x86/kvm_para.h33
-rw-r--r--include/asm-x86/mach-default/smpboot_hooks.h4
-rw-r--r--include/asm-x86/mmconfig.h12
-rw-r--r--include/asm-x86/msr-index.h4
-rw-r--r--include/asm-x86/msr.h2
-rw-r--r--include/asm-x86/nmi.h27
-rw-r--r--include/asm-x86/page.h26
-rw-r--r--include/asm-x86/page_32.h11
-rw-r--r--include/asm-x86/paravirt.h43
-rw-r--r--include/asm-x86/pat.h8
-rw-r--r--include/asm-x86/pci.h2
-rw-r--r--include/asm-x86/pci_32.h14
-rw-r--r--include/asm-x86/pgtable-3level.h6
-rw-r--r--include/asm-x86/pgtable.h73
-rw-r--r--include/asm-x86/pgtable_32.h4
-rw-r--r--include/asm-x86/pgtable_64.h12
-rw-r--r--include/asm-x86/processor-flags.h6
-rw-r--r--include/asm-x86/processor.h6
-rw-r--r--include/asm-x86/ptrace.h8
-rw-r--r--include/asm-x86/pvclock-abi.h42
-rw-r--r--include/asm-x86/pvclock.h13
-rw-r--r--include/asm-x86/reboot.h2
-rw-r--r--include/asm-x86/required-features.h6
-rw-r--r--include/asm-x86/resume-trace.h2
-rw-r--r--include/asm-x86/seccomp_32.h1
-rw-r--r--include/asm-x86/seccomp_64.h1
-rw-r--r--include/asm-x86/string_32.h323
-rw-r--r--include/asm-x86/suspend_32.h5
-rw-r--r--include/asm-x86/system.h2
-rw-r--r--include/asm-x86/thread_info.h248
-rw-r--r--include/asm-x86/thread_info_32.h205
-rw-r--r--include/asm-x86/thread_info_64.h195
-rw-r--r--include/asm-x86/tlbflush.h13
-rw-r--r--include/asm-x86/unistd_64.h2
-rw-r--r--include/asm-x86/vm86.h11
-rw-r--r--include/asm-x86/xen/hypercall.h11
-rw-r--r--include/asm-x86/xen/page.h31
-rw-r--r--include/asm-x86/xor_32.h5
-rw-r--r--include/asm-x86/xor_64.h5
-rw-r--r--include/linux/Kbuild5
-rw-r--r--include/linux/a.out.h8
-rw-r--r--include/linux/agp_backend.h16
-rw-r--r--include/linux/agpgart.h4
-rw-r--r--include/linux/atm.h7
-rw-r--r--include/linux/atm_tcp.h12
-rw-r--r--include/linux/audit.h2
-rw-r--r--include/linux/bitrev.h1
-rw-r--r--include/linux/blktrace_api.h26
-rw-r--r--include/linux/bootmem.h2
-rw-r--r--include/linux/capability.h31
-rw-r--r--include/linux/cfag12864b.h2
-rw-r--r--include/linux/console.h2
-rw-r--r--include/linux/cpuidle.h1
-rw-r--r--include/linux/cpumask.h4
-rw-r--r--include/linux/dcache.h2
-rw-r--r--include/linux/debug_locks.h10
-rw-r--r--include/linux/device.h15
-rw-r--r--include/linux/firmware.h2
-rw-r--r--include/linux/fs.h8
-rw-r--r--include/linux/gpio.h3
-rw-r--r--include/linux/hid.h3
-rw-r--r--include/linux/hiddev.h2
-rw-r--r--include/linux/i2c.h2
-rw-r--r--include/linux/ide.h2
-rw-r--r--include/linux/if_tunnel.h2
-rw-r--r--include/linux/in_route.h12
-rw-r--r--include/linux/inet_lro.h6
-rw-r--r--include/linux/inetdevice.h1
-rw-r--r--include/linux/input.h6
-rw-r--r--include/linux/ioport.h6
-rw-r--r--include/linux/ipv6.h4
-rw-r--r--include/linux/jbd2.h3
-rw-r--r--include/linux/kernel.h3
-rw-r--r--include/linux/ks0108.h2
-rw-r--r--include/linux/kvm_host.h3
-rw-r--r--include/linux/libata.h19
-rw-r--r--include/linux/math64.h21
-rw-r--r--include/linux/memory_hotplug.h16
-rw-r--r--include/linux/mm.h17
-rw-r--r--include/linux/mman.h4
-rw-r--r--include/linux/mmzone.h2
-rw-r--r--include/linux/mod_devicetable.h3
-rw-r--r--include/linux/msdos_fs.h12
-rw-r--r--include/linux/msg.h4
-rw-r--r--include/linux/mtd/nand.h2
-rw-r--r--include/linux/netdevice.h7
-rw-r--r--include/linux/netfilter.h2
-rw-r--r--include/linux/netfilter_arp/arp_tables.h2
-rw-r--r--include/linux/netfilter_ipv4/ip_tables.h2
-rw-r--r--include/linux/netfilter_ipv6/ip6_tables.h2
-rw-r--r--include/linux/page-flags.h25
-rw-r--r--include/linux/pci.h1
-rw-r--r--include/linux/pci_ids.h6
-rw-r--r--include/linux/proc_fs.h4
-rw-r--r--include/linux/raid/bitmap.h1
-rw-r--r--include/linux/raid/md.h2
-rw-r--r--include/linux/raid/md_k.h7
-rw-r--r--include/linux/rculist.h6
-rw-r--r--include/linux/resume-trace.h2
-rw-r--r--include/linux/rtnetlink.h5
-rw-r--r--include/linux/sched.h16
-rw-r--r--include/linux/securebits.h15
-rw-r--r--include/linux/serial_core.h1
-rw-r--r--include/linux/slab.h13
-rw-r--r--include/linux/slub_def.h4
-rw-r--r--include/linux/sm501.h4
-rw-r--r--include/linux/spi/mmc_spi.h2
-rw-r--r--include/linux/ssb/ssb_driver_gige.h2
-rw-r--r--include/linux/sunrpc/svc_rdma.h12
-rw-r--r--include/linux/tcp.h9
-rw-r--r--include/linux/thermal.h6
-rw-r--r--include/linux/time.h16
-rw-r--r--include/linux/topology.h4
-rw-r--r--include/linux/tty.h2
-rw-r--r--include/linux/tty_driver.h5
-rw-r--r--include/linux/types.h4
-rw-r--r--include/linux/usb/cdc.h9
-rw-r--r--include/linux/videodev2.h6
-rw-r--r--include/linux/virtio_blk.h9
-rw-r--r--include/linux/virtio_config.h6
-rw-r--r--include/linux/virtio_net.h2
-rw-r--r--include/linux/virtio_rng.h8
-rw-r--r--include/linux/wm97xx.h1
-rw-r--r--include/media/cx25840.h6
-rw-r--r--include/media/ir-common.h1
-rw-r--r--include/media/v4l2-dev.h5
-rw-r--r--include/media/videobuf-core.h3
-rw-r--r--include/net/addrconf.h22
-rw-r--r--include/net/genetlink.h4
-rw-r--r--include/net/inet_sock.h10
-rw-r--r--include/net/ipv6.h6
-rw-r--r--include/net/mac80211.h34
-rw-r--r--include/net/ndisc.h4
-rw-r--r--include/net/net_namespace.h11
-rw-r--r--include/net/netfilter/nf_conntrack_extend.h1
-rw-r--r--include/net/netlink.h31
-rw-r--r--include/net/request_sock.h4
-rw-r--r--include/net/sch_generic.h2
-rw-r--r--include/net/sctp/structs.h17
-rw-r--r--include/net/tcp.h2
-rw-r--r--include/net/transp_v6.h3
-rw-r--r--include/net/udp.h1
-rw-r--r--include/rdma/ib_verbs.h1
-rw-r--r--include/sound/ac97_codec.h1
-rw-r--r--include/xen/events.h4
-rw-r--r--include/xen/grant_table.h3
-rw-r--r--include/xen/hvc-console.h9
-rw-r--r--include/xen/interface/elfnote.h20
-rw-r--r--include/xen/interface/features.h3
-rw-r--r--include/xen/interface/io/fbif.h29
-rw-r--r--include/xen/interface/io/kbdif.h2
-rw-r--r--include/xen/interface/memory.h12
-rw-r--r--include/xen/interface/xen.h16
-rw-r--r--include/xen/xen-ops.h6
-rw-r--r--init/Kconfig1
-rw-r--r--init/do_mounts_md.c1
-rw-r--r--ipc/msg.c13
-rw-r--r--ipc/shm.c18
-rw-r--r--kernel/audit.c6
-rw-r--r--kernel/auditfilter.c3
-rw-r--r--kernel/capability.c132
-rw-r--r--kernel/cgroup.c2
-rw-r--r--kernel/cpuset.c20
-rw-r--r--kernel/exit.c7
-rw-r--r--kernel/futex.c93
-rw-r--r--kernel/hrtimer.c8
-rw-r--r--kernel/kgdb.c19
-rw-r--r--kernel/kprobes.c15
-rw-r--r--kernel/module.c18
-rw-r--r--kernel/printk.c3
-rw-r--r--kernel/rcuclassic.c16
-rw-r--r--kernel/rcupreempt.c2
-rw-r--r--kernel/relay.c2
-rw-r--r--kernel/sched.c521
-rw-r--r--kernel/sched_clock.c18
-rw-r--r--kernel/sched_debug.c5
-rw-r--r--kernel/sched_fair.c254
-rw-r--r--kernel/sched_rt.c70
-rw-r--r--kernel/sched_stats.h7
-rw-r--r--kernel/signal.c51
-rw-r--r--kernel/softlockup.c16
-rw-r--r--kernel/stop_machine.c7
-rw-r--r--kernel/sys.c6
-rw-r--r--kernel/time/tick-broadcast.c6
-rw-r--r--kernel/workqueue.c2
-rw-r--r--lib/bitrev.c3
-rw-r--r--lib/bug.c2
-rw-r--r--lib/debugobjects.c15
-rw-r--r--lib/div64.c10
-rw-r--r--lib/lmb.c3
-rw-r--r--lib/radix-tree.c122
-rw-r--r--lib/ts_bm.c2
-rw-r--r--mm/allocpercpu.c2
-rw-r--r--mm/backing-dev.c12
-rw-r--r--mm/bootmem.c6
-rw-r--r--mm/hugetlb.c2
-rw-r--r--mm/memory.c85
-rw-r--r--mm/mempolicy.c6
-rw-r--r--mm/migrate.c12
-rw-r--r--mm/mmap.c12
-rw-r--r--mm/mprotect.c10
-rw-r--r--mm/nommu.c21
-rw-r--r--mm/page_alloc.c43
-rw-r--r--mm/pagewalk.c42
-rw-r--r--mm/slab.c5
-rw-r--r--mm/slob.c5
-rw-r--r--mm/slub.c19
-rw-r--r--mm/sparse-vmemmap.c2
-rw-r--r--mm/swap.c4
-rw-r--r--mm/vmscan.c2
-rw-r--r--net/8021q/vlan.c28
-rw-r--r--net/8021q/vlan_dev.c2
-rw-r--r--net/atm/br2684.c78
-rw-r--r--net/ax25/ax25_subr.c11
-rw-r--r--net/bluetooth/rfcomm/core.c2
-rw-r--r--net/bluetooth/rfcomm/tty.c13
-rw-r--r--net/core/dev.c52
-rw-r--r--net/core/fib_rules.c4
-rw-r--r--net/core/filter.c1
-rw-r--r--net/core/neighbour.c9
-rw-r--r--net/core/net_namespace.c3
-rw-r--r--net/core/pktgen.c4
-rw-r--r--net/core/rtnetlink.c3
-rw-r--r--net/core/skbuff.c22
-rw-r--r--net/core/user_dma.c2
-rw-r--r--net/dccp/ackvec.c29
-rw-r--r--net/dccp/ccids/ccid3.c27
-rw-r--r--net/dccp/ccids/lib/tfrc.c8
-rw-r--r--net/dccp/ccids/lib/tfrc.h25
-rw-r--r--net/dccp/ccids/lib/tfrc_equation.c8
-rw-r--r--net/dccp/ipv4.c7
-rw-r--r--net/dccp/ipv6.c1
-rw-r--r--net/dccp/minisocks.c8
-rw-r--r--net/dccp/options.c4
-rw-r--r--net/dccp/output.c2
-rw-r--r--net/dccp/probe.c2
-rw-r--r--net/ipv4/arp.c5
-rw-r--r--net/ipv4/devinet.c9
-rw-r--r--net/ipv4/fib_frontend.c1
-rw-r--r--net/ipv4/fib_semantics.c5
-rw-r--r--net/ipv4/inet_connection_sock.c11
-rw-r--r--net/ipv4/inet_fragment.c16
-rw-r--r--net/ipv4/inet_lro.c3
-rw-r--r--net/ipv4/ip_fragment.c2
-rw-r--r--net/ipv4/ip_gre.c146
-rw-r--r--net/ipv4/ipip.c130
-rw-r--r--net/ipv4/netfilter/nf_nat_core.c3
-rw-r--r--net/ipv4/netfilter/nf_nat_snmp_basic.c14
-rw-r--r--net/ipv4/raw.c11
-rw-r--r--net/ipv4/route.c4
-rw-r--r--net/ipv4/syncookies.c3
-rw-r--r--net/ipv4/tcp.c36
-rw-r--r--net/ipv4/tcp_input.c80
-rw-r--r--net/ipv4/tcp_ipv4.c20
-rw-r--r--net/ipv4/tcp_minisocks.c32
-rw-r--r--net/ipv4/tcp_output.c12
-rw-r--r--net/ipv4/tcp_timer.c5
-rw-r--r--net/ipv4/tunnel4.c2
-rw-r--r--net/ipv4/udp.c3
-rw-r--r--net/ipv4/xfrm4_mode_tunnel.c2
-rw-r--r--net/ipv6/addrconf.c142
-rw-r--r--net/ipv6/af_inet6.c2
-rw-r--r--net/ipv6/datagram.c50
-rw-r--r--net/ipv6/ip6_flowlabel.c2
-rw-r--r--net/ipv6/ip6_input.c9
-rw-r--r--net/ipv6/ip6mr.c2
-rw-r--r--net/ipv6/ipv6_sockglue.c44
-rw-r--r--net/ipv6/ndisc.c8
-rw-r--r--net/ipv6/netfilter/ip6table_mangle.c2
-rw-r--r--net/ipv6/netfilter/nf_conntrack_reasm.c9
-rw-r--r--net/ipv6/raw.c13
-rw-r--r--net/ipv6/reassembly.c2
-rw-r--r--net/ipv6/route.c32
-rw-r--r--net/ipv6/sit.c133
-rw-r--r--net/ipv6/syncookies.c1
-rw-r--r--net/ipv6/tcp_ipv6.c7
-rw-r--r--net/ipv6/tunnel6.c2
-rw-r--r--net/ipv6/udp.c8
-rw-r--r--net/irda/af_irda.c12
-rw-r--r--net/key/af_key.c5
-rw-r--r--net/llc/llc_sap.c10
-rw-r--r--net/mac80211/cfg.c4
-rw-r--r--net/mac80211/ieee80211_i.h2
-rw-r--r--net/mac80211/key.c9
-rw-r--r--net/mac80211/main.c3
-rw-r--r--net/mac80211/mlme.c74
-rw-r--r--net/mac80211/rx.c4
-rw-r--r--net/mac80211/tx.c13
-rw-r--r--net/mac80211/util.c41
-rw-r--r--net/mac80211/wext.c35
-rw-r--r--net/mac80211/wme.c5
-rw-r--r--net/netfilter/nf_conntrack_core.c3
-rw-r--r--net/netfilter/nf_conntrack_expect.c4
-rw-r--r--net/netfilter/nf_conntrack_extend.c9
-rw-r--r--net/netfilter/nf_conntrack_h323_main.c22
-rw-r--r--net/netfilter/nf_conntrack_proto_tcp.c13
-rw-r--r--net/netfilter/nf_log.c4
-rw-r--r--net/netfilter/xt_connlimit.c3
-rw-r--r--net/netlabel/netlabel_unlabeled.c2
-rw-r--r--net/netlink/af_netlink.c2
-rw-r--r--net/netlink/attr.c19
-rw-r--r--net/netlink/genetlink.c21
-rw-r--r--net/sched/Kconfig11
-rw-r--r--net/sched/cls_api.c2
-rw-r--r--net/sched/sch_api.c6
-rw-r--r--net/sched/sch_atm.c7
-rw-r--r--net/sched/sch_cbq.c8
-rw-r--r--net/sched/sch_dsmark.c8
-rw-r--r--net/sched/sch_generic.c2
-rw-r--r--net/sched/sch_gred.c3
-rw-r--r--net/sched/sch_hfsc.c8
-rw-r--r--net/sched/sch_htb.c27
-rw-r--r--net/sched/sch_ingress.c2
-rw-r--r--net/sched/sch_prio.c2
-rw-r--r--net/sched/sch_red.c3
-rw-r--r--net/sched/sch_sfq.c2
-rw-r--r--net/sctp/associola.c34
-rw-r--r--net/sctp/ipv6.c11
-rw-r--r--net/sctp/output.c2
-rw-r--r--net/sctp/outqueue.c120
-rw-r--r--net/sctp/protocol.c26
-rw-r--r--net/sctp/socket.c4
-rw-r--r--net/sctp/transport.c50
-rw-r--r--net/sunrpc/auth_gss/svcauth_gss.c12
-rw-r--r--net/sunrpc/svc_xprt.c23
-rw-r--r--net/sunrpc/svcauth_unix.c4
-rw-r--r--net/sunrpc/xprtrdma/svc_rdma_recvfrom.c102
-rw-r--r--net/sunrpc/xprtrdma/svc_rdma_sendto.c11
-rw-r--r--net/sunrpc/xprtrdma/svc_rdma_transport.c290
-rw-r--r--net/unix/af_unix.c75
-rw-r--r--net/wireless/nl80211.c12
-rw-r--r--net/wireless/reg.c18
-rw-r--r--net/xfrm/xfrm_algo.c4
-rw-r--r--net/xfrm/xfrm_user.c11
-rw-r--r--scripts/Makefile.modpost6
-rwxr-xr-xscripts/checkpatch.pl284
-rwxr-xr-x[-rw-r--r--]scripts/decodecode0
-rw-r--r--scripts/mod/modpost.c25
-rwxr-xr-xscripts/ver_linux5
-rw-r--r--security/commoncap.c13
-rw-r--r--security/device_cgroup.c38
-rw-r--r--security/dummy.c24
-rw-r--r--security/keys/internal.h1
-rw-r--r--security/smack/smack_lsm.c12
-rw-r--r--sound/core/sound.c8
-rw-r--r--sound/drivers/pcsp/pcsp.c2
-rw-r--r--sound/drivers/pcsp/pcsp.h6
-rw-r--r--sound/drivers/pcsp/pcsp_lib.c37
-rw-r--r--sound/drivers/pcsp/pcsp_mixer.c3
-rw-r--r--sound/isa/sb/sb_mixer.c4
-rw-r--r--sound/oss/Kconfig4
-rw-r--r--sound/pci/ac97/ac97_patch.c48
-rw-r--r--sound/pci/aw2/aw2-alsa.c4
-rw-r--r--sound/pci/emu10k1/emu10k1_main.c15
-rw-r--r--sound/pci/hda/patch_analog.c51
-rw-r--r--sound/pci/hda/patch_cmedia.c1
-rw-r--r--sound/pci/hda/patch_realtek.c54
-rw-r--r--sound/pci/hda/patch_sigmatel.c2
-rw-r--r--sound/pci/hda/patch_via.c20
-rw-r--r--sound/pci/oxygen/oxygen_mixer.c12
-rw-r--r--sound/usb/caiaq/caiaq-device.c4
-rw-r--r--virt/kvm/ioapic.c54
1920 files changed, 43618 insertions, 21007 deletions
diff --git a/.gitignore b/.gitignore
index 9c0d650385be..869e1a3b64b6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,10 @@
3# subdirectories here. Add them in the ".gitignore" file 3# subdirectories here. Add them in the ".gitignore" file
4# in that subdirectory instead. 4# in that subdirectory instead.
5# 5#
6# NOTE! Please use 'git-ls-files -i --exclude-standard'
7# command after changing this file, to see if there are
8# any tracked files which get ignored after the change.
9#
6# Normal rules 10# Normal rules
7# 11#
8.* 12.*
@@ -18,18 +22,21 @@
18*.lst 22*.lst
19*.symtypes 23*.symtypes
20*.order 24*.order
25*.elf
26*.bin
27*.gz
21 28
22# 29#
23# Top-level generic files 30# Top-level generic files
24# 31#
25tags 32tags
26TAGS 33TAGS
27vmlinux* 34vmlinux
28!vmlinux.lds.S
29System.map 35System.map
30Module.markers 36Module.markers
31Module.symvers 37Module.symvers
32!.gitignore 38!.gitignore
39!.mailmap
33 40
34# 41#
35# Generated include files 42# Generated include files
@@ -52,6 +59,7 @@ series
52 59
53# cscope files 60# cscope files
54cscope.* 61cscope.*
62ncscope.*
55 63
56*.orig 64*.orig
57*~ 65*~
diff --git a/CREDITS b/CREDITS
index 8fec7b3f96d5..e97bea06b59f 100644
--- a/CREDITS
+++ b/CREDITS
@@ -2611,8 +2611,9 @@ S: Perth, Western Australia
2611S: Australia 2611S: Australia
2612 2612
2613N: Miguel Ojeda Sandonis 2613N: Miguel Ojeda Sandonis
2614E: maxextreme@gmail.com 2614E: miguel.ojeda.sandonis@gmail.com
2615W: http://maxextreme.googlepages.com/ 2615W: http://miguelojeda.es
2616W: http://jair.lab.fi.uva.es/~migojed/
2616D: Author of the ks0108, cfag12864b and cfag12864bfb auxiliary display drivers. 2617D: Author of the ks0108, cfag12864b and cfag12864bfb auxiliary display drivers.
2617D: Maintainer of the auxiliary display drivers tree (drivers/auxdisplay/*) 2618D: Maintainer of the auxiliary display drivers tree (drivers/auxdisplay/*)
2618S: C/ Mieses 20, 9-B 2619S: C/ Mieses 20, 9-B
diff --git a/Documentation/ABI/testing/sysfs-class-bdi b/Documentation/ABI/testing/sysfs-class-bdi
index 5ac1e01bbd48..5f500977b42f 100644
--- a/Documentation/ABI/testing/sysfs-class-bdi
+++ b/Documentation/ABI/testing/sysfs-class-bdi
@@ -14,6 +14,10 @@ MAJOR:MINOR
14 non-block filesystems which provide their own BDI, such as NFS 14 non-block filesystems which provide their own BDI, such as NFS
15 and FUSE. 15 and FUSE.
16 16
17MAJOR:MINOR-fuseblk
18
19 Value of st_dev on fuseblk filesystems.
20
17default 21default
18 22
19 The default backing dev, used for non-block device backed 23 The default backing dev, used for non-block device backed
diff --git a/Documentation/DocBook/kernel-locking.tmpl b/Documentation/DocBook/kernel-locking.tmpl
index 77c42f40be5d..2510763295d0 100644
--- a/Documentation/DocBook/kernel-locking.tmpl
+++ b/Documentation/DocBook/kernel-locking.tmpl
@@ -703,6 +703,31 @@
703</sect1> 703</sect1>
704</chapter> 704</chapter>
705 705
706<chapter id="trylock-functions">
707 <title>The trylock Functions</title>
708 <para>
709 There are functions that try to acquire a lock only once and immediately
710 return a value telling about success or failure to acquire the lock.
711 They can be used if you need no access to the data protected with the lock
712 when some other thread is holding the lock. You should acquire the lock
713 later if you then need access to the data protected with the lock.
714 </para>
715
716 <para>
717 <function>spin_trylock()</function> does not spin but returns non-zero if
718 it acquires the spinlock on the first try or 0 if not. This function can
719 be used in all contexts like <function>spin_lock</function>: you must have
720 disabled the contexts that might interrupt you and acquire the spin lock.
721 </para>
722
723 <para>
724 <function>mutex_trylock()</function> does not suspend your task
725 but returns non-zero if it could lock the mutex on the first try
726 or 0 if not. This function cannot be safely used in hardware or software
727 interrupt contexts despite not sleeping.
728 </para>
729</chapter>
730
706 <chapter id="Examples"> 731 <chapter id="Examples">
707 <title>Common Examples</title> 732 <title>Common Examples</title>
708 <para> 733 <para>
diff --git a/Documentation/DocBook/kgdb.tmpl b/Documentation/DocBook/kgdb.tmpl
index 028a8444d95e..e8acd1f03456 100644
--- a/Documentation/DocBook/kgdb.tmpl
+++ b/Documentation/DocBook/kgdb.tmpl
@@ -84,10 +84,9 @@
84 runs an instance of gdb against the vmlinux file which contains 84 runs an instance of gdb against the vmlinux file which contains
85 the symbols (not boot image such as bzImage, zImage, uImage...). 85 the symbols (not boot image such as bzImage, zImage, uImage...).
86 In gdb the developer specifies the connection parameters and 86 In gdb the developer specifies the connection parameters and
87 connects to kgdb. Depending on which kgdb I/O modules exist in 87 connects to kgdb. The type of connection a developer makes with
88 the kernel for a given architecture, it may be possible to debug 88 gdb depends on the availability of kgdb I/O modules compiled as
89 the test machine's kernel with the development machine using a 89 builtin's or kernel modules in the test machine's kernel.
90 rs232 or ethernet connection.
91 </para> 90 </para>
92 </chapter> 91 </chapter>
93 <chapter id="CompilingAKernel"> 92 <chapter id="CompilingAKernel">
@@ -223,7 +222,7 @@
223 </para> 222 </para>
224 <para> 223 <para>
225 IMPORTANT NOTE: Using this option with kgdb over the console 224 IMPORTANT NOTE: Using this option with kgdb over the console
226 (kgdboc) or kgdb over ethernet (kgdboe) is not supported. 225 (kgdboc) is not supported.
227 </para> 226 </para>
228 </sect1> 227 </sect1>
229 </chapter> 228 </chapter>
@@ -249,18 +248,11 @@
249 (gdb) target remote /dev/ttyS0 248 (gdb) target remote /dev/ttyS0
250 </programlisting> 249 </programlisting>
251 <para> 250 <para>
252 Example (kgdb to a terminal server): 251 Example (kgdb to a terminal server on tcp port 2012):
253 </para> 252 </para>
254 <programlisting> 253 <programlisting>
255 % gdb ./vmlinux 254 % gdb ./vmlinux
256 (gdb) target remote udp:192.168.2.2:6443 255 (gdb) target remote 192.168.2.2:2012
257 </programlisting>
258 <para>
259 Example (kgdb over ethernet):
260 </para>
261 <programlisting>
262 % gdb ./vmlinux
263 (gdb) target remote udp:192.168.2.2:6443
264 </programlisting> 256 </programlisting>
265 <para> 257 <para>
266 Once connected, you can debug a kernel the way you would debug an 258 Once connected, you can debug a kernel the way you would debug an
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index 9c93a03ea33b..118ca6e9404f 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -327,6 +327,52 @@ Some people also put extra tags at the end. They'll just be ignored for
327now, but you can do this to mark internal company procedures or just 327now, but you can do this to mark internal company procedures or just
328point out some special detail about the sign-off. 328point out some special detail about the sign-off.
329 329
330If you are a subsystem or branch maintainer, sometimes you need to slightly
331modify patches you receive in order to merge them, because the code is not
332exactly the same in your tree and the submitters'. If you stick strictly to
333rule (c), you should ask the submitter to rediff, but this is a totally
334counter-productive waste of time and energy. Rule (b) allows you to adjust
335the code, but then it is very impolite to change one submitter's code and
336make him endorse your bugs. To solve this problem, it is recommended that
337you add a line between the last Signed-off-by header and yours, indicating
338the nature of your changes. While there is nothing mandatory about this, it
339seems like prepending the description with your mail and/or name, all
340enclosed in square brackets, is noticeable enough to make it obvious that
341you are responsible for last-minute changes. Example :
342
343 Signed-off-by: Random J Developer <random@developer.example.org>
344 [lucky@maintainer.example.org: struct foo moved from foo.c to foo.h]
345 Signed-off-by: Lucky K Maintainer <lucky@maintainer.example.org>
346
347This practise is particularly helpful if you maintain a stable branch and
348want at the same time to credit the author, track changes, merge the fix,
349and protect the submitter from complaints. Note that under no circumstances
350can you change the author's identity (the From header), as it is the one
351which appears in the changelog.
352
353Special note to back-porters: It seems to be a common and useful practise
354to insert an indication of the origin of a patch at the top of the commit
355message (just after the subject line) to facilitate tracking. For instance,
356here's what we see in 2.6-stable :
357
358 Date: Tue May 13 19:10:30 2008 +0000
359
360 SCSI: libiscsi regression in 2.6.25: fix nop timer handling
361
362 commit 4cf1043593db6a337f10e006c23c69e5fc93e722 upstream
363
364And here's what appears in 2.4 :
365
366 Date: Tue May 13 22:12:27 2008 +0200
367
368 wireless, airo: waitbusy() won't delay
369
370 [backport of 2.6 commit b7acbdfbd1f277c1eb23f344f899cfa4cd0bf36a]
371
372Whatever the format, this information provides a valuable help to people
373tracking your trees, and to people trying to trouble-shoot bugs in your
374tree.
375
330 376
33113) When to use Acked-by: and Cc: 37713) When to use Acked-by: and Cc:
332 378
diff --git a/Documentation/accounting/taskstats-struct.txt b/Documentation/accounting/taskstats-struct.txt
index 8aa7529f8258..cd784f46bf8a 100644
--- a/Documentation/accounting/taskstats-struct.txt
+++ b/Documentation/accounting/taskstats-struct.txt
@@ -24,6 +24,8 @@ There are three different groups of fields in the struct taskstats:
24 24
254) Per-task and per-thread context switch count statistics 254) Per-task and per-thread context switch count statistics
26 26
275) Time accounting for SMT machines
28
27Future extension should add fields to the end of the taskstats struct, and 29Future extension should add fields to the end of the taskstats struct, and
28should not change the relative position of each field within the struct. 30should not change the relative position of each field within the struct.
29 31
@@ -164,4 +166,8 @@ struct taskstats {
164 __u64 nvcsw; /* Context voluntary switch counter */ 166 __u64 nvcsw; /* Context voluntary switch counter */
165 __u64 nivcsw; /* Context involuntary switch counter */ 167 __u64 nivcsw; /* Context involuntary switch counter */
166 168
1695) Time accounting for SMT machines
170 __u64 ac_utimescaled; /* utime scaled on frequency etc */
171 __u64 ac_stimescaled; /* stime scaled on frequency etc */
172 __u64 cpu_scaled_run_real_total; /* scaled cpu_run_real_total */
167} 173}
diff --git a/Documentation/auxdisplay/cfag12864b b/Documentation/auxdisplay/cfag12864b
index b714183d4125..eb7be393a510 100644
--- a/Documentation/auxdisplay/cfag12864b
+++ b/Documentation/auxdisplay/cfag12864b
@@ -3,7 +3,7 @@
3 =================================== 3 ===================================
4 4
5License: GPLv2 5License: GPLv2
6Author & Maintainer: Miguel Ojeda Sandonis <maxextreme@gmail.com> 6Author & Maintainer: Miguel Ojeda Sandonis
7Date: 2006-10-27 7Date: 2006-10-27
8 8
9 9
@@ -22,7 +22,7 @@ Date: 2006-10-27
221. DRIVER INFORMATION 221. DRIVER INFORMATION
23--------------------- 23---------------------
24 24
25This driver support one cfag12864b display at time. 25This driver supports a cfag12864b LCD.
26 26
27 27
28--------------------- 28---------------------
diff --git a/Documentation/auxdisplay/cfag12864b-example.c b/Documentation/auxdisplay/cfag12864b-example.c
index 7bfac354d4c9..2caeea5e4993 100644
--- a/Documentation/auxdisplay/cfag12864b-example.c
+++ b/Documentation/auxdisplay/cfag12864b-example.c
@@ -4,7 +4,7 @@
4 * Description: cfag12864b LCD userspace example program 4 * Description: cfag12864b LCD userspace example program
5 * License: GPLv2 5 * License: GPLv2
6 * 6 *
7 * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> 7 * Author: Copyright (C) Miguel Ojeda Sandonis
8 * Date: 2006-10-31 8 * Date: 2006-10-31
9 * 9 *
10 * This program is free software; you can redistribute it and/or modify 10 * This program is free software; you can redistribute it and/or modify
diff --git a/Documentation/auxdisplay/ks0108 b/Documentation/auxdisplay/ks0108
index 92b03b60c613..8ddda0c8ceef 100644
--- a/Documentation/auxdisplay/ks0108
+++ b/Documentation/auxdisplay/ks0108
@@ -3,7 +3,7 @@
3 ========================================== 3 ==========================================
4 4
5License: GPLv2 5License: GPLv2
6Author & Maintainer: Miguel Ojeda Sandonis <maxextreme@gmail.com> 6Author & Maintainer: Miguel Ojeda Sandonis
7Date: 2006-10-27 7Date: 2006-10-27
8 8
9 9
@@ -21,7 +21,7 @@ Date: 2006-10-27
211. DRIVER INFORMATION 211. DRIVER INFORMATION
22--------------------- 22---------------------
23 23
24This driver support the ks0108 LCD controller. 24This driver supports the ks0108 LCD controller.
25 25
26 26
27--------------------- 27---------------------
diff --git a/Documentation/cciss.txt b/Documentation/cciss.txt
index e65736c6b8bc..63e59b8847c5 100644
--- a/Documentation/cciss.txt
+++ b/Documentation/cciss.txt
@@ -21,6 +21,11 @@ This driver is known to work with the following cards:
21 * SA E200 21 * SA E200
22 * SA E200i 22 * SA E200i
23 * SA E500 23 * SA E500
24 * SA P212
25 * SA P410
26 * SA P410i
27 * SA P411
28 * SA P812
24 29
25Detecting drive failures: 30Detecting drive failures:
26------------------------- 31-------------------------
diff --git a/Documentation/cgroups.txt b/Documentation/cgroups.txt
index 824fc0274471..d9014aa0eb68 100644
--- a/Documentation/cgroups.txt
+++ b/Documentation/cgroups.txt
@@ -390,6 +390,10 @@ If you have several tasks to attach, you have to do it one after another:
390 ... 390 ...
391# /bin/echo PIDn > tasks 391# /bin/echo PIDn > tasks
392 392
393You can attach the current shell task by echoing 0:
394
395# echo 0 > tasks
396
3933. Kernel API 3973. Kernel API
394============= 398=============
395 399
diff --git a/Documentation/controllers/devices.txt b/Documentation/controllers/devices.txt
index 4dcea42432c2..7cc6e6a60672 100644
--- a/Documentation/controllers/devices.txt
+++ b/Documentation/controllers/devices.txt
@@ -13,7 +13,7 @@ either an integer or * for all. Access is a composition of r
13The root device cgroup starts with rwm to 'all'. A child device 13The root device cgroup starts with rwm to 'all'. A child device
14cgroup gets a copy of the parent. Administrators can then remove 14cgroup gets a copy of the parent. Administrators can then remove
15devices from the whitelist or add new entries. A child cgroup can 15devices from the whitelist or add new entries. A child cgroup can
16never receive a device access which is denied its parent. However 16never receive a device access which is denied by its parent. However
17when a device access is removed from a parent it will not also be 17when a device access is removed from a parent it will not also be
18removed from the child(ren). 18removed from the child(ren).
19 19
@@ -29,7 +29,11 @@ allows cgroup 1 to read and mknod the device usually known as
29 29
30 echo a > /cgroups/1/devices.deny 30 echo a > /cgroups/1/devices.deny
31 31
32will remove the default 'a *:* mrw' entry. 32will remove the default 'a *:* rwm' entry. Doing
33
34 echo a > /cgroups/1/devices.allow
35
36will add the 'a *:* rwm' entry to the whitelist.
33 37
343. Security 383. Security
35 39
diff --git a/Documentation/cpu-freq/governors.txt b/Documentation/cpu-freq/governors.txt
index 6a9c55bd556b..dcec0564d040 100644
--- a/Documentation/cpu-freq/governors.txt
+++ b/Documentation/cpu-freq/governors.txt
@@ -129,14 +129,6 @@ to its default value of '80' it means that between the checking
129intervals the CPU needs to be on average more than 80% in use to then 129intervals the CPU needs to be on average more than 80% in use to then
130decide that the CPU frequency needs to be increased. 130decide that the CPU frequency needs to be increased.
131 131
132sampling_down_factor: this parameter controls the rate that the CPU
133makes a decision on when to decrease the frequency. When set to its
134default value of '5' it means that at 1/5 the sampling_rate the kernel
135makes a decision to lower the frequency. Five "lower rate" decisions
136have to be made in a row before the CPU frequency is actually lower.
137If set to '1' then the frequency decreases as quickly as it increases,
138if set to '2' it decreases at half the rate of the increase.
139
140ignore_nice_load: this parameter takes a value of '0' or '1'. When 132ignore_nice_load: this parameter takes a value of '0' or '1'. When
141set to '0' (its default), all processes are counted towards the 133set to '0' (its default), all processes are counted towards the
142'cpu utilisation' value. When set to '1', the processes that are 134'cpu utilisation' value. When set to '1', the processes that are
diff --git a/Documentation/cpusets.txt b/Documentation/cpusets.txt
index fb7b361e6eea..1f5a924d1e56 100644
--- a/Documentation/cpusets.txt
+++ b/Documentation/cpusets.txt
@@ -154,13 +154,15 @@ browsing and modifying the cpusets presently known to the kernel. No
154new system calls are added for cpusets - all support for querying and 154new system calls are added for cpusets - all support for querying and
155modifying cpusets is via this cpuset file system. 155modifying cpusets is via this cpuset file system.
156 156
157The /proc/<pid>/status file for each task has two added lines, 157The /proc/<pid>/status file for each task has four added lines,
158displaying the tasks cpus_allowed (on which CPUs it may be scheduled) 158displaying the tasks cpus_allowed (on which CPUs it may be scheduled)
159and mems_allowed (on which Memory Nodes it may obtain memory), 159and mems_allowed (on which Memory Nodes it may obtain memory),
160in the format seen in the following example: 160in the two formats seen in the following example:
161 161
162 Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff 162 Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff
163 Cpus_allowed_list: 0-127
163 Mems_allowed: ffffffff,ffffffff 164 Mems_allowed: ffffffff,ffffffff
165 Mems_allowed_list: 0-63
164 166
165Each cpuset is represented by a directory in the cgroup file system 167Each cpuset is represented by a directory in the cgroup file system
166containing (on top of the standard cgroup files) the following 168containing (on top of the standard cgroup files) the following
@@ -199,7 +201,7 @@ using the sched_setaffinity, mbind and set_mempolicy system calls.
199The following rules apply to each cpuset: 201The following rules apply to each cpuset:
200 202
201 - Its CPUs and Memory Nodes must be a subset of its parents. 203 - Its CPUs and Memory Nodes must be a subset of its parents.
202 - It can only be marked exclusive if its parent is. 204 - It can't be marked exclusive unless its parent is.
203 - If its cpu or memory is exclusive, they may not overlap any sibling. 205 - If its cpu or memory is exclusive, they may not overlap any sibling.
204 206
205These rules, and the natural hierarchy of cpusets, enable efficient 207These rules, and the natural hierarchy of cpusets, enable efficient
@@ -345,7 +347,7 @@ is modified to perform an inline check for this PF_SPREAD_PAGE task
345flag, and if set, a call to a new routine cpuset_mem_spread_node() 347flag, and if set, a call to a new routine cpuset_mem_spread_node()
346returns the node to prefer for the allocation. 348returns the node to prefer for the allocation.
347 349
348Similarly, setting 'memory_spread_cache' turns on the flag 350Similarly, setting 'memory_spread_slab' turns on the flag
349PF_SPREAD_SLAB, and appropriately marked slab caches will allocate 351PF_SPREAD_SLAB, and appropriately marked slab caches will allocate
350pages from the node returned by cpuset_mem_spread_node(). 352pages from the node returned by cpuset_mem_spread_node().
351 353
@@ -542,7 +544,10 @@ otherwise initial value -1 that indicates the cpuset has no request.
542 2 : search cores in a package. 544 2 : search cores in a package.
543 3 : search cpus in a node [= system wide on non-NUMA system] 545 3 : search cpus in a node [= system wide on non-NUMA system]
544 ( 4 : search nodes in a chunk of node [on NUMA system] ) 546 ( 4 : search nodes in a chunk of node [on NUMA system] )
545 ( 5~ : search system wide [on NUMA system]) 547 ( 5 : search system wide [on NUMA system] )
548
549The system default is architecture dependent. The system default
550can be changed using the relax_domain_level= boot parameter.
546 551
547This file is per-cpuset and affect the sched domain where the cpuset 552This file is per-cpuset and affect the sched domain where the cpuset
548belongs to. Therefore if the flag 'sched_load_balance' of a cpuset 553belongs to. Therefore if the flag 'sched_load_balance' of a cpuset
@@ -709,7 +714,10 @@ Now you want to do something with this cpuset.
709 714
710In this directory you can find several files: 715In this directory you can find several files:
711# ls 716# ls
712cpus cpu_exclusive mems mem_exclusive mem_hardwall tasks 717cpu_exclusive memory_migrate mems tasks
718cpus memory_pressure notify_on_release
719mem_exclusive memory_spread_page sched_load_balance
720mem_hardwall memory_spread_slab sched_relax_domain_level
713 721
714Reading them will give you information about the state of this cpuset: 722Reading them will give you information about the state of this cpuset:
715the CPUs and Memory Nodes it can use, the processes that are using 723the CPUs and Memory Nodes it can use, the processes that are using
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 5b3f31faed56..46ece3fba6f9 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -312,3 +312,12 @@ When: 2.6.26
312Why: Implementation became generic; users should now include 312Why: Implementation became generic; users should now include
313 linux/semaphore.h instead. 313 linux/semaphore.h instead.
314Who: Matthew Wilcox <willy@linux.intel.com> 314Who: Matthew Wilcox <willy@linux.intel.com>
315
316---------------------------
317
318What: CONFIG_THERMAL_HWMON
319When: January 2009
320Why: This option was introduced just to allow older lm-sensors userspace
321 to keep working over the upgrade to 2.6.26. At the scheduled time of
322 removal fixed lm-sensors (2.x or 3.x) should be readily available.
323Who: Rene Herman <rene.herman@gmail.com>
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt
index 560f88dc7090..0c5086db8352 100644
--- a/Documentation/filesystems/ext4.txt
+++ b/Documentation/filesystems/ext4.txt
@@ -139,8 +139,16 @@ commit=nrsec (*) Ext4 can be told to sync all its data and metadata
139 Setting it to very large values will improve 139 Setting it to very large values will improve
140 performance. 140 performance.
141 141
142barrier=1 This enables/disables barriers. barrier=0 disables 142barrier=<0|1(*)> This enables/disables the use of write barriers in
143 it, barrier=1 enables it. 143 the jbd code. barrier=0 disables, barrier=1 enables.
144 This also requires an IO stack which can support
145 barriers, and if jbd gets an error on a barrier
146 write, it will disable again with a warning.
147 Write barriers enforce proper on-disk ordering
148 of journal commits, making volatile disk write caches
149 safe to use, at some performance penalty. If
150 your disks are battery-backed in one way or another,
151 disabling barriers may safely improve performance.
144 152
145orlov (*) This enables the new Orlov block allocator. It is 153orlov (*) This enables the new Orlov block allocator. It is
146 enabled by default. 154 enabled by default.
diff --git a/Documentation/filesystems/sysfs-pci.txt b/Documentation/filesystems/sysfs-pci.txt
index 5daa2aaec2c5..68ef48839c04 100644
--- a/Documentation/filesystems/sysfs-pci.txt
+++ b/Documentation/filesystems/sysfs-pci.txt
@@ -36,6 +36,7 @@ files, each with their own function.
36 local_cpus nearby CPU mask (cpumask, ro) 36 local_cpus nearby CPU mask (cpumask, ro)
37 resource PCI resource host addresses (ascii, ro) 37 resource PCI resource host addresses (ascii, ro)
38 resource0..N PCI resource N, if present (binary, mmap) 38 resource0..N PCI resource N, if present (binary, mmap)
39 resource0_wc..N_wc PCI WC map resource N, if prefetchable (binary, mmap)
39 rom PCI ROM resource, if present (binary, ro) 40 rom PCI ROM resource, if present (binary, ro)
40 subsystem_device PCI subsystem device (ascii, ro) 41 subsystem_device PCI subsystem device (ascii, ro)
41 subsystem_vendor PCI subsystem vendor (ascii, ro) 42 subsystem_vendor PCI subsystem vendor (ascii, ro)
diff --git a/Documentation/hwmon/ibmaem b/Documentation/hwmon/ibmaem
new file mode 100644
index 000000000000..2fefaf582a43
--- /dev/null
+++ b/Documentation/hwmon/ibmaem
@@ -0,0 +1,37 @@
1Kernel driver ibmaem
2======================
3
4Supported systems:
5 * Any recent IBM System X server with Active Energy Manager support.
6 This includes the x3350, x3550, x3650, x3655, x3755, x3850 M2,
7 x3950 M2, and certain HS2x/LS2x/QS2x blades. The IPMI host interface
8 driver ("ipmi-si") needs to be loaded for this driver to do anything.
9 Prefix: 'ibmaem'
10 Datasheet: Not available
11
12Author: Darrick J. Wong
13
14Description
15-----------
16
17This driver implements sensor reading support for the energy and power
18meters available on various IBM System X hardware through the BMC. All
19sensor banks will be exported as platform devices; this driver can talk
20to both v1 and v2 interfaces. This driver is completely separate from the
21older ibmpex driver.
22
23The v1 AEM interface has a simple set of features to monitor energy use.
24There is a register that displays an estimate of raw energy consumption
25since the last BMC reset, and a power sensor that returns average power
26use over a configurable interval.
27
28The v2 AEM interface is a bit more sophisticated, being able to present
29a wider range of energy and power use registers, the power cap as
30set by the AEM software, and temperature sensors.
31
32Special Features
33----------------
34
35The "power_cap" value displays the current system power cap, as set by
36the Active Energy Manager software. Setting the power cap from the host
37is not currently supported.
diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface
index f4a8ebc1ef1a..2d845730d4e0 100644
--- a/Documentation/hwmon/sysfs-interface
+++ b/Documentation/hwmon/sysfs-interface
@@ -2,17 +2,12 @@ Naming and data format standards for sysfs files
2------------------------------------------------ 2------------------------------------------------
3 3
4The libsensors library offers an interface to the raw sensors data 4The libsensors library offers an interface to the raw sensors data
5through the sysfs interface. See libsensors documentation and source for 5through the sysfs interface. Since lm-sensors 3.0.0, libsensors is
6further information. As of writing this document, libsensors 6completely chip-independent. It assumes that all the kernel drivers
7(from lm_sensors 2.8.3) is heavily chip-dependent. Adding or updating 7implement the standard sysfs interface described in this document.
8support for any given chip requires modifying the library's code. 8This makes adding or updating support for any given chip very easy, as
9This is because libsensors was written for the procfs interface 9libsensors, and applications using it, do not need to be modified.
10older kernel modules were using, which wasn't standardized enough. 10This is a major improvement compared to lm-sensors 2.
11Recent versions of libsensors (from lm_sensors 2.8.2 and later) have
12support for the sysfs interface, though.
13
14The new sysfs interface was designed to be as chip-independent as
15possible.
16 11
17Note that motherboards vary widely in the connections to sensor chips. 12Note that motherboards vary widely in the connections to sensor chips.
18There is no standard that ensures, for example, that the second 13There is no standard that ensures, for example, that the second
@@ -35,19 +30,17 @@ access this data in a simple and consistent way. That said, such programs
35will have to implement conversion, labeling and hiding of inputs. For 30will have to implement conversion, labeling and hiding of inputs. For
36this reason, it is still not recommended to bypass the library. 31this reason, it is still not recommended to bypass the library.
37 32
38If you are developing a userspace application please send us feedback on
39this standard.
40
41Note that this standard isn't completely established yet, so it is subject
42to changes. If you are writing a new hardware monitoring driver those
43features can't seem to fit in this interface, please contact us with your
44extension proposal. Keep in mind that backward compatibility must be
45preserved.
46
47Each chip gets its own directory in the sysfs /sys/devices tree. To 33Each chip gets its own directory in the sysfs /sys/devices tree. To
48find all sensor chips, it is easier to follow the device symlinks from 34find all sensor chips, it is easier to follow the device symlinks from
49/sys/class/hwmon/hwmon*. 35/sys/class/hwmon/hwmon*.
50 36
37Up to lm-sensors 3.0.0, libsensors looks for hardware monitoring attributes
38in the "physical" device directory. Since lm-sensors 3.0.1, attributes found
39in the hwmon "class" device directory are also supported. Complex drivers
40(e.g. drivers for multifunction chips) may want to use this possibility to
41avoid namespace pollution. The only drawback will be that older versions of
42libsensors won't support the driver in question.
43
51All sysfs values are fixed point numbers. 44All sysfs values are fixed point numbers.
52 45
53There is only one value per file, unlike the older /proc specification. 46There is only one value per file, unlike the older /proc specification.
diff --git a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients
index ee75cbace28d..d4cd4126d1ad 100644
--- a/Documentation/i2c/writing-clients
+++ b/Documentation/i2c/writing-clients
@@ -25,12 +25,23 @@ routines, and should be zero-initialized except for fields with data you
25provide. A client structure holds device-specific information like the 25provide. A client structure holds device-specific information like the
26driver model device node, and its I2C address. 26driver model device node, and its I2C address.
27 27
28/* iff driver uses driver model ("new style") binding model: */
29
30static struct i2c_device_id foo_idtable[] = {
31 { "foo", my_id_for_foo },
32 { "bar", my_id_for_bar },
33 { }
34};
35
36MODULE_DEVICE_TABLE(i2c, foo_idtable);
37
28static struct i2c_driver foo_driver = { 38static struct i2c_driver foo_driver = {
29 .driver = { 39 .driver = {
30 .name = "foo", 40 .name = "foo",
31 }, 41 },
32 42
33 /* iff driver uses driver model ("new style") binding model: */ 43 /* iff driver uses driver model ("new style") binding model: */
44 .id_table = foo_ids,
34 .probe = foo_probe, 45 .probe = foo_probe,
35 .remove = foo_remove, 46 .remove = foo_remove,
36 47
@@ -173,10 +184,9 @@ handle may be used during foo_probe(). If foo_probe() reports success
173(zero not a negative status code) it may save the handle and use it until 184(zero not a negative status code) it may save the handle and use it until
174foo_remove() returns. That binding model is used by most Linux drivers. 185foo_remove() returns. That binding model is used by most Linux drivers.
175 186
176Drivers match devices when i2c_client.driver_name and the driver name are 187The probe function is called when an entry in the id_table name field
177the same; this approach is used in several other busses that don't have 188matches the device's name. It is passed the entry that was matched so
178device typing support in the hardware. The driver and module name should 189the driver knows which one in the table matched.
179match, so hotplug/coldplug mechanisms will modprobe the driver.
180 190
181 191
182Device Creation (Standard driver model) 192Device Creation (Standard driver model)
diff --git a/Documentation/kernel-doc-nano-HOWTO.txt b/Documentation/kernel-doc-nano-HOWTO.txt
index 2075c0658bf5..0bd32748a467 100644
--- a/Documentation/kernel-doc-nano-HOWTO.txt
+++ b/Documentation/kernel-doc-nano-HOWTO.txt
@@ -1,6 +1,105 @@
1kernel-doc nano-HOWTO 1kernel-doc nano-HOWTO
2===================== 2=====================
3 3
4How to format kernel-doc comments
5---------------------------------
6
7In order to provide embedded, 'C' friendly, easy to maintain,
8but consistent and extractable documentation of the functions and
9data structures in the Linux kernel, the Linux kernel has adopted
10a consistent style for documenting functions and their parameters,
11and structures and their members.
12
13The format for this documentation is called the kernel-doc format.
14It is documented in this Documentation/kernel-doc-nano-HOWTO.txt file.
15
16This style embeds the documentation within the source files, using
17a few simple conventions. The scripts/kernel-doc perl script, some
18SGML templates in Documentation/DocBook, and other tools understand
19these conventions, and are used to extract this embedded documentation
20into various documents.
21
22In order to provide good documentation of kernel functions and data
23structures, please use the following conventions to format your
24kernel-doc comments in Linux kernel source.
25
26We definitely need kernel-doc formatted documentation for functions
27that are exported to loadable modules using EXPORT_SYMBOL.
28
29We also look to provide kernel-doc formatted documentation for
30functions externally visible to other kernel files (not marked
31"static").
32
33We also recommend providing kernel-doc formatted documentation
34for private (file "static") routines, for consistency of kernel
35source code layout. But this is lower priority and at the
36discretion of the MAINTAINER of that kernel source file.
37
38Data structures visible in kernel include files should also be
39documented using kernel-doc formatted comments.
40
41The opening comment mark "/**" is reserved for kernel-doc comments.
42Only comments so marked will be considered by the kernel-doc scripts,
43and any comment so marked must be in kernel-doc format. Do not use
44"/**" to be begin a comment block unless the comment block contains
45kernel-doc formatted comments. The closing comment marker for
46kernel-doc comments can be either "*/" or "**/".
47
48Kernel-doc comments should be placed just before the function
49or data structure being described.
50
51Example kernel-doc function comment:
52
53/**
54 * foobar() - short function description of foobar
55 * @arg1: Describe the first argument to foobar.
56 * @arg2: Describe the second argument to foobar.
57 * One can provide multiple line descriptions
58 * for arguments.
59 *
60 * A longer description, with more discussion of the function foobar()
61 * that might be useful to those using or modifying it. Begins with
62 * empty comment line, and may include additional embedded empty
63 * comment lines.
64 *
65 * The longer description can have multiple paragraphs.
66 **/
67
68The first line, with the short description, must be on a single line.
69
70The @argument descriptions must begin on the very next line following
71this opening short function description line, with no intervening
72empty comment lines.
73
74Example kernel-doc data structure comment.
75
76/**
77 * struct blah - the basic blah structure
78 * @mem1: describe the first member of struct blah
79 * @mem2: describe the second member of struct blah,
80 * perhaps with more lines and words.
81 *
82 * Longer description of this structure.
83 **/
84
85The kernel-doc function comments describe each parameter to the
86function, in order, with the @name lines.
87
88The kernel-doc data structure comments describe each structure member
89in the data structure, with the @name lines.
90
91The longer description formatting is "reflowed", losing your line
92breaks. So presenting carefully formatted lists within these
93descriptions won't work so well; derived documentation will lose
94the formatting.
95
96See the section below "How to add extractable documentation to your
97source files" for more details and notes on how to format kernel-doc
98comments.
99
100Components of the kernel-doc system
101-----------------------------------
102
4Many places in the source tree have extractable documentation in the 103Many places in the source tree have extractable documentation in the
5form of block comments above functions. The components of this system 104form of block comments above functions. The components of this system
6are: 105are:
diff --git a/Documentation/kernel-docs.txt b/Documentation/kernel-docs.txt
index 5a4ef48224ae..28cdc2af2131 100644
--- a/Documentation/kernel-docs.txt
+++ b/Documentation/kernel-docs.txt
@@ -715,14 +715,14 @@
715 715
716 * Name: "Gary's Encyclopedia - The Linux Kernel" 716 * Name: "Gary's Encyclopedia - The Linux Kernel"
717 Author: Gary (I suppose...). 717 Author: Gary (I suppose...).
718 URL: http://www.lisoleg.net/cgi-bin/lisoleg.pl?view=kernel.htm 718 URL: http://slencyclopedia.berlios.de/index.html
719 Keywords: links, not found here?. 719 Keywords: linux, community, everything!
720 Description: Gary's Encyclopedia exists to allow the rapid finding 720 Description: Gary's Encyclopedia exists to allow the rapid finding
721 of documentation and other information of interest to GNU/Linux 721 of documentation and other information of interest to GNU/Linux
722 users. It has about 4000 links to external pages in 150 major 722 users. It has about 4000 links to external pages in 150 major
723 categories. This link is for kernel-specific links, documents, 723 categories. This link is for kernel-specific links, documents,
724 sites... Look there if you could not find here what you were 724 sites... This list is now hosted by developer.Berlios.de,
725 looking for. 725 but seems not to have been updated since sometime in 1999.
726 726
727 * Name: "The home page of Linux-MM" 727 * Name: "The home page of Linux-MM"
728 Author: The Linux-MM team. 728 Author: The Linux-MM team.
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index e07c432c731f..b52f47d588b4 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -295,7 +295,7 @@ and is between 256 and 4096 characters. It is defined in the file
295 when initialising the APIC and IO-APIC components. 295 when initialising the APIC and IO-APIC components.
296 296
297 apm= [APM] Advanced Power Management 297 apm= [APM] Advanced Power Management
298 See header of arch/i386/kernel/apm.c. 298 See header of arch/x86/kernel/apm_32.c.
299 299
300 arcrimi= [HW,NET] ARCnet - "RIM I" (entirely mem-mapped) cards 300 arcrimi= [HW,NET] ARCnet - "RIM I" (entirely mem-mapped) cards
301 Format: <io>,<irq>,<nodeID> 301 Format: <io>,<irq>,<nodeID>
@@ -638,7 +638,7 @@ and is between 256 and 4096 characters. It is defined in the file
638 638
639 elanfreq= [X86-32] 639 elanfreq= [X86-32]
640 See comment before function elanfreq_setup() in 640 See comment before function elanfreq_setup() in
641 arch/i386/kernel/cpu/cpufreq/elanfreq.c. 641 arch/x86/kernel/cpu/cpufreq/elanfreq.c.
642 642
643 elevator= [IOSCHED] 643 elevator= [IOSCHED]
644 Format: {"anticipatory" | "cfq" | "deadline" | "noop"} 644 Format: {"anticipatory" | "cfq" | "deadline" | "noop"}
@@ -1679,6 +1679,10 @@ and is between 256 and 4096 characters. It is defined in the file
1679 Format: <reboot_mode>[,<reboot_mode2>[,...]] 1679 Format: <reboot_mode>[,<reboot_mode2>[,...]]
1680 See arch/*/kernel/reboot.c or arch/*/kernel/process.c 1680 See arch/*/kernel/reboot.c or arch/*/kernel/process.c
1681 1681
1682 relax_domain_level=
1683 [KNL, SMP] Set scheduler's default relax_domain_level.
1684 See Documentation/cpusets.txt.
1685
1682 reserve= [KNL,BUGS] Force the kernel to ignore some iomem area 1686 reserve= [KNL,BUGS] Force the kernel to ignore some iomem area
1683 1687
1684 reservetop= [X86-32] 1688 reservetop= [X86-32]
diff --git a/Documentation/kobject.txt b/Documentation/kobject.txt
index bf3256e04027..51a8021ee532 100644
--- a/Documentation/kobject.txt
+++ b/Documentation/kobject.txt
@@ -305,7 +305,7 @@ should not be manipulated by any other user.
305 305
306A kset keeps its children in a standard kernel linked list. Kobjects point 306A kset keeps its children in a standard kernel linked list. Kobjects point
307back to their containing kset via their kset field. In almost all cases, 307back to their containing kset via their kset field. In almost all cases,
308the kobjects belonging to a ket have that kset (or, strictly, its embedded 308the kobjects belonging to a kset have that kset (or, strictly, its embedded
309kobject) in their parent. 309kobject) in their parent.
310 310
311As a kset contains a kobject within it, it should always be dynamically 311As a kset contains a kobject within it, it should always be dynamically
diff --git a/Documentation/laptops/thinkpad-acpi.txt b/Documentation/laptops/thinkpad-acpi.txt
index 01c6c3d8a7e3..64b3f146e4b0 100644
--- a/Documentation/laptops/thinkpad-acpi.txt
+++ b/Documentation/laptops/thinkpad-acpi.txt
@@ -503,7 +503,7 @@ generate input device EV_KEY events.
503In addition to the EV_KEY events, thinkpad-acpi may also issue EV_SW 503In addition to the EV_KEY events, thinkpad-acpi may also issue EV_SW
504events for switches: 504events for switches:
505 505
506SW_RADIO T60 and later hardare rfkill rocker switch 506SW_RFKILL_ALL T60 and later hardare rfkill rocker switch
507SW_TABLET_MODE Tablet ThinkPads HKEY events 0x5009 and 0x500A 507SW_TABLET_MODE Tablet ThinkPads HKEY events 0x5009 and 0x500A
508 508
509Non hot-key ACPI HKEY event map: 509Non hot-key ACPI HKEY event map:
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c
index 3be8ab2a886a..82fafe0429fe 100644
--- a/Documentation/lguest/lguest.c
+++ b/Documentation/lguest/lguest.c
@@ -157,6 +157,9 @@ struct virtqueue
157 157
158 /* The routine to call when the Guest pings us. */ 158 /* The routine to call when the Guest pings us. */
159 void (*handle_output)(int fd, struct virtqueue *me); 159 void (*handle_output)(int fd, struct virtqueue *me);
160
161 /* Outstanding buffers */
162 unsigned int inflight;
160}; 163};
161 164
162/* Remember the arguments to the program so we can "reboot" */ 165/* Remember the arguments to the program so we can "reboot" */
@@ -702,6 +705,7 @@ static unsigned get_vq_desc(struct virtqueue *vq,
702 errx(1, "Looped descriptor"); 705 errx(1, "Looped descriptor");
703 } while ((i = next_desc(vq, i)) != vq->vring.num); 706 } while ((i = next_desc(vq, i)) != vq->vring.num);
704 707
708 vq->inflight++;
705 return head; 709 return head;
706} 710}
707 711
@@ -719,6 +723,7 @@ static void add_used(struct virtqueue *vq, unsigned int head, int len)
719 /* Make sure buffer is written before we update index. */ 723 /* Make sure buffer is written before we update index. */
720 wmb(); 724 wmb();
721 vq->vring.used->idx++; 725 vq->vring.used->idx++;
726 vq->inflight--;
722} 727}
723 728
724/* This actually sends the interrupt for this virtqueue */ 729/* This actually sends the interrupt for this virtqueue */
@@ -726,8 +731,9 @@ static void trigger_irq(int fd, struct virtqueue *vq)
726{ 731{
727 unsigned long buf[] = { LHREQ_IRQ, vq->config.irq }; 732 unsigned long buf[] = { LHREQ_IRQ, vq->config.irq };
728 733
729 /* If they don't want an interrupt, don't send one. */ 734 /* If they don't want an interrupt, don't send one, unless empty. */
730 if (vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT) 735 if ((vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT)
736 && vq->inflight)
731 return; 737 return;
732 738
733 /* Send the Guest an interrupt tell them we used something up. */ 739 /* Send the Guest an interrupt tell them we used something up. */
@@ -1107,6 +1113,7 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs,
1107 vq->next = NULL; 1113 vq->next = NULL;
1108 vq->last_avail_idx = 0; 1114 vq->last_avail_idx = 0;
1109 vq->dev = dev; 1115 vq->dev = dev;
1116 vq->inflight = 0;
1110 1117
1111 /* Initialize the configuration. */ 1118 /* Initialize the configuration. */
1112 vq->config.num = num_descs; 1119 vq->config.num = num_descs;
@@ -1368,6 +1375,7 @@ static void setup_tun_net(const char *arg)
1368 1375
1369 /* Tell Guest what MAC address to use. */ 1376 /* Tell Guest what MAC address to use. */
1370 add_feature(dev, VIRTIO_NET_F_MAC); 1377 add_feature(dev, VIRTIO_NET_F_MAC);
1378 add_feature(dev, VIRTIO_F_NOTIFY_ON_EMPTY);
1371 set_config(dev, sizeof(conf), &conf); 1379 set_config(dev, sizeof(conf), &conf);
1372 1380
1373 /* We don't need the socket any more; setup is done. */ 1381 /* We don't need the socket any more; setup is done. */
diff --git a/Documentation/networking/arcnet.txt b/Documentation/networking/arcnet.txt
index 770fc41a78e8..796012540386 100644
--- a/Documentation/networking/arcnet.txt
+++ b/Documentation/networking/arcnet.txt
@@ -46,7 +46,7 @@ These are the ARCnet drivers for Linux.
46 46
47 47
48This new release (2.91) has been put together by David Woodhouse 48This new release (2.91) has been put together by David Woodhouse
49<dwmw2@cam.ac.uk>, in an attempt to tidy up the driver after adding support 49<dwmw2@infradead.org>, in an attempt to tidy up the driver after adding support
50for yet another chipset. Now the generic support has been separated from the 50for yet another chipset. Now the generic support has been separated from the
51individual chipset drivers, and the source files aren't quite so packed with 51individual chipset drivers, and the source files aren't quite so packed with
52#ifdefs! I've changed this file a bit, but kept it in the first person from 52#ifdefs! I've changed this file a bit, but kept it in the first person from
diff --git a/Documentation/networking/bridge.txt b/Documentation/networking/bridge.txt
index bdae2db4119c..bec69a8a1697 100644
--- a/Documentation/networking/bridge.txt
+++ b/Documentation/networking/bridge.txt
@@ -1,6 +1,6 @@
1In order to use the Ethernet bridging functionality, you'll need the 1In order to use the Ethernet bridging functionality, you'll need the
2userspace tools. These programs and documentation are available 2userspace tools. These programs and documentation are available
3at http://bridge.sourceforge.net. The download page is 3at http://www.linux-foundation.org/en/Net:Bridge. The download page is
4http://prdownloads.sourceforge.net/bridge. 4http://prdownloads.sourceforge.net/bridge.
5 5
6If you still have questions, don't hesitate to post to the mailing list 6If you still have questions, don't hesitate to post to the mailing list
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index 17a6e46fbd43..17f1f91af35c 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -81,23 +81,23 @@ inet_peer_minttl - INTEGER
81 Minimum time-to-live of entries. Should be enough to cover fragment 81 Minimum time-to-live of entries. Should be enough to cover fragment
82 time-to-live on the reassembling side. This minimum time-to-live is 82 time-to-live on the reassembling side. This minimum time-to-live is
83 guaranteed if the pool size is less than inet_peer_threshold. 83 guaranteed if the pool size is less than inet_peer_threshold.
84 Measured in jiffies(1). 84 Measured in seconds.
85 85
86inet_peer_maxttl - INTEGER 86inet_peer_maxttl - INTEGER
87 Maximum time-to-live of entries. Unused entries will expire after 87 Maximum time-to-live of entries. Unused entries will expire after
88 this period of time if there is no memory pressure on the pool (i.e. 88 this period of time if there is no memory pressure on the pool (i.e.
89 when the number of entries in the pool is very small). 89 when the number of entries in the pool is very small).
90 Measured in jiffies(1). 90 Measured in seconds.
91 91
92inet_peer_gc_mintime - INTEGER 92inet_peer_gc_mintime - INTEGER
93 Minimum interval between garbage collection passes. This interval is 93 Minimum interval between garbage collection passes. This interval is
94 in effect under high memory pressure on the pool. 94 in effect under high memory pressure on the pool.
95 Measured in jiffies(1). 95 Measured in seconds.
96 96
97inet_peer_gc_maxtime - INTEGER 97inet_peer_gc_maxtime - INTEGER
98 Minimum interval between garbage collection passes. This interval is 98 Minimum interval between garbage collection passes. This interval is
99 in effect under low (or absent) memory pressure on the pool. 99 in effect under low (or absent) memory pressure on the pool.
100 Measured in jiffies(1). 100 Measured in seconds.
101 101
102TCP variables: 102TCP variables:
103 103
@@ -794,10 +794,6 @@ tag - INTEGER
794 Allows you to write a number, which can be used as required. 794 Allows you to write a number, which can be used as required.
795 Default value is 0. 795 Default value is 0.
796 796
797(1) Jiffie: internal timeunit for the kernel. On the i386 1/100s, on the
798Alpha 1/1024s. See the HZ define in /usr/include/asm/param.h for the exact
799value on your system.
800
801Alexey Kuznetsov. 797Alexey Kuznetsov.
802kuznet@ms2.inr.ac.ru 798kuznet@ms2.inr.ac.ru
803 799
diff --git a/Documentation/networking/s2io.txt b/Documentation/networking/s2io.txt
index 4bde53e85f3f..1e28e2ddb90a 100644
--- a/Documentation/networking/s2io.txt
+++ b/Documentation/networking/s2io.txt
@@ -83,9 +83,9 @@ Valid range: Limited by memory on system
83Default: 30 83Default: 30
84 84
85e. intr_type 85e. intr_type
86Specifies interrupt type. Possible values 1(INTA), 2(MSI), 3(MSI-X) 86Specifies interrupt type. Possible values 0(INTA), 2(MSI-X)
87Valid range: 1-3 87Valid values: 0, 2
88Default: 1 88Default: 2
89 89
905. Performance suggestions 905. Performance suggestions
91General: 91General:
diff --git a/Documentation/video4linux/CARDLIST.au0828 b/Documentation/video4linux/CARDLIST.au0828
index aaae360312e4..86d1c8e7b18f 100644
--- a/Documentation/video4linux/CARDLIST.au0828
+++ b/Documentation/video4linux/CARDLIST.au0828
@@ -1,4 +1,4 @@
1 0 -> Unknown board (au0828) 1 0 -> Unknown board (au0828)
2 1 -> Hauppauge HVR950Q (au0828) [2040:7200] 2 1 -> Hauppauge HVR950Q (au0828) [2040:7200,2040:7210,2040:7217,2040:721b,2040:721f,2040:7280,0fd9:0008]
3 2 -> Hauppauge HVR850 (au0828) [2040:7240] 3 2 -> Hauppauge HVR850 (au0828) [2040:7240]
4 3 -> DViCO FusionHDTV USB (au0828) [0fe9:d620] 4 3 -> DViCO FusionHDTV USB (au0828) [0fe9:d620]
diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88
index 543957346469..7cf5685d3645 100644
--- a/Documentation/video4linux/CARDLIST.cx88
+++ b/Documentation/video4linux/CARDLIST.cx88
@@ -60,7 +60,7 @@
60 59 -> DViCO FusionHDTV 5 PCI nano [18ac:d530] 60 59 -> DViCO FusionHDTV 5 PCI nano [18ac:d530]
61 60 -> Pinnacle Hybrid PCTV [12ab:1788] 61 60 -> Pinnacle Hybrid PCTV [12ab:1788]
62 61 -> Winfast TV2000 XP Global [107d:6f18] 62 61 -> Winfast TV2000 XP Global [107d:6f18]
63 62 -> PowerColor Real Angel 330 [14f1:ea3d] 63 62 -> PowerColor RA330 [14f1:ea3d]
64 63 -> Geniatech X8000-MT DVBT [14f1:8852] 64 63 -> Geniatech X8000-MT DVBT [14f1:8852]
65 64 -> DViCO FusionHDTV DVB-T PRO [18ac:db30] 65 64 -> DViCO FusionHDTV DVB-T PRO [18ac:db30]
66 65 -> DViCO FusionHDTV 7 Gold [18ac:d610] 66 65 -> DViCO FusionHDTV 7 Gold [18ac:d610]
diff --git a/Documentation/video4linux/cx18.txt b/Documentation/video4linux/cx18.txt
index 077d56ec3f3d..6842c262890f 100644
--- a/Documentation/video4linux/cx18.txt
+++ b/Documentation/video4linux/cx18.txt
@@ -1,7 +1,9 @@
1Some notes regarding the cx18 driver for the Conexant CX23418 MPEG 1Some notes regarding the cx18 driver for the Conexant CX23418 MPEG
2encoder chip: 2encoder chip:
3 3
41) The only hardware currently supported is the Hauppauge HVR-1600. 41) The only hardware currently supported is the Hauppauge HVR-1600
5 card and the Compro VideoMate H900 (note that this card only
6 supports analog input, it has no digital tuner!).
5 7
62) Some people have problems getting the i2c bus to work. Cause unknown. 82) Some people have problems getting the i2c bus to work. Cause unknown.
7 The symptom is that the eeprom cannot be read and the card is 9 The symptom is that the eeprom cannot be read and the card is
diff --git a/Documentation/vm/pagemap.txt b/Documentation/vm/pagemap.txt
new file mode 100644
index 000000000000..ce72c0fe6177
--- /dev/null
+++ b/Documentation/vm/pagemap.txt
@@ -0,0 +1,77 @@
1pagemap, from the userspace perspective
2---------------------------------------
3
4pagemap is a new (as of 2.6.25) set of interfaces in the kernel that allow
5userspace programs to examine the page tables and related information by
6reading files in /proc.
7
8There are three components to pagemap:
9
10 * /proc/pid/pagemap. This file lets a userspace process find out which
11 physical frame each virtual page is mapped to. It contains one 64-bit
12 value for each virtual page, containing the following data (from
13 fs/proc/task_mmu.c, above pagemap_read):
14
15 * Bits 0-55 page frame number (PFN) if present
16 * Bits 0-4 swap type if swapped
17 * Bits 5-55 swap offset if swapped
18 * Bits 55-60 page shift (page size = 1<<page shift)
19 * Bit 61 reserved for future use
20 * Bit 62 page swapped
21 * Bit 63 page present
22
23 If the page is not present but in swap, then the PFN contains an
24 encoding of the swap file number and the page's offset into the
25 swap. Unmapped pages return a null PFN. This allows determining
26 precisely which pages are mapped (or in swap) and comparing mapped
27 pages between processes.
28
29 Efficient users of this interface will use /proc/pid/maps to
30 determine which areas of memory are actually mapped and llseek to
31 skip over unmapped regions.
32
33 * /proc/kpagecount. This file contains a 64-bit count of the number of
34 times each page is mapped, indexed by PFN.
35
36 * /proc/kpageflags. This file contains a 64-bit set of flags for each
37 page, indexed by PFN.
38
39 The flags are (from fs/proc/proc_misc, above kpageflags_read):
40
41 0. LOCKED
42 1. ERROR
43 2. REFERENCED
44 3. UPTODATE
45 4. DIRTY
46 5. LRU
47 6. ACTIVE
48 7. SLAB
49 8. WRITEBACK
50 9. RECLAIM
51 10. BUDDY
52
53Using pagemap to do something useful:
54
55The general procedure for using pagemap to find out about a process' memory
56usage goes like this:
57
58 1. Read /proc/pid/maps to determine which parts of the memory space are
59 mapped to what.
60 2. Select the maps you are interested in -- all of them, or a particular
61 library, or the stack or the heap, etc.
62 3. Open /proc/pid/pagemap and seek to the pages you would like to examine.
63 4. Read a u64 for each page from pagemap.
64 5. Open /proc/kpagecount and/or /proc/kpageflags. For each PFN you just
65 read, seek to that entry in the file, and read the data you want.
66
67For example, to find the "unique set size" (USS), which is the amount of
68memory that a process is using that is not shared with any other process,
69you can go through every map in the process, find the PFNs, look those up
70in kpagecount, and tally up the number of pages that are only referenced
71once.
72
73Other notes:
74
75Reading from any of the files will return -EINVAL if you are not starting
76the read on an 8-byte boundary (e.g., if you seeked an odd number of bytes
77into the file), or if the size of the read is not a multiple of 8 bytes.
diff --git a/Documentation/vm/slabinfo.c b/Documentation/vm/slabinfo.c
index e4230ed16ee7..df3227605d59 100644
--- a/Documentation/vm/slabinfo.c
+++ b/Documentation/vm/slabinfo.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Slabinfo: Tool to get reports about slabs 2 * Slabinfo: Tool to get reports about slabs
3 * 3 *
4 * (C) 2007 sgi, Christoph Lameter <clameter@sgi.com> 4 * (C) 2007 sgi, Christoph Lameter
5 * 5 *
6 * Compile by: 6 * Compile by:
7 * 7 *
@@ -99,7 +99,7 @@ void fatal(const char *x, ...)
99 99
100void usage(void) 100void usage(void)
101{ 101{
102 printf("slabinfo 5/7/2007. (c) 2007 sgi. clameter@sgi.com\n\n" 102 printf("slabinfo 5/7/2007. (c) 2007 sgi.\n\n"
103 "slabinfo [-ahnpvtsz] [-d debugopts] [slab-regexp]\n" 103 "slabinfo [-ahnpvtsz] [-d debugopts] [slab-regexp]\n"
104 "-a|--aliases Show aliases\n" 104 "-a|--aliases Show aliases\n"
105 "-A|--activity Most active slabs first\n" 105 "-A|--activity Most active slabs first\n"
diff --git a/Documentation/vm/slub.txt b/Documentation/vm/slub.txt
index 7c13f22a0c9e..bb1f5c6e28b3 100644
--- a/Documentation/vm/slub.txt
+++ b/Documentation/vm/slub.txt
@@ -266,4 +266,4 @@ of other objects.
266 266
267 slub_debug=FZ,dentry 267 slub_debug=FZ,dentry
268 268
269Christoph Lameter, <clameter@sgi.com>, May 30, 2007 269Christoph Lameter, May 30, 2007
diff --git a/Documentation/x86_64/mm.txt b/Documentation/x86_64/mm.txt
index b89b6d2bebfa..efce75097369 100644
--- a/Documentation/x86_64/mm.txt
+++ b/Documentation/x86_64/mm.txt
@@ -11,9 +11,8 @@ ffffc10000000000 - ffffc1ffffffffff (=40 bits) hole
11ffffc20000000000 - ffffe1ffffffffff (=45 bits) vmalloc/ioremap space 11ffffc20000000000 - ffffe1ffffffffff (=45 bits) vmalloc/ioremap space
12ffffe20000000000 - ffffe2ffffffffff (=40 bits) virtual memory map (1TB) 12ffffe20000000000 - ffffe2ffffffffff (=40 bits) virtual memory map (1TB)
13... unused hole ... 13... unused hole ...
14ffffffff80000000 - ffffffff82800000 (=40 MB) kernel text mapping, from phys 0 14ffffffff80000000 - ffffffffa0000000 (=512 MB) kernel text mapping, from phys 0
15... unused hole ... 15ffffffffa0000000 - fffffffffff00000 (=1536 MB) module mapping space
16ffffffff88000000 - fffffffffff00000 (=1919 MB) module mapping space
17 16
18The direct mapping covers all memory in the system up to the highest 17The direct mapping covers all memory in the system up to the highest
19memory address (this means in some cases it can also include PCI memory 18memory address (this means in some cases it can also include PCI memory
diff --git a/MAINTAINERS b/MAINTAINERS
index a0291616a35f..6476125363e0 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -228,21 +228,21 @@ ACPI BATTERY DRIVERS
228P: Alexey Starikovskiy 228P: Alexey Starikovskiy
229M: astarikovskiy@suse.de 229M: astarikovskiy@suse.de
230L: linux-acpi@vger.kernel.org 230L: linux-acpi@vger.kernel.org
231W: http://acpi.sourceforge.net/ 231W: http://www.lesswatts.org/projects/acpi/
232S: Supported 232S: Supported
233 233
234ACPI EC DRIVER 234ACPI EC DRIVER
235P: Alexey Starikovskiy 235P: Alexey Starikovskiy
236M: astarikovskiy@suse.de 236M: astarikovskiy@suse.de
237L: linux-acpi@vger.kernel.org 237L: linux-acpi@vger.kernel.org
238W: http://acpi.sourceforge.net/ 238W: http://www.lesswatts.org/projects/acpi/
239S: Supported 239S: Supported
240 240
241ACPI FAN DRIVER 241ACPI FAN DRIVER
242P: Len Brown 242P: Len Brown
243M: len.brown@intel.com 243M: len.brown@intel.com
244L: linux-acpi@vger.kernel.org 244L: linux-acpi@vger.kernel.org
245W: http://acpi.sourceforge.net/ 245W: http://www.lesswatts.org/projects/acpi/
246S: Supported 246S: Supported
247 247
248ACPI PCI HOTPLUG DRIVER 248ACPI PCI HOTPLUG DRIVER
@@ -255,14 +255,14 @@ ACPI THERMAL DRIVER
255P: Len Brown 255P: Len Brown
256M: len.brown@intel.com 256M: len.brown@intel.com
257L: linux-acpi@vger.kernel.org 257L: linux-acpi@vger.kernel.org
258W: http://acpi.sourceforge.net/ 258W: http://www.lesswatts.org/projects/acpi/
259S: Supported 259S: Supported
260 260
261ACPI VIDEO DRIVER 261ACPI VIDEO DRIVER
262P: Rui Zhang 262P: Rui Zhang
263M: rui.zhang@intel.com 263M: rui.zhang@intel.com
264L: linux-acpi@vger.kernel.org 264L: linux-acpi@vger.kernel.org
265W: http://acpi.sourceforge.net/ 265W: http://www.lesswatts.org/projects/acpi/
266S: Supported 266S: Supported
267 267
268ACPI WMI DRIVER 268ACPI WMI DRIVER
@@ -274,7 +274,7 @@ S: Maintained
274 274
275AD1889 ALSA SOUND DRIVER 275AD1889 ALSA SOUND DRIVER
276P: Kyle McMartin 276P: Kyle McMartin
277M: kyle@parisc-linux.org 277M: kyle@mcmartin.ca
278P: Thibaut Varene 278P: Thibaut Varene
279M: T-Bone@parisc-linux.org 279M: T-Bone@parisc-linux.org
280W: http://wiki.parisc-linux.org/AD1889 280W: http://wiki.parisc-linux.org/AD1889
@@ -763,9 +763,10 @@ S: Maintained
763 763
764AUXILIARY DISPLAY DRIVERS 764AUXILIARY DISPLAY DRIVERS
765P: Miguel Ojeda Sandonis 765P: Miguel Ojeda Sandonis
766M: maxextreme@gmail.com 766M: miguel.ojeda.sandonis@gmail.com
767L: linux-kernel@vger.kernel.org 767L: linux-kernel@vger.kernel.org
768W: http://auxdisplay.googlepages.com/ 768W: http://miguelojeda.es/auxdisplay.htm
769W: http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm
769S: Maintained 770S: Maintained
770 771
771AVR32 ARCHITECTURE 772AVR32 ARCHITECTURE
@@ -982,13 +983,6 @@ L: bonding-devel@lists.sourceforge.net
982W: http://sourceforge.net/projects/bonding/ 983W: http://sourceforge.net/projects/bonding/
983S: Supported 984S: Supported
984 985
985BROADBAND PROCESSOR ARCHITECTURE
986P: Arnd Bergmann
987M: arnd@arndb.de
988L: linuxppc-dev@ozlabs.org
989W: http://www.penguinppc.org/ppc64/
990S: Supported
991
992BROADCOM B44 10/100 ETHERNET DRIVER 986BROADCOM B44 10/100 ETHERNET DRIVER
993P: Gary Zambrano 987P: Gary Zambrano
994M: zambrano@broadcom.com 988M: zambrano@broadcom.com
@@ -1002,8 +996,8 @@ L: netdev@vger.kernel.org
1002S: Supported 996S: Supported
1003 997
1004BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER 998BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER
1005P: Eliezer Tamir 999P: Eilon Greenstein
1006M: eliezert@broadcom.com 1000M: eilong@broadcom.com
1007L: netdev@vger.kernel.org 1001L: netdev@vger.kernel.org
1008S: Supported 1002S: Supported
1009 1003
@@ -1052,18 +1046,28 @@ L: linux-kernel@vger.kernel.org
1052L: discuss@x86-64.org 1046L: discuss@x86-64.org
1053S: Maintained 1047S: Maintained
1054 1048
1049CELL BROADBAND ENGINE ARCHITECTURE
1050P: Arnd Bergmann
1051M: arnd@arndb.de
1052L: linuxppc-dev@ozlabs.org
1053L: cbe-oss-dev@ozlabs.org
1054W: http://www.ibm.com/developerworks/power/cell/
1055S: Supported
1056
1055CFAG12864B LCD DRIVER 1057CFAG12864B LCD DRIVER
1056P: Miguel Ojeda Sandonis 1058P: Miguel Ojeda Sandonis
1057M: maxextreme@gmail.com 1059M: miguel.ojeda.sandonis@gmail.com
1058L: linux-kernel@vger.kernel.org 1060L: linux-kernel@vger.kernel.org
1059W: http://auxdisplay.googlepages.com/ 1061W: http://miguelojeda.es/auxdisplay.htm
1062W: http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm
1060S: Maintained 1063S: Maintained
1061 1064
1062CFAG12864BFB LCD FRAMEBUFFER DRIVER 1065CFAG12864BFB LCD FRAMEBUFFER DRIVER
1063P: Miguel Ojeda Sandonis 1066P: Miguel Ojeda Sandonis
1064M: maxextreme@gmail.com 1067M: miguel.ojeda.sandonis@gmail.com
1065L: linux-kernel@vger.kernel.org 1068L: linux-kernel@vger.kernel.org
1066W: http://auxdisplay.googlepages.com/ 1069W: http://miguelojeda.es/auxdisplay.htm
1070W: http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm
1067S: Maintained 1071S: Maintained
1068 1072
1069CFG80211 and NL80211 1073CFG80211 and NL80211
@@ -1201,6 +1205,7 @@ M: pj@sgi.com
1201M: menage@google.com 1205M: menage@google.com
1202L: linux-kernel@vger.kernel.org 1206L: linux-kernel@vger.kernel.org
1203W: http://www.bullopensource.org/cpuset/ 1207W: http://www.bullopensource.org/cpuset/
1208W: http://oss.sgi.com/projects/cpusets/
1204S: Supported 1209S: Supported
1205 1210
1206CRAMFS FILESYSTEM 1211CRAMFS FILESYSTEM
@@ -1239,6 +1244,20 @@ L: video4linux-list@redhat.com
1239W: http://linuxtv.org 1244W: http://linuxtv.org
1240S: Maintained 1245S: Maintained
1241 1246
1247CXGB3 ETHERNET DRIVER (CXGB3)
1248P: Divy Le Ray
1249M: divy@chelsio.com
1250L: netdev@vger.kernel.org
1251W: http://www.chelsio.com
1252S: Supported
1253
1254CXGB3 IWARP RNIC DRIVER (IW_CXGB3)
1255P: Steve Wise
1256M: swise@chelsio.com
1257L: general@lists.openfabrics.org
1258W: http://www.openfabrics.org
1259S: Supported
1260
1242CYBERPRO FB DRIVER 1261CYBERPRO FB DRIVER
1243P: Russell King 1262P: Russell King
1244M: rmk@arm.linux.org.uk 1263M: rmk@arm.linux.org.uk
@@ -1404,6 +1423,14 @@ M: kristen.c.accardi@intel.com
1404L: linux-acpi@vger.kernel.org 1423L: linux-acpi@vger.kernel.org
1405S: Supported 1424S: Supported
1406 1425
1426DOCUMENTATION (/Documentation directory)
1427P: Michael Kerrisk
1428M: mtk.manpages@gmail.com
1429P: Randy Dunlap
1430M: rdunlap@xenotime.net
1431L: linux-doc@vger.kernel.org
1432S: Maintained
1433
1407DOUBLETALK DRIVER 1434DOUBLETALK DRIVER
1408P: James R. Van Zandt 1435P: James R. Van Zandt
1409M: jrv@vanzandt.mv.com 1436M: jrv@vanzandt.mv.com
@@ -1596,7 +1623,7 @@ ETHERNET BRIDGE
1596P: Stephen Hemminger 1623P: Stephen Hemminger
1597M: shemminger@linux-foundation.org 1624M: shemminger@linux-foundation.org
1598L: bridge@lists.linux-foundation.org 1625L: bridge@lists.linux-foundation.org
1599W: http://bridge.sourceforge.net/ 1626W: http://www.linux-foundation.org/en/Net:Bridge
1600S: Maintained 1627S: Maintained
1601 1628
1602ETHERTEAM 16I DRIVER 1629ETHERTEAM 16I DRIVER
@@ -1610,13 +1637,13 @@ S: Maintained
1610 1637
1611EXT3 FILE SYSTEM 1638EXT3 FILE SYSTEM
1612P: Stephen Tweedie, Andrew Morton 1639P: Stephen Tweedie, Andrew Morton
1613M: sct@redhat.com, akpm@linux-foundation.org, adilger@clusterfs.com 1640M: sct@redhat.com, akpm@linux-foundation.org, adilger@sun.com
1614L: linux-ext4@vger.kernel.org 1641L: linux-ext4@vger.kernel.org
1615S: Maintained 1642S: Maintained
1616 1643
1617EXT4 FILE SYSTEM 1644EXT4 FILE SYSTEM
1618P: Stephen Tweedie, Andrew Morton 1645P: Stephen Tweedie, Andrew Morton
1619M: sct@redhat.com, akpm@linux-foundation.org, adilger@clusterfs.com 1646M: sct@redhat.com, akpm@linux-foundation.org, adilger@sun.com
1620L: linux-ext4@vger.kernel.org 1647L: linux-ext4@vger.kernel.org
1621S: Maintained 1648S: Maintained
1622 1649
@@ -1645,8 +1672,10 @@ W: http://linux-fbdev.sourceforge.net/
1645S: Maintained 1672S: Maintained
1646 1673
1647FREESCALE DMA DRIVER 1674FREESCALE DMA DRIVER
1648P; Zhang Wei 1675P: Li Yang
1649M: wei.zhang@freescale.com 1676M: leoli@freescale.com
1677P: Zhang Wei
1678M: zw@zh-kernel.org
1650L: linuxppc-embedded@ozlabs.org 1679L: linuxppc-embedded@ozlabs.org
1651L: linux-kernel@vger.kernel.org 1680L: linux-kernel@vger.kernel.org
1652S: Maintained 1681S: Maintained
@@ -1810,7 +1839,7 @@ S: Maintained
1810 1839
1811HARMONY SOUND DRIVER 1840HARMONY SOUND DRIVER
1812P: Kyle McMartin 1841P: Kyle McMartin
1813M: kyle@parisc-linux.org 1842M: kyle@mcmartin.ca
1814L: linux-parisc@vger.kernel.org 1843L: linux-parisc@vger.kernel.org
1815S: Maintained 1844S: Maintained
1816 1845
@@ -2410,9 +2439,10 @@ S: Maintained
2410 2439
2411KS0108 LCD CONTROLLER DRIVER 2440KS0108 LCD CONTROLLER DRIVER
2412P: Miguel Ojeda Sandonis 2441P: Miguel Ojeda Sandonis
2413M: maxextreme@gmail.com 2442M: miguel.ojeda.sandonis@gmail.com
2414L: linux-kernel@vger.kernel.org 2443L: linux-kernel@vger.kernel.org
2415W: http://auxdisplay.googlepages.com/ 2444W: http://miguelojeda.es/auxdisplay.htm
2445W: http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm
2416S: Maintained 2446S: Maintained
2417 2447
2418LAPB module 2448LAPB module
@@ -2456,9 +2486,11 @@ M: James.Bottomley@HansenPartnership.com
2456W: http://www.hansenpartnership.com/voyager 2486W: http://www.hansenpartnership.com/voyager
2457S: Maintained 2487S: Maintained
2458 2488
2459LINUX FOR POWERPC 2489LINUX FOR POWERPC (32-BIT AND 64-BIT)
2460P: Paul Mackerras 2490P: Paul Mackerras
2461M: paulus@samba.org 2491M: paulus@samba.org
2492P: Benjamin Herrenschmidt
2493M: benh@kernel.crashing.org
2462W: http://www.penguinppc.org/ 2494W: http://www.penguinppc.org/
2463L: linuxppc-dev@ozlabs.org 2495L: linuxppc-dev@ozlabs.org
2464T: git kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc.git 2496T: git kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc.git
@@ -2498,13 +2530,6 @@ W: http://wiki.secretlab.ca/index.php/Linux_on_Xilinx_Virtex
2498L: linuxppc-dev@ozlabs.org 2530L: linuxppc-dev@ozlabs.org
2499S: Maintained 2531S: Maintained
2500 2532
2501LINUX FOR POWERPC BOOT CODE
2502P: Tom Rini
2503M: trini@kernel.crashing.org
2504W: http://www.penguinppc.org/
2505L: linuxppc-dev@ozlabs.org
2506S: Maintained
2507
2508LINUX FOR POWERPC EMBEDDED PPC8XX 2533LINUX FOR POWERPC EMBEDDED PPC8XX
2509P: Vitaly Bordug 2534P: Vitaly Bordug
2510M: vitb@kernel.crashing.org 2535M: vitb@kernel.crashing.org
@@ -2533,22 +2558,10 @@ P: Arnaldo Carvalho de Melo
2533M: acme@ghostprotocols.net 2558M: acme@ghostprotocols.net
2534S: Maintained 2559S: Maintained
2535 2560
2536LINUX FOR 64BIT POWERPC
2537P: Paul Mackerras
2538M: paulus@samba.org
2539M: paulus@au.ibm.com
2540P: Anton Blanchard
2541M: anton@samba.org
2542M: anton@au.ibm.com
2543W: http://www.penguinppc.org/ppc64/
2544L: linuxppc-dev@ozlabs.org
2545S: Supported
2546
2547LINUX SECURITY MODULE (LSM) FRAMEWORK 2561LINUX SECURITY MODULE (LSM) FRAMEWORK
2548P: Chris Wright 2562P: Chris Wright
2549M: chrisw@sous-sol.org 2563M: chrisw@sous-sol.org
2550L: linux-security-module@vger.kernel.org 2564L: linux-security-module@vger.kernel.org
2551W: http://lsm.immunix.org
2552T: git kernel.org:/pub/scm/linux/kernel/git/chrisw/lsm-2.6.git 2565T: git kernel.org:/pub/scm/linux/kernel/git/chrisw/lsm-2.6.git
2553S: Supported 2566S: Supported
2554 2567
@@ -2663,8 +2676,8 @@ S: Supported
2663MAN-PAGES: MANUAL PAGES FOR LINUX -- Sections 2, 3, 4, 5, and 7 2676MAN-PAGES: MANUAL PAGES FOR LINUX -- Sections 2, 3, 4, 5, and 7
2664P: Michael Kerrisk 2677P: Michael Kerrisk
2665M: mtk.manpages@gmail.com 2678M: mtk.manpages@gmail.com
2666W: ftp://ftp.kernel.org/pub/linux/docs/manpages 2679W: http://www.kernel.org/doc/man-pages
2667S: Maintained 2680S: Supported
2668 2681
2669MARVELL LIBERTAS WIRELESS DRIVER 2682MARVELL LIBERTAS WIRELESS DRIVER
2670P: Dan Williams 2683P: Dan Williams
@@ -2797,6 +2810,12 @@ W: https://tango.0pointer.de/mailman/listinfo/s270-linux
2797W: http://0pointer.de/lennart/tchibo.html 2810W: http://0pointer.de/lennart/tchibo.html
2798S: Maintained 2811S: Maintained
2799 2812
2813MULTIFUNCTION DEVICES (MFD)
2814P: Samuel Ortiz
2815M: sameo@openedhand.com
2816L: linux-kernel@vger.kernel.org
2817S: Supported
2818
2800MULTIMEDIA CARD (MMC), SECURE DIGITAL (SD) AND SDIO SUBSYSTEM 2819MULTIMEDIA CARD (MMC), SECURE DIGITAL (SD) AND SDIO SUBSYSTEM
2801P: Pierre Ossman 2820P: Pierre Ossman
2802M: drzeus-mmc@drzeus.cx 2821M: drzeus-mmc@drzeus.cx
@@ -2849,8 +2868,8 @@ S: Maintained
2849NETEFFECT IWARP RNIC DRIVER (IW_NES) 2868NETEFFECT IWARP RNIC DRIVER (IW_NES)
2850P: Faisal Latif 2869P: Faisal Latif
2851M: flatif@neteffect.com 2870M: flatif@neteffect.com
2852P: Nishi Gupta 2871P: Chien Tung
2853M: ngupta@neteffect.com 2872M: ctung@neteffect.com
2854P: Glenn Streiff 2873P: Glenn Streiff
2855M: gstreiff@neteffect.com 2874M: gstreiff@neteffect.com
2856L: general@lists.openfabrics.org 2875L: general@lists.openfabrics.org
@@ -3104,7 +3123,7 @@ S: Maintained
3104 3123
3105PARISC ARCHITECTURE 3124PARISC ARCHITECTURE
3106P: Kyle McMartin 3125P: Kyle McMartin
3107M: kyle@parisc-linux.org 3126M: kyle@mcmartin.ca
3108P: Matthew Wilcox 3127P: Matthew Wilcox
3109M: matthew@wil.cx 3128M: matthew@wil.cx
3110P: Grant Grundler 3129P: Grant Grundler
@@ -3142,7 +3161,7 @@ PCI ERROR RECOVERY
3142P: Linas Vepstas 3161P: Linas Vepstas
3143M: linas@austin.ibm.com 3162M: linas@austin.ibm.com
3144L: linux-kernel@vger.kernel.org 3163L: linux-kernel@vger.kernel.org
3145L: linux-pci@atrey.karlin.mff.cuni.cz 3164L: linux-pci@vger.kernel.org
3146S: Supported 3165S: Supported
3147 3166
3148PCI SUBSYSTEM 3167PCI SUBSYSTEM
@@ -3178,8 +3197,8 @@ L: netdev@vger.kernel.org
3178S: Maintained 3197S: Maintained
3179 3198
3180PER-TASK DELAY ACCOUNTING 3199PER-TASK DELAY ACCOUNTING
3181P: Shailabh Nagar 3200P: Balbir Singh
3182M: nagar@watson.ibm.com 3201M: balbir@linux.vnet.ibm.com
3183L: linux-kernel@vger.kernel.org 3202L: linux-kernel@vger.kernel.org
3184S: Maintained 3203S: Maintained
3185 3204
@@ -3248,7 +3267,7 @@ S: Maintained
3248 3267
3249PPP OVER ETHERNET 3268PPP OVER ETHERNET
3250P: Michal Ostrowski 3269P: Michal Ostrowski
3251M: mostrows@speakeasy.net 3270M: mostrows@earthlink.net
3252S: Maintained 3271S: Maintained
3253 3272
3254PPP OVER L2TP 3273PPP OVER L2TP
@@ -3313,9 +3332,11 @@ L: video4linux-list@redhat.com
3313W: http://www.isely.net/pvrusb2/ 3332W: http://www.isely.net/pvrusb2/
3314S: Maintained 3333S: Maintained
3315 3334
3316PXA2xx SUPPORT 3335PXA2xx/PXA3xx SUPPORT
3317P: Nicolas Pitre 3336P: Eric Miao
3318M: nico@cam.org 3337M: eric.miao@marvell.com
3338P: Russell King
3339M: linux@arm.linux.org.uk
3319L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) 3340L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
3320S: Maintained 3341S: Maintained
3321 3342
@@ -3422,10 +3443,7 @@ L: rtc-linux@googlegroups.com
3422S: Maintained 3443S: Maintained
3423 3444
3424REISERFS FILE SYSTEM 3445REISERFS FILE SYSTEM
3425P: Hans Reiser
3426M: reiserfs-dev@namesys.com
3427L: reiserfs-devel@vger.kernel.org 3446L: reiserfs-devel@vger.kernel.org
3428W: http://www.namesys.com
3429S: Supported 3447S: Supported
3430 3448
3431RFKILL 3449RFKILL
@@ -3645,13 +3663,6 @@ M: romieu@fr.zoreil.com
3645L: netdev@vger.kernel.org 3663L: netdev@vger.kernel.org
3646S: Maintained 3664S: Maintained
3647 3665
3648SIS 5513 IDE CONTROLLER DRIVER
3649P: Lionel Bouton
3650M: Lionel.Bouton@inet6.fr
3651W: http://inet6.dyn.dhs.org/sponsoring/sis5513/index.html
3652W: http://gyver.homeip.net/sis5513/index.html
3653S: Maintained
3654
3655SIS 900/7016 FAST ETHERNET DRIVER 3666SIS 900/7016 FAST ETHERNET DRIVER
3656P: Daniele Venzano 3667P: Daniele Venzano
3657M: venza@brownhat.org 3668M: venza@brownhat.org
@@ -3679,7 +3690,7 @@ S: Maintained
3679 3690
3680SLAB ALLOCATOR 3691SLAB ALLOCATOR
3681P: Christoph Lameter 3692P: Christoph Lameter
3682M: clameter@sgi.com 3693M: cl@linux-foundation.org
3683P: Pekka Enberg 3694P: Pekka Enberg
3684M: penberg@cs.helsinki.fi 3695M: penberg@cs.helsinki.fi
3685P: Matt Mackall 3696P: Matt Mackall
@@ -3776,6 +3787,14 @@ M: dbrownell@users.sourceforge.net
3776L: spi-devel-general@lists.sourceforge.net 3787L: spi-devel-general@lists.sourceforge.net
3777S: Maintained 3788S: Maintained
3778 3789
3790SPU FILE SYSTEM
3791P: Jeremy Kerr
3792M: jk@ozlabs.org
3793L: linuxppc-dev@ozlabs.org
3794L: cbe-oss-dev@ozlabs.org
3795W: http://www.ibm.com/developerworks/power/cell/
3796S: Supported
3797
3779STABLE BRANCH: 3798STABLE BRANCH:
3780P: Greg Kroah-Hartman 3799P: Greg Kroah-Hartman
3781M: greg@kroah.com 3800M: greg@kroah.com
@@ -3881,8 +3900,8 @@ M: hch@infradead.org
3881S: Maintained 3900S: Maintained
3882 3901
3883TASKSTATS STATISTICS INTERFACE 3902TASKSTATS STATISTICS INTERFACE
3884P: Shailabh Nagar 3903P: Balbir Singh
3885M: nagar@watson.ibm.com 3904M: balbir@linux.vnet.ibm.com
3886L: linux-kernel@vger.kernel.org 3905L: linux-kernel@vger.kernel.org
3887S: Maintained 3906S: Maintained
3888 3907
@@ -3978,7 +3997,8 @@ W: http://www.buzzard.org.uk/toshiba/
3978S: Maintained 3997S: Maintained
3979 3998
3980TPM DEVICE DRIVER 3999TPM DEVICE DRIVER
3981P: Kylene Hall 4000P: Debora Velarde
4001P: Rajiv Andrade
3982M: tpmdd-devel@lists.sourceforge.net 4002M: tpmdd-devel@lists.sourceforge.net
3983W: http://tpmdd.sourceforge.net 4003W: http://tpmdd.sourceforge.net
3984P: Marcel Selhorst 4004P: Marcel Selhorst
@@ -4009,7 +4029,7 @@ TULIP NETWORK DRIVERS
4009P: Grant Grundler 4029P: Grant Grundler
4010M: grundler@parisc-linux.org 4030M: grundler@parisc-linux.org
4011P: Kyle McMartin 4031P: Kyle McMartin
4012M: kyle@parisc-linux.org 4032M: kyle@mcmartin.ca
4013L: netdev@vger.kernel.org 4033L: netdev@vger.kernel.org
4014S: Maintained 4034S: Maintained
4015 4035
@@ -4297,6 +4317,14 @@ L: netdev@vger.kernel.org
4297W: http://www.linux-usb.org/usbnet 4317W: http://www.linux-usb.org/usbnet
4298S: Maintained 4318S: Maintained
4299 4319
4320USB VIDEO CLASS
4321P: Laurent Pinchart
4322M: laurent.pinchart@skynet.be
4323L: linx-uvc-devel@berlios.de
4324L: video4linux-list@redhat.com
4325W: http://linux-uvc.berlios.de
4326S: Maintained
4327
4300USB W996[87]CF DRIVER 4328USB W996[87]CF DRIVER
4301P: Luca Risolia 4329P: Luca Risolia
4302M: luca.risolia@studio.unibo.it 4330M: luca.risolia@studio.unibo.it
@@ -4350,6 +4378,14 @@ M: gregkh@suse.de
4350L: linux-kernel@vger.kernel.org 4378L: linux-kernel@vger.kernel.org
4351S: Maintained 4379S: Maintained
4352 4380
4381UTIL-LINUX-NG PACKAGE
4382P: Karel Zak
4383M: kzak@redhat.com
4384L: util-linux-ng@vger.kernel.org
4385W: http://kernel.org/~kzak/util-linux-ng/
4386T: git://git.kernel.org/pub/scm/utils/util-linux-ng/util-linux-ng.git
4387S: Maintained
4388
4353VFAT/FAT/MSDOS FILESYSTEM: 4389VFAT/FAT/MSDOS FILESYSTEM:
4354P: OGAWA Hirofumi 4390P: OGAWA Hirofumi
4355M: hirofumi@mail.parknet.co.jp 4391M: hirofumi@mail.parknet.co.jp
@@ -4406,10 +4442,10 @@ M: johnpol@2ka.mipt.ru
4406S: Maintained 4442S: Maintained
4407 4443
4408W83791D HARDWARE MONITORING DRIVER 4444W83791D HARDWARE MONITORING DRIVER
4409P: Charles Spirakis 4445P: Marc Hulsman
4410M: bezaur@gmail.com 4446M: m.hulsman@tudelft.nl
4411L: lm-sensors@lm-sensors.org 4447L: lm-sensors@lm-sensors.org
4412S: Odd Fixes 4448S: Maintained
4413 4449
4414W83793 HARDWARE MONITORING DRIVER 4450W83793 HARDWARE MONITORING DRIVER
4415P: Rudolf Marek 4451P: Rudolf Marek
diff --git a/Makefile b/Makefile
index 20b32351906b..6315424a00b9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
1VERSION = 2 1VERSION = 2
2PATCHLEVEL = 6 2PATCHLEVEL = 6
3SUBLEVEL = 26 3SUBLEVEL = 26
4EXTRAVERSION = -rc3 4EXTRAVERSION = -rc9
5NAME = Funky Weasel is Jiggy wit it 5NAME = Rotary Wombat
6 6
7# *DOCUMENTATION* 7# *DOCUMENTATION*
8# To see a list of typical targets execute "make help" 8# To see a list of typical targets execute "make help"
diff --git a/arch/alpha/Makefile b/arch/alpha/Makefile
index 4e1a8e2c4541..4759fe751aa1 100644
--- a/arch/alpha/Makefile
+++ b/arch/alpha/Makefile
@@ -13,6 +13,7 @@ NM := $(NM) -B
13LDFLAGS_vmlinux := -static -N #-relax 13LDFLAGS_vmlinux := -static -N #-relax
14CHECKFLAGS += -D__alpha__ -m64 14CHECKFLAGS += -D__alpha__ -m64
15cflags-y := -pipe -mno-fp-regs -ffixed-8 -msmall-data 15cflags-y := -pipe -mno-fp-regs -ffixed-8 -msmall-data
16cflags-y += $(call cc-option, -fno-jump-tables)
16 17
17cpuflags-$(CONFIG_ALPHA_EV4) := -mcpu=ev4 18cpuflags-$(CONFIG_ALPHA_EV4) := -mcpu=ev4
18cpuflags-$(CONFIG_ALPHA_EV5) := -mcpu=ev5 19cpuflags-$(CONFIG_ALPHA_EV5) := -mcpu=ev5
diff --git a/arch/alpha/kernel/core_t2.c b/arch/alpha/kernel/core_t2.c
index c0750291b44a..d9980d47ab81 100644
--- a/arch/alpha/kernel/core_t2.c
+++ b/arch/alpha/kernel/core_t2.c
@@ -74,6 +74,8 @@
74# define DBG(args) 74# define DBG(args)
75#endif 75#endif
76 76
77DEFINE_SPINLOCK(t2_hae_lock);
78
77static volatile unsigned int t2_mcheck_any_expected; 79static volatile unsigned int t2_mcheck_any_expected;
78static volatile unsigned int t2_mcheck_last_taken; 80static volatile unsigned int t2_mcheck_last_taken;
79 81
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c
index 36ab22a7ea12..5cf45fc51343 100644
--- a/arch/alpha/kernel/pci.c
+++ b/arch/alpha/kernel/pci.c
@@ -71,6 +71,23 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82378, quirk_i
71static void __init 71static void __init
72quirk_cypress(struct pci_dev *dev) 72quirk_cypress(struct pci_dev *dev)
73{ 73{
74 /* The Notorious Cy82C693 chip. */
75
76 /* The generic legacy mode IDE fixup in drivers/pci/probe.c
77 doesn't work correctly with the Cypress IDE controller as
78 it has non-standard register layout. Fix that. */
79 if (dev->class >> 8 == PCI_CLASS_STORAGE_IDE) {
80 dev->resource[2].start = dev->resource[3].start = 0;
81 dev->resource[2].end = dev->resource[3].end = 0;
82 dev->resource[2].flags = dev->resource[3].flags = 0;
83 if (PCI_FUNC(dev->devfn) == 2) {
84 dev->resource[0].start = 0x170;
85 dev->resource[0].end = 0x177;
86 dev->resource[1].start = 0x376;
87 dev->resource[1].end = 0x376;
88 }
89 }
90
74 /* The Cypress bridge responds on the PCI bus in the address range 91 /* The Cypress bridge responds on the PCI bus in the address range
75 0xffff0000-0xffffffff (conventional x86 BIOS ROM). There is no 92 0xffff0000-0xffffffff (conventional x86 BIOS ROM). There is no
76 way to turn this off. The bridge also supports several extended 93 way to turn this off. The bridge also supports several extended
diff --git a/arch/alpha/kernel/traps.c b/arch/alpha/kernel/traps.c
index dc57790250d2..c778779007fc 100644
--- a/arch/alpha/kernel/traps.c
+++ b/arch/alpha/kernel/traps.c
@@ -447,7 +447,7 @@ struct unaligned_stat {
447 447
448 448
449/* Macro for exception fixup code to access integer registers. */ 449/* Macro for exception fixup code to access integer registers. */
450#define una_reg(r) (regs->regs[(r) >= 16 && (r) <= 18 ? (r)+19 : (r)]) 450#define una_reg(r) (_regs[(r) >= 16 && (r) <= 18 ? (r)+19 : (r)])
451 451
452 452
453asmlinkage void 453asmlinkage void
@@ -456,6 +456,7 @@ do_entUna(void * va, unsigned long opcode, unsigned long reg,
456{ 456{
457 long error, tmp1, tmp2, tmp3, tmp4; 457 long error, tmp1, tmp2, tmp3, tmp4;
458 unsigned long pc = regs->pc - 4; 458 unsigned long pc = regs->pc - 4;
459 unsigned long *_regs = regs->regs;
459 const struct exception_table_entry *fixup; 460 const struct exception_table_entry *fixup;
460 461
461 unaligned[0].count++; 462 unaligned[0].count++;
diff --git a/arch/alpha/kernel/vmlinux.lds.S b/arch/alpha/kernel/vmlinux.lds.S
index f13249be17c5..ef37fc1acaea 100644
--- a/arch/alpha/kernel/vmlinux.lds.S
+++ b/arch/alpha/kernel/vmlinux.lds.S
@@ -25,6 +25,13 @@ SECTIONS
25 } :kernel 25 } :kernel
26 _etext = .; /* End of text section */ 26 _etext = .; /* End of text section */
27 27
28 NOTES :kernel :note
29 .dummy : {
30 *(.dummy)
31 } :kernel
32
33 RODATA
34
28 /* Exception table */ 35 /* Exception table */
29 . = ALIGN(16); 36 . = ALIGN(16);
30 __ex_table : { 37 __ex_table : {
@@ -33,13 +40,6 @@ SECTIONS
33 __stop___ex_table = .; 40 __stop___ex_table = .;
34 } 41 }
35 42
36 NOTES :kernel :note
37 .dummy : {
38 *(.dummy)
39 } :kernel
40
41 RODATA
42
43 /* Will be freed after init */ 43 /* Will be freed after init */
44 . = ALIGN(PAGE_SIZE); 44 . = ALIGN(PAGE_SIZE);
45 /* Init code and data */ 45 /* Init code and data */
diff --git a/arch/arm/boot/compressed/head-xscale.S b/arch/arm/boot/compressed/head-xscale.S
index 67ea99ef6521..dd3fbd6766e1 100644
--- a/arch/arm/boot/compressed/head-xscale.S
+++ b/arch/arm/boot/compressed/head-xscale.S
@@ -33,10 +33,6 @@ __XScale_start:
33 bic r0, r0, #0x1000 @ clear Icache 33 bic r0, r0, #0x1000 @ clear Icache
34 mcr p15, 0, r0, c1, c0, 0 34 mcr p15, 0, r0, c1, c0, 0
35 35
36#ifdef CONFIG_ARCH_COTULLA_IDP
37 mov r7, #MACH_TYPE_COTULLA_IDP
38#endif
39
40#ifdef CONFIG_ARCH_IXP2000 36#ifdef CONFIG_ARCH_IXP2000
41 mov r1, #-1 37 mov r1, #-1
42 mov r0, #0xd6000000 38 mov r0, #0xd6000000
diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c
index 52fc6a883281..2744673314b4 100644
--- a/arch/arm/common/dmabounce.c
+++ b/arch/arm/common/dmabounce.c
@@ -650,7 +650,8 @@ EXPORT_SYMBOL(dma_map_sg);
650EXPORT_SYMBOL(dma_unmap_sg); 650EXPORT_SYMBOL(dma_unmap_sg);
651EXPORT_SYMBOL(dma_sync_single_for_cpu); 651EXPORT_SYMBOL(dma_sync_single_for_cpu);
652EXPORT_SYMBOL(dma_sync_single_for_device); 652EXPORT_SYMBOL(dma_sync_single_for_device);
653EXPORT_SYMBOL(dma_sync_sg); 653EXPORT_SYMBOL(dma_sync_sg_for_cpu);
654EXPORT_SYMBOL(dma_sync_sg_for_device);
654EXPORT_SYMBOL(dmabounce_register_dev); 655EXPORT_SYMBOL(dmabounce_register_dev);
655EXPORT_SYMBOL(dmabounce_unregister_dev); 656EXPORT_SYMBOL(dmabounce_unregister_dev);
656 657
diff --git a/arch/arm/mach-at91/at91x40.c b/arch/arm/mach-at91/at91x40.c
index 1de121fc55f4..f44647738ee4 100644
--- a/arch/arm/mach-at91/at91x40.c
+++ b/arch/arm/mach-at91/at91x40.c
@@ -16,16 +16,32 @@
16#include <asm/mach/arch.h> 16#include <asm/mach/arch.h>
17#include <asm/arch/at91x40.h> 17#include <asm/arch/at91x40.h>
18#include <asm/arch/at91_st.h> 18#include <asm/arch/at91_st.h>
19#include <asm/arch/timex.h>
19#include "generic.h" 20#include "generic.h"
20 21
21/* 22/*
22 * This is used in the gpio code, stub locally. 23 * Export the clock functions for the AT91X40. Some external code common
24 * to all AT91 family parts relys on this, like the gpio and serial support.
23 */ 25 */
24int clk_enable(struct clk *clk) 26int clk_enable(struct clk *clk)
25{ 27{
26 return 0; 28 return 0;
27} 29}
28 30
31void clk_disable(struct clk *clk)
32{
33}
34
35unsigned long clk_get_rate(struct clk *clk)
36{
37 return AT91X40_MASTER_CLOCK;
38}
39
40struct clk *clk_get(struct device *dev, const char *id)
41{
42 return NULL;
43}
44
29void __init at91x40_initialize(unsigned long main_clock) 45void __init at91x40_initialize(unsigned long main_clock)
30{ 46{
31 at91_extern_irq = (1 << AT91X40_ID_IRQ0) | (1 << AT91X40_ID_IRQ1) 47 at91_extern_irq = (1 << AT91X40_ID_IRQ0) | (1 << AT91X40_ID_IRQ1)
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c
index 92d79fb39311..62e653a3ea1a 100644
--- a/arch/arm/mach-integrator/impd1.c
+++ b/arch/arm/mach-integrator/impd1.c
@@ -369,7 +369,8 @@ static int impd1_probe(struct lm_device *dev)
369 369
370 lm_set_drvdata(dev, impd1); 370 lm_set_drvdata(dev, impd1);
371 371
372 printk("IM-PD1 found at 0x%08lx\n", dev->resource.start); 372 printk("IM-PD1 found at 0x%08lx\n",
373 (unsigned long)dev->resource.start);
373 374
374 for (i = 0; i < ARRAY_SIZE(impd1->vcos); i++) { 375 for (i = 0; i < ARRAY_SIZE(impd1->vcos); i++) {
375 impd1->vcos[i].owner = THIS_MODULE, 376 impd1->vcos[i].owner = THIS_MODULE,
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c
index d55fa4e9bb43..c07f497000ca 100644
--- a/arch/arm/mach-integrator/pci_v3.c
+++ b/arch/arm/mach-integrator/pci_v3.c
@@ -405,7 +405,6 @@ v3_pci_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
405 addr, fsr, pc, instr, __raw_readl(SC_LBFADDR), __raw_readl(SC_LBFCODE) & 255, 405 addr, fsr, pc, instr, __raw_readl(SC_LBFADDR), __raw_readl(SC_LBFCODE) & 255,
406 v3_readb(V3_LB_ISTAT)); 406 v3_readb(V3_LB_ISTAT));
407 printk(KERN_DEBUG "%s", buf); 407 printk(KERN_DEBUG "%s", buf);
408 printascii(buf);
409#endif 408#endif
410 409
411 v3_writeb(V3_LB_ISTAT, 0); 410 v3_writeb(V3_LB_ISTAT, 0);
@@ -447,6 +446,7 @@ static irqreturn_t v3_irq(int dummy, void *devid)
447 unsigned long pc = instruction_pointer(regs); 446 unsigned long pc = instruction_pointer(regs);
448 unsigned long instr = *(unsigned long *)pc; 447 unsigned long instr = *(unsigned long *)pc;
449 char buf[128]; 448 char buf[128];
449 extern void printascii(const char *);
450 450
451 sprintf(buf, "V3 int %d: pc=0x%08lx [%08lx] LBFADDR=%08x LBFCODE=%02x " 451 sprintf(buf, "V3 int %d: pc=0x%08lx [%08lx] LBFADDR=%08x LBFCODE=%02x "
452 "ISTAT=%02x\n", IRQ_AP_V3INT, pc, instr, 452 "ISTAT=%02x\n", IRQ_AP_V3INT, pc, instr,
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c
index a0b16a7e8a04..a4d20127a60e 100644
--- a/arch/arm/mach-omap1/board-palmte.c
+++ b/arch/arm/mach-omap1/board-palmte.c
@@ -24,7 +24,6 @@
24#include <linux/mtd/mtd.h> 24#include <linux/mtd/mtd.h>
25#include <linux/mtd/partitions.h> 25#include <linux/mtd/partitions.h>
26#include <linux/spi/spi.h> 26#include <linux/spi/spi.h>
27#include <linux/spi/tsc2102.h>
28#include <linux/interrupt.h> 27#include <linux/interrupt.h>
29#include <linux/apm-emulation.h> 28#include <linux/apm-emulation.h>
30 29
@@ -315,14 +314,6 @@ static void palmte_get_power_status(struct apm_power_info *info, int *battery)
315#define palmte_get_power_status NULL 314#define palmte_get_power_status NULL
316#endif 315#endif
317 316
318static struct tsc2102_config palmte_tsc2102_config = {
319 .use_internal = 0,
320 .monitor = TSC_BAT1 | TSC_AUX | TSC_TEMP,
321 .temp_at25c = { 2200, 2615 },
322 .apm_report = palmte_get_power_status,
323 .alsa_config = &palmte_alsa_config,
324};
325
326static struct omap_board_config_kernel palmte_config[] __initdata = { 317static struct omap_board_config_kernel palmte_config[] __initdata = {
327 { OMAP_TAG_USB, &palmte_usb_config }, 318 { OMAP_TAG_USB, &palmte_usb_config },
328 { OMAP_TAG_MMC, &palmte_mmc_config }, 319 { OMAP_TAG_MMC, &palmte_mmc_config },
@@ -336,7 +327,6 @@ static struct spi_board_info palmte_spi_info[] __initdata = {
336 .bus_num = 2, /* uWire (officially) */ 327 .bus_num = 2, /* uWire (officially) */
337 .chip_select = 0, /* As opposed to 3 */ 328 .chip_select = 0, /* As opposed to 3 */
338 .irq = OMAP_GPIO_IRQ(PALMTE_PINTDAV_GPIO), 329 .irq = OMAP_GPIO_IRQ(PALMTE_PINTDAV_GPIO),
339 .platform_data = &palmte_tsc2102_config,
340 .max_speed_hz = 8000000, 330 .max_speed_hz = 8000000,
341 }, 331 },
342}; 332};
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 02cede295e89..dbf68dc50ae2 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -42,7 +42,7 @@
42#define GPMC_STATUS 0x54 42#define GPMC_STATUS 0x54
43#define GPMC_PREFETCH_CONFIG1 0x1e0 43#define GPMC_PREFETCH_CONFIG1 0x1e0
44#define GPMC_PREFETCH_CONFIG2 0x1e4 44#define GPMC_PREFETCH_CONFIG2 0x1e4
45#define GPMC_PREFETCH_CONTROL 0x1e8 45#define GPMC_PREFETCH_CONTROL 0x1ec
46#define GPMC_PREFETCH_STATUS 0x1f0 46#define GPMC_PREFETCH_STATUS 0x1f0
47#define GPMC_ECC_CONFIG 0x1f4 47#define GPMC_ECC_CONFIG 0x1f4
48#define GPMC_ECC_CONTROL 0x1f8 48#define GPMC_ECC_CONTROL 0x1f8
diff --git a/arch/arm/mach-pxa/cm-x270.c b/arch/arm/mach-pxa/cm-x270.c
index 6d4416a4f378..f5851d1adc25 100644
--- a/arch/arm/mach-pxa/cm-x270.c
+++ b/arch/arm/mach-pxa/cm-x270.c
@@ -59,7 +59,7 @@ static struct resource cmx270_dm9k_resource[] = {
59 [2] = { 59 [2] = {
60 .start = CMX270_ETHIRQ, 60 .start = CMX270_ETHIRQ,
61 .end = CMX270_ETHIRQ, 61 .end = CMX270_ETHIRQ,
62 .flags = IORESOURCE_IRQ, 62 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
63 } 63 }
64}; 64};
65 65
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c
index edc4f07a230d..9c57700ee5c2 100644
--- a/arch/arm/mach-pxa/em-x270.c
+++ b/arch/arm/mach-pxa/em-x270.c
@@ -50,7 +50,7 @@ static struct resource em_x270_dm9k_resource[] = {
50 [2] = { 50 [2] = {
51 .start = EM_X270_ETHIRQ, 51 .start = EM_X270_ETHIRQ,
52 .end = EM_X270_ETHIRQ, 52 .end = EM_X270_ETHIRQ,
53 .flags = IORESOURCE_IRQ, 53 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
54 } 54 }
55}; 55};
56 56
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index dace3820f1ee..e7d0fcd9b43f 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -38,7 +38,6 @@
38#include <asm/arch/pxa-regs.h> 38#include <asm/arch/pxa-regs.h>
39#include <asm/arch/pxa2xx-regs.h> 39#include <asm/arch/pxa2xx-regs.h>
40#include <asm/arch/pxa2xx-gpio.h> 40#include <asm/arch/pxa2xx-gpio.h>
41#include <asm/arch/pxa27x-udc.h>
42#include <asm/arch/irda.h> 41#include <asm/arch/irda.h>
43#include <asm/arch/mmc.h> 42#include <asm/arch/mmc.h>
44#include <asm/arch/ohci.h> 43#include <asm/arch/ohci.h>
diff --git a/arch/arm/mach-pxa/ssp.c b/arch/arm/mach-pxa/ssp.c
index 00af7f2fed66..0bb31982fb6f 100644
--- a/arch/arm/mach-pxa/ssp.c
+++ b/arch/arm/mach-pxa/ssp.c
@@ -330,7 +330,7 @@ struct ssp_device *ssp_request(int port, const char *label)
330 330
331 mutex_unlock(&ssp_lock); 331 mutex_unlock(&ssp_lock);
332 332
333 if (ssp->port_id != port) 333 if (&ssp->node == &ssp_list)
334 return NULL; 334 return NULL;
335 335
336 return ssp; 336 return ssp;
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index c2cbd66db814..ab4a9f579913 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -467,8 +467,8 @@ static struct platform_device *devices[] __initdata = {
467 467
468static void tosa_poweroff(void) 468static void tosa_poweroff(void)
469{ 469{
470 pxa_gpio_mode(TOSA_GPIO_ON_RESET | GPIO_OUT); 470 gpio_direction_output(TOSA_GPIO_ON_RESET, 0);
471 GPSR(TOSA_GPIO_ON_RESET) = GPIO_bit(TOSA_GPIO_ON_RESET); 471 gpio_set_value(TOSA_GPIO_ON_RESET, 1);
472 472
473 mdelay(1000); 473 mdelay(1000);
474 arm_machine_restart('h'); 474 arm_machine_restart('h');
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c
index 3e57428affee..8e813ed57519 100644
--- a/arch/arm/mach-realview/platsmp.c
+++ b/arch/arm/mach-realview/platsmp.c
@@ -74,6 +74,8 @@ static DEFINE_SPINLOCK(boot_lock);
74 74
75void __cpuinit platform_secondary_init(unsigned int cpu) 75void __cpuinit platform_secondary_init(unsigned int cpu)
76{ 76{
77 trace_hardirqs_off();
78
77 /* 79 /*
78 * the primary core may have used a "cross call" soft interrupt 80 * the primary core may have used a "cross call" soft interrupt
79 * to get this processor out of WFI in the BootMonitor - make 81 * to get this processor out of WFI in the BootMonitor - make
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c
index 661a2358ac22..27f63d5d3a7b 100644
--- a/arch/arm/mach-s3c2410/mach-bast.c
+++ b/arch/arm/mach-s3c2410/mach-bast.c
@@ -374,7 +374,7 @@ static struct resource bast_dm9k_resource[] = {
374 [2] = { 374 [2] = {
375 .start = IRQ_DM9000, 375 .start = IRQ_DM9000,
376 .end = IRQ_DM9000, 376 .end = IRQ_DM9000,
377 .flags = IORESOURCE_IRQ, 377 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH,
378 } 378 }
379 379
380}; 380};
diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c
index c56423373ff3..4c4b5c4207c4 100644
--- a/arch/arm/mach-s3c2410/mach-vr1000.c
+++ b/arch/arm/mach-s3c2410/mach-vr1000.c
@@ -263,7 +263,7 @@ static struct resource vr1000_dm9k0_resource[] = {
263 [2] = { 263 [2] = {
264 .start = IRQ_VR1000_DM9000A, 264 .start = IRQ_VR1000_DM9000A,
265 .end = IRQ_VR1000_DM9000A, 265 .end = IRQ_VR1000_DM9000A,
266 .flags = IORESOURCE_IRQ 266 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH,
267 } 267 }
268 268
269}; 269};
@@ -282,7 +282,7 @@ static struct resource vr1000_dm9k1_resource[] = {
282 [2] = { 282 [2] = {
283 .start = IRQ_VR1000_DM9000N, 283 .start = IRQ_VR1000_DM9000N,
284 .end = IRQ_VR1000_DM9000N, 284 .end = IRQ_VR1000_DM9000N,
285 .flags = IORESOURCE_IRQ 285 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH,
286 } 286 }
287}; 287};
288 288
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
index 6496eb645cee..2f772a3965c4 100644
--- a/arch/arm/mach-sa1100/collie.c
+++ b/arch/arm/mach-sa1100/collie.c
@@ -225,26 +225,28 @@ static void __init collie_init(void)
225 int ret = 0; 225 int ret = 0;
226 226
227 /* cpu initialize */ 227 /* cpu initialize */
228 GAFR = ( GPIO_SSP_TXD | \ 228 GAFR = GPIO_SSP_TXD | GPIO_SSP_SCLK | GPIO_SSP_SFRM | GPIO_SSP_CLK |
229 GPIO_SSP_SCLK | GPIO_SSP_SFRM | GPIO_SSP_CLK | GPIO_TIC_ACK | \ 229 GPIO_MCP_CLK | GPIO_32_768kHz;
230 GPIO_32_768kHz ); 230
231 231 GPDR = GPIO_LDD8 | GPIO_LDD9 | GPIO_LDD10 | GPIO_LDD11 | GPIO_LDD12 |
232 GPDR = ( GPIO_LDD8 | GPIO_LDD9 | GPIO_LDD10 | GPIO_LDD11 | GPIO_LDD12 | \ 232 GPIO_LDD13 | GPIO_LDD14 | GPIO_LDD15 | GPIO_SSP_TXD |
233 GPIO_LDD13 | GPIO_LDD14 | GPIO_LDD15 | GPIO_SSP_TXD | \ 233 GPIO_SSP_SCLK | GPIO_SSP_SFRM | GPIO_SDLC_SCLK |
234 GPIO_SSP_SCLK | GPIO_SSP_SFRM | GPIO_SDLC_SCLK | \ 234 COLLIE_GPIO_UCB1x00_RESET | COLLIE_GPIO_nMIC_ON |
235 GPIO_SDLC_AAF | GPIO_UART_SCLK1 | GPIO_32_768kHz ); 235 COLLIE_GPIO_nREMOCON_ON | GPIO_32_768kHz;
236 GPLR = GPIO_GPIO18; 236
237 237 PPDR = PPC_LDD0 | PPC_LDD1 | PPC_LDD2 | PPC_LDD3 | PPC_LDD4 | PPC_LDD5 |
238 // PPC pin setting 238 PPC_LDD6 | PPC_LDD7 | PPC_L_PCLK | PPC_L_LCLK | PPC_L_FCLK | PPC_L_BIAS |
239 PPDR = ( PPC_LDD0 | PPC_LDD1 | PPC_LDD2 | PPC_LDD3 | PPC_LDD4 | PPC_LDD5 | \ 239 PPC_TXD1 | PPC_TXD2 | PPC_TXD3 | PPC_TXD4 | PPC_SCLK | PPC_SFRM;
240 PPC_LDD6 | PPC_LDD7 | PPC_L_PCLK | PPC_L_LCLK | PPC_L_FCLK | PPC_L_BIAS | \ 240
241 PPC_TXD1 | PPC_TXD2 | PPC_RXD2 | PPC_TXD3 | PPC_TXD4 | PPC_SCLK | PPC_SFRM ); 241 PWER = COLLIE_GPIO_AC_IN | COLLIE_GPIO_CO | COLLIE_GPIO_ON_KEY |
242 242 COLLIE_GPIO_WAKEUP | COLLIE_GPIO_nREMOCON_INT | PWER_RTC;
243 PSDR = ( PPC_RXD1 | PPC_RXD2 | PPC_RXD3 | PPC_RXD4 ); 243
244 244 PGSR = COLLIE_GPIO_nREMOCON_ON;
245 GAFR |= GPIO_32_768kHz; 245
246 GPDR |= GPIO_32_768kHz; 246 PSDR = PPC_RXD1 | PPC_RXD2 | PPC_RXD3 | PPC_RXD4;
247 TUCR = TUCR_32_768kHz; 247
248 PCFR = PCFR_OPDE;
249
248 250
249 platform_scoop_config = &collie_pcmcia_config; 251 platform_scoop_config = &collie_pcmcia_config;
250 252
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index 2946c193a7d6..2db5580048d8 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -21,6 +21,7 @@
21#include <linux/clk.h> 21#include <linux/clk.h>
22#include <linux/mutex.h> 22#include <linux/mutex.h>
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24#include <linux/cpufreq.h>
24 25
25#include <asm/io.h> 26#include <asm/io.h>
26 27
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index c00eda588cd8..39c637b0ffea 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -501,8 +501,6 @@ static inline void omap_enable_channel_irq(int lch)
501 501
502 /* Enable some nice interrupts. */ 502 /* Enable some nice interrupts. */
503 OMAP_DMA_CICR_REG(lch) = dma_chan[lch].enabled_irqs; 503 OMAP_DMA_CICR_REG(lch) = dma_chan[lch].enabled_irqs;
504
505 dma_chan[lch].flags |= OMAP_DMA_ACTIVE;
506} 504}
507 505
508static void omap_disable_channel_irq(int lch) 506static void omap_disable_channel_irq(int lch)
diff --git a/arch/arm/plat-s3c24xx/s3c244x.c b/arch/arm/plat-s3c24xx/s3c244x.c
index f197bb3a2366..2f01af5f64c4 100644
--- a/arch/arm/plat-s3c24xx/s3c244x.c
+++ b/arch/arm/plat-s3c24xx/s3c244x.c
@@ -65,6 +65,7 @@ void __init s3c244x_map_io(struct map_desc *mach_desc, int size)
65 65
66 /* rename any peripherals used differing from the s3c2410 */ 66 /* rename any peripherals used differing from the s3c2410 */
67 67
68 s3c_device_sdi.name = "s3c2440-sdi";
68 s3c_device_i2c.name = "s3c2440-i2c"; 69 s3c_device_i2c.name = "s3c2440-i2c";
69 s3c_device_nand.name = "s3c2440-nand"; 70 s3c_device_nand.name = "s3c2440-nand";
70 s3c_device_usbgadget.name = "s3c2440-usbgadget"; 71 s3c_device_usbgadget.name = "s3c2440-usbgadget";
diff --git a/arch/avr32/configs/atngw100_defconfig b/arch/avr32/configs/atngw100_defconfig
index 06046074d68b..119edb839ac3 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.24-rc7 3# Linux kernel version: 2.6.26-rc3
4# Wed Jan 9 23:20:41 2008 4# Mon May 26 13:30:59 2008
5# 5#
6CONFIG_AVR32=y 6CONFIG_AVR32=y
7CONFIG_GENERIC_GPIO=y 7CONFIG_GENERIC_GPIO=y
@@ -13,10 +13,10 @@ CONFIG_HARDIRQS_SW_RESEND=y
13CONFIG_GENERIC_IRQ_PROBE=y 13CONFIG_GENERIC_IRQ_PROBE=y
14CONFIG_RWSEM_GENERIC_SPINLOCK=y 14CONFIG_RWSEM_GENERIC_SPINLOCK=y
15CONFIG_GENERIC_TIME=y 15CONFIG_GENERIC_TIME=y
16CONFIG_GENERIC_CLOCKEVENTS=y
16# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 17# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
17# CONFIG_ARCH_HAS_ILOG2_U32 is not set 18# CONFIG_ARCH_HAS_ILOG2_U32 is not set
18# CONFIG_ARCH_HAS_ILOG2_U64 is not set 19# CONFIG_ARCH_HAS_ILOG2_U64 is not set
19CONFIG_ARCH_SUPPORTS_OPROFILE=y
20CONFIG_GENERIC_HWEIGHT=y 20CONFIG_GENERIC_HWEIGHT=y
21CONFIG_GENERIC_CALIBRATE_DELAY=y 21CONFIG_GENERIC_CALIBRATE_DELAY=y
22CONFIG_GENERIC_BUG=y 22CONFIG_GENERIC_BUG=y
@@ -37,17 +37,15 @@ CONFIG_POSIX_MQUEUE=y
37CONFIG_BSD_PROCESS_ACCT=y 37CONFIG_BSD_PROCESS_ACCT=y
38CONFIG_BSD_PROCESS_ACCT_V3=y 38CONFIG_BSD_PROCESS_ACCT_V3=y
39# CONFIG_TASKSTATS is not set 39# CONFIG_TASKSTATS is not set
40# CONFIG_USER_NS is not set
41# CONFIG_PID_NS is not set
42# CONFIG_AUDIT is not set 40# CONFIG_AUDIT is not set
43# CONFIG_IKCONFIG is not set 41# CONFIG_IKCONFIG is not set
44CONFIG_LOG_BUF_SHIFT=14 42CONFIG_LOG_BUF_SHIFT=14
45# CONFIG_CGROUPS is not set 43# CONFIG_CGROUPS is not set
46CONFIG_FAIR_GROUP_SCHED=y 44# CONFIG_GROUP_SCHED is not set
47CONFIG_FAIR_USER_SCHED=y
48# CONFIG_FAIR_CGROUP_SCHED is not set
49CONFIG_SYSFS_DEPRECATED=y 45CONFIG_SYSFS_DEPRECATED=y
46CONFIG_SYSFS_DEPRECATED_V2=y
50# CONFIG_RELAY is not set 47# CONFIG_RELAY is not set
48# CONFIG_NAMESPACES is not set
51CONFIG_BLK_DEV_INITRD=y 49CONFIG_BLK_DEV_INITRD=y
52CONFIG_INITRAMFS_SOURCE="" 50CONFIG_INITRAMFS_SOURCE=""
53CONFIG_CC_OPTIMIZE_FOR_SIZE=y 51CONFIG_CC_OPTIMIZE_FOR_SIZE=y
@@ -61,11 +59,13 @@ CONFIG_HOTPLUG=y
61CONFIG_PRINTK=y 59CONFIG_PRINTK=y
62CONFIG_BUG=y 60CONFIG_BUG=y
63CONFIG_ELF_CORE=y 61CONFIG_ELF_CORE=y
62# CONFIG_COMPAT_BRK is not set
64# CONFIG_BASE_FULL is not set 63# CONFIG_BASE_FULL is not set
65CONFIG_FUTEX=y 64CONFIG_FUTEX=y
66CONFIG_ANON_INODES=y 65CONFIG_ANON_INODES=y
67CONFIG_EPOLL=y 66CONFIG_EPOLL=y
68CONFIG_SIGNALFD=y 67CONFIG_SIGNALFD=y
68CONFIG_TIMERFD=y
69CONFIG_EVENTFD=y 69CONFIG_EVENTFD=y
70CONFIG_SHMEM=y 70CONFIG_SHMEM=y
71CONFIG_VM_EVENT_COUNTERS=y 71CONFIG_VM_EVENT_COUNTERS=y
@@ -73,11 +73,21 @@ CONFIG_SLUB_DEBUG=y
73# CONFIG_SLAB is not set 73# CONFIG_SLAB is not set
74CONFIG_SLUB=y 74CONFIG_SLUB=y
75# CONFIG_SLOB is not set 75# CONFIG_SLOB is not set
76CONFIG_PROFILING=y
77# CONFIG_MARKERS is not set
78CONFIG_OPROFILE=m
79CONFIG_HAVE_OPROFILE=y
80CONFIG_KPROBES=y
81CONFIG_HAVE_KPROBES=y
82# CONFIG_HAVE_KRETPROBES is not set
83# CONFIG_HAVE_DMA_ATTRS is not set
84CONFIG_PROC_PAGE_MONITOR=y
76CONFIG_SLABINFO=y 85CONFIG_SLABINFO=y
77CONFIG_RT_MUTEXES=y 86CONFIG_RT_MUTEXES=y
78# CONFIG_TINY_SHMEM is not set 87# CONFIG_TINY_SHMEM is not set
79CONFIG_BASE_SMALL=1 88CONFIG_BASE_SMALL=1
80CONFIG_MODULES=y 89CONFIG_MODULES=y
90# CONFIG_MODULE_FORCE_LOAD is not set
81CONFIG_MODULE_UNLOAD=y 91CONFIG_MODULE_UNLOAD=y
82CONFIG_MODULE_FORCE_UNLOAD=y 92CONFIG_MODULE_FORCE_UNLOAD=y
83# CONFIG_MODVERSIONS is not set 93# CONFIG_MODVERSIONS is not set
@@ -101,10 +111,15 @@ CONFIG_IOSCHED_CFQ=y
101CONFIG_DEFAULT_CFQ=y 111CONFIG_DEFAULT_CFQ=y
102# CONFIG_DEFAULT_NOOP is not set 112# CONFIG_DEFAULT_NOOP is not set
103CONFIG_DEFAULT_IOSCHED="cfq" 113CONFIG_DEFAULT_IOSCHED="cfq"
114CONFIG_CLASSIC_RCU=y
104 115
105# 116#
106# System Type and features 117# System Type and features
107# 118#
119CONFIG_TICK_ONESHOT=y
120CONFIG_NO_HZ=y
121CONFIG_HIGH_RES_TIMERS=y
122CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
108CONFIG_SUBARCH_AVR32B=y 123CONFIG_SUBARCH_AVR32B=y
109CONFIG_MMU=y 124CONFIG_MMU=y
110CONFIG_PERFORMANCE_COUNTERS=y 125CONFIG_PERFORMANCE_COUNTERS=y
@@ -141,16 +156,19 @@ CONFIG_FLATMEM=y
141CONFIG_FLAT_NODE_MEM_MAP=y 156CONFIG_FLAT_NODE_MEM_MAP=y
142# CONFIG_SPARSEMEM_STATIC is not set 157# CONFIG_SPARSEMEM_STATIC is not set
143# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 158# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
159CONFIG_PAGEFLAGS_EXTENDED=y
144CONFIG_SPLIT_PTLOCK_CPUS=4 160CONFIG_SPLIT_PTLOCK_CPUS=4
145# CONFIG_RESOURCES_64BIT is not set 161# CONFIG_RESOURCES_64BIT is not set
146CONFIG_ZONE_DMA_FLAG=0 162CONFIG_ZONE_DMA_FLAG=0
147CONFIG_VIRT_TO_BUS=y 163CONFIG_VIRT_TO_BUS=y
148# CONFIG_OWNERSHIP_TRACE is not set 164# CONFIG_OWNERSHIP_TRACE is not set
165CONFIG_NMI_DEBUGGING=y
149# CONFIG_HZ_100 is not set 166# CONFIG_HZ_100 is not set
150CONFIG_HZ_250=y 167CONFIG_HZ_250=y
151# CONFIG_HZ_300 is not set 168# CONFIG_HZ_300 is not set
152# CONFIG_HZ_1000 is not set 169# CONFIG_HZ_1000 is not set
153CONFIG_HZ=250 170CONFIG_HZ=250
171# CONFIG_SCHED_HRTICK is not set
154CONFIG_CMDLINE="" 172CONFIG_CMDLINE=""
155 173
156# 174#
@@ -164,9 +182,10 @@ CONFIG_CPU_FREQ=y
164CONFIG_CPU_FREQ_TABLE=y 182CONFIG_CPU_FREQ_TABLE=y
165# CONFIG_CPU_FREQ_DEBUG is not set 183# CONFIG_CPU_FREQ_DEBUG is not set
166# CONFIG_CPU_FREQ_STAT is not set 184# CONFIG_CPU_FREQ_STAT is not set
167CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y 185# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
186# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
168# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set 187# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
169# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set 188CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
170# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set 189# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
171CONFIG_CPU_FREQ_GOV_PERFORMANCE=y 190CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
172# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set 191# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
@@ -202,6 +221,7 @@ CONFIG_XFRM=y
202CONFIG_XFRM_USER=y 221CONFIG_XFRM_USER=y
203# CONFIG_XFRM_SUB_POLICY is not set 222# CONFIG_XFRM_SUB_POLICY is not set
204# CONFIG_XFRM_MIGRATE is not set 223# CONFIG_XFRM_MIGRATE is not set
224# CONFIG_XFRM_STATISTICS is not set
205CONFIG_NET_KEY=y 225CONFIG_NET_KEY=y
206# CONFIG_NET_KEY_MIGRATE is not set 226# CONFIG_NET_KEY_MIGRATE is not set
207CONFIG_INET=y 227CONFIG_INET=y
@@ -255,87 +275,40 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=y
255CONFIG_INET6_XFRM_MODE_BEET=y 275CONFIG_INET6_XFRM_MODE_BEET=y
256# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set 276# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
257CONFIG_IPV6_SIT=y 277CONFIG_IPV6_SIT=y
278CONFIG_IPV6_NDISC_NODETYPE=y
258# CONFIG_IPV6_TUNNEL is not set 279# CONFIG_IPV6_TUNNEL is not set
259# CONFIG_IPV6_MULTIPLE_TABLES is not set 280# CONFIG_IPV6_MULTIPLE_TABLES is not set
281# CONFIG_IPV6_MROUTE is not set
260# CONFIG_NETWORK_SECMARK is not set 282# CONFIG_NETWORK_SECMARK is not set
261CONFIG_NETFILTER=y 283CONFIG_NETFILTER=y
262# CONFIG_NETFILTER_DEBUG is not set 284# CONFIG_NETFILTER_DEBUG is not set
263CONFIG_BRIDGE_NETFILTER=y 285# CONFIG_NETFILTER_ADVANCED is not set
264 286
265# 287#
266# Core Netfilter Configuration 288# Core Netfilter Configuration
267# 289#
268# CONFIG_NETFILTER_NETLINK is not set 290CONFIG_NETFILTER_NETLINK=m
269CONFIG_NF_CONNTRACK_ENABLED=m 291CONFIG_NETFILTER_NETLINK_LOG=m
270CONFIG_NF_CONNTRACK=m 292CONFIG_NF_CONNTRACK=m
271CONFIG_NF_CT_ACCT=y
272CONFIG_NF_CONNTRACK_MARK=y
273# CONFIG_NF_CONNTRACK_EVENTS is not set
274CONFIG_NF_CT_PROTO_GRE=m
275# CONFIG_NF_CT_PROTO_SCTP is not set
276# CONFIG_NF_CT_PROTO_UDPLITE is not set
277CONFIG_NF_CONNTRACK_AMANDA=m
278CONFIG_NF_CONNTRACK_FTP=m 293CONFIG_NF_CONNTRACK_FTP=m
279CONFIG_NF_CONNTRACK_H323=m
280CONFIG_NF_CONNTRACK_IRC=m 294CONFIG_NF_CONNTRACK_IRC=m
281CONFIG_NF_CONNTRACK_NETBIOS_NS=m
282CONFIG_NF_CONNTRACK_PPTP=m
283CONFIG_NF_CONNTRACK_SANE=m
284CONFIG_NF_CONNTRACK_SIP=m 295CONFIG_NF_CONNTRACK_SIP=m
285CONFIG_NF_CONNTRACK_TFTP=m 296CONFIG_NF_CT_NETLINK=m
286CONFIG_NETFILTER_XTABLES=y 297CONFIG_NETFILTER_XTABLES=y
287CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
288# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set
289# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
290CONFIG_NETFILTER_XT_TARGET_MARK=m 298CONFIG_NETFILTER_XT_TARGET_MARK=m
291CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
292CONFIG_NETFILTER_XT_TARGET_NFLOG=m 299CONFIG_NETFILTER_XT_TARGET_NFLOG=m
293# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set
294# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
295CONFIG_NETFILTER_XT_TARGET_TCPMSS=m 300CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
296CONFIG_NETFILTER_XT_MATCH_COMMENT=m
297CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
298# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set
299CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
300CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m 301CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
301# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
302# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
303CONFIG_NETFILTER_XT_MATCH_ESP=m
304CONFIG_NETFILTER_XT_MATCH_HELPER=m
305CONFIG_NETFILTER_XT_MATCH_LENGTH=m
306CONFIG_NETFILTER_XT_MATCH_LIMIT=m
307CONFIG_NETFILTER_XT_MATCH_MAC=m
308CONFIG_NETFILTER_XT_MATCH_MARK=m 302CONFIG_NETFILTER_XT_MATCH_MARK=m
309CONFIG_NETFILTER_XT_MATCH_POLICY=m 303CONFIG_NETFILTER_XT_MATCH_POLICY=m
310CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
311# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set
312CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
313CONFIG_NETFILTER_XT_MATCH_QUOTA=m
314CONFIG_NETFILTER_XT_MATCH_REALM=m
315# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
316CONFIG_NETFILTER_XT_MATCH_STATE=m 304CONFIG_NETFILTER_XT_MATCH_STATE=m
317CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
318CONFIG_NETFILTER_XT_MATCH_STRING=m
319CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
320# CONFIG_NETFILTER_XT_MATCH_TIME is not set
321# CONFIG_NETFILTER_XT_MATCH_U32 is not set
322CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
323 305
324# 306#
325# IP: Netfilter Configuration 307# IP: Netfilter Configuration
326# 308#
327CONFIG_NF_CONNTRACK_IPV4=m 309CONFIG_NF_CONNTRACK_IPV4=m
328CONFIG_NF_CONNTRACK_PROC_COMPAT=y 310CONFIG_NF_CONNTRACK_PROC_COMPAT=y
329# CONFIG_IP_NF_QUEUE is not set
330CONFIG_IP_NF_IPTABLES=m 311CONFIG_IP_NF_IPTABLES=m
331CONFIG_IP_NF_MATCH_IPRANGE=m
332CONFIG_IP_NF_MATCH_TOS=m
333CONFIG_IP_NF_MATCH_RECENT=m
334CONFIG_IP_NF_MATCH_ECN=m
335CONFIG_IP_NF_MATCH_AH=m
336CONFIG_IP_NF_MATCH_TTL=m
337CONFIG_IP_NF_MATCH_OWNER=m
338CONFIG_IP_NF_MATCH_ADDRTYPE=m
339CONFIG_IP_NF_FILTER=m 312CONFIG_IP_NF_FILTER=m
340CONFIG_IP_NF_TARGET_REJECT=m 313CONFIG_IP_NF_TARGET_REJECT=m
341CONFIG_IP_NF_TARGET_LOG=m 314CONFIG_IP_NF_TARGET_LOG=m
@@ -343,54 +316,25 @@ CONFIG_IP_NF_TARGET_LOG=m
343CONFIG_NF_NAT=m 316CONFIG_NF_NAT=m
344CONFIG_NF_NAT_NEEDED=y 317CONFIG_NF_NAT_NEEDED=y
345CONFIG_IP_NF_TARGET_MASQUERADE=m 318CONFIG_IP_NF_TARGET_MASQUERADE=m
346CONFIG_IP_NF_TARGET_REDIRECT=m
347CONFIG_IP_NF_TARGET_NETMAP=m
348CONFIG_IP_NF_TARGET_SAME=m
349CONFIG_NF_NAT_SNMP_BASIC=m
350CONFIG_NF_NAT_PROTO_GRE=m
351CONFIG_NF_NAT_FTP=m 319CONFIG_NF_NAT_FTP=m
352CONFIG_NF_NAT_IRC=m 320CONFIG_NF_NAT_IRC=m
353CONFIG_NF_NAT_TFTP=m 321# CONFIG_NF_NAT_TFTP is not set
354CONFIG_NF_NAT_AMANDA=m 322# CONFIG_NF_NAT_AMANDA is not set
355CONFIG_NF_NAT_PPTP=m 323# CONFIG_NF_NAT_PPTP is not set
356CONFIG_NF_NAT_H323=m 324# CONFIG_NF_NAT_H323 is not set
357CONFIG_NF_NAT_SIP=m 325CONFIG_NF_NAT_SIP=m
358CONFIG_IP_NF_MANGLE=m 326CONFIG_IP_NF_MANGLE=m
359CONFIG_IP_NF_TARGET_TOS=m
360CONFIG_IP_NF_TARGET_ECN=m
361CONFIG_IP_NF_TARGET_TTL=m
362CONFIG_IP_NF_TARGET_CLUSTERIP=m
363CONFIG_IP_NF_RAW=m
364CONFIG_IP_NF_ARPTABLES=m
365CONFIG_IP_NF_ARPFILTER=m
366CONFIG_IP_NF_ARP_MANGLE=m
367 327
368# 328#
369# IPv6: Netfilter Configuration (EXPERIMENTAL) 329# IPv6: Netfilter Configuration
370# 330#
371CONFIG_NF_CONNTRACK_IPV6=m 331CONFIG_NF_CONNTRACK_IPV6=m
372CONFIG_IP6_NF_QUEUE=m
373CONFIG_IP6_NF_IPTABLES=m 332CONFIG_IP6_NF_IPTABLES=m
374CONFIG_IP6_NF_MATCH_RT=m
375CONFIG_IP6_NF_MATCH_OPTS=m
376CONFIG_IP6_NF_MATCH_FRAG=m
377CONFIG_IP6_NF_MATCH_HL=m
378CONFIG_IP6_NF_MATCH_OWNER=m
379CONFIG_IP6_NF_MATCH_IPV6HEADER=m 333CONFIG_IP6_NF_MATCH_IPV6HEADER=m
380CONFIG_IP6_NF_MATCH_AH=m
381CONFIG_IP6_NF_MATCH_MH=m
382CONFIG_IP6_NF_MATCH_EUI64=m
383CONFIG_IP6_NF_FILTER=m 334CONFIG_IP6_NF_FILTER=m
384CONFIG_IP6_NF_TARGET_LOG=m 335CONFIG_IP6_NF_TARGET_LOG=m
385CONFIG_IP6_NF_TARGET_REJECT=m 336CONFIG_IP6_NF_TARGET_REJECT=m
386CONFIG_IP6_NF_MANGLE=m 337CONFIG_IP6_NF_MANGLE=m
387CONFIG_IP6_NF_TARGET_HL=m
388CONFIG_IP6_NF_RAW=m
389
390#
391# Bridge: Netfilter Configuration
392#
393# CONFIG_BRIDGE_NF_EBTABLES is not set
394# CONFIG_IP_DCCP is not set 338# CONFIG_IP_DCCP is not set
395# CONFIG_IP_SCTP is not set 339# CONFIG_IP_SCTP is not set
396# CONFIG_TIPC is not set 340# CONFIG_TIPC is not set
@@ -407,7 +351,6 @@ CONFIG_LLC=m
407# CONFIG_ECONET is not set 351# CONFIG_ECONET is not set
408# CONFIG_WAN_ROUTER is not set 352# CONFIG_WAN_ROUTER is not set
409# CONFIG_NET_SCHED is not set 353# CONFIG_NET_SCHED is not set
410CONFIG_NET_CLS_ROUTE=y
411 354
412# 355#
413# Network testing 356# Network testing
@@ -415,6 +358,7 @@ CONFIG_NET_CLS_ROUTE=y
415# CONFIG_NET_PKTGEN is not set 358# CONFIG_NET_PKTGEN is not set
416# CONFIG_NET_TCPPROBE is not set 359# CONFIG_NET_TCPPROBE is not set
417# CONFIG_HAMRADIO is not set 360# CONFIG_HAMRADIO is not set
361# CONFIG_CAN 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_AF_RXRPC is not set 364# CONFIG_AF_RXRPC is not set
@@ -450,6 +394,7 @@ CONFIG_MTD=y
450CONFIG_MTD_PARTITIONS=y 394CONFIG_MTD_PARTITIONS=y
451# CONFIG_MTD_REDBOOT_PARTS is not set 395# CONFIG_MTD_REDBOOT_PARTS is not set
452CONFIG_MTD_CMDLINE_PARTS=y 396CONFIG_MTD_CMDLINE_PARTS=y
397# CONFIG_MTD_AR7_PARTS is not set
453 398
454# 399#
455# User Modules And Translation Layers 400# User Modules And Translation Layers
@@ -531,11 +476,18 @@ CONFIG_BLK_DEV_NBD=m
531CONFIG_BLK_DEV_RAM=m 476CONFIG_BLK_DEV_RAM=m
532CONFIG_BLK_DEV_RAM_COUNT=16 477CONFIG_BLK_DEV_RAM_COUNT=16
533CONFIG_BLK_DEV_RAM_SIZE=4096 478CONFIG_BLK_DEV_RAM_SIZE=4096
534CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 479# CONFIG_BLK_DEV_XIP is not set
535# CONFIG_CDROM_PKTCDVD is not set 480# CONFIG_CDROM_PKTCDVD is not set
536# CONFIG_ATA_OVER_ETH is not set 481# CONFIG_ATA_OVER_ETH is not set
537# CONFIG_MISC_DEVICES is not set 482CONFIG_MISC_DEVICES=y
538# CONFIG_IDE is not set 483# CONFIG_ATMEL_PWM is not set
484CONFIG_ATMEL_TCLIB=y
485CONFIG_ATMEL_TCB_CLKSRC=y
486CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0
487# CONFIG_EEPROM_93CX6 is not set
488# CONFIG_ATMEL_SSC is not set
489# CONFIG_ENCLOSURE_SERVICES is not set
490# CONFIG_HAVE_IDE is not set
539 491
540# 492#
541# SCSI device support 493# SCSI device support
@@ -568,11 +520,13 @@ CONFIG_PHYLIB=y
568# CONFIG_SMSC_PHY is not set 520# CONFIG_SMSC_PHY is not set
569# CONFIG_BROADCOM_PHY is not set 521# CONFIG_BROADCOM_PHY is not set
570# CONFIG_ICPLUS_PHY is not set 522# CONFIG_ICPLUS_PHY is not set
523# CONFIG_REALTEK_PHY is not set
571# CONFIG_FIXED_PHY is not set 524# CONFIG_FIXED_PHY is not set
572# CONFIG_MDIO_BITBANG is not set 525# CONFIG_MDIO_BITBANG is not set
573CONFIG_NET_ETHERNET=y 526CONFIG_NET_ETHERNET=y
574# CONFIG_MII is not set 527# CONFIG_MII is not set
575CONFIG_MACB=y 528CONFIG_MACB=y
529# CONFIG_ENC28J60 is not set
576# CONFIG_IBM_NEW_EMAC_ZMII is not set 530# CONFIG_IBM_NEW_EMAC_ZMII is not set
577# CONFIG_IBM_NEW_EMAC_RGMII is not set 531# CONFIG_IBM_NEW_EMAC_RGMII is not set
578# CONFIG_IBM_NEW_EMAC_TAH is not set 532# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -586,6 +540,7 @@ CONFIG_MACB=y
586# 540#
587# CONFIG_WLAN_PRE80211 is not set 541# CONFIG_WLAN_PRE80211 is not set
588# CONFIG_WLAN_80211 is not set 542# CONFIG_WLAN_80211 is not set
543# CONFIG_IWLWIFI_LEDS is not set
589# CONFIG_WAN is not set 544# CONFIG_WAN is not set
590CONFIG_PPP=m 545CONFIG_PPP=m
591# CONFIG_PPP_MULTILINK is not set 546# CONFIG_PPP_MULTILINK is not set
@@ -599,7 +554,6 @@ CONFIG_PPPOE=m
599# CONFIG_PPPOL2TP is not set 554# CONFIG_PPPOL2TP is not set
600# CONFIG_SLIP is not set 555# CONFIG_SLIP is not set
601CONFIG_SLHC=m 556CONFIG_SLHC=m
602# CONFIG_SHAPER is not set
603# CONFIG_NETCONSOLE is not set 557# CONFIG_NETCONSOLE is not set
604# CONFIG_NETPOLL is not set 558# CONFIG_NETPOLL is not set
605# CONFIG_NET_POLL_CONTROLLER is not set 559# CONFIG_NET_POLL_CONTROLLER is not set
@@ -621,6 +575,7 @@ CONFIG_SLHC=m
621# Character devices 575# Character devices
622# 576#
623# CONFIG_VT is not set 577# CONFIG_VT is not set
578# CONFIG_DEVKMEM is not set
624# CONFIG_SERIAL_NONSTANDARD is not set 579# CONFIG_SERIAL_NONSTANDARD is not set
625 580
626# 581#
@@ -633,6 +588,7 @@ CONFIG_SLHC=m
633# 588#
634CONFIG_SERIAL_ATMEL=y 589CONFIG_SERIAL_ATMEL=y
635CONFIG_SERIAL_ATMEL_CONSOLE=y 590CONFIG_SERIAL_ATMEL_CONSOLE=y
591CONFIG_SERIAL_ATMEL_PDC=y
636# CONFIG_SERIAL_ATMEL_TTYAT is not set 592# CONFIG_SERIAL_ATMEL_TTYAT is not set
637CONFIG_SERIAL_CORE=y 593CONFIG_SERIAL_CORE=y
638CONFIG_SERIAL_CORE_CONSOLE=y 594CONFIG_SERIAL_CORE_CONSOLE=y
@@ -640,21 +596,13 @@ CONFIG_UNIX98_PTYS=y
640# CONFIG_LEGACY_PTYS is not set 596# CONFIG_LEGACY_PTYS is not set
641# CONFIG_IPMI_HANDLER is not set 597# CONFIG_IPMI_HANDLER is not set
642# CONFIG_HW_RANDOM is not set 598# CONFIG_HW_RANDOM is not set
643# CONFIG_RTC is not set
644# CONFIG_GEN_RTC is not set
645# CONFIG_R3964 is not set 599# CONFIG_R3964 is not set
646# CONFIG_RAW_DRIVER is not set 600# CONFIG_RAW_DRIVER is not set
647# CONFIG_TCG_TPM is not set 601# CONFIG_TCG_TPM is not set
648CONFIG_I2C=m 602CONFIG_I2C=m
649CONFIG_I2C_BOARDINFO=y 603CONFIG_I2C_BOARDINFO=y
650CONFIG_I2C_CHARDEV=m 604CONFIG_I2C_CHARDEV=m
651
652#
653# I2C Algorithms
654#
655CONFIG_I2C_ALGOBIT=m 605CONFIG_I2C_ALGOBIT=m
656# CONFIG_I2C_ALGOPCF is not set
657# CONFIG_I2C_ALGOPCA is not set
658 606
659# 607#
660# I2C Hardware Bus support 608# I2C Hardware Bus support
@@ -665,27 +613,23 @@ CONFIG_I2C_GPIO=m
665# CONFIG_I2C_SIMTEC is not set 613# CONFIG_I2C_SIMTEC is not set
666# CONFIG_I2C_TAOS_EVM is not set 614# CONFIG_I2C_TAOS_EVM is not set
667# CONFIG_I2C_STUB is not set 615# CONFIG_I2C_STUB is not set
616# CONFIG_I2C_PCA_PLATFORM is not set
668 617
669# 618#
670# Miscellaneous I2C Chip support 619# Miscellaneous I2C Chip support
671# 620#
672# CONFIG_SENSORS_DS1337 is not set
673# CONFIG_SENSORS_DS1374 is not set
674# CONFIG_DS1682 is not set 621# CONFIG_DS1682 is not set
675# CONFIG_SENSORS_EEPROM is not set 622# CONFIG_SENSORS_EEPROM is not set
676# CONFIG_SENSORS_PCF8574 is not set 623# CONFIG_SENSORS_PCF8574 is not set
677# CONFIG_SENSORS_PCA9539 is not set 624# CONFIG_PCF8575 is not set
678# CONFIG_SENSORS_PCF8591 is not set 625# CONFIG_SENSORS_PCF8591 is not set
626# CONFIG_TPS65010 is not set
679# CONFIG_SENSORS_MAX6875 is not set 627# CONFIG_SENSORS_MAX6875 is not set
680# CONFIG_SENSORS_TSL2550 is not set 628# CONFIG_SENSORS_TSL2550 is not set
681# CONFIG_I2C_DEBUG_CORE is not set 629# CONFIG_I2C_DEBUG_CORE is not set
682# CONFIG_I2C_DEBUG_ALGO is not set 630# CONFIG_I2C_DEBUG_ALGO is not set
683# CONFIG_I2C_DEBUG_BUS is not set 631# CONFIG_I2C_DEBUG_BUS is not set
684# CONFIG_I2C_DEBUG_CHIP is not set 632# CONFIG_I2C_DEBUG_CHIP is not set
685
686#
687# SPI support
688#
689CONFIG_SPI=y 633CONFIG_SPI=y
690# CONFIG_SPI_DEBUG is not set 634# CONFIG_SPI_DEBUG is not set
691CONFIG_SPI_MASTER=y 635CONFIG_SPI_MASTER=y
@@ -702,9 +646,27 @@ CONFIG_SPI_ATMEL=y
702# CONFIG_SPI_AT25 is not set 646# CONFIG_SPI_AT25 is not set
703CONFIG_SPI_SPIDEV=m 647CONFIG_SPI_SPIDEV=m
704# CONFIG_SPI_TLE62X0 is not set 648# CONFIG_SPI_TLE62X0 is not set
649CONFIG_HAVE_GPIO_LIB=y
650
651#
652# GPIO Support
653#
654# CONFIG_DEBUG_GPIO is not set
655
656#
657# I2C GPIO expanders:
658#
659# CONFIG_GPIO_PCA953X is not set
660# CONFIG_GPIO_PCF857X is not set
661
662#
663# SPI GPIO expanders:
664#
665# CONFIG_GPIO_MCP23S08 is not set
705# CONFIG_W1 is not set 666# CONFIG_W1 is not set
706# CONFIG_POWER_SUPPLY is not set 667# CONFIG_POWER_SUPPLY is not set
707# CONFIG_HWMON is not set 668# CONFIG_HWMON is not set
669# CONFIG_THERMAL is not set
708CONFIG_WATCHDOG=y 670CONFIG_WATCHDOG=y
709# CONFIG_WATCHDOG_NOWAYOUT is not set 671# CONFIG_WATCHDOG_NOWAYOUT is not set
710 672
@@ -724,12 +686,22 @@ CONFIG_SSB_POSSIBLE=y
724# Multifunction device drivers 686# Multifunction device drivers
725# 687#
726# CONFIG_MFD_SM501 is not set 688# CONFIG_MFD_SM501 is not set
689# CONFIG_HTC_PASIC3 is not set
727 690
728# 691#
729# Multimedia devices 692# Multimedia devices
730# 693#
694
695#
696# Multimedia core support
697#
731# CONFIG_VIDEO_DEV is not set 698# CONFIG_VIDEO_DEV is not set
732# CONFIG_DVB_CORE is not set 699# CONFIG_DVB_CORE is not set
700# CONFIG_VIDEO_MEDIA is not set
701
702#
703# Multimedia drivers
704#
733# CONFIG_DAB is not set 705# CONFIG_DAB is not set
734 706
735# 707#
@@ -753,14 +725,12 @@ CONFIG_USB_SUPPORT=y
753# CONFIG_USB_ARCH_HAS_HCD is not set 725# CONFIG_USB_ARCH_HAS_HCD is not set
754# CONFIG_USB_ARCH_HAS_OHCI is not set 726# CONFIG_USB_ARCH_HAS_OHCI is not set
755# CONFIG_USB_ARCH_HAS_EHCI is not set 727# CONFIG_USB_ARCH_HAS_EHCI is not set
728# CONFIG_USB_OTG_WHITELIST is not set
729# CONFIG_USB_OTG_BLACKLIST_HUB is not set
756 730
757# 731#
758# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 732# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
759# 733#
760
761#
762# USB Gadget Support
763#
764CONFIG_USB_GADGET=y 734CONFIG_USB_GADGET=y
765# CONFIG_USB_GADGET_DEBUG is not set 735# CONFIG_USB_GADGET_DEBUG is not set
766# CONFIG_USB_GADGET_DEBUG_FILES is not set 736# CONFIG_USB_GADGET_DEBUG_FILES is not set
@@ -772,6 +742,7 @@ CONFIG_USB_ATMEL_USBA=y
772# CONFIG_USB_GADGET_NET2280 is not set 742# CONFIG_USB_GADGET_NET2280 is not set
773# CONFIG_USB_GADGET_PXA2XX is not set 743# CONFIG_USB_GADGET_PXA2XX is not set
774# CONFIG_USB_GADGET_M66592 is not set 744# CONFIG_USB_GADGET_M66592 is not set
745# CONFIG_USB_GADGET_PXA27X is not set
775# CONFIG_USB_GADGET_GOKU is not set 746# CONFIG_USB_GADGET_GOKU is not set
776# CONFIG_USB_GADGET_LH7A40X is not set 747# CONFIG_USB_GADGET_LH7A40X is not set
777# CONFIG_USB_GADGET_OMAP is not set 748# CONFIG_USB_GADGET_OMAP is not set
@@ -787,6 +758,7 @@ CONFIG_USB_FILE_STORAGE=m
787# CONFIG_USB_FILE_STORAGE_TEST is not set 758# CONFIG_USB_FILE_STORAGE_TEST is not set
788CONFIG_USB_G_SERIAL=m 759CONFIG_USB_G_SERIAL=m
789# CONFIG_USB_MIDI_GADGET is not set 760# CONFIG_USB_MIDI_GADGET is not set
761# CONFIG_USB_G_PRINTER is not set
790CONFIG_MMC=m 762CONFIG_MMC=m
791# CONFIG_MMC_DEBUG is not set 763# CONFIG_MMC_DEBUG is not set
792# CONFIG_MMC_UNSAFE_RESUME is not set 764# CONFIG_MMC_UNSAFE_RESUME is not set
@@ -797,11 +769,13 @@ CONFIG_MMC=m
797CONFIG_MMC_BLOCK=m 769CONFIG_MMC_BLOCK=m
798CONFIG_MMC_BLOCK_BOUNCE=y 770CONFIG_MMC_BLOCK_BOUNCE=y
799# CONFIG_SDIO_UART is not set 771# CONFIG_SDIO_UART is not set
772# CONFIG_MMC_TEST is not set
800 773
801# 774#
802# MMC/SD Host Controller Drivers 775# MMC/SD Host Controller Drivers
803# 776#
804CONFIG_MMC_SPI=m 777CONFIG_MMC_SPI=m
778# CONFIG_MEMSTICK is not set
805CONFIG_NEW_LEDS=y 779CONFIG_NEW_LEDS=y
806CONFIG_LEDS_CLASS=y 780CONFIG_LEDS_CLASS=y
807 781
@@ -816,6 +790,8 @@ CONFIG_LEDS_GPIO=y
816CONFIG_LEDS_TRIGGERS=y 790CONFIG_LEDS_TRIGGERS=y
817CONFIG_LEDS_TRIGGER_TIMER=y 791CONFIG_LEDS_TRIGGER_TIMER=y
818CONFIG_LEDS_TRIGGER_HEARTBEAT=y 792CONFIG_LEDS_TRIGGER_HEARTBEAT=y
793CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
794# CONFIG_ACCESSIBILITY is not set
819CONFIG_RTC_LIB=y 795CONFIG_RTC_LIB=y
820CONFIG_RTC_CLASS=y 796CONFIG_RTC_CLASS=y
821CONFIG_RTC_HCTOSYS=y 797CONFIG_RTC_HCTOSYS=y
@@ -844,19 +820,22 @@ CONFIG_RTC_INTF_DEV=y
844# CONFIG_RTC_DRV_PCF8563 is not set 820# CONFIG_RTC_DRV_PCF8563 is not set
845# CONFIG_RTC_DRV_PCF8583 is not set 821# CONFIG_RTC_DRV_PCF8583 is not set
846# CONFIG_RTC_DRV_M41T80 is not set 822# CONFIG_RTC_DRV_M41T80 is not set
823# CONFIG_RTC_DRV_S35390A is not set
847 824
848# 825#
849# SPI RTC drivers 826# SPI RTC drivers
850# 827#
851# CONFIG_RTC_DRV_RS5C348 is not set
852# CONFIG_RTC_DRV_MAX6902 is not set 828# CONFIG_RTC_DRV_MAX6902 is not set
829# CONFIG_RTC_DRV_R9701 is not set
830# CONFIG_RTC_DRV_RS5C348 is not set
853 831
854# 832#
855# Platform RTC drivers 833# Platform RTC drivers
856# 834#
835# CONFIG_RTC_DRV_DS1511 is not set
857# CONFIG_RTC_DRV_DS1553 is not set 836# CONFIG_RTC_DRV_DS1553 is not set
858# CONFIG_RTC_DRV_STK17TA8 is not set
859# CONFIG_RTC_DRV_DS1742 is not set 837# CONFIG_RTC_DRV_DS1742 is not set
838# CONFIG_RTC_DRV_STK17TA8 is not set
860# CONFIG_RTC_DRV_M48T86 is not set 839# CONFIG_RTC_DRV_M48T86 is not set
861# CONFIG_RTC_DRV_M48T59 is not set 840# CONFIG_RTC_DRV_M48T59 is not set
862# CONFIG_RTC_DRV_V3020 is not set 841# CONFIG_RTC_DRV_V3020 is not set
@@ -865,10 +844,6 @@ CONFIG_RTC_INTF_DEV=y
865# on-CPU RTC drivers 844# on-CPU RTC drivers
866# 845#
867CONFIG_RTC_DRV_AT32AP700X=y 846CONFIG_RTC_DRV_AT32AP700X=y
868
869#
870# Userspace I/O
871#
872# CONFIG_UIO is not set 847# CONFIG_UIO is not set
873 848
874# 849#
@@ -885,14 +860,11 @@ CONFIG_JBD=m
885# CONFIG_JFS_FS is not set 860# CONFIG_JFS_FS is not set
886# CONFIG_FS_POSIX_ACL is not set 861# CONFIG_FS_POSIX_ACL is not set
887# CONFIG_XFS_FS is not set 862# CONFIG_XFS_FS is not set
888# CONFIG_GFS2_FS is not set
889# CONFIG_OCFS2_FS is not set 863# CONFIG_OCFS2_FS is not set
890# CONFIG_MINIX_FS is not set 864# CONFIG_DNOTIFY is not set
891# CONFIG_ROMFS_FS is not set
892CONFIG_INOTIFY=y 865CONFIG_INOTIFY=y
893CONFIG_INOTIFY_USER=y 866CONFIG_INOTIFY_USER=y
894# CONFIG_QUOTA is not set 867# CONFIG_QUOTA is not set
895# CONFIG_DNOTIFY is not set
896# CONFIG_AUTOFS_FS is not set 868# CONFIG_AUTOFS_FS is not set
897# CONFIG_AUTOFS4_FS is not set 869# CONFIG_AUTOFS4_FS is not set
898CONFIG_FUSE_FS=m 870CONFIG_FUSE_FS=m
@@ -948,8 +920,10 @@ CONFIG_JFFS2_RTIME=y
948# CONFIG_JFFS2_RUBIN is not set 920# CONFIG_JFFS2_RUBIN is not set
949# CONFIG_CRAMFS is not set 921# CONFIG_CRAMFS is not set
950# CONFIG_VXFS_FS is not set 922# CONFIG_VXFS_FS is not set
923# CONFIG_MINIX_FS is not set
951# CONFIG_HPFS_FS is not set 924# CONFIG_HPFS_FS is not set
952# CONFIG_QNX4FS_FS is not set 925# CONFIG_QNX4FS_FS is not set
926# CONFIG_ROMFS_FS is not set
953# CONFIG_SYSV_FS is not set 927# CONFIG_SYSV_FS is not set
954# CONFIG_UFS_FS is not set 928# CONFIG_UFS_FS is not set
955CONFIG_NETWORK_FILESYSTEMS=y 929CONFIG_NETWORK_FILESYSTEMS=y
@@ -957,12 +931,10 @@ CONFIG_NFS_FS=y
957CONFIG_NFS_V3=y 931CONFIG_NFS_V3=y
958# CONFIG_NFS_V3_ACL is not set 932# CONFIG_NFS_V3_ACL is not set
959# CONFIG_NFS_V4 is not set 933# CONFIG_NFS_V4 is not set
960# CONFIG_NFS_DIRECTIO is not set
961CONFIG_NFSD=m 934CONFIG_NFSD=m
962CONFIG_NFSD_V3=y 935CONFIG_NFSD_V3=y
963# CONFIG_NFSD_V3_ACL is not set 936# CONFIG_NFSD_V3_ACL is not set
964# CONFIG_NFSD_V4 is not set 937# CONFIG_NFSD_V4 is not set
965CONFIG_NFSD_TCP=y
966CONFIG_ROOT_NFS=y 938CONFIG_ROOT_NFS=y
967CONFIG_LOCKD=y 939CONFIG_LOCKD=y
968CONFIG_LOCKD_V4=y 940CONFIG_LOCKD_V4=y
@@ -1030,11 +1002,6 @@ CONFIG_NLS_ISO8859_1=m
1030# CONFIG_NLS_KOI8_U is not set 1002# CONFIG_NLS_KOI8_U is not set
1031CONFIG_NLS_UTF8=m 1003CONFIG_NLS_UTF8=m
1032# CONFIG_DLM is not set 1004# CONFIG_DLM is not set
1033CONFIG_INSTRUMENTATION=y
1034CONFIG_PROFILING=y
1035CONFIG_OPROFILE=m
1036CONFIG_KPROBES=y
1037# CONFIG_MARKERS is not set
1038 1005
1039# 1006#
1040# Kernel hacking 1007# Kernel hacking
@@ -1042,6 +1009,7 @@ CONFIG_KPROBES=y
1042# CONFIG_PRINTK_TIME is not set 1009# CONFIG_PRINTK_TIME is not set
1043CONFIG_ENABLE_WARN_DEPRECATED=y 1010CONFIG_ENABLE_WARN_DEPRECATED=y
1044CONFIG_ENABLE_MUST_CHECK=y 1011CONFIG_ENABLE_MUST_CHECK=y
1012CONFIG_FRAME_WARN=1024
1045CONFIG_MAGIC_SYSRQ=y 1013CONFIG_MAGIC_SYSRQ=y
1046# CONFIG_UNUSED_SYMBOLS is not set 1014# CONFIG_UNUSED_SYMBOLS is not set
1047# CONFIG_DEBUG_FS is not set 1015# CONFIG_DEBUG_FS is not set
@@ -1052,7 +1020,9 @@ CONFIG_DETECT_SOFTLOCKUP=y
1052CONFIG_SCHED_DEBUG=y 1020CONFIG_SCHED_DEBUG=y
1053# CONFIG_SCHEDSTATS is not set 1021# CONFIG_SCHEDSTATS is not set
1054# CONFIG_TIMER_STATS is not set 1022# CONFIG_TIMER_STATS is not set
1023# CONFIG_DEBUG_OBJECTS is not set
1055# CONFIG_SLUB_DEBUG_ON is not set 1024# CONFIG_SLUB_DEBUG_ON is not set
1025# CONFIG_SLUB_STATS is not set
1056# CONFIG_DEBUG_RT_MUTEXES is not set 1026# CONFIG_DEBUG_RT_MUTEXES is not set
1057# CONFIG_RT_MUTEX_TESTER is not set 1027# CONFIG_RT_MUTEX_TESTER is not set
1058# CONFIG_DEBUG_SPINLOCK is not set 1028# CONFIG_DEBUG_SPINLOCK is not set
@@ -1066,12 +1036,14 @@ CONFIG_SCHED_DEBUG=y
1066CONFIG_DEBUG_BUGVERBOSE=y 1036CONFIG_DEBUG_BUGVERBOSE=y
1067# CONFIG_DEBUG_INFO is not set 1037# CONFIG_DEBUG_INFO is not set
1068# CONFIG_DEBUG_VM is not set 1038# CONFIG_DEBUG_VM is not set
1039# CONFIG_DEBUG_WRITECOUNT is not set
1069# CONFIG_DEBUG_LIST is not set 1040# CONFIG_DEBUG_LIST is not set
1070# CONFIG_DEBUG_SG is not set 1041# CONFIG_DEBUG_SG is not set
1071CONFIG_FRAME_POINTER=y 1042CONFIG_FRAME_POINTER=y
1072# CONFIG_FORCED_INLINING is not set
1073# CONFIG_BOOT_PRINTK_DELAY is not set 1043# CONFIG_BOOT_PRINTK_DELAY is not set
1074# CONFIG_RCU_TORTURE_TEST is not set 1044# CONFIG_RCU_TORTURE_TEST is not set
1045# CONFIG_KPROBES_SANITY_TEST is not set
1046# CONFIG_BACKTRACE_SELF_TEST is not set
1075# CONFIG_LKDTM is not set 1047# CONFIG_LKDTM is not set
1076# CONFIG_FAULT_INJECTION is not set 1048# CONFIG_FAULT_INJECTION is not set
1077# CONFIG_SAMPLES is not set 1049# CONFIG_SAMPLES is not set
@@ -1083,52 +1055,90 @@ CONFIG_FRAME_POINTER=y
1083# CONFIG_SECURITY is not set 1055# CONFIG_SECURITY is not set
1084# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1056# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1085CONFIG_CRYPTO=y 1057CONFIG_CRYPTO=y
1058
1059#
1060# Crypto core or helper
1061#
1086CONFIG_CRYPTO_ALGAPI=y 1062CONFIG_CRYPTO_ALGAPI=y
1063CONFIG_CRYPTO_AEAD=y
1087CONFIG_CRYPTO_BLKCIPHER=y 1064CONFIG_CRYPTO_BLKCIPHER=y
1088CONFIG_CRYPTO_HASH=y 1065CONFIG_CRYPTO_HASH=y
1089CONFIG_CRYPTO_MANAGER=y 1066CONFIG_CRYPTO_MANAGER=y
1067# CONFIG_CRYPTO_GF128MUL is not set
1068# CONFIG_CRYPTO_NULL is not set
1069# CONFIG_CRYPTO_CRYPTD is not set
1070CONFIG_CRYPTO_AUTHENC=y
1071# CONFIG_CRYPTO_TEST is not set
1072
1073#
1074# Authenticated Encryption with Associated Data
1075#
1076# CONFIG_CRYPTO_CCM is not set
1077# CONFIG_CRYPTO_GCM is not set
1078# CONFIG_CRYPTO_SEQIV is not set
1079
1080#
1081# Block modes
1082#
1083CONFIG_CRYPTO_CBC=y
1084# CONFIG_CRYPTO_CTR is not set
1085# CONFIG_CRYPTO_CTS is not set
1086CONFIG_CRYPTO_ECB=m
1087# CONFIG_CRYPTO_LRW is not set
1088CONFIG_CRYPTO_PCBC=m
1089# CONFIG_CRYPTO_XTS is not set
1090
1091#
1092# Hash modes
1093#
1090CONFIG_CRYPTO_HMAC=y 1094CONFIG_CRYPTO_HMAC=y
1091# CONFIG_CRYPTO_XCBC is not set 1095# CONFIG_CRYPTO_XCBC is not set
1092# CONFIG_CRYPTO_NULL is not set 1096
1097#
1098# Digest
1099#
1100# CONFIG_CRYPTO_CRC32C is not set
1093# CONFIG_CRYPTO_MD4 is not set 1101# CONFIG_CRYPTO_MD4 is not set
1094CONFIG_CRYPTO_MD5=y 1102CONFIG_CRYPTO_MD5=y
1103# CONFIG_CRYPTO_MICHAEL_MIC is not set
1095CONFIG_CRYPTO_SHA1=y 1104CONFIG_CRYPTO_SHA1=y
1096# CONFIG_CRYPTO_SHA256 is not set 1105# CONFIG_CRYPTO_SHA256 is not set
1097# CONFIG_CRYPTO_SHA512 is not set 1106# CONFIG_CRYPTO_SHA512 is not set
1098# CONFIG_CRYPTO_WP512 is not set
1099# CONFIG_CRYPTO_TGR192 is not set 1107# CONFIG_CRYPTO_TGR192 is not set
1100# CONFIG_CRYPTO_GF128MUL is not set 1108# CONFIG_CRYPTO_WP512 is not set
1101CONFIG_CRYPTO_ECB=m 1109
1102CONFIG_CRYPTO_CBC=y 1110#
1103CONFIG_CRYPTO_PCBC=m 1111# Ciphers
1104# CONFIG_CRYPTO_LRW is not set 1112#
1105# CONFIG_CRYPTO_XTS is not set
1106# CONFIG_CRYPTO_CRYPTD is not set
1107CONFIG_CRYPTO_DES=y
1108# CONFIG_CRYPTO_FCRYPT is not set
1109# CONFIG_CRYPTO_BLOWFISH is not set
1110# CONFIG_CRYPTO_TWOFISH is not set
1111# CONFIG_CRYPTO_SERPENT is not set
1112# CONFIG_CRYPTO_AES is not set 1113# CONFIG_CRYPTO_AES is not set
1114# CONFIG_CRYPTO_ANUBIS is not set
1115CONFIG_CRYPTO_ARC4=m
1116# CONFIG_CRYPTO_BLOWFISH is not set
1117# CONFIG_CRYPTO_CAMELLIA is not set
1113# CONFIG_CRYPTO_CAST5 is not set 1118# CONFIG_CRYPTO_CAST5 is not set
1114# CONFIG_CRYPTO_CAST6 is not set 1119# CONFIG_CRYPTO_CAST6 is not set
1115# CONFIG_CRYPTO_TEA is not set 1120CONFIG_CRYPTO_DES=y
1116CONFIG_CRYPTO_ARC4=m 1121# CONFIG_CRYPTO_FCRYPT is not set
1117# CONFIG_CRYPTO_KHAZAD is not set 1122# CONFIG_CRYPTO_KHAZAD is not set
1118# CONFIG_CRYPTO_ANUBIS is not set 1123# CONFIG_CRYPTO_SALSA20 is not set
1119# CONFIG_CRYPTO_SEED is not set 1124# CONFIG_CRYPTO_SEED is not set
1125# CONFIG_CRYPTO_SERPENT is not set
1126# CONFIG_CRYPTO_TEA is not set
1127# CONFIG_CRYPTO_TWOFISH is not set
1128
1129#
1130# Compression
1131#
1120CONFIG_CRYPTO_DEFLATE=y 1132CONFIG_CRYPTO_DEFLATE=y
1121# CONFIG_CRYPTO_MICHAEL_MIC is not set 1133# CONFIG_CRYPTO_LZO is not set
1122# CONFIG_CRYPTO_CRC32C is not set
1123# CONFIG_CRYPTO_CAMELLIA is not set
1124# CONFIG_CRYPTO_TEST is not set
1125# CONFIG_CRYPTO_AUTHENC is not set
1126CONFIG_CRYPTO_HW=y 1134CONFIG_CRYPTO_HW=y
1127 1135
1128# 1136#
1129# Library routines 1137# Library routines
1130# 1138#
1131CONFIG_BITREVERSE=y 1139CONFIG_BITREVERSE=y
1140# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1141# CONFIG_GENERIC_FIND_NEXT_BIT is not set
1132CONFIG_CRC_CCITT=m 1142CONFIG_CRC_CCITT=m
1133# CONFIG_CRC16 is not set 1143# CONFIG_CRC16 is not set
1134CONFIG_CRC_ITU_T=m 1144CONFIG_CRC_ITU_T=m
@@ -1137,10 +1147,6 @@ CONFIG_CRC7=m
1137# CONFIG_LIBCRC32C is not set 1147# CONFIG_LIBCRC32C is not set
1138CONFIG_ZLIB_INFLATE=y 1148CONFIG_ZLIB_INFLATE=y
1139CONFIG_ZLIB_DEFLATE=y 1149CONFIG_ZLIB_DEFLATE=y
1140CONFIG_TEXTSEARCH=y
1141CONFIG_TEXTSEARCH_KMP=m
1142CONFIG_TEXTSEARCH_BM=m
1143CONFIG_TEXTSEARCH_FSM=m
1144CONFIG_PLIST=y 1150CONFIG_PLIST=y
1145CONFIG_HAS_IOMEM=y 1151CONFIG_HAS_IOMEM=y
1146CONFIG_HAS_IOPORT=y 1152CONFIG_HAS_IOPORT=y
diff --git a/arch/avr32/configs/atstk1002_defconfig b/arch/avr32/configs/atstk1002_defconfig
index 2fb2ede5f2b4..c6d02eac8791 100644
--- a/arch/avr32/configs/atstk1002_defconfig
+++ b/arch/avr32/configs/atstk1002_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.24-rc7 3# Linux kernel version: 2.6.26-rc3
4# Wed Jan 9 23:07:43 2008 4# Mon May 26 13:30:20 2008
5# 5#
6CONFIG_AVR32=y 6CONFIG_AVR32=y
7CONFIG_GENERIC_GPIO=y 7CONFIG_GENERIC_GPIO=y
@@ -13,10 +13,10 @@ CONFIG_HARDIRQS_SW_RESEND=y
13CONFIG_GENERIC_IRQ_PROBE=y 13CONFIG_GENERIC_IRQ_PROBE=y
14CONFIG_RWSEM_GENERIC_SPINLOCK=y 14CONFIG_RWSEM_GENERIC_SPINLOCK=y
15CONFIG_GENERIC_TIME=y 15CONFIG_GENERIC_TIME=y
16CONFIG_GENERIC_CLOCKEVENTS=y
16# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 17# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
17# CONFIG_ARCH_HAS_ILOG2_U32 is not set 18# CONFIG_ARCH_HAS_ILOG2_U32 is not set
18# CONFIG_ARCH_HAS_ILOG2_U64 is not set 19# CONFIG_ARCH_HAS_ILOG2_U64 is not set
19CONFIG_ARCH_SUPPORTS_OPROFILE=y
20CONFIG_GENERIC_HWEIGHT=y 20CONFIG_GENERIC_HWEIGHT=y
21CONFIG_GENERIC_CALIBRATE_DELAY=y 21CONFIG_GENERIC_CALIBRATE_DELAY=y
22CONFIG_GENERIC_BUG=y 22CONFIG_GENERIC_BUG=y
@@ -36,15 +36,15 @@ CONFIG_SYSVIPC_SYSCTL=y
36CONFIG_POSIX_MQUEUE=y 36CONFIG_POSIX_MQUEUE=y
37# CONFIG_BSD_PROCESS_ACCT is not set 37# CONFIG_BSD_PROCESS_ACCT is not set
38# CONFIG_TASKSTATS is not set 38# CONFIG_TASKSTATS is not set
39# CONFIG_USER_NS is not set
40# CONFIG_PID_NS is not set
41# CONFIG_AUDIT is not set 39# CONFIG_AUDIT is not set
42# CONFIG_IKCONFIG is not set 40# CONFIG_IKCONFIG is not set
43CONFIG_LOG_BUF_SHIFT=14 41CONFIG_LOG_BUF_SHIFT=14
44# CONFIG_CGROUPS is not set 42# CONFIG_CGROUPS is not set
45# CONFIG_FAIR_GROUP_SCHED is not set 43# CONFIG_GROUP_SCHED is not set
46CONFIG_SYSFS_DEPRECATED=y 44CONFIG_SYSFS_DEPRECATED=y
45CONFIG_SYSFS_DEPRECATED_V2=y
47CONFIG_RELAY=y 46CONFIG_RELAY=y
47# CONFIG_NAMESPACES is not set
48CONFIG_BLK_DEV_INITRD=y 48CONFIG_BLK_DEV_INITRD=y
49CONFIG_INITRAMFS_SOURCE="" 49CONFIG_INITRAMFS_SOURCE=""
50CONFIG_CC_OPTIMIZE_FOR_SIZE=y 50CONFIG_CC_OPTIMIZE_FOR_SIZE=y
@@ -58,11 +58,13 @@ CONFIG_HOTPLUG=y
58CONFIG_PRINTK=y 58CONFIG_PRINTK=y
59CONFIG_BUG=y 59CONFIG_BUG=y
60CONFIG_ELF_CORE=y 60CONFIG_ELF_CORE=y
61# CONFIG_COMPAT_BRK is not set
61# CONFIG_BASE_FULL is not set 62# CONFIG_BASE_FULL is not set
62CONFIG_FUTEX=y 63CONFIG_FUTEX=y
63CONFIG_ANON_INODES=y 64CONFIG_ANON_INODES=y
64CONFIG_EPOLL=y 65CONFIG_EPOLL=y
65CONFIG_SIGNALFD=y 66CONFIG_SIGNALFD=y
67CONFIG_TIMERFD=y
66CONFIG_EVENTFD=y 68CONFIG_EVENTFD=y
67CONFIG_SHMEM=y 69CONFIG_SHMEM=y
68CONFIG_VM_EVENT_COUNTERS=y 70CONFIG_VM_EVENT_COUNTERS=y
@@ -70,11 +72,21 @@ CONFIG_SLUB_DEBUG=y
70# CONFIG_SLAB is not set 72# CONFIG_SLAB is not set
71CONFIG_SLUB=y 73CONFIG_SLUB=y
72# CONFIG_SLOB is not set 74# CONFIG_SLOB is not set
75CONFIG_PROFILING=y
76# CONFIG_MARKERS is not set
77CONFIG_OPROFILE=m
78CONFIG_HAVE_OPROFILE=y
79CONFIG_KPROBES=y
80CONFIG_HAVE_KPROBES=y
81# CONFIG_HAVE_KRETPROBES is not set
82# CONFIG_HAVE_DMA_ATTRS is not set
83CONFIG_PROC_PAGE_MONITOR=y
73CONFIG_SLABINFO=y 84CONFIG_SLABINFO=y
74CONFIG_RT_MUTEXES=y 85CONFIG_RT_MUTEXES=y
75# CONFIG_TINY_SHMEM is not set 86# CONFIG_TINY_SHMEM is not set
76CONFIG_BASE_SMALL=1 87CONFIG_BASE_SMALL=1
77CONFIG_MODULES=y 88CONFIG_MODULES=y
89# CONFIG_MODULE_FORCE_LOAD is not set
78CONFIG_MODULE_UNLOAD=y 90CONFIG_MODULE_UNLOAD=y
79# CONFIG_MODULE_FORCE_UNLOAD is not set 91# CONFIG_MODULE_FORCE_UNLOAD is not set
80# CONFIG_MODVERSIONS is not set 92# CONFIG_MODVERSIONS is not set
@@ -98,10 +110,15 @@ CONFIG_IOSCHED_CFQ=y
98CONFIG_DEFAULT_CFQ=y 110CONFIG_DEFAULT_CFQ=y
99# CONFIG_DEFAULT_NOOP is not set 111# CONFIG_DEFAULT_NOOP is not set
100CONFIG_DEFAULT_IOSCHED="cfq" 112CONFIG_DEFAULT_IOSCHED="cfq"
113CONFIG_CLASSIC_RCU=y
101 114
102# 115#
103# System Type and features 116# System Type and features
104# 117#
118CONFIG_TICK_ONESHOT=y
119CONFIG_NO_HZ=y
120CONFIG_HIGH_RES_TIMERS=y
121CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
105CONFIG_SUBARCH_AVR32B=y 122CONFIG_SUBARCH_AVR32B=y
106CONFIG_MMU=y 123CONFIG_MMU=y
107CONFIG_PERFORMANCE_COUNTERS=y 124CONFIG_PERFORMANCE_COUNTERS=y
@@ -147,16 +164,19 @@ CONFIG_FLATMEM=y
147CONFIG_FLAT_NODE_MEM_MAP=y 164CONFIG_FLAT_NODE_MEM_MAP=y
148# CONFIG_SPARSEMEM_STATIC is not set 165# CONFIG_SPARSEMEM_STATIC is not set
149# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 166# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
167CONFIG_PAGEFLAGS_EXTENDED=y
150CONFIG_SPLIT_PTLOCK_CPUS=4 168CONFIG_SPLIT_PTLOCK_CPUS=4
151# CONFIG_RESOURCES_64BIT is not set 169# CONFIG_RESOURCES_64BIT is not set
152CONFIG_ZONE_DMA_FLAG=0 170CONFIG_ZONE_DMA_FLAG=0
153CONFIG_VIRT_TO_BUS=y 171CONFIG_VIRT_TO_BUS=y
154# CONFIG_OWNERSHIP_TRACE is not set 172# CONFIG_OWNERSHIP_TRACE is not set
173CONFIG_NMI_DEBUGGING=y
155# CONFIG_HZ_100 is not set 174# CONFIG_HZ_100 is not set
156CONFIG_HZ_250=y 175CONFIG_HZ_250=y
157# CONFIG_HZ_300 is not set 176# CONFIG_HZ_300 is not set
158# CONFIG_HZ_1000 is not set 177# CONFIG_HZ_1000 is not set
159CONFIG_HZ=250 178CONFIG_HZ=250
179# CONFIG_SCHED_HRTICK is not set
160CONFIG_CMDLINE="" 180CONFIG_CMDLINE=""
161 181
162# 182#
@@ -170,9 +190,10 @@ CONFIG_CPU_FREQ=y
170CONFIG_CPU_FREQ_TABLE=y 190CONFIG_CPU_FREQ_TABLE=y
171# CONFIG_CPU_FREQ_DEBUG is not set 191# CONFIG_CPU_FREQ_DEBUG is not set
172# CONFIG_CPU_FREQ_STAT is not set 192# CONFIG_CPU_FREQ_STAT is not set
173CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y 193# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
194# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
174# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set 195# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
175# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set 196CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
176# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set 197# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
177CONFIG_CPU_FREQ_GOV_PERFORMANCE=y 198CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
178# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set 199# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
@@ -208,6 +229,7 @@ CONFIG_XFRM=y
208CONFIG_XFRM_USER=m 229CONFIG_XFRM_USER=m
209# CONFIG_XFRM_SUB_POLICY is not set 230# CONFIG_XFRM_SUB_POLICY is not set
210# CONFIG_XFRM_MIGRATE is not set 231# CONFIG_XFRM_MIGRATE is not set
232# CONFIG_XFRM_STATISTICS is not set
211CONFIG_NET_KEY=m 233CONFIG_NET_KEY=m
212# CONFIG_NET_KEY_MIGRATE is not set 234# CONFIG_NET_KEY_MIGRATE is not set
213CONFIG_INET=y 235CONFIG_INET=y
@@ -252,8 +274,10 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=m
252CONFIG_INET6_XFRM_MODE_BEET=m 274CONFIG_INET6_XFRM_MODE_BEET=m
253# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set 275# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
254CONFIG_IPV6_SIT=m 276CONFIG_IPV6_SIT=m
277CONFIG_IPV6_NDISC_NODETYPE=y
255CONFIG_IPV6_TUNNEL=m 278CONFIG_IPV6_TUNNEL=m
256# CONFIG_IPV6_MULTIPLE_TABLES is not set 279# CONFIG_IPV6_MULTIPLE_TABLES is not set
280# CONFIG_IPV6_MROUTE is not set
257# CONFIG_NETWORK_SECMARK is not set 281# CONFIG_NETWORK_SECMARK is not set
258# CONFIG_NETFILTER is not set 282# CONFIG_NETFILTER is not set
259# CONFIG_IP_DCCP is not set 283# CONFIG_IP_DCCP is not set
@@ -279,6 +303,7 @@ CONFIG_LLC=m
279# CONFIG_NET_PKTGEN is not set 303# CONFIG_NET_PKTGEN is not set
280# CONFIG_NET_TCPPROBE is not set 304# CONFIG_NET_TCPPROBE is not set
281# CONFIG_HAMRADIO is not set 305# CONFIG_HAMRADIO is not set
306# CONFIG_CAN is not set
282# CONFIG_IRDA is not set 307# CONFIG_IRDA is not set
283# CONFIG_BT is not set 308# CONFIG_BT is not set
284# CONFIG_AF_RXRPC is not set 309# CONFIG_AF_RXRPC is not set
@@ -314,6 +339,7 @@ CONFIG_MTD=y
314CONFIG_MTD_PARTITIONS=y 339CONFIG_MTD_PARTITIONS=y
315# CONFIG_MTD_REDBOOT_PARTS is not set 340# CONFIG_MTD_REDBOOT_PARTS is not set
316CONFIG_MTD_CMDLINE_PARTS=y 341CONFIG_MTD_CMDLINE_PARTS=y
342# CONFIG_MTD_AR7_PARTS is not set
317 343
318# 344#
319# User Modules And Translation Layers 345# User Modules And Translation Layers
@@ -368,6 +394,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
368# 394#
369CONFIG_MTD_DATAFLASH=m 395CONFIG_MTD_DATAFLASH=m
370CONFIG_MTD_M25P80=m 396CONFIG_MTD_M25P80=m
397CONFIG_M25PXX_USE_FAST_READ=y
371# CONFIG_MTD_SLRAM is not set 398# CONFIG_MTD_SLRAM is not set
372# CONFIG_MTD_PHRAM is not set 399# CONFIG_MTD_PHRAM is not set
373# CONFIG_MTD_MTDRAM is not set 400# CONFIG_MTD_MTDRAM is not set
@@ -395,13 +422,18 @@ CONFIG_BLK_DEV_NBD=m
395CONFIG_BLK_DEV_RAM=m 422CONFIG_BLK_DEV_RAM=m
396CONFIG_BLK_DEV_RAM_COUNT=16 423CONFIG_BLK_DEV_RAM_COUNT=16
397CONFIG_BLK_DEV_RAM_SIZE=4096 424CONFIG_BLK_DEV_RAM_SIZE=4096
398CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 425# CONFIG_BLK_DEV_XIP is not set
399# CONFIG_CDROM_PKTCDVD is not set 426# CONFIG_CDROM_PKTCDVD is not set
400# CONFIG_ATA_OVER_ETH is not set 427# CONFIG_ATA_OVER_ETH is not set
401CONFIG_MISC_DEVICES=y 428CONFIG_MISC_DEVICES=y
429CONFIG_ATMEL_PWM=m
430CONFIG_ATMEL_TCLIB=y
431CONFIG_ATMEL_TCB_CLKSRC=y
432CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0
402# CONFIG_EEPROM_93CX6 is not set 433# CONFIG_EEPROM_93CX6 is not set
403CONFIG_ATMEL_SSC=m 434CONFIG_ATMEL_SSC=m
404# CONFIG_IDE is not set 435# CONFIG_ENCLOSURE_SERVICES is not set
436# CONFIG_HAVE_IDE is not set
405 437
406# 438#
407# SCSI device support 439# SCSI device support
@@ -444,6 +476,9 @@ CONFIG_SCSI_WAIT_SCAN=m
444# CONFIG_SCSI_LOWLEVEL is not set 476# CONFIG_SCSI_LOWLEVEL is not set
445CONFIG_ATA=m 477CONFIG_ATA=m
446# CONFIG_ATA_NONSTANDARD is not set 478# CONFIG_ATA_NONSTANDARD is not set
479# CONFIG_SATA_PMP is not set
480CONFIG_ATA_SFF=y
481# CONFIG_SATA_MV is not set
447CONFIG_PATA_AT32=m 482CONFIG_PATA_AT32=m
448# CONFIG_PATA_PLATFORM is not set 483# CONFIG_PATA_PLATFORM is not set
449# CONFIG_MD is not set 484# CONFIG_MD is not set
@@ -469,11 +504,13 @@ CONFIG_PHYLIB=y
469# CONFIG_SMSC_PHY is not set 504# CONFIG_SMSC_PHY is not set
470# CONFIG_BROADCOM_PHY is not set 505# CONFIG_BROADCOM_PHY is not set
471# CONFIG_ICPLUS_PHY is not set 506# CONFIG_ICPLUS_PHY is not set
507# CONFIG_REALTEK_PHY is not set
472# CONFIG_FIXED_PHY is not set 508# CONFIG_FIXED_PHY is not set
473# CONFIG_MDIO_BITBANG is not set 509# CONFIG_MDIO_BITBANG is not set
474CONFIG_NET_ETHERNET=y 510CONFIG_NET_ETHERNET=y
475# CONFIG_MII is not set 511# CONFIG_MII is not set
476CONFIG_MACB=y 512CONFIG_MACB=y
513# CONFIG_ENC28J60 is not set
477# CONFIG_IBM_NEW_EMAC_ZMII is not set 514# CONFIG_IBM_NEW_EMAC_ZMII is not set
478# CONFIG_IBM_NEW_EMAC_RGMII is not set 515# CONFIG_IBM_NEW_EMAC_RGMII is not set
479# CONFIG_IBM_NEW_EMAC_TAH is not set 516# CONFIG_IBM_NEW_EMAC_TAH is not set
@@ -487,6 +524,7 @@ CONFIG_MACB=y
487# 524#
488# CONFIG_WLAN_PRE80211 is not set 525# CONFIG_WLAN_PRE80211 is not set
489# CONFIG_WLAN_80211 is not set 526# CONFIG_WLAN_80211 is not set
527# CONFIG_IWLWIFI_LEDS is not set
490# CONFIG_WAN is not set 528# CONFIG_WAN is not set
491CONFIG_PPP=m 529CONFIG_PPP=m
492# CONFIG_PPP_MULTILINK is not set 530# CONFIG_PPP_MULTILINK is not set
@@ -500,7 +538,6 @@ CONFIG_PPP_BSDCOMP=m
500# CONFIG_PPPOL2TP is not set 538# CONFIG_PPPOL2TP is not set
501# CONFIG_SLIP is not set 539# CONFIG_SLIP is not set
502CONFIG_SLHC=m 540CONFIG_SLHC=m
503# CONFIG_SHAPER is not set
504# CONFIG_NETCONSOLE is not set 541# CONFIG_NETCONSOLE is not set
505# CONFIG_NETPOLL is not set 542# CONFIG_NETPOLL is not set
506# CONFIG_NET_POLL_CONTROLLER is not set 543# CONFIG_NET_POLL_CONTROLLER is not set
@@ -556,6 +593,7 @@ CONFIG_MOUSE_GPIO=m
556# Character devices 593# Character devices
557# 594#
558# CONFIG_VT is not set 595# CONFIG_VT is not set
596# CONFIG_DEVKMEM is not set
559# CONFIG_SERIAL_NONSTANDARD is not set 597# CONFIG_SERIAL_NONSTANDARD is not set
560 598
561# 599#
@@ -568,6 +606,7 @@ CONFIG_MOUSE_GPIO=m
568# 606#
569CONFIG_SERIAL_ATMEL=y 607CONFIG_SERIAL_ATMEL=y
570CONFIG_SERIAL_ATMEL_CONSOLE=y 608CONFIG_SERIAL_ATMEL_CONSOLE=y
609CONFIG_SERIAL_ATMEL_PDC=y
571# CONFIG_SERIAL_ATMEL_TTYAT is not set 610# CONFIG_SERIAL_ATMEL_TTYAT is not set
572CONFIG_SERIAL_CORE=y 611CONFIG_SERIAL_CORE=y
573CONFIG_SERIAL_CORE_CONSOLE=y 612CONFIG_SERIAL_CORE_CONSOLE=y
@@ -575,21 +614,13 @@ CONFIG_UNIX98_PTYS=y
575# CONFIG_LEGACY_PTYS is not set 614# CONFIG_LEGACY_PTYS is not set
576# CONFIG_IPMI_HANDLER is not set 615# CONFIG_IPMI_HANDLER is not set
577# CONFIG_HW_RANDOM is not set 616# CONFIG_HW_RANDOM is not set
578# CONFIG_RTC is not set
579# CONFIG_GEN_RTC is not set
580# CONFIG_R3964 is not set 617# CONFIG_R3964 is not set
581# CONFIG_RAW_DRIVER is not set 618# CONFIG_RAW_DRIVER is not set
582# CONFIG_TCG_TPM is not set 619# CONFIG_TCG_TPM is not set
583CONFIG_I2C=m 620CONFIG_I2C=m
584CONFIG_I2C_BOARDINFO=y 621CONFIG_I2C_BOARDINFO=y
585CONFIG_I2C_CHARDEV=m 622CONFIG_I2C_CHARDEV=m
586
587#
588# I2C Algorithms
589#
590CONFIG_I2C_ALGOBIT=m 623CONFIG_I2C_ALGOBIT=m
591# CONFIG_I2C_ALGOPCF is not set
592# CONFIG_I2C_ALGOPCA is not set
593 624
594# 625#
595# I2C Hardware Bus support 626# I2C Hardware Bus support
@@ -600,27 +631,23 @@ CONFIG_I2C_GPIO=m
600# CONFIG_I2C_SIMTEC is not set 631# CONFIG_I2C_SIMTEC is not set
601# CONFIG_I2C_TAOS_EVM is not set 632# CONFIG_I2C_TAOS_EVM is not set
602# CONFIG_I2C_STUB is not set 633# CONFIG_I2C_STUB is not set
634# CONFIG_I2C_PCA_PLATFORM is not set
603 635
604# 636#
605# Miscellaneous I2C Chip support 637# Miscellaneous I2C Chip support
606# 638#
607# CONFIG_SENSORS_DS1337 is not set
608# CONFIG_SENSORS_DS1374 is not set
609# CONFIG_DS1682 is not set 639# CONFIG_DS1682 is not set
610# CONFIG_SENSORS_EEPROM is not set 640# CONFIG_SENSORS_EEPROM is not set
611# CONFIG_SENSORS_PCF8574 is not set 641# CONFIG_SENSORS_PCF8574 is not set
612# CONFIG_SENSORS_PCA9539 is not set 642# CONFIG_PCF8575 is not set
613# CONFIG_SENSORS_PCF8591 is not set 643# CONFIG_SENSORS_PCF8591 is not set
644# CONFIG_TPS65010 is not set
614# CONFIG_SENSORS_MAX6875 is not set 645# CONFIG_SENSORS_MAX6875 is not set
615# CONFIG_SENSORS_TSL2550 is not set 646# CONFIG_SENSORS_TSL2550 is not set
616# CONFIG_I2C_DEBUG_CORE is not set 647# CONFIG_I2C_DEBUG_CORE is not set
617# CONFIG_I2C_DEBUG_ALGO is not set 648# CONFIG_I2C_DEBUG_ALGO is not set
618# CONFIG_I2C_DEBUG_BUS is not set 649# CONFIG_I2C_DEBUG_BUS is not set
619# CONFIG_I2C_DEBUG_CHIP is not set 650# CONFIG_I2C_DEBUG_CHIP is not set
620
621#
622# SPI support
623#
624CONFIG_SPI=y 651CONFIG_SPI=y
625# CONFIG_SPI_DEBUG is not set 652# CONFIG_SPI_DEBUG is not set
626CONFIG_SPI_MASTER=y 653CONFIG_SPI_MASTER=y
@@ -637,9 +664,27 @@ CONFIG_SPI_ATMEL=y
637# CONFIG_SPI_AT25 is not set 664# CONFIG_SPI_AT25 is not set
638CONFIG_SPI_SPIDEV=m 665CONFIG_SPI_SPIDEV=m
639# CONFIG_SPI_TLE62X0 is not set 666# CONFIG_SPI_TLE62X0 is not set
667CONFIG_HAVE_GPIO_LIB=y
668
669#
670# GPIO Support
671#
672# CONFIG_DEBUG_GPIO is not set
673
674#
675# I2C GPIO expanders:
676#
677# CONFIG_GPIO_PCA953X is not set
678# CONFIG_GPIO_PCF857X is not set
679
680#
681# SPI GPIO expanders:
682#
683# CONFIG_GPIO_MCP23S08 is not set
640# CONFIG_W1 is not set 684# CONFIG_W1 is not set
641# CONFIG_POWER_SUPPLY is not set 685# CONFIG_POWER_SUPPLY is not set
642# CONFIG_HWMON is not set 686# CONFIG_HWMON is not set
687# CONFIG_THERMAL is not set
643CONFIG_WATCHDOG=y 688CONFIG_WATCHDOG=y
644# CONFIG_WATCHDOG_NOWAYOUT is not set 689# CONFIG_WATCHDOG_NOWAYOUT is not set
645 690
@@ -659,12 +704,22 @@ CONFIG_SSB_POSSIBLE=y
659# Multifunction device drivers 704# Multifunction device drivers
660# 705#
661# CONFIG_MFD_SM501 is not set 706# CONFIG_MFD_SM501 is not set
707# CONFIG_HTC_PASIC3 is not set
662 708
663# 709#
664# Multimedia devices 710# Multimedia devices
665# 711#
712
713#
714# Multimedia core support
715#
666# CONFIG_VIDEO_DEV is not set 716# CONFIG_VIDEO_DEV is not set
667# CONFIG_DVB_CORE is not set 717# CONFIG_DVB_CORE is not set
718# CONFIG_VIDEO_MEDIA is not set
719
720#
721# Multimedia drivers
722#
668# CONFIG_DAB is not set 723# CONFIG_DAB is not set
669 724
670# 725#
@@ -682,8 +737,8 @@ CONFIG_FB_CFB_IMAGEBLIT=y
682# CONFIG_FB_SYS_FILLRECT is not set 737# CONFIG_FB_SYS_FILLRECT is not set
683# CONFIG_FB_SYS_COPYAREA is not set 738# CONFIG_FB_SYS_COPYAREA is not set
684# CONFIG_FB_SYS_IMAGEBLIT is not set 739# CONFIG_FB_SYS_IMAGEBLIT is not set
740# CONFIG_FB_FOREIGN_ENDIAN is not set
685# CONFIG_FB_SYS_FOPS is not set 741# CONFIG_FB_SYS_FOPS is not set
686CONFIG_FB_DEFERRED_IO=y
687# CONFIG_FB_SVGALIB is not set 742# CONFIG_FB_SVGALIB is not set
688# CONFIG_FB_MACMODES is not set 743# CONFIG_FB_MACMODES is not set
689# CONFIG_FB_BACKLIGHT is not set 744# CONFIG_FB_BACKLIGHT is not set
@@ -749,7 +804,11 @@ CONFIG_SND_AT73C213_TARGET_BITRATE=48000
749# CONFIG_SND_SOC is not set 804# CONFIG_SND_SOC is not set
750 805
751# 806#
752# SoC Audio support for SuperH 807# ALSA SoC audio for Freescale SOCs
808#
809
810#
811# SoC Audio for the Texas Instruments OMAP
753# 812#
754 813
755# 814#
@@ -761,14 +820,12 @@ CONFIG_USB_SUPPORT=y
761# CONFIG_USB_ARCH_HAS_HCD is not set 820# CONFIG_USB_ARCH_HAS_HCD is not set
762# CONFIG_USB_ARCH_HAS_OHCI is not set 821# CONFIG_USB_ARCH_HAS_OHCI is not set
763# CONFIG_USB_ARCH_HAS_EHCI is not set 822# CONFIG_USB_ARCH_HAS_EHCI is not set
823# CONFIG_USB_OTG_WHITELIST is not set
824# CONFIG_USB_OTG_BLACKLIST_HUB is not set
764 825
765# 826#
766# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 827# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
767# 828#
768
769#
770# USB Gadget Support
771#
772CONFIG_USB_GADGET=y 829CONFIG_USB_GADGET=y
773# CONFIG_USB_GADGET_DEBUG is not set 830# CONFIG_USB_GADGET_DEBUG is not set
774# CONFIG_USB_GADGET_DEBUG_FILES is not set 831# CONFIG_USB_GADGET_DEBUG_FILES is not set
@@ -781,6 +838,7 @@ CONFIG_USB_ATMEL_USBA=y
781# CONFIG_USB_GADGET_NET2280 is not set 838# CONFIG_USB_GADGET_NET2280 is not set
782# CONFIG_USB_GADGET_PXA2XX is not set 839# CONFIG_USB_GADGET_PXA2XX is not set
783# CONFIG_USB_GADGET_M66592 is not set 840# CONFIG_USB_GADGET_M66592 is not set
841# CONFIG_USB_GADGET_PXA27X is not set
784# CONFIG_USB_GADGET_GOKU is not set 842# CONFIG_USB_GADGET_GOKU is not set
785# CONFIG_USB_GADGET_LH7A40X is not set 843# CONFIG_USB_GADGET_LH7A40X is not set
786# CONFIG_USB_GADGET_OMAP is not set 844# CONFIG_USB_GADGET_OMAP is not set
@@ -796,6 +854,7 @@ CONFIG_USB_FILE_STORAGE=m
796# CONFIG_USB_FILE_STORAGE_TEST is not set 854# CONFIG_USB_FILE_STORAGE_TEST is not set
797CONFIG_USB_G_SERIAL=m 855CONFIG_USB_G_SERIAL=m
798# CONFIG_USB_MIDI_GADGET is not set 856# CONFIG_USB_MIDI_GADGET is not set
857# CONFIG_USB_G_PRINTER is not set
799CONFIG_MMC=m 858CONFIG_MMC=m
800# CONFIG_MMC_DEBUG is not set 859# CONFIG_MMC_DEBUG is not set
801# CONFIG_MMC_UNSAFE_RESUME is not set 860# CONFIG_MMC_UNSAFE_RESUME is not set
@@ -806,17 +865,20 @@ CONFIG_MMC=m
806CONFIG_MMC_BLOCK=m 865CONFIG_MMC_BLOCK=m
807CONFIG_MMC_BLOCK_BOUNCE=y 866CONFIG_MMC_BLOCK_BOUNCE=y
808# CONFIG_SDIO_UART is not set 867# CONFIG_SDIO_UART is not set
868CONFIG_MMC_TEST=m
809 869
810# 870#
811# MMC/SD Host Controller Drivers 871# MMC/SD Host Controller Drivers
812# 872#
813CONFIG_MMC_SPI=m 873CONFIG_MMC_SPI=m
874# CONFIG_MEMSTICK is not set
814CONFIG_NEW_LEDS=y 875CONFIG_NEW_LEDS=y
815CONFIG_LEDS_CLASS=m 876CONFIG_LEDS_CLASS=m
816 877
817# 878#
818# LED drivers 879# LED drivers
819# 880#
881CONFIG_LEDS_ATMEL_PWM=m
820CONFIG_LEDS_GPIO=m 882CONFIG_LEDS_GPIO=m
821 883
822# 884#
@@ -825,6 +887,8 @@ CONFIG_LEDS_GPIO=m
825CONFIG_LEDS_TRIGGERS=y 887CONFIG_LEDS_TRIGGERS=y
826CONFIG_LEDS_TRIGGER_TIMER=m 888CONFIG_LEDS_TRIGGER_TIMER=m
827CONFIG_LEDS_TRIGGER_HEARTBEAT=m 889CONFIG_LEDS_TRIGGER_HEARTBEAT=m
890CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
891# CONFIG_ACCESSIBILITY is not set
828CONFIG_RTC_LIB=y 892CONFIG_RTC_LIB=y
829CONFIG_RTC_CLASS=y 893CONFIG_RTC_CLASS=y
830CONFIG_RTC_HCTOSYS=y 894CONFIG_RTC_HCTOSYS=y
@@ -853,19 +917,22 @@ CONFIG_RTC_INTF_DEV=y
853# CONFIG_RTC_DRV_PCF8563 is not set 917# CONFIG_RTC_DRV_PCF8563 is not set
854# CONFIG_RTC_DRV_PCF8583 is not set 918# CONFIG_RTC_DRV_PCF8583 is not set
855# CONFIG_RTC_DRV_M41T80 is not set 919# CONFIG_RTC_DRV_M41T80 is not set
920# CONFIG_RTC_DRV_S35390A is not set
856 921
857# 922#
858# SPI RTC drivers 923# SPI RTC drivers
859# 924#
860# CONFIG_RTC_DRV_RS5C348 is not set
861# CONFIG_RTC_DRV_MAX6902 is not set 925# CONFIG_RTC_DRV_MAX6902 is not set
926# CONFIG_RTC_DRV_R9701 is not set
927# CONFIG_RTC_DRV_RS5C348 is not set
862 928
863# 929#
864# Platform RTC drivers 930# Platform RTC drivers
865# 931#
932# CONFIG_RTC_DRV_DS1511 is not set
866# CONFIG_RTC_DRV_DS1553 is not set 933# CONFIG_RTC_DRV_DS1553 is not set
867# CONFIG_RTC_DRV_STK17TA8 is not set
868# CONFIG_RTC_DRV_DS1742 is not set 934# CONFIG_RTC_DRV_DS1742 is not set
935# CONFIG_RTC_DRV_STK17TA8 is not set
869# CONFIG_RTC_DRV_M48T86 is not set 936# CONFIG_RTC_DRV_M48T86 is not set
870# CONFIG_RTC_DRV_M48T59 is not set 937# CONFIG_RTC_DRV_M48T59 is not set
871# CONFIG_RTC_DRV_V3020 is not set 938# CONFIG_RTC_DRV_V3020 is not set
@@ -874,10 +941,6 @@ CONFIG_RTC_INTF_DEV=y
874# on-CPU RTC drivers 941# on-CPU RTC drivers
875# 942#
876CONFIG_RTC_DRV_AT32AP700X=y 943CONFIG_RTC_DRV_AT32AP700X=y
877
878#
879# Userspace I/O
880#
881# CONFIG_UIO is not set 944# CONFIG_UIO is not set
882 945
883# 946#
@@ -895,14 +958,11 @@ CONFIG_JBD=m
895# CONFIG_JFS_FS is not set 958# CONFIG_JFS_FS is not set
896# CONFIG_FS_POSIX_ACL is not set 959# CONFIG_FS_POSIX_ACL is not set
897# CONFIG_XFS_FS is not set 960# CONFIG_XFS_FS is not set
898# CONFIG_GFS2_FS is not set
899# CONFIG_OCFS2_FS is not set 961# CONFIG_OCFS2_FS is not set
900CONFIG_MINIX_FS=m 962# CONFIG_DNOTIFY is not set
901# CONFIG_ROMFS_FS is not set
902CONFIG_INOTIFY=y 963CONFIG_INOTIFY=y
903CONFIG_INOTIFY_USER=y 964CONFIG_INOTIFY_USER=y
904# CONFIG_QUOTA is not set 965# CONFIG_QUOTA is not set
905# CONFIG_DNOTIFY is not set
906# CONFIG_AUTOFS_FS is not set 966# CONFIG_AUTOFS_FS is not set
907# CONFIG_AUTOFS4_FS is not set 967# CONFIG_AUTOFS4_FS is not set
908CONFIG_FUSE_FS=m 968CONFIG_FUSE_FS=m
@@ -957,8 +1017,10 @@ CONFIG_JFFS2_RTIME=y
957# CONFIG_JFFS2_RUBIN is not set 1017# CONFIG_JFFS2_RUBIN is not set
958# CONFIG_CRAMFS is not set 1018# CONFIG_CRAMFS is not set
959# CONFIG_VXFS_FS is not set 1019# CONFIG_VXFS_FS is not set
1020CONFIG_MINIX_FS=m
960# CONFIG_HPFS_FS is not set 1021# CONFIG_HPFS_FS is not set
961# CONFIG_QNX4FS_FS is not set 1022# CONFIG_QNX4FS_FS is not set
1023# CONFIG_ROMFS_FS is not set
962# CONFIG_SYSV_FS is not set 1024# CONFIG_SYSV_FS is not set
963# CONFIG_UFS_FS is not set 1025# CONFIG_UFS_FS is not set
964CONFIG_NETWORK_FILESYSTEMS=y 1026CONFIG_NETWORK_FILESYSTEMS=y
@@ -966,7 +1028,6 @@ CONFIG_NFS_FS=y
966CONFIG_NFS_V3=y 1028CONFIG_NFS_V3=y
967# CONFIG_NFS_V3_ACL is not set 1029# CONFIG_NFS_V3_ACL is not set
968# CONFIG_NFS_V4 is not set 1030# CONFIG_NFS_V4 is not set
969# CONFIG_NFS_DIRECTIO is not set
970# CONFIG_NFSD is not set 1031# CONFIG_NFSD is not set
971CONFIG_ROOT_NFS=y 1032CONFIG_ROOT_NFS=y
972CONFIG_LOCKD=y 1033CONFIG_LOCKD=y
@@ -1028,11 +1089,6 @@ CONFIG_NLS_ISO8859_1=m
1028# CONFIG_NLS_KOI8_U is not set 1089# CONFIG_NLS_KOI8_U is not set
1029CONFIG_NLS_UTF8=m 1090CONFIG_NLS_UTF8=m
1030# CONFIG_DLM is not set 1091# CONFIG_DLM is not set
1031CONFIG_INSTRUMENTATION=y
1032CONFIG_PROFILING=y
1033CONFIG_OPROFILE=m
1034CONFIG_KPROBES=y
1035# CONFIG_MARKERS is not set
1036 1092
1037# 1093#
1038# Kernel hacking 1094# Kernel hacking
@@ -1040,6 +1096,7 @@ CONFIG_KPROBES=y
1040# CONFIG_PRINTK_TIME is not set 1096# CONFIG_PRINTK_TIME is not set
1041CONFIG_ENABLE_WARN_DEPRECATED=y 1097CONFIG_ENABLE_WARN_DEPRECATED=y
1042CONFIG_ENABLE_MUST_CHECK=y 1098CONFIG_ENABLE_MUST_CHECK=y
1099CONFIG_FRAME_WARN=1024
1043CONFIG_MAGIC_SYSRQ=y 1100CONFIG_MAGIC_SYSRQ=y
1044# CONFIG_UNUSED_SYMBOLS is not set 1101# CONFIG_UNUSED_SYMBOLS is not set
1045CONFIG_DEBUG_FS=y 1102CONFIG_DEBUG_FS=y
@@ -1050,7 +1107,9 @@ CONFIG_DETECT_SOFTLOCKUP=y
1050CONFIG_SCHED_DEBUG=y 1107CONFIG_SCHED_DEBUG=y
1051# CONFIG_SCHEDSTATS is not set 1108# CONFIG_SCHEDSTATS is not set
1052# CONFIG_TIMER_STATS is not set 1109# CONFIG_TIMER_STATS is not set
1110# CONFIG_DEBUG_OBJECTS is not set
1053# CONFIG_SLUB_DEBUG_ON is not set 1111# CONFIG_SLUB_DEBUG_ON is not set
1112# CONFIG_SLUB_STATS is not set
1054# CONFIG_DEBUG_RT_MUTEXES is not set 1113# CONFIG_DEBUG_RT_MUTEXES is not set
1055# CONFIG_RT_MUTEX_TESTER is not set 1114# CONFIG_RT_MUTEX_TESTER is not set
1056# CONFIG_DEBUG_SPINLOCK is not set 1115# CONFIG_DEBUG_SPINLOCK is not set
@@ -1064,12 +1123,14 @@ CONFIG_SCHED_DEBUG=y
1064CONFIG_DEBUG_BUGVERBOSE=y 1123CONFIG_DEBUG_BUGVERBOSE=y
1065# CONFIG_DEBUG_INFO is not set 1124# CONFIG_DEBUG_INFO is not set
1066# CONFIG_DEBUG_VM is not set 1125# CONFIG_DEBUG_VM is not set
1126# CONFIG_DEBUG_WRITECOUNT is not set
1067# CONFIG_DEBUG_LIST is not set 1127# CONFIG_DEBUG_LIST is not set
1068# CONFIG_DEBUG_SG is not set 1128# CONFIG_DEBUG_SG is not set
1069CONFIG_FRAME_POINTER=y 1129CONFIG_FRAME_POINTER=y
1070CONFIG_FORCED_INLINING=y
1071# CONFIG_BOOT_PRINTK_DELAY is not set 1130# CONFIG_BOOT_PRINTK_DELAY is not set
1072# CONFIG_RCU_TORTURE_TEST is not set 1131# CONFIG_RCU_TORTURE_TEST is not set
1132# CONFIG_KPROBES_SANITY_TEST is not set
1133# CONFIG_BACKTRACE_SELF_TEST is not set
1073# CONFIG_LKDTM is not set 1134# CONFIG_LKDTM is not set
1074# CONFIG_FAULT_INJECTION is not set 1135# CONFIG_FAULT_INJECTION is not set
1075# CONFIG_SAMPLES is not set 1136# CONFIG_SAMPLES is not set
@@ -1081,52 +1142,90 @@ CONFIG_FORCED_INLINING=y
1081# CONFIG_SECURITY is not set 1142# CONFIG_SECURITY is not set
1082# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1143# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1083CONFIG_CRYPTO=y 1144CONFIG_CRYPTO=y
1145
1146#
1147# Crypto core or helper
1148#
1084CONFIG_CRYPTO_ALGAPI=m 1149CONFIG_CRYPTO_ALGAPI=m
1150CONFIG_CRYPTO_AEAD=m
1085CONFIG_CRYPTO_BLKCIPHER=m 1151CONFIG_CRYPTO_BLKCIPHER=m
1086CONFIG_CRYPTO_HASH=m 1152CONFIG_CRYPTO_HASH=m
1087CONFIG_CRYPTO_MANAGER=m 1153CONFIG_CRYPTO_MANAGER=m
1154# CONFIG_CRYPTO_GF128MUL is not set
1155# CONFIG_CRYPTO_NULL is not set
1156# CONFIG_CRYPTO_CRYPTD is not set
1157CONFIG_CRYPTO_AUTHENC=m
1158# CONFIG_CRYPTO_TEST is not set
1159
1160#
1161# Authenticated Encryption with Associated Data
1162#
1163# CONFIG_CRYPTO_CCM is not set
1164# CONFIG_CRYPTO_GCM is not set
1165# CONFIG_CRYPTO_SEQIV is not set
1166
1167#
1168# Block modes
1169#
1170CONFIG_CRYPTO_CBC=m
1171# CONFIG_CRYPTO_CTR is not set
1172# CONFIG_CRYPTO_CTS is not set
1173# CONFIG_CRYPTO_ECB is not set
1174# CONFIG_CRYPTO_LRW is not set
1175# CONFIG_CRYPTO_PCBC is not set
1176# CONFIG_CRYPTO_XTS is not set
1177
1178#
1179# Hash modes
1180#
1088CONFIG_CRYPTO_HMAC=m 1181CONFIG_CRYPTO_HMAC=m
1089# CONFIG_CRYPTO_XCBC is not set 1182# CONFIG_CRYPTO_XCBC is not set
1090# CONFIG_CRYPTO_NULL is not set 1183
1184#
1185# Digest
1186#
1187# CONFIG_CRYPTO_CRC32C is not set
1091# CONFIG_CRYPTO_MD4 is not set 1188# CONFIG_CRYPTO_MD4 is not set
1092CONFIG_CRYPTO_MD5=m 1189CONFIG_CRYPTO_MD5=m
1190# CONFIG_CRYPTO_MICHAEL_MIC is not set
1093CONFIG_CRYPTO_SHA1=m 1191CONFIG_CRYPTO_SHA1=m
1094# CONFIG_CRYPTO_SHA256 is not set 1192# CONFIG_CRYPTO_SHA256 is not set
1095# CONFIG_CRYPTO_SHA512 is not set 1193# CONFIG_CRYPTO_SHA512 is not set
1096# CONFIG_CRYPTO_WP512 is not set
1097# CONFIG_CRYPTO_TGR192 is not set 1194# CONFIG_CRYPTO_TGR192 is not set
1098# CONFIG_CRYPTO_GF128MUL is not set 1195# CONFIG_CRYPTO_WP512 is not set
1099# CONFIG_CRYPTO_ECB is not set 1196
1100CONFIG_CRYPTO_CBC=m 1197#
1101# CONFIG_CRYPTO_PCBC is not set 1198# Ciphers
1102# CONFIG_CRYPTO_LRW is not set 1199#
1103# CONFIG_CRYPTO_XTS is not set
1104# CONFIG_CRYPTO_CRYPTD is not set
1105CONFIG_CRYPTO_DES=m
1106# CONFIG_CRYPTO_FCRYPT is not set
1107# CONFIG_CRYPTO_BLOWFISH is not set
1108# CONFIG_CRYPTO_TWOFISH is not set
1109# CONFIG_CRYPTO_SERPENT is not set
1110# CONFIG_CRYPTO_AES is not set 1200# CONFIG_CRYPTO_AES is not set
1201# CONFIG_CRYPTO_ANUBIS is not set
1202# CONFIG_CRYPTO_ARC4 is not set
1203# CONFIG_CRYPTO_BLOWFISH is not set
1204# CONFIG_CRYPTO_CAMELLIA is not set
1111# CONFIG_CRYPTO_CAST5 is not set 1205# CONFIG_CRYPTO_CAST5 is not set
1112# CONFIG_CRYPTO_CAST6 is not set 1206# CONFIG_CRYPTO_CAST6 is not set
1113# CONFIG_CRYPTO_TEA is not set 1207CONFIG_CRYPTO_DES=m
1114# CONFIG_CRYPTO_ARC4 is not set 1208# CONFIG_CRYPTO_FCRYPT is not set
1115# CONFIG_CRYPTO_KHAZAD is not set 1209# CONFIG_CRYPTO_KHAZAD is not set
1116# CONFIG_CRYPTO_ANUBIS is not set 1210# CONFIG_CRYPTO_SALSA20 is not set
1117# CONFIG_CRYPTO_SEED is not set 1211# CONFIG_CRYPTO_SEED is not set
1212# CONFIG_CRYPTO_SERPENT is not set
1213# CONFIG_CRYPTO_TEA is not set
1214# CONFIG_CRYPTO_TWOFISH is not set
1215
1216#
1217# Compression
1218#
1118CONFIG_CRYPTO_DEFLATE=m 1219CONFIG_CRYPTO_DEFLATE=m
1119# CONFIG_CRYPTO_MICHAEL_MIC is not set 1220# CONFIG_CRYPTO_LZO is not set
1120# CONFIG_CRYPTO_CRC32C is not set
1121# CONFIG_CRYPTO_CAMELLIA is not set
1122# CONFIG_CRYPTO_TEST is not set
1123# CONFIG_CRYPTO_AUTHENC is not set
1124# CONFIG_CRYPTO_HW is not set 1221# CONFIG_CRYPTO_HW is not set
1125 1222
1126# 1223#
1127# Library routines 1224# Library routines
1128# 1225#
1129CONFIG_BITREVERSE=y 1226CONFIG_BITREVERSE=y
1227# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1228# CONFIG_GENERIC_FIND_NEXT_BIT is not set
1130CONFIG_CRC_CCITT=m 1229CONFIG_CRC_CCITT=m
1131# CONFIG_CRC16 is not set 1230# CONFIG_CRC16 is not set
1132CONFIG_CRC_ITU_T=m 1231CONFIG_CRC_ITU_T=m
diff --git a/arch/avr32/configs/atstk1003_defconfig b/arch/avr32/configs/atstk1003_defconfig
index 45e23e03f074..5a4ae6b5d28f 100644
--- a/arch/avr32/configs/atstk1003_defconfig
+++ b/arch/avr32/configs/atstk1003_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.24-rc7 3# Linux kernel version: 2.6.26-rc3
4# Wed Jan 9 22:54:34 2008 4# Mon May 26 13:33:05 2008
5# 5#
6CONFIG_AVR32=y 6CONFIG_AVR32=y
7CONFIG_GENERIC_GPIO=y 7CONFIG_GENERIC_GPIO=y
@@ -13,10 +13,10 @@ CONFIG_HARDIRQS_SW_RESEND=y
13CONFIG_GENERIC_IRQ_PROBE=y 13CONFIG_GENERIC_IRQ_PROBE=y
14CONFIG_RWSEM_GENERIC_SPINLOCK=y 14CONFIG_RWSEM_GENERIC_SPINLOCK=y
15CONFIG_GENERIC_TIME=y 15CONFIG_GENERIC_TIME=y
16CONFIG_GENERIC_CLOCKEVENTS=y
16# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 17# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
17# CONFIG_ARCH_HAS_ILOG2_U32 is not set 18# CONFIG_ARCH_HAS_ILOG2_U32 is not set
18# CONFIG_ARCH_HAS_ILOG2_U64 is not set 19# CONFIG_ARCH_HAS_ILOG2_U64 is not set
19CONFIG_ARCH_SUPPORTS_OPROFILE=y
20CONFIG_GENERIC_HWEIGHT=y 20CONFIG_GENERIC_HWEIGHT=y
21CONFIG_GENERIC_CALIBRATE_DELAY=y 21CONFIG_GENERIC_CALIBRATE_DELAY=y
22CONFIG_GENERIC_BUG=y 22CONFIG_GENERIC_BUG=y
@@ -39,17 +39,15 @@ CONFIG_BSD_PROCESS_ACCT_V3=y
39CONFIG_TASKSTATS=y 39CONFIG_TASKSTATS=y
40CONFIG_TASK_DELAY_ACCT=y 40CONFIG_TASK_DELAY_ACCT=y
41# CONFIG_TASK_XACCT is not set 41# CONFIG_TASK_XACCT is not set
42# CONFIG_USER_NS is not set
43# CONFIG_PID_NS is not set
44CONFIG_AUDIT=y 42CONFIG_AUDIT=y
45# CONFIG_IKCONFIG is not set 43# CONFIG_IKCONFIG is not set
46CONFIG_LOG_BUF_SHIFT=14 44CONFIG_LOG_BUF_SHIFT=14
47# CONFIG_CGROUPS is not set 45# CONFIG_CGROUPS is not set
48CONFIG_FAIR_GROUP_SCHED=y 46# CONFIG_GROUP_SCHED is not set
49CONFIG_FAIR_USER_SCHED=y
50# CONFIG_FAIR_CGROUP_SCHED is not set
51CONFIG_SYSFS_DEPRECATED=y 47CONFIG_SYSFS_DEPRECATED=y
48CONFIG_SYSFS_DEPRECATED_V2=y
52CONFIG_RELAY=y 49CONFIG_RELAY=y
50# CONFIG_NAMESPACES is not set
53CONFIG_BLK_DEV_INITRD=y 51CONFIG_BLK_DEV_INITRD=y
54CONFIG_INITRAMFS_SOURCE="" 52CONFIG_INITRAMFS_SOURCE=""
55CONFIG_CC_OPTIMIZE_FOR_SIZE=y 53CONFIG_CC_OPTIMIZE_FOR_SIZE=y
@@ -63,11 +61,13 @@ CONFIG_HOTPLUG=y
63CONFIG_PRINTK=y 61CONFIG_PRINTK=y
64CONFIG_BUG=y 62CONFIG_BUG=y
65CONFIG_ELF_CORE=y 63CONFIG_ELF_CORE=y
64# CONFIG_COMPAT_BRK is not set
66# CONFIG_BASE_FULL is not set 65# CONFIG_BASE_FULL is not set
67CONFIG_FUTEX=y 66CONFIG_FUTEX=y
68CONFIG_ANON_INODES=y 67CONFIG_ANON_INODES=y
69CONFIG_EPOLL=y 68CONFIG_EPOLL=y
70CONFIG_SIGNALFD=y 69CONFIG_SIGNALFD=y
70CONFIG_TIMERFD=y
71CONFIG_EVENTFD=y 71CONFIG_EVENTFD=y
72CONFIG_SHMEM=y 72CONFIG_SHMEM=y
73CONFIG_VM_EVENT_COUNTERS=y 73CONFIG_VM_EVENT_COUNTERS=y
@@ -75,11 +75,20 @@ CONFIG_VM_EVENT_COUNTERS=y
75# CONFIG_SLAB is not set 75# CONFIG_SLAB is not set
76CONFIG_SLUB=y 76CONFIG_SLUB=y
77# CONFIG_SLOB is not set 77# CONFIG_SLOB is not set
78CONFIG_SLABINFO=y 78CONFIG_PROFILING=y
79# CONFIG_MARKERS is not set
80CONFIG_OPROFILE=m
81CONFIG_HAVE_OPROFILE=y
82CONFIG_KPROBES=y
83CONFIG_HAVE_KPROBES=y
84# CONFIG_HAVE_KRETPROBES is not set
85# CONFIG_HAVE_DMA_ATTRS is not set
86CONFIG_PROC_PAGE_MONITOR=y
79CONFIG_RT_MUTEXES=y 87CONFIG_RT_MUTEXES=y
80# CONFIG_TINY_SHMEM is not set 88# CONFIG_TINY_SHMEM is not set
81CONFIG_BASE_SMALL=1 89CONFIG_BASE_SMALL=1
82CONFIG_MODULES=y 90CONFIG_MODULES=y
91# CONFIG_MODULE_FORCE_LOAD is not set
83CONFIG_MODULE_UNLOAD=y 92CONFIG_MODULE_UNLOAD=y
84# CONFIG_MODULE_FORCE_UNLOAD is not set 93# CONFIG_MODULE_FORCE_UNLOAD is not set
85# CONFIG_MODVERSIONS is not set 94# CONFIG_MODVERSIONS is not set
@@ -103,10 +112,15 @@ CONFIG_IOSCHED_CFQ=y
103CONFIG_DEFAULT_CFQ=y 112CONFIG_DEFAULT_CFQ=y
104# CONFIG_DEFAULT_NOOP is not set 113# CONFIG_DEFAULT_NOOP is not set
105CONFIG_DEFAULT_IOSCHED="cfq" 114CONFIG_DEFAULT_IOSCHED="cfq"
115CONFIG_CLASSIC_RCU=y
106 116
107# 117#
108# System Type and features 118# System Type and features
109# 119#
120CONFIG_TICK_ONESHOT=y
121CONFIG_NO_HZ=y
122CONFIG_HIGH_RES_TIMERS=y
123CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
110CONFIG_SUBARCH_AVR32B=y 124CONFIG_SUBARCH_AVR32B=y
111CONFIG_MMU=y 125CONFIG_MMU=y
112CONFIG_PERFORMANCE_COUNTERS=y 126CONFIG_PERFORMANCE_COUNTERS=y
@@ -152,16 +166,19 @@ CONFIG_FLATMEM=y
152CONFIG_FLAT_NODE_MEM_MAP=y 166CONFIG_FLAT_NODE_MEM_MAP=y
153# CONFIG_SPARSEMEM_STATIC is not set 167# CONFIG_SPARSEMEM_STATIC is not set
154# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 168# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
169CONFIG_PAGEFLAGS_EXTENDED=y
155CONFIG_SPLIT_PTLOCK_CPUS=4 170CONFIG_SPLIT_PTLOCK_CPUS=4
156# CONFIG_RESOURCES_64BIT is not set 171# CONFIG_RESOURCES_64BIT is not set
157CONFIG_ZONE_DMA_FLAG=0 172CONFIG_ZONE_DMA_FLAG=0
158CONFIG_VIRT_TO_BUS=y 173CONFIG_VIRT_TO_BUS=y
159# CONFIG_OWNERSHIP_TRACE is not set 174# CONFIG_OWNERSHIP_TRACE is not set
175CONFIG_NMI_DEBUGGING=y
160# CONFIG_HZ_100 is not set 176# CONFIG_HZ_100 is not set
161CONFIG_HZ_250=y 177CONFIG_HZ_250=y
162# CONFIG_HZ_300 is not set 178# CONFIG_HZ_300 is not set
163# CONFIG_HZ_1000 is not set 179# CONFIG_HZ_1000 is not set
164CONFIG_HZ=250 180CONFIG_HZ=250
181# CONFIG_SCHED_HRTICK is not set
165CONFIG_CMDLINE="" 182CONFIG_CMDLINE=""
166 183
167# 184#
@@ -175,9 +192,10 @@ CONFIG_CPU_FREQ=y
175CONFIG_CPU_FREQ_TABLE=y 192CONFIG_CPU_FREQ_TABLE=y
176# CONFIG_CPU_FREQ_DEBUG is not set 193# CONFIG_CPU_FREQ_DEBUG is not set
177# CONFIG_CPU_FREQ_STAT is not set 194# CONFIG_CPU_FREQ_STAT is not set
178CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y 195# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
196# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
179# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set 197# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
180# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set 198CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
181# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set 199# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
182CONFIG_CPU_FREQ_GOV_PERFORMANCE=y 200CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
183# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set 201# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
@@ -234,8 +252,6 @@ CONFIG_TCP_CONG_CUBIC=y
234CONFIG_DEFAULT_TCP_CONG="cubic" 252CONFIG_DEFAULT_TCP_CONG="cubic"
235# CONFIG_TCP_MD5SIG is not set 253# CONFIG_TCP_MD5SIG is not set
236# CONFIG_IPV6 is not set 254# CONFIG_IPV6 is not set
237# CONFIG_INET6_XFRM_TUNNEL is not set
238# CONFIG_INET6_TUNNEL is not set
239# CONFIG_NETWORK_SECMARK is not set 255# CONFIG_NETWORK_SECMARK is not set
240# CONFIG_NETFILTER is not set 256# CONFIG_NETFILTER is not set
241# CONFIG_IP_DCCP is not set 257# CONFIG_IP_DCCP is not set
@@ -260,6 +276,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
260# CONFIG_NET_PKTGEN is not set 276# CONFIG_NET_PKTGEN is not set
261# CONFIG_NET_TCPPROBE is not set 277# CONFIG_NET_TCPPROBE is not set
262# CONFIG_HAMRADIO is not set 278# CONFIG_HAMRADIO is not set
279# CONFIG_CAN is not set
263# CONFIG_IRDA is not set 280# CONFIG_IRDA is not set
264# CONFIG_BT is not set 281# CONFIG_BT is not set
265# CONFIG_AF_RXRPC is not set 282# CONFIG_AF_RXRPC is not set
@@ -295,6 +312,7 @@ CONFIG_MTD=y
295CONFIG_MTD_PARTITIONS=y 312CONFIG_MTD_PARTITIONS=y
296# CONFIG_MTD_REDBOOT_PARTS is not set 313# CONFIG_MTD_REDBOOT_PARTS is not set
297CONFIG_MTD_CMDLINE_PARTS=y 314CONFIG_MTD_CMDLINE_PARTS=y
315# CONFIG_MTD_AR7_PARTS is not set
298 316
299# 317#
300# User Modules And Translation Layers 318# User Modules And Translation Layers
@@ -349,6 +367,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
349# 367#
350CONFIG_MTD_DATAFLASH=m 368CONFIG_MTD_DATAFLASH=m
351CONFIG_MTD_M25P80=m 369CONFIG_MTD_M25P80=m
370CONFIG_M25PXX_USE_FAST_READ=y
352# CONFIG_MTD_SLRAM is not set 371# CONFIG_MTD_SLRAM is not set
353# CONFIG_MTD_PHRAM is not set 372# CONFIG_MTD_PHRAM is not set
354# CONFIG_MTD_MTDRAM is not set 373# CONFIG_MTD_MTDRAM is not set
@@ -376,13 +395,18 @@ CONFIG_BLK_DEV_NBD=m
376CONFIG_BLK_DEV_RAM=m 395CONFIG_BLK_DEV_RAM=m
377CONFIG_BLK_DEV_RAM_COUNT=16 396CONFIG_BLK_DEV_RAM_COUNT=16
378CONFIG_BLK_DEV_RAM_SIZE=4096 397CONFIG_BLK_DEV_RAM_SIZE=4096
379CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 398# CONFIG_BLK_DEV_XIP is not set
380# CONFIG_CDROM_PKTCDVD is not set 399# CONFIG_CDROM_PKTCDVD is not set
381# CONFIG_ATA_OVER_ETH is not set 400# CONFIG_ATA_OVER_ETH is not set
382CONFIG_MISC_DEVICES=y 401CONFIG_MISC_DEVICES=y
402CONFIG_ATMEL_PWM=m
403CONFIG_ATMEL_TCLIB=y
404CONFIG_ATMEL_TCB_CLKSRC=y
405CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0
383# CONFIG_EEPROM_93CX6 is not set 406# CONFIG_EEPROM_93CX6 is not set
384CONFIG_ATMEL_SSC=m 407CONFIG_ATMEL_SSC=m
385# CONFIG_IDE is not set 408# CONFIG_ENCLOSURE_SERVICES is not set
409# CONFIG_HAVE_IDE is not set
386 410
387# 411#
388# SCSI device support 412# SCSI device support
@@ -427,6 +451,9 @@ CONFIG_SCSI_LOWLEVEL=y
427# CONFIG_SCSI_DEBUG is not set 451# CONFIG_SCSI_DEBUG is not set
428CONFIG_ATA=m 452CONFIG_ATA=m
429# CONFIG_ATA_NONSTANDARD is not set 453# CONFIG_ATA_NONSTANDARD is not set
454# CONFIG_SATA_PMP is not set
455CONFIG_ATA_SFF=y
456# CONFIG_SATA_MV is not set
430CONFIG_PATA_AT32=m 457CONFIG_PATA_AT32=m
431# CONFIG_PATA_PLATFORM is not set 458# CONFIG_PATA_PLATFORM is not set
432# CONFIG_MD is not set 459# CONFIG_MD is not set
@@ -447,6 +474,7 @@ CONFIG_NETDEVICES=y
447# 474#
448# CONFIG_WLAN_PRE80211 is not set 475# CONFIG_WLAN_PRE80211 is not set
449# CONFIG_WLAN_80211 is not set 476# CONFIG_WLAN_80211 is not set
477# CONFIG_IWLWIFI_LEDS is not set
450# CONFIG_WAN is not set 478# CONFIG_WAN is not set
451CONFIG_PPP=m 479CONFIG_PPP=m
452# CONFIG_PPP_MULTILINK is not set 480# CONFIG_PPP_MULTILINK is not set
@@ -460,7 +488,6 @@ CONFIG_PPP_BSDCOMP=m
460# CONFIG_PPPOL2TP is not set 488# CONFIG_PPPOL2TP is not set
461# CONFIG_SLIP is not set 489# CONFIG_SLIP is not set
462CONFIG_SLHC=m 490CONFIG_SLHC=m
463# CONFIG_SHAPER is not set
464# CONFIG_NETCONSOLE is not set 491# CONFIG_NETCONSOLE is not set
465# CONFIG_NETPOLL is not set 492# CONFIG_NETPOLL is not set
466# CONFIG_NET_POLL_CONTROLLER is not set 493# CONFIG_NET_POLL_CONTROLLER is not set
@@ -516,6 +543,7 @@ CONFIG_MOUSE_GPIO=m
516# Character devices 543# Character devices
517# 544#
518# CONFIG_VT is not set 545# CONFIG_VT is not set
546# CONFIG_DEVKMEM is not set
519# CONFIG_SERIAL_NONSTANDARD is not set 547# CONFIG_SERIAL_NONSTANDARD is not set
520 548
521# 549#
@@ -528,6 +556,7 @@ CONFIG_MOUSE_GPIO=m
528# 556#
529CONFIG_SERIAL_ATMEL=y 557CONFIG_SERIAL_ATMEL=y
530CONFIG_SERIAL_ATMEL_CONSOLE=y 558CONFIG_SERIAL_ATMEL_CONSOLE=y
559CONFIG_SERIAL_ATMEL_PDC=y
531# CONFIG_SERIAL_ATMEL_TTYAT is not set 560# CONFIG_SERIAL_ATMEL_TTYAT is not set
532CONFIG_SERIAL_CORE=y 561CONFIG_SERIAL_CORE=y
533CONFIG_SERIAL_CORE_CONSOLE=y 562CONFIG_SERIAL_CORE_CONSOLE=y
@@ -535,21 +564,13 @@ CONFIG_UNIX98_PTYS=y
535# CONFIG_LEGACY_PTYS is not set 564# CONFIG_LEGACY_PTYS is not set
536# CONFIG_IPMI_HANDLER is not set 565# CONFIG_IPMI_HANDLER is not set
537# CONFIG_HW_RANDOM is not set 566# CONFIG_HW_RANDOM is not set
538# CONFIG_RTC is not set
539# CONFIG_GEN_RTC is not set
540# CONFIG_R3964 is not set 567# CONFIG_R3964 is not set
541# CONFIG_RAW_DRIVER is not set 568# CONFIG_RAW_DRIVER is not set
542# CONFIG_TCG_TPM is not set 569# CONFIG_TCG_TPM is not set
543CONFIG_I2C=m 570CONFIG_I2C=m
544CONFIG_I2C_BOARDINFO=y 571CONFIG_I2C_BOARDINFO=y
545CONFIG_I2C_CHARDEV=m 572CONFIG_I2C_CHARDEV=m
546
547#
548# I2C Algorithms
549#
550CONFIG_I2C_ALGOBIT=m 573CONFIG_I2C_ALGOBIT=m
551# CONFIG_I2C_ALGOPCF is not set
552# CONFIG_I2C_ALGOPCA is not set
553 574
554# 575#
555# I2C Hardware Bus support 576# I2C Hardware Bus support
@@ -560,27 +581,23 @@ CONFIG_I2C_GPIO=m
560# CONFIG_I2C_SIMTEC is not set 581# CONFIG_I2C_SIMTEC is not set
561# CONFIG_I2C_TAOS_EVM is not set 582# CONFIG_I2C_TAOS_EVM is not set
562# CONFIG_I2C_STUB is not set 583# CONFIG_I2C_STUB is not set
584# CONFIG_I2C_PCA_PLATFORM is not set
563 585
564# 586#
565# Miscellaneous I2C Chip support 587# Miscellaneous I2C Chip support
566# 588#
567# CONFIG_SENSORS_DS1337 is not set
568# CONFIG_SENSORS_DS1374 is not set
569# CONFIG_DS1682 is not set 589# CONFIG_DS1682 is not set
570# CONFIG_SENSORS_EEPROM is not set 590# CONFIG_SENSORS_EEPROM is not set
571# CONFIG_SENSORS_PCF8574 is not set 591# CONFIG_SENSORS_PCF8574 is not set
572# CONFIG_SENSORS_PCA9539 is not set 592# CONFIG_PCF8575 is not set
573# CONFIG_SENSORS_PCF8591 is not set 593# CONFIG_SENSORS_PCF8591 is not set
594# CONFIG_TPS65010 is not set
574# CONFIG_SENSORS_MAX6875 is not set 595# CONFIG_SENSORS_MAX6875 is not set
575# CONFIG_SENSORS_TSL2550 is not set 596# CONFIG_SENSORS_TSL2550 is not set
576# CONFIG_I2C_DEBUG_CORE is not set 597# CONFIG_I2C_DEBUG_CORE is not set
577# CONFIG_I2C_DEBUG_ALGO is not set 598# CONFIG_I2C_DEBUG_ALGO is not set
578# CONFIG_I2C_DEBUG_BUS is not set 599# CONFIG_I2C_DEBUG_BUS is not set
579# CONFIG_I2C_DEBUG_CHIP is not set 600# CONFIG_I2C_DEBUG_CHIP is not set
580
581#
582# SPI support
583#
584CONFIG_SPI=y 601CONFIG_SPI=y
585# CONFIG_SPI_DEBUG is not set 602# CONFIG_SPI_DEBUG is not set
586CONFIG_SPI_MASTER=y 603CONFIG_SPI_MASTER=y
@@ -597,9 +614,27 @@ CONFIG_SPI_ATMEL=y
597# CONFIG_SPI_AT25 is not set 614# CONFIG_SPI_AT25 is not set
598CONFIG_SPI_SPIDEV=m 615CONFIG_SPI_SPIDEV=m
599# CONFIG_SPI_TLE62X0 is not set 616# CONFIG_SPI_TLE62X0 is not set
617CONFIG_HAVE_GPIO_LIB=y
618
619#
620# GPIO Support
621#
622# CONFIG_DEBUG_GPIO is not set
623
624#
625# I2C GPIO expanders:
626#
627# CONFIG_GPIO_PCA953X is not set
628# CONFIG_GPIO_PCF857X is not set
629
630#
631# SPI GPIO expanders:
632#
633# CONFIG_GPIO_MCP23S08 is not set
600# CONFIG_W1 is not set 634# CONFIG_W1 is not set
601# CONFIG_POWER_SUPPLY is not set 635# CONFIG_POWER_SUPPLY is not set
602# CONFIG_HWMON is not set 636# CONFIG_HWMON is not set
637# CONFIG_THERMAL is not set
603CONFIG_WATCHDOG=y 638CONFIG_WATCHDOG=y
604# CONFIG_WATCHDOG_NOWAYOUT is not set 639# CONFIG_WATCHDOG_NOWAYOUT is not set
605 640
@@ -619,12 +654,22 @@ CONFIG_SSB_POSSIBLE=y
619# Multifunction device drivers 654# Multifunction device drivers
620# 655#
621# CONFIG_MFD_SM501 is not set 656# CONFIG_MFD_SM501 is not set
657# CONFIG_HTC_PASIC3 is not set
622 658
623# 659#
624# Multimedia devices 660# Multimedia devices
625# 661#
662
663#
664# Multimedia core support
665#
626# CONFIG_VIDEO_DEV is not set 666# CONFIG_VIDEO_DEV is not set
627# CONFIG_DVB_CORE is not set 667# CONFIG_DVB_CORE is not set
668# CONFIG_VIDEO_MEDIA is not set
669
670#
671# Multimedia drivers
672#
628# CONFIG_DAB is not set 673# CONFIG_DAB is not set
629 674
630# 675#
@@ -682,7 +727,11 @@ CONFIG_SND_AT73C213_TARGET_BITRATE=48000
682# CONFIG_SND_SOC is not set 727# CONFIG_SND_SOC is not set
683 728
684# 729#
685# SoC Audio support for SuperH 730# ALSA SoC audio for Freescale SOCs
731#
732
733#
734# SoC Audio for the Texas Instruments OMAP
686# 735#
687 736
688# 737#
@@ -694,14 +743,12 @@ CONFIG_USB_SUPPORT=y
694# CONFIG_USB_ARCH_HAS_HCD is not set 743# CONFIG_USB_ARCH_HAS_HCD is not set
695# CONFIG_USB_ARCH_HAS_OHCI is not set 744# CONFIG_USB_ARCH_HAS_OHCI is not set
696# CONFIG_USB_ARCH_HAS_EHCI is not set 745# CONFIG_USB_ARCH_HAS_EHCI is not set
746# CONFIG_USB_OTG_WHITELIST is not set
747# CONFIG_USB_OTG_BLACKLIST_HUB is not set
697 748
698# 749#
699# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 750# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
700# 751#
701
702#
703# USB Gadget Support
704#
705CONFIG_USB_GADGET=y 752CONFIG_USB_GADGET=y
706# CONFIG_USB_GADGET_DEBUG is not set 753# CONFIG_USB_GADGET_DEBUG is not set
707# CONFIG_USB_GADGET_DEBUG_FILES is not set 754# CONFIG_USB_GADGET_DEBUG_FILES is not set
@@ -714,6 +761,7 @@ CONFIG_USB_ATMEL_USBA=y
714# CONFIG_USB_GADGET_NET2280 is not set 761# CONFIG_USB_GADGET_NET2280 is not set
715# CONFIG_USB_GADGET_PXA2XX is not set 762# CONFIG_USB_GADGET_PXA2XX is not set
716# CONFIG_USB_GADGET_M66592 is not set 763# CONFIG_USB_GADGET_M66592 is not set
764# CONFIG_USB_GADGET_PXA27X is not set
717# CONFIG_USB_GADGET_GOKU is not set 765# CONFIG_USB_GADGET_GOKU is not set
718# CONFIG_USB_GADGET_LH7A40X is not set 766# CONFIG_USB_GADGET_LH7A40X is not set
719# CONFIG_USB_GADGET_OMAP is not set 767# CONFIG_USB_GADGET_OMAP is not set
@@ -729,6 +777,7 @@ CONFIG_USB_FILE_STORAGE=m
729# CONFIG_USB_FILE_STORAGE_TEST is not set 777# CONFIG_USB_FILE_STORAGE_TEST is not set
730CONFIG_USB_G_SERIAL=m 778CONFIG_USB_G_SERIAL=m
731# CONFIG_USB_MIDI_GADGET is not set 779# CONFIG_USB_MIDI_GADGET is not set
780# CONFIG_USB_G_PRINTER is not set
732CONFIG_MMC=m 781CONFIG_MMC=m
733# CONFIG_MMC_DEBUG is not set 782# CONFIG_MMC_DEBUG is not set
734# CONFIG_MMC_UNSAFE_RESUME is not set 783# CONFIG_MMC_UNSAFE_RESUME is not set
@@ -739,17 +788,20 @@ CONFIG_MMC=m
739CONFIG_MMC_BLOCK=m 788CONFIG_MMC_BLOCK=m
740# CONFIG_MMC_BLOCK_BOUNCE is not set 789# CONFIG_MMC_BLOCK_BOUNCE is not set
741# CONFIG_SDIO_UART is not set 790# CONFIG_SDIO_UART is not set
791# CONFIG_MMC_TEST is not set
742 792
743# 793#
744# MMC/SD Host Controller Drivers 794# MMC/SD Host Controller Drivers
745# 795#
746CONFIG_MMC_SPI=m 796CONFIG_MMC_SPI=m
797# CONFIG_MEMSTICK is not set
747CONFIG_NEW_LEDS=y 798CONFIG_NEW_LEDS=y
748CONFIG_LEDS_CLASS=y 799CONFIG_LEDS_CLASS=y
749 800
750# 801#
751# LED drivers 802# LED drivers
752# 803#
804CONFIG_LEDS_ATMEL_PWM=m
753CONFIG_LEDS_GPIO=y 805CONFIG_LEDS_GPIO=y
754 806
755# 807#
@@ -758,6 +810,8 @@ CONFIG_LEDS_GPIO=y
758CONFIG_LEDS_TRIGGERS=y 810CONFIG_LEDS_TRIGGERS=y
759CONFIG_LEDS_TRIGGER_TIMER=y 811CONFIG_LEDS_TRIGGER_TIMER=y
760CONFIG_LEDS_TRIGGER_HEARTBEAT=y 812CONFIG_LEDS_TRIGGER_HEARTBEAT=y
813CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
814# CONFIG_ACCESSIBILITY is not set
761CONFIG_RTC_LIB=y 815CONFIG_RTC_LIB=y
762CONFIG_RTC_CLASS=y 816CONFIG_RTC_CLASS=y
763CONFIG_RTC_HCTOSYS=y 817CONFIG_RTC_HCTOSYS=y
@@ -786,19 +840,22 @@ CONFIG_RTC_INTF_DEV=y
786# CONFIG_RTC_DRV_PCF8563 is not set 840# CONFIG_RTC_DRV_PCF8563 is not set
787# CONFIG_RTC_DRV_PCF8583 is not set 841# CONFIG_RTC_DRV_PCF8583 is not set
788# CONFIG_RTC_DRV_M41T80 is not set 842# CONFIG_RTC_DRV_M41T80 is not set
843# CONFIG_RTC_DRV_S35390A is not set
789 844
790# 845#
791# SPI RTC drivers 846# SPI RTC drivers
792# 847#
793# CONFIG_RTC_DRV_RS5C348 is not set
794# CONFIG_RTC_DRV_MAX6902 is not set 848# CONFIG_RTC_DRV_MAX6902 is not set
849# CONFIG_RTC_DRV_R9701 is not set
850# CONFIG_RTC_DRV_RS5C348 is not set
795 851
796# 852#
797# Platform RTC drivers 853# Platform RTC drivers
798# 854#
855# CONFIG_RTC_DRV_DS1511 is not set
799# CONFIG_RTC_DRV_DS1553 is not set 856# CONFIG_RTC_DRV_DS1553 is not set
800# CONFIG_RTC_DRV_STK17TA8 is not set
801# CONFIG_RTC_DRV_DS1742 is not set 857# CONFIG_RTC_DRV_DS1742 is not set
858# CONFIG_RTC_DRV_STK17TA8 is not set
802# CONFIG_RTC_DRV_M48T86 is not set 859# CONFIG_RTC_DRV_M48T86 is not set
803# CONFIG_RTC_DRV_M48T59 is not set 860# CONFIG_RTC_DRV_M48T59 is not set
804# CONFIG_RTC_DRV_V3020 is not set 861# CONFIG_RTC_DRV_V3020 is not set
@@ -807,11 +864,8 @@ CONFIG_RTC_INTF_DEV=y
807# on-CPU RTC drivers 864# on-CPU RTC drivers
808# 865#
809CONFIG_RTC_DRV_AT32AP700X=y 866CONFIG_RTC_DRV_AT32AP700X=y
810
811#
812# Userspace I/O
813#
814CONFIG_UIO=m 867CONFIG_UIO=m
868# CONFIG_UIO_SMX is not set
815 869
816# 870#
817# File systems 871# File systems
@@ -828,14 +882,11 @@ CONFIG_JBD=m
828# CONFIG_JFS_FS is not set 882# CONFIG_JFS_FS is not set
829# CONFIG_FS_POSIX_ACL is not set 883# CONFIG_FS_POSIX_ACL is not set
830# CONFIG_XFS_FS is not set 884# CONFIG_XFS_FS is not set
831# CONFIG_GFS2_FS is not set
832# CONFIG_OCFS2_FS is not set 885# CONFIG_OCFS2_FS is not set
833# CONFIG_MINIX_FS is not set 886# CONFIG_DNOTIFY is not set
834# CONFIG_ROMFS_FS is not set
835CONFIG_INOTIFY=y 887CONFIG_INOTIFY=y
836CONFIG_INOTIFY_USER=y 888CONFIG_INOTIFY_USER=y
837# CONFIG_QUOTA is not set 889# CONFIG_QUOTA is not set
838# CONFIG_DNOTIFY is not set
839# CONFIG_AUTOFS_FS is not set 890# CONFIG_AUTOFS_FS is not set
840# CONFIG_AUTOFS4_FS is not set 891# CONFIG_AUTOFS4_FS is not set
841CONFIG_FUSE_FS=m 892CONFIG_FUSE_FS=m
@@ -891,8 +942,10 @@ CONFIG_JFFS2_RTIME=y
891# CONFIG_JFFS2_RUBIN is not set 942# CONFIG_JFFS2_RUBIN is not set
892# CONFIG_CRAMFS is not set 943# CONFIG_CRAMFS is not set
893# CONFIG_VXFS_FS is not set 944# CONFIG_VXFS_FS is not set
945# CONFIG_MINIX_FS is not set
894# CONFIG_HPFS_FS is not set 946# CONFIG_HPFS_FS is not set
895# CONFIG_QNX4FS_FS is not set 947# CONFIG_QNX4FS_FS is not set
948# CONFIG_ROMFS_FS is not set
896# CONFIG_SYSV_FS is not set 949# CONFIG_SYSV_FS is not set
897# CONFIG_UFS_FS is not set 950# CONFIG_UFS_FS is not set
898# CONFIG_NETWORK_FILESYSTEMS is not set 951# CONFIG_NETWORK_FILESYSTEMS is not set
@@ -943,11 +996,6 @@ CONFIG_NLS_ISO8859_1=m
943# CONFIG_NLS_KOI8_U is not set 996# CONFIG_NLS_KOI8_U is not set
944CONFIG_NLS_UTF8=m 997CONFIG_NLS_UTF8=m
945# CONFIG_DLM is not set 998# CONFIG_DLM is not set
946CONFIG_INSTRUMENTATION=y
947CONFIG_PROFILING=y
948CONFIG_OPROFILE=m
949CONFIG_KPROBES=y
950# CONFIG_MARKERS is not set
951 999
952# 1000#
953# Kernel hacking 1001# Kernel hacking
@@ -955,6 +1003,7 @@ CONFIG_KPROBES=y
955# CONFIG_PRINTK_TIME is not set 1003# CONFIG_PRINTK_TIME is not set
956CONFIG_ENABLE_WARN_DEPRECATED=y 1004CONFIG_ENABLE_WARN_DEPRECATED=y
957CONFIG_ENABLE_MUST_CHECK=y 1005CONFIG_ENABLE_MUST_CHECK=y
1006CONFIG_FRAME_WARN=1024
958CONFIG_MAGIC_SYSRQ=y 1007CONFIG_MAGIC_SYSRQ=y
959# CONFIG_UNUSED_SYMBOLS is not set 1008# CONFIG_UNUSED_SYMBOLS is not set
960CONFIG_DEBUG_FS=y 1009CONFIG_DEBUG_FS=y
@@ -965,6 +1014,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
965CONFIG_SCHED_DEBUG=y 1014CONFIG_SCHED_DEBUG=y
966# CONFIG_SCHEDSTATS is not set 1015# CONFIG_SCHEDSTATS is not set
967# CONFIG_TIMER_STATS is not set 1016# CONFIG_TIMER_STATS is not set
1017# CONFIG_DEBUG_OBJECTS is not set
968# CONFIG_DEBUG_RT_MUTEXES is not set 1018# CONFIG_DEBUG_RT_MUTEXES is not set
969# CONFIG_RT_MUTEX_TESTER is not set 1019# CONFIG_RT_MUTEX_TESTER is not set
970# CONFIG_DEBUG_SPINLOCK is not set 1020# CONFIG_DEBUG_SPINLOCK is not set
@@ -978,12 +1028,14 @@ CONFIG_SCHED_DEBUG=y
978CONFIG_DEBUG_BUGVERBOSE=y 1028CONFIG_DEBUG_BUGVERBOSE=y
979# CONFIG_DEBUG_INFO is not set 1029# CONFIG_DEBUG_INFO is not set
980# CONFIG_DEBUG_VM is not set 1030# CONFIG_DEBUG_VM is not set
1031# CONFIG_DEBUG_WRITECOUNT is not set
981# CONFIG_DEBUG_LIST is not set 1032# CONFIG_DEBUG_LIST is not set
982# CONFIG_DEBUG_SG is not set 1033# CONFIG_DEBUG_SG is not set
983CONFIG_FRAME_POINTER=y 1034CONFIG_FRAME_POINTER=y
984CONFIG_FORCED_INLINING=y
985# CONFIG_BOOT_PRINTK_DELAY is not set 1035# CONFIG_BOOT_PRINTK_DELAY is not set
986# CONFIG_RCU_TORTURE_TEST is not set 1036# CONFIG_RCU_TORTURE_TEST is not set
1037# CONFIG_KPROBES_SANITY_TEST is not set
1038# CONFIG_BACKTRACE_SELF_TEST is not set
987# CONFIG_LKDTM is not set 1039# CONFIG_LKDTM is not set
988# CONFIG_FAULT_INJECTION is not set 1040# CONFIG_FAULT_INJECTION is not set
989# CONFIG_SAMPLES is not set 1041# CONFIG_SAMPLES is not set
@@ -1000,6 +1052,8 @@ CONFIG_FORCED_INLINING=y
1000# Library routines 1052# Library routines
1001# 1053#
1002CONFIG_BITREVERSE=y 1054CONFIG_BITREVERSE=y
1055# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1056# CONFIG_GENERIC_FIND_NEXT_BIT is not set
1003CONFIG_CRC_CCITT=m 1057CONFIG_CRC_CCITT=m
1004# CONFIG_CRC16 is not set 1058# CONFIG_CRC16 is not set
1005CONFIG_CRC_ITU_T=m 1059CONFIG_CRC_ITU_T=m
diff --git a/arch/avr32/configs/atstk1004_defconfig b/arch/avr32/configs/atstk1004_defconfig
index 634c52760349..a0912fb7c92e 100644
--- a/arch/avr32/configs/atstk1004_defconfig
+++ b/arch/avr32/configs/atstk1004_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.24-rc7 3# Linux kernel version: 2.6.26-rc3
4# Wed Jan 9 23:04:20 2008 4# Mon May 26 13:34:57 2008
5# 5#
6CONFIG_AVR32=y 6CONFIG_AVR32=y
7CONFIG_GENERIC_GPIO=y 7CONFIG_GENERIC_GPIO=y
@@ -13,10 +13,10 @@ CONFIG_HARDIRQS_SW_RESEND=y
13CONFIG_GENERIC_IRQ_PROBE=y 13CONFIG_GENERIC_IRQ_PROBE=y
14CONFIG_RWSEM_GENERIC_SPINLOCK=y 14CONFIG_RWSEM_GENERIC_SPINLOCK=y
15CONFIG_GENERIC_TIME=y 15CONFIG_GENERIC_TIME=y
16CONFIG_GENERIC_CLOCKEVENTS=y
16# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 17# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
17# CONFIG_ARCH_HAS_ILOG2_U32 is not set 18# CONFIG_ARCH_HAS_ILOG2_U32 is not set
18# CONFIG_ARCH_HAS_ILOG2_U64 is not set 19# CONFIG_ARCH_HAS_ILOG2_U64 is not set
19CONFIG_ARCH_SUPPORTS_OPROFILE=y
20CONFIG_GENERIC_HWEIGHT=y 20CONFIG_GENERIC_HWEIGHT=y
21CONFIG_GENERIC_CALIBRATE_DELAY=y 21CONFIG_GENERIC_CALIBRATE_DELAY=y
22CONFIG_GENERIC_BUG=y 22CONFIG_GENERIC_BUG=y
@@ -34,15 +34,15 @@ CONFIG_LOCALVERSION=""
34# CONFIG_POSIX_MQUEUE is not set 34# CONFIG_POSIX_MQUEUE is not set
35# CONFIG_BSD_PROCESS_ACCT is not set 35# CONFIG_BSD_PROCESS_ACCT is not set
36# CONFIG_TASKSTATS is not set 36# CONFIG_TASKSTATS is not set
37# CONFIG_USER_NS is not set
38# CONFIG_PID_NS is not set
39# CONFIG_AUDIT is not set 37# CONFIG_AUDIT is not set
40# CONFIG_IKCONFIG is not set 38# CONFIG_IKCONFIG is not set
41CONFIG_LOG_BUF_SHIFT=14 39CONFIG_LOG_BUF_SHIFT=14
42# CONFIG_CGROUPS is not set 40# CONFIG_CGROUPS is not set
43# CONFIG_FAIR_GROUP_SCHED is not set 41# CONFIG_GROUP_SCHED is not set
44CONFIG_SYSFS_DEPRECATED=y 42CONFIG_SYSFS_DEPRECATED=y
43CONFIG_SYSFS_DEPRECATED_V2=y
45# CONFIG_RELAY is not set 44# CONFIG_RELAY is not set
45# CONFIG_NAMESPACES is not set
46# CONFIG_BLK_DEV_INITRD is not set 46# CONFIG_BLK_DEV_INITRD is not set
47CONFIG_CC_OPTIMIZE_FOR_SIZE=y 47CONFIG_CC_OPTIMIZE_FOR_SIZE=y
48CONFIG_SYSCTL=y 48CONFIG_SYSCTL=y
@@ -54,24 +54,38 @@ CONFIG_HOTPLUG=y
54CONFIG_PRINTK=y 54CONFIG_PRINTK=y
55CONFIG_BUG=y 55CONFIG_BUG=y
56CONFIG_ELF_CORE=y 56CONFIG_ELF_CORE=y
57# CONFIG_COMPAT_BRK is not set
57# CONFIG_BASE_FULL is not set 58# CONFIG_BASE_FULL is not set
58# CONFIG_FUTEX is not set 59# CONFIG_FUTEX is not set
59# CONFIG_EPOLL is not set 60# CONFIG_EPOLL is not set
60# CONFIG_SIGNALFD is not set 61# CONFIG_SIGNALFD is not set
62# CONFIG_TIMERFD is not set
61# CONFIG_EVENTFD is not set 63# CONFIG_EVENTFD is not set
62CONFIG_SHMEM=y 64CONFIG_SHMEM=y
63CONFIG_VM_EVENT_COUNTERS=y 65CONFIG_VM_EVENT_COUNTERS=y
64# CONFIG_SLAB is not set 66# CONFIG_SLAB is not set
65# CONFIG_SLUB is not set 67# CONFIG_SLUB is not set
66CONFIG_SLOB=y 68CONFIG_SLOB=y
69# CONFIG_PROFILING is not set
70# CONFIG_MARKERS is not set
71CONFIG_HAVE_OPROFILE=y
72CONFIG_HAVE_KPROBES=y
73# CONFIG_HAVE_KRETPROBES is not set
74# CONFIG_HAVE_DMA_ATTRS is not set
75# CONFIG_PROC_PAGE_MONITOR is not set
67# CONFIG_TINY_SHMEM is not set 76# CONFIG_TINY_SHMEM is not set
68CONFIG_BASE_SMALL=1 77CONFIG_BASE_SMALL=1
69# CONFIG_MODULES is not set 78# CONFIG_MODULES is not set
70# CONFIG_BLOCK is not set 79# CONFIG_BLOCK is not set
80CONFIG_CLASSIC_RCU=y
71 81
72# 82#
73# System Type and features 83# System Type and features
74# 84#
85# CONFIG_TICK_ONESHOT is not set
86# CONFIG_NO_HZ is not set
87# CONFIG_HIGH_RES_TIMERS is not set
88CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
75CONFIG_SUBARCH_AVR32B=y 89CONFIG_SUBARCH_AVR32B=y
76CONFIG_MMU=y 90CONFIG_MMU=y
77CONFIG_PERFORMANCE_COUNTERS=y 91CONFIG_PERFORMANCE_COUNTERS=y
@@ -115,16 +129,19 @@ CONFIG_FLATMEM=y
115CONFIG_FLAT_NODE_MEM_MAP=y 129CONFIG_FLAT_NODE_MEM_MAP=y
116# CONFIG_SPARSEMEM_STATIC is not set 130# CONFIG_SPARSEMEM_STATIC is not set
117# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 131# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
132CONFIG_PAGEFLAGS_EXTENDED=y
118CONFIG_SPLIT_PTLOCK_CPUS=4 133CONFIG_SPLIT_PTLOCK_CPUS=4
119# CONFIG_RESOURCES_64BIT is not set 134# CONFIG_RESOURCES_64BIT is not set
120CONFIG_ZONE_DMA_FLAG=0 135CONFIG_ZONE_DMA_FLAG=0
121CONFIG_VIRT_TO_BUS=y 136CONFIG_VIRT_TO_BUS=y
122# CONFIG_OWNERSHIP_TRACE is not set 137# CONFIG_OWNERSHIP_TRACE is not set
138# CONFIG_NMI_DEBUGGING is not set
123# CONFIG_HZ_100 is not set 139# CONFIG_HZ_100 is not set
124CONFIG_HZ_250=y 140CONFIG_HZ_250=y
125# CONFIG_HZ_300 is not set 141# CONFIG_HZ_300 is not set
126# CONFIG_HZ_1000 is not set 142# CONFIG_HZ_1000 is not set
127CONFIG_HZ=250 143CONFIG_HZ=250
144# CONFIG_SCHED_HRTICK is not set
128CONFIG_CMDLINE="" 145CONFIG_CMDLINE=""
129 146
130# 147#
@@ -134,20 +151,7 @@ CONFIG_CMDLINE=""
134# 151#
135# CPU Frequency scaling 152# CPU Frequency scaling
136# 153#
137CONFIG_CPU_FREQ=y 154# CONFIG_CPU_FREQ is not set
138CONFIG_CPU_FREQ_TABLE=y
139# CONFIG_CPU_FREQ_DEBUG is not set
140# CONFIG_CPU_FREQ_STAT is not set
141CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
142# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
143# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
144# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
145CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
146# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
147CONFIG_CPU_FREQ_GOV_USERSPACE=y
148CONFIG_CPU_FREQ_GOV_ONDEMAND=y
149# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
150CONFIG_CPU_FREQ_AT32AP=y
151 155
152# 156#
153# Bus options 157# Bus options
@@ -197,8 +201,6 @@ CONFIG_TCP_CONG_CUBIC=y
197CONFIG_DEFAULT_TCP_CONG="cubic" 201CONFIG_DEFAULT_TCP_CONG="cubic"
198# CONFIG_TCP_MD5SIG is not set 202# CONFIG_TCP_MD5SIG is not set
199# CONFIG_IPV6 is not set 203# CONFIG_IPV6 is not set
200# CONFIG_INET6_XFRM_TUNNEL is not set
201# CONFIG_INET6_TUNNEL is not set
202# CONFIG_NETWORK_SECMARK is not set 204# CONFIG_NETWORK_SECMARK is not set
203# CONFIG_NETFILTER is not set 205# CONFIG_NETFILTER is not set
204# CONFIG_IP_DCCP is not set 206# CONFIG_IP_DCCP is not set
@@ -222,6 +224,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
222# 224#
223# CONFIG_NET_PKTGEN is not set 225# CONFIG_NET_PKTGEN is not set
224# CONFIG_HAMRADIO is not set 226# CONFIG_HAMRADIO is not set
227# CONFIG_CAN is not set
225# CONFIG_IRDA is not set 228# CONFIG_IRDA is not set
226# CONFIG_BT is not set 229# CONFIG_BT is not set
227# CONFIG_AF_RXRPC is not set 230# CONFIG_AF_RXRPC is not set
@@ -255,6 +258,7 @@ CONFIG_MTD=y
255CONFIG_MTD_PARTITIONS=y 258CONFIG_MTD_PARTITIONS=y
256# CONFIG_MTD_REDBOOT_PARTS is not set 259# CONFIG_MTD_REDBOOT_PARTS is not set
257CONFIG_MTD_CMDLINE_PARTS=y 260CONFIG_MTD_CMDLINE_PARTS=y
261# CONFIG_MTD_AR7_PARTS is not set
258 262
259# 263#
260# User Modules And Translation Layers 264# User Modules And Translation Layers
@@ -321,6 +325,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
321# CONFIG_MTD_UBI is not set 325# CONFIG_MTD_UBI is not set
322# CONFIG_PARPORT is not set 326# CONFIG_PARPORT is not set
323# CONFIG_MISC_DEVICES is not set 327# CONFIG_MISC_DEVICES is not set
328# CONFIG_HAVE_IDE is not set
324 329
325# 330#
326# SCSI device support 331# SCSI device support
@@ -346,6 +351,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
346# Character devices 351# Character devices
347# 352#
348# CONFIG_VT is not set 353# CONFIG_VT is not set
354# CONFIG_DEVKMEM is not set
349# CONFIG_SERIAL_NONSTANDARD is not set 355# CONFIG_SERIAL_NONSTANDARD is not set
350 356
351# 357#
@@ -358,6 +364,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
358# 364#
359CONFIG_SERIAL_ATMEL=y 365CONFIG_SERIAL_ATMEL=y
360CONFIG_SERIAL_ATMEL_CONSOLE=y 366CONFIG_SERIAL_ATMEL_CONSOLE=y
367# CONFIG_SERIAL_ATMEL_PDC is not set
361# CONFIG_SERIAL_ATMEL_TTYAT is not set 368# CONFIG_SERIAL_ATMEL_TTYAT is not set
362CONFIG_SERIAL_CORE=y 369CONFIG_SERIAL_CORE=y
363CONFIG_SERIAL_CORE_CONSOLE=y 370CONFIG_SERIAL_CORE_CONSOLE=y
@@ -365,15 +372,9 @@ CONFIG_UNIX98_PTYS=y
365# CONFIG_LEGACY_PTYS is not set 372# CONFIG_LEGACY_PTYS is not set
366# CONFIG_IPMI_HANDLER is not set 373# CONFIG_IPMI_HANDLER is not set
367# CONFIG_HW_RANDOM is not set 374# CONFIG_HW_RANDOM is not set
368# CONFIG_RTC is not set
369# CONFIG_GEN_RTC is not set
370# CONFIG_R3964 is not set 375# CONFIG_R3964 is not set
371# CONFIG_TCG_TPM is not set 376# CONFIG_TCG_TPM is not set
372# CONFIG_I2C is not set 377# CONFIG_I2C is not set
373
374#
375# SPI support
376#
377CONFIG_SPI=y 378CONFIG_SPI=y
378CONFIG_SPI_MASTER=y 379CONFIG_SPI_MASTER=y
379 380
@@ -389,9 +390,24 @@ CONFIG_SPI_ATMEL=y
389# CONFIG_SPI_AT25 is not set 390# CONFIG_SPI_AT25 is not set
390# CONFIG_SPI_SPIDEV is not set 391# CONFIG_SPI_SPIDEV is not set
391# CONFIG_SPI_TLE62X0 is not set 392# CONFIG_SPI_TLE62X0 is not set
393CONFIG_HAVE_GPIO_LIB=y
394
395#
396# GPIO Support
397#
398
399#
400# I2C GPIO expanders:
401#
402
403#
404# SPI GPIO expanders:
405#
406# CONFIG_GPIO_MCP23S08 is not set
392# CONFIG_W1 is not set 407# CONFIG_W1 is not set
393# CONFIG_POWER_SUPPLY is not set 408# CONFIG_POWER_SUPPLY is not set
394# CONFIG_HWMON is not set 409# CONFIG_HWMON is not set
410# CONFIG_THERMAL is not set
395CONFIG_WATCHDOG=y 411CONFIG_WATCHDOG=y
396# CONFIG_WATCHDOG_NOWAYOUT is not set 412# CONFIG_WATCHDOG_NOWAYOUT is not set
397 413
@@ -411,12 +427,22 @@ CONFIG_SSB_POSSIBLE=y
411# Multifunction device drivers 427# Multifunction device drivers
412# 428#
413# CONFIG_MFD_SM501 is not set 429# CONFIG_MFD_SM501 is not set
430# CONFIG_HTC_PASIC3 is not set
414 431
415# 432#
416# Multimedia devices 433# Multimedia devices
417# 434#
435
436#
437# Multimedia core support
438#
418# CONFIG_VIDEO_DEV is not set 439# CONFIG_VIDEO_DEV is not set
419# CONFIG_DVB_CORE is not set 440# CONFIG_DVB_CORE is not set
441# CONFIG_VIDEO_MEDIA is not set
442
443#
444# Multimedia drivers
445#
420# CONFIG_DAB is not set 446# CONFIG_DAB is not set
421 447
422# 448#
@@ -434,8 +460,8 @@ CONFIG_FB_CFB_IMAGEBLIT=y
434# CONFIG_FB_SYS_FILLRECT is not set 460# CONFIG_FB_SYS_FILLRECT is not set
435# CONFIG_FB_SYS_COPYAREA is not set 461# CONFIG_FB_SYS_COPYAREA is not set
436# CONFIG_FB_SYS_IMAGEBLIT is not set 462# CONFIG_FB_SYS_IMAGEBLIT is not set
463# CONFIG_FB_FOREIGN_ENDIAN is not set
437# CONFIG_FB_SYS_FOPS is not set 464# CONFIG_FB_SYS_FOPS is not set
438CONFIG_FB_DEFERRED_IO=y
439# CONFIG_FB_SVGALIB is not set 465# CONFIG_FB_SVGALIB is not set
440# CONFIG_FB_MACMODES is not set 466# CONFIG_FB_MACMODES is not set
441# CONFIG_FB_BACKLIGHT is not set 467# CONFIG_FB_BACKLIGHT is not set
@@ -467,14 +493,12 @@ CONFIG_USB_SUPPORT=y
467# CONFIG_USB_ARCH_HAS_HCD is not set 493# CONFIG_USB_ARCH_HAS_HCD is not set
468# CONFIG_USB_ARCH_HAS_OHCI is not set 494# CONFIG_USB_ARCH_HAS_OHCI is not set
469# CONFIG_USB_ARCH_HAS_EHCI is not set 495# CONFIG_USB_ARCH_HAS_EHCI is not set
496# CONFIG_USB_OTG_WHITELIST is not set
497# CONFIG_USB_OTG_BLACKLIST_HUB is not set
470 498
471# 499#
472# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 500# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
473# 501#
474
475#
476# USB Gadget Support
477#
478CONFIG_USB_GADGET=y 502CONFIG_USB_GADGET=y
479# CONFIG_USB_GADGET_DEBUG_FILES is not set 503# CONFIG_USB_GADGET_DEBUG_FILES is not set
480CONFIG_USB_GADGET_SELECTED=y 504CONFIG_USB_GADGET_SELECTED=y
@@ -485,6 +509,7 @@ CONFIG_USB_ATMEL_USBA=y
485# CONFIG_USB_GADGET_NET2280 is not set 509# CONFIG_USB_GADGET_NET2280 is not set
486# CONFIG_USB_GADGET_PXA2XX is not set 510# CONFIG_USB_GADGET_PXA2XX is not set
487# CONFIG_USB_GADGET_M66592 is not set 511# CONFIG_USB_GADGET_M66592 is not set
512# CONFIG_USB_GADGET_PXA27X is not set
488# CONFIG_USB_GADGET_GOKU is not set 513# CONFIG_USB_GADGET_GOKU is not set
489# CONFIG_USB_GADGET_LH7A40X is not set 514# CONFIG_USB_GADGET_LH7A40X is not set
490# CONFIG_USB_GADGET_OMAP is not set 515# CONFIG_USB_GADGET_OMAP is not set
@@ -499,8 +524,11 @@ CONFIG_USB_ETH=y
499# CONFIG_USB_FILE_STORAGE is not set 524# CONFIG_USB_FILE_STORAGE is not set
500# CONFIG_USB_G_SERIAL is not set 525# CONFIG_USB_G_SERIAL is not set
501# CONFIG_USB_MIDI_GADGET is not set 526# CONFIG_USB_MIDI_GADGET is not set
527# CONFIG_USB_G_PRINTER is not set
502# CONFIG_MMC is not set 528# CONFIG_MMC is not set
529# CONFIG_MEMSTICK is not set
503# CONFIG_NEW_LEDS is not set 530# CONFIG_NEW_LEDS is not set
531# CONFIG_ACCESSIBILITY is not set
504CONFIG_RTC_LIB=y 532CONFIG_RTC_LIB=y
505CONFIG_RTC_CLASS=y 533CONFIG_RTC_CLASS=y
506CONFIG_RTC_HCTOSYS=y 534CONFIG_RTC_HCTOSYS=y
@@ -519,15 +547,17 @@ CONFIG_RTC_INTF_DEV=y
519# 547#
520# SPI RTC drivers 548# SPI RTC drivers
521# 549#
522# CONFIG_RTC_DRV_RS5C348 is not set
523# CONFIG_RTC_DRV_MAX6902 is not set 550# CONFIG_RTC_DRV_MAX6902 is not set
551# CONFIG_RTC_DRV_R9701 is not set
552# CONFIG_RTC_DRV_RS5C348 is not set
524 553
525# 554#
526# Platform RTC drivers 555# Platform RTC drivers
527# 556#
557# CONFIG_RTC_DRV_DS1511 is not set
528# CONFIG_RTC_DRV_DS1553 is not set 558# CONFIG_RTC_DRV_DS1553 is not set
529# CONFIG_RTC_DRV_STK17TA8 is not set
530# CONFIG_RTC_DRV_DS1742 is not set 559# CONFIG_RTC_DRV_DS1742 is not set
560# CONFIG_RTC_DRV_STK17TA8 is not set
531# CONFIG_RTC_DRV_M48T86 is not set 561# CONFIG_RTC_DRV_M48T86 is not set
532# CONFIG_RTC_DRV_M48T59 is not set 562# CONFIG_RTC_DRV_M48T59 is not set
533# CONFIG_RTC_DRV_V3020 is not set 563# CONFIG_RTC_DRV_V3020 is not set
@@ -536,18 +566,14 @@ CONFIG_RTC_INTF_DEV=y
536# on-CPU RTC drivers 566# on-CPU RTC drivers
537# 567#
538CONFIG_RTC_DRV_AT32AP700X=y 568CONFIG_RTC_DRV_AT32AP700X=y
539
540#
541# Userspace I/O
542#
543# CONFIG_UIO is not set 569# CONFIG_UIO is not set
544 570
545# 571#
546# File systems 572# File systems
547# 573#
574# CONFIG_DNOTIFY is not set
548# CONFIG_INOTIFY is not set 575# CONFIG_INOTIFY is not set
549# CONFIG_QUOTA is not set 576# CONFIG_QUOTA is not set
550# CONFIG_DNOTIFY is not set
551# CONFIG_AUTOFS_FS is not set 577# CONFIG_AUTOFS_FS is not set
552# CONFIG_AUTOFS4_FS is not set 578# CONFIG_AUTOFS4_FS is not set
553# CONFIG_FUSE_FS is not set 579# CONFIG_FUSE_FS is not set
@@ -580,7 +606,6 @@ CONFIG_JFFS2_RTIME=y
580# CONFIG_NETWORK_FILESYSTEMS is not set 606# CONFIG_NETWORK_FILESYSTEMS is not set
581# CONFIG_NLS is not set 607# CONFIG_NLS is not set
582# CONFIG_DLM is not set 608# CONFIG_DLM is not set
583# CONFIG_INSTRUMENTATION is not set
584 609
585# 610#
586# Kernel hacking 611# Kernel hacking
@@ -588,6 +613,7 @@ CONFIG_JFFS2_RTIME=y
588# CONFIG_PRINTK_TIME is not set 613# CONFIG_PRINTK_TIME is not set
589CONFIG_ENABLE_WARN_DEPRECATED=y 614CONFIG_ENABLE_WARN_DEPRECATED=y
590CONFIG_ENABLE_MUST_CHECK=y 615CONFIG_ENABLE_MUST_CHECK=y
616CONFIG_FRAME_WARN=1024
591CONFIG_MAGIC_SYSRQ=y 617CONFIG_MAGIC_SYSRQ=y
592# CONFIG_UNUSED_SYMBOLS is not set 618# CONFIG_UNUSED_SYMBOLS is not set
593# CONFIG_DEBUG_FS is not set 619# CONFIG_DEBUG_FS is not set
@@ -608,6 +634,8 @@ CONFIG_MAGIC_SYSRQ=y
608# Library routines 634# Library routines
609# 635#
610CONFIG_BITREVERSE=y 636CONFIG_BITREVERSE=y
637# CONFIG_GENERIC_FIND_FIRST_BIT is not set
638# CONFIG_GENERIC_FIND_NEXT_BIT is not set
611# CONFIG_CRC_CCITT is not set 639# CONFIG_CRC_CCITT is not set
612# CONFIG_CRC16 is not set 640# CONFIG_CRC16 is not set
613# CONFIG_CRC_ITU_T is not set 641# CONFIG_CRC_ITU_T is not set
diff --git a/arch/avr32/kernel/avr32_ksyms.c b/arch/avr32/kernel/avr32_ksyms.c
index 80f55f8dbf1c..84a7d44edc67 100644
--- a/arch/avr32/kernel/avr32_ksyms.c
+++ b/arch/avr32/kernel/avr32_ksyms.c
@@ -29,7 +29,9 @@ EXPORT_SYMBOL(__avr32_asr64);
29 */ 29 */
30EXPORT_SYMBOL(memset); 30EXPORT_SYMBOL(memset);
31EXPORT_SYMBOL(memcpy); 31EXPORT_SYMBOL(memcpy);
32
32EXPORT_SYMBOL(clear_page); 33EXPORT_SYMBOL(clear_page);
34EXPORT_SYMBOL(copy_page);
33 35
34/* 36/*
35 * Userspace access stuff. 37 * Userspace access stuff.
@@ -41,6 +43,8 @@ EXPORT_SYMBOL(strncpy_from_user);
41EXPORT_SYMBOL(__strncpy_from_user); 43EXPORT_SYMBOL(__strncpy_from_user);
42EXPORT_SYMBOL(clear_user); 44EXPORT_SYMBOL(clear_user);
43EXPORT_SYMBOL(__clear_user); 45EXPORT_SYMBOL(__clear_user);
46EXPORT_SYMBOL(strnlen_user);
47
44EXPORT_SYMBOL(csum_partial); 48EXPORT_SYMBOL(csum_partial);
45EXPORT_SYMBOL(csum_partial_copy_generic); 49EXPORT_SYMBOL(csum_partial_copy_generic);
46 50
diff --git a/arch/avr32/mach-at32ap/cpufreq.c b/arch/avr32/mach-at32ap/cpufreq.c
index 235524b79193..5dd8d25428bf 100644
--- a/arch/avr32/mach-at32ap/cpufreq.c
+++ b/arch/avr32/mach-at32ap/cpufreq.c
@@ -108,5 +108,4 @@ static int __init at32_cpufreq_init(void)
108{ 108{
109 return cpufreq_register_driver(&at32_driver); 109 return cpufreq_register_driver(&at32_driver);
110} 110}
111 111late_initcall(at32_cpufreq_init);
112arch_initcall(at32_cpufreq_init);
diff --git a/arch/blackfin/kernel/cplb-nompu/cplbinit.c b/arch/blackfin/kernel/cplb-nompu/cplbinit.c
index 917325bfbd84..6be0c50122e8 100644
--- a/arch/blackfin/kernel/cplb-nompu/cplbinit.c
+++ b/arch/blackfin/kernel/cplb-nompu/cplbinit.c
@@ -254,7 +254,8 @@ close_cplbtab(struct cplb_tab *table)
254} 254}
255 255
256/* helper function */ 256/* helper function */
257static void __fill_code_cplbtab(struct cplb_tab *t, int i, u32 a_start, u32 a_end) 257static void __init
258__fill_code_cplbtab(struct cplb_tab *t, int i, u32 a_start, u32 a_end)
258{ 259{
259 if (cplb_data[i].psize) { 260 if (cplb_data[i].psize) {
260 fill_cplbtab(t, 261 fill_cplbtab(t,
@@ -291,7 +292,8 @@ static void __fill_code_cplbtab(struct cplb_tab *t, int i, u32 a_start, u32 a_en
291 } 292 }
292} 293}
293 294
294static void __fill_data_cplbtab(struct cplb_tab *t, int i, u32 a_start, u32 a_end) 295static void __init
296__fill_data_cplbtab(struct cplb_tab *t, int i, u32 a_start, u32 a_end)
295{ 297{
296 if (cplb_data[i].psize) { 298 if (cplb_data[i].psize) {
297 fill_cplbtab(t, 299 fill_cplbtab(t,
diff --git a/arch/blackfin/kernel/gptimers.c b/arch/blackfin/kernel/gptimers.c
index e698554895a7..3a3e9615b002 100644
--- a/arch/blackfin/kernel/gptimers.c
+++ b/arch/blackfin/kernel/gptimers.c
@@ -10,8 +10,8 @@
10 10
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/io.h>
13 14
14#include <asm/io.h>
15#include <asm/blackfin.h> 15#include <asm/blackfin.h>
16#include <asm/gptimers.h> 16#include <asm/gptimers.h>
17 17
diff --git a/arch/blackfin/kernel/irqchip.c b/arch/blackfin/kernel/irqchip.c
index 73647c158774..07402f57c9de 100644
--- a/arch/blackfin/kernel/irqchip.c
+++ b/arch/blackfin/kernel/irqchip.c
@@ -60,9 +60,14 @@ static struct irq_chip bad_chip = {
60}; 60};
61 61
62static struct irq_desc bad_irq_desc = { 62static struct irq_desc bad_irq_desc = {
63 .status = IRQ_DISABLED,
63 .chip = &bad_chip, 64 .chip = &bad_chip,
64 .handle_irq = handle_bad_irq, 65 .handle_irq = handle_bad_irq,
65 .depth = 1, 66 .depth = 1,
67 .lock = __SPIN_LOCK_UNLOCKED(irq_desc->lock),
68#ifdef CONFIG_SMP
69 .affinity = CPU_MASK_ALL
70#endif
66}; 71};
67 72
68int show_interrupts(struct seq_file *p, void *v) 73int show_interrupts(struct seq_file *p, void *v)
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c
index 7bfbd958980c..f061f5181623 100644
--- a/arch/blackfin/kernel/traps.c
+++ b/arch/blackfin/kernel/traps.c
@@ -67,7 +67,7 @@ void __init trap_init(void)
67 CSYNC(); 67 CSYNC();
68} 68}
69 69
70void *saved_icplb_fault_addr, *saved_dcplb_fault_addr; 70unsigned long saved_icplb_fault_addr, saved_dcplb_fault_addr;
71 71
72int kstack_depth_to_print = 48; 72int kstack_depth_to_print = 48;
73 73
@@ -366,7 +366,7 @@ asmlinkage void trap_c(struct pt_regs *fp)
366 info.si_code = ILL_CPLB_MULHIT; 366 info.si_code = ILL_CPLB_MULHIT;
367 sig = SIGSEGV; 367 sig = SIGSEGV;
368#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO 368#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
369 if (saved_dcplb_fault_addr < (void *)FIXED_CODE_START) 369 if (saved_dcplb_fault_addr < FIXED_CODE_START)
370 printk(KERN_NOTICE "NULL pointer access\n"); 370 printk(KERN_NOTICE "NULL pointer access\n");
371 else 371 else
372#endif 372#endif
@@ -421,7 +421,7 @@ asmlinkage void trap_c(struct pt_regs *fp)
421 info.si_code = ILL_CPLB_MULHIT; 421 info.si_code = ILL_CPLB_MULHIT;
422 sig = SIGSEGV; 422 sig = SIGSEGV;
423#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO 423#ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
424 if (saved_icplb_fault_addr < (void *)FIXED_CODE_START) 424 if (saved_icplb_fault_addr < FIXED_CODE_START)
425 printk(KERN_NOTICE "Jump to NULL address\n"); 425 printk(KERN_NOTICE "Jump to NULL address\n");
426 else 426 else
427#endif 427#endif
@@ -939,8 +939,6 @@ void panic_cplb_error(int cplb_panic, struct pt_regs *fp)
939 939
940 oops_in_progress = 1; 940 oops_in_progress = 1;
941 941
942 printk(KERN_EMERG "DCPLB_FAULT_ADDR=%p\n", saved_dcplb_fault_addr);
943 printk(KERN_EMERG "ICPLB_FAULT_ADDR=%p\n", saved_icplb_fault_addr);
944 dump_bfin_process(fp); 942 dump_bfin_process(fp);
945 dump_bfin_mem(fp); 943 dump_bfin_mem(fp);
946 show_regs(fp); 944 show_regs(fp);
diff --git a/arch/blackfin/lib/outs.S b/arch/blackfin/lib/outs.S
index 3daf96035bf6..4685b7aa0080 100644
--- a/arch/blackfin/lib/outs.S
+++ b/arch/blackfin/lib/outs.S
@@ -76,4 +76,4 @@ ENTRY(_outsw_8)
76 R0 = R0 + R1; 76 R0 = R0 + R1;
77.Lword8_loop_e: W[P0] = R0; 77.Lword8_loop_e: W[P0] = R0;
78 RTS; 78 RTS;
79ENDPROC(_outsw) 79ENDPROC(_outsw_8)
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
index bb6d58c931de..5958eecefcf1 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -451,9 +451,6 @@ static struct platform_device net2272_bfin_device = {
451}; 451};
452#endif 452#endif
453 453
454#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
455/* all SPI peripherals info goes here */
456
457#if defined(CONFIG_MTD_M25P80) \ 454#if defined(CONFIG_MTD_M25P80) \
458 || defined(CONFIG_MTD_M25P80_MODULE) 455 || defined(CONFIG_MTD_M25P80_MODULE)
459static struct mtd_partition bfin_spi_flash_partitions[] = { 456static struct mtd_partition bfin_spi_flash_partitions[] = {
@@ -647,10 +644,10 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
647 { 644 {
648 .modalias = "ad7877", 645 .modalias = "ad7877",
649 .platform_data = &bfin_ad7877_ts_info, 646 .platform_data = &bfin_ad7877_ts_info,
650 .irq = IRQ_PF6, 647 .irq = IRQ_PF8,
651 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 648 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
652 .bus_num = 0, 649 .bus_num = 0,
653 .chip_select = 1, 650 .chip_select = 2,
654 .controller_data = &spi_ad7877_chip_info, 651 .controller_data = &spi_ad7877_chip_info,
655 }, 652 },
656#endif 653#endif
@@ -676,6 +673,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
676#endif 673#endif
677}; 674};
678 675
676#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
679/* SPI controller data */ 677/* SPI controller data */
680static struct bfin5xx_spi_master bfin_spi0_info = { 678static struct bfin5xx_spi_master bfin_spi0_info = {
681 .num_chipselect = 8, 679 .num_chipselect = 8,
@@ -1018,10 +1016,7 @@ static int __init stamp_init(void)
1018#endif 1016#endif
1019 1017
1020 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); 1018 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
1021#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 1019 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
1022 spi_register_board_info(bfin_spi_board_info,
1023 ARRAY_SIZE(bfin_spi_board_info));
1024#endif
1025 1020
1026#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 1021#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
1027 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; 1022 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c
index 9d28415163ea..079389cbd859 100644
--- a/arch/blackfin/mach-bf533/boards/ezkit.c
+++ b/arch/blackfin/mach-bf533/boards/ezkit.c
@@ -87,9 +87,6 @@ static struct platform_device smc91x_device = {
87}; 87};
88#endif 88#endif
89 89
90#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
91/* all SPI peripherals info goes here */
92
93#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 90#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
94static struct mtd_partition bfin_spi_flash_partitions[] = { 91static struct mtd_partition bfin_spi_flash_partitions[] = {
95 { 92 {
@@ -189,6 +186,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
189#endif 186#endif
190}; 187};
191 188
189#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
192/* SPI (0) */ 190/* SPI (0) */
193static struct resource bfin_spi0_resource[] = { 191static struct resource bfin_spi0_resource[] = {
194 [0] = { 192 [0] = {
@@ -425,9 +423,7 @@ static int __init ezkit_init(void)
425{ 423{
426 printk(KERN_INFO "%s(): registering device resources\n", __func__); 424 printk(KERN_INFO "%s(): registering device resources\n", __func__);
427 platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); 425 platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices));
428#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
429 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 426 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
430#endif
431 427
432#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 428#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
433 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; 429 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index ec05b236dc3f..13ae49515f73 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -161,9 +161,6 @@ static struct platform_device stamp_flash_device = {
161}; 161};
162#endif 162#endif
163 163
164#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
165/* all SPI peripherals info goes here */
166
167#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) 164#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
168static struct mtd_partition bfin_spi_flash_partitions[] = { 165static struct mtd_partition bfin_spi_flash_partitions[] = {
169 { 166 {
@@ -320,6 +317,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
320#endif 317#endif
321}; 318};
322 319
320#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
323/* SPI (0) */ 321/* SPI (0) */
324static struct resource bfin_spi0_resource[] = { 322static struct resource bfin_spi0_resource[] = {
325 [0] = { 323 [0] = {
@@ -626,10 +624,8 @@ static int __init stamp_init(void)
626 SSYNC(); 624 SSYNC();
627#endif 625#endif
628 626
629#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 627 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
630 spi_register_board_info(bfin_spi_board_info, 628
631 ARRAY_SIZE(bfin_spi_board_info));
632#endif
633#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 629#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
634 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; 630 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
635#endif 631#endif
diff --git a/arch/blackfin/mach-bf537/boards/Makefile b/arch/blackfin/mach-bf537/boards/Makefile
index 87e450f29e37..c94f7a5b8211 100644
--- a/arch/blackfin/mach-bf537/boards/Makefile
+++ b/arch/blackfin/mach-bf537/boards/Makefile
@@ -3,7 +3,7 @@
3# 3#
4 4
5obj-$(CONFIG_GENERIC_BF537_BOARD) += generic_board.o 5obj-$(CONFIG_GENERIC_BF537_BOARD) += generic_board.o
6obj-$(CONFIG_BFIN537_STAMP) += stamp.o led.o 6obj-$(CONFIG_BFIN537_STAMP) += stamp.o
7obj-$(CONFIG_BFIN537_BLUETECHNIX_CM) += cm_bf537.o 7obj-$(CONFIG_BFIN537_BLUETECHNIX_CM) += cm_bf537.o
8obj-$(CONFIG_PNAV10) += pnav10.o 8obj-$(CONFIG_PNAV10) += pnav10.o
9obj-$(CONFIG_CAMSIG_MINOTAUR) += minotaur.o 9obj-$(CONFIG_CAMSIG_MINOTAUR) += minotaur.o
diff --git a/arch/blackfin/mach-bf537/boards/led.S b/arch/blackfin/mach-bf537/boards/led.S
deleted file mode 100644
index 4e9ea4283e5f..000000000000
--- a/arch/blackfin/mach-bf537/boards/led.S
+++ /dev/null
@@ -1,183 +0,0 @@
1/****************************************************
2 * LED1 ---- PF6 LED2 ---- PF7 *
3 * LED3 ---- PF8 LED4 ---- PF9 *
4 * LED5 ---- PF10 LED6 ---- PF11 *
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 12;
19 [--SP] = P0;
20 [--SP] = R0;
21 [--SP] = R1;
22 [--SP] = R2;
23 R1 = PF6|PF7|PF8|PF9|PF10|PF11 (Z);
24 R2 = ~R1;
25
26 P0.H = hi(PORTF_FER);
27 P0.L = lo(PORTF_FER);
28 R0 = W[P0](Z);
29 SSYNC;
30 R0 = R0 & R2;
31 W[P0] = R0.L;
32 SSYNC;
33
34 P0.H = hi(PORTFIO_DIR);
35 P0.L = lo(PORTFIO_DIR);
36 R0 = W[P0](Z);
37 SSYNC;
38 R0 = R0 | R1;
39 W[P0] = R0.L;
40 SSYNC;
41
42 P0.H = hi(PORTFIO_INEN);
43 P0.L = lo(PORTFIO_INEN);
44 R0 = W[P0](Z);
45 SSYNC;
46 R0 = R0 & R2;
47 W[P0] = R0.L;
48 SSYNC;
49
50 R2 = [SP++];
51 R1 = [SP++];
52 R0 = [SP++];
53 P0 = [SP++];
54 UNLINK;
55 RTS;
56 .size _led_init, .-_led_init
57
58/* Set one LED on. Leave other LEDs unchanged.
59 It expects the LED number passed through R0. */
60
61ENTRY(_led_on)
62 LINK 12;
63 [--SP] = P0;
64 [--SP] = R1;
65 CALL _led_init;
66 R1 = 1;
67 R0 += 5;
68 R1 <<= R0;
69 P0.H = hi(PORTFIO);
70 P0.L = lo(PORTFIO);
71 R0 = W[P0](Z);
72 SSYNC;
73 R0 = R0 | R1;
74 W[P0] = R0.L;
75 SSYNC;
76 R1 = [SP++];
77 P0 = [SP++];
78 UNLINK;
79 RTS;
80 .size _led_on, .-_led_on
81
82/* Set one LED off. Leave other LEDs unchanged. */
83
84ENTRY(_led_off)
85 LINK 12;
86 [--SP] = P0;
87 [--SP] = R1;
88 CALL _led_init;
89 R1 = 1;
90 R0 += 5;
91 R1 <<= R0;
92 R1 = ~R1;
93 P0.H = hi(PORTFIO);
94 P0.L = lo(PORTFIO);
95 R0 = W[P0](Z);
96 SSYNC;
97 R0 = R0 & R1;
98 W[P0] = R0.L;
99 SSYNC;
100 R1 = [SP++];
101 P0 = [SP++];
102 UNLINK;
103 RTS;
104 .size _led_off, .-_led_off
105
106/* Toggle one LED. Leave other LEDs unchanged. */
107
108ENTRY(_led_toggle)
109 LINK 12;
110 [--SP] = P0;
111 [--SP] = R1;
112 CALL _led_init;
113 R1 = 1;
114 R0 += 5;
115 R1 <<= R0;
116 P0.H = hi(PORTFIO);
117 P0.L = lo(PORTFIO);
118 R0 = W[P0](Z);
119 SSYNC;
120 R0 = R0 ^ R1;
121 W[P0] = R0.L;
122 SSYNC;
123 R1 = [SP++];
124 P0 = [SP++];
125 UNLINK;
126 RTS;
127 .size _led_toggle, .-_led_toggle
128
129/* Display the number using LEDs in binary format. */
130
131ENTRY(_led_disp_num)
132 LINK 12;
133 [--SP] = P0;
134 [--SP] = R1;
135 [--SP] = R2;
136 CALL _led_init;
137 R1 = 0x3f(X);
138 R0 = R0 & R1;
139 R2 = 6(X);
140 R0 <<= R2;
141 R1 <<= R2;
142 P0.H = hi(PORTFIO);
143 P0.L = lo(PORTFIO);
144 R2 = W[P0](Z);
145 SSYNC;
146 R1 = ~R1;
147 R2 = R2 & R1;
148 R2 = R2 | R0;
149 W[P0] = R2.L;
150 SSYNC;
151 R2 = [SP++];
152 R1 = [SP++];
153 P0 = [SP++];
154 UNLINK;
155 RTS;
156 .size _led_disp_num, .-_led_disp_num
157
158/* Toggle the number using LEDs in binary format. */
159
160ENTRY(_led_toggle_num)
161 LINK 12;
162 [--SP] = P0;
163 [--SP] = R1;
164 [--SP] = R2;
165 CALL _led_init;
166 R1 = 0x3f(X);
167 R0 = R0 & R1;
168 R1 = 6(X);
169 R0 <<= R1;
170 P0.H = hi(PORTFIO);
171 P0.L = lo(PORTFIO);
172 R1 = W[P0](Z);
173 SSYNC;
174 R1 = R1 ^ R0;
175 W[P0] = R1.L;
176 SSYNC;
177 R2 = [SP++];
178 R1 = [SP++];
179 P0 = [SP++];
180 UNLINK;
181 RTS;
182 .size _led_toggle_num, .-_led_toggle_num
183
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index 9a756d1f3d73..671f9d67f23a 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -400,9 +400,6 @@ static struct platform_device stamp_flash_device = {
400}; 400};
401#endif 401#endif
402 402
403#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
404/* all SPI peripherals info goes here */
405
406#if defined(CONFIG_MTD_M25P80) \ 403#if defined(CONFIG_MTD_M25P80) \
407 || defined(CONFIG_MTD_M25P80_MODULE) 404 || defined(CONFIG_MTD_M25P80_MODULE)
408static struct mtd_partition bfin_spi_flash_partitions[] = { 405static struct mtd_partition bfin_spi_flash_partitions[] = {
@@ -629,6 +626,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
629#endif 626#endif
630}; 627};
631 628
629#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
632/* SPI controller data */ 630/* SPI controller data */
633static struct bfin5xx_spi_master bfin_spi0_info = { 631static struct bfin5xx_spi_master bfin_spi0_info = {
634 .num_chipselect = 8, 632 .num_chipselect = 8,
@@ -939,10 +937,7 @@ static int __init stamp_init(void)
939#endif 937#endif
940 938
941 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); 939 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
942#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 940 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
943 spi_register_board_info(bfin_spi_board_info,
944 ARRAY_SIZE(bfin_spi_board_info));
945#endif
946 941
947#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 942#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
948 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; 943 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
diff --git a/arch/blackfin/mach-bf548/boards/Makefile b/arch/blackfin/mach-bf548/boards/Makefile
index eed161dd7845..319ef54c4221 100644
--- a/arch/blackfin/mach-bf548/boards/Makefile
+++ b/arch/blackfin/mach-bf548/boards/Makefile
@@ -2,5 +2,5 @@
2# arch/blackfin/mach-bf548/boards/Makefile 2# arch/blackfin/mach-bf548/boards/Makefile
3# 3#
4 4
5obj-$(CONFIG_BFIN548_EZKIT) += ezkit.o led.o 5obj-$(CONFIG_BFIN548_EZKIT) += ezkit.o
6obj-$(CONFIG_BFIN548_BLUETECHNIX_CM) += cm_bf548.o 6obj-$(CONFIG_BFIN548_BLUETECHNIX_CM) += cm_bf548.o
diff --git a/arch/blackfin/mach-bf548/boards/cm_bf548.c b/arch/blackfin/mach-bf548/boards/cm_bf548.c
index 3b74f96d3590..4f4ae8787edf 100644
--- a/arch/blackfin/mach-bf548/boards/cm_bf548.c
+++ b/arch/blackfin/mach-bf548/boards/cm_bf548.c
@@ -684,7 +684,7 @@ static struct platform_device *cm_bf548_devices[] __initdata = {
684 684
685static int __init cm_bf548_init(void) 685static int __init cm_bf548_init(void)
686{ 686{
687 printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); 687 printk(KERN_INFO "%s(): registering device resources\n", __func__);
688 platform_add_devices(cm_bf548_devices, ARRAY_SIZE(cm_bf548_devices)); 688 platform_add_devices(cm_bf548_devices, ARRAY_SIZE(cm_bf548_devices));
689 689
690#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 690#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c
index d1682bb37509..af7c211a580e 100644
--- a/arch/blackfin/mach-bf548/boards/ezkit.c
+++ b/arch/blackfin/mach-bf548/boards/ezkit.c
@@ -412,8 +412,6 @@ static struct platform_device ezkit_flash_device = {
412}; 412};
413#endif 413#endif
414 414
415#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
416/* all SPI peripherals info goes here */
417#if defined(CONFIG_MTD_M25P80) \ 415#if defined(CONFIG_MTD_M25P80) \
418 || defined(CONFIG_MTD_M25P80_MODULE) 416 || defined(CONFIG_MTD_M25P80_MODULE)
419/* SPI flash chip (m25p16) */ 417/* SPI flash chip (m25p16) */
@@ -481,7 +479,7 @@ static struct bfin5xx_spi_chip spidev_chip_info = {
481}; 479};
482#endif 480#endif
483 481
484static struct spi_board_info bf54x_spi_board_info[] __initdata = { 482static struct spi_board_info bfin_spi_board_info[] __initdata = {
485#if defined(CONFIG_MTD_M25P80) \ 483#if defined(CONFIG_MTD_M25P80) \
486 || defined(CONFIG_MTD_M25P80_MODULE) 484 || defined(CONFIG_MTD_M25P80_MODULE)
487 { 485 {
@@ -527,6 +525,7 @@ static struct spi_board_info bf54x_spi_board_info[] __initdata = {
527#endif 525#endif
528}; 526};
529 527
528#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
530/* SPI (0) */ 529/* SPI (0) */
531static struct resource bfin_spi0_resource[] = { 530static struct resource bfin_spi0_resource[] = {
532 [0] = { 531 [0] = {
@@ -800,10 +799,7 @@ static int __init ezkit_init(void)
800 799
801 platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); 800 platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices));
802 801
803#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 802 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
804 spi_register_board_info(bf54x_spi_board_info,
805 ARRAY_SIZE(bf54x_spi_board_info));
806#endif
807 803
808 return 0; 804 return 0;
809} 805}
diff --git a/arch/blackfin/mach-bf548/boards/led.S b/arch/blackfin/mach-bf548/boards/led.S
deleted file mode 100644
index f47daf3770d0..000000000000
--- a/arch/blackfin/mach-bf548/boards/led.S
+++ /dev/null
@@ -1,172 +0,0 @@
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-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c
index 61d8f7648b24..bc6feded8569 100644
--- a/arch/blackfin/mach-bf561/boards/ezkit.c
+++ b/arch/blackfin/mach-bf561/boards/ezkit.c
@@ -280,7 +280,6 @@ static struct platform_device ezkit_flash_device = {
280}; 280};
281#endif 281#endif
282 282
283#ifdef CONFIG_SPI_BFIN
284#if defined(CONFIG_SND_BLACKFIN_AD1836) \ 283#if defined(CONFIG_SND_BLACKFIN_AD1836) \
285 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) 284 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
286static struct bfin5xx_spi_chip ad1836_spi_chip_info = { 285static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
@@ -295,8 +294,8 @@ static struct bfin5xx_spi_chip spidev_chip_info = {
295 .bits_per_word = 8, 294 .bits_per_word = 8,
296}; 295};
297#endif 296#endif
298#endif
299 297
298#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
300/* SPI (0) */ 299/* SPI (0) */
301static struct resource bfin_spi0_resource[] = { 300static struct resource bfin_spi0_resource[] = {
302 [0] = { 301 [0] = {
@@ -327,6 +326,7 @@ static struct platform_device bfin_spi0_device = {
327 .platform_data = &bfin_spi0_info, /* Passed to driver */ 326 .platform_data = &bfin_spi0_info, /* Passed to driver */
328 }, 327 },
329}; 328};
329#endif
330 330
331static struct spi_board_info bfin_spi_board_info[] __initdata = { 331static struct spi_board_info bfin_spi_board_info[] __initdata = {
332#if defined(CONFIG_SND_BLACKFIN_AD1836) \ 332#if defined(CONFIG_SND_BLACKFIN_AD1836) \
@@ -537,10 +537,7 @@ static int __init ezkit_init(void)
537 SSYNC(); 537 SSYNC();
538#endif 538#endif
539 539
540#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 540 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
541 spi_register_board_info(bfin_spi_board_info,
542 ARRAY_SIZE(bfin_spi_board_info));
543#endif
544 541
545#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 542#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
546 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; 543 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
diff --git a/arch/frv/kernel/cmode.S b/arch/frv/kernel/cmode.S
index 81ba28ad2207..53deeb5d7e87 100644
--- a/arch/frv/kernel/cmode.S
+++ b/arch/frv/kernel/cmode.S
@@ -1,7 +1,7 @@
1/* cmode.S: clock mode management 1/* cmode.S: clock mode management
2 * 2 *
3 * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. 3 * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
4 * Written by David Woodhouse (dwmw2@redhat.com) 4 * Written by David Woodhouse (dwmw2@infradead.org)
5 * 5 *
6 * This program is free software; you can redistribute it and/or 6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License 7 * modify it under the terms of the GNU General Public License
diff --git a/arch/frv/kernel/sleep.S b/arch/frv/kernel/sleep.S
index c9b2d51ab9ad..f67bf73cd2cc 100644
--- a/arch/frv/kernel/sleep.S
+++ b/arch/frv/kernel/sleep.S
@@ -1,7 +1,7 @@
1/* sleep.S: power saving mode entry 1/* sleep.S: power saving mode entry
2 * 2 *
3 * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. 3 * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
4 * Written by David Woodhouse (dwmw2@redhat.com) 4 * Written by David Woodhouse (dwmw2@infradead.org)
5 * 5 *
6 * This program is free software; you can redistribute it and/or 6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License 7 * modify it under the terms of the GNU General Public License
diff --git a/arch/frv/mb93090-mb00/pci-dma-nommu.c b/arch/frv/mb93090-mb00/pci-dma-nommu.c
index 4985466b1a7c..64ee58d748be 100644
--- a/arch/frv/mb93090-mb00/pci-dma-nommu.c
+++ b/arch/frv/mb93090-mb00/pci-dma-nommu.c
@@ -1,7 +1,7 @@
1/* pci-dma-nommu.c: Dynamic DMA mapping support for the FRV 1/* pci-dma-nommu.c: Dynamic DMA mapping support for the FRV
2 * 2 *
3 * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. 3 * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
4 * Written by David Woodhouse (dwmw2@redhat.com) 4 * Written by David Woodhouse (dwmw2@infradead.org)
5 * 5 *
6 * This program is free software; you can redistribute it and/or 6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License 7 * modify it under the terms of the GNU General Public License
diff --git a/arch/frv/mm/init.c b/arch/frv/mm/init.c
index b841ecfd5d5a..9af7740f32fb 100644
--- a/arch/frv/mm/init.c
+++ b/arch/frv/mm/init.c
@@ -26,6 +26,7 @@
26#include <linux/types.h> 26#include <linux/types.h>
27#include <linux/bootmem.h> 27#include <linux/bootmem.h>
28#include <linux/highmem.h> 28#include <linux/highmem.h>
29#include <linux/module.h>
29 30
30#include <asm/setup.h> 31#include <asm/setup.h>
31#include <asm/segment.h> 32#include <asm/segment.h>
@@ -56,7 +57,9 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
56 */ 57 */
57static unsigned long empty_bad_page_table; 58static unsigned long empty_bad_page_table;
58static unsigned long empty_bad_page; 59static unsigned long empty_bad_page;
60
59unsigned long empty_zero_page; 61unsigned long empty_zero_page;
62EXPORT_SYMBOL(empty_zero_page);
60 63
61/*****************************************************************************/ 64/*****************************************************************************/
62/* 65/*
diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile
index 88f1a55c6c94..e67ee3f27698 100644
--- a/arch/ia64/Makefile
+++ b/arch/ia64/Makefile
@@ -57,6 +57,7 @@ core-$(CONFIG_IA64_GENERIC) += arch/ia64/dig/
57core-$(CONFIG_IA64_HP_ZX1) += arch/ia64/dig/ 57core-$(CONFIG_IA64_HP_ZX1) += arch/ia64/dig/
58core-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/dig/ 58core-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/dig/
59core-$(CONFIG_IA64_SGI_SN2) += arch/ia64/sn/ 59core-$(CONFIG_IA64_SGI_SN2) += arch/ia64/sn/
60core-$(CONFIG_IA64_SGI_UV) += arch/ia64/uv/
60core-$(CONFIG_KVM) += arch/ia64/kvm/ 61core-$(CONFIG_KVM) += arch/ia64/kvm/
61 62
62drivers-$(CONFIG_PCI) += arch/ia64/pci/ 63drivers-$(CONFIG_PCI) += arch/ia64/pci/
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index 853d1f11be00..43687cc60dfb 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -465,7 +465,6 @@ void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
465 printk(KERN_ERR 465 printk(KERN_ERR
466 "ACPI 2.0 SLIT: size mismatch: %d expected, %d actual\n", 466 "ACPI 2.0 SLIT: size mismatch: %d expected, %d actual\n",
467 len, slit->header.length); 467 len, slit->header.length);
468 memset(numa_slit, 10, sizeof(numa_slit));
469 return; 468 return;
470 } 469 }
471 slit_table = slit; 470 slit_table = slit;
@@ -574,8 +573,14 @@ void __init acpi_numa_arch_fixup(void)
574 printk(KERN_INFO "Number of memory chunks in system = %d\n", 573 printk(KERN_INFO "Number of memory chunks in system = %d\n",
575 num_node_memblks); 574 num_node_memblks);
576 575
577 if (!slit_table) 576 if (!slit_table) {
577 for (i = 0; i < MAX_NUMNODES; i++)
578 for (j = 0; j < MAX_NUMNODES; j++)
579 node_distance(i, j) = i == j ? LOCAL_DISTANCE :
580 REMOTE_DISTANCE;
578 return; 581 return;
582 }
583
579 memset(numa_slit, -1, sizeof(numa_slit)); 584 memset(numa_slit, -1, sizeof(numa_slit));
580 for (i = 0; i < slit_table->locality_count; i++) { 585 for (i = 0; i < slit_table->locality_count; i++) {
581 if (!pxm_bit_test(i)) 586 if (!pxm_bit_test(i))
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
index 082c31dcfd99..39752cdef6ff 100644
--- a/arch/ia64/kernel/iosapic.c
+++ b/arch/ia64/kernel/iosapic.c
@@ -558,8 +558,6 @@ static struct iosapic_rte_info * __init_refok iosapic_alloc_rte (void)
558 if (!iosapic_kmalloc_ok && list_empty(&free_rte_list)) { 558 if (!iosapic_kmalloc_ok && list_empty(&free_rte_list)) {
559 rte = alloc_bootmem(sizeof(struct iosapic_rte_info) * 559 rte = alloc_bootmem(sizeof(struct iosapic_rte_info) *
560 NR_PREALLOCATE_RTE_ENTRIES); 560 NR_PREALLOCATE_RTE_ENTRIES);
561 if (!rte)
562 return NULL;
563 for (i = 0; i < NR_PREALLOCATE_RTE_ENTRIES; i++, rte++) 561 for (i = 0; i < NR_PREALLOCATE_RTE_ENTRIES; i++, rte++)
564 list_add(&rte->rte_list, &free_rte_list); 562 list_add(&rte->rte_list, &free_rte_list);
565 } 563 }
diff --git a/arch/ia64/kernel/ivt.S b/arch/ia64/kernel/ivt.S
index 6678c49daba3..80b44ea052d7 100644
--- a/arch/ia64/kernel/ivt.S
+++ b/arch/ia64/kernel/ivt.S
@@ -1076,48 +1076,6 @@ END(ia64_syscall_setup)
1076 DBG_FAULT(15) 1076 DBG_FAULT(15)
1077 FAULT(15) 1077 FAULT(15)
1078 1078
1079 /*
1080 * Squatting in this space ...
1081 *
1082 * This special case dispatcher for illegal operation faults allows preserved
1083 * registers to be modified through a callback function (asm only) that is handed
1084 * back from the fault handler in r8. Up to three arguments can be passed to the
1085 * callback function by returning an aggregate with the callback as its first
1086 * element, followed by the arguments.
1087 */
1088ENTRY(dispatch_illegal_op_fault)
1089 .prologue
1090 .body
1091 SAVE_MIN_WITH_COVER
1092 ssm psr.ic | PSR_DEFAULT_BITS
1093 ;;
1094 srlz.i // guarantee that interruption collection is on
1095 ;;
1096(p15) ssm psr.i // restore psr.i
1097 adds r3=8,r2 // set up second base pointer for SAVE_REST
1098 ;;
1099 alloc r14=ar.pfs,0,0,1,0 // must be first in insn group
1100 mov out0=ar.ec
1101 ;;
1102 SAVE_REST
1103 PT_REGS_UNWIND_INFO(0)
1104 ;;
1105 br.call.sptk.many rp=ia64_illegal_op_fault
1106.ret0: ;;
1107 alloc r14=ar.pfs,0,0,3,0 // must be first in insn group
1108 mov out0=r9
1109 mov out1=r10
1110 mov out2=r11
1111 movl r15=ia64_leave_kernel
1112 ;;
1113 mov rp=r15
1114 mov b6=r8
1115 ;;
1116 cmp.ne p6,p0=0,r8
1117(p6) br.call.dpnt.many b6=b6 // call returns to ia64_leave_kernel
1118 br.sptk.many ia64_leave_kernel
1119END(dispatch_illegal_op_fault)
1120
1121 .org ia64_ivt+0x4000 1079 .org ia64_ivt+0x4000
1122///////////////////////////////////////////////////////////////////////////////////////// 1080/////////////////////////////////////////////////////////////////////////////////////////
1123// 0x4000 Entry 16 (size 64 bundles) Reserved 1081// 0x4000 Entry 16 (size 64 bundles) Reserved
@@ -1715,6 +1673,48 @@ END(ia32_interrupt)
1715 DBG_FAULT(67) 1673 DBG_FAULT(67)
1716 FAULT(67) 1674 FAULT(67)
1717 1675
1676 /*
1677 * Squatting in this space ...
1678 *
1679 * This special case dispatcher for illegal operation faults allows preserved
1680 * registers to be modified through a callback function (asm only) that is handed
1681 * back from the fault handler in r8. Up to three arguments can be passed to the
1682 * callback function by returning an aggregate with the callback as its first
1683 * element, followed by the arguments.
1684 */
1685ENTRY(dispatch_illegal_op_fault)
1686 .prologue
1687 .body
1688 SAVE_MIN_WITH_COVER
1689 ssm psr.ic | PSR_DEFAULT_BITS
1690 ;;
1691 srlz.i // guarantee that interruption collection is on
1692 ;;
1693(p15) ssm psr.i // restore psr.i
1694 adds r3=8,r2 // set up second base pointer for SAVE_REST
1695 ;;
1696 alloc r14=ar.pfs,0,0,1,0 // must be first in insn group
1697 mov out0=ar.ec
1698 ;;
1699 SAVE_REST
1700 PT_REGS_UNWIND_INFO(0)
1701 ;;
1702 br.call.sptk.many rp=ia64_illegal_op_fault
1703.ret0: ;;
1704 alloc r14=ar.pfs,0,0,3,0 // must be first in insn group
1705 mov out0=r9
1706 mov out1=r10
1707 mov out2=r11
1708 movl r15=ia64_leave_kernel
1709 ;;
1710 mov rp=r15
1711 mov b6=r8
1712 ;;
1713 cmp.ne p6,p0=0,r8
1714(p6) br.call.dpnt.many b6=b6 // call returns to ia64_leave_kernel
1715 br.sptk.many ia64_leave_kernel
1716END(dispatch_illegal_op_fault)
1717
1718#ifdef CONFIG_IA32_SUPPORT 1718#ifdef CONFIG_IA32_SUPPORT
1719 1719
1720 /* 1720 /*
diff --git a/arch/ia64/kernel/minstate.h b/arch/ia64/kernel/minstate.h
index 7c548ac52bbc..74b6d670aaef 100644
--- a/arch/ia64/kernel/minstate.h
+++ b/arch/ia64/kernel/minstate.h
@@ -15,6 +15,9 @@
15#define ACCOUNT_SYS_ENTER 15#define ACCOUNT_SYS_ENTER
16#endif 16#endif
17 17
18.section ".data.patch.rse", "a"
19.previous
20
18/* 21/*
19 * DO_SAVE_MIN switches to the kernel stacks (if necessary) and saves 22 * DO_SAVE_MIN switches to the kernel stacks (if necessary) and saves
20 * the minimum state necessary that allows us to turn psr.ic back 23 * the minimum state necessary that allows us to turn psr.ic back
@@ -40,7 +43,7 @@
40 * Note that psr.ic is NOT turned on by this macro. This is so that 43 * Note that psr.ic is NOT turned on by this macro. This is so that
41 * we can pass interruption state as arguments to a handler. 44 * we can pass interruption state as arguments to a handler.
42 */ 45 */
43#define DO_SAVE_MIN(COVER,SAVE_IFS,EXTRA) \ 46#define DO_SAVE_MIN(COVER,SAVE_IFS,EXTRA,WORKAROUND) \
44 mov r16=IA64_KR(CURRENT); /* M */ \ 47 mov r16=IA64_KR(CURRENT); /* M */ \
45 mov r27=ar.rsc; /* M */ \ 48 mov r27=ar.rsc; /* M */ \
46 mov r20=r1; /* A */ \ 49 mov r20=r1; /* A */ \
@@ -87,6 +90,7 @@
87 tbit.nz p15,p0=r29,IA64_PSR_I_BIT; \ 90 tbit.nz p15,p0=r29,IA64_PSR_I_BIT; \
88 mov r29=b0 \ 91 mov r29=b0 \
89 ;; \ 92 ;; \
93 WORKAROUND; \
90 adds r16=PT(R8),r1; /* initialize first base pointer */ \ 94 adds r16=PT(R8),r1; /* initialize first base pointer */ \
91 adds r17=PT(R9),r1; /* initialize second base pointer */ \ 95 adds r17=PT(R9),r1; /* initialize second base pointer */ \
92(pKStk) mov r18=r0; /* make sure r18 isn't NaT */ \ 96(pKStk) mov r18=r0; /* make sure r18 isn't NaT */ \
@@ -206,6 +210,40 @@
206 st8 [r25]=r10; /* ar.ssd */ \ 210 st8 [r25]=r10; /* ar.ssd */ \
207 ;; 211 ;;
208 212
209#define SAVE_MIN_WITH_COVER DO_SAVE_MIN(cover, mov r30=cr.ifs,) 213#define RSE_WORKAROUND \
210#define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(cover, mov r30=cr.ifs, mov r15=r19) 214(pUStk) extr.u r17=r18,3,6; \
211#define SAVE_MIN DO_SAVE_MIN( , mov r30=r0, ) 215(pUStk) sub r16=r18,r22; \
216[1:](pKStk) br.cond.sptk.many 1f; \
217 .xdata4 ".data.patch.rse",1b-. \
218 ;; \
219 cmp.ge p6,p7 = 33,r17; \
220 ;; \
221(p6) mov r17=0x310; \
222(p7) mov r17=0x308; \
223 ;; \
224 cmp.leu p1,p0=r16,r17; \
225(p1) br.cond.sptk.many 1f; \
226 dep.z r17=r26,0,62; \
227 movl r16=2f; \
228 ;; \
229 mov ar.pfs=r17; \
230 dep r27=r0,r27,16,14; \
231 mov b0=r16; \
232 ;; \
233 br.ret.sptk b0; \
234 ;; \
2352: \
236 mov ar.rsc=r0 \
237 ;; \
238 flushrs; \
239 ;; \
240 mov ar.bspstore=r22 \
241 ;; \
242 mov r18=ar.bsp; \
243 ;; \
2441: \
245 .pred.rel "mutex", pKStk, pUStk
246
247#define SAVE_MIN_WITH_COVER DO_SAVE_MIN(cover, mov r30=cr.ifs, , RSE_WORKAROUND)
248#define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(cover, mov r30=cr.ifs, mov r15=r19, RSE_WORKAROUND)
249#define SAVE_MIN DO_SAVE_MIN( , mov r30=r0, , )
diff --git a/arch/ia64/kernel/patch.c b/arch/ia64/kernel/patch.c
index e0dca8743dbb..b83b2c516008 100644
--- a/arch/ia64/kernel/patch.c
+++ b/arch/ia64/kernel/patch.c
@@ -115,6 +115,29 @@ ia64_patch_vtop (unsigned long start, unsigned long end)
115 ia64_srlz_i(); 115 ia64_srlz_i();
116} 116}
117 117
118/*
119 * Disable the RSE workaround by turning the conditional branch
120 * that we tagged in each place the workaround was used into an
121 * unconditional branch.
122 */
123void __init
124ia64_patch_rse (unsigned long start, unsigned long end)
125{
126 s32 *offp = (s32 *) start;
127 u64 ip, *b;
128
129 while (offp < (s32 *) end) {
130 ip = (u64) offp + *offp;
131
132 b = (u64 *)(ip & -16);
133 b[1] &= ~0xf800000L;
134 ia64_fc((void *) ip);
135 ++offp;
136 }
137 ia64_sync_i();
138 ia64_srlz_i();
139}
140
118void __init 141void __init
119ia64_patch_mckinley_e9 (unsigned long start, unsigned long end) 142ia64_patch_mckinley_e9 (unsigned long start, unsigned long end)
120{ 143{
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index 71d05133f556..7714a97b0104 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -1864,11 +1864,6 @@ pfm_flush(struct file *filp, fl_owner_t id)
1864 * invoked after, it will find an empty queue and no 1864 * invoked after, it will find an empty queue and no
1865 * signal will be sent. In both case, we are safe 1865 * signal will be sent. In both case, we are safe
1866 */ 1866 */
1867 if (filp->f_flags & FASYNC) {
1868 DPRINT(("cleaning up async_queue=%p\n", ctx->ctx_async_queue));
1869 pfm_do_fasync (-1, filp, ctx, 0);
1870 }
1871
1872 PROTECT_CTX(ctx, flags); 1867 PROTECT_CTX(ctx, flags);
1873 1868
1874 state = ctx->ctx_state; 1869 state = ctx->ctx_state;
@@ -1999,6 +1994,11 @@ pfm_close(struct inode *inode, struct file *filp)
1999 return -EBADF; 1994 return -EBADF;
2000 } 1995 }
2001 1996
1997 if (filp->f_flags & FASYNC) {
1998 DPRINT(("cleaning up async_queue=%p\n", ctx->ctx_async_queue));
1999 pfm_do_fasync(-1, filp, ctx, 0);
2000 }
2001
2002 PROTECT_CTX(ctx, flags); 2002 PROTECT_CTX(ctx, flags);
2003 2003
2004 state = ctx->ctx_state; 2004 state = ctx->ctx_state;
diff --git a/arch/ia64/kernel/sal.c b/arch/ia64/kernel/sal.c
index 7e0259709c04..0464173ea568 100644
--- a/arch/ia64/kernel/sal.c
+++ b/arch/ia64/kernel/sal.c
@@ -252,11 +252,10 @@ check_sal_cache_flush (void)
252 local_irq_save(flags); 252 local_irq_save(flags);
253 253
254 /* 254 /*
255 * Schedule a timer interrupt, wait until it's reported, and see if 255 * Send ourselves a timer interrupt, wait until it's reported, and see
256 * SAL_CACHE_FLUSH drops it. 256 * if SAL_CACHE_FLUSH drops it.
257 */ 257 */
258 ia64_set_itv(IA64_TIMER_VECTOR); 258 platform_send_ipi(cpu, IA64_TIMER_VECTOR, IA64_IPI_DM_INT, 0);
259 ia64_set_itm(ia64_get_itc() + 1000);
260 259
261 while (!ia64_get_irr(IA64_TIMER_VECTOR)) 260 while (!ia64_get_irr(IA64_TIMER_VECTOR))
262 cpu_relax(); 261 cpu_relax();
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index e9596cd0cdab..632cda8f2e76 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -547,7 +547,8 @@ setup_arch (char **cmdline_p)
547# ifdef CONFIG_ACPI_NUMA 547# ifdef CONFIG_ACPI_NUMA
548 acpi_numa_init(); 548 acpi_numa_init();
549 per_cpu_scan_finalize((cpus_weight(early_cpu_possible_map) == 0 ? 549 per_cpu_scan_finalize((cpus_weight(early_cpu_possible_map) == 0 ?
550 32 : cpus_weight(early_cpu_possible_map)), additional_cpus); 550 32 : cpus_weight(early_cpu_possible_map)),
551 additional_cpus > 0 ? additional_cpus : 0);
551# endif 552# endif
552#else 553#else
553# ifdef CONFIG_SMP 554# ifdef CONFIG_SMP
@@ -560,6 +561,17 @@ setup_arch (char **cmdline_p)
560 /* process SAL system table: */ 561 /* process SAL system table: */
561 ia64_sal_init(__va(efi.sal_systab)); 562 ia64_sal_init(__va(efi.sal_systab));
562 563
564#ifdef CONFIG_ITANIUM
565 ia64_patch_rse((u64) __start___rse_patchlist, (u64) __end___rse_patchlist);
566#else
567 {
568 u64 num_phys_stacked;
569
570 if (ia64_pal_rse_info(&num_phys_stacked, 0) == 0 && num_phys_stacked > 96)
571 ia64_patch_rse((u64) __start___rse_patchlist, (u64) __end___rse_patchlist);
572 }
573#endif
574
563#ifdef CONFIG_SMP 575#ifdef CONFIG_SMP
564 cpu_physical_id(0) = hard_smp_processor_id(); 576 cpu_physical_id(0) = hard_smp_processor_id();
565#endif 577#endif
@@ -567,8 +579,6 @@ setup_arch (char **cmdline_p)
567 cpu_init(); /* initialize the bootstrap CPU */ 579 cpu_init(); /* initialize the bootstrap CPU */
568 mmu_context_init(); /* initialize context_id bitmap */ 580 mmu_context_init(); /* initialize context_id bitmap */
569 581
570 check_sal_cache_flush();
571
572#ifdef CONFIG_ACPI 582#ifdef CONFIG_ACPI
573 acpi_boot_init(); 583 acpi_boot_init();
574#endif 584#endif
@@ -596,6 +606,7 @@ setup_arch (char **cmdline_p)
596 ia64_mca_init(); 606 ia64_mca_init();
597 607
598 platform_setup(cmdline_p); 608 platform_setup(cmdline_p);
609 check_sal_cache_flush();
599 paging_init(); 610 paging_init();
600} 611}
601 612
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c
index 8c73643f2d66..aad1b7b1fff9 100644
--- a/arch/ia64/kernel/time.c
+++ b/arch/ia64/kernel/time.c
@@ -117,6 +117,7 @@ void account_system_vtime(struct task_struct *tsk)
117 117
118 local_irq_restore(flags); 118 local_irq_restore(flags);
119} 119}
120EXPORT_SYMBOL_GPL(account_system_vtime);
120 121
121/* 122/*
122 * Called from the timer interrupt handler to charge accumulated user time 123 * Called from the timer interrupt handler to charge accumulated user time
diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S
index 80622acc95de..5929ab10a289 100644
--- a/arch/ia64/kernel/vmlinux.lds.S
+++ b/arch/ia64/kernel/vmlinux.lds.S
@@ -156,6 +156,13 @@ SECTIONS
156 __end___vtop_patchlist = .; 156 __end___vtop_patchlist = .;
157 } 157 }
158 158
159 .data.patch.rse : AT(ADDR(.data.patch.rse) - LOAD_OFFSET)
160 {
161 __start___rse_patchlist = .;
162 *(.data.patch.rse)
163 __end___rse_patchlist = .;
164 }
165
159 .data.patch.mckinley_e9 : AT(ADDR(.data.patch.mckinley_e9) - LOAD_OFFSET) 166 .data.patch.mckinley_e9 : AT(ADDR(.data.patch.mckinley_e9) - LOAD_OFFSET)
160 { 167 {
161 __start___mckinley_e9_bundles = .; 168 __start___mckinley_e9_bundles = .;
diff --git a/arch/ia64/kvm/mmio.c b/arch/ia64/kvm/mmio.c
index 351bf70da463..7f1a858bc69f 100644
--- a/arch/ia64/kvm/mmio.c
+++ b/arch/ia64/kvm/mmio.c
@@ -159,7 +159,8 @@ static void mmio_access(struct kvm_vcpu *vcpu, u64 src_pa, u64 *dest,
159 159
160 if (p->u.ioreq.state == STATE_IORESP_READY) { 160 if (p->u.ioreq.state == STATE_IORESP_READY) {
161 if (dir == IOREQ_READ) 161 if (dir == IOREQ_READ)
162 *dest = p->u.ioreq.data; 162 /* it's necessary to ensure zero extending */
163 *dest = p->u.ioreq.data & (~0UL >> (64-(s*8)));
163 } else 164 } else
164 panic_vm(vcpu); 165 panic_vm(vcpu);
165out: 166out:
diff --git a/arch/ia64/sn/kernel/sn2/sn2_smp.c b/arch/ia64/sn/kernel/sn2/sn2_smp.c
index 49d3120415eb..e585f9a2afb9 100644
--- a/arch/ia64/sn/kernel/sn2/sn2_smp.c
+++ b/arch/ia64/sn/kernel/sn2/sn2_smp.c
@@ -512,6 +512,8 @@ static ssize_t sn2_ptc_proc_write(struct file *file, const char __user *user, si
512 int cpu; 512 int cpu;
513 char optstr[64]; 513 char optstr[64];
514 514
515 if (count == 0 || count > sizeof(optstr))
516 return -EINVAL;
515 if (copy_from_user(optstr, user, count)) 517 if (copy_from_user(optstr, user, count))
516 return -EFAULT; 518 return -EFAULT;
517 optstr[count - 1] = '\0'; 519 optstr[count - 1] = '\0';
diff --git a/arch/ia64/uv/kernel/setup.c b/arch/ia64/uv/kernel/setup.c
index 9aa743203c3c..cf5f28ae96c4 100644
--- a/arch/ia64/uv/kernel/setup.c
+++ b/arch/ia64/uv/kernel/setup.c
@@ -17,6 +17,9 @@
17DEFINE_PER_CPU(struct uv_hub_info_s, __uv_hub_info); 17DEFINE_PER_CPU(struct uv_hub_info_s, __uv_hub_info);
18EXPORT_PER_CPU_SYMBOL_GPL(__uv_hub_info); 18EXPORT_PER_CPU_SYMBOL_GPL(__uv_hub_info);
19 19
20#ifdef CONFIG_IA64_SGI_UV
21int sn_prom_type;
22#endif
20 23
21struct redir_addr { 24struct redir_addr {
22 unsigned long redirect; 25 unsigned long redirect;
@@ -64,6 +67,15 @@ void __init uv_setup(char **cmdline_p)
64 m_n_config.s.m_skt = 37; 67 m_n_config.s.m_skt = 37;
65 m_n_config.s.n_skt = 0; 68 m_n_config.s.n_skt = 0;
66 mmr_base = 0; 69 mmr_base = 0;
70#if 0
71 /* Need BIOS calls - TDB */
72 if (!ia64_sn_is_fake_prom())
73 sn_prom_type = 1;
74 else
75#endif
76 sn_prom_type = 2;
77 printk(KERN_INFO "Running on medusa with %s PROM\n",
78 (sn_prom_type == 1) ? "real" : "fake");
67 } else { 79 } else {
68 get_lowmem_redirect(&lowmem_redir_base, &lowmem_redir_size); 80 get_lowmem_redirect(&lowmem_redir_base, &lowmem_redir_size);
69 node_id.v = uv_read_local_mmr(UVH_NODE_ID); 81 node_id.v = uv_read_local_mmr(UVH_NODE_ID);
diff --git a/arch/m68k/configs/amiga_defconfig b/arch/m68k/configs/amiga_defconfig
index dca50da9ffd0..8e2a0f5faf53 100644
--- a/arch/m68k/configs/amiga_defconfig
+++ b/arch/m68k/configs/amiga_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.26-rc2 3# Linux kernel version: 2.6.26-rc4
4# Sun May 18 14:44:41 2008 4# Wed May 28 22:47:35 2008
5# 5#
6CONFIG_M68K=y 6CONFIG_M68K=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -59,7 +59,7 @@ CONFIG_HOTPLUG=y
59CONFIG_PRINTK=y 59CONFIG_PRINTK=y
60CONFIG_BUG=y 60CONFIG_BUG=y
61CONFIG_ELF_CORE=y 61CONFIG_ELF_CORE=y
62# CONFIG_COMPAT_BRK is not set 62CONFIG_COMPAT_BRK=y
63CONFIG_BASE_FULL=y 63CONFIG_BASE_FULL=y
64CONFIG_FUTEX=y 64CONFIG_FUTEX=y
65CONFIG_ANON_INODES=y 65CONFIG_ANON_INODES=y
diff --git a/arch/m68k/configs/apollo_defconfig b/arch/m68k/configs/apollo_defconfig
index c3cd5b749d2c..e2d511e2a1d1 100644
--- a/arch/m68k/configs/apollo_defconfig
+++ b/arch/m68k/configs/apollo_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.26-rc2 3# Linux kernel version: 2.6.26-rc4
4# Sun May 18 14:44:42 2008 4# Wed May 28 22:47:35 2008
5# 5#
6CONFIG_M68K=y 6CONFIG_M68K=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -59,7 +59,7 @@ CONFIG_HOTPLUG=y
59CONFIG_PRINTK=y 59CONFIG_PRINTK=y
60CONFIG_BUG=y 60CONFIG_BUG=y
61CONFIG_ELF_CORE=y 61CONFIG_ELF_CORE=y
62# CONFIG_COMPAT_BRK is not set 62CONFIG_COMPAT_BRK=y
63CONFIG_BASE_FULL=y 63CONFIG_BASE_FULL=y
64CONFIG_FUTEX=y 64CONFIG_FUTEX=y
65CONFIG_ANON_INODES=y 65CONFIG_ANON_INODES=y
diff --git a/arch/m68k/configs/atari_defconfig b/arch/m68k/configs/atari_defconfig
index 073ae4bbe264..6e20d656adaf 100644
--- a/arch/m68k/configs/atari_defconfig
+++ b/arch/m68k/configs/atari_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.26-rc2 3# Linux kernel version: 2.6.26-rc4
4# Sun May 18 14:44:43 2008 4# Wed May 28 22:47:35 2008
5# 5#
6CONFIG_M68K=y 6CONFIG_M68K=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -59,7 +59,7 @@ CONFIG_HOTPLUG=y
59CONFIG_PRINTK=y 59CONFIG_PRINTK=y
60CONFIG_BUG=y 60CONFIG_BUG=y
61CONFIG_ELF_CORE=y 61CONFIG_ELF_CORE=y
62# CONFIG_COMPAT_BRK is not set 62CONFIG_COMPAT_BRK=y
63CONFIG_BASE_FULL=y 63CONFIG_BASE_FULL=y
64CONFIG_FUTEX=y 64CONFIG_FUTEX=y
65CONFIG_ANON_INODES=y 65CONFIG_ANON_INODES=y
diff --git a/arch/m68k/configs/bvme6000_defconfig b/arch/m68k/configs/bvme6000_defconfig
index 0789ede2e9ee..a0a9b30bb502 100644
--- a/arch/m68k/configs/bvme6000_defconfig
+++ b/arch/m68k/configs/bvme6000_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.26-rc2 3# Linux kernel version: 2.6.26-rc4
4# Sun May 18 14:44:45 2008 4# Wed May 28 22:47:35 2008
5# 5#
6CONFIG_M68K=y 6CONFIG_M68K=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -59,7 +59,7 @@ CONFIG_HOTPLUG=y
59CONFIG_PRINTK=y 59CONFIG_PRINTK=y
60CONFIG_BUG=y 60CONFIG_BUG=y
61CONFIG_ELF_CORE=y 61CONFIG_ELF_CORE=y
62# CONFIG_COMPAT_BRK is not set 62CONFIG_COMPAT_BRK=y
63CONFIG_BASE_FULL=y 63CONFIG_BASE_FULL=y
64CONFIG_FUTEX=y 64CONFIG_FUTEX=y
65CONFIG_ANON_INODES=y 65CONFIG_ANON_INODES=y
diff --git a/arch/m68k/configs/hp300_defconfig b/arch/m68k/configs/hp300_defconfig
index 3e140bf49b22..6778041de262 100644
--- a/arch/m68k/configs/hp300_defconfig
+++ b/arch/m68k/configs/hp300_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.26-rc2 3# Linux kernel version: 2.6.26-rc4
4# Sun May 18 14:44:46 2008 4# Wed May 28 22:47:35 2008
5# 5#
6CONFIG_M68K=y 6CONFIG_M68K=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -59,7 +59,7 @@ CONFIG_HOTPLUG=y
59CONFIG_PRINTK=y 59CONFIG_PRINTK=y
60CONFIG_BUG=y 60CONFIG_BUG=y
61CONFIG_ELF_CORE=y 61CONFIG_ELF_CORE=y
62# CONFIG_COMPAT_BRK is not set 62CONFIG_COMPAT_BRK=y
63CONFIG_BASE_FULL=y 63CONFIG_BASE_FULL=y
64CONFIG_FUTEX=y 64CONFIG_FUTEX=y
65CONFIG_ANON_INODES=y 65CONFIG_ANON_INODES=y
diff --git a/arch/m68k/configs/mac_defconfig b/arch/m68k/configs/mac_defconfig
index ba3a91792cbf..7cd375740348 100644
--- a/arch/m68k/configs/mac_defconfig
+++ b/arch/m68k/configs/mac_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.26-rc2 3# Linux kernel version: 2.6.26-rc4
4# Sun May 18 14:44:47 2008 4# Wed May 28 22:47:35 2008
5# 5#
6CONFIG_M68K=y 6CONFIG_M68K=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -59,7 +59,7 @@ CONFIG_HOTPLUG=y
59CONFIG_PRINTK=y 59CONFIG_PRINTK=y
60CONFIG_BUG=y 60CONFIG_BUG=y
61CONFIG_ELF_CORE=y 61CONFIG_ELF_CORE=y
62# CONFIG_COMPAT_BRK is not set 62CONFIG_COMPAT_BRK=y
63CONFIG_BASE_FULL=y 63CONFIG_BASE_FULL=y
64CONFIG_FUTEX=y 64CONFIG_FUTEX=y
65CONFIG_ANON_INODES=y 65CONFIG_ANON_INODES=y
diff --git a/arch/m68k/configs/multi_defconfig b/arch/m68k/configs/multi_defconfig
index 4d23f99227f9..0747fa3984df 100644
--- a/arch/m68k/configs/multi_defconfig
+++ b/arch/m68k/configs/multi_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.26-rc2 3# Linux kernel version: 2.6.26-rc4
4# Sun May 18 14:42:31 2008 4# Wed May 28 22:47:35 2008
5# 5#
6CONFIG_M68K=y 6CONFIG_M68K=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -59,7 +59,7 @@ CONFIG_HOTPLUG=y
59CONFIG_PRINTK=y 59CONFIG_PRINTK=y
60CONFIG_BUG=y 60CONFIG_BUG=y
61CONFIG_ELF_CORE=y 61CONFIG_ELF_CORE=y
62# CONFIG_COMPAT_BRK is not set 62CONFIG_COMPAT_BRK=y
63CONFIG_BASE_FULL=y 63CONFIG_BASE_FULL=y
64CONFIG_FUTEX=y 64CONFIG_FUTEX=y
65CONFIG_ANON_INODES=y 65CONFIG_ANON_INODES=y
diff --git a/arch/m68k/configs/mvme147_defconfig b/arch/m68k/configs/mvme147_defconfig
index 188847fed824..e7a8246840b5 100644
--- a/arch/m68k/configs/mvme147_defconfig
+++ b/arch/m68k/configs/mvme147_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.26-rc2 3# Linux kernel version: 2.6.26-rc4
4# Sun May 18 14:44:49 2008 4# Wed May 28 22:47:35 2008
5# 5#
6CONFIG_M68K=y 6CONFIG_M68K=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -59,7 +59,7 @@ CONFIG_HOTPLUG=y
59CONFIG_PRINTK=y 59CONFIG_PRINTK=y
60CONFIG_BUG=y 60CONFIG_BUG=y
61CONFIG_ELF_CORE=y 61CONFIG_ELF_CORE=y
62# CONFIG_COMPAT_BRK is not set 62CONFIG_COMPAT_BRK=y
63CONFIG_BASE_FULL=y 63CONFIG_BASE_FULL=y
64CONFIG_FUTEX=y 64CONFIG_FUTEX=y
65CONFIG_ANON_INODES=y 65CONFIG_ANON_INODES=y
diff --git a/arch/m68k/configs/mvme16x_defconfig b/arch/m68k/configs/mvme16x_defconfig
index 983e53d990c8..ab536eb172bb 100644
--- a/arch/m68k/configs/mvme16x_defconfig
+++ b/arch/m68k/configs/mvme16x_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.26-rc2 3# Linux kernel version: 2.6.26-rc4
4# Sun May 18 14:44:50 2008 4# Wed May 28 22:47:35 2008
5# 5#
6CONFIG_M68K=y 6CONFIG_M68K=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -59,7 +59,7 @@ CONFIG_HOTPLUG=y
59CONFIG_PRINTK=y 59CONFIG_PRINTK=y
60CONFIG_BUG=y 60CONFIG_BUG=y
61CONFIG_ELF_CORE=y 61CONFIG_ELF_CORE=y
62# CONFIG_COMPAT_BRK is not set 62CONFIG_COMPAT_BRK=y
63CONFIG_BASE_FULL=y 63CONFIG_BASE_FULL=y
64CONFIG_FUTEX=y 64CONFIG_FUTEX=y
65CONFIG_ANON_INODES=y 65CONFIG_ANON_INODES=y
diff --git a/arch/m68k/configs/q40_defconfig b/arch/m68k/configs/q40_defconfig
index 7707f3fb0a70..e05be687b500 100644
--- a/arch/m68k/configs/q40_defconfig
+++ b/arch/m68k/configs/q40_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.26-rc2 3# Linux kernel version: 2.6.26-rc4
4# Sun May 18 14:44:51 2008 4# Wed May 28 22:47:35 2008
5# 5#
6CONFIG_M68K=y 6CONFIG_M68K=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -59,7 +59,7 @@ CONFIG_HOTPLUG=y
59CONFIG_PRINTK=y 59CONFIG_PRINTK=y
60CONFIG_BUG=y 60CONFIG_BUG=y
61CONFIG_ELF_CORE=y 61CONFIG_ELF_CORE=y
62# CONFIG_COMPAT_BRK is not set 62CONFIG_COMPAT_BRK=y
63CONFIG_BASE_FULL=y 63CONFIG_BASE_FULL=y
64CONFIG_FUTEX=y 64CONFIG_FUTEX=y
65CONFIG_ANON_INODES=y 65CONFIG_ANON_INODES=y
diff --git a/arch/m68k/configs/sun3_defconfig b/arch/m68k/configs/sun3_defconfig
index a765f6f15d2c..296340d2b315 100644
--- a/arch/m68k/configs/sun3_defconfig
+++ b/arch/m68k/configs/sun3_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.26-rc2 3# Linux kernel version: 2.6.26-rc4
4# Sun May 18 14:44:53 2008 4# Wed May 28 22:47:35 2008
5# 5#
6CONFIG_M68K=y 6CONFIG_M68K=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -59,7 +59,7 @@ CONFIG_HOTPLUG=y
59CONFIG_PRINTK=y 59CONFIG_PRINTK=y
60CONFIG_BUG=y 60CONFIG_BUG=y
61CONFIG_ELF_CORE=y 61CONFIG_ELF_CORE=y
62# CONFIG_COMPAT_BRK is not set 62CONFIG_COMPAT_BRK=y
63CONFIG_BASE_FULL=y 63CONFIG_BASE_FULL=y
64CONFIG_FUTEX=y 64CONFIG_FUTEX=y
65CONFIG_ANON_INODES=y 65CONFIG_ANON_INODES=y
diff --git a/arch/m68k/configs/sun3x_defconfig b/arch/m68k/configs/sun3x_defconfig
index 431513937498..8d3a416c92bf 100644
--- a/arch/m68k/configs/sun3x_defconfig
+++ b/arch/m68k/configs/sun3x_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.26-rc2 3# Linux kernel version: 2.6.26-rc4
4# Sun May 18 14:44:54 2008 4# Wed May 28 22:47:35 2008
5# 5#
6CONFIG_M68K=y 6CONFIG_M68K=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -59,7 +59,7 @@ CONFIG_HOTPLUG=y
59CONFIG_PRINTK=y 59CONFIG_PRINTK=y
60CONFIG_BUG=y 60CONFIG_BUG=y
61CONFIG_ELF_CORE=y 61CONFIG_ELF_CORE=y
62# CONFIG_COMPAT_BRK is not set 62CONFIG_COMPAT_BRK=y
63CONFIG_BASE_FULL=y 63CONFIG_BASE_FULL=y
64CONFIG_FUTEX=y 64CONFIG_FUTEX=y
65CONFIG_ANON_INODES=y 65CONFIG_ANON_INODES=y
diff --git a/arch/m68k/lib/string.c b/arch/m68k/lib/string.c
index 891e1347bc4e..4253f870e54f 100644
--- a/arch/m68k/lib/string.c
+++ b/arch/m68k/lib/string.c
@@ -15,6 +15,12 @@ char *strcpy(char *dest, const char *src)
15} 15}
16EXPORT_SYMBOL(strcpy); 16EXPORT_SYMBOL(strcpy);
17 17
18char *strcat(char *dest, const char *src)
19{
20 return __kernel_strcpy(dest + __kernel_strlen(dest), src);
21}
22EXPORT_SYMBOL(strcat);
23
18void *memset(void *s, int c, size_t count) 24void *memset(void *s, int c, size_t count)
19{ 25{
20 void *xs = s; 26 void *xs = s;
diff --git a/arch/m68knommu/platform/coldfire/timers.c b/arch/m68knommu/platform/coldfire/timers.c
index ba5a9f32ebd4..454f25493491 100644
--- a/arch/m68knommu/platform/coldfire/timers.c
+++ b/arch/m68knommu/platform/coldfire/timers.c
@@ -111,7 +111,13 @@ void hw_timer_init(void)
111 111
112 __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR)); 112 __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR));
113 mcftmr_cycles_per_jiffy = FREQ / HZ; 113 mcftmr_cycles_per_jiffy = FREQ / HZ;
114 __raw_writetrr(mcftmr_cycles_per_jiffy, TA(MCFTIMER_TRR)); 114 /*
115 * The coldfire timer runs from 0 to TRR included, then 0
116 * again and so on. It counts thus actually TRR + 1 steps
117 * for 1 tick, not TRR. So if you want n cycles,
118 * initialize TRR with n - 1.
119 */
120 __raw_writetrr(mcftmr_cycles_per_jiffy - 1, TA(MCFTIMER_TRR));
115 __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | 121 __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 |
116 MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, TA(MCFTIMER_TMR)); 122 MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, TA(MCFTIMER_TMR));
117 123
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index e5a7c5d96364..24c5dee91768 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1006,7 +1006,7 @@ config BOOT_ELF32
1006config MIPS_L1_CACHE_SHIFT 1006config MIPS_L1_CACHE_SHIFT
1007 int 1007 int
1008 default "4" if MACH_DECSTATION 1008 default "4" if MACH_DECSTATION
1009 default "7" if SGI_IP27 || SGI_IP28 || SNI_RM 1009 default "7" if SGI_IP22 || SGI_IP27 || SGI_IP28 || SNI_RM
1010 default "4" if PMC_MSP4200_EVAL 1010 default "4" if PMC_MSP4200_EVAL
1011 default "5" 1011 default "5"
1012 1012
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 69648d01acc0..ad36c946ff96 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -538,19 +538,19 @@ cflags-$(CONFIG_SIBYTE_BCM1x80) += -Iinclude/asm-mips/mach-sibyte \
538# Sibyte SWARM board 538# Sibyte SWARM board
539# Sibyte BCM91x80 (BigSur) board 539# Sibyte BCM91x80 (BigSur) board
540# 540#
541libs-$(CONFIG_SIBYTE_CARMEL) += arch/mips/sibyte/swarm/ 541core-$(CONFIG_SIBYTE_CARMEL) += arch/mips/sibyte/swarm/
542load-$(CONFIG_SIBYTE_CARMEL) := 0xffffffff80100000 542load-$(CONFIG_SIBYTE_CARMEL) := 0xffffffff80100000
543libs-$(CONFIG_SIBYTE_CRHINE) += arch/mips/sibyte/swarm/ 543core-$(CONFIG_SIBYTE_CRHINE) += arch/mips/sibyte/swarm/
544load-$(CONFIG_SIBYTE_CRHINE) := 0xffffffff80100000 544load-$(CONFIG_SIBYTE_CRHINE) := 0xffffffff80100000
545libs-$(CONFIG_SIBYTE_CRHONE) += arch/mips/sibyte/swarm/ 545core-$(CONFIG_SIBYTE_CRHONE) += arch/mips/sibyte/swarm/
546load-$(CONFIG_SIBYTE_CRHONE) := 0xffffffff80100000 546load-$(CONFIG_SIBYTE_CRHONE) := 0xffffffff80100000
547libs-$(CONFIG_SIBYTE_RHONE) += arch/mips/sibyte/swarm/ 547core-$(CONFIG_SIBYTE_RHONE) += arch/mips/sibyte/swarm/
548load-$(CONFIG_SIBYTE_RHONE) := 0xffffffff80100000 548load-$(CONFIG_SIBYTE_RHONE) := 0xffffffff80100000
549libs-$(CONFIG_SIBYTE_SENTOSA) += arch/mips/sibyte/swarm/ 549core-$(CONFIG_SIBYTE_SENTOSA) += arch/mips/sibyte/swarm/
550load-$(CONFIG_SIBYTE_SENTOSA) := 0xffffffff80100000 550load-$(CONFIG_SIBYTE_SENTOSA) := 0xffffffff80100000
551libs-$(CONFIG_SIBYTE_SWARM) += arch/mips/sibyte/swarm/ 551core-$(CONFIG_SIBYTE_SWARM) += arch/mips/sibyte/swarm/
552load-$(CONFIG_SIBYTE_SWARM) := 0xffffffff80100000 552load-$(CONFIG_SIBYTE_SWARM) := 0xffffffff80100000
553libs-$(CONFIG_SIBYTE_BIGSUR) += arch/mips/sibyte/swarm/ 553core-$(CONFIG_SIBYTE_BIGSUR) += arch/mips/sibyte/swarm/
554load-$(CONFIG_SIBYTE_BIGSUR) := 0xffffffff80100000 554load-$(CONFIG_SIBYTE_BIGSUR) := 0xffffffff80100000
555 555
556# 556#
@@ -565,7 +565,11 @@ load-$(CONFIG_BCM47XX) := 0xffffffff80001000
565# 565#
566core-$(CONFIG_SNI_RM) += arch/mips/sni/ 566core-$(CONFIG_SNI_RM) += arch/mips/sni/
567cflags-$(CONFIG_SNI_RM) += -Iinclude/asm-mips/mach-rm 567cflags-$(CONFIG_SNI_RM) += -Iinclude/asm-mips/mach-rm
568ifdef CONFIG_CPU_LITTLE_ENDIAN
568load-$(CONFIG_SNI_RM) += 0xffffffff80600000 569load-$(CONFIG_SNI_RM) += 0xffffffff80600000
570else
571load-$(CONFIG_SNI_RM) += 0xffffffff80030000
572endif
569all-$(CONFIG_SNI_RM) := vmlinux.ecoff 573all-$(CONFIG_SNI_RM) := vmlinux.ecoff
570 574
571# 575#
diff --git a/arch/mips/au1000/common/clocks.c b/arch/mips/au1000/common/clocks.c
index 46f8ee0e2657..043429d17c5f 100644
--- a/arch/mips/au1000/common/clocks.c
+++ b/arch/mips/au1000/common/clocks.c
@@ -45,6 +45,7 @@ unsigned int get_au1x00_speed(void)
45{ 45{
46 return au1x00_clock; 46 return au1x00_clock;
47} 47}
48EXPORT_SYMBOL(get_au1x00_speed);
48 49
49/* 50/*
50 * The UART baud base is not known at compile time ... if 51 * The UART baud base is not known at compile time ... if
diff --git a/arch/mips/au1000/common/dbdma.c b/arch/mips/au1000/common/dbdma.c
index 42d555236de1..601ee9180ee4 100644
--- a/arch/mips/au1000/common/dbdma.c
+++ b/arch/mips/au1000/common/dbdma.c
@@ -216,6 +216,17 @@ u32 au1xxx_ddma_add_device(dbdev_tab_t *dev)
216} 216}
217EXPORT_SYMBOL(au1xxx_ddma_add_device); 217EXPORT_SYMBOL(au1xxx_ddma_add_device);
218 218
219void au1xxx_ddma_del_device(u32 devid)
220{
221 dbdev_tab_t *p = find_dbdev_id(devid);
222
223 if (p != NULL) {
224 memset(p, 0, sizeof(dbdev_tab_t));
225 p->dev_id = ~0;
226 }
227}
228EXPORT_SYMBOL(au1xxx_ddma_del_device);
229
219/* Allocate a channel and return a non-zero descriptor if successful. */ 230/* Allocate a channel and return a non-zero descriptor if successful. */
220u32 au1xxx_dbdma_chan_alloc(u32 srcid, u32 destid, 231u32 au1xxx_dbdma_chan_alloc(u32 srcid, u32 destid,
221 void (*callback)(int, void *), void *callparam) 232 void (*callback)(int, void *), void *callparam)
diff --git a/arch/mips/au1000/common/platform.c b/arch/mips/au1000/common/platform.c
index 8cae7753ef79..74d6d4a593be 100644
--- a/arch/mips/au1000/common/platform.c
+++ b/arch/mips/au1000/common/platform.c
@@ -165,12 +165,12 @@ static struct resource au1xxx_usb_gdt_resources[] = {
165static struct resource au1xxx_mmc_resources[] = { 165static struct resource au1xxx_mmc_resources[] = {
166 [0] = { 166 [0] = {
167 .start = SD0_PHYS_ADDR, 167 .start = SD0_PHYS_ADDR,
168 .end = SD0_PHYS_ADDR + 0x40, 168 .end = SD0_PHYS_ADDR + 0x7ffff,
169 .flags = IORESOURCE_MEM, 169 .flags = IORESOURCE_MEM,
170 }, 170 },
171 [1] = { 171 [1] = {
172 .start = SD1_PHYS_ADDR, 172 .start = SD1_PHYS_ADDR,
173 .end = SD1_PHYS_ADDR + 0x40, 173 .end = SD1_PHYS_ADDR + 0x7ffff,
174 .flags = IORESOURCE_MEM, 174 .flags = IORESOURCE_MEM,
175 }, 175 },
176 [2] = { 176 [2] = {
diff --git a/arch/mips/configs/sb1250-swarm_defconfig b/arch/mips/configs/sb1250-swarm_defconfig
index 117470b60e34..4b8799802788 100644
--- a/arch/mips/configs/sb1250-swarm_defconfig
+++ b/arch/mips/configs/sb1250-swarm_defconfig
@@ -1,67 +1,58 @@
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.25
4# Tue Feb 20 21:47:40 2007 4# Sat May 3 00:38:11 2008
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
13# CONFIG_BCM47XX is not set
26# CONFIG_MIPS_COBALT is not set 14# CONFIG_MIPS_COBALT is not set
27# CONFIG_MACH_DECSTATION is not set 15# CONFIG_MACH_DECSTATION is not set
28# CONFIG_MACH_JAZZ is not set 16# CONFIG_MACH_JAZZ is not set
17# CONFIG_LASAT is not set
18# CONFIG_LEMOTE_FULONG is not set
29# CONFIG_MIPS_ATLAS is not set 19# CONFIG_MIPS_ATLAS is not set
30# CONFIG_MIPS_MALTA is not set 20# CONFIG_MIPS_MALTA is not set
31# CONFIG_MIPS_SEAD is not set 21# CONFIG_MIPS_SEAD is not set
32# CONFIG_WR_PPMC is not set
33# CONFIG_MIPS_SIM is not set 22# CONFIG_MIPS_SIM is not set
34# CONFIG_MOMENCO_JAGUAR_ATX is not set 23# CONFIG_MARKEINS is not set
35# CONFIG_MIPS_XXS1500 is not set 24# CONFIG_MACH_VR41XX is not set
36# CONFIG_PNX8550_JBS is not set 25# CONFIG_PNX8550_JBS is not set
37# CONFIG_PNX8550_STB810 is not set 26# CONFIG_PNX8550_STB810 is not set
38# CONFIG_MACH_VR41XX is not set 27# CONFIG_PMC_MSP is not set
39# CONFIG_PMC_YOSEMITE is not set 28# CONFIG_PMC_YOSEMITE is not set
40# CONFIG_MARKEINS is not set
41# CONFIG_SGI_IP22 is not set 29# CONFIG_SGI_IP22 is not set
42# CONFIG_SGI_IP27 is not set 30# CONFIG_SGI_IP27 is not set
31# CONFIG_SGI_IP28 is not set
43# CONFIG_SGI_IP32 is not set 32# CONFIG_SGI_IP32 is not set
44# CONFIG_SIBYTE_BIGSUR is not set
45CONFIG_SIBYTE_SWARM=y
46# CONFIG_SIBYTE_SENTOSA is not set
47# CONFIG_SIBYTE_RHONE is not set
48# CONFIG_SIBYTE_CARMEL is not set
49# CONFIG_SIBYTE_LITTLESUR is not set
50# CONFIG_SIBYTE_CRHINE is not set 33# CONFIG_SIBYTE_CRHINE is not set
34# CONFIG_SIBYTE_CARMEL is not set
51# CONFIG_SIBYTE_CRHONE is not set 35# CONFIG_SIBYTE_CRHONE is not set
36# CONFIG_SIBYTE_RHONE is not set
37CONFIG_SIBYTE_SWARM=y
38# CONFIG_SIBYTE_LITTLESUR is not set
39# CONFIG_SIBYTE_SENTOSA is not set
40# CONFIG_SIBYTE_BIGSUR is not set
52# CONFIG_SNI_RM is not set 41# CONFIG_SNI_RM is not set
53# CONFIG_TOSHIBA_JMR3927 is not set 42# CONFIG_TOSHIBA_JMR3927 is not set
54# CONFIG_TOSHIBA_RBTX4927 is not set 43# CONFIG_TOSHIBA_RBTX4927 is not set
55# CONFIG_TOSHIBA_RBTX4938 is not set 44# CONFIG_TOSHIBA_RBTX4938 is not set
45# CONFIG_WR_PPMC is not set
56CONFIG_SIBYTE_SB1250=y 46CONFIG_SIBYTE_SB1250=y
57CONFIG_SIBYTE_SB1xxx_SOC=y 47CONFIG_SIBYTE_SB1xxx_SOC=y
58CONFIG_CPU_SB1_PASS_1=y 48# CONFIG_CPU_SB1_PASS_1 is not set
59# CONFIG_CPU_SB1_PASS_2_1250 is not set 49# CONFIG_CPU_SB1_PASS_2_1250 is not set
60# CONFIG_CPU_SB1_PASS_2_2 is not set 50CONFIG_CPU_SB1_PASS_2_2=y
61# CONFIG_CPU_SB1_PASS_4 is not set 51# CONFIG_CPU_SB1_PASS_4 is not set
62# CONFIG_CPU_SB1_PASS_2_112x is not set 52# CONFIG_CPU_SB1_PASS_2_112x is not set
63# CONFIG_CPU_SB1_PASS_3 is not set 53# CONFIG_CPU_SB1_PASS_3 is not set
64CONFIG_SIBYTE_HAS_LDT=y 54CONFIG_SIBYTE_HAS_LDT=y
55CONFIG_SIBYTE_ENABLE_LDT_IF_PCI=y
65# CONFIG_SIMULATION is not set 56# CONFIG_SIMULATION is not set
66# CONFIG_SB1_CEX_ALWAYS_FATAL is not set 57# CONFIG_SB1_CEX_ALWAYS_FATAL is not set
67# CONFIG_SB1_CERR_STALL is not set 58# CONFIG_SB1_CERR_STALL is not set
@@ -69,20 +60,32 @@ CONFIG_SIBYTE_CFE=y
69# CONFIG_SIBYTE_CFE_CONSOLE is not set 60# CONFIG_SIBYTE_CFE_CONSOLE is not set
70# CONFIG_SIBYTE_BUS_WATCHER is not set 61# CONFIG_SIBYTE_BUS_WATCHER is not set
71# CONFIG_SIBYTE_TBPROF is not set 62# CONFIG_SIBYTE_TBPROF is not set
63CONFIG_SIBYTE_HAS_ZBUS_PROFILING=y
72CONFIG_RWSEM_GENERIC_SPINLOCK=y 64CONFIG_RWSEM_GENERIC_SPINLOCK=y
73# CONFIG_ARCH_HAS_ILOG2_U32 is not set 65# CONFIG_ARCH_HAS_ILOG2_U32 is not set
74# CONFIG_ARCH_HAS_ILOG2_U64 is not set 66# CONFIG_ARCH_HAS_ILOG2_U64 is not set
67CONFIG_ARCH_SUPPORTS_OPROFILE=y
75CONFIG_GENERIC_FIND_NEXT_BIT=y 68CONFIG_GENERIC_FIND_NEXT_BIT=y
76CONFIG_GENERIC_HWEIGHT=y 69CONFIG_GENERIC_HWEIGHT=y
77CONFIG_GENERIC_CALIBRATE_DELAY=y 70CONFIG_GENERIC_CALIBRATE_DELAY=y
71CONFIG_GENERIC_CLOCKEVENTS=y
78CONFIG_GENERIC_TIME=y 72CONFIG_GENERIC_TIME=y
73CONFIG_GENERIC_CMOS_UPDATE=y
79CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 74CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
80# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set 75# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set
76CONFIG_CEVT_SB1250=y
77CONFIG_CSRC_SB1250=y
78CONFIG_CFE=y
81CONFIG_DMA_COHERENT=y 79CONFIG_DMA_COHERENT=y
80CONFIG_EARLY_PRINTK=y
81CONFIG_SYS_HAS_EARLY_PRINTK=y
82# CONFIG_HOTPLUG_CPU is not set
83# CONFIG_NO_IOPORT is not set
82CONFIG_CPU_BIG_ENDIAN=y 84CONFIG_CPU_BIG_ENDIAN=y
83# CONFIG_CPU_LITTLE_ENDIAN is not set 85# CONFIG_CPU_LITTLE_ENDIAN is not set
84CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y 86CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
85CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y 87CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
88CONFIG_IRQ_CPU=y
86CONFIG_SWAP_IO_SPACE=y 89CONFIG_SWAP_IO_SPACE=y
87CONFIG_BOOT_ELF32=y 90CONFIG_BOOT_ELF32=y
88CONFIG_MIPS_L1_CACHE_SHIFT=5 91CONFIG_MIPS_L1_CACHE_SHIFT=5
@@ -90,6 +93,7 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5
90# 93#
91# CPU selection 94# CPU selection
92# 95#
96# CONFIG_CPU_LOONGSON2 is not set
93# CONFIG_CPU_MIPS32_R1 is not set 97# CONFIG_CPU_MIPS32_R1 is not set
94# CONFIG_CPU_MIPS32_R2 is not set 98# CONFIG_CPU_MIPS32_R2 is not set
95# CONFIG_CPU_MIPS64_R1 is not set 99# CONFIG_CPU_MIPS64_R1 is not set
@@ -130,8 +134,7 @@ CONFIG_CPU_HAS_PREFETCH=y
130CONFIG_MIPS_MT_DISABLED=y 134CONFIG_MIPS_MT_DISABLED=y
131# CONFIG_MIPS_MT_SMP is not set 135# CONFIG_MIPS_MT_SMP is not set
132# CONFIG_MIPS_MT_SMTC is not set 136# CONFIG_MIPS_MT_SMTC is not set
133# CONFIG_MIPS_VPE_LOADER is not set 137CONFIG_SB1_PASS_2_WORKAROUNDS=y
134CONFIG_SB1_PASS_1_WORKAROUNDS=y
135CONFIG_CPU_HAS_LLSC=y 138CONFIG_CPU_HAS_LLSC=y
136CONFIG_CPU_HAS_SYNC=y 139CONFIG_CPU_HAS_SYNC=y
137CONFIG_GENERIC_HARDIRQS=y 140CONFIG_GENERIC_HARDIRQS=y
@@ -140,6 +143,7 @@ CONFIG_IRQ_PER_CPU=y
140CONFIG_CPU_SUPPORTS_HIGHMEM=y 143CONFIG_CPU_SUPPORTS_HIGHMEM=y
141CONFIG_SYS_SUPPORTS_HIGHMEM=y 144CONFIG_SYS_SUPPORTS_HIGHMEM=y
142CONFIG_ARCH_FLATMEM_ENABLE=y 145CONFIG_ARCH_FLATMEM_ENABLE=y
146CONFIG_ARCH_POPULATES_NODE_MAP=y
143CONFIG_SELECT_MEMORY_MODEL=y 147CONFIG_SELECT_MEMORY_MODEL=y
144CONFIG_FLATMEM_MANUAL=y 148CONFIG_FLATMEM_MANUAL=y
145# CONFIG_DISCONTIGMEM_MANUAL is not set 149# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -147,13 +151,19 @@ CONFIG_FLATMEM_MANUAL=y
147CONFIG_FLATMEM=y 151CONFIG_FLATMEM=y
148CONFIG_FLAT_NODE_MEM_MAP=y 152CONFIG_FLAT_NODE_MEM_MAP=y
149# CONFIG_SPARSEMEM_STATIC is not set 153# CONFIG_SPARSEMEM_STATIC is not set
154# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
150CONFIG_SPLIT_PTLOCK_CPUS=4 155CONFIG_SPLIT_PTLOCK_CPUS=4
151CONFIG_RESOURCES_64BIT=y 156CONFIG_RESOURCES_64BIT=y
152CONFIG_ZONE_DMA_FLAG=1 157CONFIG_ZONE_DMA_FLAG=0
158CONFIG_VIRT_TO_BUS=y
153CONFIG_SMP=y 159CONFIG_SMP=y
154CONFIG_SYS_SUPPORTS_SMP=y 160CONFIG_SYS_SUPPORTS_SMP=y
155CONFIG_NR_CPUS_DEFAULT_2=y 161CONFIG_NR_CPUS_DEFAULT_2=y
156CONFIG_NR_CPUS=2 162CONFIG_NR_CPUS=2
163CONFIG_TICK_ONESHOT=y
164# CONFIG_NO_HZ is not set
165CONFIG_HIGH_RES_TIMERS=y
166CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
157# CONFIG_HZ_48 is not set 167# CONFIG_HZ_48 is not set
158# CONFIG_HZ_100 is not set 168# CONFIG_HZ_100 is not set
159# CONFIG_HZ_128 is not set 169# CONFIG_HZ_128 is not set
@@ -166,38 +176,49 @@ CONFIG_HZ=1000
166CONFIG_PREEMPT_NONE=y 176CONFIG_PREEMPT_NONE=y
167# CONFIG_PREEMPT_VOLUNTARY is not set 177# CONFIG_PREEMPT_VOLUNTARY is not set
168# CONFIG_PREEMPT is not set 178# CONFIG_PREEMPT is not set
169CONFIG_PREEMPT_BKL=y
170# CONFIG_KEXEC is not set 179# CONFIG_KEXEC is not set
180CONFIG_SECCOMP=y
171CONFIG_LOCKDEP_SUPPORT=y 181CONFIG_LOCKDEP_SUPPORT=y
172CONFIG_STACKTRACE_SUPPORT=y 182CONFIG_STACKTRACE_SUPPORT=y
173CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 183CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
174 184
175# 185#
176# Code maturity level options 186# General setup
177# 187#
178CONFIG_EXPERIMENTAL=y 188CONFIG_EXPERIMENTAL=y
179CONFIG_LOCK_KERNEL=y 189CONFIG_LOCK_KERNEL=y
180CONFIG_INIT_ENV_ARG_LIMIT=32 190CONFIG_INIT_ENV_ARG_LIMIT=32
181
182#
183# General setup
184#
185CONFIG_LOCALVERSION="" 191CONFIG_LOCALVERSION=""
186CONFIG_LOCALVERSION_AUTO=y 192CONFIG_LOCALVERSION_AUTO=y
187CONFIG_SWAP=y 193CONFIG_SWAP=y
188CONFIG_SYSVIPC=y 194CONFIG_SYSVIPC=y
189# CONFIG_IPC_NS is not set
190CONFIG_SYSVIPC_SYSCTL=y 195CONFIG_SYSVIPC_SYSCTL=y
191# CONFIG_POSIX_MQUEUE is not set 196# CONFIG_POSIX_MQUEUE is not set
192# CONFIG_BSD_PROCESS_ACCT is not set 197# CONFIG_BSD_PROCESS_ACCT is not set
193# CONFIG_TASKSTATS is not set 198# CONFIG_TASKSTATS is not set
194# CONFIG_UTS_NS is not set
195# CONFIG_AUDIT is not set 199# CONFIG_AUDIT is not set
196# CONFIG_IKCONFIG is not set 200# CONFIG_IKCONFIG is not set
201CONFIG_LOG_BUF_SHIFT=15
197CONFIG_CGROUPS=y 202CONFIG_CGROUPS=y
203# CONFIG_CGROUP_DEBUG is not set
204# CONFIG_CGROUP_NS is not set
198CONFIG_CPUSETS=y 205CONFIG_CPUSETS=y
199CONFIG_SYSFS_DEPRECATED=y 206CONFIG_GROUP_SCHED=y
207CONFIG_FAIR_GROUP_SCHED=y
208# CONFIG_RT_GROUP_SCHED is not set
209CONFIG_USER_SCHED=y
210# CONFIG_CGROUP_SCHED is not set
211CONFIG_CGROUP_CPUACCT=y
212# CONFIG_RESOURCE_COUNTERS is not set
213# CONFIG_SYSFS_DEPRECATED_V2 is not set
214# CONFIG_PROC_PID_CPUSET is not set
200CONFIG_RELAY=y 215CONFIG_RELAY=y
216CONFIG_NAMESPACES=y
217# CONFIG_UTS_NS is not set
218# CONFIG_IPC_NS is not set
219# CONFIG_USER_NS is not set
220# CONFIG_PID_NS is not set
221CONFIG_BLK_DEV_INITRD=y
201CONFIG_INITRAMFS_SOURCE="" 222CONFIG_INITRAMFS_SOURCE=""
202# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 223# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
203CONFIG_SYSCTL=y 224CONFIG_SYSCTL=y
@@ -209,20 +230,29 @@ CONFIG_HOTPLUG=y
209CONFIG_PRINTK=y 230CONFIG_PRINTK=y
210CONFIG_BUG=y 231CONFIG_BUG=y
211CONFIG_ELF_CORE=y 232CONFIG_ELF_CORE=y
233# CONFIG_COMPAT_BRK is not set
212CONFIG_BASE_FULL=y 234CONFIG_BASE_FULL=y
213CONFIG_FUTEX=y 235CONFIG_FUTEX=y
236CONFIG_ANON_INODES=y
214CONFIG_EPOLL=y 237CONFIG_EPOLL=y
238CONFIG_SIGNALFD=y
239CONFIG_TIMERFD=y
240CONFIG_EVENTFD=y
215CONFIG_SHMEM=y 241CONFIG_SHMEM=y
216CONFIG_SLAB=y
217CONFIG_VM_EVENT_COUNTERS=y 242CONFIG_VM_EVENT_COUNTERS=y
243CONFIG_SLAB=y
244# CONFIG_SLUB is not set
245# CONFIG_SLOB is not set
246# CONFIG_PROFILING is not set
247# CONFIG_MARKERS is not set
248CONFIG_HAVE_OPROFILE=y
249# CONFIG_HAVE_KPROBES is not set
250# CONFIG_HAVE_KRETPROBES is not set
251CONFIG_PROC_PAGE_MONITOR=y
252CONFIG_SLABINFO=y
218CONFIG_RT_MUTEXES=y 253CONFIG_RT_MUTEXES=y
219# CONFIG_TINY_SHMEM is not set 254# CONFIG_TINY_SHMEM is not set
220CONFIG_BASE_SMALL=0 255CONFIG_BASE_SMALL=0
221# CONFIG_SLOB is not set
222
223#
224# Loadable module support
225#
226CONFIG_MODULES=y 256CONFIG_MODULES=y
227CONFIG_MODULE_UNLOAD=y 257CONFIG_MODULE_UNLOAD=y
228# CONFIG_MODULE_FORCE_UNLOAD is not set 258# CONFIG_MODULE_FORCE_UNLOAD is not set
@@ -230,12 +260,10 @@ CONFIG_MODVERSIONS=y
230CONFIG_MODULE_SRCVERSION_ALL=y 260CONFIG_MODULE_SRCVERSION_ALL=y
231CONFIG_KMOD=y 261CONFIG_KMOD=y
232CONFIG_STOP_MACHINE=y 262CONFIG_STOP_MACHINE=y
233
234#
235# Block layer
236#
237CONFIG_BLOCK=y 263CONFIG_BLOCK=y
238# CONFIG_BLK_DEV_IO_TRACE is not set 264# CONFIG_BLK_DEV_IO_TRACE is not set
265CONFIG_BLK_DEV_BSG=y
266CONFIG_BLOCK_COMPAT=y
239 267
240# 268#
241# IO Schedulers 269# IO Schedulers
@@ -249,22 +277,19 @@ CONFIG_DEFAULT_AS=y
249# CONFIG_DEFAULT_CFQ is not set 277# CONFIG_DEFAULT_CFQ is not set
250# CONFIG_DEFAULT_NOOP is not set 278# CONFIG_DEFAULT_NOOP is not set
251CONFIG_DEFAULT_IOSCHED="anticipatory" 279CONFIG_DEFAULT_IOSCHED="anticipatory"
280CONFIG_CLASSIC_RCU=y
252 281
253# 282#
254# Bus options (PCI, PCMCIA, EISA, ISA, TC) 283# Bus options (PCI, PCMCIA, EISA, ISA, TC)
255# 284#
256CONFIG_HW_HAS_PCI=y 285CONFIG_HW_HAS_PCI=y
257CONFIG_PCI=y 286CONFIG_PCI=y
287CONFIG_PCI_DOMAINS=y
288# CONFIG_ARCH_SUPPORTS_MSI is not set
289# CONFIG_PCI_LEGACY is not set
258CONFIG_MMU=y 290CONFIG_MMU=y
259 291CONFIG_ZONE_DMA32=y
260#
261# PCCARD (PCMCIA/CardBus) support
262#
263# CONFIG_PCCARD is not set 292# CONFIG_PCCARD is not set
264
265#
266# PCI Hotplug Support
267#
268# CONFIG_HOTPLUG_PCI is not set 293# CONFIG_HOTPLUG_PCI is not set
269 294
270# 295#
@@ -272,7 +297,6 @@ CONFIG_MMU=y
272# 297#
273CONFIG_BINFMT_ELF=y 298CONFIG_BINFMT_ELF=y
274# CONFIG_BINFMT_MISC is not set 299# CONFIG_BINFMT_MISC is not set
275# CONFIG_BUILD_ELF64 is not set
276CONFIG_MIPS32_COMPAT=y 300CONFIG_MIPS32_COMPAT=y
277CONFIG_COMPAT=y 301CONFIG_COMPAT=y
278CONFIG_SYSVIPC_COMPAT=y 302CONFIG_SYSVIPC_COMPAT=y
@@ -286,7 +310,6 @@ CONFIG_BINFMT_ELF32=y
286CONFIG_PM=y 310CONFIG_PM=y
287# CONFIG_PM_LEGACY is not set 311# CONFIG_PM_LEGACY is not set
288# CONFIG_PM_DEBUG is not set 312# CONFIG_PM_DEBUG is not set
289# CONFIG_PM_SYSFS_DEPRECATED is not set
290 313
291# 314#
292# Networking 315# Networking
@@ -296,7 +319,6 @@ CONFIG_NET=y
296# 319#
297# Networking options 320# Networking options
298# 321#
299# CONFIG_NETDEBUG is not set
300CONFIG_PACKET=y 322CONFIG_PACKET=y
301CONFIG_PACKET_MMAP=y 323CONFIG_PACKET_MMAP=y
302CONFIG_UNIX=y 324CONFIG_UNIX=y
@@ -304,6 +326,7 @@ CONFIG_XFRM=y
304CONFIG_XFRM_USER=m 326CONFIG_XFRM_USER=m
305# CONFIG_XFRM_SUB_POLICY is not set 327# CONFIG_XFRM_SUB_POLICY is not set
306CONFIG_XFRM_MIGRATE=y 328CONFIG_XFRM_MIGRATE=y
329# CONFIG_XFRM_STATISTICS is not set
307CONFIG_NET_KEY=y 330CONFIG_NET_KEY=y
308CONFIG_NET_KEY_MIGRATE=y 331CONFIG_NET_KEY_MIGRATE=y
309CONFIG_INET=y 332CONFIG_INET=y
@@ -326,6 +349,7 @@ CONFIG_IP_PNP_BOOTP=y
326CONFIG_INET_XFRM_MODE_TRANSPORT=m 349CONFIG_INET_XFRM_MODE_TRANSPORT=m
327CONFIG_INET_XFRM_MODE_TUNNEL=m 350CONFIG_INET_XFRM_MODE_TUNNEL=m
328CONFIG_INET_XFRM_MODE_BEET=m 351CONFIG_INET_XFRM_MODE_BEET=m
352CONFIG_INET_LRO=m
329CONFIG_INET_DIAG=y 353CONFIG_INET_DIAG=y
330CONFIG_INET_TCP_DIAG=y 354CONFIG_INET_TCP_DIAG=y
331# CONFIG_TCP_CONG_ADVANCED is not set 355# CONFIG_TCP_CONG_ADVANCED is not set
@@ -333,24 +357,15 @@ CONFIG_TCP_CONG_CUBIC=y
333CONFIG_DEFAULT_TCP_CONG="cubic" 357CONFIG_DEFAULT_TCP_CONG="cubic"
334CONFIG_TCP_MD5SIG=y 358CONFIG_TCP_MD5SIG=y
335# CONFIG_IPV6 is not set 359# CONFIG_IPV6 is not set
336# CONFIG_INET6_XFRM_TUNNEL is not set
337# CONFIG_INET6_TUNNEL is not set
338CONFIG_NETWORK_SECMARK=y 360CONFIG_NETWORK_SECMARK=y
339# CONFIG_NETFILTER is not set 361# CONFIG_NETFILTER is not set
340
341#
342# DCCP Configuration (EXPERIMENTAL)
343#
344# CONFIG_IP_DCCP is not set 362# CONFIG_IP_DCCP is not set
345 363CONFIG_IP_SCTP=m
346# 364# CONFIG_SCTP_DBG_MSG is not set
347# SCTP Configuration (EXPERIMENTAL) 365# CONFIG_SCTP_DBG_OBJCNT is not set
348# 366# CONFIG_SCTP_HMAC_NONE is not set
349# CONFIG_IP_SCTP is not set 367# CONFIG_SCTP_HMAC_SHA1 is not set
350 368CONFIG_SCTP_HMAC_MD5=y
351#
352# TIPC Configuration (EXPERIMENTAL)
353#
354# CONFIG_TIPC is not set 369# CONFIG_TIPC is not set
355# CONFIG_ATM is not set 370# CONFIG_ATM is not set
356# CONFIG_BRIDGE is not set 371# CONFIG_BRIDGE is not set
@@ -363,26 +378,52 @@ CONFIG_NETWORK_SECMARK=y
363# CONFIG_LAPB is not set 378# CONFIG_LAPB is not set
364# CONFIG_ECONET is not set 379# CONFIG_ECONET is not set
365# CONFIG_WAN_ROUTER is not set 380# CONFIG_WAN_ROUTER is not set
366
367#
368# QoS and/or fair queueing
369#
370# CONFIG_NET_SCHED is not set 381# CONFIG_NET_SCHED is not set
382CONFIG_NET_SCH_FIFO=y
371 383
372# 384#
373# Network testing 385# Network testing
374# 386#
375# CONFIG_NET_PKTGEN is not set 387# CONFIG_NET_PKTGEN is not set
376# CONFIG_HAMRADIO is not set 388# CONFIG_HAMRADIO is not set
389# CONFIG_CAN is not set
377# CONFIG_IRDA is not set 390# CONFIG_IRDA is not set
378# CONFIG_BT is not set 391# CONFIG_BT is not set
392# CONFIG_AF_RXRPC is not set
393
394#
395# Wireless
396#
397CONFIG_CFG80211=m
398CONFIG_NL80211=y
399CONFIG_WIRELESS_EXT=y
400CONFIG_MAC80211=m
401
402#
403# Rate control algorithm selection
404#
405CONFIG_MAC80211_RC_DEFAULT_PID=y
406# CONFIG_MAC80211_RC_DEFAULT_NONE is not set
407
408#
409# Selecting 'y' for an algorithm will
410#
411
412#
413# build the algorithm into mac80211.
414#
415CONFIG_MAC80211_RC_DEFAULT="pid"
416CONFIG_MAC80211_RC_PID=y
417# CONFIG_MAC80211_MESH is not set
418# CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT is not set
419# CONFIG_MAC80211_DEBUG is not set
379CONFIG_IEEE80211=m 420CONFIG_IEEE80211=m
380# CONFIG_IEEE80211_DEBUG is not set 421# CONFIG_IEEE80211_DEBUG is not set
381CONFIG_IEEE80211_CRYPT_WEP=m 422CONFIG_IEEE80211_CRYPT_WEP=m
382CONFIG_IEEE80211_CRYPT_CCMP=m 423CONFIG_IEEE80211_CRYPT_CCMP=m
383CONFIG_IEEE80211_SOFTMAC=m 424CONFIG_IEEE80211_CRYPT_TKIP=m
384# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set 425CONFIG_RFKILL=m
385CONFIG_WIRELESS_EXT=y 426# CONFIG_NET_9P is not set
386 427
387# 428#
388# Device Drivers 429# Device Drivers
@@ -391,34 +432,15 @@ CONFIG_WIRELESS_EXT=y
391# 432#
392# Generic Driver Options 433# Generic Driver Options
393# 434#
435CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
394CONFIG_STANDALONE=y 436CONFIG_STANDALONE=y
395CONFIG_PREVENT_FIRMWARE_BUILD=y 437CONFIG_PREVENT_FIRMWARE_BUILD=y
396CONFIG_FW_LOADER=m 438CONFIG_FW_LOADER=m
397# CONFIG_SYS_HYPERVISOR is not set 439# CONFIG_SYS_HYPERVISOR is not set
398
399#
400# Connector - unified userspace <-> kernelspace linker
401#
402CONFIG_CONNECTOR=m 440CONFIG_CONNECTOR=m
403
404#
405# Memory Technology Devices (MTD)
406#
407# CONFIG_MTD is not set 441# CONFIG_MTD is not set
408
409#
410# Parallel port support
411#
412# CONFIG_PARPORT is not set 442# CONFIG_PARPORT is not set
413 443CONFIG_BLK_DEV=y
414#
415# Plug and Play support
416#
417# CONFIG_PNPACPI is not set
418
419#
420# Block devices
421#
422# CONFIG_BLK_CPQ_DA is not set 444# CONFIG_BLK_CPQ_DA is not set
423# CONFIG_BLK_CPQ_CISS_DA is not set 445# CONFIG_BLK_CPQ_CISS_DA is not set
424# CONFIG_BLK_DEV_DAC960 is not set 446# CONFIG_BLK_DEV_DAC960 is not set
@@ -427,49 +449,77 @@ CONFIG_CONNECTOR=m
427# CONFIG_BLK_DEV_LOOP is not set 449# CONFIG_BLK_DEV_LOOP is not set
428# CONFIG_BLK_DEV_NBD is not set 450# CONFIG_BLK_DEV_NBD is not set
429# CONFIG_BLK_DEV_SX8 is not set 451# CONFIG_BLK_DEV_SX8 is not set
452# CONFIG_BLK_DEV_UB is not set
430CONFIG_BLK_DEV_RAM=y 453CONFIG_BLK_DEV_RAM=y
431CONFIG_BLK_DEV_RAM_COUNT=16 454CONFIG_BLK_DEV_RAM_COUNT=16
432CONFIG_BLK_DEV_RAM_SIZE=9220 455CONFIG_BLK_DEV_RAM_SIZE=9220
433CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 456# CONFIG_BLK_DEV_XIP is not set
434CONFIG_BLK_DEV_INITRD=y
435CONFIG_CDROM_PKTCDVD=m 457CONFIG_CDROM_PKTCDVD=m
436CONFIG_CDROM_PKTCDVD_BUFFERS=8 458CONFIG_CDROM_PKTCDVD_BUFFERS=8
437# CONFIG_CDROM_PKTCDVD_WCACHE is not set 459# CONFIG_CDROM_PKTCDVD_WCACHE is not set
438CONFIG_ATA_OVER_ETH=m 460CONFIG_ATA_OVER_ETH=m
439 461CONFIG_MISC_DEVICES=y
440# 462# CONFIG_PHANTOM is not set
441# Misc devices 463# CONFIG_EEPROM_93CX6 is not set
442#
443CONFIG_SGI_IOC4=m 464CONFIG_SGI_IOC4=m
444# CONFIG_TIFM_CORE is not set 465# CONFIG_TIFM_CORE is not set
445 466# CONFIG_ENCLOSURE_SERVICES is not set
446# 467CONFIG_HAVE_IDE=y
447# ATA/ATAPI/MFM/RLL support
448#
449CONFIG_IDE=y 468CONFIG_IDE=y
450CONFIG_IDE_MAX_HWIFS=4 469CONFIG_IDE_MAX_HWIFS=4
451CONFIG_BLK_DEV_IDE=y 470CONFIG_BLK_DEV_IDE=y
452 471
453# 472#
454# Please see Documentation/ide.txt for help/info on IDE drives 473# Please see Documentation/ide/ide.txt for help/info on IDE drives
455# 474#
456# CONFIG_BLK_DEV_IDE_SATA is not set 475# CONFIG_BLK_DEV_IDE_SATA is not set
457CONFIG_BLK_DEV_IDEDISK=y 476CONFIG_BLK_DEV_IDEDISK=y
458# CONFIG_IDEDISK_MULTI_MODE is not set 477# CONFIG_IDEDISK_MULTI_MODE is not set
459CONFIG_BLK_DEV_IDECD=y 478CONFIG_BLK_DEV_IDECD=y
479CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
460CONFIG_BLK_DEV_IDETAPE=y 480CONFIG_BLK_DEV_IDETAPE=y
461CONFIG_BLK_DEV_IDEFLOPPY=y 481CONFIG_BLK_DEV_IDEFLOPPY=y
462# CONFIG_IDE_TASK_IOCTL is not set 482# CONFIG_IDE_TASK_IOCTL is not set
483CONFIG_IDE_PROC_FS=y
463 484
464# 485#
465# IDE chipset support/bugfixes 486# IDE chipset support/bugfixes
466# 487#
467CONFIG_IDE_GENERIC=y 488# CONFIG_IDE_GENERIC is not set
468# CONFIG_BLK_DEV_IDEPCI is not set 489# CONFIG_BLK_DEV_PLATFORM is not set
490
491#
492# PCI IDE chipsets support
493#
494# CONFIG_BLK_DEV_GENERIC is not set
495# CONFIG_BLK_DEV_OPTI621 is not set
496# CONFIG_BLK_DEV_AEC62XX is not set
497# CONFIG_BLK_DEV_ALI15X3 is not set
498# CONFIG_BLK_DEV_AMD74XX is not set
499# CONFIG_BLK_DEV_CMD64X is not set
500# CONFIG_BLK_DEV_TRIFLEX is not set
501# CONFIG_BLK_DEV_CY82C693 is not set
502# CONFIG_BLK_DEV_CS5520 is not set
503# CONFIG_BLK_DEV_CS5530 is not set
504# CONFIG_BLK_DEV_HPT34X is not set
505# CONFIG_BLK_DEV_HPT366 is not set
506# CONFIG_BLK_DEV_JMICRON is not set
507# CONFIG_BLK_DEV_SC1200 is not set
508# CONFIG_BLK_DEV_PIIX is not set
509# CONFIG_BLK_DEV_IT8213 is not set
510# CONFIG_BLK_DEV_IT821X is not set
511# CONFIG_BLK_DEV_NS87415 is not set
512# CONFIG_BLK_DEV_PDC202XX_OLD is not set
513# CONFIG_BLK_DEV_PDC202XX_NEW is not set
514# CONFIG_BLK_DEV_SVWKS is not set
515# CONFIG_BLK_DEV_SIIMAGE is not set
516# CONFIG_BLK_DEV_SLC90E66 is not set
517# CONFIG_BLK_DEV_TRM290 is not set
518# CONFIG_BLK_DEV_VIA82CXXX is not set
519# CONFIG_BLK_DEV_TC86C001 is not set
469CONFIG_BLK_DEV_IDE_SWARM=y 520CONFIG_BLK_DEV_IDE_SWARM=y
470# CONFIG_IDE_ARM is not set
471# CONFIG_BLK_DEV_IDEDMA is not set 521# CONFIG_BLK_DEV_IDEDMA is not set
472# CONFIG_IDEDMA_AUTO is not set 522# CONFIG_BLK_DEV_HD_ONLY is not set
473# CONFIG_BLK_DEV_HD is not set 523# CONFIG_BLK_DEV_HD is not set
474 524
475# 525#
@@ -477,89 +527,68 @@ CONFIG_BLK_DEV_IDE_SWARM=y
477# 527#
478CONFIG_RAID_ATTRS=m 528CONFIG_RAID_ATTRS=m
479# CONFIG_SCSI is not set 529# CONFIG_SCSI is not set
530# CONFIG_SCSI_DMA is not set
480# CONFIG_SCSI_NETLINK is not set 531# CONFIG_SCSI_NETLINK is not set
481
482#
483# Serial ATA (prod) and Parallel ATA (experimental) drivers
484#
485# CONFIG_ATA is not set 532# CONFIG_ATA is not set
486
487#
488# Multi-device support (RAID and LVM)
489#
490# CONFIG_MD is not set 533# CONFIG_MD is not set
491
492#
493# Fusion MPT device support
494#
495# CONFIG_FUSION is not set 534# CONFIG_FUSION is not set
496 535
497# 536#
498# IEEE 1394 (FireWire) support 537# IEEE 1394 (FireWire) support
499# 538#
539# CONFIG_FIREWIRE is not set
500# CONFIG_IEEE1394 is not set 540# CONFIG_IEEE1394 is not set
501
502#
503# I2O device support
504#
505# CONFIG_I2O is not set 541# CONFIG_I2O is not set
506
507#
508# Network device support
509#
510CONFIG_NETDEVICES=y 542CONFIG_NETDEVICES=y
543CONFIG_NETDEVICES_MULTIQUEUE=y
511# CONFIG_DUMMY is not set 544# CONFIG_DUMMY is not set
512# CONFIG_BONDING is not set 545# CONFIG_BONDING is not set
546CONFIG_MACVLAN=m
513# CONFIG_EQUALIZER is not set 547# CONFIG_EQUALIZER is not set
514# CONFIG_TUN is not set 548# CONFIG_TUN is not set
515 549# CONFIG_VETH is not set
516#
517# ARCnet devices
518#
519# CONFIG_ARCNET is not set 550# CONFIG_ARCNET is not set
520 551CONFIG_PHYLIB=y
521#
522# PHY device support
523#
524CONFIG_PHYLIB=m
525 552
526# 553#
527# MII PHY device drivers 554# MII PHY device drivers
528# 555#
529CONFIG_MARVELL_PHY=m 556# CONFIG_MARVELL_PHY is not set
530CONFIG_DAVICOM_PHY=m 557# CONFIG_DAVICOM_PHY is not set
531CONFIG_QSEMI_PHY=m 558# CONFIG_QSEMI_PHY is not set
532CONFIG_LXT_PHY=m 559# CONFIG_LXT_PHY is not set
533CONFIG_CICADA_PHY=m 560# CONFIG_CICADA_PHY is not set
534CONFIG_VITESSE_PHY=m 561# CONFIG_VITESSE_PHY is not set
535CONFIG_SMSC_PHY=m 562# CONFIG_SMSC_PHY is not set
536# CONFIG_BROADCOM_PHY is not set 563CONFIG_BROADCOM_PHY=y
564# CONFIG_ICPLUS_PHY is not set
565# CONFIG_REALTEK_PHY is not set
537# CONFIG_FIXED_PHY is not set 566# CONFIG_FIXED_PHY is not set
538 567# CONFIG_MDIO_BITBANG is not set
539#
540# Ethernet (10 or 100Mbit)
541#
542CONFIG_NET_ETHERNET=y 568CONFIG_NET_ETHERNET=y
543CONFIG_MII=y 569CONFIG_MII=y
570# CONFIG_AX88796 is not set
544# CONFIG_HAPPYMEAL is not set 571# CONFIG_HAPPYMEAL is not set
545# CONFIG_SUNGEM is not set 572# CONFIG_SUNGEM is not set
546# CONFIG_CASSINI is not set 573# CONFIG_CASSINI is not set
547# CONFIG_NET_VENDOR_3COM is not set 574# CONFIG_NET_VENDOR_3COM is not set
548# CONFIG_DM9000 is not set 575# CONFIG_DM9000 is not set
549
550#
551# Tulip family network device support
552#
553# CONFIG_NET_TULIP is not set 576# CONFIG_NET_TULIP is not set
554# CONFIG_HP100 is not set 577# CONFIG_HP100 is not set
578# CONFIG_IBM_NEW_EMAC_ZMII is not set
579# CONFIG_IBM_NEW_EMAC_RGMII is not set
580# CONFIG_IBM_NEW_EMAC_TAH is not set
581# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
555# CONFIG_NET_PCI is not set 582# CONFIG_NET_PCI is not set
556 583# CONFIG_B44 is not set
557# 584CONFIG_NETDEV_1000=y
558# Ethernet (1000 Mbit)
559#
560# CONFIG_ACENIC is not set 585# CONFIG_ACENIC is not set
561# CONFIG_DL2K is not set 586# CONFIG_DL2K is not set
562# CONFIG_E1000 is not set 587# CONFIG_E1000 is not set
588# CONFIG_E1000E is not set
589# CONFIG_E1000E_ENABLED is not set
590# CONFIG_IP1000 is not set
591# CONFIG_IGB is not set
563# CONFIG_NS83820 is not set 592# CONFIG_NS83820 is not set
564# CONFIG_HAMACHI is not set 593# CONFIG_HAMACHI is not set
565# CONFIG_YELLOWFIN is not set 594# CONFIG_YELLOWFIN is not set
@@ -568,53 +597,70 @@ CONFIG_SB1250_MAC=y
568# CONFIG_SIS190 is not set 597# CONFIG_SIS190 is not set
569# CONFIG_SKGE is not set 598# CONFIG_SKGE is not set
570# CONFIG_SKY2 is not set 599# CONFIG_SKY2 is not set
571# CONFIG_SK98LIN is not set 600# CONFIG_VIA_VELOCITY is not set
572# CONFIG_TIGON3 is not set 601# CONFIG_TIGON3 is not set
573# CONFIG_BNX2 is not set 602# CONFIG_BNX2 is not set
574CONFIG_QLA3XXX=m 603# CONFIG_QLA3XXX is not set
575# CONFIG_ATL1 is not set 604# CONFIG_ATL1 is not set
576 605CONFIG_NETDEV_10000=y
577#
578# Ethernet (10000 Mbit)
579#
580# CONFIG_CHELSIO_T1 is not set 606# CONFIG_CHELSIO_T1 is not set
581CONFIG_CHELSIO_T3=m 607# CONFIG_CHELSIO_T3 is not set
608# CONFIG_IXGBE is not set
582# CONFIG_IXGB is not set 609# CONFIG_IXGB is not set
583# CONFIG_S2IO is not set 610# CONFIG_S2IO is not set
584# CONFIG_MYRI10GE is not set 611# CONFIG_MYRI10GE is not set
585CONFIG_NETXEN_NIC=m 612# CONFIG_NETXEN_NIC is not set
586 613# CONFIG_NIU is not set
587# 614# CONFIG_MLX4_CORE is not set
588# Token Ring devices 615# CONFIG_TEHUTI is not set
589# 616# CONFIG_BNX2X is not set
590# CONFIG_TR is not set 617# CONFIG_TR is not set
591 618
592# 619#
593# Wireless LAN (non-hamradio) 620# Wireless LAN
594# 621#
595# CONFIG_NET_RADIO is not set 622# CONFIG_WLAN_PRE80211 is not set
596 623CONFIG_WLAN_80211=y
597# 624# CONFIG_IPW2100 is not set
598# Wan interfaces 625# CONFIG_IPW2200 is not set
599# 626# CONFIG_LIBERTAS is not set
627# CONFIG_HERMES is not set
628# CONFIG_ATMEL is not set
629# CONFIG_PRISM54 is not set
630# CONFIG_USB_ZD1201 is not set
631# CONFIG_USB_NET_RNDIS_WLAN is not set
632# CONFIG_RTL8180 is not set
633# CONFIG_RTL8187 is not set
634# CONFIG_ADM8211 is not set
635# CONFIG_P54_COMMON is not set
636# CONFIG_ATH5K is not set
637# CONFIG_IWLCORE is not set
638# CONFIG_IWLWIFI_LEDS is not set
639# CONFIG_IWL4965 is not set
640# CONFIG_IWL3945 is not set
641# CONFIG_HOSTAP is not set
642# CONFIG_B43 is not set
643# CONFIG_B43LEGACY is not set
644# CONFIG_ZD1211RW is not set
645# CONFIG_RT2X00 is not set
646
647#
648# USB Network Adapters
649#
650# CONFIG_USB_CATC is not set
651# CONFIG_USB_KAWETH is not set
652# CONFIG_USB_PEGASUS is not set
653# CONFIG_USB_RTL8150 is not set
654# CONFIG_USB_USBNET is not set
600# CONFIG_WAN is not set 655# CONFIG_WAN is not set
601# CONFIG_FDDI is not set 656# CONFIG_FDDI is not set
602# CONFIG_HIPPI is not set 657# CONFIG_HIPPI is not set
603# CONFIG_PPP is not set 658# CONFIG_PPP is not set
604# CONFIG_SLIP is not set 659# CONFIG_SLIP is not set
605# CONFIG_SHAPER is not set
606# CONFIG_NETCONSOLE is not set 660# CONFIG_NETCONSOLE is not set
607# CONFIG_NETPOLL is not set 661# CONFIG_NETPOLL is not set
608# CONFIG_NET_POLL_CONTROLLER is not set 662# CONFIG_NET_POLL_CONTROLLER is not set
609
610#
611# ISDN subsystem
612#
613# CONFIG_ISDN is not set 663# CONFIG_ISDN is not set
614
615#
616# Telephony Support
617#
618# CONFIG_PHONE is not set 664# CONFIG_PHONE is not set
619 665
620# 666#
@@ -637,24 +683,8 @@ CONFIG_SERIO_RAW=m
637# Character devices 683# Character devices
638# 684#
639# CONFIG_VT is not set 685# CONFIG_VT is not set
640CONFIG_SERIAL_NONSTANDARD=y 686# CONFIG_SERIAL_NONSTANDARD is not set
641# CONFIG_COMPUTONE is not set 687# CONFIG_NOZOMI is not set
642# CONFIG_ROCKETPORT is not set
643# CONFIG_CYCLADES is not set
644# CONFIG_DIGIEPCA is not set
645# CONFIG_MOXA_INTELLIO is not set
646# CONFIG_MOXA_SMARTIO is not set
647CONFIG_MOXA_SMARTIO_NEW=m
648# CONFIG_ISI is not set
649# CONFIG_SYNCLINKMP is not set
650# CONFIG_SYNCLINK_GT is not set
651# CONFIG_N_HDLC is not set
652# CONFIG_SPECIALIX is not set
653# CONFIG_SX is not set
654# CONFIG_RIO is not set
655# CONFIG_STALDRV is not set
656CONFIG_SERIAL_SB1250_DUART=y
657CONFIG_SERIAL_SB1250_DUART_CONSOLE=y
658 688
659# 689#
660# Serial drivers 690# Serial drivers
@@ -664,37 +694,22 @@ CONFIG_SERIAL_SB1250_DUART_CONSOLE=y
664# 694#
665# Non-8250 serial port support 695# Non-8250 serial port support
666# 696#
697CONFIG_SERIAL_SB1250_DUART=y
698CONFIG_SERIAL_SB1250_DUART_CONSOLE=y
699CONFIG_SERIAL_CORE=y
700CONFIG_SERIAL_CORE_CONSOLE=y
667# CONFIG_SERIAL_JSM is not set 701# CONFIG_SERIAL_JSM is not set
668CONFIG_UNIX98_PTYS=y 702CONFIG_UNIX98_PTYS=y
669CONFIG_LEGACY_PTYS=y 703CONFIG_LEGACY_PTYS=y
670CONFIG_LEGACY_PTY_COUNT=256 704CONFIG_LEGACY_PTY_COUNT=256
671
672#
673# IPMI
674#
675# CONFIG_IPMI_HANDLER is not set 705# CONFIG_IPMI_HANDLER is not set
676
677#
678# Watchdog Cards
679#
680# CONFIG_WATCHDOG is not set
681# CONFIG_HW_RANDOM is not set 706# CONFIG_HW_RANDOM is not set
682# CONFIG_RTC is not set 707# CONFIG_RTC is not set
683# CONFIG_GEN_RTC is not set
684# CONFIG_DTLK is not set
685# CONFIG_R3964 is not set 708# CONFIG_R3964 is not set
686# CONFIG_APPLICOM is not set 709# CONFIG_APPLICOM is not set
687# CONFIG_DRM is not set
688# CONFIG_RAW_DRIVER is not set 710# CONFIG_RAW_DRIVER is not set
689
690#
691# TPM devices
692#
693# CONFIG_TCG_TPM is not set 711# CONFIG_TCG_TPM is not set
694 712CONFIG_DEVPORT=y
695#
696# I2C support
697#
698# CONFIG_I2C is not set 713# CONFIG_I2C is not set
699 714
700# 715#
@@ -702,109 +717,139 @@ CONFIG_LEGACY_PTY_COUNT=256
702# 717#
703# CONFIG_SPI is not set 718# CONFIG_SPI is not set
704# CONFIG_SPI_MASTER is not set 719# CONFIG_SPI_MASTER is not set
720# CONFIG_W1 is not set
721# CONFIG_POWER_SUPPLY is not set
722# CONFIG_HWMON is not set
723# CONFIG_THERMAL is not set
724# CONFIG_WATCHDOG is not set
705 725
706# 726#
707# Dallas's 1-wire bus 727# Sonics Silicon Backplane
708# 728#
709# CONFIG_W1 is not set 729CONFIG_SSB_POSSIBLE=y
730# CONFIG_SSB is not set
710 731
711# 732#
712# Hardware Monitoring support 733# Multifunction device drivers
713# 734#
714# CONFIG_HWMON is not set 735# CONFIG_MFD_SM501 is not set
715# CONFIG_HWMON_VID is not set
716 736
717# 737#
718# Multimedia devices 738# Multimedia devices
719# 739#
720# CONFIG_VIDEO_DEV is not set 740# CONFIG_VIDEO_DEV is not set
721 741# CONFIG_DVB_CORE is not set
722# 742# CONFIG_DAB is not set
723# Digital Video Broadcasting Devices
724#
725# CONFIG_DVB is not set
726 743
727# 744#
728# Graphics support 745# Graphics support
729# 746#
730# CONFIG_FIRMWARE_EDID is not set 747# CONFIG_DRM is not set
748# CONFIG_VGASTATE is not set
749# CONFIG_VIDEO_OUTPUT_CONTROL is not set
731# CONFIG_FB is not set 750# CONFIG_FB is not set
732# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 751# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
733 752
734# 753#
735# Sound 754# Display device support
736# 755#
737# CONFIG_SOUND is not set 756# CONFIG_DISPLAY_SUPPORT is not set
738 757
739# 758#
740# USB support 759# Sound
741# 760#
761# CONFIG_SOUND is not set
762CONFIG_USB_SUPPORT=y
742CONFIG_USB_ARCH_HAS_HCD=y 763CONFIG_USB_ARCH_HAS_HCD=y
743CONFIG_USB_ARCH_HAS_OHCI=y 764CONFIG_USB_ARCH_HAS_OHCI=y
744CONFIG_USB_ARCH_HAS_EHCI=y 765CONFIG_USB_ARCH_HAS_EHCI=y
745# CONFIG_USB is not set 766CONFIG_USB=y
746 767# CONFIG_USB_DEBUG is not set
747# 768# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
748# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
749#
750 769
751# 770#
752# USB Gadget Support 771# Miscellaneous USB options
753# 772#
754# CONFIG_USB_GADGET is not set 773CONFIG_USB_DEVICEFS=y
774CONFIG_USB_DEVICE_CLASS=y
775# CONFIG_USB_DYNAMIC_MINORS is not set
776# CONFIG_USB_SUSPEND is not set
777# CONFIG_USB_PERSIST is not set
778# CONFIG_USB_OTG is not set
755 779
756# 780#
757# MMC/SD Card support 781# USB Host Controller Drivers
758# 782#
759# CONFIG_MMC is not set 783# CONFIG_USB_EHCI_HCD is not set
784# CONFIG_USB_ISP116X_HCD is not set
785CONFIG_USB_OHCI_HCD=y
786# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
787# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
788CONFIG_USB_OHCI_LITTLE_ENDIAN=y
789# CONFIG_USB_UHCI_HCD is not set
790# CONFIG_USB_SL811_HCD is not set
791# CONFIG_USB_R8A66597_HCD is not set
760 792
761# 793#
762# LED devices 794# USB Device Class drivers
763# 795#
764# CONFIG_NEW_LEDS is not set 796# CONFIG_USB_ACM is not set
797# CONFIG_USB_PRINTER is not set
765 798
766# 799#
767# LED drivers 800# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
768# 801#
769 802
770# 803#
771# LED Triggers 804# may also be needed; see USB_STORAGE Help for more information
772# 805#
806# CONFIG_USB_LIBUSUAL is not set
773 807
774# 808#
775# InfiniBand support 809# USB Imaging devices
776# 810#
777# CONFIG_INFINIBAND is not set 811# CONFIG_USB_MDC800 is not set
812CONFIG_USB_MON=y
778 813
779# 814#
780# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) 815# USB port drivers
781# 816#
817# CONFIG_USB_SERIAL is not set
782 818
783# 819#
784# Real Time Clock 820# USB Miscellaneous drivers
785# 821#
822# CONFIG_USB_EMI62 is not set
823# CONFIG_USB_EMI26 is not set
824# CONFIG_USB_ADUTUX is not set
825# CONFIG_USB_AUERSWALD is not set
826# CONFIG_USB_RIO500 is not set
827# CONFIG_USB_LEGOTOWER is not set
828# CONFIG_USB_LCD is not set
829# CONFIG_USB_BERRY_CHARGE is not set
830# CONFIG_USB_LED is not set
831# CONFIG_USB_CYPRESS_CY7C63 is not set
832# CONFIG_USB_CYTHERM is not set
833# CONFIG_USB_PHIDGET is not set
834# CONFIG_USB_IDMOUSE is not set
835# CONFIG_USB_FTDI_ELAN is not set
836# CONFIG_USB_APPLEDISPLAY is not set
837# CONFIG_USB_LD is not set
838# CONFIG_USB_TRANCEVIBRATOR is not set
839# CONFIG_USB_IOWARRIOR is not set
840# CONFIG_USB_TEST is not set
841# CONFIG_USB_GADGET is not set
842# CONFIG_MMC is not set
843# CONFIG_MEMSTICK is not set
844# CONFIG_NEW_LEDS is not set
845# CONFIG_INFINIBAND is not set
846CONFIG_RTC_LIB=y
786# CONFIG_RTC_CLASS is not set 847# CONFIG_RTC_CLASS is not set
787 848
788# 849#
789# DMA Engine support 850# Userspace I/O
790#
791# CONFIG_DMA_ENGINE is not set
792
793#
794# DMA Clients
795#
796
797#
798# DMA Devices
799#
800
801#
802# Auxiliary Display support
803#
804
805#
806# Virtualization
807# 851#
852# CONFIG_UIO is not set
808 853
809# 854#
810# File systems 855# File systems
@@ -823,15 +868,14 @@ CONFIG_FS_POSIX_ACL=y
823# CONFIG_XFS_FS is not set 868# CONFIG_XFS_FS is not set
824# CONFIG_GFS2_FS is not set 869# CONFIG_GFS2_FS is not set
825# CONFIG_OCFS2_FS is not set 870# CONFIG_OCFS2_FS is not set
826# CONFIG_MINIX_FS is not set 871CONFIG_DNOTIFY=y
827# CONFIG_ROMFS_FS is not set
828CONFIG_INOTIFY=y 872CONFIG_INOTIFY=y
829CONFIG_INOTIFY_USER=y 873CONFIG_INOTIFY_USER=y
830# CONFIG_QUOTA is not set 874# CONFIG_QUOTA is not set
831CONFIG_DNOTIFY=y
832# CONFIG_AUTOFS_FS is not set 875# CONFIG_AUTOFS_FS is not set
833# CONFIG_AUTOFS4_FS is not set 876# CONFIG_AUTOFS4_FS is not set
834CONFIG_FUSE_FS=m 877CONFIG_FUSE_FS=m
878CONFIG_GENERIC_ACL=y
835 879
836# 880#
837# CD-ROM/DVD Filesystems 881# CD-ROM/DVD Filesystems
@@ -853,9 +897,9 @@ CONFIG_PROC_FS=y
853CONFIG_PROC_KCORE=y 897CONFIG_PROC_KCORE=y
854CONFIG_PROC_SYSCTL=y 898CONFIG_PROC_SYSCTL=y
855CONFIG_SYSFS=y 899CONFIG_SYSFS=y
856# CONFIG_TMPFS is not set 900CONFIG_TMPFS=y
901CONFIG_TMPFS_POSIX_ACL=y
857# CONFIG_HUGETLB_PAGE is not set 902# CONFIG_HUGETLB_PAGE is not set
858CONFIG_RAMFS=y
859CONFIG_CONFIGFS_FS=m 903CONFIG_CONFIGFS_FS=m
860 904
861# 905#
@@ -871,14 +915,13 @@ CONFIG_CONFIGFS_FS=m
871# CONFIG_EFS_FS is not set 915# CONFIG_EFS_FS is not set
872# CONFIG_CRAMFS is not set 916# CONFIG_CRAMFS is not set
873# CONFIG_VXFS_FS is not set 917# CONFIG_VXFS_FS is not set
918# CONFIG_MINIX_FS is not set
874# CONFIG_HPFS_FS is not set 919# CONFIG_HPFS_FS is not set
875# CONFIG_QNX4FS_FS is not set 920# CONFIG_QNX4FS_FS is not set
921# CONFIG_ROMFS_FS is not set
876# CONFIG_SYSV_FS is not set 922# CONFIG_SYSV_FS is not set
877# CONFIG_UFS_FS is not set 923# CONFIG_UFS_FS is not set
878 924CONFIG_NETWORK_FILESYSTEMS=y
879#
880# Network File Systems
881#
882CONFIG_NFS_FS=y 925CONFIG_NFS_FS=y
883CONFIG_NFS_V3=y 926CONFIG_NFS_V3=y
884# CONFIG_NFS_V3_ACL is not set 927# CONFIG_NFS_V3_ACL is not set
@@ -890,6 +933,7 @@ CONFIG_LOCKD=y
890CONFIG_LOCKD_V4=y 933CONFIG_LOCKD_V4=y
891CONFIG_NFS_COMMON=y 934CONFIG_NFS_COMMON=y
892CONFIG_SUNRPC=y 935CONFIG_SUNRPC=y
936# CONFIG_SUNRPC_BIND34 is not set
893# CONFIG_RPCSEC_GSS_KRB5 is not set 937# CONFIG_RPCSEC_GSS_KRB5 is not set
894# CONFIG_RPCSEC_GSS_SPKM3 is not set 938# CONFIG_RPCSEC_GSS_SPKM3 is not set
895# CONFIG_SMB_FS is not set 939# CONFIG_SMB_FS is not set
@@ -897,45 +941,29 @@ CONFIG_SUNRPC=y
897# CONFIG_NCP_FS is not set 941# CONFIG_NCP_FS is not set
898# CONFIG_CODA_FS is not set 942# CONFIG_CODA_FS is not set
899# CONFIG_AFS_FS is not set 943# CONFIG_AFS_FS is not set
900# CONFIG_9P_FS is not set
901 944
902# 945#
903# Partition Types 946# Partition Types
904# 947#
905# CONFIG_PARTITION_ADVANCED is not set 948# CONFIG_PARTITION_ADVANCED is not set
906CONFIG_MSDOS_PARTITION=y 949CONFIG_MSDOS_PARTITION=y
907
908#
909# Native Language Support
910#
911# CONFIG_NLS is not set 950# CONFIG_NLS is not set
912
913#
914# Distributed Lock Manager
915#
916CONFIG_DLM=m 951CONFIG_DLM=m
917CONFIG_DLM_TCP=y
918# CONFIG_DLM_SCTP is not set
919# CONFIG_DLM_DEBUG is not set 952# CONFIG_DLM_DEBUG is not set
920 953
921# 954#
922# Profiling support
923#
924# CONFIG_PROFILING is not set
925
926#
927# Kernel hacking 955# Kernel hacking
928# 956#
929CONFIG_TRACE_IRQFLAGS_SUPPORT=y 957CONFIG_TRACE_IRQFLAGS_SUPPORT=y
930# CONFIG_PRINTK_TIME is not set 958# CONFIG_PRINTK_TIME is not set
959CONFIG_ENABLE_WARN_DEPRECATED=y
931CONFIG_ENABLE_MUST_CHECK=y 960CONFIG_ENABLE_MUST_CHECK=y
932# CONFIG_MAGIC_SYSRQ is not set 961# CONFIG_MAGIC_SYSRQ is not set
933# CONFIG_UNUSED_SYMBOLS is not set 962# CONFIG_UNUSED_SYMBOLS is not set
934# CONFIG_DEBUG_FS is not set 963# CONFIG_DEBUG_FS is not set
935# CONFIG_HEADERS_CHECK is not set 964# CONFIG_HEADERS_CHECK is not set
936# CONFIG_DEBUG_KERNEL is not set 965# CONFIG_DEBUG_KERNEL is not set
937CONFIG_LOG_BUF_SHIFT=15 966# CONFIG_SAMPLES is not set
938CONFIG_CROSSCOMPILE=y
939CONFIG_CMDLINE="" 967CONFIG_CMDLINE=""
940CONFIG_SYS_SUPPORTS_KGDB=y 968CONFIG_SYS_SUPPORTS_KGDB=y
941# CONFIG_SB1XXX_CORELIS is not set 969# CONFIG_SB1XXX_CORELIS is not set
@@ -946,13 +974,12 @@ CONFIG_SYS_SUPPORTS_KGDB=y
946CONFIG_KEYS=y 974CONFIG_KEYS=y
947CONFIG_KEYS_DEBUG_PROC_KEYS=y 975CONFIG_KEYS_DEBUG_PROC_KEYS=y
948# CONFIG_SECURITY is not set 976# CONFIG_SECURITY is not set
949 977# CONFIG_SECURITY_FILE_CAPABILITIES is not set
950#
951# Cryptographic options
952#
953CONFIG_CRYPTO=y 978CONFIG_CRYPTO=y
954CONFIG_CRYPTO_ALGAPI=y 979CONFIG_CRYPTO_ALGAPI=y
980CONFIG_CRYPTO_AEAD=m
955CONFIG_CRYPTO_BLKCIPHER=m 981CONFIG_CRYPTO_BLKCIPHER=m
982CONFIG_CRYPTO_SEQIV=m
956CONFIG_CRYPTO_HASH=y 983CONFIG_CRYPTO_HASH=y
957CONFIG_CRYPTO_MANAGER=y 984CONFIG_CRYPTO_MANAGER=y
958CONFIG_CRYPTO_HMAC=y 985CONFIG_CRYPTO_HMAC=y
@@ -970,6 +997,11 @@ CONFIG_CRYPTO_ECB=m
970CONFIG_CRYPTO_CBC=m 997CONFIG_CRYPTO_CBC=m
971CONFIG_CRYPTO_PCBC=m 998CONFIG_CRYPTO_PCBC=m
972CONFIG_CRYPTO_LRW=m 999CONFIG_CRYPTO_LRW=m
1000CONFIG_CRYPTO_XTS=m
1001CONFIG_CRYPTO_CTR=m
1002CONFIG_CRYPTO_GCM=m
1003CONFIG_CRYPTO_CCM=m
1004CONFIG_CRYPTO_CRYPTD=m
973CONFIG_CRYPTO_DES=m 1005CONFIG_CRYPTO_DES=m
974CONFIG_CRYPTO_FCRYPT=m 1006CONFIG_CRYPTO_FCRYPT=m
975CONFIG_CRYPTO_BLOWFISH=m 1007CONFIG_CRYPTO_BLOWFISH=m
@@ -983,15 +1015,16 @@ CONFIG_CRYPTO_TEA=m
983CONFIG_CRYPTO_ARC4=m 1015CONFIG_CRYPTO_ARC4=m
984CONFIG_CRYPTO_KHAZAD=m 1016CONFIG_CRYPTO_KHAZAD=m
985CONFIG_CRYPTO_ANUBIS=m 1017CONFIG_CRYPTO_ANUBIS=m
1018CONFIG_CRYPTO_SEED=m
1019CONFIG_CRYPTO_SALSA20=m
986CONFIG_CRYPTO_DEFLATE=m 1020CONFIG_CRYPTO_DEFLATE=m
987CONFIG_CRYPTO_MICHAEL_MIC=m 1021CONFIG_CRYPTO_MICHAEL_MIC=m
988CONFIG_CRYPTO_CRC32C=m 1022CONFIG_CRYPTO_CRC32C=m
989CONFIG_CRYPTO_CAMELLIA=m 1023CONFIG_CRYPTO_CAMELLIA=m
990# CONFIG_CRYPTO_TEST is not set 1024# CONFIG_CRYPTO_TEST is not set
991 1025CONFIG_CRYPTO_AUTHENC=m
992# 1026CONFIG_CRYPTO_LZO=m
993# Hardware crypto devices 1027# CONFIG_CRYPTO_HW is not set
994#
995 1028
996# 1029#
997# Library routines 1030# Library routines
@@ -999,10 +1032,15 @@ CONFIG_CRYPTO_CAMELLIA=m
999CONFIG_BITREVERSE=y 1032CONFIG_BITREVERSE=y
1000# CONFIG_CRC_CCITT is not set 1033# CONFIG_CRC_CCITT is not set
1001CONFIG_CRC16=m 1034CONFIG_CRC16=m
1035# CONFIG_CRC_ITU_T is not set
1002CONFIG_CRC32=y 1036CONFIG_CRC32=y
1037# CONFIG_CRC7 is not set
1003CONFIG_LIBCRC32C=m 1038CONFIG_LIBCRC32C=m
1004CONFIG_ZLIB_INFLATE=m 1039CONFIG_ZLIB_INFLATE=m
1005CONFIG_ZLIB_DEFLATE=m 1040CONFIG_ZLIB_DEFLATE=m
1041CONFIG_LZO_COMPRESS=m
1042CONFIG_LZO_DECOMPRESS=m
1006CONFIG_PLIST=y 1043CONFIG_PLIST=y
1007CONFIG_HAS_IOMEM=y 1044CONFIG_HAS_IOMEM=y
1008CONFIG_HAS_IOPORT=y 1045CONFIG_HAS_IOPORT=y
1046CONFIG_HAS_DMA=y
diff --git a/arch/mips/configs/tb0219_defconfig b/arch/mips/configs/tb0219_defconfig
index af82e1a1823c..8dd3ae39bcad 100644
--- a/arch/mips/configs/tb0219_defconfig
+++ b/arch/mips/configs/tb0219_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.23-rc2 3# Linux kernel version: 2.6.26-rc1
4# Wed Aug 8 16:11:47 2007 4# Mon May 12 11:54:51 2008
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
@@ -10,9 +10,11 @@ CONFIG_MIPS=y
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_BASLER_EXCITE is not set 12# CONFIG_BASLER_EXCITE is not set
13# CONFIG_BCM47XX is not set
13# CONFIG_MIPS_COBALT is not set 14# CONFIG_MIPS_COBALT is not set
14# CONFIG_MACH_DECSTATION is not set 15# CONFIG_MACH_DECSTATION is not set
15# CONFIG_MACH_JAZZ is not set 16# CONFIG_MACH_JAZZ is not set
17# CONFIG_LASAT is not set
16# CONFIG_LEMOTE_FULONG is not set 18# CONFIG_LEMOTE_FULONG is not set
17# CONFIG_MIPS_ATLAS is not set 19# CONFIG_MIPS_ATLAS is not set
18# CONFIG_MIPS_MALTA is not set 20# CONFIG_MIPS_MALTA is not set
@@ -26,6 +28,7 @@ CONFIG_MACH_VR41XX=y
26# CONFIG_PMC_YOSEMITE is not set 28# CONFIG_PMC_YOSEMITE is not set
27# CONFIG_SGI_IP22 is not set 29# CONFIG_SGI_IP22 is not set
28# CONFIG_SGI_IP27 is not set 30# CONFIG_SGI_IP27 is not set
31# CONFIG_SGI_IP28 is not set
29# CONFIG_SGI_IP32 is not set 32# CONFIG_SGI_IP32 is not set
30# CONFIG_SIBYTE_CRHINE is not set 33# CONFIG_SIBYTE_CRHINE is not set
31# CONFIG_SIBYTE_CARMEL is not set 34# CONFIG_SIBYTE_CARMEL is not set
@@ -53,12 +56,17 @@ CONFIG_PCI_VR41XX=y
53CONFIG_RWSEM_GENERIC_SPINLOCK=y 56CONFIG_RWSEM_GENERIC_SPINLOCK=y
54# CONFIG_ARCH_HAS_ILOG2_U32 is not set 57# CONFIG_ARCH_HAS_ILOG2_U32 is not set
55# CONFIG_ARCH_HAS_ILOG2_U64 is not set 58# CONFIG_ARCH_HAS_ILOG2_U64 is not set
59CONFIG_ARCH_SUPPORTS_OPROFILE=y
56CONFIG_GENERIC_FIND_NEXT_BIT=y 60CONFIG_GENERIC_FIND_NEXT_BIT=y
57CONFIG_GENERIC_HWEIGHT=y 61CONFIG_GENERIC_HWEIGHT=y
58CONFIG_GENERIC_CALIBRATE_DELAY=y 62CONFIG_GENERIC_CALIBRATE_DELAY=y
63CONFIG_GENERIC_CLOCKEVENTS=y
59CONFIG_GENERIC_TIME=y 64CONFIG_GENERIC_TIME=y
65CONFIG_GENERIC_CMOS_UPDATE=y
60CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 66CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
61CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 67CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
68CONFIG_CEVT_R4K=y
69CONFIG_CSRC_R4K=y
62CONFIG_DMA_NONCOHERENT=y 70CONFIG_DMA_NONCOHERENT=y
63CONFIG_DMA_NEED_PCI_MAP_STATE=y 71CONFIG_DMA_NEED_PCI_MAP_STATE=y
64# CONFIG_HOTPLUG_CPU is not set 72# CONFIG_HOTPLUG_CPU is not set
@@ -113,6 +121,7 @@ CONFIG_CPU_HAS_SYNC=y
113CONFIG_GENERIC_HARDIRQS=y 121CONFIG_GENERIC_HARDIRQS=y
114CONFIG_GENERIC_IRQ_PROBE=y 122CONFIG_GENERIC_IRQ_PROBE=y
115CONFIG_ARCH_FLATMEM_ENABLE=y 123CONFIG_ARCH_FLATMEM_ENABLE=y
124CONFIG_ARCH_POPULATES_NODE_MAP=y
116CONFIG_SELECT_MEMORY_MODEL=y 125CONFIG_SELECT_MEMORY_MODEL=y
117CONFIG_FLATMEM_MANUAL=y 126CONFIG_FLATMEM_MANUAL=y
118# CONFIG_DISCONTIGMEM_MANUAL is not set 127# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -120,10 +129,16 @@ CONFIG_FLATMEM_MANUAL=y
120CONFIG_FLATMEM=y 129CONFIG_FLATMEM=y
121CONFIG_FLAT_NODE_MEM_MAP=y 130CONFIG_FLAT_NODE_MEM_MAP=y
122# CONFIG_SPARSEMEM_STATIC is not set 131# CONFIG_SPARSEMEM_STATIC is not set
132# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
133CONFIG_PAGEFLAGS_EXTENDED=y
123CONFIG_SPLIT_PTLOCK_CPUS=4 134CONFIG_SPLIT_PTLOCK_CPUS=4
124# CONFIG_RESOURCES_64BIT is not set 135# CONFIG_RESOURCES_64BIT is not set
125CONFIG_ZONE_DMA_FLAG=0 136CONFIG_ZONE_DMA_FLAG=0
126CONFIG_VIRT_TO_BUS=y 137CONFIG_VIRT_TO_BUS=y
138# CONFIG_TICK_ONESHOT is not set
139# CONFIG_NO_HZ is not set
140# CONFIG_HIGH_RES_TIMERS is not set
141CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
127# CONFIG_HZ_48 is not set 142# CONFIG_HZ_48 is not set
128# CONFIG_HZ_100 is not set 143# CONFIG_HZ_100 is not set
129# CONFIG_HZ_128 is not set 144# CONFIG_HZ_128 is not set
@@ -156,23 +171,29 @@ CONFIG_SYSVIPC_SYSCTL=y
156# CONFIG_POSIX_MQUEUE is not set 171# CONFIG_POSIX_MQUEUE is not set
157# CONFIG_BSD_PROCESS_ACCT is not set 172# CONFIG_BSD_PROCESS_ACCT is not set
158# CONFIG_TASKSTATS is not set 173# CONFIG_TASKSTATS is not set
159# CONFIG_USER_NS is not set
160# CONFIG_AUDIT is not set 174# CONFIG_AUDIT is not set
161# CONFIG_IKCONFIG is not set 175# CONFIG_IKCONFIG is not set
162CONFIG_LOG_BUF_SHIFT=14 176CONFIG_LOG_BUF_SHIFT=14
177# CONFIG_CGROUPS is not set
178# CONFIG_GROUP_SCHED is not set
163CONFIG_SYSFS_DEPRECATED=y 179CONFIG_SYSFS_DEPRECATED=y
180CONFIG_SYSFS_DEPRECATED_V2=y
164# CONFIG_RELAY is not set 181# CONFIG_RELAY is not set
182# CONFIG_NAMESPACES is not set
165# CONFIG_BLK_DEV_INITRD is not set 183# CONFIG_BLK_DEV_INITRD is not set
166# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 184# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
167CONFIG_SYSCTL=y 185CONFIG_SYSCTL=y
168CONFIG_EMBEDDED=y 186CONFIG_EMBEDDED=y
169CONFIG_SYSCTL_SYSCALL=y 187CONFIG_SYSCTL_SYSCALL=y
188CONFIG_SYSCTL_SYSCALL_CHECK=y
170CONFIG_KALLSYMS=y 189CONFIG_KALLSYMS=y
171# CONFIG_KALLSYMS_EXTRA_PASS is not set 190# CONFIG_KALLSYMS_EXTRA_PASS is not set
172CONFIG_HOTPLUG=y 191CONFIG_HOTPLUG=y
173CONFIG_PRINTK=y 192CONFIG_PRINTK=y
174CONFIG_BUG=y 193CONFIG_BUG=y
175CONFIG_ELF_CORE=y 194CONFIG_ELF_CORE=y
195# CONFIG_PCSPKR_PLATFORM is not set
196CONFIG_COMPAT_BRK=y
176CONFIG_BASE_FULL=y 197CONFIG_BASE_FULL=y
177CONFIG_FUTEX=y 198CONFIG_FUTEX=y
178CONFIG_ANON_INODES=y 199CONFIG_ANON_INODES=y
@@ -185,10 +206,19 @@ CONFIG_VM_EVENT_COUNTERS=y
185CONFIG_SLAB=y 206CONFIG_SLAB=y
186# CONFIG_SLUB is not set 207# CONFIG_SLUB is not set
187# CONFIG_SLOB is not set 208# CONFIG_SLOB is not set
209# CONFIG_PROFILING is not set
210# CONFIG_MARKERS is not set
211CONFIG_HAVE_OPROFILE=y
212# CONFIG_HAVE_KPROBES is not set
213# CONFIG_HAVE_KRETPROBES is not set
214# CONFIG_HAVE_DMA_ATTRS is not set
215CONFIG_PROC_PAGE_MONITOR=y
216CONFIG_SLABINFO=y
188CONFIG_RT_MUTEXES=y 217CONFIG_RT_MUTEXES=y
189# CONFIG_TINY_SHMEM is not set 218# CONFIG_TINY_SHMEM is not set
190CONFIG_BASE_SMALL=0 219CONFIG_BASE_SMALL=0
191CONFIG_MODULES=y 220CONFIG_MODULES=y
221# CONFIG_MODULE_FORCE_LOAD is not set
192CONFIG_MODULE_UNLOAD=y 222CONFIG_MODULE_UNLOAD=y
193CONFIG_MODULE_FORCE_UNLOAD=y 223CONFIG_MODULE_FORCE_UNLOAD=y
194CONFIG_MODVERSIONS=y 224CONFIG_MODVERSIONS=y
@@ -212,18 +242,17 @@ CONFIG_DEFAULT_AS=y
212# CONFIG_DEFAULT_CFQ is not set 242# CONFIG_DEFAULT_CFQ is not set
213# CONFIG_DEFAULT_NOOP is not set 243# CONFIG_DEFAULT_NOOP is not set
214CONFIG_DEFAULT_IOSCHED="anticipatory" 244CONFIG_DEFAULT_IOSCHED="anticipatory"
245CONFIG_CLASSIC_RCU=y
215 246
216# 247#
217# Bus options (PCI, PCMCIA, EISA, ISA, TC) 248# Bus options (PCI, PCMCIA, EISA, ISA, TC)
218# 249#
219CONFIG_HW_HAS_PCI=y 250CONFIG_HW_HAS_PCI=y
220CONFIG_PCI=y 251CONFIG_PCI=y
252CONFIG_PCI_DOMAINS=y
221# CONFIG_ARCH_SUPPORTS_MSI is not set 253# CONFIG_ARCH_SUPPORTS_MSI is not set
254CONFIG_PCI_LEGACY=y
222CONFIG_MMU=y 255CONFIG_MMU=y
223
224#
225# PCCARD (PCMCIA/CardBus) support
226#
227# CONFIG_PCCARD is not set 256# CONFIG_PCCARD is not set
228# CONFIG_HOTPLUG_PCI is not set 257# CONFIG_HOTPLUG_PCI is not set
229 258
@@ -237,6 +266,7 @@ CONFIG_TRAD_SIGNALS=y
237# 266#
238# Power management options 267# Power management options
239# 268#
269CONFIG_ARCH_SUSPEND_POSSIBLE=y
240# CONFIG_PM is not set 270# CONFIG_PM is not set
241 271
242# 272#
@@ -278,6 +308,7 @@ CONFIG_INET_TUNNEL=m
278# CONFIG_INET_XFRM_MODE_TRANSPORT is not set 308# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
279# CONFIG_INET_XFRM_MODE_TUNNEL is not set 309# CONFIG_INET_XFRM_MODE_TUNNEL is not set
280# CONFIG_INET_XFRM_MODE_BEET is not set 310# CONFIG_INET_XFRM_MODE_BEET is not set
311# CONFIG_INET_LRO is not set
281CONFIG_INET_DIAG=y 312CONFIG_INET_DIAG=y
282CONFIG_INET_TCP_DIAG=y 313CONFIG_INET_TCP_DIAG=y
283# CONFIG_TCP_CONG_ADVANCED is not set 314# CONFIG_TCP_CONG_ADVANCED is not set
@@ -285,15 +316,10 @@ CONFIG_TCP_CONG_CUBIC=y
285CONFIG_DEFAULT_TCP_CONG="cubic" 316CONFIG_DEFAULT_TCP_CONG="cubic"
286# CONFIG_TCP_MD5SIG is not set 317# CONFIG_TCP_MD5SIG is not set
287# CONFIG_IPV6 is not set 318# CONFIG_IPV6 is not set
288# CONFIG_INET6_XFRM_TUNNEL is not set
289# CONFIG_INET6_TUNNEL is not set
290CONFIG_NETWORK_SECMARK=y 319CONFIG_NETWORK_SECMARK=y
291# CONFIG_NETFILTER is not set 320# CONFIG_NETFILTER is not set
292# CONFIG_IP_DCCP is not set 321# CONFIG_IP_DCCP is not set
293# CONFIG_IP_SCTP is not set 322# CONFIG_IP_SCTP is not set
294# CONFIG_SCTP_HMAC_NONE is not set
295# CONFIG_SCTP_HMAC_SHA1 is not set
296# CONFIG_SCTP_HMAC_MD5 is not set
297# CONFIG_TIPC is not set 323# CONFIG_TIPC is not set
298# CONFIG_ATM is not set 324# CONFIG_ATM is not set
299# CONFIG_BRIDGE is not set 325# CONFIG_BRIDGE is not set
@@ -306,10 +332,6 @@ CONFIG_NETWORK_SECMARK=y
306# CONFIG_LAPB is not set 332# CONFIG_LAPB is not set
307# CONFIG_ECONET is not set 333# CONFIG_ECONET is not set
308# CONFIG_WAN_ROUTER is not set 334# CONFIG_WAN_ROUTER is not set
309
310#
311# QoS and/or fair queueing
312#
313# CONFIG_NET_SCHED is not set 335# CONFIG_NET_SCHED is not set
314 336
315# 337#
@@ -317,6 +339,7 @@ CONFIG_NETWORK_SECMARK=y
317# 339#
318# CONFIG_NET_PKTGEN is not set 340# CONFIG_NET_PKTGEN is not set
319# CONFIG_HAMRADIO is not set 341# CONFIG_HAMRADIO is not set
342# CONFIG_CAN is not set
320# CONFIG_IRDA is not set 343# CONFIG_IRDA is not set
321# CONFIG_BT is not set 344# CONFIG_BT is not set
322# CONFIG_AF_RXRPC is not set 345# CONFIG_AF_RXRPC is not set
@@ -339,6 +362,7 @@ CONFIG_FIB_RULES=y
339# 362#
340# Generic Driver Options 363# Generic Driver Options
341# 364#
365CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
342CONFIG_STANDALONE=y 366CONFIG_STANDALONE=y
343CONFIG_PREVENT_FIRMWARE_BUILD=y 367CONFIG_PREVENT_FIRMWARE_BUILD=y
344CONFIG_FW_LOADER=m 368CONFIG_FW_LOADER=m
@@ -360,10 +384,11 @@ CONFIG_BLK_DEV_NBD=m
360CONFIG_BLK_DEV_RAM=y 384CONFIG_BLK_DEV_RAM=y
361CONFIG_BLK_DEV_RAM_COUNT=16 385CONFIG_BLK_DEV_RAM_COUNT=16
362CONFIG_BLK_DEV_RAM_SIZE=4096 386CONFIG_BLK_DEV_RAM_SIZE=4096
363CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 387CONFIG_BLK_DEV_XIP=y
364# CONFIG_CDROM_PKTCDVD is not set 388# CONFIG_CDROM_PKTCDVD is not set
365# CONFIG_ATA_OVER_ETH is not set 389# CONFIG_ATA_OVER_ETH is not set
366# CONFIG_MISC_DEVICES is not set 390# CONFIG_MISC_DEVICES is not set
391CONFIG_HAVE_IDE=y
367# CONFIG_IDE is not set 392# CONFIG_IDE is not set
368 393
369# 394#
@@ -375,10 +400,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
375# CONFIG_SCSI_NETLINK is not set 400# CONFIG_SCSI_NETLINK is not set
376# CONFIG_ATA is not set 401# CONFIG_ATA is not set
377# CONFIG_MD is not set 402# CONFIG_MD is not set
378
379#
380# Fusion MPT device support
381#
382# CONFIG_FUSION is not set 403# CONFIG_FUSION is not set
383 404
384# 405#
@@ -394,6 +415,7 @@ CONFIG_NETDEVICES=y
394# CONFIG_MACVLAN is not set 415# CONFIG_MACVLAN is not set
395# CONFIG_EQUALIZER is not set 416# CONFIG_EQUALIZER is not set
396# CONFIG_TUN is not set 417# CONFIG_TUN is not set
418# CONFIG_VETH is not set
397# CONFIG_ARCNET is not set 419# CONFIG_ARCNET is not set
398CONFIG_PHYLIB=m 420CONFIG_PHYLIB=m
399 421
@@ -409,7 +431,8 @@ CONFIG_VITESSE_PHY=m
409CONFIG_SMSC_PHY=m 431CONFIG_SMSC_PHY=m
410# CONFIG_BROADCOM_PHY is not set 432# CONFIG_BROADCOM_PHY is not set
411# CONFIG_ICPLUS_PHY is not set 433# CONFIG_ICPLUS_PHY is not set
412# CONFIG_FIXED_PHY is not set 434# CONFIG_REALTEK_PHY is not set
435# CONFIG_MDIO_BITBANG is not set
413CONFIG_NET_ETHERNET=y 436CONFIG_NET_ETHERNET=y
414CONFIG_MII=y 437CONFIG_MII=y
415# CONFIG_AX88796 is not set 438# CONFIG_AX88796 is not set
@@ -420,6 +443,10 @@ CONFIG_MII=y
420# CONFIG_DM9000 is not set 443# CONFIG_DM9000 is not set
421# CONFIG_NET_TULIP is not set 444# CONFIG_NET_TULIP is not set
422# CONFIG_HP100 is not set 445# CONFIG_HP100 is not set
446# CONFIG_IBM_NEW_EMAC_ZMII is not set
447# CONFIG_IBM_NEW_EMAC_RGMII is not set
448# CONFIG_IBM_NEW_EMAC_TAH is not set
449# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
423CONFIG_NET_PCI=y 450CONFIG_NET_PCI=y
424# CONFIG_PCNET32 is not set 451# CONFIG_PCNET32 is not set
425# CONFIG_AMD8111_ETH is not set 452# CONFIG_AMD8111_ETH is not set
@@ -427,7 +454,6 @@ CONFIG_NET_PCI=y
427# CONFIG_B44 is not set 454# CONFIG_B44 is not set
428# CONFIG_FORCEDETH is not set 455# CONFIG_FORCEDETH is not set
429# CONFIG_TC35815 is not set 456# CONFIG_TC35815 is not set
430# CONFIG_DGRS is not set
431# CONFIG_EEPRO100 is not set 457# CONFIG_EEPRO100 is not set
432# CONFIG_E100 is not set 458# CONFIG_E100 is not set
433# CONFIG_FEALNX is not set 459# CONFIG_FEALNX is not set
@@ -439,6 +465,7 @@ CONFIG_8139TOO_PIO=y
439# CONFIG_8139TOO_TUNE_TWISTER is not set 465# CONFIG_8139TOO_TUNE_TWISTER is not set
440# CONFIG_8139TOO_8129 is not set 466# CONFIG_8139TOO_8129 is not set
441# CONFIG_8139_OLD_RX_RESET is not set 467# CONFIG_8139_OLD_RX_RESET is not set
468# CONFIG_R6040 is not set
442# CONFIG_SIS900 is not set 469# CONFIG_SIS900 is not set
443# CONFIG_EPIC100 is not set 470# CONFIG_EPIC100 is not set
444# CONFIG_SUNDANCE is not set 471# CONFIG_SUNDANCE is not set
@@ -451,6 +478,10 @@ CONFIG_NETDEV_1000=y
451# CONFIG_ACENIC is not set 478# CONFIG_ACENIC is not set
452# CONFIG_DL2K is not set 479# CONFIG_DL2K is not set
453# CONFIG_E1000 is not set 480# CONFIG_E1000 is not set
481# CONFIG_E1000E is not set
482# CONFIG_E1000E_ENABLED is not set
483# CONFIG_IP1000 is not set
484# CONFIG_IGB is not set
454# CONFIG_NS83820 is not set 485# CONFIG_NS83820 is not set
455# CONFIG_HAMACHI is not set 486# CONFIG_HAMACHI is not set
456# CONFIG_YELLOWFIN is not set 487# CONFIG_YELLOWFIN is not set
@@ -472,6 +503,7 @@ CONFIG_VIA_VELOCITY=y
472# 503#
473# CONFIG_WLAN_PRE80211 is not set 504# CONFIG_WLAN_PRE80211 is not set
474# CONFIG_WLAN_80211 is not set 505# CONFIG_WLAN_80211 is not set
506# CONFIG_IWLWIFI_LEDS is not set
475 507
476# 508#
477# USB Network Adapters 509# USB Network Adapters
@@ -480,14 +512,12 @@ CONFIG_VIA_VELOCITY=y
480# CONFIG_USB_KAWETH is not set 512# CONFIG_USB_KAWETH is not set
481# CONFIG_USB_PEGASUS is not set 513# CONFIG_USB_PEGASUS is not set
482# CONFIG_USB_RTL8150 is not set 514# CONFIG_USB_RTL8150 is not set
483# CONFIG_USB_USBNET_MII is not set
484# CONFIG_USB_USBNET is not set 515# CONFIG_USB_USBNET is not set
485# CONFIG_WAN is not set 516# CONFIG_WAN is not set
486# CONFIG_FDDI is not set 517# CONFIG_FDDI is not set
487# CONFIG_HIPPI is not set 518# CONFIG_HIPPI is not set
488# CONFIG_PPP is not set 519# CONFIG_PPP is not set
489# CONFIG_SLIP is not set 520# CONFIG_SLIP is not set
490# CONFIG_SHAPER is not set
491# CONFIG_NETCONSOLE is not set 521# CONFIG_NETCONSOLE is not set
492# CONFIG_NETPOLL is not set 522# CONFIG_NETPOLL is not set
493# CONFIG_NET_POLL_CONTROLLER is not set 523# CONFIG_NET_POLL_CONTROLLER is not set
@@ -506,7 +536,6 @@ CONFIG_INPUT=y
506# 536#
507# CONFIG_INPUT_MOUSEDEV is not set 537# CONFIG_INPUT_MOUSEDEV is not set
508# CONFIG_INPUT_JOYDEV is not set 538# CONFIG_INPUT_JOYDEV is not set
509# CONFIG_INPUT_TSDEV is not set
510# CONFIG_INPUT_EVDEV is not set 539# CONFIG_INPUT_EVDEV is not set
511# CONFIG_INPUT_EVBUG is not set 540# CONFIG_INPUT_EVBUG is not set
512 541
@@ -533,7 +562,9 @@ CONFIG_VT=y
533CONFIG_VT_CONSOLE=y 562CONFIG_VT_CONSOLE=y
534CONFIG_HW_CONSOLE=y 563CONFIG_HW_CONSOLE=y
535CONFIG_VT_HW_CONSOLE_BINDING=y 564CONFIG_VT_HW_CONSOLE_BINDING=y
565# CONFIG_DEVKMEM is not set
536# CONFIG_SERIAL_NONSTANDARD is not set 566# CONFIG_SERIAL_NONSTANDARD is not set
567# CONFIG_NOZOMI is not set
537 568
538# 569#
539# Serial drivers 570# Serial drivers
@@ -552,52 +583,62 @@ CONFIG_UNIX98_PTYS=y
552CONFIG_LEGACY_PTYS=y 583CONFIG_LEGACY_PTYS=y
553CONFIG_LEGACY_PTY_COUNT=256 584CONFIG_LEGACY_PTY_COUNT=256
554# CONFIG_IPMI_HANDLER is not set 585# CONFIG_IPMI_HANDLER is not set
555# CONFIG_WATCHDOG is not set
556# CONFIG_HW_RANDOM is not set 586# CONFIG_HW_RANDOM is not set
557# CONFIG_RTC is not set
558# CONFIG_R3964 is not set 587# CONFIG_R3964 is not set
559# CONFIG_APPLICOM is not set 588# CONFIG_APPLICOM is not set
560CONFIG_GPIO_TB0219=y 589CONFIG_GPIO_TB0219=y
561# CONFIG_DRM is not set
562CONFIG_GPIO_VR41XX=y 590CONFIG_GPIO_VR41XX=y
563# CONFIG_RAW_DRIVER is not set 591# CONFIG_RAW_DRIVER is not set
564# CONFIG_TCG_TPM is not set 592# CONFIG_TCG_TPM is not set
565CONFIG_DEVPORT=y 593CONFIG_DEVPORT=y
566# CONFIG_I2C is not set 594# CONFIG_I2C is not set
567
568#
569# SPI support
570#
571# CONFIG_SPI is not set 595# CONFIG_SPI is not set
572# CONFIG_SPI_MASTER is not set
573# CONFIG_W1 is not set 596# CONFIG_W1 is not set
574# CONFIG_POWER_SUPPLY is not set 597# CONFIG_POWER_SUPPLY is not set
575# CONFIG_HWMON is not set 598# CONFIG_HWMON is not set
599# CONFIG_THERMAL is not set
600# CONFIG_WATCHDOG is not set
601
602#
603# Sonics Silicon Backplane
604#
605CONFIG_SSB_POSSIBLE=y
606# CONFIG_SSB is not set
576 607
577# 608#
578# Multifunction device drivers 609# Multifunction device drivers
579# 610#
580# CONFIG_MFD_SM501 is not set 611# CONFIG_MFD_SM501 is not set
612# CONFIG_HTC_PASIC3 is not set
581 613
582# 614#
583# Multimedia devices 615# Multimedia devices
584# 616#
617
618#
619# Multimedia core support
620#
585# CONFIG_VIDEO_DEV is not set 621# CONFIG_VIDEO_DEV is not set
586# CONFIG_DVB_CORE is not set 622# CONFIG_DVB_CORE is not set
623
624#
625# Multimedia drivers
626#
587# CONFIG_DAB is not set 627# CONFIG_DAB is not set
588 628
589# 629#
590# Graphics support 630# Graphics support
591# 631#
632# CONFIG_DRM is not set
633# CONFIG_VGASTATE is not set
634# CONFIG_VIDEO_OUTPUT_CONTROL is not set
635# CONFIG_FB is not set
592# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 636# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
593 637
594# 638#
595# Display device support 639# Display device support
596# 640#
597# CONFIG_DISPLAY_SUPPORT is not set 641# CONFIG_DISPLAY_SUPPORT is not set
598# CONFIG_VGASTATE is not set
599# CONFIG_VIDEO_OUTPUT_CONTROL is not set
600# CONFIG_FB is not set
601 642
602# 643#
603# Console display driver support 644# Console display driver support
@@ -616,6 +657,7 @@ CONFIG_USB_ARCH_HAS_OHCI=y
616CONFIG_USB_ARCH_HAS_EHCI=y 657CONFIG_USB_ARCH_HAS_EHCI=y
617CONFIG_USB=m 658CONFIG_USB=m
618# CONFIG_USB_DEBUG is not set 659# CONFIG_USB_DEBUG is not set
660# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
619 661
620# 662#
621# Miscellaneous USB options 663# Miscellaneous USB options
@@ -624,15 +666,18 @@ CONFIG_USB_DEVICEFS=y
624CONFIG_USB_DEVICE_CLASS=y 666CONFIG_USB_DEVICE_CLASS=y
625# CONFIG_USB_DYNAMIC_MINORS is not set 667# CONFIG_USB_DYNAMIC_MINORS is not set
626# CONFIG_USB_OTG is not set 668# CONFIG_USB_OTG is not set
669# CONFIG_USB_OTG_WHITELIST is not set
670# CONFIG_USB_OTG_BLACKLIST_HUB is not set
627 671
628# 672#
629# USB Host Controller Drivers 673# USB Host Controller Drivers
630# 674#
675# CONFIG_USB_C67X00_HCD is not set
631CONFIG_USB_EHCI_HCD=m 676CONFIG_USB_EHCI_HCD=m
632# CONFIG_USB_EHCI_SPLIT_ISO is not set
633# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 677# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
634# CONFIG_USB_EHCI_TT_NEWSCHED is not set 678# CONFIG_USB_EHCI_TT_NEWSCHED is not set
635# CONFIG_USB_ISP116X_HCD is not set 679# CONFIG_USB_ISP116X_HCD is not set
680# CONFIG_USB_ISP1760_HCD is not set
636CONFIG_USB_OHCI_HCD=m 681CONFIG_USB_OHCI_HCD=m
637# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 682# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
638# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set 683# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
@@ -665,10 +710,6 @@ CONFIG_USB_MON=y
665# 710#
666# USB port drivers 711# USB port drivers
667# 712#
668
669#
670# USB Serial Converter support
671#
672# CONFIG_USB_SERIAL is not set 713# CONFIG_USB_SERIAL is not set
673 714
674# 715#
@@ -694,17 +735,11 @@ CONFIG_USB_MON=y
694# CONFIG_USB_TRANCEVIBRATOR is not set 735# CONFIG_USB_TRANCEVIBRATOR is not set
695# CONFIG_USB_IOWARRIOR is not set 736# CONFIG_USB_IOWARRIOR is not set
696# CONFIG_USB_TEST is not set 737# CONFIG_USB_TEST is not set
697
698#
699# USB DSL modem support
700#
701
702#
703# USB Gadget Support
704#
705# CONFIG_USB_GADGET is not set 738# CONFIG_USB_GADGET is not set
706# CONFIG_MMC is not set 739# CONFIG_MMC is not set
740# CONFIG_MEMSTICK is not set
707# CONFIG_NEW_LEDS is not set 741# CONFIG_NEW_LEDS is not set
742# CONFIG_ACCESSIBILITY is not set
708# CONFIG_INFINIBAND is not set 743# CONFIG_INFINIBAND is not set
709CONFIG_RTC_LIB=y 744CONFIG_RTC_LIB=y
710CONFIG_RTC_CLASS=y 745CONFIG_RTC_CLASS=y
@@ -729,9 +764,10 @@ CONFIG_RTC_INTF_DEV=y
729# Platform RTC drivers 764# Platform RTC drivers
730# 765#
731# CONFIG_RTC_DRV_CMOS is not set 766# CONFIG_RTC_DRV_CMOS is not set
767# CONFIG_RTC_DRV_DS1511 is not set
732# CONFIG_RTC_DRV_DS1553 is not set 768# CONFIG_RTC_DRV_DS1553 is not set
733# CONFIG_RTC_DRV_STK17TA8 is not set
734# CONFIG_RTC_DRV_DS1742 is not set 769# CONFIG_RTC_DRV_DS1742 is not set
770# CONFIG_RTC_DRV_STK17TA8 is not set
735# CONFIG_RTC_DRV_M48T86 is not set 771# CONFIG_RTC_DRV_M48T86 is not set
736# CONFIG_RTC_DRV_M48T59 is not set 772# CONFIG_RTC_DRV_M48T59 is not set
737# CONFIG_RTC_DRV_V3020 is not set 773# CONFIG_RTC_DRV_V3020 is not set
@@ -740,23 +776,6 @@ CONFIG_RTC_INTF_DEV=y
740# on-CPU RTC drivers 776# on-CPU RTC drivers
741# 777#
742CONFIG_RTC_DRV_VR41XX=y 778CONFIG_RTC_DRV_VR41XX=y
743
744#
745# DMA Engine support
746#
747# CONFIG_DMA_ENGINE is not set
748
749#
750# DMA Clients
751#
752
753#
754# DMA Devices
755#
756
757#
758# Userspace I/O
759#
760# CONFIG_UIO is not set 779# CONFIG_UIO is not set
761 780
762# 781#
@@ -771,20 +790,16 @@ CONFIG_EXT3_FS_XATTR=y
771# CONFIG_EXT3_FS_SECURITY is not set 790# CONFIG_EXT3_FS_SECURITY is not set
772# CONFIG_EXT4DEV_FS is not set 791# CONFIG_EXT4DEV_FS is not set
773CONFIG_JBD=y 792CONFIG_JBD=y
774# CONFIG_JBD_DEBUG is not set
775CONFIG_FS_MBCACHE=y 793CONFIG_FS_MBCACHE=y
776# CONFIG_REISERFS_FS is not set 794# CONFIG_REISERFS_FS is not set
777# CONFIG_JFS_FS is not set 795# CONFIG_JFS_FS is not set
778CONFIG_FS_POSIX_ACL=y 796CONFIG_FS_POSIX_ACL=y
779# CONFIG_XFS_FS is not set 797# CONFIG_XFS_FS is not set
780# CONFIG_GFS2_FS is not set
781# CONFIG_OCFS2_FS is not set 798# CONFIG_OCFS2_FS is not set
782# CONFIG_MINIX_FS is not set 799CONFIG_DNOTIFY=y
783CONFIG_ROMFS_FS=m
784CONFIG_INOTIFY=y 800CONFIG_INOTIFY=y
785CONFIG_INOTIFY_USER=y 801CONFIG_INOTIFY_USER=y
786# CONFIG_QUOTA is not set 802# CONFIG_QUOTA is not set
787CONFIG_DNOTIFY=y
788# CONFIG_AUTOFS_FS is not set 803# CONFIG_AUTOFS_FS is not set
789CONFIG_AUTOFS4_FS=y 804CONFIG_AUTOFS4_FS=y
790# CONFIG_FUSE_FS is not set 805# CONFIG_FUSE_FS is not set
@@ -813,7 +828,6 @@ CONFIG_SYSFS=y
813CONFIG_TMPFS=y 828CONFIG_TMPFS=y
814CONFIG_TMPFS_POSIX_ACL=y 829CONFIG_TMPFS_POSIX_ACL=y
815# CONFIG_HUGETLB_PAGE is not set 830# CONFIG_HUGETLB_PAGE is not set
816CONFIG_RAMFS=y
817# CONFIG_CONFIGFS_FS is not set 831# CONFIG_CONFIGFS_FS is not set
818 832
819# 833#
@@ -828,24 +842,21 @@ CONFIG_RAMFS=y
828# CONFIG_EFS_FS is not set 842# CONFIG_EFS_FS is not set
829CONFIG_CRAMFS=m 843CONFIG_CRAMFS=m
830# CONFIG_VXFS_FS is not set 844# CONFIG_VXFS_FS is not set
845# CONFIG_MINIX_FS is not set
831# CONFIG_HPFS_FS is not set 846# CONFIG_HPFS_FS is not set
832# CONFIG_QNX4FS_FS is not set 847# CONFIG_QNX4FS_FS is not set
848CONFIG_ROMFS_FS=m
833# CONFIG_SYSV_FS is not set 849# CONFIG_SYSV_FS is not set
834# CONFIG_UFS_FS is not set 850# CONFIG_UFS_FS is not set
835 851CONFIG_NETWORK_FILESYSTEMS=y
836#
837# Network File Systems
838#
839CONFIG_NFS_FS=y 852CONFIG_NFS_FS=y
840CONFIG_NFS_V3=y 853CONFIG_NFS_V3=y
841# CONFIG_NFS_V3_ACL is not set 854# CONFIG_NFS_V3_ACL is not set
842# CONFIG_NFS_V4 is not set 855# CONFIG_NFS_V4 is not set
843# CONFIG_NFS_DIRECTIO is not set
844CONFIG_NFSD=y 856CONFIG_NFSD=y
845CONFIG_NFSD_V3=y 857CONFIG_NFSD_V3=y
846# CONFIG_NFSD_V3_ACL is not set 858# CONFIG_NFSD_V3_ACL is not set
847# CONFIG_NFSD_V4 is not set 859# CONFIG_NFSD_V4 is not set
848CONFIG_NFSD_TCP=y
849CONFIG_ROOT_NFS=y 860CONFIG_ROOT_NFS=y
850CONFIG_LOCKD=y 861CONFIG_LOCKD=y
851CONFIG_LOCKD_V4=y 862CONFIG_LOCKD_V4=y
@@ -866,47 +877,38 @@ CONFIG_SUNRPC=y
866# 877#
867# CONFIG_PARTITION_ADVANCED is not set 878# CONFIG_PARTITION_ADVANCED is not set
868CONFIG_MSDOS_PARTITION=y 879CONFIG_MSDOS_PARTITION=y
869
870#
871# Native Language Support
872#
873# CONFIG_NLS is not set 880# CONFIG_NLS is not set
874
875#
876# Distributed Lock Manager
877#
878# CONFIG_DLM is not set 881# CONFIG_DLM is not set
879 882
880# 883#
881# Profiling support
882#
883# CONFIG_PROFILING is not set
884
885#
886# Kernel hacking 884# Kernel hacking
887# 885#
888CONFIG_TRACE_IRQFLAGS_SUPPORT=y 886CONFIG_TRACE_IRQFLAGS_SUPPORT=y
889# CONFIG_PRINTK_TIME is not set 887# CONFIG_PRINTK_TIME is not set
888CONFIG_ENABLE_WARN_DEPRECATED=y
890CONFIG_ENABLE_MUST_CHECK=y 889CONFIG_ENABLE_MUST_CHECK=y
890CONFIG_FRAME_WARN=1024
891# CONFIG_MAGIC_SYSRQ is not set 891# CONFIG_MAGIC_SYSRQ is not set
892# CONFIG_UNUSED_SYMBOLS is not set 892# CONFIG_UNUSED_SYMBOLS is not set
893# CONFIG_DEBUG_FS is not set 893# CONFIG_DEBUG_FS is not set
894# CONFIG_HEADERS_CHECK is not set 894# CONFIG_HEADERS_CHECK is not set
895# CONFIG_DEBUG_KERNEL is not set 895# CONFIG_DEBUG_KERNEL is not set
896CONFIG_CROSSCOMPILE=y 896# CONFIG_SAMPLES is not set
897CONFIG_CMDLINE="mem=64M console=ttyVR0,115200 ip=any root=/dev/nfs" 897CONFIG_CMDLINE="cca=3 mem=64M console=ttyVR0,115200 ip=any root=/dev/nfs"
898 898
899# 899#
900# Security options 900# Security options
901# 901#
902# CONFIG_KEYS is not set 902# CONFIG_KEYS is not set
903# CONFIG_SECURITY is not set 903# CONFIG_SECURITY is not set
904# CONFIG_SECURITY_FILE_CAPABILITIES is not set
904# CONFIG_CRYPTO is not set 905# CONFIG_CRYPTO is not set
905 906
906# 907#
907# Library routines 908# Library routines
908# 909#
909CONFIG_BITREVERSE=y 910CONFIG_BITREVERSE=y
911# CONFIG_GENERIC_FIND_FIRST_BIT is not set
910CONFIG_CRC_CCITT=y 912CONFIG_CRC_CCITT=y
911# CONFIG_CRC16 is not set 913# CONFIG_CRC16 is not set
912# CONFIG_CRC_ITU_T is not set 914# CONFIG_CRC_ITU_T is not set
diff --git a/arch/mips/configs/tb0226_defconfig b/arch/mips/configs/tb0226_defconfig
index a95385b24546..2ba240e897c6 100644
--- a/arch/mips/configs/tb0226_defconfig
+++ b/arch/mips/configs/tb0226_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.23-rc2 3# Linux kernel version: 2.6.26-rc1
4# Thu Aug 9 11:16:55 2007 4# Mon May 12 11:53:54 2008
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
@@ -10,9 +10,11 @@ CONFIG_MIPS=y
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_BASLER_EXCITE is not set 12# CONFIG_BASLER_EXCITE is not set
13# CONFIG_BCM47XX is not set
13# CONFIG_MIPS_COBALT is not set 14# CONFIG_MIPS_COBALT is not set
14# CONFIG_MACH_DECSTATION is not set 15# CONFIG_MACH_DECSTATION is not set
15# CONFIG_MACH_JAZZ is not set 16# CONFIG_MACH_JAZZ is not set
17# CONFIG_LASAT is not set
16# CONFIG_LEMOTE_FULONG is not set 18# CONFIG_LEMOTE_FULONG is not set
17# CONFIG_MIPS_ATLAS is not set 19# CONFIG_MIPS_ATLAS is not set
18# CONFIG_MIPS_MALTA is not set 20# CONFIG_MIPS_MALTA is not set
@@ -26,6 +28,7 @@ CONFIG_MACH_VR41XX=y
26# CONFIG_PMC_YOSEMITE is not set 28# CONFIG_PMC_YOSEMITE is not set
27# CONFIG_SGI_IP22 is not set 29# CONFIG_SGI_IP22 is not set
28# CONFIG_SGI_IP27 is not set 30# CONFIG_SGI_IP27 is not set
31# CONFIG_SGI_IP28 is not set
29# CONFIG_SGI_IP32 is not set 32# CONFIG_SGI_IP32 is not set
30# CONFIG_SIBYTE_CRHINE is not set 33# CONFIG_SIBYTE_CRHINE is not set
31# CONFIG_SIBYTE_CARMEL is not set 34# CONFIG_SIBYTE_CARMEL is not set
@@ -53,12 +56,17 @@ CONFIG_PCI_VR41XX=y
53CONFIG_RWSEM_GENERIC_SPINLOCK=y 56CONFIG_RWSEM_GENERIC_SPINLOCK=y
54# CONFIG_ARCH_HAS_ILOG2_U32 is not set 57# CONFIG_ARCH_HAS_ILOG2_U32 is not set
55# CONFIG_ARCH_HAS_ILOG2_U64 is not set 58# CONFIG_ARCH_HAS_ILOG2_U64 is not set
59CONFIG_ARCH_SUPPORTS_OPROFILE=y
56CONFIG_GENERIC_FIND_NEXT_BIT=y 60CONFIG_GENERIC_FIND_NEXT_BIT=y
57CONFIG_GENERIC_HWEIGHT=y 61CONFIG_GENERIC_HWEIGHT=y
58CONFIG_GENERIC_CALIBRATE_DELAY=y 62CONFIG_GENERIC_CALIBRATE_DELAY=y
63CONFIG_GENERIC_CLOCKEVENTS=y
59CONFIG_GENERIC_TIME=y 64CONFIG_GENERIC_TIME=y
65CONFIG_GENERIC_CMOS_UPDATE=y
60CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 66CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
61CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 67CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
68CONFIG_CEVT_R4K=y
69CONFIG_CSRC_R4K=y
62CONFIG_DMA_NONCOHERENT=y 70CONFIG_DMA_NONCOHERENT=y
63CONFIG_DMA_NEED_PCI_MAP_STATE=y 71CONFIG_DMA_NEED_PCI_MAP_STATE=y
64# CONFIG_HOTPLUG_CPU is not set 72# CONFIG_HOTPLUG_CPU is not set
@@ -113,6 +121,7 @@ CONFIG_CPU_HAS_SYNC=y
113CONFIG_GENERIC_HARDIRQS=y 121CONFIG_GENERIC_HARDIRQS=y
114CONFIG_GENERIC_IRQ_PROBE=y 122CONFIG_GENERIC_IRQ_PROBE=y
115CONFIG_ARCH_FLATMEM_ENABLE=y 123CONFIG_ARCH_FLATMEM_ENABLE=y
124CONFIG_ARCH_POPULATES_NODE_MAP=y
116CONFIG_SELECT_MEMORY_MODEL=y 125CONFIG_SELECT_MEMORY_MODEL=y
117CONFIG_FLATMEM_MANUAL=y 126CONFIG_FLATMEM_MANUAL=y
118# CONFIG_DISCONTIGMEM_MANUAL is not set 127# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -120,10 +129,16 @@ CONFIG_FLATMEM_MANUAL=y
120CONFIG_FLATMEM=y 129CONFIG_FLATMEM=y
121CONFIG_FLAT_NODE_MEM_MAP=y 130CONFIG_FLAT_NODE_MEM_MAP=y
122# CONFIG_SPARSEMEM_STATIC is not set 131# CONFIG_SPARSEMEM_STATIC is not set
132# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
133CONFIG_PAGEFLAGS_EXTENDED=y
123CONFIG_SPLIT_PTLOCK_CPUS=4 134CONFIG_SPLIT_PTLOCK_CPUS=4
124# CONFIG_RESOURCES_64BIT is not set 135# CONFIG_RESOURCES_64BIT is not set
125CONFIG_ZONE_DMA_FLAG=0 136CONFIG_ZONE_DMA_FLAG=0
126CONFIG_VIRT_TO_BUS=y 137CONFIG_VIRT_TO_BUS=y
138# CONFIG_TICK_ONESHOT is not set
139# CONFIG_NO_HZ is not set
140# CONFIG_HIGH_RES_TIMERS is not set
141CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
127# CONFIG_HZ_48 is not set 142# CONFIG_HZ_48 is not set
128# CONFIG_HZ_100 is not set 143# CONFIG_HZ_100 is not set
129# CONFIG_HZ_128 is not set 144# CONFIG_HZ_128 is not set
@@ -156,23 +171,29 @@ CONFIG_SYSVIPC_SYSCTL=y
156# CONFIG_POSIX_MQUEUE is not set 171# CONFIG_POSIX_MQUEUE is not set
157# CONFIG_BSD_PROCESS_ACCT is not set 172# CONFIG_BSD_PROCESS_ACCT is not set
158# CONFIG_TASKSTATS is not set 173# CONFIG_TASKSTATS is not set
159# CONFIG_USER_NS is not set
160# CONFIG_AUDIT is not set 174# CONFIG_AUDIT is not set
161# CONFIG_IKCONFIG is not set 175# CONFIG_IKCONFIG is not set
162CONFIG_LOG_BUF_SHIFT=14 176CONFIG_LOG_BUF_SHIFT=14
177# CONFIG_CGROUPS is not set
178# CONFIG_GROUP_SCHED is not set
163CONFIG_SYSFS_DEPRECATED=y 179CONFIG_SYSFS_DEPRECATED=y
180CONFIG_SYSFS_DEPRECATED_V2=y
164# CONFIG_RELAY is not set 181# CONFIG_RELAY is not set
182# CONFIG_NAMESPACES is not set
165# CONFIG_BLK_DEV_INITRD is not set 183# CONFIG_BLK_DEV_INITRD is not set
166# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 184# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
167CONFIG_SYSCTL=y 185CONFIG_SYSCTL=y
168CONFIG_EMBEDDED=y 186CONFIG_EMBEDDED=y
169CONFIG_SYSCTL_SYSCALL=y 187CONFIG_SYSCTL_SYSCALL=y
188CONFIG_SYSCTL_SYSCALL_CHECK=y
170CONFIG_KALLSYMS=y 189CONFIG_KALLSYMS=y
171# CONFIG_KALLSYMS_EXTRA_PASS is not set 190# CONFIG_KALLSYMS_EXTRA_PASS is not set
172CONFIG_HOTPLUG=y 191CONFIG_HOTPLUG=y
173CONFIG_PRINTK=y 192CONFIG_PRINTK=y
174CONFIG_BUG=y 193CONFIG_BUG=y
175CONFIG_ELF_CORE=y 194CONFIG_ELF_CORE=y
195# CONFIG_PCSPKR_PLATFORM is not set
196CONFIG_COMPAT_BRK=y
176CONFIG_BASE_FULL=y 197CONFIG_BASE_FULL=y
177CONFIG_FUTEX=y 198CONFIG_FUTEX=y
178CONFIG_ANON_INODES=y 199CONFIG_ANON_INODES=y
@@ -185,10 +206,19 @@ CONFIG_VM_EVENT_COUNTERS=y
185CONFIG_SLAB=y 206CONFIG_SLAB=y
186# CONFIG_SLUB is not set 207# CONFIG_SLUB is not set
187# CONFIG_SLOB is not set 208# CONFIG_SLOB is not set
209# CONFIG_PROFILING is not set
210# CONFIG_MARKERS is not set
211CONFIG_HAVE_OPROFILE=y
212# CONFIG_HAVE_KPROBES is not set
213# CONFIG_HAVE_KRETPROBES is not set
214# CONFIG_HAVE_DMA_ATTRS is not set
215CONFIG_PROC_PAGE_MONITOR=y
216CONFIG_SLABINFO=y
188CONFIG_RT_MUTEXES=y 217CONFIG_RT_MUTEXES=y
189# CONFIG_TINY_SHMEM is not set 218# CONFIG_TINY_SHMEM is not set
190CONFIG_BASE_SMALL=0 219CONFIG_BASE_SMALL=0
191CONFIG_MODULES=y 220CONFIG_MODULES=y
221# CONFIG_MODULE_FORCE_LOAD is not set
192CONFIG_MODULE_UNLOAD=y 222CONFIG_MODULE_UNLOAD=y
193CONFIG_MODULE_FORCE_UNLOAD=y 223CONFIG_MODULE_FORCE_UNLOAD=y
194CONFIG_MODVERSIONS=y 224CONFIG_MODVERSIONS=y
@@ -212,18 +242,17 @@ CONFIG_DEFAULT_AS=y
212# CONFIG_DEFAULT_CFQ is not set 242# CONFIG_DEFAULT_CFQ is not set
213# CONFIG_DEFAULT_NOOP is not set 243# CONFIG_DEFAULT_NOOP is not set
214CONFIG_DEFAULT_IOSCHED="anticipatory" 244CONFIG_DEFAULT_IOSCHED="anticipatory"
245CONFIG_CLASSIC_RCU=y
215 246
216# 247#
217# Bus options (PCI, PCMCIA, EISA, ISA, TC) 248# Bus options (PCI, PCMCIA, EISA, ISA, TC)
218# 249#
219CONFIG_HW_HAS_PCI=y 250CONFIG_HW_HAS_PCI=y
220CONFIG_PCI=y 251CONFIG_PCI=y
252CONFIG_PCI_DOMAINS=y
221# CONFIG_ARCH_SUPPORTS_MSI is not set 253# CONFIG_ARCH_SUPPORTS_MSI is not set
254CONFIG_PCI_LEGACY=y
222CONFIG_MMU=y 255CONFIG_MMU=y
223
224#
225# PCCARD (PCMCIA/CardBus) support
226#
227# CONFIG_PCCARD is not set 256# CONFIG_PCCARD is not set
228# CONFIG_HOTPLUG_PCI is not set 257# CONFIG_HOTPLUG_PCI is not set
229 258
@@ -237,6 +266,7 @@ CONFIG_TRAD_SIGNALS=y
237# 266#
238# Power management options 267# Power management options
239# 268#
269CONFIG_ARCH_SUSPEND_POSSIBLE=y
240# CONFIG_PM is not set 270# CONFIG_PM is not set
241 271
242# 272#
@@ -277,6 +307,7 @@ CONFIG_SYN_COOKIES=y
277# CONFIG_INET_XFRM_MODE_TRANSPORT is not set 307# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
278# CONFIG_INET_XFRM_MODE_TUNNEL is not set 308# CONFIG_INET_XFRM_MODE_TUNNEL is not set
279# CONFIG_INET_XFRM_MODE_BEET is not set 309# CONFIG_INET_XFRM_MODE_BEET is not set
310# CONFIG_INET_LRO is not set
280CONFIG_INET_DIAG=y 311CONFIG_INET_DIAG=y
281CONFIG_INET_TCP_DIAG=y 312CONFIG_INET_TCP_DIAG=y
282# CONFIG_TCP_CONG_ADVANCED is not set 313# CONFIG_TCP_CONG_ADVANCED is not set
@@ -284,15 +315,10 @@ CONFIG_TCP_CONG_CUBIC=y
284CONFIG_DEFAULT_TCP_CONG="cubic" 315CONFIG_DEFAULT_TCP_CONG="cubic"
285# CONFIG_TCP_MD5SIG is not set 316# CONFIG_TCP_MD5SIG is not set
286# CONFIG_IPV6 is not set 317# CONFIG_IPV6 is not set
287# CONFIG_INET6_XFRM_TUNNEL is not set
288# CONFIG_INET6_TUNNEL is not set
289CONFIG_NETWORK_SECMARK=y 318CONFIG_NETWORK_SECMARK=y
290# CONFIG_NETFILTER is not set 319# CONFIG_NETFILTER is not set
291# CONFIG_IP_DCCP is not set 320# CONFIG_IP_DCCP is not set
292# CONFIG_IP_SCTP is not set 321# CONFIG_IP_SCTP is not set
293# CONFIG_SCTP_HMAC_NONE is not set
294# CONFIG_SCTP_HMAC_SHA1 is not set
295# CONFIG_SCTP_HMAC_MD5 is not set
296# CONFIG_TIPC is not set 322# CONFIG_TIPC is not set
297# CONFIG_ATM is not set 323# CONFIG_ATM is not set
298# CONFIG_BRIDGE is not set 324# CONFIG_BRIDGE is not set
@@ -305,10 +331,6 @@ CONFIG_NETWORK_SECMARK=y
305# CONFIG_LAPB is not set 331# CONFIG_LAPB is not set
306# CONFIG_ECONET is not set 332# CONFIG_ECONET is not set
307# CONFIG_WAN_ROUTER is not set 333# CONFIG_WAN_ROUTER is not set
308
309#
310# QoS and/or fair queueing
311#
312# CONFIG_NET_SCHED is not set 334# CONFIG_NET_SCHED is not set
313 335
314# 336#
@@ -316,6 +338,7 @@ CONFIG_NETWORK_SECMARK=y
316# 338#
317# CONFIG_NET_PKTGEN is not set 339# CONFIG_NET_PKTGEN is not set
318# CONFIG_HAMRADIO is not set 340# CONFIG_HAMRADIO is not set
341# CONFIG_CAN is not set
319# CONFIG_IRDA is not set 342# CONFIG_IRDA is not set
320# CONFIG_BT is not set 343# CONFIG_BT is not set
321# CONFIG_AF_RXRPC is not set 344# CONFIG_AF_RXRPC is not set
@@ -338,6 +361,7 @@ CONFIG_FIB_RULES=y
338# 361#
339# Generic Driver Options 362# Generic Driver Options
340# 363#
364CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
341CONFIG_STANDALONE=y 365CONFIG_STANDALONE=y
342CONFIG_PREVENT_FIRMWARE_BUILD=y 366CONFIG_PREVENT_FIRMWARE_BUILD=y
343CONFIG_FW_LOADER=y 367CONFIG_FW_LOADER=y
@@ -359,10 +383,11 @@ CONFIG_BLK_DEV_NBD=m
359CONFIG_BLK_DEV_RAM=y 383CONFIG_BLK_DEV_RAM=y
360CONFIG_BLK_DEV_RAM_COUNT=16 384CONFIG_BLK_DEV_RAM_COUNT=16
361CONFIG_BLK_DEV_RAM_SIZE=4096 385CONFIG_BLK_DEV_RAM_SIZE=4096
362CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 386CONFIG_BLK_DEV_XIP=y
363# CONFIG_CDROM_PKTCDVD is not set 387# CONFIG_CDROM_PKTCDVD is not set
364# CONFIG_ATA_OVER_ETH is not set 388# CONFIG_ATA_OVER_ETH is not set
365# CONFIG_MISC_DEVICES is not set 389# CONFIG_MISC_DEVICES is not set
390CONFIG_HAVE_IDE=y
366# CONFIG_IDE is not set 391# CONFIG_IDE is not set
367 392
368# 393#
@@ -402,18 +427,13 @@ CONFIG_SCSI_WAIT_SCAN=m
402# CONFIG_SCSI_ISCSI_ATTRS is not set 427# CONFIG_SCSI_ISCSI_ATTRS is not set
403CONFIG_SCSI_SAS_ATTRS=m 428CONFIG_SCSI_SAS_ATTRS=m
404CONFIG_SCSI_SAS_LIBSAS=m 429CONFIG_SCSI_SAS_LIBSAS=m
430CONFIG_SCSI_SAS_HOST_SMP=y
405# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set 431# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
432# CONFIG_SCSI_SRP_ATTRS is not set
406# CONFIG_SCSI_LOWLEVEL is not set 433# CONFIG_SCSI_LOWLEVEL is not set
407# CONFIG_ATA is not set 434# CONFIG_ATA is not set
408# CONFIG_MD is not set 435# CONFIG_MD is not set
409
410#
411# Fusion MPT device support
412#
413# CONFIG_FUSION is not set 436# CONFIG_FUSION is not set
414# CONFIG_FUSION_SPI is not set
415# CONFIG_FUSION_FC is not set
416# CONFIG_FUSION_SAS is not set
417 437
418# 438#
419# IEEE 1394 (FireWire) support 439# IEEE 1394 (FireWire) support
@@ -428,6 +448,7 @@ CONFIG_NETDEVICES=y
428# CONFIG_MACVLAN is not set 448# CONFIG_MACVLAN is not set
429# CONFIG_EQUALIZER is not set 449# CONFIG_EQUALIZER is not set
430# CONFIG_TUN is not set 450# CONFIG_TUN is not set
451# CONFIG_VETH is not set
431# CONFIG_ARCNET is not set 452# CONFIG_ARCNET is not set
432# CONFIG_PHYLIB is not set 453# CONFIG_PHYLIB is not set
433CONFIG_NET_ETHERNET=y 454CONFIG_NET_ETHERNET=y
@@ -440,6 +461,10 @@ CONFIG_MII=y
440# CONFIG_DM9000 is not set 461# CONFIG_DM9000 is not set
441# CONFIG_NET_TULIP is not set 462# CONFIG_NET_TULIP is not set
442# CONFIG_HP100 is not set 463# CONFIG_HP100 is not set
464# CONFIG_IBM_NEW_EMAC_ZMII is not set
465# CONFIG_IBM_NEW_EMAC_RGMII is not set
466# CONFIG_IBM_NEW_EMAC_TAH is not set
467# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
443CONFIG_NET_PCI=y 468CONFIG_NET_PCI=y
444# CONFIG_PCNET32 is not set 469# CONFIG_PCNET32 is not set
445# CONFIG_AMD8111_ETH is not set 470# CONFIG_AMD8111_ETH is not set
@@ -447,7 +472,6 @@ CONFIG_NET_PCI=y
447# CONFIG_B44 is not set 472# CONFIG_B44 is not set
448# CONFIG_FORCEDETH is not set 473# CONFIG_FORCEDETH is not set
449# CONFIG_TC35815 is not set 474# CONFIG_TC35815 is not set
450# CONFIG_DGRS is not set
451# CONFIG_EEPRO100 is not set 475# CONFIG_EEPRO100 is not set
452CONFIG_E100=y 476CONFIG_E100=y
453# CONFIG_FEALNX is not set 477# CONFIG_FEALNX is not set
@@ -455,6 +479,7 @@ CONFIG_E100=y
455# CONFIG_NE2K_PCI is not set 479# CONFIG_NE2K_PCI is not set
456# CONFIG_8139CP is not set 480# CONFIG_8139CP is not set
457# CONFIG_8139TOO is not set 481# CONFIG_8139TOO is not set
482# CONFIG_R6040 is not set
458# CONFIG_SIS900 is not set 483# CONFIG_SIS900 is not set
459# CONFIG_EPIC100 is not set 484# CONFIG_EPIC100 is not set
460# CONFIG_SUNDANCE is not set 485# CONFIG_SUNDANCE is not set
@@ -470,6 +495,7 @@ CONFIG_E100=y
470# 495#
471# CONFIG_WLAN_PRE80211 is not set 496# CONFIG_WLAN_PRE80211 is not set
472# CONFIG_WLAN_80211 is not set 497# CONFIG_WLAN_80211 is not set
498# CONFIG_IWLWIFI_LEDS is not set
473 499
474# 500#
475# USB Network Adapters 501# USB Network Adapters
@@ -478,7 +504,6 @@ CONFIG_USB_CATC=m
478CONFIG_USB_KAWETH=m 504CONFIG_USB_KAWETH=m
479CONFIG_USB_PEGASUS=m 505CONFIG_USB_PEGASUS=m
480CONFIG_USB_RTL8150=m 506CONFIG_USB_RTL8150=m
481# CONFIG_USB_USBNET_MII is not set
482# CONFIG_USB_USBNET is not set 507# CONFIG_USB_USBNET is not set
483# CONFIG_WAN is not set 508# CONFIG_WAN is not set
484# CONFIG_FDDI is not set 509# CONFIG_FDDI is not set
@@ -486,7 +511,6 @@ CONFIG_USB_RTL8150=m
486# CONFIG_PPP is not set 511# CONFIG_PPP is not set
487# CONFIG_SLIP is not set 512# CONFIG_SLIP is not set
488# CONFIG_NET_FC is not set 513# CONFIG_NET_FC is not set
489# CONFIG_SHAPER is not set
490# CONFIG_NETCONSOLE is not set 514# CONFIG_NETCONSOLE is not set
491# CONFIG_NETPOLL is not set 515# CONFIG_NETPOLL is not set
492# CONFIG_NET_POLL_CONTROLLER is not set 516# CONFIG_NET_POLL_CONTROLLER is not set
@@ -505,7 +529,6 @@ CONFIG_INPUT=y
505# 529#
506# CONFIG_INPUT_MOUSEDEV is not set 530# CONFIG_INPUT_MOUSEDEV is not set
507# CONFIG_INPUT_JOYDEV is not set 531# CONFIG_INPUT_JOYDEV is not set
508# CONFIG_INPUT_TSDEV is not set
509# CONFIG_INPUT_EVDEV is not set 532# CONFIG_INPUT_EVDEV is not set
510# CONFIG_INPUT_EVBUG is not set 533# CONFIG_INPUT_EVBUG is not set
511 534
@@ -532,7 +555,9 @@ CONFIG_VT=y
532CONFIG_VT_CONSOLE=y 555CONFIG_VT_CONSOLE=y
533CONFIG_HW_CONSOLE=y 556CONFIG_HW_CONSOLE=y
534CONFIG_VT_HW_CONSOLE_BINDING=y 557CONFIG_VT_HW_CONSOLE_BINDING=y
558# CONFIG_DEVKMEM is not set
535# CONFIG_SERIAL_NONSTANDARD is not set 559# CONFIG_SERIAL_NONSTANDARD is not set
560# CONFIG_NOZOMI is not set
536 561
537# 562#
538# Serial drivers 563# Serial drivers
@@ -551,52 +576,62 @@ CONFIG_UNIX98_PTYS=y
551CONFIG_LEGACY_PTYS=y 576CONFIG_LEGACY_PTYS=y
552CONFIG_LEGACY_PTY_COUNT=256 577CONFIG_LEGACY_PTY_COUNT=256
553# CONFIG_IPMI_HANDLER is not set 578# CONFIG_IPMI_HANDLER is not set
554# CONFIG_WATCHDOG is not set
555# CONFIG_HW_RANDOM is not set 579# CONFIG_HW_RANDOM is not set
556# CONFIG_RTC is not set
557# CONFIG_R3964 is not set 580# CONFIG_R3964 is not set
558# CONFIG_APPLICOM is not set 581# CONFIG_APPLICOM is not set
559# CONFIG_GPIO_TB0219 is not set 582# CONFIG_GPIO_TB0219 is not set
560# CONFIG_DRM is not set
561CONFIG_GPIO_VR41XX=y 583CONFIG_GPIO_VR41XX=y
562# CONFIG_RAW_DRIVER is not set 584# CONFIG_RAW_DRIVER is not set
563# CONFIG_TCG_TPM is not set 585# CONFIG_TCG_TPM is not set
564CONFIG_DEVPORT=y 586CONFIG_DEVPORT=y
565# CONFIG_I2C is not set 587# CONFIG_I2C is not set
566
567#
568# SPI support
569#
570# CONFIG_SPI is not set 588# CONFIG_SPI is not set
571# CONFIG_SPI_MASTER is not set
572# CONFIG_W1 is not set 589# CONFIG_W1 is not set
573# CONFIG_POWER_SUPPLY is not set 590# CONFIG_POWER_SUPPLY is not set
574# CONFIG_HWMON is not set 591# CONFIG_HWMON is not set
592# CONFIG_THERMAL is not set
593# CONFIG_WATCHDOG is not set
594
595#
596# Sonics Silicon Backplane
597#
598CONFIG_SSB_POSSIBLE=y
599# CONFIG_SSB is not set
575 600
576# 601#
577# Multifunction device drivers 602# Multifunction device drivers
578# 603#
579# CONFIG_MFD_SM501 is not set 604# CONFIG_MFD_SM501 is not set
605# CONFIG_HTC_PASIC3 is not set
580 606
581# 607#
582# Multimedia devices 608# Multimedia devices
583# 609#
610
611#
612# Multimedia core support
613#
584# CONFIG_VIDEO_DEV is not set 614# CONFIG_VIDEO_DEV is not set
585# CONFIG_DVB_CORE is not set 615# CONFIG_DVB_CORE is not set
616
617#
618# Multimedia drivers
619#
586# CONFIG_DAB is not set 620# CONFIG_DAB is not set
587 621
588# 622#
589# Graphics support 623# Graphics support
590# 624#
625# CONFIG_DRM is not set
626# CONFIG_VGASTATE is not set
627# CONFIG_VIDEO_OUTPUT_CONTROL is not set
628# CONFIG_FB is not set
591# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 629# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
592 630
593# 631#
594# Display device support 632# Display device support
595# 633#
596# CONFIG_DISPLAY_SUPPORT is not set 634# CONFIG_DISPLAY_SUPPORT is not set
597# CONFIG_VGASTATE is not set
598# CONFIG_VIDEO_OUTPUT_CONTROL is not set
599# CONFIG_FB is not set
600 635
601# 636#
602# Console display driver support 637# Console display driver support
@@ -615,6 +650,7 @@ CONFIG_USB_ARCH_HAS_OHCI=y
615CONFIG_USB_ARCH_HAS_EHCI=y 650CONFIG_USB_ARCH_HAS_EHCI=y
616CONFIG_USB=y 651CONFIG_USB=y
617# CONFIG_USB_DEBUG is not set 652# CONFIG_USB_DEBUG is not set
653# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
618 654
619# 655#
620# Miscellaneous USB options 656# Miscellaneous USB options
@@ -623,15 +659,18 @@ CONFIG_USB_DEVICEFS=y
623CONFIG_USB_DEVICE_CLASS=y 659CONFIG_USB_DEVICE_CLASS=y
624# CONFIG_USB_DYNAMIC_MINORS is not set 660# CONFIG_USB_DYNAMIC_MINORS is not set
625# CONFIG_USB_OTG is not set 661# CONFIG_USB_OTG is not set
662# CONFIG_USB_OTG_WHITELIST is not set
663# CONFIG_USB_OTG_BLACKLIST_HUB is not set
626 664
627# 665#
628# USB Host Controller Drivers 666# USB Host Controller Drivers
629# 667#
668# CONFIG_USB_C67X00_HCD is not set
630CONFIG_USB_EHCI_HCD=y 669CONFIG_USB_EHCI_HCD=y
631# CONFIG_USB_EHCI_SPLIT_ISO is not set
632# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 670# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
633# CONFIG_USB_EHCI_TT_NEWSCHED is not set 671# CONFIG_USB_EHCI_TT_NEWSCHED is not set
634# CONFIG_USB_ISP116X_HCD is not set 672# CONFIG_USB_ISP116X_HCD is not set
673# CONFIG_USB_ISP1760_HCD is not set
635CONFIG_USB_OHCI_HCD=y 674CONFIG_USB_OHCI_HCD=y
636# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 675# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
637# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set 676# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
@@ -657,13 +696,16 @@ CONFIG_USB_STORAGE=y
657# CONFIG_USB_STORAGE_DEBUG is not set 696# CONFIG_USB_STORAGE_DEBUG is not set
658# CONFIG_USB_STORAGE_DATAFAB is not set 697# CONFIG_USB_STORAGE_DATAFAB is not set
659# CONFIG_USB_STORAGE_FREECOM is not set 698# CONFIG_USB_STORAGE_FREECOM is not set
699# CONFIG_USB_STORAGE_ISD200 is not set
660# CONFIG_USB_STORAGE_DPCM is not set 700# CONFIG_USB_STORAGE_DPCM is not set
661# CONFIG_USB_STORAGE_USBAT is not set 701# CONFIG_USB_STORAGE_USBAT is not set
662# CONFIG_USB_STORAGE_SDDR09 is not set 702# CONFIG_USB_STORAGE_SDDR09 is not set
663# CONFIG_USB_STORAGE_SDDR55 is not set 703# CONFIG_USB_STORAGE_SDDR55 is not set
664# CONFIG_USB_STORAGE_JUMPSHOT is not set 704# CONFIG_USB_STORAGE_JUMPSHOT is not set
665# CONFIG_USB_STORAGE_ALAUDA is not set 705# CONFIG_USB_STORAGE_ALAUDA is not set
706# CONFIG_USB_STORAGE_ONETOUCH is not set
666# CONFIG_USB_STORAGE_KARMA is not set 707# CONFIG_USB_STORAGE_KARMA is not set
708# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
667# CONFIG_USB_LIBUSUAL is not set 709# CONFIG_USB_LIBUSUAL is not set
668 710
669# 711#
@@ -676,10 +718,6 @@ CONFIG_USB_STORAGE=y
676# 718#
677# USB port drivers 719# USB port drivers
678# 720#
679
680#
681# USB Serial Converter support
682#
683# CONFIG_USB_SERIAL is not set 721# CONFIG_USB_SERIAL is not set
684 722
685# 723#
@@ -705,17 +743,11 @@ CONFIG_USB_STORAGE=y
705# CONFIG_USB_TRANCEVIBRATOR is not set 743# CONFIG_USB_TRANCEVIBRATOR is not set
706# CONFIG_USB_IOWARRIOR is not set 744# CONFIG_USB_IOWARRIOR is not set
707# CONFIG_USB_TEST is not set 745# CONFIG_USB_TEST is not set
708
709#
710# USB DSL modem support
711#
712
713#
714# USB Gadget Support
715#
716# CONFIG_USB_GADGET is not set 746# CONFIG_USB_GADGET is not set
717# CONFIG_MMC is not set 747# CONFIG_MMC is not set
748# CONFIG_MEMSTICK is not set
718# CONFIG_NEW_LEDS is not set 749# CONFIG_NEW_LEDS is not set
750# CONFIG_ACCESSIBILITY is not set
719# CONFIG_INFINIBAND is not set 751# CONFIG_INFINIBAND is not set
720CONFIG_RTC_LIB=y 752CONFIG_RTC_LIB=y
721CONFIG_RTC_CLASS=y 753CONFIG_RTC_CLASS=y
@@ -740,9 +772,10 @@ CONFIG_RTC_INTF_DEV=y
740# Platform RTC drivers 772# Platform RTC drivers
741# 773#
742# CONFIG_RTC_DRV_CMOS is not set 774# CONFIG_RTC_DRV_CMOS is not set
775# CONFIG_RTC_DRV_DS1511 is not set
743# CONFIG_RTC_DRV_DS1553 is not set 776# CONFIG_RTC_DRV_DS1553 is not set
744# CONFIG_RTC_DRV_STK17TA8 is not set
745# CONFIG_RTC_DRV_DS1742 is not set 777# CONFIG_RTC_DRV_DS1742 is not set
778# CONFIG_RTC_DRV_STK17TA8 is not set
746# CONFIG_RTC_DRV_M48T86 is not set 779# CONFIG_RTC_DRV_M48T86 is not set
747# CONFIG_RTC_DRV_M48T59 is not set 780# CONFIG_RTC_DRV_M48T59 is not set
748# CONFIG_RTC_DRV_V3020 is not set 781# CONFIG_RTC_DRV_V3020 is not set
@@ -751,23 +784,6 @@ CONFIG_RTC_INTF_DEV=y
751# on-CPU RTC drivers 784# on-CPU RTC drivers
752# 785#
753CONFIG_RTC_DRV_VR41XX=y 786CONFIG_RTC_DRV_VR41XX=y
754
755#
756# DMA Engine support
757#
758# CONFIG_DMA_ENGINE is not set
759
760#
761# DMA Clients
762#
763
764#
765# DMA Devices
766#
767
768#
769# Userspace I/O
770#
771# CONFIG_UIO is not set 787# CONFIG_UIO is not set
772 788
773# 789#
@@ -782,14 +798,11 @@ CONFIG_EXT2_FS=y
782# CONFIG_JFS_FS is not set 798# CONFIG_JFS_FS is not set
783CONFIG_FS_POSIX_ACL=y 799CONFIG_FS_POSIX_ACL=y
784# CONFIG_XFS_FS is not set 800# CONFIG_XFS_FS is not set
785# CONFIG_GFS2_FS is not set
786# CONFIG_OCFS2_FS is not set 801# CONFIG_OCFS2_FS is not set
787# CONFIG_MINIX_FS is not set 802CONFIG_DNOTIFY=y
788CONFIG_ROMFS_FS=m
789CONFIG_INOTIFY=y 803CONFIG_INOTIFY=y
790CONFIG_INOTIFY_USER=y 804CONFIG_INOTIFY_USER=y
791# CONFIG_QUOTA is not set 805# CONFIG_QUOTA is not set
792CONFIG_DNOTIFY=y
793# CONFIG_AUTOFS_FS is not set 806# CONFIG_AUTOFS_FS is not set
794CONFIG_AUTOFS4_FS=y 807CONFIG_AUTOFS4_FS=y
795# CONFIG_FUSE_FS is not set 808# CONFIG_FUSE_FS is not set
@@ -818,7 +831,6 @@ CONFIG_SYSFS=y
818CONFIG_TMPFS=y 831CONFIG_TMPFS=y
819CONFIG_TMPFS_POSIX_ACL=y 832CONFIG_TMPFS_POSIX_ACL=y
820# CONFIG_HUGETLB_PAGE is not set 833# CONFIG_HUGETLB_PAGE is not set
821CONFIG_RAMFS=y
822# CONFIG_CONFIGFS_FS is not set 834# CONFIG_CONFIGFS_FS is not set
823 835
824# 836#
@@ -833,24 +845,21 @@ CONFIG_RAMFS=y
833# CONFIG_EFS_FS is not set 845# CONFIG_EFS_FS is not set
834CONFIG_CRAMFS=m 846CONFIG_CRAMFS=m
835# CONFIG_VXFS_FS is not set 847# CONFIG_VXFS_FS is not set
848# CONFIG_MINIX_FS is not set
836# CONFIG_HPFS_FS is not set 849# CONFIG_HPFS_FS is not set
837# CONFIG_QNX4FS_FS is not set 850# CONFIG_QNX4FS_FS is not set
851CONFIG_ROMFS_FS=m
838# CONFIG_SYSV_FS is not set 852# CONFIG_SYSV_FS is not set
839# CONFIG_UFS_FS is not set 853# CONFIG_UFS_FS is not set
840 854CONFIG_NETWORK_FILESYSTEMS=y
841#
842# Network File Systems
843#
844CONFIG_NFS_FS=y 855CONFIG_NFS_FS=y
845CONFIG_NFS_V3=y 856CONFIG_NFS_V3=y
846# CONFIG_NFS_V3_ACL is not set 857# CONFIG_NFS_V3_ACL is not set
847# CONFIG_NFS_V4 is not set 858# CONFIG_NFS_V4 is not set
848# CONFIG_NFS_DIRECTIO is not set
849CONFIG_NFSD=m 859CONFIG_NFSD=m
850CONFIG_NFSD_V3=y 860CONFIG_NFSD_V3=y
851# CONFIG_NFSD_V3_ACL is not set 861# CONFIG_NFSD_V3_ACL is not set
852# CONFIG_NFSD_V4 is not set 862# CONFIG_NFSD_V4 is not set
853# CONFIG_NFSD_TCP is not set
854CONFIG_ROOT_NFS=y 863CONFIG_ROOT_NFS=y
855CONFIG_LOCKD=y 864CONFIG_LOCKD=y
856CONFIG_LOCKD_V4=y 865CONFIG_LOCKD_V4=y
@@ -871,47 +880,38 @@ CONFIG_SUNRPC=y
871# 880#
872# CONFIG_PARTITION_ADVANCED is not set 881# CONFIG_PARTITION_ADVANCED is not set
873CONFIG_MSDOS_PARTITION=y 882CONFIG_MSDOS_PARTITION=y
874
875#
876# Native Language Support
877#
878# CONFIG_NLS is not set 883# CONFIG_NLS is not set
879
880#
881# Distributed Lock Manager
882#
883# CONFIG_DLM is not set 884# CONFIG_DLM is not set
884 885
885# 886#
886# Profiling support
887#
888# CONFIG_PROFILING is not set
889
890#
891# Kernel hacking 887# Kernel hacking
892# 888#
893CONFIG_TRACE_IRQFLAGS_SUPPORT=y 889CONFIG_TRACE_IRQFLAGS_SUPPORT=y
894# CONFIG_PRINTK_TIME is not set 890# CONFIG_PRINTK_TIME is not set
891CONFIG_ENABLE_WARN_DEPRECATED=y
895CONFIG_ENABLE_MUST_CHECK=y 892CONFIG_ENABLE_MUST_CHECK=y
893CONFIG_FRAME_WARN=1024
896# CONFIG_MAGIC_SYSRQ is not set 894# CONFIG_MAGIC_SYSRQ is not set
897# CONFIG_UNUSED_SYMBOLS is not set 895# CONFIG_UNUSED_SYMBOLS is not set
898# CONFIG_DEBUG_FS is not set 896# CONFIG_DEBUG_FS is not set
899# CONFIG_HEADERS_CHECK is not set 897# CONFIG_HEADERS_CHECK is not set
900# CONFIG_DEBUG_KERNEL is not set 898# CONFIG_DEBUG_KERNEL is not set
901CONFIG_CROSSCOMPILE=y 899# CONFIG_SAMPLES is not set
902CONFIG_CMDLINE="mem=32M console=ttyVR0,115200" 900CONFIG_CMDLINE="cca=3 mem=32M console=ttyVR0,115200"
903 901
904# 902#
905# Security options 903# Security options
906# 904#
907# CONFIG_KEYS is not set 905# CONFIG_KEYS is not set
908# CONFIG_SECURITY is not set 906# CONFIG_SECURITY is not set
907# CONFIG_SECURITY_FILE_CAPABILITIES is not set
909# CONFIG_CRYPTO is not set 908# CONFIG_CRYPTO is not set
910 909
911# 910#
912# Library routines 911# Library routines
913# 912#
914CONFIG_BITREVERSE=m 913CONFIG_BITREVERSE=m
914# CONFIG_GENERIC_FIND_FIRST_BIT is not set
915# CONFIG_CRC_CCITT is not set 915# CONFIG_CRC_CCITT is not set
916# CONFIG_CRC16 is not set 916# CONFIG_CRC16 is not set
917# CONFIG_CRC_ITU_T is not set 917# CONFIG_CRC_ITU_T is not set
diff --git a/arch/mips/configs/tb0287_defconfig b/arch/mips/configs/tb0287_defconfig
index 40d4a40a970e..a5d0f3c55ed1 100644
--- a/arch/mips/configs/tb0287_defconfig
+++ b/arch/mips/configs/tb0287_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.23-rc2 3# Linux kernel version: 2.6.26-rc1
4# Thu Aug 9 14:03:54 2007 4# Mon May 12 11:55:55 2008
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
@@ -10,9 +10,11 @@ CONFIG_MIPS=y
10# 10#
11# CONFIG_MACH_ALCHEMY is not set 11# CONFIG_MACH_ALCHEMY is not set
12# CONFIG_BASLER_EXCITE is not set 12# CONFIG_BASLER_EXCITE is not set
13# CONFIG_BCM47XX is not set
13# CONFIG_MIPS_COBALT is not set 14# CONFIG_MIPS_COBALT is not set
14# CONFIG_MACH_DECSTATION is not set 15# CONFIG_MACH_DECSTATION is not set
15# CONFIG_MACH_JAZZ is not set 16# CONFIG_MACH_JAZZ is not set
17# CONFIG_LASAT is not set
16# CONFIG_LEMOTE_FULONG is not set 18# CONFIG_LEMOTE_FULONG is not set
17# CONFIG_MIPS_ATLAS is not set 19# CONFIG_MIPS_ATLAS is not set
18# CONFIG_MIPS_MALTA is not set 20# CONFIG_MIPS_MALTA is not set
@@ -26,6 +28,7 @@ CONFIG_MACH_VR41XX=y
26# CONFIG_PMC_YOSEMITE is not set 28# CONFIG_PMC_YOSEMITE is not set
27# CONFIG_SGI_IP22 is not set 29# CONFIG_SGI_IP22 is not set
28# CONFIG_SGI_IP27 is not set 30# CONFIG_SGI_IP27 is not set
31# CONFIG_SGI_IP28 is not set
29# CONFIG_SGI_IP32 is not set 32# CONFIG_SGI_IP32 is not set
30# CONFIG_SIBYTE_CRHINE is not set 33# CONFIG_SIBYTE_CRHINE is not set
31# CONFIG_SIBYTE_CARMEL is not set 34# CONFIG_SIBYTE_CARMEL is not set
@@ -53,12 +56,17 @@ CONFIG_PCI_VR41XX=y
53CONFIG_RWSEM_GENERIC_SPINLOCK=y 56CONFIG_RWSEM_GENERIC_SPINLOCK=y
54# CONFIG_ARCH_HAS_ILOG2_U32 is not set 57# CONFIG_ARCH_HAS_ILOG2_U32 is not set
55# CONFIG_ARCH_HAS_ILOG2_U64 is not set 58# CONFIG_ARCH_HAS_ILOG2_U64 is not set
59CONFIG_ARCH_SUPPORTS_OPROFILE=y
56CONFIG_GENERIC_FIND_NEXT_BIT=y 60CONFIG_GENERIC_FIND_NEXT_BIT=y
57CONFIG_GENERIC_HWEIGHT=y 61CONFIG_GENERIC_HWEIGHT=y
58CONFIG_GENERIC_CALIBRATE_DELAY=y 62CONFIG_GENERIC_CALIBRATE_DELAY=y
63CONFIG_GENERIC_CLOCKEVENTS=y
59CONFIG_GENERIC_TIME=y 64CONFIG_GENERIC_TIME=y
65CONFIG_GENERIC_CMOS_UPDATE=y
60CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 66CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
61CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y 67CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
68CONFIG_CEVT_R4K=y
69CONFIG_CSRC_R4K=y
62CONFIG_DMA_NONCOHERENT=y 70CONFIG_DMA_NONCOHERENT=y
63CONFIG_DMA_NEED_PCI_MAP_STATE=y 71CONFIG_DMA_NEED_PCI_MAP_STATE=y
64# CONFIG_HOTPLUG_CPU is not set 72# CONFIG_HOTPLUG_CPU is not set
@@ -113,6 +121,7 @@ CONFIG_CPU_HAS_SYNC=y
113CONFIG_GENERIC_HARDIRQS=y 121CONFIG_GENERIC_HARDIRQS=y
114CONFIG_GENERIC_IRQ_PROBE=y 122CONFIG_GENERIC_IRQ_PROBE=y
115CONFIG_ARCH_FLATMEM_ENABLE=y 123CONFIG_ARCH_FLATMEM_ENABLE=y
124CONFIG_ARCH_POPULATES_NODE_MAP=y
116CONFIG_SELECT_MEMORY_MODEL=y 125CONFIG_SELECT_MEMORY_MODEL=y
117CONFIG_FLATMEM_MANUAL=y 126CONFIG_FLATMEM_MANUAL=y
118# CONFIG_DISCONTIGMEM_MANUAL is not set 127# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -120,10 +129,16 @@ CONFIG_FLATMEM_MANUAL=y
120CONFIG_FLATMEM=y 129CONFIG_FLATMEM=y
121CONFIG_FLAT_NODE_MEM_MAP=y 130CONFIG_FLAT_NODE_MEM_MAP=y
122# CONFIG_SPARSEMEM_STATIC is not set 131# CONFIG_SPARSEMEM_STATIC is not set
132# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
133CONFIG_PAGEFLAGS_EXTENDED=y
123CONFIG_SPLIT_PTLOCK_CPUS=4 134CONFIG_SPLIT_PTLOCK_CPUS=4
124# CONFIG_RESOURCES_64BIT is not set 135# CONFIG_RESOURCES_64BIT is not set
125CONFIG_ZONE_DMA_FLAG=0 136CONFIG_ZONE_DMA_FLAG=0
126CONFIG_VIRT_TO_BUS=y 137CONFIG_VIRT_TO_BUS=y
138# CONFIG_TICK_ONESHOT is not set
139# CONFIG_NO_HZ is not set
140# CONFIG_HIGH_RES_TIMERS is not set
141CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
127# CONFIG_HZ_48 is not set 142# CONFIG_HZ_48 is not set
128# CONFIG_HZ_100 is not set 143# CONFIG_HZ_100 is not set
129# CONFIG_HZ_128 is not set 144# CONFIG_HZ_128 is not set
@@ -156,12 +171,15 @@ CONFIG_SYSVIPC_SYSCTL=y
156# CONFIG_POSIX_MQUEUE is not set 171# CONFIG_POSIX_MQUEUE is not set
157# CONFIG_BSD_PROCESS_ACCT is not set 172# CONFIG_BSD_PROCESS_ACCT is not set
158# CONFIG_TASKSTATS is not set 173# CONFIG_TASKSTATS is not set
159# CONFIG_USER_NS is not set
160# CONFIG_AUDIT is not set 174# CONFIG_AUDIT is not set
161# CONFIG_IKCONFIG is not set 175# CONFIG_IKCONFIG is not set
162CONFIG_LOG_BUF_SHIFT=14 176CONFIG_LOG_BUF_SHIFT=14
177# CONFIG_CGROUPS is not set
178# CONFIG_GROUP_SCHED is not set
163CONFIG_SYSFS_DEPRECATED=y 179CONFIG_SYSFS_DEPRECATED=y
180CONFIG_SYSFS_DEPRECATED_V2=y
164# CONFIG_RELAY is not set 181# CONFIG_RELAY is not set
182# CONFIG_NAMESPACES is not set
165# CONFIG_BLK_DEV_INITRD is not set 183# CONFIG_BLK_DEV_INITRD is not set
166# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 184# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
167CONFIG_SYSCTL=y 185CONFIG_SYSCTL=y
@@ -173,6 +191,8 @@ CONFIG_HOTPLUG=y
173CONFIG_PRINTK=y 191CONFIG_PRINTK=y
174CONFIG_BUG=y 192CONFIG_BUG=y
175CONFIG_ELF_CORE=y 193CONFIG_ELF_CORE=y
194# CONFIG_PCSPKR_PLATFORM is not set
195CONFIG_COMPAT_BRK=y
176CONFIG_BASE_FULL=y 196CONFIG_BASE_FULL=y
177CONFIG_FUTEX=y 197CONFIG_FUTEX=y
178CONFIG_ANON_INODES=y 198CONFIG_ANON_INODES=y
@@ -185,10 +205,19 @@ CONFIG_VM_EVENT_COUNTERS=y
185CONFIG_SLAB=y 205CONFIG_SLAB=y
186# CONFIG_SLUB is not set 206# CONFIG_SLUB is not set
187# CONFIG_SLOB is not set 207# CONFIG_SLOB is not set
208# CONFIG_PROFILING is not set
209# CONFIG_MARKERS is not set
210CONFIG_HAVE_OPROFILE=y
211# CONFIG_HAVE_KPROBES is not set
212# CONFIG_HAVE_KRETPROBES is not set
213# CONFIG_HAVE_DMA_ATTRS is not set
214CONFIG_PROC_PAGE_MONITOR=y
215CONFIG_SLABINFO=y
188CONFIG_RT_MUTEXES=y 216CONFIG_RT_MUTEXES=y
189# CONFIG_TINY_SHMEM is not set 217# CONFIG_TINY_SHMEM is not set
190CONFIG_BASE_SMALL=0 218CONFIG_BASE_SMALL=0
191CONFIG_MODULES=y 219CONFIG_MODULES=y
220# CONFIG_MODULE_FORCE_LOAD is not set
192CONFIG_MODULE_UNLOAD=y 221CONFIG_MODULE_UNLOAD=y
193CONFIG_MODULE_FORCE_UNLOAD=y 222CONFIG_MODULE_FORCE_UNLOAD=y
194CONFIG_MODVERSIONS=y 223CONFIG_MODVERSIONS=y
@@ -212,18 +241,17 @@ CONFIG_DEFAULT_AS=y
212# CONFIG_DEFAULT_CFQ is not set 241# CONFIG_DEFAULT_CFQ is not set
213# CONFIG_DEFAULT_NOOP is not set 242# CONFIG_DEFAULT_NOOP is not set
214CONFIG_DEFAULT_IOSCHED="anticipatory" 243CONFIG_DEFAULT_IOSCHED="anticipatory"
244CONFIG_CLASSIC_RCU=y
215 245
216# 246#
217# Bus options (PCI, PCMCIA, EISA, ISA, TC) 247# Bus options (PCI, PCMCIA, EISA, ISA, TC)
218# 248#
219CONFIG_HW_HAS_PCI=y 249CONFIG_HW_HAS_PCI=y
220CONFIG_PCI=y 250CONFIG_PCI=y
251CONFIG_PCI_DOMAINS=y
221# CONFIG_ARCH_SUPPORTS_MSI is not set 252# CONFIG_ARCH_SUPPORTS_MSI is not set
253CONFIG_PCI_LEGACY=y
222CONFIG_MMU=y 254CONFIG_MMU=y
223
224#
225# PCCARD (PCMCIA/CardBus) support
226#
227# CONFIG_PCCARD is not set 255# CONFIG_PCCARD is not set
228# CONFIG_HOTPLUG_PCI is not set 256# CONFIG_HOTPLUG_PCI is not set
229 257
@@ -237,6 +265,7 @@ CONFIG_TRAD_SIGNALS=y
237# 265#
238# Power management options 266# Power management options
239# 267#
268CONFIG_ARCH_SUSPEND_POSSIBLE=y
240# CONFIG_PM is not set 269# CONFIG_PM is not set
241 270
242# 271#
@@ -278,6 +307,7 @@ CONFIG_INET_TUNNEL=m
278# CONFIG_INET_XFRM_MODE_TRANSPORT is not set 307# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
279# CONFIG_INET_XFRM_MODE_TUNNEL is not set 308# CONFIG_INET_XFRM_MODE_TUNNEL is not set
280# CONFIG_INET_XFRM_MODE_BEET is not set 309# CONFIG_INET_XFRM_MODE_BEET is not set
310# CONFIG_INET_LRO is not set
281CONFIG_INET_DIAG=y 311CONFIG_INET_DIAG=y
282CONFIG_INET_TCP_DIAG=y 312CONFIG_INET_TCP_DIAG=y
283CONFIG_TCP_CONG_ADVANCED=y 313CONFIG_TCP_CONG_ADVANCED=y
@@ -302,8 +332,6 @@ CONFIG_DEFAULT_BIC=y
302CONFIG_DEFAULT_TCP_CONG="bic" 332CONFIG_DEFAULT_TCP_CONG="bic"
303# CONFIG_TCP_MD5SIG is not set 333# CONFIG_TCP_MD5SIG is not set
304# CONFIG_IPV6 is not set 334# CONFIG_IPV6 is not set
305# CONFIG_INET6_XFRM_TUNNEL is not set
306# CONFIG_INET6_TUNNEL is not set
307CONFIG_NETWORK_SECMARK=y 335CONFIG_NETWORK_SECMARK=y
308# CONFIG_NETFILTER is not set 336# CONFIG_NETFILTER is not set
309# CONFIG_IP_DCCP is not set 337# CONFIG_IP_DCCP is not set
@@ -320,10 +348,6 @@ CONFIG_NETWORK_SECMARK=y
320# CONFIG_LAPB is not set 348# CONFIG_LAPB is not set
321# CONFIG_ECONET is not set 349# CONFIG_ECONET is not set
322# CONFIG_WAN_ROUTER is not set 350# CONFIG_WAN_ROUTER is not set
323
324#
325# QoS and/or fair queueing
326#
327# CONFIG_NET_SCHED is not set 351# CONFIG_NET_SCHED is not set
328 352
329# 353#
@@ -331,6 +355,7 @@ CONFIG_NETWORK_SECMARK=y
331# 355#
332# CONFIG_NET_PKTGEN is not set 356# CONFIG_NET_PKTGEN is not set
333# CONFIG_HAMRADIO is not set 357# CONFIG_HAMRADIO is not set
358# CONFIG_CAN is not set
334# CONFIG_IRDA is not set 359# CONFIG_IRDA is not set
335# CONFIG_BT is not set 360# CONFIG_BT is not set
336# CONFIG_AF_RXRPC is not set 361# CONFIG_AF_RXRPC is not set
@@ -353,6 +378,7 @@ CONFIG_FIB_RULES=y
353# 378#
354# Generic Driver Options 379# Generic Driver Options
355# 380#
381CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
356CONFIG_STANDALONE=y 382CONFIG_STANDALONE=y
357CONFIG_PREVENT_FIRMWARE_BUILD=y 383CONFIG_PREVENT_FIRMWARE_BUILD=y
358CONFIG_FW_LOADER=m 384CONFIG_FW_LOADER=m
@@ -374,10 +400,11 @@ CONFIG_BLK_DEV_NBD=m
374CONFIG_BLK_DEV_RAM=y 400CONFIG_BLK_DEV_RAM=y
375CONFIG_BLK_DEV_RAM_COUNT=16 401CONFIG_BLK_DEV_RAM_COUNT=16
376CONFIG_BLK_DEV_RAM_SIZE=4096 402CONFIG_BLK_DEV_RAM_SIZE=4096
377CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 403CONFIG_BLK_DEV_XIP=y
378# CONFIG_CDROM_PKTCDVD is not set 404# CONFIG_CDROM_PKTCDVD is not set
379# CONFIG_ATA_OVER_ETH is not set 405# CONFIG_ATA_OVER_ETH is not set
380# CONFIG_MISC_DEVICES is not set 406# CONFIG_MISC_DEVICES is not set
407CONFIG_HAVE_IDE=y
381# CONFIG_IDE is not set 408# CONFIG_IDE is not set
382 409
383# 410#
@@ -416,10 +443,14 @@ CONFIG_SCSI_WAIT_SCAN=m
416# CONFIG_SCSI_FC_ATTRS is not set 443# CONFIG_SCSI_FC_ATTRS is not set
417# CONFIG_SCSI_ISCSI_ATTRS is not set 444# CONFIG_SCSI_ISCSI_ATTRS is not set
418# CONFIG_SCSI_SAS_LIBSAS is not set 445# CONFIG_SCSI_SAS_LIBSAS is not set
446# CONFIG_SCSI_SRP_ATTRS is not set
419# CONFIG_SCSI_LOWLEVEL is not set 447# CONFIG_SCSI_LOWLEVEL is not set
420CONFIG_ATA=y 448CONFIG_ATA=y
421# CONFIG_ATA_NONSTANDARD is not set 449# CONFIG_ATA_NONSTANDARD is not set
450CONFIG_SATA_PMP=y
422# CONFIG_SATA_AHCI is not set 451# CONFIG_SATA_AHCI is not set
452# CONFIG_SATA_SIL24 is not set
453CONFIG_ATA_SFF=y
423# CONFIG_SATA_SVW is not set 454# CONFIG_SATA_SVW is not set
424# CONFIG_ATA_PIIX is not set 455# CONFIG_ATA_PIIX is not set
425# CONFIG_SATA_MV is not set 456# CONFIG_SATA_MV is not set
@@ -429,7 +460,6 @@ CONFIG_ATA=y
429# CONFIG_SATA_PROMISE is not set 460# CONFIG_SATA_PROMISE is not set
430# CONFIG_SATA_SX4 is not set 461# CONFIG_SATA_SX4 is not set
431# CONFIG_SATA_SIL is not set 462# CONFIG_SATA_SIL is not set
432# CONFIG_SATA_SIL24 is not set
433# CONFIG_SATA_SIS is not set 463# CONFIG_SATA_SIS is not set
434# CONFIG_SATA_ULI is not set 464# CONFIG_SATA_ULI is not set
435# CONFIG_SATA_VIA is not set 465# CONFIG_SATA_VIA is not set
@@ -458,7 +488,9 @@ CONFIG_ATA=y
458# CONFIG_PATA_MPIIX is not set 488# CONFIG_PATA_MPIIX is not set
459# CONFIG_PATA_OLDPIIX is not set 489# CONFIG_PATA_OLDPIIX is not set
460# CONFIG_PATA_NETCELL is not set 490# CONFIG_PATA_NETCELL is not set
491# CONFIG_PATA_NINJA32 is not set
461# CONFIG_PATA_NS87410 is not set 492# CONFIG_PATA_NS87410 is not set
493# CONFIG_PATA_NS87415 is not set
462# CONFIG_PATA_OPTI is not set 494# CONFIG_PATA_OPTI is not set
463# CONFIG_PATA_OPTIDMA is not set 495# CONFIG_PATA_OPTIDMA is not set
464# CONFIG_PATA_PDC_OLD is not set 496# CONFIG_PATA_PDC_OLD is not set
@@ -472,15 +504,9 @@ CONFIG_PATA_SIL680=y
472# CONFIG_PATA_VIA is not set 504# CONFIG_PATA_VIA is not set
473# CONFIG_PATA_WINBOND is not set 505# CONFIG_PATA_WINBOND is not set
474# CONFIG_PATA_PLATFORM is not set 506# CONFIG_PATA_PLATFORM is not set
507# CONFIG_PATA_SCH is not set
475# CONFIG_MD is not set 508# CONFIG_MD is not set
476
477#
478# Fusion MPT device support
479#
480# CONFIG_FUSION is not set 509# CONFIG_FUSION is not set
481# CONFIG_FUSION_SPI is not set
482# CONFIG_FUSION_FC is not set
483# CONFIG_FUSION_SAS is not set
484 510
485# 511#
486# IEEE 1394 (FireWire) support 512# IEEE 1394 (FireWire) support
@@ -520,6 +546,7 @@ CONFIG_NETDEVICES=y
520# CONFIG_MACVLAN is not set 546# CONFIG_MACVLAN is not set
521# CONFIG_EQUALIZER is not set 547# CONFIG_EQUALIZER is not set
522# CONFIG_TUN is not set 548# CONFIG_TUN is not set
549# CONFIG_VETH is not set
523# CONFIG_ARCNET is not set 550# CONFIG_ARCNET is not set
524# CONFIG_PHYLIB is not set 551# CONFIG_PHYLIB is not set
525CONFIG_NET_ETHERNET=y 552CONFIG_NET_ETHERNET=y
@@ -532,6 +559,10 @@ CONFIG_MII=y
532# CONFIG_DM9000 is not set 559# CONFIG_DM9000 is not set
533# CONFIG_NET_TULIP is not set 560# CONFIG_NET_TULIP is not set
534# CONFIG_HP100 is not set 561# CONFIG_HP100 is not set
562# CONFIG_IBM_NEW_EMAC_ZMII is not set
563# CONFIG_IBM_NEW_EMAC_RGMII is not set
564# CONFIG_IBM_NEW_EMAC_TAH is not set
565# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
535CONFIG_NET_PCI=y 566CONFIG_NET_PCI=y
536# CONFIG_PCNET32 is not set 567# CONFIG_PCNET32 is not set
537# CONFIG_AMD8111_ETH is not set 568# CONFIG_AMD8111_ETH is not set
@@ -539,7 +570,6 @@ CONFIG_NET_PCI=y
539# CONFIG_B44 is not set 570# CONFIG_B44 is not set
540# CONFIG_FORCEDETH is not set 571# CONFIG_FORCEDETH is not set
541# CONFIG_TC35815 is not set 572# CONFIG_TC35815 is not set
542# CONFIG_DGRS is not set
543# CONFIG_EEPRO100 is not set 573# CONFIG_EEPRO100 is not set
544# CONFIG_E100 is not set 574# CONFIG_E100 is not set
545# CONFIG_FEALNX is not set 575# CONFIG_FEALNX is not set
@@ -551,6 +581,7 @@ CONFIG_8139TOO_PIO=y
551# CONFIG_8139TOO_TUNE_TWISTER is not set 581# CONFIG_8139TOO_TUNE_TWISTER is not set
552# CONFIG_8139TOO_8129 is not set 582# CONFIG_8139TOO_8129 is not set
553# CONFIG_8139_OLD_RX_RESET is not set 583# CONFIG_8139_OLD_RX_RESET is not set
584# CONFIG_R6040 is not set
554# CONFIG_SIS900 is not set 585# CONFIG_SIS900 is not set
555# CONFIG_EPIC100 is not set 586# CONFIG_EPIC100 is not set
556# CONFIG_SUNDANCE is not set 587# CONFIG_SUNDANCE is not set
@@ -563,6 +594,10 @@ CONFIG_NETDEV_1000=y
563# CONFIG_ACENIC is not set 594# CONFIG_ACENIC is not set
564# CONFIG_DL2K is not set 595# CONFIG_DL2K is not set
565# CONFIG_E1000 is not set 596# CONFIG_E1000 is not set
597# CONFIG_E1000E is not set
598# CONFIG_E1000E_ENABLED is not set
599# CONFIG_IP1000 is not set
600# CONFIG_IGB is not set
566# CONFIG_NS83820 is not set 601# CONFIG_NS83820 is not set
567# CONFIG_HAMACHI is not set 602# CONFIG_HAMACHI is not set
568# CONFIG_YELLOWFIN is not set 603# CONFIG_YELLOWFIN is not set
@@ -584,6 +619,7 @@ CONFIG_VIA_VELOCITY=y
584# 619#
585# CONFIG_WLAN_PRE80211 is not set 620# CONFIG_WLAN_PRE80211 is not set
586# CONFIG_WLAN_80211 is not set 621# CONFIG_WLAN_80211 is not set
622# CONFIG_IWLWIFI_LEDS is not set
587 623
588# 624#
589# USB Network Adapters 625# USB Network Adapters
@@ -592,7 +628,6 @@ CONFIG_VIA_VELOCITY=y
592# CONFIG_USB_KAWETH is not set 628# CONFIG_USB_KAWETH is not set
593# CONFIG_USB_PEGASUS is not set 629# CONFIG_USB_PEGASUS is not set
594# CONFIG_USB_RTL8150 is not set 630# CONFIG_USB_RTL8150 is not set
595# CONFIG_USB_USBNET_MII is not set
596# CONFIG_USB_USBNET is not set 631# CONFIG_USB_USBNET is not set
597# CONFIG_WAN is not set 632# CONFIG_WAN is not set
598# CONFIG_FDDI is not set 633# CONFIG_FDDI is not set
@@ -600,7 +635,6 @@ CONFIG_VIA_VELOCITY=y
600# CONFIG_PPP is not set 635# CONFIG_PPP is not set
601# CONFIG_SLIP is not set 636# CONFIG_SLIP is not set
602# CONFIG_NET_FC is not set 637# CONFIG_NET_FC is not set
603# CONFIG_SHAPER is not set
604# CONFIG_NETCONSOLE is not set 638# CONFIG_NETCONSOLE is not set
605# CONFIG_NETPOLL is not set 639# CONFIG_NETPOLL is not set
606# CONFIG_NET_POLL_CONTROLLER is not set 640# CONFIG_NET_POLL_CONTROLLER is not set
@@ -622,7 +656,6 @@ CONFIG_INPUT_MOUSEDEV_PSAUX=y
622CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 656CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
623CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 657CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
624# CONFIG_INPUT_JOYDEV is not set 658# CONFIG_INPUT_JOYDEV is not set
625# CONFIG_INPUT_TSDEV is not set
626# CONFIG_INPUT_EVDEV is not set 659# CONFIG_INPUT_EVDEV is not set
627# CONFIG_INPUT_EVBUG is not set 660# CONFIG_INPUT_EVBUG is not set
628 661
@@ -649,7 +682,9 @@ CONFIG_VT=y
649CONFIG_VT_CONSOLE=y 682CONFIG_VT_CONSOLE=y
650CONFIG_HW_CONSOLE=y 683CONFIG_HW_CONSOLE=y
651CONFIG_VT_HW_CONSOLE_BINDING=y 684CONFIG_VT_HW_CONSOLE_BINDING=y
685# CONFIG_DEVKMEM is not set
652# CONFIG_SERIAL_NONSTANDARD is not set 686# CONFIG_SERIAL_NONSTANDARD is not set
687# CONFIG_NOZOMI is not set
653 688
654# 689#
655# Serial drivers 690# Serial drivers
@@ -668,49 +703,53 @@ CONFIG_UNIX98_PTYS=y
668CONFIG_LEGACY_PTYS=y 703CONFIG_LEGACY_PTYS=y
669CONFIG_LEGACY_PTY_COUNT=256 704CONFIG_LEGACY_PTY_COUNT=256
670# CONFIG_IPMI_HANDLER is not set 705# CONFIG_IPMI_HANDLER is not set
671# CONFIG_WATCHDOG is not set
672# CONFIG_HW_RANDOM is not set 706# CONFIG_HW_RANDOM is not set
673# CONFIG_RTC is not set
674# CONFIG_R3964 is not set 707# CONFIG_R3964 is not set
675# CONFIG_APPLICOM is not set 708# CONFIG_APPLICOM is not set
676# CONFIG_GPIO_TB0219 is not set 709# CONFIG_GPIO_TB0219 is not set
677# CONFIG_DRM is not set
678CONFIG_GPIO_VR41XX=y 710CONFIG_GPIO_VR41XX=y
679# CONFIG_RAW_DRIVER is not set 711# CONFIG_RAW_DRIVER is not set
680# CONFIG_TCG_TPM is not set 712# CONFIG_TCG_TPM is not set
681CONFIG_DEVPORT=y 713CONFIG_DEVPORT=y
682# CONFIG_I2C is not set 714# CONFIG_I2C is not set
683
684#
685# SPI support
686#
687# CONFIG_SPI is not set 715# CONFIG_SPI is not set
688# CONFIG_SPI_MASTER is not set
689# CONFIG_W1 is not set 716# CONFIG_W1 is not set
690# CONFIG_POWER_SUPPLY is not set 717# CONFIG_POWER_SUPPLY is not set
691# CONFIG_HWMON is not set 718# CONFIG_HWMON is not set
719# CONFIG_THERMAL is not set
720# CONFIG_WATCHDOG is not set
721
722#
723# Sonics Silicon Backplane
724#
725CONFIG_SSB_POSSIBLE=y
726# CONFIG_SSB is not set
692 727
693# 728#
694# Multifunction device drivers 729# Multifunction device drivers
695# 730#
696CONFIG_MFD_SM501=y 731CONFIG_MFD_SM501=y
732# CONFIG_HTC_PASIC3 is not set
697 733
698# 734#
699# Multimedia devices 735# Multimedia devices
700# 736#
737
738#
739# Multimedia core support
740#
701# CONFIG_VIDEO_DEV is not set 741# CONFIG_VIDEO_DEV is not set
702# CONFIG_DVB_CORE is not set 742# CONFIG_DVB_CORE is not set
703# CONFIG_DAB is not set
704 743
705# 744#
706# Graphics support 745# Multimedia drivers
707# 746#
708# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 747# CONFIG_DAB is not set
709 748
710# 749#
711# Display device support 750# Graphics support
712# 751#
713# CONFIG_DISPLAY_SUPPORT is not set 752# CONFIG_DRM is not set
714# CONFIG_VGASTATE is not set 753# CONFIG_VGASTATE is not set
715CONFIG_VIDEO_OUTPUT_CONTROL=m 754CONFIG_VIDEO_OUTPUT_CONTROL=m
716CONFIG_FB=y 755CONFIG_FB=y
@@ -719,9 +758,11 @@ CONFIG_FB=y
719CONFIG_FB_CFB_FILLRECT=y 758CONFIG_FB_CFB_FILLRECT=y
720CONFIG_FB_CFB_COPYAREA=y 759CONFIG_FB_CFB_COPYAREA=y
721CONFIG_FB_CFB_IMAGEBLIT=y 760CONFIG_FB_CFB_IMAGEBLIT=y
761# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
722# CONFIG_FB_SYS_FILLRECT is not set 762# CONFIG_FB_SYS_FILLRECT is not set
723# CONFIG_FB_SYS_COPYAREA is not set 763# CONFIG_FB_SYS_COPYAREA is not set
724# CONFIG_FB_SYS_IMAGEBLIT is not set 764# CONFIG_FB_SYS_IMAGEBLIT is not set
765# CONFIG_FB_FOREIGN_ENDIAN is not set
725# CONFIG_FB_SYS_FOPS is not set 766# CONFIG_FB_SYS_FOPS is not set
726CONFIG_FB_DEFERRED_IO=y 767CONFIG_FB_DEFERRED_IO=y
727# CONFIG_FB_SVGALIB is not set 768# CONFIG_FB_SVGALIB is not set
@@ -757,7 +798,14 @@ CONFIG_FB_DEFERRED_IO=y
757# CONFIG_FB_ARK is not set 798# CONFIG_FB_ARK is not set
758# CONFIG_FB_PM3 is not set 799# CONFIG_FB_PM3 is not set
759CONFIG_FB_SM501=y 800CONFIG_FB_SM501=y
801# CONFIG_FB_COBALT is not set
760# CONFIG_FB_VIRTUAL is not set 802# CONFIG_FB_VIRTUAL is not set
803# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
804
805#
806# Display device support
807#
808# CONFIG_DISPLAY_SUPPORT is not set
761 809
762# 810#
763# Console display driver support 811# Console display driver support
@@ -787,6 +835,7 @@ CONFIG_FONT_8x16=y
787CONFIG_HID_SUPPORT=y 835CONFIG_HID_SUPPORT=y
788CONFIG_HID=y 836CONFIG_HID=y
789# CONFIG_HID_DEBUG is not set 837# CONFIG_HID_DEBUG is not set
838# CONFIG_HIDRAW is not set
790 839
791# 840#
792# USB Input Devices 841# USB Input Devices
@@ -807,6 +856,7 @@ CONFIG_USB_ARCH_HAS_OHCI=y
807CONFIG_USB_ARCH_HAS_EHCI=y 856CONFIG_USB_ARCH_HAS_EHCI=y
808CONFIG_USB=m 857CONFIG_USB=m
809# CONFIG_USB_DEBUG is not set 858# CONFIG_USB_DEBUG is not set
859# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
810 860
811# 861#
812# Miscellaneous USB options 862# Miscellaneous USB options
@@ -815,15 +865,18 @@ CONFIG_USB=m
815CONFIG_USB_DEVICE_CLASS=y 865CONFIG_USB_DEVICE_CLASS=y
816# CONFIG_USB_DYNAMIC_MINORS is not set 866# CONFIG_USB_DYNAMIC_MINORS is not set
817# CONFIG_USB_OTG is not set 867# CONFIG_USB_OTG is not set
868# CONFIG_USB_OTG_WHITELIST is not set
869# CONFIG_USB_OTG_BLACKLIST_HUB is not set
818 870
819# 871#
820# USB Host Controller Drivers 872# USB Host Controller Drivers
821# 873#
874# CONFIG_USB_C67X00_HCD is not set
822CONFIG_USB_EHCI_HCD=m 875CONFIG_USB_EHCI_HCD=m
823# CONFIG_USB_EHCI_SPLIT_ISO is not set
824# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 876# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
825# CONFIG_USB_EHCI_TT_NEWSCHED is not set 877# CONFIG_USB_EHCI_TT_NEWSCHED is not set
826# CONFIG_USB_ISP116X_HCD is not set 878# CONFIG_USB_ISP116X_HCD is not set
879# CONFIG_USB_ISP1760_HCD is not set
827CONFIG_USB_OHCI_HCD=m 880CONFIG_USB_OHCI_HCD=m
828# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 881# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
829# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set 882# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
@@ -849,13 +902,16 @@ CONFIG_USB_STORAGE=m
849# CONFIG_USB_STORAGE_DEBUG is not set 902# CONFIG_USB_STORAGE_DEBUG is not set
850# CONFIG_USB_STORAGE_DATAFAB is not set 903# CONFIG_USB_STORAGE_DATAFAB is not set
851# CONFIG_USB_STORAGE_FREECOM is not set 904# CONFIG_USB_STORAGE_FREECOM is not set
905# CONFIG_USB_STORAGE_ISD200 is not set
852# CONFIG_USB_STORAGE_DPCM is not set 906# CONFIG_USB_STORAGE_DPCM is not set
853# CONFIG_USB_STORAGE_USBAT is not set 907# CONFIG_USB_STORAGE_USBAT is not set
854# CONFIG_USB_STORAGE_SDDR09 is not set 908# CONFIG_USB_STORAGE_SDDR09 is not set
855# CONFIG_USB_STORAGE_SDDR55 is not set 909# CONFIG_USB_STORAGE_SDDR55 is not set
856# CONFIG_USB_STORAGE_JUMPSHOT is not set 910# CONFIG_USB_STORAGE_JUMPSHOT is not set
857# CONFIG_USB_STORAGE_ALAUDA is not set 911# CONFIG_USB_STORAGE_ALAUDA is not set
912# CONFIG_USB_STORAGE_ONETOUCH is not set
858# CONFIG_USB_STORAGE_KARMA is not set 913# CONFIG_USB_STORAGE_KARMA is not set
914# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
859# CONFIG_USB_LIBUSUAL is not set 915# CONFIG_USB_LIBUSUAL is not set
860 916
861# 917#
@@ -868,10 +924,6 @@ CONFIG_USB_MON=y
868# 924#
869# USB port drivers 925# USB port drivers
870# 926#
871
872#
873# USB Serial Converter support
874#
875# CONFIG_USB_SERIAL is not set 927# CONFIG_USB_SERIAL is not set
876 928
877# 929#
@@ -896,36 +948,14 @@ CONFIG_USB_MON=y
896# CONFIG_USB_LD is not set 948# CONFIG_USB_LD is not set
897# CONFIG_USB_TRANCEVIBRATOR is not set 949# CONFIG_USB_TRANCEVIBRATOR is not set
898# CONFIG_USB_IOWARRIOR is not set 950# CONFIG_USB_IOWARRIOR is not set
899
900#
901# USB DSL modem support
902#
903
904#
905# USB Gadget Support
906#
907# CONFIG_USB_GADGET is not set 951# CONFIG_USB_GADGET is not set
908# CONFIG_MMC is not set 952# CONFIG_MMC is not set
953# CONFIG_MEMSTICK is not set
909# CONFIG_NEW_LEDS is not set 954# CONFIG_NEW_LEDS is not set
955# CONFIG_ACCESSIBILITY is not set
910# CONFIG_INFINIBAND is not set 956# CONFIG_INFINIBAND is not set
957CONFIG_RTC_LIB=y
911# CONFIG_RTC_CLASS is not set 958# CONFIG_RTC_CLASS is not set
912
913#
914# DMA Engine support
915#
916# CONFIG_DMA_ENGINE is not set
917
918#
919# DMA Clients
920#
921
922#
923# DMA Devices
924#
925
926#
927# Userspace I/O
928#
929# CONFIG_UIO is not set 959# CONFIG_UIO is not set
930 960
931# 961#
@@ -940,25 +970,21 @@ CONFIG_EXT3_FS_XATTR=y
940# CONFIG_EXT3_FS_SECURITY is not set 970# CONFIG_EXT3_FS_SECURITY is not set
941# CONFIG_EXT4DEV_FS is not set 971# CONFIG_EXT4DEV_FS is not set
942CONFIG_JBD=y 972CONFIG_JBD=y
943# CONFIG_JBD_DEBUG is not set
944CONFIG_FS_MBCACHE=y 973CONFIG_FS_MBCACHE=y
945# CONFIG_REISERFS_FS is not set 974# CONFIG_REISERFS_FS is not set
946# CONFIG_JFS_FS is not set 975# CONFIG_JFS_FS is not set
947CONFIG_FS_POSIX_ACL=y 976CONFIG_FS_POSIX_ACL=y
948CONFIG_XFS_FS=y 977CONFIG_XFS_FS=y
949CONFIG_XFS_QUOTA=y 978CONFIG_XFS_QUOTA=y
950# CONFIG_XFS_SECURITY is not set
951CONFIG_XFS_POSIX_ACL=y 979CONFIG_XFS_POSIX_ACL=y
952# CONFIG_XFS_RT is not set 980# CONFIG_XFS_RT is not set
953# CONFIG_GFS2_FS is not set 981# CONFIG_XFS_DEBUG is not set
954# CONFIG_OCFS2_FS is not set 982# CONFIG_OCFS2_FS is not set
955# CONFIG_MINIX_FS is not set 983CONFIG_DNOTIFY=y
956CONFIG_ROMFS_FS=m
957CONFIG_INOTIFY=y 984CONFIG_INOTIFY=y
958CONFIG_INOTIFY_USER=y 985CONFIG_INOTIFY_USER=y
959# CONFIG_QUOTA is not set 986# CONFIG_QUOTA is not set
960CONFIG_QUOTACTL=y 987CONFIG_QUOTACTL=y
961CONFIG_DNOTIFY=y
962# CONFIG_AUTOFS_FS is not set 988# CONFIG_AUTOFS_FS is not set
963CONFIG_AUTOFS4_FS=y 989CONFIG_AUTOFS4_FS=y
964# CONFIG_FUSE_FS is not set 990# CONFIG_FUSE_FS is not set
@@ -987,7 +1013,6 @@ CONFIG_SYSFS=y
987CONFIG_TMPFS=y 1013CONFIG_TMPFS=y
988CONFIG_TMPFS_POSIX_ACL=y 1014CONFIG_TMPFS_POSIX_ACL=y
989# CONFIG_HUGETLB_PAGE is not set 1015# CONFIG_HUGETLB_PAGE is not set
990CONFIG_RAMFS=y
991# CONFIG_CONFIGFS_FS is not set 1016# CONFIG_CONFIGFS_FS is not set
992 1017
993# 1018#
@@ -1002,24 +1027,21 @@ CONFIG_RAMFS=y
1002# CONFIG_EFS_FS is not set 1027# CONFIG_EFS_FS is not set
1003CONFIG_CRAMFS=m 1028CONFIG_CRAMFS=m
1004# CONFIG_VXFS_FS is not set 1029# CONFIG_VXFS_FS is not set
1030# CONFIG_MINIX_FS is not set
1005# CONFIG_HPFS_FS is not set 1031# CONFIG_HPFS_FS is not set
1006# CONFIG_QNX4FS_FS is not set 1032# CONFIG_QNX4FS_FS is not set
1033CONFIG_ROMFS_FS=m
1007# CONFIG_SYSV_FS is not set 1034# CONFIG_SYSV_FS is not set
1008# CONFIG_UFS_FS is not set 1035# CONFIG_UFS_FS is not set
1009 1036CONFIG_NETWORK_FILESYSTEMS=y
1010#
1011# Network File Systems
1012#
1013CONFIG_NFS_FS=y 1037CONFIG_NFS_FS=y
1014CONFIG_NFS_V3=y 1038CONFIG_NFS_V3=y
1015# CONFIG_NFS_V3_ACL is not set 1039# CONFIG_NFS_V3_ACL is not set
1016# CONFIG_NFS_V4 is not set 1040# CONFIG_NFS_V4 is not set
1017# CONFIG_NFS_DIRECTIO is not set
1018CONFIG_NFSD=m 1041CONFIG_NFSD=m
1019CONFIG_NFSD_V3=y 1042CONFIG_NFSD_V3=y
1020# CONFIG_NFSD_V3_ACL is not set 1043# CONFIG_NFSD_V3_ACL is not set
1021# CONFIG_NFSD_V4 is not set 1044# CONFIG_NFSD_V4 is not set
1022CONFIG_NFSD_TCP=y
1023CONFIG_ROOT_NFS=y 1045CONFIG_ROOT_NFS=y
1024CONFIG_LOCKD=y 1046CONFIG_LOCKD=y
1025CONFIG_LOCKD_V4=y 1047CONFIG_LOCKD_V4=y
@@ -1040,47 +1062,38 @@ CONFIG_SUNRPC=y
1040# 1062#
1041# CONFIG_PARTITION_ADVANCED is not set 1063# CONFIG_PARTITION_ADVANCED is not set
1042CONFIG_MSDOS_PARTITION=y 1064CONFIG_MSDOS_PARTITION=y
1043
1044#
1045# Native Language Support
1046#
1047# CONFIG_NLS is not set 1065# CONFIG_NLS is not set
1048
1049#
1050# Distributed Lock Manager
1051#
1052# CONFIG_DLM is not set 1066# CONFIG_DLM is not set
1053 1067
1054# 1068#
1055# Profiling support
1056#
1057# CONFIG_PROFILING is not set
1058
1059#
1060# Kernel hacking 1069# Kernel hacking
1061# 1070#
1062CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1071CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1063# CONFIG_PRINTK_TIME is not set 1072# CONFIG_PRINTK_TIME is not set
1073CONFIG_ENABLE_WARN_DEPRECATED=y
1064CONFIG_ENABLE_MUST_CHECK=y 1074CONFIG_ENABLE_MUST_CHECK=y
1075CONFIG_FRAME_WARN=1024
1065# CONFIG_MAGIC_SYSRQ is not set 1076# CONFIG_MAGIC_SYSRQ is not set
1066# CONFIG_UNUSED_SYMBOLS is not set 1077# CONFIG_UNUSED_SYMBOLS is not set
1067# CONFIG_DEBUG_FS is not set 1078# CONFIG_DEBUG_FS is not set
1068# CONFIG_HEADERS_CHECK is not set 1079# CONFIG_HEADERS_CHECK is not set
1069# CONFIG_DEBUG_KERNEL is not set 1080# CONFIG_DEBUG_KERNEL is not set
1070CONFIG_CROSSCOMPILE=y 1081# CONFIG_SAMPLES is not set
1071CONFIG_CMDLINE="mem=64M console=ttyVR0,115200 ip=any root=/dev/nfs" 1082CONFIG_CMDLINE="cca=3 mem=64M console=ttyVR0,115200 ip=any root=/dev/nfs"
1072 1083
1073# 1084#
1074# Security options 1085# Security options
1075# 1086#
1076# CONFIG_KEYS is not set 1087# CONFIG_KEYS is not set
1077# CONFIG_SECURITY is not set 1088# CONFIG_SECURITY is not set
1089# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1078# CONFIG_CRYPTO is not set 1090# CONFIG_CRYPTO is not set
1079 1091
1080# 1092#
1081# Library routines 1093# Library routines
1082# 1094#
1083CONFIG_BITREVERSE=y 1095CONFIG_BITREVERSE=y
1096# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1084CONFIG_CRC_CCITT=y 1097CONFIG_CRC_CCITT=y
1085# CONFIG_CRC16 is not set 1098# CONFIG_CRC16 is not set
1086# CONFIG_CRC_ITU_T is not set 1099# CONFIG_CRC_ITU_T is not set
diff --git a/arch/mips/fw/arc/identify.c b/arch/mips/fw/arc/identify.c
index 28dfd2e2989a..23066985a734 100644
--- a/arch/mips/fw/arc/identify.c
+++ b/arch/mips/fw/arc/identify.c
@@ -67,6 +67,11 @@ static struct smatch mach_table[] = {
67 .liname = "SNI RM200_PCI", 67 .liname = "SNI RM200_PCI",
68 .type = MACH_SNI_RM200_PCI, 68 .type = MACH_SNI_RM200_PCI,
69 .flags = PROM_FLAG_DONT_FREE_TEMP, 69 .flags = PROM_FLAG_DONT_FREE_TEMP,
70 }, {
71 .arcname = "RM200PCI-R5K",
72 .liname = "SNI RM200_PCI-R5K",
73 .type = MACH_SNI_RM200_PCI,
74 .flags = PROM_FLAG_DONT_FREE_TEMP,
70 } 75 }
71}; 76};
72 77
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
index cc0244036aec..65e46a6d4178 100644
--- a/arch/mips/kernel/Makefile
+++ b/arch/mips/kernel/Makefile
@@ -30,7 +30,6 @@ obj-$(CONFIG_CPU_LOONGSON2) += r4k_fpu.o r4k_switch.o
30obj-$(CONFIG_CPU_MIPS32) += r4k_fpu.o r4k_switch.o 30obj-$(CONFIG_CPU_MIPS32) += r4k_fpu.o r4k_switch.o
31obj-$(CONFIG_CPU_MIPS64) += r4k_fpu.o r4k_switch.o 31obj-$(CONFIG_CPU_MIPS64) += r4k_fpu.o r4k_switch.o
32obj-$(CONFIG_CPU_R3000) += r2300_fpu.o r2300_switch.o 32obj-$(CONFIG_CPU_R3000) += r2300_fpu.o r2300_switch.o
33obj-$(CONFIG_CPU_R4000) += r4k_fpu.o r4k_switch.o
34obj-$(CONFIG_CPU_R4300) += r4k_fpu.o r4k_switch.o 33obj-$(CONFIG_CPU_R4300) += r4k_fpu.o r4k_switch.o
35obj-$(CONFIG_CPU_R4X00) += r4k_fpu.o r4k_switch.o 34obj-$(CONFIG_CPU_R4X00) += r4k_fpu.o r4k_switch.o
36obj-$(CONFIG_CPU_R5000) += r4k_fpu.o r4k_switch.o 35obj-$(CONFIG_CPU_R5000) += r4k_fpu.o r4k_switch.o
diff --git a/arch/mips/kernel/cevt-txx9.c b/arch/mips/kernel/cevt-txx9.c
index 795cb8fb0d74..b5fc4eb412d2 100644
--- a/arch/mips/kernel/cevt-txx9.c
+++ b/arch/mips/kernel/cevt-txx9.c
@@ -161,6 +161,9 @@ void __init txx9_tmr_init(unsigned long baseaddr)
161 struct txx9_tmr_reg __iomem *tmrptr; 161 struct txx9_tmr_reg __iomem *tmrptr;
162 162
163 tmrptr = ioremap(baseaddr, sizeof(struct txx9_tmr_reg)); 163 tmrptr = ioremap(baseaddr, sizeof(struct txx9_tmr_reg));
164 /* Start once to make CounterResetEnable effective */
165 __raw_writel(TXx9_TMTCR_CRE | TXx9_TMTCR_TCE, &tmrptr->tcr);
166 /* Stop and reset the counter */
164 __raw_writel(TXx9_TMTCR_CRE, &tmrptr->tcr); 167 __raw_writel(TXx9_TMTCR_CRE, &tmrptr->tcr);
165 __raw_writel(0, &tmrptr->tisr); 168 __raw_writel(0, &tmrptr->tisr);
166 __raw_writel(0xffffffff, &tmrptr->cpra); 169 __raw_writel(0xffffffff, &tmrptr->cpra);
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index 63370cdd3c90..cdf87a9dd4ba 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -216,6 +216,7 @@ int smp_call_function(void (*func) (void *info), void *info, int retry,
216{ 216{
217 return smp_call_function_mask(cpu_online_map, func, info, retry, wait); 217 return smp_call_function_mask(cpu_online_map, func, info, retry, wait);
218} 218}
219EXPORT_SYMBOL(smp_call_function);
219 220
220void smp_call_function_interrupt(void) 221void smp_call_function_interrupt(void)
221{ 222{
@@ -271,6 +272,7 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
271 put_cpu(); 272 put_cpu();
272 return 0; 273 return 0;
273} 274}
275EXPORT_SYMBOL(smp_call_function_single);
274 276
275static void stop_this_cpu(void *dummy) 277static void stop_this_cpu(void *dummy)
276{ 278{
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index cb8b0e2c7954..f9165d1a17bf 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -88,15 +88,17 @@ static void show_raw_backtrace(unsigned long reg29)
88#ifdef CONFIG_KALLSYMS 88#ifdef CONFIG_KALLSYMS
89 printk("\n"); 89 printk("\n");
90#endif 90#endif
91#define IS_KVA01(a) ((((unsigned int)a) & 0xc0000000) == 0x80000000) 91 while (!kstack_end(sp)) {
92 if (IS_KVA01(sp)) { 92 unsigned long __user *p =
93 while (!kstack_end(sp)) { 93 (unsigned long __user *)(unsigned long)sp++;
94 addr = *sp++; 94 if (__get_user(addr, p)) {
95 if (__kernel_text_address(addr)) 95 printk(" (Bad stack address)");
96 print_ip_sym(addr); 96 break;
97 } 97 }
98 printk("\n"); 98 if (__kernel_text_address(addr))
99 print_ip_sym(addr);
99 } 100 }
101 printk("\n");
100} 102}
101 103
102#ifdef CONFIG_KALLSYMS 104#ifdef CONFIG_KALLSYMS
diff --git a/arch/mips/lasat/interrupt.c b/arch/mips/lasat/interrupt.c
index cfeab669782f..a56c15026965 100644
--- a/arch/mips/lasat/interrupt.c
+++ b/arch/mips/lasat/interrupt.c
@@ -34,11 +34,13 @@ static volatile int lasat_int_mask_shift;
34 34
35void disable_lasat_irq(unsigned int irq_nr) 35void disable_lasat_irq(unsigned int irq_nr)
36{ 36{
37 irq_nr -= LASAT_IRQ_BASE;
37 *lasat_int_mask &= ~(1 << irq_nr) << lasat_int_mask_shift; 38 *lasat_int_mask &= ~(1 << irq_nr) << lasat_int_mask_shift;
38} 39}
39 40
40void enable_lasat_irq(unsigned int irq_nr) 41void enable_lasat_irq(unsigned int irq_nr)
41{ 42{
43 irq_nr -= LASAT_IRQ_BASE;
42 *lasat_int_mask |= (1 << irq_nr) << lasat_int_mask_shift; 44 *lasat_int_mask |= (1 << irq_nr) << lasat_int_mask_shift;
43} 45}
44 46
diff --git a/arch/mips/lasat/lasat_board.c b/arch/mips/lasat/lasat_board.c
index ec2f658c3709..31e328b3814d 100644
--- a/arch/mips/lasat/lasat_board.c
+++ b/arch/mips/lasat/lasat_board.c
@@ -23,18 +23,19 @@
23#include <linux/kernel.h> 23#include <linux/kernel.h>
24#include <linux/string.h> 24#include <linux/string.h>
25#include <linux/ctype.h> 25#include <linux/ctype.h>
26#include <linux/mutex.h>
26#include <asm/bootinfo.h> 27#include <asm/bootinfo.h>
27#include <asm/addrspace.h> 28#include <asm/addrspace.h>
28#include "at93c.h" 29#include "at93c.h"
29/* New model description table */ 30/* New model description table */
30#include "lasat_models.h" 31#include "lasat_models.h"
31 32
33static DEFINE_MUTEX(lasat_eeprom_mutex);
34
32#define EEPROM_CRC(data, len) (~crc32(~0, data, len)) 35#define EEPROM_CRC(data, len) (~crc32(~0, data, len))
33 36
34struct lasat_info lasat_board_info; 37struct lasat_info lasat_board_info;
35 38
36void update_bcastaddr(void);
37
38int EEPROMRead(unsigned int pos, unsigned char *data, int len) 39int EEPROMRead(unsigned int pos, unsigned char *data, int len)
39{ 40{
40 int i; 41 int i;
@@ -258,10 +259,6 @@ int lasat_init_board_info(void)
258 sprintf(lasat_board_info.li_typestr, "%d", 10 * c); 259 sprintf(lasat_board_info.li_typestr, "%d", 10 * c);
259 } 260 }
260 261
261#if defined(CONFIG_INET) && defined(CONFIG_SYSCTL)
262 update_bcastaddr();
263#endif
264
265 return 0; 262 return 0;
266} 263}
267 264
@@ -269,6 +266,8 @@ void lasat_write_eeprom_info(void)
269{ 266{
270 unsigned long crc; 267 unsigned long crc;
271 268
269 mutex_lock(&lasat_eeprom_mutex);
270
272 /* Generate the CRC */ 271 /* Generate the CRC */
273 crc = EEPROM_CRC((unsigned char *)(&lasat_board_info.li_eeprom_info), 272 crc = EEPROM_CRC((unsigned char *)(&lasat_board_info.li_eeprom_info),
274 sizeof(struct lasat_eeprom_struct) - 4); 273 sizeof(struct lasat_eeprom_struct) - 4);
@@ -277,4 +276,6 @@ void lasat_write_eeprom_info(void)
277 /* Write the EEPROM info */ 276 /* Write the EEPROM info */
278 EEPROMWrite(0, (unsigned char *)&lasat_board_info.li_eeprom_info, 277 EEPROMWrite(0, (unsigned char *)&lasat_board_info.li_eeprom_info,
279 sizeof(struct lasat_eeprom_struct)); 278 sizeof(struct lasat_eeprom_struct));
279
280 mutex_unlock(&lasat_eeprom_mutex);
280} 281}
diff --git a/arch/mips/lasat/sysctl.c b/arch/mips/lasat/sysctl.c
index 389336c4ecc5..866881ec0cf8 100644
--- a/arch/mips/lasat/sysctl.c
+++ b/arch/mips/lasat/sysctl.c
@@ -29,15 +29,13 @@
29#include <linux/string.h> 29#include <linux/string.h>
30#include <linux/net.h> 30#include <linux/net.h>
31#include <linux/inet.h> 31#include <linux/inet.h>
32#include <linux/mutex.h>
33#include <linux/uaccess.h> 32#include <linux/uaccess.h>
34 33
35#include <asm/time.h> 34#include <asm/time.h>
36 35
37#include "sysctl.h" 36#ifdef CONFIG_DS1603
38#include "ds1603.h" 37#include "ds1603.h"
39 38#endif
40static DEFINE_MUTEX(lasat_info_mutex);
41 39
42/* Strategy function to write EEPROM after changing string entry */ 40/* Strategy function to write EEPROM after changing string entry */
43int sysctl_lasatstring(ctl_table *table, int *name, int nlen, 41int sysctl_lasatstring(ctl_table *table, int *name, int nlen,
@@ -46,18 +44,15 @@ int sysctl_lasatstring(ctl_table *table, int *name, int nlen,
46{ 44{
47 int r; 45 int r;
48 46
49 mutex_lock(&lasat_info_mutex);
50 r = sysctl_string(table, name, 47 r = sysctl_string(table, name,
51 nlen, oldval, oldlenp, newval, newlen); 48 nlen, oldval, oldlenp, newval, newlen);
52 if (r < 0) { 49 if (r < 0)
53 mutex_unlock(&lasat_info_mutex);
54 return r; 50 return r;
55 } 51
56 if (newval && newlen) 52 if (newval && newlen)
57 lasat_write_eeprom_info(); 53 lasat_write_eeprom_info();
58 mutex_unlock(&lasat_info_mutex);
59 54
60 return 1; 55 return 0;
61} 56}
62 57
63 58
@@ -67,14 +62,11 @@ int proc_dolasatstring(ctl_table *table, int write, struct file *filp,
67{ 62{
68 int r; 63 int r;
69 64
70 mutex_lock(&lasat_info_mutex);
71 r = proc_dostring(table, write, filp, buffer, lenp, ppos); 65 r = proc_dostring(table, write, filp, buffer, lenp, ppos);
72 if ((!write) || r) { 66 if ((!write) || r)
73 mutex_unlock(&lasat_info_mutex);
74 return r; 67 return r;
75 } 68
76 lasat_write_eeprom_info(); 69 lasat_write_eeprom_info();
77 mutex_unlock(&lasat_info_mutex);
78 70
79 return 0; 71 return 0;
80} 72}
@@ -85,28 +77,24 @@ int proc_dolasatint(ctl_table *table, int write, struct file *filp,
85{ 77{
86 int r; 78 int r;
87 79
88 mutex_lock(&lasat_info_mutex);
89 r = proc_dointvec(table, write, filp, buffer, lenp, ppos); 80 r = proc_dointvec(table, write, filp, buffer, lenp, ppos);
90 if ((!write) || r) { 81 if ((!write) || r)
91 mutex_unlock(&lasat_info_mutex);
92 return r; 82 return r;
93 } 83
94 lasat_write_eeprom_info(); 84 lasat_write_eeprom_info();
95 mutex_unlock(&lasat_info_mutex);
96 85
97 return 0; 86 return 0;
98} 87}
99 88
89#ifdef CONFIG_DS1603
100static int rtctmp; 90static int rtctmp;
101 91
102#ifdef CONFIG_DS1603
103/* proc function to read/write RealTime Clock */ 92/* proc function to read/write RealTime Clock */
104int proc_dolasatrtc(ctl_table *table, int write, struct file *filp, 93int proc_dolasatrtc(ctl_table *table, int write, struct file *filp,
105 void *buffer, size_t *lenp, loff_t *ppos) 94 void *buffer, size_t *lenp, loff_t *ppos)
106{ 95{
107 int r; 96 int r;
108 97
109 mutex_lock(&lasat_info_mutex);
110 if (!write) { 98 if (!write) {
111 rtctmp = read_persistent_clock(); 99 rtctmp = read_persistent_clock();
112 /* check for time < 0 and set to 0 */ 100 /* check for time < 0 and set to 0 */
@@ -114,12 +102,11 @@ int proc_dolasatrtc(ctl_table *table, int write, struct file *filp,
114 rtctmp = 0; 102 rtctmp = 0;
115 } 103 }
116 r = proc_dointvec(table, write, filp, buffer, lenp, ppos); 104 r = proc_dointvec(table, write, filp, buffer, lenp, ppos);
117 if ((!write) || r) { 105 if (r)
118 mutex_unlock(&lasat_info_mutex);
119 return r; 106 return r;
120 } 107
121 rtc_mips_set_mmss(rtctmp); 108 if (write)
122 mutex_unlock(&lasat_info_mutex); 109 rtc_mips_set_mmss(rtctmp);
123 110
124 return 0; 111 return 0;
125} 112}
@@ -132,17 +119,14 @@ int sysctl_lasat_intvec(ctl_table *table, int *name, int nlen,
132{ 119{
133 int r; 120 int r;
134 121
135 mutex_lock(&lasat_info_mutex);
136 r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen); 122 r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen);
137 if (r < 0) { 123 if (r < 0)
138 mutex_unlock(&lasat_info_mutex);
139 return r; 124 return r;
140 } 125
141 if (newval && newlen) 126 if (newval && newlen)
142 lasat_write_eeprom_info(); 127 lasat_write_eeprom_info();
143 mutex_unlock(&lasat_info_mutex);
144 128
145 return 1; 129 return 0;
146} 130}
147 131
148#ifdef CONFIG_DS1603 132#ifdef CONFIG_DS1603
@@ -153,50 +137,27 @@ int sysctl_lasat_rtc(ctl_table *table, int *name, int nlen,
153{ 137{
154 int r; 138 int r;
155 139
156 mutex_lock(&lasat_info_mutex);
157 rtctmp = read_persistent_clock(); 140 rtctmp = read_persistent_clock();
158 if (rtctmp < 0) 141 if (rtctmp < 0)
159 rtctmp = 0; 142 rtctmp = 0;
160 r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen); 143 r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen);
161 if (r < 0) { 144 if (r < 0)
162 mutex_unlock(&lasat_info_mutex);
163 return r; 145 return r;
164 }
165 if (newval && newlen) 146 if (newval && newlen)
166 rtc_mips_set_mmss(rtctmp); 147 rtc_mips_set_mmss(rtctmp);
167 mutex_unlock(&lasat_info_mutex);
168 148
169 return 1; 149 return r;
170} 150}
171#endif 151#endif
172 152
173#ifdef CONFIG_INET 153#ifdef CONFIG_INET
174static char lasat_bcastaddr[16];
175
176void update_bcastaddr(void)
177{
178 unsigned int ip;
179
180 ip = (lasat_board_info.li_eeprom_info.ipaddr &
181 lasat_board_info.li_eeprom_info.netmask) |
182 ~lasat_board_info.li_eeprom_info.netmask;
183
184 sprintf(lasat_bcastaddr, "%d.%d.%d.%d",
185 (ip) & 0xff,
186 (ip >> 8) & 0xff,
187 (ip >> 16) & 0xff,
188 (ip >> 24) & 0xff);
189}
190
191static char proc_lasat_ipbuf[32];
192
193/* Parsing of IP address */
194int proc_lasat_ip(ctl_table *table, int write, struct file *filp, 154int proc_lasat_ip(ctl_table *table, int write, struct file *filp,
195 void *buffer, size_t *lenp, loff_t *ppos) 155 void *buffer, size_t *lenp, loff_t *ppos)
196{ 156{
197 unsigned int ip; 157 unsigned int ip;
198 char *p, c; 158 char *p, c;
199 int len; 159 int len;
160 char ipbuf[32];
200 161
201 if (!table->data || !table->maxlen || !*lenp || 162 if (!table->data || !table->maxlen || !*lenp ||
202 (*ppos && !write)) { 163 (*ppos && !write)) {
@@ -204,117 +165,88 @@ int proc_lasat_ip(ctl_table *table, int write, struct file *filp,
204 return 0; 165 return 0;
205 } 166 }
206 167
207 mutex_lock(&lasat_info_mutex);
208 if (write) { 168 if (write) {
209 len = 0; 169 len = 0;
210 p = buffer; 170 p = buffer;
211 while (len < *lenp) { 171 while (len < *lenp) {
212 if (get_user(c, p++)) { 172 if (get_user(c, p++))
213 mutex_unlock(&lasat_info_mutex);
214 return -EFAULT; 173 return -EFAULT;
215 }
216 if (c == 0 || c == '\n') 174 if (c == 0 || c == '\n')
217 break; 175 break;
218 len++; 176 len++;
219 } 177 }
220 if (len >= sizeof(proc_lasat_ipbuf)-1) 178 if (len >= sizeof(ipbuf)-1)
221 len = sizeof(proc_lasat_ipbuf) - 1; 179 len = sizeof(ipbuf) - 1;
222 if (copy_from_user(proc_lasat_ipbuf, buffer, len)) { 180 if (copy_from_user(ipbuf, buffer, len))
223 mutex_unlock(&lasat_info_mutex);
224 return -EFAULT; 181 return -EFAULT;
225 } 182 ipbuf[len] = 0;
226 proc_lasat_ipbuf[len] = 0;
227 *ppos += *lenp; 183 *ppos += *lenp;
228 /* Now see if we can convert it to a valid IP */ 184 /* Now see if we can convert it to a valid IP */
229 ip = in_aton(proc_lasat_ipbuf); 185 ip = in_aton(ipbuf);
230 *(unsigned int *)(table->data) = ip; 186 *(unsigned int *)(table->data) = ip;
231 lasat_write_eeprom_info(); 187 lasat_write_eeprom_info();
232 } else { 188 } else {
233 ip = *(unsigned int *)(table->data); 189 ip = *(unsigned int *)(table->data);
234 sprintf(proc_lasat_ipbuf, "%d.%d.%d.%d", 190 sprintf(ipbuf, "%d.%d.%d.%d",
235 (ip) & 0xff, 191 (ip) & 0xff,
236 (ip >> 8) & 0xff, 192 (ip >> 8) & 0xff,
237 (ip >> 16) & 0xff, 193 (ip >> 16) & 0xff,
238 (ip >> 24) & 0xff); 194 (ip >> 24) & 0xff);
239 len = strlen(proc_lasat_ipbuf); 195 len = strlen(ipbuf);
240 if (len > *lenp) 196 if (len > *lenp)
241 len = *lenp; 197 len = *lenp;
242 if (len) 198 if (len)
243 if (copy_to_user(buffer, proc_lasat_ipbuf, len)) { 199 if (copy_to_user(buffer, ipbuf, len))
244 mutex_unlock(&lasat_info_mutex);
245 return -EFAULT; 200 return -EFAULT;
246 }
247 if (len < *lenp) { 201 if (len < *lenp) {
248 if (put_user('\n', ((char *) buffer) + len)) { 202 if (put_user('\n', ((char *) buffer) + len))
249 mutex_unlock(&lasat_info_mutex);
250 return -EFAULT; 203 return -EFAULT;
251 }
252 len++; 204 len++;
253 } 205 }
254 *lenp = len; 206 *lenp = len;
255 *ppos += len; 207 *ppos += len;
256 } 208 }
257 update_bcastaddr();
258 mutex_unlock(&lasat_info_mutex);
259 209
260 return 0; 210 return 0;
261} 211}
262#endif /* defined(CONFIG_INET) */ 212#endif
263 213
264static int sysctl_lasat_eeprom_value(ctl_table *table, int *name, int nlen, 214static int sysctl_lasat_prid(ctl_table *table, int *name, int nlen,
265 void *oldval, size_t *oldlenp, 215 void *oldval, size_t *oldlenp,
266 void *newval, size_t newlen) 216 void *newval, size_t newlen)
267{ 217{
268 int r; 218 int r;
269 219
270 mutex_lock(&lasat_info_mutex);
271 r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen); 220 r = sysctl_intvec(table, name, nlen, oldval, oldlenp, newval, newlen);
272 if (r < 0) { 221 if (r < 0)
273 mutex_unlock(&lasat_info_mutex);
274 return r; 222 return r;
275 }
276
277 if (newval && newlen) { 223 if (newval && newlen) {
278 if (name && *name == LASAT_PRID) 224 lasat_board_info.li_eeprom_info.prid = *(int *)newval;
279 lasat_board_info.li_eeprom_info.prid = *(int *)newval;
280
281 lasat_write_eeprom_info(); 225 lasat_write_eeprom_info();
282 lasat_init_board_info(); 226 lasat_init_board_info();
283 } 227 }
284 mutex_unlock(&lasat_info_mutex);
285
286 return 0; 228 return 0;
287} 229}
288 230
289int proc_lasat_eeprom_value(ctl_table *table, int write, struct file *filp, 231int proc_lasat_prid(ctl_table *table, int write, struct file *filp,
290 void *buffer, size_t *lenp, loff_t *ppos) 232 void *buffer, size_t *lenp, loff_t *ppos)
291{ 233{
292 int r; 234 int r;
293 235
294 mutex_lock(&lasat_info_mutex);
295 r = proc_dointvec(table, write, filp, buffer, lenp, ppos); 236 r = proc_dointvec(table, write, filp, buffer, lenp, ppos);
296 if ((!write) || r) { 237 if (r < 0)
297 mutex_unlock(&lasat_info_mutex);
298 return r; 238 return r;
239 if (write) {
240 lasat_board_info.li_eeprom_info.prid =
241 lasat_board_info.li_prid;
242 lasat_write_eeprom_info();
243 lasat_init_board_info();
299 } 244 }
300 if (filp && filp->f_path.dentry) {
301 if (!strcmp(filp->f_path.dentry->d_name.name, "prid"))
302 lasat_board_info.li_eeprom_info.prid =
303 lasat_board_info.li_prid;
304 if (!strcmp(filp->f_path.dentry->d_name.name, "debugaccess"))
305 lasat_board_info.li_eeprom_info.debugaccess =
306 lasat_board_info.li_debugaccess;
307 }
308 lasat_write_eeprom_info();
309 mutex_unlock(&lasat_info_mutex);
310
311 return 0; 245 return 0;
312} 246}
313 247
314extern int lasat_boot_to_service; 248extern int lasat_boot_to_service;
315 249
316#ifdef CONFIG_SYSCTL
317
318static ctl_table lasat_table[] = { 250static ctl_table lasat_table[] = {
319 { 251 {
320 .ctl_name = CTL_UNNUMBERED, 252 .ctl_name = CTL_UNNUMBERED,
@@ -349,8 +281,8 @@ static ctl_table lasat_table[] = {
349 .data = &lasat_board_info.li_prid, 281 .data = &lasat_board_info.li_prid,
350 .maxlen = sizeof(int), 282 .maxlen = sizeof(int),
351 .mode = 0644, 283 .mode = 0644,
352 .proc_handler = &proc_lasat_eeprom_value, 284 .proc_handler = &proc_lasat_prid,
353 .strategy = &sysctl_lasat_eeprom_value 285 .strategy = &sysctl_lasat_prid
354 }, 286 },
355#ifdef CONFIG_INET 287#ifdef CONFIG_INET
356 { 288 {
@@ -363,7 +295,7 @@ static ctl_table lasat_table[] = {
363 .strategy = &sysctl_lasat_intvec 295 .strategy = &sysctl_lasat_intvec
364 }, 296 },
365 { 297 {
366 .ctl_name = LASAT_NETMASK, 298 .ctl_name = CTL_UNNUMBERED,
367 .procname = "netmask", 299 .procname = "netmask",
368 .data = &lasat_board_info.li_eeprom_info.netmask, 300 .data = &lasat_board_info.li_eeprom_info.netmask,
369 .maxlen = sizeof(int), 301 .maxlen = sizeof(int),
@@ -371,15 +303,6 @@ static ctl_table lasat_table[] = {
371 .proc_handler = &proc_lasat_ip, 303 .proc_handler = &proc_lasat_ip,
372 .strategy = &sysctl_lasat_intvec 304 .strategy = &sysctl_lasat_intvec
373 }, 305 },
374 {
375 .ctl_name = CTL_UNNUMBERED,
376 .procname = "bcastaddr",
377 .data = &lasat_bcastaddr,
378 .maxlen = sizeof(lasat_bcastaddr),
379 .mode = 0600,
380 .proc_handler = &proc_dostring,
381 .strategy = &sysctl_string
382 },
383#endif 306#endif
384 { 307 {
385 .ctl_name = CTL_UNNUMBERED, 308 .ctl_name = CTL_UNNUMBERED,
@@ -417,7 +340,7 @@ static ctl_table lasat_table[] = {
417 .data = &lasat_board_info.li_namestr, 340 .data = &lasat_board_info.li_namestr,
418 .maxlen = sizeof(lasat_board_info.li_namestr), 341 .maxlen = sizeof(lasat_board_info.li_namestr),
419 .mode = 0444, 342 .mode = 0444,
420 .proc_handler = &proc_dostring, 343 .proc_handler = &proc_dostring,
421 .strategy = &sysctl_string 344 .strategy = &sysctl_string
422 }, 345 },
423 { 346 {
@@ -448,9 +371,12 @@ static int __init lasat_register_sysctl(void)
448 371
449 lasat_table_header = 372 lasat_table_header =
450 register_sysctl_table(lasat_root_table); 373 register_sysctl_table(lasat_root_table);
374 if (!lasat_table_header) {
375 printk(KERN_ERR "Unable to register LASAT sysctl\n");
376 return -ENOMEM;
377 }
451 378
452 return 0; 379 return 0;
453} 380}
454 381
455__initcall(lasat_register_sysctl); 382__initcall(lasat_register_sysctl);
456#endif /* CONFIG_SYSCTL */
diff --git a/arch/mips/lasat/sysctl.h b/arch/mips/lasat/sysctl.h
deleted file mode 100644
index 341b97933423..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/mips-boards/generic/amon.c b/arch/mips/mips-boards/generic/amon.c
index b7633fda4180..96236bf33838 100644
--- a/arch/mips/mips-boards/generic/amon.c
+++ b/arch/mips/mips-boards/generic/amon.c
@@ -28,7 +28,7 @@
28 28
29int amon_cpu_avail(int cpu) 29int amon_cpu_avail(int cpu)
30{ 30{
31 struct cpulaunch *launch = (struct cpulaunch *)KSEG0ADDR(CPULAUNCH); 31 struct cpulaunch *launch = (struct cpulaunch *)CKSEG0ADDR(CPULAUNCH);
32 32
33 if (cpu < 0 || cpu >= NCPULAUNCH) { 33 if (cpu < 0 || cpu >= NCPULAUNCH) {
34 pr_debug("avail: cpu%d is out of range\n", cpu); 34 pr_debug("avail: cpu%d is out of range\n", cpu);
@@ -53,7 +53,7 @@ void amon_cpu_start(int cpu,
53 unsigned long gp, unsigned long a0) 53 unsigned long gp, unsigned long a0)
54{ 54{
55 volatile struct cpulaunch *launch = 55 volatile struct cpulaunch *launch =
56 (struct cpulaunch *)KSEG0ADDR(CPULAUNCH); 56 (struct cpulaunch *)CKSEG0ADDR(CPULAUNCH);
57 57
58 if (!amon_cpu_avail(cpu)) 58 if (!amon_cpu_avail(cpu))
59 return; 59 return;
diff --git a/arch/mips/mips-boards/generic/time.c b/arch/mips/mips-boards/generic/time.c
index 008fd82b5840..fe2cac1b4514 100644
--- a/arch/mips/mips-boards/generic/time.c
+++ b/arch/mips/mips-boards/generic/time.c
@@ -58,27 +58,8 @@ static int mips_cpu_timer_irq;
58static int mips_cpu_perf_irq; 58static int mips_cpu_perf_irq;
59extern int cp0_perfcount_irq; 59extern int cp0_perfcount_irq;
60 60
61DEFINE_PER_CPU(unsigned int, tickcount);
62#define tickcount_this_cpu __get_cpu_var(tickcount)
63static unsigned long ledbitmask;
64
65static void mips_timer_dispatch(void) 61static void mips_timer_dispatch(void)
66{ 62{
67#if defined(CONFIG_MIPS_MALTA) || defined(CONFIG_MIPS_ATLAS)
68 /*
69 * Yes, this is very tacky, won't work as expected with SMTC and
70 * dyntick will break it,
71 * but it gives me a nice warm feeling during debug
72 */
73#define LEDBAR 0xbf000408
74 if (tickcount_this_cpu++ >= HZ) {
75 tickcount_this_cpu = 0;
76 change_bit(smp_processor_id(), &ledbitmask);
77 smp_wmb(); /* Make sure every one else sees the change */
78 /* This will pick up any recent changes made by other CPU's */
79 *(unsigned int *)LEDBAR = ledbitmask;
80 }
81#endif
82 do_IRQ(mips_cpu_timer_irq); 63 do_IRQ(mips_cpu_timer_irq);
83} 64}
84 65
diff --git a/arch/mips/mips-boards/malta/Makefile b/arch/mips/mips-boards/malta/Makefile
index 8dc6e2ac4c03..db4ad654a6d3 100644
--- a/arch/mips/mips-boards/malta/Makefile
+++ b/arch/mips/mips-boards/malta/Makefile
@@ -19,9 +19,8 @@
19# under Linux. 19# under Linux.
20# 20#
21 21
22obj-y := malta_int.o malta_platform.o malta_setup.o 22obj-y := malta_int.o malta_mtd.o malta_platform.o malta_setup.o
23 23
24obj-$(CONFIG_MTD) += malta_mtd.o
25# FIXME FIXME FIXME 24# FIXME FIXME FIXME
26obj-$(CONFIG_MIPS_MT_SMTC) += malta_smtc.o 25obj-$(CONFIG_MIPS_MT_SMTC) += malta_smtc.o
27 26
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c
index 643c8bcffff3..27096751ddce 100644
--- a/arch/mips/mm/c-r4k.c
+++ b/arch/mips/mm/c-r4k.c
@@ -446,6 +446,7 @@ static inline void local_r4k_flush_cache_page(void *args)
446 struct page *page = pfn_to_page(fcp_args->pfn); 446 struct page *page = pfn_to_page(fcp_args->pfn);
447 int exec = vma->vm_flags & VM_EXEC; 447 int exec = vma->vm_flags & VM_EXEC;
448 struct mm_struct *mm = vma->vm_mm; 448 struct mm_struct *mm = vma->vm_mm;
449 int map_coherent = 0;
449 pgd_t *pgdp; 450 pgd_t *pgdp;
450 pud_t *pudp; 451 pud_t *pudp;
451 pmd_t *pmdp; 452 pmd_t *pmdp;
@@ -479,7 +480,9 @@ static inline void local_r4k_flush_cache_page(void *args)
479 * Use kmap_coherent or kmap_atomic to do flushes for 480 * Use kmap_coherent or kmap_atomic to do flushes for
480 * another ASID than the current one. 481 * another ASID than the current one.
481 */ 482 */
482 if (cpu_has_dc_aliases) 483 map_coherent = (cpu_has_dc_aliases &&
484 page_mapped(page) && !Page_dcache_dirty(page));
485 if (map_coherent)
483 vaddr = kmap_coherent(page, addr); 486 vaddr = kmap_coherent(page, addr);
484 else 487 else
485 vaddr = kmap_atomic(page, KM_USER0); 488 vaddr = kmap_atomic(page, KM_USER0);
@@ -502,7 +505,7 @@ static inline void local_r4k_flush_cache_page(void *args)
502 } 505 }
503 506
504 if (vaddr) { 507 if (vaddr) {
505 if (cpu_has_dc_aliases) 508 if (map_coherent)
506 kunmap_coherent(); 509 kunmap_coherent();
507 else 510 else
508 kunmap_atomic(vaddr, KM_USER0); 511 kunmap_atomic(vaddr, KM_USER0);
@@ -1226,6 +1229,28 @@ void au1x00_fixup_config_od(void)
1226 } 1229 }
1227} 1230}
1228 1231
1232/* CP0 hazard avoidance. */
1233#define NXP_BARRIER() \
1234 __asm__ __volatile__( \
1235 ".set noreorder\n\t" \
1236 "nop; nop; nop; nop; nop; nop;\n\t" \
1237 ".set reorder\n\t")
1238
1239static void nxp_pr4450_fixup_config(void)
1240{
1241 unsigned long config0;
1242
1243 config0 = read_c0_config();
1244
1245 /* clear all three cache coherency fields */
1246 config0 &= ~(0x7 | (7 << 25) | (7 << 28));
1247 config0 |= (((_page_cachable_default >> _CACHE_SHIFT) << 0) |
1248 ((_page_cachable_default >> _CACHE_SHIFT) << 25) |
1249 ((_page_cachable_default >> _CACHE_SHIFT) << 28));
1250 write_c0_config(config0);
1251 NXP_BARRIER();
1252}
1253
1229static int __cpuinitdata cca = -1; 1254static int __cpuinitdata cca = -1;
1230 1255
1231static int __init cca_setup(char *str) 1256static int __init cca_setup(char *str)
@@ -1271,6 +1296,10 @@ static void __cpuinit coherency_setup(void)
1271 case CPU_AU1500: /* rev. AB */ 1296 case CPU_AU1500: /* rev. AB */
1272 au1x00_fixup_config_od(); 1297 au1x00_fixup_config_od();
1273 break; 1298 break;
1299
1300 case PRID_IMP_PR4450:
1301 nxp_pr4450_fixup_config();
1302 break;
1274 } 1303 }
1275} 1304}
1276 1305
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index ecd562d2c348..137c14bafd6b 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -71,6 +71,7 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
71 * don't have to care about aliases on other CPUs. 71 * don't have to care about aliases on other CPUs.
72 */ 72 */
73unsigned long empty_zero_page, zero_page_mask; 73unsigned long empty_zero_page, zero_page_mask;
74EXPORT_SYMBOL_GPL(empty_zero_page);
74 75
75/* 76/*
76 * Not static inline because used by IP27 special magic initialization code 77 * Not static inline because used by IP27 special magic initialization code
diff --git a/arch/mips/mm/page.c b/arch/mips/mm/page.c
index d827d6144369..1edf0cbbeede 100644
--- a/arch/mips/mm/page.c
+++ b/arch/mips/mm/page.c
@@ -310,8 +310,8 @@ void __cpuinit build_clear_page(void)
310 if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x()) 310 if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x())
311 uasm_i_lui(&buf, AT, 0xa000); 311 uasm_i_lui(&buf, AT, 0xa000);
312 312
313 off = min(8, pref_bias_clear_store / cache_line_size) * 313 off = cache_line_size ? min(8, pref_bias_clear_store / cache_line_size)
314 cache_line_size; 314 * cache_line_size : 0;
315 while (off) { 315 while (off) {
316 build_clear_pref(&buf, -off); 316 build_clear_pref(&buf, -off);
317 off -= cache_line_size; 317 off -= cache_line_size;
@@ -454,12 +454,14 @@ void __cpuinit build_copy_page(void)
454 if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x()) 454 if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x())
455 uasm_i_lui(&buf, AT, 0xa000); 455 uasm_i_lui(&buf, AT, 0xa000);
456 456
457 off = min(8, pref_bias_copy_load / cache_line_size) * cache_line_size; 457 off = cache_line_size ? min(8, pref_bias_copy_load / cache_line_size) *
458 cache_line_size : 0;
458 while (off) { 459 while (off) {
459 build_copy_load_pref(&buf, -off); 460 build_copy_load_pref(&buf, -off);
460 off -= cache_line_size; 461 off -= cache_line_size;
461 } 462 }
462 off = min(8, pref_bias_copy_store / cache_line_size) * cache_line_size; 463 off = cache_line_size ? min(8, pref_bias_copy_store / cache_line_size) *
464 cache_line_size : 0;
463 while (off) { 465 while (off) {
464 build_copy_store_pref(&buf, -off); 466 build_copy_store_pref(&buf, -off);
465 off -= cache_line_size; 467 off -= cache_line_size;
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index 382738ca8a0b..76da73a5ab3c 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -224,8 +224,9 @@ static u32 final_handler[64] __cpuinitdata;
224static void __cpuinit __maybe_unused build_tlb_probe_entry(u32 **p) 224static void __cpuinit __maybe_unused build_tlb_probe_entry(u32 **p)
225{ 225{
226 switch (current_cpu_type()) { 226 switch (current_cpu_type()) {
227 /* Found by experiment: R4600 v2.0 needs this, too. */ 227 /* Found by experiment: R4600 v2.0/R4700 needs this, too. */
228 case CPU_R4600: 228 case CPU_R4600:
229 case CPU_R4700:
229 case CPU_R5000: 230 case CPU_R5000:
230 case CPU_R5000A: 231 case CPU_R5000A:
231 case CPU_NEVADA: 232 case CPU_NEVADA:
diff --git a/arch/mips/nxp/pnx8550/jbs/board_setup.c b/arch/mips/nxp/pnx8550/jbs/board_setup.c
index f92826e0096d..57dd903ca408 100644
--- a/arch/mips/nxp/pnx8550/jbs/board_setup.c
+++ b/arch/mips/nxp/pnx8550/jbs/board_setup.c
@@ -47,16 +47,7 @@
47 47
48void __init board_setup(void) 48void __init board_setup(void)
49{ 49{
50 unsigned long config0, configpr; 50 unsigned long configpr;
51
52 config0 = read_c0_config();
53
54 /* clear all three cache coherency fields */
55 config0 &= ~(0x7 | (7<<25) | (7<<28));
56 config0 |= (CONF_CM_DEFAULT | (CONF_CM_DEFAULT<<25) |
57 (CONF_CM_DEFAULT<<28));
58 write_c0_config(config0);
59 BARRIER;
60 51
61 configpr = read_c0_config7(); 52 configpr = read_c0_config7();
62 configpr |= (1<<19); /* enable tlb */ 53 configpr |= (1<<19); /* enable tlb */
diff --git a/arch/mips/nxp/pnx8550/stb810/board_setup.c b/arch/mips/nxp/pnx8550/stb810/board_setup.c
index 1282c27cfcb7..af2a55e0b4e9 100644
--- a/arch/mips/nxp/pnx8550/stb810/board_setup.c
+++ b/arch/mips/nxp/pnx8550/stb810/board_setup.c
@@ -33,15 +33,7 @@
33 33
34void __init board_setup(void) 34void __init board_setup(void)
35{ 35{
36 unsigned long config0, configpr; 36 unsigned long configpr;
37
38 config0 = read_c0_config();
39
40 /* clear all three cache coherency fields */
41 config0 &= ~(0x7 | (7<<25) | (7<<28));
42 config0 |= (CONF_CM_DEFAULT | (CONF_CM_DEFAULT<<25) |
43 (CONF_CM_DEFAULT<<28));
44 write_c0_config(config0);
45 37
46 configpr = read_c0_config7(); 38 configpr = read_c0_config7();
47 configpr |= (1<<19); /* enable tlb */ 39 configpr |= (1<<19); /* enable tlb */
diff --git a/arch/mips/pci/ops-bridge.c b/arch/mips/pci/ops-bridge.c
index 1fa09929cd7a..b46b3e211775 100644
--- a/arch/mips/pci/ops-bridge.c
+++ b/arch/mips/pci/ops-bridge.c
@@ -14,6 +14,22 @@
14#include <asm/sn/sn0/hub.h> 14#include <asm/sn/sn0/hub.h>
15 15
16/* 16/*
17 * Most of the IOC3 PCI config register aren't present
18 * we emulate what is needed for a normal PCI enumeration
19 */
20static u32 emulate_ioc3_cfg(int where, int size)
21{
22 if (size == 1 && where == 0x3d)
23 return 0x01;
24 else if (size == 2 && where == 0x3c)
25 return 0x0100;
26 else if (size == 4 && where == 0x3c)
27 return 0x00000100;
28
29 return 0;
30}
31
32/*
17 * The Bridge ASIC supports both type 0 and type 1 access. Type 1 is 33 * The Bridge ASIC supports both type 0 and type 1 access. Type 1 is
18 * not really documented, so right now I can't write code which uses it. 34 * not really documented, so right now I can't write code which uses it.
19 * Therefore we use type 0 accesses for now even though they won't work 35 * Therefore we use type 0 accesses for now even though they won't work
@@ -64,7 +80,7 @@ oh_my_gawd:
64 * generic PCI code a chance to look at the wrong register. 80 * generic PCI code a chance to look at the wrong register.
65 */ 81 */
66 if ((where >= 0x14 && where < 0x40) || (where >= 0x48)) { 82 if ((where >= 0x14 && where < 0x40) || (where >= 0x48)) {
67 *value = 0; 83 *value = emulate_ioc3_cfg(where, size);
68 return PCIBIOS_SUCCESSFUL; 84 return PCIBIOS_SUCCESSFUL;
69 } 85 }
70 86
@@ -127,7 +143,7 @@ oh_my_gawd:
127 * generic PCI code a chance to look at the wrong register. 143 * generic PCI code a chance to look at the wrong register.
128 */ 144 */
129 if ((where >= 0x14 && where < 0x40) || (where >= 0x48)) { 145 if ((where >= 0x14 && where < 0x40) || (where >= 0x48)) {
130 *value = 0; 146 *value = emulate_ioc3_cfg(where, size);
131 return PCIBIOS_SUCCESSFUL; 147 return PCIBIOS_SUCCESSFUL;
132 } 148 }
133 149
diff --git a/arch/mips/pci/pci-ip27.c b/arch/mips/pci/pci-ip27.c
index bb64828a92fe..a18516925cdd 100644
--- a/arch/mips/pci/pci-ip27.c
+++ b/arch/mips/pci/pci-ip27.c
@@ -47,6 +47,9 @@ int __cpuinit bridge_probe(nasid_t nasid, int widget_id, int masterwid)
47 static int num_bridges = 0; 47 static int num_bridges = 0;
48 bridge_t *bridge; 48 bridge_t *bridge;
49 int slot; 49 int slot;
50 extern int pci_probe_only;
51
52 pci_probe_only = 1;
50 53
51 printk("a bridge\n"); 54 printk("a bridge\n");
52 55
@@ -100,6 +103,11 @@ int __cpuinit bridge_probe(nasid_t nasid, int widget_id, int masterwid)
100 */ 103 */
101 bridge->b_wid_control |= BRIDGE_CTRL_IO_SWAP | 104 bridge->b_wid_control |= BRIDGE_CTRL_IO_SWAP |
102 BRIDGE_CTRL_MEM_SWAP; 105 BRIDGE_CTRL_MEM_SWAP;
106#ifdef CONFIG_PAGE_SIZE_4KB
107 bridge->b_wid_control &= ~BRIDGE_CTRL_PAGE_SIZE;
108#else /* 16kB or larger */
109 bridge->b_wid_control |= BRIDGE_CTRL_PAGE_SIZE;
110#endif
103 111
104 /* 112 /*
105 * Hmm... IRIX sets additional bits in the address which 113 * Hmm... IRIX sets additional bits in the address which
diff --git a/arch/mips/pci/pci-sb1250.c b/arch/mips/pci/pci-sb1250.c
index 42e4d2c800fa..2a09ad91ec8c 100644
--- a/arch/mips/pci/pci-sb1250.c
+++ b/arch/mips/pci/pci-sb1250.c
@@ -207,6 +207,7 @@ struct pci_controller sb1250_controller = {
207 207
208static int __init sb1250_pcibios_init(void) 208static int __init sb1250_pcibios_init(void)
209{ 209{
210 void __iomem *io_map_base;
210 uint32_t cmdreg; 211 uint32_t cmdreg;
211 uint64_t reg; 212 uint64_t reg;
212 extern int pci_probe_only; 213 extern int pci_probe_only;
@@ -253,12 +254,13 @@ static int __init sb1250_pcibios_init(void)
253 * works correctly with most of Linux's drivers. 254 * works correctly with most of Linux's drivers.
254 * XXX ehs: Should this happen in PCI Device mode? 255 * XXX ehs: Should this happen in PCI Device mode?
255 */ 256 */
256
257 set_io_port_base((unsigned long)
258 ioremap(A_PHYS_LDTPCI_IO_MATCH_BYTES, 65536));
259 isa_slot_offset = (unsigned long) 257 isa_slot_offset = (unsigned long)
260 ioremap(A_PHYS_LDTPCI_IO_MATCH_BYTES_32, 1024 * 1024); 258 ioremap(A_PHYS_LDTPCI_IO_MATCH_BYTES_32, 1024 * 1024);
261 259
260 io_map_base = ioremap(A_PHYS_LDTPCI_IO_MATCH_BYTES, 1024 * 1024);
261 sb1250_controller.io_map_base = io_map_base;
262 set_io_port_base((unsigned long)io_map_base);
263
262#ifdef CONFIG_SIBYTE_HAS_LDT 264#ifdef CONFIG_SIBYTE_HAS_LDT
263 /* 265 /*
264 * Also check the LDT bridge's enable, just in case we didn't 266 * Also check the LDT bridge's enable, just in case we didn't
diff --git a/arch/mips/pci/pci-vr41xx.c b/arch/mips/pci/pci-vr41xx.c
index 33c4f683d067..d1e049b55f34 100644
--- a/arch/mips/pci/pci-vr41xx.c
+++ b/arch/mips/pci/pci-vr41xx.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * Copyright (C) 2001-2003 MontaVista Software Inc. 4 * Copyright (C) 2001-2003 MontaVista Software Inc.
5 * Author: Yoichi Yuasa <yyuasa@mvista.com or source@mvista.com> 5 * Author: Yoichi Yuasa <yyuasa@mvista.com or source@mvista.com>
6 * Copyright (C) 2004-2005 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> 6 * Copyright (C) 2004-2008 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
7 * Copyright (C) 2004 by Ralf Baechle (ralf@linux-mips.org) 7 * Copyright (C) 2004 by Ralf Baechle (ralf@linux-mips.org)
8 * 8 *
9 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
@@ -300,6 +300,18 @@ static int __init vr41xx_pciu_init(void)
300 ioport_resource.end = IO_PORT_RESOURCE_END; 300 ioport_resource.end = IO_PORT_RESOURCE_END;
301 } 301 }
302 302
303 if (setup->master_io) {
304 void __iomem *io_map_base;
305 struct resource *res = vr41xx_pci_controller.io_resource;
306 master = setup->master_io;
307 io_map_base = ioremap(master->bus_base_address,
308 res->end - res->start + 1);
309 if (!io_map_base)
310 return -EBUSY;
311
312 vr41xx_pci_controller.io_map_base = (unsigned long)io_map_base;
313 }
314
303 register_pci_controller(&vr41xx_pci_controller); 315 register_pci_controller(&vr41xx_pci_controller);
304 316
305 return 0; 317 return 0;
diff --git a/arch/mips/sgi-ip27/ip27-init.c b/arch/mips/sgi-ip27/ip27-init.c
index 7093e7c573a4..4a500e8cd3cc 100644
--- a/arch/mips/sgi-ip27/ip27-init.c
+++ b/arch/mips/sgi-ip27/ip27-init.c
@@ -161,27 +161,6 @@ cnodeid_t get_compact_nodeid(void)
161 return NASID_TO_COMPACT_NODEID(get_nasid()); 161 return NASID_TO_COMPACT_NODEID(get_nasid());
162} 162}
163 163
164/* Extracted from the IOC3 meta driver. FIXME. */
165static inline void ioc3_sio_init(void)
166{
167 struct ioc3 *ioc3;
168 nasid_t nid;
169 long loops;
170
171 nid = get_nasid();
172 ioc3 = (struct ioc3 *) KL_CONFIG_CH_CONS_INFO(nid)->memory_base;
173
174 ioc3->sscr_a = 0; /* PIO mode for uarta. */
175 ioc3->sscr_b = 0; /* PIO mode for uartb. */
176 ioc3->sio_iec = ~0;
177 ioc3->sio_ies = (SIO_IR_SA_INT | SIO_IR_SB_INT);
178
179 loops=1000000; while(loops--);
180 ioc3->sregs.uarta.iu_fcr = 0;
181 ioc3->sregs.uartb.iu_fcr = 0;
182 loops=1000000; while(loops--);
183}
184
185static inline void ioc3_eth_init(void) 164static inline void ioc3_eth_init(void)
186{ 165{
187 struct ioc3 *ioc3; 166 struct ioc3 *ioc3;
@@ -234,7 +213,6 @@ void __init plat_mem_setup(void)
234 panic("Kernel compiled for N mode."); 213 panic("Kernel compiled for N mode.");
235#endif 214#endif
236 215
237 ioc3_sio_init();
238 ioc3_eth_init(); 216 ioc3_eth_init();
239 per_cpu_init(); 217 per_cpu_init();
240 218
diff --git a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c
index bf438d02366e..42cd10956306 100644
--- a/arch/mips/sgi-ip27/ip27-memory.c
+++ b/arch/mips/sgi-ip27/ip27-memory.c
@@ -33,10 +33,6 @@
33#define SLOT_PFNSHIFT (SLOT_SHIFT - PAGE_SHIFT) 33#define SLOT_PFNSHIFT (SLOT_SHIFT - PAGE_SHIFT)
34#define PFN_NASIDSHFT (NASID_SHFT - PAGE_SHIFT) 34#define PFN_NASIDSHFT (NASID_SHFT - PAGE_SHIFT)
35 35
36#define SLOT_IGNORED 0xffff
37
38static short __initdata slot_lastfilled_cache[MAX_COMPACT_NODES];
39static unsigned short __initdata slot_psize_cache[MAX_COMPACT_NODES][MAX_MEM_SLOTS];
40static struct bootmem_data __initdata plat_node_bdata[MAX_COMPACT_NODES]; 36static struct bootmem_data __initdata plat_node_bdata[MAX_COMPACT_NODES];
41 37
42struct node_data *__node_data[MAX_COMPACT_NODES]; 38struct node_data *__node_data[MAX_COMPACT_NODES];
@@ -267,51 +263,6 @@ static pfn_t __init slot_getbasepfn(cnodeid_t cnode, int slot)
267 return ((pfn_t)nasid << PFN_NASIDSHFT) | (slot << SLOT_PFNSHIFT); 263 return ((pfn_t)nasid << PFN_NASIDSHFT) | (slot << SLOT_PFNSHIFT);
268} 264}
269 265
270/*
271 * Return the number of pages of memory provided by the given slot
272 * on the specified node.
273 */
274static pfn_t __init slot_getsize(cnodeid_t node, int slot)
275{
276 return (pfn_t) slot_psize_cache[node][slot];
277}
278
279/*
280 * Return highest slot filled
281 */
282static int __init node_getlastslot(cnodeid_t node)
283{
284 return (int) slot_lastfilled_cache[node];
285}
286
287/*
288 * Return the pfn of the last free page of memory on a node.
289 */
290static pfn_t __init node_getmaxclick(cnodeid_t node)
291{
292 pfn_t slot_psize;
293 int slot;
294
295 /*
296 * Start at the top slot. When we find a slot with memory in it,
297 * that's the winner.
298 */
299 for (slot = (MAX_MEM_SLOTS - 1); slot >= 0; slot--) {
300 if ((slot_psize = slot_getsize(node, slot))) {
301 if (slot_psize == SLOT_IGNORED)
302 continue;
303 /* Return the basepfn + the slot size, minus 1. */
304 return slot_getbasepfn(node, slot) + slot_psize - 1;
305 }
306 }
307
308 /*
309 * If there's no memory on the node, return 0. This is likely
310 * to cause problems.
311 */
312 return 0;
313}
314
315static pfn_t __init slot_psize_compute(cnodeid_t node, int slot) 266static pfn_t __init slot_psize_compute(cnodeid_t node, int slot)
316{ 267{
317 nasid_t nasid; 268 nasid_t nasid;
@@ -404,13 +355,13 @@ static void __init mlreset(void)
404static void __init szmem(void) 355static void __init szmem(void)
405{ 356{
406 pfn_t slot_psize, slot0sz = 0, nodebytes; /* Hack to detect problem configs */ 357 pfn_t slot_psize, slot0sz = 0, nodebytes; /* Hack to detect problem configs */
407 int slot, ignore; 358 int slot;
408 cnodeid_t node; 359 cnodeid_t node;
409 360
410 num_physpages = 0; 361 num_physpages = 0;
411 362
412 for_each_online_node(node) { 363 for_each_online_node(node) {
413 ignore = nodebytes = 0; 364 nodebytes = 0;
414 for (slot = 0; slot < MAX_MEM_SLOTS; slot++) { 365 for (slot = 0; slot < MAX_MEM_SLOTS; slot++) {
415 slot_psize = slot_psize_compute(node, slot); 366 slot_psize = slot_psize_compute(node, slot);
416 if (slot == 0) 367 if (slot == 0)
@@ -420,21 +371,20 @@ static void __init szmem(void)
420 * kernel text. 371 * kernel text.
421 */ 372 */
422 nodebytes += (1LL << SLOT_SHIFT); 373 nodebytes += (1LL << SLOT_SHIFT);
374
375 if (!slot_psize)
376 continue;
377
423 if ((nodebytes >> PAGE_SHIFT) * (sizeof(struct page)) > 378 if ((nodebytes >> PAGE_SHIFT) * (sizeof(struct page)) >
424 (slot0sz << PAGE_SHIFT)) 379 (slot0sz << PAGE_SHIFT)) {
425 ignore = 1;
426 if (ignore && slot_psize) {
427 printk("Ignoring slot %d onwards on node %d\n", 380 printk("Ignoring slot %d onwards on node %d\n",
428 slot, node); 381 slot, node);
429 slot_psize_cache[node][slot] = SLOT_IGNORED;
430 slot = MAX_MEM_SLOTS; 382 slot = MAX_MEM_SLOTS;
431 continue; 383 continue;
432 } 384 }
433 num_physpages += slot_psize; 385 num_physpages += slot_psize;
434 slot_psize_cache[node][slot] = 386 add_active_range(node, slot_getbasepfn(node, slot),
435 (unsigned short) slot_psize; 387 slot_getbasepfn(node, slot) + slot_psize);
436 if (slot_psize)
437 slot_lastfilled_cache[node] = slot;
438 } 388 }
439 } 389 }
440} 390}
@@ -442,18 +392,20 @@ static void __init szmem(void)
442static void __init node_mem_init(cnodeid_t node) 392static void __init node_mem_init(cnodeid_t node)
443{ 393{
444 pfn_t slot_firstpfn = slot_getbasepfn(node, 0); 394 pfn_t slot_firstpfn = slot_getbasepfn(node, 0);
445 pfn_t slot_lastpfn = slot_firstpfn + slot_getsize(node, 0);
446 pfn_t slot_freepfn = node_getfirstfree(node); 395 pfn_t slot_freepfn = node_getfirstfree(node);
447 struct pglist_data *pd;
448 unsigned long bootmap_size; 396 unsigned long bootmap_size;
397 pfn_t start_pfn, end_pfn;
398
399 get_pfn_range_for_nid(node, &start_pfn, &end_pfn);
449 400
450 /* 401 /*
451 * Allocate the node data structures on the node first. 402 * Allocate the node data structures on the node first.
452 */ 403 */
453 __node_data[node] = __va(slot_freepfn << PAGE_SHIFT); 404 __node_data[node] = __va(slot_freepfn << PAGE_SHIFT);
454 405
455 pd = NODE_DATA(node); 406 NODE_DATA(node)->bdata = &plat_node_bdata[node];
456 pd->bdata = &plat_node_bdata[node]; 407 NODE_DATA(node)->node_start_pfn = start_pfn;
408 NODE_DATA(node)->node_spanned_pages = end_pfn - start_pfn;
457 409
458 cpus_clear(hub_data(node)->h_cpus); 410 cpus_clear(hub_data(node)->h_cpus);
459 411
@@ -461,12 +413,12 @@ static void __init node_mem_init(cnodeid_t node)
461 sizeof(struct hub_data)); 413 sizeof(struct hub_data));
462 414
463 bootmap_size = init_bootmem_node(NODE_DATA(node), slot_freepfn, 415 bootmap_size = init_bootmem_node(NODE_DATA(node), slot_freepfn,
464 slot_firstpfn, slot_lastpfn); 416 start_pfn, end_pfn);
465 free_bootmem_node(NODE_DATA(node), slot_firstpfn << PAGE_SHIFT, 417 free_bootmem_with_active_regions(node, end_pfn);
466 (slot_lastpfn - slot_firstpfn) << PAGE_SHIFT);
467 reserve_bootmem_node(NODE_DATA(node), slot_firstpfn << PAGE_SHIFT, 418 reserve_bootmem_node(NODE_DATA(node), slot_firstpfn << PAGE_SHIFT,
468 ((slot_freepfn - slot_firstpfn) << PAGE_SHIFT) + bootmap_size, 419 ((slot_freepfn - slot_firstpfn) << PAGE_SHIFT) + bootmap_size,
469 BOOTMEM_DEFAULT); 420 BOOTMEM_DEFAULT);
421 sparse_memory_present_with_active_regions(node);
470} 422}
471 423
472/* 424/*
@@ -515,16 +467,15 @@ void __init paging_init(void)
515 pagetable_init(); 467 pagetable_init();
516 468
517 for_each_online_node(node) { 469 for_each_online_node(node) {
518 pfn_t start_pfn = slot_getbasepfn(node, 0); 470 pfn_t start_pfn, end_pfn;
519 pfn_t end_pfn = node_getmaxclick(node) + 1;
520 471
521 zones_size[ZONE_NORMAL] = end_pfn - start_pfn; 472 get_pfn_range_for_nid(node, &start_pfn, &end_pfn);
522 free_area_init_node(node, NODE_DATA(node),
523 zones_size, start_pfn, NULL);
524 473
525 if (end_pfn > max_low_pfn) 474 if (end_pfn > max_low_pfn)
526 max_low_pfn = end_pfn; 475 max_low_pfn = end_pfn;
527 } 476 }
477 zones_size[ZONE_NORMAL] = max_low_pfn;
478 free_area_init_nodes(zones_size);
528} 479}
529 480
530void __init mem_init(void) 481void __init mem_init(void)
@@ -535,34 +486,10 @@ void __init mem_init(void)
535 high_memory = (void *) __va(num_physpages << PAGE_SHIFT); 486 high_memory = (void *) __va(num_physpages << PAGE_SHIFT);
536 487
537 for_each_online_node(node) { 488 for_each_online_node(node) {
538 unsigned slot, numslots;
539 struct page *end, *p;
540
541 /* 489 /*
542 * This will free up the bootmem, ie, slot 0 memory. 490 * This will free up the bootmem, ie, slot 0 memory.
543 */ 491 */
544 totalram_pages += free_all_bootmem_node(NODE_DATA(node)); 492 totalram_pages += free_all_bootmem_node(NODE_DATA(node));
545
546 /*
547 * We need to manually do the other slots.
548 */
549 numslots = node_getlastslot(node);
550 for (slot = 1; slot <= numslots; slot++) {
551 p = nid_page_nr(node, slot_getbasepfn(node, slot) -
552 slot_getbasepfn(node, 0));
553
554 /*
555 * Free valid memory in current slot.
556 */
557 for (end = p + slot_getsize(node, slot); p < end; p++) {
558 /* if (!page_is_ram(pgnr)) continue; */
559 /* commented out until page_is_ram works */
560 ClearPageReserved(p);
561 init_page_count(p);
562 __free_page(p);
563 totalram_pages++;
564 }
565 }
566 } 493 }
567 494
568 totalram_pages -= setup_zero_pages(); /* This comes from node 0 */ 495 totalram_pages -= setup_zero_pages(); /* This comes from node 0 */
diff --git a/arch/mips/sgi-ip27/ip27-smp.c b/arch/mips/sgi-ip27/ip27-smp.c
index f15fc93d6b35..ba5cdebeaf0d 100644
--- a/arch/mips/sgi-ip27/ip27-smp.c
+++ b/arch/mips/sgi-ip27/ip27-smp.c
@@ -176,11 +176,14 @@ static void ip27_send_ipi_mask(cpumask_t mask, unsigned int action)
176static void __cpuinit ip27_init_secondary(void) 176static void __cpuinit ip27_init_secondary(void)
177{ 177{
178 per_cpu_init(); 178 per_cpu_init();
179 local_irq_enable();
180} 179}
181 180
182static void __cpuinit ip27_smp_finish(void) 181static void __cpuinit ip27_smp_finish(void)
183{ 182{
183 extern void hub_rt_clock_event_init(void);
184
185 hub_rt_clock_event_init();
186 local_irq_enable();
184} 187}
185 188
186static void __init ip27_cpus_done(void) 189static void __init ip27_cpus_done(void)
diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c
index 9cebc9e7da63..8b4e854af925 100644
--- a/arch/mips/sgi-ip27/ip27-timer.c
+++ b/arch/mips/sgi-ip27/ip27-timer.c
@@ -160,10 +160,13 @@ static void rt_set_mode(enum clock_event_mode mode,
160 160
161int rt_timer_irq; 161int rt_timer_irq;
162 162
163static DEFINE_PER_CPU(struct clock_event_device, hub_rt_clockevent);
164static DEFINE_PER_CPU(char [11], hub_rt_name);
165
163static irqreturn_t hub_rt_counter_handler(int irq, void *dev_id) 166static irqreturn_t hub_rt_counter_handler(int irq, void *dev_id)
164{ 167{
165 struct clock_event_device *cd = dev_id;
166 unsigned int cpu = smp_processor_id(); 168 unsigned int cpu = smp_processor_id();
169 struct clock_event_device *cd = &per_cpu(hub_rt_clockevent, cpu);
167 int slice = cputoslice(cpu); 170 int slice = cputoslice(cpu);
168 171
169 /* 172 /*
@@ -192,10 +195,7 @@ struct irqaction hub_rt_irqaction = {
192#define NSEC_PER_CYCLE 800 195#define NSEC_PER_CYCLE 800
193#define CYCLES_PER_SEC (NSEC_PER_SEC / NSEC_PER_CYCLE) 196#define CYCLES_PER_SEC (NSEC_PER_SEC / NSEC_PER_CYCLE)
194 197
195static DEFINE_PER_CPU(struct clock_event_device, hub_rt_clockevent); 198void __cpuinit hub_rt_clock_event_init(void)
196static DEFINE_PER_CPU(char [11], hub_rt_name);
197
198static void __cpuinit hub_rt_clock_event_init(void)
199{ 199{
200 unsigned int cpu = smp_processor_id(); 200 unsigned int cpu = smp_processor_id();
201 struct clock_event_device *cd = &per_cpu(hub_rt_clockevent, cpu); 201 struct clock_event_device *cd = &per_cpu(hub_rt_clockevent, cpu);
@@ -203,17 +203,16 @@ static void __cpuinit hub_rt_clock_event_init(void)
203 int irq = rt_timer_irq; 203 int irq = rt_timer_irq;
204 204
205 sprintf(name, "hub-rt %d", cpu); 205 sprintf(name, "hub-rt %d", cpu);
206 cd->name = "HUB-RT", 206 cd->name = name;
207 cd->features = CLOCK_EVT_FEAT_ONESHOT, 207 cd->features = CLOCK_EVT_FEAT_ONESHOT;
208 clockevent_set_clock(cd, CYCLES_PER_SEC); 208 clockevent_set_clock(cd, CYCLES_PER_SEC);
209 cd->max_delta_ns = clockevent_delta2ns(0xfffffffffffff, cd); 209 cd->max_delta_ns = clockevent_delta2ns(0xfffffffffffff, cd);
210 cd->min_delta_ns = clockevent_delta2ns(0x300, cd); 210 cd->min_delta_ns = clockevent_delta2ns(0x300, cd);
211 cd->rating = 200, 211 cd->rating = 200;
212 cd->irq = irq, 212 cd->irq = irq;
213 cd->cpumask = cpumask_of_cpu(cpu), 213 cd->cpumask = cpumask_of_cpu(cpu);
214 cd->rating = 300, 214 cd->set_next_event = rt_next_event;
215 cd->set_next_event = rt_next_event, 215 cd->set_mode = rt_set_mode;
216 cd->set_mode = rt_set_mode,
217 clockevents_register_device(cd); 216 clockevents_register_device(cd);
218} 217}
219 218
@@ -261,6 +260,7 @@ void __init plat_time_init(void)
261{ 260{
262 hub_rt_clocksource_init(); 261 hub_rt_clocksource_init();
263 hub_rt_clock_event_global_init(); 262 hub_rt_clock_event_global_init();
263 hub_rt_clock_event_init();
264} 264}
265 265
266void __cpuinit cpu_time_init(void) 266void __cpuinit cpu_time_init(void)
@@ -281,7 +281,6 @@ void __cpuinit cpu_time_init(void)
281 281
282 printk("CPU %d clock is %dMHz.\n", smp_processor_id(), cpu->cpu_speed); 282 printk("CPU %d clock is %dMHz.\n", smp_processor_id(), cpu->cpu_speed);
283 283
284 hub_rt_clock_event_init();
285 set_c0_status(SRB_TIMOCLK); 284 set_c0_status(SRB_TIMOCLK);
286} 285}
287 286
diff --git a/arch/mips/sgi-ip32/ip32-irq.c b/arch/mips/sgi-ip32/ip32-irq.c
index b0ea0e43ba48..0d6b6663d5f6 100644
--- a/arch/mips/sgi-ip32/ip32-irq.c
+++ b/arch/mips/sgi-ip32/ip32-irq.c
@@ -425,6 +425,11 @@ static void ip32_irq0(void)
425 BUILD_BUG_ON(MACEISA_SERIAL2_RDMAOR_IRQ - MACEISA_AUDIO_SW_IRQ != 31); 425 BUILD_BUG_ON(MACEISA_SERIAL2_RDMAOR_IRQ - MACEISA_AUDIO_SW_IRQ != 31);
426 426
427 crime_int = crime->istat & crime_mask; 427 crime_int = crime->istat & crime_mask;
428
429 /* crime sometime delivers spurious interrupts, ignore them */
430 if (unlikely(crime_int == 0))
431 return;
432
428 irq = MACE_VID_IN1_IRQ + __ffs(crime_int); 433 irq = MACE_VID_IN1_IRQ + __ffs(crime_int);
429 434
430 if (crime_int & CRIME_MACEISA_INT_MASK) { 435 if (crime_int & CRIME_MACEISA_INT_MASK) {
diff --git a/arch/mips/sibyte/swarm/Makefile b/arch/mips/sibyte/swarm/Makefile
index 2d626039195c..1775755a2619 100644
--- a/arch/mips/sibyte/swarm/Makefile
+++ b/arch/mips/sibyte/swarm/Makefile
@@ -1,3 +1,3 @@
1lib-y = setup.o rtc_xicor1241.o rtc_m41t81.o 1obj-y := setup.o rtc_xicor1241.o rtc_m41t81.o
2 2
3lib-$(CONFIG_KGDB) += dbg_io.o 3obj-$(CONFIG_KGDB) += dbg_io.o
diff --git a/arch/mn10300/kernel/mn10300_ksyms.c b/arch/mn10300/kernel/mn10300_ksyms.c
index 6d19628634e3..f9eb9753a404 100644
--- a/arch/mn10300/kernel/mn10300_ksyms.c
+++ b/arch/mn10300/kernel/mn10300_ksyms.c
@@ -10,8 +10,11 @@
10 */ 10 */
11#include <linux/module.h> 11#include <linux/module.h>
12#include <asm/uaccess.h> 12#include <asm/uaccess.h>
13#include <asm/pgtable.h>
13 14
14 15
16EXPORT_SYMBOL(empty_zero_page);
17
15EXPORT_SYMBOL(change_bit); 18EXPORT_SYMBOL(change_bit);
16EXPORT_SYMBOL(test_and_change_bit); 19EXPORT_SYMBOL(test_and_change_bit);
17 20
@@ -31,7 +34,9 @@ extern u64 __ashrdi3(u64, unsigned);
31extern u64 __ashldi3(u64, unsigned); 34extern u64 __ashldi3(u64, unsigned);
32extern u64 __lshrdi3(u64, unsigned); 35extern u64 __lshrdi3(u64, unsigned);
33extern s64 __negdi2(s64); 36extern s64 __negdi2(s64);
37extern int __ucmpdi2(u64, u64);
34EXPORT_SYMBOL(__ashrdi3); 38EXPORT_SYMBOL(__ashrdi3);
35EXPORT_SYMBOL(__ashldi3); 39EXPORT_SYMBOL(__ashldi3);
36EXPORT_SYMBOL(__lshrdi3); 40EXPORT_SYMBOL(__lshrdi3);
37EXPORT_SYMBOL(__negdi2); 41EXPORT_SYMBOL(__negdi2);
42EXPORT_SYMBOL(__ucmpdi2);
diff --git a/arch/mn10300/kernel/process.c b/arch/mn10300/kernel/process.c
index 3b0d579fc15d..b28c9a60445b 100644
--- a/arch/mn10300/kernel/process.c
+++ b/arch/mn10300/kernel/process.c
@@ -20,7 +20,6 @@
20#include <linux/ptrace.h> 20#include <linux/ptrace.h>
21#include <linux/slab.h> 21#include <linux/slab.h>
22#include <linux/user.h> 22#include <linux/user.h>
23#include <linux/a.out.h>
24#include <linux/interrupt.h> 23#include <linux/interrupt.h>
25#include <linux/delay.h> 24#include <linux/delay.h>
26#include <linux/reboot.h> 25#include <linux/reboot.h>
@@ -154,6 +153,7 @@ int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
154 return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, 153 return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0,
155 NULL, NULL); 154 NULL, NULL);
156} 155}
156EXPORT_SYMBOL(kernel_thread);
157 157
158/* 158/*
159 * free current thread data structures etc.. 159 * free current thread data structures etc..
diff --git a/arch/mn10300/kernel/setup.c b/arch/mn10300/kernel/setup.c
index 6b7ce2636851..017121ce896f 100644
--- a/arch/mn10300/kernel/setup.c
+++ b/arch/mn10300/kernel/setup.c
@@ -17,7 +17,6 @@
17#include <linux/ptrace.h> 17#include <linux/ptrace.h>
18#include <linux/slab.h> 18#include <linux/slab.h>
19#include <linux/user.h> 19#include <linux/user.h>
20#include <linux/a.out.h>
21#include <linux/tty.h> 20#include <linux/tty.h>
22#include <linux/ioport.h> 21#include <linux/ioport.h>
23#include <linux/delay.h> 22#include <linux/delay.h>
diff --git a/arch/mn10300/lib/Makefile b/arch/mn10300/lib/Makefile
index fdfa9ec5b5bb..0cd2346f4c13 100644
--- a/arch/mn10300/lib/Makefile
+++ b/arch/mn10300/lib/Makefile
@@ -4,4 +4,4 @@
4 4
5lib-y = delay.o usercopy.o checksum.o bitops.o memcpy.o memmove.o memset.o 5lib-y = delay.o usercopy.o checksum.o bitops.o memcpy.o memmove.o memset.o
6lib-y += do_csum.o 6lib-y += do_csum.o
7lib-y += __ashldi3.o __ashrdi3.o __lshrdi3.o negdi2.o 7lib-y += __ashldi3.o __ashrdi3.o __lshrdi3.o negdi2.o __ucmpdi2.o
diff --git a/arch/mn10300/lib/__ucmpdi2.S b/arch/mn10300/lib/__ucmpdi2.S
new file mode 100644
index 000000000000..60dcbdfe386c
--- /dev/null
+++ b/arch/mn10300/lib/__ucmpdi2.S
@@ -0,0 +1,43 @@
1/* __ucmpdi2.S: 64-bit unsigned compare
2 *
3 * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
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
13 .text
14 .p2align 4
15
16###############################################################################
17#
18# int __ucmpdi2(unsigned long long a [D0:D1],
19# unsigned long long b [(SP,12),(SP,16)])
20#
21# - returns 0, 1, or 2 as a <, =, > b respectively.
22#
23###############################################################################
24 .globl __ucmpdi2
25 .type __ucmpdi2,@function
26__ucmpdi2:
27 mov (12,sp),a0 # b.lsw
28 mov (16,sp),a1 # b.msw
29
30 sub a0,d0
31 subc a1,d1 # may clear Z, never sets it
32 bne __ucmpdi2_differ # a.msw != b.msw
33 mov +1,d0
34 rets
35
36__ucmpdi2_differ:
37 # C flag is set if LE, clear if GE
38 subc d0,d0 # -1 if LE, 0 if GE
39 add +1,d0 # 0 if LE, 1 if GE
40 add d0,d0 # 0 if LE, 2 if GE
41 rets
42
43 .size __ucmpdi2, .-__ucmpdi2
diff --git a/arch/parisc/hpux/gate.S b/arch/parisc/hpux/gate.S
index f0b18ce89842..38a1c1b8d4e8 100644
--- a/arch/parisc/hpux/gate.S
+++ b/arch/parisc/hpux/gate.S
@@ -13,10 +13,9 @@
13#include <asm/unistd.h> 13#include <asm/unistd.h>
14#include <asm/errno.h> 14#include <asm/errno.h>
15#include <linux/linkage.h> 15#include <linux/linkage.h>
16#include <linux/init.h>
17 16
18 .level LEVEL 17 .level LEVEL
19 __HEAD 18 .text
20 19
21 .import hpux_call_table 20 .import hpux_call_table
22 .import hpux_syscall_exit,code 21 .import hpux_syscall_exit,code
diff --git a/arch/parisc/hpux/wrappers.S b/arch/parisc/hpux/wrappers.S
index ccd3a50c0995..58c53c879c02 100644
--- a/arch/parisc/hpux/wrappers.S
+++ b/arch/parisc/hpux/wrappers.S
@@ -28,10 +28,9 @@
28#include <asm/assembly.h> 28#include <asm/assembly.h>
29#include <asm/signal.h> 29#include <asm/signal.h>
30#include <linux/linkage.h> 30#include <linux/linkage.h>
31#include <linux/init.h>
32 31
33 .level LEVEL 32 .level LEVEL
34 __HEAD 33 .text
35 34
36 /* These should probably go in a header file somewhere. 35 /* These should probably go in a header file somewhere.
37 * They are duplicated in kernel/wrappers.S 36 * They are duplicated in kernel/wrappers.S
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S
index 5d0837458c19..d1fa4edd2d80 100644
--- a/arch/parisc/kernel/entry.S
+++ b/arch/parisc/kernel/entry.S
@@ -38,7 +38,6 @@
38#include <asm/thread_info.h> 38#include <asm/thread_info.h>
39 39
40#include <linux/linkage.h> 40#include <linux/linkage.h>
41#include <linux/init.h>
42 41
43#ifdef CONFIG_64BIT 42#ifdef CONFIG_64BIT
44 .level 2.0w 43 .level 2.0w
@@ -622,7 +621,7 @@
622 * the static part of the kernel address space. 621 * the static part of the kernel address space.
623 */ 622 */
624 623
625 __HEAD 624 .text
626 625
627 .align PAGE_SIZE 626 .align PAGE_SIZE
628 627
diff --git a/arch/parisc/kernel/head.S b/arch/parisc/kernel/head.S
index 5680a2c3b13d..a84e31e82876 100644
--- a/arch/parisc/kernel/head.S
+++ b/arch/parisc/kernel/head.S
@@ -33,6 +33,7 @@ ENTRY(boot_args)
33END(boot_args) 33END(boot_args)
34 34
35 __HEAD 35 __HEAD
36
36 .align 4 37 .align 4
37 .import init_thread_union,data 38 .import init_thread_union,data
38 .import fault_vector_20,code /* IVA parisc 2.0 32 bit */ 39 .import fault_vector_20,code /* IVA parisc 2.0 32 bit */
diff --git a/arch/parisc/kernel/hpmc.S b/arch/parisc/kernel/hpmc.S
index 068322eb8c9b..2cbf13b3ef11 100644
--- a/arch/parisc/kernel/hpmc.S
+++ b/arch/parisc/kernel/hpmc.S
@@ -47,7 +47,6 @@
47#include <asm/pdc.h> 47#include <asm/pdc.h>
48 48
49#include <linux/linkage.h> 49#include <linux/linkage.h>
50#include <linux/init.h>
51 50
52 /* 51 /*
53 * stack for os_hpmc, the HPMC handler. 52 * stack for os_hpmc, the HPMC handler.
@@ -77,7 +76,7 @@ ENTRY(hpmc_pim_data)
77 .block HPMC_PIM_DATA_SIZE 76 .block HPMC_PIM_DATA_SIZE
78END(hpmc_pim_data) 77END(hpmc_pim_data)
79 78
80 __HEAD 79 .text
81 80
82 .import intr_save, code 81 .import intr_save, code
83ENTRY(os_hpmc) 82ENTRY(os_hpmc)
diff --git a/arch/parisc/kernel/pacache.S b/arch/parisc/kernel/pacache.S
index e3246a5ca74f..09b77b2553c6 100644
--- a/arch/parisc/kernel/pacache.S
+++ b/arch/parisc/kernel/pacache.S
@@ -37,9 +37,8 @@
37#include <asm/pgtable.h> 37#include <asm/pgtable.h>
38#include <asm/cache.h> 38#include <asm/cache.h>
39#include <linux/linkage.h> 39#include <linux/linkage.h>
40#include <linux/init.h>
41 40
42 __HEAD 41 .text
43 .align 128 42 .align 128
44 43
45ENTRY(flush_tlb_all_local) 44ENTRY(flush_tlb_all_local)
diff --git a/arch/parisc/kernel/parisc_ksyms.c b/arch/parisc/kernel/parisc_ksyms.c
index 5b7fc4aa044d..0eecfbbc59cd 100644
--- a/arch/parisc/kernel/parisc_ksyms.c
+++ b/arch/parisc/kernel/parisc_ksyms.c
@@ -152,3 +152,6 @@ EXPORT_SYMBOL($$dyncall);
152EXPORT_SYMBOL(node_data); 152EXPORT_SYMBOL(node_data);
153EXPORT_SYMBOL(pfnnid_map); 153EXPORT_SYMBOL(pfnnid_map);
154#endif 154#endif
155
156/* from pacache.S -- needed for copy_page */
157EXPORT_SYMBOL(copy_user_page_asm);
diff --git a/arch/parisc/kernel/perf_asm.S b/arch/parisc/kernel/perf_asm.S
index d411dfb5b6d1..fa6ea99bb324 100644
--- a/arch/parisc/kernel/perf_asm.S
+++ b/arch/parisc/kernel/perf_asm.S
@@ -43,7 +43,7 @@
43; The coprocessor only needs to be enabled when 43; The coprocessor only needs to be enabled when
44; starting/stopping the coprocessor with the pmenb/pmdis. 44; starting/stopping the coprocessor with the pmenb/pmdis.
45; 45;
46 __HEAD 46 .text
47 47
48ENTRY(perf_intrigue_enable_perf_counters) 48ENTRY(perf_intrigue_enable_perf_counters)
49 .proc 49 .proc
diff --git a/arch/parisc/kernel/real2.S b/arch/parisc/kernel/real2.S
index 47fbdae6efd5..7a92695d95a6 100644
--- a/arch/parisc/kernel/real2.S
+++ b/arch/parisc/kernel/real2.S
@@ -12,7 +12,6 @@
12#include <asm/assembly.h> 12#include <asm/assembly.h>
13 13
14#include <linux/linkage.h> 14#include <linux/linkage.h>
15#include <linux/init.h>
16 15
17 .section .bss 16 .section .bss
18 .export real_stack 17 .export real_stack
@@ -40,7 +39,7 @@ save_cr_end:
40/************************ 32-bit real-mode calls ***********************/ 39/************************ 32-bit real-mode calls ***********************/
41/* This can be called in both narrow and wide kernels */ 40/* This can be called in both narrow and wide kernels */
42 41
43 __HEAD 42 .text
44 43
45 /* unsigned long real32_call_asm(unsigned int *sp, 44 /* unsigned long real32_call_asm(unsigned int *sp,
46 * unsigned int *arg0p, 45 * unsigned int *arg0p,
@@ -114,7 +113,7 @@ ENDPROC(real32_call_asm)
114# define PUSH_CR(r, where) mfctl r, %r1 ! STREG,ma %r1, REG_SZ(where) 113# define PUSH_CR(r, where) mfctl r, %r1 ! STREG,ma %r1, REG_SZ(where)
115# define POP_CR(r, where) LDREG,mb -REG_SZ(where), %r1 ! mtctl %r1, r 114# define POP_CR(r, where) LDREG,mb -REG_SZ(where), %r1 ! mtctl %r1, r
116 115
117 __HEAD 116 .text
118save_control_regs: 117save_control_regs:
119 load32 PA(save_cr_space), %r28 118 load32 PA(save_cr_space), %r28
120 PUSH_CR(%cr24, %r28) 119 PUSH_CR(%cr24, %r28)
@@ -146,7 +145,7 @@ restore_control_regs:
146/* rfi_virt2real() and rfi_real2virt() could perhaps be adapted for 145/* rfi_virt2real() and rfi_real2virt() could perhaps be adapted for
147 * more general-purpose use by the several places which need RFIs 146 * more general-purpose use by the several places which need RFIs
148 */ 147 */
149 __HEAD 148 .text
150 .align 128 149 .align 128
151rfi_virt2real: 150rfi_virt2real:
152 /* switch to real mode... */ 151 /* switch to real mode... */
@@ -181,7 +180,7 @@ rfi_v2r_1:
181 bv 0(%r2) 180 bv 0(%r2)
182 nop 181 nop
183 182
184 __HEAD 183 .text
185 .align 128 184 .align 128
186rfi_real2virt: 185rfi_real2virt:
187 rsm PSW_SM_I,%r0 186 rsm PSW_SM_I,%r0
@@ -219,7 +218,7 @@ rfi_r2v_1:
219 218
220/************************ 64-bit real-mode calls ***********************/ 219/************************ 64-bit real-mode calls ***********************/
221/* This is only usable in wide kernels right now and will probably stay so */ 220/* This is only usable in wide kernels right now and will probably stay so */
222 __HEAD 221 .text
223 /* unsigned long real64_call_asm(unsigned long *sp, 222 /* unsigned long real64_call_asm(unsigned long *sp,
224 * unsigned long *arg0p, 223 * unsigned long *arg0p,
225 * unsigned long fn) 224 * unsigned long fn)
@@ -277,7 +276,7 @@ ENDPROC(real64_call_asm)
277 276
278#endif 277#endif
279 278
280 __HEAD 279 .text
281 /* http://lists.parisc-linux.org/hypermail/parisc-linux/10916.html 280 /* http://lists.parisc-linux.org/hypermail/parisc-linux/10916.html
282 ** GCC 3.3 and later has a new function in libgcc.a for 281 ** GCC 3.3 and later has a new function in libgcc.a for
283 ** comparing function pointers. 282 ** comparing function pointers.
diff --git a/arch/parisc/kernel/signal32.c b/arch/parisc/kernel/signal32.c
index db94affe5c71..fb59852006de 100644
--- a/arch/parisc/kernel/signal32.c
+++ b/arch/parisc/kernel/signal32.c
@@ -289,7 +289,7 @@ setup_sigcontext32(struct compat_sigcontext __user *sc, struct compat_regfile __
289 &sc->sc_iaoq[0], compat_reg); 289 &sc->sc_iaoq[0], compat_reg);
290 290
291 /* Store upper half */ 291 /* Store upper half */
292 compat_reg = (compat_uint_t)(regs->gr[32] >> 32); 292 compat_reg = (compat_uint_t)(regs->gr[31] >> 32);
293 err |= __put_user(compat_reg, &rf->rf_iaoq[0]); 293 err |= __put_user(compat_reg, &rf->rf_iaoq[0]);
294 DBG(2,"setup_sigcontext32: upper half iaoq[0] = %#x\n", compat_reg); 294 DBG(2,"setup_sigcontext32: upper half iaoq[0] = %#x\n", compat_reg);
295 295
@@ -299,7 +299,7 @@ setup_sigcontext32(struct compat_sigcontext __user *sc, struct compat_regfile __
299 DBG(2,"setup_sigcontext32: sc->sc_iaoq[1] = %p <= %#x\n", 299 DBG(2,"setup_sigcontext32: sc->sc_iaoq[1] = %p <= %#x\n",
300 &sc->sc_iaoq[1], compat_reg); 300 &sc->sc_iaoq[1], compat_reg);
301 /* Store upper half */ 301 /* Store upper half */
302 compat_reg = (compat_uint_t)((regs->gr[32]+4) >> 32); 302 compat_reg = (compat_uint_t)((regs->gr[31]+4) >> 32);
303 err |= __put_user(compat_reg, &rf->rf_iaoq[1]); 303 err |= __put_user(compat_reg, &rf->rf_iaoq[1]);
304 DBG(2,"setup_sigcontext32: upper half iaoq[1] = %#x\n", compat_reg); 304 DBG(2,"setup_sigcontext32: upper half iaoq[1] = %#x\n", compat_reg);
305 305
diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
index ae509d8cd03f..69b6eebc466e 100644
--- a/arch/parisc/kernel/syscall.S
+++ b/arch/parisc/kernel/syscall.S
@@ -17,7 +17,6 @@
17#include <asm/processor.h> 17#include <asm/processor.h>
18 18
19#include <linux/linkage.h> 19#include <linux/linkage.h>
20#include <linux/init.h>
21 20
22 /* We fill the empty parts of the gateway page with 21 /* We fill the empty parts of the gateway page with
23 * something that will kill the kernel or a 22 * something that will kill the kernel or a
@@ -27,7 +26,7 @@
27 26
28 .level LEVEL 27 .level LEVEL
29 28
30 __HEAD 29 .text
31 30
32 .import syscall_exit,code 31 .import syscall_exit,code
33 .import syscall_exit_rfi,code 32 .import syscall_exit_rfi,code
@@ -637,7 +636,7 @@ END(sys_call_table64)
637 All light-weight-syscall atomic operations 636 All light-weight-syscall atomic operations
638 will use this set of locks 637 will use this set of locks
639 */ 638 */
640 .section .data, "aw" 639 .section .data
641 .align PAGE_SIZE 640 .align PAGE_SIZE
642ENTRY(lws_lock_start) 641ENTRY(lws_lock_start)
643 /* lws locks */ 642 /* lws locks */
diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S
index 50b4a3a25d0a..2e516b871752 100644
--- a/arch/parisc/kernel/vmlinux.lds.S
+++ b/arch/parisc/kernel/vmlinux.lds.S
@@ -50,6 +50,7 @@ SECTIONS
50 50
51 _text = .; /* Text and read-only data */ 51 _text = .; /* Text and read-only data */
52 .text ALIGN(16) : { 52 .text ALIGN(16) : {
53 HEAD_TEXT
53 TEXT_TEXT 54 TEXT_TEXT
54 SCHED_TEXT 55 SCHED_TEXT
55 LOCK_TEXT 56 LOCK_TEXT
diff --git a/arch/parisc/lib/fixup.S b/arch/parisc/lib/fixup.S
index 4821ad6d5269..d172d4245cdc 100644
--- a/arch/parisc/lib/fixup.S
+++ b/arch/parisc/lib/fixup.S
@@ -23,7 +23,6 @@
23#include <asm/assembly.h> 23#include <asm/assembly.h>
24#include <asm/errno.h> 24#include <asm/errno.h>
25#include <linux/linkage.h> 25#include <linux/linkage.h>
26#include <linux/init.h>
27 26
28#ifdef CONFIG_SMP 27#ifdef CONFIG_SMP
29 .macro get_fault_ip t1 t2 28 .macro get_fault_ip t1 t2
@@ -56,7 +55,7 @@
56 55
57 .level LEVEL 56 .level LEVEL
58 57
59 __HEAD 58 .text
60 .section .fixup, "ax" 59 .section .fixup, "ax"
61 60
62 /* get_user() fixups, store -EFAULT in r8, and 0 in r9 */ 61 /* get_user() fixups, store -EFAULT in r8, and 0 in r9 */
diff --git a/arch/parisc/lib/lusercopy.S b/arch/parisc/lib/lusercopy.S
index b0d885350846..1bd23ccec17b 100644
--- a/arch/parisc/lib/lusercopy.S
+++ b/arch/parisc/lib/lusercopy.S
@@ -33,12 +33,11 @@
33 */ 33 */
34 34
35 35
36 .text
37
36#include <asm/assembly.h> 38#include <asm/assembly.h>
37#include <asm/errno.h> 39#include <asm/errno.h>
38#include <linux/linkage.h> 40#include <linux/linkage.h>
39#include <linux/init.h>
40
41 __HEAD
42 41
43 /* 42 /*
44 * get_sr gets the appropriate space value into 43 * get_sr gets the appropriate space value into
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 78fe252b92c3..ce0da689a89d 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -547,6 +547,7 @@ void __init mem_init(void)
547} 547}
548 548
549unsigned long *empty_zero_page __read_mostly; 549unsigned long *empty_zero_page __read_mostly;
550EXPORT_SYMBOL(empty_zero_page);
550 551
551void show_mem(void) 552void show_mem(void)
552{ 553{
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 9dcdc036cdf7..b7d4c4ce2fe6 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -96,6 +96,8 @@ endif
96else 96else
97 KBUILD_CFLAGS += $(call cc-option,-mtune=power4) 97 KBUILD_CFLAGS += $(call cc-option,-mtune=power4)
98endif 98endif
99else
100LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o
99endif 101endif
100 102
101ifeq ($(CONFIG_TUNE_CELL),y) 103ifeq ($(CONFIG_TUNE_CELL),y)
@@ -154,7 +156,7 @@ all: zImage
154 156
155CPPFLAGS_vmlinux.lds := -Upowerpc 157CPPFLAGS_vmlinux.lds := -Upowerpc
156 158
157BOOT_TARGETS = zImage zImage.initrd uImage zImage% dtbImage% treeImage.% cuImage.% 159BOOT_TARGETS = zImage zImage.initrd uImage zImage% dtbImage% treeImage.% cuImage.% simpleImage.%
158 160
159PHONY += $(BOOT_TARGETS) 161PHONY += $(BOOT_TARGETS)
160 162
diff --git a/arch/powerpc/boot/.gitignore b/arch/powerpc/boot/.gitignore
index 2347294ff35b..2f50acd11a60 100644
--- a/arch/powerpc/boot/.gitignore
+++ b/arch/powerpc/boot/.gitignore
@@ -20,21 +20,19 @@ kernel-vmlinux.strip.gz
20mktree 20mktree
21uImage 21uImage
22cuImage.* 22cuImage.*
23dtbImage.*
23treeImage.* 24treeImage.*
24zImage 25zImage
26zImage.initrd
25zImage.bin.* 27zImage.bin.*
26zImage.chrp 28zImage.chrp
27zImage.coff 29zImage.coff
28zImage.coff.lds 30zImage.holly
29zImage.ep*
30zImage.iseries 31zImage.iseries
31zImage.*lds 32zImage.*lds
32zImage.miboot 33zImage.miboot
33zImage.pmac 34zImage.pmac
34zImage.pseries 35zImage.pseries
35zImage.redboot*
36zImage.sandpoint
37zImage.vmode
38zconf.h 36zconf.h
39zlib.h 37zlib.h
40zutil.h 38zutil.h
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 7822d25c9d31..095e04db1c0e 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -51,7 +51,7 @@ $(addprefix $(obj)/,$(zlib) gunzip_util.o main.o): \
51 $(addprefix $(obj)/,$(zliblinuxheader)) $(addprefix $(obj)/,$(zlibheader)) 51 $(addprefix $(obj)/,$(zliblinuxheader)) $(addprefix $(obj)/,$(zlibheader))
52 52
53src-libfdt := fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c 53src-libfdt := fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c
54src-wlib := string.S crt0.S stdio.c main.c \ 54src-wlib := string.S crt0.S crtsavres.S stdio.c main.c \
55 $(addprefix libfdt/,$(src-libfdt)) libfdt-wrapper.c \ 55 $(addprefix libfdt/,$(src-libfdt)) libfdt-wrapper.c \
56 ns16550.c serial.c simple_alloc.c div64.S util.S \ 56 ns16550.c serial.c simple_alloc.c div64.S util.S \
57 gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \ 57 gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \
@@ -99,7 +99,7 @@ $(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds: $(obj)/%: $(srct
99 @cp $< $@ 99 @cp $< $@
100 100
101clean-files := $(zlib) $(zlibheader) $(zliblinuxheader) \ 101clean-files := $(zlib) $(zlibheader) $(zliblinuxheader) \
102 empty.c zImage zImage.coff.lds zImage.ps3.lds zImage.lds 102 empty.c zImage.coff.lds zImage.ps3.lds zImage.lds
103 103
104quiet_cmd_bootcc = BOOTCC $@ 104quiet_cmd_bootcc = BOOTCC $@
105 cmd_bootcc = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $< 105 cmd_bootcc = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $<
@@ -221,8 +221,8 @@ image-$(CONFIG_WARP) += cuImage.warp
221image-$(CONFIG_YOSEMITE) += cuImage.yosemite 221image-$(CONFIG_YOSEMITE) += cuImage.yosemite
222 222
223# Board ports in arch/powerpc/platform/8xx/Kconfig 223# Board ports in arch/powerpc/platform/8xx/Kconfig
224image-$(CONFIG_PPC_MPC86XADS) += cuImage.mpc866ads 224image-$(CONFIG_MPC86XADS) += cuImage.mpc866ads
225image-$(CONFIG_PPC_MPC885ADS) += cuImage.mpc885ads 225image-$(CONFIG_MPC885ADS) += cuImage.mpc885ads
226image-$(CONFIG_PPC_EP88XC) += dtbImage.ep88xc 226image-$(CONFIG_PPC_EP88XC) += dtbImage.ep88xc
227image-$(CONFIG_PPC_ADDER875) += cuImage.adder875-uboot \ 227image-$(CONFIG_PPC_ADDER875) += cuImage.adder875-uboot \
228 dtbImage.adder875-redboot 228 dtbImage.adder875-redboot
@@ -273,7 +273,8 @@ endif
273initrd- := $(patsubst zImage%, zImage.initrd%, $(image-n) $(image-)) 273initrd- := $(patsubst zImage%, zImage.initrd%, $(image-n) $(image-))
274initrd-y := $(patsubst zImage%, zImage.initrd%, \ 274initrd-y := $(patsubst zImage%, zImage.initrd%, \
275 $(patsubst dtbImage%, dtbImage.initrd%, \ 275 $(patsubst dtbImage%, dtbImage.initrd%, \
276 $(patsubst treeImage%, treeImage.initrd%, $(image-y)))) 276 $(patsubst simpleImage%, simpleImage.initrd%, \
277 $(patsubst treeImage%, treeImage.initrd%, $(image-y)))))
277initrd-y := $(filter-out $(image-y), $(initrd-y)) 278initrd-y := $(filter-out $(image-y), $(initrd-y))
278targets += $(image-y) $(initrd-y) 279targets += $(image-y) $(initrd-y)
279 280
@@ -339,7 +340,9 @@ install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y))
339 sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $< 340 sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $<
340 341
341# anything not in $(targets) 342# anything not in $(targets)
342clean-files += $(image-) $(initrd-) zImage zImage.initrd cuImage.* treeImage.* \ 343clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \
344 zImage zImage.initrd zImage.chrp zImage.coff zImage.holly \
345 zImage.iseries zImage.miboot zImage.pmac zImage.pseries \
343 otheros.bld *.dtb 346 otheros.bld *.dtb
344 347
345# clean up files cached by wrapper 348# clean up files cached by wrapper
diff --git a/arch/powerpc/boot/crtsavres.S b/arch/powerpc/boot/crtsavres.S
new file mode 100644
index 000000000000..f3d9b35c07d4
--- /dev/null
+++ b/arch/powerpc/boot/crtsavres.S
@@ -0,0 +1,233 @@
1/*
2 * Special support for eabi and SVR4
3 *
4 * Copyright (C) 1995, 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
5 * Copyright 2008 Freescale Semiconductor, Inc.
6 * Written By Michael Meissner
7 *
8 * Based on gcc/config/rs6000/crtsavres.asm from gcc
9 *
10 * This file 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, or (at your option) any
13 * later version.
14 *
15 * In addition to the permissions in the GNU General Public License, the
16 * Free Software Foundation gives you unlimited permission to link the
17 * compiled version of this file with other programs, and to distribute
18 * those programs without any restriction coming from the use of this
19 * file. (The General Public License restrictions do apply in other
20 * respects; for example, they cover modification of the file, and
21 * distribution when not linked into another program.)
22 *
23 * This file is distributed in the hope that it will be useful, but
24 * WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
26 * General Public License for more details.
27 *
28 * You should have received a copy of the GNU General Public License
29 * along with this program; see the file COPYING. If not, write to
30 * the Free Software Foundation, 51 Franklin Street, Fifth Floor,
31 * Boston, MA 02110-1301, USA.
32 *
33 * As a special exception, if you link this library with files
34 * compiled with GCC to produce an executable, this does not cause
35 * the resulting executable to be covered by the GNU General Public License.
36 * This exception does not however invalidate any other reasons why
37 * the executable file might be covered by the GNU General Public License.
38 */
39
40 .file "crtsavres.S"
41 .section ".text"
42
43/* On PowerPC64 Linux, these functions are provided by the linker. */
44#ifndef __powerpc64__
45
46#define _GLOBAL(name) \
47 .type name,@function; \
48 .globl name; \
49name:
50
51/* Routines for saving integer registers, called by the compiler. */
52/* Called with r11 pointing to the stack header word of the caller of the */
53/* function, just beyond the end of the integer save area. */
54
55_GLOBAL(_savegpr_14)
56_GLOBAL(_save32gpr_14)
57 stw 14,-72(11) /* save gp registers */
58_GLOBAL(_savegpr_15)
59_GLOBAL(_save32gpr_15)
60 stw 15,-68(11)
61_GLOBAL(_savegpr_16)
62_GLOBAL(_save32gpr_16)
63 stw 16,-64(11)
64_GLOBAL(_savegpr_17)
65_GLOBAL(_save32gpr_17)
66 stw 17,-60(11)
67_GLOBAL(_savegpr_18)
68_GLOBAL(_save32gpr_18)
69 stw 18,-56(11)
70_GLOBAL(_savegpr_19)
71_GLOBAL(_save32gpr_19)
72 stw 19,-52(11)
73_GLOBAL(_savegpr_20)
74_GLOBAL(_save32gpr_20)
75 stw 20,-48(11)
76_GLOBAL(_savegpr_21)
77_GLOBAL(_save32gpr_21)
78 stw 21,-44(11)
79_GLOBAL(_savegpr_22)
80_GLOBAL(_save32gpr_22)
81 stw 22,-40(11)
82_GLOBAL(_savegpr_23)
83_GLOBAL(_save32gpr_23)
84 stw 23,-36(11)
85_GLOBAL(_savegpr_24)
86_GLOBAL(_save32gpr_24)
87 stw 24,-32(11)
88_GLOBAL(_savegpr_25)
89_GLOBAL(_save32gpr_25)
90 stw 25,-28(11)
91_GLOBAL(_savegpr_26)
92_GLOBAL(_save32gpr_26)
93 stw 26,-24(11)
94_GLOBAL(_savegpr_27)
95_GLOBAL(_save32gpr_27)
96 stw 27,-20(11)
97_GLOBAL(_savegpr_28)
98_GLOBAL(_save32gpr_28)
99 stw 28,-16(11)
100_GLOBAL(_savegpr_29)
101_GLOBAL(_save32gpr_29)
102 stw 29,-12(11)
103_GLOBAL(_savegpr_30)
104_GLOBAL(_save32gpr_30)
105 stw 30,-8(11)
106_GLOBAL(_savegpr_31)
107_GLOBAL(_save32gpr_31)
108 stw 31,-4(11)
109 blr
110
111/* Routines for restoring integer registers, called by the compiler. */
112/* Called with r11 pointing to the stack header word of the caller of the */
113/* function, just beyond the end of the integer restore area. */
114
115_GLOBAL(_restgpr_14)
116_GLOBAL(_rest32gpr_14)
117 lwz 14,-72(11) /* restore gp registers */
118_GLOBAL(_restgpr_15)
119_GLOBAL(_rest32gpr_15)
120 lwz 15,-68(11)
121_GLOBAL(_restgpr_16)
122_GLOBAL(_rest32gpr_16)
123 lwz 16,-64(11)
124_GLOBAL(_restgpr_17)
125_GLOBAL(_rest32gpr_17)
126 lwz 17,-60(11)
127_GLOBAL(_restgpr_18)
128_GLOBAL(_rest32gpr_18)
129 lwz 18,-56(11)
130_GLOBAL(_restgpr_19)
131_GLOBAL(_rest32gpr_19)
132 lwz 19,-52(11)
133_GLOBAL(_restgpr_20)
134_GLOBAL(_rest32gpr_20)
135 lwz 20,-48(11)
136_GLOBAL(_restgpr_21)
137_GLOBAL(_rest32gpr_21)
138 lwz 21,-44(11)
139_GLOBAL(_restgpr_22)
140_GLOBAL(_rest32gpr_22)
141 lwz 22,-40(11)
142_GLOBAL(_restgpr_23)
143_GLOBAL(_rest32gpr_23)
144 lwz 23,-36(11)
145_GLOBAL(_restgpr_24)
146_GLOBAL(_rest32gpr_24)
147 lwz 24,-32(11)
148_GLOBAL(_restgpr_25)
149_GLOBAL(_rest32gpr_25)
150 lwz 25,-28(11)
151_GLOBAL(_restgpr_26)
152_GLOBAL(_rest32gpr_26)
153 lwz 26,-24(11)
154_GLOBAL(_restgpr_27)
155_GLOBAL(_rest32gpr_27)
156 lwz 27,-20(11)
157_GLOBAL(_restgpr_28)
158_GLOBAL(_rest32gpr_28)
159 lwz 28,-16(11)
160_GLOBAL(_restgpr_29)
161_GLOBAL(_rest32gpr_29)
162 lwz 29,-12(11)
163_GLOBAL(_restgpr_30)
164_GLOBAL(_rest32gpr_30)
165 lwz 30,-8(11)
166_GLOBAL(_restgpr_31)
167_GLOBAL(_rest32gpr_31)
168 lwz 31,-4(11)
169 blr
170
171/* Routines for restoring integer registers, called by the compiler. */
172/* Called with r11 pointing to the stack header word of the caller of the */
173/* function, just beyond the end of the integer restore area. */
174
175_GLOBAL(_restgpr_14_x)
176_GLOBAL(_rest32gpr_14_x)
177 lwz 14,-72(11) /* restore gp registers */
178_GLOBAL(_restgpr_15_x)
179_GLOBAL(_rest32gpr_15_x)
180 lwz 15,-68(11)
181_GLOBAL(_restgpr_16_x)
182_GLOBAL(_rest32gpr_16_x)
183 lwz 16,-64(11)
184_GLOBAL(_restgpr_17_x)
185_GLOBAL(_rest32gpr_17_x)
186 lwz 17,-60(11)
187_GLOBAL(_restgpr_18_x)
188_GLOBAL(_rest32gpr_18_x)
189 lwz 18,-56(11)
190_GLOBAL(_restgpr_19_x)
191_GLOBAL(_rest32gpr_19_x)
192 lwz 19,-52(11)
193_GLOBAL(_restgpr_20_x)
194_GLOBAL(_rest32gpr_20_x)
195 lwz 20,-48(11)
196_GLOBAL(_restgpr_21_x)
197_GLOBAL(_rest32gpr_21_x)
198 lwz 21,-44(11)
199_GLOBAL(_restgpr_22_x)
200_GLOBAL(_rest32gpr_22_x)
201 lwz 22,-40(11)
202_GLOBAL(_restgpr_23_x)
203_GLOBAL(_rest32gpr_23_x)
204 lwz 23,-36(11)
205_GLOBAL(_restgpr_24_x)
206_GLOBAL(_rest32gpr_24_x)
207 lwz 24,-32(11)
208_GLOBAL(_restgpr_25_x)
209_GLOBAL(_rest32gpr_25_x)
210 lwz 25,-28(11)
211_GLOBAL(_restgpr_26_x)
212_GLOBAL(_rest32gpr_26_x)
213 lwz 26,-24(11)
214_GLOBAL(_restgpr_27_x)
215_GLOBAL(_rest32gpr_27_x)
216 lwz 27,-20(11)
217_GLOBAL(_restgpr_28_x)
218_GLOBAL(_rest32gpr_28_x)
219 lwz 28,-16(11)
220_GLOBAL(_restgpr_29_x)
221_GLOBAL(_rest32gpr_29_x)
222 lwz 29,-12(11)
223_GLOBAL(_restgpr_30_x)
224_GLOBAL(_rest32gpr_30_x)
225 lwz 30,-8(11)
226_GLOBAL(_restgpr_31_x)
227_GLOBAL(_rest32gpr_31_x)
228 lwz 0,4(11)
229 lwz 31,-4(11)
230 mtlr 0
231 mr 1,11
232 blr
233#endif
diff --git a/arch/powerpc/boot/dts/mpc8377_mds.dts b/arch/powerpc/boot/dts/mpc8377_mds.dts
index 1e7802cc31ae..fea592574004 100644
--- a/arch/powerpc/boot/dts/mpc8377_mds.dts
+++ b/arch/powerpc/boot/dts/mpc8377_mds.dts
@@ -271,27 +271,35 @@
271 dma@82a8 { 271 dma@82a8 {
272 #address-cells = <1>; 272 #address-cells = <1>;
273 #size-cells = <1>; 273 #size-cells = <1>;
274 compatible = "fsl,mpc8349-dma"; 274 compatible = "fsl,mpc8377-dma", "fsl,elo-dma";
275 reg = <0x82a8 4>; 275 reg = <0x82a8 4>;
276 ranges = <0 0x8100 0x1a8>; 276 ranges = <0 0x8100 0x1a8>;
277 interrupt-parent = <&ipic>; 277 interrupt-parent = <&ipic>;
278 interrupts = <0x47 8>; 278 interrupts = <0x47 8>;
279 cell-index = <0>; 279 cell-index = <0>;
280 dma-channel@0 { 280 dma-channel@0 {
281 compatible = "fsl,mpc8349-dma-channel"; 281 compatible = "fsl,mpc8377-dma-channel", "fsl,elo-dma-channel";
282 reg = <0 0x80>; 282 reg = <0 0x80>;
283 interrupt-parent = <&ipic>;
284 interrupts = <0x47 8>;
283 }; 285 };
284 dma-channel@80 { 286 dma-channel@80 {
285 compatible = "fsl,mpc8349-dma-channel"; 287 compatible = "fsl,mpc8377-dma-channel", "fsl,elo-dma-channel";
286 reg = <0x80 0x80>; 288 reg = <0x80 0x80>;
289 interrupt-parent = <&ipic>;
290 interrupts = <0x47 8>;
287 }; 291 };
288 dma-channel@100 { 292 dma-channel@100 {
289 compatible = "fsl,mpc8349-dma-channel"; 293 compatible = "fsl,mpc8377-dma-channel", "fsl,elo-dma-channel";
290 reg = <0x100 0x80>; 294 reg = <0x100 0x80>;
295 interrupt-parent = <&ipic>;
296 interrupts = <0x47 8>;
291 }; 297 };
292 dma-channel@180 { 298 dma-channel@180 {
293 compatible = "fsl,mpc8349-dma-channel"; 299 compatible = "fsl,mpc8377-dma-channel", "fsl,elo-dma-channel";
294 reg = <0x180 0x28>; 300 reg = <0x180 0x28>;
301 interrupt-parent = <&ipic>;
302 interrupts = <0x47 8>;
295 }; 303 };
296 }; 304 };
297 305
diff --git a/arch/powerpc/boot/dts/mpc8377_rdb.dts b/arch/powerpc/boot/dts/mpc8377_rdb.dts
index 5bc09ad016f5..f3083c779b66 100644
--- a/arch/powerpc/boot/dts/mpc8377_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8377_rdb.dts
@@ -164,12 +164,6 @@
164 reg = <0x2>; 164 reg = <0x2>;
165 device_type = "ethernet-phy"; 165 device_type = "ethernet-phy";
166 }; 166 };
167 phy3: ethernet-phy@3 {
168 interrupt-parent = <&ipic>;
169 interrupts = <18 0x8>;
170 reg = <0x3>;
171 device_type = "ethernet-phy";
172 };
173 }; 167 };
174 168
175 enet0: ethernet@24000 { 169 enet0: ethernet@24000 {
@@ -195,7 +189,7 @@
195 interrupts = <35 0x8 36 0x8 37 0x8>; 189 interrupts = <35 0x8 36 0x8 37 0x8>;
196 phy-connection-type = "mii"; 190 phy-connection-type = "mii";
197 interrupt-parent = <&ipic>; 191 interrupt-parent = <&ipic>;
198 phy-handle = <&phy3>; 192 fixed-link = <1 1 1000 0 0>;
199 }; 193 };
200 194
201 serial0: serial@4500 { 195 serial0: serial@4500 {
diff --git a/arch/powerpc/boot/dts/mpc8378_rdb.dts b/arch/powerpc/boot/dts/mpc8378_rdb.dts
index 711f9a30f9ab..0e872a60e091 100644
--- a/arch/powerpc/boot/dts/mpc8378_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8378_rdb.dts
@@ -164,12 +164,6 @@
164 reg = <0x2>; 164 reg = <0x2>;
165 device_type = "ethernet-phy"; 165 device_type = "ethernet-phy";
166 }; 166 };
167 phy3: ethernet-phy@3 {
168 interrupt-parent = <&ipic>;
169 interrupts = <18 0x8>;
170 reg = <0x3>;
171 device_type = "ethernet-phy";
172 };
173 }; 167 };
174 168
175 enet0: ethernet@24000 { 169 enet0: ethernet@24000 {
@@ -195,7 +189,7 @@
195 interrupts = <35 0x8 36 0x8 37 0x8>; 189 interrupts = <35 0x8 36 0x8 37 0x8>;
196 phy-connection-type = "mii"; 190 phy-connection-type = "mii";
197 interrupt-parent = <&ipic>; 191 interrupt-parent = <&ipic>;
198 phy-handle = <&phy3>; 192 fixed-link = <1 1 1000 0 0>;
199 }; 193 };
200 194
201 serial0: serial@4500 { 195 serial0: serial@4500 {
diff --git a/arch/powerpc/boot/dts/mpc8379_rdb.dts b/arch/powerpc/boot/dts/mpc8379_rdb.dts
index c11ceb7d3299..1eb8defaff6f 100644
--- a/arch/powerpc/boot/dts/mpc8379_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc8379_rdb.dts
@@ -164,12 +164,6 @@
164 reg = <0x2>; 164 reg = <0x2>;
165 device_type = "ethernet-phy"; 165 device_type = "ethernet-phy";
166 }; 166 };
167 phy3: ethernet-phy@3 {
168 interrupt-parent = <&ipic>;
169 interrupts = <18 0x8>;
170 reg = <0x3>;
171 device_type = "ethernet-phy";
172 };
173 }; 167 };
174 168
175 enet0: ethernet@24000 { 169 enet0: ethernet@24000 {
@@ -195,7 +189,7 @@
195 interrupts = <35 0x8 36 0x8 37 0x8>; 189 interrupts = <35 0x8 36 0x8 37 0x8>;
196 phy-connection-type = "mii"; 190 phy-connection-type = "mii";
197 interrupt-parent = <&ipic>; 191 interrupt-parent = <&ipic>;
198 phy-handle = <&phy3>; 192 fixed-link = <1 1 1000 0 0>;
199 }; 193 };
200 194
201 serial0: serial@4500 { 195 serial0: serial@4500 {
diff --git a/arch/powerpc/boot/dts/mpc8548cds.dts b/arch/powerpc/boot/dts/mpc8548cds.dts
index fa298a8c81cc..4811b8107415 100644
--- a/arch/powerpc/boot/dts/mpc8548cds.dts
+++ b/arch/powerpc/boot/dts/mpc8548cds.dts
@@ -409,7 +409,7 @@
409 interrupts = <26 2>; 409 interrupts = <26 2>;
410 bus-range = <0 255>; 410 bus-range = <0 255>;
411 ranges = <0x2000000 0x0 0xa0000000 0xa0000000 0x0 0x20000000 411 ranges = <0x2000000 0x0 0xa0000000 0xa0000000 0x0 0x20000000
412 0x1000000 0x0 0x0 0xe3000000 0x0 0x8000000>; 412 0x1000000 0x0 0x0 0xe3000000 0x0 0x100000>;
413 clock-frequency = <33333333>; 413 clock-frequency = <33333333>;
414 #interrupt-cells = <1>; 414 #interrupt-cells = <1>;
415 #size-cells = <2>; 415 #size-cells = <2>;
@@ -428,7 +428,7 @@
428 428
429 0x1000000 0x0 0x0 429 0x1000000 0x0 0x0
430 0x1000000 0x0 0x0 430 0x1000000 0x0 0x0
431 0x0 0x8000000>; 431 0x0 0x100000>;
432 }; 432 };
433 }; 433 };
434}; 434};
diff --git a/arch/powerpc/boot/dts/mpc8610_hpcd.dts b/arch/powerpc/boot/dts/mpc8610_hpcd.dts
index 08a780d89807..fa9b6bbeb5af 100644
--- a/arch/powerpc/boot/dts/mpc8610_hpcd.dts
+++ b/arch/powerpc/boot/dts/mpc8610_hpcd.dts
@@ -251,14 +251,14 @@
251 dma@c300 { 251 dma@c300 {
252 #address-cells = <1>; 252 #address-cells = <1>;
253 #size-cells = <1>; 253 #size-cells = <1>;
254 compatible = "fsl,mpc8610-dma", "fsl,mpc8540-dma"; 254 compatible = "fsl,mpc8610-dma", "fsl,eloplus-dma";
255 cell-index = <1>; 255 cell-index = <1>;
256 reg = <0xc300 0x4>; /* DMA general status register */ 256 reg = <0xc300 0x4>; /* DMA general status register */
257 ranges = <0x0 0xc100 0x200>; 257 ranges = <0x0 0xc100 0x200>;
258 258
259 dma-channel@0 { 259 dma-channel@0 {
260 compatible = "fsl,mpc8610-dma-channel", 260 compatible = "fsl,mpc8610-dma-channel",
261 "fsl,mpc8540-dma-channel"; 261 "fsl,eloplus-dma-channel";
262 cell-index = <0>; 262 cell-index = <0>;
263 reg = <0x0 0x80>; 263 reg = <0x0 0x80>;
264 interrupt-parent = <&mpic>; 264 interrupt-parent = <&mpic>;
@@ -266,7 +266,7 @@
266 }; 266 };
267 dma-channel@1 { 267 dma-channel@1 {
268 compatible = "fsl,mpc8610-dma-channel", 268 compatible = "fsl,mpc8610-dma-channel",
269 "fsl,mpc8540-dma-channel"; 269 "fsl,eloplus-dma-channel";
270 cell-index = <1>; 270 cell-index = <1>;
271 reg = <0x80 0x80>; 271 reg = <0x80 0x80>;
272 interrupt-parent = <&mpic>; 272 interrupt-parent = <&mpic>;
@@ -274,7 +274,7 @@
274 }; 274 };
275 dma-channel@2 { 275 dma-channel@2 {
276 compatible = "fsl,mpc8610-dma-channel", 276 compatible = "fsl,mpc8610-dma-channel",
277 "fsl,mpc8540-dma-channel"; 277 "fsl,eloplus-dma-channel";
278 cell-index = <2>; 278 cell-index = <2>;
279 reg = <0x100 0x80>; 279 reg = <0x100 0x80>;
280 interrupt-parent = <&mpic>; 280 interrupt-parent = <&mpic>;
@@ -282,7 +282,7 @@
282 }; 282 };
283 dma-channel@3 { 283 dma-channel@3 {
284 compatible = "fsl,mpc8610-dma-channel", 284 compatible = "fsl,mpc8610-dma-channel",
285 "fsl,mpc8540-dma-channel"; 285 "fsl,eloplus-dma-channel";
286 cell-index = <3>; 286 cell-index = <3>;
287 reg = <0x180 0x80>; 287 reg = <0x180 0x80>;
288 interrupt-parent = <&mpic>; 288 interrupt-parent = <&mpic>;
diff --git a/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig b/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig
index 7d18440e398f..5428f9f5ed85 100644
--- a/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig
+++ b/arch/powerpc/configs/83xx/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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Fri Apr 11 11:10:09 2008 4# Mon Jun 9 08:52:21 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -31,6 +31,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y 31CONFIG_GENERIC_HARDIRQS=y
32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
33CONFIG_IRQ_PER_CPU=y 33CONFIG_IRQ_PER_CPU=y
34CONFIG_STACKTRACE_SUPPORT=y
35CONFIG_LOCKDEP_SUPPORT=y
34CONFIG_RWSEM_XCHGADD_ALGORITHM=y 36CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y 37CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y 38CONFIG_GENERIC_HWEIGHT=y
@@ -86,6 +88,7 @@ CONFIG_INITRAMFS_SOURCE=""
86CONFIG_SYSCTL=y 88CONFIG_SYSCTL=y
87CONFIG_EMBEDDED=y 89CONFIG_EMBEDDED=y
88CONFIG_SYSCTL_SYSCALL=y 90CONFIG_SYSCTL_SYSCALL=y
91CONFIG_SYSCTL_SYSCALL_CHECK=y
89# CONFIG_KALLSYMS is not set 92# CONFIG_KALLSYMS is not set
90CONFIG_HOTPLUG=y 93CONFIG_HOTPLUG=y
91CONFIG_PRINTK=y 94CONFIG_PRINTK=y
@@ -110,12 +113,14 @@ CONFIG_SLUB=y
110CONFIG_HAVE_OPROFILE=y 113CONFIG_HAVE_OPROFILE=y
111CONFIG_HAVE_KPROBES=y 114CONFIG_HAVE_KPROBES=y
112CONFIG_HAVE_KRETPROBES=y 115CONFIG_HAVE_KRETPROBES=y
116# CONFIG_HAVE_DMA_ATTRS is not set
113CONFIG_PROC_PAGE_MONITOR=y 117CONFIG_PROC_PAGE_MONITOR=y
114CONFIG_SLABINFO=y 118CONFIG_SLABINFO=y
115CONFIG_RT_MUTEXES=y 119CONFIG_RT_MUTEXES=y
116# CONFIG_TINY_SHMEM is not set 120# CONFIG_TINY_SHMEM is not set
117CONFIG_BASE_SMALL=0 121CONFIG_BASE_SMALL=0
118CONFIG_MODULES=y 122CONFIG_MODULES=y
123# CONFIG_MODULE_FORCE_LOAD is not set
119CONFIG_MODULE_UNLOAD=y 124CONFIG_MODULE_UNLOAD=y
120# CONFIG_MODULE_FORCE_UNLOAD is not set 125# CONFIG_MODULE_FORCE_UNLOAD is not set
121# CONFIG_MODVERSIONS is not set 126# CONFIG_MODVERSIONS is not set
@@ -196,7 +201,6 @@ CONFIG_PREEMPT_NONE=y
196# CONFIG_PREEMPT is not set 201# CONFIG_PREEMPT is not set
197CONFIG_BINFMT_ELF=y 202CONFIG_BINFMT_ELF=y
198# CONFIG_BINFMT_MISC is not set 203# CONFIG_BINFMT_MISC is not set
199CONFIG_FORCE_MAX_ZONEORDER=11
200# CONFIG_IOMMU_HELPER is not set 204# CONFIG_IOMMU_HELPER is not set
201CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 205CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
202CONFIG_ARCH_HAS_WALK_MEMORY=y 206CONFIG_ARCH_HAS_WALK_MEMORY=y
@@ -211,11 +215,13 @@ CONFIG_FLATMEM=y
211CONFIG_FLAT_NODE_MEM_MAP=y 215CONFIG_FLAT_NODE_MEM_MAP=y
212# CONFIG_SPARSEMEM_STATIC is not set 216# CONFIG_SPARSEMEM_STATIC is not set
213# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 217# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
218CONFIG_PAGEFLAGS_EXTENDED=y
214CONFIG_SPLIT_PTLOCK_CPUS=4 219CONFIG_SPLIT_PTLOCK_CPUS=4
215# CONFIG_RESOURCES_64BIT is not set 220# CONFIG_RESOURCES_64BIT is not set
216CONFIG_ZONE_DMA_FLAG=1 221CONFIG_ZONE_DMA_FLAG=1
217CONFIG_BOUNCE=y 222CONFIG_BOUNCE=y
218CONFIG_VIRT_TO_BUS=y 223CONFIG_VIRT_TO_BUS=y
224CONFIG_FORCE_MAX_ZONEORDER=11
219CONFIG_PROC_DEVICETREE=y 225CONFIG_PROC_DEVICETREE=y
220# CONFIG_CMDLINE_BOOL is not set 226# CONFIG_CMDLINE_BOOL is not set
221# CONFIG_PM is not set 227# CONFIG_PM is not set
@@ -239,6 +245,7 @@ CONFIG_PCI_LEGACY=y
239# CONFIG_PCI_DEBUG is not set 245# CONFIG_PCI_DEBUG is not set
240# CONFIG_PCCARD is not set 246# CONFIG_PCCARD is not set
241# CONFIG_HOTPLUG_PCI is not set 247# CONFIG_HOTPLUG_PCI is not set
248# CONFIG_HAS_RAPIDIO is not set
242 249
243# 250#
244# Advanced setup 251# Advanced setup
@@ -248,11 +255,11 @@ CONFIG_PCI_LEGACY=y
248# 255#
249# Default settings for advanced configuration options are used 256# Default settings for advanced configuration options are used
250# 257#
251CONFIG_HIGHMEM_START=0xfe000000
252CONFIG_LOWMEM_SIZE=0x30000000 258CONFIG_LOWMEM_SIZE=0x30000000
259CONFIG_PAGE_OFFSET=0xc0000000
253CONFIG_KERNEL_START=0xc0000000 260CONFIG_KERNEL_START=0xc0000000
261CONFIG_PHYSICAL_START=0x00000000
254CONFIG_TASK_SIZE=0xc0000000 262CONFIG_TASK_SIZE=0xc0000000
255CONFIG_BOOT_LOAD=0x00800000
256 263
257# 264#
258# Networking 265# Networking
@@ -300,8 +307,6 @@ CONFIG_TCP_CONG_CUBIC=y
300CONFIG_DEFAULT_TCP_CONG="cubic" 307CONFIG_DEFAULT_TCP_CONG="cubic"
301# CONFIG_TCP_MD5SIG is not set 308# CONFIG_TCP_MD5SIG is not set
302# CONFIG_IPV6 is not set 309# CONFIG_IPV6 is not set
303# CONFIG_INET6_XFRM_TUNNEL is not set
304# CONFIG_INET6_TUNNEL is not set
305# CONFIG_NETWORK_SECMARK is not set 310# CONFIG_NETWORK_SECMARK is not set
306# CONFIG_NETFILTER is not set 311# CONFIG_NETFILTER is not set
307# CONFIG_IP_DCCP is not set 312# CONFIG_IP_DCCP is not set
@@ -362,6 +367,7 @@ CONFIG_MTD_PARTITIONS=y
362# CONFIG_MTD_REDBOOT_PARTS is not set 367# CONFIG_MTD_REDBOOT_PARTS is not set
363# CONFIG_MTD_CMDLINE_PARTS is not set 368# CONFIG_MTD_CMDLINE_PARTS is not set
364CONFIG_MTD_OF_PARTS=y 369CONFIG_MTD_OF_PARTS=y
370# CONFIG_MTD_AR7_PARTS is not set
365 371
366# 372#
367# User Modules And Translation Layers 373# User Modules And Translation Layers
@@ -445,6 +451,7 @@ CONFIG_MTD_NAND_FSL_ELBC=y
445# 451#
446# CONFIG_MTD_UBI is not set 452# CONFIG_MTD_UBI is not set
447CONFIG_OF_DEVICE=y 453CONFIG_OF_DEVICE=y
454CONFIG_OF_I2C=y
448# CONFIG_PARPORT is not set 455# CONFIG_PARPORT is not set
449CONFIG_BLK_DEV=y 456CONFIG_BLK_DEV=y
450# CONFIG_BLK_DEV_FD is not set 457# CONFIG_BLK_DEV_FD is not set
@@ -641,7 +648,6 @@ CONFIG_NETDEV_1000=y
641# CONFIG_SIS190 is not set 648# CONFIG_SIS190 is not set
642# CONFIG_SKGE is not set 649# CONFIG_SKGE is not set
643# CONFIG_SKY2 is not set 650# CONFIG_SKY2 is not set
644# CONFIG_SK98LIN is not set
645# CONFIG_VIA_VELOCITY is not set 651# CONFIG_VIA_VELOCITY is not set
646# CONFIG_TIGON3 is not set 652# CONFIG_TIGON3 is not set
647# CONFIG_BNX2 is not set 653# CONFIG_BNX2 is not set
@@ -661,6 +667,7 @@ CONFIG_NETDEV_10000=y
661# CONFIG_MLX4_CORE is not set 667# CONFIG_MLX4_CORE is not set
662# CONFIG_TEHUTI is not set 668# CONFIG_TEHUTI is not set
663# CONFIG_BNX2X is not set 669# CONFIG_BNX2X is not set
670# CONFIG_SFC is not set
664# CONFIG_TR is not set 671# CONFIG_TR is not set
665 672
666# 673#
@@ -668,6 +675,7 @@ CONFIG_NETDEV_10000=y
668# 675#
669# CONFIG_WLAN_PRE80211 is not set 676# CONFIG_WLAN_PRE80211 is not set
670# CONFIG_WLAN_80211 is not set 677# CONFIG_WLAN_80211 is not set
678# CONFIG_IWLWIFI_LEDS is not set
671 679
672# 680#
673# USB Network Adapters 681# USB Network Adapters
@@ -724,6 +732,7 @@ CONFIG_INPUT=y
724# Character devices 732# Character devices
725# 733#
726# CONFIG_VT is not set 734# CONFIG_VT is not set
735CONFIG_DEVKMEM=y
727# CONFIG_SERIAL_NONSTANDARD is not set 736# CONFIG_SERIAL_NONSTANDARD is not set
728# CONFIG_NOZOMI is not set 737# CONFIG_NOZOMI is not set
729 738
@@ -751,7 +760,6 @@ CONFIG_LEGACY_PTY_COUNT=256
751# CONFIG_IPMI_HANDLER is not set 760# CONFIG_IPMI_HANDLER is not set
752CONFIG_HW_RANDOM=y 761CONFIG_HW_RANDOM=y
753# CONFIG_NVRAM is not set 762# CONFIG_NVRAM is not set
754# CONFIG_GEN_RTC is not set
755# CONFIG_R3964 is not set 763# CONFIG_R3964 is not set
756# CONFIG_APPLICOM is not set 764# CONFIG_APPLICOM is not set
757# CONFIG_RAW_DRIVER is not set 765# CONFIG_RAW_DRIVER is not set
@@ -762,13 +770,6 @@ CONFIG_I2C_BOARDINFO=y
762CONFIG_I2C_CHARDEV=y 770CONFIG_I2C_CHARDEV=y
763 771
764# 772#
765# I2C Algorithms
766#
767# CONFIG_I2C_ALGOBIT is not set
768# CONFIG_I2C_ALGOPCF is not set
769# CONFIG_I2C_ALGOPCA is not set
770
771#
772# I2C Hardware Bus support 773# I2C Hardware Bus support
773# 774#
774# CONFIG_I2C_ALI1535 is not set 775# CONFIG_I2C_ALI1535 is not set
@@ -795,6 +796,7 @@ CONFIG_I2C_MPC=y
795# CONFIG_I2C_VIA is not set 796# CONFIG_I2C_VIA is not set
796# CONFIG_I2C_VIAPRO is not set 797# CONFIG_I2C_VIAPRO is not set
797# CONFIG_I2C_VOODOO3 is not set 798# CONFIG_I2C_VOODOO3 is not set
799# CONFIG_I2C_PCA_PLATFORM is not set
798 800
799# 801#
800# Miscellaneous I2C Chip support 802# Miscellaneous I2C Chip support
@@ -804,17 +806,12 @@ CONFIG_I2C_MPC=y
804# CONFIG_SENSORS_PCF8574 is not set 806# CONFIG_SENSORS_PCF8574 is not set
805# CONFIG_PCF8575 is not set 807# CONFIG_PCF8575 is not set
806# CONFIG_SENSORS_PCF8591 is not set 808# CONFIG_SENSORS_PCF8591 is not set
807# CONFIG_TPS65010 is not set
808# CONFIG_SENSORS_MAX6875 is not set 809# CONFIG_SENSORS_MAX6875 is not set
809# CONFIG_SENSORS_TSL2550 is not set 810# CONFIG_SENSORS_TSL2550 is not set
810# CONFIG_I2C_DEBUG_CORE is not set 811# CONFIG_I2C_DEBUG_CORE is not set
811# CONFIG_I2C_DEBUG_ALGO is not set 812# CONFIG_I2C_DEBUG_ALGO is not set
812# CONFIG_I2C_DEBUG_BUS is not set 813# CONFIG_I2C_DEBUG_BUS is not set
813# CONFIG_I2C_DEBUG_CHIP is not set 814# CONFIG_I2C_DEBUG_CHIP is not set
814
815#
816# SPI support
817#
818CONFIG_SPI=y 815CONFIG_SPI=y
819# CONFIG_SPI_DEBUG is not set 816# CONFIG_SPI_DEBUG is not set
820CONFIG_SPI_MASTER=y 817CONFIG_SPI_MASTER=y
@@ -919,12 +916,22 @@ CONFIG_SSB_POSSIBLE=y
919# Multifunction device drivers 916# Multifunction device drivers
920# 917#
921# CONFIG_MFD_SM501 is not set 918# CONFIG_MFD_SM501 is not set
919# CONFIG_HTC_PASIC3 is not set
922 920
923# 921#
924# Multimedia devices 922# Multimedia devices
925# 923#
924
925#
926# Multimedia core support
927#
926# CONFIG_VIDEO_DEV is not set 928# CONFIG_VIDEO_DEV is not set
927# CONFIG_DVB_CORE is not set 929# CONFIG_DVB_CORE is not set
930# CONFIG_VIDEO_MEDIA is not set
931
932#
933# Multimedia drivers
934#
928CONFIG_DAB=y 935CONFIG_DAB=y
929# CONFIG_USB_DABUSB is not set 936# CONFIG_USB_DABUSB is not set
930 937
@@ -977,16 +984,20 @@ CONFIG_USB_DEVICEFS=y
977CONFIG_USB_DEVICE_CLASS=y 984CONFIG_USB_DEVICE_CLASS=y
978# CONFIG_USB_DYNAMIC_MINORS is not set 985# CONFIG_USB_DYNAMIC_MINORS is not set
979# CONFIG_USB_OTG is not set 986# CONFIG_USB_OTG is not set
987# CONFIG_USB_OTG_WHITELIST is not set
988# CONFIG_USB_OTG_BLACKLIST_HUB is not set
980 989
981# 990#
982# USB Host Controller Drivers 991# USB Host Controller Drivers
983# 992#
993# CONFIG_USB_C67X00_HCD is not set
984CONFIG_USB_EHCI_HCD=y 994CONFIG_USB_EHCI_HCD=y
985CONFIG_USB_EHCI_ROOT_HUB_TT=y 995CONFIG_USB_EHCI_ROOT_HUB_TT=y
986# CONFIG_USB_EHCI_TT_NEWSCHED is not set 996# CONFIG_USB_EHCI_TT_NEWSCHED is not set
987CONFIG_USB_EHCI_FSL=y 997CONFIG_USB_EHCI_FSL=y
988CONFIG_USB_EHCI_HCD_PPC_OF=y 998CONFIG_USB_EHCI_HCD_PPC_OF=y
989# CONFIG_USB_ISP116X_HCD is not set 999# CONFIG_USB_ISP116X_HCD is not set
1000# CONFIG_USB_ISP1760_HCD is not set
990CONFIG_USB_OHCI_HCD=y 1001CONFIG_USB_OHCI_HCD=y
991CONFIG_USB_OHCI_HCD_PPC_OF=y 1002CONFIG_USB_OHCI_HCD_PPC_OF=y
992CONFIG_USB_OHCI_HCD_PPC_OF_BE=y 1003CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
@@ -1004,6 +1015,7 @@ CONFIG_USB_UHCI_HCD=y
1004# 1015#
1005# CONFIG_USB_ACM is not set 1016# CONFIG_USB_ACM is not set
1006# CONFIG_USB_PRINTER is not set 1017# CONFIG_USB_PRINTER is not set
1018# CONFIG_USB_WDM is not set
1007 1019
1008# 1020#
1009# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 1021# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -1023,7 +1035,9 @@ CONFIG_USB_STORAGE=y
1023# CONFIG_USB_STORAGE_SDDR55 is not set 1035# CONFIG_USB_STORAGE_SDDR55 is not set
1024# CONFIG_USB_STORAGE_JUMPSHOT is not set 1036# CONFIG_USB_STORAGE_JUMPSHOT is not set
1025# CONFIG_USB_STORAGE_ALAUDA is not set 1037# CONFIG_USB_STORAGE_ALAUDA is not set
1038# CONFIG_USB_STORAGE_ONETOUCH is not set
1026# CONFIG_USB_STORAGE_KARMA is not set 1039# CONFIG_USB_STORAGE_KARMA is not set
1040# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1027# CONFIG_USB_LIBUSUAL is not set 1041# CONFIG_USB_LIBUSUAL is not set
1028 1042
1029# 1043#
@@ -1061,6 +1075,7 @@ CONFIG_USB_MON=y
1061# CONFIG_USB_TRANCEVIBRATOR is not set 1075# CONFIG_USB_TRANCEVIBRATOR is not set
1062# CONFIG_USB_IOWARRIOR is not set 1076# CONFIG_USB_IOWARRIOR is not set
1063# CONFIG_USB_TEST is not set 1077# CONFIG_USB_TEST is not set
1078# CONFIG_USB_ISIGHTFW is not set
1064CONFIG_USB_GADGET=y 1079CONFIG_USB_GADGET=y
1065# CONFIG_USB_GADGET_DEBUG is not set 1080# CONFIG_USB_GADGET_DEBUG is not set
1066# CONFIG_USB_GADGET_DEBUG_FILES is not set 1081# CONFIG_USB_GADGET_DEBUG_FILES is not set
@@ -1072,6 +1087,7 @@ CONFIG_USB_GADGET_NET2280=y
1072CONFIG_USB_NET2280=y 1087CONFIG_USB_NET2280=y
1073# CONFIG_USB_GADGET_PXA2XX is not set 1088# CONFIG_USB_GADGET_PXA2XX is not set
1074# CONFIG_USB_GADGET_M66592 is not set 1089# CONFIG_USB_GADGET_M66592 is not set
1090# CONFIG_USB_GADGET_PXA27X is not set
1075# CONFIG_USB_GADGET_GOKU is not set 1091# CONFIG_USB_GADGET_GOKU is not set
1076# CONFIG_USB_GADGET_LH7A40X is not set 1092# CONFIG_USB_GADGET_LH7A40X is not set
1077# CONFIG_USB_GADGET_OMAP is not set 1093# CONFIG_USB_GADGET_OMAP is not set
@@ -1090,6 +1106,7 @@ CONFIG_USB_ETH_RNDIS=y
1090# CONFIG_MMC is not set 1106# CONFIG_MMC is not set
1091# CONFIG_MEMSTICK is not set 1107# CONFIG_MEMSTICK is not set
1092# CONFIG_NEW_LEDS is not set 1108# CONFIG_NEW_LEDS is not set
1109# CONFIG_ACCESSIBILITY is not set
1093# CONFIG_INFINIBAND is not set 1110# CONFIG_INFINIBAND is not set
1094# CONFIG_EDAC is not set 1111# CONFIG_EDAC is not set
1095CONFIG_RTC_LIB=y 1112CONFIG_RTC_LIB=y
@@ -1144,11 +1161,8 @@ CONFIG_RTC_DRV_DS1307=y
1144# 1161#
1145# on-CPU RTC drivers 1162# on-CPU RTC drivers
1146# 1163#
1164# CONFIG_RTC_DRV_PPC is not set
1147# CONFIG_DMADEVICES is not set 1165# CONFIG_DMADEVICES is not set
1148
1149#
1150# Userspace I/O
1151#
1152# CONFIG_UIO is not set 1166# CONFIG_UIO is not set
1153 1167
1154# 1168#
@@ -1168,7 +1182,6 @@ CONFIG_FS_MBCACHE=y
1168# CONFIG_JFS_FS is not set 1182# CONFIG_JFS_FS is not set
1169# CONFIG_FS_POSIX_ACL is not set 1183# CONFIG_FS_POSIX_ACL is not set
1170# CONFIG_XFS_FS is not set 1184# CONFIG_XFS_FS is not set
1171# CONFIG_GFS2_FS is not set
1172# CONFIG_OCFS2_FS is not set 1185# CONFIG_OCFS2_FS is not set
1173CONFIG_DNOTIFY=y 1186CONFIG_DNOTIFY=y
1174CONFIG_INOTIFY=y 1187CONFIG_INOTIFY=y
@@ -1237,7 +1250,6 @@ CONFIG_NFS_FS=y
1237CONFIG_NFS_V3=y 1250CONFIG_NFS_V3=y
1238# CONFIG_NFS_V3_ACL is not set 1251# CONFIG_NFS_V3_ACL is not set
1239CONFIG_NFS_V4=y 1252CONFIG_NFS_V4=y
1240# CONFIG_NFS_DIRECTIO is not set
1241# CONFIG_NFSD is not set 1253# CONFIG_NFSD is not set
1242CONFIG_ROOT_NFS=y 1254CONFIG_ROOT_NFS=y
1243CONFIG_LOCKD=y 1255CONFIG_LOCKD=y
@@ -1282,6 +1294,7 @@ CONFIG_MSDOS_PARTITION=y
1282# Library routines 1294# Library routines
1283# 1295#
1284CONFIG_BITREVERSE=y 1296CONFIG_BITREVERSE=y
1297# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1285# CONFIG_CRC_CCITT is not set 1298# CONFIG_CRC_CCITT is not set
1286# CONFIG_CRC16 is not set 1299# CONFIG_CRC16 is not set
1287# CONFIG_CRC_ITU_T is not set 1300# CONFIG_CRC_ITU_T is not set
@@ -1302,6 +1315,7 @@ CONFIG_HAVE_LMB=y
1302# CONFIG_PRINTK_TIME is not set 1315# CONFIG_PRINTK_TIME is not set
1303CONFIG_ENABLE_WARN_DEPRECATED=y 1316CONFIG_ENABLE_WARN_DEPRECATED=y
1304CONFIG_ENABLE_MUST_CHECK=y 1317CONFIG_ENABLE_MUST_CHECK=y
1318CONFIG_FRAME_WARN=1024
1305# CONFIG_MAGIC_SYSRQ is not set 1319# CONFIG_MAGIC_SYSRQ is not set
1306# CONFIG_UNUSED_SYMBOLS is not set 1320# CONFIG_UNUSED_SYMBOLS is not set
1307# CONFIG_DEBUG_FS is not set 1321# CONFIG_DEBUG_FS is not set
@@ -1312,6 +1326,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
1312CONFIG_SCHED_DEBUG=y 1326CONFIG_SCHED_DEBUG=y
1313# CONFIG_SCHEDSTATS is not set 1327# CONFIG_SCHEDSTATS is not set
1314# CONFIG_TIMER_STATS is not set 1328# CONFIG_TIMER_STATS is not set
1329# CONFIG_DEBUG_OBJECTS is not set
1315# CONFIG_SLUB_DEBUG_ON is not set 1330# CONFIG_SLUB_DEBUG_ON is not set
1316# CONFIG_SLUB_STATS is not set 1331# CONFIG_SLUB_STATS is not set
1317# CONFIG_DEBUG_RT_MUTEXES is not set 1332# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -1324,6 +1339,7 @@ CONFIG_SCHED_DEBUG=y
1324# CONFIG_DEBUG_BUGVERBOSE is not set 1339# CONFIG_DEBUG_BUGVERBOSE is not set
1325# CONFIG_DEBUG_INFO is not set 1340# CONFIG_DEBUG_INFO is not set
1326# CONFIG_DEBUG_VM is not set 1341# CONFIG_DEBUG_VM is not set
1342# CONFIG_DEBUG_WRITECOUNT is not set
1327# CONFIG_DEBUG_LIST is not set 1343# CONFIG_DEBUG_LIST is not set
1328# CONFIG_DEBUG_SG is not set 1344# CONFIG_DEBUG_SG is not set
1329# CONFIG_BOOT_PRINTK_DELAY is not set 1345# CONFIG_BOOT_PRINTK_DELAY is not set
@@ -1335,6 +1351,7 @@ CONFIG_SCHED_DEBUG=y
1335# CONFIG_DEBUG_STACK_USAGE is not set 1351# CONFIG_DEBUG_STACK_USAGE is not set
1336# CONFIG_DEBUG_PAGEALLOC is not set 1352# CONFIG_DEBUG_PAGEALLOC is not set
1337# CONFIG_DEBUGGER is not set 1353# CONFIG_DEBUGGER is not set
1354# CONFIG_IRQSTACKS is not set
1338# CONFIG_BDI_SWITCH is not set 1355# CONFIG_BDI_SWITCH is not set
1339# CONFIG_PPC_EARLY_DEBUG is not set 1356# CONFIG_PPC_EARLY_DEBUG is not set
1340 1357
@@ -1345,51 +1362,81 @@ CONFIG_SCHED_DEBUG=y
1345# CONFIG_SECURITY is not set 1362# CONFIG_SECURITY is not set
1346# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1363# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1347CONFIG_CRYPTO=y 1364CONFIG_CRYPTO=y
1365
1366#
1367# Crypto core or helper
1368#
1348CONFIG_CRYPTO_ALGAPI=y 1369CONFIG_CRYPTO_ALGAPI=y
1349CONFIG_CRYPTO_BLKCIPHER=y 1370CONFIG_CRYPTO_BLKCIPHER=y
1350# CONFIG_CRYPTO_SEQIV is not set
1351CONFIG_CRYPTO_MANAGER=y 1371CONFIG_CRYPTO_MANAGER=y
1372# CONFIG_CRYPTO_GF128MUL is not set
1373# CONFIG_CRYPTO_NULL is not set
1374# CONFIG_CRYPTO_CRYPTD is not set
1375# CONFIG_CRYPTO_AUTHENC is not set
1376# CONFIG_CRYPTO_TEST is not set
1377
1378#
1379# Authenticated Encryption with Associated Data
1380#
1381# CONFIG_CRYPTO_CCM is not set
1382# CONFIG_CRYPTO_GCM is not set
1383# CONFIG_CRYPTO_SEQIV is not set
1384
1385#
1386# Block modes
1387#
1388CONFIG_CRYPTO_CBC=y
1389# CONFIG_CRYPTO_CTR is not set
1390# CONFIG_CRYPTO_CTS is not set
1391# CONFIG_CRYPTO_ECB is not set
1392# CONFIG_CRYPTO_LRW is not set
1393CONFIG_CRYPTO_PCBC=m
1394# CONFIG_CRYPTO_XTS is not set
1395
1396#
1397# Hash modes
1398#
1352# CONFIG_CRYPTO_HMAC is not set 1399# CONFIG_CRYPTO_HMAC is not set
1353# CONFIG_CRYPTO_XCBC is not set 1400# CONFIG_CRYPTO_XCBC is not set
1354# CONFIG_CRYPTO_NULL is not set 1401
1402#
1403# Digest
1404#
1405# CONFIG_CRYPTO_CRC32C is not set
1355# CONFIG_CRYPTO_MD4 is not set 1406# CONFIG_CRYPTO_MD4 is not set
1356CONFIG_CRYPTO_MD5=y 1407CONFIG_CRYPTO_MD5=y
1408# CONFIG_CRYPTO_MICHAEL_MIC is not set
1357# CONFIG_CRYPTO_SHA1 is not set 1409# CONFIG_CRYPTO_SHA1 is not set
1358# CONFIG_CRYPTO_SHA256 is not set 1410# CONFIG_CRYPTO_SHA256 is not set
1359# CONFIG_CRYPTO_SHA512 is not set 1411# CONFIG_CRYPTO_SHA512 is not set
1360# CONFIG_CRYPTO_WP512 is not set
1361# CONFIG_CRYPTO_TGR192 is not set 1412# CONFIG_CRYPTO_TGR192 is not set
1362# CONFIG_CRYPTO_GF128MUL is not set 1413# CONFIG_CRYPTO_WP512 is not set
1363# CONFIG_CRYPTO_ECB is not set 1414
1364CONFIG_CRYPTO_CBC=y 1415#
1365CONFIG_CRYPTO_PCBC=m 1416# Ciphers
1366# CONFIG_CRYPTO_LRW is not set 1417#
1367# CONFIG_CRYPTO_XTS is not set
1368# CONFIG_CRYPTO_CTR is not set
1369# CONFIG_CRYPTO_GCM is not set
1370# CONFIG_CRYPTO_CCM is not set
1371# CONFIG_CRYPTO_CRYPTD is not set
1372CONFIG_CRYPTO_DES=y
1373# CONFIG_CRYPTO_FCRYPT is not set
1374# CONFIG_CRYPTO_BLOWFISH is not set
1375# CONFIG_CRYPTO_TWOFISH is not set
1376# CONFIG_CRYPTO_SERPENT is not set
1377# CONFIG_CRYPTO_AES is not set 1418# CONFIG_CRYPTO_AES is not set
1419# CONFIG_CRYPTO_ANUBIS is not set
1420# CONFIG_CRYPTO_ARC4 is not set
1421# CONFIG_CRYPTO_BLOWFISH is not set
1422# CONFIG_CRYPTO_CAMELLIA is not set
1378# CONFIG_CRYPTO_CAST5 is not set 1423# CONFIG_CRYPTO_CAST5 is not set
1379# CONFIG_CRYPTO_CAST6 is not set 1424# CONFIG_CRYPTO_CAST6 is not set
1380# CONFIG_CRYPTO_TEA is not set 1425CONFIG_CRYPTO_DES=y
1381# CONFIG_CRYPTO_ARC4 is not set 1426# CONFIG_CRYPTO_FCRYPT is not set
1382# CONFIG_CRYPTO_KHAZAD is not set 1427# CONFIG_CRYPTO_KHAZAD is not set
1383# CONFIG_CRYPTO_ANUBIS is not set
1384# CONFIG_CRYPTO_SEED is not set
1385# CONFIG_CRYPTO_SALSA20 is not set 1428# CONFIG_CRYPTO_SALSA20 is not set
1429# CONFIG_CRYPTO_SEED is not set
1430# CONFIG_CRYPTO_SERPENT is not set
1431# CONFIG_CRYPTO_TEA is not set
1432# CONFIG_CRYPTO_TWOFISH is not set
1433
1434#
1435# Compression
1436#
1386# CONFIG_CRYPTO_DEFLATE is not set 1437# CONFIG_CRYPTO_DEFLATE is not set
1387# CONFIG_CRYPTO_MICHAEL_MIC is not set
1388# CONFIG_CRYPTO_CRC32C is not set
1389# CONFIG_CRYPTO_CAMELLIA is not set
1390# CONFIG_CRYPTO_TEST is not set
1391# CONFIG_CRYPTO_AUTHENC is not set
1392# CONFIG_CRYPTO_LZO is not set 1438# CONFIG_CRYPTO_LZO is not set
1393CONFIG_CRYPTO_HW=y 1439CONFIG_CRYPTO_HW=y
1394# CONFIG_CRYPTO_DEV_HIFN_795X is not set 1440# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1395# CONFIG_PPC_CLOCK is not set 1441# CONFIG_PPC_CLOCK is not set
1442# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig b/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig
index 1f57456dd81e..9bc3a03ae264 100644
--- a/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig
+++ b/arch/powerpc/configs/83xx/mpc8315_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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 24 08:48:15 2008 4# Mon Jun 9 08:52:21 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -31,6 +31,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y 31CONFIG_GENERIC_HARDIRQS=y
32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
33CONFIG_IRQ_PER_CPU=y 33CONFIG_IRQ_PER_CPU=y
34CONFIG_STACKTRACE_SUPPORT=y
35CONFIG_LOCKDEP_SUPPORT=y
34CONFIG_RWSEM_XCHGADD_ALGORITHM=y 36CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y 37CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y 38CONFIG_GENERIC_HWEIGHT=y
@@ -86,6 +88,7 @@ CONFIG_INITRAMFS_SOURCE=""
86CONFIG_SYSCTL=y 88CONFIG_SYSCTL=y
87CONFIG_EMBEDDED=y 89CONFIG_EMBEDDED=y
88CONFIG_SYSCTL_SYSCALL=y 90CONFIG_SYSCTL_SYSCALL=y
91CONFIG_SYSCTL_SYSCALL_CHECK=y
89# CONFIG_KALLSYMS is not set 92# CONFIG_KALLSYMS is not set
90CONFIG_HOTPLUG=y 93CONFIG_HOTPLUG=y
91CONFIG_PRINTK=y 94CONFIG_PRINTK=y
@@ -110,12 +113,14 @@ CONFIG_SLUB=y
110CONFIG_HAVE_OPROFILE=y 113CONFIG_HAVE_OPROFILE=y
111CONFIG_HAVE_KPROBES=y 114CONFIG_HAVE_KPROBES=y
112CONFIG_HAVE_KRETPROBES=y 115CONFIG_HAVE_KRETPROBES=y
116# CONFIG_HAVE_DMA_ATTRS is not set
113CONFIG_PROC_PAGE_MONITOR=y 117CONFIG_PROC_PAGE_MONITOR=y
114CONFIG_SLABINFO=y 118CONFIG_SLABINFO=y
115CONFIG_RT_MUTEXES=y 119CONFIG_RT_MUTEXES=y
116# CONFIG_TINY_SHMEM is not set 120# CONFIG_TINY_SHMEM is not set
117CONFIG_BASE_SMALL=0 121CONFIG_BASE_SMALL=0
118CONFIG_MODULES=y 122CONFIG_MODULES=y
123# CONFIG_MODULE_FORCE_LOAD is not set
119CONFIG_MODULE_UNLOAD=y 124CONFIG_MODULE_UNLOAD=y
120# CONFIG_MODULE_FORCE_UNLOAD is not set 125# CONFIG_MODULE_FORCE_UNLOAD is not set
121# CONFIG_MODVERSIONS is not set 126# CONFIG_MODVERSIONS is not set
@@ -210,11 +215,13 @@ CONFIG_FLATMEM=y
210CONFIG_FLAT_NODE_MEM_MAP=y 215CONFIG_FLAT_NODE_MEM_MAP=y
211# CONFIG_SPARSEMEM_STATIC is not set 216# CONFIG_SPARSEMEM_STATIC is not set
212# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 217# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
218CONFIG_PAGEFLAGS_EXTENDED=y
213CONFIG_SPLIT_PTLOCK_CPUS=4 219CONFIG_SPLIT_PTLOCK_CPUS=4
214# CONFIG_RESOURCES_64BIT is not set 220# CONFIG_RESOURCES_64BIT is not set
215CONFIG_ZONE_DMA_FLAG=1 221CONFIG_ZONE_DMA_FLAG=1
216CONFIG_BOUNCE=y 222CONFIG_BOUNCE=y
217CONFIG_VIRT_TO_BUS=y 223CONFIG_VIRT_TO_BUS=y
224CONFIG_FORCE_MAX_ZONEORDER=11
218CONFIG_PROC_DEVICETREE=y 225CONFIG_PROC_DEVICETREE=y
219# CONFIG_CMDLINE_BOOL is not set 226# CONFIG_CMDLINE_BOOL is not set
220# CONFIG_PM is not set 227# CONFIG_PM is not set
@@ -238,6 +245,7 @@ CONFIG_PCI_LEGACY=y
238# CONFIG_PCI_DEBUG is not set 245# CONFIG_PCI_DEBUG is not set
239# CONFIG_PCCARD is not set 246# CONFIG_PCCARD is not set
240# CONFIG_HOTPLUG_PCI is not set 247# CONFIG_HOTPLUG_PCI is not set
248# CONFIG_HAS_RAPIDIO is not set
241 249
242# 250#
243# Advanced setup 251# Advanced setup
@@ -247,11 +255,11 @@ CONFIG_PCI_LEGACY=y
247# 255#
248# Default settings for advanced configuration options are used 256# Default settings for advanced configuration options are used
249# 257#
250CONFIG_HIGHMEM_START=0xfe000000
251CONFIG_LOWMEM_SIZE=0x30000000 258CONFIG_LOWMEM_SIZE=0x30000000
259CONFIG_PAGE_OFFSET=0xc0000000
252CONFIG_KERNEL_START=0xc0000000 260CONFIG_KERNEL_START=0xc0000000
261CONFIG_PHYSICAL_START=0x00000000
253CONFIG_TASK_SIZE=0xc0000000 262CONFIG_TASK_SIZE=0xc0000000
254CONFIG_BOOT_LOAD=0x00800000
255 263
256# 264#
257# Networking 265# Networking
@@ -299,8 +307,6 @@ CONFIG_TCP_CONG_CUBIC=y
299CONFIG_DEFAULT_TCP_CONG="cubic" 307CONFIG_DEFAULT_TCP_CONG="cubic"
300# CONFIG_TCP_MD5SIG is not set 308# CONFIG_TCP_MD5SIG is not set
301# CONFIG_IPV6 is not set 309# CONFIG_IPV6 is not set
302# CONFIG_INET6_XFRM_TUNNEL is not set
303# CONFIG_INET6_TUNNEL is not set
304# CONFIG_NETWORK_SECMARK is not set 310# CONFIG_NETWORK_SECMARK is not set
305# CONFIG_NETFILTER is not set 311# CONFIG_NETFILTER is not set
306# CONFIG_IP_DCCP is not set 312# CONFIG_IP_DCCP is not set
@@ -361,6 +367,7 @@ CONFIG_MTD_PARTITIONS=y
361# CONFIG_MTD_REDBOOT_PARTS is not set 367# CONFIG_MTD_REDBOOT_PARTS is not set
362# CONFIG_MTD_CMDLINE_PARTS is not set 368# CONFIG_MTD_CMDLINE_PARTS is not set
363# CONFIG_MTD_OF_PARTS is not set 369# CONFIG_MTD_OF_PARTS is not set
370# CONFIG_MTD_AR7_PARTS is not set
364 371
365# 372#
366# User Modules And Translation Layers 373# User Modules And Translation Layers
@@ -444,6 +451,7 @@ CONFIG_MTD_NAND_IDS=y
444# 451#
445# CONFIG_MTD_UBI is not set 452# CONFIG_MTD_UBI is not set
446CONFIG_OF_DEVICE=y 453CONFIG_OF_DEVICE=y
454CONFIG_OF_I2C=y
447# CONFIG_PARPORT is not set 455# CONFIG_PARPORT is not set
448CONFIG_BLK_DEV=y 456CONFIG_BLK_DEV=y
449# CONFIG_BLK_DEV_FD is not set 457# CONFIG_BLK_DEV_FD is not set
@@ -549,7 +557,11 @@ CONFIG_SCSI_LOWLEVEL=y
549# CONFIG_SCSI_SRP is not set 557# CONFIG_SCSI_SRP is not set
550CONFIG_ATA=y 558CONFIG_ATA=y
551# CONFIG_ATA_NONSTANDARD is not set 559# CONFIG_ATA_NONSTANDARD is not set
560CONFIG_SATA_PMP=y
552# CONFIG_SATA_AHCI is not set 561# CONFIG_SATA_AHCI is not set
562# CONFIG_SATA_SIL24 is not set
563CONFIG_SATA_FSL=y
564CONFIG_ATA_SFF=y
553# CONFIG_SATA_SVW is not set 565# CONFIG_SATA_SVW is not set
554# CONFIG_ATA_PIIX is not set 566# CONFIG_ATA_PIIX is not set
555# CONFIG_SATA_MV is not set 567# CONFIG_SATA_MV is not set
@@ -559,13 +571,11 @@ CONFIG_ATA=y
559# CONFIG_SATA_PROMISE is not set 571# CONFIG_SATA_PROMISE is not set
560# CONFIG_SATA_SX4 is not set 572# CONFIG_SATA_SX4 is not set
561# CONFIG_SATA_SIL is not set 573# CONFIG_SATA_SIL is not set
562# CONFIG_SATA_SIL24 is not set
563# CONFIG_SATA_SIS is not set 574# CONFIG_SATA_SIS is not set
564# CONFIG_SATA_ULI is not set 575# CONFIG_SATA_ULI is not set
565# CONFIG_SATA_VIA is not set 576# CONFIG_SATA_VIA is not set
566# CONFIG_SATA_VITESSE is not set 577# CONFIG_SATA_VITESSE is not set
567# CONFIG_SATA_INIC162X is not set 578# CONFIG_SATA_INIC162X is not set
568CONFIG_SATA_FSL=y
569# CONFIG_PATA_ALI is not set 579# CONFIG_PATA_ALI is not set
570# CONFIG_PATA_AMD is not set 580# CONFIG_PATA_AMD is not set
571# CONFIG_PATA_ARTOP is not set 581# CONFIG_PATA_ARTOP is not set
@@ -605,6 +615,7 @@ CONFIG_SATA_FSL=y
605# CONFIG_PATA_VIA is not set 615# CONFIG_PATA_VIA is not set
606# CONFIG_PATA_WINBOND is not set 616# CONFIG_PATA_WINBOND is not set
607# CONFIG_PATA_PLATFORM is not set 617# CONFIG_PATA_PLATFORM is not set
618# CONFIG_PATA_SCH is not set
608CONFIG_MD=y 619CONFIG_MD=y
609CONFIG_BLK_DEV_MD=y 620CONFIG_BLK_DEV_MD=y
610CONFIG_MD_LINEAR=y 621CONFIG_MD_LINEAR=y
@@ -698,7 +709,6 @@ CONFIG_NETDEV_1000=y
698# CONFIG_SIS190 is not set 709# CONFIG_SIS190 is not set
699# CONFIG_SKGE is not set 710# CONFIG_SKGE is not set
700# CONFIG_SKY2 is not set 711# CONFIG_SKY2 is not set
701# CONFIG_SK98LIN is not set
702# CONFIG_VIA_VELOCITY is not set 712# CONFIG_VIA_VELOCITY is not set
703# CONFIG_TIGON3 is not set 713# CONFIG_TIGON3 is not set
704# CONFIG_BNX2 is not set 714# CONFIG_BNX2 is not set
@@ -718,6 +728,7 @@ CONFIG_NETDEV_10000=y
718# CONFIG_MLX4_CORE is not set 728# CONFIG_MLX4_CORE is not set
719# CONFIG_TEHUTI is not set 729# CONFIG_TEHUTI is not set
720# CONFIG_BNX2X is not set 730# CONFIG_BNX2X is not set
731# CONFIG_SFC is not set
721# CONFIG_TR is not set 732# CONFIG_TR is not set
722 733
723# 734#
@@ -725,6 +736,7 @@ CONFIG_NETDEV_10000=y
725# 736#
726# CONFIG_WLAN_PRE80211 is not set 737# CONFIG_WLAN_PRE80211 is not set
727# CONFIG_WLAN_80211 is not set 738# CONFIG_WLAN_80211 is not set
739# CONFIG_IWLWIFI_LEDS is not set
728 740
729# 741#
730# USB Network Adapters 742# USB Network Adapters
@@ -781,6 +793,7 @@ CONFIG_INPUT=y
781# Character devices 793# Character devices
782# 794#
783# CONFIG_VT is not set 795# CONFIG_VT is not set
796CONFIG_DEVKMEM=y
784# CONFIG_SERIAL_NONSTANDARD is not set 797# CONFIG_SERIAL_NONSTANDARD is not set
785# CONFIG_NOZOMI is not set 798# CONFIG_NOZOMI is not set
786 799
@@ -808,7 +821,6 @@ CONFIG_LEGACY_PTY_COUNT=256
808# CONFIG_IPMI_HANDLER is not set 821# CONFIG_IPMI_HANDLER is not set
809CONFIG_HW_RANDOM=y 822CONFIG_HW_RANDOM=y
810# CONFIG_NVRAM is not set 823# CONFIG_NVRAM is not set
811# CONFIG_GEN_RTC is not set
812# CONFIG_R3964 is not set 824# CONFIG_R3964 is not set
813# CONFIG_APPLICOM is not set 825# CONFIG_APPLICOM is not set
814# CONFIG_RAW_DRIVER is not set 826# CONFIG_RAW_DRIVER is not set
@@ -819,13 +831,6 @@ CONFIG_I2C_BOARDINFO=y
819CONFIG_I2C_CHARDEV=y 831CONFIG_I2C_CHARDEV=y
820 832
821# 833#
822# I2C Algorithms
823#
824# CONFIG_I2C_ALGOBIT is not set
825# CONFIG_I2C_ALGOPCF is not set
826# CONFIG_I2C_ALGOPCA is not set
827
828#
829# I2C Hardware Bus support 834# I2C Hardware Bus support
830# 835#
831# CONFIG_I2C_ALI1535 is not set 836# CONFIG_I2C_ALI1535 is not set
@@ -852,6 +857,7 @@ CONFIG_I2C_MPC=y
852# CONFIG_I2C_VIA is not set 857# CONFIG_I2C_VIA is not set
853# CONFIG_I2C_VIAPRO is not set 858# CONFIG_I2C_VIAPRO is not set
854# CONFIG_I2C_VOODOO3 is not set 859# CONFIG_I2C_VOODOO3 is not set
860# CONFIG_I2C_PCA_PLATFORM is not set
855 861
856# 862#
857# Miscellaneous I2C Chip support 863# Miscellaneous I2C Chip support
@@ -861,17 +867,12 @@ CONFIG_I2C_MPC=y
861# CONFIG_SENSORS_PCF8574 is not set 867# CONFIG_SENSORS_PCF8574 is not set
862# CONFIG_PCF8575 is not set 868# CONFIG_PCF8575 is not set
863# CONFIG_SENSORS_PCF8591 is not set 869# CONFIG_SENSORS_PCF8591 is not set
864# CONFIG_TPS65010 is not set
865# CONFIG_SENSORS_MAX6875 is not set 870# CONFIG_SENSORS_MAX6875 is not set
866# CONFIG_SENSORS_TSL2550 is not set 871# CONFIG_SENSORS_TSL2550 is not set
867# CONFIG_I2C_DEBUG_CORE is not set 872# CONFIG_I2C_DEBUG_CORE is not set
868# CONFIG_I2C_DEBUG_ALGO is not set 873# CONFIG_I2C_DEBUG_ALGO is not set
869# CONFIG_I2C_DEBUG_BUS is not set 874# CONFIG_I2C_DEBUG_BUS is not set
870# CONFIG_I2C_DEBUG_CHIP is not set 875# CONFIG_I2C_DEBUG_CHIP is not set
871
872#
873# SPI support
874#
875CONFIG_SPI=y 876CONFIG_SPI=y
876# CONFIG_SPI_DEBUG is not set 877# CONFIG_SPI_DEBUG is not set
877CONFIG_SPI_MASTER=y 878CONFIG_SPI_MASTER=y
@@ -976,12 +977,22 @@ CONFIG_SSB_POSSIBLE=y
976# Multifunction device drivers 977# Multifunction device drivers
977# 978#
978# CONFIG_MFD_SM501 is not set 979# CONFIG_MFD_SM501 is not set
980# CONFIG_HTC_PASIC3 is not set
979 981
980# 982#
981# Multimedia devices 983# Multimedia devices
982# 984#
985
986#
987# Multimedia core support
988#
983# CONFIG_VIDEO_DEV is not set 989# CONFIG_VIDEO_DEV is not set
984# CONFIG_DVB_CORE is not set 990# CONFIG_DVB_CORE is not set
991# CONFIG_VIDEO_MEDIA is not set
992
993#
994# Multimedia drivers
995#
985CONFIG_DAB=y 996CONFIG_DAB=y
986# CONFIG_USB_DABUSB is not set 997# CONFIG_USB_DABUSB is not set
987 998
@@ -1034,16 +1045,20 @@ CONFIG_USB_DEVICEFS=y
1034CONFIG_USB_DEVICE_CLASS=y 1045CONFIG_USB_DEVICE_CLASS=y
1035# CONFIG_USB_DYNAMIC_MINORS is not set 1046# CONFIG_USB_DYNAMIC_MINORS is not set
1036# CONFIG_USB_OTG is not set 1047# CONFIG_USB_OTG is not set
1048# CONFIG_USB_OTG_WHITELIST is not set
1049# CONFIG_USB_OTG_BLACKLIST_HUB is not set
1037 1050
1038# 1051#
1039# USB Host Controller Drivers 1052# USB Host Controller Drivers
1040# 1053#
1054# CONFIG_USB_C67X00_HCD is not set
1041CONFIG_USB_EHCI_HCD=y 1055CONFIG_USB_EHCI_HCD=y
1042CONFIG_USB_EHCI_ROOT_HUB_TT=y 1056CONFIG_USB_EHCI_ROOT_HUB_TT=y
1043# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1057# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1044CONFIG_USB_EHCI_FSL=y 1058CONFIG_USB_EHCI_FSL=y
1045CONFIG_USB_EHCI_HCD_PPC_OF=y 1059CONFIG_USB_EHCI_HCD_PPC_OF=y
1046# CONFIG_USB_ISP116X_HCD is not set 1060# CONFIG_USB_ISP116X_HCD is not set
1061# CONFIG_USB_ISP1760_HCD is not set
1047CONFIG_USB_OHCI_HCD=y 1062CONFIG_USB_OHCI_HCD=y
1048CONFIG_USB_OHCI_HCD_PPC_OF=y 1063CONFIG_USB_OHCI_HCD_PPC_OF=y
1049CONFIG_USB_OHCI_HCD_PPC_OF_BE=y 1064CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
@@ -1061,6 +1076,7 @@ CONFIG_USB_UHCI_HCD=y
1061# 1076#
1062# CONFIG_USB_ACM is not set 1077# CONFIG_USB_ACM is not set
1063# CONFIG_USB_PRINTER is not set 1078# CONFIG_USB_PRINTER is not set
1079# CONFIG_USB_WDM is not set
1064 1080
1065# 1081#
1066# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 1082# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -1080,7 +1096,9 @@ CONFIG_USB_STORAGE=y
1080# CONFIG_USB_STORAGE_SDDR55 is not set 1096# CONFIG_USB_STORAGE_SDDR55 is not set
1081# CONFIG_USB_STORAGE_JUMPSHOT is not set 1097# CONFIG_USB_STORAGE_JUMPSHOT is not set
1082# CONFIG_USB_STORAGE_ALAUDA is not set 1098# CONFIG_USB_STORAGE_ALAUDA is not set
1099# CONFIG_USB_STORAGE_ONETOUCH is not set
1083# CONFIG_USB_STORAGE_KARMA is not set 1100# CONFIG_USB_STORAGE_KARMA is not set
1101# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1084# CONFIG_USB_LIBUSUAL is not set 1102# CONFIG_USB_LIBUSUAL is not set
1085 1103
1086# 1104#
@@ -1118,6 +1136,7 @@ CONFIG_USB_MON=y
1118# CONFIG_USB_TRANCEVIBRATOR is not set 1136# CONFIG_USB_TRANCEVIBRATOR is not set
1119# CONFIG_USB_IOWARRIOR is not set 1137# CONFIG_USB_IOWARRIOR is not set
1120# CONFIG_USB_TEST is not set 1138# CONFIG_USB_TEST is not set
1139# CONFIG_USB_ISIGHTFW is not set
1121CONFIG_USB_GADGET=y 1140CONFIG_USB_GADGET=y
1122# CONFIG_USB_GADGET_DEBUG is not set 1141# CONFIG_USB_GADGET_DEBUG is not set
1123# CONFIG_USB_GADGET_DEBUG_FILES is not set 1142# CONFIG_USB_GADGET_DEBUG_FILES is not set
@@ -1129,6 +1148,7 @@ CONFIG_USB_GADGET_NET2280=y
1129CONFIG_USB_NET2280=y 1148CONFIG_USB_NET2280=y
1130# CONFIG_USB_GADGET_PXA2XX is not set 1149# CONFIG_USB_GADGET_PXA2XX is not set
1131# CONFIG_USB_GADGET_M66592 is not set 1150# CONFIG_USB_GADGET_M66592 is not set
1151# CONFIG_USB_GADGET_PXA27X is not set
1132# CONFIG_USB_GADGET_GOKU is not set 1152# CONFIG_USB_GADGET_GOKU is not set
1133# CONFIG_USB_GADGET_LH7A40X is not set 1153# CONFIG_USB_GADGET_LH7A40X is not set
1134# CONFIG_USB_GADGET_OMAP is not set 1154# CONFIG_USB_GADGET_OMAP is not set
@@ -1147,6 +1167,7 @@ CONFIG_USB_ETH_RNDIS=y
1147# CONFIG_MMC is not set 1167# CONFIG_MMC is not set
1148# CONFIG_MEMSTICK is not set 1168# CONFIG_MEMSTICK is not set
1149# CONFIG_NEW_LEDS is not set 1169# CONFIG_NEW_LEDS is not set
1170# CONFIG_ACCESSIBILITY is not set
1150# CONFIG_INFINIBAND is not set 1171# CONFIG_INFINIBAND is not set
1151# CONFIG_EDAC is not set 1172# CONFIG_EDAC is not set
1152CONFIG_RTC_LIB=y 1173CONFIG_RTC_LIB=y
@@ -1201,11 +1222,8 @@ CONFIG_RTC_DRV_DS1307=y
1201# 1222#
1202# on-CPU RTC drivers 1223# on-CPU RTC drivers
1203# 1224#
1225# CONFIG_RTC_DRV_PPC is not set
1204# CONFIG_DMADEVICES is not set 1226# CONFIG_DMADEVICES is not set
1205
1206#
1207# Userspace I/O
1208#
1209# CONFIG_UIO is not set 1227# CONFIG_UIO is not set
1210 1228
1211# 1229#
@@ -1225,7 +1243,6 @@ CONFIG_FS_MBCACHE=y
1225# CONFIG_JFS_FS is not set 1243# CONFIG_JFS_FS is not set
1226# CONFIG_FS_POSIX_ACL is not set 1244# CONFIG_FS_POSIX_ACL is not set
1227# CONFIG_XFS_FS is not set 1245# CONFIG_XFS_FS is not set
1228# CONFIG_GFS2_FS is not set
1229# CONFIG_OCFS2_FS is not set 1246# CONFIG_OCFS2_FS is not set
1230CONFIG_DNOTIFY=y 1247CONFIG_DNOTIFY=y
1231CONFIG_INOTIFY=y 1248CONFIG_INOTIFY=y
@@ -1294,7 +1311,6 @@ CONFIG_NFS_FS=y
1294CONFIG_NFS_V3=y 1311CONFIG_NFS_V3=y
1295# CONFIG_NFS_V3_ACL is not set 1312# CONFIG_NFS_V3_ACL is not set
1296CONFIG_NFS_V4=y 1313CONFIG_NFS_V4=y
1297# CONFIG_NFS_DIRECTIO is not set
1298# CONFIG_NFSD is not set 1314# CONFIG_NFSD is not set
1299CONFIG_ROOT_NFS=y 1315CONFIG_ROOT_NFS=y
1300CONFIG_LOCKD=y 1316CONFIG_LOCKD=y
@@ -1339,6 +1355,7 @@ CONFIG_MSDOS_PARTITION=y
1339# Library routines 1355# Library routines
1340# 1356#
1341CONFIG_BITREVERSE=y 1357CONFIG_BITREVERSE=y
1358# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1342# CONFIG_CRC_CCITT is not set 1359# CONFIG_CRC_CCITT is not set
1343# CONFIG_CRC16 is not set 1360# CONFIG_CRC16 is not set
1344# CONFIG_CRC_ITU_T is not set 1361# CONFIG_CRC_ITU_T is not set
@@ -1351,6 +1368,7 @@ CONFIG_PLIST=y
1351CONFIG_HAS_IOMEM=y 1368CONFIG_HAS_IOMEM=y
1352CONFIG_HAS_IOPORT=y 1369CONFIG_HAS_IOPORT=y
1353CONFIG_HAS_DMA=y 1370CONFIG_HAS_DMA=y
1371CONFIG_HAVE_LMB=y
1354 1372
1355# 1373#
1356# Kernel hacking 1374# Kernel hacking
@@ -1358,6 +1376,7 @@ CONFIG_HAS_DMA=y
1358# CONFIG_PRINTK_TIME is not set 1376# CONFIG_PRINTK_TIME is not set
1359CONFIG_ENABLE_WARN_DEPRECATED=y 1377CONFIG_ENABLE_WARN_DEPRECATED=y
1360CONFIG_ENABLE_MUST_CHECK=y 1378CONFIG_ENABLE_MUST_CHECK=y
1379CONFIG_FRAME_WARN=1024
1361# CONFIG_MAGIC_SYSRQ is not set 1380# CONFIG_MAGIC_SYSRQ is not set
1362# CONFIG_UNUSED_SYMBOLS is not set 1381# CONFIG_UNUSED_SYMBOLS is not set
1363# CONFIG_DEBUG_FS is not set 1382# CONFIG_DEBUG_FS is not set
@@ -1368,6 +1387,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
1368CONFIG_SCHED_DEBUG=y 1387CONFIG_SCHED_DEBUG=y
1369# CONFIG_SCHEDSTATS is not set 1388# CONFIG_SCHEDSTATS is not set
1370# CONFIG_TIMER_STATS is not set 1389# CONFIG_TIMER_STATS is not set
1390# CONFIG_DEBUG_OBJECTS is not set
1371# CONFIG_SLUB_DEBUG_ON is not set 1391# CONFIG_SLUB_DEBUG_ON is not set
1372# CONFIG_SLUB_STATS is not set 1392# CONFIG_SLUB_STATS is not set
1373# CONFIG_DEBUG_RT_MUTEXES is not set 1393# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -1380,6 +1400,7 @@ CONFIG_SCHED_DEBUG=y
1380# CONFIG_DEBUG_BUGVERBOSE is not set 1400# CONFIG_DEBUG_BUGVERBOSE is not set
1381# CONFIG_DEBUG_INFO is not set 1401# CONFIG_DEBUG_INFO is not set
1382# CONFIG_DEBUG_VM is not set 1402# CONFIG_DEBUG_VM is not set
1403# CONFIG_DEBUG_WRITECOUNT is not set
1383# CONFIG_DEBUG_LIST is not set 1404# CONFIG_DEBUG_LIST is not set
1384# CONFIG_DEBUG_SG is not set 1405# CONFIG_DEBUG_SG is not set
1385# CONFIG_BOOT_PRINTK_DELAY is not set 1406# CONFIG_BOOT_PRINTK_DELAY is not set
@@ -1391,6 +1412,7 @@ CONFIG_SCHED_DEBUG=y
1391# CONFIG_DEBUG_STACK_USAGE is not set 1412# CONFIG_DEBUG_STACK_USAGE is not set
1392# CONFIG_DEBUG_PAGEALLOC is not set 1413# CONFIG_DEBUG_PAGEALLOC is not set
1393# CONFIG_DEBUGGER is not set 1414# CONFIG_DEBUGGER is not set
1415# CONFIG_IRQSTACKS is not set
1394# CONFIG_BDI_SWITCH is not set 1416# CONFIG_BDI_SWITCH is not set
1395# CONFIG_PPC_EARLY_DEBUG is not set 1417# CONFIG_PPC_EARLY_DEBUG is not set
1396 1418
@@ -1401,51 +1423,81 @@ CONFIG_SCHED_DEBUG=y
1401# CONFIG_SECURITY is not set 1423# CONFIG_SECURITY is not set
1402# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1424# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1403CONFIG_CRYPTO=y 1425CONFIG_CRYPTO=y
1426
1427#
1428# Crypto core or helper
1429#
1404CONFIG_CRYPTO_ALGAPI=y 1430CONFIG_CRYPTO_ALGAPI=y
1405CONFIG_CRYPTO_BLKCIPHER=y 1431CONFIG_CRYPTO_BLKCIPHER=y
1406# CONFIG_CRYPTO_SEQIV is not set
1407CONFIG_CRYPTO_MANAGER=y 1432CONFIG_CRYPTO_MANAGER=y
1433# CONFIG_CRYPTO_GF128MUL is not set
1434# CONFIG_CRYPTO_NULL is not set
1435# CONFIG_CRYPTO_CRYPTD is not set
1436# CONFIG_CRYPTO_AUTHENC is not set
1437# CONFIG_CRYPTO_TEST is not set
1438
1439#
1440# Authenticated Encryption with Associated Data
1441#
1442# CONFIG_CRYPTO_CCM is not set
1443# CONFIG_CRYPTO_GCM is not set
1444# CONFIG_CRYPTO_SEQIV is not set
1445
1446#
1447# Block modes
1448#
1449CONFIG_CRYPTO_CBC=y
1450# CONFIG_CRYPTO_CTR is not set
1451# CONFIG_CRYPTO_CTS is not set
1452# CONFIG_CRYPTO_ECB is not set
1453# CONFIG_CRYPTO_LRW is not set
1454CONFIG_CRYPTO_PCBC=m
1455# CONFIG_CRYPTO_XTS is not set
1456
1457#
1458# Hash modes
1459#
1408# CONFIG_CRYPTO_HMAC is not set 1460# CONFIG_CRYPTO_HMAC is not set
1409# CONFIG_CRYPTO_XCBC is not set 1461# CONFIG_CRYPTO_XCBC is not set
1410# CONFIG_CRYPTO_NULL is not set 1462
1463#
1464# Digest
1465#
1466# CONFIG_CRYPTO_CRC32C is not set
1411# CONFIG_CRYPTO_MD4 is not set 1467# CONFIG_CRYPTO_MD4 is not set
1412CONFIG_CRYPTO_MD5=y 1468CONFIG_CRYPTO_MD5=y
1469# CONFIG_CRYPTO_MICHAEL_MIC is not set
1413# CONFIG_CRYPTO_SHA1 is not set 1470# CONFIG_CRYPTO_SHA1 is not set
1414# CONFIG_CRYPTO_SHA256 is not set 1471# CONFIG_CRYPTO_SHA256 is not set
1415# CONFIG_CRYPTO_SHA512 is not set 1472# CONFIG_CRYPTO_SHA512 is not set
1416# CONFIG_CRYPTO_WP512 is not set
1417# CONFIG_CRYPTO_TGR192 is not set 1473# CONFIG_CRYPTO_TGR192 is not set
1418# CONFIG_CRYPTO_GF128MUL is not set 1474# CONFIG_CRYPTO_WP512 is not set
1419# CONFIG_CRYPTO_ECB is not set 1475
1420CONFIG_CRYPTO_CBC=y 1476#
1421CONFIG_CRYPTO_PCBC=m 1477# Ciphers
1422# CONFIG_CRYPTO_LRW is not set 1478#
1423# CONFIG_CRYPTO_XTS is not set
1424# CONFIG_CRYPTO_CTR is not set
1425# CONFIG_CRYPTO_GCM is not set
1426# CONFIG_CRYPTO_CCM is not set
1427# CONFIG_CRYPTO_CRYPTD is not set
1428CONFIG_CRYPTO_DES=y
1429# CONFIG_CRYPTO_FCRYPT is not set
1430# CONFIG_CRYPTO_BLOWFISH is not set
1431# CONFIG_CRYPTO_TWOFISH is not set
1432# CONFIG_CRYPTO_SERPENT is not set
1433# CONFIG_CRYPTO_AES is not set 1479# CONFIG_CRYPTO_AES is not set
1480# CONFIG_CRYPTO_ANUBIS is not set
1481# CONFIG_CRYPTO_ARC4 is not set
1482# CONFIG_CRYPTO_BLOWFISH is not set
1483# CONFIG_CRYPTO_CAMELLIA is not set
1434# CONFIG_CRYPTO_CAST5 is not set 1484# CONFIG_CRYPTO_CAST5 is not set
1435# CONFIG_CRYPTO_CAST6 is not set 1485# CONFIG_CRYPTO_CAST6 is not set
1436# CONFIG_CRYPTO_TEA is not set 1486CONFIG_CRYPTO_DES=y
1437# CONFIG_CRYPTO_ARC4 is not set 1487# CONFIG_CRYPTO_FCRYPT is not set
1438# CONFIG_CRYPTO_KHAZAD is not set 1488# CONFIG_CRYPTO_KHAZAD is not set
1439# CONFIG_CRYPTO_ANUBIS is not set
1440# CONFIG_CRYPTO_SEED is not set
1441# CONFIG_CRYPTO_SALSA20 is not set 1489# CONFIG_CRYPTO_SALSA20 is not set
1490# CONFIG_CRYPTO_SEED is not set
1491# CONFIG_CRYPTO_SERPENT is not set
1492# CONFIG_CRYPTO_TEA is not set
1493# CONFIG_CRYPTO_TWOFISH is not set
1494
1495#
1496# Compression
1497#
1442# CONFIG_CRYPTO_DEFLATE is not set 1498# CONFIG_CRYPTO_DEFLATE is not set
1443# CONFIG_CRYPTO_MICHAEL_MIC is not set
1444# CONFIG_CRYPTO_CRC32C is not set
1445# CONFIG_CRYPTO_CAMELLIA is not set
1446# CONFIG_CRYPTO_TEST is not set
1447# CONFIG_CRYPTO_AUTHENC is not set
1448# CONFIG_CRYPTO_LZO is not set 1499# CONFIG_CRYPTO_LZO is not set
1449CONFIG_CRYPTO_HW=y 1500CONFIG_CRYPTO_HW=y
1450# CONFIG_CRYPTO_DEV_HIFN_795X is not set 1501# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1451# CONFIG_PPC_CLOCK is not set 1502# CONFIG_PPC_CLOCK is not set
1503# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/83xx/mpc832x_mds_defconfig b/arch/powerpc/configs/83xx/mpc832x_mds_defconfig
index 50cceda8994f..1eca26f3659a 100644
--- a/arch/powerpc/configs/83xx/mpc832x_mds_defconfig
+++ b/arch/powerpc/configs/83xx/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.25-rc7 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 31 11:36:51 2008 4# Mon Jun 9 08:52:22 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -31,6 +31,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y 31CONFIG_GENERIC_HARDIRQS=y
32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
33CONFIG_IRQ_PER_CPU=y 33CONFIG_IRQ_PER_CPU=y
34CONFIG_STACKTRACE_SUPPORT=y
35CONFIG_LOCKDEP_SUPPORT=y
34CONFIG_RWSEM_XCHGADD_ALGORITHM=y 36CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y 37CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y 38CONFIG_GENERIC_HWEIGHT=y
@@ -86,6 +88,7 @@ CONFIG_INITRAMFS_SOURCE=""
86CONFIG_SYSCTL=y 88CONFIG_SYSCTL=y
87CONFIG_EMBEDDED=y 89CONFIG_EMBEDDED=y
88CONFIG_SYSCTL_SYSCALL=y 90CONFIG_SYSCTL_SYSCALL=y
91CONFIG_SYSCTL_SYSCALL_CHECK=y
89# CONFIG_KALLSYMS is not set 92# CONFIG_KALLSYMS is not set
90CONFIG_HOTPLUG=y 93CONFIG_HOTPLUG=y
91CONFIG_PRINTK=y 94CONFIG_PRINTK=y
@@ -110,12 +113,14 @@ CONFIG_SLUB=y
110CONFIG_HAVE_OPROFILE=y 113CONFIG_HAVE_OPROFILE=y
111CONFIG_HAVE_KPROBES=y 114CONFIG_HAVE_KPROBES=y
112CONFIG_HAVE_KRETPROBES=y 115CONFIG_HAVE_KRETPROBES=y
116# CONFIG_HAVE_DMA_ATTRS is not set
113CONFIG_PROC_PAGE_MONITOR=y 117CONFIG_PROC_PAGE_MONITOR=y
114CONFIG_SLABINFO=y 118CONFIG_SLABINFO=y
115CONFIG_RT_MUTEXES=y 119CONFIG_RT_MUTEXES=y
116# CONFIG_TINY_SHMEM is not set 120# CONFIG_TINY_SHMEM is not set
117CONFIG_BASE_SMALL=0 121CONFIG_BASE_SMALL=0
118CONFIG_MODULES=y 122CONFIG_MODULES=y
123# CONFIG_MODULE_FORCE_LOAD is not set
119CONFIG_MODULE_UNLOAD=y 124CONFIG_MODULE_UNLOAD=y
120# CONFIG_MODULE_FORCE_UNLOAD is not set 125# CONFIG_MODULE_FORCE_UNLOAD is not set
121# CONFIG_MODVERSIONS is not set 126# CONFIG_MODVERSIONS is not set
@@ -212,11 +217,13 @@ CONFIG_FLATMEM=y
212CONFIG_FLAT_NODE_MEM_MAP=y 217CONFIG_FLAT_NODE_MEM_MAP=y
213# CONFIG_SPARSEMEM_STATIC is not set 218# CONFIG_SPARSEMEM_STATIC is not set
214# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 219# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
220CONFIG_PAGEFLAGS_EXTENDED=y
215CONFIG_SPLIT_PTLOCK_CPUS=4 221CONFIG_SPLIT_PTLOCK_CPUS=4
216# CONFIG_RESOURCES_64BIT is not set 222# CONFIG_RESOURCES_64BIT is not set
217CONFIG_ZONE_DMA_FLAG=1 223CONFIG_ZONE_DMA_FLAG=1
218CONFIG_BOUNCE=y 224CONFIG_BOUNCE=y
219CONFIG_VIRT_TO_BUS=y 225CONFIG_VIRT_TO_BUS=y
226CONFIG_FORCE_MAX_ZONEORDER=11
220CONFIG_PROC_DEVICETREE=y 227CONFIG_PROC_DEVICETREE=y
221# CONFIG_CMDLINE_BOOL is not set 228# CONFIG_CMDLINE_BOOL is not set
222# CONFIG_PM is not set 229# CONFIG_PM is not set
@@ -239,6 +246,7 @@ CONFIG_ARCH_SUPPORTS_MSI=y
239CONFIG_PCI_LEGACY=y 246CONFIG_PCI_LEGACY=y
240# CONFIG_PCCARD is not set 247# CONFIG_PCCARD is not set
241# CONFIG_HOTPLUG_PCI is not set 248# CONFIG_HOTPLUG_PCI is not set
249# CONFIG_HAS_RAPIDIO is not set
242 250
243# 251#
244# Advanced setup 252# Advanced setup
@@ -248,11 +256,11 @@ CONFIG_PCI_LEGACY=y
248# 256#
249# Default settings for advanced configuration options are used 257# Default settings for advanced configuration options are used
250# 258#
251CONFIG_HIGHMEM_START=0xfe000000
252CONFIG_LOWMEM_SIZE=0x30000000 259CONFIG_LOWMEM_SIZE=0x30000000
260CONFIG_PAGE_OFFSET=0xc0000000
253CONFIG_KERNEL_START=0xc0000000 261CONFIG_KERNEL_START=0xc0000000
262CONFIG_PHYSICAL_START=0x00000000
254CONFIG_TASK_SIZE=0xc0000000 263CONFIG_TASK_SIZE=0xc0000000
255CONFIG_BOOT_LOAD=0x00800000
256 264
257# 265#
258# Networking 266# Networking
@@ -300,8 +308,6 @@ CONFIG_TCP_CONG_CUBIC=y
300CONFIG_DEFAULT_TCP_CONG="cubic" 308CONFIG_DEFAULT_TCP_CONG="cubic"
301# CONFIG_TCP_MD5SIG is not set 309# CONFIG_TCP_MD5SIG is not set
302# CONFIG_IPV6 is not set 310# CONFIG_IPV6 is not set
303# CONFIG_INET6_XFRM_TUNNEL is not set
304# CONFIG_INET6_TUNNEL is not set
305# CONFIG_NETWORK_SECMARK is not set 311# CONFIG_NETWORK_SECMARK is not set
306# CONFIG_NETFILTER is not set 312# CONFIG_NETFILTER is not set
307# CONFIG_IP_DCCP is not set 313# CONFIG_IP_DCCP is not set
@@ -355,6 +361,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
355# CONFIG_CONNECTOR is not set 361# CONFIG_CONNECTOR is not set
356# CONFIG_MTD is not set 362# CONFIG_MTD is not set
357CONFIG_OF_DEVICE=y 363CONFIG_OF_DEVICE=y
364CONFIG_OF_I2C=y
358# CONFIG_PARPORT is not set 365# CONFIG_PARPORT is not set
359CONFIG_BLK_DEV=y 366CONFIG_BLK_DEV=y
360# CONFIG_BLK_DEV_FD is not set 367# CONFIG_BLK_DEV_FD is not set
@@ -522,7 +529,6 @@ CONFIG_NETDEV_1000=y
522# CONFIG_SIS190 is not set 529# CONFIG_SIS190 is not set
523# CONFIG_SKGE is not set 530# CONFIG_SKGE is not set
524# CONFIG_SKY2 is not set 531# CONFIG_SKY2 is not set
525# CONFIG_SK98LIN is not set
526# CONFIG_VIA_VELOCITY is not set 532# CONFIG_VIA_VELOCITY is not set
527# CONFIG_TIGON3 is not set 533# CONFIG_TIGON3 is not set
528# CONFIG_BNX2 is not set 534# CONFIG_BNX2 is not set
@@ -546,6 +552,7 @@ CONFIG_NETDEV_10000=y
546# CONFIG_MLX4_CORE is not set 552# CONFIG_MLX4_CORE is not set
547# CONFIG_TEHUTI is not set 553# CONFIG_TEHUTI is not set
548# CONFIG_BNX2X is not set 554# CONFIG_BNX2X is not set
555# CONFIG_SFC is not set
549# CONFIG_TR is not set 556# CONFIG_TR is not set
550 557
551# 558#
@@ -553,6 +560,7 @@ CONFIG_NETDEV_10000=y
553# 560#
554# CONFIG_WLAN_PRE80211 is not set 561# CONFIG_WLAN_PRE80211 is not set
555# CONFIG_WLAN_80211 is not set 562# CONFIG_WLAN_80211 is not set
563# CONFIG_IWLWIFI_LEDS is not set
556# CONFIG_WAN is not set 564# CONFIG_WAN is not set
557# CONFIG_FDDI is not set 565# CONFIG_FDDI is not set
558# CONFIG_HIPPI is not set 566# CONFIG_HIPPI is not set
@@ -600,6 +608,7 @@ CONFIG_INPUT=y
600# Character devices 608# Character devices
601# 609#
602# CONFIG_VT is not set 610# CONFIG_VT is not set
611CONFIG_DEVKMEM=y
603# CONFIG_SERIAL_NONSTANDARD is not set 612# CONFIG_SERIAL_NONSTANDARD is not set
604# CONFIG_NOZOMI is not set 613# CONFIG_NOZOMI is not set
605 614
@@ -628,7 +637,6 @@ CONFIG_LEGACY_PTY_COUNT=256
628# CONFIG_IPMI_HANDLER is not set 637# CONFIG_IPMI_HANDLER is not set
629CONFIG_HW_RANDOM=y 638CONFIG_HW_RANDOM=y
630# CONFIG_NVRAM is not set 639# CONFIG_NVRAM is not set
631# CONFIG_GEN_RTC is not set
632# CONFIG_R3964 is not set 640# CONFIG_R3964 is not set
633# CONFIG_APPLICOM is not set 641# CONFIG_APPLICOM is not set
634# CONFIG_RAW_DRIVER is not set 642# CONFIG_RAW_DRIVER is not set
@@ -639,13 +647,6 @@ CONFIG_I2C_BOARDINFO=y
639CONFIG_I2C_CHARDEV=y 647CONFIG_I2C_CHARDEV=y
640 648
641# 649#
642# I2C Algorithms
643#
644# CONFIG_I2C_ALGOBIT is not set
645# CONFIG_I2C_ALGOPCF is not set
646# CONFIG_I2C_ALGOPCA is not set
647
648#
649# I2C Hardware Bus support 650# I2C Hardware Bus support
650# 651#
651# CONFIG_I2C_ALI1535 is not set 652# CONFIG_I2C_ALI1535 is not set
@@ -671,6 +672,7 @@ CONFIG_I2C_MPC=y
671# CONFIG_I2C_VIA is not set 672# CONFIG_I2C_VIA is not set
672# CONFIG_I2C_VIAPRO is not set 673# CONFIG_I2C_VIAPRO is not set
673# CONFIG_I2C_VOODOO3 is not set 674# CONFIG_I2C_VOODOO3 is not set
675# CONFIG_I2C_PCA_PLATFORM is not set
674 676
675# 677#
676# Miscellaneous I2C Chip support 678# Miscellaneous I2C Chip support
@@ -680,19 +682,13 @@ CONFIG_I2C_MPC=y
680# CONFIG_SENSORS_PCF8574 is not set 682# CONFIG_SENSORS_PCF8574 is not set
681# CONFIG_PCF8575 is not set 683# CONFIG_PCF8575 is not set
682# CONFIG_SENSORS_PCF8591 is not set 684# CONFIG_SENSORS_PCF8591 is not set
683# CONFIG_TPS65010 is not set
684# CONFIG_SENSORS_MAX6875 is not set 685# CONFIG_SENSORS_MAX6875 is not set
685# CONFIG_SENSORS_TSL2550 is not set 686# CONFIG_SENSORS_TSL2550 is not set
686# CONFIG_I2C_DEBUG_CORE is not set 687# CONFIG_I2C_DEBUG_CORE is not set
687# CONFIG_I2C_DEBUG_ALGO is not set 688# CONFIG_I2C_DEBUG_ALGO is not set
688# CONFIG_I2C_DEBUG_BUS is not set 689# CONFIG_I2C_DEBUG_BUS is not set
689# CONFIG_I2C_DEBUG_CHIP is not set 690# CONFIG_I2C_DEBUG_CHIP is not set
690
691#
692# SPI support
693#
694# CONFIG_SPI is not set 691# CONFIG_SPI is not set
695# CONFIG_SPI_MASTER is not set
696# CONFIG_W1 is not set 692# CONFIG_W1 is not set
697# CONFIG_POWER_SUPPLY is not set 693# CONFIG_POWER_SUPPLY is not set
698CONFIG_HWMON=y 694CONFIG_HWMON=y
@@ -775,12 +771,22 @@ CONFIG_SSB_POSSIBLE=y
775# Multifunction device drivers 771# Multifunction device drivers
776# 772#
777# CONFIG_MFD_SM501 is not set 773# CONFIG_MFD_SM501 is not set
774# CONFIG_HTC_PASIC3 is not set
778 775
779# 776#
780# Multimedia devices 777# Multimedia devices
781# 778#
779
780#
781# Multimedia core support
782#
782# CONFIG_VIDEO_DEV is not set 783# CONFIG_VIDEO_DEV is not set
783# CONFIG_DVB_CORE is not set 784# CONFIG_DVB_CORE is not set
785# CONFIG_VIDEO_MEDIA is not set
786
787#
788# Multimedia drivers
789#
784CONFIG_DAB=y 790CONFIG_DAB=y
785 791
786# 792#
@@ -811,6 +817,8 @@ CONFIG_USB_ARCH_HAS_HCD=y
811CONFIG_USB_ARCH_HAS_OHCI=y 817CONFIG_USB_ARCH_HAS_OHCI=y
812CONFIG_USB_ARCH_HAS_EHCI=y 818CONFIG_USB_ARCH_HAS_EHCI=y
813# CONFIG_USB is not set 819# CONFIG_USB is not set
820# CONFIG_USB_OTG_WHITELIST is not set
821# CONFIG_USB_OTG_BLACKLIST_HUB is not set
814 822
815# 823#
816# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 824# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -819,6 +827,7 @@ CONFIG_USB_ARCH_HAS_EHCI=y
819# CONFIG_MMC is not set 827# CONFIG_MMC is not set
820# CONFIG_MEMSTICK is not set 828# CONFIG_MEMSTICK is not set
821# CONFIG_NEW_LEDS is not set 829# CONFIG_NEW_LEDS is not set
830# CONFIG_ACCESSIBILITY is not set
822# CONFIG_INFINIBAND is not set 831# CONFIG_INFINIBAND is not set
823# CONFIG_EDAC is not set 832# CONFIG_EDAC is not set
824CONFIG_RTC_LIB=y 833CONFIG_RTC_LIB=y
@@ -870,11 +879,8 @@ CONFIG_RTC_DRV_DS1374=y
870# 879#
871# on-CPU RTC drivers 880# on-CPU RTC drivers
872# 881#
882# CONFIG_RTC_DRV_PPC is not set
873# CONFIG_DMADEVICES is not set 883# CONFIG_DMADEVICES is not set
874
875#
876# Userspace I/O
877#
878# CONFIG_UIO is not set 884# CONFIG_UIO is not set
879 885
880# 886#
@@ -894,7 +900,6 @@ CONFIG_FS_MBCACHE=y
894# CONFIG_JFS_FS is not set 900# CONFIG_JFS_FS is not set
895# CONFIG_FS_POSIX_ACL is not set 901# CONFIG_FS_POSIX_ACL is not set
896# CONFIG_XFS_FS is not set 902# CONFIG_XFS_FS is not set
897# CONFIG_GFS2_FS is not set
898# CONFIG_OCFS2_FS is not set 903# CONFIG_OCFS2_FS is not set
899CONFIG_DNOTIFY=y 904CONFIG_DNOTIFY=y
900CONFIG_INOTIFY=y 905CONFIG_INOTIFY=y
@@ -952,7 +957,6 @@ CONFIG_NFS_FS=y
952CONFIG_NFS_V3=y 957CONFIG_NFS_V3=y
953# CONFIG_NFS_V3_ACL is not set 958# CONFIG_NFS_V3_ACL is not set
954CONFIG_NFS_V4=y 959CONFIG_NFS_V4=y
955# CONFIG_NFS_DIRECTIO is not set
956# CONFIG_NFSD is not set 960# CONFIG_NFSD is not set
957CONFIG_ROOT_NFS=y 961CONFIG_ROOT_NFS=y
958CONFIG_LOCKD=y 962CONFIG_LOCKD=y
@@ -995,6 +999,7 @@ CONFIG_UCC=y
995# Library routines 999# Library routines
996# 1000#
997CONFIG_BITREVERSE=y 1001CONFIG_BITREVERSE=y
1002# CONFIG_GENERIC_FIND_FIRST_BIT is not set
998# CONFIG_CRC_CCITT is not set 1003# CONFIG_CRC_CCITT is not set
999# CONFIG_CRC16 is not set 1004# CONFIG_CRC16 is not set
1000# CONFIG_CRC_ITU_T is not set 1005# CONFIG_CRC_ITU_T is not set
@@ -1005,6 +1010,7 @@ CONFIG_PLIST=y
1005CONFIG_HAS_IOMEM=y 1010CONFIG_HAS_IOMEM=y
1006CONFIG_HAS_IOPORT=y 1011CONFIG_HAS_IOPORT=y
1007CONFIG_HAS_DMA=y 1012CONFIG_HAS_DMA=y
1013CONFIG_HAVE_LMB=y
1008 1014
1009# 1015#
1010# Kernel hacking 1016# Kernel hacking
@@ -1012,6 +1018,7 @@ CONFIG_HAS_DMA=y
1012# CONFIG_PRINTK_TIME is not set 1018# CONFIG_PRINTK_TIME is not set
1013CONFIG_ENABLE_WARN_DEPRECATED=y 1019CONFIG_ENABLE_WARN_DEPRECATED=y
1014CONFIG_ENABLE_MUST_CHECK=y 1020CONFIG_ENABLE_MUST_CHECK=y
1021CONFIG_FRAME_WARN=1024
1015# CONFIG_MAGIC_SYSRQ is not set 1022# CONFIG_MAGIC_SYSRQ is not set
1016# CONFIG_UNUSED_SYMBOLS is not set 1023# CONFIG_UNUSED_SYMBOLS is not set
1017# CONFIG_DEBUG_FS is not set 1024# CONFIG_DEBUG_FS is not set
@@ -1021,6 +1028,7 @@ CONFIG_ENABLE_MUST_CHECK=y
1021# CONFIG_SLUB_STATS is not set 1028# CONFIG_SLUB_STATS is not set
1022# CONFIG_DEBUG_BUGVERBOSE is not set 1029# CONFIG_DEBUG_BUGVERBOSE is not set
1023# CONFIG_SAMPLES is not set 1030# CONFIG_SAMPLES is not set
1031# CONFIG_IRQSTACKS is not set
1024# CONFIG_PPC_EARLY_DEBUG is not set 1032# CONFIG_PPC_EARLY_DEBUG is not set
1025 1033
1026# 1034#
@@ -1030,52 +1038,82 @@ CONFIG_ENABLE_MUST_CHECK=y
1030# CONFIG_SECURITY is not set 1038# CONFIG_SECURITY is not set
1031# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1039# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1032CONFIG_CRYPTO=y 1040CONFIG_CRYPTO=y
1041
1042#
1043# Crypto core or helper
1044#
1033CONFIG_CRYPTO_ALGAPI=y 1045CONFIG_CRYPTO_ALGAPI=y
1034CONFIG_CRYPTO_BLKCIPHER=y 1046CONFIG_CRYPTO_BLKCIPHER=y
1035# CONFIG_CRYPTO_SEQIV is not set
1036CONFIG_CRYPTO_MANAGER=y 1047CONFIG_CRYPTO_MANAGER=y
1048# CONFIG_CRYPTO_GF128MUL is not set
1049# CONFIG_CRYPTO_NULL is not set
1050# CONFIG_CRYPTO_CRYPTD is not set
1051# CONFIG_CRYPTO_AUTHENC is not set
1052# CONFIG_CRYPTO_TEST is not set
1053
1054#
1055# Authenticated Encryption with Associated Data
1056#
1057# CONFIG_CRYPTO_CCM is not set
1058# CONFIG_CRYPTO_GCM is not set
1059# CONFIG_CRYPTO_SEQIV is not set
1060
1061#
1062# Block modes
1063#
1064CONFIG_CRYPTO_CBC=y
1065# CONFIG_CRYPTO_CTR is not set
1066# CONFIG_CRYPTO_CTS is not set
1067CONFIG_CRYPTO_ECB=m
1068# CONFIG_CRYPTO_LRW is not set
1069CONFIG_CRYPTO_PCBC=m
1070# CONFIG_CRYPTO_XTS is not set
1071
1072#
1073# Hash modes
1074#
1037# CONFIG_CRYPTO_HMAC is not set 1075# CONFIG_CRYPTO_HMAC is not set
1038# CONFIG_CRYPTO_XCBC is not set 1076# CONFIG_CRYPTO_XCBC is not set
1039# CONFIG_CRYPTO_NULL is not set 1077
1078#
1079# Digest
1080#
1081# CONFIG_CRYPTO_CRC32C is not set
1040# CONFIG_CRYPTO_MD4 is not set 1082# CONFIG_CRYPTO_MD4 is not set
1041CONFIG_CRYPTO_MD5=y 1083CONFIG_CRYPTO_MD5=y
1084# CONFIG_CRYPTO_MICHAEL_MIC is not set
1042# CONFIG_CRYPTO_SHA1 is not set 1085# CONFIG_CRYPTO_SHA1 is not set
1043# CONFIG_CRYPTO_SHA256 is not set 1086# CONFIG_CRYPTO_SHA256 is not set
1044# CONFIG_CRYPTO_SHA512 is not set 1087# CONFIG_CRYPTO_SHA512 is not set
1045# CONFIG_CRYPTO_WP512 is not set
1046# CONFIG_CRYPTO_TGR192 is not set 1088# CONFIG_CRYPTO_TGR192 is not set
1047# CONFIG_CRYPTO_GF128MUL is not set 1089# CONFIG_CRYPTO_WP512 is not set
1048CONFIG_CRYPTO_ECB=m 1090
1049CONFIG_CRYPTO_CBC=y 1091#
1050CONFIG_CRYPTO_PCBC=m 1092# Ciphers
1051# CONFIG_CRYPTO_LRW is not set 1093#
1052# CONFIG_CRYPTO_XTS is not set
1053# CONFIG_CRYPTO_CTR is not set
1054# CONFIG_CRYPTO_GCM is not set
1055# CONFIG_CRYPTO_CCM is not set
1056# CONFIG_CRYPTO_CRYPTD is not set
1057CONFIG_CRYPTO_DES=y
1058# CONFIG_CRYPTO_FCRYPT is not set
1059# CONFIG_CRYPTO_BLOWFISH is not set
1060# CONFIG_CRYPTO_TWOFISH is not set
1061# CONFIG_CRYPTO_SERPENT is not set
1062# CONFIG_CRYPTO_AES is not set 1094# CONFIG_CRYPTO_AES is not set
1095# CONFIG_CRYPTO_ANUBIS is not set
1096# CONFIG_CRYPTO_ARC4 is not set
1097# CONFIG_CRYPTO_BLOWFISH is not set
1098# CONFIG_CRYPTO_CAMELLIA is not set
1063# CONFIG_CRYPTO_CAST5 is not set 1099# CONFIG_CRYPTO_CAST5 is not set
1064# CONFIG_CRYPTO_CAST6 is not set 1100# CONFIG_CRYPTO_CAST6 is not set
1065# CONFIG_CRYPTO_TEA is not set 1101CONFIG_CRYPTO_DES=y
1066# CONFIG_CRYPTO_ARC4 is not set 1102# CONFIG_CRYPTO_FCRYPT is not set
1067# CONFIG_CRYPTO_KHAZAD is not set 1103# CONFIG_CRYPTO_KHAZAD is not set
1068# CONFIG_CRYPTO_ANUBIS is not set
1069# CONFIG_CRYPTO_SEED is not set
1070# CONFIG_CRYPTO_SALSA20 is not set 1104# CONFIG_CRYPTO_SALSA20 is not set
1105# CONFIG_CRYPTO_SEED is not set
1106# CONFIG_CRYPTO_SERPENT is not set
1107# CONFIG_CRYPTO_TEA is not set
1108# CONFIG_CRYPTO_TWOFISH is not set
1109
1110#
1111# Compression
1112#
1071# CONFIG_CRYPTO_DEFLATE is not set 1113# CONFIG_CRYPTO_DEFLATE is not set
1072# CONFIG_CRYPTO_MICHAEL_MIC is not set
1073# CONFIG_CRYPTO_CRC32C is not set
1074# CONFIG_CRYPTO_CAMELLIA is not set
1075# CONFIG_CRYPTO_TEST is not set
1076# CONFIG_CRYPTO_AUTHENC is not set
1077# CONFIG_CRYPTO_LZO is not set 1114# CONFIG_CRYPTO_LZO is not set
1078CONFIG_CRYPTO_HW=y 1115CONFIG_CRYPTO_HW=y
1079# CONFIG_CRYPTO_DEV_HIFN_795X is not set 1116# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1080# CONFIG_PPC_CLOCK is not set 1117# CONFIG_PPC_CLOCK is not set
1081CONFIG_PPC_LIB_RHEAP=y 1118CONFIG_PPC_LIB_RHEAP=y
1119# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig b/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig
index ac913025713e..de95d327463c 100644
--- a/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig
+++ b/arch/powerpc/configs/83xx/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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 24 08:48:16 2008 4# Mon Jun 9 08:52:24 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -31,6 +31,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y 31CONFIG_GENERIC_HARDIRQS=y
32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
33CONFIG_IRQ_PER_CPU=y 33CONFIG_IRQ_PER_CPU=y
34CONFIG_STACKTRACE_SUPPORT=y
35CONFIG_LOCKDEP_SUPPORT=y
34CONFIG_RWSEM_XCHGADD_ALGORITHM=y 36CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y 37CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y 38CONFIG_GENERIC_HWEIGHT=y
@@ -86,6 +88,7 @@ CONFIG_INITRAMFS_SOURCE=""
86CONFIG_SYSCTL=y 88CONFIG_SYSCTL=y
87CONFIG_EMBEDDED=y 89CONFIG_EMBEDDED=y
88CONFIG_SYSCTL_SYSCALL=y 90CONFIG_SYSCTL_SYSCALL=y
91CONFIG_SYSCTL_SYSCALL_CHECK=y
89# CONFIG_KALLSYMS is not set 92# CONFIG_KALLSYMS is not set
90CONFIG_HOTPLUG=y 93CONFIG_HOTPLUG=y
91CONFIG_PRINTK=y 94CONFIG_PRINTK=y
@@ -110,12 +113,14 @@ CONFIG_SLUB=y
110CONFIG_HAVE_OPROFILE=y 113CONFIG_HAVE_OPROFILE=y
111CONFIG_HAVE_KPROBES=y 114CONFIG_HAVE_KPROBES=y
112CONFIG_HAVE_KRETPROBES=y 115CONFIG_HAVE_KRETPROBES=y
116# CONFIG_HAVE_DMA_ATTRS is not set
113CONFIG_PROC_PAGE_MONITOR=y 117CONFIG_PROC_PAGE_MONITOR=y
114CONFIG_SLABINFO=y 118CONFIG_SLABINFO=y
115CONFIG_RT_MUTEXES=y 119CONFIG_RT_MUTEXES=y
116# CONFIG_TINY_SHMEM is not set 120# CONFIG_TINY_SHMEM is not set
117CONFIG_BASE_SMALL=0 121CONFIG_BASE_SMALL=0
118CONFIG_MODULES=y 122CONFIG_MODULES=y
123# CONFIG_MODULE_FORCE_LOAD is not set
119CONFIG_MODULE_UNLOAD=y 124CONFIG_MODULE_UNLOAD=y
120# CONFIG_MODULE_FORCE_UNLOAD is not set 125# CONFIG_MODULE_FORCE_UNLOAD is not set
121# CONFIG_MODVERSIONS is not set 126# CONFIG_MODVERSIONS is not set
@@ -212,11 +217,13 @@ CONFIG_FLATMEM=y
212CONFIG_FLAT_NODE_MEM_MAP=y 217CONFIG_FLAT_NODE_MEM_MAP=y
213# CONFIG_SPARSEMEM_STATIC is not set 218# CONFIG_SPARSEMEM_STATIC is not set
214# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 219# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
220CONFIG_PAGEFLAGS_EXTENDED=y
215CONFIG_SPLIT_PTLOCK_CPUS=4 221CONFIG_SPLIT_PTLOCK_CPUS=4
216# CONFIG_RESOURCES_64BIT is not set 222# CONFIG_RESOURCES_64BIT is not set
217CONFIG_ZONE_DMA_FLAG=1 223CONFIG_ZONE_DMA_FLAG=1
218CONFIG_BOUNCE=y 224CONFIG_BOUNCE=y
219CONFIG_VIRT_TO_BUS=y 225CONFIG_VIRT_TO_BUS=y
226CONFIG_FORCE_MAX_ZONEORDER=11
220CONFIG_PROC_DEVICETREE=y 227CONFIG_PROC_DEVICETREE=y
221# CONFIG_CMDLINE_BOOL is not set 228# CONFIG_CMDLINE_BOOL is not set
222# CONFIG_PM is not set 229# CONFIG_PM is not set
@@ -239,6 +246,7 @@ CONFIG_ARCH_SUPPORTS_MSI=y
239CONFIG_PCI_LEGACY=y 246CONFIG_PCI_LEGACY=y
240# CONFIG_PCCARD is not set 247# CONFIG_PCCARD is not set
241# CONFIG_HOTPLUG_PCI is not set 248# CONFIG_HOTPLUG_PCI is not set
249# CONFIG_HAS_RAPIDIO is not set
242 250
243# 251#
244# Advanced setup 252# Advanced setup
@@ -248,11 +256,11 @@ CONFIG_PCI_LEGACY=y
248# 256#
249# Default settings for advanced configuration options are used 257# Default settings for advanced configuration options are used
250# 258#
251CONFIG_HIGHMEM_START=0xfe000000
252CONFIG_LOWMEM_SIZE=0x30000000 259CONFIG_LOWMEM_SIZE=0x30000000
260CONFIG_PAGE_OFFSET=0xc0000000
253CONFIG_KERNEL_START=0xc0000000 261CONFIG_KERNEL_START=0xc0000000
262CONFIG_PHYSICAL_START=0x00000000
254CONFIG_TASK_SIZE=0xc0000000 263CONFIG_TASK_SIZE=0xc0000000
255CONFIG_BOOT_LOAD=0x00800000
256 264
257# 265#
258# Networking 266# Networking
@@ -300,8 +308,6 @@ CONFIG_TCP_CONG_CUBIC=y
300CONFIG_DEFAULT_TCP_CONG="cubic" 308CONFIG_DEFAULT_TCP_CONG="cubic"
301# CONFIG_TCP_MD5SIG is not set 309# CONFIG_TCP_MD5SIG is not set
302# CONFIG_IPV6 is not set 310# CONFIG_IPV6 is not set
303# CONFIG_INET6_XFRM_TUNNEL is not set
304# CONFIG_INET6_TUNNEL is not set
305# CONFIG_NETWORK_SECMARK is not set 311# CONFIG_NETWORK_SECMARK is not set
306# CONFIG_NETFILTER is not set 312# CONFIG_NETFILTER is not set
307# CONFIG_IP_DCCP is not set 313# CONFIG_IP_DCCP is not set
@@ -355,6 +361,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
355# CONFIG_CONNECTOR is not set 361# CONFIG_CONNECTOR is not set
356# CONFIG_MTD is not set 362# CONFIG_MTD is not set
357CONFIG_OF_DEVICE=y 363CONFIG_OF_DEVICE=y
364CONFIG_OF_I2C=y
358# CONFIG_PARPORT is not set 365# CONFIG_PARPORT is not set
359CONFIG_BLK_DEV=y 366CONFIG_BLK_DEV=y
360# CONFIG_BLK_DEV_FD is not set 367# CONFIG_BLK_DEV_FD is not set
@@ -526,7 +533,6 @@ CONFIG_E1000=y
526# CONFIG_SIS190 is not set 533# CONFIG_SIS190 is not set
527# CONFIG_SKGE is not set 534# CONFIG_SKGE is not set
528# CONFIG_SKY2 is not set 535# CONFIG_SKY2 is not set
529# CONFIG_SK98LIN is not set
530# CONFIG_VIA_VELOCITY is not set 536# CONFIG_VIA_VELOCITY is not set
531# CONFIG_TIGON3 is not set 537# CONFIG_TIGON3 is not set
532# CONFIG_BNX2 is not set 538# CONFIG_BNX2 is not set
@@ -550,6 +556,7 @@ CONFIG_NETDEV_10000=y
550# CONFIG_MLX4_CORE is not set 556# CONFIG_MLX4_CORE is not set
551# CONFIG_TEHUTI is not set 557# CONFIG_TEHUTI is not set
552# CONFIG_BNX2X is not set 558# CONFIG_BNX2X is not set
559# CONFIG_SFC is not set
553# CONFIG_TR is not set 560# CONFIG_TR is not set
554 561
555# 562#
@@ -557,6 +564,7 @@ CONFIG_NETDEV_10000=y
557# 564#
558# CONFIG_WLAN_PRE80211 is not set 565# CONFIG_WLAN_PRE80211 is not set
559# CONFIG_WLAN_80211 is not set 566# CONFIG_WLAN_80211 is not set
567# CONFIG_IWLWIFI_LEDS is not set
560 568
561# 569#
562# USB Network Adapters 570# USB Network Adapters
@@ -613,6 +621,7 @@ CONFIG_INPUT=y
613# Character devices 621# Character devices
614# 622#
615# CONFIG_VT is not set 623# CONFIG_VT is not set
624CONFIG_DEVKMEM=y
616# CONFIG_SERIAL_NONSTANDARD is not set 625# CONFIG_SERIAL_NONSTANDARD is not set
617# CONFIG_NOZOMI is not set 626# CONFIG_NOZOMI is not set
618 627
@@ -653,13 +662,6 @@ CONFIG_I2C_BOARDINFO=y
653CONFIG_I2C_CHARDEV=y 662CONFIG_I2C_CHARDEV=y
654 663
655# 664#
656# I2C Algorithms
657#
658# CONFIG_I2C_ALGOBIT is not set
659# CONFIG_I2C_ALGOPCF is not set
660# CONFIG_I2C_ALGOPCA is not set
661
662#
663# I2C Hardware Bus support 665# I2C Hardware Bus support
664# 666#
665# CONFIG_I2C_ALI1535 is not set 667# CONFIG_I2C_ALI1535 is not set
@@ -686,6 +688,7 @@ CONFIG_I2C_MPC=y
686# CONFIG_I2C_VIA is not set 688# CONFIG_I2C_VIA is not set
687# CONFIG_I2C_VIAPRO is not set 689# CONFIG_I2C_VIAPRO is not set
688# CONFIG_I2C_VOODOO3 is not set 690# CONFIG_I2C_VOODOO3 is not set
691# CONFIG_I2C_PCA_PLATFORM is not set
689 692
690# 693#
691# Miscellaneous I2C Chip support 694# Miscellaneous I2C Chip support
@@ -695,17 +698,12 @@ CONFIG_I2C_MPC=y
695# CONFIG_SENSORS_PCF8574 is not set 698# CONFIG_SENSORS_PCF8574 is not set
696# CONFIG_PCF8575 is not set 699# CONFIG_PCF8575 is not set
697# CONFIG_SENSORS_PCF8591 is not set 700# CONFIG_SENSORS_PCF8591 is not set
698# CONFIG_TPS65010 is not set
699# CONFIG_SENSORS_MAX6875 is not set 701# CONFIG_SENSORS_MAX6875 is not set
700# CONFIG_SENSORS_TSL2550 is not set 702# CONFIG_SENSORS_TSL2550 is not set
701# CONFIG_I2C_DEBUG_CORE is not set 703# CONFIG_I2C_DEBUG_CORE is not set
702# CONFIG_I2C_DEBUG_ALGO is not set 704# CONFIG_I2C_DEBUG_ALGO is not set
703# CONFIG_I2C_DEBUG_BUS is not set 705# CONFIG_I2C_DEBUG_BUS is not set
704# CONFIG_I2C_DEBUG_CHIP is not set 706# CONFIG_I2C_DEBUG_CHIP is not set
705
706#
707# SPI support
708#
709CONFIG_SPI=y 707CONFIG_SPI=y
710CONFIG_SPI_MASTER=y 708CONFIG_SPI_MASTER=y
711 709
@@ -809,12 +807,22 @@ CONFIG_SSB_POSSIBLE=y
809# Multifunction device drivers 807# Multifunction device drivers
810# 808#
811# CONFIG_MFD_SM501 is not set 809# CONFIG_MFD_SM501 is not set
810# CONFIG_HTC_PASIC3 is not set
812 811
813# 812#
814# Multimedia devices 813# Multimedia devices
815# 814#
815
816#
817# Multimedia core support
818#
816# CONFIG_VIDEO_DEV is not set 819# CONFIG_VIDEO_DEV is not set
817# CONFIG_DVB_CORE is not set 820# CONFIG_DVB_CORE is not set
821# CONFIG_VIDEO_MEDIA is not set
822
823#
824# Multimedia drivers
825#
818CONFIG_DAB=y 826CONFIG_DAB=y
819# CONFIG_USB_DABUSB is not set 827# CONFIG_USB_DABUSB is not set
820 828
@@ -867,16 +875,20 @@ CONFIG_USB_DEVICEFS=y
867CONFIG_USB_DEVICE_CLASS=y 875CONFIG_USB_DEVICE_CLASS=y
868# CONFIG_USB_DYNAMIC_MINORS is not set 876# CONFIG_USB_DYNAMIC_MINORS is not set
869# CONFIG_USB_OTG is not set 877# CONFIG_USB_OTG is not set
878# CONFIG_USB_OTG_WHITELIST is not set
879# CONFIG_USB_OTG_BLACKLIST_HUB is not set
870 880
871# 881#
872# USB Host Controller Drivers 882# USB Host Controller Drivers
873# 883#
884# CONFIG_USB_C67X00_HCD is not set
874CONFIG_USB_EHCI_HCD=y 885CONFIG_USB_EHCI_HCD=y
875# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 886# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
876# CONFIG_USB_EHCI_TT_NEWSCHED is not set 887# CONFIG_USB_EHCI_TT_NEWSCHED is not set
877# CONFIG_USB_EHCI_FSL is not set 888# CONFIG_USB_EHCI_FSL is not set
878CONFIG_USB_EHCI_HCD_PPC_OF=y 889CONFIG_USB_EHCI_HCD_PPC_OF=y
879# CONFIG_USB_ISP116X_HCD is not set 890# CONFIG_USB_ISP116X_HCD is not set
891# CONFIG_USB_ISP1760_HCD is not set
880CONFIG_USB_OHCI_HCD=y 892CONFIG_USB_OHCI_HCD=y
881CONFIG_USB_OHCI_HCD_PPC_OF=y 893CONFIG_USB_OHCI_HCD_PPC_OF=y
882CONFIG_USB_OHCI_HCD_PPC_OF_BE=y 894CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
@@ -894,6 +906,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
894# 906#
895# CONFIG_USB_ACM is not set 907# CONFIG_USB_ACM is not set
896# CONFIG_USB_PRINTER is not set 908# CONFIG_USB_PRINTER is not set
909# CONFIG_USB_WDM is not set
897 910
898# 911#
899# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 912# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -913,7 +926,9 @@ CONFIG_USB_STORAGE=y
913# CONFIG_USB_STORAGE_SDDR55 is not set 926# CONFIG_USB_STORAGE_SDDR55 is not set
914# CONFIG_USB_STORAGE_JUMPSHOT is not set 927# CONFIG_USB_STORAGE_JUMPSHOT is not set
915# CONFIG_USB_STORAGE_ALAUDA is not set 928# CONFIG_USB_STORAGE_ALAUDA is not set
929# CONFIG_USB_STORAGE_ONETOUCH is not set
916# CONFIG_USB_STORAGE_KARMA is not set 930# CONFIG_USB_STORAGE_KARMA is not set
931# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
917# CONFIG_USB_LIBUSUAL is not set 932# CONFIG_USB_LIBUSUAL is not set
918 933
919# 934#
@@ -951,6 +966,7 @@ CONFIG_USB_MON=y
951# CONFIG_USB_TRANCEVIBRATOR is not set 966# CONFIG_USB_TRANCEVIBRATOR is not set
952# CONFIG_USB_IOWARRIOR is not set 967# CONFIG_USB_IOWARRIOR is not set
953# CONFIG_USB_TEST is not set 968# CONFIG_USB_TEST is not set
969# CONFIG_USB_ISIGHTFW is not set
954# CONFIG_USB_GADGET is not set 970# CONFIG_USB_GADGET is not set
955CONFIG_MMC=y 971CONFIG_MMC=y
956# CONFIG_MMC_DEBUG is not set 972# CONFIG_MMC_DEBUG is not set
@@ -962,6 +978,7 @@ CONFIG_MMC=y
962CONFIG_MMC_BLOCK=y 978CONFIG_MMC_BLOCK=y
963CONFIG_MMC_BLOCK_BOUNCE=y 979CONFIG_MMC_BLOCK_BOUNCE=y
964# CONFIG_SDIO_UART is not set 980# CONFIG_SDIO_UART is not set
981# CONFIG_MMC_TEST is not set
965 982
966# 983#
967# MMC/SD Host Controller Drivers 984# MMC/SD Host Controller Drivers
@@ -972,14 +989,11 @@ CONFIG_MMC_BLOCK_BOUNCE=y
972CONFIG_MMC_SPI=y 989CONFIG_MMC_SPI=y
973# CONFIG_MEMSTICK is not set 990# CONFIG_MEMSTICK is not set
974# CONFIG_NEW_LEDS is not set 991# CONFIG_NEW_LEDS is not set
992# CONFIG_ACCESSIBILITY is not set
975# CONFIG_INFINIBAND is not set 993# CONFIG_INFINIBAND is not set
976# CONFIG_EDAC is not set 994# CONFIG_EDAC is not set
977# CONFIG_RTC_CLASS is not set 995# CONFIG_RTC_CLASS is not set
978# CONFIG_DMADEVICES is not set 996# CONFIG_DMADEVICES is not set
979
980#
981# Userspace I/O
982#
983# CONFIG_UIO is not set 997# CONFIG_UIO is not set
984 998
985# 999#
@@ -999,7 +1013,6 @@ CONFIG_FS_MBCACHE=y
999# CONFIG_JFS_FS is not set 1013# CONFIG_JFS_FS is not set
1000# CONFIG_FS_POSIX_ACL is not set 1014# CONFIG_FS_POSIX_ACL is not set
1001# CONFIG_XFS_FS is not set 1015# CONFIG_XFS_FS is not set
1002# CONFIG_GFS2_FS is not set
1003# CONFIG_OCFS2_FS is not set 1016# CONFIG_OCFS2_FS is not set
1004CONFIG_DNOTIFY=y 1017CONFIG_DNOTIFY=y
1005CONFIG_INOTIFY=y 1018CONFIG_INOTIFY=y
@@ -1060,7 +1073,6 @@ CONFIG_NFS_FS=y
1060CONFIG_NFS_V3=y 1073CONFIG_NFS_V3=y
1061# CONFIG_NFS_V3_ACL is not set 1074# CONFIG_NFS_V3_ACL is not set
1062CONFIG_NFS_V4=y 1075CONFIG_NFS_V4=y
1063# CONFIG_NFS_DIRECTIO is not set
1064# CONFIG_NFSD is not set 1076# CONFIG_NFSD is not set
1065CONFIG_ROOT_NFS=y 1077CONFIG_ROOT_NFS=y
1066CONFIG_LOCKD=y 1078CONFIG_LOCKD=y
@@ -1147,6 +1159,7 @@ CONFIG_UCC=y
1147# Library routines 1159# Library routines
1148# 1160#
1149CONFIG_BITREVERSE=y 1161CONFIG_BITREVERSE=y
1162# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1150# CONFIG_CRC_CCITT is not set 1163# CONFIG_CRC_CCITT is not set
1151# CONFIG_CRC16 is not set 1164# CONFIG_CRC16 is not set
1152CONFIG_CRC_ITU_T=y 1165CONFIG_CRC_ITU_T=y
@@ -1157,6 +1170,7 @@ CONFIG_PLIST=y
1157CONFIG_HAS_IOMEM=y 1170CONFIG_HAS_IOMEM=y
1158CONFIG_HAS_IOPORT=y 1171CONFIG_HAS_IOPORT=y
1159CONFIG_HAS_DMA=y 1172CONFIG_HAS_DMA=y
1173CONFIG_HAVE_LMB=y
1160 1174
1161# 1175#
1162# Kernel hacking 1176# Kernel hacking
@@ -1164,6 +1178,7 @@ CONFIG_HAS_DMA=y
1164# CONFIG_PRINTK_TIME is not set 1178# CONFIG_PRINTK_TIME is not set
1165CONFIG_ENABLE_WARN_DEPRECATED=y 1179CONFIG_ENABLE_WARN_DEPRECATED=y
1166CONFIG_ENABLE_MUST_CHECK=y 1180CONFIG_ENABLE_MUST_CHECK=y
1181CONFIG_FRAME_WARN=1024
1167# CONFIG_MAGIC_SYSRQ is not set 1182# CONFIG_MAGIC_SYSRQ is not set
1168# CONFIG_UNUSED_SYMBOLS is not set 1183# CONFIG_UNUSED_SYMBOLS is not set
1169# CONFIG_DEBUG_FS is not set 1184# CONFIG_DEBUG_FS is not set
@@ -1173,6 +1188,7 @@ CONFIG_ENABLE_MUST_CHECK=y
1173# CONFIG_SLUB_STATS is not set 1188# CONFIG_SLUB_STATS is not set
1174# CONFIG_DEBUG_BUGVERBOSE is not set 1189# CONFIG_DEBUG_BUGVERBOSE is not set
1175# CONFIG_SAMPLES is not set 1190# CONFIG_SAMPLES is not set
1191# CONFIG_IRQSTACKS is not set
1176# CONFIG_PPC_EARLY_DEBUG is not set 1192# CONFIG_PPC_EARLY_DEBUG is not set
1177 1193
1178# 1194#
@@ -1182,52 +1198,82 @@ CONFIG_ENABLE_MUST_CHECK=y
1182# CONFIG_SECURITY is not set 1198# CONFIG_SECURITY is not set
1183# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1199# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1184CONFIG_CRYPTO=y 1200CONFIG_CRYPTO=y
1201
1202#
1203# Crypto core or helper
1204#
1185CONFIG_CRYPTO_ALGAPI=y 1205CONFIG_CRYPTO_ALGAPI=y
1186CONFIG_CRYPTO_BLKCIPHER=y 1206CONFIG_CRYPTO_BLKCIPHER=y
1187# CONFIG_CRYPTO_SEQIV is not set
1188CONFIG_CRYPTO_MANAGER=y 1207CONFIG_CRYPTO_MANAGER=y
1208# CONFIG_CRYPTO_GF128MUL is not set
1209# CONFIG_CRYPTO_NULL is not set
1210# CONFIG_CRYPTO_CRYPTD is not set
1211# CONFIG_CRYPTO_AUTHENC is not set
1212# CONFIG_CRYPTO_TEST is not set
1213
1214#
1215# Authenticated Encryption with Associated Data
1216#
1217# CONFIG_CRYPTO_CCM is not set
1218# CONFIG_CRYPTO_GCM is not set
1219# CONFIG_CRYPTO_SEQIV is not set
1220
1221#
1222# Block modes
1223#
1224CONFIG_CRYPTO_CBC=y
1225# CONFIG_CRYPTO_CTR is not set
1226# CONFIG_CRYPTO_CTS is not set
1227CONFIG_CRYPTO_ECB=m
1228# CONFIG_CRYPTO_LRW is not set
1229CONFIG_CRYPTO_PCBC=m
1230# CONFIG_CRYPTO_XTS is not set
1231
1232#
1233# Hash modes
1234#
1189# CONFIG_CRYPTO_HMAC is not set 1235# CONFIG_CRYPTO_HMAC is not set
1190# CONFIG_CRYPTO_XCBC is not set 1236# CONFIG_CRYPTO_XCBC is not set
1191# CONFIG_CRYPTO_NULL is not set 1237
1238#
1239# Digest
1240#
1241# CONFIG_CRYPTO_CRC32C is not set
1192# CONFIG_CRYPTO_MD4 is not set 1242# CONFIG_CRYPTO_MD4 is not set
1193CONFIG_CRYPTO_MD5=y 1243CONFIG_CRYPTO_MD5=y
1244# CONFIG_CRYPTO_MICHAEL_MIC is not set
1194# CONFIG_CRYPTO_SHA1 is not set 1245# CONFIG_CRYPTO_SHA1 is not set
1195# CONFIG_CRYPTO_SHA256 is not set 1246# CONFIG_CRYPTO_SHA256 is not set
1196# CONFIG_CRYPTO_SHA512 is not set 1247# CONFIG_CRYPTO_SHA512 is not set
1197# CONFIG_CRYPTO_WP512 is not set
1198# CONFIG_CRYPTO_TGR192 is not set 1248# CONFIG_CRYPTO_TGR192 is not set
1199# CONFIG_CRYPTO_GF128MUL is not set 1249# CONFIG_CRYPTO_WP512 is not set
1200CONFIG_CRYPTO_ECB=m 1250
1201CONFIG_CRYPTO_CBC=y 1251#
1202CONFIG_CRYPTO_PCBC=m 1252# Ciphers
1203# CONFIG_CRYPTO_LRW is not set 1253#
1204# CONFIG_CRYPTO_XTS is not set
1205# CONFIG_CRYPTO_CTR is not set
1206# CONFIG_CRYPTO_GCM is not set
1207# CONFIG_CRYPTO_CCM is not set
1208# CONFIG_CRYPTO_CRYPTD is not set
1209CONFIG_CRYPTO_DES=y
1210# CONFIG_CRYPTO_FCRYPT is not set
1211# CONFIG_CRYPTO_BLOWFISH is not set
1212# CONFIG_CRYPTO_TWOFISH is not set
1213# CONFIG_CRYPTO_SERPENT is not set
1214# CONFIG_CRYPTO_AES is not set 1254# CONFIG_CRYPTO_AES is not set
1255# CONFIG_CRYPTO_ANUBIS is not set
1256# CONFIG_CRYPTO_ARC4 is not set
1257# CONFIG_CRYPTO_BLOWFISH is not set
1258# CONFIG_CRYPTO_CAMELLIA is not set
1215# CONFIG_CRYPTO_CAST5 is not set 1259# CONFIG_CRYPTO_CAST5 is not set
1216# CONFIG_CRYPTO_CAST6 is not set 1260# CONFIG_CRYPTO_CAST6 is not set
1217# CONFIG_CRYPTO_TEA is not set 1261CONFIG_CRYPTO_DES=y
1218# CONFIG_CRYPTO_ARC4 is not set 1262# CONFIG_CRYPTO_FCRYPT is not set
1219# CONFIG_CRYPTO_KHAZAD is not set 1263# CONFIG_CRYPTO_KHAZAD is not set
1220# CONFIG_CRYPTO_ANUBIS is not set
1221# CONFIG_CRYPTO_SEED is not set
1222# CONFIG_CRYPTO_SALSA20 is not set 1264# CONFIG_CRYPTO_SALSA20 is not set
1265# CONFIG_CRYPTO_SEED is not set
1266# CONFIG_CRYPTO_SERPENT is not set
1267# CONFIG_CRYPTO_TEA is not set
1268# CONFIG_CRYPTO_TWOFISH is not set
1269
1270#
1271# Compression
1272#
1223# CONFIG_CRYPTO_DEFLATE is not set 1273# CONFIG_CRYPTO_DEFLATE is not set
1224# CONFIG_CRYPTO_MICHAEL_MIC is not set
1225# CONFIG_CRYPTO_CRC32C is not set
1226# CONFIG_CRYPTO_CAMELLIA is not set
1227# CONFIG_CRYPTO_TEST is not set
1228# CONFIG_CRYPTO_AUTHENC is not set
1229# CONFIG_CRYPTO_LZO is not set 1274# CONFIG_CRYPTO_LZO is not set
1230CONFIG_CRYPTO_HW=y 1275CONFIG_CRYPTO_HW=y
1231# CONFIG_CRYPTO_DEV_HIFN_795X is not set 1276# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1232# CONFIG_PPC_CLOCK is not set 1277# CONFIG_PPC_CLOCK is not set
1233CONFIG_PPC_LIB_RHEAP=y 1278CONFIG_PPC_LIB_RHEAP=y
1279# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/83xx/mpc834x_itx_defconfig b/arch/powerpc/configs/83xx/mpc834x_itx_defconfig
index e1de399a7bdd..b47fc9185708 100644
--- a/arch/powerpc/configs/83xx/mpc834x_itx_defconfig
+++ b/arch/powerpc/configs/83xx/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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 24 08:48:17 2008 4# Mon Jun 9 08:52:25 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -31,6 +31,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y 31CONFIG_GENERIC_HARDIRQS=y
32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
33CONFIG_IRQ_PER_CPU=y 33CONFIG_IRQ_PER_CPU=y
34CONFIG_STACKTRACE_SUPPORT=y
35CONFIG_LOCKDEP_SUPPORT=y
34CONFIG_RWSEM_XCHGADD_ALGORITHM=y 36CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y 37CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y 38CONFIG_GENERIC_HWEIGHT=y
@@ -86,6 +88,7 @@ CONFIG_INITRAMFS_SOURCE=""
86CONFIG_SYSCTL=y 88CONFIG_SYSCTL=y
87CONFIG_EMBEDDED=y 89CONFIG_EMBEDDED=y
88CONFIG_SYSCTL_SYSCALL=y 90CONFIG_SYSCTL_SYSCALL=y
91CONFIG_SYSCTL_SYSCALL_CHECK=y
89# CONFIG_KALLSYMS is not set 92# CONFIG_KALLSYMS is not set
90CONFIG_HOTPLUG=y 93CONFIG_HOTPLUG=y
91CONFIG_PRINTK=y 94CONFIG_PRINTK=y
@@ -110,12 +113,14 @@ CONFIG_SLUB=y
110CONFIG_HAVE_OPROFILE=y 113CONFIG_HAVE_OPROFILE=y
111CONFIG_HAVE_KPROBES=y 114CONFIG_HAVE_KPROBES=y
112CONFIG_HAVE_KRETPROBES=y 115CONFIG_HAVE_KRETPROBES=y
116# CONFIG_HAVE_DMA_ATTRS is not set
113CONFIG_PROC_PAGE_MONITOR=y 117CONFIG_PROC_PAGE_MONITOR=y
114CONFIG_SLABINFO=y 118CONFIG_SLABINFO=y
115CONFIG_RT_MUTEXES=y 119CONFIG_RT_MUTEXES=y
116# CONFIG_TINY_SHMEM is not set 120# CONFIG_TINY_SHMEM is not set
117CONFIG_BASE_SMALL=0 121CONFIG_BASE_SMALL=0
118CONFIG_MODULES=y 122CONFIG_MODULES=y
123# CONFIG_MODULE_FORCE_LOAD is not set
119CONFIG_MODULE_UNLOAD=y 124CONFIG_MODULE_UNLOAD=y
120# CONFIG_MODULE_FORCE_UNLOAD is not set 125# CONFIG_MODULE_FORCE_UNLOAD is not set
121# CONFIG_MODVERSIONS is not set 126# CONFIG_MODVERSIONS is not set
@@ -210,11 +215,13 @@ CONFIG_FLATMEM=y
210CONFIG_FLAT_NODE_MEM_MAP=y 215CONFIG_FLAT_NODE_MEM_MAP=y
211# CONFIG_SPARSEMEM_STATIC is not set 216# CONFIG_SPARSEMEM_STATIC is not set
212# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 217# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
218CONFIG_PAGEFLAGS_EXTENDED=y
213CONFIG_SPLIT_PTLOCK_CPUS=4 219CONFIG_SPLIT_PTLOCK_CPUS=4
214# CONFIG_RESOURCES_64BIT is not set 220# CONFIG_RESOURCES_64BIT is not set
215CONFIG_ZONE_DMA_FLAG=1 221CONFIG_ZONE_DMA_FLAG=1
216CONFIG_BOUNCE=y 222CONFIG_BOUNCE=y
217CONFIG_VIRT_TO_BUS=y 223CONFIG_VIRT_TO_BUS=y
224CONFIG_FORCE_MAX_ZONEORDER=11
218CONFIG_PROC_DEVICETREE=y 225CONFIG_PROC_DEVICETREE=y
219# CONFIG_CMDLINE_BOOL is not set 226# CONFIG_CMDLINE_BOOL is not set
220# CONFIG_PM is not set 227# CONFIG_PM is not set
@@ -237,6 +244,7 @@ CONFIG_ARCH_SUPPORTS_MSI=y
237CONFIG_PCI_LEGACY=y 244CONFIG_PCI_LEGACY=y
238# CONFIG_PCCARD is not set 245# CONFIG_PCCARD is not set
239# CONFIG_HOTPLUG_PCI is not set 246# CONFIG_HOTPLUG_PCI is not set
247# CONFIG_HAS_RAPIDIO is not set
240 248
241# 249#
242# Advanced setup 250# Advanced setup
@@ -246,11 +254,11 @@ CONFIG_PCI_LEGACY=y
246# 254#
247# Default settings for advanced configuration options are used 255# Default settings for advanced configuration options are used
248# 256#
249CONFIG_HIGHMEM_START=0xfe000000
250CONFIG_LOWMEM_SIZE=0x30000000 257CONFIG_LOWMEM_SIZE=0x30000000
258CONFIG_PAGE_OFFSET=0xc0000000
251CONFIG_KERNEL_START=0xc0000000 259CONFIG_KERNEL_START=0xc0000000
260CONFIG_PHYSICAL_START=0x00000000
252CONFIG_TASK_SIZE=0xc0000000 261CONFIG_TASK_SIZE=0xc0000000
253CONFIG_BOOT_LOAD=0x00800000
254 262
255# 263#
256# Networking 264# Networking
@@ -298,8 +306,6 @@ CONFIG_TCP_CONG_CUBIC=y
298CONFIG_DEFAULT_TCP_CONG="cubic" 306CONFIG_DEFAULT_TCP_CONG="cubic"
299# CONFIG_TCP_MD5SIG is not set 307# CONFIG_TCP_MD5SIG is not set
300# CONFIG_IPV6 is not set 308# CONFIG_IPV6 is not set
301# CONFIG_INET6_XFRM_TUNNEL is not set
302# CONFIG_INET6_TUNNEL is not set
303# CONFIG_NETWORK_SECMARK is not set 309# CONFIG_NETWORK_SECMARK is not set
304# CONFIG_NETFILTER is not set 310# CONFIG_NETFILTER is not set
305# CONFIG_IP_DCCP is not set 311# CONFIG_IP_DCCP is not set
@@ -432,6 +438,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
432# 438#
433# CONFIG_MTD_UBI is not set 439# CONFIG_MTD_UBI is not set
434CONFIG_OF_DEVICE=y 440CONFIG_OF_DEVICE=y
441CONFIG_OF_I2C=y
435# CONFIG_PARPORT is not set 442# CONFIG_PARPORT is not set
436CONFIG_BLK_DEV=y 443CONFIG_BLK_DEV=y
437# CONFIG_BLK_DEV_FD is not set 444# CONFIG_BLK_DEV_FD is not set
@@ -541,7 +548,11 @@ CONFIG_SCSI_LOWLEVEL=y
541# CONFIG_SCSI_SRP is not set 548# CONFIG_SCSI_SRP is not set
542CONFIG_ATA=y 549CONFIG_ATA=y
543# CONFIG_ATA_NONSTANDARD is not set 550# CONFIG_ATA_NONSTANDARD is not set
551CONFIG_SATA_PMP=y
544# CONFIG_SATA_AHCI is not set 552# CONFIG_SATA_AHCI is not set
553# CONFIG_SATA_SIL24 is not set
554# CONFIG_SATA_FSL is not set
555CONFIG_ATA_SFF=y
545# CONFIG_SATA_SVW is not set 556# CONFIG_SATA_SVW is not set
546# CONFIG_ATA_PIIX is not set 557# CONFIG_ATA_PIIX is not set
547# CONFIG_SATA_MV is not set 558# CONFIG_SATA_MV is not set
@@ -551,13 +562,11 @@ CONFIG_ATA=y
551# CONFIG_SATA_PROMISE is not set 562# CONFIG_SATA_PROMISE is not set
552# CONFIG_SATA_SX4 is not set 563# CONFIG_SATA_SX4 is not set
553CONFIG_SATA_SIL=y 564CONFIG_SATA_SIL=y
554# CONFIG_SATA_SIL24 is not set
555# CONFIG_SATA_SIS is not set 565# CONFIG_SATA_SIS is not set
556# CONFIG_SATA_ULI is not set 566# CONFIG_SATA_ULI is not set
557# CONFIG_SATA_VIA is not set 567# CONFIG_SATA_VIA is not set
558# CONFIG_SATA_VITESSE is not set 568# CONFIG_SATA_VITESSE is not set
559# CONFIG_SATA_INIC162X is not set 569# CONFIG_SATA_INIC162X is not set
560# CONFIG_SATA_FSL is not set
561# CONFIG_PATA_ALI is not set 570# CONFIG_PATA_ALI is not set
562# CONFIG_PATA_AMD is not set 571# CONFIG_PATA_AMD is not set
563# CONFIG_PATA_ARTOP is not set 572# CONFIG_PATA_ARTOP is not set
@@ -598,6 +607,7 @@ CONFIG_SATA_SIL=y
598# CONFIG_PATA_WINBOND is not set 607# CONFIG_PATA_WINBOND is not set
599CONFIG_PATA_PLATFORM=y 608CONFIG_PATA_PLATFORM=y
600CONFIG_PATA_OF_PLATFORM=y 609CONFIG_PATA_OF_PLATFORM=y
610# CONFIG_PATA_SCH is not set
601CONFIG_MD=y 611CONFIG_MD=y
602CONFIG_BLK_DEV_MD=y 612CONFIG_BLK_DEV_MD=y
603CONFIG_MD_LINEAR=y 613CONFIG_MD_LINEAR=y
@@ -659,7 +669,6 @@ CONFIG_NETDEV_1000=y
659# CONFIG_SIS190 is not set 669# CONFIG_SIS190 is not set
660# CONFIG_SKGE is not set 670# CONFIG_SKGE is not set
661# CONFIG_SKY2 is not set 671# CONFIG_SKY2 is not set
662# CONFIG_SK98LIN is not set
663# CONFIG_VIA_VELOCITY is not set 672# CONFIG_VIA_VELOCITY is not set
664# CONFIG_TIGON3 is not set 673# CONFIG_TIGON3 is not set
665# CONFIG_BNX2 is not set 674# CONFIG_BNX2 is not set
@@ -679,6 +688,7 @@ CONFIG_NETDEV_10000=y
679# CONFIG_MLX4_CORE is not set 688# CONFIG_MLX4_CORE is not set
680# CONFIG_TEHUTI is not set 689# CONFIG_TEHUTI is not set
681# CONFIG_BNX2X is not set 690# CONFIG_BNX2X is not set
691# CONFIG_SFC is not set
682# CONFIG_TR is not set 692# CONFIG_TR is not set
683 693
684# 694#
@@ -686,6 +696,7 @@ CONFIG_NETDEV_10000=y
686# 696#
687# CONFIG_WLAN_PRE80211 is not set 697# CONFIG_WLAN_PRE80211 is not set
688# CONFIG_WLAN_80211 is not set 698# CONFIG_WLAN_80211 is not set
699# CONFIG_IWLWIFI_LEDS is not set
689 700
690# 701#
691# USB Network Adapters 702# USB Network Adapters
@@ -722,6 +733,7 @@ CONFIG_NETDEV_10000=y
722# Character devices 733# Character devices
723# 734#
724# CONFIG_VT is not set 735# CONFIG_VT is not set
736CONFIG_DEVKMEM=y
725# CONFIG_SERIAL_NONSTANDARD is not set 737# CONFIG_SERIAL_NONSTANDARD is not set
726# CONFIG_NOZOMI is not set 738# CONFIG_NOZOMI is not set
727 739
@@ -749,7 +761,6 @@ CONFIG_LEGACY_PTY_COUNT=256
749# CONFIG_IPMI_HANDLER is not set 761# CONFIG_IPMI_HANDLER is not set
750CONFIG_HW_RANDOM=y 762CONFIG_HW_RANDOM=y
751# CONFIG_NVRAM is not set 763# CONFIG_NVRAM is not set
752# CONFIG_GEN_RTC is not set
753# CONFIG_R3964 is not set 764# CONFIG_R3964 is not set
754# CONFIG_APPLICOM is not set 765# CONFIG_APPLICOM is not set
755# CONFIG_RAW_DRIVER is not set 766# CONFIG_RAW_DRIVER is not set
@@ -760,13 +771,6 @@ CONFIG_I2C_BOARDINFO=y
760CONFIG_I2C_CHARDEV=y 771CONFIG_I2C_CHARDEV=y
761 772
762# 773#
763# I2C Algorithms
764#
765# CONFIG_I2C_ALGOBIT is not set
766# CONFIG_I2C_ALGOPCF is not set
767# CONFIG_I2C_ALGOPCA is not set
768
769#
770# I2C Hardware Bus support 774# I2C Hardware Bus support
771# 775#
772# CONFIG_I2C_ALI1535 is not set 776# CONFIG_I2C_ALI1535 is not set
@@ -793,6 +797,7 @@ CONFIG_I2C_MPC=y
793# CONFIG_I2C_VIA is not set 797# CONFIG_I2C_VIA is not set
794# CONFIG_I2C_VIAPRO is not set 798# CONFIG_I2C_VIAPRO is not set
795# CONFIG_I2C_VOODOO3 is not set 799# CONFIG_I2C_VOODOO3 is not set
800# CONFIG_I2C_PCA_PLATFORM is not set
796 801
797# 802#
798# Miscellaneous I2C Chip support 803# Miscellaneous I2C Chip support
@@ -802,17 +807,12 @@ CONFIG_I2C_MPC=y
802CONFIG_SENSORS_PCF8574=y 807CONFIG_SENSORS_PCF8574=y
803# CONFIG_PCF8575 is not set 808# CONFIG_PCF8575 is not set
804# CONFIG_SENSORS_PCF8591 is not set 809# CONFIG_SENSORS_PCF8591 is not set
805# CONFIG_TPS65010 is not set
806# CONFIG_SENSORS_MAX6875 is not set 810# CONFIG_SENSORS_MAX6875 is not set
807# CONFIG_SENSORS_TSL2550 is not set 811# CONFIG_SENSORS_TSL2550 is not set
808# CONFIG_I2C_DEBUG_CORE is not set 812# CONFIG_I2C_DEBUG_CORE is not set
809# CONFIG_I2C_DEBUG_ALGO is not set 813# CONFIG_I2C_DEBUG_ALGO is not set
810# CONFIG_I2C_DEBUG_BUS is not set 814# CONFIG_I2C_DEBUG_BUS is not set
811# CONFIG_I2C_DEBUG_CHIP is not set 815# CONFIG_I2C_DEBUG_CHIP is not set
812
813#
814# SPI support
815#
816CONFIG_SPI=y 816CONFIG_SPI=y
817CONFIG_SPI_MASTER=y 817CONFIG_SPI_MASTER=y
818 818
@@ -862,12 +862,22 @@ CONFIG_SSB_POSSIBLE=y
862# Multifunction device drivers 862# Multifunction device drivers
863# 863#
864# CONFIG_MFD_SM501 is not set 864# CONFIG_MFD_SM501 is not set
865# CONFIG_HTC_PASIC3 is not set
865 866
866# 867#
867# Multimedia devices 868# Multimedia devices
868# 869#
870
871#
872# Multimedia core support
873#
869# CONFIG_VIDEO_DEV is not set 874# CONFIG_VIDEO_DEV is not set
870# CONFIG_DVB_CORE is not set 875# CONFIG_DVB_CORE is not set
876# CONFIG_VIDEO_MEDIA is not set
877
878#
879# Multimedia drivers
880#
871CONFIG_DAB=y 881CONFIG_DAB=y
872# CONFIG_USB_DABUSB is not set 882# CONFIG_USB_DABUSB is not set
873 883
@@ -905,16 +915,20 @@ CONFIG_USB_DEVICEFS=y
905CONFIG_USB_DEVICE_CLASS=y 915CONFIG_USB_DEVICE_CLASS=y
906# CONFIG_USB_DYNAMIC_MINORS is not set 916# CONFIG_USB_DYNAMIC_MINORS is not set
907# CONFIG_USB_OTG is not set 917# CONFIG_USB_OTG is not set
918# CONFIG_USB_OTG_WHITELIST is not set
919# CONFIG_USB_OTG_BLACKLIST_HUB is not set
908 920
909# 921#
910# USB Host Controller Drivers 922# USB Host Controller Drivers
911# 923#
924# CONFIG_USB_C67X00_HCD is not set
912CONFIG_USB_EHCI_HCD=y 925CONFIG_USB_EHCI_HCD=y
913CONFIG_USB_EHCI_ROOT_HUB_TT=y 926CONFIG_USB_EHCI_ROOT_HUB_TT=y
914# CONFIG_USB_EHCI_TT_NEWSCHED is not set 927# CONFIG_USB_EHCI_TT_NEWSCHED is not set
915CONFIG_USB_EHCI_FSL=y 928CONFIG_USB_EHCI_FSL=y
916CONFIG_USB_EHCI_HCD_PPC_OF=y 929CONFIG_USB_EHCI_HCD_PPC_OF=y
917# CONFIG_USB_ISP116X_HCD is not set 930# CONFIG_USB_ISP116X_HCD is not set
931# CONFIG_USB_ISP1760_HCD is not set
918# CONFIG_USB_OHCI_HCD is not set 932# CONFIG_USB_OHCI_HCD is not set
919CONFIG_USB_UHCI_HCD=y 933CONFIG_USB_UHCI_HCD=y
920# CONFIG_USB_SL811_HCD is not set 934# CONFIG_USB_SL811_HCD is not set
@@ -925,6 +939,7 @@ CONFIG_USB_UHCI_HCD=y
925# 939#
926# CONFIG_USB_ACM is not set 940# CONFIG_USB_ACM is not set
927# CONFIG_USB_PRINTER is not set 941# CONFIG_USB_PRINTER is not set
942# CONFIG_USB_WDM is not set
928 943
929# 944#
930# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 945# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -945,6 +960,7 @@ CONFIG_USB_STORAGE=y
945# CONFIG_USB_STORAGE_JUMPSHOT is not set 960# CONFIG_USB_STORAGE_JUMPSHOT is not set
946# CONFIG_USB_STORAGE_ALAUDA is not set 961# CONFIG_USB_STORAGE_ALAUDA is not set
947# CONFIG_USB_STORAGE_KARMA is not set 962# CONFIG_USB_STORAGE_KARMA is not set
963# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
948# CONFIG_USB_LIBUSUAL is not set 964# CONFIG_USB_LIBUSUAL is not set
949 965
950# 966#
@@ -982,10 +998,12 @@ CONFIG_USB_MON=y
982# CONFIG_USB_TRANCEVIBRATOR is not set 998# CONFIG_USB_TRANCEVIBRATOR is not set
983# CONFIG_USB_IOWARRIOR is not set 999# CONFIG_USB_IOWARRIOR is not set
984# CONFIG_USB_TEST is not set 1000# CONFIG_USB_TEST is not set
1001# CONFIG_USB_ISIGHTFW is not set
985# CONFIG_USB_GADGET is not set 1002# CONFIG_USB_GADGET is not set
986# CONFIG_MMC is not set 1003# CONFIG_MMC is not set
987# CONFIG_MEMSTICK is not set 1004# CONFIG_MEMSTICK is not set
988# CONFIG_NEW_LEDS is not set 1005# CONFIG_NEW_LEDS is not set
1006# CONFIG_ACCESSIBILITY is not set
989# CONFIG_INFINIBAND is not set 1007# CONFIG_INFINIBAND is not set
990# CONFIG_EDAC is not set 1008# CONFIG_EDAC is not set
991CONFIG_RTC_LIB=y 1009CONFIG_RTC_LIB=y
@@ -1040,11 +1058,8 @@ CONFIG_RTC_DRV_DS1307=y
1040# 1058#
1041# on-CPU RTC drivers 1059# on-CPU RTC drivers
1042# 1060#
1061# CONFIG_RTC_DRV_PPC is not set
1043# CONFIG_DMADEVICES is not set 1062# CONFIG_DMADEVICES is not set
1044
1045#
1046# Userspace I/O
1047#
1048# CONFIG_UIO is not set 1063# CONFIG_UIO is not set
1049 1064
1050# 1065#
@@ -1064,7 +1079,6 @@ CONFIG_FS_MBCACHE=y
1064# CONFIG_JFS_FS is not set 1079# CONFIG_JFS_FS is not set
1065# CONFIG_FS_POSIX_ACL is not set 1080# CONFIG_FS_POSIX_ACL is not set
1066# CONFIG_XFS_FS is not set 1081# CONFIG_XFS_FS is not set
1067# CONFIG_GFS2_FS is not set
1068# CONFIG_OCFS2_FS is not set 1082# CONFIG_OCFS2_FS is not set
1069CONFIG_DNOTIFY=y 1083CONFIG_DNOTIFY=y
1070CONFIG_INOTIFY=y 1084CONFIG_INOTIFY=y
@@ -1126,7 +1140,6 @@ CONFIG_NFS_FS=y
1126CONFIG_NFS_V3=y 1140CONFIG_NFS_V3=y
1127# CONFIG_NFS_V3_ACL is not set 1141# CONFIG_NFS_V3_ACL is not set
1128CONFIG_NFS_V4=y 1142CONFIG_NFS_V4=y
1129# CONFIG_NFS_DIRECTIO is not set
1130# CONFIG_NFSD is not set 1143# CONFIG_NFSD is not set
1131CONFIG_ROOT_NFS=y 1144CONFIG_ROOT_NFS=y
1132CONFIG_LOCKD=y 1145CONFIG_LOCKD=y
@@ -1210,6 +1223,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1210# Library routines 1223# Library routines
1211# 1224#
1212CONFIG_BITREVERSE=y 1225CONFIG_BITREVERSE=y
1226# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1213# CONFIG_CRC_CCITT is not set 1227# CONFIG_CRC_CCITT is not set
1214# CONFIG_CRC16 is not set 1228# CONFIG_CRC16 is not set
1215# CONFIG_CRC_ITU_T is not set 1229# CONFIG_CRC_ITU_T is not set
@@ -1220,6 +1234,7 @@ CONFIG_PLIST=y
1220CONFIG_HAS_IOMEM=y 1234CONFIG_HAS_IOMEM=y
1221CONFIG_HAS_IOPORT=y 1235CONFIG_HAS_IOPORT=y
1222CONFIG_HAS_DMA=y 1236CONFIG_HAS_DMA=y
1237CONFIG_HAVE_LMB=y
1223 1238
1224# 1239#
1225# Kernel hacking 1240# Kernel hacking
@@ -1227,6 +1242,7 @@ CONFIG_HAS_DMA=y
1227# CONFIG_PRINTK_TIME is not set 1242# CONFIG_PRINTK_TIME is not set
1228CONFIG_ENABLE_WARN_DEPRECATED=y 1243CONFIG_ENABLE_WARN_DEPRECATED=y
1229CONFIG_ENABLE_MUST_CHECK=y 1244CONFIG_ENABLE_MUST_CHECK=y
1245CONFIG_FRAME_WARN=1024
1230# CONFIG_MAGIC_SYSRQ is not set 1246# CONFIG_MAGIC_SYSRQ is not set
1231# CONFIG_UNUSED_SYMBOLS is not set 1247# CONFIG_UNUSED_SYMBOLS is not set
1232# CONFIG_DEBUG_FS is not set 1248# CONFIG_DEBUG_FS is not set
@@ -1236,6 +1252,7 @@ CONFIG_ENABLE_MUST_CHECK=y
1236# CONFIG_SLUB_STATS is not set 1252# CONFIG_SLUB_STATS is not set
1237# CONFIG_DEBUG_BUGVERBOSE is not set 1253# CONFIG_DEBUG_BUGVERBOSE is not set
1238# CONFIG_SAMPLES is not set 1254# CONFIG_SAMPLES is not set
1255# CONFIG_IRQSTACKS is not set
1239# CONFIG_PPC_EARLY_DEBUG is not set 1256# CONFIG_PPC_EARLY_DEBUG is not set
1240 1257
1241# 1258#
@@ -1245,51 +1262,81 @@ CONFIG_ENABLE_MUST_CHECK=y
1245# CONFIG_SECURITY is not set 1262# CONFIG_SECURITY is not set
1246# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1263# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1247CONFIG_CRYPTO=y 1264CONFIG_CRYPTO=y
1265
1266#
1267# Crypto core or helper
1268#
1248CONFIG_CRYPTO_ALGAPI=y 1269CONFIG_CRYPTO_ALGAPI=y
1249CONFIG_CRYPTO_BLKCIPHER=y 1270CONFIG_CRYPTO_BLKCIPHER=y
1250# CONFIG_CRYPTO_SEQIV is not set
1251CONFIG_CRYPTO_MANAGER=y 1271CONFIG_CRYPTO_MANAGER=y
1272# CONFIG_CRYPTO_GF128MUL is not set
1273# CONFIG_CRYPTO_NULL is not set
1274# CONFIG_CRYPTO_CRYPTD is not set
1275# CONFIG_CRYPTO_AUTHENC is not set
1276# CONFIG_CRYPTO_TEST is not set
1277
1278#
1279# Authenticated Encryption with Associated Data
1280#
1281# CONFIG_CRYPTO_CCM is not set
1282# CONFIG_CRYPTO_GCM is not set
1283# CONFIG_CRYPTO_SEQIV is not set
1284
1285#
1286# Block modes
1287#
1288CONFIG_CRYPTO_CBC=y
1289# CONFIG_CRYPTO_CTR is not set
1290# CONFIG_CRYPTO_CTS is not set
1291# CONFIG_CRYPTO_ECB is not set
1292# CONFIG_CRYPTO_LRW is not set
1293CONFIG_CRYPTO_PCBC=m
1294# CONFIG_CRYPTO_XTS is not set
1295
1296#
1297# Hash modes
1298#
1252# CONFIG_CRYPTO_HMAC is not set 1299# CONFIG_CRYPTO_HMAC is not set
1253# CONFIG_CRYPTO_XCBC is not set 1300# CONFIG_CRYPTO_XCBC is not set
1254# CONFIG_CRYPTO_NULL is not set 1301
1302#
1303# Digest
1304#
1305# CONFIG_CRYPTO_CRC32C is not set
1255# CONFIG_CRYPTO_MD4 is not set 1306# CONFIG_CRYPTO_MD4 is not set
1256CONFIG_CRYPTO_MD5=y 1307CONFIG_CRYPTO_MD5=y
1308# CONFIG_CRYPTO_MICHAEL_MIC is not set
1257# CONFIG_CRYPTO_SHA1 is not set 1309# CONFIG_CRYPTO_SHA1 is not set
1258# CONFIG_CRYPTO_SHA256 is not set 1310# CONFIG_CRYPTO_SHA256 is not set
1259# CONFIG_CRYPTO_SHA512 is not set 1311# CONFIG_CRYPTO_SHA512 is not set
1260# CONFIG_CRYPTO_WP512 is not set
1261# CONFIG_CRYPTO_TGR192 is not set 1312# CONFIG_CRYPTO_TGR192 is not set
1262# CONFIG_CRYPTO_GF128MUL is not set 1313# CONFIG_CRYPTO_WP512 is not set
1263# CONFIG_CRYPTO_ECB is not set 1314
1264CONFIG_CRYPTO_CBC=y 1315#
1265CONFIG_CRYPTO_PCBC=m 1316# Ciphers
1266# CONFIG_CRYPTO_LRW is not set 1317#
1267# CONFIG_CRYPTO_XTS is not set
1268# CONFIG_CRYPTO_CTR is not set
1269# CONFIG_CRYPTO_GCM is not set
1270# CONFIG_CRYPTO_CCM is not set
1271# CONFIG_CRYPTO_CRYPTD is not set
1272CONFIG_CRYPTO_DES=y
1273# CONFIG_CRYPTO_FCRYPT is not set
1274# CONFIG_CRYPTO_BLOWFISH is not set
1275# CONFIG_CRYPTO_TWOFISH is not set
1276# CONFIG_CRYPTO_SERPENT is not set
1277# CONFIG_CRYPTO_AES is not set 1318# CONFIG_CRYPTO_AES is not set
1319# CONFIG_CRYPTO_ANUBIS is not set
1320# CONFIG_CRYPTO_ARC4 is not set
1321# CONFIG_CRYPTO_BLOWFISH is not set
1322# CONFIG_CRYPTO_CAMELLIA is not set
1278# CONFIG_CRYPTO_CAST5 is not set 1323# CONFIG_CRYPTO_CAST5 is not set
1279# CONFIG_CRYPTO_CAST6 is not set 1324# CONFIG_CRYPTO_CAST6 is not set
1280# CONFIG_CRYPTO_TEA is not set 1325CONFIG_CRYPTO_DES=y
1281# CONFIG_CRYPTO_ARC4 is not set 1326# CONFIG_CRYPTO_FCRYPT is not set
1282# CONFIG_CRYPTO_KHAZAD is not set 1327# CONFIG_CRYPTO_KHAZAD is not set
1283# CONFIG_CRYPTO_ANUBIS is not set
1284# CONFIG_CRYPTO_SEED is not set
1285# CONFIG_CRYPTO_SALSA20 is not set 1328# CONFIG_CRYPTO_SALSA20 is not set
1329# CONFIG_CRYPTO_SEED is not set
1330# CONFIG_CRYPTO_SERPENT is not set
1331# CONFIG_CRYPTO_TEA is not set
1332# CONFIG_CRYPTO_TWOFISH is not set
1333
1334#
1335# Compression
1336#
1286# CONFIG_CRYPTO_DEFLATE is not set 1337# CONFIG_CRYPTO_DEFLATE is not set
1287# CONFIG_CRYPTO_MICHAEL_MIC is not set
1288# CONFIG_CRYPTO_CRC32C is not set
1289# CONFIG_CRYPTO_CAMELLIA is not set
1290# CONFIG_CRYPTO_TEST is not set
1291# CONFIG_CRYPTO_AUTHENC is not set
1292# CONFIG_CRYPTO_LZO is not set 1338# CONFIG_CRYPTO_LZO is not set
1293CONFIG_CRYPTO_HW=y 1339CONFIG_CRYPTO_HW=y
1294# CONFIG_CRYPTO_DEV_HIFN_795X is not set 1340# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1295# CONFIG_PPC_CLOCK is not set 1341# CONFIG_PPC_CLOCK is not set
1342# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig b/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig
index b4e39cf82a8c..fdac4845bad9 100644
--- a/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig
+++ b/arch/powerpc/configs/83xx/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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 24 08:48:18 2008 4# Mon Jun 9 08:52:26 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -31,6 +31,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y 31CONFIG_GENERIC_HARDIRQS=y
32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
33CONFIG_IRQ_PER_CPU=y 33CONFIG_IRQ_PER_CPU=y
34CONFIG_STACKTRACE_SUPPORT=y
35CONFIG_LOCKDEP_SUPPORT=y
34CONFIG_RWSEM_XCHGADD_ALGORITHM=y 36CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y 37CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y 38CONFIG_GENERIC_HWEIGHT=y
@@ -86,6 +88,7 @@ CONFIG_INITRAMFS_SOURCE=""
86CONFIG_SYSCTL=y 88CONFIG_SYSCTL=y
87CONFIG_EMBEDDED=y 89CONFIG_EMBEDDED=y
88CONFIG_SYSCTL_SYSCALL=y 90CONFIG_SYSCTL_SYSCALL=y
91CONFIG_SYSCTL_SYSCALL_CHECK=y
89# CONFIG_KALLSYMS is not set 92# CONFIG_KALLSYMS is not set
90CONFIG_HOTPLUG=y 93CONFIG_HOTPLUG=y
91CONFIG_PRINTK=y 94CONFIG_PRINTK=y
@@ -110,12 +113,14 @@ CONFIG_SLUB=y
110CONFIG_HAVE_OPROFILE=y 113CONFIG_HAVE_OPROFILE=y
111CONFIG_HAVE_KPROBES=y 114CONFIG_HAVE_KPROBES=y
112CONFIG_HAVE_KRETPROBES=y 115CONFIG_HAVE_KRETPROBES=y
116# CONFIG_HAVE_DMA_ATTRS is not set
113CONFIG_PROC_PAGE_MONITOR=y 117CONFIG_PROC_PAGE_MONITOR=y
114CONFIG_SLABINFO=y 118CONFIG_SLABINFO=y
115CONFIG_RT_MUTEXES=y 119CONFIG_RT_MUTEXES=y
116# CONFIG_TINY_SHMEM is not set 120# CONFIG_TINY_SHMEM is not set
117CONFIG_BASE_SMALL=0 121CONFIG_BASE_SMALL=0
118CONFIG_MODULES=y 122CONFIG_MODULES=y
123# CONFIG_MODULE_FORCE_LOAD is not set
119CONFIG_MODULE_UNLOAD=y 124CONFIG_MODULE_UNLOAD=y
120# CONFIG_MODULE_FORCE_UNLOAD is not set 125# CONFIG_MODULE_FORCE_UNLOAD is not set
121# CONFIG_MODVERSIONS is not set 126# CONFIG_MODVERSIONS is not set
@@ -210,11 +215,13 @@ CONFIG_FLATMEM=y
210CONFIG_FLAT_NODE_MEM_MAP=y 215CONFIG_FLAT_NODE_MEM_MAP=y
211# CONFIG_SPARSEMEM_STATIC is not set 216# CONFIG_SPARSEMEM_STATIC is not set
212# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 217# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
218CONFIG_PAGEFLAGS_EXTENDED=y
213CONFIG_SPLIT_PTLOCK_CPUS=4 219CONFIG_SPLIT_PTLOCK_CPUS=4
214# CONFIG_RESOURCES_64BIT is not set 220# CONFIG_RESOURCES_64BIT is not set
215CONFIG_ZONE_DMA_FLAG=1 221CONFIG_ZONE_DMA_FLAG=1
216CONFIG_BOUNCE=y 222CONFIG_BOUNCE=y
217CONFIG_VIRT_TO_BUS=y 223CONFIG_VIRT_TO_BUS=y
224CONFIG_FORCE_MAX_ZONEORDER=11
218CONFIG_PROC_DEVICETREE=y 225CONFIG_PROC_DEVICETREE=y
219# CONFIG_CMDLINE_BOOL is not set 226# CONFIG_CMDLINE_BOOL is not set
220# CONFIG_PM is not set 227# CONFIG_PM is not set
@@ -237,6 +244,7 @@ CONFIG_ARCH_SUPPORTS_MSI=y
237CONFIG_PCI_LEGACY=y 244CONFIG_PCI_LEGACY=y
238# CONFIG_PCCARD is not set 245# CONFIG_PCCARD is not set
239# CONFIG_HOTPLUG_PCI is not set 246# CONFIG_HOTPLUG_PCI is not set
247# CONFIG_HAS_RAPIDIO is not set
240 248
241# 249#
242# Advanced setup 250# Advanced setup
@@ -246,11 +254,11 @@ CONFIG_PCI_LEGACY=y
246# 254#
247# Default settings for advanced configuration options are used 255# Default settings for advanced configuration options are used
248# 256#
249CONFIG_HIGHMEM_START=0xfe000000
250CONFIG_LOWMEM_SIZE=0x30000000 257CONFIG_LOWMEM_SIZE=0x30000000
258CONFIG_PAGE_OFFSET=0xc0000000
251CONFIG_KERNEL_START=0xc0000000 259CONFIG_KERNEL_START=0xc0000000
260CONFIG_PHYSICAL_START=0x00000000
252CONFIG_TASK_SIZE=0xc0000000 261CONFIG_TASK_SIZE=0xc0000000
253CONFIG_BOOT_LOAD=0x00800000
254 262
255# 263#
256# Networking 264# Networking
@@ -298,8 +306,6 @@ CONFIG_TCP_CONG_CUBIC=y
298CONFIG_DEFAULT_TCP_CONG="cubic" 306CONFIG_DEFAULT_TCP_CONG="cubic"
299# CONFIG_TCP_MD5SIG is not set 307# CONFIG_TCP_MD5SIG is not set
300# CONFIG_IPV6 is not set 308# CONFIG_IPV6 is not set
301# CONFIG_INET6_XFRM_TUNNEL is not set
302# CONFIG_INET6_TUNNEL is not set
303# CONFIG_NETWORK_SECMARK is not set 309# CONFIG_NETWORK_SECMARK is not set
304# CONFIG_NETFILTER is not set 310# CONFIG_NETFILTER is not set
305# CONFIG_IP_DCCP is not set 311# CONFIG_IP_DCCP is not set
@@ -432,6 +438,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
432# 438#
433# CONFIG_MTD_UBI is not set 439# CONFIG_MTD_UBI is not set
434CONFIG_OF_DEVICE=y 440CONFIG_OF_DEVICE=y
441CONFIG_OF_I2C=y
435# CONFIG_PARPORT is not set 442# CONFIG_PARPORT is not set
436CONFIG_BLK_DEV=y 443CONFIG_BLK_DEV=y
437# CONFIG_BLK_DEV_FD is not set 444# CONFIG_BLK_DEV_FD is not set
@@ -587,7 +594,6 @@ CONFIG_NETDEV_1000=y
587# CONFIG_SIS190 is not set 594# CONFIG_SIS190 is not set
588# CONFIG_SKGE is not set 595# CONFIG_SKGE is not set
589# CONFIG_SKY2 is not set 596# CONFIG_SKY2 is not set
590# CONFIG_SK98LIN is not set
591# CONFIG_VIA_VELOCITY is not set 597# CONFIG_VIA_VELOCITY is not set
592# CONFIG_TIGON3 is not set 598# CONFIG_TIGON3 is not set
593# CONFIG_BNX2 is not set 599# CONFIG_BNX2 is not set
@@ -607,6 +613,7 @@ CONFIG_NETDEV_10000=y
607# CONFIG_MLX4_CORE is not set 613# CONFIG_MLX4_CORE is not set
608# CONFIG_TEHUTI is not set 614# CONFIG_TEHUTI is not set
609# CONFIG_BNX2X is not set 615# CONFIG_BNX2X is not set
616# CONFIG_SFC is not set
610# CONFIG_TR is not set 617# CONFIG_TR is not set
611 618
612# 619#
@@ -614,6 +621,7 @@ CONFIG_NETDEV_10000=y
614# 621#
615# CONFIG_WLAN_PRE80211 is not set 622# CONFIG_WLAN_PRE80211 is not set
616# CONFIG_WLAN_80211 is not set 623# CONFIG_WLAN_80211 is not set
624# CONFIG_IWLWIFI_LEDS is not set
617 625
618# 626#
619# USB Network Adapters 627# USB Network Adapters
@@ -650,6 +658,7 @@ CONFIG_NETDEV_10000=y
650# Character devices 658# Character devices
651# 659#
652# CONFIG_VT is not set 660# CONFIG_VT is not set
661CONFIG_DEVKMEM=y
653# CONFIG_SERIAL_NONSTANDARD is not set 662# CONFIG_SERIAL_NONSTANDARD is not set
654# CONFIG_NOZOMI is not set 663# CONFIG_NOZOMI is not set
655 664
@@ -677,7 +686,6 @@ CONFIG_LEGACY_PTY_COUNT=256
677# CONFIG_IPMI_HANDLER is not set 686# CONFIG_IPMI_HANDLER is not set
678CONFIG_HW_RANDOM=y 687CONFIG_HW_RANDOM=y
679# CONFIG_NVRAM is not set 688# CONFIG_NVRAM is not set
680# CONFIG_GEN_RTC is not set
681# CONFIG_R3964 is not set 689# CONFIG_R3964 is not set
682# CONFIG_APPLICOM is not set 690# CONFIG_APPLICOM is not set
683# CONFIG_RAW_DRIVER is not set 691# CONFIG_RAW_DRIVER is not set
@@ -688,13 +696,6 @@ CONFIG_I2C_BOARDINFO=y
688CONFIG_I2C_CHARDEV=y 696CONFIG_I2C_CHARDEV=y
689 697
690# 698#
691# I2C Algorithms
692#
693# CONFIG_I2C_ALGOBIT is not set
694# CONFIG_I2C_ALGOPCF is not set
695# CONFIG_I2C_ALGOPCA is not set
696
697#
698# I2C Hardware Bus support 699# I2C Hardware Bus support
699# 700#
700# CONFIG_I2C_ALI1535 is not set 701# CONFIG_I2C_ALI1535 is not set
@@ -721,6 +722,7 @@ CONFIG_I2C_MPC=y
721# CONFIG_I2C_VIA is not set 722# CONFIG_I2C_VIA is not set
722# CONFIG_I2C_VIAPRO is not set 723# CONFIG_I2C_VIAPRO is not set
723# CONFIG_I2C_VOODOO3 is not set 724# CONFIG_I2C_VOODOO3 is not set
725# CONFIG_I2C_PCA_PLATFORM is not set
724 726
725# 727#
726# Miscellaneous I2C Chip support 728# Miscellaneous I2C Chip support
@@ -730,17 +732,12 @@ CONFIG_I2C_MPC=y
730CONFIG_SENSORS_PCF8574=y 732CONFIG_SENSORS_PCF8574=y
731# CONFIG_PCF8575 is not set 733# CONFIG_PCF8575 is not set
732# CONFIG_SENSORS_PCF8591 is not set 734# CONFIG_SENSORS_PCF8591 is not set
733# CONFIG_TPS65010 is not set
734# CONFIG_SENSORS_MAX6875 is not set 735# CONFIG_SENSORS_MAX6875 is not set
735# CONFIG_SENSORS_TSL2550 is not set 736# CONFIG_SENSORS_TSL2550 is not set
736# CONFIG_I2C_DEBUG_CORE is not set 737# CONFIG_I2C_DEBUG_CORE is not set
737# CONFIG_I2C_DEBUG_ALGO is not set 738# CONFIG_I2C_DEBUG_ALGO is not set
738# CONFIG_I2C_DEBUG_BUS is not set 739# CONFIG_I2C_DEBUG_BUS is not set
739# CONFIG_I2C_DEBUG_CHIP is not set 740# CONFIG_I2C_DEBUG_CHIP is not set
740
741#
742# SPI support
743#
744CONFIG_SPI=y 741CONFIG_SPI=y
745CONFIG_SPI_MASTER=y 742CONFIG_SPI_MASTER=y
746 743
@@ -790,12 +787,22 @@ CONFIG_SSB_POSSIBLE=y
790# Multifunction device drivers 787# Multifunction device drivers
791# 788#
792# CONFIG_MFD_SM501 is not set 789# CONFIG_MFD_SM501 is not set
790# CONFIG_HTC_PASIC3 is not set
793 791
794# 792#
795# Multimedia devices 793# Multimedia devices
796# 794#
795
796#
797# Multimedia core support
798#
797# CONFIG_VIDEO_DEV is not set 799# CONFIG_VIDEO_DEV is not set
798# CONFIG_DVB_CORE is not set 800# CONFIG_DVB_CORE is not set
801# CONFIG_VIDEO_MEDIA is not set
802
803#
804# Multimedia drivers
805#
799CONFIG_DAB=y 806CONFIG_DAB=y
800# CONFIG_USB_DABUSB is not set 807# CONFIG_USB_DABUSB is not set
801 808
@@ -833,16 +840,20 @@ CONFIG_USB=y
833CONFIG_USB_DEVICE_CLASS=y 840CONFIG_USB_DEVICE_CLASS=y
834# CONFIG_USB_DYNAMIC_MINORS is not set 841# CONFIG_USB_DYNAMIC_MINORS is not set
835# CONFIG_USB_OTG is not set 842# CONFIG_USB_OTG is not set
843# CONFIG_USB_OTG_WHITELIST is not set
844# CONFIG_USB_OTG_BLACKLIST_HUB is not set
836 845
837# 846#
838# USB Host Controller Drivers 847# USB Host Controller Drivers
839# 848#
849# CONFIG_USB_C67X00_HCD is not set
840CONFIG_USB_EHCI_HCD=y 850CONFIG_USB_EHCI_HCD=y
841CONFIG_USB_EHCI_ROOT_HUB_TT=y 851CONFIG_USB_EHCI_ROOT_HUB_TT=y
842# CONFIG_USB_EHCI_TT_NEWSCHED is not set 852# CONFIG_USB_EHCI_TT_NEWSCHED is not set
843CONFIG_USB_EHCI_FSL=y 853CONFIG_USB_EHCI_FSL=y
844CONFIG_USB_EHCI_HCD_PPC_OF=y 854CONFIG_USB_EHCI_HCD_PPC_OF=y
845# CONFIG_USB_ISP116X_HCD is not set 855# CONFIG_USB_ISP116X_HCD is not set
856# CONFIG_USB_ISP1760_HCD is not set
846# CONFIG_USB_OHCI_HCD is not set 857# CONFIG_USB_OHCI_HCD is not set
847CONFIG_USB_UHCI_HCD=y 858CONFIG_USB_UHCI_HCD=y
848# CONFIG_USB_SL811_HCD is not set 859# CONFIG_USB_SL811_HCD is not set
@@ -853,6 +864,7 @@ CONFIG_USB_UHCI_HCD=y
853# 864#
854# CONFIG_USB_ACM is not set 865# CONFIG_USB_ACM is not set
855# CONFIG_USB_PRINTER is not set 866# CONFIG_USB_PRINTER is not set
867# CONFIG_USB_WDM is not set
856 868
857# 869#
858# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 870# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -873,6 +885,7 @@ CONFIG_USB_STORAGE=y
873# CONFIG_USB_STORAGE_JUMPSHOT is not set 885# CONFIG_USB_STORAGE_JUMPSHOT is not set
874# CONFIG_USB_STORAGE_ALAUDA is not set 886# CONFIG_USB_STORAGE_ALAUDA is not set
875# CONFIG_USB_STORAGE_KARMA is not set 887# CONFIG_USB_STORAGE_KARMA is not set
888# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
876# CONFIG_USB_LIBUSUAL is not set 889# CONFIG_USB_LIBUSUAL is not set
877 890
878# 891#
@@ -909,10 +922,12 @@ CONFIG_USB_MON=y
909# CONFIG_USB_LD is not set 922# CONFIG_USB_LD is not set
910# CONFIG_USB_TRANCEVIBRATOR is not set 923# CONFIG_USB_TRANCEVIBRATOR is not set
911# CONFIG_USB_IOWARRIOR is not set 924# CONFIG_USB_IOWARRIOR is not set
925# CONFIG_USB_ISIGHTFW is not set
912# CONFIG_USB_GADGET is not set 926# CONFIG_USB_GADGET is not set
913# CONFIG_MMC is not set 927# CONFIG_MMC is not set
914# CONFIG_MEMSTICK is not set 928# CONFIG_MEMSTICK is not set
915# CONFIG_NEW_LEDS is not set 929# CONFIG_NEW_LEDS is not set
930# CONFIG_ACCESSIBILITY is not set
916# CONFIG_INFINIBAND is not set 931# CONFIG_INFINIBAND is not set
917# CONFIG_EDAC is not set 932# CONFIG_EDAC is not set
918CONFIG_RTC_LIB=y 933CONFIG_RTC_LIB=y
@@ -967,11 +982,8 @@ CONFIG_RTC_DRV_DS1307=y
967# 982#
968# on-CPU RTC drivers 983# on-CPU RTC drivers
969# 984#
985# CONFIG_RTC_DRV_PPC is not set
970# CONFIG_DMADEVICES is not set 986# CONFIG_DMADEVICES is not set
971
972#
973# Userspace I/O
974#
975# CONFIG_UIO is not set 987# CONFIG_UIO is not set
976 988
977# 989#
@@ -991,7 +1003,6 @@ CONFIG_FS_MBCACHE=y
991# CONFIG_JFS_FS is not set 1003# CONFIG_JFS_FS is not set
992# CONFIG_FS_POSIX_ACL is not set 1004# CONFIG_FS_POSIX_ACL is not set
993# CONFIG_XFS_FS is not set 1005# CONFIG_XFS_FS is not set
994# CONFIG_GFS2_FS is not set
995# CONFIG_OCFS2_FS is not set 1006# CONFIG_OCFS2_FS is not set
996CONFIG_DNOTIFY=y 1007CONFIG_DNOTIFY=y
997CONFIG_INOTIFY=y 1008CONFIG_INOTIFY=y
@@ -1053,7 +1064,6 @@ CONFIG_NFS_FS=y
1053CONFIG_NFS_V3=y 1064CONFIG_NFS_V3=y
1054# CONFIG_NFS_V3_ACL is not set 1065# CONFIG_NFS_V3_ACL is not set
1055CONFIG_NFS_V4=y 1066CONFIG_NFS_V4=y
1056# CONFIG_NFS_DIRECTIO is not set
1057# CONFIG_NFSD is not set 1067# CONFIG_NFSD is not set
1058CONFIG_ROOT_NFS=y 1068CONFIG_ROOT_NFS=y
1059CONFIG_LOCKD=y 1069CONFIG_LOCKD=y
@@ -1137,6 +1147,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1137# Library routines 1147# Library routines
1138# 1148#
1139CONFIG_BITREVERSE=y 1149CONFIG_BITREVERSE=y
1150# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1140# CONFIG_CRC_CCITT is not set 1151# CONFIG_CRC_CCITT is not set
1141# CONFIG_CRC16 is not set 1152# CONFIG_CRC16 is not set
1142# CONFIG_CRC_ITU_T is not set 1153# CONFIG_CRC_ITU_T is not set
@@ -1147,6 +1158,7 @@ CONFIG_PLIST=y
1147CONFIG_HAS_IOMEM=y 1158CONFIG_HAS_IOMEM=y
1148CONFIG_HAS_IOPORT=y 1159CONFIG_HAS_IOPORT=y
1149CONFIG_HAS_DMA=y 1160CONFIG_HAS_DMA=y
1161CONFIG_HAVE_LMB=y
1150 1162
1151# 1163#
1152# Kernel hacking 1164# Kernel hacking
@@ -1154,6 +1166,7 @@ CONFIG_HAS_DMA=y
1154# CONFIG_PRINTK_TIME is not set 1166# CONFIG_PRINTK_TIME is not set
1155CONFIG_ENABLE_WARN_DEPRECATED=y 1167CONFIG_ENABLE_WARN_DEPRECATED=y
1156CONFIG_ENABLE_MUST_CHECK=y 1168CONFIG_ENABLE_MUST_CHECK=y
1169CONFIG_FRAME_WARN=1024
1157# CONFIG_MAGIC_SYSRQ is not set 1170# CONFIG_MAGIC_SYSRQ is not set
1158# CONFIG_UNUSED_SYMBOLS is not set 1171# CONFIG_UNUSED_SYMBOLS is not set
1159# CONFIG_DEBUG_FS is not set 1172# CONFIG_DEBUG_FS is not set
@@ -1163,6 +1176,7 @@ CONFIG_ENABLE_MUST_CHECK=y
1163# CONFIG_SLUB_STATS is not set 1176# CONFIG_SLUB_STATS is not set
1164# CONFIG_DEBUG_BUGVERBOSE is not set 1177# CONFIG_DEBUG_BUGVERBOSE is not set
1165# CONFIG_SAMPLES is not set 1178# CONFIG_SAMPLES is not set
1179# CONFIG_IRQSTACKS is not set
1166# CONFIG_PPC_EARLY_DEBUG is not set 1180# CONFIG_PPC_EARLY_DEBUG is not set
1167 1181
1168# 1182#
@@ -1172,51 +1186,81 @@ CONFIG_ENABLE_MUST_CHECK=y
1172# CONFIG_SECURITY is not set 1186# CONFIG_SECURITY is not set
1173# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1187# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1174CONFIG_CRYPTO=y 1188CONFIG_CRYPTO=y
1189
1190#
1191# Crypto core or helper
1192#
1175CONFIG_CRYPTO_ALGAPI=y 1193CONFIG_CRYPTO_ALGAPI=y
1176CONFIG_CRYPTO_BLKCIPHER=y 1194CONFIG_CRYPTO_BLKCIPHER=y
1177# CONFIG_CRYPTO_SEQIV is not set
1178CONFIG_CRYPTO_MANAGER=y 1195CONFIG_CRYPTO_MANAGER=y
1196# CONFIG_CRYPTO_GF128MUL is not set
1197# CONFIG_CRYPTO_NULL is not set
1198# CONFIG_CRYPTO_CRYPTD is not set
1199# CONFIG_CRYPTO_AUTHENC is not set
1200# CONFIG_CRYPTO_TEST is not set
1201
1202#
1203# Authenticated Encryption with Associated Data
1204#
1205# CONFIG_CRYPTO_CCM is not set
1206# CONFIG_CRYPTO_GCM is not set
1207# CONFIG_CRYPTO_SEQIV is not set
1208
1209#
1210# Block modes
1211#
1212CONFIG_CRYPTO_CBC=y
1213# CONFIG_CRYPTO_CTR is not set
1214# CONFIG_CRYPTO_CTS is not set
1215# CONFIG_CRYPTO_ECB is not set
1216# CONFIG_CRYPTO_LRW is not set
1217CONFIG_CRYPTO_PCBC=m
1218# CONFIG_CRYPTO_XTS is not set
1219
1220#
1221# Hash modes
1222#
1179# CONFIG_CRYPTO_HMAC is not set 1223# CONFIG_CRYPTO_HMAC is not set
1180# CONFIG_CRYPTO_XCBC is not set 1224# CONFIG_CRYPTO_XCBC is not set
1181# CONFIG_CRYPTO_NULL is not set 1225
1226#
1227# Digest
1228#
1229# CONFIG_CRYPTO_CRC32C is not set
1182# CONFIG_CRYPTO_MD4 is not set 1230# CONFIG_CRYPTO_MD4 is not set
1183CONFIG_CRYPTO_MD5=y 1231CONFIG_CRYPTO_MD5=y
1232# CONFIG_CRYPTO_MICHAEL_MIC is not set
1184# CONFIG_CRYPTO_SHA1 is not set 1233# CONFIG_CRYPTO_SHA1 is not set
1185# CONFIG_CRYPTO_SHA256 is not set 1234# CONFIG_CRYPTO_SHA256 is not set
1186# CONFIG_CRYPTO_SHA512 is not set 1235# CONFIG_CRYPTO_SHA512 is not set
1187# CONFIG_CRYPTO_WP512 is not set
1188# CONFIG_CRYPTO_TGR192 is not set 1236# CONFIG_CRYPTO_TGR192 is not set
1189# CONFIG_CRYPTO_GF128MUL is not set 1237# CONFIG_CRYPTO_WP512 is not set
1190# CONFIG_CRYPTO_ECB is not set 1238
1191CONFIG_CRYPTO_CBC=y 1239#
1192CONFIG_CRYPTO_PCBC=m 1240# Ciphers
1193# CONFIG_CRYPTO_LRW is not set 1241#
1194# CONFIG_CRYPTO_XTS is not set
1195# CONFIG_CRYPTO_CTR is not set
1196# CONFIG_CRYPTO_GCM is not set
1197# CONFIG_CRYPTO_CCM is not set
1198# CONFIG_CRYPTO_CRYPTD is not set
1199CONFIG_CRYPTO_DES=y
1200# CONFIG_CRYPTO_FCRYPT is not set
1201# CONFIG_CRYPTO_BLOWFISH is not set
1202# CONFIG_CRYPTO_TWOFISH is not set
1203# CONFIG_CRYPTO_SERPENT is not set
1204# CONFIG_CRYPTO_AES is not set 1242# CONFIG_CRYPTO_AES is not set
1243# CONFIG_CRYPTO_ANUBIS is not set
1244# CONFIG_CRYPTO_ARC4 is not set
1245# CONFIG_CRYPTO_BLOWFISH is not set
1246# CONFIG_CRYPTO_CAMELLIA is not set
1205# CONFIG_CRYPTO_CAST5 is not set 1247# CONFIG_CRYPTO_CAST5 is not set
1206# CONFIG_CRYPTO_CAST6 is not set 1248# CONFIG_CRYPTO_CAST6 is not set
1207# CONFIG_CRYPTO_TEA is not set 1249CONFIG_CRYPTO_DES=y
1208# CONFIG_CRYPTO_ARC4 is not set 1250# CONFIG_CRYPTO_FCRYPT is not set
1209# CONFIG_CRYPTO_KHAZAD is not set 1251# CONFIG_CRYPTO_KHAZAD is not set
1210# CONFIG_CRYPTO_ANUBIS is not set
1211# CONFIG_CRYPTO_SEED is not set
1212# CONFIG_CRYPTO_SALSA20 is not set 1252# CONFIG_CRYPTO_SALSA20 is not set
1253# CONFIG_CRYPTO_SEED is not set
1254# CONFIG_CRYPTO_SERPENT is not set
1255# CONFIG_CRYPTO_TEA is not set
1256# CONFIG_CRYPTO_TWOFISH is not set
1257
1258#
1259# Compression
1260#
1213# CONFIG_CRYPTO_DEFLATE is not set 1261# CONFIG_CRYPTO_DEFLATE is not set
1214# CONFIG_CRYPTO_MICHAEL_MIC is not set
1215# CONFIG_CRYPTO_CRC32C is not set
1216# CONFIG_CRYPTO_CAMELLIA is not set
1217# CONFIG_CRYPTO_TEST is not set
1218# CONFIG_CRYPTO_AUTHENC is not set
1219# CONFIG_CRYPTO_LZO is not set 1262# CONFIG_CRYPTO_LZO is not set
1220CONFIG_CRYPTO_HW=y 1263CONFIG_CRYPTO_HW=y
1221# CONFIG_CRYPTO_DEV_HIFN_795X is not set 1264# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1222# CONFIG_PPC_CLOCK is not set 1265# CONFIG_PPC_CLOCK is not set
1266# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/83xx/mpc834x_mds_defconfig b/arch/powerpc/configs/83xx/mpc834x_mds_defconfig
index b4e82c0e2be7..c82e96e984fc 100644
--- a/arch/powerpc/configs/83xx/mpc834x_mds_defconfig
+++ b/arch/powerpc/configs/83xx/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.25-rc7 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 31 11:36:56 2008 4# Mon Jun 9 08:52:26 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -31,6 +31,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y 31CONFIG_GENERIC_HARDIRQS=y
32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
33CONFIG_IRQ_PER_CPU=y 33CONFIG_IRQ_PER_CPU=y
34CONFIG_STACKTRACE_SUPPORT=y
35CONFIG_LOCKDEP_SUPPORT=y
34CONFIG_RWSEM_XCHGADD_ALGORITHM=y 36CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y 37CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y 38CONFIG_GENERIC_HWEIGHT=y
@@ -86,6 +88,7 @@ CONFIG_INITRAMFS_SOURCE=""
86CONFIG_SYSCTL=y 88CONFIG_SYSCTL=y
87CONFIG_EMBEDDED=y 89CONFIG_EMBEDDED=y
88CONFIG_SYSCTL_SYSCALL=y 90CONFIG_SYSCTL_SYSCALL=y
91CONFIG_SYSCTL_SYSCALL_CHECK=y
89# CONFIG_KALLSYMS is not set 92# CONFIG_KALLSYMS is not set
90CONFIG_HOTPLUG=y 93CONFIG_HOTPLUG=y
91CONFIG_PRINTK=y 94CONFIG_PRINTK=y
@@ -110,12 +113,14 @@ CONFIG_SLUB=y
110CONFIG_HAVE_OPROFILE=y 113CONFIG_HAVE_OPROFILE=y
111CONFIG_HAVE_KPROBES=y 114CONFIG_HAVE_KPROBES=y
112CONFIG_HAVE_KRETPROBES=y 115CONFIG_HAVE_KRETPROBES=y
116# CONFIG_HAVE_DMA_ATTRS is not set
113CONFIG_PROC_PAGE_MONITOR=y 117CONFIG_PROC_PAGE_MONITOR=y
114CONFIG_SLABINFO=y 118CONFIG_SLABINFO=y
115CONFIG_RT_MUTEXES=y 119CONFIG_RT_MUTEXES=y
116# CONFIG_TINY_SHMEM is not set 120# CONFIG_TINY_SHMEM is not set
117CONFIG_BASE_SMALL=0 121CONFIG_BASE_SMALL=0
118CONFIG_MODULES=y 122CONFIG_MODULES=y
123# CONFIG_MODULE_FORCE_LOAD is not set
119CONFIG_MODULE_UNLOAD=y 124CONFIG_MODULE_UNLOAD=y
120# CONFIG_MODULE_FORCE_UNLOAD is not set 125# CONFIG_MODULE_FORCE_UNLOAD is not set
121# CONFIG_MODVERSIONS is not set 126# CONFIG_MODVERSIONS is not set
@@ -210,11 +215,13 @@ CONFIG_FLATMEM=y
210CONFIG_FLAT_NODE_MEM_MAP=y 215CONFIG_FLAT_NODE_MEM_MAP=y
211# CONFIG_SPARSEMEM_STATIC is not set 216# CONFIG_SPARSEMEM_STATIC is not set
212# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 217# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
218CONFIG_PAGEFLAGS_EXTENDED=y
213CONFIG_SPLIT_PTLOCK_CPUS=4 219CONFIG_SPLIT_PTLOCK_CPUS=4
214# CONFIG_RESOURCES_64BIT is not set 220# CONFIG_RESOURCES_64BIT is not set
215CONFIG_ZONE_DMA_FLAG=1 221CONFIG_ZONE_DMA_FLAG=1
216CONFIG_BOUNCE=y 222CONFIG_BOUNCE=y
217CONFIG_VIRT_TO_BUS=y 223CONFIG_VIRT_TO_BUS=y
224CONFIG_FORCE_MAX_ZONEORDER=11
218CONFIG_PROC_DEVICETREE=y 225CONFIG_PROC_DEVICETREE=y
219# CONFIG_CMDLINE_BOOL is not set 226# CONFIG_CMDLINE_BOOL is not set
220# CONFIG_PM is not set 227# CONFIG_PM is not set
@@ -237,6 +244,7 @@ CONFIG_ARCH_SUPPORTS_MSI=y
237CONFIG_PCI_LEGACY=y 244CONFIG_PCI_LEGACY=y
238# CONFIG_PCCARD is not set 245# CONFIG_PCCARD is not set
239# CONFIG_HOTPLUG_PCI is not set 246# CONFIG_HOTPLUG_PCI is not set
247# CONFIG_HAS_RAPIDIO is not set
240 248
241# 249#
242# Advanced setup 250# Advanced setup
@@ -246,11 +254,11 @@ CONFIG_PCI_LEGACY=y
246# 254#
247# Default settings for advanced configuration options are used 255# Default settings for advanced configuration options are used
248# 256#
249CONFIG_HIGHMEM_START=0xfe000000
250CONFIG_LOWMEM_SIZE=0x30000000 257CONFIG_LOWMEM_SIZE=0x30000000
258CONFIG_PAGE_OFFSET=0xc0000000
251CONFIG_KERNEL_START=0xc0000000 259CONFIG_KERNEL_START=0xc0000000
260CONFIG_PHYSICAL_START=0x00000000
252CONFIG_TASK_SIZE=0xc0000000 261CONFIG_TASK_SIZE=0xc0000000
253CONFIG_BOOT_LOAD=0x00800000
254 262
255# 263#
256# Networking 264# Networking
@@ -298,8 +306,6 @@ CONFIG_TCP_CONG_CUBIC=y
298CONFIG_DEFAULT_TCP_CONG="cubic" 306CONFIG_DEFAULT_TCP_CONG="cubic"
299# CONFIG_TCP_MD5SIG is not set 307# CONFIG_TCP_MD5SIG is not set
300# CONFIG_IPV6 is not set 308# CONFIG_IPV6 is not set
301# CONFIG_INET6_XFRM_TUNNEL is not set
302# CONFIG_INET6_TUNNEL is not set
303# CONFIG_NETWORK_SECMARK is not set 309# CONFIG_NETWORK_SECMARK is not set
304# CONFIG_NETFILTER is not set 310# CONFIG_NETFILTER is not set
305# CONFIG_IP_DCCP is not set 311# CONFIG_IP_DCCP is not set
@@ -353,6 +359,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
353# CONFIG_CONNECTOR is not set 359# CONFIG_CONNECTOR is not set
354# CONFIG_MTD is not set 360# CONFIG_MTD is not set
355CONFIG_OF_DEVICE=y 361CONFIG_OF_DEVICE=y
362CONFIG_OF_I2C=y
356# CONFIG_PARPORT is not set 363# CONFIG_PARPORT is not set
357CONFIG_BLK_DEV=y 364CONFIG_BLK_DEV=y
358# CONFIG_BLK_DEV_FD is not set 365# CONFIG_BLK_DEV_FD is not set
@@ -471,7 +478,6 @@ CONFIG_NETDEV_1000=y
471# CONFIG_SIS190 is not set 478# CONFIG_SIS190 is not set
472# CONFIG_SKGE is not set 479# CONFIG_SKGE is not set
473# CONFIG_SKY2 is not set 480# CONFIG_SKY2 is not set
474# CONFIG_SK98LIN is not set
475# CONFIG_VIA_VELOCITY is not set 481# CONFIG_VIA_VELOCITY is not set
476# CONFIG_TIGON3 is not set 482# CONFIG_TIGON3 is not set
477# CONFIG_BNX2 is not set 483# CONFIG_BNX2 is not set
@@ -491,6 +497,7 @@ CONFIG_NETDEV_10000=y
491# CONFIG_MLX4_CORE is not set 497# CONFIG_MLX4_CORE is not set
492# CONFIG_TEHUTI is not set 498# CONFIG_TEHUTI is not set
493# CONFIG_BNX2X is not set 499# CONFIG_BNX2X is not set
500# CONFIG_SFC is not set
494# CONFIG_TR is not set 501# CONFIG_TR is not set
495 502
496# 503#
@@ -498,6 +505,7 @@ CONFIG_NETDEV_10000=y
498# 505#
499# CONFIG_WLAN_PRE80211 is not set 506# CONFIG_WLAN_PRE80211 is not set
500# CONFIG_WLAN_80211 is not set 507# CONFIG_WLAN_80211 is not set
508# CONFIG_IWLWIFI_LEDS is not set
501# CONFIG_WAN is not set 509# CONFIG_WAN is not set
502# CONFIG_FDDI is not set 510# CONFIG_FDDI is not set
503# CONFIG_HIPPI is not set 511# CONFIG_HIPPI is not set
@@ -544,6 +552,7 @@ CONFIG_INPUT=y
544# Character devices 552# Character devices
545# 553#
546# CONFIG_VT is not set 554# CONFIG_VT is not set
555CONFIG_DEVKMEM=y
547# CONFIG_SERIAL_NONSTANDARD is not set 556# CONFIG_SERIAL_NONSTANDARD is not set
548# CONFIG_NOZOMI is not set 557# CONFIG_NOZOMI is not set
549 558
@@ -571,7 +580,6 @@ CONFIG_LEGACY_PTY_COUNT=256
571# CONFIG_IPMI_HANDLER is not set 580# CONFIG_IPMI_HANDLER is not set
572# CONFIG_HW_RANDOM is not set 581# CONFIG_HW_RANDOM is not set
573# CONFIG_NVRAM is not set 582# CONFIG_NVRAM is not set
574# CONFIG_GEN_RTC is not set
575# CONFIG_R3964 is not set 583# CONFIG_R3964 is not set
576# CONFIG_APPLICOM is not set 584# CONFIG_APPLICOM is not set
577# CONFIG_RAW_DRIVER is not set 585# CONFIG_RAW_DRIVER is not set
@@ -582,13 +590,6 @@ CONFIG_I2C_BOARDINFO=y
582CONFIG_I2C_CHARDEV=y 590CONFIG_I2C_CHARDEV=y
583 591
584# 592#
585# I2C Algorithms
586#
587# CONFIG_I2C_ALGOBIT is not set
588# CONFIG_I2C_ALGOPCF is not set
589# CONFIG_I2C_ALGOPCA is not set
590
591#
592# I2C Hardware Bus support 593# I2C Hardware Bus support
593# 594#
594# CONFIG_I2C_ALI1535 is not set 595# CONFIG_I2C_ALI1535 is not set
@@ -614,6 +615,7 @@ CONFIG_I2C_MPC=y
614# CONFIG_I2C_VIA is not set 615# CONFIG_I2C_VIA is not set
615# CONFIG_I2C_VIAPRO is not set 616# CONFIG_I2C_VIAPRO is not set
616# CONFIG_I2C_VOODOO3 is not set 617# CONFIG_I2C_VOODOO3 is not set
618# CONFIG_I2C_PCA_PLATFORM is not set
617 619
618# 620#
619# Miscellaneous I2C Chip support 621# Miscellaneous I2C Chip support
@@ -623,19 +625,13 @@ CONFIG_I2C_MPC=y
623# CONFIG_SENSORS_PCF8574 is not set 625# CONFIG_SENSORS_PCF8574 is not set
624# CONFIG_PCF8575 is not set 626# CONFIG_PCF8575 is not set
625# CONFIG_SENSORS_PCF8591 is not set 627# CONFIG_SENSORS_PCF8591 is not set
626# CONFIG_TPS65010 is not set
627# CONFIG_SENSORS_MAX6875 is not set 628# CONFIG_SENSORS_MAX6875 is not set
628# CONFIG_SENSORS_TSL2550 is not set 629# CONFIG_SENSORS_TSL2550 is not set
629# CONFIG_I2C_DEBUG_CORE is not set 630# CONFIG_I2C_DEBUG_CORE is not set
630# CONFIG_I2C_DEBUG_ALGO is not set 631# CONFIG_I2C_DEBUG_ALGO is not set
631# CONFIG_I2C_DEBUG_BUS is not set 632# CONFIG_I2C_DEBUG_BUS is not set
632# CONFIG_I2C_DEBUG_CHIP is not set 633# CONFIG_I2C_DEBUG_CHIP is not set
633
634#
635# SPI support
636#
637# CONFIG_SPI is not set 634# CONFIG_SPI is not set
638# CONFIG_SPI_MASTER is not set
639# CONFIG_W1 is not set 635# CONFIG_W1 is not set
640# CONFIG_POWER_SUPPLY is not set 636# CONFIG_POWER_SUPPLY is not set
641CONFIG_HWMON=y 637CONFIG_HWMON=y
@@ -718,12 +714,22 @@ CONFIG_SSB_POSSIBLE=y
718# Multifunction device drivers 714# Multifunction device drivers
719# 715#
720# CONFIG_MFD_SM501 is not set 716# CONFIG_MFD_SM501 is not set
717# CONFIG_HTC_PASIC3 is not set
721 718
722# 719#
723# Multimedia devices 720# Multimedia devices
724# 721#
722
723#
724# Multimedia core support
725#
725# CONFIG_VIDEO_DEV is not set 726# CONFIG_VIDEO_DEV is not set
726# CONFIG_DVB_CORE is not set 727# CONFIG_DVB_CORE is not set
728# CONFIG_VIDEO_MEDIA is not set
729
730#
731# Multimedia drivers
732#
727CONFIG_DAB=y 733CONFIG_DAB=y
728 734
729# 735#
@@ -754,6 +760,8 @@ CONFIG_USB_ARCH_HAS_HCD=y
754CONFIG_USB_ARCH_HAS_OHCI=y 760CONFIG_USB_ARCH_HAS_OHCI=y
755CONFIG_USB_ARCH_HAS_EHCI=y 761CONFIG_USB_ARCH_HAS_EHCI=y
756# CONFIG_USB is not set 762# CONFIG_USB is not set
763# CONFIG_USB_OTG_WHITELIST is not set
764# CONFIG_USB_OTG_BLACKLIST_HUB is not set
757 765
758# 766#
759# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 767# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -762,6 +770,7 @@ CONFIG_USB_ARCH_HAS_EHCI=y
762# CONFIG_MMC is not set 770# CONFIG_MMC is not set
763# CONFIG_MEMSTICK is not set 771# CONFIG_MEMSTICK is not set
764# CONFIG_NEW_LEDS is not set 772# CONFIG_NEW_LEDS is not set
773# CONFIG_ACCESSIBILITY is not set
765# CONFIG_INFINIBAND is not set 774# CONFIG_INFINIBAND is not set
766# CONFIG_EDAC is not set 775# CONFIG_EDAC is not set
767CONFIG_RTC_LIB=y 776CONFIG_RTC_LIB=y
@@ -813,11 +822,8 @@ CONFIG_RTC_DRV_DS1374=y
813# 822#
814# on-CPU RTC drivers 823# on-CPU RTC drivers
815# 824#
825# CONFIG_RTC_DRV_PPC is not set
816# CONFIG_DMADEVICES is not set 826# CONFIG_DMADEVICES is not set
817
818#
819# Userspace I/O
820#
821# CONFIG_UIO is not set 827# CONFIG_UIO is not set
822 828
823# 829#
@@ -837,7 +843,6 @@ CONFIG_FS_MBCACHE=y
837# CONFIG_JFS_FS is not set 843# CONFIG_JFS_FS is not set
838# CONFIG_FS_POSIX_ACL is not set 844# CONFIG_FS_POSIX_ACL is not set
839# CONFIG_XFS_FS is not set 845# CONFIG_XFS_FS is not set
840# CONFIG_GFS2_FS is not set
841# CONFIG_OCFS2_FS is not set 846# CONFIG_OCFS2_FS is not set
842CONFIG_DNOTIFY=y 847CONFIG_DNOTIFY=y
843CONFIG_INOTIFY=y 848CONFIG_INOTIFY=y
@@ -895,7 +900,6 @@ CONFIG_NFS_FS=y
895CONFIG_NFS_V3=y 900CONFIG_NFS_V3=y
896# CONFIG_NFS_V3_ACL is not set 901# CONFIG_NFS_V3_ACL is not set
897CONFIG_NFS_V4=y 902CONFIG_NFS_V4=y
898# CONFIG_NFS_DIRECTIO is not set
899# CONFIG_NFSD is not set 903# CONFIG_NFSD is not set
900CONFIG_ROOT_NFS=y 904CONFIG_ROOT_NFS=y
901CONFIG_LOCKD=y 905CONFIG_LOCKD=y
@@ -936,6 +940,7 @@ CONFIG_PARTITION_ADVANCED=y
936# Library routines 940# Library routines
937# 941#
938CONFIG_BITREVERSE=y 942CONFIG_BITREVERSE=y
943# CONFIG_GENERIC_FIND_FIRST_BIT is not set
939# CONFIG_CRC_CCITT is not set 944# CONFIG_CRC_CCITT is not set
940# CONFIG_CRC16 is not set 945# CONFIG_CRC16 is not set
941# CONFIG_CRC_ITU_T is not set 946# CONFIG_CRC_ITU_T is not set
@@ -946,6 +951,7 @@ CONFIG_PLIST=y
946CONFIG_HAS_IOMEM=y 951CONFIG_HAS_IOMEM=y
947CONFIG_HAS_IOPORT=y 952CONFIG_HAS_IOPORT=y
948CONFIG_HAS_DMA=y 953CONFIG_HAS_DMA=y
954CONFIG_HAVE_LMB=y
949 955
950# 956#
951# Kernel hacking 957# Kernel hacking
@@ -953,6 +959,7 @@ CONFIG_HAS_DMA=y
953# CONFIG_PRINTK_TIME is not set 959# CONFIG_PRINTK_TIME is not set
954CONFIG_ENABLE_WARN_DEPRECATED=y 960CONFIG_ENABLE_WARN_DEPRECATED=y
955CONFIG_ENABLE_MUST_CHECK=y 961CONFIG_ENABLE_MUST_CHECK=y
962CONFIG_FRAME_WARN=1024
956# CONFIG_MAGIC_SYSRQ is not set 963# CONFIG_MAGIC_SYSRQ is not set
957# CONFIG_UNUSED_SYMBOLS is not set 964# CONFIG_UNUSED_SYMBOLS is not set
958# CONFIG_DEBUG_FS is not set 965# CONFIG_DEBUG_FS is not set
@@ -962,6 +969,7 @@ CONFIG_ENABLE_MUST_CHECK=y
962# CONFIG_SLUB_STATS is not set 969# CONFIG_SLUB_STATS is not set
963# CONFIG_DEBUG_BUGVERBOSE is not set 970# CONFIG_DEBUG_BUGVERBOSE is not set
964# CONFIG_SAMPLES is not set 971# CONFIG_SAMPLES is not set
972# CONFIG_IRQSTACKS is not set
965# CONFIG_PPC_EARLY_DEBUG is not set 973# CONFIG_PPC_EARLY_DEBUG is not set
966 974
967# 975#
@@ -971,51 +979,81 @@ CONFIG_ENABLE_MUST_CHECK=y
971# CONFIG_SECURITY is not set 979# CONFIG_SECURITY is not set
972# CONFIG_SECURITY_FILE_CAPABILITIES is not set 980# CONFIG_SECURITY_FILE_CAPABILITIES is not set
973CONFIG_CRYPTO=y 981CONFIG_CRYPTO=y
982
983#
984# Crypto core or helper
985#
974CONFIG_CRYPTO_ALGAPI=y 986CONFIG_CRYPTO_ALGAPI=y
975CONFIG_CRYPTO_BLKCIPHER=y 987CONFIG_CRYPTO_BLKCIPHER=y
976# CONFIG_CRYPTO_SEQIV is not set
977CONFIG_CRYPTO_MANAGER=y 988CONFIG_CRYPTO_MANAGER=y
989# CONFIG_CRYPTO_GF128MUL is not set
990# CONFIG_CRYPTO_NULL is not set
991# CONFIG_CRYPTO_CRYPTD is not set
992# CONFIG_CRYPTO_AUTHENC is not set
993# CONFIG_CRYPTO_TEST is not set
994
995#
996# Authenticated Encryption with Associated Data
997#
998# CONFIG_CRYPTO_CCM is not set
999# CONFIG_CRYPTO_GCM is not set
1000# CONFIG_CRYPTO_SEQIV is not set
1001
1002#
1003# Block modes
1004#
1005CONFIG_CRYPTO_CBC=y
1006# CONFIG_CRYPTO_CTR is not set
1007# CONFIG_CRYPTO_CTS is not set
1008CONFIG_CRYPTO_ECB=m
1009# CONFIG_CRYPTO_LRW is not set
1010CONFIG_CRYPTO_PCBC=m
1011# CONFIG_CRYPTO_XTS is not set
1012
1013#
1014# Hash modes
1015#
978# CONFIG_CRYPTO_HMAC is not set 1016# CONFIG_CRYPTO_HMAC is not set
979# CONFIG_CRYPTO_XCBC is not set 1017# CONFIG_CRYPTO_XCBC is not set
980# CONFIG_CRYPTO_NULL is not set 1018
1019#
1020# Digest
1021#
1022# CONFIG_CRYPTO_CRC32C is not set
981# CONFIG_CRYPTO_MD4 is not set 1023# CONFIG_CRYPTO_MD4 is not set
982CONFIG_CRYPTO_MD5=y 1024CONFIG_CRYPTO_MD5=y
1025# CONFIG_CRYPTO_MICHAEL_MIC is not set
983# CONFIG_CRYPTO_SHA1 is not set 1026# CONFIG_CRYPTO_SHA1 is not set
984# CONFIG_CRYPTO_SHA256 is not set 1027# CONFIG_CRYPTO_SHA256 is not set
985# CONFIG_CRYPTO_SHA512 is not set 1028# CONFIG_CRYPTO_SHA512 is not set
986# CONFIG_CRYPTO_WP512 is not set
987# CONFIG_CRYPTO_TGR192 is not set 1029# CONFIG_CRYPTO_TGR192 is not set
988# CONFIG_CRYPTO_GF128MUL is not set 1030# CONFIG_CRYPTO_WP512 is not set
989CONFIG_CRYPTO_ECB=m 1031
990CONFIG_CRYPTO_CBC=y 1032#
991CONFIG_CRYPTO_PCBC=m 1033# Ciphers
992# CONFIG_CRYPTO_LRW is not set 1034#
993# CONFIG_CRYPTO_XTS is not set
994# CONFIG_CRYPTO_CTR is not set
995# CONFIG_CRYPTO_GCM is not set
996# CONFIG_CRYPTO_CCM is not set
997# CONFIG_CRYPTO_CRYPTD is not set
998CONFIG_CRYPTO_DES=y
999# CONFIG_CRYPTO_FCRYPT is not set
1000# CONFIG_CRYPTO_BLOWFISH is not set
1001# CONFIG_CRYPTO_TWOFISH is not set
1002# CONFIG_CRYPTO_SERPENT is not set
1003# CONFIG_CRYPTO_AES is not set 1035# CONFIG_CRYPTO_AES is not set
1036# CONFIG_CRYPTO_ANUBIS is not set
1037# CONFIG_CRYPTO_ARC4 is not set
1038# CONFIG_CRYPTO_BLOWFISH is not set
1039# CONFIG_CRYPTO_CAMELLIA is not set
1004# CONFIG_CRYPTO_CAST5 is not set 1040# CONFIG_CRYPTO_CAST5 is not set
1005# CONFIG_CRYPTO_CAST6 is not set 1041# CONFIG_CRYPTO_CAST6 is not set
1006# CONFIG_CRYPTO_TEA is not set 1042CONFIG_CRYPTO_DES=y
1007# CONFIG_CRYPTO_ARC4 is not set 1043# CONFIG_CRYPTO_FCRYPT is not set
1008# CONFIG_CRYPTO_KHAZAD is not set 1044# CONFIG_CRYPTO_KHAZAD is not set
1009# CONFIG_CRYPTO_ANUBIS is not set
1010# CONFIG_CRYPTO_SEED is not set
1011# CONFIG_CRYPTO_SALSA20 is not set 1045# CONFIG_CRYPTO_SALSA20 is not set
1046# CONFIG_CRYPTO_SEED is not set
1047# CONFIG_CRYPTO_SERPENT is not set
1048# CONFIG_CRYPTO_TEA is not set
1049# CONFIG_CRYPTO_TWOFISH is not set
1050
1051#
1052# Compression
1053#
1012# CONFIG_CRYPTO_DEFLATE is not set 1054# CONFIG_CRYPTO_DEFLATE is not set
1013# CONFIG_CRYPTO_MICHAEL_MIC is not set
1014# CONFIG_CRYPTO_CRC32C is not set
1015# CONFIG_CRYPTO_CAMELLIA is not set
1016# CONFIG_CRYPTO_TEST is not set
1017# CONFIG_CRYPTO_AUTHENC is not set
1018# CONFIG_CRYPTO_LZO is not set 1055# CONFIG_CRYPTO_LZO is not set
1019CONFIG_CRYPTO_HW=y 1056CONFIG_CRYPTO_HW=y
1020# CONFIG_CRYPTO_DEV_HIFN_795X is not set 1057# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1021# CONFIG_PPC_CLOCK is not set 1058# CONFIG_PPC_CLOCK is not set
1059# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/83xx/mpc836x_mds_defconfig b/arch/powerpc/configs/83xx/mpc836x_mds_defconfig
index d50a96eddcdc..20fd9f58cf42 100644
--- a/arch/powerpc/configs/83xx/mpc836x_mds_defconfig
+++ b/arch/powerpc/configs/83xx/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.25-rc7 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 31 11:36:57 2008 4# Mon Jun 9 08:52:27 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -31,6 +31,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y 31CONFIG_GENERIC_HARDIRQS=y
32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
33CONFIG_IRQ_PER_CPU=y 33CONFIG_IRQ_PER_CPU=y
34CONFIG_STACKTRACE_SUPPORT=y
35CONFIG_LOCKDEP_SUPPORT=y
34CONFIG_RWSEM_XCHGADD_ALGORITHM=y 36CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y 37CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y 38CONFIG_GENERIC_HWEIGHT=y
@@ -86,6 +88,7 @@ CONFIG_INITRAMFS_SOURCE=""
86CONFIG_SYSCTL=y 88CONFIG_SYSCTL=y
87CONFIG_EMBEDDED=y 89CONFIG_EMBEDDED=y
88CONFIG_SYSCTL_SYSCALL=y 90CONFIG_SYSCTL_SYSCALL=y
91CONFIG_SYSCTL_SYSCALL_CHECK=y
89# CONFIG_KALLSYMS is not set 92# CONFIG_KALLSYMS is not set
90CONFIG_HOTPLUG=y 93CONFIG_HOTPLUG=y
91CONFIG_PRINTK=y 94CONFIG_PRINTK=y
@@ -110,12 +113,14 @@ CONFIG_SLUB=y
110CONFIG_HAVE_OPROFILE=y 113CONFIG_HAVE_OPROFILE=y
111CONFIG_HAVE_KPROBES=y 114CONFIG_HAVE_KPROBES=y
112CONFIG_HAVE_KRETPROBES=y 115CONFIG_HAVE_KRETPROBES=y
116# CONFIG_HAVE_DMA_ATTRS is not set
113CONFIG_PROC_PAGE_MONITOR=y 117CONFIG_PROC_PAGE_MONITOR=y
114CONFIG_SLABINFO=y 118CONFIG_SLABINFO=y
115CONFIG_RT_MUTEXES=y 119CONFIG_RT_MUTEXES=y
116# CONFIG_TINY_SHMEM is not set 120# CONFIG_TINY_SHMEM is not set
117CONFIG_BASE_SMALL=0 121CONFIG_BASE_SMALL=0
118CONFIG_MODULES=y 122CONFIG_MODULES=y
123# CONFIG_MODULE_FORCE_LOAD is not set
119CONFIG_MODULE_UNLOAD=y 124CONFIG_MODULE_UNLOAD=y
120# CONFIG_MODULE_FORCE_UNLOAD is not set 125# CONFIG_MODULE_FORCE_UNLOAD is not set
121# CONFIG_MODVERSIONS is not set 126# CONFIG_MODVERSIONS is not set
@@ -210,11 +215,13 @@ CONFIG_FLATMEM=y
210CONFIG_FLAT_NODE_MEM_MAP=y 215CONFIG_FLAT_NODE_MEM_MAP=y
211# CONFIG_SPARSEMEM_STATIC is not set 216# CONFIG_SPARSEMEM_STATIC is not set
212# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 217# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
218CONFIG_PAGEFLAGS_EXTENDED=y
213CONFIG_SPLIT_PTLOCK_CPUS=4 219CONFIG_SPLIT_PTLOCK_CPUS=4
214# CONFIG_RESOURCES_64BIT is not set 220# CONFIG_RESOURCES_64BIT is not set
215CONFIG_ZONE_DMA_FLAG=1 221CONFIG_ZONE_DMA_FLAG=1
216CONFIG_BOUNCE=y 222CONFIG_BOUNCE=y
217CONFIG_VIRT_TO_BUS=y 223CONFIG_VIRT_TO_BUS=y
224CONFIG_FORCE_MAX_ZONEORDER=11
218CONFIG_PROC_DEVICETREE=y 225CONFIG_PROC_DEVICETREE=y
219# CONFIG_CMDLINE_BOOL is not set 226# CONFIG_CMDLINE_BOOL is not set
220# CONFIG_PM is not set 227# CONFIG_PM is not set
@@ -237,6 +244,7 @@ CONFIG_ARCH_SUPPORTS_MSI=y
237CONFIG_PCI_LEGACY=y 244CONFIG_PCI_LEGACY=y
238# CONFIG_PCCARD is not set 245# CONFIG_PCCARD is not set
239# CONFIG_HOTPLUG_PCI is not set 246# CONFIG_HOTPLUG_PCI is not set
247# CONFIG_HAS_RAPIDIO is not set
240 248
241# 249#
242# Advanced setup 250# Advanced setup
@@ -246,11 +254,11 @@ CONFIG_PCI_LEGACY=y
246# 254#
247# Default settings for advanced configuration options are used 255# Default settings for advanced configuration options are used
248# 256#
249CONFIG_HIGHMEM_START=0xfe000000
250CONFIG_LOWMEM_SIZE=0x30000000 257CONFIG_LOWMEM_SIZE=0x30000000
258CONFIG_PAGE_OFFSET=0xc0000000
251CONFIG_KERNEL_START=0xc0000000 259CONFIG_KERNEL_START=0xc0000000
260CONFIG_PHYSICAL_START=0x00000000
252CONFIG_TASK_SIZE=0xc0000000 261CONFIG_TASK_SIZE=0xc0000000
253CONFIG_BOOT_LOAD=0x00800000
254 262
255# 263#
256# Networking 264# Networking
@@ -298,8 +306,6 @@ CONFIG_TCP_CONG_CUBIC=y
298CONFIG_DEFAULT_TCP_CONG="cubic" 306CONFIG_DEFAULT_TCP_CONG="cubic"
299# CONFIG_TCP_MD5SIG is not set 307# CONFIG_TCP_MD5SIG is not set
300# CONFIG_IPV6 is not set 308# CONFIG_IPV6 is not set
301# CONFIG_INET6_XFRM_TUNNEL is not set
302# CONFIG_INET6_TUNNEL is not set
303# CONFIG_NETWORK_SECMARK is not set 309# CONFIG_NETWORK_SECMARK is not set
304# CONFIG_NETFILTER is not set 310# CONFIG_NETFILTER is not set
305# CONFIG_IP_DCCP is not set 311# CONFIG_IP_DCCP is not set
@@ -353,6 +359,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
353# CONFIG_CONNECTOR is not set 359# CONFIG_CONNECTOR is not set
354# CONFIG_MTD is not set 360# CONFIG_MTD is not set
355CONFIG_OF_DEVICE=y 361CONFIG_OF_DEVICE=y
362CONFIG_OF_I2C=y
356# CONFIG_PARPORT is not set 363# CONFIG_PARPORT is not set
357CONFIG_BLK_DEV=y 364CONFIG_BLK_DEV=y
358# CONFIG_BLK_DEV_FD is not set 365# CONFIG_BLK_DEV_FD is not set
@@ -520,7 +527,6 @@ CONFIG_NETDEV_1000=y
520# CONFIG_SIS190 is not set 527# CONFIG_SIS190 is not set
521# CONFIG_SKGE is not set 528# CONFIG_SKGE is not set
522# CONFIG_SKY2 is not set 529# CONFIG_SKY2 is not set
523# CONFIG_SK98LIN is not set
524# CONFIG_VIA_VELOCITY is not set 530# CONFIG_VIA_VELOCITY is not set
525# CONFIG_TIGON3 is not set 531# CONFIG_TIGON3 is not set
526# CONFIG_BNX2 is not set 532# CONFIG_BNX2 is not set
@@ -544,6 +550,7 @@ CONFIG_NETDEV_10000=y
544# CONFIG_MLX4_CORE is not set 550# CONFIG_MLX4_CORE is not set
545# CONFIG_TEHUTI is not set 551# CONFIG_TEHUTI is not set
546# CONFIG_BNX2X is not set 552# CONFIG_BNX2X is not set
553# CONFIG_SFC is not set
547# CONFIG_TR is not set 554# CONFIG_TR is not set
548 555
549# 556#
@@ -551,6 +558,7 @@ CONFIG_NETDEV_10000=y
551# 558#
552# CONFIG_WLAN_PRE80211 is not set 559# CONFIG_WLAN_PRE80211 is not set
553# CONFIG_WLAN_80211 is not set 560# CONFIG_WLAN_80211 is not set
561# CONFIG_IWLWIFI_LEDS is not set
554# CONFIG_WAN is not set 562# CONFIG_WAN is not set
555# CONFIG_FDDI is not set 563# CONFIG_FDDI is not set
556# CONFIG_HIPPI is not set 564# CONFIG_HIPPI is not set
@@ -598,6 +606,7 @@ CONFIG_INPUT=y
598# Character devices 606# Character devices
599# 607#
600# CONFIG_VT is not set 608# CONFIG_VT is not set
609CONFIG_DEVKMEM=y
601# CONFIG_SERIAL_NONSTANDARD is not set 610# CONFIG_SERIAL_NONSTANDARD is not set
602# CONFIG_NOZOMI is not set 611# CONFIG_NOZOMI is not set
603 612
@@ -626,7 +635,6 @@ CONFIG_LEGACY_PTY_COUNT=256
626# CONFIG_IPMI_HANDLER is not set 635# CONFIG_IPMI_HANDLER is not set
627CONFIG_HW_RANDOM=y 636CONFIG_HW_RANDOM=y
628# CONFIG_NVRAM is not set 637# CONFIG_NVRAM is not set
629# CONFIG_GEN_RTC is not set
630# CONFIG_R3964 is not set 638# CONFIG_R3964 is not set
631# CONFIG_APPLICOM is not set 639# CONFIG_APPLICOM is not set
632# CONFIG_RAW_DRIVER is not set 640# CONFIG_RAW_DRIVER is not set
@@ -637,13 +645,6 @@ CONFIG_I2C_BOARDINFO=y
637CONFIG_I2C_CHARDEV=y 645CONFIG_I2C_CHARDEV=y
638 646
639# 647#
640# I2C Algorithms
641#
642# CONFIG_I2C_ALGOBIT is not set
643# CONFIG_I2C_ALGOPCF is not set
644# CONFIG_I2C_ALGOPCA is not set
645
646#
647# I2C Hardware Bus support 648# I2C Hardware Bus support
648# 649#
649# CONFIG_I2C_ALI1535 is not set 650# CONFIG_I2C_ALI1535 is not set
@@ -669,6 +670,7 @@ CONFIG_I2C_MPC=y
669# CONFIG_I2C_VIA is not set 670# CONFIG_I2C_VIA is not set
670# CONFIG_I2C_VIAPRO is not set 671# CONFIG_I2C_VIAPRO is not set
671# CONFIG_I2C_VOODOO3 is not set 672# CONFIG_I2C_VOODOO3 is not set
673# CONFIG_I2C_PCA_PLATFORM is not set
672 674
673# 675#
674# Miscellaneous I2C Chip support 676# Miscellaneous I2C Chip support
@@ -678,19 +680,13 @@ CONFIG_I2C_MPC=y
678# CONFIG_SENSORS_PCF8574 is not set 680# CONFIG_SENSORS_PCF8574 is not set
679# CONFIG_PCF8575 is not set 681# CONFIG_PCF8575 is not set
680# CONFIG_SENSORS_PCF8591 is not set 682# CONFIG_SENSORS_PCF8591 is not set
681# CONFIG_TPS65010 is not set
682# CONFIG_SENSORS_MAX6875 is not set 683# CONFIG_SENSORS_MAX6875 is not set
683# CONFIG_SENSORS_TSL2550 is not set 684# CONFIG_SENSORS_TSL2550 is not set
684# CONFIG_I2C_DEBUG_CORE is not set 685# CONFIG_I2C_DEBUG_CORE is not set
685# CONFIG_I2C_DEBUG_ALGO is not set 686# CONFIG_I2C_DEBUG_ALGO is not set
686# CONFIG_I2C_DEBUG_BUS is not set 687# CONFIG_I2C_DEBUG_BUS is not set
687# CONFIG_I2C_DEBUG_CHIP is not set 688# CONFIG_I2C_DEBUG_CHIP is not set
688
689#
690# SPI support
691#
692# CONFIG_SPI is not set 689# CONFIG_SPI is not set
693# CONFIG_SPI_MASTER is not set
694# CONFIG_W1 is not set 690# CONFIG_W1 is not set
695# CONFIG_POWER_SUPPLY is not set 691# CONFIG_POWER_SUPPLY is not set
696CONFIG_HWMON=y 692CONFIG_HWMON=y
@@ -773,12 +769,22 @@ CONFIG_SSB_POSSIBLE=y
773# Multifunction device drivers 769# Multifunction device drivers
774# 770#
775# CONFIG_MFD_SM501 is not set 771# CONFIG_MFD_SM501 is not set
772# CONFIG_HTC_PASIC3 is not set
776 773
777# 774#
778# Multimedia devices 775# Multimedia devices
779# 776#
777
778#
779# Multimedia core support
780#
780# CONFIG_VIDEO_DEV is not set 781# CONFIG_VIDEO_DEV is not set
781# CONFIG_DVB_CORE is not set 782# CONFIG_DVB_CORE is not set
783# CONFIG_VIDEO_MEDIA is not set
784
785#
786# Multimedia drivers
787#
782CONFIG_DAB=y 788CONFIG_DAB=y
783 789
784# 790#
@@ -809,6 +815,8 @@ CONFIG_USB_ARCH_HAS_HCD=y
809CONFIG_USB_ARCH_HAS_OHCI=y 815CONFIG_USB_ARCH_HAS_OHCI=y
810CONFIG_USB_ARCH_HAS_EHCI=y 816CONFIG_USB_ARCH_HAS_EHCI=y
811# CONFIG_USB is not set 817# CONFIG_USB is not set
818# CONFIG_USB_OTG_WHITELIST is not set
819# CONFIG_USB_OTG_BLACKLIST_HUB is not set
812 820
813# 821#
814# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 822# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -817,6 +825,7 @@ CONFIG_USB_ARCH_HAS_EHCI=y
817# CONFIG_MMC is not set 825# CONFIG_MMC is not set
818# CONFIG_MEMSTICK is not set 826# CONFIG_MEMSTICK is not set
819# CONFIG_NEW_LEDS is not set 827# CONFIG_NEW_LEDS is not set
828# CONFIG_ACCESSIBILITY is not set
820# CONFIG_INFINIBAND is not set 829# CONFIG_INFINIBAND is not set
821# CONFIG_EDAC is not set 830# CONFIG_EDAC is not set
822CONFIG_RTC_LIB=y 831CONFIG_RTC_LIB=y
@@ -868,11 +877,8 @@ CONFIG_RTC_DRV_DS1374=y
868# 877#
869# on-CPU RTC drivers 878# on-CPU RTC drivers
870# 879#
880# CONFIG_RTC_DRV_PPC is not set
871# CONFIG_DMADEVICES is not set 881# CONFIG_DMADEVICES is not set
872
873#
874# Userspace I/O
875#
876# CONFIG_UIO is not set 882# CONFIG_UIO is not set
877 883
878# 884#
@@ -892,7 +898,6 @@ CONFIG_FS_MBCACHE=y
892# CONFIG_JFS_FS is not set 898# CONFIG_JFS_FS is not set
893# CONFIG_FS_POSIX_ACL is not set 899# CONFIG_FS_POSIX_ACL is not set
894# CONFIG_XFS_FS is not set 900# CONFIG_XFS_FS is not set
895# CONFIG_GFS2_FS is not set
896# CONFIG_OCFS2_FS is not set 901# CONFIG_OCFS2_FS is not set
897CONFIG_DNOTIFY=y 902CONFIG_DNOTIFY=y
898CONFIG_INOTIFY=y 903CONFIG_INOTIFY=y
@@ -950,7 +955,6 @@ CONFIG_NFS_FS=y
950CONFIG_NFS_V3=y 955CONFIG_NFS_V3=y
951# CONFIG_NFS_V3_ACL is not set 956# CONFIG_NFS_V3_ACL is not set
952CONFIG_NFS_V4=y 957CONFIG_NFS_V4=y
953# CONFIG_NFS_DIRECTIO is not set
954# CONFIG_NFSD is not set 958# CONFIG_NFSD is not set
955CONFIG_ROOT_NFS=y 959CONFIG_ROOT_NFS=y
956CONFIG_LOCKD=y 960CONFIG_LOCKD=y
@@ -993,6 +997,7 @@ CONFIG_UCC=y
993# Library routines 997# Library routines
994# 998#
995CONFIG_BITREVERSE=y 999CONFIG_BITREVERSE=y
1000# CONFIG_GENERIC_FIND_FIRST_BIT is not set
996# CONFIG_CRC_CCITT is not set 1001# CONFIG_CRC_CCITT is not set
997# CONFIG_CRC16 is not set 1002# CONFIG_CRC16 is not set
998# CONFIG_CRC_ITU_T is not set 1003# CONFIG_CRC_ITU_T is not set
@@ -1003,6 +1008,7 @@ CONFIG_PLIST=y
1003CONFIG_HAS_IOMEM=y 1008CONFIG_HAS_IOMEM=y
1004CONFIG_HAS_IOPORT=y 1009CONFIG_HAS_IOPORT=y
1005CONFIG_HAS_DMA=y 1010CONFIG_HAS_DMA=y
1011CONFIG_HAVE_LMB=y
1006 1012
1007# 1013#
1008# Kernel hacking 1014# Kernel hacking
@@ -1010,6 +1016,7 @@ CONFIG_HAS_DMA=y
1010# CONFIG_PRINTK_TIME is not set 1016# CONFIG_PRINTK_TIME is not set
1011CONFIG_ENABLE_WARN_DEPRECATED=y 1017CONFIG_ENABLE_WARN_DEPRECATED=y
1012CONFIG_ENABLE_MUST_CHECK=y 1018CONFIG_ENABLE_MUST_CHECK=y
1019CONFIG_FRAME_WARN=1024
1013# CONFIG_MAGIC_SYSRQ is not set 1020# CONFIG_MAGIC_SYSRQ is not set
1014# CONFIG_UNUSED_SYMBOLS is not set 1021# CONFIG_UNUSED_SYMBOLS is not set
1015# CONFIG_DEBUG_FS is not set 1022# CONFIG_DEBUG_FS is not set
@@ -1019,6 +1026,7 @@ CONFIG_ENABLE_MUST_CHECK=y
1019# CONFIG_SLUB_STATS is not set 1026# CONFIG_SLUB_STATS is not set
1020# CONFIG_DEBUG_BUGVERBOSE is not set 1027# CONFIG_DEBUG_BUGVERBOSE is not set
1021# CONFIG_SAMPLES is not set 1028# CONFIG_SAMPLES is not set
1029# CONFIG_IRQSTACKS is not set
1022# CONFIG_PPC_EARLY_DEBUG is not set 1030# CONFIG_PPC_EARLY_DEBUG is not set
1023 1031
1024# 1032#
@@ -1028,52 +1036,82 @@ CONFIG_ENABLE_MUST_CHECK=y
1028# CONFIG_SECURITY is not set 1036# CONFIG_SECURITY is not set
1029# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1037# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1030CONFIG_CRYPTO=y 1038CONFIG_CRYPTO=y
1039
1040#
1041# Crypto core or helper
1042#
1031CONFIG_CRYPTO_ALGAPI=y 1043CONFIG_CRYPTO_ALGAPI=y
1032CONFIG_CRYPTO_BLKCIPHER=y 1044CONFIG_CRYPTO_BLKCIPHER=y
1033# CONFIG_CRYPTO_SEQIV is not set
1034CONFIG_CRYPTO_MANAGER=y 1045CONFIG_CRYPTO_MANAGER=y
1046# CONFIG_CRYPTO_GF128MUL is not set
1047# CONFIG_CRYPTO_NULL is not set
1048# CONFIG_CRYPTO_CRYPTD is not set
1049# CONFIG_CRYPTO_AUTHENC is not set
1050# CONFIG_CRYPTO_TEST is not set
1051
1052#
1053# Authenticated Encryption with Associated Data
1054#
1055# CONFIG_CRYPTO_CCM is not set
1056# CONFIG_CRYPTO_GCM is not set
1057# CONFIG_CRYPTO_SEQIV is not set
1058
1059#
1060# Block modes
1061#
1062CONFIG_CRYPTO_CBC=y
1063# CONFIG_CRYPTO_CTR is not set
1064# CONFIG_CRYPTO_CTS is not set
1065CONFIG_CRYPTO_ECB=m
1066# CONFIG_CRYPTO_LRW is not set
1067CONFIG_CRYPTO_PCBC=m
1068# CONFIG_CRYPTO_XTS is not set
1069
1070#
1071# Hash modes
1072#
1035# CONFIG_CRYPTO_HMAC is not set 1073# CONFIG_CRYPTO_HMAC is not set
1036# CONFIG_CRYPTO_XCBC is not set 1074# CONFIG_CRYPTO_XCBC is not set
1037# CONFIG_CRYPTO_NULL is not set 1075
1076#
1077# Digest
1078#
1079# CONFIG_CRYPTO_CRC32C is not set
1038# CONFIG_CRYPTO_MD4 is not set 1080# CONFIG_CRYPTO_MD4 is not set
1039CONFIG_CRYPTO_MD5=y 1081CONFIG_CRYPTO_MD5=y
1082# CONFIG_CRYPTO_MICHAEL_MIC is not set
1040# CONFIG_CRYPTO_SHA1 is not set 1083# CONFIG_CRYPTO_SHA1 is not set
1041# CONFIG_CRYPTO_SHA256 is not set 1084# CONFIG_CRYPTO_SHA256 is not set
1042# CONFIG_CRYPTO_SHA512 is not set 1085# CONFIG_CRYPTO_SHA512 is not set
1043# CONFIG_CRYPTO_WP512 is not set
1044# CONFIG_CRYPTO_TGR192 is not set 1086# CONFIG_CRYPTO_TGR192 is not set
1045# CONFIG_CRYPTO_GF128MUL is not set 1087# CONFIG_CRYPTO_WP512 is not set
1046CONFIG_CRYPTO_ECB=m 1088
1047CONFIG_CRYPTO_CBC=y 1089#
1048CONFIG_CRYPTO_PCBC=m 1090# Ciphers
1049# CONFIG_CRYPTO_LRW is not set 1091#
1050# CONFIG_CRYPTO_XTS is not set
1051# CONFIG_CRYPTO_CTR is not set
1052# CONFIG_CRYPTO_GCM is not set
1053# CONFIG_CRYPTO_CCM is not set
1054# CONFIG_CRYPTO_CRYPTD is not set
1055CONFIG_CRYPTO_DES=y
1056# CONFIG_CRYPTO_FCRYPT is not set
1057# CONFIG_CRYPTO_BLOWFISH is not set
1058# CONFIG_CRYPTO_TWOFISH is not set
1059# CONFIG_CRYPTO_SERPENT is not set
1060# CONFIG_CRYPTO_AES is not set 1092# CONFIG_CRYPTO_AES is not set
1093# CONFIG_CRYPTO_ANUBIS is not set
1094# CONFIG_CRYPTO_ARC4 is not set
1095# CONFIG_CRYPTO_BLOWFISH is not set
1096# CONFIG_CRYPTO_CAMELLIA is not set
1061# CONFIG_CRYPTO_CAST5 is not set 1097# CONFIG_CRYPTO_CAST5 is not set
1062# CONFIG_CRYPTO_CAST6 is not set 1098# CONFIG_CRYPTO_CAST6 is not set
1063# CONFIG_CRYPTO_TEA is not set 1099CONFIG_CRYPTO_DES=y
1064# CONFIG_CRYPTO_ARC4 is not set 1100# CONFIG_CRYPTO_FCRYPT is not set
1065# CONFIG_CRYPTO_KHAZAD is not set 1101# CONFIG_CRYPTO_KHAZAD is not set
1066# CONFIG_CRYPTO_ANUBIS is not set
1067# CONFIG_CRYPTO_SEED is not set
1068# CONFIG_CRYPTO_SALSA20 is not set 1102# CONFIG_CRYPTO_SALSA20 is not set
1103# CONFIG_CRYPTO_SEED is not set
1104# CONFIG_CRYPTO_SERPENT is not set
1105# CONFIG_CRYPTO_TEA is not set
1106# CONFIG_CRYPTO_TWOFISH is not set
1107
1108#
1109# Compression
1110#
1069# CONFIG_CRYPTO_DEFLATE is not set 1111# CONFIG_CRYPTO_DEFLATE is not set
1070# CONFIG_CRYPTO_MICHAEL_MIC is not set
1071# CONFIG_CRYPTO_CRC32C is not set
1072# CONFIG_CRYPTO_CAMELLIA is not set
1073# CONFIG_CRYPTO_TEST is not set
1074# CONFIG_CRYPTO_AUTHENC is not set
1075# CONFIG_CRYPTO_LZO is not set 1112# CONFIG_CRYPTO_LZO is not set
1076CONFIG_CRYPTO_HW=y 1113CONFIG_CRYPTO_HW=y
1077# CONFIG_CRYPTO_DEV_HIFN_795X is not set 1114# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1078# CONFIG_PPC_CLOCK is not set 1115# CONFIG_PPC_CLOCK is not set
1079CONFIG_PPC_LIB_RHEAP=y 1116CONFIG_PPC_LIB_RHEAP=y
1117# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/83xx/mpc837x_mds_defconfig b/arch/powerpc/configs/83xx/mpc837x_mds_defconfig
index f377cde785b0..0f94d9f56beb 100644
--- a/arch/powerpc/configs/83xx/mpc837x_mds_defconfig
+++ b/arch/powerpc/configs/83xx/mpc837x_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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 24 08:48:23 2008 4# Mon Jun 9 08:52:28 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -31,6 +31,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y 31CONFIG_GENERIC_HARDIRQS=y
32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
33CONFIG_IRQ_PER_CPU=y 33CONFIG_IRQ_PER_CPU=y
34CONFIG_STACKTRACE_SUPPORT=y
35CONFIG_LOCKDEP_SUPPORT=y
34CONFIG_RWSEM_XCHGADD_ALGORITHM=y 36CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y 37CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y 38CONFIG_GENERIC_HWEIGHT=y
@@ -86,6 +88,7 @@ CONFIG_INITRAMFS_SOURCE=""
86CONFIG_SYSCTL=y 88CONFIG_SYSCTL=y
87CONFIG_EMBEDDED=y 89CONFIG_EMBEDDED=y
88CONFIG_SYSCTL_SYSCALL=y 90CONFIG_SYSCTL_SYSCALL=y
91CONFIG_SYSCTL_SYSCALL_CHECK=y
89CONFIG_KALLSYMS=y 92CONFIG_KALLSYMS=y
90# CONFIG_KALLSYMS_EXTRA_PASS is not set 93# CONFIG_KALLSYMS_EXTRA_PASS is not set
91CONFIG_HOTPLUG=y 94CONFIG_HOTPLUG=y
@@ -111,12 +114,14 @@ CONFIG_HAVE_OPROFILE=y
111# CONFIG_KPROBES is not set 114# CONFIG_KPROBES is not set
112CONFIG_HAVE_KPROBES=y 115CONFIG_HAVE_KPROBES=y
113CONFIG_HAVE_KRETPROBES=y 116CONFIG_HAVE_KRETPROBES=y
117# CONFIG_HAVE_DMA_ATTRS is not set
114CONFIG_PROC_PAGE_MONITOR=y 118CONFIG_PROC_PAGE_MONITOR=y
115CONFIG_SLABINFO=y 119CONFIG_SLABINFO=y
116CONFIG_RT_MUTEXES=y 120CONFIG_RT_MUTEXES=y
117# CONFIG_TINY_SHMEM is not set 121# CONFIG_TINY_SHMEM is not set
118CONFIG_BASE_SMALL=0 122CONFIG_BASE_SMALL=0
119CONFIG_MODULES=y 123CONFIG_MODULES=y
124# CONFIG_MODULE_FORCE_LOAD is not set
120CONFIG_MODULE_UNLOAD=y 125CONFIG_MODULE_UNLOAD=y
121# CONFIG_MODULE_FORCE_UNLOAD is not set 126# CONFIG_MODULE_FORCE_UNLOAD is not set
122# CONFIG_MODVERSIONS is not set 127# CONFIG_MODVERSIONS is not set
@@ -211,11 +216,13 @@ CONFIG_FLATMEM=y
211CONFIG_FLAT_NODE_MEM_MAP=y 216CONFIG_FLAT_NODE_MEM_MAP=y
212# CONFIG_SPARSEMEM_STATIC is not set 217# CONFIG_SPARSEMEM_STATIC is not set
213# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 218# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
219CONFIG_PAGEFLAGS_EXTENDED=y
214CONFIG_SPLIT_PTLOCK_CPUS=4 220CONFIG_SPLIT_PTLOCK_CPUS=4
215# CONFIG_RESOURCES_64BIT is not set 221# CONFIG_RESOURCES_64BIT is not set
216CONFIG_ZONE_DMA_FLAG=1 222CONFIG_ZONE_DMA_FLAG=1
217CONFIG_BOUNCE=y 223CONFIG_BOUNCE=y
218CONFIG_VIRT_TO_BUS=y 224CONFIG_VIRT_TO_BUS=y
225CONFIG_FORCE_MAX_ZONEORDER=11
219CONFIG_PROC_DEVICETREE=y 226CONFIG_PROC_DEVICETREE=y
220# CONFIG_CMDLINE_BOOL is not set 227# CONFIG_CMDLINE_BOOL is not set
221# CONFIG_PM is not set 228# CONFIG_PM is not set
@@ -234,6 +241,7 @@ CONFIG_FSL_SOC=y
234# CONFIG_PCI_SYSCALL is not set 241# CONFIG_PCI_SYSCALL is not set
235# CONFIG_ARCH_SUPPORTS_MSI is not set 242# CONFIG_ARCH_SUPPORTS_MSI is not set
236# CONFIG_PCCARD is not set 243# CONFIG_PCCARD is not set
244# CONFIG_HAS_RAPIDIO is not set
237 245
238# 246#
239# Advanced setup 247# Advanced setup
@@ -243,11 +251,11 @@ CONFIG_FSL_SOC=y
243# 251#
244# Default settings for advanced configuration options are used 252# Default settings for advanced configuration options are used
245# 253#
246CONFIG_HIGHMEM_START=0xfe000000
247CONFIG_LOWMEM_SIZE=0x30000000 254CONFIG_LOWMEM_SIZE=0x30000000
255CONFIG_PAGE_OFFSET=0xc0000000
248CONFIG_KERNEL_START=0xc0000000 256CONFIG_KERNEL_START=0xc0000000
257CONFIG_PHYSICAL_START=0x00000000
249CONFIG_TASK_SIZE=0xc0000000 258CONFIG_TASK_SIZE=0xc0000000
250CONFIG_BOOT_LOAD=0x00800000
251 259
252# 260#
253# Networking 261# Networking
@@ -295,8 +303,6 @@ CONFIG_TCP_CONG_CUBIC=y
295CONFIG_DEFAULT_TCP_CONG="cubic" 303CONFIG_DEFAULT_TCP_CONG="cubic"
296# CONFIG_TCP_MD5SIG is not set 304# CONFIG_TCP_MD5SIG is not set
297# CONFIG_IPV6 is not set 305# CONFIG_IPV6 is not set
298# CONFIG_INET6_XFRM_TUNNEL is not set
299# CONFIG_INET6_TUNNEL is not set
300# CONFIG_NETWORK_SECMARK is not set 306# CONFIG_NETWORK_SECMARK is not set
301# CONFIG_NETFILTER is not set 307# CONFIG_NETFILTER is not set
302# CONFIG_IP_DCCP is not set 308# CONFIG_IP_DCCP is not set
@@ -350,6 +356,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
350# CONFIG_CONNECTOR is not set 356# CONFIG_CONNECTOR is not set
351# CONFIG_MTD is not set 357# CONFIG_MTD is not set
352CONFIG_OF_DEVICE=y 358CONFIG_OF_DEVICE=y
359CONFIG_OF_I2C=y
353# CONFIG_PARPORT is not set 360# CONFIG_PARPORT is not set
354CONFIG_BLK_DEV=y 361CONFIG_BLK_DEV=y
355# CONFIG_BLK_DEV_FD is not set 362# CONFIG_BLK_DEV_FD is not set
@@ -411,8 +418,10 @@ CONFIG_SCSI_LOWLEVEL=y
411# CONFIG_SCSI_DEBUG is not set 418# CONFIG_SCSI_DEBUG is not set
412CONFIG_ATA=y 419CONFIG_ATA=y
413# CONFIG_ATA_NONSTANDARD is not set 420# CONFIG_ATA_NONSTANDARD is not set
414# CONFIG_SATA_MV is not set 421CONFIG_SATA_PMP=y
415CONFIG_SATA_FSL=y 422CONFIG_SATA_FSL=y
423CONFIG_ATA_SFF=y
424# CONFIG_SATA_MV is not set
416# CONFIG_PATA_PLATFORM is not set 425# CONFIG_PATA_PLATFORM is not set
417# CONFIG_MD is not set 426# CONFIG_MD is not set
418# CONFIG_MACINTOSH_DRIVERS is not set 427# CONFIG_MACINTOSH_DRIVERS is not set
@@ -459,6 +468,7 @@ CONFIG_NETDEV_10000=y
459# 468#
460# CONFIG_WLAN_PRE80211 is not set 469# CONFIG_WLAN_PRE80211 is not set
461# CONFIG_WLAN_80211 is not set 470# CONFIG_WLAN_80211 is not set
471# CONFIG_IWLWIFI_LEDS is not set
462# CONFIG_WAN is not set 472# CONFIG_WAN is not set
463# CONFIG_PPP is not set 473# CONFIG_PPP is not set
464# CONFIG_SLIP is not set 474# CONFIG_SLIP is not set
@@ -503,6 +513,7 @@ CONFIG_INPUT=y
503# Character devices 513# Character devices
504# 514#
505# CONFIG_VT is not set 515# CONFIG_VT is not set
516CONFIG_DEVKMEM=y
506# CONFIG_SERIAL_NONSTANDARD is not set 517# CONFIG_SERIAL_NONSTANDARD is not set
507 518
508# 519#
@@ -537,13 +548,6 @@ CONFIG_I2C_BOARDINFO=y
537CONFIG_I2C_CHARDEV=y 548CONFIG_I2C_CHARDEV=y
538 549
539# 550#
540# I2C Algorithms
541#
542# CONFIG_I2C_ALGOBIT is not set
543# CONFIG_I2C_ALGOPCF is not set
544# CONFIG_I2C_ALGOPCA is not set
545
546#
547# I2C Hardware Bus support 551# I2C Hardware Bus support
548# 552#
549CONFIG_I2C_MPC=y 553CONFIG_I2C_MPC=y
@@ -552,6 +556,7 @@ CONFIG_I2C_MPC=y
552# CONFIG_I2C_SIMTEC is not set 556# CONFIG_I2C_SIMTEC is not set
553# CONFIG_I2C_TAOS_EVM is not set 557# CONFIG_I2C_TAOS_EVM is not set
554# CONFIG_I2C_STUB is not set 558# CONFIG_I2C_STUB is not set
559# CONFIG_I2C_PCA_PLATFORM is not set
555 560
556# 561#
557# Miscellaneous I2C Chip support 562# Miscellaneous I2C Chip support
@@ -561,19 +566,13 @@ CONFIG_I2C_MPC=y
561# CONFIG_SENSORS_PCF8574 is not set 566# CONFIG_SENSORS_PCF8574 is not set
562# CONFIG_PCF8575 is not set 567# CONFIG_PCF8575 is not set
563# CONFIG_SENSORS_PCF8591 is not set 568# CONFIG_SENSORS_PCF8591 is not set
564# CONFIG_TPS65010 is not set
565# CONFIG_SENSORS_MAX6875 is not set 569# CONFIG_SENSORS_MAX6875 is not set
566# CONFIG_SENSORS_TSL2550 is not set 570# CONFIG_SENSORS_TSL2550 is not set
567# CONFIG_I2C_DEBUG_CORE is not set 571# CONFIG_I2C_DEBUG_CORE is not set
568# CONFIG_I2C_DEBUG_ALGO is not set 572# CONFIG_I2C_DEBUG_ALGO is not set
569# CONFIG_I2C_DEBUG_BUS is not set 573# CONFIG_I2C_DEBUG_BUS is not set
570# CONFIG_I2C_DEBUG_CHIP is not set 574# CONFIG_I2C_DEBUG_CHIP is not set
571
572#
573# SPI support
574#
575# CONFIG_SPI is not set 575# CONFIG_SPI is not set
576# CONFIG_SPI_MASTER is not set
577# CONFIG_W1 is not set 576# CONFIG_W1 is not set
578# CONFIG_POWER_SUPPLY is not set 577# CONFIG_POWER_SUPPLY is not set
579CONFIG_HWMON=y 578CONFIG_HWMON=y
@@ -646,12 +645,22 @@ CONFIG_SSB_POSSIBLE=y
646# Multifunction device drivers 645# Multifunction device drivers
647# 646#
648# CONFIG_MFD_SM501 is not set 647# CONFIG_MFD_SM501 is not set
648# CONFIG_HTC_PASIC3 is not set
649 649
650# 650#
651# Multimedia devices 651# Multimedia devices
652# 652#
653
654#
655# Multimedia core support
656#
653# CONFIG_VIDEO_DEV is not set 657# CONFIG_VIDEO_DEV is not set
654# CONFIG_DVB_CORE is not set 658# CONFIG_DVB_CORE is not set
659# CONFIG_VIDEO_MEDIA is not set
660
661#
662# Multimedia drivers
663#
655CONFIG_DAB=y 664CONFIG_DAB=y
656 665
657# 666#
@@ -680,6 +689,8 @@ CONFIG_USB_ARCH_HAS_HCD=y
680# CONFIG_USB_ARCH_HAS_OHCI is not set 689# CONFIG_USB_ARCH_HAS_OHCI is not set
681CONFIG_USB_ARCH_HAS_EHCI=y 690CONFIG_USB_ARCH_HAS_EHCI=y
682# CONFIG_USB is not set 691# CONFIG_USB is not set
692# CONFIG_USB_OTG_WHITELIST is not set
693# CONFIG_USB_OTG_BLACKLIST_HUB is not set
683 694
684# 695#
685# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 696# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -688,13 +699,10 @@ CONFIG_USB_ARCH_HAS_EHCI=y
688# CONFIG_MMC is not set 699# CONFIG_MMC is not set
689# CONFIG_MEMSTICK is not set 700# CONFIG_MEMSTICK is not set
690# CONFIG_NEW_LEDS is not set 701# CONFIG_NEW_LEDS is not set
702# CONFIG_ACCESSIBILITY is not set
691# CONFIG_EDAC is not set 703# CONFIG_EDAC is not set
692# CONFIG_RTC_CLASS is not set 704# CONFIG_RTC_CLASS is not set
693# CONFIG_DMADEVICES is not set 705# CONFIG_DMADEVICES is not set
694
695#
696# Userspace I/O
697#
698# CONFIG_UIO is not set 706# CONFIG_UIO is not set
699 707
700# 708#
@@ -714,7 +722,6 @@ CONFIG_FS_MBCACHE=y
714# CONFIG_JFS_FS is not set 722# CONFIG_JFS_FS is not set
715# CONFIG_FS_POSIX_ACL is not set 723# CONFIG_FS_POSIX_ACL is not set
716# CONFIG_XFS_FS is not set 724# CONFIG_XFS_FS is not set
717# CONFIG_GFS2_FS is not set
718# CONFIG_OCFS2_FS is not set 725# CONFIG_OCFS2_FS is not set
719CONFIG_DNOTIFY=y 726CONFIG_DNOTIFY=y
720CONFIG_INOTIFY=y 727CONFIG_INOTIFY=y
@@ -772,7 +779,6 @@ CONFIG_NFS_FS=y
772CONFIG_NFS_V3=y 779CONFIG_NFS_V3=y
773# CONFIG_NFS_V3_ACL is not set 780# CONFIG_NFS_V3_ACL is not set
774CONFIG_NFS_V4=y 781CONFIG_NFS_V4=y
775# CONFIG_NFS_DIRECTIO is not set
776# CONFIG_NFSD is not set 782# CONFIG_NFSD is not set
777CONFIG_ROOT_NFS=y 783CONFIG_ROOT_NFS=y
778CONFIG_LOCKD=y 784CONFIG_LOCKD=y
@@ -817,6 +823,7 @@ CONFIG_MSDOS_PARTITION=y
817# Library routines 823# Library routines
818# 824#
819CONFIG_BITREVERSE=y 825CONFIG_BITREVERSE=y
826# CONFIG_GENERIC_FIND_FIRST_BIT is not set
820# CONFIG_CRC_CCITT is not set 827# CONFIG_CRC_CCITT is not set
821# CONFIG_CRC16 is not set 828# CONFIG_CRC16 is not set
822# CONFIG_CRC_ITU_T is not set 829# CONFIG_CRC_ITU_T is not set
@@ -827,6 +834,7 @@ CONFIG_PLIST=y
827CONFIG_HAS_IOMEM=y 834CONFIG_HAS_IOMEM=y
828CONFIG_HAS_IOPORT=y 835CONFIG_HAS_IOPORT=y
829CONFIG_HAS_DMA=y 836CONFIG_HAS_DMA=y
837CONFIG_HAVE_LMB=y
830 838
831# 839#
832# Kernel hacking 840# Kernel hacking
@@ -834,6 +842,7 @@ CONFIG_HAS_DMA=y
834# CONFIG_PRINTK_TIME is not set 842# CONFIG_PRINTK_TIME is not set
835CONFIG_ENABLE_WARN_DEPRECATED=y 843CONFIG_ENABLE_WARN_DEPRECATED=y
836CONFIG_ENABLE_MUST_CHECK=y 844CONFIG_ENABLE_MUST_CHECK=y
845CONFIG_FRAME_WARN=1024
837# CONFIG_MAGIC_SYSRQ is not set 846# CONFIG_MAGIC_SYSRQ is not set
838# CONFIG_UNUSED_SYMBOLS is not set 847# CONFIG_UNUSED_SYMBOLS is not set
839# CONFIG_DEBUG_FS is not set 848# CONFIG_DEBUG_FS is not set
@@ -841,6 +850,7 @@ CONFIG_ENABLE_MUST_CHECK=y
841# CONFIG_DEBUG_KERNEL is not set 850# CONFIG_DEBUG_KERNEL is not set
842# CONFIG_DEBUG_BUGVERBOSE is not set 851# CONFIG_DEBUG_BUGVERBOSE is not set
843# CONFIG_SAMPLES is not set 852# CONFIG_SAMPLES is not set
853# CONFIG_IRQSTACKS is not set
844# CONFIG_PPC_EARLY_DEBUG is not set 854# CONFIG_PPC_EARLY_DEBUG is not set
845 855
846# 856#
@@ -850,50 +860,80 @@ CONFIG_ENABLE_MUST_CHECK=y
850# CONFIG_SECURITY is not set 860# CONFIG_SECURITY is not set
851# CONFIG_SECURITY_FILE_CAPABILITIES is not set 861# CONFIG_SECURITY_FILE_CAPABILITIES is not set
852CONFIG_CRYPTO=y 862CONFIG_CRYPTO=y
863
864#
865# Crypto core or helper
866#
853CONFIG_CRYPTO_ALGAPI=y 867CONFIG_CRYPTO_ALGAPI=y
854CONFIG_CRYPTO_BLKCIPHER=y 868CONFIG_CRYPTO_BLKCIPHER=y
855# CONFIG_CRYPTO_SEQIV is not set
856CONFIG_CRYPTO_MANAGER=y 869CONFIG_CRYPTO_MANAGER=y
870# CONFIG_CRYPTO_GF128MUL is not set
871# CONFIG_CRYPTO_NULL is not set
872# CONFIG_CRYPTO_CRYPTD is not set
873# CONFIG_CRYPTO_AUTHENC is not set
874# CONFIG_CRYPTO_TEST is not set
875
876#
877# Authenticated Encryption with Associated Data
878#
879# CONFIG_CRYPTO_CCM is not set
880# CONFIG_CRYPTO_GCM is not set
881# CONFIG_CRYPTO_SEQIV is not set
882
883#
884# Block modes
885#
886CONFIG_CRYPTO_CBC=y
887# CONFIG_CRYPTO_CTR is not set
888# CONFIG_CRYPTO_CTS is not set
889CONFIG_CRYPTO_ECB=m
890# CONFIG_CRYPTO_LRW is not set
891CONFIG_CRYPTO_PCBC=m
892# CONFIG_CRYPTO_XTS is not set
893
894#
895# Hash modes
896#
857# CONFIG_CRYPTO_HMAC is not set 897# CONFIG_CRYPTO_HMAC is not set
858# CONFIG_CRYPTO_XCBC is not set 898# CONFIG_CRYPTO_XCBC is not set
859# CONFIG_CRYPTO_NULL is not set 899
900#
901# Digest
902#
903# CONFIG_CRYPTO_CRC32C is not set
860# CONFIG_CRYPTO_MD4 is not set 904# CONFIG_CRYPTO_MD4 is not set
861CONFIG_CRYPTO_MD5=y 905CONFIG_CRYPTO_MD5=y
906# CONFIG_CRYPTO_MICHAEL_MIC is not set
862# CONFIG_CRYPTO_SHA1 is not set 907# CONFIG_CRYPTO_SHA1 is not set
863# CONFIG_CRYPTO_SHA256 is not set 908# CONFIG_CRYPTO_SHA256 is not set
864# CONFIG_CRYPTO_SHA512 is not set 909# CONFIG_CRYPTO_SHA512 is not set
865# CONFIG_CRYPTO_WP512 is not set
866# CONFIG_CRYPTO_TGR192 is not set 910# CONFIG_CRYPTO_TGR192 is not set
867# CONFIG_CRYPTO_GF128MUL is not set 911# CONFIG_CRYPTO_WP512 is not set
868CONFIG_CRYPTO_ECB=m 912
869CONFIG_CRYPTO_CBC=y 913#
870CONFIG_CRYPTO_PCBC=m 914# Ciphers
871# CONFIG_CRYPTO_LRW is not set 915#
872# CONFIG_CRYPTO_XTS is not set
873# CONFIG_CRYPTO_CTR is not set
874# CONFIG_CRYPTO_GCM is not set
875# CONFIG_CRYPTO_CCM is not set
876# CONFIG_CRYPTO_CRYPTD is not set
877CONFIG_CRYPTO_DES=y
878# CONFIG_CRYPTO_FCRYPT is not set
879# CONFIG_CRYPTO_BLOWFISH is not set
880# CONFIG_CRYPTO_TWOFISH is not set
881# CONFIG_CRYPTO_SERPENT is not set
882# CONFIG_CRYPTO_AES is not set 916# CONFIG_CRYPTO_AES is not set
917# CONFIG_CRYPTO_ANUBIS is not set
918# CONFIG_CRYPTO_ARC4 is not set
919# CONFIG_CRYPTO_BLOWFISH is not set
920# CONFIG_CRYPTO_CAMELLIA is not set
883# CONFIG_CRYPTO_CAST5 is not set 921# CONFIG_CRYPTO_CAST5 is not set
884# CONFIG_CRYPTO_CAST6 is not set 922# CONFIG_CRYPTO_CAST6 is not set
885# CONFIG_CRYPTO_TEA is not set 923CONFIG_CRYPTO_DES=y
886# CONFIG_CRYPTO_ARC4 is not set 924# CONFIG_CRYPTO_FCRYPT is not set
887# CONFIG_CRYPTO_KHAZAD is not set 925# CONFIG_CRYPTO_KHAZAD is not set
888# CONFIG_CRYPTO_ANUBIS is not set
889# CONFIG_CRYPTO_SEED is not set
890# CONFIG_CRYPTO_SALSA20 is not set 926# CONFIG_CRYPTO_SALSA20 is not set
927# CONFIG_CRYPTO_SEED is not set
928# CONFIG_CRYPTO_SERPENT is not set
929# CONFIG_CRYPTO_TEA is not set
930# CONFIG_CRYPTO_TWOFISH is not set
931
932#
933# Compression
934#
891# CONFIG_CRYPTO_DEFLATE is not set 935# CONFIG_CRYPTO_DEFLATE is not set
892# CONFIG_CRYPTO_MICHAEL_MIC is not set
893# CONFIG_CRYPTO_CRC32C is not set
894# CONFIG_CRYPTO_CAMELLIA is not set
895# CONFIG_CRYPTO_TEST is not set
896# CONFIG_CRYPTO_AUTHENC is not set
897# CONFIG_CRYPTO_LZO is not set 936# CONFIG_CRYPTO_LZO is not set
898CONFIG_CRYPTO_HW=y 937CONFIG_CRYPTO_HW=y
899# CONFIG_PPC_CLOCK is not set 938# CONFIG_PPC_CLOCK is not set
939# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig b/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig
index a6331769d88f..0d448556f53a 100644
--- a/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig
+++ b/arch/powerpc/configs/83xx/mpc837x_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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 24 08:48:24 2008 4# Tue Jun 10 09:17:12 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -31,6 +31,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y 31CONFIG_GENERIC_HARDIRQS=y
32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
33CONFIG_IRQ_PER_CPU=y 33CONFIG_IRQ_PER_CPU=y
34CONFIG_STACKTRACE_SUPPORT=y
35CONFIG_LOCKDEP_SUPPORT=y
34CONFIG_RWSEM_XCHGADD_ALGORITHM=y 36CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y 37CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y 38CONFIG_GENERIC_HWEIGHT=y
@@ -86,6 +88,7 @@ CONFIG_INITRAMFS_SOURCE=""
86CONFIG_SYSCTL=y 88CONFIG_SYSCTL=y
87CONFIG_EMBEDDED=y 89CONFIG_EMBEDDED=y
88CONFIG_SYSCTL_SYSCALL=y 90CONFIG_SYSCTL_SYSCALL=y
91CONFIG_SYSCTL_SYSCALL_CHECK=y
89CONFIG_KALLSYMS=y 92CONFIG_KALLSYMS=y
90# CONFIG_KALLSYMS_EXTRA_PASS is not set 93# CONFIG_KALLSYMS_EXTRA_PASS is not set
91CONFIG_HOTPLUG=y 94CONFIG_HOTPLUG=y
@@ -111,12 +114,14 @@ CONFIG_HAVE_OPROFILE=y
111# CONFIG_KPROBES is not set 114# CONFIG_KPROBES is not set
112CONFIG_HAVE_KPROBES=y 115CONFIG_HAVE_KPROBES=y
113CONFIG_HAVE_KRETPROBES=y 116CONFIG_HAVE_KRETPROBES=y
117# CONFIG_HAVE_DMA_ATTRS is not set
114CONFIG_PROC_PAGE_MONITOR=y 118CONFIG_PROC_PAGE_MONITOR=y
115CONFIG_SLABINFO=y 119CONFIG_SLABINFO=y
116CONFIG_RT_MUTEXES=y 120CONFIG_RT_MUTEXES=y
117# CONFIG_TINY_SHMEM is not set 121# CONFIG_TINY_SHMEM is not set
118CONFIG_BASE_SMALL=0 122CONFIG_BASE_SMALL=0
119CONFIG_MODULES=y 123CONFIG_MODULES=y
124# CONFIG_MODULE_FORCE_LOAD is not set
120CONFIG_MODULE_UNLOAD=y 125CONFIG_MODULE_UNLOAD=y
121# CONFIG_MODULE_FORCE_UNLOAD is not set 126# CONFIG_MODULE_FORCE_UNLOAD is not set
122# CONFIG_MODVERSIONS is not set 127# CONFIG_MODVERSIONS is not set
@@ -211,11 +216,13 @@ CONFIG_FLATMEM=y
211CONFIG_FLAT_NODE_MEM_MAP=y 216CONFIG_FLAT_NODE_MEM_MAP=y
212# CONFIG_SPARSEMEM_STATIC is not set 217# CONFIG_SPARSEMEM_STATIC is not set
213# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 218# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
219CONFIG_PAGEFLAGS_EXTENDED=y
214CONFIG_SPLIT_PTLOCK_CPUS=4 220CONFIG_SPLIT_PTLOCK_CPUS=4
215# CONFIG_RESOURCES_64BIT is not set 221# CONFIG_RESOURCES_64BIT is not set
216CONFIG_ZONE_DMA_FLAG=1 222CONFIG_ZONE_DMA_FLAG=1
217CONFIG_BOUNCE=y 223CONFIG_BOUNCE=y
218CONFIG_VIRT_TO_BUS=y 224CONFIG_VIRT_TO_BUS=y
225CONFIG_FORCE_MAX_ZONEORDER=11
219CONFIG_PROC_DEVICETREE=y 226CONFIG_PROC_DEVICETREE=y
220# CONFIG_CMDLINE_BOOL is not set 227# CONFIG_CMDLINE_BOOL is not set
221# CONFIG_PM is not set 228# CONFIG_PM is not set
@@ -234,6 +241,7 @@ CONFIG_FSL_SOC=y
234# CONFIG_PCI_SYSCALL is not set 241# CONFIG_PCI_SYSCALL is not set
235# CONFIG_ARCH_SUPPORTS_MSI is not set 242# CONFIG_ARCH_SUPPORTS_MSI is not set
236# CONFIG_PCCARD is not set 243# CONFIG_PCCARD is not set
244# CONFIG_HAS_RAPIDIO is not set
237 245
238# 246#
239# Advanced setup 247# Advanced setup
@@ -243,11 +251,11 @@ CONFIG_FSL_SOC=y
243# 251#
244# Default settings for advanced configuration options are used 252# Default settings for advanced configuration options are used
245# 253#
246CONFIG_HIGHMEM_START=0xfe000000
247CONFIG_LOWMEM_SIZE=0x30000000 254CONFIG_LOWMEM_SIZE=0x30000000
255CONFIG_PAGE_OFFSET=0xc0000000
248CONFIG_KERNEL_START=0xc0000000 256CONFIG_KERNEL_START=0xc0000000
257CONFIG_PHYSICAL_START=0x00000000
249CONFIG_TASK_SIZE=0xc0000000 258CONFIG_TASK_SIZE=0xc0000000
250CONFIG_BOOT_LOAD=0x00800000
251 259
252# 260#
253# Networking 261# Networking
@@ -290,8 +298,6 @@ CONFIG_TCP_CONG_CUBIC=y
290CONFIG_DEFAULT_TCP_CONG="cubic" 298CONFIG_DEFAULT_TCP_CONG="cubic"
291# CONFIG_TCP_MD5SIG is not set 299# CONFIG_TCP_MD5SIG is not set
292# CONFIG_IPV6 is not set 300# CONFIG_IPV6 is not set
293# CONFIG_INET6_XFRM_TUNNEL is not set
294# CONFIG_INET6_TUNNEL is not set
295# CONFIG_NETWORK_SECMARK is not set 301# CONFIG_NETWORK_SECMARK is not set
296# CONFIG_NETFILTER is not set 302# CONFIG_NETFILTER is not set
297# CONFIG_IP_DCCP is not set 303# CONFIG_IP_DCCP is not set
@@ -345,6 +351,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
345# CONFIG_CONNECTOR is not set 351# CONFIG_CONNECTOR is not set
346# CONFIG_MTD is not set 352# CONFIG_MTD is not set
347CONFIG_OF_DEVICE=y 353CONFIG_OF_DEVICE=y
354CONFIG_OF_I2C=y
348# CONFIG_PARPORT is not set 355# CONFIG_PARPORT is not set
349CONFIG_BLK_DEV=y 356CONFIG_BLK_DEV=y
350# CONFIG_BLK_DEV_FD is not set 357# CONFIG_BLK_DEV_FD is not set
@@ -352,6 +359,7 @@ CONFIG_BLK_DEV=y
352CONFIG_BLK_DEV_LOOP=y 359CONFIG_BLK_DEV_LOOP=y
353# CONFIG_BLK_DEV_CRYPTOLOOP is not set 360# CONFIG_BLK_DEV_CRYPTOLOOP is not set
354# CONFIG_BLK_DEV_NBD is not set 361# CONFIG_BLK_DEV_NBD is not set
362# CONFIG_BLK_DEV_UB is not set
355CONFIG_BLK_DEV_RAM=y 363CONFIG_BLK_DEV_RAM=y
356CONFIG_BLK_DEV_RAM_COUNT=16 364CONFIG_BLK_DEV_RAM_COUNT=16
357CONFIG_BLK_DEV_RAM_SIZE=32768 365CONFIG_BLK_DEV_RAM_SIZE=32768
@@ -406,8 +414,10 @@ CONFIG_SCSI_LOWLEVEL=y
406# CONFIG_SCSI_DEBUG is not set 414# CONFIG_SCSI_DEBUG is not set
407CONFIG_ATA=y 415CONFIG_ATA=y
408# CONFIG_ATA_NONSTANDARD is not set 416# CONFIG_ATA_NONSTANDARD is not set
409# CONFIG_SATA_MV is not set 417CONFIG_SATA_PMP=y
410CONFIG_SATA_FSL=y 418CONFIG_SATA_FSL=y
419CONFIG_ATA_SFF=y
420# CONFIG_SATA_MV is not set
411# CONFIG_PATA_PLATFORM is not set 421# CONFIG_PATA_PLATFORM is not set
412CONFIG_MD=y 422CONFIG_MD=y
413CONFIG_BLK_DEV_MD=y 423CONFIG_BLK_DEV_MD=y
@@ -444,7 +454,7 @@ CONFIG_MARVELL_PHY=y
444# CONFIG_BROADCOM_PHY is not set 454# CONFIG_BROADCOM_PHY is not set
445# CONFIG_ICPLUS_PHY is not set 455# CONFIG_ICPLUS_PHY is not set
446# CONFIG_REALTEK_PHY is not set 456# CONFIG_REALTEK_PHY is not set
447# CONFIG_FIXED_PHY is not set 457CONFIG_FIXED_PHY=y
448# CONFIG_MDIO_BITBANG is not set 458# CONFIG_MDIO_BITBANG is not set
449CONFIG_NET_ETHERNET=y 459CONFIG_NET_ETHERNET=y
450CONFIG_MII=y 460CONFIG_MII=y
@@ -464,6 +474,16 @@ CONFIG_GFAR_NAPI=y
464# 474#
465# CONFIG_WLAN_PRE80211 is not set 475# CONFIG_WLAN_PRE80211 is not set
466# CONFIG_WLAN_80211 is not set 476# CONFIG_WLAN_80211 is not set
477# CONFIG_IWLWIFI_LEDS is not set
478
479#
480# USB Network Adapters
481#
482# CONFIG_USB_CATC is not set
483# CONFIG_USB_KAWETH is not set
484# CONFIG_USB_PEGASUS is not set
485# CONFIG_USB_RTL8150 is not set
486# CONFIG_USB_USBNET is not set
467# CONFIG_WAN is not set 487# CONFIG_WAN is not set
468# CONFIG_PPP is not set 488# CONFIG_PPP is not set
469# CONFIG_SLIP is not set 489# CONFIG_SLIP is not set
@@ -508,6 +528,7 @@ CONFIG_INPUT=y
508# Character devices 528# Character devices
509# 529#
510# CONFIG_VT is not set 530# CONFIG_VT is not set
531CONFIG_DEVKMEM=y
511# CONFIG_SERIAL_NONSTANDARD is not set 532# CONFIG_SERIAL_NONSTANDARD is not set
512 533
513# 534#
@@ -542,13 +563,6 @@ CONFIG_I2C_BOARDINFO=y
542CONFIG_I2C_CHARDEV=y 563CONFIG_I2C_CHARDEV=y
543 564
544# 565#
545# I2C Algorithms
546#
547# CONFIG_I2C_ALGOBIT is not set
548# CONFIG_I2C_ALGOPCF is not set
549# CONFIG_I2C_ALGOPCA is not set
550
551#
552# I2C Hardware Bus support 566# I2C Hardware Bus support
553# 567#
554CONFIG_I2C_MPC=y 568CONFIG_I2C_MPC=y
@@ -557,6 +571,8 @@ CONFIG_I2C_MPC=y
557# CONFIG_I2C_SIMTEC is not set 571# CONFIG_I2C_SIMTEC is not set
558# CONFIG_I2C_TAOS_EVM is not set 572# CONFIG_I2C_TAOS_EVM is not set
559# CONFIG_I2C_STUB is not set 573# CONFIG_I2C_STUB is not set
574# CONFIG_I2C_TINY_USB is not set
575# CONFIG_I2C_PCA_PLATFORM is not set
560 576
561# 577#
562# Miscellaneous I2C Chip support 578# Miscellaneous I2C Chip support
@@ -566,19 +582,13 @@ CONFIG_I2C_MPC=y
566# CONFIG_SENSORS_PCF8574 is not set 582# CONFIG_SENSORS_PCF8574 is not set
567# CONFIG_PCF8575 is not set 583# CONFIG_PCF8575 is not set
568# CONFIG_SENSORS_PCF8591 is not set 584# CONFIG_SENSORS_PCF8591 is not set
569# CONFIG_TPS65010 is not set
570# CONFIG_SENSORS_MAX6875 is not set 585# CONFIG_SENSORS_MAX6875 is not set
571# CONFIG_SENSORS_TSL2550 is not set 586# CONFIG_SENSORS_TSL2550 is not set
572# CONFIG_I2C_DEBUG_CORE is not set 587# CONFIG_I2C_DEBUG_CORE is not set
573# CONFIG_I2C_DEBUG_ALGO is not set 588# CONFIG_I2C_DEBUG_ALGO is not set
574# CONFIG_I2C_DEBUG_BUS is not set 589# CONFIG_I2C_DEBUG_BUS is not set
575# CONFIG_I2C_DEBUG_CHIP is not set 590# CONFIG_I2C_DEBUG_CHIP is not set
576
577#
578# SPI support
579#
580# CONFIG_SPI is not set 591# CONFIG_SPI is not set
581# CONFIG_SPI_MASTER is not set
582# CONFIG_W1 is not set 592# CONFIG_W1 is not set
583# CONFIG_POWER_SUPPLY is not set 593# CONFIG_POWER_SUPPLY is not set
584CONFIG_HWMON=y 594CONFIG_HWMON=y
@@ -642,6 +652,11 @@ CONFIG_WATCHDOG=y
642CONFIG_83xx_WDT=y 652CONFIG_83xx_WDT=y
643 653
644# 654#
655# USB-based Watchdog Cards
656#
657# CONFIG_USBPCWATCHDOG is not set
658
659#
645# Sonics Silicon Backplane 660# Sonics Silicon Backplane
646# 661#
647CONFIG_SSB_POSSIBLE=y 662CONFIG_SSB_POSSIBLE=y
@@ -651,13 +666,24 @@ CONFIG_SSB_POSSIBLE=y
651# Multifunction device drivers 666# Multifunction device drivers
652# 667#
653# CONFIG_MFD_SM501 is not set 668# CONFIG_MFD_SM501 is not set
669# CONFIG_HTC_PASIC3 is not set
654 670
655# 671#
656# Multimedia devices 672# Multimedia devices
657# 673#
674
675#
676# Multimedia core support
677#
658# CONFIG_VIDEO_DEV is not set 678# CONFIG_VIDEO_DEV is not set
659# CONFIG_DVB_CORE is not set 679# CONFIG_DVB_CORE is not set
680# CONFIG_VIDEO_MEDIA is not set
681
682#
683# Multimedia drivers
684#
660CONFIG_DAB=y 685CONFIG_DAB=y
686# CONFIG_USB_DABUSB is not set
661 687
662# 688#
663# Graphics support 689# Graphics support
@@ -680,6 +706,14 @@ CONFIG_HID_SUPPORT=y
680CONFIG_HID=y 706CONFIG_HID=y
681# CONFIG_HID_DEBUG is not set 707# CONFIG_HID_DEBUG is not set
682# CONFIG_HIDRAW is not set 708# CONFIG_HIDRAW is not set
709
710#
711# USB Input Devices
712#
713CONFIG_USB_HID=y
714# CONFIG_USB_HIDINPUT_POWERBOOK is not set
715# CONFIG_HID_FF is not set
716# CONFIG_USB_HIDDEV is not set
683CONFIG_USB_SUPPORT=y 717CONFIG_USB_SUPPORT=y
684CONFIG_USB_ARCH_HAS_HCD=y 718CONFIG_USB_ARCH_HAS_HCD=y
685# CONFIG_USB_ARCH_HAS_OHCI is not set 719# CONFIG_USB_ARCH_HAS_OHCI is not set
@@ -695,33 +729,83 @@ CONFIG_USB=y
695CONFIG_USB_DEVICE_CLASS=y 729CONFIG_USB_DEVICE_CLASS=y
696# CONFIG_USB_DYNAMIC_MINORS is not set 730# CONFIG_USB_DYNAMIC_MINORS is not set
697# CONFIG_USB_OTG is not set 731# CONFIG_USB_OTG is not set
732# CONFIG_USB_OTG_WHITELIST is not set
733# CONFIG_USB_OTG_BLACKLIST_HUB is not set
698 734
699# 735#
700# USB Host Controller Drivers 736# USB Host Controller Drivers
701# 737#
738# CONFIG_USB_C67X00_HCD is not set
702CONFIG_USB_EHCI_HCD=y 739CONFIG_USB_EHCI_HCD=y
703CONFIG_USB_EHCI_ROOT_HUB_TT=y 740CONFIG_USB_EHCI_ROOT_HUB_TT=y
704# CONFIG_USB_EHCI_TT_NEWSCHED is not set 741# CONFIG_USB_EHCI_TT_NEWSCHED is not set
705CONFIG_USB_EHCI_FSL=y 742CONFIG_USB_EHCI_FSL=y
706CONFIG_USB_EHCI_HCD_PPC_OF=y 743CONFIG_USB_EHCI_HCD_PPC_OF=y
707# CONFIG_USB_ISP116X_HCD is not set 744# CONFIG_USB_ISP116X_HCD is not set
745# CONFIG_USB_ISP1760_HCD is not set
708# CONFIG_USB_SL811_HCD is not set 746# CONFIG_USB_SL811_HCD is not set
709# CONFIG_USB_R8A66597_HCD is not set 747# CONFIG_USB_R8A66597_HCD is not set
710 748
711# 749#
750# USB Device Class drivers
751#
752# CONFIG_USB_ACM is not set
753# CONFIG_USB_PRINTER is not set
754# CONFIG_USB_WDM is not set
755
756#
712# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 757# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
713# 758#
759
760#
761# may also be needed; see USB_STORAGE Help for more information
762#
763# CONFIG_USB_STORAGE is not set
764# CONFIG_USB_LIBUSUAL is not set
765
766#
767# USB Imaging devices
768#
769# CONFIG_USB_MDC800 is not set
770# CONFIG_USB_MICROTEK is not set
771CONFIG_USB_MON=y
772
773#
774# USB port drivers
775#
776# CONFIG_USB_SERIAL is not set
777
778#
779# USB Miscellaneous drivers
780#
781# CONFIG_USB_EMI62 is not set
782# CONFIG_USB_EMI26 is not set
783# CONFIG_USB_ADUTUX is not set
784# CONFIG_USB_AUERSWALD is not set
785# CONFIG_USB_RIO500 is not set
786# CONFIG_USB_LEGOTOWER is not set
787# CONFIG_USB_LCD is not set
788# CONFIG_USB_BERRY_CHARGE is not set
789# CONFIG_USB_LED is not set
790# CONFIG_USB_CYPRESS_CY7C63 is not set
791# CONFIG_USB_CYTHERM is not set
792# CONFIG_USB_PHIDGET is not set
793# CONFIG_USB_IDMOUSE is not set
794# CONFIG_USB_FTDI_ELAN is not set
795# CONFIG_USB_APPLEDISPLAY is not set
796# CONFIG_USB_SISUSBVGA is not set
797# CONFIG_USB_LD is not set
798# CONFIG_USB_TRANCEVIBRATOR is not set
799# CONFIG_USB_IOWARRIOR is not set
800# CONFIG_USB_ISIGHTFW is not set
714# CONFIG_USB_GADGET is not set 801# CONFIG_USB_GADGET is not set
715# CONFIG_MMC is not set 802# CONFIG_MMC is not set
716# CONFIG_MEMSTICK is not set 803# CONFIG_MEMSTICK is not set
717# CONFIG_NEW_LEDS is not set 804# CONFIG_NEW_LEDS is not set
805# CONFIG_ACCESSIBILITY is not set
718# CONFIG_EDAC is not set 806# CONFIG_EDAC is not set
719# CONFIG_RTC_CLASS is not set 807# CONFIG_RTC_CLASS is not set
720# CONFIG_DMADEVICES is not set 808# CONFIG_DMADEVICES is not set
721
722#
723# Userspace I/O
724#
725# CONFIG_UIO is not set 809# CONFIG_UIO is not set
726 810
727# 811#
@@ -741,7 +825,6 @@ CONFIG_FS_MBCACHE=y
741# CONFIG_JFS_FS is not set 825# CONFIG_JFS_FS is not set
742# CONFIG_FS_POSIX_ACL is not set 826# CONFIG_FS_POSIX_ACL is not set
743# CONFIG_XFS_FS is not set 827# CONFIG_XFS_FS is not set
744# CONFIG_GFS2_FS is not set
745# CONFIG_OCFS2_FS is not set 828# CONFIG_OCFS2_FS is not set
746CONFIG_DNOTIFY=y 829CONFIG_DNOTIFY=y
747CONFIG_INOTIFY=y 830CONFIG_INOTIFY=y
@@ -799,7 +882,6 @@ CONFIG_NFS_FS=y
799CONFIG_NFS_V3=y 882CONFIG_NFS_V3=y
800# CONFIG_NFS_V3_ACL is not set 883# CONFIG_NFS_V3_ACL is not set
801CONFIG_NFS_V4=y 884CONFIG_NFS_V4=y
802# CONFIG_NFS_DIRECTIO is not set
803# CONFIG_NFSD is not set 885# CONFIG_NFSD is not set
804CONFIG_ROOT_NFS=y 886CONFIG_ROOT_NFS=y
805CONFIG_LOCKD=y 887CONFIG_LOCKD=y
@@ -844,6 +926,7 @@ CONFIG_MSDOS_PARTITION=y
844# Library routines 926# Library routines
845# 927#
846CONFIG_BITREVERSE=y 928CONFIG_BITREVERSE=y
929# CONFIG_GENERIC_FIND_FIRST_BIT is not set
847# CONFIG_CRC_CCITT is not set 930# CONFIG_CRC_CCITT is not set
848# CONFIG_CRC16 is not set 931# CONFIG_CRC16 is not set
849# CONFIG_CRC_ITU_T is not set 932# CONFIG_CRC_ITU_T is not set
@@ -854,6 +937,7 @@ CONFIG_PLIST=y
854CONFIG_HAS_IOMEM=y 937CONFIG_HAS_IOMEM=y
855CONFIG_HAS_IOPORT=y 938CONFIG_HAS_IOPORT=y
856CONFIG_HAS_DMA=y 939CONFIG_HAS_DMA=y
940CONFIG_HAVE_LMB=y
857 941
858# 942#
859# Kernel hacking 943# Kernel hacking
@@ -861,6 +945,7 @@ CONFIG_HAS_DMA=y
861# CONFIG_PRINTK_TIME is not set 945# CONFIG_PRINTK_TIME is not set
862CONFIG_ENABLE_WARN_DEPRECATED=y 946CONFIG_ENABLE_WARN_DEPRECATED=y
863# CONFIG_ENABLE_MUST_CHECK is not set 947# CONFIG_ENABLE_MUST_CHECK is not set
948CONFIG_FRAME_WARN=1024
864# CONFIG_MAGIC_SYSRQ is not set 949# CONFIG_MAGIC_SYSRQ is not set
865# CONFIG_UNUSED_SYMBOLS is not set 950# CONFIG_UNUSED_SYMBOLS is not set
866# CONFIG_DEBUG_FS is not set 951# CONFIG_DEBUG_FS is not set
@@ -868,6 +953,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y
868# CONFIG_DEBUG_KERNEL is not set 953# CONFIG_DEBUG_KERNEL is not set
869# CONFIG_DEBUG_BUGVERBOSE is not set 954# CONFIG_DEBUG_BUGVERBOSE is not set
870# CONFIG_SAMPLES is not set 955# CONFIG_SAMPLES is not set
956# CONFIG_IRQSTACKS is not set
871# CONFIG_PPC_EARLY_DEBUG is not set 957# CONFIG_PPC_EARLY_DEBUG is not set
872 958
873# 959#
@@ -881,50 +967,80 @@ CONFIG_ASYNC_CORE=y
881CONFIG_ASYNC_MEMCPY=y 967CONFIG_ASYNC_MEMCPY=y
882CONFIG_ASYNC_XOR=y 968CONFIG_ASYNC_XOR=y
883CONFIG_CRYPTO=y 969CONFIG_CRYPTO=y
970
971#
972# Crypto core or helper
973#
884CONFIG_CRYPTO_ALGAPI=y 974CONFIG_CRYPTO_ALGAPI=y
885CONFIG_CRYPTO_BLKCIPHER=y 975CONFIG_CRYPTO_BLKCIPHER=y
886# CONFIG_CRYPTO_SEQIV is not set
887CONFIG_CRYPTO_MANAGER=y 976CONFIG_CRYPTO_MANAGER=y
977# CONFIG_CRYPTO_GF128MUL is not set
978# CONFIG_CRYPTO_NULL is not set
979# CONFIG_CRYPTO_CRYPTD is not set
980# CONFIG_CRYPTO_AUTHENC is not set
981# CONFIG_CRYPTO_TEST is not set
982
983#
984# Authenticated Encryption with Associated Data
985#
986# CONFIG_CRYPTO_CCM is not set
987# CONFIG_CRYPTO_GCM is not set
988# CONFIG_CRYPTO_SEQIV is not set
989
990#
991# Block modes
992#
993CONFIG_CRYPTO_CBC=y
994# CONFIG_CRYPTO_CTR is not set
995# CONFIG_CRYPTO_CTS is not set
996CONFIG_CRYPTO_ECB=m
997# CONFIG_CRYPTO_LRW is not set
998CONFIG_CRYPTO_PCBC=m
999# CONFIG_CRYPTO_XTS is not set
1000
1001#
1002# Hash modes
1003#
888# CONFIG_CRYPTO_HMAC is not set 1004# CONFIG_CRYPTO_HMAC is not set
889# CONFIG_CRYPTO_XCBC is not set 1005# CONFIG_CRYPTO_XCBC is not set
890# CONFIG_CRYPTO_NULL is not set 1006
1007#
1008# Digest
1009#
1010# CONFIG_CRYPTO_CRC32C is not set
891# CONFIG_CRYPTO_MD4 is not set 1011# CONFIG_CRYPTO_MD4 is not set
892CONFIG_CRYPTO_MD5=y 1012CONFIG_CRYPTO_MD5=y
1013# CONFIG_CRYPTO_MICHAEL_MIC is not set
893# CONFIG_CRYPTO_SHA1 is not set 1014# CONFIG_CRYPTO_SHA1 is not set
894# CONFIG_CRYPTO_SHA256 is not set 1015# CONFIG_CRYPTO_SHA256 is not set
895# CONFIG_CRYPTO_SHA512 is not set 1016# CONFIG_CRYPTO_SHA512 is not set
896# CONFIG_CRYPTO_WP512 is not set
897# CONFIG_CRYPTO_TGR192 is not set 1017# CONFIG_CRYPTO_TGR192 is not set
898# CONFIG_CRYPTO_GF128MUL is not set 1018# CONFIG_CRYPTO_WP512 is not set
899CONFIG_CRYPTO_ECB=m 1019
900CONFIG_CRYPTO_CBC=y 1020#
901CONFIG_CRYPTO_PCBC=m 1021# Ciphers
902# CONFIG_CRYPTO_LRW is not set 1022#
903# CONFIG_CRYPTO_XTS is not set
904# CONFIG_CRYPTO_CTR is not set
905# CONFIG_CRYPTO_GCM is not set
906# CONFIG_CRYPTO_CCM is not set
907# CONFIG_CRYPTO_CRYPTD is not set
908CONFIG_CRYPTO_DES=y
909# CONFIG_CRYPTO_FCRYPT is not set
910# CONFIG_CRYPTO_BLOWFISH is not set
911# CONFIG_CRYPTO_TWOFISH is not set
912# CONFIG_CRYPTO_SERPENT is not set
913# CONFIG_CRYPTO_AES is not set 1023# CONFIG_CRYPTO_AES is not set
1024# CONFIG_CRYPTO_ANUBIS is not set
1025# CONFIG_CRYPTO_ARC4 is not set
1026# CONFIG_CRYPTO_BLOWFISH is not set
1027# CONFIG_CRYPTO_CAMELLIA is not set
914# CONFIG_CRYPTO_CAST5 is not set 1028# CONFIG_CRYPTO_CAST5 is not set
915# CONFIG_CRYPTO_CAST6 is not set 1029# CONFIG_CRYPTO_CAST6 is not set
916# CONFIG_CRYPTO_TEA is not set 1030CONFIG_CRYPTO_DES=y
917# CONFIG_CRYPTO_ARC4 is not set 1031# CONFIG_CRYPTO_FCRYPT is not set
918# CONFIG_CRYPTO_KHAZAD is not set 1032# CONFIG_CRYPTO_KHAZAD is not set
919# CONFIG_CRYPTO_ANUBIS is not set
920# CONFIG_CRYPTO_SEED is not set
921# CONFIG_CRYPTO_SALSA20 is not set 1033# CONFIG_CRYPTO_SALSA20 is not set
1034# CONFIG_CRYPTO_SEED is not set
1035# CONFIG_CRYPTO_SERPENT is not set
1036# CONFIG_CRYPTO_TEA is not set
1037# CONFIG_CRYPTO_TWOFISH is not set
1038
1039#
1040# Compression
1041#
922# CONFIG_CRYPTO_DEFLATE is not set 1042# CONFIG_CRYPTO_DEFLATE is not set
923# CONFIG_CRYPTO_MICHAEL_MIC is not set
924# CONFIG_CRYPTO_CRC32C is not set
925# CONFIG_CRYPTO_CAMELLIA is not set
926# CONFIG_CRYPTO_TEST is not set
927# CONFIG_CRYPTO_AUTHENC is not set
928# CONFIG_CRYPTO_LZO is not set 1043# CONFIG_CRYPTO_LZO is not set
929CONFIG_CRYPTO_HW=y 1044CONFIG_CRYPTO_HW=y
930# CONFIG_PPC_CLOCK is not set 1045# CONFIG_PPC_CLOCK is not set
1046# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/83xx/sbc834x_defconfig b/arch/powerpc/configs/83xx/sbc834x_defconfig
index 1f1518229f6d..1752918be2c1 100644
--- a/arch/powerpc/configs/83xx/sbc834x_defconfig
+++ b/arch/powerpc/configs/83xx/sbc834x_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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 24 08:48:38 2008 4# Mon Jun 9 08:52:30 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -31,6 +31,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y 31CONFIG_GENERIC_HARDIRQS=y
32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
33CONFIG_IRQ_PER_CPU=y 33CONFIG_IRQ_PER_CPU=y
34CONFIG_STACKTRACE_SUPPORT=y
35CONFIG_LOCKDEP_SUPPORT=y
34CONFIG_RWSEM_XCHGADD_ALGORITHM=y 36CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y 37CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y 38CONFIG_GENERIC_HWEIGHT=y
@@ -86,6 +88,7 @@ CONFIG_INITRAMFS_SOURCE=""
86CONFIG_SYSCTL=y 88CONFIG_SYSCTL=y
87CONFIG_EMBEDDED=y 89CONFIG_EMBEDDED=y
88CONFIG_SYSCTL_SYSCALL=y 90CONFIG_SYSCTL_SYSCALL=y
91CONFIG_SYSCTL_SYSCALL_CHECK=y
89# CONFIG_KALLSYMS is not set 92# CONFIG_KALLSYMS is not set
90CONFIG_HOTPLUG=y 93CONFIG_HOTPLUG=y
91CONFIG_PRINTK=y 94CONFIG_PRINTK=y
@@ -109,12 +112,14 @@ CONFIG_SLAB=y
109CONFIG_HAVE_OPROFILE=y 112CONFIG_HAVE_OPROFILE=y
110CONFIG_HAVE_KPROBES=y 113CONFIG_HAVE_KPROBES=y
111CONFIG_HAVE_KRETPROBES=y 114CONFIG_HAVE_KRETPROBES=y
115# CONFIG_HAVE_DMA_ATTRS is not set
112CONFIG_PROC_PAGE_MONITOR=y 116CONFIG_PROC_PAGE_MONITOR=y
113CONFIG_SLABINFO=y 117CONFIG_SLABINFO=y
114CONFIG_RT_MUTEXES=y 118CONFIG_RT_MUTEXES=y
115# CONFIG_TINY_SHMEM is not set 119# CONFIG_TINY_SHMEM is not set
116CONFIG_BASE_SMALL=0 120CONFIG_BASE_SMALL=0
117CONFIG_MODULES=y 121CONFIG_MODULES=y
122# CONFIG_MODULE_FORCE_LOAD is not set
118CONFIG_MODULE_UNLOAD=y 123CONFIG_MODULE_UNLOAD=y
119# CONFIG_MODULE_FORCE_UNLOAD is not set 124# CONFIG_MODULE_FORCE_UNLOAD is not set
120# CONFIG_MODVERSIONS is not set 125# CONFIG_MODVERSIONS is not set
@@ -209,11 +214,13 @@ CONFIG_FLATMEM=y
209CONFIG_FLAT_NODE_MEM_MAP=y 214CONFIG_FLAT_NODE_MEM_MAP=y
210# CONFIG_SPARSEMEM_STATIC is not set 215# CONFIG_SPARSEMEM_STATIC is not set
211# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 216# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
217CONFIG_PAGEFLAGS_EXTENDED=y
212CONFIG_SPLIT_PTLOCK_CPUS=4 218CONFIG_SPLIT_PTLOCK_CPUS=4
213# CONFIG_RESOURCES_64BIT is not set 219# CONFIG_RESOURCES_64BIT is not set
214CONFIG_ZONE_DMA_FLAG=1 220CONFIG_ZONE_DMA_FLAG=1
215CONFIG_BOUNCE=y 221CONFIG_BOUNCE=y
216CONFIG_VIRT_TO_BUS=y 222CONFIG_VIRT_TO_BUS=y
223CONFIG_FORCE_MAX_ZONEORDER=11
217CONFIG_PROC_DEVICETREE=y 224CONFIG_PROC_DEVICETREE=y
218# CONFIG_CMDLINE_BOOL is not set 225# CONFIG_CMDLINE_BOOL is not set
219# CONFIG_PM is not set 226# CONFIG_PM is not set
@@ -232,6 +239,7 @@ CONFIG_FSL_SOC=y
232# CONFIG_PCI_SYSCALL is not set 239# CONFIG_PCI_SYSCALL is not set
233# CONFIG_ARCH_SUPPORTS_MSI is not set 240# CONFIG_ARCH_SUPPORTS_MSI is not set
234# CONFIG_PCCARD is not set 241# CONFIG_PCCARD is not set
242# CONFIG_HAS_RAPIDIO is not set
235 243
236# 244#
237# Advanced setup 245# Advanced setup
@@ -241,11 +249,11 @@ CONFIG_FSL_SOC=y
241# 249#
242# Default settings for advanced configuration options are used 250# Default settings for advanced configuration options are used
243# 251#
244CONFIG_HIGHMEM_START=0xfe000000
245CONFIG_LOWMEM_SIZE=0x30000000 252CONFIG_LOWMEM_SIZE=0x30000000
253CONFIG_PAGE_OFFSET=0xc0000000
246CONFIG_KERNEL_START=0xc0000000 254CONFIG_KERNEL_START=0xc0000000
255CONFIG_PHYSICAL_START=0x00000000
247CONFIG_TASK_SIZE=0xc0000000 256CONFIG_TASK_SIZE=0xc0000000
248CONFIG_BOOT_LOAD=0x00800000
249 257
250# 258#
251# Networking 259# Networking
@@ -293,8 +301,6 @@ CONFIG_TCP_CONG_CUBIC=y
293CONFIG_DEFAULT_TCP_CONG="cubic" 301CONFIG_DEFAULT_TCP_CONG="cubic"
294# CONFIG_TCP_MD5SIG is not set 302# CONFIG_TCP_MD5SIG is not set
295# CONFIG_IPV6 is not set 303# CONFIG_IPV6 is not set
296# CONFIG_INET6_XFRM_TUNNEL is not set
297# CONFIG_INET6_TUNNEL is not set
298# CONFIG_NETWORK_SECMARK is not set 304# CONFIG_NETWORK_SECMARK is not set
299# CONFIG_NETFILTER is not set 305# CONFIG_NETFILTER is not set
300# CONFIG_IP_DCCP is not set 306# CONFIG_IP_DCCP is not set
@@ -348,6 +354,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
348# CONFIG_CONNECTOR is not set 354# CONFIG_CONNECTOR is not set
349# CONFIG_MTD is not set 355# CONFIG_MTD is not set
350CONFIG_OF_DEVICE=y 356CONFIG_OF_DEVICE=y
357CONFIG_OF_I2C=y
351# CONFIG_PARPORT is not set 358# CONFIG_PARPORT is not set
352CONFIG_BLK_DEV=y 359CONFIG_BLK_DEV=y
353# CONFIG_BLK_DEV_FD is not set 360# CONFIG_BLK_DEV_FD is not set
@@ -420,6 +427,7 @@ CONFIG_GIANFAR=y
420# 427#
421# CONFIG_WLAN_PRE80211 is not set 428# CONFIG_WLAN_PRE80211 is not set
422# CONFIG_WLAN_80211 is not set 429# CONFIG_WLAN_80211 is not set
430# CONFIG_IWLWIFI_LEDS is not set
423# CONFIG_WAN is not set 431# CONFIG_WAN is not set
424# CONFIG_PPP is not set 432# CONFIG_PPP is not set
425# CONFIG_SLIP is not set 433# CONFIG_SLIP is not set
@@ -464,6 +472,7 @@ CONFIG_INPUT=y
464# Character devices 472# Character devices
465# 473#
466# CONFIG_VT is not set 474# CONFIG_VT is not set
475CONFIG_DEVKMEM=y
467# CONFIG_SERIAL_NONSTANDARD is not set 476# CONFIG_SERIAL_NONSTANDARD is not set
468 477
469# 478#
@@ -498,13 +507,6 @@ CONFIG_I2C_BOARDINFO=y
498CONFIG_I2C_CHARDEV=y 507CONFIG_I2C_CHARDEV=y
499 508
500# 509#
501# I2C Algorithms
502#
503# CONFIG_I2C_ALGOBIT is not set
504# CONFIG_I2C_ALGOPCF is not set
505# CONFIG_I2C_ALGOPCA is not set
506
507#
508# I2C Hardware Bus support 510# I2C Hardware Bus support
509# 511#
510CONFIG_I2C_MPC=y 512CONFIG_I2C_MPC=y
@@ -513,6 +515,7 @@ CONFIG_I2C_MPC=y
513# CONFIG_I2C_SIMTEC is not set 515# CONFIG_I2C_SIMTEC is not set
514# CONFIG_I2C_TAOS_EVM is not set 516# CONFIG_I2C_TAOS_EVM is not set
515# CONFIG_I2C_STUB is not set 517# CONFIG_I2C_STUB is not set
518# CONFIG_I2C_PCA_PLATFORM is not set
516 519
517# 520#
518# Miscellaneous I2C Chip support 521# Miscellaneous I2C Chip support
@@ -522,19 +525,13 @@ CONFIG_I2C_MPC=y
522# CONFIG_SENSORS_PCF8574 is not set 525# CONFIG_SENSORS_PCF8574 is not set
523# CONFIG_PCF8575 is not set 526# CONFIG_PCF8575 is not set
524# CONFIG_SENSORS_PCF8591 is not set 527# CONFIG_SENSORS_PCF8591 is not set
525# CONFIG_TPS65010 is not set
526# CONFIG_SENSORS_MAX6875 is not set 528# CONFIG_SENSORS_MAX6875 is not set
527# CONFIG_SENSORS_TSL2550 is not set 529# CONFIG_SENSORS_TSL2550 is not set
528# CONFIG_I2C_DEBUG_CORE is not set 530# CONFIG_I2C_DEBUG_CORE is not set
529# CONFIG_I2C_DEBUG_ALGO is not set 531# CONFIG_I2C_DEBUG_ALGO is not set
530# CONFIG_I2C_DEBUG_BUS is not set 532# CONFIG_I2C_DEBUG_BUS is not set
531# CONFIG_I2C_DEBUG_CHIP is not set 533# CONFIG_I2C_DEBUG_CHIP is not set
532
533#
534# SPI support
535#
536# CONFIG_SPI is not set 534# CONFIG_SPI is not set
537# CONFIG_SPI_MASTER is not set
538# CONFIG_W1 is not set 535# CONFIG_W1 is not set
539# CONFIG_POWER_SUPPLY is not set 536# CONFIG_POWER_SUPPLY is not set
540CONFIG_HWMON=y 537CONFIG_HWMON=y
@@ -607,12 +604,22 @@ CONFIG_SSB_POSSIBLE=y
607# Multifunction device drivers 604# Multifunction device drivers
608# 605#
609# CONFIG_MFD_SM501 is not set 606# CONFIG_MFD_SM501 is not set
607# CONFIG_HTC_PASIC3 is not set
610 608
611# 609#
612# Multimedia devices 610# Multimedia devices
613# 611#
612
613#
614# Multimedia core support
615#
614# CONFIG_VIDEO_DEV is not set 616# CONFIG_VIDEO_DEV is not set
615# CONFIG_DVB_CORE is not set 617# CONFIG_DVB_CORE is not set
618# CONFIG_VIDEO_MEDIA is not set
619
620#
621# Multimedia drivers
622#
616# CONFIG_DAB is not set 623# CONFIG_DAB is not set
617 624
618# 625#
@@ -640,13 +647,10 @@ CONFIG_HID=y
640# CONFIG_MMC is not set 647# CONFIG_MMC is not set
641# CONFIG_MEMSTICK is not set 648# CONFIG_MEMSTICK is not set
642# CONFIG_NEW_LEDS is not set 649# CONFIG_NEW_LEDS is not set
650# CONFIG_ACCESSIBILITY is not set
643# CONFIG_EDAC is not set 651# CONFIG_EDAC is not set
644# CONFIG_RTC_CLASS is not set 652# CONFIG_RTC_CLASS is not set
645# CONFIG_DMADEVICES is not set 653# CONFIG_DMADEVICES is not set
646
647#
648# Userspace I/O
649#
650# CONFIG_UIO is not set 654# CONFIG_UIO is not set
651 655
652# 656#
@@ -659,7 +663,6 @@ CONFIG_HID=y
659# CONFIG_JFS_FS is not set 663# CONFIG_JFS_FS is not set
660# CONFIG_FS_POSIX_ACL is not set 664# CONFIG_FS_POSIX_ACL is not set
661# CONFIG_XFS_FS is not set 665# CONFIG_XFS_FS is not set
662# CONFIG_GFS2_FS is not set
663# CONFIG_OCFS2_FS is not set 666# CONFIG_OCFS2_FS is not set
664CONFIG_DNOTIFY=y 667CONFIG_DNOTIFY=y
665CONFIG_INOTIFY=y 668CONFIG_INOTIFY=y
@@ -717,7 +720,6 @@ CONFIG_NFS_FS=y
717CONFIG_NFS_V3=y 720CONFIG_NFS_V3=y
718# CONFIG_NFS_V3_ACL is not set 721# CONFIG_NFS_V3_ACL is not set
719CONFIG_NFS_V4=y 722CONFIG_NFS_V4=y
720# CONFIG_NFS_DIRECTIO is not set
721# CONFIG_NFSD is not set 723# CONFIG_NFSD is not set
722CONFIG_ROOT_NFS=y 724CONFIG_ROOT_NFS=y
723CONFIG_LOCKD=y 725CONFIG_LOCKD=y
@@ -746,6 +748,7 @@ CONFIG_MSDOS_PARTITION=y
746# Library routines 748# Library routines
747# 749#
748CONFIG_BITREVERSE=y 750CONFIG_BITREVERSE=y
751# CONFIG_GENERIC_FIND_FIRST_BIT is not set
749# CONFIG_CRC_CCITT is not set 752# CONFIG_CRC_CCITT is not set
750# CONFIG_CRC16 is not set 753# CONFIG_CRC16 is not set
751# CONFIG_CRC_ITU_T is not set 754# CONFIG_CRC_ITU_T is not set
@@ -756,6 +759,7 @@ CONFIG_PLIST=y
756CONFIG_HAS_IOMEM=y 759CONFIG_HAS_IOMEM=y
757CONFIG_HAS_IOPORT=y 760CONFIG_HAS_IOPORT=y
758CONFIG_HAS_DMA=y 761CONFIG_HAS_DMA=y
762CONFIG_HAVE_LMB=y
759 763
760# 764#
761# Kernel hacking 765# Kernel hacking
@@ -763,6 +767,7 @@ CONFIG_HAS_DMA=y
763# CONFIG_PRINTK_TIME is not set 767# CONFIG_PRINTK_TIME is not set
764CONFIG_ENABLE_WARN_DEPRECATED=y 768CONFIG_ENABLE_WARN_DEPRECATED=y
765CONFIG_ENABLE_MUST_CHECK=y 769CONFIG_ENABLE_MUST_CHECK=y
770CONFIG_FRAME_WARN=1024
766# CONFIG_MAGIC_SYSRQ is not set 771# CONFIG_MAGIC_SYSRQ is not set
767# CONFIG_UNUSED_SYMBOLS is not set 772# CONFIG_UNUSED_SYMBOLS is not set
768# CONFIG_DEBUG_FS is not set 773# CONFIG_DEBUG_FS is not set
@@ -770,6 +775,7 @@ CONFIG_ENABLE_MUST_CHECK=y
770# CONFIG_DEBUG_KERNEL is not set 775# CONFIG_DEBUG_KERNEL is not set
771# CONFIG_DEBUG_BUGVERBOSE is not set 776# CONFIG_DEBUG_BUGVERBOSE is not set
772# CONFIG_SAMPLES is not set 777# CONFIG_SAMPLES is not set
778# CONFIG_IRQSTACKS is not set
773# CONFIG_PPC_EARLY_DEBUG is not set 779# CONFIG_PPC_EARLY_DEBUG is not set
774 780
775# 781#
@@ -779,50 +785,80 @@ CONFIG_ENABLE_MUST_CHECK=y
779# CONFIG_SECURITY is not set 785# CONFIG_SECURITY is not set
780# CONFIG_SECURITY_FILE_CAPABILITIES is not set 786# CONFIG_SECURITY_FILE_CAPABILITIES is not set
781CONFIG_CRYPTO=y 787CONFIG_CRYPTO=y
788
789#
790# Crypto core or helper
791#
782CONFIG_CRYPTO_ALGAPI=y 792CONFIG_CRYPTO_ALGAPI=y
783CONFIG_CRYPTO_BLKCIPHER=y 793CONFIG_CRYPTO_BLKCIPHER=y
784# CONFIG_CRYPTO_SEQIV is not set
785CONFIG_CRYPTO_MANAGER=y 794CONFIG_CRYPTO_MANAGER=y
795# CONFIG_CRYPTO_GF128MUL is not set
796# CONFIG_CRYPTO_NULL is not set
797# CONFIG_CRYPTO_CRYPTD is not set
798# CONFIG_CRYPTO_AUTHENC is not set
799# CONFIG_CRYPTO_TEST is not set
800
801#
802# Authenticated Encryption with Associated Data
803#
804# CONFIG_CRYPTO_CCM is not set
805# CONFIG_CRYPTO_GCM is not set
806# CONFIG_CRYPTO_SEQIV is not set
807
808#
809# Block modes
810#
811CONFIG_CRYPTO_CBC=y
812# CONFIG_CRYPTO_CTR is not set
813# CONFIG_CRYPTO_CTS is not set
814CONFIG_CRYPTO_ECB=m
815# CONFIG_CRYPTO_LRW is not set
816CONFIG_CRYPTO_PCBC=m
817# CONFIG_CRYPTO_XTS is not set
818
819#
820# Hash modes
821#
786# CONFIG_CRYPTO_HMAC is not set 822# CONFIG_CRYPTO_HMAC is not set
787# CONFIG_CRYPTO_XCBC is not set 823# CONFIG_CRYPTO_XCBC is not set
788# CONFIG_CRYPTO_NULL is not set 824
825#
826# Digest
827#
828# CONFIG_CRYPTO_CRC32C is not set
789# CONFIG_CRYPTO_MD4 is not set 829# CONFIG_CRYPTO_MD4 is not set
790CONFIG_CRYPTO_MD5=y 830CONFIG_CRYPTO_MD5=y
831# CONFIG_CRYPTO_MICHAEL_MIC is not set
791# CONFIG_CRYPTO_SHA1 is not set 832# CONFIG_CRYPTO_SHA1 is not set
792# CONFIG_CRYPTO_SHA256 is not set 833# CONFIG_CRYPTO_SHA256 is not set
793# CONFIG_CRYPTO_SHA512 is not set 834# CONFIG_CRYPTO_SHA512 is not set
794# CONFIG_CRYPTO_WP512 is not set
795# CONFIG_CRYPTO_TGR192 is not set 835# CONFIG_CRYPTO_TGR192 is not set
796# CONFIG_CRYPTO_GF128MUL is not set 836# CONFIG_CRYPTO_WP512 is not set
797CONFIG_CRYPTO_ECB=m 837
798CONFIG_CRYPTO_CBC=y 838#
799CONFIG_CRYPTO_PCBC=m 839# Ciphers
800# CONFIG_CRYPTO_LRW is not set 840#
801# CONFIG_CRYPTO_XTS is not set
802# CONFIG_CRYPTO_CTR is not set
803# CONFIG_CRYPTO_GCM is not set
804# CONFIG_CRYPTO_CCM is not set
805# CONFIG_CRYPTO_CRYPTD is not set
806CONFIG_CRYPTO_DES=y
807# CONFIG_CRYPTO_FCRYPT is not set
808# CONFIG_CRYPTO_BLOWFISH is not set
809# CONFIG_CRYPTO_TWOFISH is not set
810# CONFIG_CRYPTO_SERPENT is not set
811# CONFIG_CRYPTO_AES is not set 841# CONFIG_CRYPTO_AES is not set
842# CONFIG_CRYPTO_ANUBIS is not set
843# CONFIG_CRYPTO_ARC4 is not set
844# CONFIG_CRYPTO_BLOWFISH is not set
845# CONFIG_CRYPTO_CAMELLIA is not set
812# CONFIG_CRYPTO_CAST5 is not set 846# CONFIG_CRYPTO_CAST5 is not set
813# CONFIG_CRYPTO_CAST6 is not set 847# CONFIG_CRYPTO_CAST6 is not set
814# CONFIG_CRYPTO_TEA is not set 848CONFIG_CRYPTO_DES=y
815# CONFIG_CRYPTO_ARC4 is not set 849# CONFIG_CRYPTO_FCRYPT is not set
816# CONFIG_CRYPTO_KHAZAD is not set 850# CONFIG_CRYPTO_KHAZAD is not set
817# CONFIG_CRYPTO_ANUBIS is not set
818# CONFIG_CRYPTO_SEED is not set
819# CONFIG_CRYPTO_SALSA20 is not set 851# CONFIG_CRYPTO_SALSA20 is not set
852# CONFIG_CRYPTO_SEED is not set
853# CONFIG_CRYPTO_SERPENT is not set
854# CONFIG_CRYPTO_TEA is not set
855# CONFIG_CRYPTO_TWOFISH is not set
856
857#
858# Compression
859#
820# CONFIG_CRYPTO_DEFLATE is not set 860# CONFIG_CRYPTO_DEFLATE is not set
821# CONFIG_CRYPTO_MICHAEL_MIC is not set
822# CONFIG_CRYPTO_CRC32C is not set
823# CONFIG_CRYPTO_CAMELLIA is not set
824# CONFIG_CRYPTO_TEST is not set
825# CONFIG_CRYPTO_AUTHENC is not set
826# CONFIG_CRYPTO_LZO is not set 861# CONFIG_CRYPTO_LZO is not set
827# CONFIG_CRYPTO_HW is not set 862# CONFIG_CRYPTO_HW is not set
828# CONFIG_PPC_CLOCK is not set 863# CONFIG_PPC_CLOCK is not set
864# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/85xx/ksi8560_defconfig b/arch/powerpc/configs/85xx/ksi8560_defconfig
index 2d0debcefdbf..b82bb042308a 100644
--- a/arch/powerpc/configs/85xx/ksi8560_defconfig
+++ b/arch/powerpc/configs/85xx/ksi8560_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.24 3# Linux kernel version: 2.6.26-rc5
4# Mon Feb 11 16:25:19 2008 4# Mon Jun 9 08:52:30 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -32,6 +32,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 34CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_LOCKDEP_SUPPORT=y
35CONFIG_RWSEM_XCHGADD_ALGORITHM=y 37CONFIG_RWSEM_XCHGADD_ALGORITHM=y
36CONFIG_ARCH_HAS_ILOG2_U32=y 38CONFIG_ARCH_HAS_ILOG2_U32=y
37CONFIG_GENERIC_HWEIGHT=y 39CONFIG_GENERIC_HWEIGHT=y
@@ -68,23 +70,22 @@ CONFIG_SYSVIPC_SYSCTL=y
68# CONFIG_POSIX_MQUEUE is not set 70# CONFIG_POSIX_MQUEUE is not set
69# CONFIG_BSD_PROCESS_ACCT is not set 71# CONFIG_BSD_PROCESS_ACCT is not set
70# CONFIG_TASKSTATS is not set 72# CONFIG_TASKSTATS is not set
71# CONFIG_USER_NS is not set
72# CONFIG_PID_NS is not set
73# CONFIG_AUDIT is not set 73# CONFIG_AUDIT is not set
74# CONFIG_IKCONFIG is not set 74# CONFIG_IKCONFIG is not set
75CONFIG_LOG_BUF_SHIFT=14 75CONFIG_LOG_BUF_SHIFT=14
76# CONFIG_CGROUPS is not set 76# CONFIG_CGROUPS is not set
77CONFIG_FAIR_GROUP_SCHED=y 77# CONFIG_GROUP_SCHED is not set
78CONFIG_FAIR_USER_SCHED=y
79# CONFIG_FAIR_CGROUP_SCHED is not set
80CONFIG_SYSFS_DEPRECATED=y 78CONFIG_SYSFS_DEPRECATED=y
79CONFIG_SYSFS_DEPRECATED_V2=y
81# CONFIG_RELAY is not set 80# CONFIG_RELAY is not set
81# CONFIG_NAMESPACES is not set
82CONFIG_BLK_DEV_INITRD=y 82CONFIG_BLK_DEV_INITRD=y
83CONFIG_INITRAMFS_SOURCE="" 83CONFIG_INITRAMFS_SOURCE=""
84# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 84# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
85CONFIG_SYSCTL=y 85CONFIG_SYSCTL=y
86CONFIG_EMBEDDED=y 86CONFIG_EMBEDDED=y
87CONFIG_SYSCTL_SYSCALL=y 87CONFIG_SYSCTL_SYSCALL=y
88CONFIG_SYSCTL_SYSCALL_CHECK=y
88CONFIG_KALLSYMS=y 89CONFIG_KALLSYMS=y
89# CONFIG_KALLSYMS_ALL is not set 90# CONFIG_KALLSYMS_ALL is not set
90# CONFIG_KALLSYMS_EXTRA_PASS is not set 91# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -92,6 +93,7 @@ CONFIG_HOTPLUG=y
92CONFIG_PRINTK=y 93CONFIG_PRINTK=y
93CONFIG_BUG=y 94CONFIG_BUG=y
94CONFIG_ELF_CORE=y 95CONFIG_ELF_CORE=y
96CONFIG_COMPAT_BRK=y
95CONFIG_BASE_FULL=y 97CONFIG_BASE_FULL=y
96CONFIG_FUTEX=y 98CONFIG_FUTEX=y
97CONFIG_ANON_INODES=y 99CONFIG_ANON_INODES=y
@@ -109,6 +111,8 @@ CONFIG_SLUB=y
109# CONFIG_MARKERS is not set 111# CONFIG_MARKERS is not set
110CONFIG_HAVE_OPROFILE=y 112CONFIG_HAVE_OPROFILE=y
111CONFIG_HAVE_KPROBES=y 113CONFIG_HAVE_KPROBES=y
114CONFIG_HAVE_KRETPROBES=y
115# CONFIG_HAVE_DMA_ATTRS is not set
112CONFIG_PROC_PAGE_MONITOR=y 116CONFIG_PROC_PAGE_MONITOR=y
113CONFIG_SLABINFO=y 117CONFIG_SLABINFO=y
114CONFIG_RT_MUTEXES=y 118CONFIG_RT_MUTEXES=y
@@ -134,7 +138,6 @@ CONFIG_DEFAULT_AS=y
134# CONFIG_DEFAULT_NOOP is not set 138# CONFIG_DEFAULT_NOOP is not set
135CONFIG_DEFAULT_IOSCHED="anticipatory" 139CONFIG_DEFAULT_IOSCHED="anticipatory"
136CONFIG_CLASSIC_RCU=y 140CONFIG_CLASSIC_RCU=y
137# CONFIG_PREEMPT_RCU is not set
138 141
139# 142#
140# Platform support 143# Platform support
@@ -191,12 +194,13 @@ CONFIG_HZ=250
191CONFIG_PREEMPT_NONE=y 194CONFIG_PREEMPT_NONE=y
192# CONFIG_PREEMPT_VOLUNTARY is not set 195# CONFIG_PREEMPT_VOLUNTARY is not set
193# CONFIG_PREEMPT is not set 196# CONFIG_PREEMPT is not set
194CONFIG_RCU_TRACE=y
195CONFIG_BINFMT_ELF=y 197CONFIG_BINFMT_ELF=y
196CONFIG_BINFMT_MISC=y 198CONFIG_BINFMT_MISC=y
197CONFIG_MATH_EMULATION=y 199CONFIG_MATH_EMULATION=y
198# CONFIG_IOMMU_HELPER is not set 200# CONFIG_IOMMU_HELPER is not set
199CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 201CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
202CONFIG_ARCH_HAS_WALK_MEMORY=y
203CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
200CONFIG_ARCH_FLATMEM_ENABLE=y 204CONFIG_ARCH_FLATMEM_ENABLE=y
201CONFIG_ARCH_POPULATES_NODE_MAP=y 205CONFIG_ARCH_POPULATES_NODE_MAP=y
202CONFIG_SELECT_MEMORY_MODEL=y 206CONFIG_SELECT_MEMORY_MODEL=y
@@ -207,16 +211,17 @@ CONFIG_FLATMEM=y
207CONFIG_FLAT_NODE_MEM_MAP=y 211CONFIG_FLAT_NODE_MEM_MAP=y
208# CONFIG_SPARSEMEM_STATIC is not set 212# CONFIG_SPARSEMEM_STATIC is not set
209# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 213# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
214CONFIG_PAGEFLAGS_EXTENDED=y
210CONFIG_SPLIT_PTLOCK_CPUS=4 215CONFIG_SPLIT_PTLOCK_CPUS=4
211# CONFIG_RESOURCES_64BIT is not set 216# CONFIG_RESOURCES_64BIT is not set
212CONFIG_ZONE_DMA_FLAG=1 217CONFIG_ZONE_DMA_FLAG=1
213CONFIG_BOUNCE=y 218CONFIG_BOUNCE=y
214CONFIG_VIRT_TO_BUS=y 219CONFIG_VIRT_TO_BUS=y
220CONFIG_FORCE_MAX_ZONEORDER=11
215# CONFIG_PROC_DEVICETREE is not set 221# CONFIG_PROC_DEVICETREE is not set
216# CONFIG_CMDLINE_BOOL is not set 222# CONFIG_CMDLINE_BOOL is not set
217# CONFIG_PM is not set 223# CONFIG_PM is not set
218# CONFIG_SECCOMP is not set 224# CONFIG_SECCOMP is not set
219CONFIG_WANT_DEVICE_TREE=y
220CONFIG_ISA_DMA_API=y 225CONFIG_ISA_DMA_API=y
221 226
222# 227#
@@ -229,6 +234,7 @@ CONFIG_FSL_SOC=y
229# CONFIG_PCI_SYSCALL is not set 234# CONFIG_PCI_SYSCALL is not set
230# CONFIG_ARCH_SUPPORTS_MSI is not set 235# CONFIG_ARCH_SUPPORTS_MSI is not set
231# CONFIG_PCCARD is not set 236# CONFIG_PCCARD is not set
237# CONFIG_HAS_RAPIDIO is not set
232 238
233# 239#
234# Advanced setup 240# Advanced setup
@@ -238,11 +244,12 @@ CONFIG_FSL_SOC=y
238# 244#
239# Default settings for advanced configuration options are used 245# Default settings for advanced configuration options are used
240# 246#
241CONFIG_HIGHMEM_START=0xfe000000
242CONFIG_LOWMEM_SIZE=0x30000000 247CONFIG_LOWMEM_SIZE=0x30000000
248CONFIG_PAGE_OFFSET=0xc0000000
243CONFIG_KERNEL_START=0xc0000000 249CONFIG_KERNEL_START=0xc0000000
250CONFIG_PHYSICAL_START=0x00000000
251CONFIG_PHYSICAL_ALIGN=0x10000000
244CONFIG_TASK_SIZE=0xc0000000 252CONFIG_TASK_SIZE=0xc0000000
245CONFIG_BOOT_LOAD=0x00800000
246 253
247# 254#
248# Networking 255# Networking
@@ -290,8 +297,6 @@ CONFIG_TCP_CONG_CUBIC=y
290CONFIG_DEFAULT_TCP_CONG="cubic" 297CONFIG_DEFAULT_TCP_CONG="cubic"
291# CONFIG_TCP_MD5SIG is not set 298# CONFIG_TCP_MD5SIG is not set
292# CONFIG_IPV6 is not set 299# CONFIG_IPV6 is not set
293# CONFIG_INET6_XFRM_TUNNEL is not set
294# CONFIG_INET6_TUNNEL is not set
295# CONFIG_NETWORK_SECMARK is not set 300# CONFIG_NETWORK_SECMARK is not set
296# CONFIG_NETFILTER is not set 301# CONFIG_NETFILTER is not set
297# CONFIG_IP_DCCP is not set 302# CONFIG_IP_DCCP is not set
@@ -351,6 +356,8 @@ CONFIG_MTD_CONCAT=y
351CONFIG_MTD_PARTITIONS=y 356CONFIG_MTD_PARTITIONS=y
352# CONFIG_MTD_REDBOOT_PARTS is not set 357# CONFIG_MTD_REDBOOT_PARTS is not set
353# CONFIG_MTD_CMDLINE_PARTS is not set 358# CONFIG_MTD_CMDLINE_PARTS is not set
359# CONFIG_MTD_OF_PARTS is not set
360# CONFIG_MTD_AR7_PARTS is not set
354 361
355# 362#
356# User Modules And Translation Layers 363# User Modules And Translation Layers
@@ -430,17 +437,19 @@ CONFIG_BLK_DEV_LOOP=y
430CONFIG_BLK_DEV_RAM=y 437CONFIG_BLK_DEV_RAM=y
431CONFIG_BLK_DEV_RAM_COUNT=16 438CONFIG_BLK_DEV_RAM_COUNT=16
432CONFIG_BLK_DEV_RAM_SIZE=32768 439CONFIG_BLK_DEV_RAM_SIZE=32768
433CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 440# CONFIG_BLK_DEV_XIP is not set
434# CONFIG_CDROM_PKTCDVD is not set 441# CONFIG_CDROM_PKTCDVD is not set
435# CONFIG_ATA_OVER_ETH is not set 442# CONFIG_ATA_OVER_ETH is not set
436CONFIG_MISC_DEVICES=y 443CONFIG_MISC_DEVICES=y
437# CONFIG_EEPROM_93CX6 is not set 444# CONFIG_EEPROM_93CX6 is not set
445# CONFIG_ENCLOSURE_SERVICES is not set
446CONFIG_HAVE_IDE=y
438CONFIG_IDE=y 447CONFIG_IDE=y
439CONFIG_IDE_MAX_HWIFS=4 448CONFIG_IDE_MAX_HWIFS=4
440CONFIG_BLK_DEV_IDE=y 449CONFIG_BLK_DEV_IDE=y
441 450
442# 451#
443# Please see Documentation/ide.txt for help/info on IDE drives 452# Please see Documentation/ide/ide.txt for help/info on IDE drives
444# 453#
445# CONFIG_BLK_DEV_IDE_SATA is not set 454# CONFIG_BLK_DEV_IDE_SATA is not set
446# CONFIG_BLK_DEV_IDEDISK is not set 455# CONFIG_BLK_DEV_IDEDISK is not set
@@ -457,7 +466,7 @@ CONFIG_IDE_PROC_FS=y
457CONFIG_IDE_GENERIC=y 466CONFIG_IDE_GENERIC=y
458# CONFIG_BLK_DEV_PLATFORM is not set 467# CONFIG_BLK_DEV_PLATFORM is not set
459# CONFIG_BLK_DEV_IDEDMA is not set 468# CONFIG_BLK_DEV_IDEDMA is not set
460CONFIG_IDE_ARCH_OBSOLETE_INIT=y 469# CONFIG_BLK_DEV_HD_ONLY is not set
461# CONFIG_BLK_DEV_HD is not set 470# CONFIG_BLK_DEV_HD is not set
462 471
463# 472#
@@ -517,6 +526,7 @@ CONFIG_NETDEV_10000=y
517# 526#
518# CONFIG_WLAN_PRE80211 is not set 527# CONFIG_WLAN_PRE80211 is not set
519# CONFIG_WLAN_80211 is not set 528# CONFIG_WLAN_80211 is not set
529# CONFIG_IWLWIFI_LEDS is not set
520# CONFIG_WAN is not set 530# CONFIG_WAN is not set
521# CONFIG_PPP is not set 531# CONFIG_PPP is not set
522# CONFIG_SLIP is not set 532# CONFIG_SLIP is not set
@@ -561,6 +571,7 @@ CONFIG_INPUT=y
561# Character devices 571# Character devices
562# 572#
563# CONFIG_VT is not set 573# CONFIG_VT is not set
574CONFIG_DEVKMEM=y
564# CONFIG_SERIAL_NONSTANDARD is not set 575# CONFIG_SERIAL_NONSTANDARD is not set
565 576
566# 577#
@@ -594,12 +605,7 @@ CONFIG_GEN_RTC=y
594# CONFIG_RAW_DRIVER is not set 605# CONFIG_RAW_DRIVER is not set
595# CONFIG_TCG_TPM is not set 606# CONFIG_TCG_TPM is not set
596# CONFIG_I2C is not set 607# CONFIG_I2C is not set
597
598#
599# SPI support
600#
601# CONFIG_SPI is not set 608# CONFIG_SPI is not set
602# CONFIG_SPI_MASTER is not set
603# CONFIG_W1 is not set 609# CONFIG_W1 is not set
604# CONFIG_POWER_SUPPLY is not set 610# CONFIG_POWER_SUPPLY is not set
605CONFIG_HWMON=y 611CONFIG_HWMON=y
@@ -615,6 +621,7 @@ CONFIG_HWMON=y
615# CONFIG_SENSORS_W83627HF is not set 621# CONFIG_SENSORS_W83627HF is not set
616# CONFIG_SENSORS_W83627EHF is not set 622# CONFIG_SENSORS_W83627EHF is not set
617# CONFIG_HWMON_DEBUG_CHIP is not set 623# CONFIG_HWMON_DEBUG_CHIP is not set
624# CONFIG_THERMAL is not set
618# CONFIG_WATCHDOG is not set 625# CONFIG_WATCHDOG is not set
619 626
620# 627#
@@ -627,12 +634,22 @@ CONFIG_SSB_POSSIBLE=y
627# Multifunction device drivers 634# Multifunction device drivers
628# 635#
629# CONFIG_MFD_SM501 is not set 636# CONFIG_MFD_SM501 is not set
637# CONFIG_HTC_PASIC3 is not set
630 638
631# 639#
632# Multimedia devices 640# Multimedia devices
633# 641#
642
643#
644# Multimedia core support
645#
634# CONFIG_VIDEO_DEV is not set 646# CONFIG_VIDEO_DEV is not set
635# CONFIG_DVB_CORE is not set 647# CONFIG_DVB_CORE is not set
648# CONFIG_VIDEO_MEDIA is not set
649
650#
651# Multimedia drivers
652#
636CONFIG_DAB=y 653CONFIG_DAB=y
637 654
638# 655#
@@ -660,19 +677,20 @@ CONFIG_USB_SUPPORT=y
660# CONFIG_USB_ARCH_HAS_HCD is not set 677# CONFIG_USB_ARCH_HAS_HCD is not set
661# CONFIG_USB_ARCH_HAS_OHCI is not set 678# CONFIG_USB_ARCH_HAS_OHCI is not set
662# CONFIG_USB_ARCH_HAS_EHCI is not set 679# CONFIG_USB_ARCH_HAS_EHCI is not set
680# CONFIG_USB_OTG_WHITELIST is not set
681# CONFIG_USB_OTG_BLACKLIST_HUB is not set
663 682
664# 683#
665# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 684# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
666# 685#
667# CONFIG_USB_GADGET is not set 686# CONFIG_USB_GADGET is not set
668# CONFIG_MMC is not set 687# CONFIG_MMC is not set
688# CONFIG_MEMSTICK is not set
669# CONFIG_NEW_LEDS is not set 689# CONFIG_NEW_LEDS is not set
690# CONFIG_ACCESSIBILITY is not set
670# CONFIG_EDAC is not set 691# CONFIG_EDAC is not set
671# CONFIG_RTC_CLASS is not set 692# CONFIG_RTC_CLASS is not set
672 693# CONFIG_DMADEVICES is not set
673#
674# Userspace I/O
675#
676# CONFIG_UIO is not set 694# CONFIG_UIO is not set
677 695
678# 696#
@@ -693,14 +711,11 @@ CONFIG_FS_MBCACHE=y
693# CONFIG_JFS_FS is not set 711# CONFIG_JFS_FS is not set
694# CONFIG_FS_POSIX_ACL is not set 712# CONFIG_FS_POSIX_ACL is not set
695# CONFIG_XFS_FS is not set 713# CONFIG_XFS_FS is not set
696# CONFIG_GFS2_FS is not set
697# CONFIG_OCFS2_FS is not set 714# CONFIG_OCFS2_FS is not set
698# CONFIG_MINIX_FS is not set 715CONFIG_DNOTIFY=y
699# CONFIG_ROMFS_FS is not set
700CONFIG_INOTIFY=y 716CONFIG_INOTIFY=y
701CONFIG_INOTIFY_USER=y 717CONFIG_INOTIFY_USER=y
702# CONFIG_QUOTA is not set 718# CONFIG_QUOTA is not set
703CONFIG_DNOTIFY=y
704# CONFIG_AUTOFS_FS is not set 719# CONFIG_AUTOFS_FS is not set
705# CONFIG_AUTOFS4_FS is not set 720# CONFIG_AUTOFS4_FS is not set
706# CONFIG_FUSE_FS is not set 721# CONFIG_FUSE_FS is not set
@@ -743,15 +758,16 @@ CONFIG_TMPFS=y
743# CONFIG_JFFS2_FS is not set 758# CONFIG_JFFS2_FS is not set
744# CONFIG_CRAMFS is not set 759# CONFIG_CRAMFS is not set
745# CONFIG_VXFS_FS is not set 760# CONFIG_VXFS_FS is not set
761# CONFIG_MINIX_FS is not set
746# CONFIG_HPFS_FS is not set 762# CONFIG_HPFS_FS is not set
747# CONFIG_QNX4FS_FS is not set 763# CONFIG_QNX4FS_FS is not set
764# CONFIG_ROMFS_FS is not set
748# CONFIG_SYSV_FS is not set 765# CONFIG_SYSV_FS is not set
749# CONFIG_UFS_FS is not set 766# CONFIG_UFS_FS is not set
750CONFIG_NETWORK_FILESYSTEMS=y 767CONFIG_NETWORK_FILESYSTEMS=y
751CONFIG_NFS_FS=y 768CONFIG_NFS_FS=y
752# CONFIG_NFS_V3 is not set 769# CONFIG_NFS_V3 is not set
753# CONFIG_NFS_V4 is not set 770# CONFIG_NFS_V4 is not set
754# CONFIG_NFS_DIRECTIO is not set
755# CONFIG_NFSD is not set 771# CONFIG_NFSD is not set
756CONFIG_ROOT_NFS=y 772CONFIG_ROOT_NFS=y
757CONFIG_LOCKD=y 773CONFIG_LOCKD=y
@@ -790,6 +806,7 @@ CONFIG_PARTITION_ADVANCED=y
790# Library routines 806# Library routines
791# 807#
792CONFIG_BITREVERSE=y 808CONFIG_BITREVERSE=y
809# CONFIG_GENERIC_FIND_FIRST_BIT is not set
793# CONFIG_CRC_CCITT is not set 810# CONFIG_CRC_CCITT is not set
794# CONFIG_CRC16 is not set 811# CONFIG_CRC16 is not set
795# CONFIG_CRC_ITU_T is not set 812# CONFIG_CRC_ITU_T is not set
@@ -800,6 +817,7 @@ CONFIG_PLIST=y
800CONFIG_HAS_IOMEM=y 817CONFIG_HAS_IOMEM=y
801CONFIG_HAS_IOPORT=y 818CONFIG_HAS_IOPORT=y
802CONFIG_HAS_DMA=y 819CONFIG_HAS_DMA=y
820CONFIG_HAVE_LMB=y
803 821
804# 822#
805# Kernel hacking 823# Kernel hacking
@@ -807,6 +825,7 @@ CONFIG_HAS_DMA=y
807# CONFIG_PRINTK_TIME is not set 825# CONFIG_PRINTK_TIME is not set
808CONFIG_ENABLE_WARN_DEPRECATED=y 826CONFIG_ENABLE_WARN_DEPRECATED=y
809CONFIG_ENABLE_MUST_CHECK=y 827CONFIG_ENABLE_MUST_CHECK=y
828CONFIG_FRAME_WARN=1024
810# CONFIG_MAGIC_SYSRQ is not set 829# CONFIG_MAGIC_SYSRQ is not set
811# CONFIG_UNUSED_SYMBOLS is not set 830# CONFIG_UNUSED_SYMBOLS is not set
812CONFIG_DEBUG_FS=y 831CONFIG_DEBUG_FS=y
@@ -817,7 +836,9 @@ CONFIG_DETECT_SOFTLOCKUP=y
817CONFIG_SCHED_DEBUG=y 836CONFIG_SCHED_DEBUG=y
818# CONFIG_SCHEDSTATS is not set 837# CONFIG_SCHEDSTATS is not set
819# CONFIG_TIMER_STATS is not set 838# CONFIG_TIMER_STATS is not set
839# CONFIG_DEBUG_OBJECTS is not set
820# CONFIG_SLUB_DEBUG_ON is not set 840# CONFIG_SLUB_DEBUG_ON is not set
841# CONFIG_SLUB_STATS is not set
821# CONFIG_DEBUG_RT_MUTEXES is not set 842# CONFIG_DEBUG_RT_MUTEXES is not set
822# CONFIG_RT_MUTEX_TESTER is not set 843# CONFIG_RT_MUTEX_TESTER is not set
823# CONFIG_DEBUG_SPINLOCK is not set 844# CONFIG_DEBUG_SPINLOCK is not set
@@ -829,9 +850,9 @@ CONFIG_DEBUG_MUTEXES=y
829# CONFIG_DEBUG_BUGVERBOSE is not set 850# CONFIG_DEBUG_BUGVERBOSE is not set
830# CONFIG_DEBUG_INFO is not set 851# CONFIG_DEBUG_INFO is not set
831# CONFIG_DEBUG_VM is not set 852# CONFIG_DEBUG_VM is not set
853# CONFIG_DEBUG_WRITECOUNT is not set
832# CONFIG_DEBUG_LIST is not set 854# CONFIG_DEBUG_LIST is not set
833# CONFIG_DEBUG_SG is not set 855# CONFIG_DEBUG_SG is not set
834CONFIG_FORCED_INLINING=y
835# CONFIG_BOOT_PRINTK_DELAY is not set 856# CONFIG_BOOT_PRINTK_DELAY is not set
836# CONFIG_BACKTRACE_SELF_TEST is not set 857# CONFIG_BACKTRACE_SELF_TEST is not set
837# CONFIG_FAULT_INJECTION is not set 858# CONFIG_FAULT_INJECTION is not set
@@ -841,6 +862,7 @@ CONFIG_FORCED_INLINING=y
841# CONFIG_DEBUG_PAGEALLOC is not set 862# CONFIG_DEBUG_PAGEALLOC is not set
842# CONFIG_DEBUGGER is not set 863# CONFIG_DEBUGGER is not set
843# CONFIG_KGDB_CONSOLE is not set 864# CONFIG_KGDB_CONSOLE is not set
865# CONFIG_IRQSTACKS is not set
844# CONFIG_VIRQ_DEBUG is not set 866# CONFIG_VIRQ_DEBUG is not set
845# CONFIG_BDI_SWITCH is not set 867# CONFIG_BDI_SWITCH is not set
846# CONFIG_PPC_EARLY_DEBUG is not set 868# CONFIG_PPC_EARLY_DEBUG is not set
@@ -852,48 +874,78 @@ CONFIG_FORCED_INLINING=y
852# CONFIG_SECURITY is not set 874# CONFIG_SECURITY is not set
853# CONFIG_SECURITY_FILE_CAPABILITIES is not set 875# CONFIG_SECURITY_FILE_CAPABILITIES is not set
854CONFIG_CRYPTO=y 876CONFIG_CRYPTO=y
855# CONFIG_CRYPTO_SEQIV is not set 877
878#
879# Crypto core or helper
880#
856# CONFIG_CRYPTO_MANAGER is not set 881# CONFIG_CRYPTO_MANAGER is not set
882# CONFIG_CRYPTO_GF128MUL is not set
883# CONFIG_CRYPTO_NULL is not set
884# CONFIG_CRYPTO_CRYPTD is not set
885# CONFIG_CRYPTO_AUTHENC is not set
886
887#
888# Authenticated Encryption with Associated Data
889#
890# CONFIG_CRYPTO_CCM is not set
891# CONFIG_CRYPTO_GCM is not set
892# CONFIG_CRYPTO_SEQIV is not set
893
894#
895# Block modes
896#
897# CONFIG_CRYPTO_CBC is not set
898# CONFIG_CRYPTO_CTR is not set
899# CONFIG_CRYPTO_CTS is not set
900# CONFIG_CRYPTO_ECB is not set
901# CONFIG_CRYPTO_LRW is not set
902# CONFIG_CRYPTO_PCBC is not set
903# CONFIG_CRYPTO_XTS is not set
904
905#
906# Hash modes
907#
857# CONFIG_CRYPTO_HMAC is not set 908# CONFIG_CRYPTO_HMAC is not set
858# CONFIG_CRYPTO_XCBC is not set 909# CONFIG_CRYPTO_XCBC is not set
859# CONFIG_CRYPTO_NULL is not set 910
911#
912# Digest
913#
914# CONFIG_CRYPTO_CRC32C is not set
860# CONFIG_CRYPTO_MD4 is not set 915# CONFIG_CRYPTO_MD4 is not set
861# CONFIG_CRYPTO_MD5 is not set 916# CONFIG_CRYPTO_MD5 is not set
917# CONFIG_CRYPTO_MICHAEL_MIC is not set
862# CONFIG_CRYPTO_SHA1 is not set 918# CONFIG_CRYPTO_SHA1 is not set
863# CONFIG_CRYPTO_SHA256 is not set 919# CONFIG_CRYPTO_SHA256 is not set
864# CONFIG_CRYPTO_SHA512 is not set 920# CONFIG_CRYPTO_SHA512 is not set
865# CONFIG_CRYPTO_WP512 is not set
866# CONFIG_CRYPTO_TGR192 is not set 921# CONFIG_CRYPTO_TGR192 is not set
867# CONFIG_CRYPTO_GF128MUL is not set 922# CONFIG_CRYPTO_WP512 is not set
868# CONFIG_CRYPTO_ECB is not set 923
869# CONFIG_CRYPTO_CBC is not set 924#
870# CONFIG_CRYPTO_PCBC is not set 925# Ciphers
871# CONFIG_CRYPTO_LRW is not set 926#
872# CONFIG_CRYPTO_XTS is not set
873# CONFIG_CRYPTO_CTR is not set
874# CONFIG_CRYPTO_GCM is not set
875# CONFIG_CRYPTO_CCM is not set
876# CONFIG_CRYPTO_CRYPTD is not set
877# CONFIG_CRYPTO_DES is not set
878# CONFIG_CRYPTO_FCRYPT is not set
879# CONFIG_CRYPTO_BLOWFISH is not set
880# CONFIG_CRYPTO_TWOFISH is not set
881# CONFIG_CRYPTO_SERPENT is not set
882# CONFIG_CRYPTO_AES is not set 927# CONFIG_CRYPTO_AES is not set
928# CONFIG_CRYPTO_ANUBIS is not set
929# CONFIG_CRYPTO_ARC4 is not set
930# CONFIG_CRYPTO_BLOWFISH is not set
931# CONFIG_CRYPTO_CAMELLIA is not set
883# CONFIG_CRYPTO_CAST5 is not set 932# CONFIG_CRYPTO_CAST5 is not set
884# CONFIG_CRYPTO_CAST6 is not set 933# CONFIG_CRYPTO_CAST6 is not set
885# CONFIG_CRYPTO_TEA is not set 934# CONFIG_CRYPTO_DES is not set
886# CONFIG_CRYPTO_ARC4 is not set 935# CONFIG_CRYPTO_FCRYPT is not set
887# CONFIG_CRYPTO_KHAZAD is not set 936# CONFIG_CRYPTO_KHAZAD is not set
888# CONFIG_CRYPTO_ANUBIS is not set
889# CONFIG_CRYPTO_SEED is not set
890# CONFIG_CRYPTO_SALSA20 is not set 937# CONFIG_CRYPTO_SALSA20 is not set
938# CONFIG_CRYPTO_SEED is not set
939# CONFIG_CRYPTO_SERPENT is not set
940# CONFIG_CRYPTO_TEA is not set
941# CONFIG_CRYPTO_TWOFISH is not set
942
943#
944# Compression
945#
891# CONFIG_CRYPTO_DEFLATE is not set 946# CONFIG_CRYPTO_DEFLATE is not set
892# CONFIG_CRYPTO_MICHAEL_MIC is not set
893# CONFIG_CRYPTO_CRC32C is not set
894# CONFIG_CRYPTO_CAMELLIA is not set
895# CONFIG_CRYPTO_AUTHENC is not set
896# CONFIG_CRYPTO_LZO is not set 947# CONFIG_CRYPTO_LZO is not set
897CONFIG_CRYPTO_HW=y 948CONFIG_CRYPTO_HW=y
898# CONFIG_PPC_CLOCK is not set 949# CONFIG_PPC_CLOCK is not set
899CONFIG_PPC_LIB_RHEAP=y 950CONFIG_PPC_LIB_RHEAP=y
951# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/85xx/mpc8540_ads_defconfig b/arch/powerpc/configs/85xx/mpc8540_ads_defconfig
index b998539da86e..f33fd516fd54 100644
--- a/arch/powerpc/configs/85xx/mpc8540_ads_defconfig
+++ b/arch/powerpc/configs/85xx/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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 24 08:48:25 2008 4# Mon Jun 9 08:52:31 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -32,6 +32,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 34CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_LOCKDEP_SUPPORT=y
35CONFIG_RWSEM_XCHGADD_ALGORITHM=y 37CONFIG_RWSEM_XCHGADD_ALGORITHM=y
36CONFIG_ARCH_HAS_ILOG2_U32=y 38CONFIG_ARCH_HAS_ILOG2_U32=y
37CONFIG_GENERIC_HWEIGHT=y 39CONFIG_GENERIC_HWEIGHT=y
@@ -87,6 +89,7 @@ CONFIG_INITRAMFS_SOURCE=""
87CONFIG_SYSCTL=y 89CONFIG_SYSCTL=y
88CONFIG_EMBEDDED=y 90CONFIG_EMBEDDED=y
89CONFIG_SYSCTL_SYSCALL=y 91CONFIG_SYSCTL_SYSCALL=y
92CONFIG_SYSCTL_SYSCALL_CHECK=y
90CONFIG_KALLSYMS=y 93CONFIG_KALLSYMS=y
91# CONFIG_KALLSYMS_ALL is not set 94# CONFIG_KALLSYMS_ALL is not set
92# CONFIG_KALLSYMS_EXTRA_PASS is not set 95# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -113,6 +116,7 @@ CONFIG_SLUB=y
113CONFIG_HAVE_OPROFILE=y 116CONFIG_HAVE_OPROFILE=y
114CONFIG_HAVE_KPROBES=y 117CONFIG_HAVE_KPROBES=y
115CONFIG_HAVE_KRETPROBES=y 118CONFIG_HAVE_KRETPROBES=y
119# CONFIG_HAVE_DMA_ATTRS is not set
116CONFIG_PROC_PAGE_MONITOR=y 120CONFIG_PROC_PAGE_MONITOR=y
117CONFIG_SLABINFO=y 121CONFIG_SLABINFO=y
118CONFIG_RT_MUTEXES=y 122CONFIG_RT_MUTEXES=y
@@ -153,6 +157,7 @@ CONFIG_MPC8540_ADS=y
153# CONFIG_MPC85xx_CDS is not set 157# CONFIG_MPC85xx_CDS is not set
154# CONFIG_MPC85xx_MDS is not set 158# CONFIG_MPC85xx_MDS is not set
155# CONFIG_MPC85xx_DS is not set 159# CONFIG_MPC85xx_DS is not set
160# CONFIG_KSI8560 is not set
156# CONFIG_STX_GP3 is not set 161# CONFIG_STX_GP3 is not set
157# CONFIG_TQM8540 is not set 162# CONFIG_TQM8540 is not set
158# CONFIG_TQM8541 is not set 163# CONFIG_TQM8541 is not set
@@ -208,11 +213,13 @@ CONFIG_FLATMEM=y
208CONFIG_FLAT_NODE_MEM_MAP=y 213CONFIG_FLAT_NODE_MEM_MAP=y
209# CONFIG_SPARSEMEM_STATIC is not set 214# CONFIG_SPARSEMEM_STATIC is not set
210# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 215# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
216CONFIG_PAGEFLAGS_EXTENDED=y
211CONFIG_SPLIT_PTLOCK_CPUS=4 217CONFIG_SPLIT_PTLOCK_CPUS=4
212# CONFIG_RESOURCES_64BIT is not set 218# CONFIG_RESOURCES_64BIT is not set
213CONFIG_ZONE_DMA_FLAG=1 219CONFIG_ZONE_DMA_FLAG=1
214CONFIG_BOUNCE=y 220CONFIG_BOUNCE=y
215CONFIG_VIRT_TO_BUS=y 221CONFIG_VIRT_TO_BUS=y
222CONFIG_FORCE_MAX_ZONEORDER=11
216CONFIG_PROC_DEVICETREE=y 223CONFIG_PROC_DEVICETREE=y
217# CONFIG_CMDLINE_BOOL is not set 224# CONFIG_CMDLINE_BOOL is not set
218# CONFIG_PM is not set 225# CONFIG_PM is not set
@@ -229,6 +236,7 @@ CONFIG_FSL_SOC=y
229# CONFIG_PCI_SYSCALL is not set 236# CONFIG_PCI_SYSCALL is not set
230# CONFIG_ARCH_SUPPORTS_MSI is not set 237# CONFIG_ARCH_SUPPORTS_MSI is not set
231# CONFIG_PCCARD is not set 238# CONFIG_PCCARD is not set
239# CONFIG_HAS_RAPIDIO is not set
232 240
233# 241#
234# Advanced setup 242# Advanced setup
@@ -238,11 +246,12 @@ CONFIG_FSL_SOC=y
238# 246#
239# Default settings for advanced configuration options are used 247# Default settings for advanced configuration options are used
240# 248#
241CONFIG_HIGHMEM_START=0xfe000000
242CONFIG_LOWMEM_SIZE=0x30000000 249CONFIG_LOWMEM_SIZE=0x30000000
250CONFIG_PAGE_OFFSET=0xc0000000
243CONFIG_KERNEL_START=0xc0000000 251CONFIG_KERNEL_START=0xc0000000
252CONFIG_PHYSICAL_START=0x00000000
253CONFIG_PHYSICAL_ALIGN=0x10000000
244CONFIG_TASK_SIZE=0xc0000000 254CONFIG_TASK_SIZE=0xc0000000
245CONFIG_BOOT_LOAD=0x00800000
246 255
247# 256#
248# Networking 257# Networking
@@ -290,8 +299,6 @@ CONFIG_TCP_CONG_CUBIC=y
290CONFIG_DEFAULT_TCP_CONG="cubic" 299CONFIG_DEFAULT_TCP_CONG="cubic"
291# CONFIG_TCP_MD5SIG is not set 300# CONFIG_TCP_MD5SIG is not set
292# CONFIG_IPV6 is not set 301# CONFIG_IPV6 is not set
293# CONFIG_INET6_XFRM_TUNNEL is not set
294# CONFIG_INET6_TUNNEL is not set
295# CONFIG_NETWORK_SECMARK is not set 302# CONFIG_NETWORK_SECMARK is not set
296# CONFIG_NETFILTER is not set 303# CONFIG_NETFILTER is not set
297# CONFIG_IP_DCCP is not set 304# CONFIG_IP_DCCP is not set
@@ -419,6 +426,7 @@ CONFIG_NETDEV_10000=y
419# 426#
420# CONFIG_WLAN_PRE80211 is not set 427# CONFIG_WLAN_PRE80211 is not set
421# CONFIG_WLAN_80211 is not set 428# CONFIG_WLAN_80211 is not set
429# CONFIG_IWLWIFI_LEDS is not set
422# CONFIG_WAN is not set 430# CONFIG_WAN is not set
423# CONFIG_PPP is not set 431# CONFIG_PPP is not set
424# CONFIG_SLIP is not set 432# CONFIG_SLIP is not set
@@ -463,6 +471,7 @@ CONFIG_INPUT=y
463# Character devices 471# Character devices
464# 472#
465# CONFIG_VT is not set 473# CONFIG_VT is not set
474CONFIG_DEVKMEM=y
466# CONFIG_SERIAL_NONSTANDARD is not set 475# CONFIG_SERIAL_NONSTANDARD is not set
467 476
468# 477#
@@ -494,12 +503,7 @@ CONFIG_GEN_RTC=y
494# CONFIG_RAW_DRIVER is not set 503# CONFIG_RAW_DRIVER is not set
495# CONFIG_TCG_TPM is not set 504# CONFIG_TCG_TPM is not set
496# CONFIG_I2C is not set 505# CONFIG_I2C is not set
497
498#
499# SPI support
500#
501# CONFIG_SPI is not set 506# CONFIG_SPI is not set
502# CONFIG_SPI_MASTER is not set
503# CONFIG_W1 is not set 507# CONFIG_W1 is not set
504# CONFIG_POWER_SUPPLY is not set 508# CONFIG_POWER_SUPPLY is not set
505CONFIG_HWMON=y 509CONFIG_HWMON=y
@@ -528,12 +532,22 @@ CONFIG_SSB_POSSIBLE=y
528# Multifunction device drivers 532# Multifunction device drivers
529# 533#
530# CONFIG_MFD_SM501 is not set 534# CONFIG_MFD_SM501 is not set
535# CONFIG_HTC_PASIC3 is not set
531 536
532# 537#
533# Multimedia devices 538# Multimedia devices
534# 539#
540
541#
542# Multimedia core support
543#
535# CONFIG_VIDEO_DEV is not set 544# CONFIG_VIDEO_DEV is not set
536# CONFIG_DVB_CORE is not set 545# CONFIG_DVB_CORE is not set
546# CONFIG_VIDEO_MEDIA is not set
547
548#
549# Multimedia drivers
550#
537CONFIG_DAB=y 551CONFIG_DAB=y
538 552
539# 553#
@@ -561,6 +575,8 @@ CONFIG_USB_SUPPORT=y
561# CONFIG_USB_ARCH_HAS_HCD is not set 575# CONFIG_USB_ARCH_HAS_HCD is not set
562# CONFIG_USB_ARCH_HAS_OHCI is not set 576# CONFIG_USB_ARCH_HAS_OHCI is not set
563# CONFIG_USB_ARCH_HAS_EHCI is not set 577# CONFIG_USB_ARCH_HAS_EHCI is not set
578# CONFIG_USB_OTG_WHITELIST is not set
579# CONFIG_USB_OTG_BLACKLIST_HUB is not set
564 580
565# 581#
566# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 582# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -569,13 +585,10 @@ CONFIG_USB_SUPPORT=y
569# CONFIG_MMC is not set 585# CONFIG_MMC is not set
570# CONFIG_MEMSTICK is not set 586# CONFIG_MEMSTICK is not set
571# CONFIG_NEW_LEDS is not set 587# CONFIG_NEW_LEDS is not set
588# CONFIG_ACCESSIBILITY is not set
572# CONFIG_EDAC is not set 589# CONFIG_EDAC is not set
573# CONFIG_RTC_CLASS is not set 590# CONFIG_RTC_CLASS is not set
574# CONFIG_DMADEVICES is not set 591# CONFIG_DMADEVICES is not set
575
576#
577# Userspace I/O
578#
579# CONFIG_UIO is not set 592# CONFIG_UIO is not set
580 593
581# 594#
@@ -595,7 +608,6 @@ CONFIG_FS_MBCACHE=y
595# CONFIG_JFS_FS is not set 608# CONFIG_JFS_FS is not set
596# CONFIG_FS_POSIX_ACL is not set 609# CONFIG_FS_POSIX_ACL is not set
597# CONFIG_XFS_FS is not set 610# CONFIG_XFS_FS is not set
598# CONFIG_GFS2_FS is not set
599# CONFIG_OCFS2_FS is not set 611# CONFIG_OCFS2_FS is not set
600CONFIG_DNOTIFY=y 612CONFIG_DNOTIFY=y
601CONFIG_INOTIFY=y 613CONFIG_INOTIFY=y
@@ -652,7 +664,6 @@ CONFIG_NETWORK_FILESYSTEMS=y
652CONFIG_NFS_FS=y 664CONFIG_NFS_FS=y
653# CONFIG_NFS_V3 is not set 665# CONFIG_NFS_V3 is not set
654# CONFIG_NFS_V4 is not set 666# CONFIG_NFS_V4 is not set
655# CONFIG_NFS_DIRECTIO is not set
656# CONFIG_NFSD is not set 667# CONFIG_NFSD is not set
657CONFIG_ROOT_NFS=y 668CONFIG_ROOT_NFS=y
658CONFIG_LOCKD=y 669CONFIG_LOCKD=y
@@ -691,6 +702,7 @@ CONFIG_PARTITION_ADVANCED=y
691# Library routines 702# Library routines
692# 703#
693CONFIG_BITREVERSE=y 704CONFIG_BITREVERSE=y
705# CONFIG_GENERIC_FIND_FIRST_BIT is not set
694# CONFIG_CRC_CCITT is not set 706# CONFIG_CRC_CCITT is not set
695# CONFIG_CRC16 is not set 707# CONFIG_CRC16 is not set
696# CONFIG_CRC_ITU_T is not set 708# CONFIG_CRC_ITU_T is not set
@@ -701,6 +713,7 @@ CONFIG_PLIST=y
701CONFIG_HAS_IOMEM=y 713CONFIG_HAS_IOMEM=y
702CONFIG_HAS_IOPORT=y 714CONFIG_HAS_IOPORT=y
703CONFIG_HAS_DMA=y 715CONFIG_HAS_DMA=y
716CONFIG_HAVE_LMB=y
704 717
705# 718#
706# Kernel hacking 719# Kernel hacking
@@ -708,6 +721,7 @@ CONFIG_HAS_DMA=y
708# CONFIG_PRINTK_TIME is not set 721# CONFIG_PRINTK_TIME is not set
709CONFIG_ENABLE_WARN_DEPRECATED=y 722CONFIG_ENABLE_WARN_DEPRECATED=y
710CONFIG_ENABLE_MUST_CHECK=y 723CONFIG_ENABLE_MUST_CHECK=y
724CONFIG_FRAME_WARN=1024
711# CONFIG_MAGIC_SYSRQ is not set 725# CONFIG_MAGIC_SYSRQ is not set
712# CONFIG_UNUSED_SYMBOLS is not set 726# CONFIG_UNUSED_SYMBOLS is not set
713# CONFIG_DEBUG_FS is not set 727# CONFIG_DEBUG_FS is not set
@@ -718,6 +732,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
718CONFIG_SCHED_DEBUG=y 732CONFIG_SCHED_DEBUG=y
719# CONFIG_SCHEDSTATS is not set 733# CONFIG_SCHEDSTATS is not set
720# CONFIG_TIMER_STATS is not set 734# CONFIG_TIMER_STATS is not set
735# CONFIG_DEBUG_OBJECTS is not set
721# CONFIG_SLUB_DEBUG_ON is not set 736# CONFIG_SLUB_DEBUG_ON is not set
722# CONFIG_SLUB_STATS is not set 737# CONFIG_SLUB_STATS is not set
723# CONFIG_DEBUG_RT_MUTEXES is not set 738# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -730,6 +745,7 @@ CONFIG_DEBUG_MUTEXES=y
730# CONFIG_DEBUG_BUGVERBOSE is not set 745# CONFIG_DEBUG_BUGVERBOSE is not set
731# CONFIG_DEBUG_INFO is not set 746# CONFIG_DEBUG_INFO is not set
732# CONFIG_DEBUG_VM is not set 747# CONFIG_DEBUG_VM is not set
748# CONFIG_DEBUG_WRITECOUNT is not set
733# CONFIG_DEBUG_LIST is not set 749# CONFIG_DEBUG_LIST is not set
734# CONFIG_DEBUG_SG is not set 750# CONFIG_DEBUG_SG is not set
735# CONFIG_BOOT_PRINTK_DELAY is not set 751# CONFIG_BOOT_PRINTK_DELAY is not set
@@ -740,6 +756,7 @@ CONFIG_DEBUG_MUTEXES=y
740# CONFIG_DEBUG_STACK_USAGE is not set 756# CONFIG_DEBUG_STACK_USAGE is not set
741# CONFIG_DEBUG_PAGEALLOC is not set 757# CONFIG_DEBUG_PAGEALLOC is not set
742# CONFIG_DEBUGGER is not set 758# CONFIG_DEBUGGER is not set
759# CONFIG_IRQSTACKS is not set
743# CONFIG_BDI_SWITCH is not set 760# CONFIG_BDI_SWITCH is not set
744# CONFIG_PPC_EARLY_DEBUG is not set 761# CONFIG_PPC_EARLY_DEBUG is not set
745 762
@@ -750,47 +767,77 @@ CONFIG_DEBUG_MUTEXES=y
750# CONFIG_SECURITY is not set 767# CONFIG_SECURITY is not set
751# CONFIG_SECURITY_FILE_CAPABILITIES is not set 768# CONFIG_SECURITY_FILE_CAPABILITIES is not set
752CONFIG_CRYPTO=y 769CONFIG_CRYPTO=y
753# CONFIG_CRYPTO_SEQIV is not set 770
771#
772# Crypto core or helper
773#
754# CONFIG_CRYPTO_MANAGER is not set 774# CONFIG_CRYPTO_MANAGER is not set
775# CONFIG_CRYPTO_GF128MUL is not set
776# CONFIG_CRYPTO_NULL is not set
777# CONFIG_CRYPTO_CRYPTD is not set
778# CONFIG_CRYPTO_AUTHENC is not set
779
780#
781# Authenticated Encryption with Associated Data
782#
783# CONFIG_CRYPTO_CCM is not set
784# CONFIG_CRYPTO_GCM is not set
785# CONFIG_CRYPTO_SEQIV is not set
786
787#
788# Block modes
789#
790# CONFIG_CRYPTO_CBC is not set
791# CONFIG_CRYPTO_CTR is not set
792# CONFIG_CRYPTO_CTS is not set
793# CONFIG_CRYPTO_ECB is not set
794# CONFIG_CRYPTO_LRW is not set
795# CONFIG_CRYPTO_PCBC is not set
796# CONFIG_CRYPTO_XTS is not set
797
798#
799# Hash modes
800#
755# CONFIG_CRYPTO_HMAC is not set 801# CONFIG_CRYPTO_HMAC is not set
756# CONFIG_CRYPTO_XCBC is not set 802# CONFIG_CRYPTO_XCBC is not set
757# CONFIG_CRYPTO_NULL is not set 803
804#
805# Digest
806#
807# CONFIG_CRYPTO_CRC32C is not set
758# CONFIG_CRYPTO_MD4 is not set 808# CONFIG_CRYPTO_MD4 is not set
759# CONFIG_CRYPTO_MD5 is not set 809# CONFIG_CRYPTO_MD5 is not set
810# CONFIG_CRYPTO_MICHAEL_MIC is not set
760# CONFIG_CRYPTO_SHA1 is not set 811# CONFIG_CRYPTO_SHA1 is not set
761# CONFIG_CRYPTO_SHA256 is not set 812# CONFIG_CRYPTO_SHA256 is not set
762# CONFIG_CRYPTO_SHA512 is not set 813# CONFIG_CRYPTO_SHA512 is not set
763# CONFIG_CRYPTO_WP512 is not set
764# CONFIG_CRYPTO_TGR192 is not set 814# CONFIG_CRYPTO_TGR192 is not set
765# CONFIG_CRYPTO_GF128MUL is not set 815# CONFIG_CRYPTO_WP512 is not set
766# CONFIG_CRYPTO_ECB is not set 816
767# CONFIG_CRYPTO_CBC is not set 817#
768# CONFIG_CRYPTO_PCBC is not set 818# Ciphers
769# CONFIG_CRYPTO_LRW is not set 819#
770# CONFIG_CRYPTO_XTS is not set
771# CONFIG_CRYPTO_CTR is not set
772# CONFIG_CRYPTO_GCM is not set
773# CONFIG_CRYPTO_CCM is not set
774# CONFIG_CRYPTO_CRYPTD is not set
775# CONFIG_CRYPTO_DES is not set
776# CONFIG_CRYPTO_FCRYPT is not set
777# CONFIG_CRYPTO_BLOWFISH is not set
778# CONFIG_CRYPTO_TWOFISH is not set
779# CONFIG_CRYPTO_SERPENT is not set
780# CONFIG_CRYPTO_AES is not set 820# CONFIG_CRYPTO_AES is not set
821# CONFIG_CRYPTO_ANUBIS is not set
822# CONFIG_CRYPTO_ARC4 is not set
823# CONFIG_CRYPTO_BLOWFISH is not set
824# CONFIG_CRYPTO_CAMELLIA is not set
781# CONFIG_CRYPTO_CAST5 is not set 825# CONFIG_CRYPTO_CAST5 is not set
782# CONFIG_CRYPTO_CAST6 is not set 826# CONFIG_CRYPTO_CAST6 is not set
783# CONFIG_CRYPTO_TEA is not set 827# CONFIG_CRYPTO_DES is not set
784# CONFIG_CRYPTO_ARC4 is not set 828# CONFIG_CRYPTO_FCRYPT is not set
785# CONFIG_CRYPTO_KHAZAD is not set 829# CONFIG_CRYPTO_KHAZAD is not set
786# CONFIG_CRYPTO_ANUBIS is not set
787# CONFIG_CRYPTO_SEED is not set
788# CONFIG_CRYPTO_SALSA20 is not set 830# CONFIG_CRYPTO_SALSA20 is not set
831# CONFIG_CRYPTO_SEED is not set
832# CONFIG_CRYPTO_SERPENT is not set
833# CONFIG_CRYPTO_TEA is not set
834# CONFIG_CRYPTO_TWOFISH is not set
835
836#
837# Compression
838#
789# CONFIG_CRYPTO_DEFLATE is not set 839# CONFIG_CRYPTO_DEFLATE is not set
790# CONFIG_CRYPTO_MICHAEL_MIC is not set
791# CONFIG_CRYPTO_CRC32C is not set
792# CONFIG_CRYPTO_CAMELLIA is not set
793# CONFIG_CRYPTO_AUTHENC is not set
794# CONFIG_CRYPTO_LZO is not set 840# CONFIG_CRYPTO_LZO is not set
795CONFIG_CRYPTO_HW=y 841CONFIG_CRYPTO_HW=y
796# CONFIG_PPC_CLOCK is not set 842# CONFIG_PPC_CLOCK is not set
843# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/85xx/mpc8544_ds_defconfig b/arch/powerpc/configs/85xx/mpc8544_ds_defconfig
index a9f113b243ae..042a85ea7b72 100644
--- a/arch/powerpc/configs/85xx/mpc8544_ds_defconfig
+++ b/arch/powerpc/configs/85xx/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.25-rc7 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 31 11:37:03 2008 4# Mon Jun 9 08:52:32 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -32,6 +32,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 34CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_LOCKDEP_SUPPORT=y
35CONFIG_RWSEM_XCHGADD_ALGORITHM=y 37CONFIG_RWSEM_XCHGADD_ALGORITHM=y
36CONFIG_ARCH_HAS_ILOG2_U32=y 38CONFIG_ARCH_HAS_ILOG2_U32=y
37CONFIG_GENERIC_HWEIGHT=y 39CONFIG_GENERIC_HWEIGHT=y
@@ -90,6 +92,7 @@ CONFIG_INITRAMFS_SOURCE=""
90CONFIG_SYSCTL=y 92CONFIG_SYSCTL=y
91CONFIG_EMBEDDED=y 93CONFIG_EMBEDDED=y
92CONFIG_SYSCTL_SYSCALL=y 94CONFIG_SYSCTL_SYSCALL=y
95CONFIG_SYSCTL_SYSCALL_CHECK=y
93CONFIG_KALLSYMS=y 96CONFIG_KALLSYMS=y
94CONFIG_KALLSYMS_ALL=y 97CONFIG_KALLSYMS_ALL=y
95CONFIG_KALLSYMS_EXTRA_PASS=y 98CONFIG_KALLSYMS_EXTRA_PASS=y
@@ -117,12 +120,14 @@ CONFIG_HAVE_OPROFILE=y
117# CONFIG_KPROBES is not set 120# CONFIG_KPROBES is not set
118CONFIG_HAVE_KPROBES=y 121CONFIG_HAVE_KPROBES=y
119CONFIG_HAVE_KRETPROBES=y 122CONFIG_HAVE_KRETPROBES=y
123# CONFIG_HAVE_DMA_ATTRS is not set
120CONFIG_PROC_PAGE_MONITOR=y 124CONFIG_PROC_PAGE_MONITOR=y
121CONFIG_SLABINFO=y 125CONFIG_SLABINFO=y
122CONFIG_RT_MUTEXES=y 126CONFIG_RT_MUTEXES=y
123# CONFIG_TINY_SHMEM is not set 127# CONFIG_TINY_SHMEM is not set
124CONFIG_BASE_SMALL=0 128CONFIG_BASE_SMALL=0
125CONFIG_MODULES=y 129CONFIG_MODULES=y
130# CONFIG_MODULE_FORCE_LOAD is not set
126CONFIG_MODULE_UNLOAD=y 131CONFIG_MODULE_UNLOAD=y
127CONFIG_MODULE_FORCE_UNLOAD=y 132CONFIG_MODULE_FORCE_UNLOAD=y
128CONFIG_MODVERSIONS=y 133CONFIG_MODVERSIONS=y
@@ -203,7 +208,6 @@ CONFIG_PREEMPT_NONE=y
203# CONFIG_PREEMPT is not set 208# CONFIG_PREEMPT is not set
204CONFIG_BINFMT_ELF=y 209CONFIG_BINFMT_ELF=y
205CONFIG_BINFMT_MISC=m 210CONFIG_BINFMT_MISC=m
206CONFIG_FORCE_MAX_ZONEORDER=11
207CONFIG_MATH_EMULATION=y 211CONFIG_MATH_EMULATION=y
208# CONFIG_IOMMU_HELPER is not set 212# CONFIG_IOMMU_HELPER is not set
209CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 213CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
@@ -219,11 +223,13 @@ CONFIG_FLATMEM=y
219CONFIG_FLAT_NODE_MEM_MAP=y 223CONFIG_FLAT_NODE_MEM_MAP=y
220# CONFIG_SPARSEMEM_STATIC is not set 224# CONFIG_SPARSEMEM_STATIC is not set
221# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 225# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
226CONFIG_PAGEFLAGS_EXTENDED=y
222CONFIG_SPLIT_PTLOCK_CPUS=4 227CONFIG_SPLIT_PTLOCK_CPUS=4
223# CONFIG_RESOURCES_64BIT is not set 228# CONFIG_RESOURCES_64BIT is not set
224CONFIG_ZONE_DMA_FLAG=1 229CONFIG_ZONE_DMA_FLAG=1
225CONFIG_BOUNCE=y 230CONFIG_BOUNCE=y
226CONFIG_VIRT_TO_BUS=y 231CONFIG_VIRT_TO_BUS=y
232CONFIG_FORCE_MAX_ZONEORDER=11
227CONFIG_PROC_DEVICETREE=y 233CONFIG_PROC_DEVICETREE=y
228# CONFIG_CMDLINE_BOOL is not set 234# CONFIG_CMDLINE_BOOL is not set
229# CONFIG_PM is not set 235# CONFIG_PM is not set
@@ -248,6 +254,7 @@ CONFIG_PCI_LEGACY=y
248# CONFIG_PCI_DEBUG is not set 254# CONFIG_PCI_DEBUG is not set
249# CONFIG_PCCARD is not set 255# CONFIG_PCCARD is not set
250# CONFIG_HOTPLUG_PCI is not set 256# CONFIG_HOTPLUG_PCI is not set
257# CONFIG_HAS_RAPIDIO is not set
251 258
252# 259#
253# Advanced setup 260# Advanced setup
@@ -257,11 +264,12 @@ CONFIG_PCI_LEGACY=y
257# 264#
258# Default settings for advanced configuration options are used 265# Default settings for advanced configuration options are used
259# 266#
260CONFIG_HIGHMEM_START=0xfe000000
261CONFIG_LOWMEM_SIZE=0x30000000 267CONFIG_LOWMEM_SIZE=0x30000000
268CONFIG_PAGE_OFFSET=0xc0000000
262CONFIG_KERNEL_START=0xc0000000 269CONFIG_KERNEL_START=0xc0000000
270CONFIG_PHYSICAL_START=0x00000000
271CONFIG_PHYSICAL_ALIGN=0x10000000
263CONFIG_TASK_SIZE=0xc0000000 272CONFIG_TASK_SIZE=0xc0000000
264CONFIG_BOOT_LOAD=0x00800000
265 273
266# 274#
267# Networking 275# Networking
@@ -332,8 +340,10 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=y
332CONFIG_INET6_XFRM_MODE_BEET=y 340CONFIG_INET6_XFRM_MODE_BEET=y
333# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set 341# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
334CONFIG_IPV6_SIT=y 342CONFIG_IPV6_SIT=y
343CONFIG_IPV6_NDISC_NODETYPE=y
335# CONFIG_IPV6_TUNNEL is not set 344# CONFIG_IPV6_TUNNEL is not set
336# CONFIG_IPV6_MULTIPLE_TABLES is not set 345# CONFIG_IPV6_MULTIPLE_TABLES is not set
346# CONFIG_IPV6_MROUTE is not set
337# CONFIG_NETWORK_SECMARK is not set 347# CONFIG_NETWORK_SECMARK is not set
338# CONFIG_NETFILTER is not set 348# CONFIG_NETFILTER is not set
339# CONFIG_IP_DCCP is not set 349# CONFIG_IP_DCCP is not set
@@ -395,6 +405,7 @@ CONFIG_FW_LOADER=y
395# CONFIG_CONNECTOR is not set 405# CONFIG_CONNECTOR is not set
396# CONFIG_MTD is not set 406# CONFIG_MTD is not set
397CONFIG_OF_DEVICE=y 407CONFIG_OF_DEVICE=y
408CONFIG_OF_I2C=y
398# CONFIG_PARPORT is not set 409# CONFIG_PARPORT is not set
399CONFIG_BLK_DEV=y 410CONFIG_BLK_DEV=y
400# CONFIG_BLK_DEV_FD is not set 411# CONFIG_BLK_DEV_FD is not set
@@ -501,7 +512,11 @@ CONFIG_SCSI_LOWLEVEL=y
501# CONFIG_SCSI_SRP is not set 512# CONFIG_SCSI_SRP is not set
502CONFIG_ATA=y 513CONFIG_ATA=y
503# CONFIG_ATA_NONSTANDARD is not set 514# CONFIG_ATA_NONSTANDARD is not set
515CONFIG_SATA_PMP=y
504CONFIG_SATA_AHCI=y 516CONFIG_SATA_AHCI=y
517# CONFIG_SATA_SIL24 is not set
518# CONFIG_SATA_FSL is not set
519CONFIG_ATA_SFF=y
505# CONFIG_SATA_SVW is not set 520# CONFIG_SATA_SVW is not set
506# CONFIG_ATA_PIIX is not set 521# CONFIG_ATA_PIIX is not set
507# CONFIG_SATA_MV is not set 522# CONFIG_SATA_MV is not set
@@ -511,13 +526,11 @@ CONFIG_SATA_AHCI=y
511# CONFIG_SATA_PROMISE is not set 526# CONFIG_SATA_PROMISE is not set
512# CONFIG_SATA_SX4 is not set 527# CONFIG_SATA_SX4 is not set
513# CONFIG_SATA_SIL is not set 528# CONFIG_SATA_SIL is not set
514# CONFIG_SATA_SIL24 is not set
515# CONFIG_SATA_SIS is not set 529# CONFIG_SATA_SIS is not set
516# CONFIG_SATA_ULI is not set 530# CONFIG_SATA_ULI is not set
517# CONFIG_SATA_VIA is not set 531# CONFIG_SATA_VIA is not set
518# CONFIG_SATA_VITESSE is not set 532# CONFIG_SATA_VITESSE is not set
519# CONFIG_SATA_INIC162X is not set 533# CONFIG_SATA_INIC162X is not set
520# CONFIG_SATA_FSL is not set
521CONFIG_PATA_ALI=y 534CONFIG_PATA_ALI=y
522# CONFIG_PATA_AMD is not set 535# CONFIG_PATA_AMD is not set
523# CONFIG_PATA_ARTOP is not set 536# CONFIG_PATA_ARTOP is not set
@@ -557,6 +570,7 @@ CONFIG_PATA_ALI=y
557# CONFIG_PATA_VIA is not set 570# CONFIG_PATA_VIA is not set
558# CONFIG_PATA_WINBOND is not set 571# CONFIG_PATA_WINBOND is not set
559# CONFIG_PATA_PLATFORM is not set 572# CONFIG_PATA_PLATFORM is not set
573# CONFIG_PATA_SCH is not set
560# CONFIG_MD is not set 574# CONFIG_MD is not set
561# CONFIG_FUSION is not set 575# CONFIG_FUSION is not set
562 576
@@ -622,7 +636,6 @@ CONFIG_NETDEV_1000=y
622# CONFIG_SIS190 is not set 636# CONFIG_SIS190 is not set
623# CONFIG_SKGE is not set 637# CONFIG_SKGE is not set
624# CONFIG_SKY2 is not set 638# CONFIG_SKY2 is not set
625# CONFIG_SK98LIN is not set
626# CONFIG_VIA_VELOCITY is not set 639# CONFIG_VIA_VELOCITY is not set
627# CONFIG_TIGON3 is not set 640# CONFIG_TIGON3 is not set
628# CONFIG_BNX2 is not set 641# CONFIG_BNX2 is not set
@@ -642,6 +655,7 @@ CONFIG_NETDEV_10000=y
642# CONFIG_MLX4_CORE is not set 655# CONFIG_MLX4_CORE is not set
643# CONFIG_TEHUTI is not set 656# CONFIG_TEHUTI is not set
644# CONFIG_BNX2X is not set 657# CONFIG_BNX2X is not set
658# CONFIG_SFC is not set
645# CONFIG_TR is not set 659# CONFIG_TR is not set
646 660
647# 661#
@@ -649,6 +663,7 @@ CONFIG_NETDEV_10000=y
649# 663#
650# CONFIG_WLAN_PRE80211 is not set 664# CONFIG_WLAN_PRE80211 is not set
651# CONFIG_WLAN_80211 is not set 665# CONFIG_WLAN_80211 is not set
666# CONFIG_IWLWIFI_LEDS is not set
652 667
653# 668#
654# USB Network Adapters 669# USB Network Adapters
@@ -713,6 +728,7 @@ CONFIG_VT=y
713CONFIG_VT_CONSOLE=y 728CONFIG_VT_CONSOLE=y
714CONFIG_HW_CONSOLE=y 729CONFIG_HW_CONSOLE=y
715# CONFIG_VT_HW_CONSOLE_BINDING is not set 730# CONFIG_VT_HW_CONSOLE_BINDING is not set
731CONFIG_DEVKMEM=y
716# CONFIG_SERIAL_NONSTANDARD is not set 732# CONFIG_SERIAL_NONSTANDARD is not set
717# CONFIG_NOZOMI is not set 733# CONFIG_NOZOMI is not set
718 734
@@ -744,7 +760,6 @@ CONFIG_LEGACY_PTY_COUNT=256
744# CONFIG_IPMI_HANDLER is not set 760# CONFIG_IPMI_HANDLER is not set
745# CONFIG_HW_RANDOM is not set 761# CONFIG_HW_RANDOM is not set
746CONFIG_NVRAM=y 762CONFIG_NVRAM=y
747# CONFIG_GEN_RTC is not set
748# CONFIG_R3964 is not set 763# CONFIG_R3964 is not set
749# CONFIG_APPLICOM is not set 764# CONFIG_APPLICOM is not set
750# CONFIG_RAW_DRIVER is not set 765# CONFIG_RAW_DRIVER is not set
@@ -755,13 +770,6 @@ CONFIG_I2C_BOARDINFO=y
755# CONFIG_I2C_CHARDEV is not set 770# CONFIG_I2C_CHARDEV is not set
756 771
757# 772#
758# I2C Algorithms
759#
760# CONFIG_I2C_ALGOBIT is not set
761# CONFIG_I2C_ALGOPCF is not set
762# CONFIG_I2C_ALGOPCA is not set
763
764#
765# I2C Hardware Bus support 773# I2C Hardware Bus support
766# 774#
767# CONFIG_I2C_ALI1535 is not set 775# CONFIG_I2C_ALI1535 is not set
@@ -788,6 +796,7 @@ CONFIG_I2C_MPC=y
788# CONFIG_I2C_VIA is not set 796# CONFIG_I2C_VIA is not set
789# CONFIG_I2C_VIAPRO is not set 797# CONFIG_I2C_VIAPRO is not set
790# CONFIG_I2C_VOODOO3 is not set 798# CONFIG_I2C_VOODOO3 is not set
799# CONFIG_I2C_PCA_PLATFORM is not set
791 800
792# 801#
793# Miscellaneous I2C Chip support 802# Miscellaneous I2C Chip support
@@ -797,19 +806,13 @@ CONFIG_SENSORS_EEPROM=y
797# CONFIG_SENSORS_PCF8574 is not set 806# CONFIG_SENSORS_PCF8574 is not set
798# CONFIG_PCF8575 is not set 807# CONFIG_PCF8575 is not set
799# CONFIG_SENSORS_PCF8591 is not set 808# CONFIG_SENSORS_PCF8591 is not set
800# CONFIG_TPS65010 is not set
801# CONFIG_SENSORS_MAX6875 is not set 809# CONFIG_SENSORS_MAX6875 is not set
802# CONFIG_SENSORS_TSL2550 is not set 810# CONFIG_SENSORS_TSL2550 is not set
803# CONFIG_I2C_DEBUG_CORE is not set 811# CONFIG_I2C_DEBUG_CORE is not set
804# CONFIG_I2C_DEBUG_ALGO is not set 812# CONFIG_I2C_DEBUG_ALGO is not set
805# CONFIG_I2C_DEBUG_BUS is not set 813# CONFIG_I2C_DEBUG_BUS is not set
806# CONFIG_I2C_DEBUG_CHIP is not set 814# CONFIG_I2C_DEBUG_CHIP is not set
807
808#
809# SPI support
810#
811# CONFIG_SPI is not set 815# CONFIG_SPI is not set
812# CONFIG_SPI_MASTER is not set
813# CONFIG_W1 is not set 816# CONFIG_W1 is not set
814# CONFIG_POWER_SUPPLY is not set 817# CONFIG_POWER_SUPPLY is not set
815# CONFIG_HWMON is not set 818# CONFIG_HWMON is not set
@@ -826,13 +829,33 @@ CONFIG_SSB_POSSIBLE=y
826# Multifunction device drivers 829# Multifunction device drivers
827# 830#
828# CONFIG_MFD_SM501 is not set 831# CONFIG_MFD_SM501 is not set
832# CONFIG_HTC_PASIC3 is not set
829 833
830# 834#
831# Multimedia devices 835# Multimedia devices
832# 836#
837
838#
839# Multimedia core support
840#
833# CONFIG_VIDEO_DEV is not set 841# CONFIG_VIDEO_DEV is not set
834CONFIG_DVB_CORE=m 842CONFIG_DVB_CORE=m
835# CONFIG_DVB_CORE_ATTACH is not set 843CONFIG_VIDEO_MEDIA=m
844
845#
846# Multimedia drivers
847#
848# CONFIG_MEDIA_ATTACH is not set
849CONFIG_MEDIA_TUNER=m
850# CONFIG_MEDIA_TUNER_CUSTOMIZE is not set
851CONFIG_MEDIA_TUNER_SIMPLE=m
852CONFIG_MEDIA_TUNER_TDA8290=m
853CONFIG_MEDIA_TUNER_TDA9887=m
854CONFIG_MEDIA_TUNER_TEA5761=m
855CONFIG_MEDIA_TUNER_TEA5767=m
856CONFIG_MEDIA_TUNER_MT20XX=m
857CONFIG_MEDIA_TUNER_XC2028=m
858CONFIG_MEDIA_TUNER_XC5000=m
836CONFIG_DVB_CAPTURE_DRIVERS=y 859CONFIG_DVB_CAPTURE_DRIVERS=y
837 860
838# 861#
@@ -875,14 +898,17 @@ CONFIG_DVB_CAPTURE_DRIVERS=y
875# 898#
876# DVB-S (satellite) frontends 899# DVB-S (satellite) frontends
877# 900#
878# CONFIG_DVB_STV0299 is not set
879# CONFIG_DVB_CX24110 is not set 901# CONFIG_DVB_CX24110 is not set
880# CONFIG_DVB_CX24123 is not set 902# CONFIG_DVB_CX24123 is not set
881# CONFIG_DVB_TDA8083 is not set
882# CONFIG_DVB_MT312 is not set 903# CONFIG_DVB_MT312 is not set
883# CONFIG_DVB_VES1X93 is not set
884# CONFIG_DVB_S5H1420 is not set 904# CONFIG_DVB_S5H1420 is not set
905# CONFIG_DVB_STV0299 is not set
906# CONFIG_DVB_TDA8083 is not set
885# CONFIG_DVB_TDA10086 is not set 907# CONFIG_DVB_TDA10086 is not set
908# CONFIG_DVB_VES1X93 is not set
909# CONFIG_DVB_TUNER_ITD1000 is not set
910# CONFIG_DVB_TDA826X is not set
911# CONFIG_DVB_TUA6100 is not set
886 912
887# 913#
888# DVB-T (terrestrial) frontends 914# DVB-T (terrestrial) frontends
@@ -900,6 +926,7 @@ CONFIG_DVB_CAPTURE_DRIVERS=y
900# CONFIG_DVB_DIB3000MC is not set 926# CONFIG_DVB_DIB3000MC is not set
901# CONFIG_DVB_DIB7000M is not set 927# CONFIG_DVB_DIB7000M is not set
902# CONFIG_DVB_DIB7000P is not set 928# CONFIG_DVB_DIB7000P is not set
929# CONFIG_DVB_TDA10048 is not set
903 930
904# 931#
905# DVB-C (cable) frontends 932# DVB-C (cable) frontends
@@ -918,27 +945,21 @@ CONFIG_DVB_CAPTURE_DRIVERS=y
918# CONFIG_DVB_BCM3510 is not set 945# CONFIG_DVB_BCM3510 is not set
919# CONFIG_DVB_LGDT330X is not set 946# CONFIG_DVB_LGDT330X is not set
920# CONFIG_DVB_S5H1409 is not set 947# CONFIG_DVB_S5H1409 is not set
948# CONFIG_DVB_AU8522 is not set
949# CONFIG_DVB_S5H1411 is not set
921 950
922# 951#
923# Tuners/PLL support 952# Digital terrestrial only tuners/PLL
924# 953#
925# CONFIG_DVB_PLL is not set 954# CONFIG_DVB_PLL is not set
926# CONFIG_DVB_TDA826X is not set
927# CONFIG_DVB_TDA827X is not set
928# CONFIG_DVB_TDA18271 is not set
929# CONFIG_DVB_TUNER_QT1010 is not set
930# CONFIG_DVB_TUNER_MT2060 is not set
931# CONFIG_DVB_TUNER_MT2266 is not set
932# CONFIG_DVB_TUNER_MT2131 is not set
933# CONFIG_DVB_TUNER_DIB0070 is not set 955# CONFIG_DVB_TUNER_DIB0070 is not set
934# CONFIG_DVB_TUNER_XC5000 is not set
935 956
936# 957#
937# Miscellaneous devices 958# SEC control devices for DVB-S
938# 959#
939# CONFIG_DVB_LNBP21 is not set 960# CONFIG_DVB_LNBP21 is not set
961# CONFIG_DVB_ISL6405 is not set
940# CONFIG_DVB_ISL6421 is not set 962# CONFIG_DVB_ISL6421 is not set
941# CONFIG_DVB_TUA6100 is not set
942CONFIG_DAB=y 963CONFIG_DAB=y
943# CONFIG_USB_DABUSB is not set 964# CONFIG_USB_DABUSB is not set
944 965
@@ -1005,6 +1026,7 @@ CONFIG_SND_AC97_CODEC=y
1005# CONFIG_SND_AU8810 is not set 1026# CONFIG_SND_AU8810 is not set
1006# CONFIG_SND_AU8820 is not set 1027# CONFIG_SND_AU8820 is not set
1007# CONFIG_SND_AU8830 is not set 1028# CONFIG_SND_AU8830 is not set
1029# CONFIG_SND_AW2 is not set
1008# CONFIG_SND_AZT3328 is not set 1030# CONFIG_SND_AZT3328 is not set
1009# CONFIG_SND_BT87X is not set 1031# CONFIG_SND_BT87X is not set
1010# CONFIG_SND_CA0106 is not set 1032# CONFIG_SND_CA0106 is not set
@@ -1079,11 +1101,11 @@ CONFIG_SND_INTEL8X0=y
1079# CONFIG_SND_SOC is not set 1101# CONFIG_SND_SOC is not set
1080 1102
1081# 1103#
1082# SoC Audio support for SuperH 1104# ALSA SoC audio for Freescale SOCs
1083# 1105#
1084 1106
1085# 1107#
1086# ALSA SoC audio for Freescale SOCs 1108# SoC Audio for the Texas Instruments OMAP
1087# 1109#
1088 1110
1089# 1111#
@@ -1118,16 +1140,20 @@ CONFIG_USB_DEVICEFS=y
1118CONFIG_USB_DEVICE_CLASS=y 1140CONFIG_USB_DEVICE_CLASS=y
1119# CONFIG_USB_DYNAMIC_MINORS is not set 1141# CONFIG_USB_DYNAMIC_MINORS is not set
1120# CONFIG_USB_OTG is not set 1142# CONFIG_USB_OTG is not set
1143# CONFIG_USB_OTG_WHITELIST is not set
1144# CONFIG_USB_OTG_BLACKLIST_HUB is not set
1121 1145
1122# 1146#
1123# USB Host Controller Drivers 1147# USB Host Controller Drivers
1124# 1148#
1149# CONFIG_USB_C67X00_HCD is not set
1125CONFIG_USB_EHCI_HCD=y 1150CONFIG_USB_EHCI_HCD=y
1126# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1151# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1127# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1152# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1128# CONFIG_USB_EHCI_FSL is not set 1153# CONFIG_USB_EHCI_FSL is not set
1129CONFIG_USB_EHCI_HCD_PPC_OF=y 1154CONFIG_USB_EHCI_HCD_PPC_OF=y
1130# CONFIG_USB_ISP116X_HCD is not set 1155# CONFIG_USB_ISP116X_HCD is not set
1156# CONFIG_USB_ISP1760_HCD is not set
1131CONFIG_USB_OHCI_HCD=y 1157CONFIG_USB_OHCI_HCD=y
1132CONFIG_USB_OHCI_HCD_PPC_OF=y 1158CONFIG_USB_OHCI_HCD_PPC_OF=y
1133CONFIG_USB_OHCI_HCD_PPC_OF_BE=y 1159CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
@@ -1145,6 +1171,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1145# 1171#
1146# CONFIG_USB_ACM is not set 1172# CONFIG_USB_ACM is not set
1147# CONFIG_USB_PRINTER is not set 1173# CONFIG_USB_PRINTER is not set
1174# CONFIG_USB_WDM is not set
1148 1175
1149# 1176#
1150# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 1177# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -1164,7 +1191,9 @@ CONFIG_USB_STORAGE=y
1164# CONFIG_USB_STORAGE_SDDR55 is not set 1191# CONFIG_USB_STORAGE_SDDR55 is not set
1165# CONFIG_USB_STORAGE_JUMPSHOT is not set 1192# CONFIG_USB_STORAGE_JUMPSHOT is not set
1166# CONFIG_USB_STORAGE_ALAUDA is not set 1193# CONFIG_USB_STORAGE_ALAUDA is not set
1194# CONFIG_USB_STORAGE_ONETOUCH is not set
1167# CONFIG_USB_STORAGE_KARMA is not set 1195# CONFIG_USB_STORAGE_KARMA is not set
1196# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1168# CONFIG_USB_LIBUSUAL is not set 1197# CONFIG_USB_LIBUSUAL is not set
1169 1198
1170# 1199#
@@ -1202,10 +1231,12 @@ CONFIG_USB_MON=y
1202# CONFIG_USB_TRANCEVIBRATOR is not set 1231# CONFIG_USB_TRANCEVIBRATOR is not set
1203# CONFIG_USB_IOWARRIOR is not set 1232# CONFIG_USB_IOWARRIOR is not set
1204# CONFIG_USB_TEST is not set 1233# CONFIG_USB_TEST is not set
1234# CONFIG_USB_ISIGHTFW is not set
1205# CONFIG_USB_GADGET is not set 1235# CONFIG_USB_GADGET is not set
1206# CONFIG_MMC is not set 1236# CONFIG_MMC is not set
1207# CONFIG_MEMSTICK is not set 1237# CONFIG_MEMSTICK is not set
1208# CONFIG_NEW_LEDS is not set 1238# CONFIG_NEW_LEDS is not set
1239# CONFIG_ACCESSIBILITY is not set
1209# CONFIG_INFINIBAND is not set 1240# CONFIG_INFINIBAND is not set
1210# CONFIG_EDAC is not set 1241# CONFIG_EDAC is not set
1211CONFIG_RTC_LIB=y 1242CONFIG_RTC_LIB=y
@@ -1257,23 +1288,19 @@ CONFIG_RTC_DRV_CMOS=y
1257# 1288#
1258# on-CPU RTC drivers 1289# on-CPU RTC drivers
1259# 1290#
1291# CONFIG_RTC_DRV_PPC is not set
1260CONFIG_DMADEVICES=y 1292CONFIG_DMADEVICES=y
1261 1293
1262# 1294#
1263# DMA Devices 1295# DMA Devices
1264# 1296#
1265CONFIG_FSL_DMA=y 1297CONFIG_FSL_DMA=y
1266# CONFIG_FSL_DMA_SELFTEST is not set
1267CONFIG_DMA_ENGINE=y 1298CONFIG_DMA_ENGINE=y
1268 1299
1269# 1300#
1270# DMA Clients 1301# DMA Clients
1271# 1302#
1272# CONFIG_NET_DMA is not set 1303# CONFIG_NET_DMA is not set
1273
1274#
1275# Userspace I/O
1276#
1277# CONFIG_UIO is not set 1304# CONFIG_UIO is not set
1278 1305
1279# 1306#
@@ -1293,7 +1320,6 @@ CONFIG_FS_MBCACHE=y
1293# CONFIG_JFS_FS is not set 1320# CONFIG_JFS_FS is not set
1294# CONFIG_FS_POSIX_ACL is not set 1321# CONFIG_FS_POSIX_ACL is not set
1295# CONFIG_XFS_FS is not set 1322# CONFIG_XFS_FS is not set
1296# CONFIG_GFS2_FS is not set
1297# CONFIG_OCFS2_FS is not set 1323# CONFIG_OCFS2_FS is not set
1298CONFIG_DNOTIFY=y 1324CONFIG_DNOTIFY=y
1299CONFIG_INOTIFY=y 1325CONFIG_INOTIFY=y
@@ -1363,10 +1389,9 @@ CONFIG_NFS_FS=y
1363CONFIG_NFS_V3=y 1389CONFIG_NFS_V3=y
1364# CONFIG_NFS_V3_ACL is not set 1390# CONFIG_NFS_V3_ACL is not set
1365CONFIG_NFS_V4=y 1391CONFIG_NFS_V4=y
1366# CONFIG_NFS_DIRECTIO is not set
1367CONFIG_NFSD=y 1392CONFIG_NFSD=y
1368# CONFIG_NFSD_V3 is not set 1393# CONFIG_NFSD_V3 is not set
1369CONFIG_NFSD_TCP=y 1394# CONFIG_NFSD_V4 is not set
1370CONFIG_ROOT_NFS=y 1395CONFIG_ROOT_NFS=y
1371CONFIG_LOCKD=y 1396CONFIG_LOCKD=y
1372CONFIG_LOCKD_V4=y 1397CONFIG_LOCKD_V4=y
@@ -1450,9 +1475,10 @@ CONFIG_NLS_UTF8=m
1450# Library routines 1475# Library routines
1451# 1476#
1452CONFIG_BITREVERSE=y 1477CONFIG_BITREVERSE=y
1478# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1453# CONFIG_CRC_CCITT is not set 1479# CONFIG_CRC_CCITT is not set
1454# CONFIG_CRC16 is not set 1480# CONFIG_CRC16 is not set
1455# CONFIG_CRC_ITU_T is not set 1481CONFIG_CRC_ITU_T=m
1456CONFIG_CRC32=y 1482CONFIG_CRC32=y
1457# CONFIG_CRC7 is not set 1483# CONFIG_CRC7 is not set
1458CONFIG_LIBCRC32C=m 1484CONFIG_LIBCRC32C=m
@@ -1469,6 +1495,7 @@ CONFIG_HAVE_LMB=y
1469# CONFIG_PRINTK_TIME is not set 1495# CONFIG_PRINTK_TIME is not set
1470CONFIG_ENABLE_WARN_DEPRECATED=y 1496CONFIG_ENABLE_WARN_DEPRECATED=y
1471CONFIG_ENABLE_MUST_CHECK=y 1497CONFIG_ENABLE_MUST_CHECK=y
1498CONFIG_FRAME_WARN=1024
1472# CONFIG_MAGIC_SYSRQ is not set 1499# CONFIG_MAGIC_SYSRQ is not set
1473# CONFIG_UNUSED_SYMBOLS is not set 1500# CONFIG_UNUSED_SYMBOLS is not set
1474# CONFIG_DEBUG_FS is not set 1501# CONFIG_DEBUG_FS is not set
@@ -1479,6 +1506,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
1479CONFIG_SCHED_DEBUG=y 1506CONFIG_SCHED_DEBUG=y
1480# CONFIG_SCHEDSTATS is not set 1507# CONFIG_SCHEDSTATS is not set
1481# CONFIG_TIMER_STATS is not set 1508# CONFIG_TIMER_STATS is not set
1509# CONFIG_DEBUG_OBJECTS is not set
1482# CONFIG_SLUB_DEBUG_ON is not set 1510# CONFIG_SLUB_DEBUG_ON is not set
1483# CONFIG_SLUB_STATS is not set 1511# CONFIG_SLUB_STATS is not set
1484# CONFIG_DEBUG_RT_MUTEXES is not set 1512# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -1492,6 +1520,7 @@ CONFIG_SCHED_DEBUG=y
1492# CONFIG_DEBUG_BUGVERBOSE is not set 1520# CONFIG_DEBUG_BUGVERBOSE is not set
1493CONFIG_DEBUG_INFO=y 1521CONFIG_DEBUG_INFO=y
1494# CONFIG_DEBUG_VM is not set 1522# CONFIG_DEBUG_VM is not set
1523# CONFIG_DEBUG_WRITECOUNT is not set
1495# CONFIG_DEBUG_LIST is not set 1524# CONFIG_DEBUG_LIST is not set
1496# CONFIG_DEBUG_SG is not set 1525# CONFIG_DEBUG_SG is not set
1497# CONFIG_BOOT_PRINTK_DELAY is not set 1526# CONFIG_BOOT_PRINTK_DELAY is not set
@@ -1503,6 +1532,7 @@ CONFIG_DEBUG_INFO=y
1503# CONFIG_DEBUG_STACK_USAGE is not set 1532# CONFIG_DEBUG_STACK_USAGE is not set
1504# CONFIG_DEBUG_PAGEALLOC is not set 1533# CONFIG_DEBUG_PAGEALLOC is not set
1505# CONFIG_DEBUGGER is not set 1534# CONFIG_DEBUGGER is not set
1535# CONFIG_IRQSTACKS is not set
1506# CONFIG_BDI_SWITCH is not set 1536# CONFIG_BDI_SWITCH is not set
1507# CONFIG_PPC_EARLY_DEBUG is not set 1537# CONFIG_PPC_EARLY_DEBUG is not set
1508 1538
@@ -1513,52 +1543,82 @@ CONFIG_DEBUG_INFO=y
1513# CONFIG_SECURITY is not set 1543# CONFIG_SECURITY is not set
1514# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1544# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1515CONFIG_CRYPTO=y 1545CONFIG_CRYPTO=y
1546
1547#
1548# Crypto core or helper
1549#
1516CONFIG_CRYPTO_ALGAPI=y 1550CONFIG_CRYPTO_ALGAPI=y
1517CONFIG_CRYPTO_BLKCIPHER=y 1551CONFIG_CRYPTO_BLKCIPHER=y
1518# CONFIG_CRYPTO_SEQIV is not set
1519CONFIG_CRYPTO_HASH=y 1552CONFIG_CRYPTO_HASH=y
1520CONFIG_CRYPTO_MANAGER=y 1553CONFIG_CRYPTO_MANAGER=y
1554# CONFIG_CRYPTO_GF128MUL is not set
1555# CONFIG_CRYPTO_NULL is not set
1556# CONFIG_CRYPTO_CRYPTD is not set
1557# CONFIG_CRYPTO_AUTHENC is not set
1558# CONFIG_CRYPTO_TEST is not set
1559
1560#
1561# Authenticated Encryption with Associated Data
1562#
1563# CONFIG_CRYPTO_CCM is not set
1564# CONFIG_CRYPTO_GCM is not set
1565# CONFIG_CRYPTO_SEQIV is not set
1566
1567#
1568# Block modes
1569#
1570CONFIG_CRYPTO_CBC=y
1571# CONFIG_CRYPTO_CTR is not set
1572# CONFIG_CRYPTO_CTS is not set
1573# CONFIG_CRYPTO_ECB is not set
1574# CONFIG_CRYPTO_LRW is not set
1575CONFIG_CRYPTO_PCBC=m
1576# CONFIG_CRYPTO_XTS is not set
1577
1578#
1579# Hash modes
1580#
1521CONFIG_CRYPTO_HMAC=y 1581CONFIG_CRYPTO_HMAC=y
1522# CONFIG_CRYPTO_XCBC is not set 1582# CONFIG_CRYPTO_XCBC is not set
1523# CONFIG_CRYPTO_NULL is not set 1583
1584#
1585# Digest
1586#
1587# CONFIG_CRYPTO_CRC32C is not set
1524# CONFIG_CRYPTO_MD4 is not set 1588# CONFIG_CRYPTO_MD4 is not set
1525CONFIG_CRYPTO_MD5=y 1589CONFIG_CRYPTO_MD5=y
1590# CONFIG_CRYPTO_MICHAEL_MIC is not set
1526CONFIG_CRYPTO_SHA1=m 1591CONFIG_CRYPTO_SHA1=m
1527# CONFIG_CRYPTO_SHA256 is not set 1592# CONFIG_CRYPTO_SHA256 is not set
1528# CONFIG_CRYPTO_SHA512 is not set 1593# CONFIG_CRYPTO_SHA512 is not set
1529# CONFIG_CRYPTO_WP512 is not set
1530# CONFIG_CRYPTO_TGR192 is not set 1594# CONFIG_CRYPTO_TGR192 is not set
1531# CONFIG_CRYPTO_GF128MUL is not set 1595# CONFIG_CRYPTO_WP512 is not set
1532# CONFIG_CRYPTO_ECB is not set 1596
1533CONFIG_CRYPTO_CBC=y 1597#
1534CONFIG_CRYPTO_PCBC=m 1598# Ciphers
1535# CONFIG_CRYPTO_LRW is not set 1599#
1536# CONFIG_CRYPTO_XTS is not set
1537# CONFIG_CRYPTO_CTR is not set
1538# CONFIG_CRYPTO_GCM is not set
1539# CONFIG_CRYPTO_CCM is not set
1540# CONFIG_CRYPTO_CRYPTD is not set
1541CONFIG_CRYPTO_DES=y
1542# CONFIG_CRYPTO_FCRYPT is not set
1543# CONFIG_CRYPTO_BLOWFISH is not set
1544# CONFIG_CRYPTO_TWOFISH is not set
1545# CONFIG_CRYPTO_SERPENT is not set
1546# CONFIG_CRYPTO_AES is not set 1600# CONFIG_CRYPTO_AES is not set
1601# CONFIG_CRYPTO_ANUBIS is not set
1602# CONFIG_CRYPTO_ARC4 is not set
1603# CONFIG_CRYPTO_BLOWFISH is not set
1604# CONFIG_CRYPTO_CAMELLIA is not set
1547# CONFIG_CRYPTO_CAST5 is not set 1605# CONFIG_CRYPTO_CAST5 is not set
1548# CONFIG_CRYPTO_CAST6 is not set 1606# CONFIG_CRYPTO_CAST6 is not set
1549# CONFIG_CRYPTO_TEA is not set 1607CONFIG_CRYPTO_DES=y
1550# CONFIG_CRYPTO_ARC4 is not set 1608# CONFIG_CRYPTO_FCRYPT is not set
1551# CONFIG_CRYPTO_KHAZAD is not set 1609# CONFIG_CRYPTO_KHAZAD is not set
1552# CONFIG_CRYPTO_ANUBIS is not set
1553# CONFIG_CRYPTO_SEED is not set
1554# CONFIG_CRYPTO_SALSA20 is not set 1610# CONFIG_CRYPTO_SALSA20 is not set
1611# CONFIG_CRYPTO_SEED is not set
1612# CONFIG_CRYPTO_SERPENT is not set
1613# CONFIG_CRYPTO_TEA is not set
1614# CONFIG_CRYPTO_TWOFISH is not set
1615
1616#
1617# Compression
1618#
1555# CONFIG_CRYPTO_DEFLATE is not set 1619# CONFIG_CRYPTO_DEFLATE is not set
1556# CONFIG_CRYPTO_MICHAEL_MIC is not set
1557# CONFIG_CRYPTO_CRC32C is not set
1558# CONFIG_CRYPTO_CAMELLIA is not set
1559# CONFIG_CRYPTO_TEST is not set
1560# CONFIG_CRYPTO_AUTHENC is not set
1561# CONFIG_CRYPTO_LZO is not set 1620# CONFIG_CRYPTO_LZO is not set
1562CONFIG_CRYPTO_HW=y 1621CONFIG_CRYPTO_HW=y
1563# CONFIG_CRYPTO_DEV_HIFN_795X is not set 1622# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1564# CONFIG_PPC_CLOCK is not set 1623# CONFIG_PPC_CLOCK is not set
1624# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/85xx/mpc8560_ads_defconfig b/arch/powerpc/configs/85xx/mpc8560_ads_defconfig
index 851ac9115617..e19592b42043 100644
--- a/arch/powerpc/configs/85xx/mpc8560_ads_defconfig
+++ b/arch/powerpc/configs/85xx/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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 24 08:48:27 2008 4# Mon Jun 9 08:52:33 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -32,6 +32,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 34CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_LOCKDEP_SUPPORT=y
35CONFIG_RWSEM_XCHGADD_ALGORITHM=y 37CONFIG_RWSEM_XCHGADD_ALGORITHM=y
36CONFIG_ARCH_HAS_ILOG2_U32=y 38CONFIG_ARCH_HAS_ILOG2_U32=y
37CONFIG_GENERIC_HWEIGHT=y 39CONFIG_GENERIC_HWEIGHT=y
@@ -87,6 +89,7 @@ CONFIG_INITRAMFS_SOURCE=""
87CONFIG_SYSCTL=y 89CONFIG_SYSCTL=y
88CONFIG_EMBEDDED=y 90CONFIG_EMBEDDED=y
89CONFIG_SYSCTL_SYSCALL=y 91CONFIG_SYSCTL_SYSCALL=y
92CONFIG_SYSCTL_SYSCALL_CHECK=y
90CONFIG_KALLSYMS=y 93CONFIG_KALLSYMS=y
91# CONFIG_KALLSYMS_ALL is not set 94# CONFIG_KALLSYMS_ALL is not set
92# CONFIG_KALLSYMS_EXTRA_PASS is not set 95# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -113,6 +116,7 @@ CONFIG_SLUB=y
113CONFIG_HAVE_OPROFILE=y 116CONFIG_HAVE_OPROFILE=y
114CONFIG_HAVE_KPROBES=y 117CONFIG_HAVE_KPROBES=y
115CONFIG_HAVE_KRETPROBES=y 118CONFIG_HAVE_KRETPROBES=y
119# CONFIG_HAVE_DMA_ATTRS is not set
116CONFIG_PROC_PAGE_MONITOR=y 120CONFIG_PROC_PAGE_MONITOR=y
117CONFIG_SLABINFO=y 121CONFIG_SLABINFO=y
118CONFIG_RT_MUTEXES=y 122CONFIG_RT_MUTEXES=y
@@ -153,6 +157,7 @@ CONFIG_MPC8560_ADS=y
153# CONFIG_MPC85xx_CDS is not set 157# CONFIG_MPC85xx_CDS is not set
154# CONFIG_MPC85xx_MDS is not set 158# CONFIG_MPC85xx_MDS is not set
155# CONFIG_MPC85xx_DS is not set 159# CONFIG_MPC85xx_DS is not set
160# CONFIG_KSI8560 is not set
156# CONFIG_STX_GP3 is not set 161# CONFIG_STX_GP3 is not set
157# CONFIG_TQM8540 is not set 162# CONFIG_TQM8540 is not set
158# CONFIG_TQM8541 is not set 163# CONFIG_TQM8541 is not set
@@ -210,11 +215,13 @@ CONFIG_FLATMEM=y
210CONFIG_FLAT_NODE_MEM_MAP=y 215CONFIG_FLAT_NODE_MEM_MAP=y
211# CONFIG_SPARSEMEM_STATIC is not set 216# CONFIG_SPARSEMEM_STATIC is not set
212# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 217# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
218CONFIG_PAGEFLAGS_EXTENDED=y
213CONFIG_SPLIT_PTLOCK_CPUS=4 219CONFIG_SPLIT_PTLOCK_CPUS=4
214# CONFIG_RESOURCES_64BIT is not set 220# CONFIG_RESOURCES_64BIT is not set
215CONFIG_ZONE_DMA_FLAG=1 221CONFIG_ZONE_DMA_FLAG=1
216CONFIG_BOUNCE=y 222CONFIG_BOUNCE=y
217CONFIG_VIRT_TO_BUS=y 223CONFIG_VIRT_TO_BUS=y
224CONFIG_FORCE_MAX_ZONEORDER=11
218# CONFIG_PROC_DEVICETREE is not set 225# CONFIG_PROC_DEVICETREE is not set
219# CONFIG_CMDLINE_BOOL is not set 226# CONFIG_CMDLINE_BOOL is not set
220# CONFIG_PM is not set 227# CONFIG_PM is not set
@@ -238,6 +245,7 @@ CONFIG_PCI_LEGACY=y
238CONFIG_PCI_DEBUG=y 245CONFIG_PCI_DEBUG=y
239# CONFIG_PCCARD is not set 246# CONFIG_PCCARD is not set
240# CONFIG_HOTPLUG_PCI is not set 247# CONFIG_HOTPLUG_PCI is not set
248# CONFIG_HAS_RAPIDIO is not set
241 249
242# 250#
243# Advanced setup 251# Advanced setup
@@ -247,11 +255,12 @@ CONFIG_PCI_DEBUG=y
247# 255#
248# Default settings for advanced configuration options are used 256# Default settings for advanced configuration options are used
249# 257#
250CONFIG_HIGHMEM_START=0xfe000000
251CONFIG_LOWMEM_SIZE=0x30000000 258CONFIG_LOWMEM_SIZE=0x30000000
259CONFIG_PAGE_OFFSET=0xc0000000
252CONFIG_KERNEL_START=0xc0000000 260CONFIG_KERNEL_START=0xc0000000
261CONFIG_PHYSICAL_START=0x00000000
262CONFIG_PHYSICAL_ALIGN=0x10000000
253CONFIG_TASK_SIZE=0xc0000000 263CONFIG_TASK_SIZE=0xc0000000
254CONFIG_BOOT_LOAD=0x00800000
255 264
256# 265#
257# Networking 266# Networking
@@ -299,8 +308,6 @@ CONFIG_TCP_CONG_CUBIC=y
299CONFIG_DEFAULT_TCP_CONG="cubic" 308CONFIG_DEFAULT_TCP_CONG="cubic"
300# CONFIG_TCP_MD5SIG is not set 309# CONFIG_TCP_MD5SIG is not set
301# CONFIG_IPV6 is not set 310# CONFIG_IPV6 is not set
302# CONFIG_INET6_XFRM_TUNNEL is not set
303# CONFIG_INET6_TUNNEL is not set
304# CONFIG_NETWORK_SECMARK is not set 311# CONFIG_NETWORK_SECMARK is not set
305# CONFIG_NETFILTER is not set 312# CONFIG_NETFILTER is not set
306# CONFIG_IP_DCCP is not set 313# CONFIG_IP_DCCP is not set
@@ -462,7 +469,6 @@ CONFIG_E1000_NAPI=y
462# CONFIG_SIS190 is not set 469# CONFIG_SIS190 is not set
463# CONFIG_SKGE is not set 470# CONFIG_SKGE is not set
464# CONFIG_SKY2 is not set 471# CONFIG_SKY2 is not set
465# CONFIG_SK98LIN is not set
466# CONFIG_VIA_VELOCITY is not set 472# CONFIG_VIA_VELOCITY is not set
467# CONFIG_TIGON3 is not set 473# CONFIG_TIGON3 is not set
468# CONFIG_BNX2 is not set 474# CONFIG_BNX2 is not set
@@ -482,6 +488,7 @@ CONFIG_NETDEV_10000=y
482# CONFIG_MLX4_CORE is not set 488# CONFIG_MLX4_CORE is not set
483# CONFIG_TEHUTI is not set 489# CONFIG_TEHUTI is not set
484# CONFIG_BNX2X is not set 490# CONFIG_BNX2X is not set
491# CONFIG_SFC is not set
485# CONFIG_TR is not set 492# CONFIG_TR is not set
486 493
487# 494#
@@ -489,6 +496,7 @@ CONFIG_NETDEV_10000=y
489# 496#
490# CONFIG_WLAN_PRE80211 is not set 497# CONFIG_WLAN_PRE80211 is not set
491# CONFIG_WLAN_80211 is not set 498# CONFIG_WLAN_80211 is not set
499# CONFIG_IWLWIFI_LEDS is not set
492# CONFIG_WAN is not set 500# CONFIG_WAN is not set
493# CONFIG_FDDI is not set 501# CONFIG_FDDI is not set
494# CONFIG_HIPPI is not set 502# CONFIG_HIPPI is not set
@@ -535,6 +543,7 @@ CONFIG_INPUT=y
535# Character devices 543# Character devices
536# 544#
537# CONFIG_VT is not set 545# CONFIG_VT is not set
546CONFIG_DEVKMEM=y
538# CONFIG_SERIAL_NONSTANDARD is not set 547# CONFIG_SERIAL_NONSTANDARD is not set
539# CONFIG_NOZOMI is not set 548# CONFIG_NOZOMI is not set
540 549
@@ -572,12 +581,7 @@ CONFIG_GEN_RTC=y
572# CONFIG_TCG_TPM is not set 581# CONFIG_TCG_TPM is not set
573CONFIG_DEVPORT=y 582CONFIG_DEVPORT=y
574# CONFIG_I2C is not set 583# CONFIG_I2C is not set
575
576#
577# SPI support
578#
579# CONFIG_SPI is not set 584# CONFIG_SPI is not set
580# CONFIG_SPI_MASTER is not set
581# CONFIG_W1 is not set 585# CONFIG_W1 is not set
582# CONFIG_POWER_SUPPLY is not set 586# CONFIG_POWER_SUPPLY is not set
583CONFIG_HWMON=y 587CONFIG_HWMON=y
@@ -610,12 +614,22 @@ CONFIG_SSB_POSSIBLE=y
610# Multifunction device drivers 614# Multifunction device drivers
611# 615#
612# CONFIG_MFD_SM501 is not set 616# CONFIG_MFD_SM501 is not set
617# CONFIG_HTC_PASIC3 is not set
613 618
614# 619#
615# Multimedia devices 620# Multimedia devices
616# 621#
622
623#
624# Multimedia core support
625#
617# CONFIG_VIDEO_DEV is not set 626# CONFIG_VIDEO_DEV is not set
618# CONFIG_DVB_CORE is not set 627# CONFIG_DVB_CORE is not set
628# CONFIG_VIDEO_MEDIA is not set
629
630#
631# Multimedia drivers
632#
619CONFIG_DAB=y 633CONFIG_DAB=y
620 634
621# 635#
@@ -646,6 +660,8 @@ CONFIG_USB_ARCH_HAS_HCD=y
646CONFIG_USB_ARCH_HAS_OHCI=y 660CONFIG_USB_ARCH_HAS_OHCI=y
647CONFIG_USB_ARCH_HAS_EHCI=y 661CONFIG_USB_ARCH_HAS_EHCI=y
648# CONFIG_USB is not set 662# CONFIG_USB is not set
663# CONFIG_USB_OTG_WHITELIST is not set
664# CONFIG_USB_OTG_BLACKLIST_HUB is not set
649 665
650# 666#
651# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 667# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -654,14 +670,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
654# CONFIG_MMC is not set 670# CONFIG_MMC is not set
655# CONFIG_MEMSTICK is not set 671# CONFIG_MEMSTICK is not set
656# CONFIG_NEW_LEDS is not set 672# CONFIG_NEW_LEDS is not set
673# CONFIG_ACCESSIBILITY is not set
657# CONFIG_INFINIBAND is not set 674# CONFIG_INFINIBAND is not set
658# CONFIG_EDAC is not set 675# CONFIG_EDAC is not set
659# CONFIG_RTC_CLASS is not set 676# CONFIG_RTC_CLASS is not set
660# CONFIG_DMADEVICES is not set 677# CONFIG_DMADEVICES is not set
661
662#
663# Userspace I/O
664#
665# CONFIG_UIO is not set 678# CONFIG_UIO is not set
666 679
667# 680#
@@ -681,7 +694,6 @@ CONFIG_FS_MBCACHE=y
681# CONFIG_JFS_FS is not set 694# CONFIG_JFS_FS is not set
682# CONFIG_FS_POSIX_ACL is not set 695# CONFIG_FS_POSIX_ACL is not set
683# CONFIG_XFS_FS is not set 696# CONFIG_XFS_FS is not set
684# CONFIG_GFS2_FS is not set
685# CONFIG_OCFS2_FS is not set 697# CONFIG_OCFS2_FS is not set
686CONFIG_DNOTIFY=y 698CONFIG_DNOTIFY=y
687CONFIG_INOTIFY=y 699CONFIG_INOTIFY=y
@@ -738,7 +750,6 @@ CONFIG_NETWORK_FILESYSTEMS=y
738CONFIG_NFS_FS=y 750CONFIG_NFS_FS=y
739# CONFIG_NFS_V3 is not set 751# CONFIG_NFS_V3 is not set
740# CONFIG_NFS_V4 is not set 752# CONFIG_NFS_V4 is not set
741# CONFIG_NFS_DIRECTIO is not set
742# CONFIG_NFSD is not set 753# CONFIG_NFSD is not set
743CONFIG_ROOT_NFS=y 754CONFIG_ROOT_NFS=y
744CONFIG_LOCKD=y 755CONFIG_LOCKD=y
@@ -777,6 +788,7 @@ CONFIG_PARTITION_ADVANCED=y
777# Library routines 788# Library routines
778# 789#
779CONFIG_BITREVERSE=y 790CONFIG_BITREVERSE=y
791# CONFIG_GENERIC_FIND_FIRST_BIT is not set
780# CONFIG_CRC_CCITT is not set 792# CONFIG_CRC_CCITT is not set
781# CONFIG_CRC16 is not set 793# CONFIG_CRC16 is not set
782# CONFIG_CRC_ITU_T is not set 794# CONFIG_CRC_ITU_T is not set
@@ -787,6 +799,7 @@ CONFIG_PLIST=y
787CONFIG_HAS_IOMEM=y 799CONFIG_HAS_IOMEM=y
788CONFIG_HAS_IOPORT=y 800CONFIG_HAS_IOPORT=y
789CONFIG_HAS_DMA=y 801CONFIG_HAS_DMA=y
802CONFIG_HAVE_LMB=y
790 803
791# 804#
792# Kernel hacking 805# Kernel hacking
@@ -794,6 +807,7 @@ CONFIG_HAS_DMA=y
794# CONFIG_PRINTK_TIME is not set 807# CONFIG_PRINTK_TIME is not set
795CONFIG_ENABLE_WARN_DEPRECATED=y 808CONFIG_ENABLE_WARN_DEPRECATED=y
796CONFIG_ENABLE_MUST_CHECK=y 809CONFIG_ENABLE_MUST_CHECK=y
810CONFIG_FRAME_WARN=1024
797# CONFIG_MAGIC_SYSRQ is not set 811# CONFIG_MAGIC_SYSRQ is not set
798# CONFIG_UNUSED_SYMBOLS is not set 812# CONFIG_UNUSED_SYMBOLS is not set
799# CONFIG_DEBUG_FS is not set 813# CONFIG_DEBUG_FS is not set
@@ -804,6 +818,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
804CONFIG_SCHED_DEBUG=y 818CONFIG_SCHED_DEBUG=y
805# CONFIG_SCHEDSTATS is not set 819# CONFIG_SCHEDSTATS is not set
806# CONFIG_TIMER_STATS is not set 820# CONFIG_TIMER_STATS is not set
821# CONFIG_DEBUG_OBJECTS is not set
807# CONFIG_SLUB_DEBUG_ON is not set 822# CONFIG_SLUB_DEBUG_ON is not set
808# CONFIG_SLUB_STATS is not set 823# CONFIG_SLUB_STATS is not set
809# CONFIG_DEBUG_RT_MUTEXES is not set 824# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -816,6 +831,7 @@ CONFIG_DEBUG_MUTEXES=y
816# CONFIG_DEBUG_BUGVERBOSE is not set 831# CONFIG_DEBUG_BUGVERBOSE is not set
817# CONFIG_DEBUG_INFO is not set 832# CONFIG_DEBUG_INFO is not set
818# CONFIG_DEBUG_VM is not set 833# CONFIG_DEBUG_VM is not set
834# CONFIG_DEBUG_WRITECOUNT is not set
819# CONFIG_DEBUG_LIST is not set 835# CONFIG_DEBUG_LIST is not set
820# CONFIG_DEBUG_SG is not set 836# CONFIG_DEBUG_SG is not set
821# CONFIG_BOOT_PRINTK_DELAY is not set 837# CONFIG_BOOT_PRINTK_DELAY is not set
@@ -827,6 +843,7 @@ CONFIG_DEBUG_MUTEXES=y
827# CONFIG_DEBUG_PAGEALLOC is not set 843# CONFIG_DEBUG_PAGEALLOC is not set
828# CONFIG_DEBUGGER is not set 844# CONFIG_DEBUGGER is not set
829# CONFIG_KGDB_CONSOLE is not set 845# CONFIG_KGDB_CONSOLE is not set
846# CONFIG_IRQSTACKS is not set
830# CONFIG_BDI_SWITCH is not set 847# CONFIG_BDI_SWITCH is not set
831# CONFIG_PPC_EARLY_DEBUG is not set 848# CONFIG_PPC_EARLY_DEBUG is not set
832 849
@@ -837,49 +854,79 @@ CONFIG_DEBUG_MUTEXES=y
837# CONFIG_SECURITY is not set 854# CONFIG_SECURITY is not set
838# CONFIG_SECURITY_FILE_CAPABILITIES is not set 855# CONFIG_SECURITY_FILE_CAPABILITIES is not set
839CONFIG_CRYPTO=y 856CONFIG_CRYPTO=y
840# CONFIG_CRYPTO_SEQIV is not set 857
858#
859# Crypto core or helper
860#
841# CONFIG_CRYPTO_MANAGER is not set 861# CONFIG_CRYPTO_MANAGER is not set
862# CONFIG_CRYPTO_GF128MUL is not set
863# CONFIG_CRYPTO_NULL is not set
864# CONFIG_CRYPTO_CRYPTD is not set
865# CONFIG_CRYPTO_AUTHENC is not set
866
867#
868# Authenticated Encryption with Associated Data
869#
870# CONFIG_CRYPTO_CCM is not set
871# CONFIG_CRYPTO_GCM is not set
872# CONFIG_CRYPTO_SEQIV is not set
873
874#
875# Block modes
876#
877# CONFIG_CRYPTO_CBC is not set
878# CONFIG_CRYPTO_CTR is not set
879# CONFIG_CRYPTO_CTS is not set
880# CONFIG_CRYPTO_ECB is not set
881# CONFIG_CRYPTO_LRW is not set
882# CONFIG_CRYPTO_PCBC is not set
883# CONFIG_CRYPTO_XTS is not set
884
885#
886# Hash modes
887#
842# CONFIG_CRYPTO_HMAC is not set 888# CONFIG_CRYPTO_HMAC is not set
843# CONFIG_CRYPTO_XCBC is not set 889# CONFIG_CRYPTO_XCBC is not set
844# CONFIG_CRYPTO_NULL is not set 890
891#
892# Digest
893#
894# CONFIG_CRYPTO_CRC32C is not set
845# CONFIG_CRYPTO_MD4 is not set 895# CONFIG_CRYPTO_MD4 is not set
846# CONFIG_CRYPTO_MD5 is not set 896# CONFIG_CRYPTO_MD5 is not set
897# CONFIG_CRYPTO_MICHAEL_MIC is not set
847# CONFIG_CRYPTO_SHA1 is not set 898# CONFIG_CRYPTO_SHA1 is not set
848# CONFIG_CRYPTO_SHA256 is not set 899# CONFIG_CRYPTO_SHA256 is not set
849# CONFIG_CRYPTO_SHA512 is not set 900# CONFIG_CRYPTO_SHA512 is not set
850# CONFIG_CRYPTO_WP512 is not set
851# CONFIG_CRYPTO_TGR192 is not set 901# CONFIG_CRYPTO_TGR192 is not set
852# CONFIG_CRYPTO_GF128MUL is not set 902# CONFIG_CRYPTO_WP512 is not set
853# CONFIG_CRYPTO_ECB is not set 903
854# CONFIG_CRYPTO_CBC is not set 904#
855# CONFIG_CRYPTO_PCBC is not set 905# Ciphers
856# CONFIG_CRYPTO_LRW is not set 906#
857# CONFIG_CRYPTO_XTS is not set
858# CONFIG_CRYPTO_CTR is not set
859# CONFIG_CRYPTO_GCM is not set
860# CONFIG_CRYPTO_CCM is not set
861# CONFIG_CRYPTO_CRYPTD is not set
862# CONFIG_CRYPTO_DES is not set
863# CONFIG_CRYPTO_FCRYPT is not set
864# CONFIG_CRYPTO_BLOWFISH is not set
865# CONFIG_CRYPTO_TWOFISH is not set
866# CONFIG_CRYPTO_SERPENT is not set
867# CONFIG_CRYPTO_AES is not set 907# CONFIG_CRYPTO_AES is not set
908# CONFIG_CRYPTO_ANUBIS is not set
909# CONFIG_CRYPTO_ARC4 is not set
910# CONFIG_CRYPTO_BLOWFISH is not set
911# CONFIG_CRYPTO_CAMELLIA is not set
868# CONFIG_CRYPTO_CAST5 is not set 912# CONFIG_CRYPTO_CAST5 is not set
869# CONFIG_CRYPTO_CAST6 is not set 913# CONFIG_CRYPTO_CAST6 is not set
870# CONFIG_CRYPTO_TEA is not set 914# CONFIG_CRYPTO_DES is not set
871# CONFIG_CRYPTO_ARC4 is not set 915# CONFIG_CRYPTO_FCRYPT is not set
872# CONFIG_CRYPTO_KHAZAD is not set 916# CONFIG_CRYPTO_KHAZAD is not set
873# CONFIG_CRYPTO_ANUBIS is not set
874# CONFIG_CRYPTO_SEED is not set
875# CONFIG_CRYPTO_SALSA20 is not set 917# CONFIG_CRYPTO_SALSA20 is not set
918# CONFIG_CRYPTO_SEED is not set
919# CONFIG_CRYPTO_SERPENT is not set
920# CONFIG_CRYPTO_TEA is not set
921# CONFIG_CRYPTO_TWOFISH is not set
922
923#
924# Compression
925#
876# CONFIG_CRYPTO_DEFLATE is not set 926# CONFIG_CRYPTO_DEFLATE is not set
877# CONFIG_CRYPTO_MICHAEL_MIC is not set
878# CONFIG_CRYPTO_CRC32C is not set
879# CONFIG_CRYPTO_CAMELLIA is not set
880# CONFIG_CRYPTO_AUTHENC is not set
881# CONFIG_CRYPTO_LZO is not set 927# CONFIG_CRYPTO_LZO is not set
882CONFIG_CRYPTO_HW=y 928CONFIG_CRYPTO_HW=y
883# CONFIG_CRYPTO_DEV_HIFN_795X is not set 929# CONFIG_CRYPTO_DEV_HIFN_795X is not set
884# CONFIG_PPC_CLOCK is not set 930# CONFIG_PPC_CLOCK is not set
885CONFIG_PPC_LIB_RHEAP=y 931CONFIG_PPC_LIB_RHEAP=y
932# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/85xx/mpc8568mds_defconfig b/arch/powerpc/configs/85xx/mpc8568mds_defconfig
index 2b866b385607..28004e93aeee 100644
--- a/arch/powerpc/configs/85xx/mpc8568mds_defconfig
+++ b/arch/powerpc/configs/85xx/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.25-rc7 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 31 11:37:05 2008 4# Mon Jun 9 08:52:34 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -32,6 +32,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 34CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_LOCKDEP_SUPPORT=y
35CONFIG_RWSEM_XCHGADD_ALGORITHM=y 37CONFIG_RWSEM_XCHGADD_ALGORITHM=y
36CONFIG_ARCH_HAS_ILOG2_U32=y 38CONFIG_ARCH_HAS_ILOG2_U32=y
37CONFIG_GENERIC_HWEIGHT=y 39CONFIG_GENERIC_HWEIGHT=y
@@ -87,6 +89,7 @@ CONFIG_INITRAMFS_SOURCE=""
87CONFIG_SYSCTL=y 89CONFIG_SYSCTL=y
88CONFIG_EMBEDDED=y 90CONFIG_EMBEDDED=y
89CONFIG_SYSCTL_SYSCALL=y 91CONFIG_SYSCTL_SYSCALL=y
92CONFIG_SYSCTL_SYSCALL_CHECK=y
90# CONFIG_KALLSYMS is not set 93# CONFIG_KALLSYMS is not set
91CONFIG_HOTPLUG=y 94CONFIG_HOTPLUG=y
92CONFIG_PRINTK=y 95CONFIG_PRINTK=y
@@ -111,12 +114,14 @@ CONFIG_SLUB=y
111CONFIG_HAVE_OPROFILE=y 114CONFIG_HAVE_OPROFILE=y
112CONFIG_HAVE_KPROBES=y 115CONFIG_HAVE_KPROBES=y
113CONFIG_HAVE_KRETPROBES=y 116CONFIG_HAVE_KRETPROBES=y
117# CONFIG_HAVE_DMA_ATTRS is not set
114CONFIG_PROC_PAGE_MONITOR=y 118CONFIG_PROC_PAGE_MONITOR=y
115CONFIG_SLABINFO=y 119CONFIG_SLABINFO=y
116CONFIG_RT_MUTEXES=y 120CONFIG_RT_MUTEXES=y
117# CONFIG_TINY_SHMEM is not set 121# CONFIG_TINY_SHMEM is not set
118CONFIG_BASE_SMALL=0 122CONFIG_BASE_SMALL=0
119CONFIG_MODULES=y 123CONFIG_MODULES=y
124# CONFIG_MODULE_FORCE_LOAD is not set
120CONFIG_MODULE_UNLOAD=y 125CONFIG_MODULE_UNLOAD=y
121# CONFIG_MODULE_FORCE_UNLOAD is not set 126# CONFIG_MODULE_FORCE_UNLOAD is not set
122# CONFIG_MODVERSIONS is not set 127# CONFIG_MODVERSIONS is not set
@@ -156,6 +161,7 @@ CONFIG_MPC85xx=y
156# CONFIG_MPC85xx_CDS is not set 161# CONFIG_MPC85xx_CDS is not set
157CONFIG_MPC85xx_MDS=y 162CONFIG_MPC85xx_MDS=y
158# CONFIG_MPC85xx_DS is not set 163# CONFIG_MPC85xx_DS is not set
164# CONFIG_KSI8560 is not set
159# CONFIG_STX_GP3 is not set 165# CONFIG_STX_GP3 is not set
160# CONFIG_TQM8540 is not set 166# CONFIG_TQM8540 is not set
161# CONFIG_TQM8541 is not set 167# CONFIG_TQM8541 is not set
@@ -212,11 +218,13 @@ CONFIG_FLATMEM=y
212CONFIG_FLAT_NODE_MEM_MAP=y 218CONFIG_FLAT_NODE_MEM_MAP=y
213# CONFIG_SPARSEMEM_STATIC is not set 219# CONFIG_SPARSEMEM_STATIC is not set
214# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 220# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
221CONFIG_PAGEFLAGS_EXTENDED=y
215CONFIG_SPLIT_PTLOCK_CPUS=4 222CONFIG_SPLIT_PTLOCK_CPUS=4
216# CONFIG_RESOURCES_64BIT is not set 223# CONFIG_RESOURCES_64BIT is not set
217CONFIG_ZONE_DMA_FLAG=1 224CONFIG_ZONE_DMA_FLAG=1
218CONFIG_BOUNCE=y 225CONFIG_BOUNCE=y
219CONFIG_VIRT_TO_BUS=y 226CONFIG_VIRT_TO_BUS=y
227CONFIG_FORCE_MAX_ZONEORDER=11
220CONFIG_PROC_DEVICETREE=y 228CONFIG_PROC_DEVICETREE=y
221# CONFIG_CMDLINE_BOOL is not set 229# CONFIG_CMDLINE_BOOL is not set
222# CONFIG_PM is not set 230# CONFIG_PM is not set
@@ -240,6 +248,7 @@ CONFIG_PCI_LEGACY=y
240# CONFIG_PCI_DEBUG is not set 248# CONFIG_PCI_DEBUG is not set
241# CONFIG_PCCARD is not set 249# CONFIG_PCCARD is not set
242# CONFIG_HOTPLUG_PCI is not set 250# CONFIG_HOTPLUG_PCI is not set
251# CONFIG_HAS_RAPIDIO is not set
243 252
244# 253#
245# Advanced setup 254# Advanced setup
@@ -249,11 +258,12 @@ CONFIG_PCI_LEGACY=y
249# 258#
250# Default settings for advanced configuration options are used 259# Default settings for advanced configuration options are used
251# 260#
252CONFIG_HIGHMEM_START=0xfe000000
253CONFIG_LOWMEM_SIZE=0x30000000 261CONFIG_LOWMEM_SIZE=0x30000000
262CONFIG_PAGE_OFFSET=0xc0000000
254CONFIG_KERNEL_START=0xc0000000 263CONFIG_KERNEL_START=0xc0000000
264CONFIG_PHYSICAL_START=0x00000000
265CONFIG_PHYSICAL_ALIGN=0x10000000
255CONFIG_TASK_SIZE=0xc0000000 266CONFIG_TASK_SIZE=0xc0000000
256CONFIG_BOOT_LOAD=0x00800000
257 267
258# 268#
259# Networking 269# Networking
@@ -301,8 +311,6 @@ CONFIG_TCP_CONG_CUBIC=y
301CONFIG_DEFAULT_TCP_CONG="cubic" 311CONFIG_DEFAULT_TCP_CONG="cubic"
302# CONFIG_TCP_MD5SIG is not set 312# CONFIG_TCP_MD5SIG is not set
303# CONFIG_IPV6 is not set 313# CONFIG_IPV6 is not set
304# CONFIG_INET6_XFRM_TUNNEL is not set
305# CONFIG_INET6_TUNNEL is not set
306# CONFIG_NETWORK_SECMARK is not set 314# CONFIG_NETWORK_SECMARK is not set
307# CONFIG_NETFILTER is not set 315# CONFIG_NETFILTER is not set
308# CONFIG_IP_DCCP is not set 316# CONFIG_IP_DCCP is not set
@@ -358,6 +366,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
358# CONFIG_CONNECTOR is not set 366# CONFIG_CONNECTOR is not set
359# CONFIG_MTD is not set 367# CONFIG_MTD is not set
360CONFIG_OF_DEVICE=y 368CONFIG_OF_DEVICE=y
369CONFIG_OF_I2C=y
361# CONFIG_PARPORT is not set 370# CONFIG_PARPORT is not set
362CONFIG_BLK_DEV=y 371CONFIG_BLK_DEV=y
363# CONFIG_BLK_DEV_FD is not set 372# CONFIG_BLK_DEV_FD is not set
@@ -525,7 +534,6 @@ CONFIG_NETDEV_1000=y
525# CONFIG_SIS190 is not set 534# CONFIG_SIS190 is not set
526# CONFIG_SKGE is not set 535# CONFIG_SKGE is not set
527# CONFIG_SKY2 is not set 536# CONFIG_SKY2 is not set
528# CONFIG_SK98LIN is not set
529# CONFIG_VIA_VELOCITY is not set 537# CONFIG_VIA_VELOCITY is not set
530# CONFIG_TIGON3 is not set 538# CONFIG_TIGON3 is not set
531# CONFIG_BNX2 is not set 539# CONFIG_BNX2 is not set
@@ -546,6 +554,7 @@ CONFIG_NETDEV_10000=y
546# CONFIG_MLX4_CORE is not set 554# CONFIG_MLX4_CORE is not set
547# CONFIG_TEHUTI is not set 555# CONFIG_TEHUTI is not set
548# CONFIG_BNX2X is not set 556# CONFIG_BNX2X is not set
557# CONFIG_SFC is not set
549# CONFIG_TR is not set 558# CONFIG_TR is not set
550 559
551# 560#
@@ -553,6 +562,7 @@ CONFIG_NETDEV_10000=y
553# 562#
554# CONFIG_WLAN_PRE80211 is not set 563# CONFIG_WLAN_PRE80211 is not set
555# CONFIG_WLAN_80211 is not set 564# CONFIG_WLAN_80211 is not set
565# CONFIG_IWLWIFI_LEDS is not set
556# CONFIG_WAN is not set 566# CONFIG_WAN is not set
557# CONFIG_FDDI is not set 567# CONFIG_FDDI is not set
558# CONFIG_HIPPI is not set 568# CONFIG_HIPPI is not set
@@ -600,6 +610,7 @@ CONFIG_INPUT=y
600# Character devices 610# Character devices
601# 611#
602# CONFIG_VT is not set 612# CONFIG_VT is not set
613CONFIG_DEVKMEM=y
603# CONFIG_SERIAL_NONSTANDARD is not set 614# CONFIG_SERIAL_NONSTANDARD is not set
604# CONFIG_NOZOMI is not set 615# CONFIG_NOZOMI is not set
605 616
@@ -629,7 +640,6 @@ CONFIG_LEGACY_PTY_COUNT=256
629# CONFIG_IPMI_HANDLER is not set 640# CONFIG_IPMI_HANDLER is not set
630CONFIG_HW_RANDOM=y 641CONFIG_HW_RANDOM=y
631# CONFIG_NVRAM is not set 642# CONFIG_NVRAM is not set
632# CONFIG_GEN_RTC is not set
633# CONFIG_R3964 is not set 643# CONFIG_R3964 is not set
634# CONFIG_APPLICOM is not set 644# CONFIG_APPLICOM is not set
635# CONFIG_RAW_DRIVER is not set 645# CONFIG_RAW_DRIVER is not set
@@ -640,13 +650,6 @@ CONFIG_I2C_BOARDINFO=y
640CONFIG_I2C_CHARDEV=y 650CONFIG_I2C_CHARDEV=y
641 651
642# 652#
643# I2C Algorithms
644#
645# CONFIG_I2C_ALGOBIT is not set
646# CONFIG_I2C_ALGOPCF is not set
647# CONFIG_I2C_ALGOPCA is not set
648
649#
650# I2C Hardware Bus support 653# I2C Hardware Bus support
651# 654#
652# CONFIG_I2C_ALI1535 is not set 655# CONFIG_I2C_ALI1535 is not set
@@ -672,6 +675,7 @@ CONFIG_I2C_MPC=y
672# CONFIG_I2C_VIA is not set 675# CONFIG_I2C_VIA is not set
673# CONFIG_I2C_VIAPRO is not set 676# CONFIG_I2C_VIAPRO is not set
674# CONFIG_I2C_VOODOO3 is not set 677# CONFIG_I2C_VOODOO3 is not set
678# CONFIG_I2C_PCA_PLATFORM is not set
675 679
676# 680#
677# Miscellaneous I2C Chip support 681# Miscellaneous I2C Chip support
@@ -681,19 +685,13 @@ CONFIG_I2C_MPC=y
681# CONFIG_SENSORS_PCF8574 is not set 685# CONFIG_SENSORS_PCF8574 is not set
682# CONFIG_PCF8575 is not set 686# CONFIG_PCF8575 is not set
683# CONFIG_SENSORS_PCF8591 is not set 687# CONFIG_SENSORS_PCF8591 is not set
684# CONFIG_TPS65010 is not set
685# CONFIG_SENSORS_MAX6875 is not set 688# CONFIG_SENSORS_MAX6875 is not set
686# CONFIG_SENSORS_TSL2550 is not set 689# CONFIG_SENSORS_TSL2550 is not set
687# CONFIG_I2C_DEBUG_CORE is not set 690# CONFIG_I2C_DEBUG_CORE is not set
688# CONFIG_I2C_DEBUG_ALGO is not set 691# CONFIG_I2C_DEBUG_ALGO is not set
689# CONFIG_I2C_DEBUG_BUS is not set 692# CONFIG_I2C_DEBUG_BUS is not set
690# CONFIG_I2C_DEBUG_CHIP is not set 693# CONFIG_I2C_DEBUG_CHIP is not set
691
692#
693# SPI support
694#
695# CONFIG_SPI is not set 694# CONFIG_SPI is not set
696# CONFIG_SPI_MASTER is not set
697# CONFIG_W1 is not set 695# CONFIG_W1 is not set
698# CONFIG_POWER_SUPPLY is not set 696# CONFIG_POWER_SUPPLY is not set
699CONFIG_HWMON=y 697CONFIG_HWMON=y
@@ -776,12 +774,22 @@ CONFIG_SSB_POSSIBLE=y
776# Multifunction device drivers 774# Multifunction device drivers
777# 775#
778# CONFIG_MFD_SM501 is not set 776# CONFIG_MFD_SM501 is not set
777# CONFIG_HTC_PASIC3 is not set
779 778
780# 779#
781# Multimedia devices 780# Multimedia devices
782# 781#
782
783#
784# Multimedia core support
785#
783# CONFIG_VIDEO_DEV is not set 786# CONFIG_VIDEO_DEV is not set
784# CONFIG_DVB_CORE is not set 787# CONFIG_DVB_CORE is not set
788# CONFIG_VIDEO_MEDIA is not set
789
790#
791# Multimedia drivers
792#
785CONFIG_DAB=y 793CONFIG_DAB=y
786 794
787# 795#
@@ -812,6 +820,8 @@ CONFIG_USB_ARCH_HAS_HCD=y
812CONFIG_USB_ARCH_HAS_OHCI=y 820CONFIG_USB_ARCH_HAS_OHCI=y
813CONFIG_USB_ARCH_HAS_EHCI=y 821CONFIG_USB_ARCH_HAS_EHCI=y
814# CONFIG_USB is not set 822# CONFIG_USB is not set
823# CONFIG_USB_OTG_WHITELIST is not set
824# CONFIG_USB_OTG_BLACKLIST_HUB is not set
815 825
816# 826#
817# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 827# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -820,6 +830,7 @@ CONFIG_USB_ARCH_HAS_EHCI=y
820# CONFIG_MMC is not set 830# CONFIG_MMC is not set
821# CONFIG_MEMSTICK is not set 831# CONFIG_MEMSTICK is not set
822# CONFIG_NEW_LEDS is not set 832# CONFIG_NEW_LEDS is not set
833# CONFIG_ACCESSIBILITY is not set
823# CONFIG_INFINIBAND is not set 834# CONFIG_INFINIBAND is not set
824# CONFIG_EDAC is not set 835# CONFIG_EDAC is not set
825CONFIG_RTC_LIB=y 836CONFIG_RTC_LIB=y
@@ -871,11 +882,8 @@ CONFIG_RTC_DRV_DS1374=y
871# 882#
872# on-CPU RTC drivers 883# on-CPU RTC drivers
873# 884#
885# CONFIG_RTC_DRV_PPC is not set
874# CONFIG_DMADEVICES is not set 886# CONFIG_DMADEVICES is not set
875
876#
877# Userspace I/O
878#
879# CONFIG_UIO is not set 887# CONFIG_UIO is not set
880 888
881# 889#
@@ -895,7 +903,6 @@ CONFIG_FS_MBCACHE=y
895# CONFIG_JFS_FS is not set 903# CONFIG_JFS_FS is not set
896# CONFIG_FS_POSIX_ACL is not set 904# CONFIG_FS_POSIX_ACL is not set
897# CONFIG_XFS_FS is not set 905# CONFIG_XFS_FS is not set
898# CONFIG_GFS2_FS is not set
899# CONFIG_OCFS2_FS is not set 906# CONFIG_OCFS2_FS is not set
900CONFIG_DNOTIFY=y 907CONFIG_DNOTIFY=y
901CONFIG_INOTIFY=y 908CONFIG_INOTIFY=y
@@ -953,7 +960,6 @@ CONFIG_NFS_FS=y
953CONFIG_NFS_V3=y 960CONFIG_NFS_V3=y
954# CONFIG_NFS_V3_ACL is not set 961# CONFIG_NFS_V3_ACL is not set
955CONFIG_NFS_V4=y 962CONFIG_NFS_V4=y
956# CONFIG_NFS_DIRECTIO is not set
957# CONFIG_NFSD is not set 963# CONFIG_NFSD is not set
958CONFIG_ROOT_NFS=y 964CONFIG_ROOT_NFS=y
959CONFIG_LOCKD=y 965CONFIG_LOCKD=y
@@ -994,6 +1000,7 @@ CONFIG_PARTITION_ADVANCED=y
994# Library routines 1000# Library routines
995# 1001#
996CONFIG_BITREVERSE=y 1002CONFIG_BITREVERSE=y
1003# CONFIG_GENERIC_FIND_FIRST_BIT is not set
997# CONFIG_CRC_CCITT is not set 1004# CONFIG_CRC_CCITT is not set
998# CONFIG_CRC16 is not set 1005# CONFIG_CRC16 is not set
999# CONFIG_CRC_ITU_T is not set 1006# CONFIG_CRC_ITU_T is not set
@@ -1004,6 +1011,7 @@ CONFIG_PLIST=y
1004CONFIG_HAS_IOMEM=y 1011CONFIG_HAS_IOMEM=y
1005CONFIG_HAS_IOPORT=y 1012CONFIG_HAS_IOPORT=y
1006CONFIG_HAS_DMA=y 1013CONFIG_HAS_DMA=y
1014CONFIG_HAVE_LMB=y
1007 1015
1008# 1016#
1009# Kernel hacking 1017# Kernel hacking
@@ -1011,6 +1019,7 @@ CONFIG_HAS_DMA=y
1011# CONFIG_PRINTK_TIME is not set 1019# CONFIG_PRINTK_TIME is not set
1012CONFIG_ENABLE_WARN_DEPRECATED=y 1020CONFIG_ENABLE_WARN_DEPRECATED=y
1013CONFIG_ENABLE_MUST_CHECK=y 1021CONFIG_ENABLE_MUST_CHECK=y
1022CONFIG_FRAME_WARN=1024
1014# CONFIG_MAGIC_SYSRQ is not set 1023# CONFIG_MAGIC_SYSRQ is not set
1015# CONFIG_UNUSED_SYMBOLS is not set 1024# CONFIG_UNUSED_SYMBOLS is not set
1016# CONFIG_DEBUG_FS is not set 1025# CONFIG_DEBUG_FS is not set
@@ -1021,6 +1030,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
1021CONFIG_SCHED_DEBUG=y 1030CONFIG_SCHED_DEBUG=y
1022# CONFIG_SCHEDSTATS is not set 1031# CONFIG_SCHEDSTATS is not set
1023# CONFIG_TIMER_STATS is not set 1032# CONFIG_TIMER_STATS is not set
1033# CONFIG_DEBUG_OBJECTS is not set
1024# CONFIG_SLUB_DEBUG_ON is not set 1034# CONFIG_SLUB_DEBUG_ON is not set
1025# CONFIG_SLUB_STATS is not set 1035# CONFIG_SLUB_STATS is not set
1026# CONFIG_DEBUG_RT_MUTEXES is not set 1036# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -1033,6 +1043,7 @@ CONFIG_SCHED_DEBUG=y
1033# CONFIG_DEBUG_BUGVERBOSE is not set 1043# CONFIG_DEBUG_BUGVERBOSE is not set
1034# CONFIG_DEBUG_INFO is not set 1044# CONFIG_DEBUG_INFO is not set
1035# CONFIG_DEBUG_VM is not set 1045# CONFIG_DEBUG_VM is not set
1046# CONFIG_DEBUG_WRITECOUNT is not set
1036# CONFIG_DEBUG_LIST is not set 1047# CONFIG_DEBUG_LIST is not set
1037# CONFIG_DEBUG_SG is not set 1048# CONFIG_DEBUG_SG is not set
1038# CONFIG_BOOT_PRINTK_DELAY is not set 1049# CONFIG_BOOT_PRINTK_DELAY is not set
@@ -1045,6 +1056,7 @@ CONFIG_SCHED_DEBUG=y
1045# CONFIG_DEBUG_PAGEALLOC is not set 1056# CONFIG_DEBUG_PAGEALLOC is not set
1046CONFIG_DEBUGGER=y 1057CONFIG_DEBUGGER=y
1047# CONFIG_XMON is not set 1058# CONFIG_XMON is not set
1059# CONFIG_IRQSTACKS is not set
1048# CONFIG_BDI_SWITCH is not set 1060# CONFIG_BDI_SWITCH is not set
1049CONFIG_PPC_EARLY_DEBUG=y 1061CONFIG_PPC_EARLY_DEBUG=y
1050# CONFIG_PPC_EARLY_DEBUG_LPAR is not set 1062# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
@@ -1066,52 +1078,82 @@ CONFIG_PPC_EARLY_DEBUG=y
1066# CONFIG_SECURITY is not set 1078# CONFIG_SECURITY is not set
1067# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1079# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1068CONFIG_CRYPTO=y 1080CONFIG_CRYPTO=y
1081
1082#
1083# Crypto core or helper
1084#
1069CONFIG_CRYPTO_ALGAPI=y 1085CONFIG_CRYPTO_ALGAPI=y
1070CONFIG_CRYPTO_BLKCIPHER=y 1086CONFIG_CRYPTO_BLKCIPHER=y
1071# CONFIG_CRYPTO_SEQIV is not set
1072CONFIG_CRYPTO_MANAGER=y 1087CONFIG_CRYPTO_MANAGER=y
1088# CONFIG_CRYPTO_GF128MUL is not set
1089# CONFIG_CRYPTO_NULL is not set
1090# CONFIG_CRYPTO_CRYPTD is not set
1091# CONFIG_CRYPTO_AUTHENC is not set
1092# CONFIG_CRYPTO_TEST is not set
1093
1094#
1095# Authenticated Encryption with Associated Data
1096#
1097# CONFIG_CRYPTO_CCM is not set
1098# CONFIG_CRYPTO_GCM is not set
1099# CONFIG_CRYPTO_SEQIV is not set
1100
1101#
1102# Block modes
1103#
1104CONFIG_CRYPTO_CBC=y
1105# CONFIG_CRYPTO_CTR is not set
1106# CONFIG_CRYPTO_CTS is not set
1107CONFIG_CRYPTO_ECB=m
1108# CONFIG_CRYPTO_LRW is not set
1109CONFIG_CRYPTO_PCBC=m
1110# CONFIG_CRYPTO_XTS is not set
1111
1112#
1113# Hash modes
1114#
1073# CONFIG_CRYPTO_HMAC is not set 1115# CONFIG_CRYPTO_HMAC is not set
1074# CONFIG_CRYPTO_XCBC is not set 1116# CONFIG_CRYPTO_XCBC is not set
1075# CONFIG_CRYPTO_NULL is not set 1117
1118#
1119# Digest
1120#
1121# CONFIG_CRYPTO_CRC32C is not set
1076# CONFIG_CRYPTO_MD4 is not set 1122# CONFIG_CRYPTO_MD4 is not set
1077CONFIG_CRYPTO_MD5=y 1123CONFIG_CRYPTO_MD5=y
1124# CONFIG_CRYPTO_MICHAEL_MIC is not set
1078# CONFIG_CRYPTO_SHA1 is not set 1125# CONFIG_CRYPTO_SHA1 is not set
1079# CONFIG_CRYPTO_SHA256 is not set 1126# CONFIG_CRYPTO_SHA256 is not set
1080# CONFIG_CRYPTO_SHA512 is not set 1127# CONFIG_CRYPTO_SHA512 is not set
1081# CONFIG_CRYPTO_WP512 is not set
1082# CONFIG_CRYPTO_TGR192 is not set 1128# CONFIG_CRYPTO_TGR192 is not set
1083# CONFIG_CRYPTO_GF128MUL is not set 1129# CONFIG_CRYPTO_WP512 is not set
1084CONFIG_CRYPTO_ECB=m 1130
1085CONFIG_CRYPTO_CBC=y 1131#
1086CONFIG_CRYPTO_PCBC=m 1132# Ciphers
1087# CONFIG_CRYPTO_LRW is not set 1133#
1088# CONFIG_CRYPTO_XTS is not set
1089# CONFIG_CRYPTO_CTR is not set
1090# CONFIG_CRYPTO_GCM is not set
1091# CONFIG_CRYPTO_CCM is not set
1092# CONFIG_CRYPTO_CRYPTD is not set
1093CONFIG_CRYPTO_DES=y
1094# CONFIG_CRYPTO_FCRYPT is not set
1095# CONFIG_CRYPTO_BLOWFISH is not set
1096# CONFIG_CRYPTO_TWOFISH is not set
1097# CONFIG_CRYPTO_SERPENT is not set
1098# CONFIG_CRYPTO_AES is not set 1134# CONFIG_CRYPTO_AES is not set
1135# CONFIG_CRYPTO_ANUBIS is not set
1136# CONFIG_CRYPTO_ARC4 is not set
1137# CONFIG_CRYPTO_BLOWFISH is not set
1138# CONFIG_CRYPTO_CAMELLIA is not set
1099# CONFIG_CRYPTO_CAST5 is not set 1139# CONFIG_CRYPTO_CAST5 is not set
1100# CONFIG_CRYPTO_CAST6 is not set 1140# CONFIG_CRYPTO_CAST6 is not set
1101# CONFIG_CRYPTO_TEA is not set 1141CONFIG_CRYPTO_DES=y
1102# CONFIG_CRYPTO_ARC4 is not set 1142# CONFIG_CRYPTO_FCRYPT is not set
1103# CONFIG_CRYPTO_KHAZAD is not set 1143# CONFIG_CRYPTO_KHAZAD is not set
1104# CONFIG_CRYPTO_ANUBIS is not set
1105# CONFIG_CRYPTO_SEED is not set
1106# CONFIG_CRYPTO_SALSA20 is not set 1144# CONFIG_CRYPTO_SALSA20 is not set
1145# CONFIG_CRYPTO_SEED is not set
1146# CONFIG_CRYPTO_SERPENT is not set
1147# CONFIG_CRYPTO_TEA is not set
1148# CONFIG_CRYPTO_TWOFISH is not set
1149
1150#
1151# Compression
1152#
1107# CONFIG_CRYPTO_DEFLATE is not set 1153# CONFIG_CRYPTO_DEFLATE is not set
1108# CONFIG_CRYPTO_MICHAEL_MIC is not set
1109# CONFIG_CRYPTO_CRC32C is not set
1110# CONFIG_CRYPTO_CAMELLIA is not set
1111# CONFIG_CRYPTO_TEST is not set
1112# CONFIG_CRYPTO_AUTHENC is not set
1113# CONFIG_CRYPTO_LZO is not set 1154# CONFIG_CRYPTO_LZO is not set
1114CONFIG_CRYPTO_HW=y 1155CONFIG_CRYPTO_HW=y
1115# CONFIG_CRYPTO_DEV_HIFN_795X is not set 1156# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1116# CONFIG_PPC_CLOCK is not set 1157# CONFIG_PPC_CLOCK is not set
1117CONFIG_PPC_LIB_RHEAP=y 1158CONFIG_PPC_LIB_RHEAP=y
1159# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/85xx/mpc8572_ds_defconfig b/arch/powerpc/configs/85xx/mpc8572_ds_defconfig
index 53aa6f3173a5..03627cfebcb4 100644
--- a/arch/powerpc/configs/85xx/mpc8572_ds_defconfig
+++ b/arch/powerpc/configs/85xx/mpc8572_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.25-rc7 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 31 11:37:06 2008 4# Mon Jun 9 08:52:35 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -32,6 +32,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 34CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_LOCKDEP_SUPPORT=y
35CONFIG_RWSEM_XCHGADD_ALGORITHM=y 37CONFIG_RWSEM_XCHGADD_ALGORITHM=y
36CONFIG_ARCH_HAS_ILOG2_U32=y 38CONFIG_ARCH_HAS_ILOG2_U32=y
37CONFIG_GENERIC_HWEIGHT=y 39CONFIG_GENERIC_HWEIGHT=y
@@ -90,6 +92,7 @@ CONFIG_INITRAMFS_SOURCE=""
90CONFIG_SYSCTL=y 92CONFIG_SYSCTL=y
91CONFIG_EMBEDDED=y 93CONFIG_EMBEDDED=y
92CONFIG_SYSCTL_SYSCALL=y 94CONFIG_SYSCTL_SYSCALL=y
95CONFIG_SYSCTL_SYSCALL_CHECK=y
93CONFIG_KALLSYMS=y 96CONFIG_KALLSYMS=y
94CONFIG_KALLSYMS_ALL=y 97CONFIG_KALLSYMS_ALL=y
95CONFIG_KALLSYMS_EXTRA_PASS=y 98CONFIG_KALLSYMS_EXTRA_PASS=y
@@ -117,12 +120,14 @@ CONFIG_HAVE_OPROFILE=y
117# CONFIG_KPROBES is not set 120# CONFIG_KPROBES is not set
118CONFIG_HAVE_KPROBES=y 121CONFIG_HAVE_KPROBES=y
119CONFIG_HAVE_KRETPROBES=y 122CONFIG_HAVE_KRETPROBES=y
123# CONFIG_HAVE_DMA_ATTRS is not set
120CONFIG_PROC_PAGE_MONITOR=y 124CONFIG_PROC_PAGE_MONITOR=y
121CONFIG_SLABINFO=y 125CONFIG_SLABINFO=y
122CONFIG_RT_MUTEXES=y 126CONFIG_RT_MUTEXES=y
123# CONFIG_TINY_SHMEM is not set 127# CONFIG_TINY_SHMEM is not set
124CONFIG_BASE_SMALL=0 128CONFIG_BASE_SMALL=0
125CONFIG_MODULES=y 129CONFIG_MODULES=y
130# CONFIG_MODULE_FORCE_LOAD is not set
126CONFIG_MODULE_UNLOAD=y 131CONFIG_MODULE_UNLOAD=y
127CONFIG_MODULE_FORCE_UNLOAD=y 132CONFIG_MODULE_FORCE_UNLOAD=y
128CONFIG_MODVERSIONS=y 133CONFIG_MODVERSIONS=y
@@ -162,6 +167,7 @@ CONFIG_MPC85xx=y
162# CONFIG_MPC85xx_CDS is not set 167# CONFIG_MPC85xx_CDS is not set
163# CONFIG_MPC85xx_MDS is not set 168# CONFIG_MPC85xx_MDS is not set
164CONFIG_MPC85xx_DS=y 169CONFIG_MPC85xx_DS=y
170# CONFIG_KSI8560 is not set
165# CONFIG_STX_GP3 is not set 171# CONFIG_STX_GP3 is not set
166# CONFIG_TQM8540 is not set 172# CONFIG_TQM8540 is not set
167# CONFIG_TQM8541 is not set 173# CONFIG_TQM8541 is not set
@@ -217,11 +223,13 @@ CONFIG_FLATMEM=y
217CONFIG_FLAT_NODE_MEM_MAP=y 223CONFIG_FLAT_NODE_MEM_MAP=y
218# CONFIG_SPARSEMEM_STATIC is not set 224# CONFIG_SPARSEMEM_STATIC is not set
219# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 225# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
226CONFIG_PAGEFLAGS_EXTENDED=y
220CONFIG_SPLIT_PTLOCK_CPUS=4 227CONFIG_SPLIT_PTLOCK_CPUS=4
221# CONFIG_RESOURCES_64BIT is not set 228# CONFIG_RESOURCES_64BIT is not set
222CONFIG_ZONE_DMA_FLAG=1 229CONFIG_ZONE_DMA_FLAG=1
223CONFIG_BOUNCE=y 230CONFIG_BOUNCE=y
224CONFIG_VIRT_TO_BUS=y 231CONFIG_VIRT_TO_BUS=y
232CONFIG_FORCE_MAX_ZONEORDER=11
225CONFIG_PROC_DEVICETREE=y 233CONFIG_PROC_DEVICETREE=y
226# CONFIG_CMDLINE_BOOL is not set 234# CONFIG_CMDLINE_BOOL is not set
227# CONFIG_PM is not set 235# CONFIG_PM is not set
@@ -246,6 +254,7 @@ CONFIG_PCI_LEGACY=y
246# CONFIG_PCI_DEBUG is not set 254# CONFIG_PCI_DEBUG is not set
247# CONFIG_PCCARD is not set 255# CONFIG_PCCARD is not set
248# CONFIG_HOTPLUG_PCI is not set 256# CONFIG_HOTPLUG_PCI is not set
257# CONFIG_HAS_RAPIDIO is not set
249 258
250# 259#
251# Advanced setup 260# Advanced setup
@@ -255,11 +264,12 @@ CONFIG_PCI_LEGACY=y
255# 264#
256# Default settings for advanced configuration options are used 265# Default settings for advanced configuration options are used
257# 266#
258CONFIG_HIGHMEM_START=0xfe000000
259CONFIG_LOWMEM_SIZE=0x30000000 267CONFIG_LOWMEM_SIZE=0x30000000
268CONFIG_PAGE_OFFSET=0xc0000000
260CONFIG_KERNEL_START=0xc0000000 269CONFIG_KERNEL_START=0xc0000000
270CONFIG_PHYSICAL_START=0x00000000
271CONFIG_PHYSICAL_ALIGN=0x10000000
261CONFIG_TASK_SIZE=0xc0000000 272CONFIG_TASK_SIZE=0xc0000000
262CONFIG_BOOT_LOAD=0x00800000
263 273
264# 274#
265# Networking 275# Networking
@@ -330,8 +340,10 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=y
330CONFIG_INET6_XFRM_MODE_BEET=y 340CONFIG_INET6_XFRM_MODE_BEET=y
331# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set 341# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
332CONFIG_IPV6_SIT=y 342CONFIG_IPV6_SIT=y
343CONFIG_IPV6_NDISC_NODETYPE=y
333# CONFIG_IPV6_TUNNEL is not set 344# CONFIG_IPV6_TUNNEL is not set
334# CONFIG_IPV6_MULTIPLE_TABLES is not set 345# CONFIG_IPV6_MULTIPLE_TABLES is not set
346# CONFIG_IPV6_MROUTE is not set
335# CONFIG_NETWORK_SECMARK is not set 347# CONFIG_NETWORK_SECMARK is not set
336# CONFIG_NETFILTER is not set 348# CONFIG_NETFILTER is not set
337# CONFIG_IP_DCCP is not set 349# CONFIG_IP_DCCP is not set
@@ -393,6 +405,7 @@ CONFIG_FW_LOADER=y
393# CONFIG_CONNECTOR is not set 405# CONFIG_CONNECTOR is not set
394# CONFIG_MTD is not set 406# CONFIG_MTD is not set
395CONFIG_OF_DEVICE=y 407CONFIG_OF_DEVICE=y
408CONFIG_OF_I2C=y
396# CONFIG_PARPORT is not set 409# CONFIG_PARPORT is not set
397CONFIG_BLK_DEV=y 410CONFIG_BLK_DEV=y
398# CONFIG_BLK_DEV_FD is not set 411# CONFIG_BLK_DEV_FD is not set
@@ -499,7 +512,11 @@ CONFIG_SCSI_LOWLEVEL=y
499# CONFIG_SCSI_SRP is not set 512# CONFIG_SCSI_SRP is not set
500CONFIG_ATA=y 513CONFIG_ATA=y
501# CONFIG_ATA_NONSTANDARD is not set 514# CONFIG_ATA_NONSTANDARD is not set
515CONFIG_SATA_PMP=y
502CONFIG_SATA_AHCI=y 516CONFIG_SATA_AHCI=y
517# CONFIG_SATA_SIL24 is not set
518# CONFIG_SATA_FSL is not set
519CONFIG_ATA_SFF=y
503# CONFIG_SATA_SVW is not set 520# CONFIG_SATA_SVW is not set
504# CONFIG_ATA_PIIX is not set 521# CONFIG_ATA_PIIX is not set
505# CONFIG_SATA_MV is not set 522# CONFIG_SATA_MV is not set
@@ -509,13 +526,11 @@ CONFIG_SATA_AHCI=y
509# CONFIG_SATA_PROMISE is not set 526# CONFIG_SATA_PROMISE is not set
510# CONFIG_SATA_SX4 is not set 527# CONFIG_SATA_SX4 is not set
511# CONFIG_SATA_SIL is not set 528# CONFIG_SATA_SIL is not set
512# CONFIG_SATA_SIL24 is not set
513# CONFIG_SATA_SIS is not set 529# CONFIG_SATA_SIS is not set
514# CONFIG_SATA_ULI is not set 530# CONFIG_SATA_ULI is not set
515# CONFIG_SATA_VIA is not set 531# CONFIG_SATA_VIA is not set
516# CONFIG_SATA_VITESSE is not set 532# CONFIG_SATA_VITESSE is not set
517# CONFIG_SATA_INIC162X is not set 533# CONFIG_SATA_INIC162X is not set
518# CONFIG_SATA_FSL is not set
519CONFIG_PATA_ALI=y 534CONFIG_PATA_ALI=y
520# CONFIG_PATA_AMD is not set 535# CONFIG_PATA_AMD is not set
521# CONFIG_PATA_ARTOP is not set 536# CONFIG_PATA_ARTOP is not set
@@ -555,6 +570,7 @@ CONFIG_PATA_ALI=y
555# CONFIG_PATA_VIA is not set 570# CONFIG_PATA_VIA is not set
556# CONFIG_PATA_WINBOND is not set 571# CONFIG_PATA_WINBOND is not set
557# CONFIG_PATA_PLATFORM is not set 572# CONFIG_PATA_PLATFORM is not set
573# CONFIG_PATA_SCH is not set
558# CONFIG_MD is not set 574# CONFIG_MD is not set
559# CONFIG_FUSION is not set 575# CONFIG_FUSION is not set
560 576
@@ -620,7 +636,6 @@ CONFIG_NETDEV_1000=y
620# CONFIG_SIS190 is not set 636# CONFIG_SIS190 is not set
621# CONFIG_SKGE is not set 637# CONFIG_SKGE is not set
622# CONFIG_SKY2 is not set 638# CONFIG_SKY2 is not set
623# CONFIG_SK98LIN is not set
624# CONFIG_VIA_VELOCITY is not set 639# CONFIG_VIA_VELOCITY is not set
625# CONFIG_TIGON3 is not set 640# CONFIG_TIGON3 is not set
626# CONFIG_BNX2 is not set 641# CONFIG_BNX2 is not set
@@ -640,6 +655,7 @@ CONFIG_NETDEV_10000=y
640# CONFIG_MLX4_CORE is not set 655# CONFIG_MLX4_CORE is not set
641# CONFIG_TEHUTI is not set 656# CONFIG_TEHUTI is not set
642# CONFIG_BNX2X is not set 657# CONFIG_BNX2X is not set
658# CONFIG_SFC is not set
643# CONFIG_TR is not set 659# CONFIG_TR is not set
644 660
645# 661#
@@ -647,6 +663,7 @@ CONFIG_NETDEV_10000=y
647# 663#
648# CONFIG_WLAN_PRE80211 is not set 664# CONFIG_WLAN_PRE80211 is not set
649# CONFIG_WLAN_80211 is not set 665# CONFIG_WLAN_80211 is not set
666# CONFIG_IWLWIFI_LEDS is not set
650 667
651# 668#
652# USB Network Adapters 669# USB Network Adapters
@@ -711,6 +728,7 @@ CONFIG_VT=y
711CONFIG_VT_CONSOLE=y 728CONFIG_VT_CONSOLE=y
712CONFIG_HW_CONSOLE=y 729CONFIG_HW_CONSOLE=y
713# CONFIG_VT_HW_CONSOLE_BINDING is not set 730# CONFIG_VT_HW_CONSOLE_BINDING is not set
731CONFIG_DEVKMEM=y
714# CONFIG_SERIAL_NONSTANDARD is not set 732# CONFIG_SERIAL_NONSTANDARD is not set
715# CONFIG_NOZOMI is not set 733# CONFIG_NOZOMI is not set
716 734
@@ -742,7 +760,6 @@ CONFIG_LEGACY_PTY_COUNT=256
742# CONFIG_IPMI_HANDLER is not set 760# CONFIG_IPMI_HANDLER is not set
743# CONFIG_HW_RANDOM is not set 761# CONFIG_HW_RANDOM is not set
744CONFIG_NVRAM=y 762CONFIG_NVRAM=y
745# CONFIG_GEN_RTC is not set
746# CONFIG_R3964 is not set 763# CONFIG_R3964 is not set
747# CONFIG_APPLICOM is not set 764# CONFIG_APPLICOM is not set
748# CONFIG_RAW_DRIVER is not set 765# CONFIG_RAW_DRIVER is not set
@@ -753,13 +770,6 @@ CONFIG_I2C_BOARDINFO=y
753# CONFIG_I2C_CHARDEV is not set 770# CONFIG_I2C_CHARDEV is not set
754 771
755# 772#
756# I2C Algorithms
757#
758# CONFIG_I2C_ALGOBIT is not set
759# CONFIG_I2C_ALGOPCF is not set
760# CONFIG_I2C_ALGOPCA is not set
761
762#
763# I2C Hardware Bus support 773# I2C Hardware Bus support
764# 774#
765# CONFIG_I2C_ALI1535 is not set 775# CONFIG_I2C_ALI1535 is not set
@@ -786,6 +796,7 @@ CONFIG_I2C_MPC=y
786# CONFIG_I2C_VIA is not set 796# CONFIG_I2C_VIA is not set
787# CONFIG_I2C_VIAPRO is not set 797# CONFIG_I2C_VIAPRO is not set
788# CONFIG_I2C_VOODOO3 is not set 798# CONFIG_I2C_VOODOO3 is not set
799# CONFIG_I2C_PCA_PLATFORM is not set
789 800
790# 801#
791# Miscellaneous I2C Chip support 802# Miscellaneous I2C Chip support
@@ -795,19 +806,13 @@ CONFIG_SENSORS_EEPROM=y
795# CONFIG_SENSORS_PCF8574 is not set 806# CONFIG_SENSORS_PCF8574 is not set
796# CONFIG_PCF8575 is not set 807# CONFIG_PCF8575 is not set
797# CONFIG_SENSORS_PCF8591 is not set 808# CONFIG_SENSORS_PCF8591 is not set
798# CONFIG_TPS65010 is not set
799# CONFIG_SENSORS_MAX6875 is not set 809# CONFIG_SENSORS_MAX6875 is not set
800# CONFIG_SENSORS_TSL2550 is not set 810# CONFIG_SENSORS_TSL2550 is not set
801# CONFIG_I2C_DEBUG_CORE is not set 811# CONFIG_I2C_DEBUG_CORE is not set
802# CONFIG_I2C_DEBUG_ALGO is not set 812# CONFIG_I2C_DEBUG_ALGO is not set
803# CONFIG_I2C_DEBUG_BUS is not set 813# CONFIG_I2C_DEBUG_BUS is not set
804# CONFIG_I2C_DEBUG_CHIP is not set 814# CONFIG_I2C_DEBUG_CHIP is not set
805
806#
807# SPI support
808#
809# CONFIG_SPI is not set 815# CONFIG_SPI is not set
810# CONFIG_SPI_MASTER is not set
811# CONFIG_W1 is not set 816# CONFIG_W1 is not set
812# CONFIG_POWER_SUPPLY is not set 817# CONFIG_POWER_SUPPLY is not set
813# CONFIG_HWMON is not set 818# CONFIG_HWMON is not set
@@ -824,13 +829,33 @@ CONFIG_SSB_POSSIBLE=y
824# Multifunction device drivers 829# Multifunction device drivers
825# 830#
826# CONFIG_MFD_SM501 is not set 831# CONFIG_MFD_SM501 is not set
832# CONFIG_HTC_PASIC3 is not set
827 833
828# 834#
829# Multimedia devices 835# Multimedia devices
830# 836#
837
838#
839# Multimedia core support
840#
831# CONFIG_VIDEO_DEV is not set 841# CONFIG_VIDEO_DEV is not set
832CONFIG_DVB_CORE=m 842CONFIG_DVB_CORE=m
833# CONFIG_DVB_CORE_ATTACH is not set 843CONFIG_VIDEO_MEDIA=m
844
845#
846# Multimedia drivers
847#
848# CONFIG_MEDIA_ATTACH is not set
849CONFIG_MEDIA_TUNER=m
850# CONFIG_MEDIA_TUNER_CUSTOMIZE is not set
851CONFIG_MEDIA_TUNER_SIMPLE=m
852CONFIG_MEDIA_TUNER_TDA8290=m
853CONFIG_MEDIA_TUNER_TDA9887=m
854CONFIG_MEDIA_TUNER_TEA5761=m
855CONFIG_MEDIA_TUNER_TEA5767=m
856CONFIG_MEDIA_TUNER_MT20XX=m
857CONFIG_MEDIA_TUNER_XC2028=m
858CONFIG_MEDIA_TUNER_XC5000=m
834CONFIG_DVB_CAPTURE_DRIVERS=y 859CONFIG_DVB_CAPTURE_DRIVERS=y
835 860
836# 861#
@@ -873,14 +898,17 @@ CONFIG_DVB_CAPTURE_DRIVERS=y
873# 898#
874# DVB-S (satellite) frontends 899# DVB-S (satellite) frontends
875# 900#
876# CONFIG_DVB_STV0299 is not set
877# CONFIG_DVB_CX24110 is not set 901# CONFIG_DVB_CX24110 is not set
878# CONFIG_DVB_CX24123 is not set 902# CONFIG_DVB_CX24123 is not set
879# CONFIG_DVB_TDA8083 is not set
880# CONFIG_DVB_MT312 is not set 903# CONFIG_DVB_MT312 is not set
881# CONFIG_DVB_VES1X93 is not set
882# CONFIG_DVB_S5H1420 is not set 904# CONFIG_DVB_S5H1420 is not set
905# CONFIG_DVB_STV0299 is not set
906# CONFIG_DVB_TDA8083 is not set
883# CONFIG_DVB_TDA10086 is not set 907# CONFIG_DVB_TDA10086 is not set
908# CONFIG_DVB_VES1X93 is not set
909# CONFIG_DVB_TUNER_ITD1000 is not set
910# CONFIG_DVB_TDA826X is not set
911# CONFIG_DVB_TUA6100 is not set
884 912
885# 913#
886# DVB-T (terrestrial) frontends 914# DVB-T (terrestrial) frontends
@@ -898,6 +926,7 @@ CONFIG_DVB_CAPTURE_DRIVERS=y
898# CONFIG_DVB_DIB3000MC is not set 926# CONFIG_DVB_DIB3000MC is not set
899# CONFIG_DVB_DIB7000M is not set 927# CONFIG_DVB_DIB7000M is not set
900# CONFIG_DVB_DIB7000P is not set 928# CONFIG_DVB_DIB7000P is not set
929# CONFIG_DVB_TDA10048 is not set
901 930
902# 931#
903# DVB-C (cable) frontends 932# DVB-C (cable) frontends
@@ -916,27 +945,21 @@ CONFIG_DVB_CAPTURE_DRIVERS=y
916# CONFIG_DVB_BCM3510 is not set 945# CONFIG_DVB_BCM3510 is not set
917# CONFIG_DVB_LGDT330X is not set 946# CONFIG_DVB_LGDT330X is not set
918# CONFIG_DVB_S5H1409 is not set 947# CONFIG_DVB_S5H1409 is not set
948# CONFIG_DVB_AU8522 is not set
949# CONFIG_DVB_S5H1411 is not set
919 950
920# 951#
921# Tuners/PLL support 952# Digital terrestrial only tuners/PLL
922# 953#
923# CONFIG_DVB_PLL is not set 954# CONFIG_DVB_PLL is not set
924# CONFIG_DVB_TDA826X is not set
925# CONFIG_DVB_TDA827X is not set
926# CONFIG_DVB_TDA18271 is not set
927# CONFIG_DVB_TUNER_QT1010 is not set
928# CONFIG_DVB_TUNER_MT2060 is not set
929# CONFIG_DVB_TUNER_MT2266 is not set
930# CONFIG_DVB_TUNER_MT2131 is not set
931# CONFIG_DVB_TUNER_DIB0070 is not set 955# CONFIG_DVB_TUNER_DIB0070 is not set
932# CONFIG_DVB_TUNER_XC5000 is not set
933 956
934# 957#
935# Miscellaneous devices 958# SEC control devices for DVB-S
936# 959#
937# CONFIG_DVB_LNBP21 is not set 960# CONFIG_DVB_LNBP21 is not set
961# CONFIG_DVB_ISL6405 is not set
938# CONFIG_DVB_ISL6421 is not set 962# CONFIG_DVB_ISL6421 is not set
939# CONFIG_DVB_TUA6100 is not set
940CONFIG_DAB=y 963CONFIG_DAB=y
941# CONFIG_USB_DABUSB is not set 964# CONFIG_USB_DABUSB is not set
942 965
@@ -1003,6 +1026,7 @@ CONFIG_SND_AC97_CODEC=y
1003# CONFIG_SND_AU8810 is not set 1026# CONFIG_SND_AU8810 is not set
1004# CONFIG_SND_AU8820 is not set 1027# CONFIG_SND_AU8820 is not set
1005# CONFIG_SND_AU8830 is not set 1028# CONFIG_SND_AU8830 is not set
1029# CONFIG_SND_AW2 is not set
1006# CONFIG_SND_AZT3328 is not set 1030# CONFIG_SND_AZT3328 is not set
1007# CONFIG_SND_BT87X is not set 1031# CONFIG_SND_BT87X is not set
1008# CONFIG_SND_CA0106 is not set 1032# CONFIG_SND_CA0106 is not set
@@ -1077,11 +1101,11 @@ CONFIG_SND_INTEL8X0=y
1077# CONFIG_SND_SOC is not set 1101# CONFIG_SND_SOC is not set
1078 1102
1079# 1103#
1080# SoC Audio support for SuperH 1104# ALSA SoC audio for Freescale SOCs
1081# 1105#
1082 1106
1083# 1107#
1084# ALSA SoC audio for Freescale SOCs 1108# SoC Audio for the Texas Instruments OMAP
1085# 1109#
1086 1110
1087# 1111#
@@ -1116,16 +1140,20 @@ CONFIG_USB_DEVICEFS=y
1116CONFIG_USB_DEVICE_CLASS=y 1140CONFIG_USB_DEVICE_CLASS=y
1117# CONFIG_USB_DYNAMIC_MINORS is not set 1141# CONFIG_USB_DYNAMIC_MINORS is not set
1118# CONFIG_USB_OTG is not set 1142# CONFIG_USB_OTG is not set
1143# CONFIG_USB_OTG_WHITELIST is not set
1144# CONFIG_USB_OTG_BLACKLIST_HUB is not set
1119 1145
1120# 1146#
1121# USB Host Controller Drivers 1147# USB Host Controller Drivers
1122# 1148#
1149# CONFIG_USB_C67X00_HCD is not set
1123CONFIG_USB_EHCI_HCD=y 1150CONFIG_USB_EHCI_HCD=y
1124# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1151# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1125# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1152# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1126# CONFIG_USB_EHCI_FSL is not set 1153# CONFIG_USB_EHCI_FSL is not set
1127CONFIG_USB_EHCI_HCD_PPC_OF=y 1154CONFIG_USB_EHCI_HCD_PPC_OF=y
1128# CONFIG_USB_ISP116X_HCD is not set 1155# CONFIG_USB_ISP116X_HCD is not set
1156# CONFIG_USB_ISP1760_HCD is not set
1129CONFIG_USB_OHCI_HCD=y 1157CONFIG_USB_OHCI_HCD=y
1130CONFIG_USB_OHCI_HCD_PPC_OF=y 1158CONFIG_USB_OHCI_HCD_PPC_OF=y
1131CONFIG_USB_OHCI_HCD_PPC_OF_BE=y 1159CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
@@ -1143,6 +1171,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1143# 1171#
1144# CONFIG_USB_ACM is not set 1172# CONFIG_USB_ACM is not set
1145# CONFIG_USB_PRINTER is not set 1173# CONFIG_USB_PRINTER is not set
1174# CONFIG_USB_WDM is not set
1146 1175
1147# 1176#
1148# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 1177# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -1162,7 +1191,9 @@ CONFIG_USB_STORAGE=y
1162# CONFIG_USB_STORAGE_SDDR55 is not set 1191# CONFIG_USB_STORAGE_SDDR55 is not set
1163# CONFIG_USB_STORAGE_JUMPSHOT is not set 1192# CONFIG_USB_STORAGE_JUMPSHOT is not set
1164# CONFIG_USB_STORAGE_ALAUDA is not set 1193# CONFIG_USB_STORAGE_ALAUDA is not set
1194# CONFIG_USB_STORAGE_ONETOUCH is not set
1165# CONFIG_USB_STORAGE_KARMA is not set 1195# CONFIG_USB_STORAGE_KARMA is not set
1196# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1166# CONFIG_USB_LIBUSUAL is not set 1197# CONFIG_USB_LIBUSUAL is not set
1167 1198
1168# 1199#
@@ -1200,10 +1231,12 @@ CONFIG_USB_MON=y
1200# CONFIG_USB_TRANCEVIBRATOR is not set 1231# CONFIG_USB_TRANCEVIBRATOR is not set
1201# CONFIG_USB_IOWARRIOR is not set 1232# CONFIG_USB_IOWARRIOR is not set
1202# CONFIG_USB_TEST is not set 1233# CONFIG_USB_TEST is not set
1234# CONFIG_USB_ISIGHTFW is not set
1203# CONFIG_USB_GADGET is not set 1235# CONFIG_USB_GADGET is not set
1204# CONFIG_MMC is not set 1236# CONFIG_MMC is not set
1205# CONFIG_MEMSTICK is not set 1237# CONFIG_MEMSTICK is not set
1206# CONFIG_NEW_LEDS is not set 1238# CONFIG_NEW_LEDS is not set
1239# CONFIG_ACCESSIBILITY is not set
1207# CONFIG_INFINIBAND is not set 1240# CONFIG_INFINIBAND is not set
1208# CONFIG_EDAC is not set 1241# CONFIG_EDAC is not set
1209CONFIG_RTC_LIB=y 1242CONFIG_RTC_LIB=y
@@ -1255,11 +1288,8 @@ CONFIG_RTC_DRV_CMOS=y
1255# 1288#
1256# on-CPU RTC drivers 1289# on-CPU RTC drivers
1257# 1290#
1291# CONFIG_RTC_DRV_PPC is not set
1258# CONFIG_DMADEVICES is not set 1292# CONFIG_DMADEVICES is not set
1259
1260#
1261# Userspace I/O
1262#
1263# CONFIG_UIO is not set 1293# CONFIG_UIO is not set
1264 1294
1265# 1295#
@@ -1279,7 +1309,6 @@ CONFIG_FS_MBCACHE=y
1279# CONFIG_JFS_FS is not set 1309# CONFIG_JFS_FS is not set
1280# CONFIG_FS_POSIX_ACL is not set 1310# CONFIG_FS_POSIX_ACL is not set
1281# CONFIG_XFS_FS is not set 1311# CONFIG_XFS_FS is not set
1282# CONFIG_GFS2_FS is not set
1283# CONFIG_OCFS2_FS is not set 1312# CONFIG_OCFS2_FS is not set
1284CONFIG_DNOTIFY=y 1313CONFIG_DNOTIFY=y
1285CONFIG_INOTIFY=y 1314CONFIG_INOTIFY=y
@@ -1349,10 +1378,9 @@ CONFIG_NFS_FS=y
1349CONFIG_NFS_V3=y 1378CONFIG_NFS_V3=y
1350# CONFIG_NFS_V3_ACL is not set 1379# CONFIG_NFS_V3_ACL is not set
1351CONFIG_NFS_V4=y 1380CONFIG_NFS_V4=y
1352# CONFIG_NFS_DIRECTIO is not set
1353CONFIG_NFSD=y 1381CONFIG_NFSD=y
1354# CONFIG_NFSD_V3 is not set 1382# CONFIG_NFSD_V3 is not set
1355CONFIG_NFSD_TCP=y 1383# CONFIG_NFSD_V4 is not set
1356CONFIG_ROOT_NFS=y 1384CONFIG_ROOT_NFS=y
1357CONFIG_LOCKD=y 1385CONFIG_LOCKD=y
1358CONFIG_LOCKD_V4=y 1386CONFIG_LOCKD_V4=y
@@ -1436,9 +1464,10 @@ CONFIG_NLS_UTF8=m
1436# Library routines 1464# Library routines
1437# 1465#
1438CONFIG_BITREVERSE=y 1466CONFIG_BITREVERSE=y
1467# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1439# CONFIG_CRC_CCITT is not set 1468# CONFIG_CRC_CCITT is not set
1440# CONFIG_CRC16 is not set 1469# CONFIG_CRC16 is not set
1441# CONFIG_CRC_ITU_T is not set 1470CONFIG_CRC_ITU_T=m
1442CONFIG_CRC32=y 1471CONFIG_CRC32=y
1443# CONFIG_CRC7 is not set 1472# CONFIG_CRC7 is not set
1444CONFIG_LIBCRC32C=m 1473CONFIG_LIBCRC32C=m
@@ -1447,6 +1476,7 @@ CONFIG_PLIST=y
1447CONFIG_HAS_IOMEM=y 1476CONFIG_HAS_IOMEM=y
1448CONFIG_HAS_IOPORT=y 1477CONFIG_HAS_IOPORT=y
1449CONFIG_HAS_DMA=y 1478CONFIG_HAS_DMA=y
1479CONFIG_HAVE_LMB=y
1450 1480
1451# 1481#
1452# Kernel hacking 1482# Kernel hacking
@@ -1454,6 +1484,7 @@ CONFIG_HAS_DMA=y
1454# CONFIG_PRINTK_TIME is not set 1484# CONFIG_PRINTK_TIME is not set
1455CONFIG_ENABLE_WARN_DEPRECATED=y 1485CONFIG_ENABLE_WARN_DEPRECATED=y
1456CONFIG_ENABLE_MUST_CHECK=y 1486CONFIG_ENABLE_MUST_CHECK=y
1487CONFIG_FRAME_WARN=1024
1457# CONFIG_MAGIC_SYSRQ is not set 1488# CONFIG_MAGIC_SYSRQ is not set
1458# CONFIG_UNUSED_SYMBOLS is not set 1489# CONFIG_UNUSED_SYMBOLS is not set
1459# CONFIG_DEBUG_FS is not set 1490# CONFIG_DEBUG_FS is not set
@@ -1464,6 +1495,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
1464CONFIG_SCHED_DEBUG=y 1495CONFIG_SCHED_DEBUG=y
1465# CONFIG_SCHEDSTATS is not set 1496# CONFIG_SCHEDSTATS is not set
1466# CONFIG_TIMER_STATS is not set 1497# CONFIG_TIMER_STATS is not set
1498# CONFIG_DEBUG_OBJECTS is not set
1467# CONFIG_SLUB_DEBUG_ON is not set 1499# CONFIG_SLUB_DEBUG_ON is not set
1468# CONFIG_SLUB_STATS is not set 1500# CONFIG_SLUB_STATS is not set
1469# CONFIG_DEBUG_RT_MUTEXES is not set 1501# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -1477,6 +1509,7 @@ CONFIG_SCHED_DEBUG=y
1477# CONFIG_DEBUG_BUGVERBOSE is not set 1509# CONFIG_DEBUG_BUGVERBOSE is not set
1478CONFIG_DEBUG_INFO=y 1510CONFIG_DEBUG_INFO=y
1479# CONFIG_DEBUG_VM is not set 1511# CONFIG_DEBUG_VM is not set
1512# CONFIG_DEBUG_WRITECOUNT is not set
1480# CONFIG_DEBUG_LIST is not set 1513# CONFIG_DEBUG_LIST is not set
1481# CONFIG_DEBUG_SG is not set 1514# CONFIG_DEBUG_SG is not set
1482# CONFIG_BOOT_PRINTK_DELAY is not set 1515# CONFIG_BOOT_PRINTK_DELAY is not set
@@ -1488,6 +1521,7 @@ CONFIG_DEBUG_INFO=y
1488# CONFIG_DEBUG_STACK_USAGE is not set 1521# CONFIG_DEBUG_STACK_USAGE is not set
1489# CONFIG_DEBUG_PAGEALLOC is not set 1522# CONFIG_DEBUG_PAGEALLOC is not set
1490# CONFIG_DEBUGGER is not set 1523# CONFIG_DEBUGGER is not set
1524# CONFIG_IRQSTACKS is not set
1491# CONFIG_BDI_SWITCH is not set 1525# CONFIG_BDI_SWITCH is not set
1492# CONFIG_PPC_EARLY_DEBUG is not set 1526# CONFIG_PPC_EARLY_DEBUG is not set
1493 1527
@@ -1498,52 +1532,82 @@ CONFIG_DEBUG_INFO=y
1498# CONFIG_SECURITY is not set 1532# CONFIG_SECURITY is not set
1499# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1533# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1500CONFIG_CRYPTO=y 1534CONFIG_CRYPTO=y
1535
1536#
1537# Crypto core or helper
1538#
1501CONFIG_CRYPTO_ALGAPI=y 1539CONFIG_CRYPTO_ALGAPI=y
1502CONFIG_CRYPTO_BLKCIPHER=y 1540CONFIG_CRYPTO_BLKCIPHER=y
1503# CONFIG_CRYPTO_SEQIV is not set
1504CONFIG_CRYPTO_HASH=y 1541CONFIG_CRYPTO_HASH=y
1505CONFIG_CRYPTO_MANAGER=y 1542CONFIG_CRYPTO_MANAGER=y
1543# CONFIG_CRYPTO_GF128MUL is not set
1544# CONFIG_CRYPTO_NULL is not set
1545# CONFIG_CRYPTO_CRYPTD is not set
1546# CONFIG_CRYPTO_AUTHENC is not set
1547# CONFIG_CRYPTO_TEST is not set
1548
1549#
1550# Authenticated Encryption with Associated Data
1551#
1552# CONFIG_CRYPTO_CCM is not set
1553# CONFIG_CRYPTO_GCM is not set
1554# CONFIG_CRYPTO_SEQIV is not set
1555
1556#
1557# Block modes
1558#
1559CONFIG_CRYPTO_CBC=y
1560# CONFIG_CRYPTO_CTR is not set
1561# CONFIG_CRYPTO_CTS is not set
1562# CONFIG_CRYPTO_ECB is not set
1563# CONFIG_CRYPTO_LRW is not set
1564CONFIG_CRYPTO_PCBC=m
1565# CONFIG_CRYPTO_XTS is not set
1566
1567#
1568# Hash modes
1569#
1506CONFIG_CRYPTO_HMAC=y 1570CONFIG_CRYPTO_HMAC=y
1507# CONFIG_CRYPTO_XCBC is not set 1571# CONFIG_CRYPTO_XCBC is not set
1508# CONFIG_CRYPTO_NULL is not set 1572
1573#
1574# Digest
1575#
1576# CONFIG_CRYPTO_CRC32C is not set
1509# CONFIG_CRYPTO_MD4 is not set 1577# CONFIG_CRYPTO_MD4 is not set
1510CONFIG_CRYPTO_MD5=y 1578CONFIG_CRYPTO_MD5=y
1579# CONFIG_CRYPTO_MICHAEL_MIC is not set
1511CONFIG_CRYPTO_SHA1=m 1580CONFIG_CRYPTO_SHA1=m
1512# CONFIG_CRYPTO_SHA256 is not set 1581# CONFIG_CRYPTO_SHA256 is not set
1513# CONFIG_CRYPTO_SHA512 is not set 1582# CONFIG_CRYPTO_SHA512 is not set
1514# CONFIG_CRYPTO_WP512 is not set
1515# CONFIG_CRYPTO_TGR192 is not set 1583# CONFIG_CRYPTO_TGR192 is not set
1516# CONFIG_CRYPTO_GF128MUL is not set 1584# CONFIG_CRYPTO_WP512 is not set
1517# CONFIG_CRYPTO_ECB is not set 1585
1518CONFIG_CRYPTO_CBC=y 1586#
1519CONFIG_CRYPTO_PCBC=m 1587# Ciphers
1520# CONFIG_CRYPTO_LRW is not set 1588#
1521# CONFIG_CRYPTO_XTS is not set
1522# CONFIG_CRYPTO_CTR is not set
1523# CONFIG_CRYPTO_GCM is not set
1524# CONFIG_CRYPTO_CCM is not set
1525# CONFIG_CRYPTO_CRYPTD is not set
1526CONFIG_CRYPTO_DES=y
1527# CONFIG_CRYPTO_FCRYPT is not set
1528# CONFIG_CRYPTO_BLOWFISH is not set
1529# CONFIG_CRYPTO_TWOFISH is not set
1530# CONFIG_CRYPTO_SERPENT is not set
1531# CONFIG_CRYPTO_AES is not set 1589# CONFIG_CRYPTO_AES is not set
1590# CONFIG_CRYPTO_ANUBIS is not set
1591# CONFIG_CRYPTO_ARC4 is not set
1592# CONFIG_CRYPTO_BLOWFISH is not set
1593# CONFIG_CRYPTO_CAMELLIA is not set
1532# CONFIG_CRYPTO_CAST5 is not set 1594# CONFIG_CRYPTO_CAST5 is not set
1533# CONFIG_CRYPTO_CAST6 is not set 1595# CONFIG_CRYPTO_CAST6 is not set
1534# CONFIG_CRYPTO_TEA is not set 1596CONFIG_CRYPTO_DES=y
1535# CONFIG_CRYPTO_ARC4 is not set 1597# CONFIG_CRYPTO_FCRYPT is not set
1536# CONFIG_CRYPTO_KHAZAD is not set 1598# CONFIG_CRYPTO_KHAZAD is not set
1537# CONFIG_CRYPTO_ANUBIS is not set
1538# CONFIG_CRYPTO_SEED is not set
1539# CONFIG_CRYPTO_SALSA20 is not set 1599# CONFIG_CRYPTO_SALSA20 is not set
1600# CONFIG_CRYPTO_SEED is not set
1601# CONFIG_CRYPTO_SERPENT is not set
1602# CONFIG_CRYPTO_TEA is not set
1603# CONFIG_CRYPTO_TWOFISH is not set
1604
1605#
1606# Compression
1607#
1540# CONFIG_CRYPTO_DEFLATE is not set 1608# CONFIG_CRYPTO_DEFLATE is not set
1541# CONFIG_CRYPTO_MICHAEL_MIC is not set
1542# CONFIG_CRYPTO_CRC32C is not set
1543# CONFIG_CRYPTO_CAMELLIA is not set
1544# CONFIG_CRYPTO_TEST is not set
1545# CONFIG_CRYPTO_AUTHENC is not set
1546# CONFIG_CRYPTO_LZO is not set 1609# CONFIG_CRYPTO_LZO is not set
1547CONFIG_CRYPTO_HW=y 1610CONFIG_CRYPTO_HW=y
1548# CONFIG_CRYPTO_DEV_HIFN_795X is not set 1611# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1549# CONFIG_PPC_CLOCK is not set 1612# CONFIG_PPC_CLOCK is not set
1613# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/85xx/mpc85xx_cds_defconfig b/arch/powerpc/configs/85xx/mpc85xx_cds_defconfig
index a469fe918816..b09f0032a10b 100644
--- a/arch/powerpc/configs/85xx/mpc85xx_cds_defconfig
+++ b/arch/powerpc/configs/85xx/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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 24 08:48:30 2008 4# Mon Jun 9 08:52:36 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -32,6 +32,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 34CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_LOCKDEP_SUPPORT=y
35CONFIG_RWSEM_XCHGADD_ALGORITHM=y 37CONFIG_RWSEM_XCHGADD_ALGORITHM=y
36CONFIG_ARCH_HAS_ILOG2_U32=y 38CONFIG_ARCH_HAS_ILOG2_U32=y
37CONFIG_GENERIC_HWEIGHT=y 39CONFIG_GENERIC_HWEIGHT=y
@@ -87,6 +89,7 @@ CONFIG_INITRAMFS_SOURCE=""
87CONFIG_SYSCTL=y 89CONFIG_SYSCTL=y
88CONFIG_EMBEDDED=y 90CONFIG_EMBEDDED=y
89CONFIG_SYSCTL_SYSCALL=y 91CONFIG_SYSCTL_SYSCALL=y
92CONFIG_SYSCTL_SYSCALL_CHECK=y
90CONFIG_KALLSYMS=y 93CONFIG_KALLSYMS=y
91# CONFIG_KALLSYMS_ALL is not set 94# CONFIG_KALLSYMS_ALL is not set
92# CONFIG_KALLSYMS_EXTRA_PASS is not set 95# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -113,6 +116,7 @@ CONFIG_SLUB=y
113CONFIG_HAVE_OPROFILE=y 116CONFIG_HAVE_OPROFILE=y
114CONFIG_HAVE_KPROBES=y 117CONFIG_HAVE_KPROBES=y
115CONFIG_HAVE_KRETPROBES=y 118CONFIG_HAVE_KRETPROBES=y
119# CONFIG_HAVE_DMA_ATTRS is not set
116CONFIG_PROC_PAGE_MONITOR=y 120CONFIG_PROC_PAGE_MONITOR=y
117CONFIG_SLABINFO=y 121CONFIG_SLABINFO=y
118CONFIG_RT_MUTEXES=y 122CONFIG_RT_MUTEXES=y
@@ -153,6 +157,7 @@ CONFIG_MPC85xx=y
153CONFIG_MPC85xx_CDS=y 157CONFIG_MPC85xx_CDS=y
154# CONFIG_MPC85xx_MDS is not set 158# CONFIG_MPC85xx_MDS is not set
155# CONFIG_MPC85xx_DS is not set 159# CONFIG_MPC85xx_DS is not set
160# CONFIG_KSI8560 is not set
156# CONFIG_STX_GP3 is not set 161# CONFIG_STX_GP3 is not set
157# CONFIG_TQM8540 is not set 162# CONFIG_TQM8540 is not set
158# CONFIG_TQM8541 is not set 163# CONFIG_TQM8541 is not set
@@ -208,11 +213,13 @@ CONFIG_FLATMEM=y
208CONFIG_FLAT_NODE_MEM_MAP=y 213CONFIG_FLAT_NODE_MEM_MAP=y
209# CONFIG_SPARSEMEM_STATIC is not set 214# CONFIG_SPARSEMEM_STATIC is not set
210# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 215# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
216CONFIG_PAGEFLAGS_EXTENDED=y
211CONFIG_SPLIT_PTLOCK_CPUS=4 217CONFIG_SPLIT_PTLOCK_CPUS=4
212# CONFIG_RESOURCES_64BIT is not set 218# CONFIG_RESOURCES_64BIT is not set
213CONFIG_ZONE_DMA_FLAG=1 219CONFIG_ZONE_DMA_FLAG=1
214CONFIG_BOUNCE=y 220CONFIG_BOUNCE=y
215CONFIG_VIRT_TO_BUS=y 221CONFIG_VIRT_TO_BUS=y
222CONFIG_FORCE_MAX_ZONEORDER=11
216CONFIG_PROC_DEVICETREE=y 223CONFIG_PROC_DEVICETREE=y
217# CONFIG_CMDLINE_BOOL is not set 224# CONFIG_CMDLINE_BOOL is not set
218# CONFIG_PM is not set 225# CONFIG_PM is not set
@@ -236,6 +243,7 @@ CONFIG_PCI_LEGACY=y
236# CONFIG_PCI_DEBUG is not set 243# CONFIG_PCI_DEBUG is not set
237# CONFIG_PCCARD is not set 244# CONFIG_PCCARD is not set
238# CONFIG_HOTPLUG_PCI is not set 245# CONFIG_HOTPLUG_PCI is not set
246# CONFIG_HAS_RAPIDIO is not set
239 247
240# 248#
241# Advanced setup 249# Advanced setup
@@ -245,11 +253,12 @@ CONFIG_PCI_LEGACY=y
245# 253#
246# Default settings for advanced configuration options are used 254# Default settings for advanced configuration options are used
247# 255#
248CONFIG_HIGHMEM_START=0xfe000000
249CONFIG_LOWMEM_SIZE=0x30000000 256CONFIG_LOWMEM_SIZE=0x30000000
257CONFIG_PAGE_OFFSET=0xc0000000
250CONFIG_KERNEL_START=0xc0000000 258CONFIG_KERNEL_START=0xc0000000
259CONFIG_PHYSICAL_START=0x00000000
260CONFIG_PHYSICAL_ALIGN=0x10000000
251CONFIG_TASK_SIZE=0xc0000000 261CONFIG_TASK_SIZE=0xc0000000
252CONFIG_BOOT_LOAD=0x00800000
253 262
254# 263#
255# Networking 264# Networking
@@ -297,8 +306,6 @@ CONFIG_TCP_CONG_CUBIC=y
297CONFIG_DEFAULT_TCP_CONG="cubic" 306CONFIG_DEFAULT_TCP_CONG="cubic"
298# CONFIG_TCP_MD5SIG is not set 307# CONFIG_TCP_MD5SIG is not set
299# CONFIG_IPV6 is not set 308# CONFIG_IPV6 is not set
300# CONFIG_INET6_XFRM_TUNNEL is not set
301# CONFIG_INET6_TUNNEL is not set
302# CONFIG_NETWORK_SECMARK is not set 309# CONFIG_NETWORK_SECMARK is not set
303# CONFIG_NETFILTER is not set 310# CONFIG_NETFILTER is not set
304# CONFIG_IP_DCCP is not set 311# CONFIG_IP_DCCP is not set
@@ -437,7 +444,7 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y
437CONFIG_BLK_DEV_VIA82CXXX=y 444CONFIG_BLK_DEV_VIA82CXXX=y
438# CONFIG_BLK_DEV_TC86C001 is not set 445# CONFIG_BLK_DEV_TC86C001 is not set
439CONFIG_BLK_DEV_IDEDMA=y 446CONFIG_BLK_DEV_IDEDMA=y
440CONFIG_IDE_ARCH_OBSOLETE_INIT=y 447# CONFIG_BLK_DEV_HD_ONLY is not set
441# CONFIG_BLK_DEV_HD is not set 448# CONFIG_BLK_DEV_HD is not set
442 449
443# 450#
@@ -515,7 +522,6 @@ CONFIG_E1000_NAPI=y
515# CONFIG_SIS190 is not set 522# CONFIG_SIS190 is not set
516# CONFIG_SKGE is not set 523# CONFIG_SKGE is not set
517# CONFIG_SKY2 is not set 524# CONFIG_SKY2 is not set
518# CONFIG_SK98LIN is not set
519# CONFIG_VIA_VELOCITY is not set 525# CONFIG_VIA_VELOCITY is not set
520# CONFIG_TIGON3 is not set 526# CONFIG_TIGON3 is not set
521# CONFIG_BNX2 is not set 527# CONFIG_BNX2 is not set
@@ -535,6 +541,7 @@ CONFIG_NETDEV_10000=y
535# CONFIG_MLX4_CORE is not set 541# CONFIG_MLX4_CORE is not set
536# CONFIG_TEHUTI is not set 542# CONFIG_TEHUTI is not set
537# CONFIG_BNX2X is not set 543# CONFIG_BNX2X is not set
544# CONFIG_SFC is not set
538# CONFIG_TR is not set 545# CONFIG_TR is not set
539 546
540# 547#
@@ -542,6 +549,7 @@ CONFIG_NETDEV_10000=y
542# 549#
543# CONFIG_WLAN_PRE80211 is not set 550# CONFIG_WLAN_PRE80211 is not set
544# CONFIG_WLAN_80211 is not set 551# CONFIG_WLAN_80211 is not set
552# CONFIG_IWLWIFI_LEDS is not set
545# CONFIG_WAN is not set 553# CONFIG_WAN is not set
546# CONFIG_FDDI is not set 554# CONFIG_FDDI is not set
547# CONFIG_HIPPI is not set 555# CONFIG_HIPPI is not set
@@ -588,6 +596,7 @@ CONFIG_INPUT=y
588# Character devices 596# Character devices
589# 597#
590# CONFIG_VT is not set 598# CONFIG_VT is not set
599CONFIG_DEVKMEM=y
591# CONFIG_SERIAL_NONSTANDARD is not set 600# CONFIG_SERIAL_NONSTANDARD is not set
592# CONFIG_NOZOMI is not set 601# CONFIG_NOZOMI is not set
593 602
@@ -624,12 +633,7 @@ CONFIG_GEN_RTC=y
624# CONFIG_TCG_TPM is not set 633# CONFIG_TCG_TPM is not set
625CONFIG_DEVPORT=y 634CONFIG_DEVPORT=y
626# CONFIG_I2C is not set 635# CONFIG_I2C is not set
627
628#
629# SPI support
630#
631# CONFIG_SPI is not set 636# CONFIG_SPI is not set
632# CONFIG_SPI_MASTER is not set
633# CONFIG_W1 is not set 637# CONFIG_W1 is not set
634# CONFIG_POWER_SUPPLY is not set 638# CONFIG_POWER_SUPPLY is not set
635CONFIG_HWMON=y 639CONFIG_HWMON=y
@@ -662,12 +666,22 @@ CONFIG_SSB_POSSIBLE=y
662# Multifunction device drivers 666# Multifunction device drivers
663# 667#
664# CONFIG_MFD_SM501 is not set 668# CONFIG_MFD_SM501 is not set
669# CONFIG_HTC_PASIC3 is not set
665 670
666# 671#
667# Multimedia devices 672# Multimedia devices
668# 673#
674
675#
676# Multimedia core support
677#
669# CONFIG_VIDEO_DEV is not set 678# CONFIG_VIDEO_DEV is not set
670# CONFIG_DVB_CORE is not set 679# CONFIG_DVB_CORE is not set
680# CONFIG_VIDEO_MEDIA is not set
681
682#
683# Multimedia drivers
684#
671CONFIG_DAB=y 685CONFIG_DAB=y
672 686
673# 687#
@@ -698,6 +712,8 @@ CONFIG_USB_ARCH_HAS_HCD=y
698CONFIG_USB_ARCH_HAS_OHCI=y 712CONFIG_USB_ARCH_HAS_OHCI=y
699CONFIG_USB_ARCH_HAS_EHCI=y 713CONFIG_USB_ARCH_HAS_EHCI=y
700# CONFIG_USB is not set 714# CONFIG_USB is not set
715# CONFIG_USB_OTG_WHITELIST is not set
716# CONFIG_USB_OTG_BLACKLIST_HUB is not set
701 717
702# 718#
703# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 719# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -706,14 +722,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
706# CONFIG_MMC is not set 722# CONFIG_MMC is not set
707# CONFIG_MEMSTICK is not set 723# CONFIG_MEMSTICK is not set
708# CONFIG_NEW_LEDS is not set 724# CONFIG_NEW_LEDS is not set
725# CONFIG_ACCESSIBILITY is not set
709# CONFIG_INFINIBAND is not set 726# CONFIG_INFINIBAND is not set
710# CONFIG_EDAC is not set 727# CONFIG_EDAC is not set
711# CONFIG_RTC_CLASS is not set 728# CONFIG_RTC_CLASS is not set
712# CONFIG_DMADEVICES is not set 729# CONFIG_DMADEVICES is not set
713
714#
715# Userspace I/O
716#
717# CONFIG_UIO is not set 730# CONFIG_UIO is not set
718 731
719# 732#
@@ -733,7 +746,6 @@ CONFIG_FS_MBCACHE=y
733# CONFIG_JFS_FS is not set 746# CONFIG_JFS_FS is not set
734# CONFIG_FS_POSIX_ACL is not set 747# CONFIG_FS_POSIX_ACL is not set
735# CONFIG_XFS_FS is not set 748# CONFIG_XFS_FS is not set
736# CONFIG_GFS2_FS is not set
737# CONFIG_OCFS2_FS is not set 749# CONFIG_OCFS2_FS is not set
738CONFIG_DNOTIFY=y 750CONFIG_DNOTIFY=y
739CONFIG_INOTIFY=y 751CONFIG_INOTIFY=y
@@ -790,7 +802,6 @@ CONFIG_NETWORK_FILESYSTEMS=y
790CONFIG_NFS_FS=y 802CONFIG_NFS_FS=y
791# CONFIG_NFS_V3 is not set 803# CONFIG_NFS_V3 is not set
792# CONFIG_NFS_V4 is not set 804# CONFIG_NFS_V4 is not set
793# CONFIG_NFS_DIRECTIO is not set
794# CONFIG_NFSD is not set 805# CONFIG_NFSD is not set
795CONFIG_ROOT_NFS=y 806CONFIG_ROOT_NFS=y
796CONFIG_LOCKD=y 807CONFIG_LOCKD=y
@@ -829,6 +840,7 @@ CONFIG_PARTITION_ADVANCED=y
829# Library routines 840# Library routines
830# 841#
831CONFIG_BITREVERSE=y 842CONFIG_BITREVERSE=y
843# CONFIG_GENERIC_FIND_FIRST_BIT is not set
832# CONFIG_CRC_CCITT is not set 844# CONFIG_CRC_CCITT is not set
833# CONFIG_CRC16 is not set 845# CONFIG_CRC16 is not set
834# CONFIG_CRC_ITU_T is not set 846# CONFIG_CRC_ITU_T is not set
@@ -839,6 +851,7 @@ CONFIG_PLIST=y
839CONFIG_HAS_IOMEM=y 851CONFIG_HAS_IOMEM=y
840CONFIG_HAS_IOPORT=y 852CONFIG_HAS_IOPORT=y
841CONFIG_HAS_DMA=y 853CONFIG_HAS_DMA=y
854CONFIG_HAVE_LMB=y
842 855
843# 856#
844# Kernel hacking 857# Kernel hacking
@@ -846,6 +859,7 @@ CONFIG_HAS_DMA=y
846# CONFIG_PRINTK_TIME is not set 859# CONFIG_PRINTK_TIME is not set
847CONFIG_ENABLE_WARN_DEPRECATED=y 860CONFIG_ENABLE_WARN_DEPRECATED=y
848CONFIG_ENABLE_MUST_CHECK=y 861CONFIG_ENABLE_MUST_CHECK=y
862CONFIG_FRAME_WARN=1024
849# CONFIG_MAGIC_SYSRQ is not set 863# CONFIG_MAGIC_SYSRQ is not set
850# CONFIG_UNUSED_SYMBOLS is not set 864# CONFIG_UNUSED_SYMBOLS is not set
851# CONFIG_DEBUG_FS is not set 865# CONFIG_DEBUG_FS is not set
@@ -856,6 +870,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
856CONFIG_SCHED_DEBUG=y 870CONFIG_SCHED_DEBUG=y
857# CONFIG_SCHEDSTATS is not set 871# CONFIG_SCHEDSTATS is not set
858# CONFIG_TIMER_STATS is not set 872# CONFIG_TIMER_STATS is not set
873# CONFIG_DEBUG_OBJECTS is not set
859# CONFIG_SLUB_DEBUG_ON is not set 874# CONFIG_SLUB_DEBUG_ON is not set
860# CONFIG_SLUB_STATS is not set 875# CONFIG_SLUB_STATS is not set
861# CONFIG_DEBUG_RT_MUTEXES is not set 876# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -868,6 +883,7 @@ CONFIG_DEBUG_MUTEXES=y
868# CONFIG_DEBUG_BUGVERBOSE is not set 883# CONFIG_DEBUG_BUGVERBOSE is not set
869# CONFIG_DEBUG_INFO is not set 884# CONFIG_DEBUG_INFO is not set
870# CONFIG_DEBUG_VM is not set 885# CONFIG_DEBUG_VM is not set
886# CONFIG_DEBUG_WRITECOUNT is not set
871# CONFIG_DEBUG_LIST is not set 887# CONFIG_DEBUG_LIST is not set
872# CONFIG_DEBUG_SG is not set 888# CONFIG_DEBUG_SG is not set
873# CONFIG_BOOT_PRINTK_DELAY is not set 889# CONFIG_BOOT_PRINTK_DELAY is not set
@@ -878,6 +894,7 @@ CONFIG_DEBUG_MUTEXES=y
878# CONFIG_DEBUG_STACK_USAGE is not set 894# CONFIG_DEBUG_STACK_USAGE is not set
879# CONFIG_DEBUG_PAGEALLOC is not set 895# CONFIG_DEBUG_PAGEALLOC is not set
880# CONFIG_DEBUGGER is not set 896# CONFIG_DEBUGGER is not set
897# CONFIG_IRQSTACKS is not set
881# CONFIG_BDI_SWITCH is not set 898# CONFIG_BDI_SWITCH is not set
882# CONFIG_PPC_EARLY_DEBUG is not set 899# CONFIG_PPC_EARLY_DEBUG is not set
883 900
@@ -888,48 +905,78 @@ CONFIG_DEBUG_MUTEXES=y
888# CONFIG_SECURITY is not set 905# CONFIG_SECURITY is not set
889# CONFIG_SECURITY_FILE_CAPABILITIES is not set 906# CONFIG_SECURITY_FILE_CAPABILITIES is not set
890CONFIG_CRYPTO=y 907CONFIG_CRYPTO=y
891# CONFIG_CRYPTO_SEQIV is not set 908
909#
910# Crypto core or helper
911#
892# CONFIG_CRYPTO_MANAGER is not set 912# CONFIG_CRYPTO_MANAGER is not set
913# CONFIG_CRYPTO_GF128MUL is not set
914# CONFIG_CRYPTO_NULL is not set
915# CONFIG_CRYPTO_CRYPTD is not set
916# CONFIG_CRYPTO_AUTHENC is not set
917
918#
919# Authenticated Encryption with Associated Data
920#
921# CONFIG_CRYPTO_CCM is not set
922# CONFIG_CRYPTO_GCM is not set
923# CONFIG_CRYPTO_SEQIV is not set
924
925#
926# Block modes
927#
928# CONFIG_CRYPTO_CBC is not set
929# CONFIG_CRYPTO_CTR is not set
930# CONFIG_CRYPTO_CTS is not set
931# CONFIG_CRYPTO_ECB is not set
932# CONFIG_CRYPTO_LRW is not set
933# CONFIG_CRYPTO_PCBC is not set
934# CONFIG_CRYPTO_XTS is not set
935
936#
937# Hash modes
938#
893# CONFIG_CRYPTO_HMAC is not set 939# CONFIG_CRYPTO_HMAC is not set
894# CONFIG_CRYPTO_XCBC is not set 940# CONFIG_CRYPTO_XCBC is not set
895# CONFIG_CRYPTO_NULL is not set 941
942#
943# Digest
944#
945# CONFIG_CRYPTO_CRC32C is not set
896# CONFIG_CRYPTO_MD4 is not set 946# CONFIG_CRYPTO_MD4 is not set
897# CONFIG_CRYPTO_MD5 is not set 947# CONFIG_CRYPTO_MD5 is not set
948# CONFIG_CRYPTO_MICHAEL_MIC is not set
898# CONFIG_CRYPTO_SHA1 is not set 949# CONFIG_CRYPTO_SHA1 is not set
899# CONFIG_CRYPTO_SHA256 is not set 950# CONFIG_CRYPTO_SHA256 is not set
900# CONFIG_CRYPTO_SHA512 is not set 951# CONFIG_CRYPTO_SHA512 is not set
901# CONFIG_CRYPTO_WP512 is not set
902# CONFIG_CRYPTO_TGR192 is not set 952# CONFIG_CRYPTO_TGR192 is not set
903# CONFIG_CRYPTO_GF128MUL is not set 953# CONFIG_CRYPTO_WP512 is not set
904# CONFIG_CRYPTO_ECB is not set 954
905# CONFIG_CRYPTO_CBC is not set 955#
906# CONFIG_CRYPTO_PCBC is not set 956# Ciphers
907# CONFIG_CRYPTO_LRW is not set 957#
908# CONFIG_CRYPTO_XTS is not set
909# CONFIG_CRYPTO_CTR is not set
910# CONFIG_CRYPTO_GCM is not set
911# CONFIG_CRYPTO_CCM is not set
912# CONFIG_CRYPTO_CRYPTD is not set
913# CONFIG_CRYPTO_DES is not set
914# CONFIG_CRYPTO_FCRYPT is not set
915# CONFIG_CRYPTO_BLOWFISH is not set
916# CONFIG_CRYPTO_TWOFISH is not set
917# CONFIG_CRYPTO_SERPENT is not set
918# CONFIG_CRYPTO_AES is not set 958# CONFIG_CRYPTO_AES is not set
959# CONFIG_CRYPTO_ANUBIS is not set
960# CONFIG_CRYPTO_ARC4 is not set
961# CONFIG_CRYPTO_BLOWFISH is not set
962# CONFIG_CRYPTO_CAMELLIA is not set
919# CONFIG_CRYPTO_CAST5 is not set 963# CONFIG_CRYPTO_CAST5 is not set
920# CONFIG_CRYPTO_CAST6 is not set 964# CONFIG_CRYPTO_CAST6 is not set
921# CONFIG_CRYPTO_TEA is not set 965# CONFIG_CRYPTO_DES is not set
922# CONFIG_CRYPTO_ARC4 is not set 966# CONFIG_CRYPTO_FCRYPT is not set
923# CONFIG_CRYPTO_KHAZAD is not set 967# CONFIG_CRYPTO_KHAZAD is not set
924# CONFIG_CRYPTO_ANUBIS is not set
925# CONFIG_CRYPTO_SEED is not set
926# CONFIG_CRYPTO_SALSA20 is not set 968# CONFIG_CRYPTO_SALSA20 is not set
969# CONFIG_CRYPTO_SEED is not set
970# CONFIG_CRYPTO_SERPENT is not set
971# CONFIG_CRYPTO_TEA is not set
972# CONFIG_CRYPTO_TWOFISH is not set
973
974#
975# Compression
976#
927# CONFIG_CRYPTO_DEFLATE is not set 977# CONFIG_CRYPTO_DEFLATE is not set
928# CONFIG_CRYPTO_MICHAEL_MIC is not set
929# CONFIG_CRYPTO_CRC32C is not set
930# CONFIG_CRYPTO_CAMELLIA is not set
931# CONFIG_CRYPTO_AUTHENC is not set
932# CONFIG_CRYPTO_LZO is not set 978# CONFIG_CRYPTO_LZO is not set
933CONFIG_CRYPTO_HW=y 979CONFIG_CRYPTO_HW=y
934# CONFIG_CRYPTO_DEV_HIFN_795X is not set 980# CONFIG_CRYPTO_DEV_HIFN_795X is not set
935# CONFIG_PPC_CLOCK is not set 981# CONFIG_PPC_CLOCK is not set
982# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/85xx/sbc8548_defconfig b/arch/powerpc/configs/85xx/sbc8548_defconfig
index 67f67978c742..24f7f44b4821 100644
--- a/arch/powerpc/configs/85xx/sbc8548_defconfig
+++ b/arch/powerpc/configs/85xx/sbc8548_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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 24 08:48:39 2008 4# Mon Jun 9 08:52:37 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -32,6 +32,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 34CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_LOCKDEP_SUPPORT=y
35CONFIG_RWSEM_XCHGADD_ALGORITHM=y 37CONFIG_RWSEM_XCHGADD_ALGORITHM=y
36CONFIG_ARCH_HAS_ILOG2_U32=y 38CONFIG_ARCH_HAS_ILOG2_U32=y
37CONFIG_GENERIC_HWEIGHT=y 39CONFIG_GENERIC_HWEIGHT=y
@@ -87,6 +89,7 @@ CONFIG_INITRAMFS_SOURCE=""
87CONFIG_SYSCTL=y 89CONFIG_SYSCTL=y
88CONFIG_EMBEDDED=y 90CONFIG_EMBEDDED=y
89CONFIG_SYSCTL_SYSCALL=y 91CONFIG_SYSCTL_SYSCALL=y
92CONFIG_SYSCTL_SYSCALL_CHECK=y
90CONFIG_KALLSYMS=y 93CONFIG_KALLSYMS=y
91# CONFIG_KALLSYMS_EXTRA_PASS is not set 94# CONFIG_KALLSYMS_EXTRA_PASS is not set
92CONFIG_HOTPLUG=y 95CONFIG_HOTPLUG=y
@@ -111,6 +114,7 @@ CONFIG_SLAB=y
111CONFIG_HAVE_OPROFILE=y 114CONFIG_HAVE_OPROFILE=y
112CONFIG_HAVE_KPROBES=y 115CONFIG_HAVE_KPROBES=y
113CONFIG_HAVE_KRETPROBES=y 116CONFIG_HAVE_KRETPROBES=y
117# CONFIG_HAVE_DMA_ATTRS is not set
114CONFIG_PROC_PAGE_MONITOR=y 118CONFIG_PROC_PAGE_MONITOR=y
115CONFIG_SLABINFO=y 119CONFIG_SLABINFO=y
116CONFIG_RT_MUTEXES=y 120CONFIG_RT_MUTEXES=y
@@ -151,6 +155,7 @@ CONFIG_MPC85xx=y
151# CONFIG_MPC85xx_CDS is not set 155# CONFIG_MPC85xx_CDS is not set
152# CONFIG_MPC85xx_MDS is not set 156# CONFIG_MPC85xx_MDS is not set
153# CONFIG_MPC85xx_DS is not set 157# CONFIG_MPC85xx_DS is not set
158# CONFIG_KSI8560 is not set
154# CONFIG_STX_GP3 is not set 159# CONFIG_STX_GP3 is not set
155# CONFIG_TQM8540 is not set 160# CONFIG_TQM8540 is not set
156# CONFIG_TQM8541 is not set 161# CONFIG_TQM8541 is not set
@@ -206,11 +211,13 @@ CONFIG_FLATMEM=y
206CONFIG_FLAT_NODE_MEM_MAP=y 211CONFIG_FLAT_NODE_MEM_MAP=y
207# CONFIG_SPARSEMEM_STATIC is not set 212# CONFIG_SPARSEMEM_STATIC is not set
208# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 213# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
214CONFIG_PAGEFLAGS_EXTENDED=y
209CONFIG_SPLIT_PTLOCK_CPUS=4 215CONFIG_SPLIT_PTLOCK_CPUS=4
210# CONFIG_RESOURCES_64BIT is not set 216# CONFIG_RESOURCES_64BIT is not set
211CONFIG_ZONE_DMA_FLAG=1 217CONFIG_ZONE_DMA_FLAG=1
212CONFIG_BOUNCE=y 218CONFIG_BOUNCE=y
213CONFIG_VIRT_TO_BUS=y 219CONFIG_VIRT_TO_BUS=y
220CONFIG_FORCE_MAX_ZONEORDER=11
214CONFIG_PROC_DEVICETREE=y 221CONFIG_PROC_DEVICETREE=y
215# CONFIG_CMDLINE_BOOL is not set 222# CONFIG_CMDLINE_BOOL is not set
216# CONFIG_PM is not set 223# CONFIG_PM is not set
@@ -233,6 +240,7 @@ CONFIG_ARCH_SUPPORTS_MSI=y
233CONFIG_PCI_LEGACY=y 240CONFIG_PCI_LEGACY=y
234# CONFIG_PCCARD is not set 241# CONFIG_PCCARD is not set
235# CONFIG_HOTPLUG_PCI is not set 242# CONFIG_HOTPLUG_PCI is not set
243# CONFIG_HAS_RAPIDIO is not set
236 244
237# 245#
238# Advanced setup 246# Advanced setup
@@ -242,11 +250,12 @@ CONFIG_PCI_LEGACY=y
242# 250#
243# Default settings for advanced configuration options are used 251# Default settings for advanced configuration options are used
244# 252#
245CONFIG_HIGHMEM_START=0xfe000000
246CONFIG_LOWMEM_SIZE=0x30000000 253CONFIG_LOWMEM_SIZE=0x30000000
254CONFIG_PAGE_OFFSET=0xc0000000
247CONFIG_KERNEL_START=0xc0000000 255CONFIG_KERNEL_START=0xc0000000
256CONFIG_PHYSICAL_START=0x00000000
257CONFIG_PHYSICAL_ALIGN=0x10000000
248CONFIG_TASK_SIZE=0xc0000000 258CONFIG_TASK_SIZE=0xc0000000
249CONFIG_BOOT_LOAD=0x00800000
250 259
251# 260#
252# Networking 261# Networking
@@ -294,8 +303,6 @@ CONFIG_TCP_CONG_CUBIC=y
294CONFIG_DEFAULT_TCP_CONG="cubic" 303CONFIG_DEFAULT_TCP_CONG="cubic"
295# CONFIG_TCP_MD5SIG is not set 304# CONFIG_TCP_MD5SIG is not set
296# CONFIG_IPV6 is not set 305# CONFIG_IPV6 is not set
297# CONFIG_INET6_XFRM_TUNNEL is not set
298# CONFIG_INET6_TUNNEL is not set
299# CONFIG_NETWORK_SECMARK is not set 306# CONFIG_NETWORK_SECMARK is not set
300# CONFIG_NETFILTER is not set 307# CONFIG_NETFILTER is not set
301# CONFIG_IP_DCCP is not set 308# CONFIG_IP_DCCP is not set
@@ -449,7 +456,6 @@ CONFIG_NETDEV_1000=y
449# CONFIG_SIS190 is not set 456# CONFIG_SIS190 is not set
450# CONFIG_SKGE is not set 457# CONFIG_SKGE is not set
451# CONFIG_SKY2 is not set 458# CONFIG_SKY2 is not set
452# CONFIG_SK98LIN is not set
453# CONFIG_VIA_VELOCITY is not set 459# CONFIG_VIA_VELOCITY is not set
454# CONFIG_TIGON3 is not set 460# CONFIG_TIGON3 is not set
455# CONFIG_BNX2 is not set 461# CONFIG_BNX2 is not set
@@ -469,6 +475,7 @@ CONFIG_NETDEV_10000=y
469# CONFIG_MLX4_CORE is not set 475# CONFIG_MLX4_CORE is not set
470# CONFIG_TEHUTI is not set 476# CONFIG_TEHUTI is not set
471# CONFIG_BNX2X is not set 477# CONFIG_BNX2X is not set
478# CONFIG_SFC is not set
472# CONFIG_TR is not set 479# CONFIG_TR is not set
473 480
474# 481#
@@ -476,6 +483,7 @@ CONFIG_NETDEV_10000=y
476# 483#
477# CONFIG_WLAN_PRE80211 is not set 484# CONFIG_WLAN_PRE80211 is not set
478# CONFIG_WLAN_80211 is not set 485# CONFIG_WLAN_80211 is not set
486# CONFIG_IWLWIFI_LEDS is not set
479# CONFIG_WAN is not set 487# CONFIG_WAN is not set
480# CONFIG_FDDI is not set 488# CONFIG_FDDI is not set
481# CONFIG_HIPPI is not set 489# CONFIG_HIPPI is not set
@@ -522,6 +530,7 @@ CONFIG_INPUT=y
522# Character devices 530# Character devices
523# 531#
524# CONFIG_VT is not set 532# CONFIG_VT is not set
533CONFIG_DEVKMEM=y
525# CONFIG_SERIAL_NONSTANDARD is not set 534# CONFIG_SERIAL_NONSTANDARD is not set
526# CONFIG_NOZOMI is not set 535# CONFIG_NOZOMI is not set
527 536
@@ -558,12 +567,7 @@ CONFIG_GEN_RTC=y
558# CONFIG_TCG_TPM is not set 567# CONFIG_TCG_TPM is not set
559CONFIG_DEVPORT=y 568CONFIG_DEVPORT=y
560# CONFIG_I2C is not set 569# CONFIG_I2C is not set
561
562#
563# SPI support
564#
565# CONFIG_SPI is not set 570# CONFIG_SPI is not set
566# CONFIG_SPI_MASTER is not set
567# CONFIG_W1 is not set 571# CONFIG_W1 is not set
568# CONFIG_POWER_SUPPLY is not set 572# CONFIG_POWER_SUPPLY is not set
569CONFIG_HWMON=y 573CONFIG_HWMON=y
@@ -596,12 +600,22 @@ CONFIG_SSB_POSSIBLE=y
596# Multifunction device drivers 600# Multifunction device drivers
597# 601#
598# CONFIG_MFD_SM501 is not set 602# CONFIG_MFD_SM501 is not set
603# CONFIG_HTC_PASIC3 is not set
599 604
600# 605#
601# Multimedia devices 606# Multimedia devices
602# 607#
608
609#
610# Multimedia core support
611#
603# CONFIG_VIDEO_DEV is not set 612# CONFIG_VIDEO_DEV is not set
604# CONFIG_DVB_CORE is not set 613# CONFIG_DVB_CORE is not set
614# CONFIG_VIDEO_MEDIA is not set
615
616#
617# Multimedia drivers
618#
605CONFIG_DAB=y 619CONFIG_DAB=y
606 620
607# 621#
@@ -628,14 +642,11 @@ CONFIG_VIDEO_OUTPUT_CONTROL=y
628# CONFIG_MMC is not set 642# CONFIG_MMC is not set
629# CONFIG_MEMSTICK is not set 643# CONFIG_MEMSTICK is not set
630# CONFIG_NEW_LEDS is not set 644# CONFIG_NEW_LEDS is not set
645# CONFIG_ACCESSIBILITY is not set
631# CONFIG_INFINIBAND is not set 646# CONFIG_INFINIBAND is not set
632# CONFIG_EDAC is not set 647# CONFIG_EDAC is not set
633# CONFIG_RTC_CLASS is not set 648# CONFIG_RTC_CLASS is not set
634# CONFIG_DMADEVICES is not set 649# CONFIG_DMADEVICES is not set
635
636#
637# Userspace I/O
638#
639# CONFIG_UIO is not set 650# CONFIG_UIO is not set
640 651
641# 652#
@@ -648,7 +659,6 @@ CONFIG_VIDEO_OUTPUT_CONTROL=y
648# CONFIG_JFS_FS is not set 659# CONFIG_JFS_FS is not set
649# CONFIG_FS_POSIX_ACL is not set 660# CONFIG_FS_POSIX_ACL is not set
650# CONFIG_XFS_FS is not set 661# CONFIG_XFS_FS is not set
651# CONFIG_GFS2_FS is not set
652# CONFIG_OCFS2_FS is not set 662# CONFIG_OCFS2_FS is not set
653CONFIG_DNOTIFY=y 663CONFIG_DNOTIFY=y
654CONFIG_INOTIFY=y 664CONFIG_INOTIFY=y
@@ -705,7 +715,6 @@ CONFIG_NETWORK_FILESYSTEMS=y
705CONFIG_NFS_FS=y 715CONFIG_NFS_FS=y
706# CONFIG_NFS_V3 is not set 716# CONFIG_NFS_V3 is not set
707# CONFIG_NFS_V4 is not set 717# CONFIG_NFS_V4 is not set
708# CONFIG_NFS_DIRECTIO is not set
709# CONFIG_NFSD is not set 718# CONFIG_NFSD is not set
710CONFIG_ROOT_NFS=y 719CONFIG_ROOT_NFS=y
711CONFIG_LOCKD=y 720CONFIG_LOCKD=y
@@ -732,6 +741,7 @@ CONFIG_MSDOS_PARTITION=y
732# Library routines 741# Library routines
733# 742#
734CONFIG_BITREVERSE=y 743CONFIG_BITREVERSE=y
744# CONFIG_GENERIC_FIND_FIRST_BIT is not set
735# CONFIG_CRC_CCITT is not set 745# CONFIG_CRC_CCITT is not set
736# CONFIG_CRC16 is not set 746# CONFIG_CRC16 is not set
737# CONFIG_CRC_ITU_T is not set 747# CONFIG_CRC_ITU_T is not set
@@ -742,6 +752,7 @@ CONFIG_PLIST=y
742CONFIG_HAS_IOMEM=y 752CONFIG_HAS_IOMEM=y
743CONFIG_HAS_IOPORT=y 753CONFIG_HAS_IOPORT=y
744CONFIG_HAS_DMA=y 754CONFIG_HAS_DMA=y
755CONFIG_HAVE_LMB=y
745 756
746# 757#
747# Kernel hacking 758# Kernel hacking
@@ -749,6 +760,7 @@ CONFIG_HAS_DMA=y
749# CONFIG_PRINTK_TIME is not set 760# CONFIG_PRINTK_TIME is not set
750CONFIG_ENABLE_WARN_DEPRECATED=y 761CONFIG_ENABLE_WARN_DEPRECATED=y
751CONFIG_ENABLE_MUST_CHECK=y 762CONFIG_ENABLE_MUST_CHECK=y
763CONFIG_FRAME_WARN=1024
752# CONFIG_MAGIC_SYSRQ is not set 764# CONFIG_MAGIC_SYSRQ is not set
753# CONFIG_UNUSED_SYMBOLS is not set 765# CONFIG_UNUSED_SYMBOLS is not set
754# CONFIG_DEBUG_FS is not set 766# CONFIG_DEBUG_FS is not set
@@ -756,6 +768,7 @@ CONFIG_ENABLE_MUST_CHECK=y
756# CONFIG_DEBUG_KERNEL is not set 768# CONFIG_DEBUG_KERNEL is not set
757# CONFIG_DEBUG_BUGVERBOSE is not set 769# CONFIG_DEBUG_BUGVERBOSE is not set
758# CONFIG_SAMPLES is not set 770# CONFIG_SAMPLES is not set
771# CONFIG_IRQSTACKS is not set
759# CONFIG_PPC_EARLY_DEBUG is not set 772# CONFIG_PPC_EARLY_DEBUG is not set
760 773
761# 774#
@@ -765,48 +778,78 @@ CONFIG_ENABLE_MUST_CHECK=y
765# CONFIG_SECURITY is not set 778# CONFIG_SECURITY is not set
766# CONFIG_SECURITY_FILE_CAPABILITIES is not set 779# CONFIG_SECURITY_FILE_CAPABILITIES is not set
767CONFIG_CRYPTO=y 780CONFIG_CRYPTO=y
768# CONFIG_CRYPTO_SEQIV is not set 781
782#
783# Crypto core or helper
784#
769# CONFIG_CRYPTO_MANAGER is not set 785# CONFIG_CRYPTO_MANAGER is not set
786# CONFIG_CRYPTO_GF128MUL is not set
787# CONFIG_CRYPTO_NULL is not set
788# CONFIG_CRYPTO_CRYPTD is not set
789# CONFIG_CRYPTO_AUTHENC is not set
790
791#
792# Authenticated Encryption with Associated Data
793#
794# CONFIG_CRYPTO_CCM is not set
795# CONFIG_CRYPTO_GCM is not set
796# CONFIG_CRYPTO_SEQIV is not set
797
798#
799# Block modes
800#
801# CONFIG_CRYPTO_CBC is not set
802# CONFIG_CRYPTO_CTR is not set
803# CONFIG_CRYPTO_CTS is not set
804# CONFIG_CRYPTO_ECB is not set
805# CONFIG_CRYPTO_LRW is not set
806# CONFIG_CRYPTO_PCBC is not set
807# CONFIG_CRYPTO_XTS is not set
808
809#
810# Hash modes
811#
770# CONFIG_CRYPTO_HMAC is not set 812# CONFIG_CRYPTO_HMAC is not set
771# CONFIG_CRYPTO_XCBC is not set 813# CONFIG_CRYPTO_XCBC is not set
772# CONFIG_CRYPTO_NULL is not set 814
815#
816# Digest
817#
818# CONFIG_CRYPTO_CRC32C is not set
773# CONFIG_CRYPTO_MD4 is not set 819# CONFIG_CRYPTO_MD4 is not set
774# CONFIG_CRYPTO_MD5 is not set 820# CONFIG_CRYPTO_MD5 is not set
821# CONFIG_CRYPTO_MICHAEL_MIC is not set
775# CONFIG_CRYPTO_SHA1 is not set 822# CONFIG_CRYPTO_SHA1 is not set
776# CONFIG_CRYPTO_SHA256 is not set 823# CONFIG_CRYPTO_SHA256 is not set
777# CONFIG_CRYPTO_SHA512 is not set 824# CONFIG_CRYPTO_SHA512 is not set
778# CONFIG_CRYPTO_WP512 is not set
779# CONFIG_CRYPTO_TGR192 is not set 825# CONFIG_CRYPTO_TGR192 is not set
780# CONFIG_CRYPTO_GF128MUL is not set 826# CONFIG_CRYPTO_WP512 is not set
781# CONFIG_CRYPTO_ECB is not set 827
782# CONFIG_CRYPTO_CBC is not set 828#
783# CONFIG_CRYPTO_PCBC is not set 829# Ciphers
784# CONFIG_CRYPTO_LRW is not set 830#
785# CONFIG_CRYPTO_XTS is not set
786# CONFIG_CRYPTO_CTR is not set
787# CONFIG_CRYPTO_GCM is not set
788# CONFIG_CRYPTO_CCM is not set
789# CONFIG_CRYPTO_CRYPTD is not set
790# CONFIG_CRYPTO_DES is not set
791# CONFIG_CRYPTO_FCRYPT is not set
792# CONFIG_CRYPTO_BLOWFISH is not set
793# CONFIG_CRYPTO_TWOFISH is not set
794# CONFIG_CRYPTO_SERPENT is not set
795# CONFIG_CRYPTO_AES is not set 831# CONFIG_CRYPTO_AES is not set
832# CONFIG_CRYPTO_ANUBIS is not set
833# CONFIG_CRYPTO_ARC4 is not set
834# CONFIG_CRYPTO_BLOWFISH is not set
835# CONFIG_CRYPTO_CAMELLIA is not set
796# CONFIG_CRYPTO_CAST5 is not set 836# CONFIG_CRYPTO_CAST5 is not set
797# CONFIG_CRYPTO_CAST6 is not set 837# CONFIG_CRYPTO_CAST6 is not set
798# CONFIG_CRYPTO_TEA is not set 838# CONFIG_CRYPTO_DES is not set
799# CONFIG_CRYPTO_ARC4 is not set 839# CONFIG_CRYPTO_FCRYPT is not set
800# CONFIG_CRYPTO_KHAZAD is not set 840# CONFIG_CRYPTO_KHAZAD is not set
801# CONFIG_CRYPTO_ANUBIS is not set
802# CONFIG_CRYPTO_SEED is not set
803# CONFIG_CRYPTO_SALSA20 is not set 841# CONFIG_CRYPTO_SALSA20 is not set
842# CONFIG_CRYPTO_SEED is not set
843# CONFIG_CRYPTO_SERPENT is not set
844# CONFIG_CRYPTO_TEA is not set
845# CONFIG_CRYPTO_TWOFISH is not set
846
847#
848# Compression
849#
804# CONFIG_CRYPTO_DEFLATE is not set 850# CONFIG_CRYPTO_DEFLATE is not set
805# CONFIG_CRYPTO_MICHAEL_MIC is not set
806# CONFIG_CRYPTO_CRC32C is not set
807# CONFIG_CRYPTO_CAMELLIA is not set
808# CONFIG_CRYPTO_AUTHENC is not set
809# CONFIG_CRYPTO_LZO is not set 851# CONFIG_CRYPTO_LZO is not set
810CONFIG_CRYPTO_HW=y 852CONFIG_CRYPTO_HW=y
811# CONFIG_CRYPTO_DEV_HIFN_795X is not set 853# CONFIG_CRYPTO_DEV_HIFN_795X is not set
812# CONFIG_PPC_CLOCK is not set 854# CONFIG_PPC_CLOCK is not set
855# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/85xx/sbc8560_defconfig b/arch/powerpc/configs/85xx/sbc8560_defconfig
index fef605579e29..655518dcd73f 100644
--- a/arch/powerpc/configs/85xx/sbc8560_defconfig
+++ b/arch/powerpc/configs/85xx/sbc8560_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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 24 08:48:39 2008 4# Mon Jun 9 08:52:38 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -32,6 +32,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 34CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_LOCKDEP_SUPPORT=y
35CONFIG_RWSEM_XCHGADD_ALGORITHM=y 37CONFIG_RWSEM_XCHGADD_ALGORITHM=y
36CONFIG_ARCH_HAS_ILOG2_U32=y 38CONFIG_ARCH_HAS_ILOG2_U32=y
37CONFIG_GENERIC_HWEIGHT=y 39CONFIG_GENERIC_HWEIGHT=y
@@ -87,6 +89,7 @@ CONFIG_INITRAMFS_SOURCE=""
87CONFIG_SYSCTL=y 89CONFIG_SYSCTL=y
88CONFIG_EMBEDDED=y 90CONFIG_EMBEDDED=y
89CONFIG_SYSCTL_SYSCALL=y 91CONFIG_SYSCTL_SYSCALL=y
92CONFIG_SYSCTL_SYSCALL_CHECK=y
90CONFIG_KALLSYMS=y 93CONFIG_KALLSYMS=y
91# CONFIG_KALLSYMS_ALL is not set 94# CONFIG_KALLSYMS_ALL is not set
92# CONFIG_KALLSYMS_EXTRA_PASS is not set 95# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -112,6 +115,7 @@ CONFIG_SLAB=y
112CONFIG_HAVE_OPROFILE=y 115CONFIG_HAVE_OPROFILE=y
113CONFIG_HAVE_KPROBES=y 116CONFIG_HAVE_KPROBES=y
114CONFIG_HAVE_KRETPROBES=y 117CONFIG_HAVE_KRETPROBES=y
118# CONFIG_HAVE_DMA_ATTRS is not set
115CONFIG_PROC_PAGE_MONITOR=y 119CONFIG_PROC_PAGE_MONITOR=y
116CONFIG_SLABINFO=y 120CONFIG_SLABINFO=y
117CONFIG_RT_MUTEXES=y 121CONFIG_RT_MUTEXES=y
@@ -152,6 +156,7 @@ CONFIG_MPC85xx=y
152# CONFIG_MPC85xx_CDS is not set 156# CONFIG_MPC85xx_CDS is not set
153# CONFIG_MPC85xx_MDS is not set 157# CONFIG_MPC85xx_MDS is not set
154# CONFIG_MPC85xx_DS is not set 158# CONFIG_MPC85xx_DS is not set
159# CONFIG_KSI8560 is not set
155# CONFIG_STX_GP3 is not set 160# CONFIG_STX_GP3 is not set
156# CONFIG_TQM8540 is not set 161# CONFIG_TQM8540 is not set
157# CONFIG_TQM8541 is not set 162# CONFIG_TQM8541 is not set
@@ -207,11 +212,13 @@ CONFIG_FLATMEM=y
207CONFIG_FLAT_NODE_MEM_MAP=y 212CONFIG_FLAT_NODE_MEM_MAP=y
208# CONFIG_SPARSEMEM_STATIC is not set 213# CONFIG_SPARSEMEM_STATIC is not set
209# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 214# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
215CONFIG_PAGEFLAGS_EXTENDED=y
210CONFIG_SPLIT_PTLOCK_CPUS=4 216CONFIG_SPLIT_PTLOCK_CPUS=4
211# CONFIG_RESOURCES_64BIT is not set 217# CONFIG_RESOURCES_64BIT is not set
212CONFIG_ZONE_DMA_FLAG=1 218CONFIG_ZONE_DMA_FLAG=1
213CONFIG_BOUNCE=y 219CONFIG_BOUNCE=y
214CONFIG_VIRT_TO_BUS=y 220CONFIG_VIRT_TO_BUS=y
221CONFIG_FORCE_MAX_ZONEORDER=11
215CONFIG_PROC_DEVICETREE=y 222CONFIG_PROC_DEVICETREE=y
216# CONFIG_CMDLINE_BOOL is not set 223# CONFIG_CMDLINE_BOOL is not set
217# CONFIG_PM is not set 224# CONFIG_PM is not set
@@ -228,6 +235,7 @@ CONFIG_FSL_SOC=y
228# CONFIG_PCI_SYSCALL is not set 235# CONFIG_PCI_SYSCALL is not set
229# CONFIG_ARCH_SUPPORTS_MSI is not set 236# CONFIG_ARCH_SUPPORTS_MSI is not set
230# CONFIG_PCCARD is not set 237# CONFIG_PCCARD is not set
238# CONFIG_HAS_RAPIDIO is not set
231 239
232# 240#
233# Advanced setup 241# Advanced setup
@@ -237,11 +245,12 @@ CONFIG_FSL_SOC=y
237# 245#
238# Default settings for advanced configuration options are used 246# Default settings for advanced configuration options are used
239# 247#
240CONFIG_HIGHMEM_START=0xfe000000
241CONFIG_LOWMEM_SIZE=0x30000000 248CONFIG_LOWMEM_SIZE=0x30000000
249CONFIG_PAGE_OFFSET=0xc0000000
242CONFIG_KERNEL_START=0xc0000000 250CONFIG_KERNEL_START=0xc0000000
251CONFIG_PHYSICAL_START=0x00000000
252CONFIG_PHYSICAL_ALIGN=0x10000000
243CONFIG_TASK_SIZE=0xc0000000 253CONFIG_TASK_SIZE=0xc0000000
244CONFIG_BOOT_LOAD=0x00800000
245 254
246# 255#
247# Networking 256# Networking
@@ -289,8 +298,6 @@ CONFIG_TCP_CONG_CUBIC=y
289CONFIG_DEFAULT_TCP_CONG="cubic" 298CONFIG_DEFAULT_TCP_CONG="cubic"
290# CONFIG_TCP_MD5SIG is not set 299# CONFIG_TCP_MD5SIG is not set
291# CONFIG_IPV6 is not set 300# CONFIG_IPV6 is not set
292# CONFIG_INET6_XFRM_TUNNEL is not set
293# CONFIG_INET6_TUNNEL is not set
294# CONFIG_NETWORK_SECMARK is not set 301# CONFIG_NETWORK_SECMARK is not set
295# CONFIG_NETFILTER is not set 302# CONFIG_NETFILTER is not set
296# CONFIG_IP_DCCP is not set 303# CONFIG_IP_DCCP is not set
@@ -418,6 +425,7 @@ CONFIG_NETDEV_10000=y
418# 425#
419# CONFIG_WLAN_PRE80211 is not set 426# CONFIG_WLAN_PRE80211 is not set
420# CONFIG_WLAN_80211 is not set 427# CONFIG_WLAN_80211 is not set
428# CONFIG_IWLWIFI_LEDS is not set
421# CONFIG_WAN is not set 429# CONFIG_WAN is not set
422# CONFIG_PPP is not set 430# CONFIG_PPP is not set
423# CONFIG_SLIP is not set 431# CONFIG_SLIP is not set
@@ -462,6 +470,7 @@ CONFIG_INPUT=y
462# Character devices 470# Character devices
463# 471#
464# CONFIG_VT is not set 472# CONFIG_VT is not set
473CONFIG_DEVKMEM=y
465# CONFIG_SERIAL_NONSTANDARD is not set 474# CONFIG_SERIAL_NONSTANDARD is not set
466 475
467# 476#
@@ -487,17 +496,11 @@ CONFIG_LEGACY_PTY_COUNT=256
487# CONFIG_IPMI_HANDLER is not set 496# CONFIG_IPMI_HANDLER is not set
488# CONFIG_HW_RANDOM is not set 497# CONFIG_HW_RANDOM is not set
489# CONFIG_NVRAM is not set 498# CONFIG_NVRAM is not set
490# CONFIG_GEN_RTC is not set
491# CONFIG_R3964 is not set 499# CONFIG_R3964 is not set
492# CONFIG_RAW_DRIVER is not set 500# CONFIG_RAW_DRIVER is not set
493# CONFIG_TCG_TPM is not set 501# CONFIG_TCG_TPM is not set
494# CONFIG_I2C is not set 502# CONFIG_I2C is not set
495
496#
497# SPI support
498#
499# CONFIG_SPI is not set 503# CONFIG_SPI is not set
500# CONFIG_SPI_MASTER is not set
501# CONFIG_W1 is not set 504# CONFIG_W1 is not set
502# CONFIG_POWER_SUPPLY is not set 505# CONFIG_POWER_SUPPLY is not set
503CONFIG_HWMON=y 506CONFIG_HWMON=y
@@ -526,12 +529,22 @@ CONFIG_SSB_POSSIBLE=y
526# Multifunction device drivers 529# Multifunction device drivers
527# 530#
528# CONFIG_MFD_SM501 is not set 531# CONFIG_MFD_SM501 is not set
532# CONFIG_HTC_PASIC3 is not set
529 533
530# 534#
531# Multimedia devices 535# Multimedia devices
532# 536#
537
538#
539# Multimedia core support
540#
533# CONFIG_VIDEO_DEV is not set 541# CONFIG_VIDEO_DEV is not set
534# CONFIG_DVB_CORE is not set 542# CONFIG_DVB_CORE is not set
543# CONFIG_VIDEO_MEDIA is not set
544
545#
546# Multimedia drivers
547#
535CONFIG_DAB=y 548CONFIG_DAB=y
536 549
537# 550#
@@ -559,6 +572,8 @@ CONFIG_USB_SUPPORT=y
559# CONFIG_USB_ARCH_HAS_HCD is not set 572# CONFIG_USB_ARCH_HAS_HCD is not set
560# CONFIG_USB_ARCH_HAS_OHCI is not set 573# CONFIG_USB_ARCH_HAS_OHCI is not set
561# CONFIG_USB_ARCH_HAS_EHCI is not set 574# CONFIG_USB_ARCH_HAS_EHCI is not set
575# CONFIG_USB_OTG_WHITELIST is not set
576# CONFIG_USB_OTG_BLACKLIST_HUB is not set
562 577
563# 578#
564# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 579# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -567,6 +582,7 @@ CONFIG_USB_SUPPORT=y
567# CONFIG_MMC is not set 582# CONFIG_MMC is not set
568# CONFIG_MEMSTICK is not set 583# CONFIG_MEMSTICK is not set
569# CONFIG_NEW_LEDS is not set 584# CONFIG_NEW_LEDS is not set
585# CONFIG_ACCESSIBILITY is not set
570# CONFIG_EDAC is not set 586# CONFIG_EDAC is not set
571CONFIG_RTC_LIB=y 587CONFIG_RTC_LIB=y
572CONFIG_RTC_CLASS=y 588CONFIG_RTC_CLASS=y
@@ -602,11 +618,8 @@ CONFIG_RTC_DRV_M48T59=y
602# 618#
603# on-CPU RTC drivers 619# on-CPU RTC drivers
604# 620#
621# CONFIG_RTC_DRV_PPC is not set
605# CONFIG_DMADEVICES is not set 622# CONFIG_DMADEVICES is not set
606
607#
608# Userspace I/O
609#
610# CONFIG_UIO is not set 623# CONFIG_UIO is not set
611 624
612# 625#
@@ -619,7 +632,6 @@ CONFIG_RTC_DRV_M48T59=y
619# CONFIG_JFS_FS is not set 632# CONFIG_JFS_FS is not set
620# CONFIG_FS_POSIX_ACL is not set 633# CONFIG_FS_POSIX_ACL is not set
621# CONFIG_XFS_FS is not set 634# CONFIG_XFS_FS is not set
622# CONFIG_GFS2_FS is not set
623# CONFIG_OCFS2_FS is not set 635# CONFIG_OCFS2_FS is not set
624CONFIG_DNOTIFY=y 636CONFIG_DNOTIFY=y
625CONFIG_INOTIFY=y 637CONFIG_INOTIFY=y
@@ -676,7 +688,6 @@ CONFIG_NETWORK_FILESYSTEMS=y
676CONFIG_NFS_FS=y 688CONFIG_NFS_FS=y
677# CONFIG_NFS_V3 is not set 689# CONFIG_NFS_V3 is not set
678# CONFIG_NFS_V4 is not set 690# CONFIG_NFS_V4 is not set
679# CONFIG_NFS_DIRECTIO is not set
680# CONFIG_NFSD is not set 691# CONFIG_NFSD is not set
681CONFIG_ROOT_NFS=y 692CONFIG_ROOT_NFS=y
682CONFIG_LOCKD=y 693CONFIG_LOCKD=y
@@ -715,6 +726,7 @@ CONFIG_PARTITION_ADVANCED=y
715# Library routines 726# Library routines
716# 727#
717CONFIG_BITREVERSE=y 728CONFIG_BITREVERSE=y
729# CONFIG_GENERIC_FIND_FIRST_BIT is not set
718# CONFIG_CRC_CCITT is not set 730# CONFIG_CRC_CCITT is not set
719# CONFIG_CRC16 is not set 731# CONFIG_CRC16 is not set
720# CONFIG_CRC_ITU_T is not set 732# CONFIG_CRC_ITU_T is not set
@@ -725,6 +737,7 @@ CONFIG_PLIST=y
725CONFIG_HAS_IOMEM=y 737CONFIG_HAS_IOMEM=y
726CONFIG_HAS_IOPORT=y 738CONFIG_HAS_IOPORT=y
727CONFIG_HAS_DMA=y 739CONFIG_HAS_DMA=y
740CONFIG_HAVE_LMB=y
728 741
729# 742#
730# Kernel hacking 743# Kernel hacking
@@ -732,6 +745,7 @@ CONFIG_HAS_DMA=y
732# CONFIG_PRINTK_TIME is not set 745# CONFIG_PRINTK_TIME is not set
733CONFIG_ENABLE_WARN_DEPRECATED=y 746CONFIG_ENABLE_WARN_DEPRECATED=y
734CONFIG_ENABLE_MUST_CHECK=y 747CONFIG_ENABLE_MUST_CHECK=y
748CONFIG_FRAME_WARN=1024
735CONFIG_MAGIC_SYSRQ=y 749CONFIG_MAGIC_SYSRQ=y
736# CONFIG_UNUSED_SYMBOLS is not set 750# CONFIG_UNUSED_SYMBOLS is not set
737# CONFIG_DEBUG_FS is not set 751# CONFIG_DEBUG_FS is not set
@@ -742,6 +756,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
742CONFIG_SCHED_DEBUG=y 756CONFIG_SCHED_DEBUG=y
743# CONFIG_SCHEDSTATS is not set 757# CONFIG_SCHEDSTATS is not set
744# CONFIG_TIMER_STATS is not set 758# CONFIG_TIMER_STATS is not set
759# CONFIG_DEBUG_OBJECTS is not set
745# CONFIG_DEBUG_SLAB is not set 760# CONFIG_DEBUG_SLAB is not set
746# CONFIG_DEBUG_RT_MUTEXES is not set 761# CONFIG_DEBUG_RT_MUTEXES is not set
747# CONFIG_RT_MUTEX_TESTER is not set 762# CONFIG_RT_MUTEX_TESTER is not set
@@ -753,6 +768,7 @@ CONFIG_DEBUG_MUTEXES=y
753# CONFIG_DEBUG_BUGVERBOSE is not set 768# CONFIG_DEBUG_BUGVERBOSE is not set
754# CONFIG_DEBUG_INFO is not set 769# CONFIG_DEBUG_INFO is not set
755# CONFIG_DEBUG_VM is not set 770# CONFIG_DEBUG_VM is not set
771# CONFIG_DEBUG_WRITECOUNT is not set
756# CONFIG_DEBUG_LIST is not set 772# CONFIG_DEBUG_LIST is not set
757# CONFIG_DEBUG_SG is not set 773# CONFIG_DEBUG_SG is not set
758# CONFIG_BOOT_PRINTK_DELAY is not set 774# CONFIG_BOOT_PRINTK_DELAY is not set
@@ -763,6 +779,7 @@ CONFIG_DEBUG_MUTEXES=y
763# CONFIG_DEBUG_STACK_USAGE is not set 779# CONFIG_DEBUG_STACK_USAGE is not set
764# CONFIG_DEBUG_PAGEALLOC is not set 780# CONFIG_DEBUG_PAGEALLOC is not set
765# CONFIG_DEBUGGER is not set 781# CONFIG_DEBUGGER is not set
782# CONFIG_IRQSTACKS is not set
766# CONFIG_BDI_SWITCH is not set 783# CONFIG_BDI_SWITCH is not set
767CONFIG_PPC_EARLY_DEBUG=y 784CONFIG_PPC_EARLY_DEBUG=y
768# CONFIG_PPC_EARLY_DEBUG_LPAR is not set 785# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
@@ -784,47 +801,77 @@ CONFIG_PPC_EARLY_DEBUG=y
784# CONFIG_SECURITY is not set 801# CONFIG_SECURITY is not set
785# CONFIG_SECURITY_FILE_CAPABILITIES is not set 802# CONFIG_SECURITY_FILE_CAPABILITIES is not set
786CONFIG_CRYPTO=y 803CONFIG_CRYPTO=y
787# CONFIG_CRYPTO_SEQIV is not set 804
805#
806# Crypto core or helper
807#
788# CONFIG_CRYPTO_MANAGER is not set 808# CONFIG_CRYPTO_MANAGER is not set
809# CONFIG_CRYPTO_GF128MUL is not set
810# CONFIG_CRYPTO_NULL is not set
811# CONFIG_CRYPTO_CRYPTD is not set
812# CONFIG_CRYPTO_AUTHENC is not set
813
814#
815# Authenticated Encryption with Associated Data
816#
817# CONFIG_CRYPTO_CCM is not set
818# CONFIG_CRYPTO_GCM is not set
819# CONFIG_CRYPTO_SEQIV is not set
820
821#
822# Block modes
823#
824# CONFIG_CRYPTO_CBC is not set
825# CONFIG_CRYPTO_CTR is not set
826# CONFIG_CRYPTO_CTS is not set
827# CONFIG_CRYPTO_ECB is not set
828# CONFIG_CRYPTO_LRW is not set
829# CONFIG_CRYPTO_PCBC is not set
830# CONFIG_CRYPTO_XTS is not set
831
832#
833# Hash modes
834#
789# CONFIG_CRYPTO_HMAC is not set 835# CONFIG_CRYPTO_HMAC is not set
790# CONFIG_CRYPTO_XCBC is not set 836# CONFIG_CRYPTO_XCBC is not set
791# CONFIG_CRYPTO_NULL is not set 837
838#
839# Digest
840#
841# CONFIG_CRYPTO_CRC32C is not set
792# CONFIG_CRYPTO_MD4 is not set 842# CONFIG_CRYPTO_MD4 is not set
793# CONFIG_CRYPTO_MD5 is not set 843# CONFIG_CRYPTO_MD5 is not set
844# CONFIG_CRYPTO_MICHAEL_MIC is not set
794# CONFIG_CRYPTO_SHA1 is not set 845# CONFIG_CRYPTO_SHA1 is not set
795# CONFIG_CRYPTO_SHA256 is not set 846# CONFIG_CRYPTO_SHA256 is not set
796# CONFIG_CRYPTO_SHA512 is not set 847# CONFIG_CRYPTO_SHA512 is not set
797# CONFIG_CRYPTO_WP512 is not set
798# CONFIG_CRYPTO_TGR192 is not set 848# CONFIG_CRYPTO_TGR192 is not set
799# CONFIG_CRYPTO_GF128MUL is not set 849# CONFIG_CRYPTO_WP512 is not set
800# CONFIG_CRYPTO_ECB is not set 850
801# CONFIG_CRYPTO_CBC is not set 851#
802# CONFIG_CRYPTO_PCBC is not set 852# Ciphers
803# CONFIG_CRYPTO_LRW is not set 853#
804# CONFIG_CRYPTO_XTS is not set
805# CONFIG_CRYPTO_CTR is not set
806# CONFIG_CRYPTO_GCM is not set
807# CONFIG_CRYPTO_CCM is not set
808# CONFIG_CRYPTO_CRYPTD is not set
809# CONFIG_CRYPTO_DES is not set
810# CONFIG_CRYPTO_FCRYPT is not set
811# CONFIG_CRYPTO_BLOWFISH is not set
812# CONFIG_CRYPTO_TWOFISH is not set
813# CONFIG_CRYPTO_SERPENT is not set
814# CONFIG_CRYPTO_AES is not set 854# CONFIG_CRYPTO_AES is not set
855# CONFIG_CRYPTO_ANUBIS is not set
856# CONFIG_CRYPTO_ARC4 is not set
857# CONFIG_CRYPTO_BLOWFISH is not set
858# CONFIG_CRYPTO_CAMELLIA is not set
815# CONFIG_CRYPTO_CAST5 is not set 859# CONFIG_CRYPTO_CAST5 is not set
816# CONFIG_CRYPTO_CAST6 is not set 860# CONFIG_CRYPTO_CAST6 is not set
817# CONFIG_CRYPTO_TEA is not set 861# CONFIG_CRYPTO_DES is not set
818# CONFIG_CRYPTO_ARC4 is not set 862# CONFIG_CRYPTO_FCRYPT is not set
819# CONFIG_CRYPTO_KHAZAD is not set 863# CONFIG_CRYPTO_KHAZAD is not set
820# CONFIG_CRYPTO_ANUBIS is not set
821# CONFIG_CRYPTO_SEED is not set
822# CONFIG_CRYPTO_SALSA20 is not set 864# CONFIG_CRYPTO_SALSA20 is not set
865# CONFIG_CRYPTO_SEED is not set
866# CONFIG_CRYPTO_SERPENT is not set
867# CONFIG_CRYPTO_TEA is not set
868# CONFIG_CRYPTO_TWOFISH is not set
869
870#
871# Compression
872#
823# CONFIG_CRYPTO_DEFLATE is not set 873# CONFIG_CRYPTO_DEFLATE is not set
824# CONFIG_CRYPTO_MICHAEL_MIC is not set
825# CONFIG_CRYPTO_CRC32C is not set
826# CONFIG_CRYPTO_CAMELLIA is not set
827# CONFIG_CRYPTO_AUTHENC is not set
828# CONFIG_CRYPTO_LZO is not set 874# CONFIG_CRYPTO_LZO is not set
829CONFIG_CRYPTO_HW=y 875CONFIG_CRYPTO_HW=y
830# CONFIG_PPC_CLOCK is not set 876# CONFIG_PPC_CLOCK is not set
877# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/85xx/stx_gp3_defconfig b/arch/powerpc/configs/85xx/stx_gp3_defconfig
index 1d303c49bb0c..7804ca1ecc94 100644
--- a/arch/powerpc/configs/85xx/stx_gp3_defconfig
+++ b/arch/powerpc/configs/85xx/stx_gp3_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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 24 08:48:42 2008 4# Mon Jun 9 08:52:38 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -32,6 +32,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 34CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_LOCKDEP_SUPPORT=y
35CONFIG_RWSEM_XCHGADD_ALGORITHM=y 37CONFIG_RWSEM_XCHGADD_ALGORITHM=y
36CONFIG_ARCH_HAS_ILOG2_U32=y 38CONFIG_ARCH_HAS_ILOG2_U32=y
37CONFIG_GENERIC_HWEIGHT=y 39CONFIG_GENERIC_HWEIGHT=y
@@ -87,6 +89,7 @@ CONFIG_INITRAMFS_SOURCE=""
87CONFIG_SYSCTL=y 89CONFIG_SYSCTL=y
88CONFIG_EMBEDDED=y 90CONFIG_EMBEDDED=y
89CONFIG_SYSCTL_SYSCALL=y 91CONFIG_SYSCTL_SYSCALL=y
92CONFIG_SYSCTL_SYSCALL_CHECK=y
90CONFIG_KALLSYMS=y 93CONFIG_KALLSYMS=y
91# CONFIG_KALLSYMS_ALL is not set 94# CONFIG_KALLSYMS_ALL is not set
92# CONFIG_KALLSYMS_EXTRA_PASS is not set 95# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -114,12 +117,14 @@ CONFIG_HAVE_OPROFILE=y
114# CONFIG_KPROBES is not set 117# CONFIG_KPROBES is not set
115CONFIG_HAVE_KPROBES=y 118CONFIG_HAVE_KPROBES=y
116CONFIG_HAVE_KRETPROBES=y 119CONFIG_HAVE_KRETPROBES=y
120# CONFIG_HAVE_DMA_ATTRS is not set
117CONFIG_PROC_PAGE_MONITOR=y 121CONFIG_PROC_PAGE_MONITOR=y
118CONFIG_SLABINFO=y 122CONFIG_SLABINFO=y
119CONFIG_RT_MUTEXES=y 123CONFIG_RT_MUTEXES=y
120# CONFIG_TINY_SHMEM is not set 124# CONFIG_TINY_SHMEM is not set
121CONFIG_BASE_SMALL=0 125CONFIG_BASE_SMALL=0
122CONFIG_MODULES=y 126CONFIG_MODULES=y
127# CONFIG_MODULE_FORCE_LOAD is not set
123# CONFIG_MODULE_UNLOAD is not set 128# CONFIG_MODULE_UNLOAD is not set
124CONFIG_MODVERSIONS=y 129CONFIG_MODVERSIONS=y
125# CONFIG_MODULE_SRCVERSION_ALL is not set 130# CONFIG_MODULE_SRCVERSION_ALL is not set
@@ -158,6 +163,7 @@ CONFIG_MPC85xx=y
158# CONFIG_MPC85xx_CDS is not set 163# CONFIG_MPC85xx_CDS is not set
159# CONFIG_MPC85xx_MDS is not set 164# CONFIG_MPC85xx_MDS is not set
160# CONFIG_MPC85xx_DS is not set 165# CONFIG_MPC85xx_DS is not set
166# CONFIG_KSI8560 is not set
161CONFIG_STX_GP3=y 167CONFIG_STX_GP3=y
162# CONFIG_TQM8540 is not set 168# CONFIG_TQM8540 is not set
163# CONFIG_TQM8541 is not set 169# CONFIG_TQM8541 is not set
@@ -215,11 +221,13 @@ CONFIG_FLATMEM=y
215CONFIG_FLAT_NODE_MEM_MAP=y 221CONFIG_FLAT_NODE_MEM_MAP=y
216# CONFIG_SPARSEMEM_STATIC is not set 222# CONFIG_SPARSEMEM_STATIC is not set
217# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 223# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
224CONFIG_PAGEFLAGS_EXTENDED=y
218CONFIG_SPLIT_PTLOCK_CPUS=4 225CONFIG_SPLIT_PTLOCK_CPUS=4
219# CONFIG_RESOURCES_64BIT is not set 226# CONFIG_RESOURCES_64BIT is not set
220CONFIG_ZONE_DMA_FLAG=1 227CONFIG_ZONE_DMA_FLAG=1
221CONFIG_BOUNCE=y 228CONFIG_BOUNCE=y
222CONFIG_VIRT_TO_BUS=y 229CONFIG_VIRT_TO_BUS=y
230CONFIG_FORCE_MAX_ZONEORDER=11
223CONFIG_PROC_DEVICETREE=y 231CONFIG_PROC_DEVICETREE=y
224# CONFIG_CMDLINE_BOOL is not set 232# CONFIG_CMDLINE_BOOL is not set
225# CONFIG_PM is not set 233# CONFIG_PM is not set
@@ -243,6 +251,7 @@ CONFIG_PCI_LEGACY=y
243# CONFIG_PCI_DEBUG is not set 251# CONFIG_PCI_DEBUG is not set
244# CONFIG_PCCARD is not set 252# CONFIG_PCCARD is not set
245# CONFIG_HOTPLUG_PCI is not set 253# CONFIG_HOTPLUG_PCI is not set
254# CONFIG_HAS_RAPIDIO is not set
246 255
247# 256#
248# Advanced setup 257# Advanced setup
@@ -252,11 +261,12 @@ CONFIG_PCI_LEGACY=y
252# 261#
253# Default settings for advanced configuration options are used 262# Default settings for advanced configuration options are used
254# 263#
255CONFIG_HIGHMEM_START=0xfe000000
256CONFIG_LOWMEM_SIZE=0x30000000 264CONFIG_LOWMEM_SIZE=0x30000000
265CONFIG_PAGE_OFFSET=0xc0000000
257CONFIG_KERNEL_START=0xc0000000 266CONFIG_KERNEL_START=0xc0000000
267CONFIG_PHYSICAL_START=0x00000000
268CONFIG_PHYSICAL_ALIGN=0x10000000
258CONFIG_TASK_SIZE=0xc0000000 269CONFIG_TASK_SIZE=0xc0000000
259CONFIG_BOOT_LOAD=0x00800000
260 270
261# 271#
262# Networking 272# Networking
@@ -304,8 +314,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
304# CONFIG_TCP_MD5SIG is not set 314# CONFIG_TCP_MD5SIG is not set
305# CONFIG_IP_VS is not set 315# CONFIG_IP_VS is not set
306# CONFIG_IPV6 is not set 316# CONFIG_IPV6 is not set
307# CONFIG_INET6_XFRM_TUNNEL is not set
308# CONFIG_INET6_TUNNEL is not set
309# CONFIG_NETWORK_SECMARK is not set 317# CONFIG_NETWORK_SECMARK is not set
310CONFIG_NETFILTER=y 318CONFIG_NETFILTER=y
311# CONFIG_NETFILTER_DEBUG is not set 319# CONFIG_NETFILTER_DEBUG is not set
@@ -418,6 +426,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
418# CONFIG_CONNECTOR is not set 426# CONFIG_CONNECTOR is not set
419# CONFIG_MTD is not set 427# CONFIG_MTD is not set
420CONFIG_OF_DEVICE=y 428CONFIG_OF_DEVICE=y
429CONFIG_OF_I2C=m
421CONFIG_PARPORT=m 430CONFIG_PARPORT=m
422CONFIG_PARPORT_PC=m 431CONFIG_PARPORT_PC=m
423# CONFIG_PARPORT_PC_FIFO is not set 432# CONFIG_PARPORT_PC_FIFO is not set
@@ -505,7 +514,7 @@ CONFIG_IDE_GENERIC=y
505# CONFIG_BLK_DEV_VIA82CXXX is not set 514# CONFIG_BLK_DEV_VIA82CXXX is not set
506# CONFIG_BLK_DEV_TC86C001 is not set 515# CONFIG_BLK_DEV_TC86C001 is not set
507# CONFIG_BLK_DEV_IDEDMA is not set 516# CONFIG_BLK_DEV_IDEDMA is not set
508CONFIG_IDE_ARCH_OBSOLETE_INIT=y 517# CONFIG_BLK_DEV_HD_ONLY is not set
509# CONFIG_BLK_DEV_HD is not set 518# CONFIG_BLK_DEV_HD is not set
510 519
511# 520#
@@ -653,7 +662,6 @@ CONFIG_NETDEV_1000=y
653# CONFIG_SIS190 is not set 662# CONFIG_SIS190 is not set
654# CONFIG_SKGE is not set 663# CONFIG_SKGE is not set
655# CONFIG_SKY2 is not set 664# CONFIG_SKY2 is not set
656# CONFIG_SK98LIN is not set
657# CONFIG_VIA_VELOCITY is not set 665# CONFIG_VIA_VELOCITY is not set
658# CONFIG_TIGON3 is not set 666# CONFIG_TIGON3 is not set
659# CONFIG_BNX2 is not set 667# CONFIG_BNX2 is not set
@@ -673,6 +681,7 @@ CONFIG_NETDEV_10000=y
673# CONFIG_MLX4_CORE is not set 681# CONFIG_MLX4_CORE is not set
674# CONFIG_TEHUTI is not set 682# CONFIG_TEHUTI is not set
675# CONFIG_BNX2X is not set 683# CONFIG_BNX2X is not set
684# CONFIG_SFC is not set
676# CONFIG_TR is not set 685# CONFIG_TR is not set
677 686
678# 687#
@@ -680,6 +689,7 @@ CONFIG_NETDEV_10000=y
680# 689#
681# CONFIG_WLAN_PRE80211 is not set 690# CONFIG_WLAN_PRE80211 is not set
682# CONFIG_WLAN_80211 is not set 691# CONFIG_WLAN_80211 is not set
692# CONFIG_IWLWIFI_LEDS is not set
683# CONFIG_WAN is not set 693# CONFIG_WAN is not set
684# CONFIG_FDDI is not set 694# CONFIG_FDDI is not set
685# CONFIG_HIPPI is not set 695# CONFIG_HIPPI is not set
@@ -753,6 +763,7 @@ CONFIG_SERIO_LIBPS2=y
753# Character devices 763# Character devices
754# 764#
755# CONFIG_VT is not set 765# CONFIG_VT is not set
766CONFIG_DEVKMEM=y
756# CONFIG_SERIAL_NONSTANDARD is not set 767# CONFIG_SERIAL_NONSTANDARD is not set
757# CONFIG_NOZOMI is not set 768# CONFIG_NOZOMI is not set
758 769
@@ -796,13 +807,6 @@ CONFIG_I2C_BOARDINFO=y
796CONFIG_I2C_CHARDEV=m 807CONFIG_I2C_CHARDEV=m
797 808
798# 809#
799# I2C Algorithms
800#
801CONFIG_I2C_ALGOBIT=m
802# CONFIG_I2C_ALGOPCF is not set
803# CONFIG_I2C_ALGOPCA is not set
804
805#
806# I2C Hardware Bus support 810# I2C Hardware Bus support
807# 811#
808# CONFIG_I2C_ALI1535 is not set 812# CONFIG_I2C_ALI1535 is not set
@@ -829,6 +833,7 @@ CONFIG_I2C_ALGOBIT=m
829# CONFIG_I2C_VIA is not set 833# CONFIG_I2C_VIA is not set
830# CONFIG_I2C_VIAPRO is not set 834# CONFIG_I2C_VIAPRO is not set
831# CONFIG_I2C_VOODOO3 is not set 835# CONFIG_I2C_VOODOO3 is not set
836# CONFIG_I2C_PCA_PLATFORM is not set
832 837
833# 838#
834# Miscellaneous I2C Chip support 839# Miscellaneous I2C Chip support
@@ -838,19 +843,13 @@ CONFIG_I2C_ALGOBIT=m
838# CONFIG_SENSORS_PCF8574 is not set 843# CONFIG_SENSORS_PCF8574 is not set
839# CONFIG_PCF8575 is not set 844# CONFIG_PCF8575 is not set
840# CONFIG_SENSORS_PCF8591 is not set 845# CONFIG_SENSORS_PCF8591 is not set
841# CONFIG_TPS65010 is not set
842# CONFIG_SENSORS_MAX6875 is not set 846# CONFIG_SENSORS_MAX6875 is not set
843# CONFIG_SENSORS_TSL2550 is not set 847# CONFIG_SENSORS_TSL2550 is not set
844# CONFIG_I2C_DEBUG_CORE is not set 848# CONFIG_I2C_DEBUG_CORE is not set
845# CONFIG_I2C_DEBUG_ALGO is not set 849# CONFIG_I2C_DEBUG_ALGO is not set
846# CONFIG_I2C_DEBUG_BUS is not set 850# CONFIG_I2C_DEBUG_BUS is not set
847# CONFIG_I2C_DEBUG_CHIP is not set 851# CONFIG_I2C_DEBUG_CHIP is not set
848
849#
850# SPI support
851#
852# CONFIG_SPI is not set 852# CONFIG_SPI is not set
853# CONFIG_SPI_MASTER is not set
854# CONFIG_W1 is not set 853# CONFIG_W1 is not set
855# CONFIG_POWER_SUPPLY is not set 854# CONFIG_POWER_SUPPLY is not set
856CONFIG_HWMON=y 855CONFIG_HWMON=y
@@ -920,12 +919,22 @@ CONFIG_SSB_POSSIBLE=y
920# Multifunction device drivers 919# Multifunction device drivers
921# 920#
922# CONFIG_MFD_SM501 is not set 921# CONFIG_MFD_SM501 is not set
922# CONFIG_HTC_PASIC3 is not set
923 923
924# 924#
925# Multimedia devices 925# Multimedia devices
926# 926#
927
928#
929# Multimedia core support
930#
927# CONFIG_VIDEO_DEV is not set 931# CONFIG_VIDEO_DEV is not set
928# CONFIG_DVB_CORE is not set 932# CONFIG_DVB_CORE is not set
933# CONFIG_VIDEO_MEDIA is not set
934
935#
936# Multimedia drivers
937#
929CONFIG_DAB=y 938CONFIG_DAB=y
930 939
931# 940#
@@ -973,6 +982,8 @@ CONFIG_USB_ARCH_HAS_HCD=y
973CONFIG_USB_ARCH_HAS_OHCI=y 982CONFIG_USB_ARCH_HAS_OHCI=y
974CONFIG_USB_ARCH_HAS_EHCI=y 983CONFIG_USB_ARCH_HAS_EHCI=y
975# CONFIG_USB is not set 984# CONFIG_USB is not set
985# CONFIG_USB_OTG_WHITELIST is not set
986# CONFIG_USB_OTG_BLACKLIST_HUB is not set
976 987
977# 988#
978# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 989# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -981,15 +992,12 @@ CONFIG_USB_ARCH_HAS_EHCI=y
981# CONFIG_MMC is not set 992# CONFIG_MMC is not set
982# CONFIG_MEMSTICK is not set 993# CONFIG_MEMSTICK is not set
983# CONFIG_NEW_LEDS is not set 994# CONFIG_NEW_LEDS is not set
995# CONFIG_ACCESSIBILITY is not set
984# CONFIG_INFINIBAND is not set 996# CONFIG_INFINIBAND is not set
985# CONFIG_EDAC is not set 997# CONFIG_EDAC is not set
986# CONFIG_RTC_CLASS is not set 998# CONFIG_RTC_CLASS is not set
987# CONFIG_DMADEVICES is not set 999# CONFIG_DMADEVICES is not set
988# CONFIG_AUXDISPLAY is not set 1000# CONFIG_AUXDISPLAY is not set
989
990#
991# Userspace I/O
992#
993# CONFIG_UIO is not set 1001# CONFIG_UIO is not set
994 1002
995# 1003#
@@ -1009,7 +1017,6 @@ CONFIG_FS_MBCACHE=y
1009# CONFIG_JFS_FS is not set 1017# CONFIG_JFS_FS is not set
1010# CONFIG_FS_POSIX_ACL is not set 1018# CONFIG_FS_POSIX_ACL is not set
1011# CONFIG_XFS_FS is not set 1019# CONFIG_XFS_FS is not set
1012# CONFIG_GFS2_FS is not set
1013# CONFIG_OCFS2_FS is not set 1020# CONFIG_OCFS2_FS is not set
1014CONFIG_DNOTIFY=y 1021CONFIG_DNOTIFY=y
1015CONFIG_INOTIFY=y 1022CONFIG_INOTIFY=y
@@ -1073,7 +1080,6 @@ CONFIG_NFS_FS=y
1073CONFIG_NFS_V3=y 1080CONFIG_NFS_V3=y
1074# CONFIG_NFS_V3_ACL is not set 1081# CONFIG_NFS_V3_ACL is not set
1075# CONFIG_NFS_V4 is not set 1082# CONFIG_NFS_V4 is not set
1076# CONFIG_NFS_DIRECTIO is not set
1077# CONFIG_NFSD is not set 1083# CONFIG_NFSD is not set
1078CONFIG_ROOT_NFS=y 1084CONFIG_ROOT_NFS=y
1079CONFIG_LOCKD=y 1085CONFIG_LOCKD=y
@@ -1141,9 +1147,10 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1141# Library routines 1147# Library routines
1142# 1148#
1143CONFIG_BITREVERSE=y 1149CONFIG_BITREVERSE=y
1150# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1144CONFIG_CRC_CCITT=y 1151CONFIG_CRC_CCITT=y
1145# CONFIG_CRC16 is not set 1152# CONFIG_CRC16 is not set
1146# CONFIG_CRC_ITU_T is not set 1153CONFIG_CRC_ITU_T=m
1147CONFIG_CRC32=y 1154CONFIG_CRC32=y
1148# CONFIG_CRC7 is not set 1155# CONFIG_CRC7 is not set
1149# CONFIG_LIBCRC32C is not set 1156# CONFIG_LIBCRC32C is not set
@@ -1152,6 +1159,7 @@ CONFIG_PLIST=y
1152CONFIG_HAS_IOMEM=y 1159CONFIG_HAS_IOMEM=y
1153CONFIG_HAS_IOPORT=y 1160CONFIG_HAS_IOPORT=y
1154CONFIG_HAS_DMA=y 1161CONFIG_HAS_DMA=y
1162CONFIG_HAVE_LMB=y
1155 1163
1156# 1164#
1157# Kernel hacking 1165# Kernel hacking
@@ -1159,6 +1167,7 @@ CONFIG_HAS_DMA=y
1159# CONFIG_PRINTK_TIME is not set 1167# CONFIG_PRINTK_TIME is not set
1160CONFIG_ENABLE_WARN_DEPRECATED=y 1168CONFIG_ENABLE_WARN_DEPRECATED=y
1161CONFIG_ENABLE_MUST_CHECK=y 1169CONFIG_ENABLE_MUST_CHECK=y
1170CONFIG_FRAME_WARN=1024
1162# CONFIG_MAGIC_SYSRQ is not set 1171# CONFIG_MAGIC_SYSRQ is not set
1163# CONFIG_UNUSED_SYMBOLS is not set 1172# CONFIG_UNUSED_SYMBOLS is not set
1164# CONFIG_DEBUG_FS is not set 1173# CONFIG_DEBUG_FS is not set
@@ -1169,6 +1178,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
1169CONFIG_SCHED_DEBUG=y 1178CONFIG_SCHED_DEBUG=y
1170# CONFIG_SCHEDSTATS is not set 1179# CONFIG_SCHEDSTATS is not set
1171# CONFIG_TIMER_STATS is not set 1180# CONFIG_TIMER_STATS is not set
1181# CONFIG_DEBUG_OBJECTS is not set
1172# CONFIG_SLUB_DEBUG_ON is not set 1182# CONFIG_SLUB_DEBUG_ON is not set
1173# CONFIG_SLUB_STATS is not set 1183# CONFIG_SLUB_STATS is not set
1174# CONFIG_DEBUG_RT_MUTEXES is not set 1184# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -1182,6 +1192,7 @@ CONFIG_SCHED_DEBUG=y
1182# CONFIG_DEBUG_BUGVERBOSE is not set 1192# CONFIG_DEBUG_BUGVERBOSE is not set
1183# CONFIG_DEBUG_INFO is not set 1193# CONFIG_DEBUG_INFO is not set
1184# CONFIG_DEBUG_VM is not set 1194# CONFIG_DEBUG_VM is not set
1195# CONFIG_DEBUG_WRITECOUNT is not set
1185# CONFIG_DEBUG_LIST is not set 1196# CONFIG_DEBUG_LIST is not set
1186# CONFIG_DEBUG_SG is not set 1197# CONFIG_DEBUG_SG is not set
1187# CONFIG_BOOT_PRINTK_DELAY is not set 1198# CONFIG_BOOT_PRINTK_DELAY is not set
@@ -1194,6 +1205,7 @@ CONFIG_SCHED_DEBUG=y
1194# CONFIG_DEBUG_PAGEALLOC is not set 1205# CONFIG_DEBUG_PAGEALLOC is not set
1195# CONFIG_DEBUGGER is not set 1206# CONFIG_DEBUGGER is not set
1196# CONFIG_KGDB_CONSOLE is not set 1207# CONFIG_KGDB_CONSOLE is not set
1208# CONFIG_IRQSTACKS is not set
1197CONFIG_BDI_SWITCH=y 1209CONFIG_BDI_SWITCH=y
1198# CONFIG_PPC_EARLY_DEBUG is not set 1210# CONFIG_PPC_EARLY_DEBUG is not set
1199 1211
@@ -1204,50 +1216,80 @@ CONFIG_BDI_SWITCH=y
1204# CONFIG_SECURITY is not set 1216# CONFIG_SECURITY is not set
1205# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1217# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1206CONFIG_CRYPTO=y 1218CONFIG_CRYPTO=y
1207# CONFIG_CRYPTO_SEQIV is not set 1219
1220#
1221# Crypto core or helper
1222#
1208# CONFIG_CRYPTO_MANAGER is not set 1223# CONFIG_CRYPTO_MANAGER is not set
1224# CONFIG_CRYPTO_GF128MUL is not set
1225# CONFIG_CRYPTO_NULL is not set
1226# CONFIG_CRYPTO_CRYPTD is not set
1227# CONFIG_CRYPTO_AUTHENC is not set
1228# CONFIG_CRYPTO_TEST is not set
1229
1230#
1231# Authenticated Encryption with Associated Data
1232#
1233# CONFIG_CRYPTO_CCM is not set
1234# CONFIG_CRYPTO_GCM is not set
1235# CONFIG_CRYPTO_SEQIV is not set
1236
1237#
1238# Block modes
1239#
1240# CONFIG_CRYPTO_CBC is not set
1241# CONFIG_CRYPTO_CTR is not set
1242# CONFIG_CRYPTO_CTS is not set
1243# CONFIG_CRYPTO_ECB is not set
1244# CONFIG_CRYPTO_LRW is not set
1245# CONFIG_CRYPTO_PCBC is not set
1246# CONFIG_CRYPTO_XTS is not set
1247
1248#
1249# Hash modes
1250#
1209# CONFIG_CRYPTO_HMAC is not set 1251# CONFIG_CRYPTO_HMAC is not set
1210# CONFIG_CRYPTO_XCBC is not set 1252# CONFIG_CRYPTO_XCBC is not set
1211# CONFIG_CRYPTO_NULL is not set 1253
1254#
1255# Digest
1256#
1257# CONFIG_CRYPTO_CRC32C is not set
1212# CONFIG_CRYPTO_MD4 is not set 1258# CONFIG_CRYPTO_MD4 is not set
1213# CONFIG_CRYPTO_MD5 is not set 1259# CONFIG_CRYPTO_MD5 is not set
1260# CONFIG_CRYPTO_MICHAEL_MIC is not set
1214# CONFIG_CRYPTO_SHA1 is not set 1261# CONFIG_CRYPTO_SHA1 is not set
1215# CONFIG_CRYPTO_SHA256 is not set 1262# CONFIG_CRYPTO_SHA256 is not set
1216# CONFIG_CRYPTO_SHA512 is not set 1263# CONFIG_CRYPTO_SHA512 is not set
1217# CONFIG_CRYPTO_WP512 is not set
1218# CONFIG_CRYPTO_TGR192 is not set 1264# CONFIG_CRYPTO_TGR192 is not set
1219# CONFIG_CRYPTO_GF128MUL is not set 1265# CONFIG_CRYPTO_WP512 is not set
1220# CONFIG_CRYPTO_ECB is not set 1266
1221# CONFIG_CRYPTO_CBC is not set 1267#
1222# CONFIG_CRYPTO_PCBC is not set 1268# Ciphers
1223# CONFIG_CRYPTO_LRW is not set 1269#
1224# CONFIG_CRYPTO_XTS is not set
1225# CONFIG_CRYPTO_CTR is not set
1226# CONFIG_CRYPTO_GCM is not set
1227# CONFIG_CRYPTO_CCM is not set
1228# CONFIG_CRYPTO_CRYPTD is not set
1229# CONFIG_CRYPTO_DES is not set
1230# CONFIG_CRYPTO_FCRYPT is not set
1231# CONFIG_CRYPTO_BLOWFISH is not set
1232# CONFIG_CRYPTO_TWOFISH is not set
1233# CONFIG_CRYPTO_SERPENT is not set
1234# CONFIG_CRYPTO_AES is not set 1270# CONFIG_CRYPTO_AES is not set
1271# CONFIG_CRYPTO_ANUBIS is not set
1272# CONFIG_CRYPTO_ARC4 is not set
1273# CONFIG_CRYPTO_BLOWFISH is not set
1274# CONFIG_CRYPTO_CAMELLIA is not set
1235# CONFIG_CRYPTO_CAST5 is not set 1275# CONFIG_CRYPTO_CAST5 is not set
1236# CONFIG_CRYPTO_CAST6 is not set 1276# CONFIG_CRYPTO_CAST6 is not set
1237# CONFIG_CRYPTO_TEA is not set 1277# CONFIG_CRYPTO_DES is not set
1238# CONFIG_CRYPTO_ARC4 is not set 1278# CONFIG_CRYPTO_FCRYPT is not set
1239# CONFIG_CRYPTO_KHAZAD is not set 1279# CONFIG_CRYPTO_KHAZAD is not set
1240# CONFIG_CRYPTO_ANUBIS is not set
1241# CONFIG_CRYPTO_SEED is not set
1242# CONFIG_CRYPTO_SALSA20 is not set 1280# CONFIG_CRYPTO_SALSA20 is not set
1281# CONFIG_CRYPTO_SEED is not set
1282# CONFIG_CRYPTO_SERPENT is not set
1283# CONFIG_CRYPTO_TEA is not set
1284# CONFIG_CRYPTO_TWOFISH is not set
1285
1286#
1287# Compression
1288#
1243# CONFIG_CRYPTO_DEFLATE is not set 1289# CONFIG_CRYPTO_DEFLATE is not set
1244# CONFIG_CRYPTO_MICHAEL_MIC is not set
1245# CONFIG_CRYPTO_CRC32C is not set
1246# CONFIG_CRYPTO_CAMELLIA is not set
1247# CONFIG_CRYPTO_TEST is not set
1248# CONFIG_CRYPTO_AUTHENC is not set
1249# CONFIG_CRYPTO_LZO is not set 1290# CONFIG_CRYPTO_LZO is not set
1250CONFIG_CRYPTO_HW=y 1291CONFIG_CRYPTO_HW=y
1251# CONFIG_CRYPTO_DEV_HIFN_795X is not set 1292# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1252# CONFIG_PPC_CLOCK is not set 1293# CONFIG_PPC_CLOCK is not set
1253CONFIG_PPC_LIB_RHEAP=y 1294CONFIG_PPC_LIB_RHEAP=y
1295# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/85xx/tqm8540_defconfig b/arch/powerpc/configs/85xx/tqm8540_defconfig
index d39ee3b35bfc..e0b5559e84aa 100644
--- a/arch/powerpc/configs/85xx/tqm8540_defconfig
+++ b/arch/powerpc/configs/85xx/tqm8540_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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 24 08:48:43 2008 4# Mon Jun 9 08:52:39 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -32,6 +32,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 34CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_LOCKDEP_SUPPORT=y
35CONFIG_RWSEM_XCHGADD_ALGORITHM=y 37CONFIG_RWSEM_XCHGADD_ALGORITHM=y
36CONFIG_ARCH_HAS_ILOG2_U32=y 38CONFIG_ARCH_HAS_ILOG2_U32=y
37CONFIG_GENERIC_HWEIGHT=y 39CONFIG_GENERIC_HWEIGHT=y
@@ -87,6 +89,7 @@ CONFIG_INITRAMFS_SOURCE=""
87CONFIG_SYSCTL=y 89CONFIG_SYSCTL=y
88CONFIG_EMBEDDED=y 90CONFIG_EMBEDDED=y
89CONFIG_SYSCTL_SYSCALL=y 91CONFIG_SYSCTL_SYSCALL=y
92CONFIG_SYSCTL_SYSCALL_CHECK=y
90# CONFIG_KALLSYMS is not set 93# CONFIG_KALLSYMS is not set
91# CONFIG_HOTPLUG is not set 94# CONFIG_HOTPLUG is not set
92CONFIG_PRINTK=y 95CONFIG_PRINTK=y
@@ -111,6 +114,7 @@ CONFIG_SLUB=y
111CONFIG_HAVE_OPROFILE=y 114CONFIG_HAVE_OPROFILE=y
112CONFIG_HAVE_KPROBES=y 115CONFIG_HAVE_KPROBES=y
113CONFIG_HAVE_KRETPROBES=y 116CONFIG_HAVE_KRETPROBES=y
117# CONFIG_HAVE_DMA_ATTRS is not set
114CONFIG_PROC_PAGE_MONITOR=y 118CONFIG_PROC_PAGE_MONITOR=y
115CONFIG_SLABINFO=y 119CONFIG_SLABINFO=y
116CONFIG_RT_MUTEXES=y 120CONFIG_RT_MUTEXES=y
@@ -151,6 +155,7 @@ CONFIG_MPC85xx=y
151# CONFIG_MPC85xx_CDS is not set 155# CONFIG_MPC85xx_CDS is not set
152# CONFIG_MPC85xx_MDS is not set 156# CONFIG_MPC85xx_MDS is not set
153# CONFIG_MPC85xx_DS is not set 157# CONFIG_MPC85xx_DS is not set
158# CONFIG_KSI8560 is not set
154# CONFIG_STX_GP3 is not set 159# CONFIG_STX_GP3 is not set
155CONFIG_TQM8540=y 160CONFIG_TQM8540=y
156# CONFIG_TQM8541 is not set 161# CONFIG_TQM8541 is not set
@@ -171,7 +176,6 @@ CONFIG_MPIC=y
171# CONFIG_GENERIC_IOMAP is not set 176# CONFIG_GENERIC_IOMAP is not set
172# CONFIG_CPU_FREQ is not set 177# CONFIG_CPU_FREQ is not set
173# CONFIG_CPM2 is not set 178# CONFIG_CPM2 is not set
174CONFIG_PPC_CPM_NEW_BINDING=y
175# CONFIG_FSL_ULI1575 is not set 179# CONFIG_FSL_ULI1575 is not set
176 180
177# 181#
@@ -208,11 +212,13 @@ CONFIG_FLATMEM=y
208CONFIG_FLAT_NODE_MEM_MAP=y 212CONFIG_FLAT_NODE_MEM_MAP=y
209# CONFIG_SPARSEMEM_STATIC is not set 213# CONFIG_SPARSEMEM_STATIC is not set
210# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 214# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
215CONFIG_PAGEFLAGS_EXTENDED=y
211CONFIG_SPLIT_PTLOCK_CPUS=4 216CONFIG_SPLIT_PTLOCK_CPUS=4
212# CONFIG_RESOURCES_64BIT is not set 217# CONFIG_RESOURCES_64BIT is not set
213CONFIG_ZONE_DMA_FLAG=1 218CONFIG_ZONE_DMA_FLAG=1
214CONFIG_BOUNCE=y 219CONFIG_BOUNCE=y
215CONFIG_VIRT_TO_BUS=y 220CONFIG_VIRT_TO_BUS=y
221CONFIG_FORCE_MAX_ZONEORDER=11
216# CONFIG_PROC_DEVICETREE is not set 222# CONFIG_PROC_DEVICETREE is not set
217# CONFIG_CMDLINE_BOOL is not set 223# CONFIG_CMDLINE_BOOL is not set
218# CONFIG_PM is not set 224# CONFIG_PM is not set
@@ -233,6 +239,7 @@ CONFIG_PCI_SYSCALL=y
233CONFIG_ARCH_SUPPORTS_MSI=y 239CONFIG_ARCH_SUPPORTS_MSI=y
234# CONFIG_PCI_MSI is not set 240# CONFIG_PCI_MSI is not set
235CONFIG_PCI_LEGACY=y 241CONFIG_PCI_LEGACY=y
242# CONFIG_HAS_RAPIDIO is not set
236 243
237# 244#
238# Advanced setup 245# Advanced setup
@@ -242,11 +249,12 @@ CONFIG_PCI_LEGACY=y
242# 249#
243# Default settings for advanced configuration options are used 250# Default settings for advanced configuration options are used
244# 251#
245CONFIG_HIGHMEM_START=0xfe000000
246CONFIG_LOWMEM_SIZE=0x30000000 252CONFIG_LOWMEM_SIZE=0x30000000
253CONFIG_PAGE_OFFSET=0xc0000000
247CONFIG_KERNEL_START=0xc0000000 254CONFIG_KERNEL_START=0xc0000000
255CONFIG_PHYSICAL_START=0x00000000
256CONFIG_PHYSICAL_ALIGN=0x10000000
248CONFIG_TASK_SIZE=0xc0000000 257CONFIG_TASK_SIZE=0xc0000000
249CONFIG_BOOT_LOAD=0x00800000
250 258
251# 259#
252# Networking 260# Networking
@@ -294,8 +302,6 @@ CONFIG_TCP_CONG_CUBIC=y
294CONFIG_DEFAULT_TCP_CONG="cubic" 302CONFIG_DEFAULT_TCP_CONG="cubic"
295# CONFIG_TCP_MD5SIG is not set 303# CONFIG_TCP_MD5SIG is not set
296# CONFIG_IPV6 is not set 304# CONFIG_IPV6 is not set
297# CONFIG_INET6_XFRM_TUNNEL is not set
298# CONFIG_INET6_TUNNEL is not set
299# CONFIG_NETWORK_SECMARK is not set 305# CONFIG_NETWORK_SECMARK is not set
300# CONFIG_NETFILTER is not set 306# CONFIG_NETFILTER is not set
301# CONFIG_IP_DCCP is not set 307# CONFIG_IP_DCCP is not set
@@ -352,6 +358,7 @@ CONFIG_MTD_PARTITIONS=y
352# CONFIG_MTD_REDBOOT_PARTS is not set 358# CONFIG_MTD_REDBOOT_PARTS is not set
353CONFIG_MTD_CMDLINE_PARTS=y 359CONFIG_MTD_CMDLINE_PARTS=y
354# CONFIG_MTD_OF_PARTS is not set 360# CONFIG_MTD_OF_PARTS is not set
361# CONFIG_MTD_AR7_PARTS is not set
355 362
356# 363#
357# User Modules And Translation Layers 364# User Modules And Translation Layers
@@ -423,6 +430,7 @@ CONFIG_MTD_CFI_UTIL=y
423# 430#
424# CONFIG_MTD_UBI is not set 431# CONFIG_MTD_UBI is not set
425CONFIG_OF_DEVICE=y 432CONFIG_OF_DEVICE=y
433CONFIG_OF_I2C=y
426# CONFIG_PARPORT is not set 434# CONFIG_PARPORT is not set
427CONFIG_BLK_DEV=y 435CONFIG_BLK_DEV=y
428# CONFIG_BLK_DEV_FD is not set 436# CONFIG_BLK_DEV_FD is not set
@@ -506,7 +514,7 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y
506CONFIG_BLK_DEV_VIA82CXXX=y 514CONFIG_BLK_DEV_VIA82CXXX=y
507# CONFIG_BLK_DEV_TC86C001 is not set 515# CONFIG_BLK_DEV_TC86C001 is not set
508CONFIG_BLK_DEV_IDEDMA=y 516CONFIG_BLK_DEV_IDEDMA=y
509CONFIG_IDE_ARCH_OBSOLETE_INIT=y 517# CONFIG_BLK_DEV_HD_ONLY is not set
510# CONFIG_BLK_DEV_HD is not set 518# CONFIG_BLK_DEV_HD is not set
511 519
512# 520#
@@ -600,7 +608,6 @@ CONFIG_NETDEV_1000=y
600# CONFIG_SIS190 is not set 608# CONFIG_SIS190 is not set
601# CONFIG_SKGE is not set 609# CONFIG_SKGE is not set
602# CONFIG_SKY2 is not set 610# CONFIG_SKY2 is not set
603# CONFIG_SK98LIN is not set
604# CONFIG_VIA_VELOCITY is not set 611# CONFIG_VIA_VELOCITY is not set
605# CONFIG_TIGON3 is not set 612# CONFIG_TIGON3 is not set
606# CONFIG_BNX2 is not set 613# CONFIG_BNX2 is not set
@@ -620,6 +627,7 @@ CONFIG_NETDEV_10000=y
620# CONFIG_MLX4_CORE is not set 627# CONFIG_MLX4_CORE is not set
621# CONFIG_TEHUTI is not set 628# CONFIG_TEHUTI is not set
622# CONFIG_BNX2X is not set 629# CONFIG_BNX2X is not set
630# CONFIG_SFC is not set
623# CONFIG_TR is not set 631# CONFIG_TR is not set
624 632
625# 633#
@@ -627,6 +635,7 @@ CONFIG_NETDEV_10000=y
627# 635#
628# CONFIG_WLAN_PRE80211 is not set 636# CONFIG_WLAN_PRE80211 is not set
629# CONFIG_WLAN_80211 is not set 637# CONFIG_WLAN_80211 is not set
638# CONFIG_IWLWIFI_LEDS is not set
630# CONFIG_WAN is not set 639# CONFIG_WAN is not set
631# CONFIG_FDDI is not set 640# CONFIG_FDDI is not set
632# CONFIG_HIPPI is not set 641# CONFIG_HIPPI is not set
@@ -673,6 +682,7 @@ CONFIG_INPUT=y
673# Character devices 682# Character devices
674# 683#
675# CONFIG_VT is not set 684# CONFIG_VT is not set
685CONFIG_DEVKMEM=y
676# CONFIG_SERIAL_NONSTANDARD is not set 686# CONFIG_SERIAL_NONSTANDARD is not set
677# CONFIG_NOZOMI is not set 687# CONFIG_NOZOMI is not set
678 688
@@ -713,13 +723,6 @@ CONFIG_I2C_BOARDINFO=y
713CONFIG_I2C_CHARDEV=y 723CONFIG_I2C_CHARDEV=y
714 724
715# 725#
716# I2C Algorithms
717#
718# CONFIG_I2C_ALGOBIT is not set
719# CONFIG_I2C_ALGOPCF is not set
720# CONFIG_I2C_ALGOPCA is not set
721
722#
723# I2C Hardware Bus support 726# I2C Hardware Bus support
724# 727#
725# CONFIG_I2C_ALI1535 is not set 728# CONFIG_I2C_ALI1535 is not set
@@ -744,6 +747,7 @@ CONFIG_I2C_MPC=y
744# CONFIG_I2C_VIA is not set 747# CONFIG_I2C_VIA is not set
745# CONFIG_I2C_VIAPRO is not set 748# CONFIG_I2C_VIAPRO is not set
746# CONFIG_I2C_VOODOO3 is not set 749# CONFIG_I2C_VOODOO3 is not set
750# CONFIG_I2C_PCA_PLATFORM is not set
747 751
748# 752#
749# Miscellaneous I2C Chip support 753# Miscellaneous I2C Chip support
@@ -753,19 +757,13 @@ CONFIG_I2C_MPC=y
753# CONFIG_SENSORS_PCF8574 is not set 757# CONFIG_SENSORS_PCF8574 is not set
754# CONFIG_PCF8575 is not set 758# CONFIG_PCF8575 is not set
755# CONFIG_SENSORS_PCF8591 is not set 759# CONFIG_SENSORS_PCF8591 is not set
756# CONFIG_TPS65010 is not set
757# CONFIG_SENSORS_MAX6875 is not set 760# CONFIG_SENSORS_MAX6875 is not set
758# CONFIG_SENSORS_TSL2550 is not set 761# CONFIG_SENSORS_TSL2550 is not set
759# CONFIG_I2C_DEBUG_CORE is not set 762# CONFIG_I2C_DEBUG_CORE is not set
760# CONFIG_I2C_DEBUG_ALGO is not set 763# CONFIG_I2C_DEBUG_ALGO is not set
761# CONFIG_I2C_DEBUG_BUS is not set 764# CONFIG_I2C_DEBUG_BUS is not set
762# CONFIG_I2C_DEBUG_CHIP is not set 765# CONFIG_I2C_DEBUG_CHIP is not set
763
764#
765# SPI support
766#
767# CONFIG_SPI is not set 766# CONFIG_SPI is not set
768# CONFIG_SPI_MASTER is not set
769# CONFIG_W1 is not set 767# CONFIG_W1 is not set
770# CONFIG_POWER_SUPPLY is not set 768# CONFIG_POWER_SUPPLY is not set
771CONFIG_HWMON=y 769CONFIG_HWMON=y
@@ -835,12 +833,22 @@ CONFIG_SSB_POSSIBLE=y
835# Multifunction device drivers 833# Multifunction device drivers
836# 834#
837# CONFIG_MFD_SM501 is not set 835# CONFIG_MFD_SM501 is not set
836# CONFIG_HTC_PASIC3 is not set
838 837
839# 838#
840# Multimedia devices 839# Multimedia devices
841# 840#
841
842#
843# Multimedia core support
844#
842# CONFIG_VIDEO_DEV is not set 845# CONFIG_VIDEO_DEV is not set
843# CONFIG_DVB_CORE is not set 846# CONFIG_DVB_CORE is not set
847# CONFIG_VIDEO_MEDIA is not set
848
849#
850# Multimedia drivers
851#
844CONFIG_DAB=y 852CONFIG_DAB=y
845 853
846# 854#
@@ -871,6 +879,8 @@ CONFIG_USB_ARCH_HAS_HCD=y
871CONFIG_USB_ARCH_HAS_OHCI=y 879CONFIG_USB_ARCH_HAS_OHCI=y
872CONFIG_USB_ARCH_HAS_EHCI=y 880CONFIG_USB_ARCH_HAS_EHCI=y
873# CONFIG_USB is not set 881# CONFIG_USB is not set
882# CONFIG_USB_OTG_WHITELIST is not set
883# CONFIG_USB_OTG_BLACKLIST_HUB is not set
874 884
875# 885#
876# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 886# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -879,14 +889,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
879# CONFIG_MMC is not set 889# CONFIG_MMC is not set
880# CONFIG_MEMSTICK is not set 890# CONFIG_MEMSTICK is not set
881# CONFIG_NEW_LEDS is not set 891# CONFIG_NEW_LEDS is not set
892# CONFIG_ACCESSIBILITY is not set
882# CONFIG_INFINIBAND is not set 893# CONFIG_INFINIBAND is not set
883# CONFIG_EDAC is not set 894# CONFIG_EDAC is not set
884# CONFIG_RTC_CLASS is not set 895# CONFIG_RTC_CLASS is not set
885# CONFIG_DMADEVICES is not set 896# CONFIG_DMADEVICES is not set
886
887#
888# Userspace I/O
889#
890# CONFIG_UIO is not set 897# CONFIG_UIO is not set
891 898
892# 899#
@@ -906,7 +913,6 @@ CONFIG_FS_MBCACHE=y
906# CONFIG_JFS_FS is not set 913# CONFIG_JFS_FS is not set
907# CONFIG_FS_POSIX_ACL is not set 914# CONFIG_FS_POSIX_ACL is not set
908# CONFIG_XFS_FS is not set 915# CONFIG_XFS_FS is not set
909# CONFIG_GFS2_FS is not set
910# CONFIG_OCFS2_FS is not set 916# CONFIG_OCFS2_FS is not set
911CONFIG_DNOTIFY=y 917CONFIG_DNOTIFY=y
912CONFIG_INOTIFY=y 918CONFIG_INOTIFY=y
@@ -974,7 +980,6 @@ CONFIG_NETWORK_FILESYSTEMS=y
974CONFIG_NFS_FS=y 980CONFIG_NFS_FS=y
975# CONFIG_NFS_V3 is not set 981# CONFIG_NFS_V3 is not set
976# CONFIG_NFS_V4 is not set 982# CONFIG_NFS_V4 is not set
977# CONFIG_NFS_DIRECTIO is not set
978# CONFIG_NFSD is not set 983# CONFIG_NFSD is not set
979CONFIG_ROOT_NFS=y 984CONFIG_ROOT_NFS=y
980CONFIG_LOCKD=y 985CONFIG_LOCKD=y
@@ -1013,6 +1018,7 @@ CONFIG_PARTITION_ADVANCED=y
1013# Library routines 1018# Library routines
1014# 1019#
1015CONFIG_BITREVERSE=y 1020CONFIG_BITREVERSE=y
1021# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1016# CONFIG_CRC_CCITT is not set 1022# CONFIG_CRC_CCITT is not set
1017# CONFIG_CRC16 is not set 1023# CONFIG_CRC16 is not set
1018# CONFIG_CRC_ITU_T is not set 1024# CONFIG_CRC_ITU_T is not set
@@ -1025,6 +1031,7 @@ CONFIG_PLIST=y
1025CONFIG_HAS_IOMEM=y 1031CONFIG_HAS_IOMEM=y
1026CONFIG_HAS_IOPORT=y 1032CONFIG_HAS_IOPORT=y
1027CONFIG_HAS_DMA=y 1033CONFIG_HAS_DMA=y
1034CONFIG_HAVE_LMB=y
1028 1035
1029# 1036#
1030# Kernel hacking 1037# Kernel hacking
@@ -1032,6 +1039,7 @@ CONFIG_HAS_DMA=y
1032# CONFIG_PRINTK_TIME is not set 1039# CONFIG_PRINTK_TIME is not set
1033CONFIG_ENABLE_WARN_DEPRECATED=y 1040CONFIG_ENABLE_WARN_DEPRECATED=y
1034CONFIG_ENABLE_MUST_CHECK=y 1041CONFIG_ENABLE_MUST_CHECK=y
1042CONFIG_FRAME_WARN=1024
1035# CONFIG_MAGIC_SYSRQ is not set 1043# CONFIG_MAGIC_SYSRQ is not set
1036# CONFIG_UNUSED_SYMBOLS is not set 1044# CONFIG_UNUSED_SYMBOLS is not set
1037# CONFIG_DEBUG_FS is not set 1045# CONFIG_DEBUG_FS is not set
@@ -1041,6 +1049,7 @@ CONFIG_ENABLE_MUST_CHECK=y
1041# CONFIG_SLUB_STATS is not set 1049# CONFIG_SLUB_STATS is not set
1042# CONFIG_DEBUG_BUGVERBOSE is not set 1050# CONFIG_DEBUG_BUGVERBOSE is not set
1043# CONFIG_SAMPLES is not set 1051# CONFIG_SAMPLES is not set
1052# CONFIG_IRQSTACKS is not set
1044# CONFIG_PPC_EARLY_DEBUG is not set 1053# CONFIG_PPC_EARLY_DEBUG is not set
1045 1054
1046# 1055#
@@ -1050,48 +1059,78 @@ CONFIG_ENABLE_MUST_CHECK=y
1050# CONFIG_SECURITY is not set 1059# CONFIG_SECURITY is not set
1051# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1060# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1052CONFIG_CRYPTO=y 1061CONFIG_CRYPTO=y
1053# CONFIG_CRYPTO_SEQIV is not set 1062
1063#
1064# Crypto core or helper
1065#
1054# CONFIG_CRYPTO_MANAGER is not set 1066# CONFIG_CRYPTO_MANAGER is not set
1067# CONFIG_CRYPTO_GF128MUL is not set
1068# CONFIG_CRYPTO_NULL is not set
1069# CONFIG_CRYPTO_CRYPTD is not set
1070# CONFIG_CRYPTO_AUTHENC is not set
1071
1072#
1073# Authenticated Encryption with Associated Data
1074#
1075# CONFIG_CRYPTO_CCM is not set
1076# CONFIG_CRYPTO_GCM is not set
1077# CONFIG_CRYPTO_SEQIV is not set
1078
1079#
1080# Block modes
1081#
1082# CONFIG_CRYPTO_CBC is not set
1083# CONFIG_CRYPTO_CTR is not set
1084# CONFIG_CRYPTO_CTS is not set
1085# CONFIG_CRYPTO_ECB is not set
1086# CONFIG_CRYPTO_LRW is not set
1087# CONFIG_CRYPTO_PCBC is not set
1088# CONFIG_CRYPTO_XTS is not set
1089
1090#
1091# Hash modes
1092#
1055# CONFIG_CRYPTO_HMAC is not set 1093# CONFIG_CRYPTO_HMAC is not set
1056# CONFIG_CRYPTO_XCBC is not set 1094# CONFIG_CRYPTO_XCBC is not set
1057# CONFIG_CRYPTO_NULL is not set 1095
1096#
1097# Digest
1098#
1099# CONFIG_CRYPTO_CRC32C is not set
1058# CONFIG_CRYPTO_MD4 is not set 1100# CONFIG_CRYPTO_MD4 is not set
1059# CONFIG_CRYPTO_MD5 is not set 1101# CONFIG_CRYPTO_MD5 is not set
1102# CONFIG_CRYPTO_MICHAEL_MIC is not set
1060# CONFIG_CRYPTO_SHA1 is not set 1103# CONFIG_CRYPTO_SHA1 is not set
1061# CONFIG_CRYPTO_SHA256 is not set 1104# CONFIG_CRYPTO_SHA256 is not set
1062# CONFIG_CRYPTO_SHA512 is not set 1105# CONFIG_CRYPTO_SHA512 is not set
1063# CONFIG_CRYPTO_WP512 is not set
1064# CONFIG_CRYPTO_TGR192 is not set 1106# CONFIG_CRYPTO_TGR192 is not set
1065# CONFIG_CRYPTO_GF128MUL is not set 1107# CONFIG_CRYPTO_WP512 is not set
1066# CONFIG_CRYPTO_ECB is not set 1108
1067# CONFIG_CRYPTO_CBC is not set 1109#
1068# CONFIG_CRYPTO_PCBC is not set 1110# Ciphers
1069# CONFIG_CRYPTO_LRW is not set 1111#
1070# CONFIG_CRYPTO_XTS is not set
1071# CONFIG_CRYPTO_CTR is not set
1072# CONFIG_CRYPTO_GCM is not set
1073# CONFIG_CRYPTO_CCM is not set
1074# CONFIG_CRYPTO_CRYPTD is not set
1075# CONFIG_CRYPTO_DES is not set
1076# CONFIG_CRYPTO_FCRYPT is not set
1077# CONFIG_CRYPTO_BLOWFISH is not set
1078# CONFIG_CRYPTO_TWOFISH is not set
1079# CONFIG_CRYPTO_SERPENT is not set
1080# CONFIG_CRYPTO_AES is not set 1112# CONFIG_CRYPTO_AES is not set
1113# CONFIG_CRYPTO_ANUBIS is not set
1114# CONFIG_CRYPTO_ARC4 is not set
1115# CONFIG_CRYPTO_BLOWFISH is not set
1116# CONFIG_CRYPTO_CAMELLIA is not set
1081# CONFIG_CRYPTO_CAST5 is not set 1117# CONFIG_CRYPTO_CAST5 is not set
1082# CONFIG_CRYPTO_CAST6 is not set 1118# CONFIG_CRYPTO_CAST6 is not set
1083# CONFIG_CRYPTO_TEA is not set 1119# CONFIG_CRYPTO_DES is not set
1084# CONFIG_CRYPTO_ARC4 is not set 1120# CONFIG_CRYPTO_FCRYPT is not set
1085# CONFIG_CRYPTO_KHAZAD is not set 1121# CONFIG_CRYPTO_KHAZAD is not set
1086# CONFIG_CRYPTO_ANUBIS is not set
1087# CONFIG_CRYPTO_SEED is not set
1088# CONFIG_CRYPTO_SALSA20 is not set 1122# CONFIG_CRYPTO_SALSA20 is not set
1123# CONFIG_CRYPTO_SEED is not set
1124# CONFIG_CRYPTO_SERPENT is not set
1125# CONFIG_CRYPTO_TEA is not set
1126# CONFIG_CRYPTO_TWOFISH is not set
1127
1128#
1129# Compression
1130#
1089# CONFIG_CRYPTO_DEFLATE is not set 1131# CONFIG_CRYPTO_DEFLATE is not set
1090# CONFIG_CRYPTO_MICHAEL_MIC is not set
1091# CONFIG_CRYPTO_CRC32C is not set
1092# CONFIG_CRYPTO_CAMELLIA is not set
1093# CONFIG_CRYPTO_AUTHENC is not set
1094# CONFIG_CRYPTO_LZO is not set 1132# CONFIG_CRYPTO_LZO is not set
1095CONFIG_CRYPTO_HW=y 1133CONFIG_CRYPTO_HW=y
1096# CONFIG_CRYPTO_DEV_HIFN_795X is not set 1134# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1097# CONFIG_PPC_CLOCK is not set 1135# CONFIG_PPC_CLOCK is not set
1136# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/85xx/tqm8541_defconfig b/arch/powerpc/configs/85xx/tqm8541_defconfig
index cbf6ad2d71da..6f9067b49e07 100644
--- a/arch/powerpc/configs/85xx/tqm8541_defconfig
+++ b/arch/powerpc/configs/85xx/tqm8541_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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 24 08:48:44 2008 4# Mon Jun 9 08:52:40 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -32,6 +32,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 34CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_LOCKDEP_SUPPORT=y
35CONFIG_RWSEM_XCHGADD_ALGORITHM=y 37CONFIG_RWSEM_XCHGADD_ALGORITHM=y
36CONFIG_ARCH_HAS_ILOG2_U32=y 38CONFIG_ARCH_HAS_ILOG2_U32=y
37CONFIG_GENERIC_HWEIGHT=y 39CONFIG_GENERIC_HWEIGHT=y
@@ -87,6 +89,7 @@ CONFIG_INITRAMFS_SOURCE=""
87CONFIG_SYSCTL=y 89CONFIG_SYSCTL=y
88CONFIG_EMBEDDED=y 90CONFIG_EMBEDDED=y
89CONFIG_SYSCTL_SYSCALL=y 91CONFIG_SYSCTL_SYSCALL=y
92CONFIG_SYSCTL_SYSCALL_CHECK=y
90# CONFIG_KALLSYMS is not set 93# CONFIG_KALLSYMS is not set
91# CONFIG_HOTPLUG is not set 94# CONFIG_HOTPLUG is not set
92CONFIG_PRINTK=y 95CONFIG_PRINTK=y
@@ -111,6 +114,7 @@ CONFIG_SLUB=y
111CONFIG_HAVE_OPROFILE=y 114CONFIG_HAVE_OPROFILE=y
112CONFIG_HAVE_KPROBES=y 115CONFIG_HAVE_KPROBES=y
113CONFIG_HAVE_KRETPROBES=y 116CONFIG_HAVE_KRETPROBES=y
117# CONFIG_HAVE_DMA_ATTRS is not set
114CONFIG_PROC_PAGE_MONITOR=y 118CONFIG_PROC_PAGE_MONITOR=y
115CONFIG_SLABINFO=y 119CONFIG_SLABINFO=y
116CONFIG_RT_MUTEXES=y 120CONFIG_RT_MUTEXES=y
@@ -151,6 +155,7 @@ CONFIG_MPC85xx=y
151# CONFIG_MPC85xx_CDS is not set 155# CONFIG_MPC85xx_CDS is not set
152# CONFIG_MPC85xx_MDS is not set 156# CONFIG_MPC85xx_MDS is not set
153# CONFIG_MPC85xx_DS is not set 157# CONFIG_MPC85xx_DS is not set
158# CONFIG_KSI8560 is not set
154# CONFIG_STX_GP3 is not set 159# CONFIG_STX_GP3 is not set
155# CONFIG_TQM8540 is not set 160# CONFIG_TQM8540 is not set
156CONFIG_TQM8541=y 161CONFIG_TQM8541=y
@@ -209,11 +214,13 @@ CONFIG_FLATMEM=y
209CONFIG_FLAT_NODE_MEM_MAP=y 214CONFIG_FLAT_NODE_MEM_MAP=y
210# CONFIG_SPARSEMEM_STATIC is not set 215# CONFIG_SPARSEMEM_STATIC is not set
211# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 216# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
217CONFIG_PAGEFLAGS_EXTENDED=y
212CONFIG_SPLIT_PTLOCK_CPUS=4 218CONFIG_SPLIT_PTLOCK_CPUS=4
213# CONFIG_RESOURCES_64BIT is not set 219# CONFIG_RESOURCES_64BIT is not set
214CONFIG_ZONE_DMA_FLAG=1 220CONFIG_ZONE_DMA_FLAG=1
215CONFIG_BOUNCE=y 221CONFIG_BOUNCE=y
216CONFIG_VIRT_TO_BUS=y 222CONFIG_VIRT_TO_BUS=y
223CONFIG_FORCE_MAX_ZONEORDER=11
217# CONFIG_PROC_DEVICETREE is not set 224# CONFIG_PROC_DEVICETREE is not set
218# CONFIG_CMDLINE_BOOL is not set 225# CONFIG_CMDLINE_BOOL is not set
219# CONFIG_PM is not set 226# CONFIG_PM is not set
@@ -234,6 +241,7 @@ CONFIG_PCI_SYSCALL=y
234CONFIG_ARCH_SUPPORTS_MSI=y 241CONFIG_ARCH_SUPPORTS_MSI=y
235# CONFIG_PCI_MSI is not set 242# CONFIG_PCI_MSI is not set
236CONFIG_PCI_LEGACY=y 243CONFIG_PCI_LEGACY=y
244# CONFIG_HAS_RAPIDIO is not set
237 245
238# 246#
239# Advanced setup 247# Advanced setup
@@ -243,11 +251,12 @@ CONFIG_PCI_LEGACY=y
243# 251#
244# Default settings for advanced configuration options are used 252# Default settings for advanced configuration options are used
245# 253#
246CONFIG_HIGHMEM_START=0xfe000000
247CONFIG_LOWMEM_SIZE=0x30000000 254CONFIG_LOWMEM_SIZE=0x30000000
255CONFIG_PAGE_OFFSET=0xc0000000
248CONFIG_KERNEL_START=0xc0000000 256CONFIG_KERNEL_START=0xc0000000
257CONFIG_PHYSICAL_START=0x00000000
258CONFIG_PHYSICAL_ALIGN=0x10000000
249CONFIG_TASK_SIZE=0xc0000000 259CONFIG_TASK_SIZE=0xc0000000
250CONFIG_BOOT_LOAD=0x00800000
251 260
252# 261#
253# Networking 262# Networking
@@ -295,8 +304,6 @@ CONFIG_TCP_CONG_CUBIC=y
295CONFIG_DEFAULT_TCP_CONG="cubic" 304CONFIG_DEFAULT_TCP_CONG="cubic"
296# CONFIG_TCP_MD5SIG is not set 305# CONFIG_TCP_MD5SIG is not set
297# CONFIG_IPV6 is not set 306# CONFIG_IPV6 is not set
298# CONFIG_INET6_XFRM_TUNNEL is not set
299# CONFIG_INET6_TUNNEL is not set
300# CONFIG_NETWORK_SECMARK is not set 307# CONFIG_NETWORK_SECMARK is not set
301# CONFIG_NETFILTER is not set 308# CONFIG_NETFILTER is not set
302# CONFIG_IP_DCCP is not set 309# CONFIG_IP_DCCP is not set
@@ -353,6 +360,7 @@ CONFIG_MTD_PARTITIONS=y
353# CONFIG_MTD_REDBOOT_PARTS is not set 360# CONFIG_MTD_REDBOOT_PARTS is not set
354CONFIG_MTD_CMDLINE_PARTS=y 361CONFIG_MTD_CMDLINE_PARTS=y
355# CONFIG_MTD_OF_PARTS is not set 362# CONFIG_MTD_OF_PARTS is not set
363# CONFIG_MTD_AR7_PARTS is not set
356 364
357# 365#
358# User Modules And Translation Layers 366# User Modules And Translation Layers
@@ -424,6 +432,7 @@ CONFIG_MTD_CFI_UTIL=y
424# 432#
425# CONFIG_MTD_UBI is not set 433# CONFIG_MTD_UBI is not set
426CONFIG_OF_DEVICE=y 434CONFIG_OF_DEVICE=y
435CONFIG_OF_I2C=y
427# CONFIG_PARPORT is not set 436# CONFIG_PARPORT is not set
428CONFIG_BLK_DEV=y 437CONFIG_BLK_DEV=y
429# CONFIG_BLK_DEV_FD is not set 438# CONFIG_BLK_DEV_FD is not set
@@ -507,7 +516,7 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y
507CONFIG_BLK_DEV_VIA82CXXX=y 516CONFIG_BLK_DEV_VIA82CXXX=y
508# CONFIG_BLK_DEV_TC86C001 is not set 517# CONFIG_BLK_DEV_TC86C001 is not set
509CONFIG_BLK_DEV_IDEDMA=y 518CONFIG_BLK_DEV_IDEDMA=y
510CONFIG_IDE_ARCH_OBSOLETE_INIT=y 519# CONFIG_BLK_DEV_HD_ONLY is not set
511# CONFIG_BLK_DEV_HD is not set 520# CONFIG_BLK_DEV_HD is not set
512 521
513# 522#
@@ -602,7 +611,6 @@ CONFIG_NETDEV_1000=y
602# CONFIG_SIS190 is not set 611# CONFIG_SIS190 is not set
603# CONFIG_SKGE is not set 612# CONFIG_SKGE is not set
604# CONFIG_SKY2 is not set 613# CONFIG_SKY2 is not set
605# CONFIG_SK98LIN is not set
606# CONFIG_VIA_VELOCITY is not set 614# CONFIG_VIA_VELOCITY is not set
607# CONFIG_TIGON3 is not set 615# CONFIG_TIGON3 is not set
608# CONFIG_BNX2 is not set 616# CONFIG_BNX2 is not set
@@ -622,6 +630,7 @@ CONFIG_NETDEV_10000=y
622# CONFIG_MLX4_CORE is not set 630# CONFIG_MLX4_CORE is not set
623# CONFIG_TEHUTI is not set 631# CONFIG_TEHUTI is not set
624# CONFIG_BNX2X is not set 632# CONFIG_BNX2X is not set
633# CONFIG_SFC is not set
625# CONFIG_TR is not set 634# CONFIG_TR is not set
626 635
627# 636#
@@ -629,6 +638,7 @@ CONFIG_NETDEV_10000=y
629# 638#
630# CONFIG_WLAN_PRE80211 is not set 639# CONFIG_WLAN_PRE80211 is not set
631# CONFIG_WLAN_80211 is not set 640# CONFIG_WLAN_80211 is not set
641# CONFIG_IWLWIFI_LEDS is not set
632# CONFIG_WAN is not set 642# CONFIG_WAN is not set
633# CONFIG_FDDI is not set 643# CONFIG_FDDI is not set
634# CONFIG_HIPPI is not set 644# CONFIG_HIPPI is not set
@@ -675,6 +685,7 @@ CONFIG_INPUT=y
675# Character devices 685# Character devices
676# 686#
677# CONFIG_VT is not set 687# CONFIG_VT is not set
688CONFIG_DEVKMEM=y
678# CONFIG_SERIAL_NONSTANDARD is not set 689# CONFIG_SERIAL_NONSTANDARD is not set
679# CONFIG_NOZOMI is not set 690# CONFIG_NOZOMI is not set
680 691
@@ -723,13 +734,6 @@ CONFIG_I2C_BOARDINFO=y
723CONFIG_I2C_CHARDEV=y 734CONFIG_I2C_CHARDEV=y
724 735
725# 736#
726# I2C Algorithms
727#
728# CONFIG_I2C_ALGOBIT is not set
729# CONFIG_I2C_ALGOPCF is not set
730# CONFIG_I2C_ALGOPCA is not set
731
732#
733# I2C Hardware Bus support 737# I2C Hardware Bus support
734# 738#
735# CONFIG_I2C_ALI1535 is not set 739# CONFIG_I2C_ALI1535 is not set
@@ -754,6 +758,7 @@ CONFIG_I2C_MPC=y
754# CONFIG_I2C_VIA is not set 758# CONFIG_I2C_VIA is not set
755# CONFIG_I2C_VIAPRO is not set 759# CONFIG_I2C_VIAPRO is not set
756# CONFIG_I2C_VOODOO3 is not set 760# CONFIG_I2C_VOODOO3 is not set
761# CONFIG_I2C_PCA_PLATFORM is not set
757 762
758# 763#
759# Miscellaneous I2C Chip support 764# Miscellaneous I2C Chip support
@@ -763,19 +768,13 @@ CONFIG_I2C_MPC=y
763# CONFIG_SENSORS_PCF8574 is not set 768# CONFIG_SENSORS_PCF8574 is not set
764# CONFIG_PCF8575 is not set 769# CONFIG_PCF8575 is not set
765# CONFIG_SENSORS_PCF8591 is not set 770# CONFIG_SENSORS_PCF8591 is not set
766# CONFIG_TPS65010 is not set
767# CONFIG_SENSORS_MAX6875 is not set 771# CONFIG_SENSORS_MAX6875 is not set
768# CONFIG_SENSORS_TSL2550 is not set 772# CONFIG_SENSORS_TSL2550 is not set
769# CONFIG_I2C_DEBUG_CORE is not set 773# CONFIG_I2C_DEBUG_CORE is not set
770# CONFIG_I2C_DEBUG_ALGO is not set 774# CONFIG_I2C_DEBUG_ALGO is not set
771# CONFIG_I2C_DEBUG_BUS is not set 775# CONFIG_I2C_DEBUG_BUS is not set
772# CONFIG_I2C_DEBUG_CHIP is not set 776# CONFIG_I2C_DEBUG_CHIP is not set
773
774#
775# SPI support
776#
777# CONFIG_SPI is not set 777# CONFIG_SPI is not set
778# CONFIG_SPI_MASTER is not set
779# CONFIG_W1 is not set 778# CONFIG_W1 is not set
780# CONFIG_POWER_SUPPLY is not set 779# CONFIG_POWER_SUPPLY is not set
781CONFIG_HWMON=y 780CONFIG_HWMON=y
@@ -845,12 +844,22 @@ CONFIG_SSB_POSSIBLE=y
845# Multifunction device drivers 844# Multifunction device drivers
846# 845#
847# CONFIG_MFD_SM501 is not set 846# CONFIG_MFD_SM501 is not set
847# CONFIG_HTC_PASIC3 is not set
848 848
849# 849#
850# Multimedia devices 850# Multimedia devices
851# 851#
852
853#
854# Multimedia core support
855#
852# CONFIG_VIDEO_DEV is not set 856# CONFIG_VIDEO_DEV is not set
853# CONFIG_DVB_CORE is not set 857# CONFIG_DVB_CORE is not set
858# CONFIG_VIDEO_MEDIA is not set
859
860#
861# Multimedia drivers
862#
854CONFIG_DAB=y 863CONFIG_DAB=y
855 864
856# 865#
@@ -881,6 +890,8 @@ CONFIG_USB_ARCH_HAS_HCD=y
881CONFIG_USB_ARCH_HAS_OHCI=y 890CONFIG_USB_ARCH_HAS_OHCI=y
882CONFIG_USB_ARCH_HAS_EHCI=y 891CONFIG_USB_ARCH_HAS_EHCI=y
883# CONFIG_USB is not set 892# CONFIG_USB is not set
893# CONFIG_USB_OTG_WHITELIST is not set
894# CONFIG_USB_OTG_BLACKLIST_HUB is not set
884 895
885# 896#
886# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 897# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -889,14 +900,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
889# CONFIG_MMC is not set 900# CONFIG_MMC is not set
890# CONFIG_MEMSTICK is not set 901# CONFIG_MEMSTICK is not set
891# CONFIG_NEW_LEDS is not set 902# CONFIG_NEW_LEDS is not set
903# CONFIG_ACCESSIBILITY is not set
892# CONFIG_INFINIBAND is not set 904# CONFIG_INFINIBAND is not set
893# CONFIG_EDAC is not set 905# CONFIG_EDAC is not set
894# CONFIG_RTC_CLASS is not set 906# CONFIG_RTC_CLASS is not set
895# CONFIG_DMADEVICES is not set 907# CONFIG_DMADEVICES is not set
896
897#
898# Userspace I/O
899#
900# CONFIG_UIO is not set 908# CONFIG_UIO is not set
901 909
902# 910#
@@ -916,7 +924,6 @@ CONFIG_FS_MBCACHE=y
916# CONFIG_JFS_FS is not set 924# CONFIG_JFS_FS is not set
917# CONFIG_FS_POSIX_ACL is not set 925# CONFIG_FS_POSIX_ACL is not set
918# CONFIG_XFS_FS is not set 926# CONFIG_XFS_FS is not set
919# CONFIG_GFS2_FS is not set
920# CONFIG_OCFS2_FS is not set 927# CONFIG_OCFS2_FS is not set
921CONFIG_DNOTIFY=y 928CONFIG_DNOTIFY=y
922CONFIG_INOTIFY=y 929CONFIG_INOTIFY=y
@@ -984,7 +991,6 @@ CONFIG_NETWORK_FILESYSTEMS=y
984CONFIG_NFS_FS=y 991CONFIG_NFS_FS=y
985# CONFIG_NFS_V3 is not set 992# CONFIG_NFS_V3 is not set
986# CONFIG_NFS_V4 is not set 993# CONFIG_NFS_V4 is not set
987# CONFIG_NFS_DIRECTIO is not set
988# CONFIG_NFSD is not set 994# CONFIG_NFSD is not set
989CONFIG_ROOT_NFS=y 995CONFIG_ROOT_NFS=y
990CONFIG_LOCKD=y 996CONFIG_LOCKD=y
@@ -1023,6 +1029,7 @@ CONFIG_PARTITION_ADVANCED=y
1023# Library routines 1029# Library routines
1024# 1030#
1025CONFIG_BITREVERSE=y 1031CONFIG_BITREVERSE=y
1032# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1026# CONFIG_CRC_CCITT is not set 1033# CONFIG_CRC_CCITT is not set
1027# CONFIG_CRC16 is not set 1034# CONFIG_CRC16 is not set
1028# CONFIG_CRC_ITU_T is not set 1035# CONFIG_CRC_ITU_T is not set
@@ -1035,6 +1042,7 @@ CONFIG_PLIST=y
1035CONFIG_HAS_IOMEM=y 1042CONFIG_HAS_IOMEM=y
1036CONFIG_HAS_IOPORT=y 1043CONFIG_HAS_IOPORT=y
1037CONFIG_HAS_DMA=y 1044CONFIG_HAS_DMA=y
1045CONFIG_HAVE_LMB=y
1038 1046
1039# 1047#
1040# Kernel hacking 1048# Kernel hacking
@@ -1042,6 +1050,7 @@ CONFIG_HAS_DMA=y
1042# CONFIG_PRINTK_TIME is not set 1050# CONFIG_PRINTK_TIME is not set
1043CONFIG_ENABLE_WARN_DEPRECATED=y 1051CONFIG_ENABLE_WARN_DEPRECATED=y
1044CONFIG_ENABLE_MUST_CHECK=y 1052CONFIG_ENABLE_MUST_CHECK=y
1053CONFIG_FRAME_WARN=1024
1045# CONFIG_MAGIC_SYSRQ is not set 1054# CONFIG_MAGIC_SYSRQ is not set
1046# CONFIG_UNUSED_SYMBOLS is not set 1055# CONFIG_UNUSED_SYMBOLS is not set
1047# CONFIG_DEBUG_FS is not set 1056# CONFIG_DEBUG_FS is not set
@@ -1052,6 +1061,7 @@ CONFIG_ENABLE_MUST_CHECK=y
1052# CONFIG_DEBUG_BUGVERBOSE is not set 1061# CONFIG_DEBUG_BUGVERBOSE is not set
1053# CONFIG_SAMPLES is not set 1062# CONFIG_SAMPLES is not set
1054# CONFIG_KGDB_CONSOLE is not set 1063# CONFIG_KGDB_CONSOLE is not set
1064# CONFIG_IRQSTACKS is not set
1055# CONFIG_PPC_EARLY_DEBUG is not set 1065# CONFIG_PPC_EARLY_DEBUG is not set
1056 1066
1057# 1067#
@@ -1061,49 +1071,79 @@ CONFIG_ENABLE_MUST_CHECK=y
1061# CONFIG_SECURITY is not set 1071# CONFIG_SECURITY is not set
1062# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1072# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1063CONFIG_CRYPTO=y 1073CONFIG_CRYPTO=y
1064# CONFIG_CRYPTO_SEQIV is not set 1074
1075#
1076# Crypto core or helper
1077#
1065# CONFIG_CRYPTO_MANAGER is not set 1078# CONFIG_CRYPTO_MANAGER is not set
1079# CONFIG_CRYPTO_GF128MUL is not set
1080# CONFIG_CRYPTO_NULL is not set
1081# CONFIG_CRYPTO_CRYPTD is not set
1082# CONFIG_CRYPTO_AUTHENC is not set
1083
1084#
1085# Authenticated Encryption with Associated Data
1086#
1087# CONFIG_CRYPTO_CCM is not set
1088# CONFIG_CRYPTO_GCM is not set
1089# CONFIG_CRYPTO_SEQIV is not set
1090
1091#
1092# Block modes
1093#
1094# CONFIG_CRYPTO_CBC is not set
1095# CONFIG_CRYPTO_CTR is not set
1096# CONFIG_CRYPTO_CTS is not set
1097# CONFIG_CRYPTO_ECB is not set
1098# CONFIG_CRYPTO_LRW is not set
1099# CONFIG_CRYPTO_PCBC is not set
1100# CONFIG_CRYPTO_XTS is not set
1101
1102#
1103# Hash modes
1104#
1066# CONFIG_CRYPTO_HMAC is not set 1105# CONFIG_CRYPTO_HMAC is not set
1067# CONFIG_CRYPTO_XCBC is not set 1106# CONFIG_CRYPTO_XCBC is not set
1068# CONFIG_CRYPTO_NULL is not set 1107
1108#
1109# Digest
1110#
1111# CONFIG_CRYPTO_CRC32C is not set
1069# CONFIG_CRYPTO_MD4 is not set 1112# CONFIG_CRYPTO_MD4 is not set
1070# CONFIG_CRYPTO_MD5 is not set 1113# CONFIG_CRYPTO_MD5 is not set
1114# CONFIG_CRYPTO_MICHAEL_MIC is not set
1071# CONFIG_CRYPTO_SHA1 is not set 1115# CONFIG_CRYPTO_SHA1 is not set
1072# CONFIG_CRYPTO_SHA256 is not set 1116# CONFIG_CRYPTO_SHA256 is not set
1073# CONFIG_CRYPTO_SHA512 is not set 1117# CONFIG_CRYPTO_SHA512 is not set
1074# CONFIG_CRYPTO_WP512 is not set
1075# CONFIG_CRYPTO_TGR192 is not set 1118# CONFIG_CRYPTO_TGR192 is not set
1076# CONFIG_CRYPTO_GF128MUL is not set 1119# CONFIG_CRYPTO_WP512 is not set
1077# CONFIG_CRYPTO_ECB is not set 1120
1078# CONFIG_CRYPTO_CBC is not set 1121#
1079# CONFIG_CRYPTO_PCBC is not set 1122# Ciphers
1080# CONFIG_CRYPTO_LRW is not set 1123#
1081# CONFIG_CRYPTO_XTS is not set
1082# CONFIG_CRYPTO_CTR is not set
1083# CONFIG_CRYPTO_GCM is not set
1084# CONFIG_CRYPTO_CCM is not set
1085# CONFIG_CRYPTO_CRYPTD is not set
1086# CONFIG_CRYPTO_DES is not set
1087# CONFIG_CRYPTO_FCRYPT is not set
1088# CONFIG_CRYPTO_BLOWFISH is not set
1089# CONFIG_CRYPTO_TWOFISH is not set
1090# CONFIG_CRYPTO_SERPENT is not set
1091# CONFIG_CRYPTO_AES is not set 1124# CONFIG_CRYPTO_AES is not set
1125# CONFIG_CRYPTO_ANUBIS is not set
1126# CONFIG_CRYPTO_ARC4 is not set
1127# CONFIG_CRYPTO_BLOWFISH is not set
1128# CONFIG_CRYPTO_CAMELLIA is not set
1092# CONFIG_CRYPTO_CAST5 is not set 1129# CONFIG_CRYPTO_CAST5 is not set
1093# CONFIG_CRYPTO_CAST6 is not set 1130# CONFIG_CRYPTO_CAST6 is not set
1094# CONFIG_CRYPTO_TEA is not set 1131# CONFIG_CRYPTO_DES is not set
1095# CONFIG_CRYPTO_ARC4 is not set 1132# CONFIG_CRYPTO_FCRYPT is not set
1096# CONFIG_CRYPTO_KHAZAD is not set 1133# CONFIG_CRYPTO_KHAZAD is not set
1097# CONFIG_CRYPTO_ANUBIS is not set
1098# CONFIG_CRYPTO_SEED is not set
1099# CONFIG_CRYPTO_SALSA20 is not set 1134# CONFIG_CRYPTO_SALSA20 is not set
1135# CONFIG_CRYPTO_SEED is not set
1136# CONFIG_CRYPTO_SERPENT is not set
1137# CONFIG_CRYPTO_TEA is not set
1138# CONFIG_CRYPTO_TWOFISH is not set
1139
1140#
1141# Compression
1142#
1100# CONFIG_CRYPTO_DEFLATE is not set 1143# CONFIG_CRYPTO_DEFLATE is not set
1101# CONFIG_CRYPTO_MICHAEL_MIC is not set
1102# CONFIG_CRYPTO_CRC32C is not set
1103# CONFIG_CRYPTO_CAMELLIA is not set
1104# CONFIG_CRYPTO_AUTHENC is not set
1105# CONFIG_CRYPTO_LZO is not set 1144# CONFIG_CRYPTO_LZO is not set
1106CONFIG_CRYPTO_HW=y 1145CONFIG_CRYPTO_HW=y
1107# CONFIG_CRYPTO_DEV_HIFN_795X is not set 1146# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1108# CONFIG_PPC_CLOCK is not set 1147# CONFIG_PPC_CLOCK is not set
1109CONFIG_PPC_LIB_RHEAP=y 1148CONFIG_PPC_LIB_RHEAP=y
1149# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/85xx/tqm8555_defconfig b/arch/powerpc/configs/85xx/tqm8555_defconfig
index bbff962c8472..03120b5b52fa 100644
--- a/arch/powerpc/configs/85xx/tqm8555_defconfig
+++ b/arch/powerpc/configs/85xx/tqm8555_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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 24 08:48:44 2008 4# Mon Jun 9 08:52:41 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -32,6 +32,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 34CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_LOCKDEP_SUPPORT=y
35CONFIG_RWSEM_XCHGADD_ALGORITHM=y 37CONFIG_RWSEM_XCHGADD_ALGORITHM=y
36CONFIG_ARCH_HAS_ILOG2_U32=y 38CONFIG_ARCH_HAS_ILOG2_U32=y
37CONFIG_GENERIC_HWEIGHT=y 39CONFIG_GENERIC_HWEIGHT=y
@@ -87,6 +89,7 @@ CONFIG_INITRAMFS_SOURCE=""
87CONFIG_SYSCTL=y 89CONFIG_SYSCTL=y
88CONFIG_EMBEDDED=y 90CONFIG_EMBEDDED=y
89CONFIG_SYSCTL_SYSCALL=y 91CONFIG_SYSCTL_SYSCALL=y
92CONFIG_SYSCTL_SYSCALL_CHECK=y
90# CONFIG_KALLSYMS is not set 93# CONFIG_KALLSYMS is not set
91# CONFIG_HOTPLUG is not set 94# CONFIG_HOTPLUG is not set
92CONFIG_PRINTK=y 95CONFIG_PRINTK=y
@@ -111,6 +114,7 @@ CONFIG_SLUB=y
111CONFIG_HAVE_OPROFILE=y 114CONFIG_HAVE_OPROFILE=y
112CONFIG_HAVE_KPROBES=y 115CONFIG_HAVE_KPROBES=y
113CONFIG_HAVE_KRETPROBES=y 116CONFIG_HAVE_KRETPROBES=y
117# CONFIG_HAVE_DMA_ATTRS is not set
114CONFIG_PROC_PAGE_MONITOR=y 118CONFIG_PROC_PAGE_MONITOR=y
115CONFIG_SLABINFO=y 119CONFIG_SLABINFO=y
116CONFIG_RT_MUTEXES=y 120CONFIG_RT_MUTEXES=y
@@ -151,6 +155,7 @@ CONFIG_MPC85xx=y
151# CONFIG_MPC85xx_CDS is not set 155# CONFIG_MPC85xx_CDS is not set
152# CONFIG_MPC85xx_MDS is not set 156# CONFIG_MPC85xx_MDS is not set
153# CONFIG_MPC85xx_DS is not set 157# CONFIG_MPC85xx_DS is not set
158# CONFIG_KSI8560 is not set
154# CONFIG_STX_GP3 is not set 159# CONFIG_STX_GP3 is not set
155# CONFIG_TQM8540 is not set 160# CONFIG_TQM8540 is not set
156# CONFIG_TQM8541 is not set 161# CONFIG_TQM8541 is not set
@@ -209,11 +214,13 @@ CONFIG_FLATMEM=y
209CONFIG_FLAT_NODE_MEM_MAP=y 214CONFIG_FLAT_NODE_MEM_MAP=y
210# CONFIG_SPARSEMEM_STATIC is not set 215# CONFIG_SPARSEMEM_STATIC is not set
211# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 216# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
217CONFIG_PAGEFLAGS_EXTENDED=y
212CONFIG_SPLIT_PTLOCK_CPUS=4 218CONFIG_SPLIT_PTLOCK_CPUS=4
213# CONFIG_RESOURCES_64BIT is not set 219# CONFIG_RESOURCES_64BIT is not set
214CONFIG_ZONE_DMA_FLAG=1 220CONFIG_ZONE_DMA_FLAG=1
215CONFIG_BOUNCE=y 221CONFIG_BOUNCE=y
216CONFIG_VIRT_TO_BUS=y 222CONFIG_VIRT_TO_BUS=y
223CONFIG_FORCE_MAX_ZONEORDER=11
217# CONFIG_PROC_DEVICETREE is not set 224# CONFIG_PROC_DEVICETREE is not set
218# CONFIG_CMDLINE_BOOL is not set 225# CONFIG_CMDLINE_BOOL is not set
219# CONFIG_PM is not set 226# CONFIG_PM is not set
@@ -234,6 +241,7 @@ CONFIG_PCI_SYSCALL=y
234CONFIG_ARCH_SUPPORTS_MSI=y 241CONFIG_ARCH_SUPPORTS_MSI=y
235# CONFIG_PCI_MSI is not set 242# CONFIG_PCI_MSI is not set
236CONFIG_PCI_LEGACY=y 243CONFIG_PCI_LEGACY=y
244# CONFIG_HAS_RAPIDIO is not set
237 245
238# 246#
239# Advanced setup 247# Advanced setup
@@ -243,11 +251,12 @@ CONFIG_PCI_LEGACY=y
243# 251#
244# Default settings for advanced configuration options are used 252# Default settings for advanced configuration options are used
245# 253#
246CONFIG_HIGHMEM_START=0xfe000000
247CONFIG_LOWMEM_SIZE=0x30000000 254CONFIG_LOWMEM_SIZE=0x30000000
255CONFIG_PAGE_OFFSET=0xc0000000
248CONFIG_KERNEL_START=0xc0000000 256CONFIG_KERNEL_START=0xc0000000
257CONFIG_PHYSICAL_START=0x00000000
258CONFIG_PHYSICAL_ALIGN=0x10000000
249CONFIG_TASK_SIZE=0xc0000000 259CONFIG_TASK_SIZE=0xc0000000
250CONFIG_BOOT_LOAD=0x00800000
251 260
252# 261#
253# Networking 262# Networking
@@ -295,8 +304,6 @@ CONFIG_TCP_CONG_CUBIC=y
295CONFIG_DEFAULT_TCP_CONG="cubic" 304CONFIG_DEFAULT_TCP_CONG="cubic"
296# CONFIG_TCP_MD5SIG is not set 305# CONFIG_TCP_MD5SIG is not set
297# CONFIG_IPV6 is not set 306# CONFIG_IPV6 is not set
298# CONFIG_INET6_XFRM_TUNNEL is not set
299# CONFIG_INET6_TUNNEL is not set
300# CONFIG_NETWORK_SECMARK is not set 307# CONFIG_NETWORK_SECMARK is not set
301# CONFIG_NETFILTER is not set 308# CONFIG_NETFILTER is not set
302# CONFIG_IP_DCCP is not set 309# CONFIG_IP_DCCP is not set
@@ -353,6 +360,7 @@ CONFIG_MTD_PARTITIONS=y
353# CONFIG_MTD_REDBOOT_PARTS is not set 360# CONFIG_MTD_REDBOOT_PARTS is not set
354CONFIG_MTD_CMDLINE_PARTS=y 361CONFIG_MTD_CMDLINE_PARTS=y
355# CONFIG_MTD_OF_PARTS is not set 362# CONFIG_MTD_OF_PARTS is not set
363# CONFIG_MTD_AR7_PARTS is not set
356 364
357# 365#
358# User Modules And Translation Layers 366# User Modules And Translation Layers
@@ -424,6 +432,7 @@ CONFIG_MTD_CFI_UTIL=y
424# 432#
425# CONFIG_MTD_UBI is not set 433# CONFIG_MTD_UBI is not set
426CONFIG_OF_DEVICE=y 434CONFIG_OF_DEVICE=y
435CONFIG_OF_I2C=y
427# CONFIG_PARPORT is not set 436# CONFIG_PARPORT is not set
428CONFIG_BLK_DEV=y 437CONFIG_BLK_DEV=y
429# CONFIG_BLK_DEV_FD is not set 438# CONFIG_BLK_DEV_FD is not set
@@ -507,7 +516,7 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y
507CONFIG_BLK_DEV_VIA82CXXX=y 516CONFIG_BLK_DEV_VIA82CXXX=y
508# CONFIG_BLK_DEV_TC86C001 is not set 517# CONFIG_BLK_DEV_TC86C001 is not set
509CONFIG_BLK_DEV_IDEDMA=y 518CONFIG_BLK_DEV_IDEDMA=y
510CONFIG_IDE_ARCH_OBSOLETE_INIT=y 519# CONFIG_BLK_DEV_HD_ONLY is not set
511# CONFIG_BLK_DEV_HD is not set 520# CONFIG_BLK_DEV_HD is not set
512 521
513# 522#
@@ -602,7 +611,6 @@ CONFIG_NETDEV_1000=y
602# CONFIG_SIS190 is not set 611# CONFIG_SIS190 is not set
603# CONFIG_SKGE is not set 612# CONFIG_SKGE is not set
604# CONFIG_SKY2 is not set 613# CONFIG_SKY2 is not set
605# CONFIG_SK98LIN is not set
606# CONFIG_VIA_VELOCITY is not set 614# CONFIG_VIA_VELOCITY is not set
607# CONFIG_TIGON3 is not set 615# CONFIG_TIGON3 is not set
608# CONFIG_BNX2 is not set 616# CONFIG_BNX2 is not set
@@ -622,6 +630,7 @@ CONFIG_NETDEV_10000=y
622# CONFIG_MLX4_CORE is not set 630# CONFIG_MLX4_CORE is not set
623# CONFIG_TEHUTI is not set 631# CONFIG_TEHUTI is not set
624# CONFIG_BNX2X is not set 632# CONFIG_BNX2X is not set
633# CONFIG_SFC is not set
625# CONFIG_TR is not set 634# CONFIG_TR is not set
626 635
627# 636#
@@ -629,6 +638,7 @@ CONFIG_NETDEV_10000=y
629# 638#
630# CONFIG_WLAN_PRE80211 is not set 639# CONFIG_WLAN_PRE80211 is not set
631# CONFIG_WLAN_80211 is not set 640# CONFIG_WLAN_80211 is not set
641# CONFIG_IWLWIFI_LEDS is not set
632# CONFIG_WAN is not set 642# CONFIG_WAN is not set
633# CONFIG_FDDI is not set 643# CONFIG_FDDI is not set
634# CONFIG_HIPPI is not set 644# CONFIG_HIPPI is not set
@@ -675,6 +685,7 @@ CONFIG_INPUT=y
675# Character devices 685# Character devices
676# 686#
677# CONFIG_VT is not set 687# CONFIG_VT is not set
688CONFIG_DEVKMEM=y
678# CONFIG_SERIAL_NONSTANDARD is not set 689# CONFIG_SERIAL_NONSTANDARD is not set
679# CONFIG_NOZOMI is not set 690# CONFIG_NOZOMI is not set
680 691
@@ -723,13 +734,6 @@ CONFIG_I2C_BOARDINFO=y
723CONFIG_I2C_CHARDEV=y 734CONFIG_I2C_CHARDEV=y
724 735
725# 736#
726# I2C Algorithms
727#
728# CONFIG_I2C_ALGOBIT is not set
729# CONFIG_I2C_ALGOPCF is not set
730# CONFIG_I2C_ALGOPCA is not set
731
732#
733# I2C Hardware Bus support 737# I2C Hardware Bus support
734# 738#
735# CONFIG_I2C_ALI1535 is not set 739# CONFIG_I2C_ALI1535 is not set
@@ -754,6 +758,7 @@ CONFIG_I2C_MPC=y
754# CONFIG_I2C_VIA is not set 758# CONFIG_I2C_VIA is not set
755# CONFIG_I2C_VIAPRO is not set 759# CONFIG_I2C_VIAPRO is not set
756# CONFIG_I2C_VOODOO3 is not set 760# CONFIG_I2C_VOODOO3 is not set
761# CONFIG_I2C_PCA_PLATFORM is not set
757 762
758# 763#
759# Miscellaneous I2C Chip support 764# Miscellaneous I2C Chip support
@@ -763,19 +768,13 @@ CONFIG_I2C_MPC=y
763# CONFIG_SENSORS_PCF8574 is not set 768# CONFIG_SENSORS_PCF8574 is not set
764# CONFIG_PCF8575 is not set 769# CONFIG_PCF8575 is not set
765# CONFIG_SENSORS_PCF8591 is not set 770# CONFIG_SENSORS_PCF8591 is not set
766# CONFIG_TPS65010 is not set
767# CONFIG_SENSORS_MAX6875 is not set 771# CONFIG_SENSORS_MAX6875 is not set
768# CONFIG_SENSORS_TSL2550 is not set 772# CONFIG_SENSORS_TSL2550 is not set
769# CONFIG_I2C_DEBUG_CORE is not set 773# CONFIG_I2C_DEBUG_CORE is not set
770# CONFIG_I2C_DEBUG_ALGO is not set 774# CONFIG_I2C_DEBUG_ALGO is not set
771# CONFIG_I2C_DEBUG_BUS is not set 775# CONFIG_I2C_DEBUG_BUS is not set
772# CONFIG_I2C_DEBUG_CHIP is not set 776# CONFIG_I2C_DEBUG_CHIP is not set
773
774#
775# SPI support
776#
777# CONFIG_SPI is not set 777# CONFIG_SPI is not set
778# CONFIG_SPI_MASTER is not set
779# CONFIG_W1 is not set 778# CONFIG_W1 is not set
780# CONFIG_POWER_SUPPLY is not set 779# CONFIG_POWER_SUPPLY is not set
781CONFIG_HWMON=y 780CONFIG_HWMON=y
@@ -845,12 +844,22 @@ CONFIG_SSB_POSSIBLE=y
845# Multifunction device drivers 844# Multifunction device drivers
846# 845#
847# CONFIG_MFD_SM501 is not set 846# CONFIG_MFD_SM501 is not set
847# CONFIG_HTC_PASIC3 is not set
848 848
849# 849#
850# Multimedia devices 850# Multimedia devices
851# 851#
852
853#
854# Multimedia core support
855#
852# CONFIG_VIDEO_DEV is not set 856# CONFIG_VIDEO_DEV is not set
853# CONFIG_DVB_CORE is not set 857# CONFIG_DVB_CORE is not set
858# CONFIG_VIDEO_MEDIA is not set
859
860#
861# Multimedia drivers
862#
854CONFIG_DAB=y 863CONFIG_DAB=y
855 864
856# 865#
@@ -881,6 +890,8 @@ CONFIG_USB_ARCH_HAS_HCD=y
881CONFIG_USB_ARCH_HAS_OHCI=y 890CONFIG_USB_ARCH_HAS_OHCI=y
882CONFIG_USB_ARCH_HAS_EHCI=y 891CONFIG_USB_ARCH_HAS_EHCI=y
883# CONFIG_USB is not set 892# CONFIG_USB is not set
893# CONFIG_USB_OTG_WHITELIST is not set
894# CONFIG_USB_OTG_BLACKLIST_HUB is not set
884 895
885# 896#
886# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 897# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -889,14 +900,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
889# CONFIG_MMC is not set 900# CONFIG_MMC is not set
890# CONFIG_MEMSTICK is not set 901# CONFIG_MEMSTICK is not set
891# CONFIG_NEW_LEDS is not set 902# CONFIG_NEW_LEDS is not set
903# CONFIG_ACCESSIBILITY is not set
892# CONFIG_INFINIBAND is not set 904# CONFIG_INFINIBAND is not set
893# CONFIG_EDAC is not set 905# CONFIG_EDAC is not set
894# CONFIG_RTC_CLASS is not set 906# CONFIG_RTC_CLASS is not set
895# CONFIG_DMADEVICES is not set 907# CONFIG_DMADEVICES is not set
896
897#
898# Userspace I/O
899#
900# CONFIG_UIO is not set 908# CONFIG_UIO is not set
901 909
902# 910#
@@ -916,7 +924,6 @@ CONFIG_FS_MBCACHE=y
916# CONFIG_JFS_FS is not set 924# CONFIG_JFS_FS is not set
917# CONFIG_FS_POSIX_ACL is not set 925# CONFIG_FS_POSIX_ACL is not set
918# CONFIG_XFS_FS is not set 926# CONFIG_XFS_FS is not set
919# CONFIG_GFS2_FS is not set
920# CONFIG_OCFS2_FS is not set 927# CONFIG_OCFS2_FS is not set
921CONFIG_DNOTIFY=y 928CONFIG_DNOTIFY=y
922CONFIG_INOTIFY=y 929CONFIG_INOTIFY=y
@@ -984,7 +991,6 @@ CONFIG_NETWORK_FILESYSTEMS=y
984CONFIG_NFS_FS=y 991CONFIG_NFS_FS=y
985# CONFIG_NFS_V3 is not set 992# CONFIG_NFS_V3 is not set
986# CONFIG_NFS_V4 is not set 993# CONFIG_NFS_V4 is not set
987# CONFIG_NFS_DIRECTIO is not set
988# CONFIG_NFSD is not set 994# CONFIG_NFSD is not set
989CONFIG_ROOT_NFS=y 995CONFIG_ROOT_NFS=y
990CONFIG_LOCKD=y 996CONFIG_LOCKD=y
@@ -1023,6 +1029,7 @@ CONFIG_PARTITION_ADVANCED=y
1023# Library routines 1029# Library routines
1024# 1030#
1025CONFIG_BITREVERSE=y 1031CONFIG_BITREVERSE=y
1032# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1026# CONFIG_CRC_CCITT is not set 1033# CONFIG_CRC_CCITT is not set
1027# CONFIG_CRC16 is not set 1034# CONFIG_CRC16 is not set
1028# CONFIG_CRC_ITU_T is not set 1035# CONFIG_CRC_ITU_T is not set
@@ -1035,6 +1042,7 @@ CONFIG_PLIST=y
1035CONFIG_HAS_IOMEM=y 1042CONFIG_HAS_IOMEM=y
1036CONFIG_HAS_IOPORT=y 1043CONFIG_HAS_IOPORT=y
1037CONFIG_HAS_DMA=y 1044CONFIG_HAS_DMA=y
1045CONFIG_HAVE_LMB=y
1038 1046
1039# 1047#
1040# Kernel hacking 1048# Kernel hacking
@@ -1042,6 +1050,7 @@ CONFIG_HAS_DMA=y
1042# CONFIG_PRINTK_TIME is not set 1050# CONFIG_PRINTK_TIME is not set
1043CONFIG_ENABLE_WARN_DEPRECATED=y 1051CONFIG_ENABLE_WARN_DEPRECATED=y
1044CONFIG_ENABLE_MUST_CHECK=y 1052CONFIG_ENABLE_MUST_CHECK=y
1053CONFIG_FRAME_WARN=1024
1045# CONFIG_MAGIC_SYSRQ is not set 1054# CONFIG_MAGIC_SYSRQ is not set
1046# CONFIG_UNUSED_SYMBOLS is not set 1055# CONFIG_UNUSED_SYMBOLS is not set
1047# CONFIG_DEBUG_FS is not set 1056# CONFIG_DEBUG_FS is not set
@@ -1052,6 +1061,7 @@ CONFIG_ENABLE_MUST_CHECK=y
1052# CONFIG_DEBUG_BUGVERBOSE is not set 1061# CONFIG_DEBUG_BUGVERBOSE is not set
1053# CONFIG_SAMPLES is not set 1062# CONFIG_SAMPLES is not set
1054# CONFIG_KGDB_CONSOLE is not set 1063# CONFIG_KGDB_CONSOLE is not set
1064# CONFIG_IRQSTACKS is not set
1055# CONFIG_PPC_EARLY_DEBUG is not set 1065# CONFIG_PPC_EARLY_DEBUG is not set
1056 1066
1057# 1067#
@@ -1061,49 +1071,79 @@ CONFIG_ENABLE_MUST_CHECK=y
1061# CONFIG_SECURITY is not set 1071# CONFIG_SECURITY is not set
1062# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1072# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1063CONFIG_CRYPTO=y 1073CONFIG_CRYPTO=y
1064# CONFIG_CRYPTO_SEQIV is not set 1074
1075#
1076# Crypto core or helper
1077#
1065# CONFIG_CRYPTO_MANAGER is not set 1078# CONFIG_CRYPTO_MANAGER is not set
1079# CONFIG_CRYPTO_GF128MUL is not set
1080# CONFIG_CRYPTO_NULL is not set
1081# CONFIG_CRYPTO_CRYPTD is not set
1082# CONFIG_CRYPTO_AUTHENC is not set
1083
1084#
1085# Authenticated Encryption with Associated Data
1086#
1087# CONFIG_CRYPTO_CCM is not set
1088# CONFIG_CRYPTO_GCM is not set
1089# CONFIG_CRYPTO_SEQIV is not set
1090
1091#
1092# Block modes
1093#
1094# CONFIG_CRYPTO_CBC is not set
1095# CONFIG_CRYPTO_CTR is not set
1096# CONFIG_CRYPTO_CTS is not set
1097# CONFIG_CRYPTO_ECB is not set
1098# CONFIG_CRYPTO_LRW is not set
1099# CONFIG_CRYPTO_PCBC is not set
1100# CONFIG_CRYPTO_XTS is not set
1101
1102#
1103# Hash modes
1104#
1066# CONFIG_CRYPTO_HMAC is not set 1105# CONFIG_CRYPTO_HMAC is not set
1067# CONFIG_CRYPTO_XCBC is not set 1106# CONFIG_CRYPTO_XCBC is not set
1068# CONFIG_CRYPTO_NULL is not set 1107
1108#
1109# Digest
1110#
1111# CONFIG_CRYPTO_CRC32C is not set
1069# CONFIG_CRYPTO_MD4 is not set 1112# CONFIG_CRYPTO_MD4 is not set
1070# CONFIG_CRYPTO_MD5 is not set 1113# CONFIG_CRYPTO_MD5 is not set
1114# CONFIG_CRYPTO_MICHAEL_MIC is not set
1071# CONFIG_CRYPTO_SHA1 is not set 1115# CONFIG_CRYPTO_SHA1 is not set
1072# CONFIG_CRYPTO_SHA256 is not set 1116# CONFIG_CRYPTO_SHA256 is not set
1073# CONFIG_CRYPTO_SHA512 is not set 1117# CONFIG_CRYPTO_SHA512 is not set
1074# CONFIG_CRYPTO_WP512 is not set
1075# CONFIG_CRYPTO_TGR192 is not set 1118# CONFIG_CRYPTO_TGR192 is not set
1076# CONFIG_CRYPTO_GF128MUL is not set 1119# CONFIG_CRYPTO_WP512 is not set
1077# CONFIG_CRYPTO_ECB is not set 1120
1078# CONFIG_CRYPTO_CBC is not set 1121#
1079# CONFIG_CRYPTO_PCBC is not set 1122# Ciphers
1080# CONFIG_CRYPTO_LRW is not set 1123#
1081# CONFIG_CRYPTO_XTS is not set
1082# CONFIG_CRYPTO_CTR is not set
1083# CONFIG_CRYPTO_GCM is not set
1084# CONFIG_CRYPTO_CCM is not set
1085# CONFIG_CRYPTO_CRYPTD is not set
1086# CONFIG_CRYPTO_DES is not set
1087# CONFIG_CRYPTO_FCRYPT is not set
1088# CONFIG_CRYPTO_BLOWFISH is not set
1089# CONFIG_CRYPTO_TWOFISH is not set
1090# CONFIG_CRYPTO_SERPENT is not set
1091# CONFIG_CRYPTO_AES is not set 1124# CONFIG_CRYPTO_AES is not set
1125# CONFIG_CRYPTO_ANUBIS is not set
1126# CONFIG_CRYPTO_ARC4 is not set
1127# CONFIG_CRYPTO_BLOWFISH is not set
1128# CONFIG_CRYPTO_CAMELLIA is not set
1092# CONFIG_CRYPTO_CAST5 is not set 1129# CONFIG_CRYPTO_CAST5 is not set
1093# CONFIG_CRYPTO_CAST6 is not set 1130# CONFIG_CRYPTO_CAST6 is not set
1094# CONFIG_CRYPTO_TEA is not set 1131# CONFIG_CRYPTO_DES is not set
1095# CONFIG_CRYPTO_ARC4 is not set 1132# CONFIG_CRYPTO_FCRYPT is not set
1096# CONFIG_CRYPTO_KHAZAD is not set 1133# CONFIG_CRYPTO_KHAZAD is not set
1097# CONFIG_CRYPTO_ANUBIS is not set
1098# CONFIG_CRYPTO_SEED is not set
1099# CONFIG_CRYPTO_SALSA20 is not set 1134# CONFIG_CRYPTO_SALSA20 is not set
1135# CONFIG_CRYPTO_SEED is not set
1136# CONFIG_CRYPTO_SERPENT is not set
1137# CONFIG_CRYPTO_TEA is not set
1138# CONFIG_CRYPTO_TWOFISH is not set
1139
1140#
1141# Compression
1142#
1100# CONFIG_CRYPTO_DEFLATE is not set 1143# CONFIG_CRYPTO_DEFLATE is not set
1101# CONFIG_CRYPTO_MICHAEL_MIC is not set
1102# CONFIG_CRYPTO_CRC32C is not set
1103# CONFIG_CRYPTO_CAMELLIA is not set
1104# CONFIG_CRYPTO_AUTHENC is not set
1105# CONFIG_CRYPTO_LZO is not set 1144# CONFIG_CRYPTO_LZO is not set
1106CONFIG_CRYPTO_HW=y 1145CONFIG_CRYPTO_HW=y
1107# CONFIG_CRYPTO_DEV_HIFN_795X is not set 1146# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1108# CONFIG_PPC_CLOCK is not set 1147# CONFIG_PPC_CLOCK is not set
1109CONFIG_PPC_LIB_RHEAP=y 1148CONFIG_PPC_LIB_RHEAP=y
1149# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/85xx/tqm8560_defconfig b/arch/powerpc/configs/85xx/tqm8560_defconfig
index 63c5ec8b6515..3113257edf5a 100644
--- a/arch/powerpc/configs/85xx/tqm8560_defconfig
+++ b/arch/powerpc/configs/85xx/tqm8560_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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 24 08:48:45 2008 4# Mon Jun 9 08:52:42 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -32,6 +32,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 34CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_LOCKDEP_SUPPORT=y
35CONFIG_RWSEM_XCHGADD_ALGORITHM=y 37CONFIG_RWSEM_XCHGADD_ALGORITHM=y
36CONFIG_ARCH_HAS_ILOG2_U32=y 38CONFIG_ARCH_HAS_ILOG2_U32=y
37CONFIG_GENERIC_HWEIGHT=y 39CONFIG_GENERIC_HWEIGHT=y
@@ -87,6 +89,7 @@ CONFIG_INITRAMFS_SOURCE=""
87CONFIG_SYSCTL=y 89CONFIG_SYSCTL=y
88CONFIG_EMBEDDED=y 90CONFIG_EMBEDDED=y
89CONFIG_SYSCTL_SYSCALL=y 91CONFIG_SYSCTL_SYSCALL=y
92CONFIG_SYSCTL_SYSCALL_CHECK=y
90# CONFIG_KALLSYMS is not set 93# CONFIG_KALLSYMS is not set
91# CONFIG_HOTPLUG is not set 94# CONFIG_HOTPLUG is not set
92CONFIG_PRINTK=y 95CONFIG_PRINTK=y
@@ -111,6 +114,7 @@ CONFIG_SLUB=y
111CONFIG_HAVE_OPROFILE=y 114CONFIG_HAVE_OPROFILE=y
112CONFIG_HAVE_KPROBES=y 115CONFIG_HAVE_KPROBES=y
113CONFIG_HAVE_KRETPROBES=y 116CONFIG_HAVE_KRETPROBES=y
117# CONFIG_HAVE_DMA_ATTRS is not set
114CONFIG_PROC_PAGE_MONITOR=y 118CONFIG_PROC_PAGE_MONITOR=y
115CONFIG_SLABINFO=y 119CONFIG_SLABINFO=y
116CONFIG_RT_MUTEXES=y 120CONFIG_RT_MUTEXES=y
@@ -151,6 +155,7 @@ CONFIG_MPC85xx=y
151# CONFIG_MPC85xx_CDS is not set 155# CONFIG_MPC85xx_CDS is not set
152# CONFIG_MPC85xx_MDS is not set 156# CONFIG_MPC85xx_MDS is not set
153# CONFIG_MPC85xx_DS is not set 157# CONFIG_MPC85xx_DS is not set
158# CONFIG_KSI8560 is not set
154# CONFIG_STX_GP3 is not set 159# CONFIG_STX_GP3 is not set
155# CONFIG_TQM8540 is not set 160# CONFIG_TQM8540 is not set
156# CONFIG_TQM8541 is not set 161# CONFIG_TQM8541 is not set
@@ -209,11 +214,13 @@ CONFIG_FLATMEM=y
209CONFIG_FLAT_NODE_MEM_MAP=y 214CONFIG_FLAT_NODE_MEM_MAP=y
210# CONFIG_SPARSEMEM_STATIC is not set 215# CONFIG_SPARSEMEM_STATIC is not set
211# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 216# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
217CONFIG_PAGEFLAGS_EXTENDED=y
212CONFIG_SPLIT_PTLOCK_CPUS=4 218CONFIG_SPLIT_PTLOCK_CPUS=4
213# CONFIG_RESOURCES_64BIT is not set 219# CONFIG_RESOURCES_64BIT is not set
214CONFIG_ZONE_DMA_FLAG=1 220CONFIG_ZONE_DMA_FLAG=1
215CONFIG_BOUNCE=y 221CONFIG_BOUNCE=y
216CONFIG_VIRT_TO_BUS=y 222CONFIG_VIRT_TO_BUS=y
223CONFIG_FORCE_MAX_ZONEORDER=11
217# CONFIG_PROC_DEVICETREE is not set 224# CONFIG_PROC_DEVICETREE is not set
218# CONFIG_CMDLINE_BOOL is not set 225# CONFIG_CMDLINE_BOOL is not set
219# CONFIG_PM is not set 226# CONFIG_PM is not set
@@ -234,6 +241,7 @@ CONFIG_PCI_SYSCALL=y
234CONFIG_ARCH_SUPPORTS_MSI=y 241CONFIG_ARCH_SUPPORTS_MSI=y
235# CONFIG_PCI_MSI is not set 242# CONFIG_PCI_MSI is not set
236CONFIG_PCI_LEGACY=y 243CONFIG_PCI_LEGACY=y
244# CONFIG_HAS_RAPIDIO is not set
237 245
238# 246#
239# Advanced setup 247# Advanced setup
@@ -243,11 +251,12 @@ CONFIG_PCI_LEGACY=y
243# 251#
244# Default settings for advanced configuration options are used 252# Default settings for advanced configuration options are used
245# 253#
246CONFIG_HIGHMEM_START=0xfe000000
247CONFIG_LOWMEM_SIZE=0x30000000 254CONFIG_LOWMEM_SIZE=0x30000000
255CONFIG_PAGE_OFFSET=0xc0000000
248CONFIG_KERNEL_START=0xc0000000 256CONFIG_KERNEL_START=0xc0000000
257CONFIG_PHYSICAL_START=0x00000000
258CONFIG_PHYSICAL_ALIGN=0x10000000
249CONFIG_TASK_SIZE=0xc0000000 259CONFIG_TASK_SIZE=0xc0000000
250CONFIG_BOOT_LOAD=0x00800000
251 260
252# 261#
253# Networking 262# Networking
@@ -295,8 +304,6 @@ CONFIG_TCP_CONG_CUBIC=y
295CONFIG_DEFAULT_TCP_CONG="cubic" 304CONFIG_DEFAULT_TCP_CONG="cubic"
296# CONFIG_TCP_MD5SIG is not set 305# CONFIG_TCP_MD5SIG is not set
297# CONFIG_IPV6 is not set 306# CONFIG_IPV6 is not set
298# CONFIG_INET6_XFRM_TUNNEL is not set
299# CONFIG_INET6_TUNNEL is not set
300# CONFIG_NETWORK_SECMARK is not set 307# CONFIG_NETWORK_SECMARK is not set
301# CONFIG_NETFILTER is not set 308# CONFIG_NETFILTER is not set
302# CONFIG_IP_DCCP is not set 309# CONFIG_IP_DCCP is not set
@@ -353,6 +360,7 @@ CONFIG_MTD_PARTITIONS=y
353# CONFIG_MTD_REDBOOT_PARTS is not set 360# CONFIG_MTD_REDBOOT_PARTS is not set
354CONFIG_MTD_CMDLINE_PARTS=y 361CONFIG_MTD_CMDLINE_PARTS=y
355# CONFIG_MTD_OF_PARTS is not set 362# CONFIG_MTD_OF_PARTS is not set
363# CONFIG_MTD_AR7_PARTS is not set
356 364
357# 365#
358# User Modules And Translation Layers 366# User Modules And Translation Layers
@@ -424,6 +432,7 @@ CONFIG_MTD_CFI_UTIL=y
424# 432#
425# CONFIG_MTD_UBI is not set 433# CONFIG_MTD_UBI is not set
426CONFIG_OF_DEVICE=y 434CONFIG_OF_DEVICE=y
435CONFIG_OF_I2C=y
427# CONFIG_PARPORT is not set 436# CONFIG_PARPORT is not set
428CONFIG_BLK_DEV=y 437CONFIG_BLK_DEV=y
429# CONFIG_BLK_DEV_FD is not set 438# CONFIG_BLK_DEV_FD is not set
@@ -507,7 +516,7 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y
507CONFIG_BLK_DEV_VIA82CXXX=y 516CONFIG_BLK_DEV_VIA82CXXX=y
508# CONFIG_BLK_DEV_TC86C001 is not set 517# CONFIG_BLK_DEV_TC86C001 is not set
509CONFIG_BLK_DEV_IDEDMA=y 518CONFIG_BLK_DEV_IDEDMA=y
510CONFIG_IDE_ARCH_OBSOLETE_INIT=y 519# CONFIG_BLK_DEV_HD_ONLY is not set
511# CONFIG_BLK_DEV_HD is not set 520# CONFIG_BLK_DEV_HD is not set
512 521
513# 522#
@@ -602,7 +611,6 @@ CONFIG_NETDEV_1000=y
602# CONFIG_SIS190 is not set 611# CONFIG_SIS190 is not set
603# CONFIG_SKGE is not set 612# CONFIG_SKGE is not set
604# CONFIG_SKY2 is not set 613# CONFIG_SKY2 is not set
605# CONFIG_SK98LIN is not set
606# CONFIG_VIA_VELOCITY is not set 614# CONFIG_VIA_VELOCITY is not set
607# CONFIG_TIGON3 is not set 615# CONFIG_TIGON3 is not set
608# CONFIG_BNX2 is not set 616# CONFIG_BNX2 is not set
@@ -622,6 +630,7 @@ CONFIG_NETDEV_10000=y
622# CONFIG_MLX4_CORE is not set 630# CONFIG_MLX4_CORE is not set
623# CONFIG_TEHUTI is not set 631# CONFIG_TEHUTI is not set
624# CONFIG_BNX2X is not set 632# CONFIG_BNX2X is not set
633# CONFIG_SFC is not set
625# CONFIG_TR is not set 634# CONFIG_TR is not set
626 635
627# 636#
@@ -629,6 +638,7 @@ CONFIG_NETDEV_10000=y
629# 638#
630# CONFIG_WLAN_PRE80211 is not set 639# CONFIG_WLAN_PRE80211 is not set
631# CONFIG_WLAN_80211 is not set 640# CONFIG_WLAN_80211 is not set
641# CONFIG_IWLWIFI_LEDS is not set
632# CONFIG_WAN is not set 642# CONFIG_WAN is not set
633# CONFIG_FDDI is not set 643# CONFIG_FDDI is not set
634# CONFIG_HIPPI is not set 644# CONFIG_HIPPI is not set
@@ -675,6 +685,7 @@ CONFIG_INPUT=y
675# Character devices 685# Character devices
676# 686#
677# CONFIG_VT is not set 687# CONFIG_VT is not set
688CONFIG_DEVKMEM=y
678# CONFIG_SERIAL_NONSTANDARD is not set 689# CONFIG_SERIAL_NONSTANDARD is not set
679# CONFIG_NOZOMI is not set 690# CONFIG_NOZOMI is not set
680 691
@@ -723,13 +734,6 @@ CONFIG_I2C_BOARDINFO=y
723CONFIG_I2C_CHARDEV=y 734CONFIG_I2C_CHARDEV=y
724 735
725# 736#
726# I2C Algorithms
727#
728# CONFIG_I2C_ALGOBIT is not set
729# CONFIG_I2C_ALGOPCF is not set
730# CONFIG_I2C_ALGOPCA is not set
731
732#
733# I2C Hardware Bus support 737# I2C Hardware Bus support
734# 738#
735# CONFIG_I2C_ALI1535 is not set 739# CONFIG_I2C_ALI1535 is not set
@@ -754,6 +758,7 @@ CONFIG_I2C_MPC=y
754# CONFIG_I2C_VIA is not set 758# CONFIG_I2C_VIA is not set
755# CONFIG_I2C_VIAPRO is not set 759# CONFIG_I2C_VIAPRO is not set
756# CONFIG_I2C_VOODOO3 is not set 760# CONFIG_I2C_VOODOO3 is not set
761# CONFIG_I2C_PCA_PLATFORM is not set
757 762
758# 763#
759# Miscellaneous I2C Chip support 764# Miscellaneous I2C Chip support
@@ -763,19 +768,13 @@ CONFIG_I2C_MPC=y
763# CONFIG_SENSORS_PCF8574 is not set 768# CONFIG_SENSORS_PCF8574 is not set
764# CONFIG_PCF8575 is not set 769# CONFIG_PCF8575 is not set
765# CONFIG_SENSORS_PCF8591 is not set 770# CONFIG_SENSORS_PCF8591 is not set
766# CONFIG_TPS65010 is not set
767# CONFIG_SENSORS_MAX6875 is not set 771# CONFIG_SENSORS_MAX6875 is not set
768# CONFIG_SENSORS_TSL2550 is not set 772# CONFIG_SENSORS_TSL2550 is not set
769# CONFIG_I2C_DEBUG_CORE is not set 773# CONFIG_I2C_DEBUG_CORE is not set
770# CONFIG_I2C_DEBUG_ALGO is not set 774# CONFIG_I2C_DEBUG_ALGO is not set
771# CONFIG_I2C_DEBUG_BUS is not set 775# CONFIG_I2C_DEBUG_BUS is not set
772# CONFIG_I2C_DEBUG_CHIP is not set 776# CONFIG_I2C_DEBUG_CHIP is not set
773
774#
775# SPI support
776#
777# CONFIG_SPI is not set 777# CONFIG_SPI is not set
778# CONFIG_SPI_MASTER is not set
779# CONFIG_W1 is not set 778# CONFIG_W1 is not set
780# CONFIG_POWER_SUPPLY is not set 779# CONFIG_POWER_SUPPLY is not set
781CONFIG_HWMON=y 780CONFIG_HWMON=y
@@ -845,12 +844,22 @@ CONFIG_SSB_POSSIBLE=y
845# Multifunction device drivers 844# Multifunction device drivers
846# 845#
847# CONFIG_MFD_SM501 is not set 846# CONFIG_MFD_SM501 is not set
847# CONFIG_HTC_PASIC3 is not set
848 848
849# 849#
850# Multimedia devices 850# Multimedia devices
851# 851#
852
853#
854# Multimedia core support
855#
852# CONFIG_VIDEO_DEV is not set 856# CONFIG_VIDEO_DEV is not set
853# CONFIG_DVB_CORE is not set 857# CONFIG_DVB_CORE is not set
858# CONFIG_VIDEO_MEDIA is not set
859
860#
861# Multimedia drivers
862#
854CONFIG_DAB=y 863CONFIG_DAB=y
855 864
856# 865#
@@ -881,6 +890,8 @@ CONFIG_USB_ARCH_HAS_HCD=y
881CONFIG_USB_ARCH_HAS_OHCI=y 890CONFIG_USB_ARCH_HAS_OHCI=y
882CONFIG_USB_ARCH_HAS_EHCI=y 891CONFIG_USB_ARCH_HAS_EHCI=y
883# CONFIG_USB is not set 892# CONFIG_USB is not set
893# CONFIG_USB_OTG_WHITELIST is not set
894# CONFIG_USB_OTG_BLACKLIST_HUB is not set
884 895
885# 896#
886# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 897# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -889,14 +900,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
889# CONFIG_MMC is not set 900# CONFIG_MMC is not set
890# CONFIG_MEMSTICK is not set 901# CONFIG_MEMSTICK is not set
891# CONFIG_NEW_LEDS is not set 902# CONFIG_NEW_LEDS is not set
903# CONFIG_ACCESSIBILITY is not set
892# CONFIG_INFINIBAND is not set 904# CONFIG_INFINIBAND is not set
893# CONFIG_EDAC is not set 905# CONFIG_EDAC is not set
894# CONFIG_RTC_CLASS is not set 906# CONFIG_RTC_CLASS is not set
895# CONFIG_DMADEVICES is not set 907# CONFIG_DMADEVICES is not set
896
897#
898# Userspace I/O
899#
900# CONFIG_UIO is not set 908# CONFIG_UIO is not set
901 909
902# 910#
@@ -916,7 +924,6 @@ CONFIG_FS_MBCACHE=y
916# CONFIG_JFS_FS is not set 924# CONFIG_JFS_FS is not set
917# CONFIG_FS_POSIX_ACL is not set 925# CONFIG_FS_POSIX_ACL is not set
918# CONFIG_XFS_FS is not set 926# CONFIG_XFS_FS is not set
919# CONFIG_GFS2_FS is not set
920# CONFIG_OCFS2_FS is not set 927# CONFIG_OCFS2_FS is not set
921CONFIG_DNOTIFY=y 928CONFIG_DNOTIFY=y
922CONFIG_INOTIFY=y 929CONFIG_INOTIFY=y
@@ -984,7 +991,6 @@ CONFIG_NETWORK_FILESYSTEMS=y
984CONFIG_NFS_FS=y 991CONFIG_NFS_FS=y
985# CONFIG_NFS_V3 is not set 992# CONFIG_NFS_V3 is not set
986# CONFIG_NFS_V4 is not set 993# CONFIG_NFS_V4 is not set
987# CONFIG_NFS_DIRECTIO is not set
988# CONFIG_NFSD is not set 994# CONFIG_NFSD is not set
989CONFIG_ROOT_NFS=y 995CONFIG_ROOT_NFS=y
990CONFIG_LOCKD=y 996CONFIG_LOCKD=y
@@ -1023,6 +1029,7 @@ CONFIG_PARTITION_ADVANCED=y
1023# Library routines 1029# Library routines
1024# 1030#
1025CONFIG_BITREVERSE=y 1031CONFIG_BITREVERSE=y
1032# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1026# CONFIG_CRC_CCITT is not set 1033# CONFIG_CRC_CCITT is not set
1027# CONFIG_CRC16 is not set 1034# CONFIG_CRC16 is not set
1028# CONFIG_CRC_ITU_T is not set 1035# CONFIG_CRC_ITU_T is not set
@@ -1035,6 +1042,7 @@ CONFIG_PLIST=y
1035CONFIG_HAS_IOMEM=y 1042CONFIG_HAS_IOMEM=y
1036CONFIG_HAS_IOPORT=y 1043CONFIG_HAS_IOPORT=y
1037CONFIG_HAS_DMA=y 1044CONFIG_HAS_DMA=y
1045CONFIG_HAVE_LMB=y
1038 1046
1039# 1047#
1040# Kernel hacking 1048# Kernel hacking
@@ -1042,6 +1050,7 @@ CONFIG_HAS_DMA=y
1042# CONFIG_PRINTK_TIME is not set 1050# CONFIG_PRINTK_TIME is not set
1043CONFIG_ENABLE_WARN_DEPRECATED=y 1051CONFIG_ENABLE_WARN_DEPRECATED=y
1044CONFIG_ENABLE_MUST_CHECK=y 1052CONFIG_ENABLE_MUST_CHECK=y
1053CONFIG_FRAME_WARN=1024
1045# CONFIG_MAGIC_SYSRQ is not set 1054# CONFIG_MAGIC_SYSRQ is not set
1046# CONFIG_UNUSED_SYMBOLS is not set 1055# CONFIG_UNUSED_SYMBOLS is not set
1047# CONFIG_DEBUG_FS is not set 1056# CONFIG_DEBUG_FS is not set
@@ -1052,6 +1061,7 @@ CONFIG_ENABLE_MUST_CHECK=y
1052# CONFIG_DEBUG_BUGVERBOSE is not set 1061# CONFIG_DEBUG_BUGVERBOSE is not set
1053# CONFIG_SAMPLES is not set 1062# CONFIG_SAMPLES is not set
1054# CONFIG_KGDB_CONSOLE is not set 1063# CONFIG_KGDB_CONSOLE is not set
1064# CONFIG_IRQSTACKS is not set
1055# CONFIG_PPC_EARLY_DEBUG is not set 1065# CONFIG_PPC_EARLY_DEBUG is not set
1056 1066
1057# 1067#
@@ -1061,49 +1071,79 @@ CONFIG_ENABLE_MUST_CHECK=y
1061# CONFIG_SECURITY is not set 1071# CONFIG_SECURITY is not set
1062# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1072# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1063CONFIG_CRYPTO=y 1073CONFIG_CRYPTO=y
1064# CONFIG_CRYPTO_SEQIV is not set 1074
1075#
1076# Crypto core or helper
1077#
1065# CONFIG_CRYPTO_MANAGER is not set 1078# CONFIG_CRYPTO_MANAGER is not set
1079# CONFIG_CRYPTO_GF128MUL is not set
1080# CONFIG_CRYPTO_NULL is not set
1081# CONFIG_CRYPTO_CRYPTD is not set
1082# CONFIG_CRYPTO_AUTHENC is not set
1083
1084#
1085# Authenticated Encryption with Associated Data
1086#
1087# CONFIG_CRYPTO_CCM is not set
1088# CONFIG_CRYPTO_GCM is not set
1089# CONFIG_CRYPTO_SEQIV is not set
1090
1091#
1092# Block modes
1093#
1094# CONFIG_CRYPTO_CBC is not set
1095# CONFIG_CRYPTO_CTR is not set
1096# CONFIG_CRYPTO_CTS is not set
1097# CONFIG_CRYPTO_ECB is not set
1098# CONFIG_CRYPTO_LRW is not set
1099# CONFIG_CRYPTO_PCBC is not set
1100# CONFIG_CRYPTO_XTS is not set
1101
1102#
1103# Hash modes
1104#
1066# CONFIG_CRYPTO_HMAC is not set 1105# CONFIG_CRYPTO_HMAC is not set
1067# CONFIG_CRYPTO_XCBC is not set 1106# CONFIG_CRYPTO_XCBC is not set
1068# CONFIG_CRYPTO_NULL is not set 1107
1108#
1109# Digest
1110#
1111# CONFIG_CRYPTO_CRC32C is not set
1069# CONFIG_CRYPTO_MD4 is not set 1112# CONFIG_CRYPTO_MD4 is not set
1070# CONFIG_CRYPTO_MD5 is not set 1113# CONFIG_CRYPTO_MD5 is not set
1114# CONFIG_CRYPTO_MICHAEL_MIC is not set
1071# CONFIG_CRYPTO_SHA1 is not set 1115# CONFIG_CRYPTO_SHA1 is not set
1072# CONFIG_CRYPTO_SHA256 is not set 1116# CONFIG_CRYPTO_SHA256 is not set
1073# CONFIG_CRYPTO_SHA512 is not set 1117# CONFIG_CRYPTO_SHA512 is not set
1074# CONFIG_CRYPTO_WP512 is not set
1075# CONFIG_CRYPTO_TGR192 is not set 1118# CONFIG_CRYPTO_TGR192 is not set
1076# CONFIG_CRYPTO_GF128MUL is not set 1119# CONFIG_CRYPTO_WP512 is not set
1077# CONFIG_CRYPTO_ECB is not set 1120
1078# CONFIG_CRYPTO_CBC is not set 1121#
1079# CONFIG_CRYPTO_PCBC is not set 1122# Ciphers
1080# CONFIG_CRYPTO_LRW is not set 1123#
1081# CONFIG_CRYPTO_XTS is not set
1082# CONFIG_CRYPTO_CTR is not set
1083# CONFIG_CRYPTO_GCM is not set
1084# CONFIG_CRYPTO_CCM is not set
1085# CONFIG_CRYPTO_CRYPTD is not set
1086# CONFIG_CRYPTO_DES is not set
1087# CONFIG_CRYPTO_FCRYPT is not set
1088# CONFIG_CRYPTO_BLOWFISH is not set
1089# CONFIG_CRYPTO_TWOFISH is not set
1090# CONFIG_CRYPTO_SERPENT is not set
1091# CONFIG_CRYPTO_AES is not set 1124# CONFIG_CRYPTO_AES is not set
1125# CONFIG_CRYPTO_ANUBIS is not set
1126# CONFIG_CRYPTO_ARC4 is not set
1127# CONFIG_CRYPTO_BLOWFISH is not set
1128# CONFIG_CRYPTO_CAMELLIA is not set
1092# CONFIG_CRYPTO_CAST5 is not set 1129# CONFIG_CRYPTO_CAST5 is not set
1093# CONFIG_CRYPTO_CAST6 is not set 1130# CONFIG_CRYPTO_CAST6 is not set
1094# CONFIG_CRYPTO_TEA is not set 1131# CONFIG_CRYPTO_DES is not set
1095# CONFIG_CRYPTO_ARC4 is not set 1132# CONFIG_CRYPTO_FCRYPT is not set
1096# CONFIG_CRYPTO_KHAZAD is not set 1133# CONFIG_CRYPTO_KHAZAD is not set
1097# CONFIG_CRYPTO_ANUBIS is not set
1098# CONFIG_CRYPTO_SEED is not set
1099# CONFIG_CRYPTO_SALSA20 is not set 1134# CONFIG_CRYPTO_SALSA20 is not set
1135# CONFIG_CRYPTO_SEED is not set
1136# CONFIG_CRYPTO_SERPENT is not set
1137# CONFIG_CRYPTO_TEA is not set
1138# CONFIG_CRYPTO_TWOFISH is not set
1139
1140#
1141# Compression
1142#
1100# CONFIG_CRYPTO_DEFLATE is not set 1143# CONFIG_CRYPTO_DEFLATE is not set
1101# CONFIG_CRYPTO_MICHAEL_MIC is not set
1102# CONFIG_CRYPTO_CRC32C is not set
1103# CONFIG_CRYPTO_CAMELLIA is not set
1104# CONFIG_CRYPTO_AUTHENC is not set
1105# CONFIG_CRYPTO_LZO is not set 1144# CONFIG_CRYPTO_LZO is not set
1106CONFIG_CRYPTO_HW=y 1145CONFIG_CRYPTO_HW=y
1107# CONFIG_CRYPTO_DEV_HIFN_795X is not set 1146# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1108# CONFIG_PPC_CLOCK is not set 1147# CONFIG_PPC_CLOCK is not set
1109CONFIG_PPC_LIB_RHEAP=y 1148CONFIG_PPC_LIB_RHEAP=y
1149# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/adder875_defconfig b/arch/powerpc/configs/adder875_defconfig
index a3cc94a2ff06..6740f2a3aa3d 100644
--- a/arch/powerpc/configs/adder875_defconfig
+++ b/arch/powerpc/configs/adder875_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.25-rc2 3# Linux kernel version: 2.6.26-rc5
4# Wed Feb 20 12:26:07 2008 4# Mon Jun 9 08:52:08 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -28,6 +28,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
28CONFIG_GENERIC_HARDIRQS=y 28CONFIG_GENERIC_HARDIRQS=y
29# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 29# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
30CONFIG_IRQ_PER_CPU=y 30CONFIG_IRQ_PER_CPU=y
31CONFIG_STACKTRACE_SUPPORT=y
32CONFIG_LOCKDEP_SUPPORT=y
31CONFIG_RWSEM_XCHGADD_ALGORITHM=y 33CONFIG_RWSEM_XCHGADD_ALGORITHM=y
32CONFIG_ARCH_HAS_ILOG2_U32=y 34CONFIG_ARCH_HAS_ILOG2_U32=y
33CONFIG_GENERIC_HWEIGHT=y 35CONFIG_GENERIC_HWEIGHT=y
@@ -75,6 +77,7 @@ CONFIG_FAIR_GROUP_SCHED=y
75CONFIG_USER_SCHED=y 77CONFIG_USER_SCHED=y
76# CONFIG_CGROUP_SCHED is not set 78# CONFIG_CGROUP_SCHED is not set
77CONFIG_SYSFS_DEPRECATED=y 79CONFIG_SYSFS_DEPRECATED=y
80CONFIG_SYSFS_DEPRECATED_V2=y
78# CONFIG_RELAY is not set 81# CONFIG_RELAY is not set
79# CONFIG_NAMESPACES is not set 82# CONFIG_NAMESPACES is not set
80# CONFIG_BLK_DEV_INITRD is not set 83# CONFIG_BLK_DEV_INITRD is not set
@@ -107,6 +110,8 @@ CONFIG_SLUB=y
107# CONFIG_MARKERS is not set 110# CONFIG_MARKERS is not set
108CONFIG_HAVE_OPROFILE=y 111CONFIG_HAVE_OPROFILE=y
109CONFIG_HAVE_KPROBES=y 112CONFIG_HAVE_KPROBES=y
113CONFIG_HAVE_KRETPROBES=y
114# CONFIG_HAVE_DMA_ATTRS is not set
110CONFIG_PROC_PAGE_MONITOR=y 115CONFIG_PROC_PAGE_MONITOR=y
111CONFIG_SLABINFO=y 116CONFIG_SLABINFO=y
112# CONFIG_TINY_SHMEM is not set 117# CONFIG_TINY_SHMEM is not set
@@ -131,7 +136,6 @@ CONFIG_DEFAULT_DEADLINE=y
131# CONFIG_DEFAULT_NOOP is not set 136# CONFIG_DEFAULT_NOOP is not set
132CONFIG_DEFAULT_IOSCHED="deadline" 137CONFIG_DEFAULT_IOSCHED="deadline"
133CONFIG_CLASSIC_RCU=y 138CONFIG_CLASSIC_RCU=y
134# CONFIG_PREEMPT_RCU is not set
135 139
136# 140#
137# Platform support 141# Platform support
@@ -194,7 +198,6 @@ CONFIG_HZ=1000
194CONFIG_PREEMPT_NONE=y 198CONFIG_PREEMPT_NONE=y
195# CONFIG_PREEMPT_VOLUNTARY is not set 199# CONFIG_PREEMPT_VOLUNTARY is not set
196# CONFIG_PREEMPT is not set 200# CONFIG_PREEMPT is not set
197CONFIG_RCU_TRACE=y
198CONFIG_BINFMT_ELF=y 201CONFIG_BINFMT_ELF=y
199# CONFIG_BINFMT_MISC is not set 202# CONFIG_BINFMT_MISC is not set
200# CONFIG_MATH_EMULATION is not set 203# CONFIG_MATH_EMULATION is not set
@@ -213,11 +216,13 @@ CONFIG_FLATMEM=y
213CONFIG_FLAT_NODE_MEM_MAP=y 216CONFIG_FLAT_NODE_MEM_MAP=y
214# CONFIG_SPARSEMEM_STATIC is not set 217# CONFIG_SPARSEMEM_STATIC is not set
215# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 218# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
219CONFIG_PAGEFLAGS_EXTENDED=y
216CONFIG_SPLIT_PTLOCK_CPUS=4 220CONFIG_SPLIT_PTLOCK_CPUS=4
217# CONFIG_RESOURCES_64BIT is not set 221# CONFIG_RESOURCES_64BIT is not set
218CONFIG_ZONE_DMA_FLAG=1 222CONFIG_ZONE_DMA_FLAG=1
219CONFIG_BOUNCE=y 223CONFIG_BOUNCE=y
220CONFIG_VIRT_TO_BUS=y 224CONFIG_VIRT_TO_BUS=y
225CONFIG_FORCE_MAX_ZONEORDER=11
221# CONFIG_PROC_DEVICETREE is not set 226# CONFIG_PROC_DEVICETREE is not set
222# CONFIG_CMDLINE_BOOL is not set 227# CONFIG_CMDLINE_BOOL is not set
223# CONFIG_PM is not set 228# CONFIG_PM is not set
@@ -235,6 +240,7 @@ CONFIG_FSL_SOC=y
235# CONFIG_PCI_QSPAN is not set 240# CONFIG_PCI_QSPAN is not set
236# CONFIG_ARCH_SUPPORTS_MSI is not set 241# CONFIG_ARCH_SUPPORTS_MSI is not set
237# CONFIG_PCCARD is not set 242# CONFIG_PCCARD is not set
243# CONFIG_HAS_RAPIDIO is not set
238 244
239# 245#
240# Advanced setup 246# Advanced setup
@@ -244,13 +250,13 @@ CONFIG_FSL_SOC=y
244# 250#
245# Default settings for advanced configuration options are used 251# Default settings for advanced configuration options are used
246# 252#
247CONFIG_HIGHMEM_START=0xfe000000
248CONFIG_LOWMEM_SIZE=0x30000000 253CONFIG_LOWMEM_SIZE=0x30000000
254CONFIG_PAGE_OFFSET=0xc0000000
249CONFIG_KERNEL_START=0xc0000000 255CONFIG_KERNEL_START=0xc0000000
256CONFIG_PHYSICAL_START=0x00000000
250CONFIG_TASK_SIZE=0x80000000 257CONFIG_TASK_SIZE=0x80000000
251CONFIG_CONSISTENT_START=0xfd000000 258CONFIG_CONSISTENT_START=0xfd000000
252CONFIG_CONSISTENT_SIZE=0x00200000 259CONFIG_CONSISTENT_SIZE=0x00200000
253CONFIG_BOOT_LOAD=0x00400000
254 260
255# 261#
256# Networking 262# Networking
@@ -293,8 +299,6 @@ CONFIG_TCP_CONG_CUBIC=y
293CONFIG_DEFAULT_TCP_CONG="cubic" 299CONFIG_DEFAULT_TCP_CONG="cubic"
294# CONFIG_TCP_MD5SIG is not set 300# CONFIG_TCP_MD5SIG is not set
295# CONFIG_IPV6 is not set 301# CONFIG_IPV6 is not set
296# CONFIG_INET6_XFRM_TUNNEL is not set
297# CONFIG_INET6_TUNNEL is not set
298# CONFIG_NETWORK_SECMARK is not set 302# CONFIG_NETWORK_SECMARK is not set
299# CONFIG_NETFILTER is not set 303# CONFIG_NETFILTER is not set
300# CONFIG_IP_DCCP is not set 304# CONFIG_IP_DCCP is not set
@@ -482,6 +486,7 @@ CONFIG_FS_ENET_MDIO_FEC=y
482# 486#
483# CONFIG_WLAN_PRE80211 is not set 487# CONFIG_WLAN_PRE80211 is not set
484# CONFIG_WLAN_80211 is not set 488# CONFIG_WLAN_80211 is not set
489# CONFIG_IWLWIFI_LEDS is not set
485# CONFIG_WAN is not set 490# CONFIG_WAN is not set
486# CONFIG_PPP is not set 491# CONFIG_PPP is not set
487# CONFIG_SLIP is not set 492# CONFIG_SLIP is not set
@@ -548,6 +553,7 @@ CONFIG_SERIO_LIBPS2=y
548# Character devices 553# Character devices
549# 554#
550# CONFIG_VT is not set 555# CONFIG_VT is not set
556CONFIG_DEVKMEM=y
551# CONFIG_SERIAL_NONSTANDARD is not set 557# CONFIG_SERIAL_NONSTANDARD is not set
552 558
553# 559#
@@ -580,12 +586,7 @@ CONFIG_GEN_RTC=y
580# CONFIG_RAW_DRIVER is not set 586# CONFIG_RAW_DRIVER is not set
581# CONFIG_TCG_TPM is not set 587# CONFIG_TCG_TPM is not set
582# CONFIG_I2C is not set 588# CONFIG_I2C is not set
583
584#
585# SPI support
586#
587# CONFIG_SPI is not set 589# CONFIG_SPI is not set
588# CONFIG_SPI_MASTER is not set
589# CONFIG_W1 is not set 590# CONFIG_W1 is not set
590# CONFIG_POWER_SUPPLY is not set 591# CONFIG_POWER_SUPPLY is not set
591# CONFIG_HWMON is not set 592# CONFIG_HWMON is not set
@@ -602,12 +603,22 @@ CONFIG_SSB_POSSIBLE=y
602# Multifunction device drivers 603# Multifunction device drivers
603# 604#
604# CONFIG_MFD_SM501 is not set 605# CONFIG_MFD_SM501 is not set
606# CONFIG_HTC_PASIC3 is not set
605 607
606# 608#
607# Multimedia devices 609# Multimedia devices
608# 610#
611
612#
613# Multimedia core support
614#
609# CONFIG_VIDEO_DEV is not set 615# CONFIG_VIDEO_DEV is not set
610# CONFIG_DVB_CORE is not set 616# CONFIG_DVB_CORE is not set
617# CONFIG_VIDEO_MEDIA is not set
618
619#
620# Multimedia drivers
621#
611CONFIG_DAB=y 622CONFIG_DAB=y
612 623
613# 624#
@@ -632,12 +643,10 @@ CONFIG_VIDEO_OUTPUT_CONTROL=y
632# CONFIG_MMC is not set 643# CONFIG_MMC is not set
633# CONFIG_MEMSTICK is not set 644# CONFIG_MEMSTICK is not set
634# CONFIG_NEW_LEDS is not set 645# CONFIG_NEW_LEDS is not set
646# CONFIG_ACCESSIBILITY is not set
635# CONFIG_EDAC is not set 647# CONFIG_EDAC is not set
636# CONFIG_RTC_CLASS is not set 648# CONFIG_RTC_CLASS is not set
637 649# CONFIG_DMADEVICES is not set
638#
639# Userspace I/O
640#
641# CONFIG_UIO is not set 650# CONFIG_UIO is not set
642 651
643# 652#
@@ -650,7 +659,6 @@ CONFIG_VIDEO_OUTPUT_CONTROL=y
650# CONFIG_JFS_FS is not set 659# CONFIG_JFS_FS is not set
651# CONFIG_FS_POSIX_ACL is not set 660# CONFIG_FS_POSIX_ACL is not set
652# CONFIG_XFS_FS is not set 661# CONFIG_XFS_FS is not set
653# CONFIG_GFS2_FS is not set
654# CONFIG_OCFS2_FS is not set 662# CONFIG_OCFS2_FS is not set
655# CONFIG_DNOTIFY is not set 663# CONFIG_DNOTIFY is not set
656# CONFIG_INOTIFY is not set 664# CONFIG_INOTIFY is not set
@@ -708,7 +716,6 @@ CONFIG_NFS_FS=y
708CONFIG_NFS_V3=y 716CONFIG_NFS_V3=y
709# CONFIG_NFS_V3_ACL is not set 717# CONFIG_NFS_V3_ACL is not set
710# CONFIG_NFS_V4 is not set 718# CONFIG_NFS_V4 is not set
711# CONFIG_NFS_DIRECTIO is not set
712# CONFIG_NFSD is not set 719# CONFIG_NFSD is not set
713CONFIG_ROOT_NFS=y 720CONFIG_ROOT_NFS=y
714CONFIG_LOCKD=y 721CONFIG_LOCKD=y
@@ -751,6 +758,7 @@ CONFIG_MSDOS_PARTITION=y
751# 758#
752# Library routines 759# Library routines
753# 760#
761# CONFIG_GENERIC_FIND_FIRST_BIT is not set
754# CONFIG_CRC_CCITT is not set 762# CONFIG_CRC_CCITT is not set
755# CONFIG_CRC16 is not set 763# CONFIG_CRC16 is not set
756# CONFIG_CRC_ITU_T is not set 764# CONFIG_CRC_ITU_T is not set
@@ -761,6 +769,7 @@ CONFIG_ZLIB_INFLATE=y
761CONFIG_HAS_IOMEM=y 769CONFIG_HAS_IOMEM=y
762CONFIG_HAS_IOPORT=y 770CONFIG_HAS_IOPORT=y
763CONFIG_HAS_DMA=y 771CONFIG_HAS_DMA=y
772CONFIG_HAVE_LMB=y
764 773
765# 774#
766# Kernel hacking 775# Kernel hacking
@@ -768,6 +777,7 @@ CONFIG_HAS_DMA=y
768# CONFIG_PRINTK_TIME is not set 777# CONFIG_PRINTK_TIME is not set
769CONFIG_ENABLE_WARN_DEPRECATED=y 778CONFIG_ENABLE_WARN_DEPRECATED=y
770CONFIG_ENABLE_MUST_CHECK=y 779CONFIG_ENABLE_MUST_CHECK=y
780CONFIG_FRAME_WARN=1024
771CONFIG_MAGIC_SYSRQ=y 781CONFIG_MAGIC_SYSRQ=y
772# CONFIG_UNUSED_SYMBOLS is not set 782# CONFIG_UNUSED_SYMBOLS is not set
773CONFIG_DEBUG_FS=y 783CONFIG_DEBUG_FS=y
@@ -778,6 +788,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
778CONFIG_SCHED_DEBUG=y 788CONFIG_SCHED_DEBUG=y
779# CONFIG_SCHEDSTATS is not set 789# CONFIG_SCHEDSTATS is not set
780# CONFIG_TIMER_STATS is not set 790# CONFIG_TIMER_STATS is not set
791# CONFIG_DEBUG_OBJECTS is not set
781# CONFIG_SLUB_DEBUG_ON is not set 792# CONFIG_SLUB_DEBUG_ON is not set
782# CONFIG_SLUB_STATS is not set 793# CONFIG_SLUB_STATS is not set
783# CONFIG_DEBUG_SPINLOCK is not set 794# CONFIG_DEBUG_SPINLOCK is not set
@@ -788,6 +799,7 @@ CONFIG_SCHED_DEBUG=y
788CONFIG_DEBUG_BUGVERBOSE=y 799CONFIG_DEBUG_BUGVERBOSE=y
789CONFIG_DEBUG_INFO=y 800CONFIG_DEBUG_INFO=y
790# CONFIG_DEBUG_VM is not set 801# CONFIG_DEBUG_VM is not set
802# CONFIG_DEBUG_WRITECOUNT is not set
791# CONFIG_DEBUG_LIST is not set 803# CONFIG_DEBUG_LIST is not set
792# CONFIG_DEBUG_SG is not set 804# CONFIG_DEBUG_SG is not set
793# CONFIG_BOOT_PRINTK_DELAY is not set 805# CONFIG_BOOT_PRINTK_DELAY is not set
@@ -798,6 +810,7 @@ CONFIG_DEBUG_INFO=y
798# CONFIG_DEBUG_STACK_USAGE is not set 810# CONFIG_DEBUG_STACK_USAGE is not set
799# CONFIG_DEBUG_PAGEALLOC is not set 811# CONFIG_DEBUG_PAGEALLOC is not set
800# CONFIG_DEBUGGER is not set 812# CONFIG_DEBUGGER is not set
813# CONFIG_IRQSTACKS is not set
801# CONFIG_VIRQ_DEBUG is not set 814# CONFIG_VIRQ_DEBUG is not set
802# CONFIG_BDI_SWITCH is not set 815# CONFIG_BDI_SWITCH is not set
803# CONFIG_PPC_EARLY_DEBUG is not set 816# CONFIG_PPC_EARLY_DEBUG is not set
@@ -811,3 +824,4 @@ CONFIG_DEBUG_INFO=y
811# CONFIG_CRYPTO is not set 824# CONFIG_CRYPTO is not set
812# CONFIG_PPC_CLOCK is not set 825# CONFIG_PPC_CLOCK is not set
813CONFIG_PPC_LIB_RHEAP=y 826CONFIG_PPC_LIB_RHEAP=y
827# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/chrp32_defconfig b/arch/powerpc/configs/chrp32_defconfig
index d7fd298bd234..05360d4ef1b1 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.25-rc6 3# Linux kernel version: 2.6.26-rc3
4# Thu Mar 27 13:55:37 2008 4# Tue May 20 20:00:44 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -32,6 +32,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 34CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_LOCKDEP_SUPPORT=y
35CONFIG_RWSEM_XCHGADD_ALGORITHM=y 37CONFIG_RWSEM_XCHGADD_ALGORITHM=y
36CONFIG_ARCH_HAS_ILOG2_U32=y 38CONFIG_ARCH_HAS_ILOG2_U32=y
37CONFIG_GENERIC_HWEIGHT=y 39CONFIG_GENERIC_HWEIGHT=y
@@ -88,6 +90,7 @@ CONFIG_INITRAMFS_SOURCE=""
88CONFIG_SYSCTL=y 90CONFIG_SYSCTL=y
89# CONFIG_EMBEDDED is not set 91# CONFIG_EMBEDDED is not set
90CONFIG_SYSCTL_SYSCALL=y 92CONFIG_SYSCTL_SYSCALL=y
93CONFIG_SYSCTL_SYSCALL_CHECK=y
91CONFIG_KALLSYMS=y 94CONFIG_KALLSYMS=y
92# CONFIG_KALLSYMS_ALL is not set 95# CONFIG_KALLSYMS_ALL is not set
93# CONFIG_KALLSYMS_EXTRA_PASS is not set 96# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -95,6 +98,7 @@ CONFIG_HOTPLUG=y
95CONFIG_PRINTK=y 98CONFIG_PRINTK=y
96CONFIG_BUG=y 99CONFIG_BUG=y
97CONFIG_ELF_CORE=y 100CONFIG_ELF_CORE=y
101CONFIG_PCSPKR_PLATFORM=y
98# CONFIG_COMPAT_BRK is not set 102# CONFIG_COMPAT_BRK is not set
99CONFIG_BASE_FULL=y 103CONFIG_BASE_FULL=y
100CONFIG_FUTEX=y 104CONFIG_FUTEX=y
@@ -115,12 +119,14 @@ CONFIG_HAVE_OPROFILE=y
115# CONFIG_KPROBES is not set 119# CONFIG_KPROBES is not set
116CONFIG_HAVE_KPROBES=y 120CONFIG_HAVE_KPROBES=y
117CONFIG_HAVE_KRETPROBES=y 121CONFIG_HAVE_KRETPROBES=y
122# CONFIG_HAVE_DMA_ATTRS is not set
118CONFIG_PROC_PAGE_MONITOR=y 123CONFIG_PROC_PAGE_MONITOR=y
119CONFIG_SLABINFO=y 124CONFIG_SLABINFO=y
120CONFIG_RT_MUTEXES=y 125CONFIG_RT_MUTEXES=y
121# CONFIG_TINY_SHMEM is not set 126# CONFIG_TINY_SHMEM is not set
122CONFIG_BASE_SMALL=0 127CONFIG_BASE_SMALL=0
123CONFIG_MODULES=y 128CONFIG_MODULES=y
129# CONFIG_MODULE_FORCE_LOAD is not set
124CONFIG_MODULE_UNLOAD=y 130CONFIG_MODULE_UNLOAD=y
125CONFIG_MODULE_FORCE_UNLOAD=y 131CONFIG_MODULE_FORCE_UNLOAD=y
126# CONFIG_MODVERSIONS is not set 132# CONFIG_MODVERSIONS is not set
@@ -217,11 +223,13 @@ CONFIG_FLATMEM=y
217CONFIG_FLAT_NODE_MEM_MAP=y 223CONFIG_FLAT_NODE_MEM_MAP=y
218# CONFIG_SPARSEMEM_STATIC is not set 224# CONFIG_SPARSEMEM_STATIC is not set
219# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 225# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
226CONFIG_PAGEFLAGS_EXTENDED=y
220CONFIG_SPLIT_PTLOCK_CPUS=4 227CONFIG_SPLIT_PTLOCK_CPUS=4
221# CONFIG_RESOURCES_64BIT is not set 228# CONFIG_RESOURCES_64BIT is not set
222CONFIG_ZONE_DMA_FLAG=1 229CONFIG_ZONE_DMA_FLAG=1
223CONFIG_BOUNCE=y 230CONFIG_BOUNCE=y
224CONFIG_VIRT_TO_BUS=y 231CONFIG_VIRT_TO_BUS=y
232CONFIG_FORCE_MAX_ZONEORDER=11
225CONFIG_PROC_DEVICETREE=y 233CONFIG_PROC_DEVICETREE=y
226# CONFIG_CMDLINE_BOOL is not set 234# CONFIG_CMDLINE_BOOL is not set
227# CONFIG_PM is not set 235# CONFIG_PM is not set
@@ -245,6 +253,7 @@ CONFIG_ARCH_SUPPORTS_MSI=y
245# CONFIG_PCI_DEBUG is not set 253# CONFIG_PCI_DEBUG is not set
246# CONFIG_PCCARD is not set 254# CONFIG_PCCARD is not set
247# CONFIG_HOTPLUG_PCI is not set 255# CONFIG_HOTPLUG_PCI is not set
256# CONFIG_HAS_RAPIDIO is not set
248 257
249# 258#
250# Advanced setup 259# Advanced setup
@@ -254,11 +263,11 @@ CONFIG_ARCH_SUPPORTS_MSI=y
254# 263#
255# Default settings for advanced configuration options are used 264# Default settings for advanced configuration options are used
256# 265#
257CONFIG_HIGHMEM_START=0xfe000000
258CONFIG_LOWMEM_SIZE=0x30000000 266CONFIG_LOWMEM_SIZE=0x30000000
267CONFIG_PAGE_OFFSET=0xc0000000
259CONFIG_KERNEL_START=0xc0000000 268CONFIG_KERNEL_START=0xc0000000
269CONFIG_PHYSICAL_START=0x00000000
260CONFIG_TASK_SIZE=0xc0000000 270CONFIG_TASK_SIZE=0xc0000000
261CONFIG_BOOT_LOAD=0x00800000
262 271
263# 272#
264# Networking 273# Networking
@@ -299,8 +308,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
299# CONFIG_TCP_MD5SIG is not set 308# CONFIG_TCP_MD5SIG is not set
300# CONFIG_IP_VS is not set 309# CONFIG_IP_VS is not set
301# CONFIG_IPV6 is not set 310# CONFIG_IPV6 is not set
302# CONFIG_INET6_XFRM_TUNNEL is not set
303# CONFIG_INET6_TUNNEL is not set
304# CONFIG_NETWORK_SECMARK is not set 311# CONFIG_NETWORK_SECMARK is not set
305CONFIG_NETFILTER=y 312CONFIG_NETFILTER=y
306# CONFIG_NETFILTER_DEBUG is not set 313# CONFIG_NETFILTER_DEBUG is not set
@@ -398,6 +405,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
398# CONFIG_CONNECTOR is not set 405# CONFIG_CONNECTOR is not set
399# CONFIG_MTD is not set 406# CONFIG_MTD is not set
400CONFIG_OF_DEVICE=y 407CONFIG_OF_DEVICE=y
408CONFIG_OF_I2C=y
401# CONFIG_PARPORT is not set 409# CONFIG_PARPORT is not set
402# CONFIG_PNP is not set 410# CONFIG_PNP is not set
403CONFIG_BLK_DEV=y 411CONFIG_BLK_DEV=y
@@ -484,22 +492,8 @@ CONFIG_BLK_DEV_SL82C105=y
484# CONFIG_BLK_DEV_TRM290 is not set 492# CONFIG_BLK_DEV_TRM290 is not set
485CONFIG_BLK_DEV_VIA82CXXX=y 493CONFIG_BLK_DEV_VIA82CXXX=y
486# CONFIG_BLK_DEV_TC86C001 is not set 494# CONFIG_BLK_DEV_TC86C001 is not set
487
488#
489# Other IDE chipsets support
490#
491
492#
493# Note: most of these also require special kernel boot parameters
494#
495# CONFIG_BLK_DEV_4DRIVES is not set
496# CONFIG_BLK_DEV_ALI14XX is not set
497# CONFIG_BLK_DEV_DTC2278 is not set
498# CONFIG_BLK_DEV_HT6560B is not set
499# CONFIG_BLK_DEV_QD65XX is not set
500# CONFIG_BLK_DEV_UMC8672 is not set
501CONFIG_BLK_DEV_IDEDMA=y 495CONFIG_BLK_DEV_IDEDMA=y
502CONFIG_IDE_ARCH_OBSOLETE_INIT=y 496# CONFIG_BLK_DEV_HD_ONLY is not set
503# CONFIG_BLK_DEV_HD is not set 497# CONFIG_BLK_DEV_HD is not set
504 498
505# 499#
@@ -641,7 +635,6 @@ CONFIG_DE4X5=y
641# CONFIG_IBM_NEW_EMAC_EMAC4 is not set 635# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
642CONFIG_NET_PCI=y 636CONFIG_NET_PCI=y
643CONFIG_PCNET32=y 637CONFIG_PCNET32=y
644# CONFIG_PCNET32_NAPI is not set
645# CONFIG_AMD8111_ETH is not set 638# CONFIG_AMD8111_ETH is not set
646# CONFIG_ADAPTEC_STARFIRE is not set 639# CONFIG_ADAPTEC_STARFIRE is not set
647# CONFIG_AC3200 is not set 640# CONFIG_AC3200 is not set
@@ -684,7 +677,6 @@ CONFIG_NETDEV_1000=y
684# CONFIG_SIS190 is not set 677# CONFIG_SIS190 is not set
685# CONFIG_SKGE is not set 678# CONFIG_SKGE is not set
686# CONFIG_SKY2 is not set 679# CONFIG_SKY2 is not set
687# CONFIG_SK98LIN is not set
688# CONFIG_VIA_VELOCITY is not set 680# CONFIG_VIA_VELOCITY is not set
689# CONFIG_TIGON3 is not set 681# CONFIG_TIGON3 is not set
690# CONFIG_BNX2 is not set 682# CONFIG_BNX2 is not set
@@ -703,6 +695,7 @@ CONFIG_NETDEV_10000=y
703# CONFIG_MLX4_CORE is not set 695# CONFIG_MLX4_CORE is not set
704# CONFIG_TEHUTI is not set 696# CONFIG_TEHUTI is not set
705# CONFIG_BNX2X is not set 697# CONFIG_BNX2X is not set
698# CONFIG_SFC is not set
706# CONFIG_TR is not set 699# CONFIG_TR is not set
707 700
708# 701#
@@ -710,6 +703,7 @@ CONFIG_NETDEV_10000=y
710# 703#
711# CONFIG_WLAN_PRE80211 is not set 704# CONFIG_WLAN_PRE80211 is not set
712# CONFIG_WLAN_80211 is not set 705# CONFIG_WLAN_80211 is not set
706# CONFIG_IWLWIFI_LEDS is not set
713 707
714# 708#
715# USB Network Adapters 709# USB Network Adapters
@@ -813,6 +807,7 @@ CONFIG_VT=y
813CONFIG_VT_CONSOLE=y 807CONFIG_VT_CONSOLE=y
814CONFIG_HW_CONSOLE=y 808CONFIG_HW_CONSOLE=y
815# CONFIG_VT_HW_CONSOLE_BINDING is not set 809# CONFIG_VT_HW_CONSOLE_BINDING is not set
810CONFIG_DEVKMEM=y
816# CONFIG_SERIAL_NONSTANDARD is not set 811# CONFIG_SERIAL_NONSTANDARD is not set
817# CONFIG_NOZOMI is not set 812# CONFIG_NOZOMI is not set
818 813
@@ -853,13 +848,7 @@ CONFIG_DEVPORT=y
853CONFIG_I2C=y 848CONFIG_I2C=y
854CONFIG_I2C_BOARDINFO=y 849CONFIG_I2C_BOARDINFO=y
855# CONFIG_I2C_CHARDEV is not set 850# CONFIG_I2C_CHARDEV is not set
856
857#
858# I2C Algorithms
859#
860CONFIG_I2C_ALGOBIT=y 851CONFIG_I2C_ALGOBIT=y
861# CONFIG_I2C_ALGOPCF is not set
862# CONFIG_I2C_ALGOPCA is not set
863 852
864# 853#
865# I2C Hardware Bus support 854# I2C Hardware Bus support
@@ -890,6 +879,7 @@ CONFIG_I2C_ALGOBIT=y
890# CONFIG_I2C_VIAPRO is not set 879# CONFIG_I2C_VIAPRO is not set
891# CONFIG_I2C_VOODOO3 is not set 880# CONFIG_I2C_VOODOO3 is not set
892# CONFIG_I2C_PCA_ISA is not set 881# CONFIG_I2C_PCA_ISA is not set
882# CONFIG_I2C_PCA_PLATFORM is not set
893 883
894# 884#
895# Miscellaneous I2C Chip support 885# Miscellaneous I2C Chip support
@@ -899,19 +889,13 @@ CONFIG_I2C_ALGOBIT=y
899# CONFIG_SENSORS_PCF8574 is not set 889# CONFIG_SENSORS_PCF8574 is not set
900# CONFIG_PCF8575 is not set 890# CONFIG_PCF8575 is not set
901# CONFIG_SENSORS_PCF8591 is not set 891# CONFIG_SENSORS_PCF8591 is not set
902# CONFIG_TPS65010 is not set
903# CONFIG_SENSORS_MAX6875 is not set 892# CONFIG_SENSORS_MAX6875 is not set
904# CONFIG_SENSORS_TSL2550 is not set 893# CONFIG_SENSORS_TSL2550 is not set
905# CONFIG_I2C_DEBUG_CORE is not set 894# CONFIG_I2C_DEBUG_CORE is not set
906# CONFIG_I2C_DEBUG_ALGO is not set 895# CONFIG_I2C_DEBUG_ALGO is not set
907# CONFIG_I2C_DEBUG_BUS is not set 896# CONFIG_I2C_DEBUG_BUS is not set
908# CONFIG_I2C_DEBUG_CHIP is not set 897# CONFIG_I2C_DEBUG_CHIP is not set
909
910#
911# SPI support
912#
913# CONFIG_SPI is not set 898# CONFIG_SPI is not set
914# CONFIG_SPI_MASTER is not set
915# CONFIG_W1 is not set 899# CONFIG_W1 is not set
916# CONFIG_POWER_SUPPLY is not set 900# CONFIG_POWER_SUPPLY is not set
917# CONFIG_HWMON is not set 901# CONFIG_HWMON is not set
@@ -928,12 +912,22 @@ CONFIG_SSB_POSSIBLE=y
928# Multifunction device drivers 912# Multifunction device drivers
929# 913#
930# CONFIG_MFD_SM501 is not set 914# CONFIG_MFD_SM501 is not set
915# CONFIG_HTC_PASIC3 is not set
931 916
932# 917#
933# Multimedia devices 918# Multimedia devices
934# 919#
920
921#
922# Multimedia core support
923#
935# CONFIG_VIDEO_DEV is not set 924# CONFIG_VIDEO_DEV is not set
936# CONFIG_DVB_CORE is not set 925# CONFIG_DVB_CORE is not set
926# CONFIG_VIDEO_MEDIA is not set
927
928#
929# Multimedia drivers
930#
937# CONFIG_DAB is not set 931# CONFIG_DAB is not set
938 932
939# 933#
@@ -953,8 +947,8 @@ CONFIG_FB_CFB_IMAGEBLIT=y
953# CONFIG_FB_SYS_FILLRECT is not set 947# CONFIG_FB_SYS_FILLRECT is not set
954# CONFIG_FB_SYS_COPYAREA is not set 948# CONFIG_FB_SYS_COPYAREA is not set
955# CONFIG_FB_SYS_IMAGEBLIT is not set 949# CONFIG_FB_SYS_IMAGEBLIT is not set
950# CONFIG_FB_FOREIGN_ENDIAN is not set
956# CONFIG_FB_SYS_FOPS is not set 951# CONFIG_FB_SYS_FOPS is not set
957CONFIG_FB_DEFERRED_IO=y
958# CONFIG_FB_SVGALIB is not set 952# CONFIG_FB_SVGALIB is not set
959CONFIG_FB_MACMODES=y 953CONFIG_FB_MACMODES=y
960CONFIG_FB_BACKLIGHT=y 954CONFIG_FB_BACKLIGHT=y
@@ -1072,11 +1066,13 @@ CONFIG_USB_DEVICE_CLASS=y
1072# 1066#
1073# USB Host Controller Drivers 1067# USB Host Controller Drivers
1074# 1068#
1069# CONFIG_USB_C67X00_HCD is not set
1075CONFIG_USB_EHCI_HCD=m 1070CONFIG_USB_EHCI_HCD=m
1076# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1071# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1077# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1072# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1078# CONFIG_USB_EHCI_HCD_PPC_OF is not set 1073# CONFIG_USB_EHCI_HCD_PPC_OF is not set
1079# CONFIG_USB_ISP116X_HCD is not set 1074# CONFIG_USB_ISP116X_HCD is not set
1075# CONFIG_USB_ISP1760_HCD is not set
1080CONFIG_USB_OHCI_HCD=y 1076CONFIG_USB_OHCI_HCD=y
1081# CONFIG_USB_OHCI_HCD_PPC_OF is not set 1077# CONFIG_USB_OHCI_HCD_PPC_OF is not set
1082# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1078# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
@@ -1112,6 +1108,7 @@ CONFIG_USB_STORAGE=m
1112# CONFIG_USB_STORAGE_ALAUDA is not set 1108# CONFIG_USB_STORAGE_ALAUDA is not set
1113# CONFIG_USB_STORAGE_ONETOUCH is not set 1109# CONFIG_USB_STORAGE_ONETOUCH is not set
1114# CONFIG_USB_STORAGE_KARMA is not set 1110# CONFIG_USB_STORAGE_KARMA is not set
1111# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1115# CONFIG_USB_LIBUSUAL is not set 1112# CONFIG_USB_LIBUSUAL is not set
1116 1113
1117# 1114#
@@ -1153,14 +1150,11 @@ CONFIG_USB_MON=y
1153# CONFIG_MMC is not set 1150# CONFIG_MMC is not set
1154# CONFIG_MEMSTICK is not set 1151# CONFIG_MEMSTICK is not set
1155# CONFIG_NEW_LEDS is not set 1152# CONFIG_NEW_LEDS is not set
1153# CONFIG_ACCESSIBILITY is not set
1156# CONFIG_INFINIBAND is not set 1154# CONFIG_INFINIBAND is not set
1157# CONFIG_EDAC is not set 1155# CONFIG_EDAC is not set
1158# CONFIG_RTC_CLASS is not set 1156# CONFIG_RTC_CLASS is not set
1159# CONFIG_DMADEVICES is not set 1157# CONFIG_DMADEVICES is not set
1160
1161#
1162# Userspace I/O
1163#
1164# CONFIG_UIO is not set 1158# CONFIG_UIO is not set
1165 1159
1166# 1160#
@@ -1180,7 +1174,6 @@ CONFIG_FS_MBCACHE=y
1180# CONFIG_JFS_FS is not set 1174# CONFIG_JFS_FS is not set
1181# CONFIG_FS_POSIX_ACL is not set 1175# CONFIG_FS_POSIX_ACL is not set
1182# CONFIG_XFS_FS is not set 1176# CONFIG_XFS_FS is not set
1183# CONFIG_GFS2_FS is not set
1184# CONFIG_OCFS2_FS is not set 1177# CONFIG_OCFS2_FS is not set
1185CONFIG_DNOTIFY=y 1178CONFIG_DNOTIFY=y
1186CONFIG_INOTIFY=y 1179CONFIG_INOTIFY=y
@@ -1314,6 +1307,7 @@ CONFIG_NLS_ISO8859_1=m
1314# Library routines 1307# Library routines
1315# 1308#
1316CONFIG_BITREVERSE=y 1309CONFIG_BITREVERSE=y
1310# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1317CONFIG_CRC_CCITT=m 1311CONFIG_CRC_CCITT=m
1318# CONFIG_CRC16 is not set 1312# CONFIG_CRC16 is not set
1319# CONFIG_CRC_ITU_T is not set 1313# CONFIG_CRC_ITU_T is not set
@@ -1334,6 +1328,7 @@ CONFIG_HAVE_LMB=y
1334# CONFIG_PRINTK_TIME is not set 1328# CONFIG_PRINTK_TIME is not set
1335CONFIG_ENABLE_WARN_DEPRECATED=y 1329CONFIG_ENABLE_WARN_DEPRECATED=y
1336CONFIG_ENABLE_MUST_CHECK=y 1330CONFIG_ENABLE_MUST_CHECK=y
1331CONFIG_FRAME_WARN=1024
1337CONFIG_MAGIC_SYSRQ=y 1332CONFIG_MAGIC_SYSRQ=y
1338# CONFIG_UNUSED_SYMBOLS is not set 1333# CONFIG_UNUSED_SYMBOLS is not set
1339# CONFIG_DEBUG_FS is not set 1334# CONFIG_DEBUG_FS is not set
@@ -1344,6 +1339,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
1344CONFIG_SCHED_DEBUG=y 1339CONFIG_SCHED_DEBUG=y
1345# CONFIG_SCHEDSTATS is not set 1340# CONFIG_SCHEDSTATS is not set
1346# CONFIG_TIMER_STATS is not set 1341# CONFIG_TIMER_STATS is not set
1342# CONFIG_DEBUG_OBJECTS is not set
1347# CONFIG_SLUB_DEBUG_ON is not set 1343# CONFIG_SLUB_DEBUG_ON is not set
1348# CONFIG_SLUB_STATS is not set 1344# CONFIG_SLUB_STATS is not set
1349# CONFIG_DEBUG_RT_MUTEXES is not set 1345# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -1357,6 +1353,7 @@ CONFIG_DEBUG_SPINLOCK_SLEEP=y
1357CONFIG_DEBUG_BUGVERBOSE=y 1353CONFIG_DEBUG_BUGVERBOSE=y
1358# CONFIG_DEBUG_INFO is not set 1354# CONFIG_DEBUG_INFO is not set
1359# CONFIG_DEBUG_VM is not set 1355# CONFIG_DEBUG_VM is not set
1356# CONFIG_DEBUG_WRITECOUNT is not set
1360# CONFIG_DEBUG_LIST is not set 1357# CONFIG_DEBUG_LIST is not set
1361# CONFIG_DEBUG_SG is not set 1358# CONFIG_DEBUG_SG is not set
1362# CONFIG_BOOT_PRINTK_DELAY is not set 1359# CONFIG_BOOT_PRINTK_DELAY is not set
@@ -1371,6 +1368,7 @@ CONFIG_DEBUGGER=y
1371CONFIG_XMON=y 1368CONFIG_XMON=y
1372CONFIG_XMON_DEFAULT=y 1369CONFIG_XMON_DEFAULT=y
1373CONFIG_XMON_DISASSEMBLY=y 1370CONFIG_XMON_DISASSEMBLY=y
1371CONFIG_IRQSTACKS=y
1374# CONFIG_BDI_SWITCH is not set 1372# CONFIG_BDI_SWITCH is not set
1375# CONFIG_BOOTX_TEXT is not set 1373# CONFIG_BOOTX_TEXT is not set
1376# CONFIG_PPC_EARLY_DEBUG is not set 1374# CONFIG_PPC_EARLY_DEBUG is not set
@@ -1382,50 +1380,80 @@ CONFIG_XMON_DISASSEMBLY=y
1382# CONFIG_SECURITY is not set 1380# CONFIG_SECURITY is not set
1383# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1381# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1384CONFIG_CRYPTO=y 1382CONFIG_CRYPTO=y
1383
1384#
1385# Crypto core or helper
1386#
1385CONFIG_CRYPTO_ALGAPI=m 1387CONFIG_CRYPTO_ALGAPI=m
1386CONFIG_CRYPTO_BLKCIPHER=m 1388CONFIG_CRYPTO_BLKCIPHER=m
1387# CONFIG_CRYPTO_SEQIV is not set
1388CONFIG_CRYPTO_MANAGER=m 1389CONFIG_CRYPTO_MANAGER=m
1390# CONFIG_CRYPTO_GF128MUL is not set
1391# CONFIG_CRYPTO_NULL is not set
1392# CONFIG_CRYPTO_CRYPTD is not set
1393# CONFIG_CRYPTO_AUTHENC is not set
1394# CONFIG_CRYPTO_TEST is not set
1395
1396#
1397# Authenticated Encryption with Associated Data
1398#
1399# CONFIG_CRYPTO_CCM is not set
1400# CONFIG_CRYPTO_GCM is not set
1401# CONFIG_CRYPTO_SEQIV is not set
1402
1403#
1404# Block modes
1405#
1406CONFIG_CRYPTO_CBC=m
1407# CONFIG_CRYPTO_CTR is not set
1408# CONFIG_CRYPTO_CTS is not set
1409CONFIG_CRYPTO_ECB=m
1410# CONFIG_CRYPTO_LRW is not set
1411CONFIG_CRYPTO_PCBC=m
1412# CONFIG_CRYPTO_XTS is not set
1413
1414#
1415# Hash modes
1416#
1389# CONFIG_CRYPTO_HMAC is not set 1417# CONFIG_CRYPTO_HMAC is not set
1390# CONFIG_CRYPTO_XCBC is not set 1418# CONFIG_CRYPTO_XCBC is not set
1391# CONFIG_CRYPTO_NULL is not set 1419
1420#
1421# Digest
1422#
1423# CONFIG_CRYPTO_CRC32C is not set
1392# CONFIG_CRYPTO_MD4 is not set 1424# CONFIG_CRYPTO_MD4 is not set
1393# CONFIG_CRYPTO_MD5 is not set 1425# CONFIG_CRYPTO_MD5 is not set
1426# CONFIG_CRYPTO_MICHAEL_MIC is not set
1394CONFIG_CRYPTO_SHA1=m 1427CONFIG_CRYPTO_SHA1=m
1395# CONFIG_CRYPTO_SHA256 is not set 1428# CONFIG_CRYPTO_SHA256 is not set
1396# CONFIG_CRYPTO_SHA512 is not set 1429# CONFIG_CRYPTO_SHA512 is not set
1397# CONFIG_CRYPTO_WP512 is not set
1398# CONFIG_CRYPTO_TGR192 is not set 1430# CONFIG_CRYPTO_TGR192 is not set
1399# CONFIG_CRYPTO_GF128MUL is not set 1431# CONFIG_CRYPTO_WP512 is not set
1400CONFIG_CRYPTO_ECB=m 1432
1401CONFIG_CRYPTO_CBC=m 1433#
1402CONFIG_CRYPTO_PCBC=m 1434# Ciphers
1403# CONFIG_CRYPTO_LRW is not set 1435#
1404# CONFIG_CRYPTO_XTS is not set
1405# CONFIG_CRYPTO_CTR is not set
1406# CONFIG_CRYPTO_GCM is not set
1407# CONFIG_CRYPTO_CCM is not set
1408# CONFIG_CRYPTO_CRYPTD is not set
1409# CONFIG_CRYPTO_DES is not set
1410# CONFIG_CRYPTO_FCRYPT is not set
1411# CONFIG_CRYPTO_BLOWFISH is not set
1412# CONFIG_CRYPTO_TWOFISH is not set
1413# CONFIG_CRYPTO_SERPENT is not set
1414# CONFIG_CRYPTO_AES is not set 1436# CONFIG_CRYPTO_AES is not set
1437# CONFIG_CRYPTO_ANUBIS is not set
1438CONFIG_CRYPTO_ARC4=m
1439# CONFIG_CRYPTO_BLOWFISH is not set
1440# CONFIG_CRYPTO_CAMELLIA is not set
1415# CONFIG_CRYPTO_CAST5 is not set 1441# CONFIG_CRYPTO_CAST5 is not set
1416# CONFIG_CRYPTO_CAST6 is not set 1442# CONFIG_CRYPTO_CAST6 is not set
1417# CONFIG_CRYPTO_TEA is not set 1443# CONFIG_CRYPTO_DES is not set
1418CONFIG_CRYPTO_ARC4=m 1444# CONFIG_CRYPTO_FCRYPT is not set
1419# CONFIG_CRYPTO_KHAZAD is not set 1445# CONFIG_CRYPTO_KHAZAD is not set
1420# CONFIG_CRYPTO_ANUBIS is not set
1421# CONFIG_CRYPTO_SEED is not set
1422# CONFIG_CRYPTO_SALSA20 is not set 1446# CONFIG_CRYPTO_SALSA20 is not set
1447# CONFIG_CRYPTO_SEED is not set
1448# CONFIG_CRYPTO_SERPENT is not set
1449# CONFIG_CRYPTO_TEA is not set
1450# CONFIG_CRYPTO_TWOFISH is not set
1451
1452#
1453# Compression
1454#
1423# CONFIG_CRYPTO_DEFLATE is not set 1455# CONFIG_CRYPTO_DEFLATE is not set
1424# CONFIG_CRYPTO_MICHAEL_MIC is not set
1425# CONFIG_CRYPTO_CRC32C is not set
1426# CONFIG_CRYPTO_CAMELLIA is not set
1427# CONFIG_CRYPTO_TEST is not set
1428# CONFIG_CRYPTO_AUTHENC is not set
1429# CONFIG_CRYPTO_LZO is not set 1456# CONFIG_CRYPTO_LZO is not set
1430# CONFIG_CRYPTO_HW is not set 1457# CONFIG_CRYPTO_HW is not set
1431# CONFIG_PPC_CLOCK is not set 1458# CONFIG_PPC_CLOCK is not set
1459# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/ep8248e_defconfig b/arch/powerpc/configs/ep8248e_defconfig
index 2b1504e0a111..ba2a463b9305 100644
--- a/arch/powerpc/configs/ep8248e_defconfig
+++ b/arch/powerpc/configs/ep8248e_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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 24 08:48:09 2008 4# Mon Jun 9 08:52:09 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -30,6 +30,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
30CONFIG_GENERIC_HARDIRQS=y 30CONFIG_GENERIC_HARDIRQS=y
31# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 31# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
32CONFIG_IRQ_PER_CPU=y 32CONFIG_IRQ_PER_CPU=y
33CONFIG_STACKTRACE_SUPPORT=y
34CONFIG_LOCKDEP_SUPPORT=y
33CONFIG_RWSEM_XCHGADD_ALGORITHM=y 35CONFIG_RWSEM_XCHGADD_ALGORITHM=y
34CONFIG_ARCH_HAS_ILOG2_U32=y 36CONFIG_ARCH_HAS_ILOG2_U32=y
35CONFIG_GENERIC_HWEIGHT=y 37CONFIG_GENERIC_HWEIGHT=y
@@ -70,18 +72,16 @@ CONFIG_IKCONFIG=y
70CONFIG_IKCONFIG_PROC=y 72CONFIG_IKCONFIG_PROC=y
71CONFIG_LOG_BUF_SHIFT=14 73CONFIG_LOG_BUF_SHIFT=14
72# CONFIG_CGROUPS is not set 74# CONFIG_CGROUPS is not set
73CONFIG_GROUP_SCHED=y
74CONFIG_FAIR_GROUP_SCHED=y
75CONFIG_USER_SCHED=y
76# CONFIG_CGROUP_SCHED is not set
77CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
78CONFIG_SYSFS_DEPRECATED_V2=y 76CONFIG_SYSFS_DEPRECATED_V2=y
79# CONFIG_RELAY is not set 77# CONFIG_RELAY is not set
80# CONFIG_NAMESPACES is not set 78# CONFIG_NAMESPACES is not set
81# CONFIG_BLK_DEV_INITRD is not set 79# CONFIG_BLK_DEV_INITRD is not set
80CONFIG_CC_OPTIMIZE_FOR_SIZE=y
82CONFIG_SYSCTL=y 81CONFIG_SYSCTL=y
83CONFIG_EMBEDDED=y 82CONFIG_EMBEDDED=y
84CONFIG_SYSCTL_SYSCALL=y 83CONFIG_SYSCTL_SYSCALL=y
84CONFIG_SYSCTL_SYSCALL_CHECK=y
85CONFIG_KALLSYMS=y 85CONFIG_KALLSYMS=y
86CONFIG_KALLSYMS_ALL=y 86CONFIG_KALLSYMS_ALL=y
87# CONFIG_KALLSYMS_EXTRA_PASS is not set 87# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -107,6 +107,7 @@ CONFIG_SLAB=y
107CONFIG_HAVE_OPROFILE=y 107CONFIG_HAVE_OPROFILE=y
108CONFIG_HAVE_KPROBES=y 108CONFIG_HAVE_KPROBES=y
109CONFIG_HAVE_KRETPROBES=y 109CONFIG_HAVE_KRETPROBES=y
110# CONFIG_HAVE_DMA_ATTRS is not set
110CONFIG_PROC_PAGE_MONITOR=y 111CONFIG_PROC_PAGE_MONITOR=y
111CONFIG_SLABINFO=y 112CONFIG_SLABINFO=y
112CONFIG_RT_MUTEXES=y 113CONFIG_RT_MUTEXES=y
@@ -194,11 +195,13 @@ CONFIG_FLATMEM=y
194CONFIG_FLAT_NODE_MEM_MAP=y 195CONFIG_FLAT_NODE_MEM_MAP=y
195# CONFIG_SPARSEMEM_STATIC is not set 196# CONFIG_SPARSEMEM_STATIC is not set
196# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 197# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
198CONFIG_PAGEFLAGS_EXTENDED=y
197CONFIG_SPLIT_PTLOCK_CPUS=4 199CONFIG_SPLIT_PTLOCK_CPUS=4
198# CONFIG_RESOURCES_64BIT is not set 200# CONFIG_RESOURCES_64BIT is not set
199CONFIG_ZONE_DMA_FLAG=1 201CONFIG_ZONE_DMA_FLAG=1
200CONFIG_BOUNCE=y 202CONFIG_BOUNCE=y
201CONFIG_VIRT_TO_BUS=y 203CONFIG_VIRT_TO_BUS=y
204CONFIG_FORCE_MAX_ZONEORDER=11
202CONFIG_PROC_DEVICETREE=y 205CONFIG_PROC_DEVICETREE=y
203# CONFIG_CMDLINE_BOOL is not set 206# CONFIG_CMDLINE_BOOL is not set
204# CONFIG_PM is not set 207# CONFIG_PM is not set
@@ -215,6 +218,7 @@ CONFIG_FSL_SOC=y
215# CONFIG_PCI_SYSCALL is not set 218# CONFIG_PCI_SYSCALL is not set
216# CONFIG_ARCH_SUPPORTS_MSI is not set 219# CONFIG_ARCH_SUPPORTS_MSI is not set
217# CONFIG_PCCARD is not set 220# CONFIG_PCCARD is not set
221# CONFIG_HAS_RAPIDIO is not set
218 222
219# 223#
220# Advanced setup 224# Advanced setup
@@ -224,11 +228,11 @@ CONFIG_FSL_SOC=y
224# 228#
225# Default settings for advanced configuration options are used 229# Default settings for advanced configuration options are used
226# 230#
227CONFIG_HIGHMEM_START=0xfe000000
228CONFIG_LOWMEM_SIZE=0x30000000 231CONFIG_LOWMEM_SIZE=0x30000000
232CONFIG_PAGE_OFFSET=0xc0000000
229CONFIG_KERNEL_START=0xc0000000 233CONFIG_KERNEL_START=0xc0000000
234CONFIG_PHYSICAL_START=0x00000000
230CONFIG_TASK_SIZE=0xc0000000 235CONFIG_TASK_SIZE=0xc0000000
231CONFIG_BOOT_LOAD=0x00400000
232 236
233# 237#
234# Networking 238# Networking
@@ -283,6 +287,7 @@ CONFIG_INET6_XFRM_MODE_TRANSPORT=y
283CONFIG_INET6_XFRM_MODE_TUNNEL=y 287CONFIG_INET6_XFRM_MODE_TUNNEL=y
284CONFIG_INET6_XFRM_MODE_BEET=y 288CONFIG_INET6_XFRM_MODE_BEET=y
285CONFIG_IPV6_SIT=y 289CONFIG_IPV6_SIT=y
290CONFIG_IPV6_NDISC_NODETYPE=y
286# CONFIG_IPV6_TUNNEL is not set 291# CONFIG_IPV6_TUNNEL is not set
287# CONFIG_NETWORK_SECMARK is not set 292# CONFIG_NETWORK_SECMARK is not set
288CONFIG_NETFILTER=y 293CONFIG_NETFILTER=y
@@ -498,6 +503,7 @@ CONFIG_NETDEV_10000=y
498# 503#
499# CONFIG_WLAN_PRE80211 is not set 504# CONFIG_WLAN_PRE80211 is not set
500# CONFIG_WLAN_80211 is not set 505# CONFIG_WLAN_80211 is not set
506# CONFIG_IWLWIFI_LEDS is not set
501# CONFIG_WAN is not set 507# CONFIG_WAN is not set
502# CONFIG_PPP is not set 508# CONFIG_PPP is not set
503# CONFIG_SLIP is not set 509# CONFIG_SLIP is not set
@@ -521,6 +527,7 @@ CONFIG_NETDEV_10000=y
521# Character devices 527# Character devices
522# 528#
523# CONFIG_VT is not set 529# CONFIG_VT is not set
530CONFIG_DEVKMEM=y
524# CONFIG_SERIAL_NONSTANDARD is not set 531# CONFIG_SERIAL_NONSTANDARD is not set
525 532
526# 533#
@@ -552,12 +559,7 @@ CONFIG_HW_RANDOM=y
552# CONFIG_R3964 is not set 559# CONFIG_R3964 is not set
553# CONFIG_RAW_DRIVER is not set 560# CONFIG_RAW_DRIVER is not set
554# CONFIG_I2C is not set 561# CONFIG_I2C is not set
555
556#
557# SPI support
558#
559# CONFIG_SPI is not set 562# CONFIG_SPI is not set
560# CONFIG_SPI_MASTER is not set
561# CONFIG_W1 is not set 563# CONFIG_W1 is not set
562# CONFIG_POWER_SUPPLY is not set 564# CONFIG_POWER_SUPPLY is not set
563# CONFIG_HWMON is not set 565# CONFIG_HWMON is not set
@@ -574,12 +576,22 @@ CONFIG_SSB_POSSIBLE=y
574# Multifunction device drivers 576# Multifunction device drivers
575# 577#
576# CONFIG_MFD_SM501 is not set 578# CONFIG_MFD_SM501 is not set
579# CONFIG_HTC_PASIC3 is not set
577 580
578# 581#
579# Multimedia devices 582# Multimedia devices
580# 583#
584
585#
586# Multimedia core support
587#
581# CONFIG_VIDEO_DEV is not set 588# CONFIG_VIDEO_DEV is not set
582# CONFIG_DVB_CORE is not set 589# CONFIG_DVB_CORE is not set
590# CONFIG_VIDEO_MEDIA is not set
591
592#
593# Multimedia drivers
594#
583CONFIG_DAB=y 595CONFIG_DAB=y
584 596
585# 597#
@@ -603,12 +615,9 @@ CONFIG_DAB=y
603# CONFIG_MMC is not set 615# CONFIG_MMC is not set
604# CONFIG_MEMSTICK is not set 616# CONFIG_MEMSTICK is not set
605# CONFIG_NEW_LEDS is not set 617# CONFIG_NEW_LEDS is not set
618# CONFIG_ACCESSIBILITY is not set
606# CONFIG_RTC_CLASS is not set 619# CONFIG_RTC_CLASS is not set
607# CONFIG_DMADEVICES is not set 620# CONFIG_DMADEVICES is not set
608
609#
610# Userspace I/O
611#
612# CONFIG_UIO is not set 621# CONFIG_UIO is not set
613 622
614# 623#
@@ -675,7 +684,6 @@ CONFIG_NETWORK_FILESYSTEMS=y
675CONFIG_NFS_FS=y 684CONFIG_NFS_FS=y
676CONFIG_NFS_V3=y 685CONFIG_NFS_V3=y
677# CONFIG_NFS_V3_ACL is not set 686# CONFIG_NFS_V3_ACL is not set
678# CONFIG_NFS_DIRECTIO is not set
679# CONFIG_NFSD is not set 687# CONFIG_NFSD is not set
680CONFIG_ROOT_NFS=y 688CONFIG_ROOT_NFS=y
681CONFIG_LOCKD=y 689CONFIG_LOCKD=y
@@ -752,6 +760,7 @@ CONFIG_NLS_UTF8=y
752# 760#
753# Library routines 761# Library routines
754# 762#
763# CONFIG_GENERIC_FIND_FIRST_BIT is not set
755# CONFIG_CRC_CCITT is not set 764# CONFIG_CRC_CCITT is not set
756# CONFIG_CRC16 is not set 765# CONFIG_CRC16 is not set
757# CONFIG_CRC_ITU_T is not set 766# CONFIG_CRC_ITU_T is not set
@@ -763,6 +772,7 @@ CONFIG_PLIST=y
763CONFIG_HAS_IOMEM=y 772CONFIG_HAS_IOMEM=y
764CONFIG_HAS_IOPORT=y 773CONFIG_HAS_IOPORT=y
765CONFIG_HAS_DMA=y 774CONFIG_HAS_DMA=y
775CONFIG_HAVE_LMB=y
766 776
767# 777#
768# Kernel hacking 778# Kernel hacking
@@ -770,6 +780,7 @@ CONFIG_HAS_DMA=y
770# CONFIG_PRINTK_TIME is not set 780# CONFIG_PRINTK_TIME is not set
771CONFIG_ENABLE_WARN_DEPRECATED=y 781CONFIG_ENABLE_WARN_DEPRECATED=y
772CONFIG_ENABLE_MUST_CHECK=y 782CONFIG_ENABLE_MUST_CHECK=y
783CONFIG_FRAME_WARN=1024
773CONFIG_MAGIC_SYSRQ=y 784CONFIG_MAGIC_SYSRQ=y
774# CONFIG_UNUSED_SYMBOLS is not set 785# CONFIG_UNUSED_SYMBOLS is not set
775# CONFIG_DEBUG_FS is not set 786# CONFIG_DEBUG_FS is not set
@@ -780,6 +791,7 @@ CONFIG_DEBUG_KERNEL=y
780# CONFIG_SCHED_DEBUG is not set 791# CONFIG_SCHED_DEBUG is not set
781# CONFIG_SCHEDSTATS is not set 792# CONFIG_SCHEDSTATS is not set
782# CONFIG_TIMER_STATS is not set 793# CONFIG_TIMER_STATS is not set
794# CONFIG_DEBUG_OBJECTS is not set
783# CONFIG_DEBUG_SLAB is not set 795# CONFIG_DEBUG_SLAB is not set
784# CONFIG_DEBUG_RT_MUTEXES is not set 796# CONFIG_DEBUG_RT_MUTEXES is not set
785# CONFIG_RT_MUTEX_TESTER is not set 797# CONFIG_RT_MUTEX_TESTER is not set
@@ -791,6 +803,7 @@ CONFIG_DEBUG_KERNEL=y
791CONFIG_DEBUG_BUGVERBOSE=y 803CONFIG_DEBUG_BUGVERBOSE=y
792CONFIG_DEBUG_INFO=y 804CONFIG_DEBUG_INFO=y
793# CONFIG_DEBUG_VM is not set 805# CONFIG_DEBUG_VM is not set
806# CONFIG_DEBUG_WRITECOUNT is not set
794# CONFIG_DEBUG_LIST is not set 807# CONFIG_DEBUG_LIST is not set
795# CONFIG_DEBUG_SG is not set 808# CONFIG_DEBUG_SG is not set
796# CONFIG_BOOT_PRINTK_DELAY is not set 809# CONFIG_BOOT_PRINTK_DELAY is not set
@@ -802,6 +815,7 @@ CONFIG_DEBUG_INFO=y
802# CONFIG_DEBUG_PAGEALLOC is not set 815# CONFIG_DEBUG_PAGEALLOC is not set
803# CONFIG_DEBUGGER is not set 816# CONFIG_DEBUGGER is not set
804# CONFIG_KGDB_CONSOLE is not set 817# CONFIG_KGDB_CONSOLE is not set
818# CONFIG_IRQSTACKS is not set
805CONFIG_BDI_SWITCH=y 819CONFIG_BDI_SWITCH=y
806# CONFIG_PPC_EARLY_DEBUG is not set 820# CONFIG_PPC_EARLY_DEBUG is not set
807 821
@@ -811,45 +825,75 @@ CONFIG_BDI_SWITCH=y
811# CONFIG_KEYS is not set 825# CONFIG_KEYS is not set
812# CONFIG_SECURITY is not set 826# CONFIG_SECURITY is not set
813CONFIG_CRYPTO=y 827CONFIG_CRYPTO=y
828
829#
830# Crypto core or helper
831#
814CONFIG_CRYPTO_ALGAPI=y 832CONFIG_CRYPTO_ALGAPI=y
815CONFIG_CRYPTO_BLKCIPHER=y 833CONFIG_CRYPTO_BLKCIPHER=y
816# CONFIG_CRYPTO_SEQIV is not set
817CONFIG_CRYPTO_MANAGER=y 834CONFIG_CRYPTO_MANAGER=y
818# CONFIG_CRYPTO_HMAC is not set
819# CONFIG_CRYPTO_NULL is not set 835# CONFIG_CRYPTO_NULL is not set
836# CONFIG_CRYPTO_CRYPTD is not set
837# CONFIG_CRYPTO_AUTHENC is not set
838
839#
840# Authenticated Encryption with Associated Data
841#
842# CONFIG_CRYPTO_CCM is not set
843# CONFIG_CRYPTO_GCM is not set
844# CONFIG_CRYPTO_SEQIV is not set
845
846#
847# Block modes
848#
849CONFIG_CRYPTO_CBC=y
850# CONFIG_CRYPTO_CTR is not set
851# CONFIG_CRYPTO_CTS is not set
852CONFIG_CRYPTO_ECB=y
853CONFIG_CRYPTO_PCBC=y
854
855#
856# Hash modes
857#
858# CONFIG_CRYPTO_HMAC is not set
859
860#
861# Digest
862#
863# CONFIG_CRYPTO_CRC32C is not set
820# CONFIG_CRYPTO_MD4 is not set 864# CONFIG_CRYPTO_MD4 is not set
821CONFIG_CRYPTO_MD5=y 865CONFIG_CRYPTO_MD5=y
866# CONFIG_CRYPTO_MICHAEL_MIC is not set
822# CONFIG_CRYPTO_SHA1 is not set 867# CONFIG_CRYPTO_SHA1 is not set
823# CONFIG_CRYPTO_SHA256 is not set 868# CONFIG_CRYPTO_SHA256 is not set
824# CONFIG_CRYPTO_SHA512 is not set 869# CONFIG_CRYPTO_SHA512 is not set
825# CONFIG_CRYPTO_WP512 is not set
826# CONFIG_CRYPTO_TGR192 is not set 870# CONFIG_CRYPTO_TGR192 is not set
827CONFIG_CRYPTO_ECB=y 871# CONFIG_CRYPTO_WP512 is not set
828CONFIG_CRYPTO_CBC=y 872
829CONFIG_CRYPTO_PCBC=y 873#
830# CONFIG_CRYPTO_CTR is not set 874# Ciphers
831# CONFIG_CRYPTO_GCM is not set 875#
832# CONFIG_CRYPTO_CCM is not set
833# CONFIG_CRYPTO_CRYPTD is not set
834CONFIG_CRYPTO_DES=y
835# CONFIG_CRYPTO_FCRYPT is not set
836# CONFIG_CRYPTO_BLOWFISH is not set
837# CONFIG_CRYPTO_TWOFISH is not set
838# CONFIG_CRYPTO_SERPENT is not set
839# CONFIG_CRYPTO_AES is not set 876# CONFIG_CRYPTO_AES is not set
877# CONFIG_CRYPTO_ANUBIS is not set
878# CONFIG_CRYPTO_ARC4 is not set
879# CONFIG_CRYPTO_BLOWFISH is not set
880# CONFIG_CRYPTO_CAMELLIA is not set
840# CONFIG_CRYPTO_CAST5 is not set 881# CONFIG_CRYPTO_CAST5 is not set
841# CONFIG_CRYPTO_CAST6 is not set 882# CONFIG_CRYPTO_CAST6 is not set
842# CONFIG_CRYPTO_TEA is not set 883CONFIG_CRYPTO_DES=y
843# CONFIG_CRYPTO_ARC4 is not set 884# CONFIG_CRYPTO_FCRYPT is not set
844# CONFIG_CRYPTO_KHAZAD is not set 885# CONFIG_CRYPTO_KHAZAD is not set
845# CONFIG_CRYPTO_ANUBIS is not set
846# CONFIG_CRYPTO_SEED is not set 886# CONFIG_CRYPTO_SEED is not set
887# CONFIG_CRYPTO_SERPENT is not set
888# CONFIG_CRYPTO_TEA is not set
889# CONFIG_CRYPTO_TWOFISH is not set
890
891#
892# Compression
893#
847# CONFIG_CRYPTO_DEFLATE is not set 894# CONFIG_CRYPTO_DEFLATE is not set
848# CONFIG_CRYPTO_MICHAEL_MIC is not set
849# CONFIG_CRYPTO_CRC32C is not set
850# CONFIG_CRYPTO_CAMELLIA is not set
851# CONFIG_CRYPTO_AUTHENC is not set
852# CONFIG_CRYPTO_LZO is not set 895# CONFIG_CRYPTO_LZO is not set
853# CONFIG_CRYPTO_HW is not set 896# CONFIG_CRYPTO_HW is not set
854# CONFIG_PPC_CLOCK is not set 897# CONFIG_PPC_CLOCK is not set
855CONFIG_PPC_LIB_RHEAP=y 898CONFIG_PPC_LIB_RHEAP=y
899# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/ep88xc_defconfig b/arch/powerpc/configs/ep88xc_defconfig
index 125b4764aadd..ac72b48542dc 100644
--- a/arch/powerpc/configs/ep88xc_defconfig
+++ b/arch/powerpc/configs/ep88xc_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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 24 08:48:10 2008 4# Mon Jun 9 08:52:09 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -28,6 +28,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
28CONFIG_GENERIC_HARDIRQS=y 28CONFIG_GENERIC_HARDIRQS=y
29# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 29# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
30CONFIG_IRQ_PER_CPU=y 30CONFIG_IRQ_PER_CPU=y
31CONFIG_STACKTRACE_SUPPORT=y
32CONFIG_LOCKDEP_SUPPORT=y
31CONFIG_RWSEM_XCHGADD_ALGORITHM=y 33CONFIG_RWSEM_XCHGADD_ALGORITHM=y
32CONFIG_ARCH_HAS_ILOG2_U32=y 34CONFIG_ARCH_HAS_ILOG2_U32=y
33CONFIG_GENERIC_HWEIGHT=y 35CONFIG_GENERIC_HWEIGHT=y
@@ -108,6 +110,7 @@ CONFIG_SLUB=y
108CONFIG_HAVE_OPROFILE=y 110CONFIG_HAVE_OPROFILE=y
109CONFIG_HAVE_KPROBES=y 111CONFIG_HAVE_KPROBES=y
110CONFIG_HAVE_KRETPROBES=y 112CONFIG_HAVE_KRETPROBES=y
113# CONFIG_HAVE_DMA_ATTRS is not set
111CONFIG_PROC_PAGE_MONITOR=y 114CONFIG_PROC_PAGE_MONITOR=y
112CONFIG_SLABINFO=y 115CONFIG_SLABINFO=y
113# CONFIG_TINY_SHMEM is not set 116# CONFIG_TINY_SHMEM is not set
@@ -212,11 +215,13 @@ CONFIG_FLATMEM=y
212CONFIG_FLAT_NODE_MEM_MAP=y 215CONFIG_FLAT_NODE_MEM_MAP=y
213# CONFIG_SPARSEMEM_STATIC is not set 216# CONFIG_SPARSEMEM_STATIC is not set
214# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 217# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
218CONFIG_PAGEFLAGS_EXTENDED=y
215CONFIG_SPLIT_PTLOCK_CPUS=4 219CONFIG_SPLIT_PTLOCK_CPUS=4
216# CONFIG_RESOURCES_64BIT is not set 220# CONFIG_RESOURCES_64BIT is not set
217CONFIG_ZONE_DMA_FLAG=1 221CONFIG_ZONE_DMA_FLAG=1
218CONFIG_BOUNCE=y 222CONFIG_BOUNCE=y
219CONFIG_VIRT_TO_BUS=y 223CONFIG_VIRT_TO_BUS=y
224CONFIG_FORCE_MAX_ZONEORDER=11
220CONFIG_PROC_DEVICETREE=y 225CONFIG_PROC_DEVICETREE=y
221# CONFIG_CMDLINE_BOOL is not set 226# CONFIG_CMDLINE_BOOL is not set
222# CONFIG_PM is not set 227# CONFIG_PM is not set
@@ -234,6 +239,7 @@ CONFIG_FSL_SOC=y
234# CONFIG_PCI_QSPAN is not set 239# CONFIG_PCI_QSPAN is not set
235# CONFIG_ARCH_SUPPORTS_MSI is not set 240# CONFIG_ARCH_SUPPORTS_MSI is not set
236# CONFIG_PCCARD is not set 241# CONFIG_PCCARD is not set
242# CONFIG_HAS_RAPIDIO is not set
237 243
238# 244#
239# Advanced setup 245# Advanced setup
@@ -243,13 +249,13 @@ CONFIG_FSL_SOC=y
243# 249#
244# Default settings for advanced configuration options are used 250# Default settings for advanced configuration options are used
245# 251#
246CONFIG_HIGHMEM_START=0xfe000000
247CONFIG_LOWMEM_SIZE=0x30000000 252CONFIG_LOWMEM_SIZE=0x30000000
253CONFIG_PAGE_OFFSET=0xc0000000
248CONFIG_KERNEL_START=0xc0000000 254CONFIG_KERNEL_START=0xc0000000
255CONFIG_PHYSICAL_START=0x00000000
249CONFIG_TASK_SIZE=0x80000000 256CONFIG_TASK_SIZE=0x80000000
250CONFIG_CONSISTENT_START=0xfd000000 257CONFIG_CONSISTENT_START=0xfd000000
251CONFIG_CONSISTENT_SIZE=0x00200000 258CONFIG_CONSISTENT_SIZE=0x00200000
252CONFIG_BOOT_LOAD=0x00400000
253 259
254# 260#
255# Networking 261# Networking
@@ -292,8 +298,6 @@ CONFIG_TCP_CONG_CUBIC=y
292CONFIG_DEFAULT_TCP_CONG="cubic" 298CONFIG_DEFAULT_TCP_CONG="cubic"
293# CONFIG_TCP_MD5SIG is not set 299# CONFIG_TCP_MD5SIG is not set
294# CONFIG_IPV6 is not set 300# CONFIG_IPV6 is not set
295# CONFIG_INET6_XFRM_TUNNEL is not set
296# CONFIG_INET6_TUNNEL is not set
297# CONFIG_NETWORK_SECMARK is not set 301# CONFIG_NETWORK_SECMARK is not set
298# CONFIG_NETFILTER is not set 302# CONFIG_NETFILTER is not set
299# CONFIG_IP_DCCP is not set 303# CONFIG_IP_DCCP is not set
@@ -481,6 +485,7 @@ CONFIG_FS_ENET_MDIO_FEC=y
481# 485#
482# CONFIG_WLAN_PRE80211 is not set 486# CONFIG_WLAN_PRE80211 is not set
483# CONFIG_WLAN_80211 is not set 487# CONFIG_WLAN_80211 is not set
488# CONFIG_IWLWIFI_LEDS is not set
484# CONFIG_WAN is not set 489# CONFIG_WAN is not set
485# CONFIG_PPP is not set 490# CONFIG_PPP is not set
486# CONFIG_SLIP is not set 491# CONFIG_SLIP is not set
@@ -505,6 +510,7 @@ CONFIG_FS_ENET_MDIO_FEC=y
505# Character devices 510# Character devices
506# 511#
507# CONFIG_VT is not set 512# CONFIG_VT is not set
513CONFIG_DEVKMEM=y
508# CONFIG_SERIAL_NONSTANDARD is not set 514# CONFIG_SERIAL_NONSTANDARD is not set
509 515
510# 516#
@@ -537,12 +543,7 @@ CONFIG_GEN_RTC=y
537# CONFIG_RAW_DRIVER is not set 543# CONFIG_RAW_DRIVER is not set
538# CONFIG_TCG_TPM is not set 544# CONFIG_TCG_TPM is not set
539# CONFIG_I2C is not set 545# CONFIG_I2C is not set
540
541#
542# SPI support
543#
544# CONFIG_SPI is not set 546# CONFIG_SPI is not set
545# CONFIG_SPI_MASTER is not set
546# CONFIG_W1 is not set 547# CONFIG_W1 is not set
547# CONFIG_POWER_SUPPLY is not set 548# CONFIG_POWER_SUPPLY is not set
548# CONFIG_HWMON is not set 549# CONFIG_HWMON is not set
@@ -559,12 +560,22 @@ CONFIG_SSB_POSSIBLE=y
559# Multifunction device drivers 560# Multifunction device drivers
560# 561#
561# CONFIG_MFD_SM501 is not set 562# CONFIG_MFD_SM501 is not set
563# CONFIG_HTC_PASIC3 is not set
562 564
563# 565#
564# Multimedia devices 566# Multimedia devices
565# 567#
568
569#
570# Multimedia core support
571#
566# CONFIG_VIDEO_DEV is not set 572# CONFIG_VIDEO_DEV is not set
567# CONFIG_DVB_CORE is not set 573# CONFIG_DVB_CORE is not set
574# CONFIG_VIDEO_MEDIA is not set
575
576#
577# Multimedia drivers
578#
568CONFIG_DAB=y 579CONFIG_DAB=y
569 580
570# 581#
@@ -588,13 +599,10 @@ CONFIG_DAB=y
588# CONFIG_MMC is not set 599# CONFIG_MMC is not set
589# CONFIG_MEMSTICK is not set 600# CONFIG_MEMSTICK is not set
590# CONFIG_NEW_LEDS is not set 601# CONFIG_NEW_LEDS is not set
602# CONFIG_ACCESSIBILITY is not set
591# CONFIG_EDAC is not set 603# CONFIG_EDAC is not set
592# CONFIG_RTC_CLASS is not set 604# CONFIG_RTC_CLASS is not set
593# CONFIG_DMADEVICES is not set 605# CONFIG_DMADEVICES is not set
594
595#
596# Userspace I/O
597#
598# CONFIG_UIO is not set 606# CONFIG_UIO is not set
599 607
600# 608#
@@ -607,7 +615,6 @@ CONFIG_DAB=y
607# CONFIG_JFS_FS is not set 615# CONFIG_JFS_FS is not set
608# CONFIG_FS_POSIX_ACL is not set 616# CONFIG_FS_POSIX_ACL is not set
609# CONFIG_XFS_FS is not set 617# CONFIG_XFS_FS is not set
610# CONFIG_GFS2_FS is not set
611# CONFIG_OCFS2_FS is not set 618# CONFIG_OCFS2_FS is not set
612# CONFIG_DNOTIFY is not set 619# CONFIG_DNOTIFY is not set
613# CONFIG_INOTIFY is not set 620# CONFIG_INOTIFY is not set
@@ -665,7 +672,6 @@ CONFIG_NFS_FS=y
665CONFIG_NFS_V3=y 672CONFIG_NFS_V3=y
666# CONFIG_NFS_V3_ACL is not set 673# CONFIG_NFS_V3_ACL is not set
667# CONFIG_NFS_V4 is not set 674# CONFIG_NFS_V4 is not set
668# CONFIG_NFS_DIRECTIO is not set
669# CONFIG_NFSD is not set 675# CONFIG_NFSD is not set
670CONFIG_ROOT_NFS=y 676CONFIG_ROOT_NFS=y
671CONFIG_LOCKD=y 677CONFIG_LOCKD=y
@@ -708,6 +714,7 @@ CONFIG_MSDOS_PARTITION=y
708# 714#
709# Library routines 715# Library routines
710# 716#
717# CONFIG_GENERIC_FIND_FIRST_BIT is not set
711# CONFIG_CRC_CCITT is not set 718# CONFIG_CRC_CCITT is not set
712# CONFIG_CRC16 is not set 719# CONFIG_CRC16 is not set
713# CONFIG_CRC_ITU_T is not set 720# CONFIG_CRC_ITU_T is not set
@@ -718,6 +725,7 @@ CONFIG_ZLIB_INFLATE=y
718CONFIG_HAS_IOMEM=y 725CONFIG_HAS_IOMEM=y
719CONFIG_HAS_IOPORT=y 726CONFIG_HAS_IOPORT=y
720CONFIG_HAS_DMA=y 727CONFIG_HAS_DMA=y
728CONFIG_HAVE_LMB=y
721 729
722# 730#
723# Kernel hacking 731# Kernel hacking
@@ -725,6 +733,7 @@ CONFIG_HAS_DMA=y
725# CONFIG_PRINTK_TIME is not set 733# CONFIG_PRINTK_TIME is not set
726CONFIG_ENABLE_WARN_DEPRECATED=y 734CONFIG_ENABLE_WARN_DEPRECATED=y
727CONFIG_ENABLE_MUST_CHECK=y 735CONFIG_ENABLE_MUST_CHECK=y
736CONFIG_FRAME_WARN=1024
728CONFIG_MAGIC_SYSRQ=y 737CONFIG_MAGIC_SYSRQ=y
729# CONFIG_UNUSED_SYMBOLS is not set 738# CONFIG_UNUSED_SYMBOLS is not set
730# CONFIG_DEBUG_FS is not set 739# CONFIG_DEBUG_FS is not set
@@ -735,6 +744,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
735CONFIG_SCHED_DEBUG=y 744CONFIG_SCHED_DEBUG=y
736# CONFIG_SCHEDSTATS is not set 745# CONFIG_SCHEDSTATS is not set
737# CONFIG_TIMER_STATS is not set 746# CONFIG_TIMER_STATS is not set
747# CONFIG_DEBUG_OBJECTS is not set
738# CONFIG_SLUB_DEBUG_ON is not set 748# CONFIG_SLUB_DEBUG_ON is not set
739# CONFIG_SLUB_STATS is not set 749# CONFIG_SLUB_STATS is not set
740# CONFIG_DEBUG_SPINLOCK is not set 750# CONFIG_DEBUG_SPINLOCK is not set
@@ -745,6 +755,7 @@ CONFIG_SCHED_DEBUG=y
745CONFIG_DEBUG_BUGVERBOSE=y 755CONFIG_DEBUG_BUGVERBOSE=y
746CONFIG_DEBUG_INFO=y 756CONFIG_DEBUG_INFO=y
747# CONFIG_DEBUG_VM is not set 757# CONFIG_DEBUG_VM is not set
758# CONFIG_DEBUG_WRITECOUNT is not set
748# CONFIG_DEBUG_LIST is not set 759# CONFIG_DEBUG_LIST is not set
749# CONFIG_DEBUG_SG is not set 760# CONFIG_DEBUG_SG is not set
750# CONFIG_BOOT_PRINTK_DELAY is not set 761# CONFIG_BOOT_PRINTK_DELAY is not set
@@ -755,6 +766,7 @@ CONFIG_DEBUG_INFO=y
755# CONFIG_DEBUG_STACK_USAGE is not set 766# CONFIG_DEBUG_STACK_USAGE is not set
756# CONFIG_DEBUG_PAGEALLOC is not set 767# CONFIG_DEBUG_PAGEALLOC is not set
757# CONFIG_DEBUGGER is not set 768# CONFIG_DEBUGGER is not set
769# CONFIG_IRQSTACKS is not set
758# CONFIG_BDI_SWITCH is not set 770# CONFIG_BDI_SWITCH is not set
759# CONFIG_PPC_EARLY_DEBUG is not set 771# CONFIG_PPC_EARLY_DEBUG is not set
760 772
@@ -767,3 +779,4 @@ CONFIG_DEBUG_INFO=y
767# CONFIG_CRYPTO is not set 779# CONFIG_CRYPTO is not set
768# CONFIG_PPC_CLOCK is not set 780# CONFIG_PPC_CLOCK is not set
769CONFIG_PPC_LIB_RHEAP=y 781CONFIG_PPC_LIB_RHEAP=y
782# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig
index 88338a9f5e95..0ccc6e493dcb 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.25-rc6 3# Linux kernel version: 2.6.26-rc6
4# Thu Mar 27 13:55:43 2008 4# Mon Jun 16 21:08:31 2008
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7 7
@@ -29,6 +29,9 @@ CONFIG_GENERIC_CLOCKEVENTS=y
29CONFIG_GENERIC_HARDIRQS=y 29CONFIG_GENERIC_HARDIRQS=y
30CONFIG_HAVE_SETUP_PER_CPU_AREA=y 30CONFIG_HAVE_SETUP_PER_CPU_AREA=y
31CONFIG_IRQ_PER_CPU=y 31CONFIG_IRQ_PER_CPU=y
32CONFIG_STACKTRACE_SUPPORT=y
33CONFIG_TRACE_IRQFLAGS_SUPPORT=y
34CONFIG_LOCKDEP_SUPPORT=y
32CONFIG_RWSEM_XCHGADD_ALGORITHM=y 35CONFIG_RWSEM_XCHGADD_ALGORITHM=y
33CONFIG_ARCH_HAS_ILOG2_U32=y 36CONFIG_ARCH_HAS_ILOG2_U32=y
34CONFIG_ARCH_HAS_ILOG2_U64=y 37CONFIG_ARCH_HAS_ILOG2_U64=y
@@ -91,6 +94,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
91CONFIG_SYSCTL=y 94CONFIG_SYSCTL=y
92# CONFIG_EMBEDDED is not set 95# CONFIG_EMBEDDED is not set
93CONFIG_SYSCTL_SYSCALL=y 96CONFIG_SYSCTL_SYSCALL=y
97CONFIG_SYSCTL_SYSCALL_CHECK=y
94CONFIG_KALLSYMS=y 98CONFIG_KALLSYMS=y
95# CONFIG_KALLSYMS_ALL is not set 99# CONFIG_KALLSYMS_ALL is not set
96# CONFIG_KALLSYMS_EXTRA_PASS is not set 100# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -119,12 +123,14 @@ CONFIG_HAVE_OPROFILE=y
119# CONFIG_KPROBES is not set 123# CONFIG_KPROBES is not set
120CONFIG_HAVE_KPROBES=y 124CONFIG_HAVE_KPROBES=y
121CONFIG_HAVE_KRETPROBES=y 125CONFIG_HAVE_KRETPROBES=y
126# CONFIG_HAVE_DMA_ATTRS is not set
122CONFIG_PROC_PAGE_MONITOR=y 127CONFIG_PROC_PAGE_MONITOR=y
123CONFIG_SLABINFO=y 128CONFIG_SLABINFO=y
124CONFIG_RT_MUTEXES=y 129CONFIG_RT_MUTEXES=y
125# CONFIG_TINY_SHMEM is not set 130# CONFIG_TINY_SHMEM is not set
126CONFIG_BASE_SMALL=0 131CONFIG_BASE_SMALL=0
127CONFIG_MODULES=y 132CONFIG_MODULES=y
133# CONFIG_MODULE_FORCE_LOAD is not set
128CONFIG_MODULE_UNLOAD=y 134CONFIG_MODULE_UNLOAD=y
129# CONFIG_MODULE_FORCE_UNLOAD is not set 135# CONFIG_MODULE_FORCE_UNLOAD is not set
130CONFIG_MODVERSIONS=y 136CONFIG_MODVERSIONS=y
@@ -165,11 +171,11 @@ CONFIG_PPC_PMAC=y
165CONFIG_PPC_PMAC64=y 171CONFIG_PPC_PMAC64=y
166# CONFIG_PPC_MAPLE is not set 172# CONFIG_PPC_MAPLE is not set
167# CONFIG_PPC_PASEMI is not set 173# CONFIG_PPC_PASEMI is not set
168# CONFIG_PPC_CELLEB is not set
169# CONFIG_PPC_PS3 is not set 174# CONFIG_PPC_PS3 is not set
170# CONFIG_PPC_CELL is not set 175# CONFIG_PPC_CELL is not set
171# CONFIG_PPC_CELL_NATIVE is not set 176# CONFIG_PPC_CELL_NATIVE is not set
172# CONFIG_PPC_IBM_CELL_BLADE is not set 177# CONFIG_PPC_IBM_CELL_BLADE is not set
178# CONFIG_PPC_CELLEB is not set
173# CONFIG_PQ2ADS is not set 179# CONFIG_PQ2ADS is not set
174CONFIG_PPC_NATIVE=y 180CONFIG_PPC_NATIVE=y
175# CONFIG_IPIC is not set 181# CONFIG_IPIC is not set
@@ -190,6 +196,7 @@ CONFIG_CPU_FREQ_TABLE=y
190CONFIG_CPU_FREQ_STAT=y 196CONFIG_CPU_FREQ_STAT=y
191# CONFIG_CPU_FREQ_STAT_DETAILS is not set 197# CONFIG_CPU_FREQ_STAT_DETAILS is not set
192CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y 198CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
199# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
193# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set 200# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
194# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set 201# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
195# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set 202# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
@@ -224,7 +231,6 @@ CONFIG_PREEMPT_NONE=y
224CONFIG_BINFMT_ELF=y 231CONFIG_BINFMT_ELF=y
225CONFIG_COMPAT_BINFMT_ELF=y 232CONFIG_COMPAT_BINFMT_ELF=y
226# CONFIG_BINFMT_MISC is not set 233# CONFIG_BINFMT_MISC is not set
227CONFIG_FORCE_MAX_ZONEORDER=13
228CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y 234CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y
229CONFIG_IOMMU_VMERGE=y 235CONFIG_IOMMU_VMERGE=y
230CONFIG_IOMMU_HELPER=y 236CONFIG_IOMMU_HELPER=y
@@ -248,12 +254,14 @@ CONFIG_FLATMEM=y
248CONFIG_FLAT_NODE_MEM_MAP=y 254CONFIG_FLAT_NODE_MEM_MAP=y
249# CONFIG_SPARSEMEM_STATIC is not set 255# CONFIG_SPARSEMEM_STATIC is not set
250CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y 256CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
257CONFIG_PAGEFLAGS_EXTENDED=y
251CONFIG_SPLIT_PTLOCK_CPUS=4 258CONFIG_SPLIT_PTLOCK_CPUS=4
252CONFIG_RESOURCES_64BIT=y 259CONFIG_RESOURCES_64BIT=y
253CONFIG_ZONE_DMA_FLAG=1 260CONFIG_ZONE_DMA_FLAG=1
254CONFIG_BOUNCE=y 261CONFIG_BOUNCE=y
255# CONFIG_PPC_HAS_HASH_64K is not set 262# CONFIG_PPC_HAS_HASH_64K is not set
256# CONFIG_PPC_64K_PAGES is not set 263# CONFIG_PPC_64K_PAGES is not set
264CONFIG_FORCE_MAX_ZONEORDER=13
257# CONFIG_SCHED_SMT is not set 265# CONFIG_SCHED_SMT is not set
258CONFIG_PROC_DEVICETREE=y 266CONFIG_PROC_DEVICETREE=y
259# CONFIG_CMDLINE_BOOL is not set 267# CONFIG_CMDLINE_BOOL is not set
@@ -278,7 +286,10 @@ CONFIG_PCI_MSI=y
278# CONFIG_PCI_DEBUG is not set 286# CONFIG_PCI_DEBUG is not set
279# CONFIG_PCCARD is not set 287# CONFIG_PCCARD is not set
280# CONFIG_HOTPLUG_PCI is not set 288# CONFIG_HOTPLUG_PCI is not set
289# CONFIG_HAS_RAPIDIO is not set
290CONFIG_PAGE_OFFSET=0xc000000000000000
281CONFIG_KERNEL_START=0xc000000000000000 291CONFIG_KERNEL_START=0xc000000000000000
292CONFIG_PHYSICAL_START=0x00000000
282 293
283# 294#
284# Networking 295# Networking
@@ -325,8 +336,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
325# CONFIG_TCP_MD5SIG is not set 336# CONFIG_TCP_MD5SIG is not set
326# CONFIG_IP_VS is not set 337# CONFIG_IP_VS is not set
327# CONFIG_IPV6 is not set 338# CONFIG_IPV6 is not set
328# CONFIG_INET6_XFRM_TUNNEL is not set
329# CONFIG_INET6_TUNNEL is not set
330# CONFIG_NETWORK_SECMARK is not set 339# CONFIG_NETWORK_SECMARK is not set
331CONFIG_NETFILTER=y 340CONFIG_NETFILTER=y
332# CONFIG_NETFILTER_DEBUG is not set 341# CONFIG_NETFILTER_DEBUG is not set
@@ -342,6 +351,7 @@ CONFIG_NF_CONNTRACK=m
342# CONFIG_NF_CT_ACCT is not set 351# CONFIG_NF_CT_ACCT is not set
343CONFIG_NF_CONNTRACK_MARK=y 352CONFIG_NF_CONNTRACK_MARK=y
344CONFIG_NF_CONNTRACK_EVENTS=y 353CONFIG_NF_CONNTRACK_EVENTS=y
354# CONFIG_NF_CT_PROTO_DCCP is not set
345# CONFIG_NF_CT_PROTO_SCTP is not set 355# CONFIG_NF_CT_PROTO_SCTP is not set
346# CONFIG_NF_CT_PROTO_UDPLITE is not set 356# CONFIG_NF_CT_PROTO_UDPLITE is not set
347# CONFIG_NF_CONNTRACK_AMANDA is not set 357# CONFIG_NF_CONNTRACK_AMANDA is not set
@@ -418,6 +428,7 @@ CONFIG_FW_LOADER=y
418# CONFIG_CONNECTOR is not set 428# CONFIG_CONNECTOR is not set
419# CONFIG_MTD is not set 429# CONFIG_MTD is not set
420CONFIG_OF_DEVICE=y 430CONFIG_OF_DEVICE=y
431CONFIG_OF_I2C=y
421# CONFIG_PARPORT is not set 432# CONFIG_PARPORT is not set
422CONFIG_BLK_DEV=y 433CONFIG_BLK_DEV=y
423# CONFIG_BLK_DEV_FD is not set 434# CONFIG_BLK_DEV_FD is not set
@@ -465,7 +476,6 @@ CONFIG_IDE_PROC_FS=y
465# 476#
466# IDE chipset support/bugfixes 477# IDE chipset support/bugfixes
467# 478#
468CONFIG_IDE_GENERIC=y
469# CONFIG_BLK_DEV_PLATFORM is not set 479# CONFIG_BLK_DEV_PLATFORM is not set
470CONFIG_BLK_DEV_IDEDMA_SFF=y 480CONFIG_BLK_DEV_IDEDMA_SFF=y
471 481
@@ -506,7 +516,7 @@ CONFIG_BLK_DEV_IDE_PMAC=y
506CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y 516CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
507CONFIG_BLK_DEV_IDEDMA_PMAC=y 517CONFIG_BLK_DEV_IDEDMA_PMAC=y
508CONFIG_BLK_DEV_IDEDMA=y 518CONFIG_BLK_DEV_IDEDMA=y
509CONFIG_IDE_ARCH_OBSOLETE_INIT=y 519# CONFIG_BLK_DEV_HD_ONLY is not set
510# CONFIG_BLK_DEV_HD is not set 520# CONFIG_BLK_DEV_HD is not set
511 521
512# 522#
@@ -584,7 +594,10 @@ CONFIG_SCSI_LOWLEVEL=y
584# CONFIG_SCSI_SRP is not set 594# CONFIG_SCSI_SRP is not set
585CONFIG_ATA=y 595CONFIG_ATA=y
586# CONFIG_ATA_NONSTANDARD is not set 596# CONFIG_ATA_NONSTANDARD is not set
597CONFIG_SATA_PMP=y
587# CONFIG_SATA_AHCI is not set 598# CONFIG_SATA_AHCI is not set
599# CONFIG_SATA_SIL24 is not set
600CONFIG_ATA_SFF=y
588CONFIG_SATA_SVW=y 601CONFIG_SATA_SVW=y
589# CONFIG_ATA_PIIX is not set 602# CONFIG_ATA_PIIX is not set
590# CONFIG_SATA_MV is not set 603# CONFIG_SATA_MV is not set
@@ -594,7 +607,6 @@ CONFIG_SATA_SVW=y
594# CONFIG_SATA_PROMISE is not set 607# CONFIG_SATA_PROMISE is not set
595# CONFIG_SATA_SX4 is not set 608# CONFIG_SATA_SX4 is not set
596# CONFIG_SATA_SIL is not set 609# CONFIG_SATA_SIL is not set
597# CONFIG_SATA_SIL24 is not set
598# CONFIG_SATA_SIS is not set 610# CONFIG_SATA_SIS is not set
599# CONFIG_SATA_ULI is not set 611# CONFIG_SATA_ULI is not set
600# CONFIG_SATA_VIA is not set 612# CONFIG_SATA_VIA is not set
@@ -639,6 +651,7 @@ CONFIG_SATA_SVW=y
639# CONFIG_PATA_VIA is not set 651# CONFIG_PATA_VIA is not set
640# CONFIG_PATA_WINBOND is not set 652# CONFIG_PATA_WINBOND is not set
641# CONFIG_PATA_PLATFORM is not set 653# CONFIG_PATA_PLATFORM is not set
654# CONFIG_PATA_SCH is not set
642CONFIG_MD=y 655CONFIG_MD=y
643CONFIG_BLK_DEV_MD=y 656CONFIG_BLK_DEV_MD=y
644CONFIG_MD_LINEAR=y 657CONFIG_MD_LINEAR=y
@@ -740,7 +753,6 @@ CONFIG_E1000=y
740# CONFIG_SIS190 is not set 753# CONFIG_SIS190 is not set
741# CONFIG_SKGE is not set 754# CONFIG_SKGE is not set
742# CONFIG_SKY2 is not set 755# CONFIG_SKY2 is not set
743# CONFIG_SK98LIN is not set
744# CONFIG_VIA_VELOCITY is not set 756# CONFIG_VIA_VELOCITY is not set
745CONFIG_TIGON3=y 757CONFIG_TIGON3=y
746# CONFIG_BNX2 is not set 758# CONFIG_BNX2 is not set
@@ -755,10 +767,10 @@ CONFIG_NETDEV_10000=y
755# CONFIG_MYRI10GE is not set 767# CONFIG_MYRI10GE is not set
756# CONFIG_NETXEN_NIC is not set 768# CONFIG_NETXEN_NIC is not set
757# CONFIG_NIU is not set 769# CONFIG_NIU is not set
758# CONFIG_PASEMI_MAC is not set
759# CONFIG_MLX4_CORE is not set 770# CONFIG_MLX4_CORE is not set
760# CONFIG_TEHUTI is not set 771# CONFIG_TEHUTI is not set
761# CONFIG_BNX2X is not set 772# CONFIG_BNX2X is not set
773# CONFIG_SFC is not set
762CONFIG_TR=y 774CONFIG_TR=y
763CONFIG_IBMOL=y 775CONFIG_IBMOL=y
764# CONFIG_3C359 is not set 776# CONFIG_3C359 is not set
@@ -769,6 +781,7 @@ CONFIG_IBMOL=y
769# 781#
770# CONFIG_WLAN_PRE80211 is not set 782# CONFIG_WLAN_PRE80211 is not set
771# CONFIG_WLAN_80211 is not set 783# CONFIG_WLAN_80211 is not set
784# CONFIG_IWLWIFI_LEDS is not set
772 785
773# 786#
774# USB Network Adapters 787# USB Network Adapters
@@ -865,6 +878,7 @@ CONFIG_VT=y
865CONFIG_VT_CONSOLE=y 878CONFIG_VT_CONSOLE=y
866CONFIG_HW_CONSOLE=y 879CONFIG_HW_CONSOLE=y
867# CONFIG_VT_HW_CONSOLE_BINDING is not set 880# CONFIG_VT_HW_CONSOLE_BINDING is not set
881CONFIG_DEVKMEM=y
868# CONFIG_SERIAL_NONSTANDARD is not set 882# CONFIG_SERIAL_NONSTANDARD is not set
869# CONFIG_NOZOMI is not set 883# CONFIG_NOZOMI is not set
870 884
@@ -895,13 +909,7 @@ CONFIG_DEVPORT=y
895CONFIG_I2C=y 909CONFIG_I2C=y
896CONFIG_I2C_BOARDINFO=y 910CONFIG_I2C_BOARDINFO=y
897CONFIG_I2C_CHARDEV=y 911CONFIG_I2C_CHARDEV=y
898
899#
900# I2C Algorithms
901#
902CONFIG_I2C_ALGOBIT=y 912CONFIG_I2C_ALGOBIT=y
903# CONFIG_I2C_ALGOPCF is not set
904# CONFIG_I2C_ALGOPCA is not set
905 913
906# 914#
907# I2C Hardware Bus support 915# I2C Hardware Bus support
@@ -930,6 +938,7 @@ CONFIG_I2C_POWERMAC=y
930# CONFIG_I2C_VIA is not set 938# CONFIG_I2C_VIA is not set
931# CONFIG_I2C_VIAPRO is not set 939# CONFIG_I2C_VIAPRO is not set
932# CONFIG_I2C_VOODOO3 is not set 940# CONFIG_I2C_VOODOO3 is not set
941# CONFIG_I2C_PCA_PLATFORM is not set
933 942
934# 943#
935# Miscellaneous I2C Chip support 944# Miscellaneous I2C Chip support
@@ -939,19 +948,13 @@ CONFIG_I2C_POWERMAC=y
939# CONFIG_SENSORS_PCF8574 is not set 948# CONFIG_SENSORS_PCF8574 is not set
940# CONFIG_PCF8575 is not set 949# CONFIG_PCF8575 is not set
941# CONFIG_SENSORS_PCF8591 is not set 950# CONFIG_SENSORS_PCF8591 is not set
942# CONFIG_TPS65010 is not set
943# CONFIG_SENSORS_MAX6875 is not set 951# CONFIG_SENSORS_MAX6875 is not set
944# CONFIG_SENSORS_TSL2550 is not set 952# CONFIG_SENSORS_TSL2550 is not set
945# CONFIG_I2C_DEBUG_CORE is not set 953# CONFIG_I2C_DEBUG_CORE is not set
946# CONFIG_I2C_DEBUG_ALGO is not set 954# CONFIG_I2C_DEBUG_ALGO is not set
947# CONFIG_I2C_DEBUG_BUS is not set 955# CONFIG_I2C_DEBUG_BUS is not set
948# CONFIG_I2C_DEBUG_CHIP is not set 956# CONFIG_I2C_DEBUG_CHIP is not set
949
950#
951# SPI support
952#
953# CONFIG_SPI is not set 957# CONFIG_SPI is not set
954# CONFIG_SPI_MASTER is not set
955# CONFIG_W1 is not set 958# CONFIG_W1 is not set
956# CONFIG_POWER_SUPPLY is not set 959# CONFIG_POWER_SUPPLY is not set
957# CONFIG_HWMON is not set 960# CONFIG_HWMON is not set
@@ -968,12 +971,22 @@ CONFIG_SSB_POSSIBLE=y
968# Multifunction device drivers 971# Multifunction device drivers
969# 972#
970# CONFIG_MFD_SM501 is not set 973# CONFIG_MFD_SM501 is not set
974# CONFIG_HTC_PASIC3 is not set
971 975
972# 976#
973# Multimedia devices 977# Multimedia devices
974# 978#
979
980#
981# Multimedia core support
982#
975# CONFIG_VIDEO_DEV is not set 983# CONFIG_VIDEO_DEV is not set
976# CONFIG_DVB_CORE is not set 984# CONFIG_DVB_CORE is not set
985# CONFIG_VIDEO_MEDIA is not set
986
987#
988# Multimedia drivers
989#
977CONFIG_DAB=y 990CONFIG_DAB=y
978# CONFIG_USB_DABUSB is not set 991# CONFIG_USB_DABUSB is not set
979 992
@@ -995,8 +1008,8 @@ CONFIG_FB_CFB_IMAGEBLIT=y
995# CONFIG_FB_SYS_FILLRECT is not set 1008# CONFIG_FB_SYS_FILLRECT is not set
996# CONFIG_FB_SYS_COPYAREA is not set 1009# CONFIG_FB_SYS_COPYAREA is not set
997# CONFIG_FB_SYS_IMAGEBLIT is not set 1010# CONFIG_FB_SYS_IMAGEBLIT is not set
1011# CONFIG_FB_FOREIGN_ENDIAN is not set
998# CONFIG_FB_SYS_FOPS is not set 1012# CONFIG_FB_SYS_FOPS is not set
999CONFIG_FB_DEFERRED_IO=y
1000# CONFIG_FB_SVGALIB is not set 1013# CONFIG_FB_SVGALIB is not set
1001CONFIG_FB_MACMODES=y 1014CONFIG_FB_MACMODES=y
1002CONFIG_FB_BACKLIGHT=y 1015CONFIG_FB_BACKLIGHT=y
@@ -1112,6 +1125,7 @@ CONFIG_SND_VERBOSE_PROCFS=y
1112# CONFIG_SND_AU8810 is not set 1125# CONFIG_SND_AU8810 is not set
1113# CONFIG_SND_AU8820 is not set 1126# CONFIG_SND_AU8820 is not set
1114# CONFIG_SND_AU8830 is not set 1127# CONFIG_SND_AU8830 is not set
1128# CONFIG_SND_AW2 is not set
1115# CONFIG_SND_AZT3328 is not set 1129# CONFIG_SND_AZT3328 is not set
1116# CONFIG_SND_BT87X is not set 1130# CONFIG_SND_BT87X is not set
1117# CONFIG_SND_CA0106 is not set 1131# CONFIG_SND_CA0106 is not set
@@ -1198,11 +1212,11 @@ CONFIG_SND_USB_AUDIO=m
1198# CONFIG_SND_SOC is not set 1212# CONFIG_SND_SOC is not set
1199 1213
1200# 1214#
1201# SoC Audio support for SuperH 1215# ALSA SoC audio for Freescale SOCs
1202# 1216#
1203 1217
1204# 1218#
1205# ALSA SoC audio for Freescale SOCs 1219# SoC Audio for the Texas Instruments OMAP
1206# 1220#
1207 1221
1208# 1222#
@@ -1222,6 +1236,7 @@ CONFIG_USB_HID=y
1222CONFIG_HID_FF=y 1236CONFIG_HID_FF=y
1223CONFIG_HID_PID=y 1237CONFIG_HID_PID=y
1224CONFIG_LOGITECH_FF=y 1238CONFIG_LOGITECH_FF=y
1239# CONFIG_LOGIRUMBLEPAD2_FF is not set
1225# CONFIG_PANTHERLORD_FF is not set 1240# CONFIG_PANTHERLORD_FF is not set
1226CONFIG_THRUSTMASTER_FF=y 1241CONFIG_THRUSTMASTER_FF=y
1227# CONFIG_ZEROPLUS_FF is not set 1242# CONFIG_ZEROPLUS_FF is not set
@@ -1245,11 +1260,13 @@ CONFIG_USB_DEVICE_CLASS=y
1245# 1260#
1246# USB Host Controller Drivers 1261# USB Host Controller Drivers
1247# 1262#
1263# CONFIG_USB_C67X00_HCD is not set
1248CONFIG_USB_EHCI_HCD=y 1264CONFIG_USB_EHCI_HCD=y
1249# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1265# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1250# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1266# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1251# CONFIG_USB_EHCI_HCD_PPC_OF is not set 1267# CONFIG_USB_EHCI_HCD_PPC_OF is not set
1252# CONFIG_USB_ISP116X_HCD is not set 1268# CONFIG_USB_ISP116X_HCD is not set
1269# CONFIG_USB_ISP1760_HCD is not set
1253CONFIG_USB_OHCI_HCD=y 1270CONFIG_USB_OHCI_HCD=y
1254CONFIG_USB_OHCI_HCD_PPC_OF=y 1271CONFIG_USB_OHCI_HCD_PPC_OF=y
1255CONFIG_USB_OHCI_HCD_PPC_OF_BE=y 1272CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
@@ -1267,6 +1284,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1267# 1284#
1268CONFIG_USB_ACM=m 1285CONFIG_USB_ACM=m
1269CONFIG_USB_PRINTER=y 1286CONFIG_USB_PRINTER=y
1287# CONFIG_USB_WDM is not set
1270 1288
1271# 1289#
1272# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 1290# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -1288,6 +1306,7 @@ CONFIG_USB_STORAGE_JUMPSHOT=y
1288# CONFIG_USB_STORAGE_ALAUDA is not set 1306# CONFIG_USB_STORAGE_ALAUDA is not set
1289# CONFIG_USB_STORAGE_ONETOUCH is not set 1307# CONFIG_USB_STORAGE_ONETOUCH is not set
1290# CONFIG_USB_STORAGE_KARMA is not set 1308# CONFIG_USB_STORAGE_KARMA is not set
1309# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1291# CONFIG_USB_LIBUSUAL is not set 1310# CONFIG_USB_LIBUSUAL is not set
1292 1311
1293# 1312#
@@ -1342,9 +1361,11 @@ CONFIG_USB_SERIAL_KOBIL_SCT=m
1342CONFIG_USB_SERIAL_MCT_U232=m 1361CONFIG_USB_SERIAL_MCT_U232=m
1343# CONFIG_USB_SERIAL_MOS7720 is not set 1362# CONFIG_USB_SERIAL_MOS7720 is not set
1344# CONFIG_USB_SERIAL_MOS7840 is not set 1363# CONFIG_USB_SERIAL_MOS7840 is not set
1364# CONFIG_USB_SERIAL_MOTOROLA is not set
1345# CONFIG_USB_SERIAL_NAVMAN is not set 1365# CONFIG_USB_SERIAL_NAVMAN is not set
1346CONFIG_USB_SERIAL_PL2303=m 1366CONFIG_USB_SERIAL_PL2303=m
1347# CONFIG_USB_SERIAL_OTI6858 is not set 1367# CONFIG_USB_SERIAL_OTI6858 is not set
1368# CONFIG_USB_SERIAL_SPCP8X5 is not set
1348# CONFIG_USB_SERIAL_HP4X is not set 1369# CONFIG_USB_SERIAL_HP4X is not set
1349CONFIG_USB_SERIAL_SAFE=m 1370CONFIG_USB_SERIAL_SAFE=m
1350CONFIG_USB_SERIAL_SAFE_PADDED=y 1371CONFIG_USB_SERIAL_SAFE_PADDED=y
@@ -1379,18 +1400,16 @@ CONFIG_USB_APPLEDISPLAY=m
1379# CONFIG_USB_TRANCEVIBRATOR is not set 1400# CONFIG_USB_TRANCEVIBRATOR is not set
1380# CONFIG_USB_IOWARRIOR is not set 1401# CONFIG_USB_IOWARRIOR is not set
1381# CONFIG_USB_TEST is not set 1402# CONFIG_USB_TEST is not set
1403# CONFIG_USB_ISIGHTFW is not set
1382# CONFIG_USB_GADGET is not set 1404# CONFIG_USB_GADGET is not set
1383# CONFIG_MMC is not set 1405# CONFIG_MMC is not set
1384# CONFIG_MEMSTICK is not set 1406# CONFIG_MEMSTICK is not set
1385# CONFIG_NEW_LEDS is not set 1407# CONFIG_NEW_LEDS is not set
1408# CONFIG_ACCESSIBILITY is not set
1386# CONFIG_INFINIBAND is not set 1409# CONFIG_INFINIBAND is not set
1387# CONFIG_EDAC is not set 1410# CONFIG_EDAC is not set
1388# CONFIG_RTC_CLASS is not set 1411# CONFIG_RTC_CLASS is not set
1389# CONFIG_DMADEVICES is not set 1412# CONFIG_DMADEVICES is not set
1390
1391#
1392# Userspace I/O
1393#
1394# CONFIG_UIO is not set 1413# CONFIG_UIO is not set
1395 1414
1396# 1415#
@@ -1420,9 +1439,9 @@ CONFIG_REISERFS_FS_SECURITY=y
1420CONFIG_FS_POSIX_ACL=y 1439CONFIG_FS_POSIX_ACL=y
1421CONFIG_XFS_FS=m 1440CONFIG_XFS_FS=m
1422# CONFIG_XFS_QUOTA is not set 1441# CONFIG_XFS_QUOTA is not set
1423CONFIG_XFS_SECURITY=y
1424CONFIG_XFS_POSIX_ACL=y 1442CONFIG_XFS_POSIX_ACL=y
1425# CONFIG_XFS_RT is not set 1443# CONFIG_XFS_RT is not set
1444# CONFIG_XFS_DEBUG is not set
1426# CONFIG_GFS2_FS is not set 1445# CONFIG_GFS2_FS is not set
1427# CONFIG_OCFS2_FS is not set 1446# CONFIG_OCFS2_FS is not set
1428CONFIG_DNOTIFY=y 1447CONFIG_DNOTIFY=y
@@ -1488,13 +1507,11 @@ CONFIG_NFS_FS=y
1488CONFIG_NFS_V3=y 1507CONFIG_NFS_V3=y
1489CONFIG_NFS_V3_ACL=y 1508CONFIG_NFS_V3_ACL=y
1490CONFIG_NFS_V4=y 1509CONFIG_NFS_V4=y
1491# CONFIG_NFS_DIRECTIO is not set
1492CONFIG_NFSD=y 1510CONFIG_NFSD=y
1493CONFIG_NFSD_V2_ACL=y 1511CONFIG_NFSD_V2_ACL=y
1494CONFIG_NFSD_V3=y 1512CONFIG_NFSD_V3=y
1495CONFIG_NFSD_V3_ACL=y 1513CONFIG_NFSD_V3_ACL=y
1496CONFIG_NFSD_V4=y 1514CONFIG_NFSD_V4=y
1497CONFIG_NFSD_TCP=y
1498CONFIG_LOCKD=y 1515CONFIG_LOCKD=y
1499CONFIG_LOCKD_V4=y 1516CONFIG_LOCKD_V4=y
1500CONFIG_EXPORTFS=y 1517CONFIG_EXPORTFS=y
@@ -1583,9 +1600,10 @@ CONFIG_NLS_UTF8=y
1583# Library routines 1600# Library routines
1584# 1601#
1585CONFIG_BITREVERSE=y 1602CONFIG_BITREVERSE=y
1603# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1586CONFIG_CRC_CCITT=m 1604CONFIG_CRC_CCITT=m
1587# CONFIG_CRC16 is not set 1605# CONFIG_CRC16 is not set
1588# CONFIG_CRC_ITU_T is not set 1606CONFIG_CRC_ITU_T=m
1589CONFIG_CRC32=y 1607CONFIG_CRC32=y
1590# CONFIG_CRC7 is not set 1608# CONFIG_CRC7 is not set
1591CONFIG_LIBCRC32C=m 1609CONFIG_LIBCRC32C=m
@@ -1603,6 +1621,7 @@ CONFIG_HAVE_LMB=y
1603# CONFIG_PRINTK_TIME is not set 1621# CONFIG_PRINTK_TIME is not set
1604CONFIG_ENABLE_WARN_DEPRECATED=y 1622CONFIG_ENABLE_WARN_DEPRECATED=y
1605CONFIG_ENABLE_MUST_CHECK=y 1623CONFIG_ENABLE_MUST_CHECK=y
1624CONFIG_FRAME_WARN=2048
1606CONFIG_MAGIC_SYSRQ=y 1625CONFIG_MAGIC_SYSRQ=y
1607# CONFIG_UNUSED_SYMBOLS is not set 1626# CONFIG_UNUSED_SYMBOLS is not set
1608CONFIG_DEBUG_FS=y 1627CONFIG_DEBUG_FS=y
@@ -1613,18 +1632,23 @@ CONFIG_DETECT_SOFTLOCKUP=y
1613CONFIG_SCHED_DEBUG=y 1632CONFIG_SCHED_DEBUG=y
1614# CONFIG_SCHEDSTATS is not set 1633# CONFIG_SCHEDSTATS is not set
1615# CONFIG_TIMER_STATS is not set 1634# CONFIG_TIMER_STATS is not set
1635# CONFIG_DEBUG_OBJECTS is not set
1616# CONFIG_SLUB_DEBUG_ON is not set 1636# CONFIG_SLUB_DEBUG_ON is not set
1617# CONFIG_SLUB_STATS is not set 1637# CONFIG_SLUB_STATS is not set
1618# CONFIG_DEBUG_RT_MUTEXES is not set 1638# CONFIG_DEBUG_RT_MUTEXES is not set
1619# CONFIG_RT_MUTEX_TESTER is not set 1639# CONFIG_RT_MUTEX_TESTER is not set
1620# CONFIG_DEBUG_SPINLOCK is not set 1640# CONFIG_DEBUG_SPINLOCK is not set
1621CONFIG_DEBUG_MUTEXES=y 1641CONFIG_DEBUG_MUTEXES=y
1642# CONFIG_DEBUG_LOCK_ALLOC is not set
1643# CONFIG_PROVE_LOCKING is not set
1644# CONFIG_LOCK_STAT is not set
1622# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1645# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1623# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1646# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1624# CONFIG_DEBUG_KOBJECT is not set 1647# CONFIG_DEBUG_KOBJECT is not set
1625CONFIG_DEBUG_BUGVERBOSE=y 1648CONFIG_DEBUG_BUGVERBOSE=y
1626# CONFIG_DEBUG_INFO is not set 1649# CONFIG_DEBUG_INFO is not set
1627# CONFIG_DEBUG_VM is not set 1650# CONFIG_DEBUG_VM is not set
1651# CONFIG_DEBUG_WRITECOUNT is not set
1628# CONFIG_DEBUG_LIST is not set 1652# CONFIG_DEBUG_LIST is not set
1629# CONFIG_DEBUG_SG is not set 1653# CONFIG_DEBUG_SG is not set
1630# CONFIG_BOOT_PRINTK_DELAY is not set 1654# CONFIG_BOOT_PRINTK_DELAY is not set
@@ -1648,53 +1672,83 @@ CONFIG_BOOTX_TEXT=y
1648# CONFIG_SECURITY is not set 1672# CONFIG_SECURITY is not set
1649# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1673# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1650CONFIG_CRYPTO=y 1674CONFIG_CRYPTO=y
1675
1676#
1677# Crypto core or helper
1678#
1651CONFIG_CRYPTO_ALGAPI=y 1679CONFIG_CRYPTO_ALGAPI=y
1652CONFIG_CRYPTO_AEAD=m 1680CONFIG_CRYPTO_AEAD=m
1653CONFIG_CRYPTO_BLKCIPHER=y 1681CONFIG_CRYPTO_BLKCIPHER=y
1654# CONFIG_CRYPTO_SEQIV is not set
1655CONFIG_CRYPTO_HASH=y 1682CONFIG_CRYPTO_HASH=y
1656CONFIG_CRYPTO_MANAGER=y 1683CONFIG_CRYPTO_MANAGER=y
1684# CONFIG_CRYPTO_GF128MUL is not set
1685CONFIG_CRYPTO_NULL=m
1686# CONFIG_CRYPTO_CRYPTD is not set
1687CONFIG_CRYPTO_AUTHENC=m
1688CONFIG_CRYPTO_TEST=m
1689
1690#
1691# Authenticated Encryption with Associated Data
1692#
1693# CONFIG_CRYPTO_CCM is not set
1694# CONFIG_CRYPTO_GCM is not set
1695# CONFIG_CRYPTO_SEQIV is not set
1696
1697#
1698# Block modes
1699#
1700CONFIG_CRYPTO_CBC=y
1701# CONFIG_CRYPTO_CTR is not set
1702# CONFIG_CRYPTO_CTS is not set
1703CONFIG_CRYPTO_ECB=m
1704# CONFIG_CRYPTO_LRW is not set
1705CONFIG_CRYPTO_PCBC=m
1706# CONFIG_CRYPTO_XTS is not set
1707
1708#
1709# Hash modes
1710#
1657CONFIG_CRYPTO_HMAC=y 1711CONFIG_CRYPTO_HMAC=y
1658# CONFIG_CRYPTO_XCBC is not set 1712# CONFIG_CRYPTO_XCBC is not set
1659CONFIG_CRYPTO_NULL=m 1713
1714#
1715# Digest
1716#
1717CONFIG_CRYPTO_CRC32C=m
1660CONFIG_CRYPTO_MD4=m 1718CONFIG_CRYPTO_MD4=m
1661CONFIG_CRYPTO_MD5=y 1719CONFIG_CRYPTO_MD5=y
1720CONFIG_CRYPTO_MICHAEL_MIC=m
1662CONFIG_CRYPTO_SHA1=m 1721CONFIG_CRYPTO_SHA1=m
1663CONFIG_CRYPTO_SHA256=m 1722CONFIG_CRYPTO_SHA256=m
1664CONFIG_CRYPTO_SHA512=m 1723CONFIG_CRYPTO_SHA512=m
1665CONFIG_CRYPTO_WP512=m
1666# CONFIG_CRYPTO_TGR192 is not set 1724# CONFIG_CRYPTO_TGR192 is not set
1667# CONFIG_CRYPTO_GF128MUL is not set 1725CONFIG_CRYPTO_WP512=m
1668CONFIG_CRYPTO_ECB=m 1726
1669CONFIG_CRYPTO_CBC=y 1727#
1670CONFIG_CRYPTO_PCBC=m 1728# Ciphers
1671# CONFIG_CRYPTO_LRW is not set 1729#
1672# CONFIG_CRYPTO_XTS is not set
1673# CONFIG_CRYPTO_CTR is not set
1674# CONFIG_CRYPTO_GCM is not set
1675# CONFIG_CRYPTO_CCM is not set
1676# CONFIG_CRYPTO_CRYPTD is not set
1677CONFIG_CRYPTO_DES=y
1678# CONFIG_CRYPTO_FCRYPT is not set
1679CONFIG_CRYPTO_BLOWFISH=m
1680CONFIG_CRYPTO_TWOFISH=m
1681CONFIG_CRYPTO_TWOFISH_COMMON=m
1682CONFIG_CRYPTO_SERPENT=m
1683CONFIG_CRYPTO_AES=m 1730CONFIG_CRYPTO_AES=m
1731CONFIG_CRYPTO_ANUBIS=m
1732CONFIG_CRYPTO_ARC4=m
1733CONFIG_CRYPTO_BLOWFISH=m
1734# CONFIG_CRYPTO_CAMELLIA is not set
1684CONFIG_CRYPTO_CAST5=m 1735CONFIG_CRYPTO_CAST5=m
1685CONFIG_CRYPTO_CAST6=m 1736CONFIG_CRYPTO_CAST6=m
1686CONFIG_CRYPTO_TEA=m 1737CONFIG_CRYPTO_DES=y
1687CONFIG_CRYPTO_ARC4=m 1738# CONFIG_CRYPTO_FCRYPT is not set
1688CONFIG_CRYPTO_KHAZAD=m 1739CONFIG_CRYPTO_KHAZAD=m
1689CONFIG_CRYPTO_ANUBIS=m
1690# CONFIG_CRYPTO_SEED is not set
1691# CONFIG_CRYPTO_SALSA20 is not set 1740# CONFIG_CRYPTO_SALSA20 is not set
1741# CONFIG_CRYPTO_SEED is not set
1742CONFIG_CRYPTO_SERPENT=m
1743CONFIG_CRYPTO_TEA=m
1744CONFIG_CRYPTO_TWOFISH=m
1745CONFIG_CRYPTO_TWOFISH_COMMON=m
1746
1747#
1748# Compression
1749#
1692CONFIG_CRYPTO_DEFLATE=m 1750CONFIG_CRYPTO_DEFLATE=m
1693CONFIG_CRYPTO_MICHAEL_MIC=m
1694CONFIG_CRYPTO_CRC32C=m
1695# CONFIG_CRYPTO_CAMELLIA is not set
1696CONFIG_CRYPTO_TEST=m
1697CONFIG_CRYPTO_AUTHENC=m
1698# CONFIG_CRYPTO_LZO is not set 1751# CONFIG_CRYPTO_LZO is not set
1699# CONFIG_CRYPTO_HW is not set 1752# CONFIG_CRYPTO_HW is not set
1700# CONFIG_PPC_CLOCK is not set 1753# CONFIG_PPC_CLOCK is not set
1754# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/iseries_defconfig b/arch/powerpc/configs/iseries_defconfig
index b3128fb7ce7e..63f0bdb6340d 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.25-rc6 3# Linux kernel version: 2.6.26-rc3
4# Thu Mar 27 13:55:45 2008 4# Tue May 20 20:01:36 2008
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7 7
@@ -30,6 +30,9 @@ CONFIG_GENERIC_CLOCKEVENTS=y
30CONFIG_GENERIC_HARDIRQS=y 30CONFIG_GENERIC_HARDIRQS=y
31CONFIG_HAVE_SETUP_PER_CPU_AREA=y 31CONFIG_HAVE_SETUP_PER_CPU_AREA=y
32CONFIG_IRQ_PER_CPU=y 32CONFIG_IRQ_PER_CPU=y
33CONFIG_STACKTRACE_SUPPORT=y
34CONFIG_TRACE_IRQFLAGS_SUPPORT=y
35CONFIG_LOCKDEP_SUPPORT=y
33CONFIG_RWSEM_XCHGADD_ALGORITHM=y 36CONFIG_RWSEM_XCHGADD_ALGORITHM=y
34CONFIG_ARCH_HAS_ILOG2_U32=y 37CONFIG_ARCH_HAS_ILOG2_U32=y
35CONFIG_ARCH_HAS_ILOG2_U64=y 38CONFIG_ARCH_HAS_ILOG2_U64=y
@@ -91,6 +94,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
91CONFIG_SYSCTL=y 94CONFIG_SYSCTL=y
92# CONFIG_EMBEDDED is not set 95# CONFIG_EMBEDDED is not set
93CONFIG_SYSCTL_SYSCALL=y 96CONFIG_SYSCTL_SYSCALL=y
97CONFIG_SYSCTL_SYSCALL_CHECK=y
94CONFIG_KALLSYMS=y 98CONFIG_KALLSYMS=y
95# CONFIG_KALLSYMS_ALL is not set 99# CONFIG_KALLSYMS_ALL is not set
96# CONFIG_KALLSYMS_EXTRA_PASS is not set 100# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -118,12 +122,14 @@ CONFIG_HAVE_OPROFILE=y
118# CONFIG_KPROBES is not set 122# CONFIG_KPROBES is not set
119CONFIG_HAVE_KPROBES=y 123CONFIG_HAVE_KPROBES=y
120CONFIG_HAVE_KRETPROBES=y 124CONFIG_HAVE_KRETPROBES=y
125# CONFIG_HAVE_DMA_ATTRS is not set
121CONFIG_PROC_PAGE_MONITOR=y 126CONFIG_PROC_PAGE_MONITOR=y
122CONFIG_SLABINFO=y 127CONFIG_SLABINFO=y
123CONFIG_RT_MUTEXES=y 128CONFIG_RT_MUTEXES=y
124# CONFIG_TINY_SHMEM is not set 129# CONFIG_TINY_SHMEM is not set
125CONFIG_BASE_SMALL=0 130CONFIG_BASE_SMALL=0
126CONFIG_MODULES=y 131CONFIG_MODULES=y
132# CONFIG_MODULE_FORCE_LOAD is not set
127CONFIG_MODULE_UNLOAD=y 133CONFIG_MODULE_UNLOAD=y
128# CONFIG_MODULE_FORCE_UNLOAD is not set 134# CONFIG_MODULE_FORCE_UNLOAD is not set
129CONFIG_MODVERSIONS=y 135CONFIG_MODVERSIONS=y
@@ -172,11 +178,11 @@ CONFIG_VIOPATH=y
172# CONFIG_PPC_PMAC is not set 178# CONFIG_PPC_PMAC is not set
173# CONFIG_PPC_MAPLE is not set 179# CONFIG_PPC_MAPLE is not set
174# CONFIG_PPC_PASEMI is not set 180# CONFIG_PPC_PASEMI is not set
175# CONFIG_PPC_CELLEB is not set
176# CONFIG_PPC_PS3 is not set 181# CONFIG_PPC_PS3 is not set
177# CONFIG_PPC_CELL is not set 182# CONFIG_PPC_CELL is not set
178# CONFIG_PPC_CELL_NATIVE is not set 183# CONFIG_PPC_CELL_NATIVE is not set
179# CONFIG_PPC_IBM_CELL_BLADE is not set 184# CONFIG_PPC_IBM_CELL_BLADE is not set
185# CONFIG_PPC_CELLEB is not set
180# CONFIG_PQ2ADS is not set 186# CONFIG_PQ2ADS is not set
181# CONFIG_IPIC is not set 187# CONFIG_IPIC is not set
182# CONFIG_MPIC is not set 188# CONFIG_MPIC is not set
@@ -212,7 +218,6 @@ CONFIG_PREEMPT_NONE=y
212CONFIG_BINFMT_ELF=y 218CONFIG_BINFMT_ELF=y
213CONFIG_COMPAT_BINFMT_ELF=y 219CONFIG_COMPAT_BINFMT_ELF=y
214# CONFIG_BINFMT_MISC is not set 220# CONFIG_BINFMT_MISC is not set
215CONFIG_FORCE_MAX_ZONEORDER=13
216CONFIG_IOMMU_VMERGE=y 221CONFIG_IOMMU_VMERGE=y
217CONFIG_IOMMU_HELPER=y 222CONFIG_IOMMU_HELPER=y
218CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 223CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
@@ -234,12 +239,14 @@ CONFIG_FLATMEM=y
234CONFIG_FLAT_NODE_MEM_MAP=y 239CONFIG_FLAT_NODE_MEM_MAP=y
235# CONFIG_SPARSEMEM_STATIC is not set 240# CONFIG_SPARSEMEM_STATIC is not set
236CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y 241CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
242CONFIG_PAGEFLAGS_EXTENDED=y
237CONFIG_SPLIT_PTLOCK_CPUS=4 243CONFIG_SPLIT_PTLOCK_CPUS=4
238CONFIG_RESOURCES_64BIT=y 244CONFIG_RESOURCES_64BIT=y
239CONFIG_ZONE_DMA_FLAG=1 245CONFIG_ZONE_DMA_FLAG=1
240CONFIG_BOUNCE=y 246CONFIG_BOUNCE=y
241# CONFIG_PPC_HAS_HASH_64K is not set 247# CONFIG_PPC_HAS_HASH_64K is not set
242# CONFIG_PPC_64K_PAGES is not set 248# CONFIG_PPC_64K_PAGES is not set
249CONFIG_FORCE_MAX_ZONEORDER=13
243# CONFIG_SCHED_SMT is not set 250# CONFIG_SCHED_SMT is not set
244CONFIG_PROC_DEVICETREE=y 251CONFIG_PROC_DEVICETREE=y
245# CONFIG_CMDLINE_BOOL is not set 252# CONFIG_CMDLINE_BOOL is not set
@@ -263,7 +270,10 @@ CONFIG_ARCH_SUPPORTS_MSI=y
263# CONFIG_PCI_DEBUG is not set 270# CONFIG_PCI_DEBUG is not set
264# CONFIG_PCCARD is not set 271# CONFIG_PCCARD is not set
265# CONFIG_HOTPLUG_PCI is not set 272# CONFIG_HOTPLUG_PCI is not set
273# CONFIG_HAS_RAPIDIO is not set
274CONFIG_PAGE_OFFSET=0xc000000000000000
266CONFIG_KERNEL_START=0xc000000000000000 275CONFIG_KERNEL_START=0xc000000000000000
276CONFIG_PHYSICAL_START=0x00000000
267 277
268# 278#
269# Networking 279# Networking
@@ -310,8 +320,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
310# CONFIG_TCP_MD5SIG is not set 320# CONFIG_TCP_MD5SIG is not set
311# CONFIG_IP_VS is not set 321# CONFIG_IP_VS is not set
312# CONFIG_IPV6 is not set 322# CONFIG_IPV6 is not set
313# CONFIG_INET6_XFRM_TUNNEL is not set
314# CONFIG_INET6_TUNNEL is not set
315# CONFIG_NETWORK_SECMARK is not set 323# CONFIG_NETWORK_SECMARK is not set
316CONFIG_NETFILTER=y 324CONFIG_NETFILTER=y
317# CONFIG_NETFILTER_DEBUG is not set 325# CONFIG_NETFILTER_DEBUG is not set
@@ -327,6 +335,7 @@ CONFIG_NF_CONNTRACK=m
327# CONFIG_NF_CT_ACCT is not set 335# CONFIG_NF_CT_ACCT is not set
328CONFIG_NF_CONNTRACK_MARK=y 336CONFIG_NF_CONNTRACK_MARK=y
329CONFIG_NF_CONNTRACK_EVENTS=y 337CONFIG_NF_CONNTRACK_EVENTS=y
338# CONFIG_NF_CT_PROTO_DCCP is not set
330# CONFIG_NF_CT_PROTO_SCTP is not set 339# CONFIG_NF_CT_PROTO_SCTP is not set
331# CONFIG_NF_CT_PROTO_UDPLITE is not set 340# CONFIG_NF_CT_PROTO_UDPLITE is not set
332# CONFIG_NF_CONNTRACK_AMANDA is not set 341# CONFIG_NF_CONNTRACK_AMANDA is not set
@@ -631,7 +640,6 @@ CONFIG_MII=y
631# CONFIG_IBM_NEW_EMAC_EMAC4 is not set 640# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
632CONFIG_NET_PCI=y 641CONFIG_NET_PCI=y
633CONFIG_PCNET32=y 642CONFIG_PCNET32=y
634CONFIG_PCNET32_NAPI=y
635# CONFIG_AMD8111_ETH is not set 643# CONFIG_AMD8111_ETH is not set
636# CONFIG_ADAPTEC_STARFIRE is not set 644# CONFIG_ADAPTEC_STARFIRE is not set
637# CONFIG_B44 is not set 645# CONFIG_B44 is not set
@@ -667,7 +675,6 @@ CONFIG_E1000=m
667# CONFIG_SIS190 is not set 675# CONFIG_SIS190 is not set
668# CONFIG_SKGE is not set 676# CONFIG_SKGE is not set
669# CONFIG_SKY2 is not set 677# CONFIG_SKY2 is not set
670# CONFIG_SK98LIN is not set
671# CONFIG_VIA_VELOCITY is not set 678# CONFIG_VIA_VELOCITY is not set
672# CONFIG_TIGON3 is not set 679# CONFIG_TIGON3 is not set
673# CONFIG_BNX2 is not set 680# CONFIG_BNX2 is not set
@@ -682,10 +689,10 @@ CONFIG_NETDEV_10000=y
682# CONFIG_MYRI10GE is not set 689# CONFIG_MYRI10GE is not set
683# CONFIG_NETXEN_NIC is not set 690# CONFIG_NETXEN_NIC is not set
684# CONFIG_NIU is not set 691# CONFIG_NIU is not set
685# CONFIG_PASEMI_MAC is not set
686# CONFIG_MLX4_CORE is not set 692# CONFIG_MLX4_CORE is not set
687# CONFIG_TEHUTI is not set 693# CONFIG_TEHUTI is not set
688# CONFIG_BNX2X is not set 694# CONFIG_BNX2X is not set
695# CONFIG_SFC is not set
689CONFIG_TR=y 696CONFIG_TR=y
690CONFIG_IBMOL=y 697CONFIG_IBMOL=y
691# CONFIG_3C359 is not set 698# CONFIG_3C359 is not set
@@ -696,6 +703,7 @@ CONFIG_IBMOL=y
696# 703#
697# CONFIG_WLAN_PRE80211 is not set 704# CONFIG_WLAN_PRE80211 is not set
698# CONFIG_WLAN_80211 is not set 705# CONFIG_WLAN_80211 is not set
706# CONFIG_IWLWIFI_LEDS is not set
699# CONFIG_WAN is not set 707# CONFIG_WAN is not set
700CONFIG_ISERIES_VETH=y 708CONFIG_ISERIES_VETH=y
701# CONFIG_FDDI is not set 709# CONFIG_FDDI is not set
@@ -762,6 +770,7 @@ CONFIG_VT=y
762CONFIG_VT_CONSOLE=y 770CONFIG_VT_CONSOLE=y
763CONFIG_HW_CONSOLE=y 771CONFIG_HW_CONSOLE=y
764# CONFIG_VT_HW_CONSOLE_BINDING is not set 772# CONFIG_VT_HW_CONSOLE_BINDING is not set
773CONFIG_DEVKMEM=y
765# CONFIG_SERIAL_NONSTANDARD is not set 774# CONFIG_SERIAL_NONSTANDARD is not set
766# CONFIG_NOZOMI is not set 775# CONFIG_NOZOMI is not set
767 776
@@ -793,12 +802,7 @@ CONFIG_MAX_RAW_DEVS=256
793# CONFIG_TCG_TPM is not set 802# CONFIG_TCG_TPM is not set
794CONFIG_DEVPORT=y 803CONFIG_DEVPORT=y
795# CONFIG_I2C is not set 804# CONFIG_I2C is not set
796
797#
798# SPI support
799#
800# CONFIG_SPI is not set 805# CONFIG_SPI is not set
801# CONFIG_SPI_MASTER is not set
802# CONFIG_W1 is not set 806# CONFIG_W1 is not set
803# CONFIG_POWER_SUPPLY is not set 807# CONFIG_POWER_SUPPLY is not set
804# CONFIG_HWMON is not set 808# CONFIG_HWMON is not set
@@ -815,12 +819,22 @@ CONFIG_SSB_POSSIBLE=y
815# Multifunction device drivers 819# Multifunction device drivers
816# 820#
817# CONFIG_MFD_SM501 is not set 821# CONFIG_MFD_SM501 is not set
822# CONFIG_HTC_PASIC3 is not set
818 823
819# 824#
820# Multimedia devices 825# Multimedia devices
821# 826#
827
828#
829# Multimedia core support
830#
822# CONFIG_VIDEO_DEV is not set 831# CONFIG_VIDEO_DEV is not set
823# CONFIG_DVB_CORE is not set 832# CONFIG_DVB_CORE is not set
833# CONFIG_VIDEO_MEDIA is not set
834
835#
836# Multimedia drivers
837#
824# CONFIG_DAB is not set 838# CONFIG_DAB is not set
825 839
826# 840#
@@ -854,14 +868,11 @@ CONFIG_DUMMY_CONSOLE=y
854# CONFIG_MMC is not set 868# CONFIG_MMC is not set
855# CONFIG_MEMSTICK is not set 869# CONFIG_MEMSTICK is not set
856# CONFIG_NEW_LEDS is not set 870# CONFIG_NEW_LEDS is not set
871# CONFIG_ACCESSIBILITY is not set
857# CONFIG_INFINIBAND is not set 872# CONFIG_INFINIBAND is not set
858# CONFIG_EDAC is not set 873# CONFIG_EDAC is not set
859# CONFIG_RTC_CLASS is not set 874# CONFIG_RTC_CLASS is not set
860# CONFIG_DMADEVICES is not set 875# CONFIG_DMADEVICES is not set
861
862#
863# Userspace I/O
864#
865# CONFIG_UIO is not set 876# CONFIG_UIO is not set
866 877
867# 878#
@@ -895,9 +906,9 @@ CONFIG_JFS_SECURITY=y
895CONFIG_FS_POSIX_ACL=y 906CONFIG_FS_POSIX_ACL=y
896CONFIG_XFS_FS=m 907CONFIG_XFS_FS=m
897# CONFIG_XFS_QUOTA is not set 908# CONFIG_XFS_QUOTA is not set
898CONFIG_XFS_SECURITY=y
899CONFIG_XFS_POSIX_ACL=y 909CONFIG_XFS_POSIX_ACL=y
900# CONFIG_XFS_RT is not set 910# CONFIG_XFS_RT is not set
911# CONFIG_XFS_DEBUG is not set
901CONFIG_GFS2_FS=m 912CONFIG_GFS2_FS=m
902CONFIG_GFS2_FS_LOCKING_NOLOCK=m 913CONFIG_GFS2_FS_LOCKING_NOLOCK=m
903CONFIG_GFS2_FS_LOCKING_DLM=m 914CONFIG_GFS2_FS_LOCKING_DLM=m
@@ -966,13 +977,11 @@ CONFIG_NFS_FS=y
966CONFIG_NFS_V3=y 977CONFIG_NFS_V3=y
967CONFIG_NFS_V3_ACL=y 978CONFIG_NFS_V3_ACL=y
968CONFIG_NFS_V4=y 979CONFIG_NFS_V4=y
969# CONFIG_NFS_DIRECTIO is not set
970CONFIG_NFSD=m 980CONFIG_NFSD=m
971CONFIG_NFSD_V2_ACL=y 981CONFIG_NFSD_V2_ACL=y
972CONFIG_NFSD_V3=y 982CONFIG_NFSD_V3=y
973CONFIG_NFSD_V3_ACL=y 983CONFIG_NFSD_V3_ACL=y
974CONFIG_NFSD_V4=y 984CONFIG_NFSD_V4=y
975CONFIG_NFSD_TCP=y
976CONFIG_LOCKD=y 985CONFIG_LOCKD=y
977CONFIG_LOCKD_V4=y 986CONFIG_LOCKD_V4=y
978CONFIG_EXPORTFS=m 987CONFIG_EXPORTFS=m
@@ -1047,9 +1056,10 @@ CONFIG_DLM=m
1047# Library routines 1056# Library routines
1048# 1057#
1049CONFIG_BITREVERSE=y 1058CONFIG_BITREVERSE=y
1059# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1050CONFIG_CRC_CCITT=m 1060CONFIG_CRC_CCITT=m
1051# CONFIG_CRC16 is not set 1061# CONFIG_CRC16 is not set
1052# CONFIG_CRC_ITU_T is not set 1062CONFIG_CRC_ITU_T=m
1053CONFIG_CRC32=y 1063CONFIG_CRC32=y
1054# CONFIG_CRC7 is not set 1064# CONFIG_CRC7 is not set
1055CONFIG_LIBCRC32C=m 1065CONFIG_LIBCRC32C=m
@@ -1071,6 +1081,7 @@ CONFIG_HAVE_LMB=y
1071# CONFIG_PRINTK_TIME is not set 1081# CONFIG_PRINTK_TIME is not set
1072CONFIG_ENABLE_WARN_DEPRECATED=y 1082CONFIG_ENABLE_WARN_DEPRECATED=y
1073CONFIG_ENABLE_MUST_CHECK=y 1083CONFIG_ENABLE_MUST_CHECK=y
1084CONFIG_FRAME_WARN=2048
1074CONFIG_MAGIC_SYSRQ=y 1085CONFIG_MAGIC_SYSRQ=y
1075# CONFIG_UNUSED_SYMBOLS is not set 1086# CONFIG_UNUSED_SYMBOLS is not set
1076CONFIG_DEBUG_FS=y 1087CONFIG_DEBUG_FS=y
@@ -1081,18 +1092,23 @@ CONFIG_DETECT_SOFTLOCKUP=y
1081CONFIG_SCHED_DEBUG=y 1092CONFIG_SCHED_DEBUG=y
1082# CONFIG_SCHEDSTATS is not set 1093# CONFIG_SCHEDSTATS is not set
1083# CONFIG_TIMER_STATS is not set 1094# CONFIG_TIMER_STATS is not set
1095# CONFIG_DEBUG_OBJECTS is not set
1084# CONFIG_SLUB_DEBUG_ON is not set 1096# CONFIG_SLUB_DEBUG_ON is not set
1085# CONFIG_SLUB_STATS is not set 1097# CONFIG_SLUB_STATS is not set
1086# CONFIG_DEBUG_RT_MUTEXES is not set 1098# CONFIG_DEBUG_RT_MUTEXES is not set
1087# CONFIG_RT_MUTEX_TESTER is not set 1099# CONFIG_RT_MUTEX_TESTER is not set
1088# CONFIG_DEBUG_SPINLOCK is not set 1100# CONFIG_DEBUG_SPINLOCK is not set
1089# CONFIG_DEBUG_MUTEXES is not set 1101# CONFIG_DEBUG_MUTEXES is not set
1102# CONFIG_DEBUG_LOCK_ALLOC is not set
1103# CONFIG_PROVE_LOCKING is not set
1104# CONFIG_LOCK_STAT is not set
1090# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1105# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1091# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1106# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1092# CONFIG_DEBUG_KOBJECT is not set 1107# CONFIG_DEBUG_KOBJECT is not set
1093CONFIG_DEBUG_BUGVERBOSE=y 1108CONFIG_DEBUG_BUGVERBOSE=y
1094# CONFIG_DEBUG_INFO is not set 1109# CONFIG_DEBUG_INFO is not set
1095# CONFIG_DEBUG_VM is not set 1110# CONFIG_DEBUG_VM is not set
1111# CONFIG_DEBUG_WRITECOUNT is not set
1096# CONFIG_DEBUG_LIST is not set 1112# CONFIG_DEBUG_LIST is not set
1097# CONFIG_DEBUG_SG is not set 1113# CONFIG_DEBUG_SG is not set
1098# CONFIG_BOOT_PRINTK_DELAY is not set 1114# CONFIG_BOOT_PRINTK_DELAY is not set
@@ -1116,53 +1132,83 @@ CONFIG_IRQSTACKS=y
1116# CONFIG_SECURITY is not set 1132# CONFIG_SECURITY is not set
1117# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1133# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1118CONFIG_CRYPTO=y 1134CONFIG_CRYPTO=y
1135
1136#
1137# Crypto core or helper
1138#
1119CONFIG_CRYPTO_ALGAPI=y 1139CONFIG_CRYPTO_ALGAPI=y
1120CONFIG_CRYPTO_AEAD=m 1140CONFIG_CRYPTO_AEAD=m
1121CONFIG_CRYPTO_BLKCIPHER=y 1141CONFIG_CRYPTO_BLKCIPHER=y
1122# CONFIG_CRYPTO_SEQIV is not set
1123CONFIG_CRYPTO_HASH=y 1142CONFIG_CRYPTO_HASH=y
1124CONFIG_CRYPTO_MANAGER=y 1143CONFIG_CRYPTO_MANAGER=y
1144# CONFIG_CRYPTO_GF128MUL is not set
1145CONFIG_CRYPTO_NULL=m
1146# CONFIG_CRYPTO_CRYPTD is not set
1147CONFIG_CRYPTO_AUTHENC=m
1148CONFIG_CRYPTO_TEST=m
1149
1150#
1151# Authenticated Encryption with Associated Data
1152#
1153# CONFIG_CRYPTO_CCM is not set
1154# CONFIG_CRYPTO_GCM is not set
1155# CONFIG_CRYPTO_SEQIV is not set
1156
1157#
1158# Block modes
1159#
1160CONFIG_CRYPTO_CBC=y
1161# CONFIG_CRYPTO_CTR is not set
1162# CONFIG_CRYPTO_CTS is not set
1163CONFIG_CRYPTO_ECB=m
1164# CONFIG_CRYPTO_LRW is not set
1165CONFIG_CRYPTO_PCBC=m
1166# CONFIG_CRYPTO_XTS is not set
1167
1168#
1169# Hash modes
1170#
1125CONFIG_CRYPTO_HMAC=y 1171CONFIG_CRYPTO_HMAC=y
1126# CONFIG_CRYPTO_XCBC is not set 1172# CONFIG_CRYPTO_XCBC is not set
1127CONFIG_CRYPTO_NULL=m 1173
1174#
1175# Digest
1176#
1177CONFIG_CRYPTO_CRC32C=m
1128CONFIG_CRYPTO_MD4=m 1178CONFIG_CRYPTO_MD4=m
1129CONFIG_CRYPTO_MD5=y 1179CONFIG_CRYPTO_MD5=y
1180CONFIG_CRYPTO_MICHAEL_MIC=m
1130CONFIG_CRYPTO_SHA1=m 1181CONFIG_CRYPTO_SHA1=m
1131CONFIG_CRYPTO_SHA256=m 1182CONFIG_CRYPTO_SHA256=m
1132CONFIG_CRYPTO_SHA512=m 1183CONFIG_CRYPTO_SHA512=m
1133CONFIG_CRYPTO_WP512=m
1134CONFIG_CRYPTO_TGR192=m 1184CONFIG_CRYPTO_TGR192=m
1135# CONFIG_CRYPTO_GF128MUL is not set 1185CONFIG_CRYPTO_WP512=m
1136CONFIG_CRYPTO_ECB=m 1186
1137CONFIG_CRYPTO_CBC=y 1187#
1138CONFIG_CRYPTO_PCBC=m 1188# Ciphers
1139# CONFIG_CRYPTO_LRW is not set 1189#
1140# CONFIG_CRYPTO_XTS is not set
1141# CONFIG_CRYPTO_CTR is not set
1142# CONFIG_CRYPTO_GCM is not set
1143# CONFIG_CRYPTO_CCM is not set
1144# CONFIG_CRYPTO_CRYPTD is not set
1145CONFIG_CRYPTO_DES=y
1146# CONFIG_CRYPTO_FCRYPT is not set
1147CONFIG_CRYPTO_BLOWFISH=m
1148CONFIG_CRYPTO_TWOFISH=m
1149CONFIG_CRYPTO_TWOFISH_COMMON=m
1150CONFIG_CRYPTO_SERPENT=m
1151CONFIG_CRYPTO_AES=m 1190CONFIG_CRYPTO_AES=m
1191CONFIG_CRYPTO_ANUBIS=m
1192CONFIG_CRYPTO_ARC4=m
1193CONFIG_CRYPTO_BLOWFISH=m
1194# CONFIG_CRYPTO_CAMELLIA is not set
1152CONFIG_CRYPTO_CAST5=m 1195CONFIG_CRYPTO_CAST5=m
1153CONFIG_CRYPTO_CAST6=m 1196CONFIG_CRYPTO_CAST6=m
1154CONFIG_CRYPTO_TEA=m 1197CONFIG_CRYPTO_DES=y
1155CONFIG_CRYPTO_ARC4=m 1198# CONFIG_CRYPTO_FCRYPT is not set
1156CONFIG_CRYPTO_KHAZAD=m 1199CONFIG_CRYPTO_KHAZAD=m
1157CONFIG_CRYPTO_ANUBIS=m
1158CONFIG_CRYPTO_SEED=m
1159# CONFIG_CRYPTO_SALSA20 is not set 1200# CONFIG_CRYPTO_SALSA20 is not set
1201CONFIG_CRYPTO_SEED=m
1202CONFIG_CRYPTO_SERPENT=m
1203CONFIG_CRYPTO_TEA=m
1204CONFIG_CRYPTO_TWOFISH=m
1205CONFIG_CRYPTO_TWOFISH_COMMON=m
1206
1207#
1208# Compression
1209#
1160CONFIG_CRYPTO_DEFLATE=m 1210CONFIG_CRYPTO_DEFLATE=m
1161CONFIG_CRYPTO_MICHAEL_MIC=m
1162CONFIG_CRYPTO_CRC32C=m
1163# CONFIG_CRYPTO_CAMELLIA is not set
1164CONFIG_CRYPTO_TEST=m
1165CONFIG_CRYPTO_AUTHENC=m
1166# CONFIG_CRYPTO_LZO is not set 1211# CONFIG_CRYPTO_LZO is not set
1167# CONFIG_CRYPTO_HW is not set 1212# CONFIG_CRYPTO_HW is not set
1168# CONFIG_PPC_CLOCK is not set 1213# CONFIG_PPC_CLOCK is not set
1214# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/linkstation_defconfig b/arch/powerpc/configs/linkstation_defconfig
index 22a943afc3c0..48434c2c7628 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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 24 08:48:10 2008 4# Mon Jun 9 08:52:10 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -31,6 +31,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y 31CONFIG_GENERIC_HARDIRQS=y
32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
33CONFIG_IRQ_PER_CPU=y 33CONFIG_IRQ_PER_CPU=y
34CONFIG_STACKTRACE_SUPPORT=y
35CONFIG_LOCKDEP_SUPPORT=y
34CONFIG_RWSEM_XCHGADD_ALGORITHM=y 36CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y 37CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y 38CONFIG_GENERIC_HWEIGHT=y
@@ -91,6 +93,7 @@ CONFIG_INITRAMFS_SOURCE=""
91CONFIG_SYSCTL=y 93CONFIG_SYSCTL=y
92# CONFIG_EMBEDDED is not set 94# CONFIG_EMBEDDED is not set
93CONFIG_SYSCTL_SYSCALL=y 95CONFIG_SYSCTL_SYSCALL=y
96CONFIG_SYSCTL_SYSCALL_CHECK=y
94CONFIG_KALLSYMS=y 97CONFIG_KALLSYMS=y
95# CONFIG_KALLSYMS_ALL is not set 98# CONFIG_KALLSYMS_ALL is not set
96# CONFIG_KALLSYMS_EXTRA_PASS is not set 99# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -118,12 +121,14 @@ CONFIG_HAVE_OPROFILE=y
118# CONFIG_KPROBES is not set 121# CONFIG_KPROBES is not set
119CONFIG_HAVE_KPROBES=y 122CONFIG_HAVE_KPROBES=y
120CONFIG_HAVE_KRETPROBES=y 123CONFIG_HAVE_KRETPROBES=y
124# CONFIG_HAVE_DMA_ATTRS is not set
121CONFIG_PROC_PAGE_MONITOR=y 125CONFIG_PROC_PAGE_MONITOR=y
122CONFIG_SLABINFO=y 126CONFIG_SLABINFO=y
123CONFIG_RT_MUTEXES=y 127CONFIG_RT_MUTEXES=y
124# CONFIG_TINY_SHMEM is not set 128# CONFIG_TINY_SHMEM is not set
125CONFIG_BASE_SMALL=0 129CONFIG_BASE_SMALL=0
126CONFIG_MODULES=y 130CONFIG_MODULES=y
131# CONFIG_MODULE_FORCE_LOAD is not set
127CONFIG_MODULE_UNLOAD=y 132CONFIG_MODULE_UNLOAD=y
128# CONFIG_MODULE_FORCE_UNLOAD is not set 133# CONFIG_MODULE_FORCE_UNLOAD is not set
129# CONFIG_MODVERSIONS is not set 134# CONFIG_MODVERSIONS is not set
@@ -223,11 +228,13 @@ CONFIG_FLATMEM=y
223CONFIG_FLAT_NODE_MEM_MAP=y 228CONFIG_FLAT_NODE_MEM_MAP=y
224# CONFIG_SPARSEMEM_STATIC is not set 229# CONFIG_SPARSEMEM_STATIC is not set
225# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 230# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
231CONFIG_PAGEFLAGS_EXTENDED=y
226CONFIG_SPLIT_PTLOCK_CPUS=4 232CONFIG_SPLIT_PTLOCK_CPUS=4
227# CONFIG_RESOURCES_64BIT is not set 233# CONFIG_RESOURCES_64BIT is not set
228CONFIG_ZONE_DMA_FLAG=1 234CONFIG_ZONE_DMA_FLAG=1
229CONFIG_BOUNCE=y 235CONFIG_BOUNCE=y
230CONFIG_VIRT_TO_BUS=y 236CONFIG_VIRT_TO_BUS=y
237CONFIG_FORCE_MAX_ZONEORDER=11
231CONFIG_PROC_DEVICETREE=y 238CONFIG_PROC_DEVICETREE=y
232# CONFIG_CMDLINE_BOOL is not set 239# CONFIG_CMDLINE_BOOL is not set
233# CONFIG_PM is not set 240# CONFIG_PM is not set
@@ -251,6 +258,7 @@ CONFIG_PCI_LEGACY=y
251# CONFIG_PCI_DEBUG is not set 258# CONFIG_PCI_DEBUG is not set
252# CONFIG_PCCARD is not set 259# CONFIG_PCCARD is not set
253# CONFIG_HOTPLUG_PCI is not set 260# CONFIG_HOTPLUG_PCI is not set
261# CONFIG_HAS_RAPIDIO is not set
254 262
255# 263#
256# Advanced setup 264# Advanced setup
@@ -260,11 +268,11 @@ CONFIG_PCI_LEGACY=y
260# 268#
261# Default settings for advanced configuration options are used 269# Default settings for advanced configuration options are used
262# 270#
263CONFIG_HIGHMEM_START=0xfe000000
264CONFIG_LOWMEM_SIZE=0x30000000 271CONFIG_LOWMEM_SIZE=0x30000000
272CONFIG_PAGE_OFFSET=0xc0000000
265CONFIG_KERNEL_START=0xc0000000 273CONFIG_KERNEL_START=0xc0000000
274CONFIG_PHYSICAL_START=0x00000000
266CONFIG_TASK_SIZE=0xc0000000 275CONFIG_TASK_SIZE=0xc0000000
267CONFIG_BOOT_LOAD=0x00800000
268 276
269# 277#
270# Networking 278# Networking
@@ -313,8 +321,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
313# CONFIG_TCP_MD5SIG is not set 321# CONFIG_TCP_MD5SIG is not set
314# CONFIG_IP_VS is not set 322# CONFIG_IP_VS is not set
315# CONFIG_IPV6 is not set 323# CONFIG_IPV6 is not set
316# CONFIG_INET6_XFRM_TUNNEL is not set
317# CONFIG_INET6_TUNNEL is not set
318# CONFIG_NETWORK_SECMARK is not set 324# CONFIG_NETWORK_SECMARK is not set
319CONFIG_NETFILTER=y 325CONFIG_NETFILTER=y
320# CONFIG_NETFILTER_DEBUG is not set 326# CONFIG_NETFILTER_DEBUG is not set
@@ -329,6 +335,7 @@ CONFIG_NF_CONNTRACK=m
329# CONFIG_NF_CT_ACCT is not set 335# CONFIG_NF_CT_ACCT is not set
330# CONFIG_NF_CONNTRACK_MARK is not set 336# CONFIG_NF_CONNTRACK_MARK is not set
331# CONFIG_NF_CONNTRACK_EVENTS is not set 337# CONFIG_NF_CONNTRACK_EVENTS is not set
338# CONFIG_NF_CT_PROTO_DCCP is not set
332CONFIG_NF_CT_PROTO_GRE=m 339CONFIG_NF_CT_PROTO_GRE=m
333CONFIG_NF_CT_PROTO_SCTP=m 340CONFIG_NF_CT_PROTO_SCTP=m
334# CONFIG_NF_CT_PROTO_UDPLITE is not set 341# CONFIG_NF_CT_PROTO_UDPLITE is not set
@@ -407,6 +414,7 @@ CONFIG_IP_NF_TARGET_REDIRECT=m
407# CONFIG_IP_NF_TARGET_NETMAP is not set 414# CONFIG_IP_NF_TARGET_NETMAP is not set
408# CONFIG_NF_NAT_SNMP_BASIC is not set 415# CONFIG_NF_NAT_SNMP_BASIC is not set
409CONFIG_NF_NAT_PROTO_GRE=m 416CONFIG_NF_NAT_PROTO_GRE=m
417CONFIG_NF_NAT_PROTO_SCTP=m
410CONFIG_NF_NAT_FTP=m 418CONFIG_NF_NAT_FTP=m
411CONFIG_NF_NAT_IRC=m 419CONFIG_NF_NAT_IRC=m
412CONFIG_NF_NAT_TFTP=m 420CONFIG_NF_NAT_TFTP=m
@@ -459,8 +467,6 @@ CONFIG_IEEE80211_DEBUG=y
459CONFIG_IEEE80211_CRYPT_WEP=m 467CONFIG_IEEE80211_CRYPT_WEP=m
460CONFIG_IEEE80211_CRYPT_CCMP=m 468CONFIG_IEEE80211_CRYPT_CCMP=m
461CONFIG_IEEE80211_CRYPT_TKIP=m 469CONFIG_IEEE80211_CRYPT_TKIP=m
462CONFIG_IEEE80211_SOFTMAC=m
463CONFIG_IEEE80211_SOFTMAC_DEBUG=y
464# CONFIG_RFKILL is not set 470# CONFIG_RFKILL is not set
465# CONFIG_NET_9P is not set 471# CONFIG_NET_9P is not set
466 472
@@ -486,6 +492,7 @@ CONFIG_MTD_PARTITIONS=y
486# CONFIG_MTD_REDBOOT_PARTS is not set 492# CONFIG_MTD_REDBOOT_PARTS is not set
487# CONFIG_MTD_CMDLINE_PARTS is not set 493# CONFIG_MTD_CMDLINE_PARTS is not set
488# CONFIG_MTD_OF_PARTS is not set 494# CONFIG_MTD_OF_PARTS is not set
495# CONFIG_MTD_AR7_PARTS is not set
489 496
490# 497#
491# User Modules And Translation Layers 498# User Modules And Translation Layers
@@ -565,6 +572,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=1
565# 572#
566# CONFIG_MTD_UBI is not set 573# CONFIG_MTD_UBI is not set
567CONFIG_OF_DEVICE=y 574CONFIG_OF_DEVICE=y
575CONFIG_OF_I2C=y
568# CONFIG_PARPORT is not set 576# CONFIG_PARPORT is not set
569CONFIG_BLK_DEV=y 577CONFIG_BLK_DEV=y
570# CONFIG_BLK_DEV_FD is not set 578# CONFIG_BLK_DEV_FD is not set
@@ -670,7 +678,11 @@ CONFIG_SCSI_LOWLEVEL=y
670# CONFIG_SCSI_SRP is not set 678# CONFIG_SCSI_SRP is not set
671CONFIG_ATA=y 679CONFIG_ATA=y
672# CONFIG_ATA_NONSTANDARD is not set 680# CONFIG_ATA_NONSTANDARD is not set
681CONFIG_SATA_PMP=y
673# CONFIG_SATA_AHCI is not set 682# CONFIG_SATA_AHCI is not set
683# CONFIG_SATA_SIL24 is not set
684# CONFIG_SATA_FSL is not set
685CONFIG_ATA_SFF=y
674# CONFIG_SATA_SVW is not set 686# CONFIG_SATA_SVW is not set
675# CONFIG_ATA_PIIX is not set 687# CONFIG_ATA_PIIX is not set
676# CONFIG_SATA_MV is not set 688# CONFIG_SATA_MV is not set
@@ -680,13 +692,11 @@ CONFIG_ATA=y
680# CONFIG_SATA_PROMISE is not set 692# CONFIG_SATA_PROMISE is not set
681# CONFIG_SATA_SX4 is not set 693# CONFIG_SATA_SX4 is not set
682# CONFIG_SATA_SIL is not set 694# CONFIG_SATA_SIL is not set
683# CONFIG_SATA_SIL24 is not set
684# CONFIG_SATA_SIS is not set 695# CONFIG_SATA_SIS is not set
685# CONFIG_SATA_ULI is not set 696# CONFIG_SATA_ULI is not set
686# CONFIG_SATA_VIA is not set 697# CONFIG_SATA_VIA is not set
687# CONFIG_SATA_VITESSE is not set 698# CONFIG_SATA_VITESSE is not set
688# CONFIG_SATA_INIC162X is not set 699# CONFIG_SATA_INIC162X is not set
689# CONFIG_SATA_FSL is not set
690# CONFIG_PATA_ALI is not set 700# CONFIG_PATA_ALI is not set
691# CONFIG_PATA_AMD is not set 701# CONFIG_PATA_AMD is not set
692# CONFIG_PATA_ARTOP is not set 702# CONFIG_PATA_ARTOP is not set
@@ -726,6 +736,7 @@ CONFIG_PATA_SIL680=y
726# CONFIG_PATA_VIA is not set 736# CONFIG_PATA_VIA is not set
727# CONFIG_PATA_WINBOND is not set 737# CONFIG_PATA_WINBOND is not set
728# CONFIG_PATA_PLATFORM is not set 738# CONFIG_PATA_PLATFORM is not set
739# CONFIG_PATA_SCH is not set
729# CONFIG_MD is not set 740# CONFIG_MD is not set
730# CONFIG_FUSION is not set 741# CONFIG_FUSION is not set
731 742
@@ -785,7 +796,6 @@ CONFIG_R8169=y
785# CONFIG_SIS190 is not set 796# CONFIG_SIS190 is not set
786# CONFIG_SKGE is not set 797# CONFIG_SKGE is not set
787# CONFIG_SKY2 is not set 798# CONFIG_SKY2 is not set
788# CONFIG_SK98LIN is not set
789# CONFIG_VIA_VELOCITY is not set 799# CONFIG_VIA_VELOCITY is not set
790# CONFIG_TIGON3 is not set 800# CONFIG_TIGON3 is not set
791# CONFIG_BNX2 is not set 801# CONFIG_BNX2 is not set
@@ -805,6 +815,7 @@ CONFIG_NETDEV_10000=y
805# CONFIG_MLX4_CORE is not set 815# CONFIG_MLX4_CORE is not set
806# CONFIG_TEHUTI is not set 816# CONFIG_TEHUTI is not set
807# CONFIG_BNX2X is not set 817# CONFIG_BNX2X is not set
818# CONFIG_SFC is not set
808# CONFIG_TR is not set 819# CONFIG_TR is not set
809 820
810# 821#
@@ -812,6 +823,7 @@ CONFIG_NETDEV_10000=y
812# 823#
813# CONFIG_WLAN_PRE80211 is not set 824# CONFIG_WLAN_PRE80211 is not set
814# CONFIG_WLAN_80211 is not set 825# CONFIG_WLAN_80211 is not set
826# CONFIG_IWLWIFI_LEDS is not set
815 827
816# 828#
817# USB Network Adapters 829# USB Network Adapters
@@ -886,6 +898,7 @@ CONFIG_VT=y
886CONFIG_VT_CONSOLE=y 898CONFIG_VT_CONSOLE=y
887CONFIG_HW_CONSOLE=y 899CONFIG_HW_CONSOLE=y
888# CONFIG_VT_HW_CONSOLE_BINDING is not set 900# CONFIG_VT_HW_CONSOLE_BINDING is not set
901CONFIG_DEVKMEM=y
889# CONFIG_SERIAL_NONSTANDARD is not set 902# CONFIG_SERIAL_NONSTANDARD is not set
890# CONFIG_NOZOMI is not set 903# CONFIG_NOZOMI is not set
891 904
@@ -913,7 +926,6 @@ CONFIG_LEGACY_PTY_COUNT=256
913# CONFIG_IPMI_HANDLER is not set 926# CONFIG_IPMI_HANDLER is not set
914CONFIG_HW_RANDOM=y 927CONFIG_HW_RANDOM=y
915# CONFIG_NVRAM is not set 928# CONFIG_NVRAM is not set
916# CONFIG_GEN_RTC is not set
917# CONFIG_R3964 is not set 929# CONFIG_R3964 is not set
918# CONFIG_APPLICOM is not set 930# CONFIG_APPLICOM is not set
919# CONFIG_RAW_DRIVER is not set 931# CONFIG_RAW_DRIVER is not set
@@ -924,13 +936,6 @@ CONFIG_I2C_BOARDINFO=y
924CONFIG_I2C_CHARDEV=y 936CONFIG_I2C_CHARDEV=y
925 937
926# 938#
927# I2C Algorithms
928#
929# CONFIG_I2C_ALGOBIT is not set
930# CONFIG_I2C_ALGOPCF is not set
931# CONFIG_I2C_ALGOPCA is not set
932
933#
934# I2C Hardware Bus support 939# I2C Hardware Bus support
935# 940#
936# CONFIG_I2C_ALI1535 is not set 941# CONFIG_I2C_ALI1535 is not set
@@ -957,6 +962,7 @@ CONFIG_I2C_MPC=y
957# CONFIG_I2C_VIA is not set 962# CONFIG_I2C_VIA is not set
958# CONFIG_I2C_VIAPRO is not set 963# CONFIG_I2C_VIAPRO is not set
959# CONFIG_I2C_VOODOO3 is not set 964# CONFIG_I2C_VOODOO3 is not set
965# CONFIG_I2C_PCA_PLATFORM is not set
960 966
961# 967#
962# Miscellaneous I2C Chip support 968# Miscellaneous I2C Chip support
@@ -966,19 +972,13 @@ CONFIG_SENSORS_EEPROM=m
966# CONFIG_SENSORS_PCF8574 is not set 972# CONFIG_SENSORS_PCF8574 is not set
967# CONFIG_PCF8575 is not set 973# CONFIG_PCF8575 is not set
968# CONFIG_SENSORS_PCF8591 is not set 974# CONFIG_SENSORS_PCF8591 is not set
969# CONFIG_TPS65010 is not set
970# CONFIG_SENSORS_MAX6875 is not set 975# CONFIG_SENSORS_MAX6875 is not set
971# CONFIG_SENSORS_TSL2550 is not set 976# CONFIG_SENSORS_TSL2550 is not set
972# CONFIG_I2C_DEBUG_CORE is not set 977# CONFIG_I2C_DEBUG_CORE is not set
973# CONFIG_I2C_DEBUG_ALGO is not set 978# CONFIG_I2C_DEBUG_ALGO is not set
974# CONFIG_I2C_DEBUG_BUS is not set 979# CONFIG_I2C_DEBUG_BUS is not set
975# CONFIG_I2C_DEBUG_CHIP is not set 980# CONFIG_I2C_DEBUG_CHIP is not set
976
977#
978# SPI support
979#
980# CONFIG_SPI is not set 981# CONFIG_SPI is not set
981# CONFIG_SPI_MASTER is not set
982# CONFIG_W1 is not set 982# CONFIG_W1 is not set
983# CONFIG_POWER_SUPPLY is not set 983# CONFIG_POWER_SUPPLY is not set
984CONFIG_HWMON=y 984CONFIG_HWMON=y
@@ -1048,12 +1048,22 @@ CONFIG_SSB_POSSIBLE=y
1048# Multifunction device drivers 1048# Multifunction device drivers
1049# 1049#
1050# CONFIG_MFD_SM501 is not set 1050# CONFIG_MFD_SM501 is not set
1051# CONFIG_HTC_PASIC3 is not set
1051 1052
1052# 1053#
1053# Multimedia devices 1054# Multimedia devices
1054# 1055#
1056
1057#
1058# Multimedia core support
1059#
1055# CONFIG_VIDEO_DEV is not set 1060# CONFIG_VIDEO_DEV is not set
1056# CONFIG_DVB_CORE is not set 1061# CONFIG_DVB_CORE is not set
1062# CONFIG_VIDEO_MEDIA is not set
1063
1064#
1065# Multimedia drivers
1066#
1057# CONFIG_DAB is not set 1067# CONFIG_DAB is not set
1058 1068
1059# 1069#
@@ -1115,12 +1125,14 @@ CONFIG_USB_DEVICE_CLASS=y
1115# 1125#
1116# USB Host Controller Drivers 1126# USB Host Controller Drivers
1117# 1127#
1128# CONFIG_USB_C67X00_HCD is not set
1118CONFIG_USB_EHCI_HCD=y 1129CONFIG_USB_EHCI_HCD=y
1119# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1130# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1120# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1131# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1121# CONFIG_USB_EHCI_FSL is not set 1132# CONFIG_USB_EHCI_FSL is not set
1122CONFIG_USB_EHCI_HCD_PPC_OF=y 1133CONFIG_USB_EHCI_HCD_PPC_OF=y
1123# CONFIG_USB_ISP116X_HCD is not set 1134# CONFIG_USB_ISP116X_HCD is not set
1135# CONFIG_USB_ISP1760_HCD is not set
1124CONFIG_USB_OHCI_HCD=y 1136CONFIG_USB_OHCI_HCD=y
1125CONFIG_USB_OHCI_HCD_PPC_OF=y 1137CONFIG_USB_OHCI_HCD_PPC_OF=y
1126CONFIG_USB_OHCI_HCD_PPC_OF_BE=y 1138CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
@@ -1138,6 +1150,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1138# 1150#
1139# CONFIG_USB_ACM is not set 1151# CONFIG_USB_ACM is not set
1140CONFIG_USB_PRINTER=m 1152CONFIG_USB_PRINTER=m
1153# CONFIG_USB_WDM is not set
1141 1154
1142# 1155#
1143# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 1156# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -1159,6 +1172,7 @@ CONFIG_USB_STORAGE=m
1159# CONFIG_USB_STORAGE_ALAUDA is not set 1172# CONFIG_USB_STORAGE_ALAUDA is not set
1160# CONFIG_USB_STORAGE_ONETOUCH is not set 1173# CONFIG_USB_STORAGE_ONETOUCH is not set
1161# CONFIG_USB_STORAGE_KARMA is not set 1174# CONFIG_USB_STORAGE_KARMA is not set
1175# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1162# CONFIG_USB_LIBUSUAL is not set 1176# CONFIG_USB_LIBUSUAL is not set
1163 1177
1164# 1178#
@@ -1202,9 +1216,11 @@ CONFIG_USB_SERIAL_FTDI_SIO=y
1202# CONFIG_USB_SERIAL_MCT_U232 is not set 1216# CONFIG_USB_SERIAL_MCT_U232 is not set
1203# CONFIG_USB_SERIAL_MOS7720 is not set 1217# CONFIG_USB_SERIAL_MOS7720 is not set
1204# CONFIG_USB_SERIAL_MOS7840 is not set 1218# CONFIG_USB_SERIAL_MOS7840 is not set
1219# CONFIG_USB_SERIAL_MOTOROLA is not set
1205# CONFIG_USB_SERIAL_NAVMAN is not set 1220# CONFIG_USB_SERIAL_NAVMAN is not set
1206# CONFIG_USB_SERIAL_PL2303 is not set 1221# CONFIG_USB_SERIAL_PL2303 is not set
1207# CONFIG_USB_SERIAL_OTI6858 is not set 1222# CONFIG_USB_SERIAL_OTI6858 is not set
1223# CONFIG_USB_SERIAL_SPCP8X5 is not set
1208# CONFIG_USB_SERIAL_HP4X is not set 1224# CONFIG_USB_SERIAL_HP4X is not set
1209# CONFIG_USB_SERIAL_SAFE is not set 1225# CONFIG_USB_SERIAL_SAFE is not set
1210# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set 1226# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
@@ -1238,10 +1254,12 @@ CONFIG_USB_SERIAL_FTDI_SIO=y
1238# CONFIG_USB_TRANCEVIBRATOR is not set 1254# CONFIG_USB_TRANCEVIBRATOR is not set
1239# CONFIG_USB_IOWARRIOR is not set 1255# CONFIG_USB_IOWARRIOR is not set
1240# CONFIG_USB_TEST is not set 1256# CONFIG_USB_TEST is not set
1257# CONFIG_USB_ISIGHTFW is not set
1241# CONFIG_USB_GADGET is not set 1258# CONFIG_USB_GADGET is not set
1242# CONFIG_MMC is not set 1259# CONFIG_MMC is not set
1243# CONFIG_MEMSTICK is not set 1260# CONFIG_MEMSTICK is not set
1244# CONFIG_NEW_LEDS is not set 1261# CONFIG_NEW_LEDS is not set
1262# CONFIG_ACCESSIBILITY is not set
1245# CONFIG_INFINIBAND is not set 1263# CONFIG_INFINIBAND is not set
1246# CONFIG_EDAC is not set 1264# CONFIG_EDAC is not set
1247CONFIG_RTC_LIB=y 1265CONFIG_RTC_LIB=y
@@ -1293,11 +1311,8 @@ CONFIG_RTC_DRV_RS5C372=y
1293# 1311#
1294# on-CPU RTC drivers 1312# on-CPU RTC drivers
1295# 1313#
1314# CONFIG_RTC_DRV_PPC is not set
1296# CONFIG_DMADEVICES is not set 1315# CONFIG_DMADEVICES is not set
1297
1298#
1299# Userspace I/O
1300#
1301# CONFIG_UIO is not set 1316# CONFIG_UIO is not set
1302 1317
1303# 1318#
@@ -1318,10 +1333,9 @@ CONFIG_FS_MBCACHE=y
1318CONFIG_FS_POSIX_ACL=y 1333CONFIG_FS_POSIX_ACL=y
1319CONFIG_XFS_FS=m 1334CONFIG_XFS_FS=m
1320# CONFIG_XFS_QUOTA is not set 1335# CONFIG_XFS_QUOTA is not set
1321# CONFIG_XFS_SECURITY is not set
1322# CONFIG_XFS_POSIX_ACL is not set 1336# CONFIG_XFS_POSIX_ACL is not set
1323# CONFIG_XFS_RT is not set 1337# CONFIG_XFS_RT is not set
1324# CONFIG_GFS2_FS is not set 1338# CONFIG_XFS_DEBUG is not set
1325# CONFIG_OCFS2_FS is not set 1339# CONFIG_OCFS2_FS is not set
1326CONFIG_DNOTIFY=y 1340CONFIG_DNOTIFY=y
1327CONFIG_INOTIFY=y 1341CONFIG_INOTIFY=y
@@ -1388,12 +1402,10 @@ CONFIG_NFS_FS=y
1388CONFIG_NFS_V3=y 1402CONFIG_NFS_V3=y
1389CONFIG_NFS_V3_ACL=y 1403CONFIG_NFS_V3_ACL=y
1390CONFIG_NFS_V4=y 1404CONFIG_NFS_V4=y
1391# CONFIG_NFS_DIRECTIO is not set
1392CONFIG_NFSD=m 1405CONFIG_NFSD=m
1393CONFIG_NFSD_V3=y 1406CONFIG_NFSD_V3=y
1394# CONFIG_NFSD_V3_ACL is not set 1407# CONFIG_NFSD_V3_ACL is not set
1395# CONFIG_NFSD_V4 is not set 1408# CONFIG_NFSD_V4 is not set
1396CONFIG_NFSD_TCP=y
1397CONFIG_ROOT_NFS=y 1409CONFIG_ROOT_NFS=y
1398CONFIG_LOCKD=y 1410CONFIG_LOCKD=y
1399CONFIG_LOCKD_V4=y 1411CONFIG_LOCKD_V4=y
@@ -1467,9 +1479,10 @@ CONFIG_NLS_UTF8=m
1467# Library routines 1479# Library routines
1468# 1480#
1469CONFIG_BITREVERSE=y 1481CONFIG_BITREVERSE=y
1482# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1470CONFIG_CRC_CCITT=m 1483CONFIG_CRC_CCITT=m
1471# CONFIG_CRC16 is not set 1484# CONFIG_CRC16 is not set
1472# CONFIG_CRC_ITU_T is not set 1485CONFIG_CRC_ITU_T=m
1473CONFIG_CRC32=y 1486CONFIG_CRC32=y
1474# CONFIG_CRC7 is not set 1487# CONFIG_CRC7 is not set
1475CONFIG_LIBCRC32C=m 1488CONFIG_LIBCRC32C=m
@@ -1481,6 +1494,7 @@ CONFIG_PLIST=y
1481CONFIG_HAS_IOMEM=y 1494CONFIG_HAS_IOMEM=y
1482CONFIG_HAS_IOPORT=y 1495CONFIG_HAS_IOPORT=y
1483CONFIG_HAS_DMA=y 1496CONFIG_HAS_DMA=y
1497CONFIG_HAVE_LMB=y
1484 1498
1485# 1499#
1486# Kernel hacking 1500# Kernel hacking
@@ -1488,6 +1502,7 @@ CONFIG_HAS_DMA=y
1488# CONFIG_PRINTK_TIME is not set 1502# CONFIG_PRINTK_TIME is not set
1489CONFIG_ENABLE_WARN_DEPRECATED=y 1503CONFIG_ENABLE_WARN_DEPRECATED=y
1490CONFIG_ENABLE_MUST_CHECK=y 1504CONFIG_ENABLE_MUST_CHECK=y
1505CONFIG_FRAME_WARN=1024
1491CONFIG_MAGIC_SYSRQ=y 1506CONFIG_MAGIC_SYSRQ=y
1492# CONFIG_UNUSED_SYMBOLS is not set 1507# CONFIG_UNUSED_SYMBOLS is not set
1493# CONFIG_DEBUG_FS is not set 1508# CONFIG_DEBUG_FS is not set
@@ -1498,6 +1513,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
1498CONFIG_SCHED_DEBUG=y 1513CONFIG_SCHED_DEBUG=y
1499# CONFIG_SCHEDSTATS is not set 1514# CONFIG_SCHEDSTATS is not set
1500# CONFIG_TIMER_STATS is not set 1515# CONFIG_TIMER_STATS is not set
1516# CONFIG_DEBUG_OBJECTS is not set
1501# CONFIG_SLUB_DEBUG_ON is not set 1517# CONFIG_SLUB_DEBUG_ON is not set
1502# CONFIG_SLUB_STATS is not set 1518# CONFIG_SLUB_STATS is not set
1503# CONFIG_DEBUG_RT_MUTEXES is not set 1519# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -1510,6 +1526,7 @@ CONFIG_SCHED_DEBUG=y
1510CONFIG_DEBUG_BUGVERBOSE=y 1526CONFIG_DEBUG_BUGVERBOSE=y
1511# CONFIG_DEBUG_INFO is not set 1527# CONFIG_DEBUG_INFO is not set
1512# CONFIG_DEBUG_VM is not set 1528# CONFIG_DEBUG_VM is not set
1529# CONFIG_DEBUG_WRITECOUNT is not set
1513# CONFIG_DEBUG_LIST is not set 1530# CONFIG_DEBUG_LIST is not set
1514# CONFIG_DEBUG_SG is not set 1531# CONFIG_DEBUG_SG is not set
1515# CONFIG_BOOT_PRINTK_DELAY is not set 1532# CONFIG_BOOT_PRINTK_DELAY is not set
@@ -1521,6 +1538,7 @@ CONFIG_DEBUG_BUGVERBOSE=y
1521# CONFIG_DEBUG_STACK_USAGE is not set 1538# CONFIG_DEBUG_STACK_USAGE is not set
1522# CONFIG_DEBUG_PAGEALLOC is not set 1539# CONFIG_DEBUG_PAGEALLOC is not set
1523# CONFIG_DEBUGGER is not set 1540# CONFIG_DEBUGGER is not set
1541# CONFIG_IRQSTACKS is not set
1524# CONFIG_BDI_SWITCH is not set 1542# CONFIG_BDI_SWITCH is not set
1525# CONFIG_BOOTX_TEXT is not set 1543# CONFIG_BOOTX_TEXT is not set
1526# CONFIG_PPC_EARLY_DEBUG is not set 1544# CONFIG_PPC_EARLY_DEBUG is not set
@@ -1532,52 +1550,82 @@ CONFIG_DEBUG_BUGVERBOSE=y
1532# CONFIG_SECURITY is not set 1550# CONFIG_SECURITY is not set
1533# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1551# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1534CONFIG_CRYPTO=y 1552CONFIG_CRYPTO=y
1553
1554#
1555# Crypto core or helper
1556#
1535CONFIG_CRYPTO_ALGAPI=y 1557CONFIG_CRYPTO_ALGAPI=y
1536CONFIG_CRYPTO_BLKCIPHER=y 1558CONFIG_CRYPTO_BLKCIPHER=y
1537# CONFIG_CRYPTO_SEQIV is not set
1538CONFIG_CRYPTO_MANAGER=y 1559CONFIG_CRYPTO_MANAGER=y
1560# CONFIG_CRYPTO_GF128MUL is not set
1561# CONFIG_CRYPTO_NULL is not set
1562# CONFIG_CRYPTO_CRYPTD is not set
1563# CONFIG_CRYPTO_AUTHENC is not set
1564# CONFIG_CRYPTO_TEST is not set
1565
1566#
1567# Authenticated Encryption with Associated Data
1568#
1569# CONFIG_CRYPTO_CCM is not set
1570# CONFIG_CRYPTO_GCM is not set
1571# CONFIG_CRYPTO_SEQIV is not set
1572
1573#
1574# Block modes
1575#
1576CONFIG_CRYPTO_CBC=y
1577# CONFIG_CRYPTO_CTR is not set
1578# CONFIG_CRYPTO_CTS is not set
1579CONFIG_CRYPTO_ECB=m
1580# CONFIG_CRYPTO_LRW is not set
1581CONFIG_CRYPTO_PCBC=m
1582# CONFIG_CRYPTO_XTS is not set
1583
1584#
1585# Hash modes
1586#
1539# CONFIG_CRYPTO_HMAC is not set 1587# CONFIG_CRYPTO_HMAC is not set
1540# CONFIG_CRYPTO_XCBC is not set 1588# CONFIG_CRYPTO_XCBC is not set
1541# CONFIG_CRYPTO_NULL is not set 1589
1590#
1591# Digest
1592#
1593CONFIG_CRYPTO_CRC32C=m
1542CONFIG_CRYPTO_MD4=m 1594CONFIG_CRYPTO_MD4=m
1543CONFIG_CRYPTO_MD5=y 1595CONFIG_CRYPTO_MD5=y
1596CONFIG_CRYPTO_MICHAEL_MIC=m
1544CONFIG_CRYPTO_SHA1=m 1597CONFIG_CRYPTO_SHA1=m
1545# CONFIG_CRYPTO_SHA256 is not set 1598# CONFIG_CRYPTO_SHA256 is not set
1546# CONFIG_CRYPTO_SHA512 is not set 1599# CONFIG_CRYPTO_SHA512 is not set
1547# CONFIG_CRYPTO_WP512 is not set
1548# CONFIG_CRYPTO_TGR192 is not set 1600# CONFIG_CRYPTO_TGR192 is not set
1549# CONFIG_CRYPTO_GF128MUL is not set 1601# CONFIG_CRYPTO_WP512 is not set
1550CONFIG_CRYPTO_ECB=m 1602
1551CONFIG_CRYPTO_CBC=y 1603#
1552CONFIG_CRYPTO_PCBC=m 1604# Ciphers
1553# CONFIG_CRYPTO_LRW is not set 1605#
1554# CONFIG_CRYPTO_XTS is not set
1555# CONFIG_CRYPTO_CTR is not set
1556# CONFIG_CRYPTO_GCM is not set
1557# CONFIG_CRYPTO_CCM is not set
1558# CONFIG_CRYPTO_CRYPTD is not set
1559CONFIG_CRYPTO_DES=y
1560# CONFIG_CRYPTO_FCRYPT is not set
1561CONFIG_CRYPTO_BLOWFISH=m
1562CONFIG_CRYPTO_TWOFISH=m
1563CONFIG_CRYPTO_TWOFISH_COMMON=m
1564CONFIG_CRYPTO_SERPENT=m
1565CONFIG_CRYPTO_AES=m 1606CONFIG_CRYPTO_AES=m
1607# CONFIG_CRYPTO_ANUBIS is not set
1608CONFIG_CRYPTO_ARC4=m
1609CONFIG_CRYPTO_BLOWFISH=m
1610# CONFIG_CRYPTO_CAMELLIA is not set
1566# CONFIG_CRYPTO_CAST5 is not set 1611# CONFIG_CRYPTO_CAST5 is not set
1567# CONFIG_CRYPTO_CAST6 is not set 1612# CONFIG_CRYPTO_CAST6 is not set
1568# CONFIG_CRYPTO_TEA is not set 1613CONFIG_CRYPTO_DES=y
1569CONFIG_CRYPTO_ARC4=m 1614# CONFIG_CRYPTO_FCRYPT is not set
1570# CONFIG_CRYPTO_KHAZAD is not set 1615# CONFIG_CRYPTO_KHAZAD is not set
1571# CONFIG_CRYPTO_ANUBIS is not set
1572# CONFIG_CRYPTO_SEED is not set
1573# CONFIG_CRYPTO_SALSA20 is not set 1616# CONFIG_CRYPTO_SALSA20 is not set
1617# CONFIG_CRYPTO_SEED is not set
1618CONFIG_CRYPTO_SERPENT=m
1619# CONFIG_CRYPTO_TEA is not set
1620CONFIG_CRYPTO_TWOFISH=m
1621CONFIG_CRYPTO_TWOFISH_COMMON=m
1622
1623#
1624# Compression
1625#
1574CONFIG_CRYPTO_DEFLATE=m 1626CONFIG_CRYPTO_DEFLATE=m
1575CONFIG_CRYPTO_MICHAEL_MIC=m
1576CONFIG_CRYPTO_CRC32C=m
1577# CONFIG_CRYPTO_CAMELLIA is not set
1578# CONFIG_CRYPTO_TEST is not set
1579# CONFIG_CRYPTO_AUTHENC is not set
1580# CONFIG_CRYPTO_LZO is not set 1627# CONFIG_CRYPTO_LZO is not set
1581CONFIG_CRYPTO_HW=y 1628CONFIG_CRYPTO_HW=y
1582# CONFIG_CRYPTO_DEV_HIFN_795X is not set 1629# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1583# CONFIG_PPC_CLOCK is not set 1630# CONFIG_PPC_CLOCK is not set
1631# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/mpc7448_hpc2_defconfig b/arch/powerpc/configs/mpc7448_hpc2_defconfig
index a3d52e3f2ded..066c583c1f8a 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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 24 08:48:11 2008 4# Mon Jun 9 08:52:11 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -31,6 +31,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y 31CONFIG_GENERIC_HARDIRQS=y
32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
33CONFIG_IRQ_PER_CPU=y 33CONFIG_IRQ_PER_CPU=y
34CONFIG_STACKTRACE_SUPPORT=y
35CONFIG_LOCKDEP_SUPPORT=y
34CONFIG_RWSEM_XCHGADD_ALGORITHM=y 36CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y 37CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y 38CONFIG_GENERIC_HWEIGHT=y
@@ -86,6 +88,7 @@ CONFIG_INITRAMFS_SOURCE=""
86CONFIG_SYSCTL=y 88CONFIG_SYSCTL=y
87CONFIG_EMBEDDED=y 89CONFIG_EMBEDDED=y
88CONFIG_SYSCTL_SYSCALL=y 90CONFIG_SYSCTL_SYSCALL=y
91CONFIG_SYSCTL_SYSCALL_CHECK=y
89CONFIG_KALLSYMS=y 92CONFIG_KALLSYMS=y
90# CONFIG_KALLSYMS_EXTRA_PASS is not set 93# CONFIG_KALLSYMS_EXTRA_PASS is not set
91CONFIG_HOTPLUG=y 94CONFIG_HOTPLUG=y
@@ -111,6 +114,7 @@ CONFIG_SLUB=y
111CONFIG_HAVE_OPROFILE=y 114CONFIG_HAVE_OPROFILE=y
112CONFIG_HAVE_KPROBES=y 115CONFIG_HAVE_KPROBES=y
113CONFIG_HAVE_KRETPROBES=y 116CONFIG_HAVE_KRETPROBES=y
117# CONFIG_HAVE_DMA_ATTRS is not set
114CONFIG_PROC_PAGE_MONITOR=y 118CONFIG_PROC_PAGE_MONITOR=y
115CONFIG_SLABINFO=y 119CONFIG_SLABINFO=y
116CONFIG_RT_MUTEXES=y 120CONFIG_RT_MUTEXES=y
@@ -209,11 +213,13 @@ CONFIG_FLATMEM=y
209CONFIG_FLAT_NODE_MEM_MAP=y 213CONFIG_FLAT_NODE_MEM_MAP=y
210# CONFIG_SPARSEMEM_STATIC is not set 214# CONFIG_SPARSEMEM_STATIC is not set
211# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 215# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
216CONFIG_PAGEFLAGS_EXTENDED=y
212CONFIG_SPLIT_PTLOCK_CPUS=4 217CONFIG_SPLIT_PTLOCK_CPUS=4
213# CONFIG_RESOURCES_64BIT is not set 218# CONFIG_RESOURCES_64BIT is not set
214CONFIG_ZONE_DMA_FLAG=1 219CONFIG_ZONE_DMA_FLAG=1
215CONFIG_BOUNCE=y 220CONFIG_BOUNCE=y
216CONFIG_VIRT_TO_BUS=y 221CONFIG_VIRT_TO_BUS=y
222CONFIG_FORCE_MAX_ZONEORDER=11
217CONFIG_PROC_DEVICETREE=y 223CONFIG_PROC_DEVICETREE=y
218# CONFIG_CMDLINE_BOOL is not set 224# CONFIG_CMDLINE_BOOL is not set
219# CONFIG_PM is not set 225# CONFIG_PM is not set
@@ -235,6 +241,7 @@ CONFIG_ARCH_SUPPORTS_MSI=y
235CONFIG_PCI_LEGACY=y 241CONFIG_PCI_LEGACY=y
236# CONFIG_PCCARD is not set 242# CONFIG_PCCARD is not set
237# CONFIG_HOTPLUG_PCI is not set 243# CONFIG_HOTPLUG_PCI is not set
244# CONFIG_HAS_RAPIDIO is not set
238 245
239# 246#
240# Advanced setup 247# Advanced setup
@@ -244,11 +251,11 @@ CONFIG_PCI_LEGACY=y
244# 251#
245# Default settings for advanced configuration options are used 252# Default settings for advanced configuration options are used
246# 253#
247CONFIG_HIGHMEM_START=0xfe000000
248CONFIG_LOWMEM_SIZE=0x30000000 254CONFIG_LOWMEM_SIZE=0x30000000
255CONFIG_PAGE_OFFSET=0xc0000000
249CONFIG_KERNEL_START=0xc0000000 256CONFIG_KERNEL_START=0xc0000000
257CONFIG_PHYSICAL_START=0x00000000
250CONFIG_TASK_SIZE=0xc0000000 258CONFIG_TASK_SIZE=0xc0000000
251CONFIG_BOOT_LOAD=0x00800000
252 259
253# 260#
254# Networking 261# Networking
@@ -296,8 +303,6 @@ CONFIG_TCP_CONG_CUBIC=y
296CONFIG_DEFAULT_TCP_CONG="cubic" 303CONFIG_DEFAULT_TCP_CONG="cubic"
297# CONFIG_TCP_MD5SIG is not set 304# CONFIG_TCP_MD5SIG is not set
298# CONFIG_IPV6 is not set 305# CONFIG_IPV6 is not set
299# CONFIG_INET6_XFRM_TUNNEL is not set
300# CONFIG_INET6_TUNNEL is not set
301# CONFIG_NETWORK_SECMARK is not set 306# CONFIG_NETWORK_SECMARK is not set
302# CONFIG_NETFILTER is not set 307# CONFIG_NETFILTER is not set
303# CONFIG_IP_DCCP is not set 308# CONFIG_IP_DCCP is not set
@@ -454,7 +459,10 @@ CONFIG_SCSI_LOWLEVEL=y
454# CONFIG_SCSI_SRP is not set 459# CONFIG_SCSI_SRP is not set
455CONFIG_ATA=y 460CONFIG_ATA=y
456# CONFIG_ATA_NONSTANDARD is not set 461# CONFIG_ATA_NONSTANDARD is not set
462CONFIG_SATA_PMP=y
457# CONFIG_SATA_AHCI is not set 463# CONFIG_SATA_AHCI is not set
464# CONFIG_SATA_SIL24 is not set
465CONFIG_ATA_SFF=y
458# CONFIG_SATA_SVW is not set 466# CONFIG_SATA_SVW is not set
459# CONFIG_ATA_PIIX is not set 467# CONFIG_ATA_PIIX is not set
460CONFIG_SATA_MV=y 468CONFIG_SATA_MV=y
@@ -464,7 +472,6 @@ CONFIG_SATA_MV=y
464# CONFIG_SATA_PROMISE is not set 472# CONFIG_SATA_PROMISE is not set
465# CONFIG_SATA_SX4 is not set 473# CONFIG_SATA_SX4 is not set
466# CONFIG_SATA_SIL is not set 474# CONFIG_SATA_SIL is not set
467# CONFIG_SATA_SIL24 is not set
468# CONFIG_SATA_SIS is not set 475# CONFIG_SATA_SIS is not set
469# CONFIG_SATA_ULI is not set 476# CONFIG_SATA_ULI is not set
470# CONFIG_SATA_VIA is not set 477# CONFIG_SATA_VIA is not set
@@ -509,6 +516,7 @@ CONFIG_SATA_MV=y
509# CONFIG_PATA_VIA is not set 516# CONFIG_PATA_VIA is not set
510# CONFIG_PATA_WINBOND is not set 517# CONFIG_PATA_WINBOND is not set
511# CONFIG_PATA_PLATFORM is not set 518# CONFIG_PATA_PLATFORM is not set
519# CONFIG_PATA_SCH is not set
512# CONFIG_MD is not set 520# CONFIG_MD is not set
513# CONFIG_FUSION is not set 521# CONFIG_FUSION is not set
514 522
@@ -596,7 +604,6 @@ CONFIG_NETDEV_1000=y
596# CONFIG_SIS190 is not set 604# CONFIG_SIS190 is not set
597# CONFIG_SKGE is not set 605# CONFIG_SKGE is not set
598# CONFIG_SKY2 is not set 606# CONFIG_SKY2 is not set
599# CONFIG_SK98LIN is not set
600# CONFIG_VIA_VELOCITY is not set 607# CONFIG_VIA_VELOCITY is not set
601# CONFIG_TIGON3 is not set 608# CONFIG_TIGON3 is not set
602# CONFIG_BNX2 is not set 609# CONFIG_BNX2 is not set
@@ -616,6 +623,7 @@ CONFIG_NETDEV_10000=y
616# CONFIG_MLX4_CORE is not set 623# CONFIG_MLX4_CORE is not set
617# CONFIG_TEHUTI is not set 624# CONFIG_TEHUTI is not set
618# CONFIG_BNX2X is not set 625# CONFIG_BNX2X is not set
626# CONFIG_SFC is not set
619# CONFIG_TR is not set 627# CONFIG_TR is not set
620 628
621# 629#
@@ -623,6 +631,7 @@ CONFIG_NETDEV_10000=y
623# 631#
624# CONFIG_WLAN_PRE80211 is not set 632# CONFIG_WLAN_PRE80211 is not set
625# CONFIG_WLAN_80211 is not set 633# CONFIG_WLAN_80211 is not set
634# CONFIG_IWLWIFI_LEDS is not set
626# CONFIG_WAN is not set 635# CONFIG_WAN is not set
627# CONFIG_FDDI is not set 636# CONFIG_FDDI is not set
628# CONFIG_HIPPI is not set 637# CONFIG_HIPPI is not set
@@ -670,6 +679,7 @@ CONFIG_INPUT=y
670# Character devices 679# Character devices
671# 680#
672# CONFIG_VT is not set 681# CONFIG_VT is not set
682CONFIG_DEVKMEM=y
673# CONFIG_SERIAL_NONSTANDARD is not set 683# CONFIG_SERIAL_NONSTANDARD is not set
674# CONFIG_NOZOMI is not set 684# CONFIG_NOZOMI is not set
675 685
@@ -705,12 +715,7 @@ CONFIG_GEN_RTC=y
705# CONFIG_TCG_TPM is not set 715# CONFIG_TCG_TPM is not set
706CONFIG_DEVPORT=y 716CONFIG_DEVPORT=y
707# CONFIG_I2C is not set 717# CONFIG_I2C is not set
708
709#
710# SPI support
711#
712# CONFIG_SPI is not set 718# CONFIG_SPI is not set
713# CONFIG_SPI_MASTER is not set
714# CONFIG_W1 is not set 719# CONFIG_W1 is not set
715# CONFIG_POWER_SUPPLY is not set 720# CONFIG_POWER_SUPPLY is not set
716CONFIG_HWMON=y 721CONFIG_HWMON=y
@@ -743,12 +748,22 @@ CONFIG_SSB_POSSIBLE=y
743# Multifunction device drivers 748# Multifunction device drivers
744# 749#
745# CONFIG_MFD_SM501 is not set 750# CONFIG_MFD_SM501 is not set
751# CONFIG_HTC_PASIC3 is not set
746 752
747# 753#
748# Multimedia devices 754# Multimedia devices
749# 755#
756
757#
758# Multimedia core support
759#
750# CONFIG_VIDEO_DEV is not set 760# CONFIG_VIDEO_DEV is not set
751# CONFIG_DVB_CORE is not set 761# CONFIG_DVB_CORE is not set
762# CONFIG_VIDEO_MEDIA is not set
763
764#
765# Multimedia drivers
766#
752CONFIG_DAB=y 767CONFIG_DAB=y
753 768
754# 769#
@@ -779,6 +794,8 @@ CONFIG_USB_ARCH_HAS_HCD=y
779CONFIG_USB_ARCH_HAS_OHCI=y 794CONFIG_USB_ARCH_HAS_OHCI=y
780CONFIG_USB_ARCH_HAS_EHCI=y 795CONFIG_USB_ARCH_HAS_EHCI=y
781# CONFIG_USB is not set 796# CONFIG_USB is not set
797# CONFIG_USB_OTG_WHITELIST is not set
798# CONFIG_USB_OTG_BLACKLIST_HUB is not set
782 799
783# 800#
784# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 801# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -787,14 +804,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
787# CONFIG_MMC is not set 804# CONFIG_MMC is not set
788# CONFIG_MEMSTICK is not set 805# CONFIG_MEMSTICK is not set
789# CONFIG_NEW_LEDS is not set 806# CONFIG_NEW_LEDS is not set
807# CONFIG_ACCESSIBILITY is not set
790# CONFIG_INFINIBAND is not set 808# CONFIG_INFINIBAND is not set
791# CONFIG_EDAC is not set 809# CONFIG_EDAC is not set
792# CONFIG_RTC_CLASS is not set 810# CONFIG_RTC_CLASS is not set
793# CONFIG_DMADEVICES is not set 811# CONFIG_DMADEVICES is not set
794
795#
796# Userspace I/O
797#
798# CONFIG_UIO is not set 812# CONFIG_UIO is not set
799 813
800# 814#
@@ -814,7 +828,6 @@ CONFIG_FS_MBCACHE=y
814# CONFIG_JFS_FS is not set 828# CONFIG_JFS_FS is not set
815# CONFIG_FS_POSIX_ACL is not set 829# CONFIG_FS_POSIX_ACL is not set
816# CONFIG_XFS_FS is not set 830# CONFIG_XFS_FS is not set
817# CONFIG_GFS2_FS is not set
818# CONFIG_OCFS2_FS is not set 831# CONFIG_OCFS2_FS is not set
819CONFIG_DNOTIFY=y 832CONFIG_DNOTIFY=y
820CONFIG_INOTIFY=y 833CONFIG_INOTIFY=y
@@ -871,7 +884,6 @@ CONFIG_NETWORK_FILESYSTEMS=y
871CONFIG_NFS_FS=y 884CONFIG_NFS_FS=y
872# CONFIG_NFS_V3 is not set 885# CONFIG_NFS_V3 is not set
873# CONFIG_NFS_V4 is not set 886# CONFIG_NFS_V4 is not set
874# CONFIG_NFS_DIRECTIO is not set
875# CONFIG_NFSD is not set 887# CONFIG_NFSD is not set
876CONFIG_ROOT_NFS=y 888CONFIG_ROOT_NFS=y
877CONFIG_LOCKD=y 889CONFIG_LOCKD=y
@@ -914,6 +926,7 @@ CONFIG_MSDOS_PARTITION=y
914# Library routines 926# Library routines
915# 927#
916CONFIG_BITREVERSE=y 928CONFIG_BITREVERSE=y
929# CONFIG_GENERIC_FIND_FIRST_BIT is not set
917# CONFIG_CRC_CCITT is not set 930# CONFIG_CRC_CCITT is not set
918# CONFIG_CRC16 is not set 931# CONFIG_CRC16 is not set
919# CONFIG_CRC_ITU_T is not set 932# CONFIG_CRC_ITU_T is not set
@@ -924,6 +937,7 @@ CONFIG_PLIST=y
924CONFIG_HAS_IOMEM=y 937CONFIG_HAS_IOMEM=y
925CONFIG_HAS_IOPORT=y 938CONFIG_HAS_IOPORT=y
926CONFIG_HAS_DMA=y 939CONFIG_HAS_DMA=y
940CONFIG_HAVE_LMB=y
927 941
928# 942#
929# Kernel hacking 943# Kernel hacking
@@ -931,6 +945,7 @@ CONFIG_HAS_DMA=y
931# CONFIG_PRINTK_TIME is not set 945# CONFIG_PRINTK_TIME is not set
932CONFIG_ENABLE_WARN_DEPRECATED=y 946CONFIG_ENABLE_WARN_DEPRECATED=y
933CONFIG_ENABLE_MUST_CHECK=y 947CONFIG_ENABLE_MUST_CHECK=y
948CONFIG_FRAME_WARN=1024
934# CONFIG_MAGIC_SYSRQ is not set 949# CONFIG_MAGIC_SYSRQ is not set
935# CONFIG_UNUSED_SYMBOLS is not set 950# CONFIG_UNUSED_SYMBOLS is not set
936# CONFIG_DEBUG_FS is not set 951# CONFIG_DEBUG_FS is not set
@@ -940,6 +955,7 @@ CONFIG_ENABLE_MUST_CHECK=y
940# CONFIG_SLUB_STATS is not set 955# CONFIG_SLUB_STATS is not set
941# CONFIG_DEBUG_BUGVERBOSE is not set 956# CONFIG_DEBUG_BUGVERBOSE is not set
942# CONFIG_SAMPLES is not set 957# CONFIG_SAMPLES is not set
958# CONFIG_IRQSTACKS is not set
943# CONFIG_BOOTX_TEXT is not set 959# CONFIG_BOOTX_TEXT is not set
944# CONFIG_PPC_EARLY_DEBUG is not set 960# CONFIG_PPC_EARLY_DEBUG is not set
945 961
@@ -950,48 +966,78 @@ CONFIG_ENABLE_MUST_CHECK=y
950# CONFIG_SECURITY is not set 966# CONFIG_SECURITY is not set
951# CONFIG_SECURITY_FILE_CAPABILITIES is not set 967# CONFIG_SECURITY_FILE_CAPABILITIES is not set
952CONFIG_CRYPTO=y 968CONFIG_CRYPTO=y
953# CONFIG_CRYPTO_SEQIV is not set 969
970#
971# Crypto core or helper
972#
954# CONFIG_CRYPTO_MANAGER is not set 973# CONFIG_CRYPTO_MANAGER is not set
974# CONFIG_CRYPTO_GF128MUL is not set
975# CONFIG_CRYPTO_NULL is not set
976# CONFIG_CRYPTO_CRYPTD is not set
977# CONFIG_CRYPTO_AUTHENC is not set
978
979#
980# Authenticated Encryption with Associated Data
981#
982# CONFIG_CRYPTO_CCM is not set
983# CONFIG_CRYPTO_GCM is not set
984# CONFIG_CRYPTO_SEQIV is not set
985
986#
987# Block modes
988#
989# CONFIG_CRYPTO_CBC is not set
990# CONFIG_CRYPTO_CTR is not set
991# CONFIG_CRYPTO_CTS is not set
992# CONFIG_CRYPTO_ECB is not set
993# CONFIG_CRYPTO_LRW is not set
994# CONFIG_CRYPTO_PCBC is not set
995# CONFIG_CRYPTO_XTS is not set
996
997#
998# Hash modes
999#
955# CONFIG_CRYPTO_HMAC is not set 1000# CONFIG_CRYPTO_HMAC is not set
956# CONFIG_CRYPTO_XCBC is not set 1001# CONFIG_CRYPTO_XCBC is not set
957# CONFIG_CRYPTO_NULL is not set 1002
1003#
1004# Digest
1005#
1006# CONFIG_CRYPTO_CRC32C is not set
958# CONFIG_CRYPTO_MD4 is not set 1007# CONFIG_CRYPTO_MD4 is not set
959# CONFIG_CRYPTO_MD5 is not set 1008# CONFIG_CRYPTO_MD5 is not set
1009# CONFIG_CRYPTO_MICHAEL_MIC is not set
960# CONFIG_CRYPTO_SHA1 is not set 1010# CONFIG_CRYPTO_SHA1 is not set
961# CONFIG_CRYPTO_SHA256 is not set 1011# CONFIG_CRYPTO_SHA256 is not set
962# CONFIG_CRYPTO_SHA512 is not set 1012# CONFIG_CRYPTO_SHA512 is not set
963# CONFIG_CRYPTO_WP512 is not set
964# CONFIG_CRYPTO_TGR192 is not set 1013# CONFIG_CRYPTO_TGR192 is not set
965# CONFIG_CRYPTO_GF128MUL is not set 1014# CONFIG_CRYPTO_WP512 is not set
966# CONFIG_CRYPTO_ECB is not set 1015
967# CONFIG_CRYPTO_CBC is not set 1016#
968# CONFIG_CRYPTO_PCBC is not set 1017# Ciphers
969# CONFIG_CRYPTO_LRW is not set 1018#
970# CONFIG_CRYPTO_XTS is not set
971# CONFIG_CRYPTO_CTR is not set
972# CONFIG_CRYPTO_GCM is not set
973# CONFIG_CRYPTO_CCM is not set
974# CONFIG_CRYPTO_CRYPTD is not set
975# CONFIG_CRYPTO_DES is not set
976# CONFIG_CRYPTO_FCRYPT is not set
977# CONFIG_CRYPTO_BLOWFISH is not set
978# CONFIG_CRYPTO_TWOFISH is not set
979# CONFIG_CRYPTO_SERPENT is not set
980# CONFIG_CRYPTO_AES is not set 1019# CONFIG_CRYPTO_AES is not set
1020# CONFIG_CRYPTO_ANUBIS is not set
1021# CONFIG_CRYPTO_ARC4 is not set
1022# CONFIG_CRYPTO_BLOWFISH is not set
1023# CONFIG_CRYPTO_CAMELLIA is not set
981# CONFIG_CRYPTO_CAST5 is not set 1024# CONFIG_CRYPTO_CAST5 is not set
982# CONFIG_CRYPTO_CAST6 is not set 1025# CONFIG_CRYPTO_CAST6 is not set
983# CONFIG_CRYPTO_TEA is not set 1026# CONFIG_CRYPTO_DES is not set
984# CONFIG_CRYPTO_ARC4 is not set 1027# CONFIG_CRYPTO_FCRYPT is not set
985# CONFIG_CRYPTO_KHAZAD is not set 1028# CONFIG_CRYPTO_KHAZAD is not set
986# CONFIG_CRYPTO_ANUBIS is not set
987# CONFIG_CRYPTO_SEED is not set
988# CONFIG_CRYPTO_SALSA20 is not set 1029# CONFIG_CRYPTO_SALSA20 is not set
1030# CONFIG_CRYPTO_SEED is not set
1031# CONFIG_CRYPTO_SERPENT is not set
1032# CONFIG_CRYPTO_TEA is not set
1033# CONFIG_CRYPTO_TWOFISH is not set
1034
1035#
1036# Compression
1037#
989# CONFIG_CRYPTO_DEFLATE is not set 1038# CONFIG_CRYPTO_DEFLATE is not set
990# CONFIG_CRYPTO_MICHAEL_MIC is not set
991# CONFIG_CRYPTO_CRC32C is not set
992# CONFIG_CRYPTO_CAMELLIA is not set
993# CONFIG_CRYPTO_AUTHENC is not set
994# CONFIG_CRYPTO_LZO is not set 1039# CONFIG_CRYPTO_LZO is not set
995CONFIG_CRYPTO_HW=y 1040CONFIG_CRYPTO_HW=y
996# CONFIG_CRYPTO_DEV_HIFN_795X is not set 1041# CONFIG_CRYPTO_DEV_HIFN_795X is not set
997# CONFIG_PPC_CLOCK is not set 1042# CONFIG_PPC_CLOCK is not set
1043# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/mpc8272_ads_defconfig b/arch/powerpc/configs/mpc8272_ads_defconfig
index 0264c5757f78..30d7834b7db1 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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 24 08:48:13 2008 4# Mon Jun 9 08:52:12 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -30,6 +30,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
30CONFIG_GENERIC_HARDIRQS=y 30CONFIG_GENERIC_HARDIRQS=y
31# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 31# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
32CONFIG_IRQ_PER_CPU=y 32CONFIG_IRQ_PER_CPU=y
33CONFIG_STACKTRACE_SUPPORT=y
34CONFIG_LOCKDEP_SUPPORT=y
33CONFIG_RWSEM_XCHGADD_ALGORITHM=y 35CONFIG_RWSEM_XCHGADD_ALGORITHM=y
34CONFIG_ARCH_HAS_ILOG2_U32=y 36CONFIG_ARCH_HAS_ILOG2_U32=y
35CONFIG_GENERIC_HWEIGHT=y 37CONFIG_GENERIC_HWEIGHT=y
@@ -70,18 +72,16 @@ CONFIG_IKCONFIG=y
70CONFIG_IKCONFIG_PROC=y 72CONFIG_IKCONFIG_PROC=y
71CONFIG_LOG_BUF_SHIFT=14 73CONFIG_LOG_BUF_SHIFT=14
72# CONFIG_CGROUPS is not set 74# CONFIG_CGROUPS is not set
73CONFIG_GROUP_SCHED=y
74# CONFIG_FAIR_GROUP_SCHED is not set
75CONFIG_USER_SCHED=y
76# CONFIG_CGROUP_SCHED is not set
77CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
78CONFIG_SYSFS_DEPRECATED_V2=y 76CONFIG_SYSFS_DEPRECATED_V2=y
79# CONFIG_RELAY is not set 77# CONFIG_RELAY is not set
80# CONFIG_NAMESPACES is not set 78# CONFIG_NAMESPACES is not set
81# CONFIG_BLK_DEV_INITRD is not set 79# CONFIG_BLK_DEV_INITRD is not set
80CONFIG_CC_OPTIMIZE_FOR_SIZE=y
82CONFIG_SYSCTL=y 81CONFIG_SYSCTL=y
83CONFIG_EMBEDDED=y 82CONFIG_EMBEDDED=y
84CONFIG_SYSCTL_SYSCALL=y 83CONFIG_SYSCTL_SYSCALL=y
84CONFIG_SYSCTL_SYSCALL_CHECK=y
85CONFIG_KALLSYMS=y 85CONFIG_KALLSYMS=y
86CONFIG_KALLSYMS_ALL=y 86CONFIG_KALLSYMS_ALL=y
87# CONFIG_KALLSYMS_EXTRA_PASS is not set 87# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -108,6 +108,7 @@ CONFIG_SLUB=y
108CONFIG_HAVE_OPROFILE=y 108CONFIG_HAVE_OPROFILE=y
109CONFIG_HAVE_KPROBES=y 109CONFIG_HAVE_KPROBES=y
110CONFIG_HAVE_KRETPROBES=y 110CONFIG_HAVE_KRETPROBES=y
111# CONFIG_HAVE_DMA_ATTRS is not set
111CONFIG_PROC_PAGE_MONITOR=y 112CONFIG_PROC_PAGE_MONITOR=y
112CONFIG_SLABINFO=y 113CONFIG_SLABINFO=y
113CONFIG_RT_MUTEXES=y 114CONFIG_RT_MUTEXES=y
@@ -196,11 +197,13 @@ CONFIG_FLATMEM=y
196CONFIG_FLAT_NODE_MEM_MAP=y 197CONFIG_FLAT_NODE_MEM_MAP=y
197# CONFIG_SPARSEMEM_STATIC is not set 198# CONFIG_SPARSEMEM_STATIC is not set
198# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 199# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
200CONFIG_PAGEFLAGS_EXTENDED=y
199CONFIG_SPLIT_PTLOCK_CPUS=4 201CONFIG_SPLIT_PTLOCK_CPUS=4
200# CONFIG_RESOURCES_64BIT is not set 202# CONFIG_RESOURCES_64BIT is not set
201CONFIG_ZONE_DMA_FLAG=1 203CONFIG_ZONE_DMA_FLAG=1
202CONFIG_BOUNCE=y 204CONFIG_BOUNCE=y
203CONFIG_VIRT_TO_BUS=y 205CONFIG_VIRT_TO_BUS=y
206CONFIG_FORCE_MAX_ZONEORDER=11
204CONFIG_PROC_DEVICETREE=y 207CONFIG_PROC_DEVICETREE=y
205# CONFIG_CMDLINE_BOOL is not set 208# CONFIG_CMDLINE_BOOL is not set
206# CONFIG_PM is not set 209# CONFIG_PM is not set
@@ -224,6 +227,7 @@ CONFIG_PCI_LEGACY=y
224# CONFIG_PCI_DEBUG is not set 227# CONFIG_PCI_DEBUG is not set
225# CONFIG_PCCARD is not set 228# CONFIG_PCCARD is not set
226# CONFIG_HOTPLUG_PCI is not set 229# CONFIG_HOTPLUG_PCI is not set
230# CONFIG_HAS_RAPIDIO is not set
227 231
228# 232#
229# Advanced setup 233# Advanced setup
@@ -233,11 +237,11 @@ CONFIG_PCI_LEGACY=y
233# 237#
234# Default settings for advanced configuration options are used 238# Default settings for advanced configuration options are used
235# 239#
236CONFIG_HIGHMEM_START=0xfe000000
237CONFIG_LOWMEM_SIZE=0x30000000 240CONFIG_LOWMEM_SIZE=0x30000000
241CONFIG_PAGE_OFFSET=0xc0000000
238CONFIG_KERNEL_START=0xc0000000 242CONFIG_KERNEL_START=0xc0000000
243CONFIG_PHYSICAL_START=0x00000000
239CONFIG_TASK_SIZE=0xc0000000 244CONFIG_TASK_SIZE=0xc0000000
240CONFIG_BOOT_LOAD=0x00400000
241 245
242# 246#
243# Networking 247# Networking
@@ -292,6 +296,7 @@ CONFIG_INET6_XFRM_MODE_TRANSPORT=y
292CONFIG_INET6_XFRM_MODE_TUNNEL=y 296CONFIG_INET6_XFRM_MODE_TUNNEL=y
293CONFIG_INET6_XFRM_MODE_BEET=y 297CONFIG_INET6_XFRM_MODE_BEET=y
294CONFIG_IPV6_SIT=y 298CONFIG_IPV6_SIT=y
299CONFIG_IPV6_NDISC_NODETYPE=y
295# CONFIG_IPV6_TUNNEL is not set 300# CONFIG_IPV6_TUNNEL is not set
296# CONFIG_NETWORK_SECMARK is not set 301# CONFIG_NETWORK_SECMARK is not set
297CONFIG_NETFILTER=y 302CONFIG_NETFILTER=y
@@ -536,7 +541,6 @@ CONFIG_NETDEV_1000=y
536# CONFIG_SIS190 is not set 541# CONFIG_SIS190 is not set
537# CONFIG_SKGE is not set 542# CONFIG_SKGE is not set
538# CONFIG_SKY2 is not set 543# CONFIG_SKY2 is not set
539# CONFIG_SK98LIN is not set
540# CONFIG_VIA_VELOCITY is not set 544# CONFIG_VIA_VELOCITY is not set
541# CONFIG_TIGON3 is not set 545# CONFIG_TIGON3 is not set
542# CONFIG_BNX2 is not set 546# CONFIG_BNX2 is not set
@@ -554,6 +558,7 @@ CONFIG_NETDEV_10000=y
554# CONFIG_MLX4_CORE is not set 558# CONFIG_MLX4_CORE is not set
555# CONFIG_TEHUTI is not set 559# CONFIG_TEHUTI is not set
556# CONFIG_BNX2X is not set 560# CONFIG_BNX2X is not set
561# CONFIG_SFC is not set
557# CONFIG_TR is not set 562# CONFIG_TR is not set
558 563
559# 564#
@@ -561,6 +566,7 @@ CONFIG_NETDEV_10000=y
561# 566#
562# CONFIG_WLAN_PRE80211 is not set 567# CONFIG_WLAN_PRE80211 is not set
563# CONFIG_WLAN_80211 is not set 568# CONFIG_WLAN_80211 is not set
569# CONFIG_IWLWIFI_LEDS is not set
564# CONFIG_WAN is not set 570# CONFIG_WAN is not set
565# CONFIG_FDDI is not set 571# CONFIG_FDDI is not set
566CONFIG_PPP=y 572CONFIG_PPP=y
@@ -634,6 +640,7 @@ CONFIG_SERIO_LIBPS2=y
634# Character devices 640# Character devices
635# 641#
636# CONFIG_VT is not set 642# CONFIG_VT is not set
643CONFIG_DEVKMEM=y
637# CONFIG_SERIAL_NONSTANDARD is not set 644# CONFIG_SERIAL_NONSTANDARD is not set
638 645
639# 646#
@@ -668,12 +675,7 @@ CONFIG_HW_RANDOM=y
668# CONFIG_RAW_DRIVER is not set 675# CONFIG_RAW_DRIVER is not set
669CONFIG_DEVPORT=y 676CONFIG_DEVPORT=y
670# CONFIG_I2C is not set 677# CONFIG_I2C is not set
671
672#
673# SPI support
674#
675# CONFIG_SPI is not set 678# CONFIG_SPI is not set
676# CONFIG_SPI_MASTER is not set
677# CONFIG_W1 is not set 679# CONFIG_W1 is not set
678# CONFIG_POWER_SUPPLY is not set 680# CONFIG_POWER_SUPPLY is not set
679# CONFIG_HWMON is not set 681# CONFIG_HWMON is not set
@@ -690,12 +692,22 @@ CONFIG_SSB_POSSIBLE=y
690# Multifunction device drivers 692# Multifunction device drivers
691# 693#
692# CONFIG_MFD_SM501 is not set 694# CONFIG_MFD_SM501 is not set
695# CONFIG_HTC_PASIC3 is not set
693 696
694# 697#
695# Multimedia devices 698# Multimedia devices
696# 699#
700
701#
702# Multimedia core support
703#
697# CONFIG_VIDEO_DEV is not set 704# CONFIG_VIDEO_DEV is not set
698# CONFIG_DVB_CORE is not set 705# CONFIG_DVB_CORE is not set
706# CONFIG_VIDEO_MEDIA is not set
707
708#
709# Multimedia drivers
710#
699CONFIG_DAB=y 711CONFIG_DAB=y
700 712
701# 713#
@@ -722,13 +734,10 @@ CONFIG_DAB=y
722# CONFIG_MMC is not set 734# CONFIG_MMC is not set
723# CONFIG_MEMSTICK is not set 735# CONFIG_MEMSTICK is not set
724# CONFIG_NEW_LEDS is not set 736# CONFIG_NEW_LEDS is not set
737# CONFIG_ACCESSIBILITY is not set
725# CONFIG_INFINIBAND is not set 738# CONFIG_INFINIBAND is not set
726# CONFIG_RTC_CLASS is not set 739# CONFIG_RTC_CLASS is not set
727# CONFIG_DMADEVICES is not set 740# CONFIG_DMADEVICES is not set
728
729#
730# Userspace I/O
731#
732# CONFIG_UIO is not set 741# CONFIG_UIO is not set
733 742
734# 743#
@@ -798,7 +807,6 @@ CONFIG_NETWORK_FILESYSTEMS=y
798CONFIG_NFS_FS=y 807CONFIG_NFS_FS=y
799CONFIG_NFS_V3=y 808CONFIG_NFS_V3=y
800CONFIG_NFS_V3_ACL=y 809CONFIG_NFS_V3_ACL=y
801# CONFIG_NFS_DIRECTIO is not set
802# CONFIG_NFSD is not set 810# CONFIG_NFSD is not set
803CONFIG_ROOT_NFS=y 811CONFIG_ROOT_NFS=y
804CONFIG_LOCKD=y 812CONFIG_LOCKD=y
@@ -877,6 +885,7 @@ CONFIG_NLS_UTF8=y
877# Library routines 885# Library routines
878# 886#
879CONFIG_BITREVERSE=y 887CONFIG_BITREVERSE=y
888# CONFIG_GENERIC_FIND_FIRST_BIT is not set
880CONFIG_CRC_CCITT=y 889CONFIG_CRC_CCITT=y
881# CONFIG_CRC16 is not set 890# CONFIG_CRC16 is not set
882# CONFIG_CRC_ITU_T is not set 891# CONFIG_CRC_ITU_T is not set
@@ -889,6 +898,7 @@ CONFIG_PLIST=y
889CONFIG_HAS_IOMEM=y 898CONFIG_HAS_IOMEM=y
890CONFIG_HAS_IOPORT=y 899CONFIG_HAS_IOPORT=y
891CONFIG_HAS_DMA=y 900CONFIG_HAS_DMA=y
901CONFIG_HAVE_LMB=y
892 902
893# 903#
894# Kernel hacking 904# Kernel hacking
@@ -896,6 +906,7 @@ CONFIG_HAS_DMA=y
896# CONFIG_PRINTK_TIME is not set 906# CONFIG_PRINTK_TIME is not set
897CONFIG_ENABLE_WARN_DEPRECATED=y 907CONFIG_ENABLE_WARN_DEPRECATED=y
898CONFIG_ENABLE_MUST_CHECK=y 908CONFIG_ENABLE_MUST_CHECK=y
909CONFIG_FRAME_WARN=1024
899CONFIG_MAGIC_SYSRQ=y 910CONFIG_MAGIC_SYSRQ=y
900# CONFIG_UNUSED_SYMBOLS is not set 911# CONFIG_UNUSED_SYMBOLS is not set
901# CONFIG_DEBUG_FS is not set 912# CONFIG_DEBUG_FS is not set
@@ -906,6 +917,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
906CONFIG_SCHED_DEBUG=y 917CONFIG_SCHED_DEBUG=y
907# CONFIG_SCHEDSTATS is not set 918# CONFIG_SCHEDSTATS is not set
908# CONFIG_TIMER_STATS is not set 919# CONFIG_TIMER_STATS is not set
920# CONFIG_DEBUG_OBJECTS is not set
909# CONFIG_SLUB_DEBUG_ON is not set 921# CONFIG_SLUB_DEBUG_ON is not set
910# CONFIG_SLUB_STATS is not set 922# CONFIG_SLUB_STATS is not set
911# CONFIG_DEBUG_RT_MUTEXES is not set 923# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -918,6 +930,7 @@ CONFIG_SCHED_DEBUG=y
918CONFIG_DEBUG_BUGVERBOSE=y 930CONFIG_DEBUG_BUGVERBOSE=y
919CONFIG_DEBUG_INFO=y 931CONFIG_DEBUG_INFO=y
920# CONFIG_DEBUG_VM is not set 932# CONFIG_DEBUG_VM is not set
933# CONFIG_DEBUG_WRITECOUNT is not set
921# CONFIG_DEBUG_LIST is not set 934# CONFIG_DEBUG_LIST is not set
922# CONFIG_DEBUG_SG is not set 935# CONFIG_DEBUG_SG is not set
923# CONFIG_BOOT_PRINTK_DELAY is not set 936# CONFIG_BOOT_PRINTK_DELAY is not set
@@ -929,6 +942,7 @@ CONFIG_DEBUG_INFO=y
929# CONFIG_DEBUG_PAGEALLOC is not set 942# CONFIG_DEBUG_PAGEALLOC is not set
930# CONFIG_DEBUGGER is not set 943# CONFIG_DEBUGGER is not set
931# CONFIG_KGDB_CONSOLE is not set 944# CONFIG_KGDB_CONSOLE is not set
945# CONFIG_IRQSTACKS is not set
932CONFIG_BDI_SWITCH=y 946CONFIG_BDI_SWITCH=y
933# CONFIG_PPC_EARLY_DEBUG is not set 947# CONFIG_PPC_EARLY_DEBUG is not set
934 948
@@ -938,45 +952,75 @@ CONFIG_BDI_SWITCH=y
938# CONFIG_KEYS is not set 952# CONFIG_KEYS is not set
939# CONFIG_SECURITY is not set 953# CONFIG_SECURITY is not set
940CONFIG_CRYPTO=y 954CONFIG_CRYPTO=y
955
956#
957# Crypto core or helper
958#
941CONFIG_CRYPTO_ALGAPI=y 959CONFIG_CRYPTO_ALGAPI=y
942CONFIG_CRYPTO_BLKCIPHER=y 960CONFIG_CRYPTO_BLKCIPHER=y
943# CONFIG_CRYPTO_SEQIV is not set
944CONFIG_CRYPTO_MANAGER=y 961CONFIG_CRYPTO_MANAGER=y
945# CONFIG_CRYPTO_HMAC is not set
946# CONFIG_CRYPTO_NULL is not set 962# CONFIG_CRYPTO_NULL is not set
963# CONFIG_CRYPTO_CRYPTD is not set
964# CONFIG_CRYPTO_AUTHENC is not set
965
966#
967# Authenticated Encryption with Associated Data
968#
969# CONFIG_CRYPTO_CCM is not set
970# CONFIG_CRYPTO_GCM is not set
971# CONFIG_CRYPTO_SEQIV is not set
972
973#
974# Block modes
975#
976CONFIG_CRYPTO_CBC=y
977# CONFIG_CRYPTO_CTR is not set
978# CONFIG_CRYPTO_CTS is not set
979CONFIG_CRYPTO_ECB=y
980CONFIG_CRYPTO_PCBC=y
981
982#
983# Hash modes
984#
985# CONFIG_CRYPTO_HMAC is not set
986
987#
988# Digest
989#
990# CONFIG_CRYPTO_CRC32C is not set
947# CONFIG_CRYPTO_MD4 is not set 991# CONFIG_CRYPTO_MD4 is not set
948CONFIG_CRYPTO_MD5=y 992CONFIG_CRYPTO_MD5=y
993# CONFIG_CRYPTO_MICHAEL_MIC is not set
949# CONFIG_CRYPTO_SHA1 is not set 994# CONFIG_CRYPTO_SHA1 is not set
950# CONFIG_CRYPTO_SHA256 is not set 995# CONFIG_CRYPTO_SHA256 is not set
951# CONFIG_CRYPTO_SHA512 is not set 996# CONFIG_CRYPTO_SHA512 is not set
952# CONFIG_CRYPTO_WP512 is not set
953# CONFIG_CRYPTO_TGR192 is not set 997# CONFIG_CRYPTO_TGR192 is not set
954CONFIG_CRYPTO_ECB=y 998# CONFIG_CRYPTO_WP512 is not set
955CONFIG_CRYPTO_CBC=y 999
956CONFIG_CRYPTO_PCBC=y 1000#
957# CONFIG_CRYPTO_CTR is not set 1001# Ciphers
958# CONFIG_CRYPTO_GCM is not set 1002#
959# CONFIG_CRYPTO_CCM is not set
960# CONFIG_CRYPTO_CRYPTD is not set
961CONFIG_CRYPTO_DES=y
962# CONFIG_CRYPTO_FCRYPT is not set
963# CONFIG_CRYPTO_BLOWFISH is not set
964# CONFIG_CRYPTO_TWOFISH is not set
965# CONFIG_CRYPTO_SERPENT is not set
966# CONFIG_CRYPTO_AES is not set 1003# CONFIG_CRYPTO_AES is not set
1004# CONFIG_CRYPTO_ANUBIS is not set
1005# CONFIG_CRYPTO_ARC4 is not set
1006# CONFIG_CRYPTO_BLOWFISH is not set
1007# CONFIG_CRYPTO_CAMELLIA is not set
967# CONFIG_CRYPTO_CAST5 is not set 1008# CONFIG_CRYPTO_CAST5 is not set
968# CONFIG_CRYPTO_CAST6 is not set 1009# CONFIG_CRYPTO_CAST6 is not set
969# CONFIG_CRYPTO_TEA is not set 1010CONFIG_CRYPTO_DES=y
970# CONFIG_CRYPTO_ARC4 is not set 1011# CONFIG_CRYPTO_FCRYPT is not set
971# CONFIG_CRYPTO_KHAZAD is not set 1012# CONFIG_CRYPTO_KHAZAD is not set
972# CONFIG_CRYPTO_ANUBIS is not set
973# CONFIG_CRYPTO_SEED is not set 1013# CONFIG_CRYPTO_SEED is not set
1014# CONFIG_CRYPTO_SERPENT is not set
1015# CONFIG_CRYPTO_TEA is not set
1016# CONFIG_CRYPTO_TWOFISH is not set
1017
1018#
1019# Compression
1020#
974# CONFIG_CRYPTO_DEFLATE is not set 1021# CONFIG_CRYPTO_DEFLATE is not set
975# CONFIG_CRYPTO_MICHAEL_MIC is not set
976# CONFIG_CRYPTO_CRC32C is not set
977# CONFIG_CRYPTO_CAMELLIA is not set
978# CONFIG_CRYPTO_AUTHENC is not set
979# CONFIG_CRYPTO_LZO is not set 1022# CONFIG_CRYPTO_LZO is not set
980# CONFIG_CRYPTO_HW is not set 1023# CONFIG_CRYPTO_HW is not set
981# CONFIG_PPC_CLOCK is not set 1024# CONFIG_PPC_CLOCK is not set
982CONFIG_PPC_LIB_RHEAP=y 1025CONFIG_PPC_LIB_RHEAP=y
1026# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/mpc83xx_defconfig b/arch/powerpc/configs/mpc83xx_defconfig
index 9e0dd8201691..4293c8be06e1 100644
--- a/arch/powerpc/configs/mpc83xx_defconfig
+++ b/arch/powerpc/configs/mpc83xx_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.25-rc9 3# Linux kernel version: 2.6.26-rc5
4# Tue Apr 15 18:07:36 2008 4# Mon Jun 9 08:52:14 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -31,6 +31,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y 31CONFIG_GENERIC_HARDIRQS=y
32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
33CONFIG_IRQ_PER_CPU=y 33CONFIG_IRQ_PER_CPU=y
34CONFIG_STACKTRACE_SUPPORT=y
35CONFIG_LOCKDEP_SUPPORT=y
34CONFIG_RWSEM_XCHGADD_ALGORITHM=y 36CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y 37CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y 38CONFIG_GENERIC_HWEIGHT=y
@@ -86,6 +88,7 @@ CONFIG_INITRAMFS_SOURCE=""
86CONFIG_SYSCTL=y 88CONFIG_SYSCTL=y
87CONFIG_EMBEDDED=y 89CONFIG_EMBEDDED=y
88CONFIG_SYSCTL_SYSCALL=y 90CONFIG_SYSCTL_SYSCALL=y
91CONFIG_SYSCTL_SYSCALL_CHECK=y
89CONFIG_KALLSYMS=y 92CONFIG_KALLSYMS=y
90# CONFIG_KALLSYMS_EXTRA_PASS is not set 93# CONFIG_KALLSYMS_EXTRA_PASS is not set
91CONFIG_HOTPLUG=y 94CONFIG_HOTPLUG=y
@@ -111,12 +114,14 @@ CONFIG_HAVE_OPROFILE=y
111# CONFIG_KPROBES is not set 114# CONFIG_KPROBES is not set
112CONFIG_HAVE_KPROBES=y 115CONFIG_HAVE_KPROBES=y
113CONFIG_HAVE_KRETPROBES=y 116CONFIG_HAVE_KRETPROBES=y
117# CONFIG_HAVE_DMA_ATTRS is not set
114CONFIG_PROC_PAGE_MONITOR=y 118CONFIG_PROC_PAGE_MONITOR=y
115CONFIG_SLABINFO=y 119CONFIG_SLABINFO=y
116CONFIG_RT_MUTEXES=y 120CONFIG_RT_MUTEXES=y
117# CONFIG_TINY_SHMEM is not set 121# CONFIG_TINY_SHMEM is not set
118CONFIG_BASE_SMALL=0 122CONFIG_BASE_SMALL=0
119CONFIG_MODULES=y 123CONFIG_MODULES=y
124# CONFIG_MODULE_FORCE_LOAD is not set
120CONFIG_MODULE_UNLOAD=y 125CONFIG_MODULE_UNLOAD=y
121# CONFIG_MODULE_FORCE_UNLOAD is not set 126# CONFIG_MODULE_FORCE_UNLOAD is not set
122# CONFIG_MODVERSIONS is not set 127# CONFIG_MODVERSIONS is not set
@@ -201,7 +206,6 @@ CONFIG_PREEMPT_NONE=y
201# CONFIG_PREEMPT is not set 206# CONFIG_PREEMPT is not set
202CONFIG_BINFMT_ELF=y 207CONFIG_BINFMT_ELF=y
203# CONFIG_BINFMT_MISC is not set 208# CONFIG_BINFMT_MISC is not set
204CONFIG_FORCE_MAX_ZONEORDER=11
205CONFIG_MATH_EMULATION=y 209CONFIG_MATH_EMULATION=y
206# CONFIG_IOMMU_HELPER is not set 210# CONFIG_IOMMU_HELPER is not set
207CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 211CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
@@ -217,11 +221,13 @@ CONFIG_FLATMEM=y
217CONFIG_FLAT_NODE_MEM_MAP=y 221CONFIG_FLAT_NODE_MEM_MAP=y
218# CONFIG_SPARSEMEM_STATIC is not set 222# CONFIG_SPARSEMEM_STATIC is not set
219# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 223# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
224CONFIG_PAGEFLAGS_EXTENDED=y
220CONFIG_SPLIT_PTLOCK_CPUS=4 225CONFIG_SPLIT_PTLOCK_CPUS=4
221# CONFIG_RESOURCES_64BIT is not set 226# CONFIG_RESOURCES_64BIT is not set
222CONFIG_ZONE_DMA_FLAG=1 227CONFIG_ZONE_DMA_FLAG=1
223CONFIG_BOUNCE=y 228CONFIG_BOUNCE=y
224CONFIG_VIRT_TO_BUS=y 229CONFIG_VIRT_TO_BUS=y
230CONFIG_FORCE_MAX_ZONEORDER=11
225CONFIG_PROC_DEVICETREE=y 231CONFIG_PROC_DEVICETREE=y
226# CONFIG_CMDLINE_BOOL is not set 232# CONFIG_CMDLINE_BOOL is not set
227# CONFIG_PM is not set 233# CONFIG_PM is not set
@@ -240,6 +246,7 @@ CONFIG_FSL_SOC=y
240# CONFIG_PCI_SYSCALL is not set 246# CONFIG_PCI_SYSCALL is not set
241# CONFIG_ARCH_SUPPORTS_MSI is not set 247# CONFIG_ARCH_SUPPORTS_MSI is not set
242# CONFIG_PCCARD is not set 248# CONFIG_PCCARD is not set
249# CONFIG_HAS_RAPIDIO is not set
243 250
244# 251#
245# Advanced setup 252# Advanced setup
@@ -249,11 +256,11 @@ CONFIG_FSL_SOC=y
249# 256#
250# Default settings for advanced configuration options are used 257# Default settings for advanced configuration options are used
251# 258#
252CONFIG_HIGHMEM_START=0xfe000000
253CONFIG_LOWMEM_SIZE=0x30000000 259CONFIG_LOWMEM_SIZE=0x30000000
260CONFIG_PAGE_OFFSET=0xc0000000
254CONFIG_KERNEL_START=0xc0000000 261CONFIG_KERNEL_START=0xc0000000
262CONFIG_PHYSICAL_START=0x00000000
255CONFIG_TASK_SIZE=0xc0000000 263CONFIG_TASK_SIZE=0xc0000000
256CONFIG_BOOT_LOAD=0x00800000
257 264
258# 265#
259# Networking 266# Networking
@@ -301,8 +308,6 @@ CONFIG_TCP_CONG_CUBIC=y
301CONFIG_DEFAULT_TCP_CONG="cubic" 308CONFIG_DEFAULT_TCP_CONG="cubic"
302# CONFIG_TCP_MD5SIG is not set 309# CONFIG_TCP_MD5SIG is not set
303# CONFIG_IPV6 is not set 310# CONFIG_IPV6 is not set
304# CONFIG_INET6_XFRM_TUNNEL is not set
305# CONFIG_INET6_TUNNEL is not set
306# CONFIG_NETWORK_SECMARK is not set 311# CONFIG_NETWORK_SECMARK is not set
307# CONFIG_NETFILTER is not set 312# CONFIG_NETFILTER is not set
308# CONFIG_IP_DCCP is not set 313# CONFIG_IP_DCCP is not set
@@ -361,6 +366,7 @@ CONFIG_MTD_PARTITIONS=y
361# CONFIG_MTD_REDBOOT_PARTS is not set 366# CONFIG_MTD_REDBOOT_PARTS is not set
362# CONFIG_MTD_CMDLINE_PARTS is not set 367# CONFIG_MTD_CMDLINE_PARTS is not set
363CONFIG_MTD_OF_PARTS=y 368CONFIG_MTD_OF_PARTS=y
369# CONFIG_MTD_AR7_PARTS is not set
364 370
365# 371#
366# User Modules And Translation Layers 372# User Modules And Translation Layers
@@ -439,6 +445,7 @@ CONFIG_MTD_NAND_FSL_ELBC=y
439# 445#
440# CONFIG_MTD_UBI is not set 446# CONFIG_MTD_UBI is not set
441CONFIG_OF_DEVICE=y 447CONFIG_OF_DEVICE=y
448CONFIG_OF_I2C=y
442# CONFIG_PARPORT is not set 449# CONFIG_PARPORT is not set
443CONFIG_BLK_DEV=y 450CONFIG_BLK_DEV=y
444# CONFIG_BLK_DEV_FD is not set 451# CONFIG_BLK_DEV_FD is not set
@@ -501,8 +508,10 @@ CONFIG_SCSI_LOWLEVEL=y
501# CONFIG_SCSI_DEBUG is not set 508# CONFIG_SCSI_DEBUG is not set
502CONFIG_ATA=y 509CONFIG_ATA=y
503# CONFIG_ATA_NONSTANDARD is not set 510# CONFIG_ATA_NONSTANDARD is not set
504# CONFIG_SATA_MV is not set 511CONFIG_SATA_PMP=y
505CONFIG_SATA_FSL=y 512CONFIG_SATA_FSL=y
513CONFIG_ATA_SFF=y
514# CONFIG_SATA_MV is not set
506# CONFIG_PATA_PLATFORM is not set 515# CONFIG_PATA_PLATFORM is not set
507# CONFIG_MD is not set 516# CONFIG_MD is not set
508# CONFIG_MACINTOSH_DRIVERS is not set 517# CONFIG_MACINTOSH_DRIVERS is not set
@@ -554,6 +563,7 @@ CONFIG_NETDEV_10000=y
554# 563#
555# CONFIG_WLAN_PRE80211 is not set 564# CONFIG_WLAN_PRE80211 is not set
556# CONFIG_WLAN_80211 is not set 565# CONFIG_WLAN_80211 is not set
566# CONFIG_IWLWIFI_LEDS is not set
557 567
558# 568#
559# USB Network Adapters 569# USB Network Adapters
@@ -607,6 +617,7 @@ CONFIG_INPUT=y
607# Character devices 617# Character devices
608# 618#
609# CONFIG_VT is not set 619# CONFIG_VT is not set
620CONFIG_DEVKMEM=y
610# CONFIG_SERIAL_NONSTANDARD is not set 621# CONFIG_SERIAL_NONSTANDARD is not set
611 622
612# 623#
@@ -642,13 +653,6 @@ CONFIG_I2C_BOARDINFO=y
642CONFIG_I2C_CHARDEV=y 653CONFIG_I2C_CHARDEV=y
643 654
644# 655#
645# I2C Algorithms
646#
647# CONFIG_I2C_ALGOBIT is not set
648# CONFIG_I2C_ALGOPCF is not set
649# CONFIG_I2C_ALGOPCA is not set
650
651#
652# I2C Hardware Bus support 656# I2C Hardware Bus support
653# 657#
654CONFIG_I2C_MPC=y 658CONFIG_I2C_MPC=y
@@ -658,6 +662,7 @@ CONFIG_I2C_MPC=y
658# CONFIG_I2C_TAOS_EVM is not set 662# CONFIG_I2C_TAOS_EVM is not set
659# CONFIG_I2C_STUB is not set 663# CONFIG_I2C_STUB is not set
660# CONFIG_I2C_TINY_USB is not set 664# CONFIG_I2C_TINY_USB is not set
665# CONFIG_I2C_PCA_PLATFORM is not set
661 666
662# 667#
663# Miscellaneous I2C Chip support 668# Miscellaneous I2C Chip support
@@ -667,19 +672,13 @@ CONFIG_I2C_MPC=y
667# CONFIG_SENSORS_PCF8574 is not set 672# CONFIG_SENSORS_PCF8574 is not set
668# CONFIG_PCF8575 is not set 673# CONFIG_PCF8575 is not set
669# CONFIG_SENSORS_PCF8591 is not set 674# CONFIG_SENSORS_PCF8591 is not set
670# CONFIG_TPS65010 is not set
671# CONFIG_SENSORS_MAX6875 is not set 675# CONFIG_SENSORS_MAX6875 is not set
672# CONFIG_SENSORS_TSL2550 is not set 676# CONFIG_SENSORS_TSL2550 is not set
673# CONFIG_I2C_DEBUG_CORE is not set 677# CONFIG_I2C_DEBUG_CORE is not set
674# CONFIG_I2C_DEBUG_ALGO is not set 678# CONFIG_I2C_DEBUG_ALGO is not set
675# CONFIG_I2C_DEBUG_BUS is not set 679# CONFIG_I2C_DEBUG_BUS is not set
676# CONFIG_I2C_DEBUG_CHIP is not set 680# CONFIG_I2C_DEBUG_CHIP is not set
677
678#
679# SPI support
680#
681# CONFIG_SPI is not set 681# CONFIG_SPI is not set
682# CONFIG_SPI_MASTER is not set
683# CONFIG_W1 is not set 682# CONFIG_W1 is not set
684# CONFIG_POWER_SUPPLY is not set 683# CONFIG_POWER_SUPPLY is not set
685CONFIG_HWMON=y 684CONFIG_HWMON=y
@@ -757,12 +756,22 @@ CONFIG_SSB_POSSIBLE=y
757# Multifunction device drivers 756# Multifunction device drivers
758# 757#
759# CONFIG_MFD_SM501 is not set 758# CONFIG_MFD_SM501 is not set
759# CONFIG_HTC_PASIC3 is not set
760 760
761# 761#
762# Multimedia devices 762# Multimedia devices
763# 763#
764
765#
766# Multimedia core support
767#
764# CONFIG_VIDEO_DEV is not set 768# CONFIG_VIDEO_DEV is not set
765# CONFIG_DVB_CORE is not set 769# CONFIG_DVB_CORE is not set
770# CONFIG_VIDEO_MEDIA is not set
771
772#
773# Multimedia drivers
774#
766CONFIG_DAB=y 775CONFIG_DAB=y
767# CONFIG_USB_DABUSB is not set 776# CONFIG_USB_DABUSB is not set
768 777
@@ -810,16 +819,20 @@ CONFIG_USB=y
810CONFIG_USB_DEVICE_CLASS=y 819CONFIG_USB_DEVICE_CLASS=y
811# CONFIG_USB_DYNAMIC_MINORS is not set 820# CONFIG_USB_DYNAMIC_MINORS is not set
812# CONFIG_USB_OTG is not set 821# CONFIG_USB_OTG is not set
822# CONFIG_USB_OTG_WHITELIST is not set
823# CONFIG_USB_OTG_BLACKLIST_HUB is not set
813 824
814# 825#
815# USB Host Controller Drivers 826# USB Host Controller Drivers
816# 827#
828# CONFIG_USB_C67X00_HCD is not set
817CONFIG_USB_EHCI_HCD=y 829CONFIG_USB_EHCI_HCD=y
818CONFIG_USB_EHCI_ROOT_HUB_TT=y 830CONFIG_USB_EHCI_ROOT_HUB_TT=y
819# CONFIG_USB_EHCI_TT_NEWSCHED is not set 831# CONFIG_USB_EHCI_TT_NEWSCHED is not set
820CONFIG_USB_EHCI_FSL=y 832CONFIG_USB_EHCI_FSL=y
821CONFIG_USB_EHCI_HCD_PPC_OF=y 833CONFIG_USB_EHCI_HCD_PPC_OF=y
822# CONFIG_USB_ISP116X_HCD is not set 834# CONFIG_USB_ISP116X_HCD is not set
835# CONFIG_USB_ISP1760_HCD is not set
823# CONFIG_USB_SL811_HCD is not set 836# CONFIG_USB_SL811_HCD is not set
824# CONFIG_USB_R8A66597_HCD is not set 837# CONFIG_USB_R8A66597_HCD is not set
825 838
@@ -828,6 +841,7 @@ CONFIG_USB_EHCI_HCD_PPC_OF=y
828# 841#
829# CONFIG_USB_ACM is not set 842# CONFIG_USB_ACM is not set
830# CONFIG_USB_PRINTER is not set 843# CONFIG_USB_PRINTER is not set
844# CONFIG_USB_WDM is not set
831 845
832# 846#
833# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 847# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -873,17 +887,15 @@ CONFIG_USB_MON=y
873# CONFIG_USB_LD is not set 887# CONFIG_USB_LD is not set
874# CONFIG_USB_TRANCEVIBRATOR is not set 888# CONFIG_USB_TRANCEVIBRATOR is not set
875# CONFIG_USB_IOWARRIOR is not set 889# CONFIG_USB_IOWARRIOR is not set
890# CONFIG_USB_ISIGHTFW is not set
876# CONFIG_USB_GADGET is not set 891# CONFIG_USB_GADGET is not set
877# CONFIG_MMC is not set 892# CONFIG_MMC is not set
878# CONFIG_MEMSTICK is not set 893# CONFIG_MEMSTICK is not set
879# CONFIG_NEW_LEDS is not set 894# CONFIG_NEW_LEDS is not set
895# CONFIG_ACCESSIBILITY is not set
880# CONFIG_EDAC is not set 896# CONFIG_EDAC is not set
881# CONFIG_RTC_CLASS is not set 897# CONFIG_RTC_CLASS is not set
882# CONFIG_DMADEVICES is not set 898# CONFIG_DMADEVICES is not set
883
884#
885# Userspace I/O
886#
887# CONFIG_UIO is not set 899# CONFIG_UIO is not set
888 900
889# 901#
@@ -903,7 +915,6 @@ CONFIG_FS_MBCACHE=y
903# CONFIG_JFS_FS is not set 915# CONFIG_JFS_FS is not set
904# CONFIG_FS_POSIX_ACL is not set 916# CONFIG_FS_POSIX_ACL is not set
905# CONFIG_XFS_FS is not set 917# CONFIG_XFS_FS is not set
906# CONFIG_GFS2_FS is not set
907# CONFIG_OCFS2_FS is not set 918# CONFIG_OCFS2_FS is not set
908CONFIG_DNOTIFY=y 919CONFIG_DNOTIFY=y
909CONFIG_INOTIFY=y 920CONFIG_INOTIFY=y
@@ -962,7 +973,6 @@ CONFIG_NFS_FS=y
962CONFIG_NFS_V3=y 973CONFIG_NFS_V3=y
963# CONFIG_NFS_V3_ACL is not set 974# CONFIG_NFS_V3_ACL is not set
964CONFIG_NFS_V4=y 975CONFIG_NFS_V4=y
965# CONFIG_NFS_DIRECTIO is not set
966# CONFIG_NFSD is not set 976# CONFIG_NFSD is not set
967CONFIG_ROOT_NFS=y 977CONFIG_ROOT_NFS=y
968CONFIG_LOCKD=y 978CONFIG_LOCKD=y
@@ -1009,6 +1019,7 @@ CONFIG_UCC=y
1009# Library routines 1019# Library routines
1010# 1020#
1011CONFIG_BITREVERSE=y 1021CONFIG_BITREVERSE=y
1022# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1012# CONFIG_CRC_CCITT is not set 1023# CONFIG_CRC_CCITT is not set
1013# CONFIG_CRC16 is not set 1024# CONFIG_CRC16 is not set
1014# CONFIG_CRC_ITU_T is not set 1025# CONFIG_CRC_ITU_T is not set
@@ -1027,6 +1038,7 @@ CONFIG_HAVE_LMB=y
1027# CONFIG_PRINTK_TIME is not set 1038# CONFIG_PRINTK_TIME is not set
1028CONFIG_ENABLE_WARN_DEPRECATED=y 1039CONFIG_ENABLE_WARN_DEPRECATED=y
1029CONFIG_ENABLE_MUST_CHECK=y 1040CONFIG_ENABLE_MUST_CHECK=y
1041CONFIG_FRAME_WARN=1024
1030# CONFIG_MAGIC_SYSRQ is not set 1042# CONFIG_MAGIC_SYSRQ is not set
1031# CONFIG_UNUSED_SYMBOLS is not set 1043# CONFIG_UNUSED_SYMBOLS is not set
1032# CONFIG_DEBUG_FS is not set 1044# CONFIG_DEBUG_FS is not set
@@ -1034,6 +1046,7 @@ CONFIG_ENABLE_MUST_CHECK=y
1034# CONFIG_DEBUG_KERNEL is not set 1046# CONFIG_DEBUG_KERNEL is not set
1035# CONFIG_DEBUG_BUGVERBOSE is not set 1047# CONFIG_DEBUG_BUGVERBOSE is not set
1036# CONFIG_SAMPLES is not set 1048# CONFIG_SAMPLES is not set
1049# CONFIG_IRQSTACKS is not set
1037# CONFIG_PPC_EARLY_DEBUG is not set 1050# CONFIG_PPC_EARLY_DEBUG is not set
1038 1051
1039# 1052#
@@ -1043,51 +1056,81 @@ CONFIG_ENABLE_MUST_CHECK=y
1043# CONFIG_SECURITY is not set 1056# CONFIG_SECURITY is not set
1044# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1057# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1045CONFIG_CRYPTO=y 1058CONFIG_CRYPTO=y
1059
1060#
1061# Crypto core or helper
1062#
1046CONFIG_CRYPTO_ALGAPI=y 1063CONFIG_CRYPTO_ALGAPI=y
1047CONFIG_CRYPTO_BLKCIPHER=y 1064CONFIG_CRYPTO_BLKCIPHER=y
1048# CONFIG_CRYPTO_SEQIV is not set
1049CONFIG_CRYPTO_MANAGER=y 1065CONFIG_CRYPTO_MANAGER=y
1066# CONFIG_CRYPTO_GF128MUL is not set
1067# CONFIG_CRYPTO_NULL is not set
1068# CONFIG_CRYPTO_CRYPTD is not set
1069# CONFIG_CRYPTO_AUTHENC is not set
1070# CONFIG_CRYPTO_TEST is not set
1071
1072#
1073# Authenticated Encryption with Associated Data
1074#
1075# CONFIG_CRYPTO_CCM is not set
1076# CONFIG_CRYPTO_GCM is not set
1077# CONFIG_CRYPTO_SEQIV is not set
1078
1079#
1080# Block modes
1081#
1082CONFIG_CRYPTO_CBC=y
1083# CONFIG_CRYPTO_CTR is not set
1084# CONFIG_CRYPTO_CTS is not set
1085CONFIG_CRYPTO_ECB=m
1086# CONFIG_CRYPTO_LRW is not set
1087CONFIG_CRYPTO_PCBC=m
1088# CONFIG_CRYPTO_XTS is not set
1089
1090#
1091# Hash modes
1092#
1050# CONFIG_CRYPTO_HMAC is not set 1093# CONFIG_CRYPTO_HMAC is not set
1051# CONFIG_CRYPTO_XCBC is not set 1094# CONFIG_CRYPTO_XCBC is not set
1052# CONFIG_CRYPTO_NULL is not set 1095
1096#
1097# Digest
1098#
1099# CONFIG_CRYPTO_CRC32C is not set
1053# CONFIG_CRYPTO_MD4 is not set 1100# CONFIG_CRYPTO_MD4 is not set
1054CONFIG_CRYPTO_MD5=y 1101CONFIG_CRYPTO_MD5=y
1102# CONFIG_CRYPTO_MICHAEL_MIC is not set
1055# CONFIG_CRYPTO_SHA1 is not set 1103# CONFIG_CRYPTO_SHA1 is not set
1056# CONFIG_CRYPTO_SHA256 is not set 1104# CONFIG_CRYPTO_SHA256 is not set
1057# CONFIG_CRYPTO_SHA512 is not set 1105# CONFIG_CRYPTO_SHA512 is not set
1058# CONFIG_CRYPTO_WP512 is not set
1059# CONFIG_CRYPTO_TGR192 is not set 1106# CONFIG_CRYPTO_TGR192 is not set
1060# CONFIG_CRYPTO_GF128MUL is not set 1107# CONFIG_CRYPTO_WP512 is not set
1061CONFIG_CRYPTO_ECB=m 1108
1062CONFIG_CRYPTO_CBC=y 1109#
1063CONFIG_CRYPTO_PCBC=m 1110# Ciphers
1064# CONFIG_CRYPTO_LRW is not set 1111#
1065# CONFIG_CRYPTO_XTS is not set
1066# CONFIG_CRYPTO_CTR is not set
1067# CONFIG_CRYPTO_GCM is not set
1068# CONFIG_CRYPTO_CCM is not set
1069# CONFIG_CRYPTO_CRYPTD is not set
1070CONFIG_CRYPTO_DES=y
1071# CONFIG_CRYPTO_FCRYPT is not set
1072# CONFIG_CRYPTO_BLOWFISH is not set
1073# CONFIG_CRYPTO_TWOFISH is not set
1074# CONFIG_CRYPTO_SERPENT is not set
1075# CONFIG_CRYPTO_AES is not set 1112# CONFIG_CRYPTO_AES is not set
1113# CONFIG_CRYPTO_ANUBIS is not set
1114# CONFIG_CRYPTO_ARC4 is not set
1115# CONFIG_CRYPTO_BLOWFISH is not set
1116# CONFIG_CRYPTO_CAMELLIA is not set
1076# CONFIG_CRYPTO_CAST5 is not set 1117# CONFIG_CRYPTO_CAST5 is not set
1077# CONFIG_CRYPTO_CAST6 is not set 1118# CONFIG_CRYPTO_CAST6 is not set
1078# CONFIG_CRYPTO_TEA is not set 1119CONFIG_CRYPTO_DES=y
1079# CONFIG_CRYPTO_ARC4 is not set 1120# CONFIG_CRYPTO_FCRYPT is not set
1080# CONFIG_CRYPTO_KHAZAD is not set 1121# CONFIG_CRYPTO_KHAZAD is not set
1081# CONFIG_CRYPTO_ANUBIS is not set
1082# CONFIG_CRYPTO_SEED is not set
1083# CONFIG_CRYPTO_SALSA20 is not set 1122# CONFIG_CRYPTO_SALSA20 is not set
1123# CONFIG_CRYPTO_SEED is not set
1124# CONFIG_CRYPTO_SERPENT is not set
1125# CONFIG_CRYPTO_TEA is not set
1126# CONFIG_CRYPTO_TWOFISH is not set
1127
1128#
1129# Compression
1130#
1084# CONFIG_CRYPTO_DEFLATE is not set 1131# CONFIG_CRYPTO_DEFLATE is not set
1085# CONFIG_CRYPTO_MICHAEL_MIC is not set
1086# CONFIG_CRYPTO_CRC32C is not set
1087# CONFIG_CRYPTO_CAMELLIA is not set
1088# CONFIG_CRYPTO_TEST is not set
1089# CONFIG_CRYPTO_AUTHENC is not set
1090# CONFIG_CRYPTO_LZO is not set 1132# CONFIG_CRYPTO_LZO is not set
1091CONFIG_CRYPTO_HW=y 1133CONFIG_CRYPTO_HW=y
1092# CONFIG_PPC_CLOCK is not set 1134# CONFIG_PPC_CLOCK is not set
1093CONFIG_PPC_LIB_RHEAP=y 1135CONFIG_PPC_LIB_RHEAP=y
1136# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/mpc85xx_defconfig b/arch/powerpc/configs/mpc85xx_defconfig
index 2075722911bb..3efab71a603b 100644
--- a/arch/powerpc/configs/mpc85xx_defconfig
+++ b/arch/powerpc/configs/mpc85xx_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.25-rc7 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 31 11:37:08 2008 4# Mon Jun 9 09:03:46 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -32,6 +32,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 34CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_LOCKDEP_SUPPORT=y
35CONFIG_RWSEM_XCHGADD_ALGORITHM=y 37CONFIG_RWSEM_XCHGADD_ALGORITHM=y
36CONFIG_ARCH_HAS_ILOG2_U32=y 38CONFIG_ARCH_HAS_ILOG2_U32=y
37CONFIG_GENERIC_HWEIGHT=y 39CONFIG_GENERIC_HWEIGHT=y
@@ -90,6 +92,7 @@ CONFIG_INITRAMFS_SOURCE=""
90CONFIG_SYSCTL=y 92CONFIG_SYSCTL=y
91CONFIG_EMBEDDED=y 93CONFIG_EMBEDDED=y
92CONFIG_SYSCTL_SYSCALL=y 94CONFIG_SYSCTL_SYSCALL=y
95CONFIG_SYSCTL_SYSCALL_CHECK=y
93CONFIG_KALLSYMS=y 96CONFIG_KALLSYMS=y
94CONFIG_KALLSYMS_ALL=y 97CONFIG_KALLSYMS_ALL=y
95CONFIG_KALLSYMS_EXTRA_PASS=y 98CONFIG_KALLSYMS_EXTRA_PASS=y
@@ -117,12 +120,14 @@ CONFIG_HAVE_OPROFILE=y
117# CONFIG_KPROBES is not set 120# CONFIG_KPROBES is not set
118CONFIG_HAVE_KPROBES=y 121CONFIG_HAVE_KPROBES=y
119CONFIG_HAVE_KRETPROBES=y 122CONFIG_HAVE_KRETPROBES=y
123# CONFIG_HAVE_DMA_ATTRS is not set
120CONFIG_PROC_PAGE_MONITOR=y 124CONFIG_PROC_PAGE_MONITOR=y
121CONFIG_SLABINFO=y 125CONFIG_SLABINFO=y
122CONFIG_RT_MUTEXES=y 126CONFIG_RT_MUTEXES=y
123# CONFIG_TINY_SHMEM is not set 127# CONFIG_TINY_SHMEM is not set
124CONFIG_BASE_SMALL=0 128CONFIG_BASE_SMALL=0
125CONFIG_MODULES=y 129CONFIG_MODULES=y
130# CONFIG_MODULE_FORCE_LOAD is not set
126CONFIG_MODULE_UNLOAD=y 131CONFIG_MODULE_UNLOAD=y
127CONFIG_MODULE_FORCE_UNLOAD=y 132CONFIG_MODULE_FORCE_UNLOAD=y
128CONFIG_MODVERSIONS=y 133CONFIG_MODVERSIONS=y
@@ -162,6 +167,7 @@ CONFIG_MPC8560_ADS=y
162CONFIG_MPC85xx_CDS=y 167CONFIG_MPC85xx_CDS=y
163CONFIG_MPC85xx_MDS=y 168CONFIG_MPC85xx_MDS=y
164CONFIG_MPC85xx_DS=y 169CONFIG_MPC85xx_DS=y
170CONFIG_KSI8560=y
165# CONFIG_STX_GP3 is not set 171# CONFIG_STX_GP3 is not set
166CONFIG_TQM8540=y 172CONFIG_TQM8540=y
167CONFIG_TQM8541=y 173CONFIG_TQM8541=y
@@ -221,11 +227,13 @@ CONFIG_FLATMEM=y
221CONFIG_FLAT_NODE_MEM_MAP=y 227CONFIG_FLAT_NODE_MEM_MAP=y
222# CONFIG_SPARSEMEM_STATIC is not set 228# CONFIG_SPARSEMEM_STATIC is not set
223# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 229# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
230CONFIG_PAGEFLAGS_EXTENDED=y
224CONFIG_SPLIT_PTLOCK_CPUS=4 231CONFIG_SPLIT_PTLOCK_CPUS=4
225# CONFIG_RESOURCES_64BIT is not set 232# CONFIG_RESOURCES_64BIT is not set
226CONFIG_ZONE_DMA_FLAG=1 233CONFIG_ZONE_DMA_FLAG=1
227CONFIG_BOUNCE=y 234CONFIG_BOUNCE=y
228CONFIG_VIRT_TO_BUS=y 235CONFIG_VIRT_TO_BUS=y
236CONFIG_FORCE_MAX_ZONEORDER=11
229CONFIG_PROC_DEVICETREE=y 237CONFIG_PROC_DEVICETREE=y
230# CONFIG_CMDLINE_BOOL is not set 238# CONFIG_CMDLINE_BOOL is not set
231# CONFIG_PM is not set 239# CONFIG_PM is not set
@@ -250,6 +258,7 @@ CONFIG_PCI_LEGACY=y
250# CONFIG_PCI_DEBUG is not set 258# CONFIG_PCI_DEBUG is not set
251# CONFIG_PCCARD is not set 259# CONFIG_PCCARD is not set
252# CONFIG_HOTPLUG_PCI is not set 260# CONFIG_HOTPLUG_PCI is not set
261# CONFIG_HAS_RAPIDIO is not set
253 262
254# 263#
255# Advanced setup 264# Advanced setup
@@ -259,11 +268,12 @@ CONFIG_PCI_LEGACY=y
259# 268#
260# Default settings for advanced configuration options are used 269# Default settings for advanced configuration options are used
261# 270#
262CONFIG_HIGHMEM_START=0xfe000000
263CONFIG_LOWMEM_SIZE=0x30000000 271CONFIG_LOWMEM_SIZE=0x30000000
272CONFIG_PAGE_OFFSET=0xc0000000
264CONFIG_KERNEL_START=0xc0000000 273CONFIG_KERNEL_START=0xc0000000
274CONFIG_PHYSICAL_START=0x00000000
275CONFIG_PHYSICAL_ALIGN=0x10000000
265CONFIG_TASK_SIZE=0xc0000000 276CONFIG_TASK_SIZE=0xc0000000
266CONFIG_BOOT_LOAD=0x00800000
267 277
268# 278#
269# Networking 279# Networking
@@ -334,8 +344,10 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=y
334CONFIG_INET6_XFRM_MODE_BEET=y 344CONFIG_INET6_XFRM_MODE_BEET=y
335# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set 345# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
336CONFIG_IPV6_SIT=y 346CONFIG_IPV6_SIT=y
347CONFIG_IPV6_NDISC_NODETYPE=y
337# CONFIG_IPV6_TUNNEL is not set 348# CONFIG_IPV6_TUNNEL is not set
338# CONFIG_IPV6_MULTIPLE_TABLES is not set 349# CONFIG_IPV6_MULTIPLE_TABLES is not set
350# CONFIG_IPV6_MROUTE is not set
339# CONFIG_NETWORK_SECMARK is not set 351# CONFIG_NETWORK_SECMARK is not set
340# CONFIG_NETFILTER is not set 352# CONFIG_NETFILTER is not set
341# CONFIG_IP_DCCP is not set 353# CONFIG_IP_DCCP is not set
@@ -397,6 +409,7 @@ CONFIG_FW_LOADER=y
397# CONFIG_CONNECTOR is not set 409# CONFIG_CONNECTOR is not set
398# CONFIG_MTD is not set 410# CONFIG_MTD is not set
399CONFIG_OF_DEVICE=y 411CONFIG_OF_DEVICE=y
412CONFIG_OF_I2C=y
400# CONFIG_PARPORT is not set 413# CONFIG_PARPORT is not set
401CONFIG_BLK_DEV=y 414CONFIG_BLK_DEV=y
402# CONFIG_BLK_DEV_FD is not set 415# CONFIG_BLK_DEV_FD is not set
@@ -503,7 +516,11 @@ CONFIG_SCSI_LOWLEVEL=y
503# CONFIG_SCSI_SRP is not set 516# CONFIG_SCSI_SRP is not set
504CONFIG_ATA=y 517CONFIG_ATA=y
505# CONFIG_ATA_NONSTANDARD is not set 518# CONFIG_ATA_NONSTANDARD is not set
519CONFIG_SATA_PMP=y
506CONFIG_SATA_AHCI=y 520CONFIG_SATA_AHCI=y
521# CONFIG_SATA_SIL24 is not set
522CONFIG_SATA_FSL=y
523CONFIG_ATA_SFF=y
507# CONFIG_SATA_SVW is not set 524# CONFIG_SATA_SVW is not set
508# CONFIG_ATA_PIIX is not set 525# CONFIG_ATA_PIIX is not set
509# CONFIG_SATA_MV is not set 526# CONFIG_SATA_MV is not set
@@ -513,13 +530,11 @@ CONFIG_SATA_AHCI=y
513# CONFIG_SATA_PROMISE is not set 530# CONFIG_SATA_PROMISE is not set
514# CONFIG_SATA_SX4 is not set 531# CONFIG_SATA_SX4 is not set
515# CONFIG_SATA_SIL is not set 532# CONFIG_SATA_SIL is not set
516# CONFIG_SATA_SIL24 is not set
517# CONFIG_SATA_SIS is not set 533# CONFIG_SATA_SIS is not set
518# CONFIG_SATA_ULI is not set 534# CONFIG_SATA_ULI is not set
519# CONFIG_SATA_VIA is not set 535# CONFIG_SATA_VIA is not set
520# CONFIG_SATA_VITESSE is not set 536# CONFIG_SATA_VITESSE is not set
521# CONFIG_SATA_INIC162X is not set 537# CONFIG_SATA_INIC162X is not set
522# CONFIG_SATA_FSL is not set
523CONFIG_PATA_ALI=y 538CONFIG_PATA_ALI=y
524# CONFIG_PATA_AMD is not set 539# CONFIG_PATA_AMD is not set
525# CONFIG_PATA_ARTOP is not set 540# CONFIG_PATA_ARTOP is not set
@@ -559,6 +574,7 @@ CONFIG_PATA_ALI=y
559# CONFIG_PATA_VIA is not set 574# CONFIG_PATA_VIA is not set
560# CONFIG_PATA_WINBOND is not set 575# CONFIG_PATA_WINBOND is not set
561# CONFIG_PATA_PLATFORM is not set 576# CONFIG_PATA_PLATFORM is not set
577# CONFIG_PATA_SCH is not set
562# CONFIG_MD is not set 578# CONFIG_MD is not set
563# CONFIG_FUSION is not set 579# CONFIG_FUSION is not set
564 580
@@ -625,7 +641,6 @@ CONFIG_NETDEV_1000=y
625# CONFIG_SIS190 is not set 641# CONFIG_SIS190 is not set
626# CONFIG_SKGE is not set 642# CONFIG_SKGE is not set
627# CONFIG_SKY2 is not set 643# CONFIG_SKY2 is not set
628# CONFIG_SK98LIN is not set
629# CONFIG_VIA_VELOCITY is not set 644# CONFIG_VIA_VELOCITY is not set
630# CONFIG_TIGON3 is not set 645# CONFIG_TIGON3 is not set
631# CONFIG_BNX2 is not set 646# CONFIG_BNX2 is not set
@@ -646,6 +661,7 @@ CONFIG_NETDEV_10000=y
646# CONFIG_MLX4_CORE is not set 661# CONFIG_MLX4_CORE is not set
647# CONFIG_TEHUTI is not set 662# CONFIG_TEHUTI is not set
648# CONFIG_BNX2X is not set 663# CONFIG_BNX2X is not set
664# CONFIG_SFC is not set
649# CONFIG_TR is not set 665# CONFIG_TR is not set
650 666
651# 667#
@@ -653,6 +669,7 @@ CONFIG_NETDEV_10000=y
653# 669#
654# CONFIG_WLAN_PRE80211 is not set 670# CONFIG_WLAN_PRE80211 is not set
655# CONFIG_WLAN_80211 is not set 671# CONFIG_WLAN_80211 is not set
672# CONFIG_IWLWIFI_LEDS is not set
656 673
657# 674#
658# USB Network Adapters 675# USB Network Adapters
@@ -717,6 +734,7 @@ CONFIG_VT=y
717CONFIG_VT_CONSOLE=y 734CONFIG_VT_CONSOLE=y
718CONFIG_HW_CONSOLE=y 735CONFIG_HW_CONSOLE=y
719# CONFIG_VT_HW_CONSOLE_BINDING is not set 736# CONFIG_VT_HW_CONSOLE_BINDING is not set
737CONFIG_DEVKMEM=y
720# CONFIG_SERIAL_NONSTANDARD is not set 738# CONFIG_SERIAL_NONSTANDARD is not set
721# CONFIG_NOZOMI is not set 739# CONFIG_NOZOMI is not set
722 740
@@ -750,7 +768,6 @@ CONFIG_LEGACY_PTY_COUNT=256
750# CONFIG_IPMI_HANDLER is not set 768# CONFIG_IPMI_HANDLER is not set
751# CONFIG_HW_RANDOM is not set 769# CONFIG_HW_RANDOM is not set
752CONFIG_NVRAM=y 770CONFIG_NVRAM=y
753# CONFIG_GEN_RTC is not set
754# CONFIG_R3964 is not set 771# CONFIG_R3964 is not set
755# CONFIG_APPLICOM is not set 772# CONFIG_APPLICOM is not set
756# CONFIG_RAW_DRIVER is not set 773# CONFIG_RAW_DRIVER is not set
@@ -761,13 +778,6 @@ CONFIG_I2C_BOARDINFO=y
761# CONFIG_I2C_CHARDEV is not set 778# CONFIG_I2C_CHARDEV is not set
762 779
763# 780#
764# I2C Algorithms
765#
766# CONFIG_I2C_ALGOBIT is not set
767# CONFIG_I2C_ALGOPCF is not set
768# CONFIG_I2C_ALGOPCA is not set
769
770#
771# I2C Hardware Bus support 781# I2C Hardware Bus support
772# 782#
773# CONFIG_I2C_ALI1535 is not set 783# CONFIG_I2C_ALI1535 is not set
@@ -794,6 +804,7 @@ CONFIG_I2C_MPC=y
794# CONFIG_I2C_VIA is not set 804# CONFIG_I2C_VIA is not set
795# CONFIG_I2C_VIAPRO is not set 805# CONFIG_I2C_VIAPRO is not set
796# CONFIG_I2C_VOODOO3 is not set 806# CONFIG_I2C_VOODOO3 is not set
807# CONFIG_I2C_PCA_PLATFORM is not set
797 808
798# 809#
799# Miscellaneous I2C Chip support 810# Miscellaneous I2C Chip support
@@ -803,19 +814,13 @@ CONFIG_SENSORS_EEPROM=y
803# CONFIG_SENSORS_PCF8574 is not set 814# CONFIG_SENSORS_PCF8574 is not set
804# CONFIG_PCF8575 is not set 815# CONFIG_PCF8575 is not set
805# CONFIG_SENSORS_PCF8591 is not set 816# CONFIG_SENSORS_PCF8591 is not set
806# CONFIG_TPS65010 is not set
807# CONFIG_SENSORS_MAX6875 is not set 817# CONFIG_SENSORS_MAX6875 is not set
808# CONFIG_SENSORS_TSL2550 is not set 818# CONFIG_SENSORS_TSL2550 is not set
809# CONFIG_I2C_DEBUG_CORE is not set 819# CONFIG_I2C_DEBUG_CORE is not set
810# CONFIG_I2C_DEBUG_ALGO is not set 820# CONFIG_I2C_DEBUG_ALGO is not set
811# CONFIG_I2C_DEBUG_BUS is not set 821# CONFIG_I2C_DEBUG_BUS is not set
812# CONFIG_I2C_DEBUG_CHIP is not set 822# CONFIG_I2C_DEBUG_CHIP is not set
813
814#
815# SPI support
816#
817# CONFIG_SPI is not set 823# CONFIG_SPI is not set
818# CONFIG_SPI_MASTER is not set
819# CONFIG_W1 is not set 824# CONFIG_W1 is not set
820# CONFIG_POWER_SUPPLY is not set 825# CONFIG_POWER_SUPPLY is not set
821# CONFIG_HWMON is not set 826# CONFIG_HWMON is not set
@@ -832,13 +837,33 @@ CONFIG_SSB_POSSIBLE=y
832# Multifunction device drivers 837# Multifunction device drivers
833# 838#
834# CONFIG_MFD_SM501 is not set 839# CONFIG_MFD_SM501 is not set
840# CONFIG_HTC_PASIC3 is not set
835 841
836# 842#
837# Multimedia devices 843# Multimedia devices
838# 844#
845
846#
847# Multimedia core support
848#
839# CONFIG_VIDEO_DEV is not set 849# CONFIG_VIDEO_DEV is not set
840CONFIG_DVB_CORE=m 850CONFIG_DVB_CORE=m
841# CONFIG_DVB_CORE_ATTACH is not set 851CONFIG_VIDEO_MEDIA=m
852
853#
854# Multimedia drivers
855#
856# CONFIG_MEDIA_ATTACH is not set
857CONFIG_MEDIA_TUNER=m
858# CONFIG_MEDIA_TUNER_CUSTOMIZE is not set
859CONFIG_MEDIA_TUNER_SIMPLE=m
860CONFIG_MEDIA_TUNER_TDA8290=m
861CONFIG_MEDIA_TUNER_TDA9887=m
862CONFIG_MEDIA_TUNER_TEA5761=m
863CONFIG_MEDIA_TUNER_TEA5767=m
864CONFIG_MEDIA_TUNER_MT20XX=m
865CONFIG_MEDIA_TUNER_XC2028=m
866CONFIG_MEDIA_TUNER_XC5000=m
842CONFIG_DVB_CAPTURE_DRIVERS=y 867CONFIG_DVB_CAPTURE_DRIVERS=y
843 868
844# 869#
@@ -881,14 +906,17 @@ CONFIG_DVB_CAPTURE_DRIVERS=y
881# 906#
882# DVB-S (satellite) frontends 907# DVB-S (satellite) frontends
883# 908#
884# CONFIG_DVB_STV0299 is not set
885# CONFIG_DVB_CX24110 is not set 909# CONFIG_DVB_CX24110 is not set
886# CONFIG_DVB_CX24123 is not set 910# CONFIG_DVB_CX24123 is not set
887# CONFIG_DVB_TDA8083 is not set
888# CONFIG_DVB_MT312 is not set 911# CONFIG_DVB_MT312 is not set
889# CONFIG_DVB_VES1X93 is not set
890# CONFIG_DVB_S5H1420 is not set 912# CONFIG_DVB_S5H1420 is not set
913# CONFIG_DVB_STV0299 is not set
914# CONFIG_DVB_TDA8083 is not set
891# CONFIG_DVB_TDA10086 is not set 915# CONFIG_DVB_TDA10086 is not set
916# CONFIG_DVB_VES1X93 is not set
917# CONFIG_DVB_TUNER_ITD1000 is not set
918# CONFIG_DVB_TDA826X is not set
919# CONFIG_DVB_TUA6100 is not set
892 920
893# 921#
894# DVB-T (terrestrial) frontends 922# DVB-T (terrestrial) frontends
@@ -906,6 +934,7 @@ CONFIG_DVB_CAPTURE_DRIVERS=y
906# CONFIG_DVB_DIB3000MC is not set 934# CONFIG_DVB_DIB3000MC is not set
907# CONFIG_DVB_DIB7000M is not set 935# CONFIG_DVB_DIB7000M is not set
908# CONFIG_DVB_DIB7000P is not set 936# CONFIG_DVB_DIB7000P is not set
937# CONFIG_DVB_TDA10048 is not set
909 938
910# 939#
911# DVB-C (cable) frontends 940# DVB-C (cable) frontends
@@ -924,27 +953,21 @@ CONFIG_DVB_CAPTURE_DRIVERS=y
924# CONFIG_DVB_BCM3510 is not set 953# CONFIG_DVB_BCM3510 is not set
925# CONFIG_DVB_LGDT330X is not set 954# CONFIG_DVB_LGDT330X is not set
926# CONFIG_DVB_S5H1409 is not set 955# CONFIG_DVB_S5H1409 is not set
956# CONFIG_DVB_AU8522 is not set
957# CONFIG_DVB_S5H1411 is not set
927 958
928# 959#
929# Tuners/PLL support 960# Digital terrestrial only tuners/PLL
930# 961#
931# CONFIG_DVB_PLL is not set 962# CONFIG_DVB_PLL is not set
932# CONFIG_DVB_TDA826X is not set
933# CONFIG_DVB_TDA827X is not set
934# CONFIG_DVB_TDA18271 is not set
935# CONFIG_DVB_TUNER_QT1010 is not set
936# CONFIG_DVB_TUNER_MT2060 is not set
937# CONFIG_DVB_TUNER_MT2266 is not set
938# CONFIG_DVB_TUNER_MT2131 is not set
939# CONFIG_DVB_TUNER_DIB0070 is not set 963# CONFIG_DVB_TUNER_DIB0070 is not set
940# CONFIG_DVB_TUNER_XC5000 is not set
941 964
942# 965#
943# Miscellaneous devices 966# SEC control devices for DVB-S
944# 967#
945# CONFIG_DVB_LNBP21 is not set 968# CONFIG_DVB_LNBP21 is not set
969# CONFIG_DVB_ISL6405 is not set
946# CONFIG_DVB_ISL6421 is not set 970# CONFIG_DVB_ISL6421 is not set
947# CONFIG_DVB_TUA6100 is not set
948CONFIG_DAB=y 971CONFIG_DAB=y
949# CONFIG_USB_DABUSB is not set 972# CONFIG_USB_DABUSB is not set
950 973
@@ -1011,6 +1034,7 @@ CONFIG_SND_AC97_CODEC=y
1011# CONFIG_SND_AU8810 is not set 1034# CONFIG_SND_AU8810 is not set
1012# CONFIG_SND_AU8820 is not set 1035# CONFIG_SND_AU8820 is not set
1013# CONFIG_SND_AU8830 is not set 1036# CONFIG_SND_AU8830 is not set
1037# CONFIG_SND_AW2 is not set
1014# CONFIG_SND_AZT3328 is not set 1038# CONFIG_SND_AZT3328 is not set
1015# CONFIG_SND_BT87X is not set 1039# CONFIG_SND_BT87X is not set
1016# CONFIG_SND_CA0106 is not set 1040# CONFIG_SND_CA0106 is not set
@@ -1085,11 +1109,11 @@ CONFIG_SND_INTEL8X0=y
1085# CONFIG_SND_SOC is not set 1109# CONFIG_SND_SOC is not set
1086 1110
1087# 1111#
1088# SoC Audio support for SuperH 1112# ALSA SoC audio for Freescale SOCs
1089# 1113#
1090 1114
1091# 1115#
1092# ALSA SoC audio for Freescale SOCs 1116# SoC Audio for the Texas Instruments OMAP
1093# 1117#
1094 1118
1095# 1119#
@@ -1124,16 +1148,20 @@ CONFIG_USB_DEVICEFS=y
1124CONFIG_USB_DEVICE_CLASS=y 1148CONFIG_USB_DEVICE_CLASS=y
1125# CONFIG_USB_DYNAMIC_MINORS is not set 1149# CONFIG_USB_DYNAMIC_MINORS is not set
1126# CONFIG_USB_OTG is not set 1150# CONFIG_USB_OTG is not set
1151# CONFIG_USB_OTG_WHITELIST is not set
1152# CONFIG_USB_OTG_BLACKLIST_HUB is not set
1127 1153
1128# 1154#
1129# USB Host Controller Drivers 1155# USB Host Controller Drivers
1130# 1156#
1157# CONFIG_USB_C67X00_HCD is not set
1131CONFIG_USB_EHCI_HCD=y 1158CONFIG_USB_EHCI_HCD=y
1132# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1159CONFIG_USB_EHCI_ROOT_HUB_TT=y
1133# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1160# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1134# CONFIG_USB_EHCI_FSL is not set 1161CONFIG_USB_EHCI_FSL=y
1135CONFIG_USB_EHCI_HCD_PPC_OF=y 1162CONFIG_USB_EHCI_HCD_PPC_OF=y
1136# CONFIG_USB_ISP116X_HCD is not set 1163# CONFIG_USB_ISP116X_HCD is not set
1164# CONFIG_USB_ISP1760_HCD is not set
1137CONFIG_USB_OHCI_HCD=y 1165CONFIG_USB_OHCI_HCD=y
1138CONFIG_USB_OHCI_HCD_PPC_OF=y 1166CONFIG_USB_OHCI_HCD_PPC_OF=y
1139CONFIG_USB_OHCI_HCD_PPC_OF_BE=y 1167CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
@@ -1151,6 +1179,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1151# 1179#
1152# CONFIG_USB_ACM is not set 1180# CONFIG_USB_ACM is not set
1153# CONFIG_USB_PRINTER is not set 1181# CONFIG_USB_PRINTER is not set
1182# CONFIG_USB_WDM is not set
1154 1183
1155# 1184#
1156# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 1185# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -1170,7 +1199,9 @@ CONFIG_USB_STORAGE=y
1170# CONFIG_USB_STORAGE_SDDR55 is not set 1199# CONFIG_USB_STORAGE_SDDR55 is not set
1171# CONFIG_USB_STORAGE_JUMPSHOT is not set 1200# CONFIG_USB_STORAGE_JUMPSHOT is not set
1172# CONFIG_USB_STORAGE_ALAUDA is not set 1201# CONFIG_USB_STORAGE_ALAUDA is not set
1202# CONFIG_USB_STORAGE_ONETOUCH is not set
1173# CONFIG_USB_STORAGE_KARMA is not set 1203# CONFIG_USB_STORAGE_KARMA is not set
1204# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1174# CONFIG_USB_LIBUSUAL is not set 1205# CONFIG_USB_LIBUSUAL is not set
1175 1206
1176# 1207#
@@ -1208,12 +1239,21 @@ CONFIG_USB_MON=y
1208# CONFIG_USB_TRANCEVIBRATOR is not set 1239# CONFIG_USB_TRANCEVIBRATOR is not set
1209# CONFIG_USB_IOWARRIOR is not set 1240# CONFIG_USB_IOWARRIOR is not set
1210# CONFIG_USB_TEST is not set 1241# CONFIG_USB_TEST is not set
1242# CONFIG_USB_ISIGHTFW is not set
1211# CONFIG_USB_GADGET is not set 1243# CONFIG_USB_GADGET is not set
1212# CONFIG_MMC is not set 1244# CONFIG_MMC is not set
1213# CONFIG_MEMSTICK is not set 1245# CONFIG_MEMSTICK is not set
1214# CONFIG_NEW_LEDS is not set 1246# CONFIG_NEW_LEDS is not set
1247# CONFIG_ACCESSIBILITY is not set
1215# CONFIG_INFINIBAND is not set 1248# CONFIG_INFINIBAND is not set
1216# CONFIG_EDAC is not set 1249CONFIG_EDAC=y
1250
1251#
1252# Reporting subsystems
1253#
1254# CONFIG_EDAC_DEBUG is not set
1255CONFIG_EDAC_MM_EDAC=y
1256CONFIG_EDAC_MPC85XX=y
1217CONFIG_RTC_LIB=y 1257CONFIG_RTC_LIB=y
1218CONFIG_RTC_CLASS=y 1258CONFIG_RTC_CLASS=y
1219CONFIG_RTC_HCTOSYS=y 1259CONFIG_RTC_HCTOSYS=y
@@ -1263,11 +1303,19 @@ CONFIG_RTC_DRV_CMOS=y
1263# 1303#
1264# on-CPU RTC drivers 1304# on-CPU RTC drivers
1265# 1305#
1266# CONFIG_DMADEVICES is not set 1306# CONFIG_RTC_DRV_PPC is not set
1307CONFIG_DMADEVICES=y
1267 1308
1268# 1309#
1269# Userspace I/O 1310# DMA Devices
1270# 1311#
1312CONFIG_FSL_DMA=y
1313CONFIG_DMA_ENGINE=y
1314
1315#
1316# DMA Clients
1317#
1318# CONFIG_NET_DMA is not set
1271# CONFIG_UIO is not set 1319# CONFIG_UIO is not set
1272 1320
1273# 1321#
@@ -1287,7 +1335,6 @@ CONFIG_FS_MBCACHE=y
1287# CONFIG_JFS_FS is not set 1335# CONFIG_JFS_FS is not set
1288# CONFIG_FS_POSIX_ACL is not set 1336# CONFIG_FS_POSIX_ACL is not set
1289# CONFIG_XFS_FS is not set 1337# CONFIG_XFS_FS is not set
1290# CONFIG_GFS2_FS is not set
1291# CONFIG_OCFS2_FS is not set 1338# CONFIG_OCFS2_FS is not set
1292CONFIG_DNOTIFY=y 1339CONFIG_DNOTIFY=y
1293CONFIG_INOTIFY=y 1340CONFIG_INOTIFY=y
@@ -1357,10 +1404,9 @@ CONFIG_NFS_FS=y
1357CONFIG_NFS_V3=y 1404CONFIG_NFS_V3=y
1358# CONFIG_NFS_V3_ACL is not set 1405# CONFIG_NFS_V3_ACL is not set
1359CONFIG_NFS_V4=y 1406CONFIG_NFS_V4=y
1360# CONFIG_NFS_DIRECTIO is not set
1361CONFIG_NFSD=y 1407CONFIG_NFSD=y
1362# CONFIG_NFSD_V3 is not set 1408# CONFIG_NFSD_V3 is not set
1363CONFIG_NFSD_TCP=y 1409# CONFIG_NFSD_V4 is not set
1364CONFIG_ROOT_NFS=y 1410CONFIG_ROOT_NFS=y
1365CONFIG_LOCKD=y 1411CONFIG_LOCKD=y
1366CONFIG_LOCKD_V4=y 1412CONFIG_LOCKD_V4=y
@@ -1444,9 +1490,10 @@ CONFIG_NLS_UTF8=m
1444# Library routines 1490# Library routines
1445# 1491#
1446CONFIG_BITREVERSE=y 1492CONFIG_BITREVERSE=y
1493# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1447# CONFIG_CRC_CCITT is not set 1494# CONFIG_CRC_CCITT is not set
1448# CONFIG_CRC16 is not set 1495# CONFIG_CRC16 is not set
1449# CONFIG_CRC_ITU_T is not set 1496CONFIG_CRC_ITU_T=m
1450CONFIG_CRC32=y 1497CONFIG_CRC32=y
1451# CONFIG_CRC7 is not set 1498# CONFIG_CRC7 is not set
1452CONFIG_LIBCRC32C=m 1499CONFIG_LIBCRC32C=m
@@ -1455,6 +1502,7 @@ CONFIG_PLIST=y
1455CONFIG_HAS_IOMEM=y 1502CONFIG_HAS_IOMEM=y
1456CONFIG_HAS_IOPORT=y 1503CONFIG_HAS_IOPORT=y
1457CONFIG_HAS_DMA=y 1504CONFIG_HAS_DMA=y
1505CONFIG_HAVE_LMB=y
1458 1506
1459# 1507#
1460# Kernel hacking 1508# Kernel hacking
@@ -1462,6 +1510,7 @@ CONFIG_HAS_DMA=y
1462# CONFIG_PRINTK_TIME is not set 1510# CONFIG_PRINTK_TIME is not set
1463CONFIG_ENABLE_WARN_DEPRECATED=y 1511CONFIG_ENABLE_WARN_DEPRECATED=y
1464CONFIG_ENABLE_MUST_CHECK=y 1512CONFIG_ENABLE_MUST_CHECK=y
1513CONFIG_FRAME_WARN=1024
1465# CONFIG_MAGIC_SYSRQ is not set 1514# CONFIG_MAGIC_SYSRQ is not set
1466# CONFIG_UNUSED_SYMBOLS is not set 1515# CONFIG_UNUSED_SYMBOLS is not set
1467# CONFIG_DEBUG_FS is not set 1516# CONFIG_DEBUG_FS is not set
@@ -1472,6 +1521,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
1472CONFIG_SCHED_DEBUG=y 1521CONFIG_SCHED_DEBUG=y
1473# CONFIG_SCHEDSTATS is not set 1522# CONFIG_SCHEDSTATS is not set
1474# CONFIG_TIMER_STATS is not set 1523# CONFIG_TIMER_STATS is not set
1524# CONFIG_DEBUG_OBJECTS is not set
1475# CONFIG_SLUB_DEBUG_ON is not set 1525# CONFIG_SLUB_DEBUG_ON is not set
1476# CONFIG_SLUB_STATS is not set 1526# CONFIG_SLUB_STATS is not set
1477# CONFIG_DEBUG_RT_MUTEXES is not set 1527# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -1485,6 +1535,7 @@ CONFIG_SCHED_DEBUG=y
1485# CONFIG_DEBUG_BUGVERBOSE is not set 1535# CONFIG_DEBUG_BUGVERBOSE is not set
1486CONFIG_DEBUG_INFO=y 1536CONFIG_DEBUG_INFO=y
1487# CONFIG_DEBUG_VM is not set 1537# CONFIG_DEBUG_VM is not set
1538# CONFIG_DEBUG_WRITECOUNT is not set
1488# CONFIG_DEBUG_LIST is not set 1539# CONFIG_DEBUG_LIST is not set
1489# CONFIG_DEBUG_SG is not set 1540# CONFIG_DEBUG_SG is not set
1490# CONFIG_BOOT_PRINTK_DELAY is not set 1541# CONFIG_BOOT_PRINTK_DELAY is not set
@@ -1497,6 +1548,7 @@ CONFIG_DEBUG_INFO=y
1497# CONFIG_DEBUG_PAGEALLOC is not set 1548# CONFIG_DEBUG_PAGEALLOC is not set
1498# CONFIG_DEBUGGER is not set 1549# CONFIG_DEBUGGER is not set
1499# CONFIG_KGDB_CONSOLE is not set 1550# CONFIG_KGDB_CONSOLE is not set
1551# CONFIG_IRQSTACKS is not set
1500# CONFIG_BDI_SWITCH is not set 1552# CONFIG_BDI_SWITCH is not set
1501# CONFIG_PPC_EARLY_DEBUG is not set 1553# CONFIG_PPC_EARLY_DEBUG is not set
1502 1554
@@ -1507,53 +1559,83 @@ CONFIG_DEBUG_INFO=y
1507# CONFIG_SECURITY is not set 1559# CONFIG_SECURITY is not set
1508# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1560# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1509CONFIG_CRYPTO=y 1561CONFIG_CRYPTO=y
1562
1563#
1564# Crypto core or helper
1565#
1510CONFIG_CRYPTO_ALGAPI=y 1566CONFIG_CRYPTO_ALGAPI=y
1511CONFIG_CRYPTO_BLKCIPHER=y 1567CONFIG_CRYPTO_BLKCIPHER=y
1512# CONFIG_CRYPTO_SEQIV is not set
1513CONFIG_CRYPTO_HASH=y 1568CONFIG_CRYPTO_HASH=y
1514CONFIG_CRYPTO_MANAGER=y 1569CONFIG_CRYPTO_MANAGER=y
1570# CONFIG_CRYPTO_GF128MUL is not set
1571# CONFIG_CRYPTO_NULL is not set
1572# CONFIG_CRYPTO_CRYPTD is not set
1573# CONFIG_CRYPTO_AUTHENC is not set
1574# CONFIG_CRYPTO_TEST is not set
1575
1576#
1577# Authenticated Encryption with Associated Data
1578#
1579# CONFIG_CRYPTO_CCM is not set
1580# CONFIG_CRYPTO_GCM is not set
1581# CONFIG_CRYPTO_SEQIV is not set
1582
1583#
1584# Block modes
1585#
1586CONFIG_CRYPTO_CBC=y
1587# CONFIG_CRYPTO_CTR is not set
1588# CONFIG_CRYPTO_CTS is not set
1589# CONFIG_CRYPTO_ECB is not set
1590# CONFIG_CRYPTO_LRW is not set
1591CONFIG_CRYPTO_PCBC=m
1592# CONFIG_CRYPTO_XTS is not set
1593
1594#
1595# Hash modes
1596#
1515CONFIG_CRYPTO_HMAC=y 1597CONFIG_CRYPTO_HMAC=y
1516# CONFIG_CRYPTO_XCBC is not set 1598# CONFIG_CRYPTO_XCBC is not set
1517# CONFIG_CRYPTO_NULL is not set 1599
1600#
1601# Digest
1602#
1603# CONFIG_CRYPTO_CRC32C is not set
1518# CONFIG_CRYPTO_MD4 is not set 1604# CONFIG_CRYPTO_MD4 is not set
1519CONFIG_CRYPTO_MD5=y 1605CONFIG_CRYPTO_MD5=y
1606# CONFIG_CRYPTO_MICHAEL_MIC is not set
1520CONFIG_CRYPTO_SHA1=m 1607CONFIG_CRYPTO_SHA1=m
1521# CONFIG_CRYPTO_SHA256 is not set 1608# CONFIG_CRYPTO_SHA256 is not set
1522# CONFIG_CRYPTO_SHA512 is not set 1609# CONFIG_CRYPTO_SHA512 is not set
1523# CONFIG_CRYPTO_WP512 is not set
1524# CONFIG_CRYPTO_TGR192 is not set 1610# CONFIG_CRYPTO_TGR192 is not set
1525# CONFIG_CRYPTO_GF128MUL is not set 1611# CONFIG_CRYPTO_WP512 is not set
1526# CONFIG_CRYPTO_ECB is not set 1612
1527CONFIG_CRYPTO_CBC=y 1613#
1528CONFIG_CRYPTO_PCBC=m 1614# Ciphers
1529# CONFIG_CRYPTO_LRW is not set 1615#
1530# CONFIG_CRYPTO_XTS is not set
1531# CONFIG_CRYPTO_CTR is not set
1532# CONFIG_CRYPTO_GCM is not set
1533# CONFIG_CRYPTO_CCM is not set
1534# CONFIG_CRYPTO_CRYPTD is not set
1535CONFIG_CRYPTO_DES=y
1536# CONFIG_CRYPTO_FCRYPT is not set
1537# CONFIG_CRYPTO_BLOWFISH is not set
1538# CONFIG_CRYPTO_TWOFISH is not set
1539# CONFIG_CRYPTO_SERPENT is not set
1540# CONFIG_CRYPTO_AES is not set 1616# CONFIG_CRYPTO_AES is not set
1617# CONFIG_CRYPTO_ANUBIS is not set
1618# CONFIG_CRYPTO_ARC4 is not set
1619# CONFIG_CRYPTO_BLOWFISH is not set
1620# CONFIG_CRYPTO_CAMELLIA is not set
1541# CONFIG_CRYPTO_CAST5 is not set 1621# CONFIG_CRYPTO_CAST5 is not set
1542# CONFIG_CRYPTO_CAST6 is not set 1622# CONFIG_CRYPTO_CAST6 is not set
1543# CONFIG_CRYPTO_TEA is not set 1623CONFIG_CRYPTO_DES=y
1544# CONFIG_CRYPTO_ARC4 is not set 1624# CONFIG_CRYPTO_FCRYPT is not set
1545# CONFIG_CRYPTO_KHAZAD is not set 1625# CONFIG_CRYPTO_KHAZAD is not set
1546# CONFIG_CRYPTO_ANUBIS is not set
1547# CONFIG_CRYPTO_SEED is not set
1548# CONFIG_CRYPTO_SALSA20 is not set 1626# CONFIG_CRYPTO_SALSA20 is not set
1627# CONFIG_CRYPTO_SEED is not set
1628# CONFIG_CRYPTO_SERPENT is not set
1629# CONFIG_CRYPTO_TEA is not set
1630# CONFIG_CRYPTO_TWOFISH is not set
1631
1632#
1633# Compression
1634#
1549# CONFIG_CRYPTO_DEFLATE is not set 1635# CONFIG_CRYPTO_DEFLATE is not set
1550# CONFIG_CRYPTO_MICHAEL_MIC is not set
1551# CONFIG_CRYPTO_CRC32C is not set
1552# CONFIG_CRYPTO_CAMELLIA is not set
1553# CONFIG_CRYPTO_TEST is not set
1554# CONFIG_CRYPTO_AUTHENC is not set
1555# CONFIG_CRYPTO_LZO is not set 1636# CONFIG_CRYPTO_LZO is not set
1556CONFIG_CRYPTO_HW=y 1637CONFIG_CRYPTO_HW=y
1557# CONFIG_CRYPTO_DEV_HIFN_795X is not set 1638# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1558# CONFIG_PPC_CLOCK is not set 1639# CONFIG_PPC_CLOCK is not set
1559CONFIG_PPC_LIB_RHEAP=y 1640CONFIG_PPC_LIB_RHEAP=y
1641# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/mpc8610_hpcd_defconfig b/arch/powerpc/configs/mpc8610_hpcd_defconfig
index 7e5b9ce58d89..5612d40d0463 100644
--- a/arch/powerpc/configs/mpc8610_hpcd_defconfig
+++ b/arch/powerpc/configs/mpc8610_hpcd_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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 24 08:48:33 2008 4# Mon Jun 9 08:50:24 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -31,6 +31,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y 31CONFIG_GENERIC_HARDIRQS=y
32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
33CONFIG_IRQ_PER_CPU=y 33CONFIG_IRQ_PER_CPU=y
34CONFIG_STACKTRACE_SUPPORT=y
35CONFIG_LOCKDEP_SUPPORT=y
34CONFIG_RWSEM_XCHGADD_ALGORITHM=y 36CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y 37CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y 38CONFIG_GENERIC_HWEIGHT=y
@@ -60,9 +62,10 @@ CONFIG_EXPERIMENTAL=y
60CONFIG_BROKEN_ON_SMP=y 62CONFIG_BROKEN_ON_SMP=y
61CONFIG_INIT_ENV_ARG_LIMIT=32 63CONFIG_INIT_ENV_ARG_LIMIT=32
62CONFIG_LOCALVERSION="" 64CONFIG_LOCALVERSION=""
63# CONFIG_LOCALVERSION_AUTO is not set 65CONFIG_LOCALVERSION_AUTO=y
64# CONFIG_SWAP is not set 66# CONFIG_SWAP is not set
65# CONFIG_SYSVIPC is not set 67CONFIG_SYSVIPC=y
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
@@ -86,6 +89,7 @@ CONFIG_INITRAMFS_SOURCE=""
86CONFIG_SYSCTL=y 89CONFIG_SYSCTL=y
87CONFIG_EMBEDDED=y 90CONFIG_EMBEDDED=y
88CONFIG_SYSCTL_SYSCALL=y 91CONFIG_SYSCTL_SYSCALL=y
92CONFIG_SYSCTL_SYSCALL_CHECK=y
89CONFIG_KALLSYMS=y 93CONFIG_KALLSYMS=y
90# CONFIG_KALLSYMS_ALL is not set 94# CONFIG_KALLSYMS_ALL is not set
91CONFIG_KALLSYMS_EXTRA_PASS=y 95CONFIG_KALLSYMS_EXTRA_PASS=y
@@ -110,14 +114,22 @@ CONFIG_SLUB=y
110# CONFIG_PROFILING is not set 114# CONFIG_PROFILING is not set
111# CONFIG_MARKERS is not set 115# CONFIG_MARKERS is not set
112CONFIG_HAVE_OPROFILE=y 116CONFIG_HAVE_OPROFILE=y
117# CONFIG_KPROBES is not set
113CONFIG_HAVE_KPROBES=y 118CONFIG_HAVE_KPROBES=y
114CONFIG_HAVE_KRETPROBES=y 119CONFIG_HAVE_KRETPROBES=y
120# CONFIG_HAVE_DMA_ATTRS is not set
115CONFIG_PROC_PAGE_MONITOR=y 121CONFIG_PROC_PAGE_MONITOR=y
116CONFIG_SLABINFO=y 122CONFIG_SLABINFO=y
117CONFIG_RT_MUTEXES=y 123CONFIG_RT_MUTEXES=y
118# CONFIG_TINY_SHMEM is not set 124# CONFIG_TINY_SHMEM is not set
119CONFIG_BASE_SMALL=0 125CONFIG_BASE_SMALL=0
120# CONFIG_MODULES is not set 126CONFIG_MODULES=y
127# CONFIG_MODULE_FORCE_LOAD is not set
128CONFIG_MODULE_UNLOAD=y
129# CONFIG_MODULE_FORCE_UNLOAD is not set
130# CONFIG_MODVERSIONS is not set
131# CONFIG_MODULE_SRCVERSION_ALL is not set
132CONFIG_KMOD=y
121CONFIG_BLOCK=y 133CONFIG_BLOCK=y
122# CONFIG_LBD is not set 134# CONFIG_LBD is not set
123# CONFIG_BLK_DEV_IO_TRACE is not set 135# CONFIG_BLK_DEV_IO_TRACE is not set
@@ -151,6 +163,7 @@ CONFIG_PPC_86xx=y
151# CONFIG_PPC_CELL_NATIVE is not set 163# CONFIG_PPC_CELL_NATIVE is not set
152# CONFIG_PQ2ADS is not set 164# CONFIG_PQ2ADS is not set
153# CONFIG_MPC8641_HPCN is not set 165# CONFIG_MPC8641_HPCN is not set
166# CONFIG_SBC8641D is not set
154CONFIG_MPC8610_HPCD=y 167CONFIG_MPC8610_HPCD=y
155CONFIG_MPC8610=y 168CONFIG_MPC8610=y
156# CONFIG_IPIC is not set 169# CONFIG_IPIC is not set
@@ -199,11 +212,13 @@ CONFIG_FLATMEM=y
199CONFIG_FLAT_NODE_MEM_MAP=y 212CONFIG_FLAT_NODE_MEM_MAP=y
200# CONFIG_SPARSEMEM_STATIC is not set 213# CONFIG_SPARSEMEM_STATIC is not set
201# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 214# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
215CONFIG_PAGEFLAGS_EXTENDED=y
202CONFIG_SPLIT_PTLOCK_CPUS=4 216CONFIG_SPLIT_PTLOCK_CPUS=4
203# CONFIG_RESOURCES_64BIT is not set 217# CONFIG_RESOURCES_64BIT is not set
204CONFIG_ZONE_DMA_FLAG=1 218CONFIG_ZONE_DMA_FLAG=1
205CONFIG_BOUNCE=y 219CONFIG_BOUNCE=y
206CONFIG_VIRT_TO_BUS=y 220CONFIG_VIRT_TO_BUS=y
221CONFIG_FORCE_MAX_ZONEORDER=12
207CONFIG_PROC_DEVICETREE=y 222CONFIG_PROC_DEVICETREE=y
208# CONFIG_CMDLINE_BOOL is not set 223# CONFIG_CMDLINE_BOOL is not set
209# CONFIG_PM is not set 224# CONFIG_PM is not set
@@ -223,12 +238,14 @@ CONFIG_PCI_DOMAINS=y
223CONFIG_PCI_SYSCALL=y 238CONFIG_PCI_SYSCALL=y
224CONFIG_PCIEPORTBUS=y 239CONFIG_PCIEPORTBUS=y
225CONFIG_PCIEAER=y 240CONFIG_PCIEAER=y
241# CONFIG_PCIEASPM is not set
226CONFIG_ARCH_SUPPORTS_MSI=y 242CONFIG_ARCH_SUPPORTS_MSI=y
227# CONFIG_PCI_MSI is not set 243# CONFIG_PCI_MSI is not set
228CONFIG_PCI_LEGACY=y 244CONFIG_PCI_LEGACY=y
229CONFIG_PCI_DEBUG=y 245CONFIG_PCI_DEBUG=y
230# CONFIG_PCCARD is not set 246# CONFIG_PCCARD is not set
231# CONFIG_HOTPLUG_PCI is not set 247# CONFIG_HOTPLUG_PCI is not set
248# CONFIG_HAS_RAPIDIO is not set
232 249
233# 250#
234# Advanced setup 251# Advanced setup
@@ -238,11 +255,11 @@ CONFIG_PCI_DEBUG=y
238# 255#
239# Default settings for advanced configuration options are used 256# Default settings for advanced configuration options are used
240# 257#
241CONFIG_HIGHMEM_START=0xfe000000
242CONFIG_LOWMEM_SIZE=0x30000000 258CONFIG_LOWMEM_SIZE=0x30000000
259CONFIG_PAGE_OFFSET=0xc0000000
243CONFIG_KERNEL_START=0xc0000000 260CONFIG_KERNEL_START=0xc0000000
261CONFIG_PHYSICAL_START=0x00000000
244CONFIG_TASK_SIZE=0xc0000000 262CONFIG_TASK_SIZE=0xc0000000
245CONFIG_BOOT_LOAD=0x00800000
246 263
247# 264#
248# Networking 265# Networking
@@ -303,8 +320,10 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=y
303CONFIG_INET6_XFRM_MODE_BEET=y 320CONFIG_INET6_XFRM_MODE_BEET=y
304# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set 321# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
305CONFIG_IPV6_SIT=y 322CONFIG_IPV6_SIT=y
323CONFIG_IPV6_NDISC_NODETYPE=y
306# CONFIG_IPV6_TUNNEL is not set 324# CONFIG_IPV6_TUNNEL is not set
307# CONFIG_IPV6_MULTIPLE_TABLES is not set 325# CONFIG_IPV6_MULTIPLE_TABLES is not set
326# CONFIG_IPV6_MROUTE is not set
308# CONFIG_NETWORK_SECMARK is not set 327# CONFIG_NETWORK_SECMARK is not set
309# CONFIG_NETFILTER is not set 328# CONFIG_NETFILTER is not set
310# CONFIG_IP_DCCP is not set 329# CONFIG_IP_DCCP is not set
@@ -446,6 +465,7 @@ CONFIG_MTD_NAND_FSL_ELBC=y
446# 465#
447# CONFIG_MTD_UBI is not set 466# CONFIG_MTD_UBI is not set
448CONFIG_OF_DEVICE=y 467CONFIG_OF_DEVICE=y
468CONFIG_OF_I2C=y
449# CONFIG_PARPORT is not set 469# CONFIG_PARPORT is not set
450CONFIG_BLK_DEV=y 470CONFIG_BLK_DEV=y
451# CONFIG_BLK_DEV_FD is not set 471# CONFIG_BLK_DEV_FD is not set
@@ -504,6 +524,7 @@ CONFIG_CHR_DEV_SG=y
504# CONFIG_SCSI_CONSTANTS is not set 524# CONFIG_SCSI_CONSTANTS is not set
505# CONFIG_SCSI_LOGGING is not set 525# CONFIG_SCSI_LOGGING is not set
506# CONFIG_SCSI_SCAN_ASYNC is not set 526# CONFIG_SCSI_SCAN_ASYNC is not set
527CONFIG_SCSI_WAIT_SCAN=m
507 528
508# 529#
509# SCSI Transports 530# SCSI Transports
@@ -553,7 +574,11 @@ CONFIG_SCSI_LOWLEVEL=y
553# CONFIG_SCSI_SRP is not set 574# CONFIG_SCSI_SRP is not set
554CONFIG_ATA=y 575CONFIG_ATA=y
555# CONFIG_ATA_NONSTANDARD is not set 576# CONFIG_ATA_NONSTANDARD is not set
577CONFIG_SATA_PMP=y
556CONFIG_SATA_AHCI=y 578CONFIG_SATA_AHCI=y
579# CONFIG_SATA_SIL24 is not set
580# CONFIG_SATA_FSL is not set
581CONFIG_ATA_SFF=y
557# CONFIG_SATA_SVW is not set 582# CONFIG_SATA_SVW is not set
558# CONFIG_ATA_PIIX is not set 583# CONFIG_ATA_PIIX is not set
559# CONFIG_SATA_MV is not set 584# CONFIG_SATA_MV is not set
@@ -563,13 +588,11 @@ CONFIG_SATA_AHCI=y
563# CONFIG_SATA_PROMISE is not set 588# CONFIG_SATA_PROMISE is not set
564# CONFIG_SATA_SX4 is not set 589# CONFIG_SATA_SX4 is not set
565# CONFIG_SATA_SIL is not set 590# CONFIG_SATA_SIL is not set
566# CONFIG_SATA_SIL24 is not set
567# CONFIG_SATA_SIS is not set 591# CONFIG_SATA_SIS is not set
568# CONFIG_SATA_ULI is not set 592# CONFIG_SATA_ULI is not set
569# CONFIG_SATA_VIA is not set 593# CONFIG_SATA_VIA is not set
570# CONFIG_SATA_VITESSE is not set 594# CONFIG_SATA_VITESSE is not set
571# CONFIG_SATA_INIC162X is not set 595# CONFIG_SATA_INIC162X is not set
572# CONFIG_SATA_FSL is not set
573CONFIG_PATA_ALI=y 596CONFIG_PATA_ALI=y
574# CONFIG_PATA_AMD is not set 597# CONFIG_PATA_AMD is not set
575# CONFIG_PATA_ARTOP is not set 598# CONFIG_PATA_ARTOP is not set
@@ -609,6 +632,7 @@ CONFIG_PATA_ALI=y
609# CONFIG_PATA_VIA is not set 632# CONFIG_PATA_VIA is not set
610# CONFIG_PATA_WINBOND is not set 633# CONFIG_PATA_WINBOND is not set
611# CONFIG_PATA_PLATFORM is not set 634# CONFIG_PATA_PLATFORM is not set
635# CONFIG_PATA_SCH is not set
612# CONFIG_MD is not set 636# CONFIG_MD is not set
613# CONFIG_FUSION is not set 637# CONFIG_FUSION is not set
614 638
@@ -628,25 +652,9 @@ CONFIG_DUMMY=y
628# CONFIG_TUN is not set 652# CONFIG_TUN is not set
629# CONFIG_VETH is not set 653# CONFIG_VETH is not set
630# CONFIG_ARCNET is not set 654# CONFIG_ARCNET is not set
631CONFIG_PHYLIB=y 655# CONFIG_PHYLIB is not set
632
633#
634# MII PHY device drivers
635#
636# CONFIG_MARVELL_PHY is not set
637# CONFIG_DAVICOM_PHY is not set
638# CONFIG_QSEMI_PHY is not set
639# CONFIG_LXT_PHY is not set
640# CONFIG_CICADA_PHY is not set
641# CONFIG_VITESSE_PHY is not set
642# CONFIG_SMSC_PHY is not set
643# CONFIG_BROADCOM_PHY is not set
644# CONFIG_ICPLUS_PHY is not set
645# CONFIG_REALTEK_PHY is not set
646# CONFIG_FIXED_PHY is not set
647# CONFIG_MDIO_BITBANG is not set
648CONFIG_NET_ETHERNET=y 656CONFIG_NET_ETHERNET=y
649CONFIG_MII=y 657# CONFIG_MII is not set
650# CONFIG_HAPPYMEAL is not set 658# CONFIG_HAPPYMEAL is not set
651# CONFIG_SUNGEM is not set 659# CONFIG_SUNGEM is not set
652# CONFIG_CASSINI is not set 660# CONFIG_CASSINI is not set
@@ -663,64 +671,10 @@ CONFIG_ULI526X=y
663# CONFIG_IBM_NEW_EMAC_RGMII is not set 671# CONFIG_IBM_NEW_EMAC_RGMII is not set
664# CONFIG_IBM_NEW_EMAC_TAH is not set 672# CONFIG_IBM_NEW_EMAC_TAH is not set
665# CONFIG_IBM_NEW_EMAC_EMAC4 is not set 673# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
666CONFIG_NET_PCI=y 674# CONFIG_NET_PCI is not set
667# CONFIG_PCNET32 is not set
668# CONFIG_AMD8111_ETH is not set
669# CONFIG_ADAPTEC_STARFIRE is not set
670# CONFIG_B44 is not set 675# CONFIG_B44 is not set
671# CONFIG_FORCEDETH is not set 676# CONFIG_NETDEV_1000 is not set
672# CONFIG_EEPRO100 is not set 677# CONFIG_NETDEV_10000 is not set
673# CONFIG_E100 is not set
674# CONFIG_FEALNX is not set
675# CONFIG_NATSEMI is not set
676# CONFIG_NE2K_PCI is not set
677# CONFIG_8139CP is not set
678CONFIG_8139TOO=y
679CONFIG_8139TOO_PIO=y
680# CONFIG_8139TOO_TUNE_TWISTER is not set
681# CONFIG_8139TOO_8129 is not set
682# CONFIG_8139_OLD_RX_RESET is not set
683# CONFIG_R6040 is not set
684# CONFIG_SIS900 is not set
685# CONFIG_EPIC100 is not set
686# CONFIG_SUNDANCE is not set
687# CONFIG_TLAN is not set
688# CONFIG_VIA_RHINE is not set
689# CONFIG_SC92031 is not set
690CONFIG_NETDEV_1000=y
691# CONFIG_ACENIC is not set
692# CONFIG_DL2K is not set
693# CONFIG_E1000 is not set
694# CONFIG_E1000E is not set
695# CONFIG_E1000E_ENABLED is not set
696# CONFIG_IP1000 is not set
697# CONFIG_IGB is not set
698# CONFIG_NS83820 is not set
699# CONFIG_HAMACHI is not set
700# CONFIG_YELLOWFIN is not set
701# CONFIG_R8169 is not set
702# CONFIG_SIS190 is not set
703# CONFIG_SKGE is not set
704# CONFIG_SKY2 is not set
705# CONFIG_SK98LIN is not set
706# CONFIG_VIA_VELOCITY is not set
707# CONFIG_TIGON3 is not set
708# CONFIG_BNX2 is not set
709# CONFIG_GIANFAR is not set
710# CONFIG_QLA3XXX is not set
711# CONFIG_ATL1 is not set
712CONFIG_NETDEV_10000=y
713# CONFIG_CHELSIO_T1 is not set
714# CONFIG_CHELSIO_T3 is not set
715# CONFIG_IXGBE is not set
716# CONFIG_IXGB is not set
717# CONFIG_S2IO is not set
718# CONFIG_MYRI10GE is not set
719# CONFIG_NETXEN_NIC is not set
720# CONFIG_NIU is not set
721# CONFIG_MLX4_CORE is not set
722# CONFIG_TEHUTI is not set
723# CONFIG_BNX2X is not set
724# CONFIG_TR is not set 678# CONFIG_TR is not set
725 679
726# 680#
@@ -728,6 +682,7 @@ CONFIG_NETDEV_10000=y
728# 682#
729# CONFIG_WLAN_PRE80211 is not set 683# CONFIG_WLAN_PRE80211 is not set
730# CONFIG_WLAN_80211 is not set 684# CONFIG_WLAN_80211 is not set
685# CONFIG_IWLWIFI_LEDS is not set
731# CONFIG_WAN is not set 686# CONFIG_WAN is not set
732# CONFIG_FDDI is not set 687# CONFIG_FDDI is not set
733# CONFIG_HIPPI is not set 688# CONFIG_HIPPI is not set
@@ -783,6 +738,7 @@ CONFIG_VT=y
783CONFIG_VT_CONSOLE=y 738CONFIG_VT_CONSOLE=y
784CONFIG_HW_CONSOLE=y 739CONFIG_HW_CONSOLE=y
785# CONFIG_VT_HW_CONSOLE_BINDING is not set 740# CONFIG_VT_HW_CONSOLE_BINDING is not set
741CONFIG_DEVKMEM=y
786# CONFIG_SERIAL_NONSTANDARD is not set 742# CONFIG_SERIAL_NONSTANDARD is not set
787# CONFIG_NOZOMI is not set 743# CONFIG_NOZOMI is not set
788 744
@@ -824,13 +780,6 @@ CONFIG_I2C_BOARDINFO=y
824# CONFIG_I2C_CHARDEV is not set 780# CONFIG_I2C_CHARDEV is not set
825 781
826# 782#
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 783# I2C Hardware Bus support
835# 784#
836# CONFIG_I2C_ALI1535 is not set 785# CONFIG_I2C_ALI1535 is not set
@@ -852,9 +801,11 @@ CONFIG_I2C_MPC=y
852# CONFIG_I2C_SIS630 is not set 801# CONFIG_I2C_SIS630 is not set
853# CONFIG_I2C_SIS96X is not set 802# CONFIG_I2C_SIS96X is not set
854# CONFIG_I2C_TAOS_EVM is not set 803# CONFIG_I2C_TAOS_EVM is not set
804# CONFIG_I2C_STUB is not set
855# CONFIG_I2C_VIA is not set 805# CONFIG_I2C_VIA is not set
856# CONFIG_I2C_VIAPRO is not set 806# CONFIG_I2C_VIAPRO is not set
857# CONFIG_I2C_VOODOO3 is not set 807# CONFIG_I2C_VOODOO3 is not set
808# CONFIG_I2C_PCA_PLATFORM is not set
858 809
859# 810#
860# Miscellaneous I2C Chip support 811# Miscellaneous I2C Chip support
@@ -864,19 +815,13 @@ CONFIG_I2C_MPC=y
864# CONFIG_SENSORS_PCF8574 is not set 815# CONFIG_SENSORS_PCF8574 is not set
865# CONFIG_PCF8575 is not set 816# CONFIG_PCF8575 is not set
866# CONFIG_SENSORS_PCF8591 is not set 817# CONFIG_SENSORS_PCF8591 is not set
867# CONFIG_TPS65010 is not set
868# CONFIG_SENSORS_MAX6875 is not set 818# CONFIG_SENSORS_MAX6875 is not set
869# CONFIG_SENSORS_TSL2550 is not set 819# CONFIG_SENSORS_TSL2550 is not set
870# CONFIG_I2C_DEBUG_CORE is not set 820# CONFIG_I2C_DEBUG_CORE is not set
871# CONFIG_I2C_DEBUG_ALGO is not set 821# CONFIG_I2C_DEBUG_ALGO is not set
872# CONFIG_I2C_DEBUG_BUS is not set 822# CONFIG_I2C_DEBUG_BUS is not set
873# CONFIG_I2C_DEBUG_CHIP is not set 823# CONFIG_I2C_DEBUG_CHIP is not set
874
875#
876# SPI support
877#
878# CONFIG_SPI is not set 824# CONFIG_SPI is not set
879# CONFIG_SPI_MASTER is not set
880# CONFIG_W1 is not set 825# CONFIG_W1 is not set
881# CONFIG_POWER_SUPPLY is not set 826# CONFIG_POWER_SUPPLY is not set
882# CONFIG_HWMON is not set 827# CONFIG_HWMON is not set
@@ -893,12 +838,22 @@ CONFIG_SSB_POSSIBLE=y
893# Multifunction device drivers 838# Multifunction device drivers
894# 839#
895# CONFIG_MFD_SM501 is not set 840# CONFIG_MFD_SM501 is not set
841# CONFIG_HTC_PASIC3 is not set
896 842
897# 843#
898# Multimedia devices 844# Multimedia devices
899# 845#
846
847#
848# Multimedia core support
849#
900# CONFIG_VIDEO_DEV is not set 850# CONFIG_VIDEO_DEV is not set
901# CONFIG_DVB_CORE is not set 851# CONFIG_DVB_CORE is not set
852# CONFIG_VIDEO_MEDIA is not set
853
854#
855# Multimedia drivers
856#
902CONFIG_DAB=y 857CONFIG_DAB=y
903 858
904# 859#
@@ -908,7 +863,56 @@ CONFIG_DAB=y
908# CONFIG_DRM is not set 863# CONFIG_DRM is not set
909# CONFIG_VGASTATE is not set 864# CONFIG_VGASTATE is not set
910CONFIG_VIDEO_OUTPUT_CONTROL=y 865CONFIG_VIDEO_OUTPUT_CONTROL=y
911# CONFIG_FB is not set 866CONFIG_FB=y
867# CONFIG_FIRMWARE_EDID is not set
868# CONFIG_FB_DDC is not set
869CONFIG_FB_CFB_FILLRECT=y
870CONFIG_FB_CFB_COPYAREA=y
871CONFIG_FB_CFB_IMAGEBLIT=y
872# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
873# CONFIG_FB_SYS_FILLRECT is not set
874# CONFIG_FB_SYS_COPYAREA is not set
875# CONFIG_FB_SYS_IMAGEBLIT is not set
876# CONFIG_FB_FOREIGN_ENDIAN is not set
877# CONFIG_FB_SYS_FOPS is not set
878# CONFIG_FB_SVGALIB is not set
879# CONFIG_FB_MACMODES is not set
880# CONFIG_FB_BACKLIGHT is not set
881# CONFIG_FB_MODE_HELPERS is not set
882# CONFIG_FB_TILEBLITTING is not set
883
884#
885# Frame buffer hardware drivers
886#
887# CONFIG_FB_CIRRUS is not set
888# CONFIG_FB_PM2 is not set
889# CONFIG_FB_CYBER2000 is not set
890# CONFIG_FB_OF is not set
891# CONFIG_FB_CT65550 is not set
892# CONFIG_FB_ASILIANT is not set
893# CONFIG_FB_IMSTT is not set
894# CONFIG_FB_VGA16 is not set
895# CONFIG_FB_S1D13XXX is not set
896# CONFIG_FB_NVIDIA is not set
897# CONFIG_FB_RIVA is not set
898# CONFIG_FB_MATROX is not set
899# CONFIG_FB_RADEON is not set
900# CONFIG_FB_ATY128 is not set
901# CONFIG_FB_ATY is not set
902# CONFIG_FB_S3 is not set
903# CONFIG_FB_SAVAGE is not set
904# CONFIG_FB_SIS is not set
905# CONFIG_FB_NEOMAGIC is not set
906# CONFIG_FB_KYRO is not set
907# CONFIG_FB_3DFX is not set
908# CONFIG_FB_VOODOO1 is not set
909# CONFIG_FB_VT8623 is not set
910# CONFIG_FB_TRIDENT is not set
911# CONFIG_FB_ARK is not set
912# CONFIG_FB_PM3 is not set
913CONFIG_FB_FSL_DIU=y
914# CONFIG_FB_IBM_GXT4500 is not set
915# CONFIG_FB_VIRTUAL is not set
912# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 916# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
913 917
914# 918#
@@ -922,6 +926,8 @@ CONFIG_VIDEO_OUTPUT_CONTROL=y
922CONFIG_VGA_CONSOLE=y 926CONFIG_VGA_CONSOLE=y
923# CONFIG_VGACON_SOFT_SCROLLBACK is not set 927# CONFIG_VGACON_SOFT_SCROLLBACK is not set
924CONFIG_DUMMY_CONSOLE=y 928CONFIG_DUMMY_CONSOLE=y
929# CONFIG_FRAMEBUFFER_CONSOLE is not set
930# CONFIG_LOGO is not set
925 931
926# 932#
927# Sound 933# Sound
@@ -938,7 +944,7 @@ CONFIG_SND_PCM=y
938CONFIG_SND_OSSEMUL=y 944CONFIG_SND_OSSEMUL=y
939CONFIG_SND_MIXER_OSS=y 945CONFIG_SND_MIXER_OSS=y
940CONFIG_SND_PCM_OSS=y 946CONFIG_SND_PCM_OSS=y
941# CONFIG_SND_PCM_OSS_PLUGINS is not set 947CONFIG_SND_PCM_OSS_PLUGINS=y
942# CONFIG_SND_DYNAMIC_MINORS is not set 948# CONFIG_SND_DYNAMIC_MINORS is not set
943# CONFIG_SND_SUPPORT_OLD_API is not set 949# CONFIG_SND_SUPPORT_OLD_API is not set
944CONFIG_SND_VERBOSE_PROCFS=y 950CONFIG_SND_VERBOSE_PROCFS=y
@@ -965,6 +971,7 @@ CONFIG_SND_VERBOSE_PROCFS=y
965# CONFIG_SND_AU8810 is not set 971# CONFIG_SND_AU8810 is not set
966# CONFIG_SND_AU8820 is not set 972# CONFIG_SND_AU8820 is not set
967# CONFIG_SND_AU8830 is not set 973# CONFIG_SND_AU8830 is not set
974# CONFIG_SND_AW2 is not set
968# CONFIG_SND_AZT3328 is not set 975# CONFIG_SND_AZT3328 is not set
969# CONFIG_SND_BT87X is not set 976# CONFIG_SND_BT87X is not set
970# CONFIG_SND_CA0106 is not set 977# CONFIG_SND_CA0106 is not set
@@ -1031,14 +1038,14 @@ CONFIG_SND_VERBOSE_PROCFS=y
1031CONFIG_SND_SOC=y 1038CONFIG_SND_SOC=y
1032 1039
1033# 1040#
1034# SoC Audio support for SuperH
1035#
1036
1037#
1038# ALSA SoC audio for Freescale SOCs 1041# ALSA SoC audio for Freescale SOCs
1039# 1042#
1040CONFIG_SND_SOC_MPC8610=y 1043CONFIG_SND_SOC_MPC8610=y
1041CONFIG_SND_SOC_MPC8610_HPCD=y 1044CONFIG_SND_SOC_MPC8610_HPCD=y
1045
1046#
1047# SoC Audio for the Texas Instruments OMAP
1048#
1042CONFIG_SND_SOC_CS4270=y 1049CONFIG_SND_SOC_CS4270=y
1043CONFIG_SND_SOC_CS4270_VD33_ERRATA=y 1050CONFIG_SND_SOC_CS4270_VD33_ERRATA=y
1044 1051
@@ -1055,6 +1062,8 @@ CONFIG_USB_ARCH_HAS_HCD=y
1055CONFIG_USB_ARCH_HAS_OHCI=y 1062CONFIG_USB_ARCH_HAS_OHCI=y
1056CONFIG_USB_ARCH_HAS_EHCI=y 1063CONFIG_USB_ARCH_HAS_EHCI=y
1057# CONFIG_USB is not set 1064# CONFIG_USB is not set
1065# CONFIG_USB_OTG_WHITELIST is not set
1066# CONFIG_USB_OTG_BLACKLIST_HUB is not set
1058 1067
1059# 1068#
1060# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 1069# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -1063,14 +1072,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
1063# CONFIG_MMC is not set 1072# CONFIG_MMC is not set
1064# CONFIG_MEMSTICK is not set 1073# CONFIG_MEMSTICK is not set
1065# CONFIG_NEW_LEDS is not set 1074# CONFIG_NEW_LEDS is not set
1075# CONFIG_ACCESSIBILITY is not set
1066# CONFIG_INFINIBAND is not set 1076# CONFIG_INFINIBAND is not set
1067# CONFIG_EDAC is not set 1077# CONFIG_EDAC is not set
1068# CONFIG_RTC_CLASS is not set 1078# CONFIG_RTC_CLASS is not set
1069# CONFIG_DMADEVICES is not set 1079# CONFIG_DMADEVICES is not set
1070
1071#
1072# Userspace I/O
1073#
1074# CONFIG_UIO is not set 1080# CONFIG_UIO is not set
1075 1081
1076# 1082#
@@ -1090,7 +1096,6 @@ CONFIG_FS_MBCACHE=y
1090# CONFIG_JFS_FS is not set 1096# CONFIG_JFS_FS is not set
1091# CONFIG_FS_POSIX_ACL is not set 1097# CONFIG_FS_POSIX_ACL is not set
1092# CONFIG_XFS_FS is not set 1098# CONFIG_XFS_FS is not set
1093# CONFIG_GFS2_FS is not set
1094# CONFIG_OCFS2_FS is not set 1099# CONFIG_OCFS2_FS is not set
1095# CONFIG_DNOTIFY is not set 1100# CONFIG_DNOTIFY is not set
1096# CONFIG_INOTIFY is not set 1101# CONFIG_INOTIFY is not set
@@ -1134,6 +1139,7 @@ CONFIG_TMPFS=y
1134# CONFIG_BEFS_FS is not set 1139# CONFIG_BEFS_FS is not set
1135# CONFIG_BFS_FS is not set 1140# CONFIG_BFS_FS is not set
1136# CONFIG_EFS_FS is not set 1141# CONFIG_EFS_FS is not set
1142# CONFIG_JFFS2_FS is not set
1137# CONFIG_CRAMFS is not set 1143# CONFIG_CRAMFS is not set
1138# CONFIG_VXFS_FS is not set 1144# CONFIG_VXFS_FS is not set
1139# CONFIG_MINIX_FS is not set 1145# CONFIG_MINIX_FS is not set
@@ -1147,10 +1153,9 @@ CONFIG_NFS_FS=y
1147CONFIG_NFS_V3=y 1153CONFIG_NFS_V3=y
1148# CONFIG_NFS_V3_ACL is not set 1154# CONFIG_NFS_V3_ACL is not set
1149# CONFIG_NFS_V4 is not set 1155# CONFIG_NFS_V4 is not set
1150# CONFIG_NFS_DIRECTIO is not set
1151CONFIG_NFSD=y 1156CONFIG_NFSD=y
1152# CONFIG_NFSD_V3 is not set 1157# CONFIG_NFSD_V3 is not set
1153CONFIG_NFSD_TCP=y 1158# CONFIG_NFSD_V4 is not set
1154CONFIG_ROOT_NFS=y 1159CONFIG_ROOT_NFS=y
1155CONFIG_LOCKD=y 1160CONFIG_LOCKD=y
1156CONFIG_LOCKD_V4=y 1161CONFIG_LOCKD_V4=y
@@ -1234,6 +1239,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1234# Library routines 1239# Library routines
1235# 1240#
1236CONFIG_BITREVERSE=y 1241CONFIG_BITREVERSE=y
1242# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1237# CONFIG_CRC_CCITT is not set 1243# CONFIG_CRC_CCITT is not set
1238# CONFIG_CRC16 is not set 1244# CONFIG_CRC16 is not set
1239# CONFIG_CRC_ITU_T is not set 1245# CONFIG_CRC_ITU_T is not set
@@ -1244,6 +1250,7 @@ CONFIG_PLIST=y
1244CONFIG_HAS_IOMEM=y 1250CONFIG_HAS_IOMEM=y
1245CONFIG_HAS_IOPORT=y 1251CONFIG_HAS_IOPORT=y
1246CONFIG_HAS_DMA=y 1252CONFIG_HAS_DMA=y
1253CONFIG_HAVE_LMB=y
1247 1254
1248# 1255#
1249# Kernel hacking 1256# Kernel hacking
@@ -1251,6 +1258,7 @@ CONFIG_HAS_DMA=y
1251# CONFIG_PRINTK_TIME is not set 1258# CONFIG_PRINTK_TIME is not set
1252CONFIG_ENABLE_WARN_DEPRECATED=y 1259CONFIG_ENABLE_WARN_DEPRECATED=y
1253CONFIG_ENABLE_MUST_CHECK=y 1260CONFIG_ENABLE_MUST_CHECK=y
1261CONFIG_FRAME_WARN=1024
1254# CONFIG_MAGIC_SYSRQ is not set 1262# CONFIG_MAGIC_SYSRQ is not set
1255# CONFIG_UNUSED_SYMBOLS is not set 1263# CONFIG_UNUSED_SYMBOLS is not set
1256# CONFIG_DEBUG_FS is not set 1264# CONFIG_DEBUG_FS is not set
@@ -1261,6 +1269,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
1261CONFIG_SCHED_DEBUG=y 1269CONFIG_SCHED_DEBUG=y
1262# CONFIG_SCHEDSTATS is not set 1270# CONFIG_SCHEDSTATS is not set
1263# CONFIG_TIMER_STATS is not set 1271# CONFIG_TIMER_STATS is not set
1272# CONFIG_DEBUG_OBJECTS is not set
1264# CONFIG_SLUB_DEBUG_ON is not set 1273# CONFIG_SLUB_DEBUG_ON is not set
1265# CONFIG_SLUB_STATS is not set 1274# CONFIG_SLUB_STATS is not set
1266# CONFIG_DEBUG_RT_MUTEXES is not set 1275# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -1274,9 +1283,11 @@ CONFIG_SCHED_DEBUG=y
1274CONFIG_DEBUG_BUGVERBOSE=y 1283CONFIG_DEBUG_BUGVERBOSE=y
1275CONFIG_DEBUG_INFO=y 1284CONFIG_DEBUG_INFO=y
1276# CONFIG_DEBUG_VM is not set 1285# CONFIG_DEBUG_VM is not set
1286# CONFIG_DEBUG_WRITECOUNT is not set
1277# CONFIG_DEBUG_LIST is not set 1287# CONFIG_DEBUG_LIST is not set
1278# CONFIG_DEBUG_SG is not set 1288# CONFIG_DEBUG_SG is not set
1279# CONFIG_BOOT_PRINTK_DELAY is not set 1289# CONFIG_BOOT_PRINTK_DELAY is not set
1290# CONFIG_RCU_TORTURE_TEST is not set
1280# CONFIG_BACKTRACE_SELF_TEST is not set 1291# CONFIG_BACKTRACE_SELF_TEST is not set
1281# CONFIG_FAULT_INJECTION is not set 1292# CONFIG_FAULT_INJECTION is not set
1282# CONFIG_SAMPLES is not set 1293# CONFIG_SAMPLES is not set
@@ -1284,6 +1295,7 @@ CONFIG_DEBUG_INFO=y
1284# CONFIG_DEBUG_STACK_USAGE is not set 1295# CONFIG_DEBUG_STACK_USAGE is not set
1285# CONFIG_DEBUG_PAGEALLOC is not set 1296# CONFIG_DEBUG_PAGEALLOC is not set
1286# CONFIG_DEBUGGER is not set 1297# CONFIG_DEBUGGER is not set
1298# CONFIG_IRQSTACKS is not set
1287# CONFIG_BDI_SWITCH is not set 1299# CONFIG_BDI_SWITCH is not set
1288# CONFIG_PPC_EARLY_DEBUG is not set 1300# CONFIG_PPC_EARLY_DEBUG is not set
1289 1301
@@ -1294,48 +1306,80 @@ CONFIG_DEBUG_INFO=y
1294# CONFIG_SECURITY is not set 1306# CONFIG_SECURITY is not set
1295# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1307# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1296CONFIG_CRYPTO=y 1308CONFIG_CRYPTO=y
1297# CONFIG_CRYPTO_SEQIV is not set 1309
1310#
1311# Crypto core or helper
1312#
1298# CONFIG_CRYPTO_MANAGER is not set 1313# CONFIG_CRYPTO_MANAGER is not set
1314# CONFIG_CRYPTO_GF128MUL is not set
1315# CONFIG_CRYPTO_NULL is not set
1316# CONFIG_CRYPTO_CRYPTD is not set
1317# CONFIG_CRYPTO_AUTHENC is not set
1318# CONFIG_CRYPTO_TEST is not set
1319
1320#
1321# Authenticated Encryption with Associated Data
1322#
1323# CONFIG_CRYPTO_CCM is not set
1324# CONFIG_CRYPTO_GCM is not set
1325# CONFIG_CRYPTO_SEQIV is not set
1326
1327#
1328# Block modes
1329#
1330# CONFIG_CRYPTO_CBC is not set
1331# CONFIG_CRYPTO_CTR is not set
1332# CONFIG_CRYPTO_CTS is not set
1333# CONFIG_CRYPTO_ECB is not set
1334# CONFIG_CRYPTO_LRW is not set
1335# CONFIG_CRYPTO_PCBC is not set
1336# CONFIG_CRYPTO_XTS is not set
1337
1338#
1339# Hash modes
1340#
1299# CONFIG_CRYPTO_HMAC is not set 1341# CONFIG_CRYPTO_HMAC is not set
1300# CONFIG_CRYPTO_XCBC is not set 1342# CONFIG_CRYPTO_XCBC is not set
1301# CONFIG_CRYPTO_NULL is not set 1343
1344#
1345# Digest
1346#
1347# CONFIG_CRYPTO_CRC32C is not set
1302# CONFIG_CRYPTO_MD4 is not set 1348# CONFIG_CRYPTO_MD4 is not set
1303# CONFIG_CRYPTO_MD5 is not set 1349# CONFIG_CRYPTO_MD5 is not set
1350# CONFIG_CRYPTO_MICHAEL_MIC is not set
1304# CONFIG_CRYPTO_SHA1 is not set 1351# CONFIG_CRYPTO_SHA1 is not set
1305# CONFIG_CRYPTO_SHA256 is not set 1352# CONFIG_CRYPTO_SHA256 is not set
1306# CONFIG_CRYPTO_SHA512 is not set 1353# CONFIG_CRYPTO_SHA512 is not set
1307# CONFIG_CRYPTO_WP512 is not set
1308# CONFIG_CRYPTO_TGR192 is not set 1354# CONFIG_CRYPTO_TGR192 is not set
1309# CONFIG_CRYPTO_GF128MUL is not set 1355# CONFIG_CRYPTO_WP512 is not set
1310# CONFIG_CRYPTO_ECB is not set 1356
1311# CONFIG_CRYPTO_CBC is not set 1357#
1312# CONFIG_CRYPTO_PCBC is not set 1358# Ciphers
1313# CONFIG_CRYPTO_LRW is not set 1359#
1314# CONFIG_CRYPTO_XTS is not set
1315# CONFIG_CRYPTO_CTR is not set
1316# CONFIG_CRYPTO_GCM is not set
1317# CONFIG_CRYPTO_CCM is not set
1318# CONFIG_CRYPTO_CRYPTD is not set
1319# CONFIG_CRYPTO_DES is not set
1320# CONFIG_CRYPTO_FCRYPT is not set
1321# CONFIG_CRYPTO_BLOWFISH is not set
1322# CONFIG_CRYPTO_TWOFISH is not set
1323# CONFIG_CRYPTO_SERPENT is not set
1324# CONFIG_CRYPTO_AES is not set 1360# CONFIG_CRYPTO_AES is not set
1361# CONFIG_CRYPTO_ANUBIS is not set
1362# CONFIG_CRYPTO_ARC4 is not set
1363# CONFIG_CRYPTO_BLOWFISH is not set
1364# CONFIG_CRYPTO_CAMELLIA is not set
1325# CONFIG_CRYPTO_CAST5 is not set 1365# CONFIG_CRYPTO_CAST5 is not set
1326# CONFIG_CRYPTO_CAST6 is not set 1366# CONFIG_CRYPTO_CAST6 is not set
1327# CONFIG_CRYPTO_TEA is not set 1367# CONFIG_CRYPTO_DES is not set
1328# CONFIG_CRYPTO_ARC4 is not set 1368# CONFIG_CRYPTO_FCRYPT is not set
1329# CONFIG_CRYPTO_KHAZAD is not set 1369# CONFIG_CRYPTO_KHAZAD is not set
1330# CONFIG_CRYPTO_ANUBIS is not set
1331# CONFIG_CRYPTO_SEED is not set
1332# CONFIG_CRYPTO_SALSA20 is not set 1370# CONFIG_CRYPTO_SALSA20 is not set
1371# CONFIG_CRYPTO_SEED is not set
1372# CONFIG_CRYPTO_SERPENT is not set
1373# CONFIG_CRYPTO_TEA is not set
1374# CONFIG_CRYPTO_TWOFISH is not set
1375
1376#
1377# Compression
1378#
1333# CONFIG_CRYPTO_DEFLATE is not set 1379# CONFIG_CRYPTO_DEFLATE is not set
1334# CONFIG_CRYPTO_MICHAEL_MIC is not set
1335# CONFIG_CRYPTO_CRC32C is not set
1336# CONFIG_CRYPTO_CAMELLIA is not set
1337# CONFIG_CRYPTO_AUTHENC is not set
1338# CONFIG_CRYPTO_LZO is not set 1380# CONFIG_CRYPTO_LZO is not set
1339CONFIG_CRYPTO_HW=y 1381CONFIG_CRYPTO_HW=y
1340# CONFIG_CRYPTO_DEV_HIFN_795X is not set 1382# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1341# CONFIG_PPC_CLOCK is not set 1383# CONFIG_PPC_CLOCK is not set
1384CONFIG_PPC_LIB_RHEAP=y
1385# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/mpc8641_hpcn_defconfig b/arch/powerpc/configs/mpc8641_hpcn_defconfig
index d01dcdb70bd7..4a8171507391 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.25-rc7 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 31 11:37:11 2008 4# Mon Jun 9 08:52:15 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -32,6 +32,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 34CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_LOCKDEP_SUPPORT=y
35CONFIG_RWSEM_XCHGADD_ALGORITHM=y 37CONFIG_RWSEM_XCHGADD_ALGORITHM=y
36CONFIG_ARCH_HAS_ILOG2_U32=y 38CONFIG_ARCH_HAS_ILOG2_U32=y
37CONFIG_GENERIC_HWEIGHT=y 39CONFIG_GENERIC_HWEIGHT=y
@@ -90,6 +92,7 @@ CONFIG_INITRAMFS_SOURCE=""
90CONFIG_SYSCTL=y 92CONFIG_SYSCTL=y
91CONFIG_EMBEDDED=y 93CONFIG_EMBEDDED=y
92CONFIG_SYSCTL_SYSCALL=y 94CONFIG_SYSCTL_SYSCALL=y
95CONFIG_SYSCTL_SYSCALL_CHECK=y
93CONFIG_KALLSYMS=y 96CONFIG_KALLSYMS=y
94CONFIG_KALLSYMS_ALL=y 97CONFIG_KALLSYMS_ALL=y
95CONFIG_KALLSYMS_EXTRA_PASS=y 98CONFIG_KALLSYMS_EXTRA_PASS=y
@@ -117,12 +120,14 @@ CONFIG_HAVE_OPROFILE=y
117# CONFIG_KPROBES is not set 120# CONFIG_KPROBES is not set
118CONFIG_HAVE_KPROBES=y 121CONFIG_HAVE_KPROBES=y
119CONFIG_HAVE_KRETPROBES=y 122CONFIG_HAVE_KRETPROBES=y
123# CONFIG_HAVE_DMA_ATTRS is not set
120CONFIG_PROC_PAGE_MONITOR=y 124CONFIG_PROC_PAGE_MONITOR=y
121CONFIG_SLABINFO=y 125CONFIG_SLABINFO=y
122CONFIG_RT_MUTEXES=y 126CONFIG_RT_MUTEXES=y
123# CONFIG_TINY_SHMEM is not set 127# CONFIG_TINY_SHMEM is not set
124CONFIG_BASE_SMALL=0 128CONFIG_BASE_SMALL=0
125CONFIG_MODULES=y 129CONFIG_MODULES=y
130# CONFIG_MODULE_FORCE_LOAD is not set
126CONFIG_MODULE_UNLOAD=y 131CONFIG_MODULE_UNLOAD=y
127CONFIG_MODULE_FORCE_UNLOAD=y 132CONFIG_MODULE_FORCE_UNLOAD=y
128CONFIG_MODVERSIONS=y 133CONFIG_MODVERSIONS=y
@@ -162,6 +167,7 @@ CONFIG_PPC_86xx=y
162# CONFIG_PPC_CELL_NATIVE is not set 167# CONFIG_PPC_CELL_NATIVE is not set
163# CONFIG_PQ2ADS is not set 168# CONFIG_PQ2ADS is not set
164CONFIG_MPC8641_HPCN=y 169CONFIG_MPC8641_HPCN=y
170# CONFIG_SBC8641D is not set
165# CONFIG_MPC8610_HPCD is not set 171# CONFIG_MPC8610_HPCD is not set
166CONFIG_MPC8641=y 172CONFIG_MPC8641=y
167# CONFIG_IPIC is not set 173# CONFIG_IPIC is not set
@@ -211,11 +217,13 @@ CONFIG_FLATMEM=y
211CONFIG_FLAT_NODE_MEM_MAP=y 217CONFIG_FLAT_NODE_MEM_MAP=y
212# CONFIG_SPARSEMEM_STATIC is not set 218# CONFIG_SPARSEMEM_STATIC is not set
213# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 219# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
220CONFIG_PAGEFLAGS_EXTENDED=y
214CONFIG_SPLIT_PTLOCK_CPUS=4 221CONFIG_SPLIT_PTLOCK_CPUS=4
215# CONFIG_RESOURCES_64BIT is not set 222# CONFIG_RESOURCES_64BIT is not set
216CONFIG_ZONE_DMA_FLAG=1 223CONFIG_ZONE_DMA_FLAG=1
217CONFIG_BOUNCE=y 224CONFIG_BOUNCE=y
218CONFIG_VIRT_TO_BUS=y 225CONFIG_VIRT_TO_BUS=y
226CONFIG_FORCE_MAX_ZONEORDER=11
219CONFIG_PROC_DEVICETREE=y 227CONFIG_PROC_DEVICETREE=y
220# CONFIG_CMDLINE_BOOL is not set 228# CONFIG_CMDLINE_BOOL is not set
221# CONFIG_PM is not set 229# CONFIG_PM is not set
@@ -240,6 +248,8 @@ CONFIG_PCI_LEGACY=y
240# CONFIG_PCI_DEBUG is not set 248# CONFIG_PCI_DEBUG is not set
241# CONFIG_PCCARD is not set 249# CONFIG_PCCARD is not set
242# CONFIG_HOTPLUG_PCI is not set 250# CONFIG_HOTPLUG_PCI is not set
251CONFIG_HAS_RAPIDIO=y
252# CONFIG_RAPIDIO is not set
243 253
244# 254#
245# Advanced setup 255# Advanced setup
@@ -249,11 +259,11 @@ CONFIG_PCI_LEGACY=y
249# 259#
250# Default settings for advanced configuration options are used 260# Default settings for advanced configuration options are used
251# 261#
252CONFIG_HIGHMEM_START=0xfe000000
253CONFIG_LOWMEM_SIZE=0x30000000 262CONFIG_LOWMEM_SIZE=0x30000000
263CONFIG_PAGE_OFFSET=0xc0000000
254CONFIG_KERNEL_START=0xc0000000 264CONFIG_KERNEL_START=0xc0000000
265CONFIG_PHYSICAL_START=0x00000000
255CONFIG_TASK_SIZE=0xc0000000 266CONFIG_TASK_SIZE=0xc0000000
256CONFIG_BOOT_LOAD=0x00800000
257 267
258# 268#
259# Networking 269# Networking
@@ -324,8 +334,10 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=y
324CONFIG_INET6_XFRM_MODE_BEET=y 334CONFIG_INET6_XFRM_MODE_BEET=y
325# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set 335# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
326CONFIG_IPV6_SIT=y 336CONFIG_IPV6_SIT=y
337CONFIG_IPV6_NDISC_NODETYPE=y
327# CONFIG_IPV6_TUNNEL is not set 338# CONFIG_IPV6_TUNNEL is not set
328# CONFIG_IPV6_MULTIPLE_TABLES is not set 339# CONFIG_IPV6_MULTIPLE_TABLES is not set
340# CONFIG_IPV6_MROUTE is not set
329# CONFIG_NETWORK_SECMARK is not set 341# CONFIG_NETWORK_SECMARK is not set
330# CONFIG_NETFILTER is not set 342# CONFIG_NETFILTER is not set
331# CONFIG_IP_DCCP is not set 343# CONFIG_IP_DCCP is not set
@@ -387,6 +399,7 @@ CONFIG_FW_LOADER=y
387# CONFIG_CONNECTOR is not set 399# CONFIG_CONNECTOR is not set
388# CONFIG_MTD is not set 400# CONFIG_MTD is not set
389CONFIG_OF_DEVICE=y 401CONFIG_OF_DEVICE=y
402CONFIG_OF_I2C=y
390# CONFIG_PARPORT is not set 403# CONFIG_PARPORT is not set
391CONFIG_BLK_DEV=y 404CONFIG_BLK_DEV=y
392# CONFIG_BLK_DEV_FD is not set 405# CONFIG_BLK_DEV_FD is not set
@@ -493,7 +506,11 @@ CONFIG_SCSI_LOWLEVEL=y
493# CONFIG_SCSI_SRP is not set 506# CONFIG_SCSI_SRP is not set
494CONFIG_ATA=y 507CONFIG_ATA=y
495# CONFIG_ATA_NONSTANDARD is not set 508# CONFIG_ATA_NONSTANDARD is not set
509CONFIG_SATA_PMP=y
496CONFIG_SATA_AHCI=y 510CONFIG_SATA_AHCI=y
511# CONFIG_SATA_SIL24 is not set
512# CONFIG_SATA_FSL is not set
513CONFIG_ATA_SFF=y
497# CONFIG_SATA_SVW is not set 514# CONFIG_SATA_SVW is not set
498# CONFIG_ATA_PIIX is not set 515# CONFIG_ATA_PIIX is not set
499# CONFIG_SATA_MV is not set 516# CONFIG_SATA_MV is not set
@@ -503,13 +520,11 @@ CONFIG_SATA_AHCI=y
503# CONFIG_SATA_PROMISE is not set 520# CONFIG_SATA_PROMISE is not set
504# CONFIG_SATA_SX4 is not set 521# CONFIG_SATA_SX4 is not set
505# CONFIG_SATA_SIL is not set 522# CONFIG_SATA_SIL is not set
506# CONFIG_SATA_SIL24 is not set
507# CONFIG_SATA_SIS is not set 523# CONFIG_SATA_SIS is not set
508# CONFIG_SATA_ULI is not set 524# CONFIG_SATA_ULI is not set
509# CONFIG_SATA_VIA is not set 525# CONFIG_SATA_VIA is not set
510# CONFIG_SATA_VITESSE is not set 526# CONFIG_SATA_VITESSE is not set
511# CONFIG_SATA_INIC162X is not set 527# CONFIG_SATA_INIC162X is not set
512# CONFIG_SATA_FSL is not set
513CONFIG_PATA_ALI=y 528CONFIG_PATA_ALI=y
514# CONFIG_PATA_AMD is not set 529# CONFIG_PATA_AMD is not set
515# CONFIG_PATA_ARTOP is not set 530# CONFIG_PATA_ARTOP is not set
@@ -549,6 +564,7 @@ CONFIG_PATA_ALI=y
549# CONFIG_PATA_VIA is not set 564# CONFIG_PATA_VIA is not set
550# CONFIG_PATA_WINBOND is not set 565# CONFIG_PATA_WINBOND is not set
551# CONFIG_PATA_PLATFORM is not set 566# CONFIG_PATA_PLATFORM is not set
567# CONFIG_PATA_SCH is not set
552# CONFIG_MD is not set 568# CONFIG_MD is not set
553# CONFIG_FUSION is not set 569# CONFIG_FUSION is not set
554 570
@@ -614,7 +630,6 @@ CONFIG_NETDEV_1000=y
614# CONFIG_SIS190 is not set 630# CONFIG_SIS190 is not set
615# CONFIG_SKGE is not set 631# CONFIG_SKGE is not set
616# CONFIG_SKY2 is not set 632# CONFIG_SKY2 is not set
617# CONFIG_SK98LIN is not set
618# CONFIG_VIA_VELOCITY is not set 633# CONFIG_VIA_VELOCITY is not set
619# CONFIG_TIGON3 is not set 634# CONFIG_TIGON3 is not set
620# CONFIG_BNX2 is not set 635# CONFIG_BNX2 is not set
@@ -634,6 +649,7 @@ CONFIG_NETDEV_10000=y
634# CONFIG_MLX4_CORE is not set 649# CONFIG_MLX4_CORE is not set
635# CONFIG_TEHUTI is not set 650# CONFIG_TEHUTI is not set
636# CONFIG_BNX2X is not set 651# CONFIG_BNX2X is not set
652# CONFIG_SFC is not set
637# CONFIG_TR is not set 653# CONFIG_TR is not set
638 654
639# 655#
@@ -641,6 +657,7 @@ CONFIG_NETDEV_10000=y
641# 657#
642# CONFIG_WLAN_PRE80211 is not set 658# CONFIG_WLAN_PRE80211 is not set
643# CONFIG_WLAN_80211 is not set 659# CONFIG_WLAN_80211 is not set
660# CONFIG_IWLWIFI_LEDS is not set
644 661
645# 662#
646# USB Network Adapters 663# USB Network Adapters
@@ -705,6 +722,7 @@ CONFIG_VT=y
705CONFIG_VT_CONSOLE=y 722CONFIG_VT_CONSOLE=y
706CONFIG_HW_CONSOLE=y 723CONFIG_HW_CONSOLE=y
707# CONFIG_VT_HW_CONSOLE_BINDING is not set 724# CONFIG_VT_HW_CONSOLE_BINDING is not set
725CONFIG_DEVKMEM=y
708# CONFIG_SERIAL_NONSTANDARD is not set 726# CONFIG_SERIAL_NONSTANDARD is not set
709# CONFIG_NOZOMI is not set 727# CONFIG_NOZOMI is not set
710 728
@@ -736,7 +754,6 @@ CONFIG_LEGACY_PTY_COUNT=256
736# CONFIG_IPMI_HANDLER is not set 754# CONFIG_IPMI_HANDLER is not set
737# CONFIG_HW_RANDOM is not set 755# CONFIG_HW_RANDOM is not set
738CONFIG_NVRAM=y 756CONFIG_NVRAM=y
739# CONFIG_GEN_RTC is not set
740# CONFIG_R3964 is not set 757# CONFIG_R3964 is not set
741# CONFIG_APPLICOM is not set 758# CONFIG_APPLICOM is not set
742# CONFIG_RAW_DRIVER is not set 759# CONFIG_RAW_DRIVER is not set
@@ -747,13 +764,6 @@ CONFIG_I2C_BOARDINFO=y
747# CONFIG_I2C_CHARDEV is not set 764# CONFIG_I2C_CHARDEV is not set
748 765
749# 766#
750# I2C Algorithms
751#
752# CONFIG_I2C_ALGOBIT is not set
753# CONFIG_I2C_ALGOPCF is not set
754# CONFIG_I2C_ALGOPCA is not set
755
756#
757# I2C Hardware Bus support 767# I2C Hardware Bus support
758# 768#
759# CONFIG_I2C_ALI1535 is not set 769# CONFIG_I2C_ALI1535 is not set
@@ -780,6 +790,7 @@ CONFIG_I2C_MPC=y
780# CONFIG_I2C_VIA is not set 790# CONFIG_I2C_VIA is not set
781# CONFIG_I2C_VIAPRO is not set 791# CONFIG_I2C_VIAPRO is not set
782# CONFIG_I2C_VOODOO3 is not set 792# CONFIG_I2C_VOODOO3 is not set
793# CONFIG_I2C_PCA_PLATFORM is not set
783 794
784# 795#
785# Miscellaneous I2C Chip support 796# Miscellaneous I2C Chip support
@@ -789,19 +800,13 @@ CONFIG_SENSORS_EEPROM=y
789# CONFIG_SENSORS_PCF8574 is not set 800# CONFIG_SENSORS_PCF8574 is not set
790# CONFIG_PCF8575 is not set 801# CONFIG_PCF8575 is not set
791# CONFIG_SENSORS_PCF8591 is not set 802# CONFIG_SENSORS_PCF8591 is not set
792# CONFIG_TPS65010 is not set
793# CONFIG_SENSORS_MAX6875 is not set 803# CONFIG_SENSORS_MAX6875 is not set
794# CONFIG_SENSORS_TSL2550 is not set 804# CONFIG_SENSORS_TSL2550 is not set
795# CONFIG_I2C_DEBUG_CORE is not set 805# CONFIG_I2C_DEBUG_CORE is not set
796# CONFIG_I2C_DEBUG_ALGO is not set 806# CONFIG_I2C_DEBUG_ALGO is not set
797# CONFIG_I2C_DEBUG_BUS is not set 807# CONFIG_I2C_DEBUG_BUS is not set
798# CONFIG_I2C_DEBUG_CHIP is not set 808# CONFIG_I2C_DEBUG_CHIP is not set
799
800#
801# SPI support
802#
803# CONFIG_SPI is not set 809# CONFIG_SPI is not set
804# CONFIG_SPI_MASTER is not set
805# CONFIG_W1 is not set 810# CONFIG_W1 is not set
806# CONFIG_POWER_SUPPLY is not set 811# CONFIG_POWER_SUPPLY is not set
807# CONFIG_HWMON is not set 812# CONFIG_HWMON is not set
@@ -818,13 +823,33 @@ CONFIG_SSB_POSSIBLE=y
818# Multifunction device drivers 823# Multifunction device drivers
819# 824#
820# CONFIG_MFD_SM501 is not set 825# CONFIG_MFD_SM501 is not set
826# CONFIG_HTC_PASIC3 is not set
821 827
822# 828#
823# Multimedia devices 829# Multimedia devices
824# 830#
831
832#
833# Multimedia core support
834#
825# CONFIG_VIDEO_DEV is not set 835# CONFIG_VIDEO_DEV is not set
826CONFIG_DVB_CORE=m 836CONFIG_DVB_CORE=m
827# CONFIG_DVB_CORE_ATTACH is not set 837CONFIG_VIDEO_MEDIA=m
838
839#
840# Multimedia drivers
841#
842# CONFIG_MEDIA_ATTACH is not set
843CONFIG_MEDIA_TUNER=m
844# CONFIG_MEDIA_TUNER_CUSTOMIZE is not set
845CONFIG_MEDIA_TUNER_SIMPLE=m
846CONFIG_MEDIA_TUNER_TDA8290=m
847CONFIG_MEDIA_TUNER_TDA9887=m
848CONFIG_MEDIA_TUNER_TEA5761=m
849CONFIG_MEDIA_TUNER_TEA5767=m
850CONFIG_MEDIA_TUNER_MT20XX=m
851CONFIG_MEDIA_TUNER_XC2028=m
852CONFIG_MEDIA_TUNER_XC5000=m
828CONFIG_DVB_CAPTURE_DRIVERS=y 853CONFIG_DVB_CAPTURE_DRIVERS=y
829 854
830# 855#
@@ -867,14 +892,17 @@ CONFIG_DVB_CAPTURE_DRIVERS=y
867# 892#
868# DVB-S (satellite) frontends 893# DVB-S (satellite) frontends
869# 894#
870# CONFIG_DVB_STV0299 is not set
871# CONFIG_DVB_CX24110 is not set 895# CONFIG_DVB_CX24110 is not set
872# CONFIG_DVB_CX24123 is not set 896# CONFIG_DVB_CX24123 is not set
873# CONFIG_DVB_TDA8083 is not set
874# CONFIG_DVB_MT312 is not set 897# CONFIG_DVB_MT312 is not set
875# CONFIG_DVB_VES1X93 is not set
876# CONFIG_DVB_S5H1420 is not set 898# CONFIG_DVB_S5H1420 is not set
899# CONFIG_DVB_STV0299 is not set
900# CONFIG_DVB_TDA8083 is not set
877# CONFIG_DVB_TDA10086 is not set 901# CONFIG_DVB_TDA10086 is not set
902# CONFIG_DVB_VES1X93 is not set
903# CONFIG_DVB_TUNER_ITD1000 is not set
904# CONFIG_DVB_TDA826X is not set
905# CONFIG_DVB_TUA6100 is not set
878 906
879# 907#
880# DVB-T (terrestrial) frontends 908# DVB-T (terrestrial) frontends
@@ -892,6 +920,7 @@ CONFIG_DVB_CAPTURE_DRIVERS=y
892# CONFIG_DVB_DIB3000MC is not set 920# CONFIG_DVB_DIB3000MC is not set
893# CONFIG_DVB_DIB7000M is not set 921# CONFIG_DVB_DIB7000M is not set
894# CONFIG_DVB_DIB7000P is not set 922# CONFIG_DVB_DIB7000P is not set
923# CONFIG_DVB_TDA10048 is not set
895 924
896# 925#
897# DVB-C (cable) frontends 926# DVB-C (cable) frontends
@@ -910,27 +939,21 @@ CONFIG_DVB_CAPTURE_DRIVERS=y
910# CONFIG_DVB_BCM3510 is not set 939# CONFIG_DVB_BCM3510 is not set
911# CONFIG_DVB_LGDT330X is not set 940# CONFIG_DVB_LGDT330X is not set
912# CONFIG_DVB_S5H1409 is not set 941# CONFIG_DVB_S5H1409 is not set
942# CONFIG_DVB_AU8522 is not set
943# CONFIG_DVB_S5H1411 is not set
913 944
914# 945#
915# Tuners/PLL support 946# Digital terrestrial only tuners/PLL
916# 947#
917# CONFIG_DVB_PLL is not set 948# CONFIG_DVB_PLL is not set
918# CONFIG_DVB_TDA826X is not set
919# CONFIG_DVB_TDA827X is not set
920# CONFIG_DVB_TDA18271 is not set
921# CONFIG_DVB_TUNER_QT1010 is not set
922# CONFIG_DVB_TUNER_MT2060 is not set
923# CONFIG_DVB_TUNER_MT2266 is not set
924# CONFIG_DVB_TUNER_MT2131 is not set
925# CONFIG_DVB_TUNER_DIB0070 is not set 949# CONFIG_DVB_TUNER_DIB0070 is not set
926# CONFIG_DVB_TUNER_XC5000 is not set
927 950
928# 951#
929# Miscellaneous devices 952# SEC control devices for DVB-S
930# 953#
931# CONFIG_DVB_LNBP21 is not set 954# CONFIG_DVB_LNBP21 is not set
955# CONFIG_DVB_ISL6405 is not set
932# CONFIG_DVB_ISL6421 is not set 956# CONFIG_DVB_ISL6421 is not set
933# CONFIG_DVB_TUA6100 is not set
934CONFIG_DAB=y 957CONFIG_DAB=y
935# CONFIG_USB_DABUSB is not set 958# CONFIG_USB_DABUSB is not set
936 959
@@ -997,6 +1020,7 @@ CONFIG_SND_AC97_CODEC=y
997# CONFIG_SND_AU8810 is not set 1020# CONFIG_SND_AU8810 is not set
998# CONFIG_SND_AU8820 is not set 1021# CONFIG_SND_AU8820 is not set
999# CONFIG_SND_AU8830 is not set 1022# CONFIG_SND_AU8830 is not set
1023# CONFIG_SND_AW2 is not set
1000# CONFIG_SND_AZT3328 is not set 1024# CONFIG_SND_AZT3328 is not set
1001# CONFIG_SND_BT87X is not set 1025# CONFIG_SND_BT87X is not set
1002# CONFIG_SND_CA0106 is not set 1026# CONFIG_SND_CA0106 is not set
@@ -1071,11 +1095,11 @@ CONFIG_SND_INTEL8X0=y
1071# CONFIG_SND_SOC is not set 1095# CONFIG_SND_SOC is not set
1072 1096
1073# 1097#
1074# SoC Audio support for SuperH 1098# ALSA SoC audio for Freescale SOCs
1075# 1099#
1076 1100
1077# 1101#
1078# ALSA SoC audio for Freescale SOCs 1102# SoC Audio for the Texas Instruments OMAP
1079# 1103#
1080 1104
1081# 1105#
@@ -1110,16 +1134,20 @@ CONFIG_USB_DEVICEFS=y
1110CONFIG_USB_DEVICE_CLASS=y 1134CONFIG_USB_DEVICE_CLASS=y
1111# CONFIG_USB_DYNAMIC_MINORS is not set 1135# CONFIG_USB_DYNAMIC_MINORS is not set
1112# CONFIG_USB_OTG is not set 1136# CONFIG_USB_OTG is not set
1137# CONFIG_USB_OTG_WHITELIST is not set
1138# CONFIG_USB_OTG_BLACKLIST_HUB is not set
1113 1139
1114# 1140#
1115# USB Host Controller Drivers 1141# USB Host Controller Drivers
1116# 1142#
1143# CONFIG_USB_C67X00_HCD is not set
1117CONFIG_USB_EHCI_HCD=y 1144CONFIG_USB_EHCI_HCD=y
1118# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1145# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1119# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1146# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1120# CONFIG_USB_EHCI_FSL is not set 1147# CONFIG_USB_EHCI_FSL is not set
1121CONFIG_USB_EHCI_HCD_PPC_OF=y 1148CONFIG_USB_EHCI_HCD_PPC_OF=y
1122# CONFIG_USB_ISP116X_HCD is not set 1149# CONFIG_USB_ISP116X_HCD is not set
1150# CONFIG_USB_ISP1760_HCD is not set
1123CONFIG_USB_OHCI_HCD=y 1151CONFIG_USB_OHCI_HCD=y
1124CONFIG_USB_OHCI_HCD_PPC_OF=y 1152CONFIG_USB_OHCI_HCD_PPC_OF=y
1125CONFIG_USB_OHCI_HCD_PPC_OF_BE=y 1153CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
@@ -1137,6 +1165,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1137# 1165#
1138# CONFIG_USB_ACM is not set 1166# CONFIG_USB_ACM is not set
1139# CONFIG_USB_PRINTER is not set 1167# CONFIG_USB_PRINTER is not set
1168# CONFIG_USB_WDM is not set
1140 1169
1141# 1170#
1142# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 1171# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -1156,7 +1185,9 @@ CONFIG_USB_STORAGE=y
1156# CONFIG_USB_STORAGE_SDDR55 is not set 1185# CONFIG_USB_STORAGE_SDDR55 is not set
1157# CONFIG_USB_STORAGE_JUMPSHOT is not set 1186# CONFIG_USB_STORAGE_JUMPSHOT is not set
1158# CONFIG_USB_STORAGE_ALAUDA is not set 1187# CONFIG_USB_STORAGE_ALAUDA is not set
1188# CONFIG_USB_STORAGE_ONETOUCH is not set
1159# CONFIG_USB_STORAGE_KARMA is not set 1189# CONFIG_USB_STORAGE_KARMA is not set
1190# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1160# CONFIG_USB_LIBUSUAL is not set 1191# CONFIG_USB_LIBUSUAL is not set
1161 1192
1162# 1193#
@@ -1194,10 +1225,12 @@ CONFIG_USB_MON=y
1194# CONFIG_USB_TRANCEVIBRATOR is not set 1225# CONFIG_USB_TRANCEVIBRATOR is not set
1195# CONFIG_USB_IOWARRIOR is not set 1226# CONFIG_USB_IOWARRIOR is not set
1196# CONFIG_USB_TEST is not set 1227# CONFIG_USB_TEST is not set
1228# CONFIG_USB_ISIGHTFW is not set
1197# CONFIG_USB_GADGET is not set 1229# CONFIG_USB_GADGET is not set
1198# CONFIG_MMC is not set 1230# CONFIG_MMC is not set
1199# CONFIG_MEMSTICK is not set 1231# CONFIG_MEMSTICK is not set
1200# CONFIG_NEW_LEDS is not set 1232# CONFIG_NEW_LEDS is not set
1233# CONFIG_ACCESSIBILITY is not set
1201# CONFIG_INFINIBAND is not set 1234# CONFIG_INFINIBAND is not set
1202# CONFIG_EDAC is not set 1235# CONFIG_EDAC is not set
1203CONFIG_RTC_LIB=y 1236CONFIG_RTC_LIB=y
@@ -1249,11 +1282,8 @@ CONFIG_RTC_DRV_CMOS=y
1249# 1282#
1250# on-CPU RTC drivers 1283# on-CPU RTC drivers
1251# 1284#
1285# CONFIG_RTC_DRV_PPC is not set
1252# CONFIG_DMADEVICES is not set 1286# CONFIG_DMADEVICES is not set
1253
1254#
1255# Userspace I/O
1256#
1257# CONFIG_UIO is not set 1287# CONFIG_UIO is not set
1258 1288
1259# 1289#
@@ -1273,7 +1303,6 @@ CONFIG_FS_MBCACHE=y
1273# CONFIG_JFS_FS is not set 1303# CONFIG_JFS_FS is not set
1274# CONFIG_FS_POSIX_ACL is not set 1304# CONFIG_FS_POSIX_ACL is not set
1275# CONFIG_XFS_FS is not set 1305# CONFIG_XFS_FS is not set
1276# CONFIG_GFS2_FS is not set
1277# CONFIG_OCFS2_FS is not set 1306# CONFIG_OCFS2_FS is not set
1278CONFIG_DNOTIFY=y 1307CONFIG_DNOTIFY=y
1279CONFIG_INOTIFY=y 1308CONFIG_INOTIFY=y
@@ -1343,10 +1372,9 @@ CONFIG_NFS_FS=y
1343CONFIG_NFS_V3=y 1372CONFIG_NFS_V3=y
1344# CONFIG_NFS_V3_ACL is not set 1373# CONFIG_NFS_V3_ACL is not set
1345CONFIG_NFS_V4=y 1374CONFIG_NFS_V4=y
1346# CONFIG_NFS_DIRECTIO is not set
1347CONFIG_NFSD=y 1375CONFIG_NFSD=y
1348# CONFIG_NFSD_V3 is not set 1376# CONFIG_NFSD_V3 is not set
1349CONFIG_NFSD_TCP=y 1377# CONFIG_NFSD_V4 is not set
1350CONFIG_ROOT_NFS=y 1378CONFIG_ROOT_NFS=y
1351CONFIG_LOCKD=y 1379CONFIG_LOCKD=y
1352CONFIG_LOCKD_V4=y 1380CONFIG_LOCKD_V4=y
@@ -1430,9 +1458,10 @@ CONFIG_NLS_UTF8=m
1430# Library routines 1458# Library routines
1431# 1459#
1432CONFIG_BITREVERSE=y 1460CONFIG_BITREVERSE=y
1461# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1433# CONFIG_CRC_CCITT is not set 1462# CONFIG_CRC_CCITT is not set
1434# CONFIG_CRC16 is not set 1463# CONFIG_CRC16 is not set
1435# CONFIG_CRC_ITU_T is not set 1464CONFIG_CRC_ITU_T=m
1436CONFIG_CRC32=y 1465CONFIG_CRC32=y
1437# CONFIG_CRC7 is not set 1466# CONFIG_CRC7 is not set
1438CONFIG_LIBCRC32C=m 1467CONFIG_LIBCRC32C=m
@@ -1441,6 +1470,7 @@ CONFIG_PLIST=y
1441CONFIG_HAS_IOMEM=y 1470CONFIG_HAS_IOMEM=y
1442CONFIG_HAS_IOPORT=y 1471CONFIG_HAS_IOPORT=y
1443CONFIG_HAS_DMA=y 1472CONFIG_HAS_DMA=y
1473CONFIG_HAVE_LMB=y
1444 1474
1445# 1475#
1446# Kernel hacking 1476# Kernel hacking
@@ -1448,6 +1478,7 @@ CONFIG_HAS_DMA=y
1448# CONFIG_PRINTK_TIME is not set 1478# CONFIG_PRINTK_TIME is not set
1449CONFIG_ENABLE_WARN_DEPRECATED=y 1479CONFIG_ENABLE_WARN_DEPRECATED=y
1450CONFIG_ENABLE_MUST_CHECK=y 1480CONFIG_ENABLE_MUST_CHECK=y
1481CONFIG_FRAME_WARN=1024
1451# CONFIG_MAGIC_SYSRQ is not set 1482# CONFIG_MAGIC_SYSRQ is not set
1452# CONFIG_UNUSED_SYMBOLS is not set 1483# CONFIG_UNUSED_SYMBOLS is not set
1453# CONFIG_DEBUG_FS is not set 1484# CONFIG_DEBUG_FS is not set
@@ -1458,6 +1489,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
1458CONFIG_SCHED_DEBUG=y 1489CONFIG_SCHED_DEBUG=y
1459# CONFIG_SCHEDSTATS is not set 1490# CONFIG_SCHEDSTATS is not set
1460# CONFIG_TIMER_STATS is not set 1491# CONFIG_TIMER_STATS is not set
1492# CONFIG_DEBUG_OBJECTS is not set
1461# CONFIG_SLUB_DEBUG_ON is not set 1493# CONFIG_SLUB_DEBUG_ON is not set
1462# CONFIG_SLUB_STATS is not set 1494# CONFIG_SLUB_STATS is not set
1463# CONFIG_DEBUG_RT_MUTEXES is not set 1495# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -1471,6 +1503,7 @@ CONFIG_SCHED_DEBUG=y
1471# CONFIG_DEBUG_BUGVERBOSE is not set 1503# CONFIG_DEBUG_BUGVERBOSE is not set
1472CONFIG_DEBUG_INFO=y 1504CONFIG_DEBUG_INFO=y
1473# CONFIG_DEBUG_VM is not set 1505# CONFIG_DEBUG_VM is not set
1506# CONFIG_DEBUG_WRITECOUNT is not set
1474# CONFIG_DEBUG_LIST is not set 1507# CONFIG_DEBUG_LIST is not set
1475# CONFIG_DEBUG_SG is not set 1508# CONFIG_DEBUG_SG is not set
1476# CONFIG_BOOT_PRINTK_DELAY is not set 1509# CONFIG_BOOT_PRINTK_DELAY is not set
@@ -1482,6 +1515,7 @@ CONFIG_DEBUG_INFO=y
1482# CONFIG_DEBUG_STACK_USAGE is not set 1515# CONFIG_DEBUG_STACK_USAGE is not set
1483# CONFIG_DEBUG_PAGEALLOC is not set 1516# CONFIG_DEBUG_PAGEALLOC is not set
1484# CONFIG_DEBUGGER is not set 1517# CONFIG_DEBUGGER is not set
1518# CONFIG_IRQSTACKS is not set
1485# CONFIG_BDI_SWITCH is not set 1519# CONFIG_BDI_SWITCH is not set
1486# CONFIG_PPC_EARLY_DEBUG is not set 1520# CONFIG_PPC_EARLY_DEBUG is not set
1487 1521
@@ -1492,52 +1526,82 @@ CONFIG_DEBUG_INFO=y
1492# CONFIG_SECURITY is not set 1526# CONFIG_SECURITY is not set
1493# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1527# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1494CONFIG_CRYPTO=y 1528CONFIG_CRYPTO=y
1529
1530#
1531# Crypto core or helper
1532#
1495CONFIG_CRYPTO_ALGAPI=y 1533CONFIG_CRYPTO_ALGAPI=y
1496CONFIG_CRYPTO_BLKCIPHER=y 1534CONFIG_CRYPTO_BLKCIPHER=y
1497# CONFIG_CRYPTO_SEQIV is not set
1498CONFIG_CRYPTO_HASH=y 1535CONFIG_CRYPTO_HASH=y
1499CONFIG_CRYPTO_MANAGER=y 1536CONFIG_CRYPTO_MANAGER=y
1537# CONFIG_CRYPTO_GF128MUL is not set
1538# CONFIG_CRYPTO_NULL is not set
1539# CONFIG_CRYPTO_CRYPTD is not set
1540# CONFIG_CRYPTO_AUTHENC is not set
1541# CONFIG_CRYPTO_TEST is not set
1542
1543#
1544# Authenticated Encryption with Associated Data
1545#
1546# CONFIG_CRYPTO_CCM is not set
1547# CONFIG_CRYPTO_GCM is not set
1548# CONFIG_CRYPTO_SEQIV is not set
1549
1550#
1551# Block modes
1552#
1553CONFIG_CRYPTO_CBC=y
1554# CONFIG_CRYPTO_CTR is not set
1555# CONFIG_CRYPTO_CTS is not set
1556# CONFIG_CRYPTO_ECB is not set
1557# CONFIG_CRYPTO_LRW is not set
1558CONFIG_CRYPTO_PCBC=m
1559# CONFIG_CRYPTO_XTS is not set
1560
1561#
1562# Hash modes
1563#
1500CONFIG_CRYPTO_HMAC=y 1564CONFIG_CRYPTO_HMAC=y
1501# CONFIG_CRYPTO_XCBC is not set 1565# CONFIG_CRYPTO_XCBC is not set
1502# CONFIG_CRYPTO_NULL is not set 1566
1567#
1568# Digest
1569#
1570# CONFIG_CRYPTO_CRC32C is not set
1503# CONFIG_CRYPTO_MD4 is not set 1571# CONFIG_CRYPTO_MD4 is not set
1504CONFIG_CRYPTO_MD5=y 1572CONFIG_CRYPTO_MD5=y
1573# CONFIG_CRYPTO_MICHAEL_MIC is not set
1505CONFIG_CRYPTO_SHA1=m 1574CONFIG_CRYPTO_SHA1=m
1506# CONFIG_CRYPTO_SHA256 is not set 1575# CONFIG_CRYPTO_SHA256 is not set
1507# CONFIG_CRYPTO_SHA512 is not set 1576# CONFIG_CRYPTO_SHA512 is not set
1508# CONFIG_CRYPTO_WP512 is not set
1509# CONFIG_CRYPTO_TGR192 is not set 1577# CONFIG_CRYPTO_TGR192 is not set
1510# CONFIG_CRYPTO_GF128MUL is not set 1578# CONFIG_CRYPTO_WP512 is not set
1511# CONFIG_CRYPTO_ECB is not set 1579
1512CONFIG_CRYPTO_CBC=y 1580#
1513CONFIG_CRYPTO_PCBC=m 1581# Ciphers
1514# CONFIG_CRYPTO_LRW is not set 1582#
1515# CONFIG_CRYPTO_XTS is not set
1516# CONFIG_CRYPTO_CTR is not set
1517# CONFIG_CRYPTO_GCM is not set
1518# CONFIG_CRYPTO_CCM is not set
1519# CONFIG_CRYPTO_CRYPTD is not set
1520CONFIG_CRYPTO_DES=y
1521# CONFIG_CRYPTO_FCRYPT is not set
1522# CONFIG_CRYPTO_BLOWFISH is not set
1523# CONFIG_CRYPTO_TWOFISH is not set
1524# CONFIG_CRYPTO_SERPENT is not set
1525# CONFIG_CRYPTO_AES is not set 1583# CONFIG_CRYPTO_AES is not set
1584# CONFIG_CRYPTO_ANUBIS is not set
1585# CONFIG_CRYPTO_ARC4 is not set
1586# CONFIG_CRYPTO_BLOWFISH is not set
1587# CONFIG_CRYPTO_CAMELLIA is not set
1526# CONFIG_CRYPTO_CAST5 is not set 1588# CONFIG_CRYPTO_CAST5 is not set
1527# CONFIG_CRYPTO_CAST6 is not set 1589# CONFIG_CRYPTO_CAST6 is not set
1528# CONFIG_CRYPTO_TEA is not set 1590CONFIG_CRYPTO_DES=y
1529# CONFIG_CRYPTO_ARC4 is not set 1591# CONFIG_CRYPTO_FCRYPT is not set
1530# CONFIG_CRYPTO_KHAZAD is not set 1592# CONFIG_CRYPTO_KHAZAD is not set
1531# CONFIG_CRYPTO_ANUBIS is not set
1532# CONFIG_CRYPTO_SEED is not set
1533# CONFIG_CRYPTO_SALSA20 is not set 1593# CONFIG_CRYPTO_SALSA20 is not set
1594# CONFIG_CRYPTO_SEED is not set
1595# CONFIG_CRYPTO_SERPENT is not set
1596# CONFIG_CRYPTO_TEA is not set
1597# CONFIG_CRYPTO_TWOFISH is not set
1598
1599#
1600# Compression
1601#
1534# CONFIG_CRYPTO_DEFLATE is not set 1602# CONFIG_CRYPTO_DEFLATE is not set
1535# CONFIG_CRYPTO_MICHAEL_MIC is not set
1536# CONFIG_CRYPTO_CRC32C is not set
1537# CONFIG_CRYPTO_CAMELLIA is not set
1538# CONFIG_CRYPTO_TEST is not set
1539# CONFIG_CRYPTO_AUTHENC is not set
1540# CONFIG_CRYPTO_LZO is not set 1603# CONFIG_CRYPTO_LZO is not set
1541CONFIG_CRYPTO_HW=y 1604CONFIG_CRYPTO_HW=y
1542# CONFIG_CRYPTO_DEV_HIFN_795X is not set 1605# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1543# CONFIG_PPC_CLOCK is not set 1606# CONFIG_PPC_CLOCK is not set
1607# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/mpc866_ads_defconfig b/arch/powerpc/configs/mpc866_ads_defconfig
index 2d831db9ae5b..46fffbcd3f99 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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 24 08:48:35 2008 4# Mon Jun 9 08:52:16 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -28,6 +28,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
28CONFIG_GENERIC_HARDIRQS=y 28CONFIG_GENERIC_HARDIRQS=y
29# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 29# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
30CONFIG_IRQ_PER_CPU=y 30CONFIG_IRQ_PER_CPU=y
31CONFIG_STACKTRACE_SUPPORT=y
32CONFIG_LOCKDEP_SUPPORT=y
31CONFIG_RWSEM_XCHGADD_ALGORITHM=y 33CONFIG_RWSEM_XCHGADD_ALGORITHM=y
32CONFIG_ARCH_HAS_ILOG2_U32=y 34CONFIG_ARCH_HAS_ILOG2_U32=y
33CONFIG_GENERIC_HWEIGHT=y 35CONFIG_GENERIC_HWEIGHT=y
@@ -106,6 +108,7 @@ CONFIG_SLUB=y
106CONFIG_HAVE_OPROFILE=y 108CONFIG_HAVE_OPROFILE=y
107CONFIG_HAVE_KPROBES=y 109CONFIG_HAVE_KPROBES=y
108CONFIG_HAVE_KRETPROBES=y 110CONFIG_HAVE_KRETPROBES=y
111# CONFIG_HAVE_DMA_ATTRS is not set
109CONFIG_PROC_PAGE_MONITOR=y 112CONFIG_PROC_PAGE_MONITOR=y
110CONFIG_SLABINFO=y 113CONFIG_SLABINFO=y
111CONFIG_RT_MUTEXES=y 114CONFIG_RT_MUTEXES=y
@@ -210,11 +213,13 @@ CONFIG_FLATMEM=y
210CONFIG_FLAT_NODE_MEM_MAP=y 213CONFIG_FLAT_NODE_MEM_MAP=y
211# CONFIG_SPARSEMEM_STATIC is not set 214# CONFIG_SPARSEMEM_STATIC is not set
212# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 215# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
216CONFIG_PAGEFLAGS_EXTENDED=y
213CONFIG_SPLIT_PTLOCK_CPUS=4 217CONFIG_SPLIT_PTLOCK_CPUS=4
214# CONFIG_RESOURCES_64BIT is not set 218# CONFIG_RESOURCES_64BIT is not set
215CONFIG_ZONE_DMA_FLAG=1 219CONFIG_ZONE_DMA_FLAG=1
216CONFIG_BOUNCE=y 220CONFIG_BOUNCE=y
217CONFIG_VIRT_TO_BUS=y 221CONFIG_VIRT_TO_BUS=y
222CONFIG_FORCE_MAX_ZONEORDER=11
218# CONFIG_PROC_DEVICETREE is not set 223# CONFIG_PROC_DEVICETREE is not set
219# CONFIG_CMDLINE_BOOL is not set 224# CONFIG_CMDLINE_BOOL is not set
220# CONFIG_PM is not set 225# CONFIG_PM is not set
@@ -231,6 +236,7 @@ CONFIG_FSL_SOC=y
231# CONFIG_PCI_SYSCALL is not set 236# CONFIG_PCI_SYSCALL is not set
232# CONFIG_PCI_QSPAN is not set 237# CONFIG_PCI_QSPAN is not set
233# CONFIG_ARCH_SUPPORTS_MSI is not set 238# CONFIG_ARCH_SUPPORTS_MSI is not set
239# CONFIG_HAS_RAPIDIO is not set
234 240
235# 241#
236# Advanced setup 242# Advanced setup
@@ -240,13 +246,13 @@ CONFIG_FSL_SOC=y
240# 246#
241# Default settings for advanced configuration options are used 247# Default settings for advanced configuration options are used
242# 248#
243CONFIG_HIGHMEM_START=0xfe000000
244CONFIG_LOWMEM_SIZE=0x30000000 249CONFIG_LOWMEM_SIZE=0x30000000
250CONFIG_PAGE_OFFSET=0xc0000000
245CONFIG_KERNEL_START=0xc0000000 251CONFIG_KERNEL_START=0xc0000000
252CONFIG_PHYSICAL_START=0x00000000
246CONFIG_TASK_SIZE=0x80000000 253CONFIG_TASK_SIZE=0x80000000
247CONFIG_CONSISTENT_START=0xfd000000 254CONFIG_CONSISTENT_START=0xfd000000
248CONFIG_CONSISTENT_SIZE=0x00200000 255CONFIG_CONSISTENT_SIZE=0x00200000
249CONFIG_BOOT_LOAD=0x00400000
250 256
251# 257#
252# Networking 258# Networking
@@ -294,8 +300,6 @@ CONFIG_TCP_CONG_CUBIC=y
294CONFIG_DEFAULT_TCP_CONG="cubic" 300CONFIG_DEFAULT_TCP_CONG="cubic"
295# CONFIG_TCP_MD5SIG is not set 301# CONFIG_TCP_MD5SIG is not set
296# CONFIG_IPV6 is not set 302# CONFIG_IPV6 is not set
297# CONFIG_INET6_XFRM_TUNNEL is not set
298# CONFIG_INET6_TUNNEL is not set
299# CONFIG_NETWORK_SECMARK is not set 303# CONFIG_NETWORK_SECMARK is not set
300# CONFIG_NETFILTER is not set 304# CONFIG_NETFILTER is not set
301# CONFIG_IP_DCCP is not set 305# CONFIG_IP_DCCP is not set
@@ -419,6 +423,7 @@ CONFIG_NETDEV_10000=y
419# 423#
420# CONFIG_WLAN_PRE80211 is not set 424# CONFIG_WLAN_PRE80211 is not set
421# CONFIG_WLAN_80211 is not set 425# CONFIG_WLAN_80211 is not set
426# CONFIG_IWLWIFI_LEDS is not set
422# CONFIG_WAN is not set 427# CONFIG_WAN is not set
423# CONFIG_PPP is not set 428# CONFIG_PPP is not set
424# CONFIG_SLIP is not set 429# CONFIG_SLIP is not set
@@ -485,6 +490,7 @@ CONFIG_SERIO_LIBPS2=y
485# Character devices 490# Character devices
486# 491#
487# CONFIG_VT is not set 492# CONFIG_VT is not set
493CONFIG_DEVKMEM=y
488# CONFIG_SERIAL_NONSTANDARD is not set 494# CONFIG_SERIAL_NONSTANDARD is not set
489 495
490# 496#
@@ -517,12 +523,7 @@ CONFIG_GEN_RTC=y
517# CONFIG_RAW_DRIVER is not set 523# CONFIG_RAW_DRIVER is not set
518# CONFIG_TCG_TPM is not set 524# CONFIG_TCG_TPM is not set
519# CONFIG_I2C is not set 525# CONFIG_I2C is not set
520
521#
522# SPI support
523#
524# CONFIG_SPI is not set 526# CONFIG_SPI is not set
525# CONFIG_SPI_MASTER is not set
526# CONFIG_W1 is not set 527# CONFIG_W1 is not set
527# CONFIG_POWER_SUPPLY is not set 528# CONFIG_POWER_SUPPLY is not set
528CONFIG_HWMON=y 529CONFIG_HWMON=y
@@ -551,12 +552,22 @@ CONFIG_SSB_POSSIBLE=y
551# Multifunction device drivers 552# Multifunction device drivers
552# 553#
553# CONFIG_MFD_SM501 is not set 554# CONFIG_MFD_SM501 is not set
555# CONFIG_HTC_PASIC3 is not set
554 556
555# 557#
556# Multimedia devices 558# Multimedia devices
557# 559#
560
561#
562# Multimedia core support
563#
558# CONFIG_VIDEO_DEV is not set 564# CONFIG_VIDEO_DEV is not set
559# CONFIG_DVB_CORE is not set 565# CONFIG_DVB_CORE is not set
566# CONFIG_VIDEO_MEDIA is not set
567
568#
569# Multimedia drivers
570#
560CONFIG_DAB=y 571CONFIG_DAB=y
561 572
562# 573#
@@ -584,6 +595,8 @@ CONFIG_USB_SUPPORT=y
584# CONFIG_USB_ARCH_HAS_HCD is not set 595# CONFIG_USB_ARCH_HAS_HCD is not set
585# CONFIG_USB_ARCH_HAS_OHCI is not set 596# CONFIG_USB_ARCH_HAS_OHCI is not set
586# CONFIG_USB_ARCH_HAS_EHCI is not set 597# CONFIG_USB_ARCH_HAS_EHCI is not set
598# CONFIG_USB_OTG_WHITELIST is not set
599# CONFIG_USB_OTG_BLACKLIST_HUB is not set
587 600
588# 601#
589# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 602# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -592,13 +605,10 @@ CONFIG_USB_SUPPORT=y
592# CONFIG_MMC is not set 605# CONFIG_MMC is not set
593# CONFIG_MEMSTICK is not set 606# CONFIG_MEMSTICK is not set
594# CONFIG_NEW_LEDS is not set 607# CONFIG_NEW_LEDS is not set
608# CONFIG_ACCESSIBILITY is not set
595# CONFIG_EDAC is not set 609# CONFIG_EDAC is not set
596# CONFIG_RTC_CLASS is not set 610# CONFIG_RTC_CLASS is not set
597# CONFIG_DMADEVICES is not set 611# CONFIG_DMADEVICES is not set
598
599#
600# Userspace I/O
601#
602# CONFIG_UIO is not set 612# CONFIG_UIO is not set
603 613
604# 614#
@@ -620,7 +630,6 @@ CONFIG_FS_MBCACHE=y
620# CONFIG_JFS_FS is not set 630# CONFIG_JFS_FS is not set
621# CONFIG_FS_POSIX_ACL is not set 631# CONFIG_FS_POSIX_ACL is not set
622# CONFIG_XFS_FS is not set 632# CONFIG_XFS_FS is not set
623# CONFIG_GFS2_FS is not set
624# CONFIG_OCFS2_FS is not set 633# CONFIG_OCFS2_FS is not set
625CONFIG_DNOTIFY=y 634CONFIG_DNOTIFY=y
626CONFIG_INOTIFY=y 635CONFIG_INOTIFY=y
@@ -678,7 +687,6 @@ CONFIG_NFS_FS=y
678CONFIG_NFS_V3=y 687CONFIG_NFS_V3=y
679# CONFIG_NFS_V3_ACL is not set 688# CONFIG_NFS_V3_ACL is not set
680# CONFIG_NFS_V4 is not set 689# CONFIG_NFS_V4 is not set
681# CONFIG_NFS_DIRECTIO is not set
682# CONFIG_NFSD is not set 690# CONFIG_NFSD is not set
683CONFIG_ROOT_NFS=y 691CONFIG_ROOT_NFS=y
684CONFIG_LOCKD=y 692CONFIG_LOCKD=y
@@ -722,6 +730,7 @@ CONFIG_MSDOS_PARTITION=y
722# Library routines 730# Library routines
723# 731#
724CONFIG_BITREVERSE=y 732CONFIG_BITREVERSE=y
733# CONFIG_GENERIC_FIND_FIRST_BIT is not set
725CONFIG_CRC_CCITT=y 734CONFIG_CRC_CCITT=y
726# CONFIG_CRC16 is not set 735# CONFIG_CRC16 is not set
727# CONFIG_CRC_ITU_T is not set 736# CONFIG_CRC_ITU_T is not set
@@ -733,6 +742,7 @@ CONFIG_PLIST=y
733CONFIG_HAS_IOMEM=y 742CONFIG_HAS_IOMEM=y
734CONFIG_HAS_IOPORT=y 743CONFIG_HAS_IOPORT=y
735CONFIG_HAS_DMA=y 744CONFIG_HAS_DMA=y
745CONFIG_HAVE_LMB=y
736 746
737# 747#
738# Kernel hacking 748# Kernel hacking
@@ -740,6 +750,7 @@ CONFIG_HAS_DMA=y
740# CONFIG_PRINTK_TIME is not set 750# CONFIG_PRINTK_TIME is not set
741CONFIG_ENABLE_WARN_DEPRECATED=y 751CONFIG_ENABLE_WARN_DEPRECATED=y
742CONFIG_ENABLE_MUST_CHECK=y 752CONFIG_ENABLE_MUST_CHECK=y
753CONFIG_FRAME_WARN=1024
743# CONFIG_MAGIC_SYSRQ is not set 754# CONFIG_MAGIC_SYSRQ is not set
744# CONFIG_UNUSED_SYMBOLS is not set 755# CONFIG_UNUSED_SYMBOLS is not set
745# CONFIG_DEBUG_FS is not set 756# CONFIG_DEBUG_FS is not set
@@ -748,6 +759,7 @@ CONFIG_ENABLE_MUST_CHECK=y
748# CONFIG_SLUB_DEBUG_ON is not set 759# CONFIG_SLUB_DEBUG_ON is not set
749# CONFIG_SLUB_STATS is not set 760# CONFIG_SLUB_STATS is not set
750# CONFIG_SAMPLES is not set 761# CONFIG_SAMPLES is not set
762# CONFIG_IRQSTACKS is not set
751# CONFIG_PPC_EARLY_DEBUG is not set 763# CONFIG_PPC_EARLY_DEBUG is not set
752 764
753# 765#
@@ -757,48 +769,78 @@ CONFIG_ENABLE_MUST_CHECK=y
757# CONFIG_SECURITY is not set 769# CONFIG_SECURITY is not set
758# CONFIG_SECURITY_FILE_CAPABILITIES is not set 770# CONFIG_SECURITY_FILE_CAPABILITIES is not set
759CONFIG_CRYPTO=y 771CONFIG_CRYPTO=y
760# CONFIG_CRYPTO_SEQIV is not set 772
773#
774# Crypto core or helper
775#
761# CONFIG_CRYPTO_MANAGER is not set 776# CONFIG_CRYPTO_MANAGER is not set
777# CONFIG_CRYPTO_GF128MUL is not set
778# CONFIG_CRYPTO_NULL is not set
779# CONFIG_CRYPTO_CRYPTD is not set
780# CONFIG_CRYPTO_AUTHENC is not set
781
782#
783# Authenticated Encryption with Associated Data
784#
785# CONFIG_CRYPTO_CCM is not set
786# CONFIG_CRYPTO_GCM is not set
787# CONFIG_CRYPTO_SEQIV is not set
788
789#
790# Block modes
791#
792# CONFIG_CRYPTO_CBC is not set
793# CONFIG_CRYPTO_CTR is not set
794# CONFIG_CRYPTO_CTS is not set
795# CONFIG_CRYPTO_ECB is not set
796# CONFIG_CRYPTO_LRW is not set
797# CONFIG_CRYPTO_PCBC is not set
798# CONFIG_CRYPTO_XTS is not set
799
800#
801# Hash modes
802#
762# CONFIG_CRYPTO_HMAC is not set 803# CONFIG_CRYPTO_HMAC is not set
763# CONFIG_CRYPTO_XCBC is not set 804# CONFIG_CRYPTO_XCBC is not set
764# CONFIG_CRYPTO_NULL is not set 805
806#
807# Digest
808#
809# CONFIG_CRYPTO_CRC32C is not set
765# CONFIG_CRYPTO_MD4 is not set 810# CONFIG_CRYPTO_MD4 is not set
766# CONFIG_CRYPTO_MD5 is not set 811# CONFIG_CRYPTO_MD5 is not set
812# CONFIG_CRYPTO_MICHAEL_MIC is not set
767# CONFIG_CRYPTO_SHA1 is not set 813# CONFIG_CRYPTO_SHA1 is not set
768# CONFIG_CRYPTO_SHA256 is not set 814# CONFIG_CRYPTO_SHA256 is not set
769# CONFIG_CRYPTO_SHA512 is not set 815# CONFIG_CRYPTO_SHA512 is not set
770# CONFIG_CRYPTO_WP512 is not set
771# CONFIG_CRYPTO_TGR192 is not set 816# CONFIG_CRYPTO_TGR192 is not set
772# CONFIG_CRYPTO_GF128MUL is not set 817# CONFIG_CRYPTO_WP512 is not set
773# CONFIG_CRYPTO_ECB is not set 818
774# CONFIG_CRYPTO_CBC is not set 819#
775# CONFIG_CRYPTO_PCBC is not set 820# Ciphers
776# CONFIG_CRYPTO_LRW is not set 821#
777# CONFIG_CRYPTO_XTS is not set
778# CONFIG_CRYPTO_CTR is not set
779# CONFIG_CRYPTO_GCM is not set
780# CONFIG_CRYPTO_CCM is not set
781# CONFIG_CRYPTO_CRYPTD is not set
782# CONFIG_CRYPTO_DES is not set
783# CONFIG_CRYPTO_FCRYPT is not set
784# CONFIG_CRYPTO_BLOWFISH is not set
785# CONFIG_CRYPTO_TWOFISH is not set
786# CONFIG_CRYPTO_SERPENT is not set
787# CONFIG_CRYPTO_AES is not set 822# CONFIG_CRYPTO_AES is not set
823# CONFIG_CRYPTO_ANUBIS is not set
824# CONFIG_CRYPTO_ARC4 is not set
825# CONFIG_CRYPTO_BLOWFISH is not set
826# CONFIG_CRYPTO_CAMELLIA is not set
788# CONFIG_CRYPTO_CAST5 is not set 827# CONFIG_CRYPTO_CAST5 is not set
789# CONFIG_CRYPTO_CAST6 is not set 828# CONFIG_CRYPTO_CAST6 is not set
790# CONFIG_CRYPTO_TEA is not set 829# CONFIG_CRYPTO_DES is not set
791# CONFIG_CRYPTO_ARC4 is not set 830# CONFIG_CRYPTO_FCRYPT is not set
792# CONFIG_CRYPTO_KHAZAD is not set 831# CONFIG_CRYPTO_KHAZAD is not set
793# CONFIG_CRYPTO_ANUBIS is not set
794# CONFIG_CRYPTO_SEED is not set
795# CONFIG_CRYPTO_SALSA20 is not set 832# CONFIG_CRYPTO_SALSA20 is not set
833# CONFIG_CRYPTO_SEED is not set
834# CONFIG_CRYPTO_SERPENT is not set
835# CONFIG_CRYPTO_TEA is not set
836# CONFIG_CRYPTO_TWOFISH is not set
837
838#
839# Compression
840#
796# CONFIG_CRYPTO_DEFLATE is not set 841# CONFIG_CRYPTO_DEFLATE is not set
797# CONFIG_CRYPTO_MICHAEL_MIC is not set
798# CONFIG_CRYPTO_CRC32C is not set
799# CONFIG_CRYPTO_CAMELLIA is not set
800# CONFIG_CRYPTO_AUTHENC is not set
801# CONFIG_CRYPTO_LZO is not set 842# CONFIG_CRYPTO_LZO is not set
802CONFIG_CRYPTO_HW=y 843CONFIG_CRYPTO_HW=y
803# CONFIG_PPC_CLOCK is not set 844# CONFIG_PPC_CLOCK is not set
804CONFIG_PPC_LIB_RHEAP=y 845CONFIG_PPC_LIB_RHEAP=y
846# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/mpc885_ads_defconfig b/arch/powerpc/configs/mpc885_ads_defconfig
index 82151b9bba26..9df78973005e 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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 24 08:48:35 2008 4# Mon Jun 9 08:52:17 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -28,6 +28,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
28CONFIG_GENERIC_HARDIRQS=y 28CONFIG_GENERIC_HARDIRQS=y
29# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 29# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
30CONFIG_IRQ_PER_CPU=y 30CONFIG_IRQ_PER_CPU=y
31CONFIG_STACKTRACE_SUPPORT=y
32CONFIG_LOCKDEP_SUPPORT=y
31CONFIG_RWSEM_XCHGADD_ALGORITHM=y 33CONFIG_RWSEM_XCHGADD_ALGORITHM=y
32CONFIG_ARCH_HAS_ILOG2_U32=y 34CONFIG_ARCH_HAS_ILOG2_U32=y
33CONFIG_GENERIC_HWEIGHT=y 35CONFIG_GENERIC_HWEIGHT=y
@@ -108,6 +110,7 @@ CONFIG_SLUB=y
108CONFIG_HAVE_OPROFILE=y 110CONFIG_HAVE_OPROFILE=y
109CONFIG_HAVE_KPROBES=y 111CONFIG_HAVE_KPROBES=y
110CONFIG_HAVE_KRETPROBES=y 112CONFIG_HAVE_KRETPROBES=y
113# CONFIG_HAVE_DMA_ATTRS is not set
111CONFIG_PROC_PAGE_MONITOR=y 114CONFIG_PROC_PAGE_MONITOR=y
112CONFIG_SLABINFO=y 115CONFIG_SLABINFO=y
113# CONFIG_TINY_SHMEM is not set 116# CONFIG_TINY_SHMEM is not set
@@ -219,11 +222,13 @@ CONFIG_FLATMEM=y
219CONFIG_FLAT_NODE_MEM_MAP=y 222CONFIG_FLAT_NODE_MEM_MAP=y
220# CONFIG_SPARSEMEM_STATIC is not set 223# CONFIG_SPARSEMEM_STATIC is not set
221# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 224# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
225CONFIG_PAGEFLAGS_EXTENDED=y
222CONFIG_SPLIT_PTLOCK_CPUS=4 226CONFIG_SPLIT_PTLOCK_CPUS=4
223# CONFIG_RESOURCES_64BIT is not set 227# CONFIG_RESOURCES_64BIT is not set
224CONFIG_ZONE_DMA_FLAG=1 228CONFIG_ZONE_DMA_FLAG=1
225CONFIG_BOUNCE=y 229CONFIG_BOUNCE=y
226CONFIG_VIRT_TO_BUS=y 230CONFIG_VIRT_TO_BUS=y
231CONFIG_FORCE_MAX_ZONEORDER=11
227CONFIG_PROC_DEVICETREE=y 232CONFIG_PROC_DEVICETREE=y
228# CONFIG_CMDLINE_BOOL is not set 233# CONFIG_CMDLINE_BOOL is not set
229# CONFIG_PM is not set 234# CONFIG_PM is not set
@@ -241,6 +246,7 @@ CONFIG_FSL_SOC=y
241# CONFIG_PCI_QSPAN is not set 246# CONFIG_PCI_QSPAN is not set
242# CONFIG_ARCH_SUPPORTS_MSI is not set 247# CONFIG_ARCH_SUPPORTS_MSI is not set
243# CONFIG_PCCARD is not set 248# CONFIG_PCCARD is not set
249# CONFIG_HAS_RAPIDIO is not set
244 250
245# 251#
246# Advanced setup 252# Advanced setup
@@ -250,13 +256,13 @@ CONFIG_FSL_SOC=y
250# 256#
251# Default settings for advanced configuration options are used 257# Default settings for advanced configuration options are used
252# 258#
253CONFIG_HIGHMEM_START=0xfe000000
254CONFIG_LOWMEM_SIZE=0x30000000 259CONFIG_LOWMEM_SIZE=0x30000000
260CONFIG_PAGE_OFFSET=0xc0000000
255CONFIG_KERNEL_START=0xc0000000 261CONFIG_KERNEL_START=0xc0000000
262CONFIG_PHYSICAL_START=0x00000000
256CONFIG_TASK_SIZE=0x80000000 263CONFIG_TASK_SIZE=0x80000000
257CONFIG_CONSISTENT_START=0xfd000000 264CONFIG_CONSISTENT_START=0xfd000000
258CONFIG_CONSISTENT_SIZE=0x00200000 265CONFIG_CONSISTENT_SIZE=0x00200000
259CONFIG_BOOT_LOAD=0x00400000
260 266
261# 267#
262# Networking 268# Networking
@@ -299,8 +305,6 @@ CONFIG_TCP_CONG_CUBIC=y
299CONFIG_DEFAULT_TCP_CONG="cubic" 305CONFIG_DEFAULT_TCP_CONG="cubic"
300# CONFIG_TCP_MD5SIG is not set 306# CONFIG_TCP_MD5SIG is not set
301# CONFIG_IPV6 is not set 307# CONFIG_IPV6 is not set
302# CONFIG_INET6_XFRM_TUNNEL is not set
303# CONFIG_INET6_TUNNEL is not set
304# CONFIG_NETWORK_SECMARK is not set 308# CONFIG_NETWORK_SECMARK is not set
305# CONFIG_NETFILTER is not set 309# CONFIG_NETFILTER is not set
306# CONFIG_IP_DCCP is not set 310# CONFIG_IP_DCCP is not set
@@ -492,6 +496,7 @@ CONFIG_FS_ENET_MDIO_FEC=y
492# 496#
493# CONFIG_WLAN_PRE80211 is not set 497# CONFIG_WLAN_PRE80211 is not set
494# CONFIG_WLAN_80211 is not set 498# CONFIG_WLAN_80211 is not set
499# CONFIG_IWLWIFI_LEDS is not set
495# CONFIG_WAN is not set 500# CONFIG_WAN is not set
496# CONFIG_PPP is not set 501# CONFIG_PPP is not set
497# CONFIG_SLIP is not set 502# CONFIG_SLIP is not set
@@ -516,6 +521,7 @@ CONFIG_FS_ENET_MDIO_FEC=y
516# Character devices 521# Character devices
517# 522#
518# CONFIG_VT is not set 523# CONFIG_VT is not set
524CONFIG_DEVKMEM=y
519# CONFIG_SERIAL_NONSTANDARD is not set 525# CONFIG_SERIAL_NONSTANDARD is not set
520 526
521# 527#
@@ -548,12 +554,7 @@ CONFIG_GEN_RTC=y
548# CONFIG_RAW_DRIVER is not set 554# CONFIG_RAW_DRIVER is not set
549# CONFIG_TCG_TPM is not set 555# CONFIG_TCG_TPM is not set
550# CONFIG_I2C is not set 556# CONFIG_I2C is not set
551
552#
553# SPI support
554#
555# CONFIG_SPI is not set 557# CONFIG_SPI is not set
556# CONFIG_SPI_MASTER is not set
557# CONFIG_W1 is not set 558# CONFIG_W1 is not set
558# CONFIG_POWER_SUPPLY is not set 559# CONFIG_POWER_SUPPLY is not set
559# CONFIG_HWMON is not set 560# CONFIG_HWMON is not set
@@ -570,12 +571,22 @@ CONFIG_SSB_POSSIBLE=y
570# Multifunction device drivers 571# Multifunction device drivers
571# 572#
572# CONFIG_MFD_SM501 is not set 573# CONFIG_MFD_SM501 is not set
574# CONFIG_HTC_PASIC3 is not set
573 575
574# 576#
575# Multimedia devices 577# Multimedia devices
576# 578#
579
580#
581# Multimedia core support
582#
577# CONFIG_VIDEO_DEV is not set 583# CONFIG_VIDEO_DEV is not set
578# CONFIG_DVB_CORE is not set 584# CONFIG_DVB_CORE is not set
585# CONFIG_VIDEO_MEDIA is not set
586
587#
588# Multimedia drivers
589#
579CONFIG_DAB=y 590CONFIG_DAB=y
580 591
581# 592#
@@ -599,13 +610,10 @@ CONFIG_DAB=y
599# CONFIG_MMC is not set 610# CONFIG_MMC is not set
600# CONFIG_MEMSTICK is not set 611# CONFIG_MEMSTICK is not set
601# CONFIG_NEW_LEDS is not set 612# CONFIG_NEW_LEDS is not set
613# CONFIG_ACCESSIBILITY is not set
602# CONFIG_EDAC is not set 614# CONFIG_EDAC is not set
603# CONFIG_RTC_CLASS is not set 615# CONFIG_RTC_CLASS is not set
604# CONFIG_DMADEVICES is not set 616# CONFIG_DMADEVICES is not set
605
606#
607# Userspace I/O
608#
609# CONFIG_UIO is not set 617# CONFIG_UIO is not set
610 618
611# 619#
@@ -618,7 +626,6 @@ CONFIG_DAB=y
618# CONFIG_JFS_FS is not set 626# CONFIG_JFS_FS is not set
619# CONFIG_FS_POSIX_ACL is not set 627# CONFIG_FS_POSIX_ACL is not set
620# CONFIG_XFS_FS is not set 628# CONFIG_XFS_FS is not set
621# CONFIG_GFS2_FS is not set
622# CONFIG_OCFS2_FS is not set 629# CONFIG_OCFS2_FS is not set
623# CONFIG_DNOTIFY is not set 630# CONFIG_DNOTIFY is not set
624# CONFIG_INOTIFY is not set 631# CONFIG_INOTIFY is not set
@@ -676,7 +683,6 @@ CONFIG_NFS_FS=y
676CONFIG_NFS_V3=y 683CONFIG_NFS_V3=y
677# CONFIG_NFS_V3_ACL is not set 684# CONFIG_NFS_V3_ACL is not set
678# CONFIG_NFS_V4 is not set 685# CONFIG_NFS_V4 is not set
679# CONFIG_NFS_DIRECTIO is not set
680# CONFIG_NFSD is not set 686# CONFIG_NFSD is not set
681CONFIG_ROOT_NFS=y 687CONFIG_ROOT_NFS=y
682CONFIG_LOCKD=y 688CONFIG_LOCKD=y
@@ -719,6 +725,7 @@ CONFIG_MSDOS_PARTITION=y
719# 725#
720# Library routines 726# Library routines
721# 727#
728# CONFIG_GENERIC_FIND_FIRST_BIT is not set
722# CONFIG_CRC_CCITT is not set 729# CONFIG_CRC_CCITT is not set
723# CONFIG_CRC16 is not set 730# CONFIG_CRC16 is not set
724# CONFIG_CRC_ITU_T is not set 731# CONFIG_CRC_ITU_T is not set
@@ -729,6 +736,7 @@ CONFIG_ZLIB_INFLATE=y
729CONFIG_HAS_IOMEM=y 736CONFIG_HAS_IOMEM=y
730CONFIG_HAS_IOPORT=y 737CONFIG_HAS_IOPORT=y
731CONFIG_HAS_DMA=y 738CONFIG_HAS_DMA=y
739CONFIG_HAVE_LMB=y
732 740
733# 741#
734# Kernel hacking 742# Kernel hacking
@@ -736,6 +744,7 @@ CONFIG_HAS_DMA=y
736# CONFIG_PRINTK_TIME is not set 744# CONFIG_PRINTK_TIME is not set
737CONFIG_ENABLE_WARN_DEPRECATED=y 745CONFIG_ENABLE_WARN_DEPRECATED=y
738CONFIG_ENABLE_MUST_CHECK=y 746CONFIG_ENABLE_MUST_CHECK=y
747CONFIG_FRAME_WARN=1024
739CONFIG_MAGIC_SYSRQ=y 748CONFIG_MAGIC_SYSRQ=y
740# CONFIG_UNUSED_SYMBOLS is not set 749# CONFIG_UNUSED_SYMBOLS is not set
741# CONFIG_DEBUG_FS is not set 750# CONFIG_DEBUG_FS is not set
@@ -746,6 +755,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
746CONFIG_SCHED_DEBUG=y 755CONFIG_SCHED_DEBUG=y
747# CONFIG_SCHEDSTATS is not set 756# CONFIG_SCHEDSTATS is not set
748# CONFIG_TIMER_STATS is not set 757# CONFIG_TIMER_STATS is not set
758# CONFIG_DEBUG_OBJECTS is not set
749# CONFIG_SLUB_DEBUG_ON is not set 759# CONFIG_SLUB_DEBUG_ON is not set
750# CONFIG_SLUB_STATS is not set 760# CONFIG_SLUB_STATS is not set
751# CONFIG_DEBUG_SPINLOCK is not set 761# CONFIG_DEBUG_SPINLOCK is not set
@@ -756,6 +766,7 @@ CONFIG_SCHED_DEBUG=y
756CONFIG_DEBUG_BUGVERBOSE=y 766CONFIG_DEBUG_BUGVERBOSE=y
757CONFIG_DEBUG_INFO=y 767CONFIG_DEBUG_INFO=y
758# CONFIG_DEBUG_VM is not set 768# CONFIG_DEBUG_VM is not set
769# CONFIG_DEBUG_WRITECOUNT is not set
759# CONFIG_DEBUG_LIST is not set 770# CONFIG_DEBUG_LIST is not set
760# CONFIG_DEBUG_SG is not set 771# CONFIG_DEBUG_SG is not set
761# CONFIG_BOOT_PRINTK_DELAY is not set 772# CONFIG_BOOT_PRINTK_DELAY is not set
@@ -766,6 +777,7 @@ CONFIG_DEBUG_INFO=y
766# CONFIG_DEBUG_STACK_USAGE is not set 777# CONFIG_DEBUG_STACK_USAGE is not set
767# CONFIG_DEBUG_PAGEALLOC is not set 778# CONFIG_DEBUG_PAGEALLOC is not set
768# CONFIG_DEBUGGER is not set 779# CONFIG_DEBUGGER is not set
780# CONFIG_IRQSTACKS is not set
769# CONFIG_BDI_SWITCH is not set 781# CONFIG_BDI_SWITCH is not set
770# CONFIG_PPC_EARLY_DEBUG is not set 782# CONFIG_PPC_EARLY_DEBUG is not set
771 783
@@ -778,3 +790,4 @@ CONFIG_DEBUG_INFO=y
778# CONFIG_CRYPTO is not set 790# CONFIG_CRYPTO is not set
779# CONFIG_PPC_CLOCK is not set 791# CONFIG_PPC_CLOCK is not set
780CONFIG_PPC_LIB_RHEAP=y 792CONFIG_PPC_LIB_RHEAP=y
793# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/pasemi_defconfig b/arch/powerpc/configs/pasemi_defconfig
index 09f306248f2e..199e5f59d7a6 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.25-rc6 3# Linux kernel version: 2.6.26-rc3
4# Tue Mar 25 10:25:48 2008 4# Tue May 27 16:08:06 2008
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7 7
@@ -29,6 +29,9 @@ CONFIG_GENERIC_CLOCKEVENTS=y
29CONFIG_GENERIC_HARDIRQS=y 29CONFIG_GENERIC_HARDIRQS=y
30CONFIG_HAVE_SETUP_PER_CPU_AREA=y 30CONFIG_HAVE_SETUP_PER_CPU_AREA=y
31CONFIG_IRQ_PER_CPU=y 31CONFIG_IRQ_PER_CPU=y
32CONFIG_STACKTRACE_SUPPORT=y
33CONFIG_TRACE_IRQFLAGS_SUPPORT=y
34CONFIG_LOCKDEP_SUPPORT=y
32CONFIG_RWSEM_XCHGADD_ALGORITHM=y 35CONFIG_RWSEM_XCHGADD_ALGORITHM=y
33CONFIG_ARCH_HAS_ILOG2_U32=y 36CONFIG_ARCH_HAS_ILOG2_U32=y
34CONFIG_ARCH_HAS_ILOG2_U64=y 37CONFIG_ARCH_HAS_ILOG2_U64=y
@@ -87,6 +90,7 @@ CONFIG_INITRAMFS_SOURCE=""
87CONFIG_SYSCTL=y 90CONFIG_SYSCTL=y
88# CONFIG_EMBEDDED is not set 91# CONFIG_EMBEDDED is not set
89CONFIG_SYSCTL_SYSCALL=y 92CONFIG_SYSCTL_SYSCALL=y
93CONFIG_SYSCTL_SYSCALL_CHECK=y
90CONFIG_KALLSYMS=y 94CONFIG_KALLSYMS=y
91# CONFIG_KALLSYMS_ALL is not set 95# CONFIG_KALLSYMS_ALL is not set
92# CONFIG_KALLSYMS_EXTRA_PASS is not set 96# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -115,12 +119,14 @@ CONFIG_HAVE_OPROFILE=y
115# CONFIG_KPROBES is not set 119# CONFIG_KPROBES is not set
116CONFIG_HAVE_KPROBES=y 120CONFIG_HAVE_KPROBES=y
117CONFIG_HAVE_KRETPROBES=y 121CONFIG_HAVE_KRETPROBES=y
122# CONFIG_HAVE_DMA_ATTRS is not set
118CONFIG_PROC_PAGE_MONITOR=y 123CONFIG_PROC_PAGE_MONITOR=y
119CONFIG_SLABINFO=y 124CONFIG_SLABINFO=y
120CONFIG_RT_MUTEXES=y 125CONFIG_RT_MUTEXES=y
121# CONFIG_TINY_SHMEM is not set 126# CONFIG_TINY_SHMEM is not set
122CONFIG_BASE_SMALL=0 127CONFIG_BASE_SMALL=0
123CONFIG_MODULES=y 128CONFIG_MODULES=y
129# CONFIG_MODULE_FORCE_LOAD is not set
124CONFIG_MODULE_UNLOAD=y 130CONFIG_MODULE_UNLOAD=y
125# CONFIG_MODULE_FORCE_UNLOAD is not set 131# CONFIG_MODULE_FORCE_UNLOAD is not set
126# CONFIG_MODVERSIONS is not set 132# CONFIG_MODVERSIONS is not set
@@ -167,11 +173,11 @@ CONFIG_PPC_PASEMI=y
167CONFIG_PPC_PASEMI_IOMMU=y 173CONFIG_PPC_PASEMI_IOMMU=y
168# CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE is not set 174# CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE is not set
169CONFIG_PPC_PASEMI_MDIO=y 175CONFIG_PPC_PASEMI_MDIO=y
170# CONFIG_PPC_CELLEB is not set
171# CONFIG_PPC_PS3 is not set 176# CONFIG_PPC_PS3 is not set
172# CONFIG_PPC_CELL is not set 177# CONFIG_PPC_CELL is not set
173# CONFIG_PPC_CELL_NATIVE is not set 178# CONFIG_PPC_CELL_NATIVE is not set
174# CONFIG_PPC_IBM_CELL_BLADE is not set 179# CONFIG_PPC_IBM_CELL_BLADE is not set
180# CONFIG_PPC_CELLEB is not set
175# CONFIG_PQ2ADS is not set 181# CONFIG_PQ2ADS is not set
176CONFIG_PPC_NATIVE=y 182CONFIG_PPC_NATIVE=y
177# CONFIG_IPIC is not set 183# CONFIG_IPIC is not set
@@ -192,6 +198,7 @@ CONFIG_CPU_FREQ_DEBUG=y
192CONFIG_CPU_FREQ_STAT=y 198CONFIG_CPU_FREQ_STAT=y
193# CONFIG_CPU_FREQ_STAT_DETAILS is not set 199# CONFIG_CPU_FREQ_STAT_DETAILS is not set
194CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y 200CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
201# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
195# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set 202# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
196# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set 203# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
197# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set 204# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
@@ -226,7 +233,6 @@ CONFIG_PREEMPT_NONE=y
226CONFIG_BINFMT_ELF=y 233CONFIG_BINFMT_ELF=y
227CONFIG_COMPAT_BINFMT_ELF=y 234CONFIG_COMPAT_BINFMT_ELF=y
228# CONFIG_BINFMT_MISC is not set 235# CONFIG_BINFMT_MISC is not set
229CONFIG_FORCE_MAX_ZONEORDER=9
230CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y 236CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y
231CONFIG_IOMMU_VMERGE=y 237CONFIG_IOMMU_VMERGE=y
232CONFIG_IOMMU_HELPER=y 238CONFIG_IOMMU_HELPER=y
@@ -249,12 +255,14 @@ CONFIG_FLATMEM=y
249CONFIG_FLAT_NODE_MEM_MAP=y 255CONFIG_FLAT_NODE_MEM_MAP=y
250# CONFIG_SPARSEMEM_STATIC is not set 256# CONFIG_SPARSEMEM_STATIC is not set
251CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y 257CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
258CONFIG_PAGEFLAGS_EXTENDED=y
252CONFIG_SPLIT_PTLOCK_CPUS=4 259CONFIG_SPLIT_PTLOCK_CPUS=4
253CONFIG_RESOURCES_64BIT=y 260CONFIG_RESOURCES_64BIT=y
254CONFIG_ZONE_DMA_FLAG=1 261CONFIG_ZONE_DMA_FLAG=1
255CONFIG_BOUNCE=y 262CONFIG_BOUNCE=y
256CONFIG_PPC_HAS_HASH_64K=y 263CONFIG_PPC_HAS_HASH_64K=y
257CONFIG_PPC_64K_PAGES=y 264CONFIG_PPC_64K_PAGES=y
265CONFIG_FORCE_MAX_ZONEORDER=9
258# CONFIG_PPC_SUBPAGE_PROT is not set 266# CONFIG_PPC_SUBPAGE_PROT is not set
259# CONFIG_SCHED_SMT is not set 267# CONFIG_SCHED_SMT is not set
260CONFIG_PROC_DEVICETREE=y 268CONFIG_PROC_DEVICETREE=y
@@ -290,9 +298,12 @@ CONFIG_CARDBUS=y
290# CONFIG_YENTA is not set 298# CONFIG_YENTA is not set
291# CONFIG_PD6729 is not set 299# CONFIG_PD6729 is not set
292# CONFIG_I82092 is not set 300# CONFIG_I82092 is not set
293# CONFIG_ELECTRA_CF is not set 301CONFIG_ELECTRA_CF=y
294# CONFIG_HOTPLUG_PCI is not set 302# CONFIG_HOTPLUG_PCI is not set
303# CONFIG_HAS_RAPIDIO is not set
304CONFIG_PAGE_OFFSET=0xc000000000000000
295CONFIG_KERNEL_START=0xc000000000000000 305CONFIG_KERNEL_START=0xc000000000000000
306CONFIG_PHYSICAL_START=0x00000000
296 307
297# 308#
298# Networking 309# Networking
@@ -341,8 +352,6 @@ CONFIG_TCP_CONG_CUBIC=y
341CONFIG_DEFAULT_TCP_CONG="cubic" 352CONFIG_DEFAULT_TCP_CONG="cubic"
342# CONFIG_TCP_MD5SIG is not set 353# CONFIG_TCP_MD5SIG is not set
343# CONFIG_IPV6 is not set 354# CONFIG_IPV6 is not set
344# CONFIG_INET6_XFRM_TUNNEL is not set
345# CONFIG_INET6_TUNNEL is not set
346# CONFIG_NETWORK_SECMARK is not set 355# CONFIG_NETWORK_SECMARK is not set
347# CONFIG_NETFILTER is not set 356# CONFIG_NETFILTER is not set
348# CONFIG_IP_DCCP is not set 357# CONFIG_IP_DCCP is not set
@@ -473,6 +482,7 @@ CONFIG_MTD_NAND_PASEMI=y
473# 482#
474# CONFIG_MTD_UBI is not set 483# CONFIG_MTD_UBI is not set
475CONFIG_OF_DEVICE=y 484CONFIG_OF_DEVICE=y
485CONFIG_OF_I2C=y
476# CONFIG_PARPORT is not set 486# CONFIG_PARPORT is not set
477CONFIG_BLK_DEV=y 487CONFIG_BLK_DEV=y
478# CONFIG_BLK_DEV_FD is not set 488# CONFIG_BLK_DEV_FD is not set
@@ -520,7 +530,6 @@ CONFIG_IDE_PROC_FS=y
520# 530#
521# IDE chipset support/bugfixes 531# IDE chipset support/bugfixes
522# 532#
523# CONFIG_IDE_GENERIC is not set
524# CONFIG_BLK_DEV_PLATFORM is not set 533# CONFIG_BLK_DEV_PLATFORM is not set
525 534
526# 535#
@@ -554,7 +563,7 @@ CONFIG_IDE_PROC_FS=y
554# CONFIG_BLK_DEV_VIA82CXXX is not set 563# CONFIG_BLK_DEV_VIA82CXXX is not set
555# CONFIG_BLK_DEV_TC86C001 is not set 564# CONFIG_BLK_DEV_TC86C001 is not set
556# CONFIG_BLK_DEV_IDEDMA is not set 565# CONFIG_BLK_DEV_IDEDMA is not set
557CONFIG_IDE_ARCH_OBSOLETE_INIT=y 566# CONFIG_BLK_DEV_HD_ONLY is not set
558# CONFIG_BLK_DEV_HD is not set 567# CONFIG_BLK_DEV_HD is not set
559 568
560# 569#
@@ -632,7 +641,10 @@ CONFIG_SCSI_LOWLEVEL=y
632# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set 641# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
633CONFIG_ATA=y 642CONFIG_ATA=y
634# CONFIG_ATA_NONSTANDARD is not set 643# CONFIG_ATA_NONSTANDARD is not set
644CONFIG_SATA_PMP=y
635# CONFIG_SATA_AHCI is not set 645# CONFIG_SATA_AHCI is not set
646CONFIG_SATA_SIL24=y
647CONFIG_ATA_SFF=y
636# CONFIG_SATA_SVW is not set 648# CONFIG_SATA_SVW is not set
637# CONFIG_ATA_PIIX is not set 649# CONFIG_ATA_PIIX is not set
638CONFIG_SATA_MV=y 650CONFIG_SATA_MV=y
@@ -642,7 +654,6 @@ CONFIG_SATA_MV=y
642# CONFIG_SATA_PROMISE is not set 654# CONFIG_SATA_PROMISE is not set
643# CONFIG_SATA_SX4 is not set 655# CONFIG_SATA_SX4 is not set
644# CONFIG_SATA_SIL is not set 656# CONFIG_SATA_SIL is not set
645CONFIG_SATA_SIL24=y
646# CONFIG_SATA_SIS is not set 657# CONFIG_SATA_SIS is not set
647# CONFIG_SATA_ULI is not set 658# CONFIG_SATA_ULI is not set
648# CONFIG_SATA_VIA is not set 659# CONFIG_SATA_VIA is not set
@@ -689,6 +700,7 @@ CONFIG_PATA_PCMCIA=y
689# CONFIG_PATA_WINBOND is not set 700# CONFIG_PATA_WINBOND is not set
690CONFIG_PATA_PLATFORM=y 701CONFIG_PATA_PLATFORM=y
691CONFIG_PATA_OF_PLATFORM=y 702CONFIG_PATA_OF_PLATFORM=y
703# CONFIG_PATA_SCH is not set
692CONFIG_MD=y 704CONFIG_MD=y
693CONFIG_BLK_DEV_MD=y 705CONFIG_BLK_DEV_MD=y
694CONFIG_MD_LINEAR=y 706CONFIG_MD_LINEAR=y
@@ -791,7 +803,6 @@ CONFIG_E1000_NAPI=y
791# CONFIG_SIS190 is not set 803# CONFIG_SIS190 is not set
792# CONFIG_SKGE is not set 804# CONFIG_SKGE is not set
793# CONFIG_SKY2 is not set 805# CONFIG_SKY2 is not set
794# CONFIG_SK98LIN is not set
795# CONFIG_VIA_VELOCITY is not set 806# CONFIG_VIA_VELOCITY is not set
796CONFIG_TIGON3=y 807CONFIG_TIGON3=y
797# CONFIG_BNX2 is not set 808# CONFIG_BNX2 is not set
@@ -810,6 +821,7 @@ CONFIG_PASEMI_MAC=y
810# CONFIG_MLX4_CORE is not set 821# CONFIG_MLX4_CORE is not set
811# CONFIG_TEHUTI is not set 822# CONFIG_TEHUTI is not set
812# CONFIG_BNX2X is not set 823# CONFIG_BNX2X is not set
824# CONFIG_SFC is not set
813# CONFIG_TR is not set 825# CONFIG_TR is not set
814 826
815# 827#
@@ -817,6 +829,7 @@ CONFIG_PASEMI_MAC=y
817# 829#
818# CONFIG_WLAN_PRE80211 is not set 830# CONFIG_WLAN_PRE80211 is not set
819# CONFIG_WLAN_80211 is not set 831# CONFIG_WLAN_80211 is not set
832# CONFIG_IWLWIFI_LEDS is not set
820 833
821# 834#
822# USB Network Adapters 835# USB Network Adapters
@@ -890,6 +903,7 @@ CONFIG_VT=y
890CONFIG_VT_CONSOLE=y 903CONFIG_VT_CONSOLE=y
891CONFIG_HW_CONSOLE=y 904CONFIG_HW_CONSOLE=y
892# CONFIG_VT_HW_CONSOLE_BINDING is not set 905# CONFIG_VT_HW_CONSOLE_BINDING is not set
906CONFIG_DEVKMEM=y
893# CONFIG_SERIAL_NONSTANDARD is not set 907# CONFIG_SERIAL_NONSTANDARD is not set
894# CONFIG_NOZOMI is not set 908# CONFIG_NOZOMI is not set
895 909
@@ -917,7 +931,6 @@ CONFIG_LEGACY_PTY_COUNT=4
917# CONFIG_IPMI_HANDLER is not set 931# CONFIG_IPMI_HANDLER is not set
918CONFIG_HW_RANDOM=y 932CONFIG_HW_RANDOM=y
919CONFIG_HW_RANDOM_PASEMI=y 933CONFIG_HW_RANDOM_PASEMI=y
920# CONFIG_GEN_RTC is not set
921# CONFIG_R3964 is not set 934# CONFIG_R3964 is not set
922# CONFIG_APPLICOM is not set 935# CONFIG_APPLICOM is not set
923 936
@@ -936,13 +949,7 @@ CONFIG_DEVPORT=y
936CONFIG_I2C=y 949CONFIG_I2C=y
937CONFIG_I2C_BOARDINFO=y 950CONFIG_I2C_BOARDINFO=y
938CONFIG_I2C_CHARDEV=y 951CONFIG_I2C_CHARDEV=y
939
940#
941# I2C Algorithms
942#
943CONFIG_I2C_ALGOBIT=y 952CONFIG_I2C_ALGOBIT=y
944CONFIG_I2C_ALGOPCF=y
945CONFIG_I2C_ALGOPCA=y
946 953
947# 954#
948# I2C Hardware Bus support 955# I2C Hardware Bus support
@@ -971,6 +978,7 @@ CONFIG_I2C_PASEMI=y
971# CONFIG_I2C_VIA is not set 978# CONFIG_I2C_VIA is not set
972# CONFIG_I2C_VIAPRO is not set 979# CONFIG_I2C_VIAPRO is not set
973# CONFIG_I2C_VOODOO3 is not set 980# CONFIG_I2C_VOODOO3 is not set
981# CONFIG_I2C_PCA_PLATFORM is not set
974 982
975# 983#
976# Miscellaneous I2C Chip support 984# Miscellaneous I2C Chip support
@@ -980,19 +988,13 @@ CONFIG_SENSORS_EEPROM=y
980# CONFIG_SENSORS_PCF8574 is not set 988# CONFIG_SENSORS_PCF8574 is not set
981# CONFIG_PCF8575 is not set 989# CONFIG_PCF8575 is not set
982# CONFIG_SENSORS_PCF8591 is not set 990# CONFIG_SENSORS_PCF8591 is not set
983# CONFIG_TPS65010 is not set
984# CONFIG_SENSORS_MAX6875 is not set 991# CONFIG_SENSORS_MAX6875 is not set
985# CONFIG_SENSORS_TSL2550 is not set 992# CONFIG_SENSORS_TSL2550 is not set
986# CONFIG_I2C_DEBUG_CORE is not set 993# CONFIG_I2C_DEBUG_CORE is not set
987# CONFIG_I2C_DEBUG_ALGO is not set 994# CONFIG_I2C_DEBUG_ALGO is not set
988# CONFIG_I2C_DEBUG_BUS is not set 995# CONFIG_I2C_DEBUG_BUS is not set
989# CONFIG_I2C_DEBUG_CHIP is not set 996# CONFIG_I2C_DEBUG_CHIP is not set
990
991#
992# SPI support
993#
994# CONFIG_SPI is not set 997# CONFIG_SPI is not set
995# CONFIG_SPI_MASTER is not set
996# CONFIG_W1 is not set 998# CONFIG_W1 is not set
997# CONFIG_POWER_SUPPLY is not set 999# CONFIG_POWER_SUPPLY is not set
998CONFIG_HWMON=y 1000CONFIG_HWMON=y
@@ -1062,12 +1064,22 @@ CONFIG_SSB_POSSIBLE=y
1062# Multifunction device drivers 1064# Multifunction device drivers
1063# 1065#
1064# CONFIG_MFD_SM501 is not set 1066# CONFIG_MFD_SM501 is not set
1067# CONFIG_HTC_PASIC3 is not set
1065 1068
1066# 1069#
1067# Multimedia devices 1070# Multimedia devices
1068# 1071#
1072
1073#
1074# Multimedia core support
1075#
1069# CONFIG_VIDEO_DEV is not set 1076# CONFIG_VIDEO_DEV is not set
1070# CONFIG_DVB_CORE is not set 1077# CONFIG_DVB_CORE is not set
1078# CONFIG_VIDEO_MEDIA is not set
1079
1080#
1081# Multimedia drivers
1082#
1071CONFIG_DAB=y 1083CONFIG_DAB=y
1072# CONFIG_USB_DABUSB is not set 1084# CONFIG_USB_DABUSB is not set
1073 1085
@@ -1094,8 +1106,8 @@ CONFIG_FB_CFB_IMAGEBLIT=y
1094# CONFIG_FB_SYS_FILLRECT is not set 1106# CONFIG_FB_SYS_FILLRECT is not set
1095# CONFIG_FB_SYS_COPYAREA is not set 1107# CONFIG_FB_SYS_COPYAREA is not set
1096# CONFIG_FB_SYS_IMAGEBLIT is not set 1108# CONFIG_FB_SYS_IMAGEBLIT is not set
1109# CONFIG_FB_FOREIGN_ENDIAN is not set
1097# CONFIG_FB_SYS_FOPS is not set 1110# CONFIG_FB_SYS_FOPS is not set
1098CONFIG_FB_DEFERRED_IO=y
1099# CONFIG_FB_SVGALIB is not set 1111# CONFIG_FB_SVGALIB is not set
1100CONFIG_FB_MACMODES=y 1112CONFIG_FB_MACMODES=y
1101CONFIG_FB_BACKLIGHT=y 1113CONFIG_FB_BACKLIGHT=y
@@ -1213,6 +1225,7 @@ CONFIG_SND_VERBOSE_PROCFS=y
1213# CONFIG_SND_AU8810 is not set 1225# CONFIG_SND_AU8810 is not set
1214# CONFIG_SND_AU8820 is not set 1226# CONFIG_SND_AU8820 is not set
1215# CONFIG_SND_AU8830 is not set 1227# CONFIG_SND_AU8830 is not set
1228# CONFIG_SND_AW2 is not set
1216# CONFIG_SND_AZT3328 is not set 1229# CONFIG_SND_AZT3328 is not set
1217# CONFIG_SND_BT87X is not set 1230# CONFIG_SND_BT87X is not set
1218# CONFIG_SND_CA0106 is not set 1231# CONFIG_SND_CA0106 is not set
@@ -1292,11 +1305,11 @@ CONFIG_SND_USB_USX2Y=y
1292# CONFIG_SND_SOC is not set 1305# CONFIG_SND_SOC is not set
1293 1306
1294# 1307#
1295# SoC Audio support for SuperH 1308# ALSA SoC audio for Freescale SOCs
1296# 1309#
1297 1310
1298# 1311#
1299# ALSA SoC audio for Freescale SOCs 1312# SoC Audio for the Texas Instruments OMAP
1300# 1313#
1301 1314
1302# 1315#
@@ -1334,11 +1347,13 @@ CONFIG_USB_DEVICEFS=y
1334# 1347#
1335# USB Host Controller Drivers 1348# USB Host Controller Drivers
1336# 1349#
1350# CONFIG_USB_C67X00_HCD is not set
1337CONFIG_USB_EHCI_HCD=y 1351CONFIG_USB_EHCI_HCD=y
1338# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1352# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1339# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1353# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1340CONFIG_USB_EHCI_HCD_PPC_OF=y 1354CONFIG_USB_EHCI_HCD_PPC_OF=y
1341# CONFIG_USB_ISP116X_HCD is not set 1355# CONFIG_USB_ISP116X_HCD is not set
1356# CONFIG_USB_ISP1760_HCD is not set
1342CONFIG_USB_OHCI_HCD=y 1357CONFIG_USB_OHCI_HCD=y
1343# CONFIG_USB_OHCI_HCD_PPC_OF is not set 1358# CONFIG_USB_OHCI_HCD_PPC_OF is not set
1344# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1359# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
@@ -1354,6 +1369,7 @@ CONFIG_USB_SL811_HCD=y
1354# 1369#
1355# CONFIG_USB_ACM is not set 1370# CONFIG_USB_ACM is not set
1356# CONFIG_USB_PRINTER is not set 1371# CONFIG_USB_PRINTER is not set
1372# CONFIG_USB_WDM is not set
1357 1373
1358# 1374#
1359# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 1375# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -1375,6 +1391,7 @@ CONFIG_USB_STORAGE=y
1375# CONFIG_USB_STORAGE_ALAUDA is not set 1391# CONFIG_USB_STORAGE_ALAUDA is not set
1376# CONFIG_USB_STORAGE_ONETOUCH is not set 1392# CONFIG_USB_STORAGE_ONETOUCH is not set
1377# CONFIG_USB_STORAGE_KARMA is not set 1393# CONFIG_USB_STORAGE_KARMA is not set
1394# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1378CONFIG_USB_LIBUSUAL=y 1395CONFIG_USB_LIBUSUAL=y
1379 1396
1380# 1397#
@@ -1416,6 +1433,7 @@ CONFIG_USB_LIBUSUAL=y
1416# CONFIG_MMC is not set 1433# CONFIG_MMC is not set
1417# CONFIG_MEMSTICK is not set 1434# CONFIG_MEMSTICK is not set
1418# CONFIG_NEW_LEDS is not set 1435# CONFIG_NEW_LEDS is not set
1436# CONFIG_ACCESSIBILITY is not set
1419# CONFIG_INFINIBAND is not set 1437# CONFIG_INFINIBAND is not set
1420CONFIG_EDAC=y 1438CONFIG_EDAC=y
1421 1439
@@ -1475,10 +1493,6 @@ CONFIG_RTC_DRV_DS1307=y
1475# on-CPU RTC drivers 1493# on-CPU RTC drivers
1476# 1494#
1477# CONFIG_DMADEVICES is not set 1495# CONFIG_DMADEVICES is not set
1478
1479#
1480# Userspace I/O
1481#
1482# CONFIG_UIO is not set 1496# CONFIG_UIO is not set
1483 1497
1484# 1498#
@@ -1576,12 +1590,10 @@ CONFIG_NFS_FS=y
1576CONFIG_NFS_V3=y 1590CONFIG_NFS_V3=y
1577# CONFIG_NFS_V3_ACL is not set 1591# CONFIG_NFS_V3_ACL is not set
1578# CONFIG_NFS_V4 is not set 1592# CONFIG_NFS_V4 is not set
1579# CONFIG_NFS_DIRECTIO is not set
1580CONFIG_NFSD=y 1593CONFIG_NFSD=y
1581CONFIG_NFSD_V3=y 1594CONFIG_NFSD_V3=y
1582# CONFIG_NFSD_V3_ACL is not set 1595# CONFIG_NFSD_V3_ACL is not set
1583CONFIG_NFSD_V4=y 1596CONFIG_NFSD_V4=y
1584CONFIG_NFSD_TCP=y
1585CONFIG_ROOT_NFS=y 1597CONFIG_ROOT_NFS=y
1586CONFIG_LOCKD=y 1598CONFIG_LOCKD=y
1587CONFIG_LOCKD_V4=y 1599CONFIG_LOCKD_V4=y
@@ -1665,9 +1677,10 @@ CONFIG_NLS_ISO8859_1=y
1665# Library routines 1677# Library routines
1666# 1678#
1667CONFIG_BITREVERSE=y 1679CONFIG_BITREVERSE=y
1680# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1668CONFIG_CRC_CCITT=y 1681CONFIG_CRC_CCITT=y
1669# CONFIG_CRC16 is not set 1682# CONFIG_CRC16 is not set
1670# CONFIG_CRC_ITU_T is not set 1683CONFIG_CRC_ITU_T=y
1671CONFIG_CRC32=y 1684CONFIG_CRC32=y
1672# CONFIG_CRC7 is not set 1685# CONFIG_CRC7 is not set
1673CONFIG_LIBCRC32C=m 1686CONFIG_LIBCRC32C=m
@@ -1677,6 +1690,7 @@ CONFIG_PLIST=y
1677CONFIG_HAS_IOMEM=y 1690CONFIG_HAS_IOMEM=y
1678CONFIG_HAS_IOPORT=y 1691CONFIG_HAS_IOPORT=y
1679CONFIG_HAS_DMA=y 1692CONFIG_HAS_DMA=y
1693CONFIG_HAVE_LMB=y
1680 1694
1681# 1695#
1682# Kernel hacking 1696# Kernel hacking
@@ -1684,6 +1698,7 @@ CONFIG_HAS_DMA=y
1684# CONFIG_PRINTK_TIME is not set 1698# CONFIG_PRINTK_TIME is not set
1685CONFIG_ENABLE_WARN_DEPRECATED=y 1699CONFIG_ENABLE_WARN_DEPRECATED=y
1686CONFIG_ENABLE_MUST_CHECK=y 1700CONFIG_ENABLE_MUST_CHECK=y
1701CONFIG_FRAME_WARN=2048
1687CONFIG_MAGIC_SYSRQ=y 1702CONFIG_MAGIC_SYSRQ=y
1688# CONFIG_UNUSED_SYMBOLS is not set 1703# CONFIG_UNUSED_SYMBOLS is not set
1689# CONFIG_DEBUG_FS is not set 1704# CONFIG_DEBUG_FS is not set
@@ -1694,18 +1709,23 @@ CONFIG_DETECT_SOFTLOCKUP=y
1694# CONFIG_SCHED_DEBUG is not set 1709# CONFIG_SCHED_DEBUG is not set
1695# CONFIG_SCHEDSTATS is not set 1710# CONFIG_SCHEDSTATS is not set
1696# CONFIG_TIMER_STATS is not set 1711# CONFIG_TIMER_STATS is not set
1712# CONFIG_DEBUG_OBJECTS is not set
1697# CONFIG_SLUB_DEBUG_ON is not set 1713# CONFIG_SLUB_DEBUG_ON is not set
1698# CONFIG_SLUB_STATS is not set 1714# CONFIG_SLUB_STATS is not set
1699# CONFIG_DEBUG_RT_MUTEXES is not set 1715# CONFIG_DEBUG_RT_MUTEXES is not set
1700# CONFIG_RT_MUTEX_TESTER is not set 1716# CONFIG_RT_MUTEX_TESTER is not set
1701# CONFIG_DEBUG_SPINLOCK is not set 1717# CONFIG_DEBUG_SPINLOCK is not set
1702# CONFIG_DEBUG_MUTEXES is not set 1718# CONFIG_DEBUG_MUTEXES is not set
1719# CONFIG_DEBUG_LOCK_ALLOC is not set
1720# CONFIG_PROVE_LOCKING is not set
1721# CONFIG_LOCK_STAT is not set
1703# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1722# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1704# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1723# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1705# CONFIG_DEBUG_KOBJECT is not set 1724# CONFIG_DEBUG_KOBJECT is not set
1706CONFIG_DEBUG_BUGVERBOSE=y 1725CONFIG_DEBUG_BUGVERBOSE=y
1707# CONFIG_DEBUG_INFO is not set 1726# CONFIG_DEBUG_INFO is not set
1708# CONFIG_DEBUG_VM is not set 1727# CONFIG_DEBUG_VM is not set
1728# CONFIG_DEBUG_WRITECOUNT is not set
1709# CONFIG_DEBUG_LIST is not set 1729# CONFIG_DEBUG_LIST is not set
1710# CONFIG_DEBUG_SG is not set 1730# CONFIG_DEBUG_SG is not set
1711# CONFIG_BOOT_PRINTK_DELAY is not set 1731# CONFIG_BOOT_PRINTK_DELAY is not set
@@ -1735,53 +1755,83 @@ CONFIG_ASYNC_CORE=y
1735CONFIG_ASYNC_MEMCPY=y 1755CONFIG_ASYNC_MEMCPY=y
1736CONFIG_ASYNC_XOR=y 1756CONFIG_ASYNC_XOR=y
1737CONFIG_CRYPTO=y 1757CONFIG_CRYPTO=y
1758
1759#
1760# Crypto core or helper
1761#
1738CONFIG_CRYPTO_ALGAPI=y 1762CONFIG_CRYPTO_ALGAPI=y
1739CONFIG_CRYPTO_AEAD=y 1763CONFIG_CRYPTO_AEAD=y
1740CONFIG_CRYPTO_BLKCIPHER=y 1764CONFIG_CRYPTO_BLKCIPHER=y
1741# CONFIG_CRYPTO_SEQIV is not set
1742CONFIG_CRYPTO_HASH=y 1765CONFIG_CRYPTO_HASH=y
1743CONFIG_CRYPTO_MANAGER=y 1766CONFIG_CRYPTO_MANAGER=y
1767# CONFIG_CRYPTO_GF128MUL is not set
1768# CONFIG_CRYPTO_NULL is not set
1769# CONFIG_CRYPTO_CRYPTD is not set
1770CONFIG_CRYPTO_AUTHENC=y
1771# CONFIG_CRYPTO_TEST is not set
1772
1773#
1774# Authenticated Encryption with Associated Data
1775#
1776# CONFIG_CRYPTO_CCM is not set
1777# CONFIG_CRYPTO_GCM is not set
1778# CONFIG_CRYPTO_SEQIV is not set
1779
1780#
1781# Block modes
1782#
1783CONFIG_CRYPTO_CBC=y
1784# CONFIG_CRYPTO_CTR is not set
1785# CONFIG_CRYPTO_CTS is not set
1786# CONFIG_CRYPTO_ECB is not set
1787# CONFIG_CRYPTO_LRW is not set
1788# CONFIG_CRYPTO_PCBC is not set
1789# CONFIG_CRYPTO_XTS is not set
1790
1791#
1792# Hash modes
1793#
1744CONFIG_CRYPTO_HMAC=y 1794CONFIG_CRYPTO_HMAC=y
1745# CONFIG_CRYPTO_XCBC is not set 1795# CONFIG_CRYPTO_XCBC is not set
1746# CONFIG_CRYPTO_NULL is not set 1796
1797#
1798# Digest
1799#
1800# CONFIG_CRYPTO_CRC32C is not set
1747CONFIG_CRYPTO_MD4=y 1801CONFIG_CRYPTO_MD4=y
1748CONFIG_CRYPTO_MD5=y 1802CONFIG_CRYPTO_MD5=y
1803# CONFIG_CRYPTO_MICHAEL_MIC is not set
1749CONFIG_CRYPTO_SHA1=y 1804CONFIG_CRYPTO_SHA1=y
1750CONFIG_CRYPTO_SHA256=y 1805CONFIG_CRYPTO_SHA256=y
1751CONFIG_CRYPTO_SHA512=y 1806CONFIG_CRYPTO_SHA512=y
1752# CONFIG_CRYPTO_WP512 is not set
1753# CONFIG_CRYPTO_TGR192 is not set 1807# CONFIG_CRYPTO_TGR192 is not set
1754# CONFIG_CRYPTO_GF128MUL is not set 1808# CONFIG_CRYPTO_WP512 is not set
1755# CONFIG_CRYPTO_ECB is not set 1809
1756CONFIG_CRYPTO_CBC=y 1810#
1757# CONFIG_CRYPTO_PCBC is not set 1811# Ciphers
1758# CONFIG_CRYPTO_LRW is not set 1812#
1759# CONFIG_CRYPTO_XTS is not set
1760# CONFIG_CRYPTO_CTR is not set
1761# CONFIG_CRYPTO_GCM is not set
1762# CONFIG_CRYPTO_CCM is not set
1763# CONFIG_CRYPTO_CRYPTD is not set
1764CONFIG_CRYPTO_DES=y
1765# CONFIG_CRYPTO_FCRYPT is not set
1766CONFIG_CRYPTO_BLOWFISH=y
1767# CONFIG_CRYPTO_TWOFISH is not set
1768# CONFIG_CRYPTO_SERPENT is not set
1769CONFIG_CRYPTO_AES=y 1813CONFIG_CRYPTO_AES=y
1814# CONFIG_CRYPTO_ANUBIS is not set
1815# CONFIG_CRYPTO_ARC4 is not set
1816CONFIG_CRYPTO_BLOWFISH=y
1817# CONFIG_CRYPTO_CAMELLIA is not set
1770# CONFIG_CRYPTO_CAST5 is not set 1818# CONFIG_CRYPTO_CAST5 is not set
1771# CONFIG_CRYPTO_CAST6 is not set 1819# CONFIG_CRYPTO_CAST6 is not set
1772# CONFIG_CRYPTO_TEA is not set 1820CONFIG_CRYPTO_DES=y
1773# CONFIG_CRYPTO_ARC4 is not set 1821# CONFIG_CRYPTO_FCRYPT is not set
1774# CONFIG_CRYPTO_KHAZAD is not set 1822# CONFIG_CRYPTO_KHAZAD is not set
1775# CONFIG_CRYPTO_ANUBIS is not set
1776# CONFIG_CRYPTO_SEED is not set
1777# CONFIG_CRYPTO_SALSA20 is not set 1823# CONFIG_CRYPTO_SALSA20 is not set
1824# CONFIG_CRYPTO_SEED is not set
1825# CONFIG_CRYPTO_SERPENT is not set
1826# CONFIG_CRYPTO_TEA is not set
1827# CONFIG_CRYPTO_TWOFISH is not set
1828
1829#
1830# Compression
1831#
1778# CONFIG_CRYPTO_DEFLATE is not set 1832# CONFIG_CRYPTO_DEFLATE is not set
1779# CONFIG_CRYPTO_MICHAEL_MIC is not set
1780# CONFIG_CRYPTO_CRC32C is not set
1781# CONFIG_CRYPTO_CAMELLIA is not set
1782# CONFIG_CRYPTO_TEST is not set
1783CONFIG_CRYPTO_AUTHENC=y
1784# CONFIG_CRYPTO_LZO is not set 1833# CONFIG_CRYPTO_LZO is not set
1785CONFIG_CRYPTO_HW=y 1834CONFIG_CRYPTO_HW=y
1786# CONFIG_CRYPTO_DEV_HIFN_795X is not set 1835# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1787# CONFIG_PPC_CLOCK is not set 1836# CONFIG_PPC_CLOCK is not set
1837# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig
index fca114252ac7..3688e4bb6fc2 100644
--- a/arch/powerpc/configs/pmac32_defconfig
+++ b/arch/powerpc/configs/pmac32_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.25-rc6 3# Linux kernel version: 2.6.26-rc3
4# Thu Mar 27 13:56:21 2008 4# Tue May 20 20:02:24 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -31,6 +31,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y 31CONFIG_GENERIC_HARDIRQS=y
32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
33CONFIG_IRQ_PER_CPU=y 33CONFIG_IRQ_PER_CPU=y
34CONFIG_STACKTRACE_SUPPORT=y
35CONFIG_LOCKDEP_SUPPORT=y
34CONFIG_RWSEM_XCHGADD_ALGORITHM=y 36CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y 37CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y 38CONFIG_GENERIC_HWEIGHT=y
@@ -91,6 +93,7 @@ CONFIG_INITRAMFS_SOURCE=""
91CONFIG_SYSCTL=y 93CONFIG_SYSCTL=y
92# CONFIG_EMBEDDED is not set 94# CONFIG_EMBEDDED is not set
93CONFIG_SYSCTL_SYSCALL=y 95CONFIG_SYSCTL_SYSCALL=y
96CONFIG_SYSCTL_SYSCALL_CHECK=y
94CONFIG_KALLSYMS=y 97CONFIG_KALLSYMS=y
95# CONFIG_KALLSYMS_ALL is not set 98# CONFIG_KALLSYMS_ALL is not set
96# CONFIG_KALLSYMS_EXTRA_PASS is not set 99# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -119,12 +122,14 @@ CONFIG_HAVE_OPROFILE=y
119# CONFIG_KPROBES is not set 122# CONFIG_KPROBES is not set
120CONFIG_HAVE_KPROBES=y 123CONFIG_HAVE_KPROBES=y
121CONFIG_HAVE_KRETPROBES=y 124CONFIG_HAVE_KRETPROBES=y
125# CONFIG_HAVE_DMA_ATTRS is not set
122CONFIG_PROC_PAGE_MONITOR=y 126CONFIG_PROC_PAGE_MONITOR=y
123CONFIG_SLABINFO=y 127CONFIG_SLABINFO=y
124CONFIG_RT_MUTEXES=y 128CONFIG_RT_MUTEXES=y
125# CONFIG_TINY_SHMEM is not set 129# CONFIG_TINY_SHMEM is not set
126CONFIG_BASE_SMALL=0 130CONFIG_BASE_SMALL=0
127CONFIG_MODULES=y 131CONFIG_MODULES=y
132# CONFIG_MODULE_FORCE_LOAD is not set
128CONFIG_MODULE_UNLOAD=y 133CONFIG_MODULE_UNLOAD=y
129CONFIG_MODULE_FORCE_UNLOAD=y 134CONFIG_MODULE_FORCE_UNLOAD=y
130# CONFIG_MODVERSIONS is not set 135# CONFIG_MODVERSIONS is not set
@@ -185,6 +190,7 @@ CONFIG_CPU_FREQ_TABLE=y
185CONFIG_CPU_FREQ_STAT=y 190CONFIG_CPU_FREQ_STAT=y
186# CONFIG_CPU_FREQ_STAT_DETAILS is not set 191# CONFIG_CPU_FREQ_STAT_DETAILS is not set
187CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y 192CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
193# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
188# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set 194# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
189# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set 195# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
190# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set 196# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
@@ -236,16 +242,17 @@ CONFIG_FLATMEM=y
236CONFIG_FLAT_NODE_MEM_MAP=y 242CONFIG_FLAT_NODE_MEM_MAP=y
237# CONFIG_SPARSEMEM_STATIC is not set 243# CONFIG_SPARSEMEM_STATIC is not set
238# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 244# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
245CONFIG_PAGEFLAGS_EXTENDED=y
239CONFIG_SPLIT_PTLOCK_CPUS=4 246CONFIG_SPLIT_PTLOCK_CPUS=4
240# CONFIG_RESOURCES_64BIT is not set 247# CONFIG_RESOURCES_64BIT is not set
241CONFIG_ZONE_DMA_FLAG=1 248CONFIG_ZONE_DMA_FLAG=1
242CONFIG_BOUNCE=y 249CONFIG_BOUNCE=y
243CONFIG_VIRT_TO_BUS=y 250CONFIG_VIRT_TO_BUS=y
251CONFIG_FORCE_MAX_ZONEORDER=11
244CONFIG_PROC_DEVICETREE=y 252CONFIG_PROC_DEVICETREE=y
245# CONFIG_CMDLINE_BOOL is not set 253# CONFIG_CMDLINE_BOOL is not set
246CONFIG_ARCH_WANTS_FREEZER_CONTROL=y 254CONFIG_ARCH_WANTS_FREEZER_CONTROL=y
247CONFIG_PM=y 255CONFIG_PM=y
248# CONFIG_PM_LEGACY is not set
249CONFIG_PM_DEBUG=y 256CONFIG_PM_DEBUG=y
250# CONFIG_PM_VERBOSE is not set 257# CONFIG_PM_VERBOSE is not set
251CONFIG_CAN_PM_TRACE=y 258CONFIG_CAN_PM_TRACE=y
@@ -292,6 +299,7 @@ CONFIG_YENTA_TOSHIBA=y
292# CONFIG_I82092 is not set 299# CONFIG_I82092 is not set
293CONFIG_PCCARD_NONSTATIC=m 300CONFIG_PCCARD_NONSTATIC=m
294# CONFIG_HOTPLUG_PCI is not set 301# CONFIG_HOTPLUG_PCI is not set
302# CONFIG_HAS_RAPIDIO is not set
295 303
296# 304#
297# Advanced setup 305# Advanced setup
@@ -301,11 +309,11 @@ CONFIG_PCCARD_NONSTATIC=m
301# 309#
302# Default settings for advanced configuration options are used 310# Default settings for advanced configuration options are used
303# 311#
304CONFIG_HIGHMEM_START=0xfe000000
305CONFIG_LOWMEM_SIZE=0x30000000 312CONFIG_LOWMEM_SIZE=0x30000000
313CONFIG_PAGE_OFFSET=0xc0000000
306CONFIG_KERNEL_START=0xc0000000 314CONFIG_KERNEL_START=0xc0000000
315CONFIG_PHYSICAL_START=0x00000000
307CONFIG_TASK_SIZE=0xc0000000 316CONFIG_TASK_SIZE=0xc0000000
308CONFIG_BOOT_LOAD=0x00800000
309 317
310# 318#
311# Networking 319# Networking
@@ -352,8 +360,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
352# CONFIG_TCP_MD5SIG is not set 360# CONFIG_TCP_MD5SIG is not set
353# CONFIG_IP_VS is not set 361# CONFIG_IP_VS is not set
354# CONFIG_IPV6 is not set 362# CONFIG_IPV6 is not set
355# CONFIG_INET6_XFRM_TUNNEL is not set
356# CONFIG_INET6_TUNNEL is not set
357# CONFIG_NETWORK_SECMARK is not set 363# CONFIG_NETWORK_SECMARK is not set
358CONFIG_NETFILTER=y 364CONFIG_NETFILTER=y
359# CONFIG_NETFILTER_DEBUG is not set 365# CONFIG_NETFILTER_DEBUG is not set
@@ -369,6 +375,7 @@ CONFIG_NF_CONNTRACK=m
369# CONFIG_NF_CT_ACCT is not set 375# CONFIG_NF_CT_ACCT is not set
370# CONFIG_NF_CONNTRACK_MARK is not set 376# CONFIG_NF_CONNTRACK_MARK is not set
371# CONFIG_NF_CONNTRACK_EVENTS is not set 377# CONFIG_NF_CONNTRACK_EVENTS is not set
378CONFIG_NF_CT_PROTO_DCCP=m
372# CONFIG_NF_CT_PROTO_SCTP is not set 379# CONFIG_NF_CT_PROTO_SCTP is not set
373# CONFIG_NF_CT_PROTO_UDPLITE is not set 380# CONFIG_NF_CT_PROTO_UDPLITE is not set
374# CONFIG_NF_CONNTRACK_AMANDA is not set 381# CONFIG_NF_CONNTRACK_AMANDA is not set
@@ -445,6 +452,7 @@ CONFIG_IP_NF_TARGET_MASQUERADE=m
445CONFIG_IP_NF_TARGET_REDIRECT=m 452CONFIG_IP_NF_TARGET_REDIRECT=m
446CONFIG_IP_NF_TARGET_NETMAP=m 453CONFIG_IP_NF_TARGET_NETMAP=m
447# CONFIG_NF_NAT_SNMP_BASIC is not set 454# CONFIG_NF_NAT_SNMP_BASIC is not set
455CONFIG_NF_NAT_PROTO_DCCP=m
448CONFIG_NF_NAT_FTP=m 456CONFIG_NF_NAT_FTP=m
449CONFIG_NF_NAT_IRC=m 457CONFIG_NF_NAT_IRC=m
450CONFIG_NF_NAT_TFTP=m 458CONFIG_NF_NAT_TFTP=m
@@ -586,7 +594,6 @@ CONFIG_MAC80211=m
586# Rate control algorithm selection 594# Rate control algorithm selection
587# 595#
588CONFIG_MAC80211_RC_DEFAULT_PID=y 596CONFIG_MAC80211_RC_DEFAULT_PID=y
589# CONFIG_MAC80211_RC_DEFAULT_SIMPLE is not set
590# CONFIG_MAC80211_RC_DEFAULT_NONE is not set 597# CONFIG_MAC80211_RC_DEFAULT_NONE is not set
591 598
592# 599#
@@ -598,7 +605,7 @@ CONFIG_MAC80211_RC_DEFAULT_PID=y
598# 605#
599CONFIG_MAC80211_RC_DEFAULT="pid" 606CONFIG_MAC80211_RC_DEFAULT="pid"
600CONFIG_MAC80211_RC_PID=y 607CONFIG_MAC80211_RC_PID=y
601# CONFIG_MAC80211_RC_SIMPLE is not set 608# CONFIG_MAC80211_MESH is not set
602CONFIG_MAC80211_LEDS=y 609CONFIG_MAC80211_LEDS=y
603# CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT is not set 610# CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT is not set
604# CONFIG_MAC80211_DEBUG is not set 611# CONFIG_MAC80211_DEBUG is not set
@@ -607,7 +614,6 @@ CONFIG_IEEE80211=m
607CONFIG_IEEE80211_CRYPT_WEP=m 614CONFIG_IEEE80211_CRYPT_WEP=m
608CONFIG_IEEE80211_CRYPT_CCMP=m 615CONFIG_IEEE80211_CRYPT_CCMP=m
609CONFIG_IEEE80211_CRYPT_TKIP=m 616CONFIG_IEEE80211_CRYPT_TKIP=m
610# CONFIG_IEEE80211_SOFTMAC is not set
611# CONFIG_RFKILL is not set 617# CONFIG_RFKILL is not set
612# CONFIG_NET_9P is not set 618# CONFIG_NET_9P is not set
613 619
@@ -629,6 +635,7 @@ CONFIG_CONNECTOR=y
629CONFIG_PROC_EVENTS=y 635CONFIG_PROC_EVENTS=y
630# CONFIG_MTD is not set 636# CONFIG_MTD is not set
631CONFIG_OF_DEVICE=y 637CONFIG_OF_DEVICE=y
638CONFIG_OF_I2C=y
632# CONFIG_PARPORT is not set 639# CONFIG_PARPORT is not set
633CONFIG_BLK_DEV=y 640CONFIG_BLK_DEV=y
634# CONFIG_BLK_DEV_FD is not set 641# CONFIG_BLK_DEV_FD is not set
@@ -720,7 +727,7 @@ CONFIG_BLK_DEV_IDE_PMAC=y
720CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y 727CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
721CONFIG_BLK_DEV_IDEDMA_PMAC=y 728CONFIG_BLK_DEV_IDEDMA_PMAC=y
722CONFIG_BLK_DEV_IDEDMA=y 729CONFIG_BLK_DEV_IDEDMA=y
723CONFIG_IDE_ARCH_OBSOLETE_INIT=y 730# CONFIG_BLK_DEV_HD_ONLY is not set
724# CONFIG_BLK_DEV_HD is not set 731# CONFIG_BLK_DEV_HD is not set
725 732
726# 733#
@@ -906,7 +913,6 @@ CONFIG_SUNGEM=y
906# CONFIG_IBM_NEW_EMAC_EMAC4 is not set 913# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
907CONFIG_NET_PCI=y 914CONFIG_NET_PCI=y
908CONFIG_PCNET32=y 915CONFIG_PCNET32=y
909# CONFIG_PCNET32_NAPI is not set
910# CONFIG_AMD8111_ETH is not set 916# CONFIG_AMD8111_ETH is not set
911# CONFIG_ADAPTEC_STARFIRE is not set 917# CONFIG_ADAPTEC_STARFIRE is not set
912# CONFIG_B44 is not set 918# CONFIG_B44 is not set
@@ -940,7 +946,6 @@ CONFIG_NETDEV_1000=y
940# CONFIG_SIS190 is not set 946# CONFIG_SIS190 is not set
941# CONFIG_SKGE is not set 947# CONFIG_SKGE is not set
942# CONFIG_SKY2 is not set 948# CONFIG_SKY2 is not set
943# CONFIG_SK98LIN is not set
944# CONFIG_VIA_VELOCITY is not set 949# CONFIG_VIA_VELOCITY is not set
945# CONFIG_TIGON3 is not set 950# CONFIG_TIGON3 is not set
946# CONFIG_BNX2 is not set 951# CONFIG_BNX2 is not set
@@ -959,6 +964,7 @@ CONFIG_NETDEV_10000=y
959# CONFIG_MLX4_CORE is not set 964# CONFIG_MLX4_CORE is not set
960# CONFIG_TEHUTI is not set 965# CONFIG_TEHUTI is not set
961# CONFIG_BNX2X is not set 966# CONFIG_BNX2X is not set
967# CONFIG_SFC is not set
962# CONFIG_TR is not set 968# CONFIG_TR is not set
963 969
964# 970#
@@ -992,6 +998,8 @@ CONFIG_P54_COMMON=m
992# CONFIG_P54_USB is not set 998# CONFIG_P54_USB is not set
993# CONFIG_P54_PCI is not set 999# CONFIG_P54_PCI is not set
994# CONFIG_ATH5K is not set 1000# CONFIG_ATH5K is not set
1001# CONFIG_IWLCORE is not set
1002# CONFIG_IWLWIFI_LEDS is not set
995# CONFIG_IWL4965 is not set 1003# CONFIG_IWL4965 is not set
996# CONFIG_IWL3945 is not set 1004# CONFIG_IWL3945 is not set
997# CONFIG_HOSTAP is not set 1005# CONFIG_HOSTAP is not set
@@ -1110,6 +1118,7 @@ CONFIG_VT=y
1110CONFIG_VT_CONSOLE=y 1118CONFIG_VT_CONSOLE=y
1111CONFIG_HW_CONSOLE=y 1119CONFIG_HW_CONSOLE=y
1112# CONFIG_VT_HW_CONSOLE_BINDING is not set 1120# CONFIG_VT_HW_CONSOLE_BINDING is not set
1121CONFIG_DEVKMEM=y
1113# CONFIG_SERIAL_NONSTANDARD is not set 1122# CONFIG_SERIAL_NONSTANDARD is not set
1114# CONFIG_NOZOMI is not set 1123# CONFIG_NOZOMI is not set
1115 1124
@@ -1156,13 +1165,7 @@ CONFIG_DEVPORT=y
1156CONFIG_I2C=y 1165CONFIG_I2C=y
1157CONFIG_I2C_BOARDINFO=y 1166CONFIG_I2C_BOARDINFO=y
1158CONFIG_I2C_CHARDEV=m 1167CONFIG_I2C_CHARDEV=m
1159
1160#
1161# I2C Algorithms
1162#
1163CONFIG_I2C_ALGOBIT=y 1168CONFIG_I2C_ALGOBIT=y
1164# CONFIG_I2C_ALGOPCF is not set
1165# CONFIG_I2C_ALGOPCA is not set
1166 1169
1167# 1170#
1168# I2C Hardware Bus support 1171# I2C Hardware Bus support
@@ -1192,6 +1195,7 @@ CONFIG_I2C_POWERMAC=y
1192# CONFIG_I2C_VIA is not set 1195# CONFIG_I2C_VIA is not set
1193# CONFIG_I2C_VIAPRO is not set 1196# CONFIG_I2C_VIAPRO is not set
1194# CONFIG_I2C_VOODOO3 is not set 1197# CONFIG_I2C_VOODOO3 is not set
1198# CONFIG_I2C_PCA_PLATFORM is not set
1195 1199
1196# 1200#
1197# Miscellaneous I2C Chip support 1201# Miscellaneous I2C Chip support
@@ -1201,19 +1205,13 @@ CONFIG_I2C_POWERMAC=y
1201# CONFIG_SENSORS_PCF8574 is not set 1205# CONFIG_SENSORS_PCF8574 is not set
1202# CONFIG_PCF8575 is not set 1206# CONFIG_PCF8575 is not set
1203# CONFIG_SENSORS_PCF8591 is not set 1207# CONFIG_SENSORS_PCF8591 is not set
1204# CONFIG_TPS65010 is not set
1205# CONFIG_SENSORS_MAX6875 is not set 1208# CONFIG_SENSORS_MAX6875 is not set
1206# CONFIG_SENSORS_TSL2550 is not set 1209# CONFIG_SENSORS_TSL2550 is not set
1207# CONFIG_I2C_DEBUG_CORE is not set 1210# CONFIG_I2C_DEBUG_CORE is not set
1208# CONFIG_I2C_DEBUG_ALGO is not set 1211# CONFIG_I2C_DEBUG_ALGO is not set
1209# CONFIG_I2C_DEBUG_BUS is not set 1212# CONFIG_I2C_DEBUG_BUS is not set
1210# CONFIG_I2C_DEBUG_CHIP is not set 1213# CONFIG_I2C_DEBUG_CHIP is not set
1211
1212#
1213# SPI support
1214#
1215# CONFIG_SPI is not set 1214# CONFIG_SPI is not set
1216# CONFIG_SPI_MASTER is not set
1217# CONFIG_W1 is not set 1215# CONFIG_W1 is not set
1218CONFIG_POWER_SUPPLY=y 1216CONFIG_POWER_SUPPLY=y
1219# CONFIG_POWER_SUPPLY_DEBUG is not set 1217# CONFIG_POWER_SUPPLY_DEBUG is not set
@@ -1230,6 +1228,7 @@ CONFIG_BATTERY_PMU=y
1230# 1228#
1231CONFIG_SSB_POSSIBLE=y 1229CONFIG_SSB_POSSIBLE=y
1232CONFIG_SSB=m 1230CONFIG_SSB=m
1231CONFIG_SSB_SPROM=y
1233CONFIG_SSB_PCIHOST_POSSIBLE=y 1232CONFIG_SSB_PCIHOST_POSSIBLE=y
1234CONFIG_SSB_PCIHOST=y 1233CONFIG_SSB_PCIHOST=y
1235CONFIG_SSB_B43_PCI_BRIDGE=y 1234CONFIG_SSB_B43_PCI_BRIDGE=y
@@ -1243,12 +1242,22 @@ CONFIG_SSB_DRIVER_PCICORE=y
1243# Multifunction device drivers 1242# Multifunction device drivers
1244# 1243#
1245# CONFIG_MFD_SM501 is not set 1244# CONFIG_MFD_SM501 is not set
1245# CONFIG_HTC_PASIC3 is not set
1246 1246
1247# 1247#
1248# Multimedia devices 1248# Multimedia devices
1249# 1249#
1250
1251#
1252# Multimedia core support
1253#
1250# CONFIG_VIDEO_DEV is not set 1254# CONFIG_VIDEO_DEV is not set
1251# CONFIG_DVB_CORE is not set 1255# CONFIG_DVB_CORE is not set
1256# CONFIG_VIDEO_MEDIA is not set
1257
1258#
1259# Multimedia drivers
1260#
1252# CONFIG_DAB is not set 1261# CONFIG_DAB is not set
1253 1262
1254# 1263#
@@ -1276,8 +1285,8 @@ CONFIG_FB_CFB_IMAGEBLIT=y
1276# CONFIG_FB_SYS_FILLRECT is not set 1285# CONFIG_FB_SYS_FILLRECT is not set
1277# CONFIG_FB_SYS_COPYAREA is not set 1286# CONFIG_FB_SYS_COPYAREA is not set
1278# CONFIG_FB_SYS_IMAGEBLIT is not set 1287# CONFIG_FB_SYS_IMAGEBLIT is not set
1288# CONFIG_FB_FOREIGN_ENDIAN is not set
1279# CONFIG_FB_SYS_FOPS is not set 1289# CONFIG_FB_SYS_FOPS is not set
1280CONFIG_FB_DEFERRED_IO=y
1281# CONFIG_FB_SVGALIB is not set 1290# CONFIG_FB_SVGALIB is not set
1282CONFIG_FB_MACMODES=y 1291CONFIG_FB_MACMODES=y
1283CONFIG_FB_BACKLIGHT=y 1292CONFIG_FB_BACKLIGHT=y
@@ -1413,6 +1422,7 @@ CONFIG_SND_DUMMY=m
1413# CONFIG_SND_AU8810 is not set 1422# CONFIG_SND_AU8810 is not set
1414# CONFIG_SND_AU8820 is not set 1423# CONFIG_SND_AU8820 is not set
1415# CONFIG_SND_AU8830 is not set 1424# CONFIG_SND_AU8830 is not set
1425# CONFIG_SND_AW2 is not set
1416# CONFIG_SND_AZT3328 is not set 1426# CONFIG_SND_AZT3328 is not set
1417# CONFIG_SND_BT87X is not set 1427# CONFIG_SND_BT87X is not set
1418# CONFIG_SND_CA0106 is not set 1428# CONFIG_SND_CA0106 is not set
@@ -1505,11 +1515,11 @@ CONFIG_SND_USB_AUDIO=m
1505# CONFIG_SND_SOC is not set 1515# CONFIG_SND_SOC is not set
1506 1516
1507# 1517#
1508# SoC Audio support for SuperH 1518# ALSA SoC audio for Freescale SOCs
1509# 1519#
1510 1520
1511# 1521#
1512# ALSA SoC audio for Freescale SOCs 1522# SoC Audio for the Texas Instruments OMAP
1513# 1523#
1514 1524
1515# 1525#
@@ -1543,17 +1553,18 @@ CONFIG_USB_DEVICEFS=y
1543CONFIG_USB_DEVICE_CLASS=y 1553CONFIG_USB_DEVICE_CLASS=y
1544CONFIG_USB_DYNAMIC_MINORS=y 1554CONFIG_USB_DYNAMIC_MINORS=y
1545# CONFIG_USB_SUSPEND is not set 1555# CONFIG_USB_SUSPEND is not set
1546# CONFIG_USB_PERSIST is not set
1547# CONFIG_USB_OTG is not set 1556# CONFIG_USB_OTG is not set
1548 1557
1549# 1558#
1550# USB Host Controller Drivers 1559# USB Host Controller Drivers
1551# 1560#
1561# CONFIG_USB_C67X00_HCD is not set
1552CONFIG_USB_EHCI_HCD=m 1562CONFIG_USB_EHCI_HCD=m
1553CONFIG_USB_EHCI_ROOT_HUB_TT=y 1563CONFIG_USB_EHCI_ROOT_HUB_TT=y
1554# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1564# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1555# CONFIG_USB_EHCI_HCD_PPC_OF is not set 1565# CONFIG_USB_EHCI_HCD_PPC_OF is not set
1556# CONFIG_USB_ISP116X_HCD is not set 1566# CONFIG_USB_ISP116X_HCD is not set
1567# CONFIG_USB_ISP1760_HCD is not set
1557CONFIG_USB_OHCI_HCD=y 1568CONFIG_USB_OHCI_HCD=y
1558# CONFIG_USB_OHCI_HCD_PPC_OF is not set 1569# CONFIG_USB_OHCI_HCD_PPC_OF is not set
1559# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1570# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
@@ -1587,7 +1598,9 @@ CONFIG_USB_STORAGE=m
1587# CONFIG_USB_STORAGE_SDDR55 is not set 1598# CONFIG_USB_STORAGE_SDDR55 is not set
1588# CONFIG_USB_STORAGE_JUMPSHOT is not set 1599# CONFIG_USB_STORAGE_JUMPSHOT is not set
1589# CONFIG_USB_STORAGE_ALAUDA is not set 1600# CONFIG_USB_STORAGE_ALAUDA is not set
1601CONFIG_USB_STORAGE_ONETOUCH=y
1590# CONFIG_USB_STORAGE_KARMA is not set 1602# CONFIG_USB_STORAGE_KARMA is not set
1603# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1591# CONFIG_USB_LIBUSUAL is not set 1604# CONFIG_USB_LIBUSUAL is not set
1592 1605
1593# 1606#
@@ -1642,9 +1655,11 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
1642# CONFIG_USB_SERIAL_MCT_U232 is not set 1655# CONFIG_USB_SERIAL_MCT_U232 is not set
1643# CONFIG_USB_SERIAL_MOS7720 is not set 1656# CONFIG_USB_SERIAL_MOS7720 is not set
1644# CONFIG_USB_SERIAL_MOS7840 is not set 1657# CONFIG_USB_SERIAL_MOS7840 is not set
1658# CONFIG_USB_SERIAL_MOTOROLA is not set
1645# CONFIG_USB_SERIAL_NAVMAN is not set 1659# CONFIG_USB_SERIAL_NAVMAN is not set
1646# CONFIG_USB_SERIAL_PL2303 is not set 1660# CONFIG_USB_SERIAL_PL2303 is not set
1647# CONFIG_USB_SERIAL_OTI6858 is not set 1661# CONFIG_USB_SERIAL_OTI6858 is not set
1662# CONFIG_USB_SERIAL_SPCP8X5 is not set
1648# CONFIG_USB_SERIAL_HP4X is not set 1663# CONFIG_USB_SERIAL_HP4X is not set
1649# CONFIG_USB_SERIAL_SAFE is not set 1664# CONFIG_USB_SERIAL_SAFE is not set
1650# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set 1665# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
@@ -1695,14 +1710,12 @@ CONFIG_LEDS_TRIGGERS=y
1695# CONFIG_LEDS_TRIGGER_TIMER is not set 1710# CONFIG_LEDS_TRIGGER_TIMER is not set
1696CONFIG_LEDS_TRIGGER_IDE_DISK=y 1711CONFIG_LEDS_TRIGGER_IDE_DISK=y
1697# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set 1712# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
1713CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
1714# CONFIG_ACCESSIBILITY is not set
1698# CONFIG_INFINIBAND is not set 1715# CONFIG_INFINIBAND is not set
1699# CONFIG_EDAC is not set 1716# CONFIG_EDAC is not set
1700# CONFIG_RTC_CLASS is not set 1717# CONFIG_RTC_CLASS is not set
1701# CONFIG_DMADEVICES is not set 1718# CONFIG_DMADEVICES is not set
1702
1703#
1704# Userspace I/O
1705#
1706# CONFIG_UIO is not set 1719# CONFIG_UIO is not set
1707 1720
1708# 1721#
@@ -1786,13 +1799,11 @@ CONFIG_NFS_FS=y
1786CONFIG_NFS_V3=y 1799CONFIG_NFS_V3=y
1787CONFIG_NFS_V3_ACL=y 1800CONFIG_NFS_V3_ACL=y
1788CONFIG_NFS_V4=y 1801CONFIG_NFS_V4=y
1789# CONFIG_NFS_DIRECTIO is not set
1790CONFIG_NFSD=m 1802CONFIG_NFSD=m
1791CONFIG_NFSD_V2_ACL=y 1803CONFIG_NFSD_V2_ACL=y
1792CONFIG_NFSD_V3=y 1804CONFIG_NFSD_V3=y
1793CONFIG_NFSD_V3_ACL=y 1805CONFIG_NFSD_V3_ACL=y
1794CONFIG_NFSD_V4=y 1806CONFIG_NFSD_V4=y
1795CONFIG_NFSD_TCP=y
1796CONFIG_LOCKD=y 1807CONFIG_LOCKD=y
1797CONFIG_LOCKD_V4=y 1808CONFIG_LOCKD_V4=y
1798CONFIG_EXPORTFS=m 1809CONFIG_EXPORTFS=m
@@ -1877,9 +1888,10 @@ CONFIG_NLS_UTF8=m
1877# Library routines 1888# Library routines
1878# 1889#
1879CONFIG_BITREVERSE=y 1890CONFIG_BITREVERSE=y
1891# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1880CONFIG_CRC_CCITT=y 1892CONFIG_CRC_CCITT=y
1881CONFIG_CRC16=y 1893CONFIG_CRC16=y
1882# CONFIG_CRC_ITU_T is not set 1894CONFIG_CRC_ITU_T=m
1883CONFIG_CRC32=y 1895CONFIG_CRC32=y
1884# CONFIG_CRC7 is not set 1896# CONFIG_CRC7 is not set
1885CONFIG_LIBCRC32C=m 1897CONFIG_LIBCRC32C=m
@@ -1901,6 +1913,7 @@ CONFIG_HAVE_LMB=y
1901# CONFIG_PRINTK_TIME is not set 1913# CONFIG_PRINTK_TIME is not set
1902CONFIG_ENABLE_WARN_DEPRECATED=y 1914CONFIG_ENABLE_WARN_DEPRECATED=y
1903CONFIG_ENABLE_MUST_CHECK=y 1915CONFIG_ENABLE_MUST_CHECK=y
1916CONFIG_FRAME_WARN=1024
1904CONFIG_MAGIC_SYSRQ=y 1917CONFIG_MAGIC_SYSRQ=y
1905# CONFIG_UNUSED_SYMBOLS is not set 1918# CONFIG_UNUSED_SYMBOLS is not set
1906# CONFIG_DEBUG_FS is not set 1919# CONFIG_DEBUG_FS is not set
@@ -1911,6 +1924,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
1911CONFIG_SCHED_DEBUG=y 1924CONFIG_SCHED_DEBUG=y
1912# CONFIG_SCHEDSTATS is not set 1925# CONFIG_SCHEDSTATS is not set
1913# CONFIG_TIMER_STATS is not set 1926# CONFIG_TIMER_STATS is not set
1927# CONFIG_DEBUG_OBJECTS is not set
1914# CONFIG_SLUB_DEBUG_ON is not set 1928# CONFIG_SLUB_DEBUG_ON is not set
1915# CONFIG_SLUB_STATS is not set 1929# CONFIG_SLUB_STATS is not set
1916# CONFIG_DEBUG_RT_MUTEXES is not set 1930# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -1923,6 +1937,7 @@ CONFIG_SCHED_DEBUG=y
1923CONFIG_DEBUG_BUGVERBOSE=y 1937CONFIG_DEBUG_BUGVERBOSE=y
1924# CONFIG_DEBUG_INFO is not set 1938# CONFIG_DEBUG_INFO is not set
1925# CONFIG_DEBUG_VM is not set 1939# CONFIG_DEBUG_VM is not set
1940# CONFIG_DEBUG_WRITECOUNT is not set
1926# CONFIG_DEBUG_LIST is not set 1941# CONFIG_DEBUG_LIST is not set
1927# CONFIG_DEBUG_SG is not set 1942# CONFIG_DEBUG_SG is not set
1928# CONFIG_BOOT_PRINTK_DELAY is not set 1943# CONFIG_BOOT_PRINTK_DELAY is not set
@@ -1936,6 +1951,7 @@ CONFIG_DEBUGGER=y
1936CONFIG_XMON=y 1951CONFIG_XMON=y
1937CONFIG_XMON_DEFAULT=y 1952CONFIG_XMON_DEFAULT=y
1938CONFIG_XMON_DISASSEMBLY=y 1953CONFIG_XMON_DISASSEMBLY=y
1954CONFIG_IRQSTACKS=y
1939# CONFIG_BDI_SWITCH is not set 1955# CONFIG_BDI_SWITCH is not set
1940CONFIG_BOOTX_TEXT=y 1956CONFIG_BOOTX_TEXT=y
1941# CONFIG_PPC_EARLY_DEBUG is not set 1957# CONFIG_PPC_EARLY_DEBUG is not set
@@ -1947,54 +1963,84 @@ CONFIG_BOOTX_TEXT=y
1947# CONFIG_SECURITY is not set 1963# CONFIG_SECURITY is not set
1948# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1964# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1949CONFIG_CRYPTO=y 1965CONFIG_CRYPTO=y
1966
1967#
1968# Crypto core or helper
1969#
1950CONFIG_CRYPTO_ALGAPI=y 1970CONFIG_CRYPTO_ALGAPI=y
1951CONFIG_CRYPTO_AEAD=y 1971CONFIG_CRYPTO_AEAD=y
1952CONFIG_CRYPTO_BLKCIPHER=y 1972CONFIG_CRYPTO_BLKCIPHER=y
1953# CONFIG_CRYPTO_SEQIV is not set
1954CONFIG_CRYPTO_HASH=y 1973CONFIG_CRYPTO_HASH=y
1955CONFIG_CRYPTO_MANAGER=y 1974CONFIG_CRYPTO_MANAGER=y
1975# CONFIG_CRYPTO_GF128MUL is not set
1976CONFIG_CRYPTO_NULL=m
1977# CONFIG_CRYPTO_CRYPTD is not set
1978CONFIG_CRYPTO_AUTHENC=y
1979# CONFIG_CRYPTO_TEST is not set
1980
1981#
1982# Authenticated Encryption with Associated Data
1983#
1984# CONFIG_CRYPTO_CCM is not set
1985# CONFIG_CRYPTO_GCM is not set
1986# CONFIG_CRYPTO_SEQIV is not set
1987
1988#
1989# Block modes
1990#
1991CONFIG_CRYPTO_CBC=y
1992# CONFIG_CRYPTO_CTR is not set
1993# CONFIG_CRYPTO_CTS is not set
1994CONFIG_CRYPTO_ECB=m
1995# CONFIG_CRYPTO_LRW is not set
1996CONFIG_CRYPTO_PCBC=m
1997# CONFIG_CRYPTO_XTS is not set
1998
1999#
2000# Hash modes
2001#
1956CONFIG_CRYPTO_HMAC=y 2002CONFIG_CRYPTO_HMAC=y
1957# CONFIG_CRYPTO_XCBC is not set 2003# CONFIG_CRYPTO_XCBC is not set
1958CONFIG_CRYPTO_NULL=m 2004
2005#
2006# Digest
2007#
2008CONFIG_CRYPTO_CRC32C=m
1959CONFIG_CRYPTO_MD4=m 2009CONFIG_CRYPTO_MD4=m
1960CONFIG_CRYPTO_MD5=y 2010CONFIG_CRYPTO_MD5=y
2011CONFIG_CRYPTO_MICHAEL_MIC=m
1961CONFIG_CRYPTO_SHA1=y 2012CONFIG_CRYPTO_SHA1=y
1962CONFIG_CRYPTO_SHA256=m 2013CONFIG_CRYPTO_SHA256=m
1963CONFIG_CRYPTO_SHA512=m 2014CONFIG_CRYPTO_SHA512=m
1964CONFIG_CRYPTO_WP512=m
1965CONFIG_CRYPTO_TGR192=m 2015CONFIG_CRYPTO_TGR192=m
1966# CONFIG_CRYPTO_GF128MUL is not set 2016CONFIG_CRYPTO_WP512=m
1967CONFIG_CRYPTO_ECB=m 2017
1968CONFIG_CRYPTO_CBC=y 2018#
1969CONFIG_CRYPTO_PCBC=m 2019# Ciphers
1970# CONFIG_CRYPTO_LRW is not set 2020#
1971# CONFIG_CRYPTO_XTS is not set
1972# CONFIG_CRYPTO_CTR is not set
1973# CONFIG_CRYPTO_GCM is not set
1974# CONFIG_CRYPTO_CCM is not set
1975# CONFIG_CRYPTO_CRYPTD is not set
1976CONFIG_CRYPTO_DES=y
1977# CONFIG_CRYPTO_FCRYPT is not set
1978CONFIG_CRYPTO_BLOWFISH=m
1979CONFIG_CRYPTO_TWOFISH=m
1980CONFIG_CRYPTO_TWOFISH_COMMON=m
1981CONFIG_CRYPTO_SERPENT=m
1982CONFIG_CRYPTO_AES=m 2021CONFIG_CRYPTO_AES=m
2022CONFIG_CRYPTO_ANUBIS=m
2023CONFIG_CRYPTO_ARC4=m
2024CONFIG_CRYPTO_BLOWFISH=m
2025# CONFIG_CRYPTO_CAMELLIA is not set
1983CONFIG_CRYPTO_CAST5=m 2026CONFIG_CRYPTO_CAST5=m
1984CONFIG_CRYPTO_CAST6=m 2027CONFIG_CRYPTO_CAST6=m
1985CONFIG_CRYPTO_TEA=m 2028CONFIG_CRYPTO_DES=y
1986CONFIG_CRYPTO_ARC4=m 2029# CONFIG_CRYPTO_FCRYPT is not set
1987CONFIG_CRYPTO_KHAZAD=m 2030CONFIG_CRYPTO_KHAZAD=m
1988CONFIG_CRYPTO_ANUBIS=m
1989# CONFIG_CRYPTO_SEED is not set
1990# CONFIG_CRYPTO_SALSA20 is not set 2031# CONFIG_CRYPTO_SALSA20 is not set
2032# CONFIG_CRYPTO_SEED is not set
2033CONFIG_CRYPTO_SERPENT=m
2034CONFIG_CRYPTO_TEA=m
2035CONFIG_CRYPTO_TWOFISH=m
2036CONFIG_CRYPTO_TWOFISH_COMMON=m
2037
2038#
2039# Compression
2040#
1991CONFIG_CRYPTO_DEFLATE=m 2041CONFIG_CRYPTO_DEFLATE=m
1992CONFIG_CRYPTO_MICHAEL_MIC=m
1993CONFIG_CRYPTO_CRC32C=m
1994# CONFIG_CRYPTO_CAMELLIA is not set
1995# CONFIG_CRYPTO_TEST is not set
1996CONFIG_CRYPTO_AUTHENC=y
1997# CONFIG_CRYPTO_LZO is not set 2042# CONFIG_CRYPTO_LZO is not set
1998CONFIG_CRYPTO_HW=y 2043CONFIG_CRYPTO_HW=y
1999# CONFIG_CRYPTO_DEV_HIFN_795X is not set 2044# CONFIG_CRYPTO_DEV_HIFN_795X is not set
2000# CONFIG_PPC_CLOCK is not set 2045# CONFIG_PPC_CLOCK is not set
2046# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig
index 970282b1a004..ce250bc98584 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.25-rc6 3# Linux kernel version: 2.6.26-rc6
4# Thu Mar 27 13:56:24 2008 4# Mon Jun 16 21:11:19 2008
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7 7
@@ -30,6 +30,9 @@ CONFIG_GENERIC_CLOCKEVENTS=y
30CONFIG_GENERIC_HARDIRQS=y 30CONFIG_GENERIC_HARDIRQS=y
31CONFIG_HAVE_SETUP_PER_CPU_AREA=y 31CONFIG_HAVE_SETUP_PER_CPU_AREA=y
32CONFIG_IRQ_PER_CPU=y 32CONFIG_IRQ_PER_CPU=y
33CONFIG_STACKTRACE_SUPPORT=y
34CONFIG_TRACE_IRQFLAGS_SUPPORT=y
35CONFIG_LOCKDEP_SUPPORT=y
33CONFIG_RWSEM_XCHGADD_ALGORITHM=y 36CONFIG_RWSEM_XCHGADD_ALGORITHM=y
34CONFIG_ARCH_HAS_ILOG2_U32=y 37CONFIG_ARCH_HAS_ILOG2_U32=y
35CONFIG_ARCH_HAS_ILOG2_U64=y 38CONFIG_ARCH_HAS_ILOG2_U64=y
@@ -82,6 +85,7 @@ CONFIG_LOG_BUF_SHIFT=17
82CONFIG_CGROUPS=y 85CONFIG_CGROUPS=y
83# CONFIG_CGROUP_DEBUG is not set 86# CONFIG_CGROUP_DEBUG is not set
84# CONFIG_CGROUP_NS is not set 87# CONFIG_CGROUP_NS is not set
88# CONFIG_CGROUP_DEVICE is not set
85CONFIG_CPUSETS=y 89CONFIG_CPUSETS=y
86# CONFIG_GROUP_SCHED is not set 90# CONFIG_GROUP_SCHED is not set
87# CONFIG_CGROUP_CPUACCT is not set 91# CONFIG_CGROUP_CPUACCT is not set
@@ -101,6 +105,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
101CONFIG_SYSCTL=y 105CONFIG_SYSCTL=y
102# CONFIG_EMBEDDED is not set 106# CONFIG_EMBEDDED is not set
103CONFIG_SYSCTL_SYSCALL=y 107CONFIG_SYSCTL_SYSCALL=y
108CONFIG_SYSCTL_SYSCALL_CHECK=y
104CONFIG_KALLSYMS=y 109CONFIG_KALLSYMS=y
105CONFIG_KALLSYMS_ALL=y 110CONFIG_KALLSYMS_ALL=y
106# CONFIG_KALLSYMS_EXTRA_PASS is not set 111# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -108,6 +113,7 @@ CONFIG_HOTPLUG=y
108CONFIG_PRINTK=y 113CONFIG_PRINTK=y
109CONFIG_BUG=y 114CONFIG_BUG=y
110CONFIG_ELF_CORE=y 115CONFIG_ELF_CORE=y
116CONFIG_PCSPKR_PLATFORM=y
111# CONFIG_COMPAT_BRK is not set 117# CONFIG_COMPAT_BRK is not set
112CONFIG_BASE_FULL=y 118CONFIG_BASE_FULL=y
113CONFIG_FUTEX=y 119CONFIG_FUTEX=y
@@ -129,12 +135,14 @@ CONFIG_HAVE_OPROFILE=y
129# CONFIG_KPROBES is not set 135# CONFIG_KPROBES is not set
130CONFIG_HAVE_KPROBES=y 136CONFIG_HAVE_KPROBES=y
131CONFIG_HAVE_KRETPROBES=y 137CONFIG_HAVE_KRETPROBES=y
138# CONFIG_HAVE_DMA_ATTRS is not set
132CONFIG_PROC_PAGE_MONITOR=y 139CONFIG_PROC_PAGE_MONITOR=y
133CONFIG_SLABINFO=y 140CONFIG_SLABINFO=y
134CONFIG_RT_MUTEXES=y 141CONFIG_RT_MUTEXES=y
135# CONFIG_TINY_SHMEM is not set 142# CONFIG_TINY_SHMEM is not set
136CONFIG_BASE_SMALL=0 143CONFIG_BASE_SMALL=0
137CONFIG_MODULES=y 144CONFIG_MODULES=y
145# CONFIG_MODULE_FORCE_LOAD is not set
138CONFIG_MODULE_UNLOAD=y 146CONFIG_MODULE_UNLOAD=y
139# CONFIG_MODULE_FORCE_UNLOAD is not set 147# CONFIG_MODULE_FORCE_UNLOAD is not set
140CONFIG_MODVERSIONS=y 148CONFIG_MODVERSIONS=y
@@ -194,11 +202,11 @@ CONFIG_PPC_PASEMI=y
194CONFIG_PPC_PASEMI_IOMMU=y 202CONFIG_PPC_PASEMI_IOMMU=y
195# CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE is not set 203# CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE is not set
196CONFIG_PPC_PASEMI_MDIO=y 204CONFIG_PPC_PASEMI_MDIO=y
197CONFIG_PPC_CELLEB=y
198# CONFIG_PPC_PS3 is not set 205# CONFIG_PPC_PS3 is not set
199CONFIG_PPC_CELL=y 206CONFIG_PPC_CELL=y
200CONFIG_PPC_CELL_NATIVE=y 207CONFIG_PPC_CELL_NATIVE=y
201CONFIG_PPC_IBM_CELL_BLADE=y 208CONFIG_PPC_IBM_CELL_BLADE=y
209CONFIG_PPC_CELLEB=y
202 210
203# 211#
204# Cell Broadband Engine options 212# Cell Broadband Engine options
@@ -241,6 +249,7 @@ CONFIG_CPU_FREQ_TABLE=y
241CONFIG_CPU_FREQ_STAT=y 249CONFIG_CPU_FREQ_STAT=y
242# CONFIG_CPU_FREQ_STAT_DETAILS is not set 250# CONFIG_CPU_FREQ_STAT_DETAILS is not set
243CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y 251CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
252# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
244# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set 253# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
245# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set 254# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
246# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set 255# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
@@ -277,7 +286,6 @@ CONFIG_PREEMPT_NONE=y
277CONFIG_BINFMT_ELF=y 286CONFIG_BINFMT_ELF=y
278CONFIG_COMPAT_BINFMT_ELF=y 287CONFIG_COMPAT_BINFMT_ELF=y
279CONFIG_BINFMT_MISC=m 288CONFIG_BINFMT_MISC=m
280CONFIG_FORCE_MAX_ZONEORDER=13
281CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y 289CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y
282CONFIG_IOMMU_VMERGE=y 290CONFIG_IOMMU_VMERGE=y
283CONFIG_IOMMU_HELPER=y 291CONFIG_IOMMU_HELPER=y
@@ -307,6 +315,7 @@ CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
307CONFIG_SPARSEMEM_VMEMMAP=y 315CONFIG_SPARSEMEM_VMEMMAP=y
308CONFIG_MEMORY_HOTPLUG=y 316CONFIG_MEMORY_HOTPLUG=y
309CONFIG_MEMORY_HOTPLUG_SPARSE=y 317CONFIG_MEMORY_HOTPLUG_SPARSE=y
318CONFIG_PAGEFLAGS_EXTENDED=y
310CONFIG_SPLIT_PTLOCK_CPUS=4 319CONFIG_SPLIT_PTLOCK_CPUS=4
311CONFIG_RESOURCES_64BIT=y 320CONFIG_RESOURCES_64BIT=y
312CONFIG_ZONE_DMA_FLAG=1 321CONFIG_ZONE_DMA_FLAG=1
@@ -314,6 +323,7 @@ CONFIG_BOUNCE=y
314CONFIG_ARCH_MEMORY_PROBE=y 323CONFIG_ARCH_MEMORY_PROBE=y
315CONFIG_PPC_HAS_HASH_64K=y 324CONFIG_PPC_HAS_HASH_64K=y
316# CONFIG_PPC_64K_PAGES is not set 325# CONFIG_PPC_64K_PAGES is not set
326CONFIG_FORCE_MAX_ZONEORDER=13
317# CONFIG_SCHED_SMT is not set 327# CONFIG_SCHED_SMT is not set
318CONFIG_PROC_DEVICETREE=y 328CONFIG_PROC_DEVICETREE=y
319# CONFIG_CMDLINE_BOOL is not set 329# CONFIG_CMDLINE_BOOL is not set
@@ -356,7 +366,10 @@ CONFIG_HOTPLUG_PCI=m
356# CONFIG_HOTPLUG_PCI_SHPC is not set 366# CONFIG_HOTPLUG_PCI_SHPC is not set
357CONFIG_HOTPLUG_PCI_RPA=m 367CONFIG_HOTPLUG_PCI_RPA=m
358CONFIG_HOTPLUG_PCI_RPA_DLPAR=m 368CONFIG_HOTPLUG_PCI_RPA_DLPAR=m
369# CONFIG_HAS_RAPIDIO is not set
370CONFIG_PAGE_OFFSET=0xc000000000000000
359CONFIG_KERNEL_START=0xc000000000000000 371CONFIG_KERNEL_START=0xc000000000000000
372CONFIG_PHYSICAL_START=0x00000000
360 373
361# 374#
362# Networking 375# Networking
@@ -406,8 +419,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
406# CONFIG_TCP_MD5SIG is not set 419# CONFIG_TCP_MD5SIG is not set
407# CONFIG_IP_VS is not set 420# CONFIG_IP_VS is not set
408# CONFIG_IPV6 is not set 421# CONFIG_IPV6 is not set
409# CONFIG_INET6_XFRM_TUNNEL is not set
410# CONFIG_INET6_TUNNEL is not set
411# CONFIG_NETWORK_SECMARK is not set 422# CONFIG_NETWORK_SECMARK is not set
412CONFIG_NETFILTER=y 423CONFIG_NETFILTER=y
413# CONFIG_NETFILTER_DEBUG is not set 424# CONFIG_NETFILTER_DEBUG is not set
@@ -423,6 +434,7 @@ CONFIG_NF_CONNTRACK=m
423CONFIG_NF_CT_ACCT=y 434CONFIG_NF_CT_ACCT=y
424CONFIG_NF_CONNTRACK_MARK=y 435CONFIG_NF_CONNTRACK_MARK=y
425CONFIG_NF_CONNTRACK_EVENTS=y 436CONFIG_NF_CONNTRACK_EVENTS=y
437# CONFIG_NF_CT_PROTO_DCCP is not set
426CONFIG_NF_CT_PROTO_GRE=m 438CONFIG_NF_CT_PROTO_GRE=m
427CONFIG_NF_CT_PROTO_SCTP=m 439CONFIG_NF_CT_PROTO_SCTP=m
428# CONFIG_NF_CT_PROTO_UDPLITE is not set 440# CONFIG_NF_CT_PROTO_UDPLITE is not set
@@ -501,6 +513,7 @@ CONFIG_IP_NF_TARGET_REDIRECT=m
501CONFIG_IP_NF_TARGET_NETMAP=m 513CONFIG_IP_NF_TARGET_NETMAP=m
502CONFIG_NF_NAT_SNMP_BASIC=m 514CONFIG_NF_NAT_SNMP_BASIC=m
503CONFIG_NF_NAT_PROTO_GRE=m 515CONFIG_NF_NAT_PROTO_GRE=m
516CONFIG_NF_NAT_PROTO_SCTP=m
504CONFIG_NF_NAT_FTP=m 517CONFIG_NF_NAT_FTP=m
505CONFIG_NF_NAT_IRC=m 518CONFIG_NF_NAT_IRC=m
506CONFIG_NF_NAT_TFTP=m 519CONFIG_NF_NAT_TFTP=m
@@ -571,6 +584,7 @@ CONFIG_FW_LOADER=y
571# CONFIG_CONNECTOR is not set 584# CONFIG_CONNECTOR is not set
572# CONFIG_MTD is not set 585# CONFIG_MTD is not set
573CONFIG_OF_DEVICE=y 586CONFIG_OF_DEVICE=y
587CONFIG_OF_I2C=y
574# CONFIG_PARPORT is not set 588# CONFIG_PARPORT is not set
575CONFIG_BLK_DEV=y 589CONFIG_BLK_DEV=y
576CONFIG_BLK_DEV_FD=y 590CONFIG_BLK_DEV_FD=y
@@ -618,7 +632,6 @@ CONFIG_IDE_PROC_FS=y
618# 632#
619# IDE chipset support/bugfixes 633# IDE chipset support/bugfixes
620# 634#
621CONFIG_IDE_GENERIC=y
622# CONFIG_BLK_DEV_PLATFORM is not set 635# CONFIG_BLK_DEV_PLATFORM is not set
623CONFIG_BLK_DEV_IDEDMA_SFF=y 636CONFIG_BLK_DEV_IDEDMA_SFF=y
624 637
@@ -661,7 +674,7 @@ CONFIG_BLK_DEV_IDE_PMAC=y
661CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y 674CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
662CONFIG_BLK_DEV_IDEDMA_PMAC=y 675CONFIG_BLK_DEV_IDEDMA_PMAC=y
663CONFIG_BLK_DEV_IDEDMA=y 676CONFIG_BLK_DEV_IDEDMA=y
664CONFIG_IDE_ARCH_OBSOLETE_INIT=y 677# CONFIG_BLK_DEV_HD_ONLY is not set
665# CONFIG_BLK_DEV_HD is not set 678# CONFIG_BLK_DEV_HD is not set
666 679
667# 680#
@@ -747,17 +760,19 @@ CONFIG_SCSI_DEBUG=m
747# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set 760# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
748CONFIG_ATA=y 761CONFIG_ATA=y
749CONFIG_ATA_NONSTANDARD=y 762CONFIG_ATA_NONSTANDARD=y
763CONFIG_SATA_PMP=y
750# CONFIG_SATA_AHCI is not set 764# CONFIG_SATA_AHCI is not set
765CONFIG_SATA_SIL24=y
766CONFIG_ATA_SFF=y
751CONFIG_SATA_SVW=y 767CONFIG_SATA_SVW=y
752# CONFIG_ATA_PIIX is not set 768# CONFIG_ATA_PIIX is not set
753CONFIG_SATA_MV=y 769# CONFIG_SATA_MV is not set
754# CONFIG_SATA_NV is not set 770# CONFIG_SATA_NV is not set
755# CONFIG_PDC_ADMA is not set 771# CONFIG_PDC_ADMA is not set
756# CONFIG_SATA_QSTOR is not set 772# CONFIG_SATA_QSTOR is not set
757# CONFIG_SATA_PROMISE is not set 773# CONFIG_SATA_PROMISE is not set
758# CONFIG_SATA_SX4 is not set 774# CONFIG_SATA_SX4 is not set
759# CONFIG_SATA_SIL is not set 775# CONFIG_SATA_SIL is not set
760CONFIG_SATA_SIL24=y
761# CONFIG_SATA_SIS is not set 776# CONFIG_SATA_SIS is not set
762# CONFIG_SATA_ULI is not set 777# CONFIG_SATA_ULI is not set
763# CONFIG_SATA_VIA is not set 778# CONFIG_SATA_VIA is not set
@@ -791,7 +806,7 @@ CONFIG_SATA_SIL24=y
791# CONFIG_PATA_NS87415 is not set 806# CONFIG_PATA_NS87415 is not set
792# CONFIG_PATA_OPTI is not set 807# CONFIG_PATA_OPTI is not set
793# CONFIG_PATA_OPTIDMA is not set 808# CONFIG_PATA_OPTIDMA is not set
794CONFIG_PATA_PCMCIA=y 809# CONFIG_PATA_PCMCIA is not set
795# CONFIG_PATA_PDC_OLD is not set 810# CONFIG_PATA_PDC_OLD is not set
796# CONFIG_PATA_RADISYS is not set 811# CONFIG_PATA_RADISYS is not set
797# CONFIG_PATA_RZ1000 is not set 812# CONFIG_PATA_RZ1000 is not set
@@ -801,10 +816,10 @@ CONFIG_PATA_PCMCIA=y
801# CONFIG_PATA_SIL680 is not set 816# CONFIG_PATA_SIL680 is not set
802# CONFIG_PATA_SIS is not set 817# CONFIG_PATA_SIS is not set
803# CONFIG_PATA_VIA is not set 818# CONFIG_PATA_VIA is not set
804CONFIG_PATA_WINBOND=y 819# CONFIG_PATA_WINBOND is not set
805CONFIG_PATA_PLATFORM=y 820# CONFIG_PATA_PLATFORM is not set
806# CONFIG_PATA_OF_PLATFORM is not set 821# CONFIG_PATA_SCC is not set
807CONFIG_PATA_SCC=y 822# CONFIG_PATA_SCH is not set
808CONFIG_MD=y 823CONFIG_MD=y
809CONFIG_BLK_DEV_MD=y 824CONFIG_BLK_DEV_MD=y
810CONFIG_MD_LINEAR=y 825CONFIG_MD_LINEAR=y
@@ -866,6 +881,7 @@ CONFIG_WINDFARM=y
866CONFIG_WINDFARM_PM81=y 881CONFIG_WINDFARM_PM81=y
867CONFIG_WINDFARM_PM91=y 882CONFIG_WINDFARM_PM91=y
868CONFIG_WINDFARM_PM112=y 883CONFIG_WINDFARM_PM112=y
884CONFIG_WINDFARM_PM121=y
869# CONFIG_PMAC_RACKMETER is not set 885# CONFIG_PMAC_RACKMETER is not set
870CONFIG_NETDEVICES=y 886CONFIG_NETDEVICES=y
871# CONFIG_NETDEVICES_MULTIQUEUE is not set 887# CONFIG_NETDEVICES_MULTIQUEUE is not set
@@ -911,7 +927,6 @@ CONFIG_IBM_NEW_EMAC_TAH=y
911CONFIG_IBM_NEW_EMAC_EMAC4=y 927CONFIG_IBM_NEW_EMAC_EMAC4=y
912CONFIG_NET_PCI=y 928CONFIG_NET_PCI=y
913CONFIG_PCNET32=y 929CONFIG_PCNET32=y
914# CONFIG_PCNET32_NAPI is not set
915# CONFIG_AMD8111_ETH is not set 930# CONFIG_AMD8111_ETH is not set
916# CONFIG_ADAPTEC_STARFIRE is not set 931# CONFIG_ADAPTEC_STARFIRE is not set
917# CONFIG_B44 is not set 932# CONFIG_B44 is not set
@@ -947,7 +962,6 @@ CONFIG_E1000=y
947# CONFIG_SIS190 is not set 962# CONFIG_SIS190 is not set
948# CONFIG_SKGE is not set 963# CONFIG_SKGE is not set
949# CONFIG_SKY2 is not set 964# CONFIG_SKY2 is not set
950# CONFIG_SK98LIN is not set
951# CONFIG_VIA_VELOCITY is not set 965# CONFIG_VIA_VELOCITY is not set
952CONFIG_TIGON3=y 966CONFIG_TIGON3=y
953# CONFIG_BNX2 is not set 967# CONFIG_BNX2 is not set
@@ -969,6 +983,7 @@ CONFIG_PASEMI_MAC=y
969# CONFIG_MLX4_CORE is not set 983# CONFIG_MLX4_CORE is not set
970# CONFIG_TEHUTI is not set 984# CONFIG_TEHUTI is not set
971# CONFIG_BNX2X is not set 985# CONFIG_BNX2X is not set
986# CONFIG_SFC is not set
972CONFIG_TR=y 987CONFIG_TR=y
973CONFIG_IBMOL=y 988CONFIG_IBMOL=y
974# CONFIG_3C359 is not set 989# CONFIG_3C359 is not set
@@ -979,6 +994,7 @@ CONFIG_IBMOL=y
979# 994#
980# CONFIG_WLAN_PRE80211 is not set 995# CONFIG_WLAN_PRE80211 is not set
981# CONFIG_WLAN_80211 is not set 996# CONFIG_WLAN_80211 is not set
997# CONFIG_IWLWIFI_LEDS is not set
982 998
983# 999#
984# USB Network Adapters 1000# USB Network Adapters
@@ -1083,6 +1099,7 @@ CONFIG_VT=y
1083CONFIG_VT_CONSOLE=y 1099CONFIG_VT_CONSOLE=y
1084CONFIG_HW_CONSOLE=y 1100CONFIG_HW_CONSOLE=y
1085# CONFIG_VT_HW_CONSOLE_BINDING is not set 1101# CONFIG_VT_HW_CONSOLE_BINDING is not set
1102CONFIG_DEVKMEM=y
1086# CONFIG_SERIAL_NONSTANDARD is not set 1103# CONFIG_SERIAL_NONSTANDARD is not set
1087# CONFIG_NOZOMI is not set 1104# CONFIG_NOZOMI is not set
1088 1105
@@ -1121,8 +1138,6 @@ CONFIG_HVC_BEAT=y
1121CONFIG_HVCS=m 1138CONFIG_HVCS=m
1122# CONFIG_IPMI_HANDLER is not set 1139# CONFIG_IPMI_HANDLER is not set
1123# CONFIG_HW_RANDOM is not set 1140# CONFIG_HW_RANDOM is not set
1124CONFIG_GEN_RTC=y
1125# CONFIG_GEN_RTC_X is not set
1126# CONFIG_R3964 is not set 1141# CONFIG_R3964 is not set
1127# CONFIG_APPLICOM is not set 1142# CONFIG_APPLICOM is not set
1128 1143
@@ -1141,13 +1156,7 @@ CONFIG_DEVPORT=y
1141CONFIG_I2C=y 1156CONFIG_I2C=y
1142CONFIG_I2C_BOARDINFO=y 1157CONFIG_I2C_BOARDINFO=y
1143CONFIG_I2C_CHARDEV=y 1158CONFIG_I2C_CHARDEV=y
1144
1145#
1146# I2C Algorithms
1147#
1148CONFIG_I2C_ALGOBIT=y 1159CONFIG_I2C_ALGOBIT=y
1149# CONFIG_I2C_ALGOPCF is not set
1150# CONFIG_I2C_ALGOPCA is not set
1151 1160
1152# 1161#
1153# I2C Hardware Bus support 1162# I2C Hardware Bus support
@@ -1177,6 +1186,7 @@ CONFIG_I2C_PASEMI=y
1177# CONFIG_I2C_VIA is not set 1186# CONFIG_I2C_VIA is not set
1178# CONFIG_I2C_VIAPRO is not set 1187# CONFIG_I2C_VIAPRO is not set
1179# CONFIG_I2C_VOODOO3 is not set 1188# CONFIG_I2C_VOODOO3 is not set
1189# CONFIG_I2C_PCA_PLATFORM is not set
1180 1190
1181# 1191#
1182# Miscellaneous I2C Chip support 1192# Miscellaneous I2C Chip support
@@ -1186,19 +1196,13 @@ CONFIG_I2C_PASEMI=y
1186# CONFIG_SENSORS_PCF8574 is not set 1196# CONFIG_SENSORS_PCF8574 is not set
1187# CONFIG_PCF8575 is not set 1197# CONFIG_PCF8575 is not set
1188# CONFIG_SENSORS_PCF8591 is not set 1198# CONFIG_SENSORS_PCF8591 is not set
1189# CONFIG_TPS65010 is not set
1190# CONFIG_SENSORS_MAX6875 is not set 1199# CONFIG_SENSORS_MAX6875 is not set
1191# CONFIG_SENSORS_TSL2550 is not set 1200# CONFIG_SENSORS_TSL2550 is not set
1192# CONFIG_I2C_DEBUG_CORE is not set 1201# CONFIG_I2C_DEBUG_CORE is not set
1193# CONFIG_I2C_DEBUG_ALGO is not set 1202# CONFIG_I2C_DEBUG_ALGO is not set
1194# CONFIG_I2C_DEBUG_BUS is not set 1203# CONFIG_I2C_DEBUG_BUS is not set
1195# CONFIG_I2C_DEBUG_CHIP is not set 1204# CONFIG_I2C_DEBUG_CHIP is not set
1196
1197#
1198# SPI support
1199#
1200# CONFIG_SPI is not set 1205# CONFIG_SPI is not set
1201# CONFIG_SPI_MASTER is not set
1202# CONFIG_W1 is not set 1206# CONFIG_W1 is not set
1203# CONFIG_POWER_SUPPLY is not set 1207# CONFIG_POWER_SUPPLY is not set
1204# CONFIG_HWMON is not set 1208# CONFIG_HWMON is not set
@@ -1215,12 +1219,22 @@ CONFIG_SSB_POSSIBLE=y
1215# Multifunction device drivers 1219# Multifunction device drivers
1216# 1220#
1217# CONFIG_MFD_SM501 is not set 1221# CONFIG_MFD_SM501 is not set
1222# CONFIG_HTC_PASIC3 is not set
1218 1223
1219# 1224#
1220# Multimedia devices 1225# Multimedia devices
1221# 1226#
1227
1228#
1229# Multimedia core support
1230#
1222# CONFIG_VIDEO_DEV is not set 1231# CONFIG_VIDEO_DEV is not set
1223# CONFIG_DVB_CORE is not set 1232# CONFIG_DVB_CORE is not set
1233# CONFIG_VIDEO_MEDIA is not set
1234
1235#
1236# Multimedia drivers
1237#
1224# CONFIG_DAB is not set 1238# CONFIG_DAB is not set
1225 1239
1226# 1240#
@@ -1240,8 +1254,8 @@ CONFIG_FB_CFB_IMAGEBLIT=y
1240# CONFIG_FB_SYS_FILLRECT is not set 1254# CONFIG_FB_SYS_FILLRECT is not set
1241# CONFIG_FB_SYS_COPYAREA is not set 1255# CONFIG_FB_SYS_COPYAREA is not set
1242# CONFIG_FB_SYS_IMAGEBLIT is not set 1256# CONFIG_FB_SYS_IMAGEBLIT is not set
1257# CONFIG_FB_FOREIGN_ENDIAN is not set
1243# CONFIG_FB_SYS_FOPS is not set 1258# CONFIG_FB_SYS_FOPS is not set
1244CONFIG_FB_DEFERRED_IO=y
1245# CONFIG_FB_SVGALIB is not set 1259# CONFIG_FB_SVGALIB is not set
1246CONFIG_FB_MACMODES=y 1260CONFIG_FB_MACMODES=y
1247CONFIG_FB_BACKLIGHT=y 1261CONFIG_FB_BACKLIGHT=y
@@ -1363,6 +1377,7 @@ CONFIG_SND_VERBOSE_PROCFS=y
1363# CONFIG_SND_AU8810 is not set 1377# CONFIG_SND_AU8810 is not set
1364# CONFIG_SND_AU8820 is not set 1378# CONFIG_SND_AU8820 is not set
1365# CONFIG_SND_AU8830 is not set 1379# CONFIG_SND_AU8830 is not set
1380# CONFIG_SND_AW2 is not set
1366# CONFIG_SND_AZT3328 is not set 1381# CONFIG_SND_AZT3328 is not set
1367# CONFIG_SND_BT87X is not set 1382# CONFIG_SND_BT87X is not set
1368# CONFIG_SND_CA0106 is not set 1383# CONFIG_SND_CA0106 is not set
@@ -1455,11 +1470,11 @@ CONFIG_SND_AOA_SOUNDBUS_I2S=m
1455# CONFIG_SND_SOC is not set 1470# CONFIG_SND_SOC is not set
1456 1471
1457# 1472#
1458# SoC Audio support for SuperH 1473# ALSA SoC audio for Freescale SOCs
1459# 1474#
1460 1475
1461# 1476#
1462# ALSA SoC audio for Freescale SOCs 1477# SoC Audio for the Texas Instruments OMAP
1463# 1478#
1464 1479
1465# 1480#
@@ -1497,12 +1512,14 @@ CONFIG_USB_DEVICE_CLASS=y
1497# 1512#
1498# USB Host Controller Drivers 1513# USB Host Controller Drivers
1499# 1514#
1515# CONFIG_USB_C67X00_HCD is not set
1500CONFIG_USB_EHCI_HCD=y 1516CONFIG_USB_EHCI_HCD=y
1501# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1517# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1502CONFIG_USB_EHCI_TT_NEWSCHED=y 1518CONFIG_USB_EHCI_TT_NEWSCHED=y
1503CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y 1519CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y
1504# CONFIG_USB_EHCI_HCD_PPC_OF is not set 1520# CONFIG_USB_EHCI_HCD_PPC_OF is not set
1505# CONFIG_USB_ISP116X_HCD is not set 1521# CONFIG_USB_ISP116X_HCD is not set
1522# CONFIG_USB_ISP1760_HCD is not set
1506CONFIG_USB_OHCI_HCD=y 1523CONFIG_USB_OHCI_HCD=y
1507# CONFIG_USB_OHCI_HCD_PPC_OF is not set 1524# CONFIG_USB_OHCI_HCD_PPC_OF is not set
1508# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1525# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
@@ -1517,6 +1534,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1517# 1534#
1518# CONFIG_USB_ACM is not set 1535# CONFIG_USB_ACM is not set
1519# CONFIG_USB_PRINTER is not set 1536# CONFIG_USB_PRINTER is not set
1537# CONFIG_USB_WDM is not set
1520 1538
1521# 1539#
1522# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 1540# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -1538,6 +1556,7 @@ CONFIG_USB_STORAGE=m
1538# CONFIG_USB_STORAGE_ALAUDA is not set 1556# CONFIG_USB_STORAGE_ALAUDA is not set
1539# CONFIG_USB_STORAGE_ONETOUCH is not set 1557# CONFIG_USB_STORAGE_ONETOUCH is not set
1540# CONFIG_USB_STORAGE_KARMA is not set 1558# CONFIG_USB_STORAGE_KARMA is not set
1559# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1541# CONFIG_USB_LIBUSUAL is not set 1560# CONFIG_USB_LIBUSUAL is not set
1542 1561
1543# 1562#
@@ -1575,10 +1594,12 @@ CONFIG_USB_APPLEDISPLAY=m
1575# CONFIG_USB_TRANCEVIBRATOR is not set 1594# CONFIG_USB_TRANCEVIBRATOR is not set
1576# CONFIG_USB_IOWARRIOR is not set 1595# CONFIG_USB_IOWARRIOR is not set
1577# CONFIG_USB_TEST is not set 1596# CONFIG_USB_TEST is not set
1597# CONFIG_USB_ISIGHTFW is not set
1578# CONFIG_USB_GADGET is not set 1598# CONFIG_USB_GADGET is not set
1579# CONFIG_MMC is not set 1599# CONFIG_MMC is not set
1580# CONFIG_MEMSTICK is not set 1600# CONFIG_MEMSTICK is not set
1581# CONFIG_NEW_LEDS is not set 1601# CONFIG_NEW_LEDS is not set
1602# CONFIG_ACCESSIBILITY is not set
1582CONFIG_INFINIBAND=m 1603CONFIG_INFINIBAND=m
1583# CONFIG_INFINIBAND_USER_MAD is not set 1604# CONFIG_INFINIBAND_USER_MAD is not set
1584# CONFIG_INFINIBAND_USER_ACCESS is not set 1605# CONFIG_INFINIBAND_USER_ACCESS is not set
@@ -1607,10 +1628,6 @@ CONFIG_EDAC_PASEMI=y
1607# CONFIG_EDAC_CELL is not set 1628# CONFIG_EDAC_CELL is not set
1608CONFIG_RTC_LIB=y 1629CONFIG_RTC_LIB=y
1609CONFIG_RTC_CLASS=y 1630CONFIG_RTC_CLASS=y
1610
1611#
1612# Conflicting RTC option has been selected, check GEN_RTC and RTC
1613#
1614CONFIG_RTC_HCTOSYS=y 1631CONFIG_RTC_HCTOSYS=y
1615CONFIG_RTC_HCTOSYS_DEVICE="rtc0" 1632CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1616# CONFIG_RTC_DEBUG is not set 1633# CONFIG_RTC_DEBUG is not set
@@ -1638,6 +1655,7 @@ CONFIG_RTC_DRV_DS1307=y
1638# CONFIG_RTC_DRV_PCF8583 is not set 1655# CONFIG_RTC_DRV_PCF8583 is not set
1639# CONFIG_RTC_DRV_M41T80 is not set 1656# CONFIG_RTC_DRV_M41T80 is not set
1640# CONFIG_RTC_DRV_S35390A is not set 1657# CONFIG_RTC_DRV_S35390A is not set
1658# CONFIG_RTC_DRV_FM3130 is not set
1641 1659
1642# 1660#
1643# SPI RTC drivers 1661# SPI RTC drivers
@@ -1658,11 +1676,8 @@ CONFIG_RTC_DRV_DS1307=y
1658# 1676#
1659# on-CPU RTC drivers 1677# on-CPU RTC drivers
1660# 1678#
1679CONFIG_RTC_DRV_PPC=y
1661# CONFIG_DMADEVICES is not set 1680# CONFIG_DMADEVICES is not set
1662
1663#
1664# Userspace I/O
1665#
1666# CONFIG_UIO is not set 1681# CONFIG_UIO is not set
1667 1682
1668# 1683#
@@ -1696,9 +1711,9 @@ CONFIG_JFS_SECURITY=y
1696CONFIG_FS_POSIX_ACL=y 1711CONFIG_FS_POSIX_ACL=y
1697CONFIG_XFS_FS=m 1712CONFIG_XFS_FS=m
1698# CONFIG_XFS_QUOTA is not set 1713# CONFIG_XFS_QUOTA is not set
1699CONFIG_XFS_SECURITY=y
1700CONFIG_XFS_POSIX_ACL=y 1714CONFIG_XFS_POSIX_ACL=y
1701# CONFIG_XFS_RT is not set 1715# CONFIG_XFS_RT is not set
1716# CONFIG_XFS_DEBUG is not set
1702# CONFIG_GFS2_FS is not set 1717# CONFIG_GFS2_FS is not set
1703# CONFIG_OCFS2_FS is not set 1718# CONFIG_OCFS2_FS is not set
1704CONFIG_DNOTIFY=y 1719CONFIG_DNOTIFY=y
@@ -1764,13 +1779,11 @@ CONFIG_NFS_FS=y
1764CONFIG_NFS_V3=y 1779CONFIG_NFS_V3=y
1765CONFIG_NFS_V3_ACL=y 1780CONFIG_NFS_V3_ACL=y
1766CONFIG_NFS_V4=y 1781CONFIG_NFS_V4=y
1767# CONFIG_NFS_DIRECTIO is not set
1768CONFIG_NFSD=m 1782CONFIG_NFSD=m
1769CONFIG_NFSD_V2_ACL=y 1783CONFIG_NFSD_V2_ACL=y
1770CONFIG_NFSD_V3=y 1784CONFIG_NFSD_V3=y
1771CONFIG_NFSD_V3_ACL=y 1785CONFIG_NFSD_V3_ACL=y
1772CONFIG_NFSD_V4=y 1786CONFIG_NFSD_V4=y
1773CONFIG_NFSD_TCP=y
1774CONFIG_ROOT_NFS=y 1787CONFIG_ROOT_NFS=y
1775CONFIG_LOCKD=y 1788CONFIG_LOCKD=y
1776CONFIG_LOCKD_V4=y 1789CONFIG_LOCKD_V4=y
@@ -1862,9 +1875,10 @@ CONFIG_NLS_UTF8=m
1862# Library routines 1875# Library routines
1863# 1876#
1864CONFIG_BITREVERSE=y 1877CONFIG_BITREVERSE=y
1878# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1865CONFIG_CRC_CCITT=m 1879CONFIG_CRC_CCITT=m
1866# CONFIG_CRC16 is not set 1880# CONFIG_CRC16 is not set
1867# CONFIG_CRC_ITU_T is not set 1881CONFIG_CRC_ITU_T=m
1868CONFIG_CRC32=y 1882CONFIG_CRC32=y
1869# CONFIG_CRC7 is not set 1883# CONFIG_CRC7 is not set
1870CONFIG_LIBCRC32C=m 1884CONFIG_LIBCRC32C=m
@@ -1888,6 +1902,7 @@ CONFIG_HAVE_LMB=y
1888# CONFIG_PRINTK_TIME is not set 1902# CONFIG_PRINTK_TIME is not set
1889CONFIG_ENABLE_WARN_DEPRECATED=y 1903CONFIG_ENABLE_WARN_DEPRECATED=y
1890CONFIG_ENABLE_MUST_CHECK=y 1904CONFIG_ENABLE_MUST_CHECK=y
1905CONFIG_FRAME_WARN=2048
1891CONFIG_MAGIC_SYSRQ=y 1906CONFIG_MAGIC_SYSRQ=y
1892# CONFIG_UNUSED_SYMBOLS is not set 1907# CONFIG_UNUSED_SYMBOLS is not set
1893CONFIG_DEBUG_FS=y 1908CONFIG_DEBUG_FS=y
@@ -1898,18 +1913,23 @@ CONFIG_DETECT_SOFTLOCKUP=y
1898CONFIG_SCHED_DEBUG=y 1913CONFIG_SCHED_DEBUG=y
1899# CONFIG_SCHEDSTATS is not set 1914# CONFIG_SCHEDSTATS is not set
1900# CONFIG_TIMER_STATS is not set 1915# CONFIG_TIMER_STATS is not set
1916# CONFIG_DEBUG_OBJECTS is not set
1901# CONFIG_SLUB_DEBUG_ON is not set 1917# CONFIG_SLUB_DEBUG_ON is not set
1902# CONFIG_SLUB_STATS is not set 1918# CONFIG_SLUB_STATS is not set
1903# CONFIG_DEBUG_RT_MUTEXES is not set 1919# CONFIG_DEBUG_RT_MUTEXES is not set
1904# CONFIG_RT_MUTEX_TESTER is not set 1920# CONFIG_RT_MUTEX_TESTER is not set
1905# CONFIG_DEBUG_SPINLOCK is not set 1921# CONFIG_DEBUG_SPINLOCK is not set
1906CONFIG_DEBUG_MUTEXES=y 1922CONFIG_DEBUG_MUTEXES=y
1923# CONFIG_DEBUG_LOCK_ALLOC is not set
1924# CONFIG_PROVE_LOCKING is not set
1925# CONFIG_LOCK_STAT is not set
1907# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1926# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1908# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1927# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1909# CONFIG_DEBUG_KOBJECT is not set 1928# CONFIG_DEBUG_KOBJECT is not set
1910CONFIG_DEBUG_BUGVERBOSE=y 1929CONFIG_DEBUG_BUGVERBOSE=y
1911# CONFIG_DEBUG_INFO is not set 1930# CONFIG_DEBUG_INFO is not set
1912# CONFIG_DEBUG_VM is not set 1931# CONFIG_DEBUG_VM is not set
1932# CONFIG_DEBUG_WRITECOUNT is not set
1913# CONFIG_DEBUG_LIST is not set 1933# CONFIG_DEBUG_LIST is not set
1914# CONFIG_DEBUG_SG is not set 1934# CONFIG_DEBUG_SG is not set
1915# CONFIG_BOOT_PRINTK_DELAY is not set 1935# CONFIG_BOOT_PRINTK_DELAY is not set
@@ -1941,53 +1961,83 @@ CONFIG_ASYNC_CORE=y
1941CONFIG_ASYNC_MEMCPY=y 1961CONFIG_ASYNC_MEMCPY=y
1942CONFIG_ASYNC_XOR=y 1962CONFIG_ASYNC_XOR=y
1943CONFIG_CRYPTO=y 1963CONFIG_CRYPTO=y
1964
1965#
1966# Crypto core or helper
1967#
1944CONFIG_CRYPTO_ALGAPI=y 1968CONFIG_CRYPTO_ALGAPI=y
1945CONFIG_CRYPTO_AEAD=m 1969CONFIG_CRYPTO_AEAD=m
1946CONFIG_CRYPTO_BLKCIPHER=y 1970CONFIG_CRYPTO_BLKCIPHER=y
1947CONFIG_CRYPTO_SEQIV=m
1948CONFIG_CRYPTO_HASH=y 1971CONFIG_CRYPTO_HASH=y
1949CONFIG_CRYPTO_MANAGER=y 1972CONFIG_CRYPTO_MANAGER=y
1973CONFIG_CRYPTO_GF128MUL=m
1974CONFIG_CRYPTO_NULL=m
1975# CONFIG_CRYPTO_CRYPTD is not set
1976CONFIG_CRYPTO_AUTHENC=m
1977CONFIG_CRYPTO_TEST=m
1978
1979#
1980# Authenticated Encryption with Associated Data
1981#
1982CONFIG_CRYPTO_CCM=m
1983CONFIG_CRYPTO_GCM=m
1984CONFIG_CRYPTO_SEQIV=m
1985
1986#
1987# Block modes
1988#
1989CONFIG_CRYPTO_CBC=y
1990CONFIG_CRYPTO_CTR=m
1991# CONFIG_CRYPTO_CTS is not set
1992CONFIG_CRYPTO_ECB=m
1993# CONFIG_CRYPTO_LRW is not set
1994CONFIG_CRYPTO_PCBC=m
1995# CONFIG_CRYPTO_XTS is not set
1996
1997#
1998# Hash modes
1999#
1950CONFIG_CRYPTO_HMAC=y 2000CONFIG_CRYPTO_HMAC=y
1951# CONFIG_CRYPTO_XCBC is not set 2001# CONFIG_CRYPTO_XCBC is not set
1952CONFIG_CRYPTO_NULL=m 2002
2003#
2004# Digest
2005#
2006CONFIG_CRYPTO_CRC32C=m
1953CONFIG_CRYPTO_MD4=m 2007CONFIG_CRYPTO_MD4=m
1954CONFIG_CRYPTO_MD5=y 2008CONFIG_CRYPTO_MD5=y
2009CONFIG_CRYPTO_MICHAEL_MIC=m
1955CONFIG_CRYPTO_SHA1=m 2010CONFIG_CRYPTO_SHA1=m
1956CONFIG_CRYPTO_SHA256=m 2011CONFIG_CRYPTO_SHA256=m
1957CONFIG_CRYPTO_SHA512=m 2012CONFIG_CRYPTO_SHA512=m
1958CONFIG_CRYPTO_WP512=m
1959CONFIG_CRYPTO_TGR192=m 2013CONFIG_CRYPTO_TGR192=m
1960CONFIG_CRYPTO_GF128MUL=m 2014CONFIG_CRYPTO_WP512=m
1961CONFIG_CRYPTO_ECB=m 2015
1962CONFIG_CRYPTO_CBC=y 2016#
1963CONFIG_CRYPTO_PCBC=m 2017# Ciphers
1964# CONFIG_CRYPTO_LRW is not set 2018#
1965# CONFIG_CRYPTO_XTS is not set
1966CONFIG_CRYPTO_CTR=m
1967CONFIG_CRYPTO_GCM=m
1968CONFIG_CRYPTO_CCM=m
1969# CONFIG_CRYPTO_CRYPTD is not set
1970CONFIG_CRYPTO_DES=y
1971# CONFIG_CRYPTO_FCRYPT is not set
1972CONFIG_CRYPTO_BLOWFISH=m
1973CONFIG_CRYPTO_TWOFISH=m
1974CONFIG_CRYPTO_TWOFISH_COMMON=m
1975CONFIG_CRYPTO_SERPENT=m
1976CONFIG_CRYPTO_AES=m 2019CONFIG_CRYPTO_AES=m
2020CONFIG_CRYPTO_ANUBIS=m
2021CONFIG_CRYPTO_ARC4=m
2022CONFIG_CRYPTO_BLOWFISH=m
2023# CONFIG_CRYPTO_CAMELLIA is not set
1977CONFIG_CRYPTO_CAST5=m 2024CONFIG_CRYPTO_CAST5=m
1978CONFIG_CRYPTO_CAST6=m 2025CONFIG_CRYPTO_CAST6=m
1979CONFIG_CRYPTO_TEA=m 2026CONFIG_CRYPTO_DES=y
1980CONFIG_CRYPTO_ARC4=m 2027# CONFIG_CRYPTO_FCRYPT is not set
1981CONFIG_CRYPTO_KHAZAD=m 2028CONFIG_CRYPTO_KHAZAD=m
1982CONFIG_CRYPTO_ANUBIS=m
1983# CONFIG_CRYPTO_SEED is not set
1984CONFIG_CRYPTO_SALSA20=m 2029CONFIG_CRYPTO_SALSA20=m
2030# CONFIG_CRYPTO_SEED is not set
2031CONFIG_CRYPTO_SERPENT=m
2032CONFIG_CRYPTO_TEA=m
2033CONFIG_CRYPTO_TWOFISH=m
2034CONFIG_CRYPTO_TWOFISH_COMMON=m
2035
2036#
2037# Compression
2038#
1985CONFIG_CRYPTO_DEFLATE=m 2039CONFIG_CRYPTO_DEFLATE=m
1986CONFIG_CRYPTO_MICHAEL_MIC=m
1987CONFIG_CRYPTO_CRC32C=m
1988# CONFIG_CRYPTO_CAMELLIA is not set
1989CONFIG_CRYPTO_TEST=m
1990CONFIG_CRYPTO_AUTHENC=m
1991CONFIG_CRYPTO_LZO=m 2040CONFIG_CRYPTO_LZO=m
1992# CONFIG_CRYPTO_HW is not set 2041# CONFIG_CRYPTO_HW is not set
1993# CONFIG_PPC_CLOCK is not set 2042# CONFIG_PPC_CLOCK is not set
2043# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/pq2fads_defconfig b/arch/powerpc/configs/pq2fads_defconfig
index 1383eb696a20..bc3bf62ddc2f 100644
--- a/arch/powerpc/configs/pq2fads_defconfig
+++ b/arch/powerpc/configs/pq2fads_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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 24 08:48:36 2008 4# Mon Jun 9 08:52:18 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -30,6 +30,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
30CONFIG_GENERIC_HARDIRQS=y 30CONFIG_GENERIC_HARDIRQS=y
31# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 31# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
32CONFIG_IRQ_PER_CPU=y 32CONFIG_IRQ_PER_CPU=y
33CONFIG_STACKTRACE_SUPPORT=y
34CONFIG_LOCKDEP_SUPPORT=y
33CONFIG_RWSEM_XCHGADD_ALGORITHM=y 35CONFIG_RWSEM_XCHGADD_ALGORITHM=y
34CONFIG_ARCH_HAS_ILOG2_U32=y 36CONFIG_ARCH_HAS_ILOG2_U32=y
35CONFIG_GENERIC_HWEIGHT=y 37CONFIG_GENERIC_HWEIGHT=y
@@ -70,19 +72,17 @@ CONFIG_IKCONFIG=y
70CONFIG_IKCONFIG_PROC=y 72CONFIG_IKCONFIG_PROC=y
71CONFIG_LOG_BUF_SHIFT=14 73CONFIG_LOG_BUF_SHIFT=14
72# CONFIG_CGROUPS is not set 74# CONFIG_CGROUPS is not set
73CONFIG_GROUP_SCHED=y
74# CONFIG_FAIR_GROUP_SCHED is not set
75CONFIG_USER_SCHED=y
76# CONFIG_CGROUP_SCHED is not set
77CONFIG_SYSFS_DEPRECATED=y 75CONFIG_SYSFS_DEPRECATED=y
78CONFIG_SYSFS_DEPRECATED_V2=y 76CONFIG_SYSFS_DEPRECATED_V2=y
79# CONFIG_RELAY is not set 77# CONFIG_RELAY is not set
80# CONFIG_NAMESPACES is not set 78# CONFIG_NAMESPACES is not set
81CONFIG_BLK_DEV_INITRD=y 79CONFIG_BLK_DEV_INITRD=y
82CONFIG_INITRAMFS_SOURCE="" 80CONFIG_INITRAMFS_SOURCE=""
81CONFIG_CC_OPTIMIZE_FOR_SIZE=y
83CONFIG_SYSCTL=y 82CONFIG_SYSCTL=y
84CONFIG_EMBEDDED=y 83CONFIG_EMBEDDED=y
85CONFIG_SYSCTL_SYSCALL=y 84CONFIG_SYSCTL_SYSCALL=y
85CONFIG_SYSCTL_SYSCALL_CHECK=y
86CONFIG_KALLSYMS=y 86CONFIG_KALLSYMS=y
87CONFIG_KALLSYMS_ALL=y 87CONFIG_KALLSYMS_ALL=y
88# CONFIG_KALLSYMS_EXTRA_PASS is not set 88# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -109,6 +109,7 @@ CONFIG_SLUB=y
109CONFIG_HAVE_OPROFILE=y 109CONFIG_HAVE_OPROFILE=y
110CONFIG_HAVE_KPROBES=y 110CONFIG_HAVE_KPROBES=y
111CONFIG_HAVE_KRETPROBES=y 111CONFIG_HAVE_KRETPROBES=y
112# CONFIG_HAVE_DMA_ATTRS is not set
112CONFIG_PROC_PAGE_MONITOR=y 113CONFIG_PROC_PAGE_MONITOR=y
113CONFIG_SLABINFO=y 114CONFIG_SLABINFO=y
114CONFIG_RT_MUTEXES=y 115CONFIG_RT_MUTEXES=y
@@ -196,11 +197,13 @@ CONFIG_FLATMEM=y
196CONFIG_FLAT_NODE_MEM_MAP=y 197CONFIG_FLAT_NODE_MEM_MAP=y
197# CONFIG_SPARSEMEM_STATIC is not set 198# CONFIG_SPARSEMEM_STATIC is not set
198# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 199# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
200CONFIG_PAGEFLAGS_EXTENDED=y
199CONFIG_SPLIT_PTLOCK_CPUS=4 201CONFIG_SPLIT_PTLOCK_CPUS=4
200# CONFIG_RESOURCES_64BIT is not set 202# CONFIG_RESOURCES_64BIT is not set
201CONFIG_ZONE_DMA_FLAG=1 203CONFIG_ZONE_DMA_FLAG=1
202CONFIG_BOUNCE=y 204CONFIG_BOUNCE=y
203CONFIG_VIRT_TO_BUS=y 205CONFIG_VIRT_TO_BUS=y
206CONFIG_FORCE_MAX_ZONEORDER=11
204CONFIG_PROC_DEVICETREE=y 207CONFIG_PROC_DEVICETREE=y
205# CONFIG_CMDLINE_BOOL is not set 208# CONFIG_CMDLINE_BOOL is not set
206# CONFIG_PM is not set 209# CONFIG_PM is not set
@@ -225,6 +228,7 @@ CONFIG_PCI_LEGACY=y
225# CONFIG_PCI_DEBUG is not set 228# CONFIG_PCI_DEBUG is not set
226# CONFIG_PCCARD is not set 229# CONFIG_PCCARD is not set
227# CONFIG_HOTPLUG_PCI is not set 230# CONFIG_HOTPLUG_PCI is not set
231# CONFIG_HAS_RAPIDIO is not set
228 232
229# 233#
230# Advanced setup 234# Advanced setup
@@ -234,11 +238,11 @@ CONFIG_PCI_LEGACY=y
234# 238#
235# Default settings for advanced configuration options are used 239# Default settings for advanced configuration options are used
236# 240#
237CONFIG_HIGHMEM_START=0xfe000000
238CONFIG_LOWMEM_SIZE=0x30000000 241CONFIG_LOWMEM_SIZE=0x30000000
242CONFIG_PAGE_OFFSET=0xc0000000
239CONFIG_KERNEL_START=0xc0000000 243CONFIG_KERNEL_START=0xc0000000
244CONFIG_PHYSICAL_START=0x00000000
240CONFIG_TASK_SIZE=0xc0000000 245CONFIG_TASK_SIZE=0xc0000000
241CONFIG_BOOT_LOAD=0x00400000
242 246
243# 247#
244# Networking 248# Networking
@@ -293,6 +297,7 @@ CONFIG_INET6_XFRM_MODE_TRANSPORT=y
293CONFIG_INET6_XFRM_MODE_TUNNEL=y 297CONFIG_INET6_XFRM_MODE_TUNNEL=y
294CONFIG_INET6_XFRM_MODE_BEET=y 298CONFIG_INET6_XFRM_MODE_BEET=y
295CONFIG_IPV6_SIT=y 299CONFIG_IPV6_SIT=y
300CONFIG_IPV6_NDISC_NODETYPE=y
296# CONFIG_IPV6_TUNNEL is not set 301# CONFIG_IPV6_TUNNEL is not set
297# CONFIG_NETWORK_SECMARK is not set 302# CONFIG_NETWORK_SECMARK is not set
298CONFIG_NETFILTER=y 303CONFIG_NETFILTER=y
@@ -513,7 +518,7 @@ CONFIG_IDE_PROC_FS=y
513# CONFIG_BLK_DEV_VIA82CXXX is not set 518# CONFIG_BLK_DEV_VIA82CXXX is not set
514# CONFIG_BLK_DEV_TC86C001 is not set 519# CONFIG_BLK_DEV_TC86C001 is not set
515# CONFIG_BLK_DEV_IDEDMA is not set 520# CONFIG_BLK_DEV_IDEDMA is not set
516CONFIG_IDE_ARCH_OBSOLETE_INIT=y 521# CONFIG_BLK_DEV_HD_ONLY is not set
517# CONFIG_BLK_DEV_HD is not set 522# CONFIG_BLK_DEV_HD is not set
518 523
519# 524#
@@ -593,7 +598,6 @@ CONFIG_NETDEV_1000=y
593# CONFIG_SIS190 is not set 598# CONFIG_SIS190 is not set
594# CONFIG_SKGE is not set 599# CONFIG_SKGE is not set
595# CONFIG_SKY2 is not set 600# CONFIG_SKY2 is not set
596# CONFIG_SK98LIN is not set
597# CONFIG_VIA_VELOCITY is not set 601# CONFIG_VIA_VELOCITY is not set
598# CONFIG_TIGON3 is not set 602# CONFIG_TIGON3 is not set
599# CONFIG_BNX2 is not set 603# CONFIG_BNX2 is not set
@@ -611,6 +615,7 @@ CONFIG_NETDEV_10000=y
611# CONFIG_MLX4_CORE is not set 615# CONFIG_MLX4_CORE is not set
612# CONFIG_TEHUTI is not set 616# CONFIG_TEHUTI is not set
613# CONFIG_BNX2X is not set 617# CONFIG_BNX2X is not set
618# CONFIG_SFC is not set
614# CONFIG_TR is not set 619# CONFIG_TR is not set
615 620
616# 621#
@@ -618,6 +623,7 @@ CONFIG_NETDEV_10000=y
618# 623#
619# CONFIG_WLAN_PRE80211 is not set 624# CONFIG_WLAN_PRE80211 is not set
620# CONFIG_WLAN_80211 is not set 625# CONFIG_WLAN_80211 is not set
626# CONFIG_IWLWIFI_LEDS is not set
621# CONFIG_WAN is not set 627# CONFIG_WAN is not set
622# CONFIG_FDDI is not set 628# CONFIG_FDDI is not set
623CONFIG_PPP=y 629CONFIG_PPP=y
@@ -692,6 +698,7 @@ CONFIG_SERIO_LIBPS2=y
692# Character devices 698# Character devices
693# 699#
694# CONFIG_VT is not set 700# CONFIG_VT is not set
701CONFIG_DEVKMEM=y
695# CONFIG_SERIAL_NONSTANDARD is not set 702# CONFIG_SERIAL_NONSTANDARD is not set
696 703
697# 704#
@@ -726,12 +733,7 @@ CONFIG_HW_RANDOM=y
726# CONFIG_RAW_DRIVER is not set 733# CONFIG_RAW_DRIVER is not set
727CONFIG_DEVPORT=y 734CONFIG_DEVPORT=y
728# CONFIG_I2C is not set 735# CONFIG_I2C is not set
729
730#
731# SPI support
732#
733# CONFIG_SPI is not set 736# CONFIG_SPI is not set
734# CONFIG_SPI_MASTER is not set
735# CONFIG_W1 is not set 737# CONFIG_W1 is not set
736# CONFIG_POWER_SUPPLY is not set 738# CONFIG_POWER_SUPPLY is not set
737# CONFIG_HWMON is not set 739# CONFIG_HWMON is not set
@@ -748,12 +750,22 @@ CONFIG_SSB_POSSIBLE=y
748# Multifunction device drivers 750# Multifunction device drivers
749# 751#
750# CONFIG_MFD_SM501 is not set 752# CONFIG_MFD_SM501 is not set
753# CONFIG_HTC_PASIC3 is not set
751 754
752# 755#
753# Multimedia devices 756# Multimedia devices
754# 757#
758
759#
760# Multimedia core support
761#
755# CONFIG_VIDEO_DEV is not set 762# CONFIG_VIDEO_DEV is not set
756# CONFIG_DVB_CORE is not set 763# CONFIG_DVB_CORE is not set
764# CONFIG_VIDEO_MEDIA is not set
765
766#
767# Multimedia drivers
768#
757CONFIG_DAB=y 769CONFIG_DAB=y
758 770
759# 771#
@@ -781,11 +793,14 @@ CONFIG_USB_ARCH_HAS_HCD=y
781CONFIG_USB_ARCH_HAS_OHCI=y 793CONFIG_USB_ARCH_HAS_OHCI=y
782CONFIG_USB_ARCH_HAS_EHCI=y 794CONFIG_USB_ARCH_HAS_EHCI=y
783# CONFIG_USB is not set 795# CONFIG_USB is not set
796# CONFIG_USB_OTG_WHITELIST is not set
797# CONFIG_USB_OTG_BLACKLIST_HUB is not set
784 798
785# 799#
786# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 800# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
787# 801#
788CONFIG_USB_GADGET=y 802CONFIG_USB_GADGET=y
803# CONFIG_USB_GADGET_DEBUG is not set
789# CONFIG_USB_GADGET_DEBUG_FILES is not set 804# CONFIG_USB_GADGET_DEBUG_FILES is not set
790CONFIG_USB_GADGET_SELECTED=y 805CONFIG_USB_GADGET_SELECTED=y
791# CONFIG_USB_GADGET_AMD5536UDC is not set 806# CONFIG_USB_GADGET_AMD5536UDC is not set
@@ -795,6 +810,7 @@ CONFIG_USB_GADGET_SELECTED=y
795# CONFIG_USB_GADGET_PXA2XX is not set 810# CONFIG_USB_GADGET_PXA2XX is not set
796CONFIG_USB_GADGET_M66592=y 811CONFIG_USB_GADGET_M66592=y
797CONFIG_USB_M66592=y 812CONFIG_USB_M66592=y
813# CONFIG_USB_GADGET_PXA27X is not set
798# CONFIG_USB_GADGET_GOKU is not set 814# CONFIG_USB_GADGET_GOKU is not set
799# CONFIG_USB_GADGET_LH7A40X is not set 815# CONFIG_USB_GADGET_LH7A40X is not set
800# CONFIG_USB_GADGET_OMAP is not set 816# CONFIG_USB_GADGET_OMAP is not set
@@ -804,6 +820,7 @@ CONFIG_USB_M66592=y
804CONFIG_USB_GADGET_DUALSPEED=y 820CONFIG_USB_GADGET_DUALSPEED=y
805# CONFIG_USB_ZERO is not set 821# CONFIG_USB_ZERO is not set
806CONFIG_USB_ETH=y 822CONFIG_USB_ETH=y
823CONFIG_USB_ETH_RNDIS=y
807# CONFIG_USB_GADGETFS is not set 824# CONFIG_USB_GADGETFS is not set
808# CONFIG_USB_FILE_STORAGE is not set 825# CONFIG_USB_FILE_STORAGE is not set
809# CONFIG_USB_G_SERIAL is not set 826# CONFIG_USB_G_SERIAL is not set
@@ -812,13 +829,10 @@ CONFIG_USB_ETH=y
812# CONFIG_MMC is not set 829# CONFIG_MMC is not set
813# CONFIG_MEMSTICK is not set 830# CONFIG_MEMSTICK is not set
814# CONFIG_NEW_LEDS is not set 831# CONFIG_NEW_LEDS is not set
832# CONFIG_ACCESSIBILITY is not set
815# CONFIG_INFINIBAND is not set 833# CONFIG_INFINIBAND is not set
816# CONFIG_RTC_CLASS is not set 834# CONFIG_RTC_CLASS is not set
817# CONFIG_DMADEVICES is not set 835# CONFIG_DMADEVICES is not set
818
819#
820# Userspace I/O
821#
822# CONFIG_UIO is not set 836# CONFIG_UIO is not set
823 837
824# 838#
@@ -888,7 +902,6 @@ CONFIG_NETWORK_FILESYSTEMS=y
888CONFIG_NFS_FS=y 902CONFIG_NFS_FS=y
889CONFIG_NFS_V3=y 903CONFIG_NFS_V3=y
890CONFIG_NFS_V3_ACL=y 904CONFIG_NFS_V3_ACL=y
891# CONFIG_NFS_DIRECTIO is not set
892# CONFIG_NFSD is not set 905# CONFIG_NFSD is not set
893CONFIG_ROOT_NFS=y 906CONFIG_ROOT_NFS=y
894CONFIG_LOCKD=y 907CONFIG_LOCKD=y
@@ -967,6 +980,7 @@ CONFIG_NLS_UTF8=y
967# Library routines 980# Library routines
968# 981#
969CONFIG_BITREVERSE=y 982CONFIG_BITREVERSE=y
983# CONFIG_GENERIC_FIND_FIRST_BIT is not set
970CONFIG_CRC_CCITT=y 984CONFIG_CRC_CCITT=y
971# CONFIG_CRC16 is not set 985# CONFIG_CRC16 is not set
972# CONFIG_CRC_ITU_T is not set 986# CONFIG_CRC_ITU_T is not set
@@ -979,6 +993,7 @@ CONFIG_PLIST=y
979CONFIG_HAS_IOMEM=y 993CONFIG_HAS_IOMEM=y
980CONFIG_HAS_IOPORT=y 994CONFIG_HAS_IOPORT=y
981CONFIG_HAS_DMA=y 995CONFIG_HAS_DMA=y
996CONFIG_HAVE_LMB=y
982 997
983# 998#
984# Kernel hacking 999# Kernel hacking
@@ -986,6 +1001,7 @@ CONFIG_HAS_DMA=y
986# CONFIG_PRINTK_TIME is not set 1001# CONFIG_PRINTK_TIME is not set
987CONFIG_ENABLE_WARN_DEPRECATED=y 1002CONFIG_ENABLE_WARN_DEPRECATED=y
988CONFIG_ENABLE_MUST_CHECK=y 1003CONFIG_ENABLE_MUST_CHECK=y
1004CONFIG_FRAME_WARN=1024
989CONFIG_MAGIC_SYSRQ=y 1005CONFIG_MAGIC_SYSRQ=y
990# CONFIG_UNUSED_SYMBOLS is not set 1006# CONFIG_UNUSED_SYMBOLS is not set
991# CONFIG_DEBUG_FS is not set 1007# CONFIG_DEBUG_FS is not set
@@ -996,6 +1012,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
996# CONFIG_SCHED_DEBUG is not set 1012# CONFIG_SCHED_DEBUG is not set
997# CONFIG_SCHEDSTATS is not set 1013# CONFIG_SCHEDSTATS is not set
998# CONFIG_TIMER_STATS is not set 1014# CONFIG_TIMER_STATS is not set
1015# CONFIG_DEBUG_OBJECTS is not set
999# CONFIG_SLUB_DEBUG_ON is not set 1016# CONFIG_SLUB_DEBUG_ON is not set
1000# CONFIG_SLUB_STATS is not set 1017# CONFIG_SLUB_STATS is not set
1001# CONFIG_DEBUG_RT_MUTEXES is not set 1018# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -1008,6 +1025,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
1008CONFIG_DEBUG_BUGVERBOSE=y 1025CONFIG_DEBUG_BUGVERBOSE=y
1009CONFIG_DEBUG_INFO=y 1026CONFIG_DEBUG_INFO=y
1010# CONFIG_DEBUG_VM is not set 1027# CONFIG_DEBUG_VM is not set
1028# CONFIG_DEBUG_WRITECOUNT is not set
1011# CONFIG_DEBUG_LIST is not set 1029# CONFIG_DEBUG_LIST is not set
1012# CONFIG_DEBUG_SG is not set 1030# CONFIG_DEBUG_SG is not set
1013# CONFIG_BOOT_PRINTK_DELAY is not set 1031# CONFIG_BOOT_PRINTK_DELAY is not set
@@ -1019,6 +1037,7 @@ CONFIG_DEBUG_INFO=y
1019# CONFIG_DEBUG_PAGEALLOC is not set 1037# CONFIG_DEBUG_PAGEALLOC is not set
1020# CONFIG_DEBUGGER is not set 1038# CONFIG_DEBUGGER is not set
1021# CONFIG_KGDB_CONSOLE is not set 1039# CONFIG_KGDB_CONSOLE is not set
1040# CONFIG_IRQSTACKS is not set
1022CONFIG_BDI_SWITCH=y 1041CONFIG_BDI_SWITCH=y
1023# CONFIG_PPC_EARLY_DEBUG is not set 1042# CONFIG_PPC_EARLY_DEBUG is not set
1024 1043
@@ -1028,46 +1047,76 @@ CONFIG_BDI_SWITCH=y
1028# CONFIG_KEYS is not set 1047# CONFIG_KEYS is not set
1029# CONFIG_SECURITY is not set 1048# CONFIG_SECURITY is not set
1030CONFIG_CRYPTO=y 1049CONFIG_CRYPTO=y
1050
1051#
1052# Crypto core or helper
1053#
1031CONFIG_CRYPTO_ALGAPI=y 1054CONFIG_CRYPTO_ALGAPI=y
1032CONFIG_CRYPTO_BLKCIPHER=y 1055CONFIG_CRYPTO_BLKCIPHER=y
1033# CONFIG_CRYPTO_SEQIV is not set
1034CONFIG_CRYPTO_MANAGER=y 1056CONFIG_CRYPTO_MANAGER=y
1035# CONFIG_CRYPTO_HMAC is not set
1036# CONFIG_CRYPTO_NULL is not set 1057# CONFIG_CRYPTO_NULL is not set
1058# CONFIG_CRYPTO_CRYPTD is not set
1059# CONFIG_CRYPTO_AUTHENC is not set
1060
1061#
1062# Authenticated Encryption with Associated Data
1063#
1064# CONFIG_CRYPTO_CCM is not set
1065# CONFIG_CRYPTO_GCM is not set
1066# CONFIG_CRYPTO_SEQIV is not set
1067
1068#
1069# Block modes
1070#
1071CONFIG_CRYPTO_CBC=y
1072# CONFIG_CRYPTO_CTR is not set
1073# CONFIG_CRYPTO_CTS is not set
1074CONFIG_CRYPTO_ECB=y
1075CONFIG_CRYPTO_PCBC=y
1076
1077#
1078# Hash modes
1079#
1080# CONFIG_CRYPTO_HMAC is not set
1081
1082#
1083# Digest
1084#
1085# CONFIG_CRYPTO_CRC32C is not set
1037# CONFIG_CRYPTO_MD4 is not set 1086# CONFIG_CRYPTO_MD4 is not set
1038CONFIG_CRYPTO_MD5=y 1087CONFIG_CRYPTO_MD5=y
1088# CONFIG_CRYPTO_MICHAEL_MIC is not set
1039# CONFIG_CRYPTO_SHA1 is not set 1089# CONFIG_CRYPTO_SHA1 is not set
1040# CONFIG_CRYPTO_SHA256 is not set 1090# CONFIG_CRYPTO_SHA256 is not set
1041# CONFIG_CRYPTO_SHA512 is not set 1091# CONFIG_CRYPTO_SHA512 is not set
1042# CONFIG_CRYPTO_WP512 is not set
1043# CONFIG_CRYPTO_TGR192 is not set 1092# CONFIG_CRYPTO_TGR192 is not set
1044CONFIG_CRYPTO_ECB=y 1093# CONFIG_CRYPTO_WP512 is not set
1045CONFIG_CRYPTO_CBC=y 1094
1046CONFIG_CRYPTO_PCBC=y 1095#
1047# CONFIG_CRYPTO_CTR is not set 1096# Ciphers
1048# CONFIG_CRYPTO_GCM is not set 1097#
1049# CONFIG_CRYPTO_CCM is not set
1050# CONFIG_CRYPTO_CRYPTD is not set
1051CONFIG_CRYPTO_DES=y
1052# CONFIG_CRYPTO_FCRYPT is not set
1053# CONFIG_CRYPTO_BLOWFISH is not set
1054# CONFIG_CRYPTO_TWOFISH is not set
1055# CONFIG_CRYPTO_SERPENT is not set
1056# CONFIG_CRYPTO_AES is not set 1098# CONFIG_CRYPTO_AES is not set
1099# CONFIG_CRYPTO_ANUBIS is not set
1100# CONFIG_CRYPTO_ARC4 is not set
1101# CONFIG_CRYPTO_BLOWFISH is not set
1102# CONFIG_CRYPTO_CAMELLIA is not set
1057# CONFIG_CRYPTO_CAST5 is not set 1103# CONFIG_CRYPTO_CAST5 is not set
1058# CONFIG_CRYPTO_CAST6 is not set 1104# CONFIG_CRYPTO_CAST6 is not set
1059# CONFIG_CRYPTO_TEA is not set 1105CONFIG_CRYPTO_DES=y
1060# CONFIG_CRYPTO_ARC4 is not set 1106# CONFIG_CRYPTO_FCRYPT is not set
1061# CONFIG_CRYPTO_KHAZAD is not set 1107# CONFIG_CRYPTO_KHAZAD is not set
1062# CONFIG_CRYPTO_ANUBIS is not set
1063# CONFIG_CRYPTO_SEED is not set 1108# CONFIG_CRYPTO_SEED is not set
1109# CONFIG_CRYPTO_SERPENT is not set
1110# CONFIG_CRYPTO_TEA is not set
1111# CONFIG_CRYPTO_TWOFISH is not set
1112
1113#
1114# Compression
1115#
1064# CONFIG_CRYPTO_DEFLATE is not set 1116# CONFIG_CRYPTO_DEFLATE is not set
1065# CONFIG_CRYPTO_MICHAEL_MIC is not set
1066# CONFIG_CRYPTO_CRC32C is not set
1067# CONFIG_CRYPTO_CAMELLIA is not set
1068# CONFIG_CRYPTO_AUTHENC is not set
1069# CONFIG_CRYPTO_LZO is not set 1117# CONFIG_CRYPTO_LZO is not set
1070CONFIG_CRYPTO_HW=y 1118CONFIG_CRYPTO_HW=y
1071# CONFIG_CRYPTO_DEV_HIFN_795X is not set 1119# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1072# CONFIG_PPC_CLOCK is not set 1120# CONFIG_PPC_CLOCK is not set
1073CONFIG_PPC_LIB_RHEAP=y 1121CONFIG_PPC_LIB_RHEAP=y
1122# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/prpmc2800_defconfig b/arch/powerpc/configs/prpmc2800_defconfig
index f9121685f11a..c6b83577c055 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.25-rc7 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 31 11:37:15 2008 4# Mon Jun 9 08:52:18 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -33,6 +33,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
33CONFIG_GENERIC_HARDIRQS=y 33CONFIG_GENERIC_HARDIRQS=y
34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
35CONFIG_IRQ_PER_CPU=y 35CONFIG_IRQ_PER_CPU=y
36CONFIG_STACKTRACE_SUPPORT=y
37CONFIG_LOCKDEP_SUPPORT=y
36CONFIG_RWSEM_XCHGADD_ALGORITHM=y 38CONFIG_RWSEM_XCHGADD_ALGORITHM=y
37CONFIG_ARCH_HAS_ILOG2_U32=y 39CONFIG_ARCH_HAS_ILOG2_U32=y
38CONFIG_GENERIC_HWEIGHT=y 40CONFIG_GENERIC_HWEIGHT=y
@@ -92,6 +94,7 @@ CONFIG_INITRAMFS_SOURCE=""
92CONFIG_SYSCTL=y 94CONFIG_SYSCTL=y
93# CONFIG_EMBEDDED is not set 95# CONFIG_EMBEDDED is not set
94CONFIG_SYSCTL_SYSCALL=y 96CONFIG_SYSCTL_SYSCALL=y
97CONFIG_SYSCTL_SYSCALL_CHECK=y
95CONFIG_KALLSYMS=y 98CONFIG_KALLSYMS=y
96# CONFIG_KALLSYMS_EXTRA_PASS is not set 99# CONFIG_KALLSYMS_EXTRA_PASS is not set
97CONFIG_HOTPLUG=y 100CONFIG_HOTPLUG=y
@@ -117,6 +120,7 @@ CONFIG_SLUB=y
117CONFIG_HAVE_OPROFILE=y 120CONFIG_HAVE_OPROFILE=y
118CONFIG_HAVE_KPROBES=y 121CONFIG_HAVE_KPROBES=y
119CONFIG_HAVE_KRETPROBES=y 122CONFIG_HAVE_KRETPROBES=y
123# CONFIG_HAVE_DMA_ATTRS is not set
120CONFIG_PROC_PAGE_MONITOR=y 124CONFIG_PROC_PAGE_MONITOR=y
121CONFIG_SLABINFO=y 125CONFIG_SLABINFO=y
122CONFIG_RT_MUTEXES=y 126CONFIG_RT_MUTEXES=y
@@ -215,11 +219,13 @@ CONFIG_FLATMEM=y
215CONFIG_FLAT_NODE_MEM_MAP=y 219CONFIG_FLAT_NODE_MEM_MAP=y
216# CONFIG_SPARSEMEM_STATIC is not set 220# CONFIG_SPARSEMEM_STATIC is not set
217# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 221# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
222CONFIG_PAGEFLAGS_EXTENDED=y
218CONFIG_SPLIT_PTLOCK_CPUS=4 223CONFIG_SPLIT_PTLOCK_CPUS=4
219# CONFIG_RESOURCES_64BIT is not set 224# CONFIG_RESOURCES_64BIT is not set
220CONFIG_ZONE_DMA_FLAG=1 225CONFIG_ZONE_DMA_FLAG=1
221CONFIG_BOUNCE=y 226CONFIG_BOUNCE=y
222CONFIG_VIRT_TO_BUS=y 227CONFIG_VIRT_TO_BUS=y
228CONFIG_FORCE_MAX_ZONEORDER=11
223CONFIG_PROC_DEVICETREE=y 229CONFIG_PROC_DEVICETREE=y
224# CONFIG_CMDLINE_BOOL is not set 230# CONFIG_CMDLINE_BOOL is not set
225# CONFIG_PM is not set 231# CONFIG_PM is not set
@@ -241,6 +247,7 @@ CONFIG_ARCH_SUPPORTS_MSI=y
241CONFIG_PCI_LEGACY=y 247CONFIG_PCI_LEGACY=y
242# CONFIG_PCCARD is not set 248# CONFIG_PCCARD is not set
243# CONFIG_HOTPLUG_PCI is not set 249# CONFIG_HOTPLUG_PCI is not set
250# CONFIG_HAS_RAPIDIO is not set
244 251
245# 252#
246# Advanced setup 253# Advanced setup
@@ -250,13 +257,13 @@ CONFIG_PCI_LEGACY=y
250# 257#
251# Default settings for advanced configuration options are used 258# Default settings for advanced configuration options are used
252# 259#
253CONFIG_HIGHMEM_START=0xfe000000
254CONFIG_LOWMEM_SIZE=0x30000000 260CONFIG_LOWMEM_SIZE=0x30000000
261CONFIG_PAGE_OFFSET=0xc0000000
255CONFIG_KERNEL_START=0xc0000000 262CONFIG_KERNEL_START=0xc0000000
263CONFIG_PHYSICAL_START=0x00000000
256CONFIG_TASK_SIZE=0xc0000000 264CONFIG_TASK_SIZE=0xc0000000
257CONFIG_CONSISTENT_START=0xff100000 265CONFIG_CONSISTENT_START=0xff100000
258CONFIG_CONSISTENT_SIZE=0x00200000 266CONFIG_CONSISTENT_SIZE=0x00200000
259CONFIG_BOOT_LOAD=0x00800000
260 267
261# 268#
262# Networking 269# Networking
@@ -304,8 +311,6 @@ CONFIG_TCP_CONG_CUBIC=y
304CONFIG_DEFAULT_TCP_CONG="cubic" 311CONFIG_DEFAULT_TCP_CONG="cubic"
305# CONFIG_TCP_MD5SIG is not set 312# CONFIG_TCP_MD5SIG is not set
306# CONFIG_IPV6 is not set 313# CONFIG_IPV6 is not set
307# CONFIG_INET6_XFRM_TUNNEL is not set
308# CONFIG_INET6_TUNNEL is not set
309# CONFIG_NETWORK_SECMARK is not set 314# CONFIG_NETWORK_SECMARK is not set
310# CONFIG_NETFILTER is not set 315# CONFIG_NETFILTER is not set
311# CONFIG_IP_DCCP is not set 316# CONFIG_IP_DCCP is not set
@@ -364,6 +369,7 @@ CONFIG_MTD_PARTITIONS=y
364# CONFIG_MTD_REDBOOT_PARTS is not set 369# CONFIG_MTD_REDBOOT_PARTS is not set
365# CONFIG_MTD_CMDLINE_PARTS is not set 370# CONFIG_MTD_CMDLINE_PARTS is not set
366# CONFIG_MTD_OF_PARTS is not set 371# CONFIG_MTD_OF_PARTS is not set
372# CONFIG_MTD_AR7_PARTS is not set
367 373
368# 374#
369# User Modules And Translation Layers 375# User Modules And Translation Layers
@@ -435,6 +441,7 @@ CONFIG_MTD_PHYSMAP_OF=y
435# 441#
436# CONFIG_MTD_UBI is not set 442# CONFIG_MTD_UBI is not set
437CONFIG_OF_DEVICE=y 443CONFIG_OF_DEVICE=y
444CONFIG_OF_I2C=y
438# CONFIG_PARPORT is not set 445# CONFIG_PARPORT is not set
439CONFIG_BLK_DEV=y 446CONFIG_BLK_DEV=y
440# CONFIG_BLK_DEV_FD is not set 447# CONFIG_BLK_DEV_FD is not set
@@ -519,7 +526,7 @@ CONFIG_BLK_DEV_PDC202XX_NEW=y
519# CONFIG_BLK_DEV_VIA82CXXX is not set 526# CONFIG_BLK_DEV_VIA82CXXX is not set
520# CONFIG_BLK_DEV_TC86C001 is not set 527# CONFIG_BLK_DEV_TC86C001 is not set
521CONFIG_BLK_DEV_IDEDMA=y 528CONFIG_BLK_DEV_IDEDMA=y
522CONFIG_IDE_ARCH_OBSOLETE_INIT=y 529# CONFIG_BLK_DEV_HD_ONLY is not set
523# CONFIG_BLK_DEV_HD is not set 530# CONFIG_BLK_DEV_HD is not set
524 531
525# 532#
@@ -598,7 +605,10 @@ CONFIG_SCSI_LOWLEVEL=y
598# CONFIG_SCSI_SRP is not set 605# CONFIG_SCSI_SRP is not set
599CONFIG_ATA=y 606CONFIG_ATA=y
600# CONFIG_ATA_NONSTANDARD is not set 607# CONFIG_ATA_NONSTANDARD is not set
608CONFIG_SATA_PMP=y
601# CONFIG_SATA_AHCI is not set 609# CONFIG_SATA_AHCI is not set
610# CONFIG_SATA_SIL24 is not set
611CONFIG_ATA_SFF=y
602# CONFIG_SATA_SVW is not set 612# CONFIG_SATA_SVW is not set
603# CONFIG_ATA_PIIX is not set 613# CONFIG_ATA_PIIX is not set
604CONFIG_SATA_MV=y 614CONFIG_SATA_MV=y
@@ -608,7 +618,6 @@ CONFIG_SATA_MV=y
608# CONFIG_SATA_PROMISE is not set 618# CONFIG_SATA_PROMISE is not set
609# CONFIG_SATA_SX4 is not set 619# CONFIG_SATA_SX4 is not set
610# CONFIG_SATA_SIL is not set 620# CONFIG_SATA_SIL is not set
611# CONFIG_SATA_SIL24 is not set
612# CONFIG_SATA_SIS is not set 621# CONFIG_SATA_SIS is not set
613# CONFIG_SATA_ULI is not set 622# CONFIG_SATA_ULI is not set
614# CONFIG_SATA_VIA is not set 623# CONFIG_SATA_VIA is not set
@@ -653,6 +662,7 @@ CONFIG_SATA_MV=y
653# CONFIG_PATA_VIA is not set 662# CONFIG_PATA_VIA is not set
654# CONFIG_PATA_WINBOND is not set 663# CONFIG_PATA_WINBOND is not set
655# CONFIG_PATA_PLATFORM is not set 664# CONFIG_PATA_PLATFORM is not set
665# CONFIG_PATA_SCH is not set
656# CONFIG_MD is not set 666# CONFIG_MD is not set
657# CONFIG_FUSION is not set 667# CONFIG_FUSION is not set
658 668
@@ -744,7 +754,6 @@ CONFIG_E1000=y
744# CONFIG_SIS190 is not set 754# CONFIG_SIS190 is not set
745# CONFIG_SKGE is not set 755# CONFIG_SKGE is not set
746# CONFIG_SKY2 is not set 756# CONFIG_SKY2 is not set
747# CONFIG_SK98LIN is not set
748# CONFIG_VIA_VELOCITY is not set 757# CONFIG_VIA_VELOCITY is not set
749# CONFIG_TIGON3 is not set 758# CONFIG_TIGON3 is not set
750# CONFIG_BNX2 is not set 759# CONFIG_BNX2 is not set
@@ -763,6 +772,7 @@ CONFIG_NETDEV_10000=y
763# CONFIG_MLX4_CORE is not set 772# CONFIG_MLX4_CORE is not set
764# CONFIG_TEHUTI is not set 773# CONFIG_TEHUTI is not set
765# CONFIG_BNX2X is not set 774# CONFIG_BNX2X is not set
775# CONFIG_SFC is not set
766# CONFIG_TR is not set 776# CONFIG_TR is not set
767 777
768# 778#
@@ -770,6 +780,7 @@ CONFIG_NETDEV_10000=y
770# 780#
771# CONFIG_WLAN_PRE80211 is not set 781# CONFIG_WLAN_PRE80211 is not set
772# CONFIG_WLAN_80211 is not set 782# CONFIG_WLAN_80211 is not set
783# CONFIG_IWLWIFI_LEDS is not set
773 784
774# 785#
775# USB Network Adapters 786# USB Network Adapters
@@ -832,6 +843,7 @@ CONFIG_VT=y
832CONFIG_VT_CONSOLE=y 843CONFIG_VT_CONSOLE=y
833CONFIG_HW_CONSOLE=y 844CONFIG_HW_CONSOLE=y
834# CONFIG_VT_HW_CONSOLE_BINDING is not set 845# CONFIG_VT_HW_CONSOLE_BINDING is not set
846CONFIG_DEVKMEM=y
835# CONFIG_SERIAL_NONSTANDARD is not set 847# CONFIG_SERIAL_NONSTANDARD is not set
836# CONFIG_NOZOMI is not set 848# CONFIG_NOZOMI is not set
837 849
@@ -855,7 +867,6 @@ CONFIG_LEGACY_PTY_COUNT=256
855# CONFIG_IPMI_HANDLER is not set 867# CONFIG_IPMI_HANDLER is not set
856# CONFIG_HW_RANDOM is not set 868# CONFIG_HW_RANDOM is not set
857# CONFIG_NVRAM is not set 869# CONFIG_NVRAM is not set
858# CONFIG_GEN_RTC is not set
859# CONFIG_R3964 is not set 870# CONFIG_R3964 is not set
860# CONFIG_APPLICOM is not set 871# CONFIG_APPLICOM is not set
861# CONFIG_RAW_DRIVER is not set 872# CONFIG_RAW_DRIVER is not set
@@ -866,13 +877,6 @@ CONFIG_I2C_BOARDINFO=y
866CONFIG_I2C_CHARDEV=y 877CONFIG_I2C_CHARDEV=y
867 878
868# 879#
869# I2C Algorithms
870#
871# CONFIG_I2C_ALGOBIT is not set
872# CONFIG_I2C_ALGOPCF is not set
873# CONFIG_I2C_ALGOPCA is not set
874
875#
876# I2C Hardware Bus support 880# I2C Hardware Bus support
877# 881#
878# CONFIG_I2C_ALI1535 is not set 882# CONFIG_I2C_ALI1535 is not set
@@ -898,6 +902,7 @@ CONFIG_I2C_CHARDEV=y
898# CONFIG_I2C_VIA is not set 902# CONFIG_I2C_VIA is not set
899# CONFIG_I2C_VIAPRO is not set 903# CONFIG_I2C_VIAPRO is not set
900# CONFIG_I2C_VOODOO3 is not set 904# CONFIG_I2C_VOODOO3 is not set
905# CONFIG_I2C_PCA_PLATFORM is not set
901CONFIG_I2C_MV64XXX=y 906CONFIG_I2C_MV64XXX=y
902 907
903# 908#
@@ -908,19 +913,13 @@ CONFIG_I2C_MV64XXX=y
908# CONFIG_SENSORS_PCF8574 is not set 913# CONFIG_SENSORS_PCF8574 is not set
909# CONFIG_PCF8575 is not set 914# CONFIG_PCF8575 is not set
910# CONFIG_SENSORS_PCF8591 is not set 915# CONFIG_SENSORS_PCF8591 is not set
911# CONFIG_TPS65010 is not set
912# CONFIG_SENSORS_MAX6875 is not set 916# CONFIG_SENSORS_MAX6875 is not set
913# CONFIG_SENSORS_TSL2550 is not set 917# CONFIG_SENSORS_TSL2550 is not set
914# CONFIG_I2C_DEBUG_CORE is not set 918# CONFIG_I2C_DEBUG_CORE is not set
915# CONFIG_I2C_DEBUG_ALGO is not set 919# CONFIG_I2C_DEBUG_ALGO is not set
916# CONFIG_I2C_DEBUG_BUS is not set 920# CONFIG_I2C_DEBUG_BUS is not set
917# CONFIG_I2C_DEBUG_CHIP is not set 921# CONFIG_I2C_DEBUG_CHIP is not set
918
919#
920# SPI support
921#
922# CONFIG_SPI is not set 922# CONFIG_SPI is not set
923# CONFIG_SPI_MASTER is not set
924# CONFIG_W1 is not set 923# CONFIG_W1 is not set
925# CONFIG_POWER_SUPPLY is not set 924# CONFIG_POWER_SUPPLY is not set
926CONFIG_HWMON=y 925CONFIG_HWMON=y
@@ -990,12 +989,22 @@ CONFIG_SSB_POSSIBLE=y
990# Multifunction device drivers 989# Multifunction device drivers
991# 990#
992# CONFIG_MFD_SM501 is not set 991# CONFIG_MFD_SM501 is not set
992# CONFIG_HTC_PASIC3 is not set
993 993
994# 994#
995# Multimedia devices 995# Multimedia devices
996# 996#
997
998#
999# Multimedia core support
1000#
997# CONFIG_VIDEO_DEV is not set 1001# CONFIG_VIDEO_DEV is not set
998# CONFIG_DVB_CORE is not set 1002# CONFIG_DVB_CORE is not set
1003# CONFIG_VIDEO_MEDIA is not set
1004
1005#
1006# Multimedia drivers
1007#
999# CONFIG_DAB is not set 1008# CONFIG_DAB is not set
1000 1009
1001# 1010#
@@ -1055,11 +1064,13 @@ CONFIG_USB_DEVICEFS=y
1055# 1064#
1056# USB Host Controller Drivers 1065# USB Host Controller Drivers
1057# 1066#
1067# CONFIG_USB_C67X00_HCD is not set
1058CONFIG_USB_EHCI_HCD=y 1068CONFIG_USB_EHCI_HCD=y
1059# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1069# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1060# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1070# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1061CONFIG_USB_EHCI_HCD_PPC_OF=y 1071CONFIG_USB_EHCI_HCD_PPC_OF=y
1062# CONFIG_USB_ISP116X_HCD is not set 1072# CONFIG_USB_ISP116X_HCD is not set
1073# CONFIG_USB_ISP1760_HCD is not set
1063CONFIG_USB_OHCI_HCD=y 1074CONFIG_USB_OHCI_HCD=y
1064# CONFIG_USB_OHCI_HCD_PPC_OF is not set 1075# CONFIG_USB_OHCI_HCD_PPC_OF is not set
1065# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1076# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
@@ -1074,6 +1085,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1074# 1085#
1075# CONFIG_USB_ACM is not set 1086# CONFIG_USB_ACM is not set
1076# CONFIG_USB_PRINTER is not set 1087# CONFIG_USB_PRINTER is not set
1088# CONFIG_USB_WDM is not set
1077 1089
1078# 1090#
1079# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 1091# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -1120,10 +1132,12 @@ CONFIG_USB_MON=y
1120# CONFIG_USB_TRANCEVIBRATOR is not set 1132# CONFIG_USB_TRANCEVIBRATOR is not set
1121# CONFIG_USB_IOWARRIOR is not set 1133# CONFIG_USB_IOWARRIOR is not set
1122# CONFIG_USB_TEST is not set 1134# CONFIG_USB_TEST is not set
1135# CONFIG_USB_ISIGHTFW is not set
1123# CONFIG_USB_GADGET is not set 1136# CONFIG_USB_GADGET is not set
1124# CONFIG_MMC is not set 1137# CONFIG_MMC is not set
1125# CONFIG_MEMSTICK is not set 1138# CONFIG_MEMSTICK is not set
1126# CONFIG_NEW_LEDS is not set 1139# CONFIG_NEW_LEDS is not set
1140# CONFIG_ACCESSIBILITY is not set
1127# CONFIG_INFINIBAND is not set 1141# CONFIG_INFINIBAND is not set
1128# CONFIG_EDAC is not set 1142# CONFIG_EDAC is not set
1129CONFIG_RTC_LIB=y 1143CONFIG_RTC_LIB=y
@@ -1175,11 +1189,8 @@ CONFIG_RTC_DRV_MAX6900=y
1175# 1189#
1176# on-CPU RTC drivers 1190# on-CPU RTC drivers
1177# 1191#
1192# CONFIG_RTC_DRV_PPC is not set
1178# CONFIG_DMADEVICES is not set 1193# CONFIG_DMADEVICES is not set
1179
1180#
1181# Userspace I/O
1182#
1183# CONFIG_UIO is not set 1194# CONFIG_UIO is not set
1184 1195
1185# 1196#
@@ -1199,7 +1210,6 @@ CONFIG_FS_MBCACHE=y
1199# CONFIG_JFS_FS is not set 1210# CONFIG_JFS_FS is not set
1200# CONFIG_FS_POSIX_ACL is not set 1211# CONFIG_FS_POSIX_ACL is not set
1201# CONFIG_XFS_FS is not set 1212# CONFIG_XFS_FS is not set
1202# CONFIG_GFS2_FS is not set
1203# CONFIG_OCFS2_FS is not set 1213# CONFIG_OCFS2_FS is not set
1204CONFIG_DNOTIFY=y 1214CONFIG_DNOTIFY=y
1205CONFIG_INOTIFY=y 1215CONFIG_INOTIFY=y
@@ -1257,7 +1267,6 @@ CONFIG_NETWORK_FILESYSTEMS=y
1257CONFIG_NFS_FS=y 1267CONFIG_NFS_FS=y
1258# CONFIG_NFS_V3 is not set 1268# CONFIG_NFS_V3 is not set
1259# CONFIG_NFS_V4 is not set 1269# CONFIG_NFS_V4 is not set
1260# CONFIG_NFS_DIRECTIO is not set
1261# CONFIG_NFSD is not set 1270# CONFIG_NFSD is not set
1262CONFIG_ROOT_NFS=y 1271CONFIG_ROOT_NFS=y
1263CONFIG_LOCKD=y 1272CONFIG_LOCKD=y
@@ -1300,6 +1309,7 @@ CONFIG_MSDOS_PARTITION=y
1300# Library routines 1309# Library routines
1301# 1310#
1302CONFIG_BITREVERSE=y 1311CONFIG_BITREVERSE=y
1312# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1303# CONFIG_CRC_CCITT is not set 1313# CONFIG_CRC_CCITT is not set
1304# CONFIG_CRC16 is not set 1314# CONFIG_CRC16 is not set
1305# CONFIG_CRC_ITU_T is not set 1315# CONFIG_CRC_ITU_T is not set
@@ -1310,6 +1320,7 @@ CONFIG_PLIST=y
1310CONFIG_HAS_IOMEM=y 1320CONFIG_HAS_IOMEM=y
1311CONFIG_HAS_IOPORT=y 1321CONFIG_HAS_IOPORT=y
1312CONFIG_HAS_DMA=y 1322CONFIG_HAS_DMA=y
1323CONFIG_HAVE_LMB=y
1313 1324
1314# 1325#
1315# Kernel hacking 1326# Kernel hacking
@@ -1317,6 +1328,7 @@ CONFIG_HAS_DMA=y
1317# CONFIG_PRINTK_TIME is not set 1328# CONFIG_PRINTK_TIME is not set
1318CONFIG_ENABLE_WARN_DEPRECATED=y 1329CONFIG_ENABLE_WARN_DEPRECATED=y
1319CONFIG_ENABLE_MUST_CHECK=y 1330CONFIG_ENABLE_MUST_CHECK=y
1331CONFIG_FRAME_WARN=1024
1320# CONFIG_MAGIC_SYSRQ is not set 1332# CONFIG_MAGIC_SYSRQ is not set
1321# CONFIG_UNUSED_SYMBOLS is not set 1333# CONFIG_UNUSED_SYMBOLS is not set
1322# CONFIG_DEBUG_FS is not set 1334# CONFIG_DEBUG_FS is not set
@@ -1326,6 +1338,7 @@ CONFIG_ENABLE_MUST_CHECK=y
1326# CONFIG_SLUB_STATS is not set 1338# CONFIG_SLUB_STATS is not set
1327CONFIG_DEBUG_BUGVERBOSE=y 1339CONFIG_DEBUG_BUGVERBOSE=y
1328# CONFIG_SAMPLES is not set 1340# CONFIG_SAMPLES is not set
1341# CONFIG_IRQSTACKS is not set
1329# CONFIG_BOOTX_TEXT is not set 1342# CONFIG_BOOTX_TEXT is not set
1330# CONFIG_PPC_EARLY_DEBUG is not set 1343# CONFIG_PPC_EARLY_DEBUG is not set
1331 1344
@@ -1336,48 +1349,78 @@ CONFIG_DEBUG_BUGVERBOSE=y
1336# CONFIG_SECURITY is not set 1349# CONFIG_SECURITY is not set
1337# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1350# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1338CONFIG_CRYPTO=y 1351CONFIG_CRYPTO=y
1339# CONFIG_CRYPTO_SEQIV is not set 1352
1353#
1354# Crypto core or helper
1355#
1340# CONFIG_CRYPTO_MANAGER is not set 1356# CONFIG_CRYPTO_MANAGER is not set
1357# CONFIG_CRYPTO_GF128MUL is not set
1358# CONFIG_CRYPTO_NULL is not set
1359# CONFIG_CRYPTO_CRYPTD is not set
1360# CONFIG_CRYPTO_AUTHENC is not set
1361
1362#
1363# Authenticated Encryption with Associated Data
1364#
1365# CONFIG_CRYPTO_CCM is not set
1366# CONFIG_CRYPTO_GCM is not set
1367# CONFIG_CRYPTO_SEQIV is not set
1368
1369#
1370# Block modes
1371#
1372# CONFIG_CRYPTO_CBC is not set
1373# CONFIG_CRYPTO_CTR is not set
1374# CONFIG_CRYPTO_CTS is not set
1375# CONFIG_CRYPTO_ECB is not set
1376# CONFIG_CRYPTO_LRW is not set
1377# CONFIG_CRYPTO_PCBC is not set
1378# CONFIG_CRYPTO_XTS is not set
1379
1380#
1381# Hash modes
1382#
1341# CONFIG_CRYPTO_HMAC is not set 1383# CONFIG_CRYPTO_HMAC is not set
1342# CONFIG_CRYPTO_XCBC is not set 1384# CONFIG_CRYPTO_XCBC is not set
1343# CONFIG_CRYPTO_NULL is not set 1385
1386#
1387# Digest
1388#
1389# CONFIG_CRYPTO_CRC32C is not set
1344# CONFIG_CRYPTO_MD4 is not set 1390# CONFIG_CRYPTO_MD4 is not set
1345# CONFIG_CRYPTO_MD5 is not set 1391# CONFIG_CRYPTO_MD5 is not set
1392# CONFIG_CRYPTO_MICHAEL_MIC is not set
1346# CONFIG_CRYPTO_SHA1 is not set 1393# CONFIG_CRYPTO_SHA1 is not set
1347# CONFIG_CRYPTO_SHA256 is not set 1394# CONFIG_CRYPTO_SHA256 is not set
1348# CONFIG_CRYPTO_SHA512 is not set 1395# CONFIG_CRYPTO_SHA512 is not set
1349# CONFIG_CRYPTO_WP512 is not set
1350# CONFIG_CRYPTO_TGR192 is not set 1396# CONFIG_CRYPTO_TGR192 is not set
1351# CONFIG_CRYPTO_GF128MUL is not set 1397# CONFIG_CRYPTO_WP512 is not set
1352# CONFIG_CRYPTO_ECB is not set 1398
1353# CONFIG_CRYPTO_CBC is not set 1399#
1354# CONFIG_CRYPTO_PCBC is not set 1400# Ciphers
1355# CONFIG_CRYPTO_LRW is not set 1401#
1356# CONFIG_CRYPTO_XTS is not set
1357# CONFIG_CRYPTO_CTR is not set
1358# CONFIG_CRYPTO_GCM is not set
1359# CONFIG_CRYPTO_CCM is not set
1360# CONFIG_CRYPTO_CRYPTD is not set
1361# CONFIG_CRYPTO_DES is not set
1362# CONFIG_CRYPTO_FCRYPT is not set
1363# CONFIG_CRYPTO_BLOWFISH is not set
1364# CONFIG_CRYPTO_TWOFISH is not set
1365# CONFIG_CRYPTO_SERPENT is not set
1366# CONFIG_CRYPTO_AES is not set 1402# CONFIG_CRYPTO_AES is not set
1403# CONFIG_CRYPTO_ANUBIS is not set
1404# CONFIG_CRYPTO_ARC4 is not set
1405# CONFIG_CRYPTO_BLOWFISH is not set
1406# CONFIG_CRYPTO_CAMELLIA is not set
1367# CONFIG_CRYPTO_CAST5 is not set 1407# CONFIG_CRYPTO_CAST5 is not set
1368# CONFIG_CRYPTO_CAST6 is not set 1408# CONFIG_CRYPTO_CAST6 is not set
1369# CONFIG_CRYPTO_TEA is not set 1409# CONFIG_CRYPTO_DES is not set
1370# CONFIG_CRYPTO_ARC4 is not set 1410# CONFIG_CRYPTO_FCRYPT is not set
1371# CONFIG_CRYPTO_KHAZAD is not set 1411# CONFIG_CRYPTO_KHAZAD is not set
1372# CONFIG_CRYPTO_ANUBIS is not set
1373# CONFIG_CRYPTO_SEED is not set
1374# CONFIG_CRYPTO_SALSA20 is not set 1412# CONFIG_CRYPTO_SALSA20 is not set
1413# CONFIG_CRYPTO_SEED is not set
1414# CONFIG_CRYPTO_SERPENT is not set
1415# CONFIG_CRYPTO_TEA is not set
1416# CONFIG_CRYPTO_TWOFISH is not set
1417
1418#
1419# Compression
1420#
1375# CONFIG_CRYPTO_DEFLATE is not set 1421# CONFIG_CRYPTO_DEFLATE is not set
1376# CONFIG_CRYPTO_MICHAEL_MIC is not set
1377# CONFIG_CRYPTO_CRC32C is not set
1378# CONFIG_CRYPTO_CAMELLIA is not set
1379# CONFIG_CRYPTO_AUTHENC is not set
1380# CONFIG_CRYPTO_LZO is not set 1422# CONFIG_CRYPTO_LZO is not set
1381CONFIG_CRYPTO_HW=y 1423CONFIG_CRYPTO_HW=y
1382# CONFIG_CRYPTO_DEV_HIFN_795X is not set 1424# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1383# CONFIG_PPC_CLOCK is not set 1425# CONFIG_PPC_CLOCK is not set
1426# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig
index 3e2593c60b12..adaa05fb0478 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.25-rc6 3# Linux kernel version: 2.6.26-rc3
4# Thu Mar 27 13:56:28 2008 4# Tue May 20 20:03:28 2008
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7 7
@@ -30,6 +30,9 @@ CONFIG_GENERIC_CLOCKEVENTS=y
30CONFIG_GENERIC_HARDIRQS=y 30CONFIG_GENERIC_HARDIRQS=y
31CONFIG_HAVE_SETUP_PER_CPU_AREA=y 31CONFIG_HAVE_SETUP_PER_CPU_AREA=y
32CONFIG_IRQ_PER_CPU=y 32CONFIG_IRQ_PER_CPU=y
33CONFIG_STACKTRACE_SUPPORT=y
34CONFIG_TRACE_IRQFLAGS_SUPPORT=y
35CONFIG_LOCKDEP_SUPPORT=y
33CONFIG_RWSEM_XCHGADD_ALGORITHM=y 36CONFIG_RWSEM_XCHGADD_ALGORITHM=y
34CONFIG_ARCH_HAS_ILOG2_U32=y 37CONFIG_ARCH_HAS_ILOG2_U32=y
35CONFIG_ARCH_HAS_ILOG2_U64=y 38CONFIG_ARCH_HAS_ILOG2_U64=y
@@ -81,6 +84,7 @@ CONFIG_LOG_BUF_SHIFT=17
81CONFIG_CGROUPS=y 84CONFIG_CGROUPS=y
82# CONFIG_CGROUP_DEBUG is not set 85# CONFIG_CGROUP_DEBUG is not set
83CONFIG_CGROUP_NS=y 86CONFIG_CGROUP_NS=y
87CONFIG_CGROUP_DEVICE=y
84CONFIG_CPUSETS=y 88CONFIG_CPUSETS=y
85# CONFIG_GROUP_SCHED is not set 89# CONFIG_GROUP_SCHED is not set
86CONFIG_CGROUP_CPUACCT=y 90CONFIG_CGROUP_CPUACCT=y
@@ -100,6 +104,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
100CONFIG_SYSCTL=y 104CONFIG_SYSCTL=y
101# CONFIG_EMBEDDED is not set 105# CONFIG_EMBEDDED is not set
102CONFIG_SYSCTL_SYSCALL=y 106CONFIG_SYSCTL_SYSCALL=y
107CONFIG_SYSCTL_SYSCALL_CHECK=y
103CONFIG_KALLSYMS=y 108CONFIG_KALLSYMS=y
104CONFIG_KALLSYMS_ALL=y 109CONFIG_KALLSYMS_ALL=y
105# CONFIG_KALLSYMS_EXTRA_PASS is not set 110# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -107,6 +112,7 @@ CONFIG_HOTPLUG=y
107CONFIG_PRINTK=y 112CONFIG_PRINTK=y
108CONFIG_BUG=y 113CONFIG_BUG=y
109CONFIG_ELF_CORE=y 114CONFIG_ELF_CORE=y
115CONFIG_PCSPKR_PLATFORM=y
110# CONFIG_COMPAT_BRK is not set 116# CONFIG_COMPAT_BRK is not set
111CONFIG_BASE_FULL=y 117CONFIG_BASE_FULL=y
112CONFIG_FUTEX=y 118CONFIG_FUTEX=y
@@ -129,12 +135,14 @@ CONFIG_KPROBES=y
129CONFIG_KRETPROBES=y 135CONFIG_KRETPROBES=y
130CONFIG_HAVE_KPROBES=y 136CONFIG_HAVE_KPROBES=y
131CONFIG_HAVE_KRETPROBES=y 137CONFIG_HAVE_KRETPROBES=y
138# CONFIG_HAVE_DMA_ATTRS is not set
132CONFIG_PROC_PAGE_MONITOR=y 139CONFIG_PROC_PAGE_MONITOR=y
133CONFIG_SLABINFO=y 140CONFIG_SLABINFO=y
134CONFIG_RT_MUTEXES=y 141CONFIG_RT_MUTEXES=y
135# CONFIG_TINY_SHMEM is not set 142# CONFIG_TINY_SHMEM is not set
136CONFIG_BASE_SMALL=0 143CONFIG_BASE_SMALL=0
137CONFIG_MODULES=y 144CONFIG_MODULES=y
145# CONFIG_MODULE_FORCE_LOAD is not set
138CONFIG_MODULE_UNLOAD=y 146CONFIG_MODULE_UNLOAD=y
139# CONFIG_MODULE_FORCE_UNLOAD is not set 147# CONFIG_MODULE_FORCE_UNLOAD is not set
140CONFIG_MODVERSIONS=y 148CONFIG_MODVERSIONS=y
@@ -178,11 +186,11 @@ CONFIG_LPARCFG=y
178# CONFIG_PPC_PMAC is not set 186# CONFIG_PPC_PMAC is not set
179# CONFIG_PPC_MAPLE is not set 187# CONFIG_PPC_MAPLE is not set
180# CONFIG_PPC_PASEMI is not set 188# CONFIG_PPC_PASEMI is not set
181# CONFIG_PPC_CELLEB is not set
182# CONFIG_PPC_PS3 is not set 189# CONFIG_PPC_PS3 is not set
183# CONFIG_PPC_CELL is not set 190# CONFIG_PPC_CELL is not set
184# CONFIG_PPC_CELL_NATIVE is not set 191# CONFIG_PPC_CELL_NATIVE is not set
185# CONFIG_PPC_IBM_CELL_BLADE is not set 192# CONFIG_PPC_IBM_CELL_BLADE is not set
193# CONFIG_PPC_CELLEB is not set
186# CONFIG_PQ2ADS is not set 194# CONFIG_PQ2ADS is not set
187CONFIG_PPC_NATIVE=y 195CONFIG_PPC_NATIVE=y
188# CONFIG_UDBG_RTAS_CONSOLE is not set 196# CONFIG_UDBG_RTAS_CONSOLE is not set
@@ -225,7 +233,6 @@ CONFIG_PREEMPT_NONE=y
225CONFIG_BINFMT_ELF=y 233CONFIG_BINFMT_ELF=y
226CONFIG_COMPAT_BINFMT_ELF=y 234CONFIG_COMPAT_BINFMT_ELF=y
227CONFIG_BINFMT_MISC=m 235CONFIG_BINFMT_MISC=m
228CONFIG_FORCE_MAX_ZONEORDER=13
229CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y 236CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y
230CONFIG_IOMMU_VMERGE=y 237CONFIG_IOMMU_VMERGE=y
231CONFIG_IOMMU_HELPER=y 238CONFIG_IOMMU_HELPER=y
@@ -255,6 +262,7 @@ CONFIG_SPARSEMEM_EXTREME=y
255CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y 262CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
256CONFIG_SPARSEMEM_VMEMMAP=y 263CONFIG_SPARSEMEM_VMEMMAP=y
257# CONFIG_MEMORY_HOTPLUG is not set 264# CONFIG_MEMORY_HOTPLUG is not set
265CONFIG_PAGEFLAGS_EXTENDED=y
258CONFIG_SPLIT_PTLOCK_CPUS=4 266CONFIG_SPLIT_PTLOCK_CPUS=4
259CONFIG_MIGRATION=y 267CONFIG_MIGRATION=y
260CONFIG_RESOURCES_64BIT=y 268CONFIG_RESOURCES_64BIT=y
@@ -263,6 +271,7 @@ CONFIG_BOUNCE=y
263CONFIG_NODES_SPAN_OTHER_NODES=y 271CONFIG_NODES_SPAN_OTHER_NODES=y
264# CONFIG_PPC_HAS_HASH_64K is not set 272# CONFIG_PPC_HAS_HASH_64K is not set
265# CONFIG_PPC_64K_PAGES is not set 273# CONFIG_PPC_64K_PAGES is not set
274CONFIG_FORCE_MAX_ZONEORDER=13
266CONFIG_SCHED_SMT=y 275CONFIG_SCHED_SMT=y
267CONFIG_PROC_DEVICETREE=y 276CONFIG_PROC_DEVICETREE=y
268# CONFIG_CMDLINE_BOOL is not set 277# CONFIG_CMDLINE_BOOL is not set
@@ -291,7 +300,10 @@ CONFIG_HOTPLUG_PCI=m
291# CONFIG_HOTPLUG_PCI_SHPC is not set 300# CONFIG_HOTPLUG_PCI_SHPC is not set
292CONFIG_HOTPLUG_PCI_RPA=m 301CONFIG_HOTPLUG_PCI_RPA=m
293CONFIG_HOTPLUG_PCI_RPA_DLPAR=m 302CONFIG_HOTPLUG_PCI_RPA_DLPAR=m
303# CONFIG_HAS_RAPIDIO is not set
304CONFIG_PAGE_OFFSET=0xc000000000000000
294CONFIG_KERNEL_START=0xc000000000000000 305CONFIG_KERNEL_START=0xc000000000000000
306CONFIG_PHYSICAL_START=0x00000000
295 307
296# 308#
297# Networking 309# Networking
@@ -338,8 +350,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
338# CONFIG_TCP_MD5SIG is not set 350# CONFIG_TCP_MD5SIG is not set
339# CONFIG_IP_VS is not set 351# CONFIG_IP_VS is not set
340# CONFIG_IPV6 is not set 352# CONFIG_IPV6 is not set
341# CONFIG_INET6_XFRM_TUNNEL is not set
342# CONFIG_INET6_TUNNEL is not set
343# CONFIG_NETWORK_SECMARK is not set 353# CONFIG_NETWORK_SECMARK is not set
344CONFIG_NETFILTER=y 354CONFIG_NETFILTER=y
345# CONFIG_NETFILTER_DEBUG is not set 355# CONFIG_NETFILTER_DEBUG is not set
@@ -355,6 +365,7 @@ CONFIG_NF_CONNTRACK=m
355CONFIG_NF_CT_ACCT=y 365CONFIG_NF_CT_ACCT=y
356CONFIG_NF_CONNTRACK_MARK=y 366CONFIG_NF_CONNTRACK_MARK=y
357CONFIG_NF_CONNTRACK_EVENTS=y 367CONFIG_NF_CONNTRACK_EVENTS=y
368# CONFIG_NF_CT_PROTO_DCCP is not set
358# CONFIG_NF_CT_PROTO_SCTP is not set 369# CONFIG_NF_CT_PROTO_SCTP is not set
359CONFIG_NF_CT_PROTO_UDPLITE=m 370CONFIG_NF_CT_PROTO_UDPLITE=m
360# CONFIG_NF_CONNTRACK_AMANDA is not set 371# CONFIG_NF_CONNTRACK_AMANDA is not set
@@ -426,6 +437,7 @@ CONFIG_IP_NF_TARGET_MASQUERADE=m
426CONFIG_IP_NF_TARGET_REDIRECT=m 437CONFIG_IP_NF_TARGET_REDIRECT=m
427CONFIG_IP_NF_TARGET_NETMAP=m 438CONFIG_IP_NF_TARGET_NETMAP=m
428CONFIG_NF_NAT_SNMP_BASIC=m 439CONFIG_NF_NAT_SNMP_BASIC=m
440CONFIG_NF_NAT_PROTO_UDPLITE=m
429CONFIG_NF_NAT_FTP=m 441CONFIG_NF_NAT_FTP=m
430CONFIG_NF_NAT_IRC=m 442CONFIG_NF_NAT_IRC=m
431CONFIG_NF_NAT_TFTP=m 443CONFIG_NF_NAT_TFTP=m
@@ -492,6 +504,7 @@ CONFIG_FW_LOADER=y
492# CONFIG_CONNECTOR is not set 504# CONFIG_CONNECTOR is not set
493# CONFIG_MTD is not set 505# CONFIG_MTD is not set
494CONFIG_OF_DEVICE=y 506CONFIG_OF_DEVICE=y
507CONFIG_OF_I2C=y
495CONFIG_PARPORT=m 508CONFIG_PARPORT=m
496CONFIG_PARPORT_PC=m 509CONFIG_PARPORT_PC=m
497# CONFIG_PARPORT_SERIAL is not set 510# CONFIG_PARPORT_SERIAL is not set
@@ -545,7 +558,6 @@ CONFIG_IDE_PROC_FS=y
545# 558#
546# IDE chipset support/bugfixes 559# IDE chipset support/bugfixes
547# 560#
548CONFIG_IDE_GENERIC=y
549# CONFIG_BLK_DEV_PLATFORM is not set 561# CONFIG_BLK_DEV_PLATFORM is not set
550CONFIG_BLK_DEV_IDEDMA_SFF=y 562CONFIG_BLK_DEV_IDEDMA_SFF=y
551 563
@@ -584,7 +596,7 @@ CONFIG_BLK_DEV_AMD74XX=y
584# CONFIG_BLK_DEV_VIA82CXXX is not set 596# CONFIG_BLK_DEV_VIA82CXXX is not set
585# CONFIG_BLK_DEV_TC86C001 is not set 597# CONFIG_BLK_DEV_TC86C001 is not set
586CONFIG_BLK_DEV_IDEDMA=y 598CONFIG_BLK_DEV_IDEDMA=y
587CONFIG_IDE_ARCH_OBSOLETE_INIT=y 599# CONFIG_BLK_DEV_HD_ONLY is not set
588# CONFIG_BLK_DEV_HD is not set 600# CONFIG_BLK_DEV_HD is not set
589 601
590# 602#
@@ -671,61 +683,10 @@ CONFIG_SCSI_LPFC=m
671# CONFIG_SCSI_SRP is not set 683# CONFIG_SCSI_SRP is not set
672CONFIG_ATA=y 684CONFIG_ATA=y
673# CONFIG_ATA_NONSTANDARD is not set 685# CONFIG_ATA_NONSTANDARD is not set
686CONFIG_SATA_PMP=y
674# CONFIG_SATA_AHCI is not set 687# CONFIG_SATA_AHCI is not set
675# CONFIG_SATA_SVW is not set
676# CONFIG_ATA_PIIX is not set
677# CONFIG_SATA_MV is not set
678# CONFIG_SATA_NV is not set
679# CONFIG_PDC_ADMA is not set
680# CONFIG_SATA_QSTOR is not set
681# CONFIG_SATA_PROMISE is not set
682# CONFIG_SATA_SX4 is not set
683# CONFIG_SATA_SIL is not set
684# CONFIG_SATA_SIL24 is not set 688# CONFIG_SATA_SIL24 is not set
685# CONFIG_SATA_SIS is not set 689# CONFIG_ATA_SFF is not set
686# CONFIG_SATA_ULI is not set
687# CONFIG_SATA_VIA is not set
688# CONFIG_SATA_VITESSE is not set
689# CONFIG_SATA_INIC162X is not set
690# CONFIG_PATA_ALI is not set
691# CONFIG_PATA_AMD is not set
692# CONFIG_PATA_ARTOP is not set
693# CONFIG_PATA_ATIIXP is not set
694# CONFIG_PATA_CMD640_PCI is not set
695# CONFIG_PATA_CMD64X is not set
696# CONFIG_PATA_CS5520 is not set
697# CONFIG_PATA_CS5530 is not set
698# CONFIG_PATA_CYPRESS is not set
699# CONFIG_PATA_EFAR is not set
700# CONFIG_ATA_GENERIC is not set
701# CONFIG_PATA_HPT366 is not set
702# CONFIG_PATA_HPT37X is not set
703# CONFIG_PATA_HPT3X2N is not set
704# CONFIG_PATA_HPT3X3 is not set
705# CONFIG_PATA_IT821X is not set
706# CONFIG_PATA_IT8213 is not set
707# CONFIG_PATA_JMICRON is not set
708# CONFIG_PATA_TRIFLEX is not set
709# CONFIG_PATA_MARVELL is not set
710# CONFIG_PATA_MPIIX is not set
711# CONFIG_PATA_OLDPIIX is not set
712# CONFIG_PATA_NETCELL is not set
713# CONFIG_PATA_NINJA32 is not set
714# CONFIG_PATA_NS87410 is not set
715# CONFIG_PATA_NS87415 is not set
716# CONFIG_PATA_OPTI is not set
717# CONFIG_PATA_OPTIDMA is not set
718# CONFIG_PATA_PDC_OLD is not set
719# CONFIG_PATA_RADISYS is not set
720# CONFIG_PATA_RZ1000 is not set
721# CONFIG_PATA_SC1200 is not set
722# CONFIG_PATA_SERVERWORKS is not set
723# CONFIG_PATA_PDC2027X is not set
724# CONFIG_PATA_SIL680 is not set
725# CONFIG_PATA_SIS is not set
726# CONFIG_PATA_VIA is not set
727CONFIG_PATA_WINBOND=y
728# CONFIG_PATA_PLATFORM is not set
729CONFIG_MD=y 690CONFIG_MD=y
730CONFIG_BLK_DEV_MD=y 691CONFIG_BLK_DEV_MD=y
731CONFIG_MD_LINEAR=y 692CONFIG_MD_LINEAR=y
@@ -783,7 +744,6 @@ CONFIG_IBMVETH=y
783# CONFIG_IBM_NEW_EMAC_EMAC4 is not set 744# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
784CONFIG_NET_PCI=y 745CONFIG_NET_PCI=y
785CONFIG_PCNET32=y 746CONFIG_PCNET32=y
786# CONFIG_PCNET32_NAPI is not set
787# CONFIG_AMD8111_ETH is not set 747# CONFIG_AMD8111_ETH is not set
788# CONFIG_ADAPTEC_STARFIRE is not set 748# CONFIG_ADAPTEC_STARFIRE is not set
789# CONFIG_B44 is not set 749# CONFIG_B44 is not set
@@ -820,7 +780,6 @@ CONFIG_E1000=y
820# CONFIG_SIS190 is not set 780# CONFIG_SIS190 is not set
821# CONFIG_SKGE is not set 781# CONFIG_SKGE is not set
822# CONFIG_SKY2 is not set 782# CONFIG_SKY2 is not set
823# CONFIG_SK98LIN is not set
824# CONFIG_VIA_VELOCITY is not set 783# CONFIG_VIA_VELOCITY is not set
825CONFIG_TIGON3=y 784CONFIG_TIGON3=y
826# CONFIG_BNX2 is not set 785# CONFIG_BNX2 is not set
@@ -829,7 +788,6 @@ CONFIG_TIGON3=y
829CONFIG_NETDEV_10000=y 788CONFIG_NETDEV_10000=y
830# CONFIG_CHELSIO_T1 is not set 789# CONFIG_CHELSIO_T1 is not set
831# CONFIG_CHELSIO_T3 is not set 790# CONFIG_CHELSIO_T3 is not set
832CONFIG_EHEA=m
833# CONFIG_IXGBE is not set 791# CONFIG_IXGBE is not set
834CONFIG_IXGB=m 792CONFIG_IXGB=m
835# CONFIG_IXGB_NAPI is not set 793# CONFIG_IXGB_NAPI is not set
@@ -838,10 +796,10 @@ CONFIG_S2IO=m
838# CONFIG_MYRI10GE is not set 796# CONFIG_MYRI10GE is not set
839# CONFIG_NETXEN_NIC is not set 797# CONFIG_NETXEN_NIC is not set
840# CONFIG_NIU is not set 798# CONFIG_NIU is not set
841# CONFIG_PASEMI_MAC is not set
842# CONFIG_MLX4_CORE is not set 799# CONFIG_MLX4_CORE is not set
843# CONFIG_TEHUTI is not set 800# CONFIG_TEHUTI is not set
844# CONFIG_BNX2X is not set 801# CONFIG_BNX2X is not set
802# CONFIG_SFC is not set
845CONFIG_TR=y 803CONFIG_TR=y
846CONFIG_IBMOL=y 804CONFIG_IBMOL=y
847# CONFIG_3C359 is not set 805# CONFIG_3C359 is not set
@@ -852,6 +810,7 @@ CONFIG_IBMOL=y
852# 810#
853# CONFIG_WLAN_PRE80211 is not set 811# CONFIG_WLAN_PRE80211 is not set
854# CONFIG_WLAN_80211 is not set 812# CONFIG_WLAN_80211 is not set
813# CONFIG_IWLWIFI_LEDS is not set
855 814
856# 815#
857# USB Network Adapters 816# USB Network Adapters
@@ -956,6 +915,7 @@ CONFIG_VT=y
956CONFIG_VT_CONSOLE=y 915CONFIG_VT_CONSOLE=y
957CONFIG_HW_CONSOLE=y 916CONFIG_HW_CONSOLE=y
958# CONFIG_VT_HW_CONSOLE_BINDING is not set 917# CONFIG_VT_HW_CONSOLE_BINDING is not set
918CONFIG_DEVKMEM=y
959# CONFIG_SERIAL_NONSTANDARD is not set 919# CONFIG_SERIAL_NONSTANDARD is not set
960# CONFIG_NOZOMI is not set 920# CONFIG_NOZOMI is not set
961 921
@@ -1000,13 +960,7 @@ CONFIG_DEVPORT=y
1000CONFIG_I2C=y 960CONFIG_I2C=y
1001CONFIG_I2C_BOARDINFO=y 961CONFIG_I2C_BOARDINFO=y
1002# CONFIG_I2C_CHARDEV is not set 962# CONFIG_I2C_CHARDEV is not set
1003
1004#
1005# I2C Algorithms
1006#
1007CONFIG_I2C_ALGOBIT=y 963CONFIG_I2C_ALGOBIT=y
1008# CONFIG_I2C_ALGOPCF is not set
1009# CONFIG_I2C_ALGOPCA is not set
1010 964
1011# 965#
1012# I2C Hardware Bus support 966# I2C Hardware Bus support
@@ -1035,6 +989,7 @@ CONFIG_I2C_ALGOBIT=y
1035# CONFIG_I2C_VIA is not set 989# CONFIG_I2C_VIA is not set
1036# CONFIG_I2C_VIAPRO is not set 990# CONFIG_I2C_VIAPRO is not set
1037# CONFIG_I2C_VOODOO3 is not set 991# CONFIG_I2C_VOODOO3 is not set
992# CONFIG_I2C_PCA_PLATFORM is not set
1038 993
1039# 994#
1040# Miscellaneous I2C Chip support 995# Miscellaneous I2C Chip support
@@ -1044,19 +999,13 @@ CONFIG_I2C_ALGOBIT=y
1044# CONFIG_SENSORS_PCF8574 is not set 999# CONFIG_SENSORS_PCF8574 is not set
1045# CONFIG_PCF8575 is not set 1000# CONFIG_PCF8575 is not set
1046# CONFIG_SENSORS_PCF8591 is not set 1001# CONFIG_SENSORS_PCF8591 is not set
1047# CONFIG_TPS65010 is not set
1048# CONFIG_SENSORS_MAX6875 is not set 1002# CONFIG_SENSORS_MAX6875 is not set
1049# CONFIG_SENSORS_TSL2550 is not set 1003# CONFIG_SENSORS_TSL2550 is not set
1050# CONFIG_I2C_DEBUG_CORE is not set 1004# CONFIG_I2C_DEBUG_CORE is not set
1051# CONFIG_I2C_DEBUG_ALGO is not set 1005# CONFIG_I2C_DEBUG_ALGO is not set
1052# CONFIG_I2C_DEBUG_BUS is not set 1006# CONFIG_I2C_DEBUG_BUS is not set
1053# CONFIG_I2C_DEBUG_CHIP is not set 1007# CONFIG_I2C_DEBUG_CHIP is not set
1054
1055#
1056# SPI support
1057#
1058# CONFIG_SPI is not set 1008# CONFIG_SPI is not set
1059# CONFIG_SPI_MASTER is not set
1060# CONFIG_W1 is not set 1009# CONFIG_W1 is not set
1061# CONFIG_POWER_SUPPLY is not set 1010# CONFIG_POWER_SUPPLY is not set
1062# CONFIG_HWMON is not set 1011# CONFIG_HWMON is not set
@@ -1073,12 +1022,22 @@ CONFIG_SSB_POSSIBLE=y
1073# Multifunction device drivers 1022# Multifunction device drivers
1074# 1023#
1075# CONFIG_MFD_SM501 is not set 1024# CONFIG_MFD_SM501 is not set
1025# CONFIG_HTC_PASIC3 is not set
1076 1026
1077# 1027#
1078# Multimedia devices 1028# Multimedia devices
1079# 1029#
1030
1031#
1032# Multimedia core support
1033#
1080# CONFIG_VIDEO_DEV is not set 1034# CONFIG_VIDEO_DEV is not set
1081# CONFIG_DVB_CORE is not set 1035# CONFIG_DVB_CORE is not set
1036# CONFIG_VIDEO_MEDIA is not set
1037
1038#
1039# Multimedia drivers
1040#
1082# CONFIG_DAB is not set 1041# CONFIG_DAB is not set
1083 1042
1084# 1043#
@@ -1098,8 +1057,8 @@ CONFIG_FB_CFB_IMAGEBLIT=y
1098# CONFIG_FB_SYS_FILLRECT is not set 1057# CONFIG_FB_SYS_FILLRECT is not set
1099# CONFIG_FB_SYS_COPYAREA is not set 1058# CONFIG_FB_SYS_COPYAREA is not set
1100# CONFIG_FB_SYS_IMAGEBLIT is not set 1059# CONFIG_FB_SYS_IMAGEBLIT is not set
1060# CONFIG_FB_FOREIGN_ENDIAN is not set
1101# CONFIG_FB_SYS_FOPS is not set 1061# CONFIG_FB_SYS_FOPS is not set
1102CONFIG_FB_DEFERRED_IO=y
1103# CONFIG_FB_SVGALIB is not set 1062# CONFIG_FB_SVGALIB is not set
1104CONFIG_FB_MACMODES=y 1063CONFIG_FB_MACMODES=y
1105CONFIG_FB_BACKLIGHT=y 1064CONFIG_FB_BACKLIGHT=y
@@ -1209,11 +1168,13 @@ CONFIG_USB_DEVICE_CLASS=y
1209# 1168#
1210# USB Host Controller Drivers 1169# USB Host Controller Drivers
1211# 1170#
1171# CONFIG_USB_C67X00_HCD is not set
1212CONFIG_USB_EHCI_HCD=y 1172CONFIG_USB_EHCI_HCD=y
1213# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1173# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1214# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1174# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1215# CONFIG_USB_EHCI_HCD_PPC_OF is not set 1175# CONFIG_USB_EHCI_HCD_PPC_OF is not set
1216# CONFIG_USB_ISP116X_HCD is not set 1176# CONFIG_USB_ISP116X_HCD is not set
1177# CONFIG_USB_ISP1760_HCD is not set
1217CONFIG_USB_OHCI_HCD=y 1178CONFIG_USB_OHCI_HCD=y
1218# CONFIG_USB_OHCI_HCD_PPC_OF is not set 1179# CONFIG_USB_OHCI_HCD_PPC_OF is not set
1219# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1180# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
@@ -1247,7 +1208,9 @@ CONFIG_USB_STORAGE=y
1247# CONFIG_USB_STORAGE_SDDR55 is not set 1208# CONFIG_USB_STORAGE_SDDR55 is not set
1248# CONFIG_USB_STORAGE_JUMPSHOT is not set 1209# CONFIG_USB_STORAGE_JUMPSHOT is not set
1249# CONFIG_USB_STORAGE_ALAUDA is not set 1210# CONFIG_USB_STORAGE_ALAUDA is not set
1211CONFIG_USB_STORAGE_ONETOUCH=y
1250# CONFIG_USB_STORAGE_KARMA is not set 1212# CONFIG_USB_STORAGE_KARMA is not set
1213# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1251# CONFIG_USB_LIBUSUAL is not set 1214# CONFIG_USB_LIBUSUAL is not set
1252 1215
1253# 1216#
@@ -1290,6 +1253,7 @@ CONFIG_USB_MON=y
1290# CONFIG_MMC is not set 1253# CONFIG_MMC is not set
1291# CONFIG_MEMSTICK is not set 1254# CONFIG_MEMSTICK is not set
1292# CONFIG_NEW_LEDS is not set 1255# CONFIG_NEW_LEDS is not set
1256# CONFIG_ACCESSIBILITY is not set
1293CONFIG_INFINIBAND=m 1257CONFIG_INFINIBAND=m
1294CONFIG_INFINIBAND_USER_MAD=m 1258CONFIG_INFINIBAND_USER_MAD=m
1295CONFIG_INFINIBAND_USER_ACCESS=m 1259CONFIG_INFINIBAND_USER_ACCESS=m
@@ -1312,10 +1276,6 @@ CONFIG_INFINIBAND_SRP=m
1312# CONFIG_RTC_CLASS is not set 1276# CONFIG_RTC_CLASS is not set
1313# CONFIG_DMADEVICES is not set 1277# CONFIG_DMADEVICES is not set
1314# CONFIG_AUXDISPLAY is not set 1278# CONFIG_AUXDISPLAY is not set
1315
1316#
1317# Userspace I/O
1318#
1319# CONFIG_UIO is not set 1279# CONFIG_UIO is not set
1320 1280
1321# 1281#
@@ -1349,11 +1309,12 @@ CONFIG_JFS_SECURITY=y
1349CONFIG_FS_POSIX_ACL=y 1309CONFIG_FS_POSIX_ACL=y
1350CONFIG_XFS_FS=m 1310CONFIG_XFS_FS=m
1351# CONFIG_XFS_QUOTA is not set 1311# CONFIG_XFS_QUOTA is not set
1352CONFIG_XFS_SECURITY=y
1353CONFIG_XFS_POSIX_ACL=y 1312CONFIG_XFS_POSIX_ACL=y
1354# CONFIG_XFS_RT is not set 1313# CONFIG_XFS_RT is not set
1314# CONFIG_XFS_DEBUG is not set
1355# CONFIG_GFS2_FS is not set 1315# CONFIG_GFS2_FS is not set
1356CONFIG_OCFS2_FS=m 1316CONFIG_OCFS2_FS=m
1317CONFIG_OCFS2_FS_O2CB=m
1357CONFIG_OCFS2_DEBUG_MASKLOG=y 1318CONFIG_OCFS2_DEBUG_MASKLOG=y
1358# CONFIG_OCFS2_DEBUG_FS is not set 1319# CONFIG_OCFS2_DEBUG_FS is not set
1359CONFIG_DNOTIFY=y 1320CONFIG_DNOTIFY=y
@@ -1419,13 +1380,11 @@ CONFIG_NFS_FS=y
1419CONFIG_NFS_V3=y 1380CONFIG_NFS_V3=y
1420CONFIG_NFS_V3_ACL=y 1381CONFIG_NFS_V3_ACL=y
1421CONFIG_NFS_V4=y 1382CONFIG_NFS_V4=y
1422# CONFIG_NFS_DIRECTIO is not set
1423CONFIG_NFSD=y 1383CONFIG_NFSD=y
1424CONFIG_NFSD_V2_ACL=y 1384CONFIG_NFSD_V2_ACL=y
1425CONFIG_NFSD_V3=y 1385CONFIG_NFSD_V3=y
1426CONFIG_NFSD_V3_ACL=y 1386CONFIG_NFSD_V3_ACL=y
1427CONFIG_NFSD_V4=y 1387CONFIG_NFSD_V4=y
1428CONFIG_NFSD_TCP=y
1429CONFIG_LOCKD=y 1388CONFIG_LOCKD=y
1430CONFIG_LOCKD_V4=y 1389CONFIG_LOCKD_V4=y
1431CONFIG_EXPORTFS=y 1390CONFIG_EXPORTFS=y
@@ -1500,9 +1459,10 @@ CONFIG_NLS_ISO8859_1=y
1500# Library routines 1459# Library routines
1501# 1460#
1502CONFIG_BITREVERSE=y 1461CONFIG_BITREVERSE=y
1462# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1503CONFIG_CRC_CCITT=m 1463CONFIG_CRC_CCITT=m
1504# CONFIG_CRC16 is not set 1464# CONFIG_CRC16 is not set
1505# CONFIG_CRC_ITU_T is not set 1465CONFIG_CRC_ITU_T=m
1506CONFIG_CRC32=y 1466CONFIG_CRC32=y
1507# CONFIG_CRC7 is not set 1467# CONFIG_CRC7 is not set
1508CONFIG_LIBCRC32C=m 1468CONFIG_LIBCRC32C=m
@@ -1526,6 +1486,7 @@ CONFIG_HAVE_LMB=y
1526# CONFIG_PRINTK_TIME is not set 1486# CONFIG_PRINTK_TIME is not set
1527CONFIG_ENABLE_WARN_DEPRECATED=y 1487CONFIG_ENABLE_WARN_DEPRECATED=y
1528CONFIG_ENABLE_MUST_CHECK=y 1488CONFIG_ENABLE_MUST_CHECK=y
1489CONFIG_FRAME_WARN=2048
1529CONFIG_MAGIC_SYSRQ=y 1490CONFIG_MAGIC_SYSRQ=y
1530# CONFIG_UNUSED_SYMBOLS is not set 1491# CONFIG_UNUSED_SYMBOLS is not set
1531CONFIG_DEBUG_FS=y 1492CONFIG_DEBUG_FS=y
@@ -1536,18 +1497,23 @@ CONFIG_DETECT_SOFTLOCKUP=y
1536CONFIG_SCHED_DEBUG=y 1497CONFIG_SCHED_DEBUG=y
1537# CONFIG_SCHEDSTATS is not set 1498# CONFIG_SCHEDSTATS is not set
1538# CONFIG_TIMER_STATS is not set 1499# CONFIG_TIMER_STATS is not set
1500# CONFIG_DEBUG_OBJECTS is not set
1539# CONFIG_SLUB_DEBUG_ON is not set 1501# CONFIG_SLUB_DEBUG_ON is not set
1540# CONFIG_SLUB_STATS is not set 1502# CONFIG_SLUB_STATS is not set
1541# CONFIG_DEBUG_RT_MUTEXES is not set 1503# CONFIG_DEBUG_RT_MUTEXES is not set
1542# CONFIG_RT_MUTEX_TESTER is not set 1504# CONFIG_RT_MUTEX_TESTER is not set
1543# CONFIG_DEBUG_SPINLOCK is not set 1505# CONFIG_DEBUG_SPINLOCK is not set
1544# CONFIG_DEBUG_MUTEXES is not set 1506# CONFIG_DEBUG_MUTEXES is not set
1507# CONFIG_DEBUG_LOCK_ALLOC is not set
1508# CONFIG_PROVE_LOCKING is not set
1509# CONFIG_LOCK_STAT is not set
1545# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1510# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1546# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1511# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1547# CONFIG_DEBUG_KOBJECT is not set 1512# CONFIG_DEBUG_KOBJECT is not set
1548CONFIG_DEBUG_BUGVERBOSE=y 1513CONFIG_DEBUG_BUGVERBOSE=y
1549# CONFIG_DEBUG_INFO is not set 1514# CONFIG_DEBUG_INFO is not set
1550# CONFIG_DEBUG_VM is not set 1515# CONFIG_DEBUG_VM is not set
1516# CONFIG_DEBUG_WRITECOUNT is not set
1551# CONFIG_DEBUG_LIST is not set 1517# CONFIG_DEBUG_LIST is not set
1552# CONFIG_DEBUG_SG is not set 1518# CONFIG_DEBUG_SG is not set
1553# CONFIG_BOOT_PRINTK_DELAY is not set 1519# CONFIG_BOOT_PRINTK_DELAY is not set
@@ -1577,53 +1543,83 @@ CONFIG_VIRQ_DEBUG=y
1577# CONFIG_SECURITY is not set 1543# CONFIG_SECURITY is not set
1578# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1544# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1579CONFIG_CRYPTO=y 1545CONFIG_CRYPTO=y
1546
1547#
1548# Crypto core or helper
1549#
1580CONFIG_CRYPTO_ALGAPI=y 1550CONFIG_CRYPTO_ALGAPI=y
1581CONFIG_CRYPTO_AEAD=m 1551CONFIG_CRYPTO_AEAD=m
1582CONFIG_CRYPTO_BLKCIPHER=y 1552CONFIG_CRYPTO_BLKCIPHER=y
1583CONFIG_CRYPTO_SEQIV=m
1584CONFIG_CRYPTO_HASH=y 1553CONFIG_CRYPTO_HASH=y
1585CONFIG_CRYPTO_MANAGER=y 1554CONFIG_CRYPTO_MANAGER=y
1555CONFIG_CRYPTO_GF128MUL=m
1556CONFIG_CRYPTO_NULL=m
1557# CONFIG_CRYPTO_CRYPTD is not set
1558CONFIG_CRYPTO_AUTHENC=m
1559CONFIG_CRYPTO_TEST=m
1560
1561#
1562# Authenticated Encryption with Associated Data
1563#
1564CONFIG_CRYPTO_CCM=m
1565CONFIG_CRYPTO_GCM=m
1566CONFIG_CRYPTO_SEQIV=m
1567
1568#
1569# Block modes
1570#
1571CONFIG_CRYPTO_CBC=y
1572CONFIG_CRYPTO_CTR=m
1573# CONFIG_CRYPTO_CTS is not set
1574CONFIG_CRYPTO_ECB=m
1575# CONFIG_CRYPTO_LRW is not set
1576CONFIG_CRYPTO_PCBC=m
1577# CONFIG_CRYPTO_XTS is not set
1578
1579#
1580# Hash modes
1581#
1586CONFIG_CRYPTO_HMAC=y 1582CONFIG_CRYPTO_HMAC=y
1587# CONFIG_CRYPTO_XCBC is not set 1583# CONFIG_CRYPTO_XCBC is not set
1588CONFIG_CRYPTO_NULL=m 1584
1585#
1586# Digest
1587#
1588CONFIG_CRYPTO_CRC32C=m
1589CONFIG_CRYPTO_MD4=m 1589CONFIG_CRYPTO_MD4=m
1590CONFIG_CRYPTO_MD5=y 1590CONFIG_CRYPTO_MD5=y
1591CONFIG_CRYPTO_MICHAEL_MIC=m
1591CONFIG_CRYPTO_SHA1=m 1592CONFIG_CRYPTO_SHA1=m
1592CONFIG_CRYPTO_SHA256=m 1593CONFIG_CRYPTO_SHA256=m
1593CONFIG_CRYPTO_SHA512=m 1594CONFIG_CRYPTO_SHA512=m
1594CONFIG_CRYPTO_WP512=m
1595CONFIG_CRYPTO_TGR192=m 1595CONFIG_CRYPTO_TGR192=m
1596CONFIG_CRYPTO_GF128MUL=m 1596CONFIG_CRYPTO_WP512=m
1597CONFIG_CRYPTO_ECB=m 1597
1598CONFIG_CRYPTO_CBC=y 1598#
1599CONFIG_CRYPTO_PCBC=m 1599# Ciphers
1600# CONFIG_CRYPTO_LRW is not set 1600#
1601# CONFIG_CRYPTO_XTS is not set
1602CONFIG_CRYPTO_CTR=m
1603CONFIG_CRYPTO_GCM=m
1604CONFIG_CRYPTO_CCM=m
1605# CONFIG_CRYPTO_CRYPTD is not set
1606CONFIG_CRYPTO_DES=y
1607# CONFIG_CRYPTO_FCRYPT is not set
1608CONFIG_CRYPTO_BLOWFISH=m
1609CONFIG_CRYPTO_TWOFISH=m
1610CONFIG_CRYPTO_TWOFISH_COMMON=m
1611CONFIG_CRYPTO_SERPENT=m
1612CONFIG_CRYPTO_AES=m 1601CONFIG_CRYPTO_AES=m
1602CONFIG_CRYPTO_ANUBIS=m
1603CONFIG_CRYPTO_ARC4=m
1604CONFIG_CRYPTO_BLOWFISH=m
1605# CONFIG_CRYPTO_CAMELLIA is not set
1613CONFIG_CRYPTO_CAST5=m 1606CONFIG_CRYPTO_CAST5=m
1614CONFIG_CRYPTO_CAST6=m 1607CONFIG_CRYPTO_CAST6=m
1615CONFIG_CRYPTO_TEA=m 1608CONFIG_CRYPTO_DES=y
1616CONFIG_CRYPTO_ARC4=m 1609# CONFIG_CRYPTO_FCRYPT is not set
1617CONFIG_CRYPTO_KHAZAD=m 1610CONFIG_CRYPTO_KHAZAD=m
1618CONFIG_CRYPTO_ANUBIS=m
1619# CONFIG_CRYPTO_SEED is not set
1620CONFIG_CRYPTO_SALSA20=m 1611CONFIG_CRYPTO_SALSA20=m
1612# CONFIG_CRYPTO_SEED is not set
1613CONFIG_CRYPTO_SERPENT=m
1614CONFIG_CRYPTO_TEA=m
1615CONFIG_CRYPTO_TWOFISH=m
1616CONFIG_CRYPTO_TWOFISH_COMMON=m
1617
1618#
1619# Compression
1620#
1621CONFIG_CRYPTO_DEFLATE=m 1621CONFIG_CRYPTO_DEFLATE=m
1622CONFIG_CRYPTO_MICHAEL_MIC=m
1623CONFIG_CRYPTO_CRC32C=m
1624# CONFIG_CRYPTO_CAMELLIA is not set
1625CONFIG_CRYPTO_TEST=m
1626CONFIG_CRYPTO_AUTHENC=m
1627CONFIG_CRYPTO_LZO=m 1622CONFIG_CRYPTO_LZO=m
1628# CONFIG_CRYPTO_HW is not set 1623# CONFIG_CRYPTO_HW is not set
1629# CONFIG_PPC_CLOCK is not set 1624# CONFIG_PPC_CLOCK is not set
1625# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/sbc8641d_defconfig b/arch/powerpc/configs/sbc8641d_defconfig
index 3180125aa6c4..8227510b41a9 100644
--- a/arch/powerpc/configs/sbc8641d_defconfig
+++ b/arch/powerpc/configs/sbc8641d_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.25-rc6 3# Linux kernel version: 2.6.26-rc5
4# Thu Apr 10 18:03:25 2008 4# Mon Jun 9 08:52:19 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -32,6 +32,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 33# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
34CONFIG_IRQ_PER_CPU=y 34CONFIG_IRQ_PER_CPU=y
35CONFIG_STACKTRACE_SUPPORT=y
36CONFIG_LOCKDEP_SUPPORT=y
35CONFIG_RWSEM_XCHGADD_ALGORITHM=y 37CONFIG_RWSEM_XCHGADD_ALGORITHM=y
36CONFIG_GENERIC_LOCKBREAK=y 38CONFIG_GENERIC_LOCKBREAK=y
37CONFIG_ARCH_HAS_ILOG2_U32=y 39CONFIG_ARCH_HAS_ILOG2_U32=y
@@ -90,6 +92,7 @@ CONFIG_INITRAMFS_SOURCE=""
90CONFIG_SYSCTL=y 92CONFIG_SYSCTL=y
91CONFIG_EMBEDDED=y 93CONFIG_EMBEDDED=y
92CONFIG_SYSCTL_SYSCALL=y 94CONFIG_SYSCTL_SYSCALL=y
95CONFIG_SYSCTL_SYSCALL_CHECK=y
93CONFIG_KALLSYMS=y 96CONFIG_KALLSYMS=y
94# CONFIG_KALLSYMS_ALL is not set 97# CONFIG_KALLSYMS_ALL is not set
95# CONFIG_KALLSYMS_EXTRA_PASS is not set 98# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -116,12 +119,14 @@ CONFIG_HAVE_OPROFILE=y
116# CONFIG_KPROBES is not set 119# CONFIG_KPROBES is not set
117CONFIG_HAVE_KPROBES=y 120CONFIG_HAVE_KPROBES=y
118CONFIG_HAVE_KRETPROBES=y 121CONFIG_HAVE_KRETPROBES=y
122# CONFIG_HAVE_DMA_ATTRS is not set
119CONFIG_PROC_PAGE_MONITOR=y 123CONFIG_PROC_PAGE_MONITOR=y
120CONFIG_SLABINFO=y 124CONFIG_SLABINFO=y
121CONFIG_RT_MUTEXES=y 125CONFIG_RT_MUTEXES=y
122# CONFIG_TINY_SHMEM is not set 126# CONFIG_TINY_SHMEM is not set
123CONFIG_BASE_SMALL=0 127CONFIG_BASE_SMALL=0
124CONFIG_MODULES=y 128CONFIG_MODULES=y
129# CONFIG_MODULE_FORCE_LOAD is not set
125CONFIG_MODULE_UNLOAD=y 130CONFIG_MODULE_UNLOAD=y
126# CONFIG_MODULE_FORCE_UNLOAD is not set 131# CONFIG_MODULE_FORCE_UNLOAD is not set
127# CONFIG_MODVERSIONS is not set 132# CONFIG_MODVERSIONS is not set
@@ -197,7 +202,6 @@ CONFIG_PREEMPT=y
197# CONFIG_PREEMPT_RCU is not set 202# CONFIG_PREEMPT_RCU is not set
198CONFIG_BINFMT_ELF=y 203CONFIG_BINFMT_ELF=y
199CONFIG_BINFMT_MISC=m 204CONFIG_BINFMT_MISC=m
200CONFIG_FORCE_MAX_ZONEORDER=11
201# CONFIG_IOMMU_HELPER is not set 205# CONFIG_IOMMU_HELPER is not set
202CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 206CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
203CONFIG_ARCH_HAS_WALK_MEMORY=y 207CONFIG_ARCH_HAS_WALK_MEMORY=y
@@ -213,11 +217,13 @@ CONFIG_FLATMEM=y
213CONFIG_FLAT_NODE_MEM_MAP=y 217CONFIG_FLAT_NODE_MEM_MAP=y
214# CONFIG_SPARSEMEM_STATIC is not set 218# CONFIG_SPARSEMEM_STATIC is not set
215# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 219# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
220CONFIG_PAGEFLAGS_EXTENDED=y
216CONFIG_SPLIT_PTLOCK_CPUS=4 221CONFIG_SPLIT_PTLOCK_CPUS=4
217# CONFIG_RESOURCES_64BIT is not set 222# CONFIG_RESOURCES_64BIT is not set
218CONFIG_ZONE_DMA_FLAG=1 223CONFIG_ZONE_DMA_FLAG=1
219CONFIG_BOUNCE=y 224CONFIG_BOUNCE=y
220CONFIG_VIRT_TO_BUS=y 225CONFIG_VIRT_TO_BUS=y
226CONFIG_FORCE_MAX_ZONEORDER=11
221# CONFIG_PROC_DEVICETREE is not set 227# CONFIG_PROC_DEVICETREE is not set
222# CONFIG_CMDLINE_BOOL is not set 228# CONFIG_CMDLINE_BOOL is not set
223# CONFIG_PM is not set 229# CONFIG_PM is not set
@@ -237,12 +243,14 @@ CONFIG_PCI_DOMAINS=y
237CONFIG_PCI_SYSCALL=y 243CONFIG_PCI_SYSCALL=y
238CONFIG_PCIEPORTBUS=y 244CONFIG_PCIEPORTBUS=y
239CONFIG_PCIEAER=y 245CONFIG_PCIEAER=y
246# CONFIG_PCIEASPM is not set
240CONFIG_ARCH_SUPPORTS_MSI=y 247CONFIG_ARCH_SUPPORTS_MSI=y
241# CONFIG_PCI_MSI is not set 248# CONFIG_PCI_MSI is not set
242CONFIG_PCI_LEGACY=y 249CONFIG_PCI_LEGACY=y
243# CONFIG_PCI_DEBUG is not set 250# CONFIG_PCI_DEBUG is not set
244# CONFIG_PCCARD is not set 251# CONFIG_PCCARD is not set
245# CONFIG_HOTPLUG_PCI is not set 252# CONFIG_HOTPLUG_PCI is not set
253# CONFIG_HAS_RAPIDIO is not set
246 254
247# 255#
248# Advanced setup 256# Advanced setup
@@ -252,11 +260,11 @@ CONFIG_PCI_LEGACY=y
252# 260#
253# Default settings for advanced configuration options are used 261# Default settings for advanced configuration options are used
254# 262#
255CONFIG_HIGHMEM_START=0xfe000000
256CONFIG_LOWMEM_SIZE=0x30000000 263CONFIG_LOWMEM_SIZE=0x30000000
264CONFIG_PAGE_OFFSET=0xc0000000
257CONFIG_KERNEL_START=0xc0000000 265CONFIG_KERNEL_START=0xc0000000
266CONFIG_PHYSICAL_START=0x00000000
258CONFIG_TASK_SIZE=0xc0000000 267CONFIG_TASK_SIZE=0xc0000000
259CONFIG_BOOT_LOAD=0x00800000
260 268
261# 269#
262# Networking 270# Networking
@@ -328,8 +336,10 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=m
328CONFIG_INET6_XFRM_MODE_BEET=m 336CONFIG_INET6_XFRM_MODE_BEET=m
329# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set 337# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
330CONFIG_IPV6_SIT=m 338CONFIG_IPV6_SIT=m
339CONFIG_IPV6_NDISC_NODETYPE=y
331CONFIG_IPV6_TUNNEL=m 340CONFIG_IPV6_TUNNEL=m
332# CONFIG_IPV6_MULTIPLE_TABLES is not set 341# CONFIG_IPV6_MULTIPLE_TABLES is not set
342# CONFIG_IPV6_MROUTE is not set
333# CONFIG_NETLABEL is not set 343# CONFIG_NETLABEL is not set
334# CONFIG_NETWORK_SECMARK is not set 344# CONFIG_NETWORK_SECMARK is not set
335CONFIG_NETFILTER=y 345CONFIG_NETFILTER=y
@@ -534,6 +544,7 @@ CONFIG_MTD_PARTITIONS=y
534# CONFIG_MTD_REDBOOT_PARTS is not set 544# CONFIG_MTD_REDBOOT_PARTS is not set
535# CONFIG_MTD_CMDLINE_PARTS is not set 545# CONFIG_MTD_CMDLINE_PARTS is not set
536# CONFIG_MTD_OF_PARTS is not set 546# CONFIG_MTD_OF_PARTS is not set
547# CONFIG_MTD_AR7_PARTS is not set
537 548
538# 549#
539# User Modules And Translation Layers 550# User Modules And Translation Layers
@@ -610,6 +621,7 @@ CONFIG_MTD_PHYSMAP_OF=y
610# 621#
611# CONFIG_MTD_UBI is not set 622# CONFIG_MTD_UBI is not set
612CONFIG_OF_DEVICE=y 623CONFIG_OF_DEVICE=y
624CONFIG_OF_I2C=y
613# CONFIG_PARPORT is not set 625# CONFIG_PARPORT is not set
614CONFIG_BLK_DEV=y 626CONFIG_BLK_DEV=y
615# CONFIG_BLK_DEV_FD is not set 627# CONFIG_BLK_DEV_FD is not set
@@ -727,7 +739,6 @@ CONFIG_NETDEV_1000=y
727# CONFIG_SIS190 is not set 739# CONFIG_SIS190 is not set
728# CONFIG_SKGE is not set 740# CONFIG_SKGE is not set
729# CONFIG_SKY2 is not set 741# CONFIG_SKY2 is not set
730# CONFIG_SK98LIN is not set
731# CONFIG_VIA_VELOCITY is not set 742# CONFIG_VIA_VELOCITY is not set
732# CONFIG_TIGON3 is not set 743# CONFIG_TIGON3 is not set
733# CONFIG_BNX2 is not set 744# CONFIG_BNX2 is not set
@@ -743,6 +754,7 @@ CONFIG_GIANFAR=y
743# 754#
744# CONFIG_WLAN_PRE80211 is not set 755# CONFIG_WLAN_PRE80211 is not set
745# CONFIG_WLAN_80211 is not set 756# CONFIG_WLAN_80211 is not set
757# CONFIG_IWLWIFI_LEDS is not set
746# CONFIG_WAN is not set 758# CONFIG_WAN is not set
747CONFIG_ATM_DRIVERS=y 759CONFIG_ATM_DRIVERS=y
748# CONFIG_ATM_DUMMY is not set 760# CONFIG_ATM_DUMMY is not set
@@ -825,6 +837,7 @@ CONFIG_VT=y
825CONFIG_VT_CONSOLE=y 837CONFIG_VT_CONSOLE=y
826CONFIG_HW_CONSOLE=y 838CONFIG_HW_CONSOLE=y
827# CONFIG_VT_HW_CONSOLE_BINDING is not set 839# CONFIG_VT_HW_CONSOLE_BINDING is not set
840CONFIG_DEVKMEM=y
828# CONFIG_SERIAL_NONSTANDARD is not set 841# CONFIG_SERIAL_NONSTANDARD is not set
829# CONFIG_NOZOMI is not set 842# CONFIG_NOZOMI is not set
830 843
@@ -863,13 +876,6 @@ CONFIG_I2C_BOARDINFO=y
863CONFIG_I2C_CHARDEV=y 876CONFIG_I2C_CHARDEV=y
864 877
865# 878#
866# I2C Algorithms
867#
868# CONFIG_I2C_ALGOBIT is not set
869# CONFIG_I2C_ALGOPCF is not set
870# CONFIG_I2C_ALGOPCA is not set
871
872#
873# I2C Hardware Bus support 879# I2C Hardware Bus support
874# 880#
875# CONFIG_I2C_ALI1535 is not set 881# CONFIG_I2C_ALI1535 is not set
@@ -895,6 +901,7 @@ CONFIG_I2C_MPC=y
895# CONFIG_I2C_VIA is not set 901# CONFIG_I2C_VIA is not set
896# CONFIG_I2C_VIAPRO is not set 902# CONFIG_I2C_VIAPRO is not set
897# CONFIG_I2C_VOODOO3 is not set 903# CONFIG_I2C_VOODOO3 is not set
904# CONFIG_I2C_PCA_PLATFORM is not set
898 905
899# 906#
900# Miscellaneous I2C Chip support 907# Miscellaneous I2C Chip support
@@ -904,19 +911,13 @@ CONFIG_I2C_MPC=y
904# CONFIG_SENSORS_PCF8574 is not set 911# CONFIG_SENSORS_PCF8574 is not set
905# CONFIG_PCF8575 is not set 912# CONFIG_PCF8575 is not set
906# CONFIG_SENSORS_PCF8591 is not set 913# CONFIG_SENSORS_PCF8591 is not set
907# CONFIG_TPS65010 is not set
908# CONFIG_SENSORS_MAX6875 is not set 914# CONFIG_SENSORS_MAX6875 is not set
909# CONFIG_SENSORS_TSL2550 is not set 915# CONFIG_SENSORS_TSL2550 is not set
910# CONFIG_I2C_DEBUG_CORE is not set 916# CONFIG_I2C_DEBUG_CORE is not set
911# CONFIG_I2C_DEBUG_ALGO is not set 917# CONFIG_I2C_DEBUG_ALGO is not set
912# CONFIG_I2C_DEBUG_BUS is not set 918# CONFIG_I2C_DEBUG_BUS is not set
913# CONFIG_I2C_DEBUG_CHIP is not set 919# CONFIG_I2C_DEBUG_CHIP is not set
914
915#
916# SPI support
917#
918# CONFIG_SPI is not set 920# CONFIG_SPI is not set
919# CONFIG_SPI_MASTER is not set
920# CONFIG_W1 is not set 921# CONFIG_W1 is not set
921# CONFIG_POWER_SUPPLY is not set 922# CONFIG_POWER_SUPPLY is not set
922CONFIG_HWMON=y 923CONFIG_HWMON=y
@@ -998,12 +999,22 @@ CONFIG_SSB_POSSIBLE=y
998# Multifunction device drivers 999# Multifunction device drivers
999# 1000#
1000# CONFIG_MFD_SM501 is not set 1001# CONFIG_MFD_SM501 is not set
1002# CONFIG_HTC_PASIC3 is not set
1001 1003
1002# 1004#
1003# Multimedia devices 1005# Multimedia devices
1004# 1006#
1007
1008#
1009# Multimedia core support
1010#
1005# CONFIG_VIDEO_DEV is not set 1011# CONFIG_VIDEO_DEV is not set
1006# CONFIG_DVB_CORE is not set 1012# CONFIG_DVB_CORE is not set
1013# CONFIG_VIDEO_MEDIA is not set
1014
1015#
1016# Multimedia drivers
1017#
1007CONFIG_DAB=y 1018CONFIG_DAB=y
1008 1019
1009# 1020#
@@ -1041,6 +1052,8 @@ CONFIG_USB_ARCH_HAS_HCD=y
1041CONFIG_USB_ARCH_HAS_OHCI=y 1052CONFIG_USB_ARCH_HAS_OHCI=y
1042CONFIG_USB_ARCH_HAS_EHCI=y 1053CONFIG_USB_ARCH_HAS_EHCI=y
1043# CONFIG_USB is not set 1054# CONFIG_USB is not set
1055# CONFIG_USB_OTG_WHITELIST is not set
1056# CONFIG_USB_OTG_BLACKLIST_HUB is not set
1044 1057
1045# 1058#
1046# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 1059# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -1049,14 +1062,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
1049# CONFIG_MMC is not set 1062# CONFIG_MMC is not set
1050# CONFIG_MEMSTICK is not set 1063# CONFIG_MEMSTICK is not set
1051# CONFIG_NEW_LEDS is not set 1064# CONFIG_NEW_LEDS is not set
1065# CONFIG_ACCESSIBILITY is not set
1052# CONFIG_INFINIBAND is not set 1066# CONFIG_INFINIBAND is not set
1053# CONFIG_EDAC is not set 1067# CONFIG_EDAC is not set
1054# CONFIG_RTC_CLASS is not set 1068# CONFIG_RTC_CLASS is not set
1055# CONFIG_DMADEVICES is not set 1069# CONFIG_DMADEVICES is not set
1056
1057#
1058# Userspace I/O
1059#
1060# CONFIG_UIO is not set 1070# CONFIG_UIO is not set
1061 1071
1062# 1072#
@@ -1084,8 +1094,8 @@ CONFIG_REISERFS_FS_POSIX_ACL=y
1084# CONFIG_JFS_FS is not set 1094# CONFIG_JFS_FS is not set
1085CONFIG_FS_POSIX_ACL=y 1095CONFIG_FS_POSIX_ACL=y
1086# CONFIG_XFS_FS is not set 1096# CONFIG_XFS_FS is not set
1087# CONFIG_GFS2_FS is not set
1088CONFIG_OCFS2_FS=m 1097CONFIG_OCFS2_FS=m
1098CONFIG_OCFS2_FS_O2CB=m
1089CONFIG_OCFS2_DEBUG_MASKLOG=y 1099CONFIG_OCFS2_DEBUG_MASKLOG=y
1090# CONFIG_OCFS2_DEBUG_FS is not set 1100# CONFIG_OCFS2_DEBUG_FS is not set
1091CONFIG_DNOTIFY=y 1101CONFIG_DNOTIFY=y
@@ -1145,7 +1155,6 @@ CONFIG_NFS_FS=y
1145CONFIG_NFS_V3=y 1155CONFIG_NFS_V3=y
1146# CONFIG_NFS_V3_ACL is not set 1156# CONFIG_NFS_V3_ACL is not set
1147CONFIG_NFS_V4=y 1157CONFIG_NFS_V4=y
1148CONFIG_NFS_DIRECTIO=y
1149# CONFIG_NFSD is not set 1158# CONFIG_NFSD is not set
1150CONFIG_ROOT_NFS=y 1159CONFIG_ROOT_NFS=y
1151CONFIG_LOCKD=y 1160CONFIG_LOCKD=y
@@ -1221,6 +1230,7 @@ CONFIG_NLS_UTF8=m
1221# Library routines 1230# Library routines
1222# 1231#
1223CONFIG_BITREVERSE=y 1232CONFIG_BITREVERSE=y
1233# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1224CONFIG_CRC_CCITT=m 1234CONFIG_CRC_CCITT=m
1225# CONFIG_CRC16 is not set 1235# CONFIG_CRC16 is not set
1226# CONFIG_CRC_ITU_T is not set 1236# CONFIG_CRC_ITU_T is not set
@@ -1241,6 +1251,7 @@ CONFIG_HAVE_LMB=y
1241# CONFIG_PRINTK_TIME is not set 1251# CONFIG_PRINTK_TIME is not set
1242CONFIG_ENABLE_WARN_DEPRECATED=y 1252CONFIG_ENABLE_WARN_DEPRECATED=y
1243CONFIG_ENABLE_MUST_CHECK=y 1253CONFIG_ENABLE_MUST_CHECK=y
1254CONFIG_FRAME_WARN=1024
1244CONFIG_MAGIC_SYSRQ=y 1255CONFIG_MAGIC_SYSRQ=y
1245# CONFIG_UNUSED_SYMBOLS is not set 1256# CONFIG_UNUSED_SYMBOLS is not set
1246CONFIG_DEBUG_FS=y 1257CONFIG_DEBUG_FS=y
@@ -1251,6 +1262,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
1251CONFIG_SCHED_DEBUG=y 1262CONFIG_SCHED_DEBUG=y
1252# CONFIG_SCHEDSTATS is not set 1263# CONFIG_SCHEDSTATS is not set
1253# CONFIG_TIMER_STATS is not set 1264# CONFIG_TIMER_STATS is not set
1265# CONFIG_DEBUG_OBJECTS is not set
1254# CONFIG_DEBUG_SLAB is not set 1266# CONFIG_DEBUG_SLAB is not set
1255# CONFIG_DEBUG_RT_MUTEXES is not set 1267# CONFIG_DEBUG_RT_MUTEXES is not set
1256# CONFIG_RT_MUTEX_TESTER is not set 1268# CONFIG_RT_MUTEX_TESTER is not set
@@ -1262,6 +1274,7 @@ CONFIG_SCHED_DEBUG=y
1262# CONFIG_DEBUG_BUGVERBOSE is not set 1274# CONFIG_DEBUG_BUGVERBOSE is not set
1263CONFIG_DEBUG_INFO=y 1275CONFIG_DEBUG_INFO=y
1264# CONFIG_DEBUG_VM is not set 1276# CONFIG_DEBUG_VM is not set
1277# CONFIG_DEBUG_WRITECOUNT is not set
1265# CONFIG_DEBUG_LIST is not set 1278# CONFIG_DEBUG_LIST is not set
1266# CONFIG_DEBUG_SG is not set 1279# CONFIG_DEBUG_SG is not set
1267# CONFIG_BOOT_PRINTK_DELAY is not set 1280# CONFIG_BOOT_PRINTK_DELAY is not set
@@ -1274,6 +1287,7 @@ CONFIG_DEBUG_INFO=y
1274# CONFIG_DEBUG_PAGEALLOC is not set 1287# CONFIG_DEBUG_PAGEALLOC is not set
1275CONFIG_DEBUGGER=y 1288CONFIG_DEBUGGER=y
1276# CONFIG_XMON is not set 1289# CONFIG_XMON is not set
1290# CONFIG_IRQSTACKS is not set
1277# CONFIG_VIRQ_DEBUG is not set 1291# CONFIG_VIRQ_DEBUG is not set
1278# CONFIG_BDI_SWITCH is not set 1292# CONFIG_BDI_SWITCH is not set
1279# CONFIG_PPC_EARLY_DEBUG is not set 1293# CONFIG_PPC_EARLY_DEBUG is not set
@@ -1289,54 +1303,84 @@ CONFIG_SECURITY_CAPABILITIES=y
1289# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1303# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1290CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0 1304CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0
1291CONFIG_CRYPTO=y 1305CONFIG_CRYPTO=y
1306
1307#
1308# Crypto core or helper
1309#
1292CONFIG_CRYPTO_ALGAPI=y 1310CONFIG_CRYPTO_ALGAPI=y
1293CONFIG_CRYPTO_AEAD=m 1311CONFIG_CRYPTO_AEAD=m
1294CONFIG_CRYPTO_BLKCIPHER=y 1312CONFIG_CRYPTO_BLKCIPHER=y
1295# CONFIG_CRYPTO_SEQIV is not set
1296CONFIG_CRYPTO_HASH=y 1313CONFIG_CRYPTO_HASH=y
1297CONFIG_CRYPTO_MANAGER=y 1314CONFIG_CRYPTO_MANAGER=y
1315# CONFIG_CRYPTO_GF128MUL is not set
1316CONFIG_CRYPTO_NULL=m
1317# CONFIG_CRYPTO_CRYPTD is not set
1318CONFIG_CRYPTO_AUTHENC=m
1319CONFIG_CRYPTO_TEST=m
1320
1321#
1322# Authenticated Encryption with Associated Data
1323#
1324# CONFIG_CRYPTO_CCM is not set
1325# CONFIG_CRYPTO_GCM is not set
1326# CONFIG_CRYPTO_SEQIV is not set
1327
1328#
1329# Block modes
1330#
1331CONFIG_CRYPTO_CBC=y
1332# CONFIG_CRYPTO_CTR is not set
1333# CONFIG_CRYPTO_CTS is not set
1334CONFIG_CRYPTO_ECB=m
1335# CONFIG_CRYPTO_LRW is not set
1336CONFIG_CRYPTO_PCBC=m
1337# CONFIG_CRYPTO_XTS is not set
1338
1339#
1340# Hash modes
1341#
1298CONFIG_CRYPTO_HMAC=y 1342CONFIG_CRYPTO_HMAC=y
1299# CONFIG_CRYPTO_XCBC is not set 1343# CONFIG_CRYPTO_XCBC is not set
1300CONFIG_CRYPTO_NULL=m 1344
1345#
1346# Digest
1347#
1348CONFIG_CRYPTO_CRC32C=m
1301CONFIG_CRYPTO_MD4=m 1349CONFIG_CRYPTO_MD4=m
1302CONFIG_CRYPTO_MD5=y 1350CONFIG_CRYPTO_MD5=y
1351CONFIG_CRYPTO_MICHAEL_MIC=m
1303CONFIG_CRYPTO_SHA1=m 1352CONFIG_CRYPTO_SHA1=m
1304CONFIG_CRYPTO_SHA256=m 1353CONFIG_CRYPTO_SHA256=m
1305CONFIG_CRYPTO_SHA512=m 1354CONFIG_CRYPTO_SHA512=m
1306CONFIG_CRYPTO_WP512=m
1307# CONFIG_CRYPTO_TGR192 is not set 1355# CONFIG_CRYPTO_TGR192 is not set
1308# CONFIG_CRYPTO_GF128MUL is not set 1356CONFIG_CRYPTO_WP512=m
1309CONFIG_CRYPTO_ECB=m 1357
1310CONFIG_CRYPTO_CBC=y 1358#
1311CONFIG_CRYPTO_PCBC=m 1359# Ciphers
1312# CONFIG_CRYPTO_LRW is not set 1360#
1313# CONFIG_CRYPTO_XTS is not set
1314# CONFIG_CRYPTO_CTR is not set
1315# CONFIG_CRYPTO_GCM is not set
1316# CONFIG_CRYPTO_CCM is not set
1317# CONFIG_CRYPTO_CRYPTD is not set
1318CONFIG_CRYPTO_DES=y
1319# CONFIG_CRYPTO_FCRYPT is not set
1320CONFIG_CRYPTO_BLOWFISH=m
1321CONFIG_CRYPTO_TWOFISH=m
1322CONFIG_CRYPTO_TWOFISH_COMMON=m
1323CONFIG_CRYPTO_SERPENT=m
1324CONFIG_CRYPTO_AES=m 1361CONFIG_CRYPTO_AES=m
1362CONFIG_CRYPTO_ANUBIS=m
1363CONFIG_CRYPTO_ARC4=m
1364CONFIG_CRYPTO_BLOWFISH=m
1365# CONFIG_CRYPTO_CAMELLIA is not set
1325CONFIG_CRYPTO_CAST5=m 1366CONFIG_CRYPTO_CAST5=m
1326CONFIG_CRYPTO_CAST6=m 1367CONFIG_CRYPTO_CAST6=m
1327CONFIG_CRYPTO_TEA=m 1368CONFIG_CRYPTO_DES=y
1328CONFIG_CRYPTO_ARC4=m 1369# CONFIG_CRYPTO_FCRYPT is not set
1329CONFIG_CRYPTO_KHAZAD=m 1370CONFIG_CRYPTO_KHAZAD=m
1330CONFIG_CRYPTO_ANUBIS=m
1331# CONFIG_CRYPTO_SEED is not set
1332# CONFIG_CRYPTO_SALSA20 is not set 1371# CONFIG_CRYPTO_SALSA20 is not set
1372# CONFIG_CRYPTO_SEED is not set
1373CONFIG_CRYPTO_SERPENT=m
1374CONFIG_CRYPTO_TEA=m
1375CONFIG_CRYPTO_TWOFISH=m
1376CONFIG_CRYPTO_TWOFISH_COMMON=m
1377
1378#
1379# Compression
1380#
1333CONFIG_CRYPTO_DEFLATE=m 1381CONFIG_CRYPTO_DEFLATE=m
1334CONFIG_CRYPTO_MICHAEL_MIC=m
1335CONFIG_CRYPTO_CRC32C=m
1336# CONFIG_CRYPTO_CAMELLIA is not set
1337CONFIG_CRYPTO_TEST=m
1338CONFIG_CRYPTO_AUTHENC=m
1339# CONFIG_CRYPTO_LZO is not set 1382# CONFIG_CRYPTO_LZO is not set
1340CONFIG_CRYPTO_HW=y 1383CONFIG_CRYPTO_HW=y
1341# CONFIG_CRYPTO_DEV_HIFN_795X is not set 1384# CONFIG_CRYPTO_DEV_HIFN_795X is not set
1342# CONFIG_PPC_CLOCK is not set 1385# CONFIG_PPC_CLOCK is not set
1386# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/configs/storcenter_defconfig b/arch/powerpc/configs/storcenter_defconfig
index fdbfd39a3aca..88f6aa8273be 100644
--- a/arch/powerpc/configs/storcenter_defconfig
+++ b/arch/powerpc/configs/storcenter_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.25-rc7 3# Linux kernel version: 2.6.26-rc5
4# Mon Mar 31 11:37:19 2008 4# Mon Jun 9 08:52:20 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -31,6 +31,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y 31CONFIG_GENERIC_HARDIRQS=y
32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set 32# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
33CONFIG_IRQ_PER_CPU=y 33CONFIG_IRQ_PER_CPU=y
34CONFIG_STACKTRACE_SUPPORT=y
35CONFIG_LOCKDEP_SUPPORT=y
34CONFIG_RWSEM_XCHGADD_ALGORITHM=y 36CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y 37CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y 38CONFIG_GENERIC_HWEIGHT=y
@@ -85,6 +87,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
85CONFIG_SYSCTL=y 87CONFIG_SYSCTL=y
86CONFIG_EMBEDDED=y 88CONFIG_EMBEDDED=y
87CONFIG_SYSCTL_SYSCALL=y 89CONFIG_SYSCTL_SYSCALL=y
90CONFIG_SYSCTL_SYSCALL_CHECK=y
88# CONFIG_KALLSYMS is not set 91# CONFIG_KALLSYMS is not set
89CONFIG_HOTPLUG=y 92CONFIG_HOTPLUG=y
90CONFIG_PRINTK=y 93CONFIG_PRINTK=y
@@ -109,12 +112,14 @@ CONFIG_SLUB=y
109CONFIG_HAVE_OPROFILE=y 112CONFIG_HAVE_OPROFILE=y
110CONFIG_HAVE_KPROBES=y 113CONFIG_HAVE_KPROBES=y
111CONFIG_HAVE_KRETPROBES=y 114CONFIG_HAVE_KRETPROBES=y
115# CONFIG_HAVE_DMA_ATTRS is not set
112CONFIG_PROC_PAGE_MONITOR=y 116CONFIG_PROC_PAGE_MONITOR=y
113CONFIG_SLABINFO=y 117CONFIG_SLABINFO=y
114CONFIG_RT_MUTEXES=y 118CONFIG_RT_MUTEXES=y
115# CONFIG_TINY_SHMEM is not set 119# CONFIG_TINY_SHMEM is not set
116CONFIG_BASE_SMALL=0 120CONFIG_BASE_SMALL=0
117CONFIG_MODULES=y 121CONFIG_MODULES=y
122# CONFIG_MODULE_FORCE_LOAD is not set
118CONFIG_MODULE_UNLOAD=y 123CONFIG_MODULE_UNLOAD=y
119# CONFIG_MODULE_FORCE_UNLOAD is not set 124# CONFIG_MODULE_FORCE_UNLOAD is not set
120# CONFIG_MODVERSIONS is not set 125# CONFIG_MODVERSIONS is not set
@@ -214,11 +219,13 @@ CONFIG_FLATMEM=y
214CONFIG_FLAT_NODE_MEM_MAP=y 219CONFIG_FLAT_NODE_MEM_MAP=y
215# CONFIG_SPARSEMEM_STATIC is not set 220# CONFIG_SPARSEMEM_STATIC is not set
216# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 221# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
222CONFIG_PAGEFLAGS_EXTENDED=y
217CONFIG_SPLIT_PTLOCK_CPUS=4 223CONFIG_SPLIT_PTLOCK_CPUS=4
218# CONFIG_RESOURCES_64BIT is not set 224# CONFIG_RESOURCES_64BIT is not set
219CONFIG_ZONE_DMA_FLAG=1 225CONFIG_ZONE_DMA_FLAG=1
220CONFIG_BOUNCE=y 226CONFIG_BOUNCE=y
221CONFIG_VIRT_TO_BUS=y 227CONFIG_VIRT_TO_BUS=y
228CONFIG_FORCE_MAX_ZONEORDER=11
222CONFIG_PROC_DEVICETREE=y 229CONFIG_PROC_DEVICETREE=y
223CONFIG_CMDLINE_BOOL=y 230CONFIG_CMDLINE_BOOL=y
224CONFIG_CMDLINE="console=ttyS0,115200" 231CONFIG_CMDLINE="console=ttyS0,115200"
@@ -242,6 +249,7 @@ CONFIG_ARCH_SUPPORTS_MSI=y
242CONFIG_PCI_LEGACY=y 249CONFIG_PCI_LEGACY=y
243# CONFIG_PCCARD is not set 250# CONFIG_PCCARD is not set
244# CONFIG_HOTPLUG_PCI is not set 251# CONFIG_HOTPLUG_PCI is not set
252# CONFIG_HAS_RAPIDIO is not set
245 253
246# 254#
247# Advanced setup 255# Advanced setup
@@ -251,11 +259,11 @@ CONFIG_PCI_LEGACY=y
251# 259#
252# Default settings for advanced configuration options are used 260# Default settings for advanced configuration options are used
253# 261#
254CONFIG_HIGHMEM_START=0xfe000000
255CONFIG_LOWMEM_SIZE=0x30000000 262CONFIG_LOWMEM_SIZE=0x30000000
263CONFIG_PAGE_OFFSET=0xc0000000
256CONFIG_KERNEL_START=0xc0000000 264CONFIG_KERNEL_START=0xc0000000
265CONFIG_PHYSICAL_START=0x00000000
257CONFIG_TASK_SIZE=0xc0000000 266CONFIG_TASK_SIZE=0xc0000000
258CONFIG_BOOT_LOAD=0x00800000
259 267
260# 268#
261# Networking 269# Networking
@@ -298,8 +306,6 @@ CONFIG_TCP_CONG_CUBIC=y
298CONFIG_DEFAULT_TCP_CONG="cubic" 306CONFIG_DEFAULT_TCP_CONG="cubic"
299# CONFIG_TCP_MD5SIG is not set 307# CONFIG_TCP_MD5SIG is not set
300# CONFIG_IPV6 is not set 308# CONFIG_IPV6 is not set
301# CONFIG_INET6_XFRM_TUNNEL is not set
302# CONFIG_INET6_TUNNEL is not set
303# CONFIG_NETWORK_SECMARK is not set 309# CONFIG_NETWORK_SECMARK is not set
304# CONFIG_NETFILTER is not set 310# CONFIG_NETFILTER is not set
305# CONFIG_IP_DCCP is not set 311# CONFIG_IP_DCCP is not set
@@ -358,6 +364,7 @@ CONFIG_MTD_PARTITIONS=y
358# CONFIG_MTD_REDBOOT_PARTS is not set 364# CONFIG_MTD_REDBOOT_PARTS is not set
359# CONFIG_MTD_CMDLINE_PARTS is not set 365# CONFIG_MTD_CMDLINE_PARTS is not set
360# CONFIG_MTD_OF_PARTS is not set 366# CONFIG_MTD_OF_PARTS is not set
367# CONFIG_MTD_AR7_PARTS is not set
361 368
362# 369#
363# User Modules And Translation Layers 370# User Modules And Translation Layers
@@ -433,6 +440,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=1
433# 440#
434# CONFIG_MTD_UBI is not set 441# CONFIG_MTD_UBI is not set
435CONFIG_OF_DEVICE=y 442CONFIG_OF_DEVICE=y
443CONFIG_OF_I2C=y
436# CONFIG_PARPORT is not set 444# CONFIG_PARPORT is not set
437CONFIG_BLK_DEV=y 445CONFIG_BLK_DEV=y
438# CONFIG_BLK_DEV_FD is not set 446# CONFIG_BLK_DEV_FD is not set
@@ -513,7 +521,7 @@ CONFIG_BLK_DEV_IDEDMA_PCI=y
513CONFIG_BLK_DEV_VIA82CXXX=y 521CONFIG_BLK_DEV_VIA82CXXX=y
514# CONFIG_BLK_DEV_TC86C001 is not set 522# CONFIG_BLK_DEV_TC86C001 is not set
515CONFIG_BLK_DEV_IDEDMA=y 523CONFIG_BLK_DEV_IDEDMA=y
516CONFIG_IDE_ARCH_OBSOLETE_INIT=y 524# CONFIG_BLK_DEV_HD_ONLY is not set
517# CONFIG_BLK_DEV_HD is not set 525# CONFIG_BLK_DEV_HD is not set
518 526
519# 527#
@@ -638,7 +646,6 @@ CONFIG_R8169=y
638# CONFIG_SIS190 is not set 646# CONFIG_SIS190 is not set
639# CONFIG_SKGE is not set 647# CONFIG_SKGE is not set
640# CONFIG_SKY2 is not set 648# CONFIG_SKY2 is not set
641# CONFIG_SK98LIN is not set
642# CONFIG_VIA_VELOCITY is not set 649# CONFIG_VIA_VELOCITY is not set
643# CONFIG_TIGON3 is not set 650# CONFIG_TIGON3 is not set
644# CONFIG_BNX2 is not set 651# CONFIG_BNX2 is not set
@@ -654,6 +661,7 @@ CONFIG_R8169=y
654# 661#
655# CONFIG_WLAN_PRE80211 is not set 662# CONFIG_WLAN_PRE80211 is not set
656# CONFIG_WLAN_80211 is not set 663# CONFIG_WLAN_80211 is not set
664# CONFIG_IWLWIFI_LEDS is not set
657 665
658# 666#
659# USB Network Adapters 667# USB Network Adapters
@@ -690,6 +698,7 @@ CONFIG_R8169=y
690# Character devices 698# Character devices
691# 699#
692# CONFIG_VT is not set 700# CONFIG_VT is not set
701CONFIG_DEVKMEM=y
693# CONFIG_SERIAL_NONSTANDARD is not set 702# CONFIG_SERIAL_NONSTANDARD is not set
694# CONFIG_NOZOMI is not set 703# CONFIG_NOZOMI is not set
695 704
@@ -717,7 +726,6 @@ CONFIG_LEGACY_PTY_COUNT=256
717# CONFIG_IPMI_HANDLER is not set 726# CONFIG_IPMI_HANDLER is not set
718CONFIG_HW_RANDOM=m 727CONFIG_HW_RANDOM=m
719CONFIG_NVRAM=y 728CONFIG_NVRAM=y
720# CONFIG_GEN_RTC is not set
721# CONFIG_R3964 is not set 729# CONFIG_R3964 is not set
722# CONFIG_APPLICOM is not set 730# CONFIG_APPLICOM is not set
723# CONFIG_RAW_DRIVER is not set 731# CONFIG_RAW_DRIVER is not set
@@ -728,13 +736,6 @@ CONFIG_I2C_BOARDINFO=y
728CONFIG_I2C_CHARDEV=y 736CONFIG_I2C_CHARDEV=y
729 737
730# 738#
731# I2C Algorithms
732#
733# CONFIG_I2C_ALGOBIT is not set
734# CONFIG_I2C_ALGOPCF is not set
735# CONFIG_I2C_ALGOPCA is not set
736
737#
738# I2C Hardware Bus support 739# I2C Hardware Bus support
739# 740#
740# CONFIG_I2C_ALI1535 is not set 741# CONFIG_I2C_ALI1535 is not set
@@ -761,6 +762,7 @@ CONFIG_I2C_MPC=y
761# CONFIG_I2C_VIA is not set 762# CONFIG_I2C_VIA is not set
762# CONFIG_I2C_VIAPRO is not set 763# CONFIG_I2C_VIAPRO is not set
763# CONFIG_I2C_VOODOO3 is not set 764# CONFIG_I2C_VOODOO3 is not set
765# CONFIG_I2C_PCA_PLATFORM is not set
764 766
765# 767#
766# Miscellaneous I2C Chip support 768# Miscellaneous I2C Chip support
@@ -770,19 +772,13 @@ CONFIG_I2C_MPC=y
770# CONFIG_SENSORS_PCF8574 is not set 772# CONFIG_SENSORS_PCF8574 is not set
771# CONFIG_PCF8575 is not set 773# CONFIG_PCF8575 is not set
772# CONFIG_SENSORS_PCF8591 is not set 774# CONFIG_SENSORS_PCF8591 is not set
773# CONFIG_TPS65010 is not set
774# CONFIG_SENSORS_MAX6875 is not set 775# CONFIG_SENSORS_MAX6875 is not set
775# CONFIG_SENSORS_TSL2550 is not set 776# CONFIG_SENSORS_TSL2550 is not set
776# CONFIG_I2C_DEBUG_CORE is not set 777# CONFIG_I2C_DEBUG_CORE is not set
777# CONFIG_I2C_DEBUG_ALGO is not set 778# CONFIG_I2C_DEBUG_ALGO is not set
778# CONFIG_I2C_DEBUG_BUS is not set 779# CONFIG_I2C_DEBUG_BUS is not set
779# CONFIG_I2C_DEBUG_CHIP is not set 780# CONFIG_I2C_DEBUG_CHIP is not set
780
781#
782# SPI support
783#
784# CONFIG_SPI is not set 781# CONFIG_SPI is not set
785# CONFIG_SPI_MASTER is not set
786# CONFIG_W1 is not set 782# CONFIG_W1 is not set
787# CONFIG_POWER_SUPPLY is not set 783# CONFIG_POWER_SUPPLY is not set
788# CONFIG_HWMON is not set 784# CONFIG_HWMON is not set
@@ -799,12 +795,22 @@ CONFIG_SSB_POSSIBLE=y
799# Multifunction device drivers 795# Multifunction device drivers
800# 796#
801# CONFIG_MFD_SM501 is not set 797# CONFIG_MFD_SM501 is not set
798# CONFIG_HTC_PASIC3 is not set
802 799
803# 800#
804# Multimedia devices 801# Multimedia devices
805# 802#
803
804#
805# Multimedia core support
806#
806# CONFIG_VIDEO_DEV is not set 807# CONFIG_VIDEO_DEV is not set
807# CONFIG_DVB_CORE is not set 808# CONFIG_DVB_CORE is not set
809# CONFIG_VIDEO_MEDIA is not set
810
811#
812# Multimedia drivers
813#
808# CONFIG_DAB is not set 814# CONFIG_DAB is not set
809 815
810# 816#
@@ -841,16 +847,20 @@ CONFIG_USB_DEVICEFS=y
841CONFIG_USB_DEVICE_CLASS=y 847CONFIG_USB_DEVICE_CLASS=y
842# CONFIG_USB_DYNAMIC_MINORS is not set 848# CONFIG_USB_DYNAMIC_MINORS is not set
843# CONFIG_USB_OTG is not set 849# CONFIG_USB_OTG is not set
850# CONFIG_USB_OTG_WHITELIST is not set
851# CONFIG_USB_OTG_BLACKLIST_HUB is not set
844 852
845# 853#
846# USB Host Controller Drivers 854# USB Host Controller Drivers
847# 855#
856# CONFIG_USB_C67X00_HCD is not set
848CONFIG_USB_EHCI_HCD=y 857CONFIG_USB_EHCI_HCD=y
849# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 858# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
850# CONFIG_USB_EHCI_TT_NEWSCHED is not set 859# CONFIG_USB_EHCI_TT_NEWSCHED is not set
851# CONFIG_USB_EHCI_FSL is not set 860# CONFIG_USB_EHCI_FSL is not set
852CONFIG_USB_EHCI_HCD_PPC_OF=y 861CONFIG_USB_EHCI_HCD_PPC_OF=y
853# CONFIG_USB_ISP116X_HCD is not set 862# CONFIG_USB_ISP116X_HCD is not set
863# CONFIG_USB_ISP1760_HCD is not set
854CONFIG_USB_OHCI_HCD=y 864CONFIG_USB_OHCI_HCD=y
855# CONFIG_USB_OHCI_HCD_PPC_OF is not set 865# CONFIG_USB_OHCI_HCD_PPC_OF is not set
856# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 866# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
@@ -865,6 +875,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
865# 875#
866# CONFIG_USB_ACM is not set 876# CONFIG_USB_ACM is not set
867# CONFIG_USB_PRINTER is not set 877# CONFIG_USB_PRINTER is not set
878# CONFIG_USB_WDM is not set
868 879
869# 880#
870# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 881# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -885,6 +896,7 @@ CONFIG_USB_STORAGE=y
885# CONFIG_USB_STORAGE_JUMPSHOT is not set 896# CONFIG_USB_STORAGE_JUMPSHOT is not set
886# CONFIG_USB_STORAGE_ALAUDA is not set 897# CONFIG_USB_STORAGE_ALAUDA is not set
887# CONFIG_USB_STORAGE_KARMA is not set 898# CONFIG_USB_STORAGE_KARMA is not set
899# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
888# CONFIG_USB_LIBUSUAL is not set 900# CONFIG_USB_LIBUSUAL is not set
889 901
890# 902#
@@ -922,10 +934,12 @@ CONFIG_USB_STORAGE=y
922# CONFIG_USB_TRANCEVIBRATOR is not set 934# CONFIG_USB_TRANCEVIBRATOR is not set
923# CONFIG_USB_IOWARRIOR is not set 935# CONFIG_USB_IOWARRIOR is not set
924# CONFIG_USB_TEST is not set 936# CONFIG_USB_TEST is not set
937# CONFIG_USB_ISIGHTFW is not set
925# CONFIG_USB_GADGET is not set 938# CONFIG_USB_GADGET is not set
926# CONFIG_MMC is not set 939# CONFIG_MMC is not set
927# CONFIG_MEMSTICK is not set 940# CONFIG_MEMSTICK is not set
928# CONFIG_NEW_LEDS is not set 941# CONFIG_NEW_LEDS is not set
942# CONFIG_ACCESSIBILITY is not set
929# CONFIG_INFINIBAND is not set 943# CONFIG_INFINIBAND is not set
930# CONFIG_EDAC is not set 944# CONFIG_EDAC is not set
931CONFIG_RTC_LIB=y 945CONFIG_RTC_LIB=y
@@ -977,11 +991,8 @@ CONFIG_RTC_DRV_DS1307=y
977# 991#
978# on-CPU RTC drivers 992# on-CPU RTC drivers
979# 993#
994# CONFIG_RTC_DRV_PPC is not set
980# CONFIG_DMADEVICES is not set 995# CONFIG_DMADEVICES is not set
981
982#
983# Userspace I/O
984#
985# CONFIG_UIO is not set 996# CONFIG_UIO is not set
986 997
987# 998#
@@ -1002,10 +1013,9 @@ CONFIG_FS_MBCACHE=y
1002# CONFIG_FS_POSIX_ACL is not set 1013# CONFIG_FS_POSIX_ACL is not set
1003CONFIG_XFS_FS=m 1014CONFIG_XFS_FS=m
1004# CONFIG_XFS_QUOTA is not set 1015# CONFIG_XFS_QUOTA is not set
1005# CONFIG_XFS_SECURITY is not set
1006# CONFIG_XFS_POSIX_ACL is not set 1016# CONFIG_XFS_POSIX_ACL is not set
1007# CONFIG_XFS_RT is not set 1017# CONFIG_XFS_RT is not set
1008# CONFIG_GFS2_FS is not set 1018# CONFIG_XFS_DEBUG is not set
1009# CONFIG_OCFS2_FS is not set 1019# CONFIG_OCFS2_FS is not set
1010CONFIG_DNOTIFY=y 1020CONFIG_DNOTIFY=y
1011CONFIG_INOTIFY=y 1021CONFIG_INOTIFY=y
@@ -1138,6 +1148,7 @@ CONFIG_NLS_UTF8=y
1138# Library routines 1148# Library routines
1139# 1149#
1140CONFIG_BITREVERSE=y 1150CONFIG_BITREVERSE=y
1151# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1141# CONFIG_CRC_CCITT is not set 1152# CONFIG_CRC_CCITT is not set
1142# CONFIG_CRC16 is not set 1153# CONFIG_CRC16 is not set
1143# CONFIG_CRC_ITU_T is not set 1154# CONFIG_CRC_ITU_T is not set
@@ -1150,6 +1161,7 @@ CONFIG_PLIST=y
1150CONFIG_HAS_IOMEM=y 1161CONFIG_HAS_IOMEM=y
1151CONFIG_HAS_IOPORT=y 1162CONFIG_HAS_IOPORT=y
1152CONFIG_HAS_DMA=y 1163CONFIG_HAS_DMA=y
1164CONFIG_HAVE_LMB=y
1153 1165
1154# 1166#
1155# Kernel hacking 1167# Kernel hacking
@@ -1157,6 +1169,7 @@ CONFIG_HAS_DMA=y
1157# CONFIG_PRINTK_TIME is not set 1169# CONFIG_PRINTK_TIME is not set
1158# CONFIG_ENABLE_WARN_DEPRECATED is not set 1170# CONFIG_ENABLE_WARN_DEPRECATED is not set
1159# CONFIG_ENABLE_MUST_CHECK is not set 1171# CONFIG_ENABLE_MUST_CHECK is not set
1172CONFIG_FRAME_WARN=1024
1160# CONFIG_MAGIC_SYSRQ is not set 1173# CONFIG_MAGIC_SYSRQ is not set
1161# CONFIG_UNUSED_SYMBOLS is not set 1174# CONFIG_UNUSED_SYMBOLS is not set
1162# CONFIG_DEBUG_FS is not set 1175# CONFIG_DEBUG_FS is not set
@@ -1166,6 +1179,7 @@ CONFIG_HAS_DMA=y
1166# CONFIG_SLUB_STATS is not set 1179# CONFIG_SLUB_STATS is not set
1167# CONFIG_DEBUG_BUGVERBOSE is not set 1180# CONFIG_DEBUG_BUGVERBOSE is not set
1168# CONFIG_SAMPLES is not set 1181# CONFIG_SAMPLES is not set
1182# CONFIG_IRQSTACKS is not set
1169# CONFIG_BOOTX_TEXT is not set 1183# CONFIG_BOOTX_TEXT is not set
1170# CONFIG_PPC_EARLY_DEBUG is not set 1184# CONFIG_PPC_EARLY_DEBUG is not set
1171 1185
@@ -1181,3 +1195,4 @@ CONFIG_ASYNC_MEMCPY=y
1181CONFIG_ASYNC_XOR=y 1195CONFIG_ASYNC_XOR=y
1182# CONFIG_CRYPTO is not set 1196# CONFIG_CRYPTO is not set
1183# CONFIG_PPC_CLOCK is not set 1197# CONFIG_PPC_CLOCK is not set
1198# CONFIG_VIRTUALIZATION is not set
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S
index c2b9dc4fce5d..22b5d2c459a3 100644
--- a/arch/powerpc/kernel/head_44x.S
+++ b/arch/powerpc/kernel/head_44x.S
@@ -368,7 +368,12 @@ interrupt_base:
368 368
369 rlwimi r11,r13,0,26,31 /* Insert static perms */ 369 rlwimi r11,r13,0,26,31 /* Insert static perms */
370 370
371 rlwinm r11,r11,0,20,15 /* Clear U0-U3 */ 371 /*
372 * Clear U0-U3 and WL1 IL1I IL1D IL2I IL2D bits which are added
373 * on newer 440 cores like the 440x6 used on AMCC 460EX/460GT (see
374 * include/asm-powerpc/pgtable-ppc32.h for details).
375 */
376 rlwinm r11,r11,0,20,10
372 377
373 /* find the TLB index that caused the fault. It has to be here. */ 378 /* find the TLB index that caused the fault. It has to be here. */
374 tlbsx r10, 0, r10 379 tlbsx r10, 0, r10
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 2f73f705d564..bcc249d90c4d 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -1073,7 +1073,7 @@ static const struct file_operations virq_debug_fops = {
1073static int __init irq_debugfs_init(void) 1073static int __init irq_debugfs_init(void)
1074{ 1074{
1075 if (debugfs_create_file("virq_mapping", S_IRUGO, powerpc_debugfs_root, 1075 if (debugfs_create_file("virq_mapping", S_IRUGO, powerpc_debugfs_root,
1076 NULL, &virq_debug_fops)) 1076 NULL, &virq_debug_fops) == NULL)
1077 return -ENOMEM; 1077 return -ENOMEM;
1078 1078
1079 return 0; 1079 return 0;
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c
index 61dd17449ddc..cf37f5ca4b71 100644
--- a/arch/powerpc/kernel/legacy_serial.c
+++ b/arch/powerpc/kernel/legacy_serial.c
@@ -136,6 +136,11 @@ static int __init add_legacy_soc_port(struct device_node *np,
136 if (of_get_property(np, "clock-frequency", NULL) == NULL) 136 if (of_get_property(np, "clock-frequency", NULL) == NULL)
137 return -1; 137 return -1;
138 138
139 /* if reg-shift or offset, don't try to use it */
140 if ((of_get_property(np, "reg-shift", NULL) != NULL) ||
141 (of_get_property(np, "reg-offset", NULL) != NULL))
142 return -1;
143
139 /* if rtas uses this device, don't try to use it as well */ 144 /* if rtas uses this device, don't try to use it as well */
140 if (of_get_property(np, "used-by-rtas", NULL) != NULL) 145 if (of_get_property(np, "used-by-rtas", NULL) != NULL)
141 return -1; 146 return -1;
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 52750745edfd..30eedfc5a566 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -189,7 +189,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
189 189
190 dev->cfg_size = pci_cfg_space_size(dev); 190 dev->cfg_size = pci_cfg_space_size(dev);
191 191
192 sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus), 192 dev_set_name(&dev->dev, "%04x:%02x:%02x.%d", pci_domain_nr(bus),
193 dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); 193 dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn));
194 dev->class = get_int_prop(node, "class-code", 0); 194 dev->class = get_int_prop(node, "class-code", 0);
195 dev->revision = get_int_prop(node, "revision-id", 0); 195 dev->revision = get_int_prop(node, "revision-id", 0);
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c
index cf6b5a7d8b3f..d3ac631cbd26 100644
--- a/arch/powerpc/kernel/ppc_ksyms.c
+++ b/arch/powerpc/kernel/ppc_ksyms.c
@@ -8,7 +8,6 @@
8#include <linux/screen_info.h> 8#include <linux/screen_info.h>
9#include <linux/vt_kern.h> 9#include <linux/vt_kern.h>
10#include <linux/nvram.h> 10#include <linux/nvram.h>
11#include <linux/console.h>
12#include <linux/irq.h> 11#include <linux/irq.h>
13#include <linux/pci.h> 12#include <linux/pci.h>
14#include <linux/delay.h> 13#include <linux/delay.h>
@@ -160,7 +159,6 @@ EXPORT_SYMBOL(screen_info);
160EXPORT_SYMBOL(timer_interrupt); 159EXPORT_SYMBOL(timer_interrupt);
161EXPORT_SYMBOL(irq_desc); 160EXPORT_SYMBOL(irq_desc);
162EXPORT_SYMBOL(tb_ticks_per_jiffy); 161EXPORT_SYMBOL(tb_ticks_per_jiffy);
163EXPORT_SYMBOL(console_drivers);
164EXPORT_SYMBOL(cacheable_memcpy); 162EXPORT_SYMBOL(cacheable_memcpy);
165#endif 163#endif
166 164
diff --git a/arch/powerpc/kernel/prom_init_check.sh b/arch/powerpc/kernel/prom_init_check.sh
index 8e24fc1821e8..2c7e8e87f770 100644
--- a/arch/powerpc/kernel/prom_init_check.sh
+++ b/arch/powerpc/kernel/prom_init_check.sh
@@ -20,7 +20,7 @@ WHITELIST="add_reloc_offset __bss_start __bss_stop copy_and_flush
20_end enter_prom memcpy memset reloc_offset __secondary_hold 20_end enter_prom memcpy memset reloc_offset __secondary_hold
21__secondary_hold_acknowledge __secondary_hold_spinloop __start 21__secondary_hold_acknowledge __secondary_hold_spinloop __start
22strcmp strcpy strlcpy strlen strncmp strstr logo_linux_clut224 22strcmp strcpy strlcpy strlen strncmp strstr logo_linux_clut224
23reloc_got2" 23reloc_got2 kernstart_addr"
24 24
25NM="$1" 25NM="$1"
26OBJ="$2" 26OBJ="$2"
@@ -48,6 +48,20 @@ do
48 fi 48 fi
49 done 49 done
50 50
51 # ignore register save/restore funcitons
52 if [ "${UNDEF:0:9}" = "_restgpr_" ]; then
53 OK=1
54 fi
55 if [ "${UNDEF:0:11}" = "_rest32gpr_" ]; then
56 OK=1
57 fi
58 if [ "${UNDEF:0:9}" = "_savegpr_" ]; then
59 OK=1
60 fi
61 if [ "${UNDEF:0:11}" = "_save32gpr_" ]; then
62 OK=1
63 fi
64
51 if [ $OK -eq 0 ]; then 65 if [ $OK -eq 0 ]; then
52 ERROR=1 66 ERROR=1
53 echo "Error: External symbol '$UNDEF' referenced" \ 67 echo "Error: External symbol '$UNDEF' referenced" \
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
index faeb8f207ea4..da7c058e3731 100644
--- a/arch/powerpc/kernel/signal_64.c
+++ b/arch/powerpc/kernel/signal_64.c
@@ -87,6 +87,7 @@ static long setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,
87#ifdef CONFIG_ALTIVEC 87#ifdef CONFIG_ALTIVEC
88 elf_vrreg_t __user *v_regs = (elf_vrreg_t __user *)(((unsigned long)sc->vmx_reserve + 15) & ~0xful); 88 elf_vrreg_t __user *v_regs = (elf_vrreg_t __user *)(((unsigned long)sc->vmx_reserve + 15) & ~0xful);
89#endif 89#endif
90 unsigned long msr = regs->msr;
90 long err = 0; 91 long err = 0;
91 92
92 flush_fp_to_thread(current); 93 flush_fp_to_thread(current);
@@ -102,7 +103,7 @@ static long setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,
102 /* set MSR_VEC in the MSR value in the frame to indicate that sc->v_reg) 103 /* set MSR_VEC in the MSR value in the frame to indicate that sc->v_reg)
103 * contains valid data. 104 * contains valid data.
104 */ 105 */
105 regs->msr |= MSR_VEC; 106 msr |= MSR_VEC;
106 } 107 }
107 /* We always copy to/from vrsave, it's 0 if we don't have or don't 108 /* We always copy to/from vrsave, it's 0 if we don't have or don't
108 * use altivec. 109 * use altivec.
@@ -114,6 +115,7 @@ static long setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,
114 err |= __put_user(&sc->gp_regs, &sc->regs); 115 err |= __put_user(&sc->gp_regs, &sc->regs);
115 WARN_ON(!FULL_REGS(regs)); 116 WARN_ON(!FULL_REGS(regs));
116 err |= __copy_to_user(&sc->gp_regs, regs, GP_REGS_SIZE); 117 err |= __copy_to_user(&sc->gp_regs, regs, GP_REGS_SIZE);
118 err |= __put_user(msr, &sc->gp_regs[PT_MSR]);
117 err |= __copy_to_user(&sc->fp_regs, &current->thread.fpr, FP_REGS_SIZE); 119 err |= __copy_to_user(&sc->fp_regs, &current->thread.fpr, FP_REGS_SIZE);
118 err |= __put_user(signr, &sc->signal); 120 err |= __put_user(signr, &sc->signal);
119 err |= __put_user(handler, &sc->handler); 121 err |= __put_user(handler, &sc->handler);
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index c21a626af676..ce245a850db2 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -142,7 +142,7 @@ static void dump_one_vdso_page(struct page *pg, struct page *upg)
142 printk("kpg: %p (c:%d,f:%08lx)", __va(page_to_pfn(pg) << PAGE_SHIFT), 142 printk("kpg: %p (c:%d,f:%08lx)", __va(page_to_pfn(pg) << PAGE_SHIFT),
143 page_count(pg), 143 page_count(pg),
144 pg->flags); 144 pg->flags);
145 if (upg/* && pg != upg*/) { 145 if (upg && !IS_ERR(upg) /* && pg != upg*/) {
146 printk(" upg: %p (c:%d,f:%08lx)", __va(page_to_pfn(upg) 146 printk(" upg: %p (c:%d,f:%08lx)", __va(page_to_pfn(upg)
147 << PAGE_SHIFT), 147 << PAGE_SHIFT),
148 page_count(upg), 148 page_count(upg),
diff --git a/arch/powerpc/kvm/44x_tlb.c b/arch/powerpc/kvm/44x_tlb.c
index f5d7a5eab96e..75dff7cfa814 100644
--- a/arch/powerpc/kvm/44x_tlb.c
+++ b/arch/powerpc/kvm/44x_tlb.c
@@ -116,8 +116,6 @@ static void kvmppc_44x_shadow_release(struct kvm_vcpu *vcpu,
116 struct tlbe *stlbe = &vcpu->arch.shadow_tlb[index]; 116 struct tlbe *stlbe = &vcpu->arch.shadow_tlb[index];
117 struct page *page = vcpu->arch.shadow_pages[index]; 117 struct page *page = vcpu->arch.shadow_pages[index];
118 118
119 kunmap(vcpu->arch.shadow_pages[index]);
120
121 if (get_tlb_v(stlbe)) { 119 if (get_tlb_v(stlbe)) {
122 if (kvmppc_44x_tlbe_is_writable(stlbe)) 120 if (kvmppc_44x_tlbe_is_writable(stlbe))
123 kvm_release_page_dirty(page); 121 kvm_release_page_dirty(page);
@@ -144,18 +142,19 @@ void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 gvaddr, gfn_t gfn, u64 asid,
144 stlbe = &vcpu->arch.shadow_tlb[victim]; 142 stlbe = &vcpu->arch.shadow_tlb[victim];
145 143
146 /* Get reference to new page. */ 144 /* Get reference to new page. */
147 down_write(&current->mm->mmap_sem); 145 down_read(&current->mm->mmap_sem);
148 new_page = gfn_to_page(vcpu->kvm, gfn); 146 new_page = gfn_to_page(vcpu->kvm, gfn);
149 if (is_error_page(new_page)) { 147 if (is_error_page(new_page)) {
150 printk(KERN_ERR "Couldn't get guest page!\n"); 148 printk(KERN_ERR "Couldn't get guest page for gfn %lx!\n", gfn);
151 kvm_release_page_clean(new_page); 149 kvm_release_page_clean(new_page);
150 up_read(&current->mm->mmap_sem);
152 return; 151 return;
153 } 152 }
154 hpaddr = page_to_phys(new_page); 153 hpaddr = page_to_phys(new_page);
155 154
156 /* Drop reference to old page. */ 155 /* Drop reference to old page. */
157 kvmppc_44x_shadow_release(vcpu, victim); 156 kvmppc_44x_shadow_release(vcpu, victim);
158 up_write(&current->mm->mmap_sem); 157 up_read(&current->mm->mmap_sem);
159 158
160 vcpu->arch.shadow_pages[victim] = new_page; 159 vcpu->arch.shadow_pages[victim] = new_page;
161 160
diff --git a/arch/powerpc/kvm/booke_guest.c b/arch/powerpc/kvm/booke_guest.c
index 712d89a28c46..9c8ad850c6e3 100644
--- a/arch/powerpc/kvm/booke_guest.c
+++ b/arch/powerpc/kvm/booke_guest.c
@@ -227,39 +227,6 @@ void kvmppc_check_and_deliver_interrupts(struct kvm_vcpu *vcpu)
227 } 227 }
228} 228}
229 229
230static int kvmppc_emulate_mmio(struct kvm_run *run, struct kvm_vcpu *vcpu)
231{
232 enum emulation_result er;
233 int r;
234
235 er = kvmppc_emulate_instruction(run, vcpu);
236 switch (er) {
237 case EMULATE_DONE:
238 /* Future optimization: only reload non-volatiles if they were
239 * actually modified. */
240 r = RESUME_GUEST_NV;
241 break;
242 case EMULATE_DO_MMIO:
243 run->exit_reason = KVM_EXIT_MMIO;
244 /* We must reload nonvolatiles because "update" load/store
245 * instructions modify register state. */
246 /* Future optimization: only reload non-volatiles if they were
247 * actually modified. */
248 r = RESUME_HOST_NV;
249 break;
250 case EMULATE_FAIL:
251 /* XXX Deliver Program interrupt to guest. */
252 printk(KERN_EMERG "%s: emulation failed (%08x)\n", __func__,
253 vcpu->arch.last_inst);
254 r = RESUME_HOST;
255 break;
256 default:
257 BUG();
258 }
259
260 return r;
261}
262
263/** 230/**
264 * kvmppc_handle_exit 231 * kvmppc_handle_exit
265 * 232 *
diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c
index a03fe0c80698..000097461283 100644
--- a/arch/powerpc/kvm/emulate.c
+++ b/arch/powerpc/kvm/emulate.c
@@ -246,6 +246,11 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu)
246 case 31: 246 case 31:
247 switch (get_xop(inst)) { 247 switch (get_xop(inst)) {
248 248
249 case 23: /* lwzx */
250 rt = get_rt(inst);
251 emulated = kvmppc_handle_load(run, vcpu, rt, 4, 1);
252 break;
253
249 case 83: /* mfmsr */ 254 case 83: /* mfmsr */
250 rt = get_rt(inst); 255 rt = get_rt(inst);
251 vcpu->arch.gpr[rt] = vcpu->arch.msr; 256 vcpu->arch.gpr[rt] = vcpu->arch.msr;
@@ -267,6 +272,13 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu)
267 kvmppc_set_msr(vcpu, vcpu->arch.gpr[rs]); 272 kvmppc_set_msr(vcpu, vcpu->arch.gpr[rs]);
268 break; 273 break;
269 274
275 case 151: /* stwx */
276 rs = get_rs(inst);
277 emulated = kvmppc_handle_store(run, vcpu,
278 vcpu->arch.gpr[rs],
279 4, 1);
280 break;
281
270 case 163: /* wrteei */ 282 case 163: /* wrteei */
271 vcpu->arch.msr = (vcpu->arch.msr & ~MSR_EE) 283 vcpu->arch.msr = (vcpu->arch.msr & ~MSR_EE)
272 | (inst & MSR_EE); 284 | (inst & MSR_EE);
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
index c71d37dc6a88..e522b06cc42f 100644
--- a/arch/powerpc/lib/Makefile
+++ b/arch/powerpc/lib/Makefile
@@ -9,7 +9,7 @@ endif
9ifeq ($(CONFIG_PPC_MERGE),y) 9ifeq ($(CONFIG_PPC_MERGE),y)
10obj-y := string.o alloc.o \ 10obj-y := string.o alloc.o \
11 checksum_$(CONFIG_WORD_SIZE).o 11 checksum_$(CONFIG_WORD_SIZE).o
12obj-$(CONFIG_PPC32) += div64.o copy_32.o 12obj-$(CONFIG_PPC32) += div64.o copy_32.o crtsavres.o
13obj-$(CONFIG_HAS_IOMEM) += devres.o 13obj-$(CONFIG_HAS_IOMEM) += devres.o
14endif 14endif
15 15
diff --git a/arch/powerpc/lib/crtsavres.S b/arch/powerpc/lib/crtsavres.S
new file mode 100644
index 000000000000..70a9cd8a3008
--- /dev/null
+++ b/arch/powerpc/lib/crtsavres.S
@@ -0,0 +1,229 @@
1/*
2 * Special support for eabi and SVR4
3 *
4 * Copyright (C) 1995, 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
5 * Copyright 2008 Freescale Semiconductor, Inc.
6 * Written By Michael Meissner
7 *
8 * Based on gcc/config/rs6000/crtsavres.asm from gcc
9 *
10 * This file 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, or (at your option) any
13 * later version.
14 *
15 * In addition to the permissions in the GNU General Public License, the
16 * Free Software Foundation gives you unlimited permission to link the
17 * compiled version of this file with other programs, and to distribute
18 * those programs without any restriction coming from the use of this
19 * file. (The General Public License restrictions do apply in other
20 * respects; for example, they cover modification of the file, and
21 * distribution when not linked into another program.)
22 *
23 * This file is distributed in the hope that it will be useful, but
24 * WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
26 * General Public License for more details.
27 *
28 * You should have received a copy of the GNU General Public License
29 * along with this program; see the file COPYING. If not, write to
30 * the Free Software Foundation, 51 Franklin Street, Fifth Floor,
31 * Boston, MA 02110-1301, USA.
32 *
33 * As a special exception, if you link this library with files
34 * compiled with GCC to produce an executable, this does not cause
35 * the resulting executable to be covered by the GNU General Public License.
36 * This exception does not however invalidate any other reasons why
37 * the executable file might be covered by the GNU General Public License.
38 */
39
40#include <asm/ppc_asm.h>
41
42 .file "crtsavres.S"
43 .section ".text"
44
45#ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
46
47/* Routines for saving integer registers, called by the compiler. */
48/* Called with r11 pointing to the stack header word of the caller of the */
49/* function, just beyond the end of the integer save area. */
50
51_GLOBAL(_savegpr_14)
52_GLOBAL(_save32gpr_14)
53 stw 14,-72(11) /* save gp registers */
54_GLOBAL(_savegpr_15)
55_GLOBAL(_save32gpr_15)
56 stw 15,-68(11)
57_GLOBAL(_savegpr_16)
58_GLOBAL(_save32gpr_16)
59 stw 16,-64(11)
60_GLOBAL(_savegpr_17)
61_GLOBAL(_save32gpr_17)
62 stw 17,-60(11)
63_GLOBAL(_savegpr_18)
64_GLOBAL(_save32gpr_18)
65 stw 18,-56(11)
66_GLOBAL(_savegpr_19)
67_GLOBAL(_save32gpr_19)
68 stw 19,-52(11)
69_GLOBAL(_savegpr_20)
70_GLOBAL(_save32gpr_20)
71 stw 20,-48(11)
72_GLOBAL(_savegpr_21)
73_GLOBAL(_save32gpr_21)
74 stw 21,-44(11)
75_GLOBAL(_savegpr_22)
76_GLOBAL(_save32gpr_22)
77 stw 22,-40(11)
78_GLOBAL(_savegpr_23)
79_GLOBAL(_save32gpr_23)
80 stw 23,-36(11)
81_GLOBAL(_savegpr_24)
82_GLOBAL(_save32gpr_24)
83 stw 24,-32(11)
84_GLOBAL(_savegpr_25)
85_GLOBAL(_save32gpr_25)
86 stw 25,-28(11)
87_GLOBAL(_savegpr_26)
88_GLOBAL(_save32gpr_26)
89 stw 26,-24(11)
90_GLOBAL(_savegpr_27)
91_GLOBAL(_save32gpr_27)
92 stw 27,-20(11)
93_GLOBAL(_savegpr_28)
94_GLOBAL(_save32gpr_28)
95 stw 28,-16(11)
96_GLOBAL(_savegpr_29)
97_GLOBAL(_save32gpr_29)
98 stw 29,-12(11)
99_GLOBAL(_savegpr_30)
100_GLOBAL(_save32gpr_30)
101 stw 30,-8(11)
102_GLOBAL(_savegpr_31)
103_GLOBAL(_save32gpr_31)
104 stw 31,-4(11)
105 blr
106
107/* Routines for restoring integer registers, called by the compiler. */
108/* Called with r11 pointing to the stack header word of the caller of the */
109/* function, just beyond the end of the integer restore area. */
110
111_GLOBAL(_restgpr_14)
112_GLOBAL(_rest32gpr_14)
113 lwz 14,-72(11) /* restore gp registers */
114_GLOBAL(_restgpr_15)
115_GLOBAL(_rest32gpr_15)
116 lwz 15,-68(11)
117_GLOBAL(_restgpr_16)
118_GLOBAL(_rest32gpr_16)
119 lwz 16,-64(11)
120_GLOBAL(_restgpr_17)
121_GLOBAL(_rest32gpr_17)
122 lwz 17,-60(11)
123_GLOBAL(_restgpr_18)
124_GLOBAL(_rest32gpr_18)
125 lwz 18,-56(11)
126_GLOBAL(_restgpr_19)
127_GLOBAL(_rest32gpr_19)
128 lwz 19,-52(11)
129_GLOBAL(_restgpr_20)
130_GLOBAL(_rest32gpr_20)
131 lwz 20,-48(11)
132_GLOBAL(_restgpr_21)
133_GLOBAL(_rest32gpr_21)
134 lwz 21,-44(11)
135_GLOBAL(_restgpr_22)
136_GLOBAL(_rest32gpr_22)
137 lwz 22,-40(11)
138_GLOBAL(_restgpr_23)
139_GLOBAL(_rest32gpr_23)
140 lwz 23,-36(11)
141_GLOBAL(_restgpr_24)
142_GLOBAL(_rest32gpr_24)
143 lwz 24,-32(11)
144_GLOBAL(_restgpr_25)
145_GLOBAL(_rest32gpr_25)
146 lwz 25,-28(11)
147_GLOBAL(_restgpr_26)
148_GLOBAL(_rest32gpr_26)
149 lwz 26,-24(11)
150_GLOBAL(_restgpr_27)
151_GLOBAL(_rest32gpr_27)
152 lwz 27,-20(11)
153_GLOBAL(_restgpr_28)
154_GLOBAL(_rest32gpr_28)
155 lwz 28,-16(11)
156_GLOBAL(_restgpr_29)
157_GLOBAL(_rest32gpr_29)
158 lwz 29,-12(11)
159_GLOBAL(_restgpr_30)
160_GLOBAL(_rest32gpr_30)
161 lwz 30,-8(11)
162_GLOBAL(_restgpr_31)
163_GLOBAL(_rest32gpr_31)
164 lwz 31,-4(11)
165 blr
166
167/* Routines for restoring integer registers, called by the compiler. */
168/* Called with r11 pointing to the stack header word of the caller of the */
169/* function, just beyond the end of the integer restore area. */
170
171_GLOBAL(_restgpr_14_x)
172_GLOBAL(_rest32gpr_14_x)
173 lwz 14,-72(11) /* restore gp registers */
174_GLOBAL(_restgpr_15_x)
175_GLOBAL(_rest32gpr_15_x)
176 lwz 15,-68(11)
177_GLOBAL(_restgpr_16_x)
178_GLOBAL(_rest32gpr_16_x)
179 lwz 16,-64(11)
180_GLOBAL(_restgpr_17_x)
181_GLOBAL(_rest32gpr_17_x)
182 lwz 17,-60(11)
183_GLOBAL(_restgpr_18_x)
184_GLOBAL(_rest32gpr_18_x)
185 lwz 18,-56(11)
186_GLOBAL(_restgpr_19_x)
187_GLOBAL(_rest32gpr_19_x)
188 lwz 19,-52(11)
189_GLOBAL(_restgpr_20_x)
190_GLOBAL(_rest32gpr_20_x)
191 lwz 20,-48(11)
192_GLOBAL(_restgpr_21_x)
193_GLOBAL(_rest32gpr_21_x)
194 lwz 21,-44(11)
195_GLOBAL(_restgpr_22_x)
196_GLOBAL(_rest32gpr_22_x)
197 lwz 22,-40(11)
198_GLOBAL(_restgpr_23_x)
199_GLOBAL(_rest32gpr_23_x)
200 lwz 23,-36(11)
201_GLOBAL(_restgpr_24_x)
202_GLOBAL(_rest32gpr_24_x)
203 lwz 24,-32(11)
204_GLOBAL(_restgpr_25_x)
205_GLOBAL(_rest32gpr_25_x)
206 lwz 25,-28(11)
207_GLOBAL(_restgpr_26_x)
208_GLOBAL(_rest32gpr_26_x)
209 lwz 26,-24(11)
210_GLOBAL(_restgpr_27_x)
211_GLOBAL(_rest32gpr_27_x)
212 lwz 27,-20(11)
213_GLOBAL(_restgpr_28_x)
214_GLOBAL(_rest32gpr_28_x)
215 lwz 28,-16(11)
216_GLOBAL(_restgpr_29_x)
217_GLOBAL(_rest32gpr_29_x)
218 lwz 29,-12(11)
219_GLOBAL(_restgpr_30_x)
220_GLOBAL(_rest32gpr_30_x)
221 lwz 30,-8(11)
222_GLOBAL(_restgpr_31_x)
223_GLOBAL(_rest32gpr_31_x)
224 lwz 0,4(11)
225 lwz 31,-4(11)
226 mtlr 0
227 mr 1,11
228 blr
229#endif
diff --git a/arch/powerpc/mm/hash_low_32.S b/arch/powerpc/mm/hash_low_32.S
index ddeaf9e38ad5..b9ba7d930801 100644
--- a/arch/powerpc/mm/hash_low_32.S
+++ b/arch/powerpc/mm/hash_low_32.S
@@ -1,6 +1,4 @@
1/* 1/*
2 * $Id: hashtable.S,v 1.6 1999/10/08 01:56:15 paulus Exp $
3 *
4 * PowerPC version 2 * PowerPC version
5 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) 3 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
6 * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP 4 * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP
diff --git a/arch/powerpc/mm/hash_low_64.S b/arch/powerpc/mm/hash_low_64.S
index 21d248486479..70f4c833fa32 100644
--- a/arch/powerpc/mm/hash_low_64.S
+++ b/arch/powerpc/mm/hash_low_64.S
@@ -568,6 +568,10 @@ htab_inval_old_hpte:
568 ld r7,STK_PARM(r9)(r1) /* ssize */ 568 ld r7,STK_PARM(r9)(r1) /* ssize */
569 ld r8,STK_PARM(r8)(r1) /* local */ 569 ld r8,STK_PARM(r8)(r1) /* local */
570 bl .flush_hash_page 570 bl .flush_hash_page
571 /* Clear out _PAGE_HPTE_SUB bits in the new linux PTE */
572 lis r0,_PAGE_HPTE_SUB@h
573 ori r0,r0,_PAGE_HPTE_SUB@l
574 andc r30,r30,r0
571 b htab_insert_pte 575 b htab_insert_pte
572 576
573htab_bail_ok: 577htab_bail_ok:
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index f67e118116fa..51f82d83bf14 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -151,6 +151,7 @@ out:
151 return ret; 151 return ret;
152} 152}
153#endif /* CONFIG_MEMORY_HOTREMOVE */ 153#endif /* CONFIG_MEMORY_HOTREMOVE */
154#endif /* CONFIG_MEMORY_HOTPLUG */
154 155
155/* 156/*
156 * walk_memory_resource() needs to make sure there is no holes in a given 157 * walk_memory_resource() needs to make sure there is no holes in a given
@@ -184,8 +185,6 @@ walk_memory_resource(unsigned long start_pfn, unsigned long nr_pages, void *arg,
184} 185}
185EXPORT_SYMBOL_GPL(walk_memory_resource); 186EXPORT_SYMBOL_GPL(walk_memory_resource);
186 187
187#endif /* CONFIG_MEMORY_HOTPLUG */
188
189void show_mem(void) 188void show_mem(void)
190{ 189{
191 unsigned long total = 0, reserved = 0; 190 unsigned long total = 0, reserved = 0;
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
index 80d1babb230d..e0ff59f21135 100644
--- a/arch/powerpc/mm/pgtable_32.c
+++ b/arch/powerpc/mm/pgtable_32.c
@@ -402,7 +402,7 @@ void __set_fixmap (enum fixed_addresses idx, phys_addr_t phys, pgprot_t flags)
402 return; 402 return;
403 } 403 }
404 404
405 map_page(address, phys, flags); 405 map_page(address, phys, pgprot_val(flags));
406 fixmaps++; 406 fixmaps++;
407} 407}
408 408
diff --git a/arch/powerpc/platforms/52xx/lite5200_pm.c b/arch/powerpc/platforms/52xx/lite5200_pm.c
index 41c7fd91e99e..fe92e65103ed 100644
--- a/arch/powerpc/platforms/52xx/lite5200_pm.c
+++ b/arch/powerpc/platforms/52xx/lite5200_pm.c
@@ -14,6 +14,7 @@ static struct mpc52xx_sdma __iomem *bes;
14static struct mpc52xx_xlb __iomem *xlb; 14static struct mpc52xx_xlb __iomem *xlb;
15static struct mpc52xx_gpio __iomem *gps; 15static struct mpc52xx_gpio __iomem *gps;
16static struct mpc52xx_gpio_wkup __iomem *gpw; 16static struct mpc52xx_gpio_wkup __iomem *gpw;
17static void __iomem *pci;
17static void __iomem *sram; 18static void __iomem *sram;
18static const int sram_size = 0x4000; /* 16 kBytes */ 19static const int sram_size = 0x4000; /* 16 kBytes */
19static void __iomem *mbar; 20static void __iomem *mbar;
@@ -50,6 +51,8 @@ static int lite5200_pm_prepare(void)
50 { .type = "builtin", .compatible = "mpc5200", }, /* efika */ 51 { .type = "builtin", .compatible = "mpc5200", }, /* efika */
51 {} 52 {}
52 }; 53 };
54 u64 regaddr64 = 0;
55 const u32 *regaddr_p;
53 56
54 /* deep sleep? let mpc52xx code handle that */ 57 /* deep sleep? let mpc52xx code handle that */
55 if (lite5200_pm_target_state == PM_SUSPEND_STANDBY) 58 if (lite5200_pm_target_state == PM_SUSPEND_STANDBY)
@@ -60,8 +63,12 @@ static int lite5200_pm_prepare(void)
60 63
61 /* map registers */ 64 /* map registers */
62 np = of_find_matching_node(NULL, immr_ids); 65 np = of_find_matching_node(NULL, immr_ids);
63 mbar = of_iomap(np, 0); 66 regaddr_p = of_get_address(np, 0, NULL, NULL);
67 if (regaddr_p)
68 regaddr64 = of_translate_address(np, regaddr_p);
64 of_node_put(np); 69 of_node_put(np);
70
71 mbar = ioremap((u32) regaddr64, 0xC000);
65 if (!mbar) { 72 if (!mbar) {
66 printk(KERN_ERR "%s:%i Error mapping registers\n", __func__, __LINE__); 73 printk(KERN_ERR "%s:%i Error mapping registers\n", __func__, __LINE__);
67 return -ENOSYS; 74 return -ENOSYS;
@@ -71,6 +78,7 @@ static int lite5200_pm_prepare(void)
71 pic = mbar + 0x500; 78 pic = mbar + 0x500;
72 gps = mbar + 0xb00; 79 gps = mbar + 0xb00;
73 gpw = mbar + 0xc00; 80 gpw = mbar + 0xc00;
81 pci = mbar + 0xd00;
74 bes = mbar + 0x1200; 82 bes = mbar + 0x1200;
75 xlb = mbar + 0x1f00; 83 xlb = mbar + 0x1f00;
76 sram = mbar + 0x8000; 84 sram = mbar + 0x8000;
@@ -85,6 +93,7 @@ static struct mpc52xx_sdma sbes;
85static struct mpc52xx_xlb sxlb; 93static struct mpc52xx_xlb sxlb;
86static struct mpc52xx_gpio sgps; 94static struct mpc52xx_gpio sgps;
87static struct mpc52xx_gpio_wkup sgpw; 95static struct mpc52xx_gpio_wkup sgpw;
96static char spci[0x200];
88 97
89static void lite5200_save_regs(void) 98static void lite5200_save_regs(void)
90{ 99{
@@ -94,6 +103,7 @@ static void lite5200_save_regs(void)
94 _memcpy_fromio(&sxlb, xlb, sizeof(*xlb)); 103 _memcpy_fromio(&sxlb, xlb, sizeof(*xlb));
95 _memcpy_fromio(&sgps, gps, sizeof(*gps)); 104 _memcpy_fromio(&sgps, gps, sizeof(*gps));
96 _memcpy_fromio(&sgpw, gpw, sizeof(*gpw)); 105 _memcpy_fromio(&sgpw, gpw, sizeof(*gpw));
106 _memcpy_fromio(spci, pci, 0x200);
97 107
98 _memcpy_fromio(saved_sram, sram, sram_size); 108 _memcpy_fromio(saved_sram, sram, sram_size);
99} 109}
@@ -103,6 +113,8 @@ static void lite5200_restore_regs(void)
103 int i; 113 int i;
104 _memcpy_toio(sram, saved_sram, sram_size); 114 _memcpy_toio(sram, saved_sram, sram_size);
105 115
116 /* PCI Configuration */
117 _memcpy_toio(pci, spci, 0x200);
106 118
107 /* 119 /*
108 * GPIOs. Interrupt Master Enable has higher address then other 120 * GPIOs. Interrupt Master Enable has higher address then other
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c
index 48da5dfe4856..8a455ebce98d 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c
@@ -100,7 +100,7 @@ static int mpc52xx_wkup_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio)
100 struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); 100 struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
101 struct mpc52xx_gpiochip *chip = container_of(mm_gc, 101 struct mpc52xx_gpiochip *chip = container_of(mm_gc,
102 struct mpc52xx_gpiochip, mmchip); 102 struct mpc52xx_gpiochip, mmchip);
103 struct mpc52xx_gpio_wkup *regs = mm_gc->regs; 103 struct mpc52xx_gpio_wkup __iomem *regs = mm_gc->regs;
104 unsigned long flags; 104 unsigned long flags;
105 105
106 spin_lock_irqsave(&gpio_lock, flags); 106 spin_lock_irqsave(&gpio_lock, flags);
@@ -122,7 +122,7 @@ static int
122mpc52xx_wkup_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val) 122mpc52xx_wkup_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
123{ 123{
124 struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); 124 struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
125 struct mpc52xx_gpio_wkup *regs = mm_gc->regs; 125 struct mpc52xx_gpio_wkup __iomem *regs = mm_gc->regs;
126 struct mpc52xx_gpiochip *chip = container_of(mm_gc, 126 struct mpc52xx_gpiochip *chip = container_of(mm_gc,
127 struct mpc52xx_gpiochip, mmchip); 127 struct mpc52xx_gpiochip, mmchip);
128 unsigned long flags; 128 unsigned long flags;
@@ -150,7 +150,7 @@ static int __devinit mpc52xx_wkup_gpiochip_probe(struct of_device *ofdev,
150 const struct of_device_id *match) 150 const struct of_device_id *match)
151{ 151{
152 struct mpc52xx_gpiochip *chip; 152 struct mpc52xx_gpiochip *chip;
153 struct mpc52xx_gpio_wkup *regs; 153 struct mpc52xx_gpio_wkup __iomem *regs;
154 struct of_gpio_chip *ofchip; 154 struct of_gpio_chip *ofchip;
155 int ret; 155 int ret;
156 156
@@ -260,7 +260,7 @@ static int mpc52xx_simple_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio)
260 struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); 260 struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
261 struct mpc52xx_gpiochip *chip = container_of(mm_gc, 261 struct mpc52xx_gpiochip *chip = container_of(mm_gc,
262 struct mpc52xx_gpiochip, mmchip); 262 struct mpc52xx_gpiochip, mmchip);
263 struct mpc52xx_gpio *regs = mm_gc->regs; 263 struct mpc52xx_gpio __iomem *regs = mm_gc->regs;
264 unsigned long flags; 264 unsigned long flags;
265 265
266 spin_lock_irqsave(&gpio_lock, flags); 266 spin_lock_irqsave(&gpio_lock, flags);
@@ -284,7 +284,7 @@ mpc52xx_simple_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
284 struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); 284 struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
285 struct mpc52xx_gpiochip *chip = container_of(mm_gc, 285 struct mpc52xx_gpiochip *chip = container_of(mm_gc,
286 struct mpc52xx_gpiochip, mmchip); 286 struct mpc52xx_gpiochip, mmchip);
287 struct mpc52xx_gpio *regs = mm_gc->regs; 287 struct mpc52xx_gpio __iomem *regs = mm_gc->regs;
288 unsigned long flags; 288 unsigned long flags;
289 289
290 spin_lock_irqsave(&gpio_lock, flags); 290 spin_lock_irqsave(&gpio_lock, flags);
@@ -312,7 +312,7 @@ static int __devinit mpc52xx_simple_gpiochip_probe(struct of_device *ofdev,
312{ 312{
313 struct mpc52xx_gpiochip *chip; 313 struct mpc52xx_gpiochip *chip;
314 struct of_gpio_chip *ofchip; 314 struct of_gpio_chip *ofchip;
315 struct mpc52xx_gpio *regs; 315 struct mpc52xx_gpio __iomem *regs;
316 int ret; 316 int ret;
317 317
318 chip = kzalloc(sizeof(*chip), GFP_KERNEL); 318 chip = kzalloc(sizeof(*chip), GFP_KERNEL);
@@ -387,7 +387,7 @@ mpc52xx_gpt_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
387static int mpc52xx_gpt_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio) 387static int mpc52xx_gpt_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio)
388{ 388{
389 struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); 389 struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
390 struct mpc52xx_gpt *regs = mm_gc->regs; 390 struct mpc52xx_gpt __iomem *regs = mm_gc->regs;
391 391
392 out_be32(&regs->mode, 0x04); 392 out_be32(&regs->mode, 0x04);
393 393
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index 7ff29d53dc2d..ecbe580c3f32 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -34,6 +34,7 @@ config MPC85xx_MDS
34 bool "Freescale MPC85xx MDS" 34 bool "Freescale MPC85xx MDS"
35 select DEFAULT_UIMAGE 35 select DEFAULT_UIMAGE
36 select QUICC_ENGINE 36 select QUICC_ENGINE
37 select PHYLIB
37 help 38 help
38 This option enables support for the MPC85xx MDS board 39 This option enables support for the MPC85xx MDS board
39 40
diff --git a/arch/powerpc/platforms/cell/celleb_scc_pciex.c b/arch/powerpc/platforms/cell/celleb_scc_pciex.c
index 31da84c458d2..0e04f8fb152a 100644
--- a/arch/powerpc/platforms/cell/celleb_scc_pciex.c
+++ b/arch/powerpc/platforms/cell/celleb_scc_pciex.c
@@ -217,7 +217,7 @@ static u##size scc_pciex_in##name(unsigned long port) \
217static void scc_pciex_ins##name(unsigned long p, void *b, unsigned long c) \ 217static void scc_pciex_ins##name(unsigned long p, void *b, unsigned long c) \
218{ \ 218{ \
219 struct iowa_bus *bus = iowa_pio_find_bus(p); \ 219 struct iowa_bus *bus = iowa_pio_find_bus(p); \
220 u##size *dst = b; \ 220 __le##size *dst = b; \
221 for (; c != 0; c--, dst++) \ 221 for (; c != 0; c--, dst++) \
222 *dst = cpu_to_le##size(__scc_pciex_in##name(bus->phb, p)); \ 222 *dst = cpu_to_le##size(__scc_pciex_in##name(bus->phb, p)); \
223 scc_pciex_io_flush(bus); \ 223 scc_pciex_io_flush(bus); \
@@ -231,10 +231,11 @@ static void scc_pciex_outs##name(unsigned long p, const void *b, \
231 unsigned long c) \ 231 unsigned long c) \
232{ \ 232{ \
233 struct iowa_bus *bus = iowa_pio_find_bus(p); \ 233 struct iowa_bus *bus = iowa_pio_find_bus(p); \
234 const u##size *src = b; \ 234 const __le##size *src = b; \
235 for (; c != 0; c--, src++) \ 235 for (; c != 0; c--, src++) \
236 __scc_pciex_out##name(bus->phb, le##size##_to_cpu(*src), p); \ 236 __scc_pciex_out##name(bus->phb, le##size##_to_cpu(*src), p); \
237} 237}
238#define __le8 u8
238#define cpu_to_le8(x) (x) 239#define cpu_to_le8(x) (x)
239#define le8_to_cpu(x) (x) 240#define le8_to_cpu(x) (x)
240PCIEX_PIO_FUNC(8, b) 241PCIEX_PIO_FUNC(8, b)
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c
index 70c660121ec4..78f905bc6a42 100644
--- a/arch/powerpc/platforms/cell/spu_base.c
+++ b/arch/powerpc/platforms/cell/spu_base.c
@@ -219,15 +219,25 @@ static int __spu_trap_data_seg(struct spu *spu, unsigned long ea)
219extern int hash_page(unsigned long ea, unsigned long access, unsigned long trap); //XXX 219extern int hash_page(unsigned long ea, unsigned long access, unsigned long trap); //XXX
220static int __spu_trap_data_map(struct spu *spu, unsigned long ea, u64 dsisr) 220static int __spu_trap_data_map(struct spu *spu, unsigned long ea, u64 dsisr)
221{ 221{
222 int ret;
223
222 pr_debug("%s, %lx, %lx\n", __func__, dsisr, ea); 224 pr_debug("%s, %lx, %lx\n", __func__, dsisr, ea);
223 225
224 /* Handle kernel space hash faults immediately. 226 /*
225 User hash faults need to be deferred to process context. */ 227 * Handle kernel space hash faults immediately. User hash
226 if ((dsisr & MFC_DSISR_PTE_NOT_FOUND) 228 * faults need to be deferred to process context.
227 && REGION_ID(ea) != USER_REGION_ID 229 */
228 && hash_page(ea, _PAGE_PRESENT, 0x300) == 0) { 230 if ((dsisr & MFC_DSISR_PTE_NOT_FOUND) &&
229 spu_restart_dma(spu); 231 (REGION_ID(ea) != USER_REGION_ID)) {
230 return 0; 232
233 spin_unlock(&spu->register_lock);
234 ret = hash_page(ea, _PAGE_PRESENT, 0x300);
235 spin_lock(&spu->register_lock);
236
237 if (!ret) {
238 spu_restart_dma(spu);
239 return 0;
240 }
231 } 241 }
232 242
233 spu->class_1_dar = ea; 243 spu->class_1_dar = ea;
@@ -324,17 +334,13 @@ spu_irq_class_0(int irq, void *data)
324 stat = spu_int_stat_get(spu, 0) & mask; 334 stat = spu_int_stat_get(spu, 0) & mask;
325 335
326 spu->class_0_pending |= stat; 336 spu->class_0_pending |= stat;
327 spu->class_0_dsisr = spu_mfc_dsisr_get(spu);
328 spu->class_0_dar = spu_mfc_dar_get(spu); 337 spu->class_0_dar = spu_mfc_dar_get(spu);
329 spin_unlock(&spu->register_lock);
330
331 spu->stop_callback(spu, 0); 338 spu->stop_callback(spu, 0);
332
333 spu->class_0_pending = 0; 339 spu->class_0_pending = 0;
334 spu->class_0_dsisr = 0;
335 spu->class_0_dar = 0; 340 spu->class_0_dar = 0;
336 341
337 spu_int_stat_clear(spu, 0, stat); 342 spu_int_stat_clear(spu, 0, stat);
343 spin_unlock(&spu->register_lock);
338 344
339 return IRQ_HANDLED; 345 return IRQ_HANDLED;
340} 346}
@@ -357,13 +363,12 @@ spu_irq_class_1(int irq, void *data)
357 spu_mfc_dsisr_set(spu, 0ul); 363 spu_mfc_dsisr_set(spu, 0ul);
358 spu_int_stat_clear(spu, 1, stat); 364 spu_int_stat_clear(spu, 1, stat);
359 365
360 if (stat & CLASS1_SEGMENT_FAULT_INTR)
361 __spu_trap_data_seg(spu, dar);
362
363 spin_unlock(&spu->register_lock);
364 pr_debug("%s: %lx %lx %lx %lx\n", __func__, mask, stat, 366 pr_debug("%s: %lx %lx %lx %lx\n", __func__, mask, stat,
365 dar, dsisr); 367 dar, dsisr);
366 368
369 if (stat & CLASS1_SEGMENT_FAULT_INTR)
370 __spu_trap_data_seg(spu, dar);
371
367 if (stat & CLASS1_STORAGE_FAULT_INTR) 372 if (stat & CLASS1_STORAGE_FAULT_INTR)
368 __spu_trap_data_map(spu, dar, dsisr); 373 __spu_trap_data_map(spu, dar, dsisr);
369 374
@@ -376,6 +381,8 @@ spu_irq_class_1(int irq, void *data)
376 spu->class_1_dsisr = 0; 381 spu->class_1_dsisr = 0;
377 spu->class_1_dar = 0; 382 spu->class_1_dar = 0;
378 383
384 spin_unlock(&spu->register_lock);
385
379 return stat ? IRQ_HANDLED : IRQ_NONE; 386 return stat ? IRQ_HANDLED : IRQ_NONE;
380} 387}
381 388
@@ -394,14 +401,12 @@ spu_irq_class_2(int irq, void *data)
394 mask = spu_int_mask_get(spu, 2); 401 mask = spu_int_mask_get(spu, 2);
395 /* ignore interrupts we're not waiting for */ 402 /* ignore interrupts we're not waiting for */
396 stat &= mask; 403 stat &= mask;
397
398 /* mailbox interrupts are level triggered. mask them now before 404 /* mailbox interrupts are level triggered. mask them now before
399 * acknowledging */ 405 * acknowledging */
400 if (stat & mailbox_intrs) 406 if (stat & mailbox_intrs)
401 spu_int_mask_and(spu, 2, ~(stat & mailbox_intrs)); 407 spu_int_mask_and(spu, 2, ~(stat & mailbox_intrs));
402 /* acknowledge all interrupts before the callbacks */ 408 /* acknowledge all interrupts before the callbacks */
403 spu_int_stat_clear(spu, 2, stat); 409 spu_int_stat_clear(spu, 2, stat);
404 spin_unlock(&spu->register_lock);
405 410
406 pr_debug("class 2 interrupt %d, %lx, %lx\n", irq, stat, mask); 411 pr_debug("class 2 interrupt %d, %lx, %lx\n", irq, stat, mask);
407 412
@@ -421,6 +426,9 @@ spu_irq_class_2(int irq, void *data)
421 spu->wbox_callback(spu); 426 spu->wbox_callback(spu);
422 427
423 spu->stats.class2_intr++; 428 spu->stats.class2_intr++;
429
430 spin_unlock(&spu->register_lock);
431
424 return stat ? IRQ_HANDLED : IRQ_NONE; 432 return stat ? IRQ_HANDLED : IRQ_NONE;
425} 433}
426 434
diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c
index b7493b865812..f7edba6cb795 100644
--- a/arch/powerpc/platforms/cell/spufs/run.c
+++ b/arch/powerpc/platforms/cell/spufs/run.c
@@ -27,7 +27,6 @@ void spufs_stop_callback(struct spu *spu, int irq)
27 switch(irq) { 27 switch(irq) {
28 case 0 : 28 case 0 :
29 ctx->csa.class_0_pending = spu->class_0_pending; 29 ctx->csa.class_0_pending = spu->class_0_pending;
30 ctx->csa.class_0_dsisr = spu->class_0_dsisr;
31 ctx->csa.class_0_dar = spu->class_0_dar; 30 ctx->csa.class_0_dar = spu->class_0_dar;
32 break; 31 break;
33 case 1 : 32 case 1 :
@@ -51,18 +50,22 @@ int spu_stopped(struct spu_context *ctx, u32 *stat)
51 u64 dsisr; 50 u64 dsisr;
52 u32 stopped; 51 u32 stopped;
53 52
54 *stat = ctx->ops->status_read(ctx);
55
56 if (test_bit(SPU_SCHED_NOTIFY_ACTIVE, &ctx->sched_flags))
57 return 1;
58
59 stopped = SPU_STATUS_INVALID_INSTR | SPU_STATUS_SINGLE_STEP | 53 stopped = SPU_STATUS_INVALID_INSTR | SPU_STATUS_SINGLE_STEP |
60 SPU_STATUS_STOPPED_BY_HALT | SPU_STATUS_STOPPED_BY_STOP; 54 SPU_STATUS_STOPPED_BY_HALT | SPU_STATUS_STOPPED_BY_STOP;
61 if (!(*stat & SPU_STATUS_RUNNING) && (*stat & stopped)) 55
56top:
57 *stat = ctx->ops->status_read(ctx);
58 if (*stat & stopped) {
59 /*
60 * If the spu hasn't finished stopping, we need to
61 * re-read the register to get the stopped value.
62 */
63 if (*stat & SPU_STATUS_RUNNING)
64 goto top;
62 return 1; 65 return 1;
66 }
63 67
64 dsisr = ctx->csa.class_0_dsisr; 68 if (test_bit(SPU_SCHED_NOTIFY_ACTIVE, &ctx->sched_flags))
65 if (dsisr & (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED))
66 return 1; 69 return 1;
67 70
68 dsisr = ctx->csa.class_1_dsisr; 71 dsisr = ctx->csa.class_1_dsisr;
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index 745dd51ec37f..e929e70a84e3 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -230,19 +230,23 @@ static void spu_bind_context(struct spu *spu, struct spu_context *ctx)
230 ctx->stats.slb_flt_base = spu->stats.slb_flt; 230 ctx->stats.slb_flt_base = spu->stats.slb_flt;
231 ctx->stats.class2_intr_base = spu->stats.class2_intr; 231 ctx->stats.class2_intr_base = spu->stats.class2_intr;
232 232
233 spu_associate_mm(spu, ctx->owner);
234
235 spin_lock_irq(&spu->register_lock);
233 spu->ctx = ctx; 236 spu->ctx = ctx;
234 spu->flags = 0; 237 spu->flags = 0;
235 ctx->spu = spu; 238 ctx->spu = spu;
236 ctx->ops = &spu_hw_ops; 239 ctx->ops = &spu_hw_ops;
237 spu->pid = current->pid; 240 spu->pid = current->pid;
238 spu->tgid = current->tgid; 241 spu->tgid = current->tgid;
239 spu_associate_mm(spu, ctx->owner);
240 spu->ibox_callback = spufs_ibox_callback; 242 spu->ibox_callback = spufs_ibox_callback;
241 spu->wbox_callback = spufs_wbox_callback; 243 spu->wbox_callback = spufs_wbox_callback;
242 spu->stop_callback = spufs_stop_callback; 244 spu->stop_callback = spufs_stop_callback;
243 spu->mfc_callback = spufs_mfc_callback; 245 spu->mfc_callback = spufs_mfc_callback;
244 mb(); 246 spin_unlock_irq(&spu->register_lock);
247
245 spu_unmap_mappings(ctx); 248 spu_unmap_mappings(ctx);
249
246 spu_switch_log_notify(spu, ctx, SWITCH_LOG_START, 0); 250 spu_switch_log_notify(spu, ctx, SWITCH_LOG_START, 0);
247 spu_restore(&ctx->csa, spu); 251 spu_restore(&ctx->csa, spu);
248 spu->timestamp = jiffies; 252 spu->timestamp = jiffies;
@@ -403,6 +407,8 @@ static int has_affinity(struct spu_context *ctx)
403 */ 407 */
404static void spu_unbind_context(struct spu *spu, struct spu_context *ctx) 408static void spu_unbind_context(struct spu *spu, struct spu_context *ctx)
405{ 409{
410 u32 status;
411
406 spu_context_trace(spu_unbind_context__enter, ctx, spu); 412 spu_context_trace(spu_unbind_context__enter, ctx, spu);
407 413
408 spuctx_switch_state(ctx, SPU_UTIL_SYSTEM); 414 spuctx_switch_state(ctx, SPU_UTIL_SYSTEM);
@@ -423,18 +429,22 @@ static void spu_unbind_context(struct spu *spu, struct spu_context *ctx)
423 spu_unmap_mappings(ctx); 429 spu_unmap_mappings(ctx);
424 spu_save(&ctx->csa, spu); 430 spu_save(&ctx->csa, spu);
425 spu_switch_log_notify(spu, ctx, SWITCH_LOG_STOP, 0); 431 spu_switch_log_notify(spu, ctx, SWITCH_LOG_STOP, 0);
432
433 spin_lock_irq(&spu->register_lock);
426 spu->timestamp = jiffies; 434 spu->timestamp = jiffies;
427 ctx->state = SPU_STATE_SAVED; 435 ctx->state = SPU_STATE_SAVED;
428 spu->ibox_callback = NULL; 436 spu->ibox_callback = NULL;
429 spu->wbox_callback = NULL; 437 spu->wbox_callback = NULL;
430 spu->stop_callback = NULL; 438 spu->stop_callback = NULL;
431 spu->mfc_callback = NULL; 439 spu->mfc_callback = NULL;
432 spu_associate_mm(spu, NULL);
433 spu->pid = 0; 440 spu->pid = 0;
434 spu->tgid = 0; 441 spu->tgid = 0;
435 ctx->ops = &spu_backing_ops; 442 ctx->ops = &spu_backing_ops;
436 spu->flags = 0; 443 spu->flags = 0;
437 spu->ctx = NULL; 444 spu->ctx = NULL;
445 spin_unlock_irq(&spu->register_lock);
446
447 spu_associate_mm(spu, NULL);
438 448
439 ctx->stats.slb_flt += 449 ctx->stats.slb_flt +=
440 (spu->stats.slb_flt - ctx->stats.slb_flt_base); 450 (spu->stats.slb_flt - ctx->stats.slb_flt_base);
@@ -444,6 +454,9 @@ static void spu_unbind_context(struct spu *spu, struct spu_context *ctx)
444 /* This maps the underlying spu state to idle */ 454 /* This maps the underlying spu state to idle */
445 spuctx_switch_state(ctx, SPU_UTIL_IDLE_LOADED); 455 spuctx_switch_state(ctx, SPU_UTIL_IDLE_LOADED);
446 ctx->spu = NULL; 456 ctx->spu = NULL;
457
458 if (spu_stopped(ctx, &status))
459 wake_up_all(&ctx->stop_wq);
447} 460}
448 461
449/** 462/**
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c
index 5b3fb2b321ab..3a58ffabccd9 100644
--- a/arch/powerpc/platforms/ps3/mm.c
+++ b/arch/powerpc/platforms/ps3/mm.c
@@ -317,6 +317,9 @@ static int __init ps3_mm_add_memory(void)
317 return result; 317 return result;
318 } 318 }
319 319
320 lmb_add(start_addr, map.r1.size);
321 lmb_analyze();
322
320 result = online_pages(start_pfn, nr_pages); 323 result = online_pages(start_pfn, nr_pages);
321 324
322 if (result) 325 if (result)
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c
index 68ea5eee39a8..8c1ca477c52c 100644
--- a/arch/powerpc/platforms/pseries/eeh_driver.c
+++ b/arch/powerpc/platforms/pseries/eeh_driver.c
@@ -42,17 +42,20 @@ static inline const char * pcid_name (struct pci_dev *pdev)
42} 42}
43 43
44#ifdef DEBUG 44#ifdef DEBUG
45static void print_device_node_tree (struct pci_dn *pdn, int dent) 45static void print_device_node_tree(struct pci_dn *pdn, int dent)
46{ 46{
47 int i; 47 int i;
48 if (!pdn) return; 48 struct device_node *pc;
49 for (i=0;i<dent; i++) 49
50 if (!pdn)
51 return;
52 for (i = 0; i < dent; i++)
50 printk(" "); 53 printk(" ");
51 printk("dn=%s mode=%x \tcfg_addr=%x pe_addr=%x \tfull=%s\n", 54 printk("dn=%s mode=%x \tcfg_addr=%x pe_addr=%x \tfull=%s\n",
52 pdn->node->name, pdn->eeh_mode, pdn->eeh_config_addr, 55 pdn->node->name, pdn->eeh_mode, pdn->eeh_config_addr,
53 pdn->eeh_pe_config_addr, pdn->node->full_name); 56 pdn->eeh_pe_config_addr, pdn->node->full_name);
54 dent += 3; 57 dent += 3;
55 struct device_node *pc = pdn->node->child; 58 pc = pdn->node->child;
56 while (pc) { 59 while (pc) {
57 print_device_node_tree(PCI_DN(pc), dent); 60 print_device_node_tree(PCI_DN(pc), dent);
58 pc = pc->sibling; 61 pc = pc->sibling;
diff --git a/arch/powerpc/platforms/pseries/nvram.c b/arch/powerpc/platforms/pseries/nvram.c
index f68903e15bd5..42f7e384e6c4 100644
--- a/arch/powerpc/platforms/pseries/nvram.c
+++ b/arch/powerpc/platforms/pseries/nvram.c
@@ -131,8 +131,10 @@ int __init pSeries_nvram_init(void)
131 return -ENODEV; 131 return -ENODEV;
132 132
133 nbytes_p = of_get_property(nvram, "#bytes", &proplen); 133 nbytes_p = of_get_property(nvram, "#bytes", &proplen);
134 if (nbytes_p == NULL || proplen != sizeof(unsigned int)) 134 if (nbytes_p == NULL || proplen != sizeof(unsigned int)) {
135 of_node_put(nvram);
135 return -EIO; 136 return -EIO;
137 }
136 138
137 nvram_size = *nbytes_p; 139 nvram_size = *nbytes_p;
138 140
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index 3a7054e2bb75..019657c110b6 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -432,7 +432,7 @@ static struct i2c_driver_device i2c_devices[] __initdata = {
432 {"dallas,ds1339", "ds1339"}, 432 {"dallas,ds1339", "ds1339"},
433 {"dallas,ds1340", "ds1340"}, 433 {"dallas,ds1340", "ds1340"},
434 {"stm,m41t00", "m41t00"}, 434 {"stm,m41t00", "m41t00"},
435 {"dallas,ds1374", "rtc-ds1374"}, 435 {"dallas,ds1374", "ds1374"},
436}; 436};
437 437
438static int __init of_find_i2c_driver(struct device_node *node, 438static int __init of_find_i2c_driver(struct device_node *node,
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 8619f2a3f1f6..7680001676a6 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -1331,6 +1331,9 @@ void mpic_irq_set_priority(unsigned int irq, unsigned int pri)
1331 unsigned long flags; 1331 unsigned long flags;
1332 u32 reg; 1332 u32 reg;
1333 1333
1334 if (!mpic)
1335 return;
1336
1334 spin_lock_irqsave(&mpic_lock, flags); 1337 spin_lock_irqsave(&mpic_lock, flags);
1335 if (is_ipi) { 1338 if (is_ipi) {
1336 reg = mpic_ipi_read(src - mpic->ipi_vecs[0]) & 1339 reg = mpic_ipi_read(src - mpic->ipi_vecs[0]) &
@@ -1346,23 +1349,6 @@ void mpic_irq_set_priority(unsigned int irq, unsigned int pri)
1346 spin_unlock_irqrestore(&mpic_lock, flags); 1349 spin_unlock_irqrestore(&mpic_lock, flags);
1347} 1350}
1348 1351
1349unsigned int mpic_irq_get_priority(unsigned int irq)
1350{
1351 unsigned int is_ipi;
1352 struct mpic *mpic = mpic_find(irq, &is_ipi);
1353 unsigned int src = mpic_irq_to_hw(irq);
1354 unsigned long flags;
1355 u32 reg;
1356
1357 spin_lock_irqsave(&mpic_lock, flags);
1358 if (is_ipi)
1359 reg = mpic_ipi_read(src = mpic->ipi_vecs[0]);
1360 else
1361 reg = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI));
1362 spin_unlock_irqrestore(&mpic_lock, flags);
1363 return (reg & MPIC_VECPRI_PRIORITY_MASK) >> MPIC_VECPRI_PRIORITY_SHIFT;
1364}
1365
1366void mpic_setup_this_cpu(void) 1352void mpic_setup_this_cpu(void)
1367{ 1353{
1368#ifdef CONFIG_SMP 1354#ifdef CONFIG_SMP
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 1702de9395ee..bfcf70ee8959 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -2844,7 +2844,6 @@ static void dump_spu_fields(struct spu *spu)
2844 DUMP_FIELD(spu, "0x%lx", flags); 2844 DUMP_FIELD(spu, "0x%lx", flags);
2845 DUMP_FIELD(spu, "%d", class_0_pending); 2845 DUMP_FIELD(spu, "%d", class_0_pending);
2846 DUMP_FIELD(spu, "0x%lx", class_0_dar); 2846 DUMP_FIELD(spu, "0x%lx", class_0_dar);
2847 DUMP_FIELD(spu, "0x%lx", class_0_dsisr);
2848 DUMP_FIELD(spu, "0x%lx", class_1_dar); 2847 DUMP_FIELD(spu, "0x%lx", class_1_dar);
2849 DUMP_FIELD(spu, "0x%lx", class_1_dsisr); 2848 DUMP_FIELD(spu, "0x%lx", class_1_dsisr);
2850 DUMP_FIELD(spu, "0x%lx", irqs[0]); 2849 DUMP_FIELD(spu, "0x%lx", irqs[0]);
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c
index 602c268fc8a2..5d529bcbeee9 100644
--- a/arch/ppc/kernel/ppc_ksyms.c
+++ b/arch/ppc/kernel/ppc_ksyms.c
@@ -60,8 +60,10 @@ long long __ashrdi3(long long, int);
60long long __ashldi3(long long, int); 60long long __ashldi3(long long, int);
61long long __lshrdi3(long long, int); 61long long __lshrdi3(long long, int);
62 62
63EXPORT_SYMBOL(empty_zero_page);
63EXPORT_SYMBOL(clear_pages); 64EXPORT_SYMBOL(clear_pages);
64EXPORT_SYMBOL(clear_user_page); 65EXPORT_SYMBOL(clear_user_page);
66EXPORT_SYMBOL(copy_page);
65EXPORT_SYMBOL(transfer_to_handler); 67EXPORT_SYMBOL(transfer_to_handler);
66EXPORT_SYMBOL(do_IRQ); 68EXPORT_SYMBOL(do_IRQ);
67EXPORT_SYMBOL(machine_check_exception); 69EXPORT_SYMBOL(machine_check_exception);
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 1d035082e78e..107e492cb47e 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -304,10 +304,14 @@ config ARCH_SPARSEMEM_ENABLE
304 def_bool y 304 def_bool y
305 select SPARSEMEM_VMEMMAP_ENABLE 305 select SPARSEMEM_VMEMMAP_ENABLE
306 select SPARSEMEM_VMEMMAP 306 select SPARSEMEM_VMEMMAP
307 select SPARSEMEM_STATIC if !64BIT
307 308
308config ARCH_SPARSEMEM_DEFAULT 309config ARCH_SPARSEMEM_DEFAULT
309 def_bool y 310 def_bool y
310 311
312config ARCH_SELECT_MEMORY_MODEL
313 def_bool y
314
311source "mm/Kconfig" 315source "mm/Kconfig"
312 316
313comment "I/O subsystem configuration" 317comment "I/O subsystem configuration"
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c
index 655d52543e2d..ad40729bec3d 100644
--- a/arch/s390/appldata/appldata_base.c
+++ b/arch/s390/appldata/appldata_base.c
@@ -130,6 +130,7 @@ static void appldata_work_fn(struct work_struct *work)
130 130
131 P_DEBUG(" -= Work Queue =-\n"); 131 P_DEBUG(" -= Work Queue =-\n");
132 i = 0; 132 i = 0;
133 get_online_cpus();
133 spin_lock(&appldata_ops_lock); 134 spin_lock(&appldata_ops_lock);
134 list_for_each(lh, &appldata_ops_list) { 135 list_for_each(lh, &appldata_ops_list) {
135 ops = list_entry(lh, struct appldata_ops, list); 136 ops = list_entry(lh, struct appldata_ops, list);
@@ -140,6 +141,7 @@ static void appldata_work_fn(struct work_struct *work)
140 } 141 }
141 } 142 }
142 spin_unlock(&appldata_ops_lock); 143 spin_unlock(&appldata_ops_lock);
144 put_online_cpus();
143} 145}
144 146
145/* 147/*
@@ -266,12 +268,14 @@ appldata_timer_handler(ctl_table *ctl, int write, struct file *filp,
266 len = *lenp; 268 len = *lenp;
267 if (copy_from_user(buf, buffer, len > sizeof(buf) ? sizeof(buf) : len)) 269 if (copy_from_user(buf, buffer, len > sizeof(buf) ? sizeof(buf) : len))
268 return -EFAULT; 270 return -EFAULT;
271 get_online_cpus();
269 spin_lock(&appldata_timer_lock); 272 spin_lock(&appldata_timer_lock);
270 if (buf[0] == '1') 273 if (buf[0] == '1')
271 __appldata_vtimer_setup(APPLDATA_ADD_TIMER); 274 __appldata_vtimer_setup(APPLDATA_ADD_TIMER);
272 else if (buf[0] == '0') 275 else if (buf[0] == '0')
273 __appldata_vtimer_setup(APPLDATA_DEL_TIMER); 276 __appldata_vtimer_setup(APPLDATA_DEL_TIMER);
274 spin_unlock(&appldata_timer_lock); 277 spin_unlock(&appldata_timer_lock);
278 put_online_cpus();
275out: 279out:
276 *lenp = len; 280 *lenp = len;
277 *ppos += len; 281 *ppos += len;
@@ -314,10 +318,12 @@ appldata_interval_handler(ctl_table *ctl, int write, struct file *filp,
314 return -EINVAL; 318 return -EINVAL;
315 } 319 }
316 320
321 get_online_cpus();
317 spin_lock(&appldata_timer_lock); 322 spin_lock(&appldata_timer_lock);
318 appldata_interval = interval; 323 appldata_interval = interval;
319 __appldata_vtimer_setup(APPLDATA_MOD_TIMER); 324 __appldata_vtimer_setup(APPLDATA_MOD_TIMER);
320 spin_unlock(&appldata_timer_lock); 325 spin_unlock(&appldata_timer_lock);
326 put_online_cpus();
321 327
322 P_INFO("Monitoring CPU interval set to %u milliseconds.\n", 328 P_INFO("Monitoring CPU interval set to %u milliseconds.\n",
323 interval); 329 interval);
@@ -556,8 +562,10 @@ static int __init appldata_init(void)
556 return -ENOMEM; 562 return -ENOMEM;
557 } 563 }
558 564
565 get_online_cpus();
559 for_each_online_cpu(i) 566 for_each_online_cpu(i)
560 appldata_online_cpu(i); 567 appldata_online_cpu(i);
568 put_online_cpus();
561 569
562 /* Register cpu hotplug notifier */ 570 /* Register cpu hotplug notifier */
563 register_hotcpu_notifier(&appldata_nb); 571 register_hotcpu_notifier(&appldata_nb);
diff --git a/arch/s390/defconfig b/arch/s390/defconfig
index aa341d0ea1e6..c5cdb975d590 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.25 3# Linux kernel version: 2.6.26-rc4
4# Wed Apr 30 11:07:45 2008 4# Fri May 30 09:49:33 2008
5# 5#
6CONFIG_SCHED_MC=y 6CONFIG_SCHED_MC=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -103,6 +103,7 @@ CONFIG_RT_MUTEXES=y
103# CONFIG_TINY_SHMEM is not set 103# CONFIG_TINY_SHMEM is not set
104CONFIG_BASE_SMALL=0 104CONFIG_BASE_SMALL=0
105CONFIG_MODULES=y 105CONFIG_MODULES=y
106# CONFIG_MODULE_FORCE_LOAD is not set
106CONFIG_MODULE_UNLOAD=y 107CONFIG_MODULE_UNLOAD=y
107# CONFIG_MODULE_FORCE_UNLOAD is not set 108# CONFIG_MODULE_FORCE_UNLOAD is not set
108CONFIG_MODVERSIONS=y 109CONFIG_MODVERSIONS=y
@@ -173,6 +174,7 @@ CONFIG_PREEMPT=y
173# CONFIG_PREEMPT_RCU is not set 174# CONFIG_PREEMPT_RCU is not set
174CONFIG_ARCH_SPARSEMEM_ENABLE=y 175CONFIG_ARCH_SPARSEMEM_ENABLE=y
175CONFIG_ARCH_SPARSEMEM_DEFAULT=y 176CONFIG_ARCH_SPARSEMEM_DEFAULT=y
177CONFIG_ARCH_SELECT_MEMORY_MODEL=y
176CONFIG_SELECT_MEMORY_MODEL=y 178CONFIG_SELECT_MEMORY_MODEL=y
177# CONFIG_FLATMEM_MANUAL is not set 179# CONFIG_FLATMEM_MANUAL is not set
178# CONFIG_DISCONTIGMEM_MANUAL is not set 180# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -210,6 +212,7 @@ CONFIG_FORCE_MAX_ZONEORDER=9
210CONFIG_PFAULT=y 212CONFIG_PFAULT=y
211# CONFIG_SHARED_KERNEL is not set 213# CONFIG_SHARED_KERNEL is not set
212# CONFIG_CMM is not set 214# CONFIG_CMM is not set
215# CONFIG_PAGE_STATES is not set
213CONFIG_VIRT_TIMER=y 216CONFIG_VIRT_TIMER=y
214CONFIG_VIRT_CPU_ACCOUNTING=y 217CONFIG_VIRT_CPU_ACCOUNTING=y
215# CONFIG_APPLDATA_BASE is not set 218# CONFIG_APPLDATA_BASE is not set
@@ -620,6 +623,7 @@ CONFIG_S390_VMUR=m
620# 623#
621# CONFIG_MEMSTICK is not set 624# CONFIG_MEMSTICK is not set
622# CONFIG_NEW_LEDS is not set 625# CONFIG_NEW_LEDS is not set
626CONFIG_ACCESSIBILITY=y
623 627
624# 628#
625# File systems 629# File systems
@@ -754,11 +758,12 @@ CONFIG_FRAME_WARN=2048
754CONFIG_MAGIC_SYSRQ=y 758CONFIG_MAGIC_SYSRQ=y
755# CONFIG_UNUSED_SYMBOLS is not set 759# CONFIG_UNUSED_SYMBOLS is not set
756CONFIG_DEBUG_FS=y 760CONFIG_DEBUG_FS=y
757CONFIG_HEADERS_CHECK=y 761# CONFIG_HEADERS_CHECK is not set
758CONFIG_DEBUG_KERNEL=y 762CONFIG_DEBUG_KERNEL=y
759# CONFIG_SCHED_DEBUG is not set 763# CONFIG_SCHED_DEBUG is not set
760# CONFIG_SCHEDSTATS is not set 764# CONFIG_SCHEDSTATS is not set
761# CONFIG_TIMER_STATS is not set 765# CONFIG_TIMER_STATS is not set
766# CONFIG_DEBUG_OBJECTS is not set
762# CONFIG_DEBUG_SLAB is not set 767# CONFIG_DEBUG_SLAB is not set
763CONFIG_DEBUG_PREEMPT=y 768CONFIG_DEBUG_PREEMPT=y
764# CONFIG_DEBUG_RT_MUTEXES is not set 769# CONFIG_DEBUG_RT_MUTEXES is not set
diff --git a/arch/s390/kernel/dis.c b/arch/s390/kernel/dis.c
index c14a336f6300..d2f270c995d9 100644
--- a/arch/s390/kernel/dis.c
+++ b/arch/s390/kernel/dis.c
@@ -208,7 +208,7 @@ static const unsigned char formats[][7] = {
208 [INSTR_RRF_F0FF] = { 0xff, F_16,F_24,F_28,0,0,0 }, /* e.g. madbr */ 208 [INSTR_RRF_F0FF] = { 0xff, F_16,F_24,F_28,0,0,0 }, /* e.g. madbr */
209 [INSTR_RRF_FUFF] = { 0xff, F_24,F_16,F_28,U4_20,0,0 },/* e.g. didbr */ 209 [INSTR_RRF_FUFF] = { 0xff, F_24,F_16,F_28,U4_20,0,0 },/* e.g. didbr */
210 [INSTR_RRF_RURR] = { 0xff, R_24,R_28,R_16,U4_20,0,0 },/* e.g. .insn */ 210 [INSTR_RRF_RURR] = { 0xff, R_24,R_28,R_16,U4_20,0,0 },/* e.g. .insn */
211 [INSTR_RRF_R0RR] = { 0xff, R_24,R_28,R_16,0,0,0 }, /* e.g. idte */ 211 [INSTR_RRF_R0RR] = { 0xff, R_24,R_16,R_28,0,0,0 }, /* e.g. idte */
212 [INSTR_RRF_U0FF] = { 0xff, F_24,U4_16,F_28,0,0,0 }, /* e.g. fixr */ 212 [INSTR_RRF_U0FF] = { 0xff, F_24,U4_16,F_28,0,0,0 }, /* e.g. fixr */
213 [INSTR_RRF_U0RF] = { 0xff, R_24,U4_16,F_28,0,0,0 }, /* e.g. cfebr */ 213 [INSTR_RRF_U0RF] = { 0xff, R_24,U4_16,F_28,0,0,0 }, /* e.g. cfebr */
214 [INSTR_RRF_M0RR] = { 0xff, R_24,R_28,M_16,0,0,0 }, /* e.g. sske */ 214 [INSTR_RRF_M0RR] = { 0xff, R_24,R_28,M_16,0,0,0 }, /* e.g. sske */
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 1f4228948dc4..5d4fa4b1c74c 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -711,7 +711,7 @@ int __cpuinit __cpu_up(unsigned int cpu)
711 memset(sf, 0, sizeof(struct stack_frame)); 711 memset(sf, 0, sizeof(struct stack_frame));
712 sf->gprs[9] = (unsigned long) sf; 712 sf->gprs[9] = (unsigned long) sf;
713 cpu_lowcore->save_area[15] = (unsigned long) sf; 713 cpu_lowcore->save_area[15] = (unsigned long) sf;
714 __ctl_store(cpu_lowcore->cregs_save_area[0], 0, 15); 714 __ctl_store(cpu_lowcore->cregs_save_area, 0, 15);
715 asm volatile( 715 asm volatile(
716 " stam 0,15,0(%0)" 716 " stam 0,15,0(%0)"
717 : : "a" (&cpu_lowcore->access_regs_save_area) : "memory"); 717 : : "a" (&cpu_lowcore->access_regs_save_area) : "memory");
@@ -1089,7 +1089,7 @@ out:
1089 1089
1090#ifdef CONFIG_HOTPLUG_CPU 1090#ifdef CONFIG_HOTPLUG_CPU
1091 1091
1092int smp_rescan_cpus(void) 1092int __ref smp_rescan_cpus(void)
1093{ 1093{
1094 cpumask_t newcpus; 1094 cpumask_t newcpus;
1095 int cpu; 1095 int cpu;
diff --git a/arch/s390/kvm/diag.c b/arch/s390/kvm/diag.c
index f639a152869f..a0775e1f08df 100644
--- a/arch/s390/kvm/diag.c
+++ b/arch/s390/kvm/diag.c
@@ -20,7 +20,7 @@ static int __diag_time_slice_end(struct kvm_vcpu *vcpu)
20 VCPU_EVENT(vcpu, 5, "%s", "diag time slice end"); 20 VCPU_EVENT(vcpu, 5, "%s", "diag time slice end");
21 vcpu->stat.diagnose_44++; 21 vcpu->stat.diagnose_44++;
22 vcpu_put(vcpu); 22 vcpu_put(vcpu);
23 schedule(); 23 yield();
24 vcpu_load(vcpu); 24 vcpu_load(vcpu);
25 return 0; 25 return 0;
26} 26}
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
index fcd1ed8015c1..84a7fed4cd4e 100644
--- a/arch/s390/kvm/interrupt.c
+++ b/arch/s390/kvm/interrupt.c
@@ -339,6 +339,11 @@ int kvm_s390_handle_wait(struct kvm_vcpu *vcpu)
339 if (kvm_cpu_has_interrupt(vcpu)) 339 if (kvm_cpu_has_interrupt(vcpu))
340 return 0; 340 return 0;
341 341
342 __set_cpu_idle(vcpu);
343 spin_lock_bh(&vcpu->arch.local_int.lock);
344 vcpu->arch.local_int.timer_due = 0;
345 spin_unlock_bh(&vcpu->arch.local_int.lock);
346
342 if (psw_interrupts_disabled(vcpu)) { 347 if (psw_interrupts_disabled(vcpu)) {
343 VCPU_EVENT(vcpu, 3, "%s", "disabled wait"); 348 VCPU_EVENT(vcpu, 3, "%s", "disabled wait");
344 __unset_cpu_idle(vcpu); 349 __unset_cpu_idle(vcpu);
@@ -366,8 +371,6 @@ int kvm_s390_handle_wait(struct kvm_vcpu *vcpu)
366no_timer: 371no_timer:
367 spin_lock_bh(&vcpu->arch.local_int.float_int->lock); 372 spin_lock_bh(&vcpu->arch.local_int.float_int->lock);
368 spin_lock_bh(&vcpu->arch.local_int.lock); 373 spin_lock_bh(&vcpu->arch.local_int.lock);
369 __set_cpu_idle(vcpu);
370 vcpu->arch.local_int.timer_due = 0;
371 add_wait_queue(&vcpu->arch.local_int.wq, &wait); 374 add_wait_queue(&vcpu->arch.local_int.wq, &wait);
372 while (list_empty(&vcpu->arch.local_int.list) && 375 while (list_empty(&vcpu->arch.local_int.list) &&
373 list_empty(&vcpu->arch.local_int.float_int->list) && 376 list_empty(&vcpu->arch.local_int.float_int->list) &&
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 0ac36a649eba..6558b09ff579 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -423,6 +423,8 @@ int kvm_arch_vcpu_ioctl_set_mpstate(struct kvm_vcpu *vcpu,
423 return -EINVAL; /* not implemented yet */ 423 return -EINVAL; /* not implemented yet */
424} 424}
425 425
426extern void s390_handle_mcck(void);
427
426static void __vcpu_run(struct kvm_vcpu *vcpu) 428static void __vcpu_run(struct kvm_vcpu *vcpu)
427{ 429{
428 memcpy(&vcpu->arch.sie_block->gg14, &vcpu->arch.guest_gprs[14], 16); 430 memcpy(&vcpu->arch.sie_block->gg14, &vcpu->arch.guest_gprs[14], 16);
@@ -430,13 +432,21 @@ static void __vcpu_run(struct kvm_vcpu *vcpu)
430 if (need_resched()) 432 if (need_resched())
431 schedule(); 433 schedule();
432 434
435 if (test_thread_flag(TIF_MCCK_PENDING))
436 s390_handle_mcck();
437
438 kvm_s390_deliver_pending_interrupts(vcpu);
439
433 vcpu->arch.sie_block->icptcode = 0; 440 vcpu->arch.sie_block->icptcode = 0;
434 local_irq_disable(); 441 local_irq_disable();
435 kvm_guest_enter(); 442 kvm_guest_enter();
436 local_irq_enable(); 443 local_irq_enable();
437 VCPU_EVENT(vcpu, 6, "entering sie flags %x", 444 VCPU_EVENT(vcpu, 6, "entering sie flags %x",
438 atomic_read(&vcpu->arch.sie_block->cpuflags)); 445 atomic_read(&vcpu->arch.sie_block->cpuflags));
439 sie64a(vcpu->arch.sie_block, vcpu->arch.guest_gprs); 446 if (sie64a(vcpu->arch.sie_block, vcpu->arch.guest_gprs)) {
447 VCPU_EVENT(vcpu, 3, "%s", "fault in sie instruction");
448 kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING);
449 }
440 VCPU_EVENT(vcpu, 6, "exit sie icptcode %d", 450 VCPU_EVENT(vcpu, 6, "exit sie icptcode %d",
441 vcpu->arch.sie_block->icptcode); 451 vcpu->arch.sie_block->icptcode);
442 local_irq_disable(); 452 local_irq_disable();
@@ -475,7 +485,6 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
475 might_sleep(); 485 might_sleep();
476 486
477 do { 487 do {
478 kvm_s390_deliver_pending_interrupts(vcpu);
479 __vcpu_run(vcpu); 488 __vcpu_run(vcpu);
480 rc = kvm_handle_sie_intercept(vcpu); 489 rc = kvm_handle_sie_intercept(vcpu);
481 } while (!signal_pending(current) && !rc); 490 } while (!signal_pending(current) && !rc);
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c
index 29f3a63806b9..05598649b326 100644
--- a/arch/s390/mm/init.c
+++ b/arch/s390/mm/init.c
@@ -44,37 +44,34 @@ char empty_zero_page[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE)));
44 44
45void show_mem(void) 45void show_mem(void)
46{ 46{
47 int i, total = 0, reserved = 0; 47 unsigned long i, total = 0, reserved = 0;
48 int shared = 0, cached = 0; 48 unsigned long shared = 0, cached = 0;
49 unsigned long flags;
49 struct page *page; 50 struct page *page;
51 pg_data_t *pgdat;
50 52
51 printk("Mem-info:\n"); 53 printk("Mem-info:\n");
52 show_free_areas(); 54 show_free_areas();
53 i = max_mapnr; 55 for_each_online_pgdat(pgdat) {
54 while (i-- > 0) { 56 pgdat_resize_lock(pgdat, &flags);
55 if (!pfn_valid(i)) 57 for (i = 0; i < pgdat->node_spanned_pages; i++) {
56 continue; 58 if (!pfn_valid(pgdat->node_start_pfn + i))
57 page = pfn_to_page(i); 59 continue;
58 total++; 60 page = pfn_to_page(pgdat->node_start_pfn + i);
59 if (PageReserved(page)) 61 total++;
60 reserved++; 62 if (PageReserved(page))
61 else if (PageSwapCache(page)) 63 reserved++;
62 cached++; 64 else if (PageSwapCache(page))
63 else if (page_count(page)) 65 cached++;
64 shared += page_count(page) - 1; 66 else if (page_count(page))
67 shared += page_count(page) - 1;
68 }
69 pgdat_resize_unlock(pgdat, &flags);
65 } 70 }
66 printk("%d pages of RAM\n", total); 71 printk("%ld pages of RAM\n", total);
67 printk("%d reserved pages\n", reserved); 72 printk("%ld reserved pages\n", reserved);
68 printk("%d pages shared\n", shared); 73 printk("%ld pages shared\n", shared);
69 printk("%d pages swap cached\n", cached); 74 printk("%ld pages swap cached\n", cached);
70
71 printk("%lu pages dirty\n", global_page_state(NR_FILE_DIRTY));
72 printk("%lu pages writeback\n", global_page_state(NR_WRITEBACK));
73 printk("%lu pages mapped\n", global_page_state(NR_FILE_MAPPED));
74 printk("%lu pages slab\n",
75 global_page_state(NR_SLAB_RECLAIMABLE) +
76 global_page_state(NR_SLAB_UNRECLAIMABLE));
77 printk("%lu pages pagetables\n", global_page_state(NR_PAGETABLE));
78} 75}
79 76
80/* 77/*
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c
index 5c1aea97cd12..3d98ba82ea67 100644
--- a/arch/s390/mm/pgtable.c
+++ b/arch/s390/mm/pgtable.c
@@ -254,36 +254,46 @@ void disable_noexec(struct mm_struct *mm, struct task_struct *tsk)
254int s390_enable_sie(void) 254int s390_enable_sie(void)
255{ 255{
256 struct task_struct *tsk = current; 256 struct task_struct *tsk = current;
257 struct mm_struct *mm; 257 struct mm_struct *mm, *old_mm;
258 int rc;
259 258
260 task_lock(tsk); 259 /* Do we have pgstes? if yes, we are done */
261
262 rc = 0;
263 if (tsk->mm->context.pgstes) 260 if (tsk->mm->context.pgstes)
264 goto unlock; 261 return 0;
265 262
266 rc = -EINVAL; 263 /* lets check if we are allowed to replace the mm */
264 task_lock(tsk);
267 if (!tsk->mm || atomic_read(&tsk->mm->mm_users) > 1 || 265 if (!tsk->mm || atomic_read(&tsk->mm->mm_users) > 1 ||
268 tsk->mm != tsk->active_mm || tsk->mm->ioctx_list) 266 tsk->mm != tsk->active_mm || tsk->mm->ioctx_list) {
269 goto unlock; 267 task_unlock(tsk);
268 return -EINVAL;
269 }
270 task_unlock(tsk);
270 271
271 tsk->mm->context.pgstes = 1; /* dirty little tricks .. */ 272 /* we copy the mm with pgstes enabled */
273 tsk->mm->context.pgstes = 1;
272 mm = dup_mm(tsk); 274 mm = dup_mm(tsk);
273 tsk->mm->context.pgstes = 0; 275 tsk->mm->context.pgstes = 0;
274
275 rc = -ENOMEM;
276 if (!mm) 276 if (!mm)
277 goto unlock; 277 return -ENOMEM;
278 mmput(tsk->mm); 278
279 /* Now lets check again if somebody attached ptrace etc */
280 task_lock(tsk);
281 if (!tsk->mm || atomic_read(&tsk->mm->mm_users) > 1 ||
282 tsk->mm != tsk->active_mm || tsk->mm->ioctx_list) {
283 mmput(mm);
284 task_unlock(tsk);
285 return -EINVAL;
286 }
287
288 /* ok, we are alone. No ptrace, no threads, etc. */
289 old_mm = tsk->mm;
279 tsk->mm = tsk->active_mm = mm; 290 tsk->mm = tsk->active_mm = mm;
280 preempt_disable(); 291 preempt_disable();
281 update_mm(mm, tsk); 292 update_mm(mm, tsk);
282 cpu_set(smp_processor_id(), mm->cpu_vm_mask); 293 cpu_set(smp_processor_id(), mm->cpu_vm_mask);
283 preempt_enable(); 294 preempt_enable();
284 rc = 0;
285unlock:
286 task_unlock(tsk); 295 task_unlock(tsk);
287 return rc; 296 mmput(old_mm);
297 return 0;
288} 298}
289EXPORT_SYMBOL_GPL(s390_enable_sie); 299EXPORT_SYMBOL_GPL(s390_enable_sie);
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c
index ea2804808f39..e4868bfc672f 100644
--- a/arch/s390/mm/vmem.c
+++ b/arch/s390/mm/vmem.c
@@ -27,12 +27,19 @@ struct memory_segment {
27 27
28static LIST_HEAD(mem_segs); 28static LIST_HEAD(mem_segs);
29 29
30static pud_t *vmem_pud_alloc(void) 30static void __ref *vmem_alloc_pages(unsigned int order)
31{
32 if (slab_is_available())
33 return (void *)__get_free_pages(GFP_KERNEL, order);
34 return alloc_bootmem_pages((1 << order) * PAGE_SIZE);
35}
36
37static inline pud_t *vmem_pud_alloc(void)
31{ 38{
32 pud_t *pud = NULL; 39 pud_t *pud = NULL;
33 40
34#ifdef CONFIG_64BIT 41#ifdef CONFIG_64BIT
35 pud = vmemmap_alloc_block(PAGE_SIZE * 4, 0); 42 pud = vmem_alloc_pages(2);
36 if (!pud) 43 if (!pud)
37 return NULL; 44 return NULL;
38 clear_table((unsigned long *) pud, _REGION3_ENTRY_EMPTY, PAGE_SIZE * 4); 45 clear_table((unsigned long *) pud, _REGION3_ENTRY_EMPTY, PAGE_SIZE * 4);
@@ -40,12 +47,12 @@ static pud_t *vmem_pud_alloc(void)
40 return pud; 47 return pud;
41} 48}
42 49
43static pmd_t *vmem_pmd_alloc(void) 50static inline pmd_t *vmem_pmd_alloc(void)
44{ 51{
45 pmd_t *pmd = NULL; 52 pmd_t *pmd = NULL;
46 53
47#ifdef CONFIG_64BIT 54#ifdef CONFIG_64BIT
48 pmd = vmemmap_alloc_block(PAGE_SIZE * 4, 0); 55 pmd = vmem_alloc_pages(2);
49 if (!pmd) 56 if (!pmd)
50 return NULL; 57 return NULL;
51 clear_table((unsigned long *) pmd, _SEGMENT_ENTRY_EMPTY, PAGE_SIZE * 4); 58 clear_table((unsigned long *) pmd, _SEGMENT_ENTRY_EMPTY, PAGE_SIZE * 4);
@@ -207,13 +214,14 @@ int __meminit vmemmap_populate(struct page *start, unsigned long nr, int node)
207 if (pte_none(*pt_dir)) { 214 if (pte_none(*pt_dir)) {
208 unsigned long new_page; 215 unsigned long new_page;
209 216
210 new_page =__pa(vmemmap_alloc_block(PAGE_SIZE, 0)); 217 new_page =__pa(vmem_alloc_pages(0));
211 if (!new_page) 218 if (!new_page)
212 goto out; 219 goto out;
213 pte = pfn_pte(new_page >> PAGE_SHIFT, PAGE_KERNEL); 220 pte = pfn_pte(new_page >> PAGE_SHIFT, PAGE_KERNEL);
214 *pt_dir = pte; 221 *pt_dir = pte;
215 } 222 }
216 } 223 }
224 memset(start, 0, nr * sizeof(struct page));
217 ret = 0; 225 ret = 0;
218out: 226out:
219 flush_tlb_kernel_range(start_addr, end_addr); 227 flush_tlb_kernel_range(start_addr, end_addr);
@@ -228,7 +236,7 @@ static int insert_memory_segment(struct memory_segment *seg)
228{ 236{
229 struct memory_segment *tmp; 237 struct memory_segment *tmp;
230 238
231 if (seg->start + seg->size >= VMEM_MAX_PHYS || 239 if (seg->start + seg->size > VMEM_MAX_PHYS ||
232 seg->start + seg->size < seg->start) 240 seg->start + seg->size < seg->start)
233 return -ERANGE; 241 return -ERANGE;
234 242
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 8a68160079a9..9a854c8e5274 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -281,7 +281,6 @@ config CPU_SUBTYPE_SH7723
281 select CPU_SH4A 281 select CPU_SH4A
282 select CPU_SHX2 282 select CPU_SHX2
283 select ARCH_SPARSEMEM_ENABLE 283 select ARCH_SPARSEMEM_ENABLE
284 select SYS_SUPPORTS_NUMA
285 help 284 help
286 Select SH7723 if you have an SH-MobileR2 CPU. 285 Select SH7723 if you have an SH-MobileR2 CPU.
287 286
diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug
index 0d2ef1e9a6fd..0f4549860226 100644
--- a/arch/sh/Kconfig.debug
+++ b/arch/sh/Kconfig.debug
@@ -81,7 +81,7 @@ config DEBUG_STACK_USAGE
81 81
82config 4KSTACKS 82config 4KSTACKS
83 bool "Use 4Kb for kernel stacks instead of 8Kb" 83 bool "Use 4Kb for kernel stacks instead of 8Kb"
84 depends on DEBUG_KERNEL 84 depends on DEBUG_KERNEL && (MMU || BROKEN)
85 help 85 help
86 If you say Y here the kernel will use a 4Kb stacksize for the 86 If you say Y here the kernel will use a 4Kb stacksize for the
87 kernel stack attached to each process/thread. This facilitates 87 kernel stack attached to each process/thread. This facilitates
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index 8050b03d51fc..fb7b1b15e392 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -41,6 +41,8 @@ cflags-$(CONFIG_CPU_SH5) := $(call cc-option,-m5-32media-nofpu,)
41cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb 41cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb
42cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml 42cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml
43 43
44cflags-y += $(call cc-option,-mno-fdpic)
45
44# 46#
45# -Wa,-isa= tuning implies -Wa,-dsp for the versions of binutils that 47# -Wa,-isa= tuning implies -Wa,-dsp for the versions of binutils that
46# support it, while -Wa,-dsp by itself limits the range of usable opcodes 48# support it, while -Wa,-dsp by itself limits the range of usable opcodes
diff --git a/arch/sh/boards/renesas/rts7751r2d/setup.c b/arch/sh/boards/renesas/rts7751r2d/setup.c
index 452d0d6459a4..2308e8753bcd 100644
--- a/arch/sh/boards/renesas/rts7751r2d/setup.c
+++ b/arch/sh/boards/renesas/rts7751r2d/setup.c
@@ -11,7 +11,6 @@
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/platform_device.h> 12#include <linux/platform_device.h>
13#include <linux/ata_platform.h> 13#include <linux/ata_platform.h>
14#include <linux/serial_8250.h>
15#include <linux/sm501.h> 14#include <linux/sm501.h>
16#include <linux/sm501-regs.h> 15#include <linux/sm501-regs.h>
17#include <linux/pm.h> 16#include <linux/pm.h>
@@ -109,27 +108,6 @@ static struct platform_device heartbeat_device = {
109 .resource = heartbeat_resources, 108 .resource = heartbeat_resources,
110}; 109};
111 110
112static struct plat_serial8250_port uart_platform_data[] = {
113 {
114 .membase = (void __iomem *)0xb3e30000,
115 .mapbase = 0xb3e30000,
116 .iotype = UPIO_MEM,
117 .irq = IRQ_VOYAGER,
118 .flags = UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ,
119 .regshift = 2,
120 .uartclk = (9600 * 16),
121 },
122 { 0 },
123};
124
125static struct platform_device uart_device = {
126 .name = "serial8250",
127 .id = PLAT8250_DEV_PLATFORM,
128 .dev = {
129 .platform_data = uart_platform_data,
130 },
131};
132
133static struct resource sm501_resources[] = { 111static struct resource sm501_resources[] = {
134 [0] = { 112 [0] = {
135 .start = 0x10000000, 113 .start = 0x10000000,
@@ -185,11 +163,7 @@ static struct sm501_platdata_fb sm501_fb_pdata = {
185}; 163};
186 164
187static struct sm501_initdata sm501_initdata = { 165static struct sm501_initdata sm501_initdata = {
188 .gpio_high = { 166 .devices = SM501_USE_USB_HOST | SM501_USE_UART0,
189 .set = 0x00001fe0,
190 .mask = 0x0,
191 },
192 .devices = SM501_USE_USB_HOST,
193}; 167};
194 168
195static struct sm501_platdata sm501_platform_data = { 169static struct sm501_platdata sm501_platform_data = {
@@ -208,7 +182,6 @@ static struct platform_device sm501_device = {
208}; 182};
209 183
210static struct platform_device *rts7751r2d_devices[] __initdata = { 184static struct platform_device *rts7751r2d_devices[] __initdata = {
211 &uart_device,
212 &sm501_device, 185 &sm501_device,
213 &heartbeat_device, 186 &heartbeat_device,
214 &spi_sh_sci_device, 187 &spi_sh_sci_device,
@@ -272,16 +245,6 @@ static void __init rts7751r2d_setup(char **cmdline_p)
272 245
273 sm501_reg = (void __iomem *)0xb3e00000 + SM501_DRAM_CONTROL; 246 sm501_reg = (void __iomem *)0xb3e00000 + SM501_DRAM_CONTROL;
274 writel(readl(sm501_reg) | 0x00f107c0, sm501_reg); 247 writel(readl(sm501_reg) | 0x00f107c0, sm501_reg);
275
276 /*
277 * Power Mode Gate - Enable UART0
278 */
279
280 sm501_reg = (void __iomem *)0xb3e00000 + SM501_POWER_MODE_0_GATE;
281 writel(readl(sm501_reg) | (1 << SM501_GATE_UART0), sm501_reg);
282
283 sm501_reg = (void __iomem *)0xb3e00000 + SM501_POWER_MODE_1_GATE;
284 writel(readl(sm501_reg) | (1 << SM501_GATE_UART0), sm501_reg);
285} 248}
286 249
287/* 250/*
diff --git a/arch/sh/configs/migor_defconfig b/arch/sh/configs/migor_defconfig
index ee5900817f8f..287408b2ace6 100644
--- a/arch/sh/configs/migor_defconfig
+++ b/arch/sh/configs/migor_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.24 3# Linux kernel version: 2.6.26-rc3
4# Wed Feb 6 21:52:20 2008 4# Thu May 22 14:30:07 2008
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y 7CONFIG_SUPERH32=y
@@ -20,6 +20,7 @@ CONFIG_LOCKDEP_SUPPORT=y
20# CONFIG_ARCH_HAS_ILOG2_U32 is not set 20# CONFIG_ARCH_HAS_ILOG2_U32 is not set
21# CONFIG_ARCH_HAS_ILOG2_U64 is not set 21# CONFIG_ARCH_HAS_ILOG2_U64 is not set
22CONFIG_ARCH_NO_VIRT_TO_BUS=y 22CONFIG_ARCH_NO_VIRT_TO_BUS=y
23CONFIG_ARCH_SUPPORTS_AOUT=y
23CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 24CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
24 25
25# 26#
@@ -36,18 +37,16 @@ CONFIG_SYSVIPC_SYSCTL=y
36# CONFIG_POSIX_MQUEUE is not set 37# CONFIG_POSIX_MQUEUE is not set
37# CONFIG_BSD_PROCESS_ACCT is not set 38# CONFIG_BSD_PROCESS_ACCT is not set
38# CONFIG_TASKSTATS is not set 39# CONFIG_TASKSTATS is not set
39# CONFIG_USER_NS is not set
40# CONFIG_PID_NS is not set
41# CONFIG_AUDIT is not set 40# CONFIG_AUDIT is not set
42CONFIG_IKCONFIG=y 41CONFIG_IKCONFIG=y
43CONFIG_IKCONFIG_PROC=y 42CONFIG_IKCONFIG_PROC=y
44CONFIG_LOG_BUF_SHIFT=14 43CONFIG_LOG_BUF_SHIFT=14
45# CONFIG_CGROUPS is not set 44# CONFIG_CGROUPS is not set
46CONFIG_FAIR_GROUP_SCHED=y 45# CONFIG_GROUP_SCHED is not set
47CONFIG_FAIR_USER_SCHED=y
48# CONFIG_FAIR_CGROUP_SCHED is not set
49CONFIG_SYSFS_DEPRECATED=y 46CONFIG_SYSFS_DEPRECATED=y
47CONFIG_SYSFS_DEPRECATED_V2=y
50# CONFIG_RELAY is not set 48# CONFIG_RELAY is not set
49# CONFIG_NAMESPACES is not set
51CONFIG_BLK_DEV_INITRD=y 50CONFIG_BLK_DEV_INITRD=y
52CONFIG_INITRAMFS_SOURCE="" 51CONFIG_INITRAMFS_SOURCE=""
53# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 52# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
@@ -61,11 +60,13 @@ CONFIG_HOTPLUG=y
61CONFIG_PRINTK=y 60CONFIG_PRINTK=y
62CONFIG_BUG=y 61CONFIG_BUG=y
63CONFIG_ELF_CORE=y 62CONFIG_ELF_CORE=y
63CONFIG_COMPAT_BRK=y
64CONFIG_BASE_FULL=y 64CONFIG_BASE_FULL=y
65CONFIG_FUTEX=y 65CONFIG_FUTEX=y
66CONFIG_ANON_INODES=y 66CONFIG_ANON_INODES=y
67CONFIG_EPOLL=y 67CONFIG_EPOLL=y
68CONFIG_SIGNALFD=y 68CONFIG_SIGNALFD=y
69CONFIG_TIMERFD=y
69CONFIG_EVENTFD=y 70CONFIG_EVENTFD=y
70CONFIG_SHMEM=y 71CONFIG_SHMEM=y
71CONFIG_VM_EVENT_COUNTERS=y 72CONFIG_VM_EVENT_COUNTERS=y
@@ -77,11 +78,15 @@ CONFIG_PROFILING=y
77CONFIG_OPROFILE=y 78CONFIG_OPROFILE=y
78CONFIG_HAVE_OPROFILE=y 79CONFIG_HAVE_OPROFILE=y
79# CONFIG_HAVE_KPROBES is not set 80# CONFIG_HAVE_KPROBES is not set
81# CONFIG_HAVE_KRETPROBES is not set
82# CONFIG_HAVE_DMA_ATTRS is not set
83CONFIG_PROC_PAGE_MONITOR=y
80CONFIG_SLABINFO=y 84CONFIG_SLABINFO=y
81CONFIG_RT_MUTEXES=y 85CONFIG_RT_MUTEXES=y
82# CONFIG_TINY_SHMEM is not set 86# CONFIG_TINY_SHMEM is not set
83CONFIG_BASE_SMALL=0 87CONFIG_BASE_SMALL=0
84CONFIG_MODULES=y 88CONFIG_MODULES=y
89# CONFIG_MODULE_FORCE_LOAD is not set
85# CONFIG_MODULE_UNLOAD is not set 90# CONFIG_MODULE_UNLOAD is not set
86# CONFIG_MODVERSIONS is not set 91# CONFIG_MODVERSIONS is not set
87# CONFIG_MODULE_SRCVERSION_ALL is not set 92# CONFIG_MODULE_SRCVERSION_ALL is not set
@@ -105,7 +110,6 @@ CONFIG_DEFAULT_AS=y
105# CONFIG_DEFAULT_NOOP is not set 110# CONFIG_DEFAULT_NOOP is not set
106CONFIG_DEFAULT_IOSCHED="anticipatory" 111CONFIG_DEFAULT_IOSCHED="anticipatory"
107CONFIG_CLASSIC_RCU=y 112CONFIG_CLASSIC_RCU=y
108# CONFIG_PREEMPT_RCU is not set
109 113
110# 114#
111# System type 115# System type
@@ -118,6 +122,7 @@ CONFIG_CPU_SHX2=y
118# CONFIG_CPU_SUBTYPE_SH7203 is not set 122# CONFIG_CPU_SUBTYPE_SH7203 is not set
119# CONFIG_CPU_SUBTYPE_SH7206 is not set 123# CONFIG_CPU_SUBTYPE_SH7206 is not set
120# CONFIG_CPU_SUBTYPE_SH7263 is not set 124# CONFIG_CPU_SUBTYPE_SH7263 is not set
125# CONFIG_CPU_SUBTYPE_MXG is not set
121# CONFIG_CPU_SUBTYPE_SH7705 is not set 126# CONFIG_CPU_SUBTYPE_SH7705 is not set
122# CONFIG_CPU_SUBTYPE_SH7706 is not set 127# CONFIG_CPU_SUBTYPE_SH7706 is not set
123# CONFIG_CPU_SUBTYPE_SH7707 is not set 128# CONFIG_CPU_SUBTYPE_SH7707 is not set
@@ -135,6 +140,7 @@ CONFIG_CPU_SHX2=y
135# CONFIG_CPU_SUBTYPE_SH7751R is not set 140# CONFIG_CPU_SUBTYPE_SH7751R is not set
136# CONFIG_CPU_SUBTYPE_SH7760 is not set 141# CONFIG_CPU_SUBTYPE_SH7760 is not set
137# CONFIG_CPU_SUBTYPE_SH4_202 is not set 142# CONFIG_CPU_SUBTYPE_SH4_202 is not set
143# CONFIG_CPU_SUBTYPE_SH7723 is not set
138# CONFIG_CPU_SUBTYPE_SH7763 is not set 144# CONFIG_CPU_SUBTYPE_SH7763 is not set
139# CONFIG_CPU_SUBTYPE_SH7770 is not set 145# CONFIG_CPU_SUBTYPE_SH7770 is not set
140# CONFIG_CPU_SUBTYPE_SH7780 is not set 146# CONFIG_CPU_SUBTYPE_SH7780 is not set
@@ -142,6 +148,7 @@ CONFIG_CPU_SHX2=y
142# CONFIG_CPU_SUBTYPE_SHX3 is not set 148# CONFIG_CPU_SUBTYPE_SHX3 is not set
143# CONFIG_CPU_SUBTYPE_SH7343 is not set 149# CONFIG_CPU_SUBTYPE_SH7343 is not set
144CONFIG_CPU_SUBTYPE_SH7722=y 150CONFIG_CPU_SUBTYPE_SH7722=y
151# CONFIG_CPU_SUBTYPE_SH7366 is not set
145# CONFIG_CPU_SUBTYPE_SH5_101 is not set 152# CONFIG_CPU_SUBTYPE_SH5_101 is not set
146# CONFIG_CPU_SUBTYPE_SH5_103 is not set 153# CONFIG_CPU_SUBTYPE_SH5_103 is not set
147 154
@@ -255,7 +262,6 @@ CONFIG_HZ=250
255CONFIG_PREEMPT_NONE=y 262CONFIG_PREEMPT_NONE=y
256# CONFIG_PREEMPT_VOLUNTARY is not set 263# CONFIG_PREEMPT_VOLUNTARY is not set
257# CONFIG_PREEMPT is not set 264# CONFIG_PREEMPT is not set
258CONFIG_RCU_TRACE=y
259CONFIG_GUSA=y 265CONFIG_GUSA=y
260 266
261# 267#
@@ -323,8 +329,6 @@ CONFIG_TCP_CONG_CUBIC=y
323CONFIG_DEFAULT_TCP_CONG="cubic" 329CONFIG_DEFAULT_TCP_CONG="cubic"
324# CONFIG_TCP_MD5SIG is not set 330# CONFIG_TCP_MD5SIG is not set
325# CONFIG_IPV6 is not set 331# CONFIG_IPV6 is not set
326# CONFIG_INET6_XFRM_TUNNEL is not set
327# CONFIG_INET6_TUNNEL is not set
328# CONFIG_NETWORK_SECMARK is not set 332# CONFIG_NETWORK_SECMARK is not set
329# CONFIG_NETFILTER is not set 333# CONFIG_NETFILTER is not set
330# CONFIG_IP_DCCP is not set 334# CONFIG_IP_DCCP is not set
@@ -376,7 +380,90 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
376CONFIG_FW_LOADER=m 380CONFIG_FW_LOADER=m
377# CONFIG_SYS_HYPERVISOR is not set 381# CONFIG_SYS_HYPERVISOR is not set
378# CONFIG_CONNECTOR is not set 382# CONFIG_CONNECTOR is not set
379# CONFIG_MTD is not set 383CONFIG_MTD=y
384# CONFIG_MTD_DEBUG is not set
385CONFIG_MTD_CONCAT=y
386CONFIG_MTD_PARTITIONS=y
387# CONFIG_MTD_REDBOOT_PARTS is not set
388CONFIG_MTD_CMDLINE_PARTS=y
389# CONFIG_MTD_AR7_PARTS is not set
390
391#
392# User Modules And Translation Layers
393#
394CONFIG_MTD_CHAR=y
395CONFIG_MTD_BLKDEVS=y
396CONFIG_MTD_BLOCK=y
397# CONFIG_FTL is not set
398# CONFIG_NFTL is not set
399# CONFIG_INFTL is not set
400# CONFIG_RFD_FTL is not set
401# CONFIG_SSFDC is not set
402# CONFIG_MTD_OOPS is not set
403
404#
405# RAM/ROM/Flash chip drivers
406#
407CONFIG_MTD_CFI=y
408# CONFIG_MTD_JEDECPROBE is not set
409CONFIG_MTD_GEN_PROBE=y
410# CONFIG_MTD_CFI_ADV_OPTIONS is not set
411CONFIG_MTD_MAP_BANK_WIDTH_1=y
412CONFIG_MTD_MAP_BANK_WIDTH_2=y
413CONFIG_MTD_MAP_BANK_WIDTH_4=y
414# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
415# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
416# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
417CONFIG_MTD_CFI_I1=y
418CONFIG_MTD_CFI_I2=y
419# CONFIG_MTD_CFI_I4 is not set
420# CONFIG_MTD_CFI_I8 is not set
421# CONFIG_MTD_CFI_INTELEXT is not set
422CONFIG_MTD_CFI_AMDSTD=y
423# CONFIG_MTD_CFI_STAA is not set
424CONFIG_MTD_CFI_UTIL=y
425# CONFIG_MTD_RAM is not set
426# CONFIG_MTD_ROM is not set
427# CONFIG_MTD_ABSENT is not set
428
429#
430# Mapping drivers for chip access
431#
432# CONFIG_MTD_COMPLEX_MAPPINGS is not set
433CONFIG_MTD_PHYSMAP=y
434CONFIG_MTD_PHYSMAP_START=0xffffffff
435CONFIG_MTD_PHYSMAP_LEN=0
436CONFIG_MTD_PHYSMAP_BANKWIDTH=0
437# CONFIG_MTD_PLATRAM is not set
438
439#
440# Self-contained MTD device drivers
441#
442# CONFIG_MTD_SLRAM is not set
443# CONFIG_MTD_PHRAM is not set
444# CONFIG_MTD_MTDRAM is not set
445# CONFIG_MTD_BLOCK2MTD is not set
446
447#
448# Disk-On-Chip Device Drivers
449#
450# CONFIG_MTD_DOC2000 is not set
451# CONFIG_MTD_DOC2001 is not set
452# CONFIG_MTD_DOC2001PLUS is not set
453CONFIG_MTD_NAND=y
454# CONFIG_MTD_NAND_VERIFY_WRITE is not set
455# CONFIG_MTD_NAND_ECC_SMC is not set
456# CONFIG_MTD_NAND_MUSEUM_IDS is not set
457CONFIG_MTD_NAND_IDS=y
458# CONFIG_MTD_NAND_DISKONCHIP is not set
459# CONFIG_MTD_NAND_NANDSIM is not set
460CONFIG_MTD_NAND_PLATFORM=y
461# CONFIG_MTD_ONENAND is not set
462
463#
464# UBI - Unsorted block images
465#
466# CONFIG_MTD_UBI is not set
380# CONFIG_PARPORT is not set 467# CONFIG_PARPORT is not set
381CONFIG_BLK_DEV=y 468CONFIG_BLK_DEV=y
382# CONFIG_BLK_DEV_COW_COMMON is not set 469# CONFIG_BLK_DEV_COW_COMMON is not set
@@ -385,11 +472,13 @@ CONFIG_BLK_DEV=y
385CONFIG_BLK_DEV_RAM=y 472CONFIG_BLK_DEV_RAM=y
386CONFIG_BLK_DEV_RAM_COUNT=16 473CONFIG_BLK_DEV_RAM_COUNT=16
387CONFIG_BLK_DEV_RAM_SIZE=4096 474CONFIG_BLK_DEV_RAM_SIZE=4096
388CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 475# CONFIG_BLK_DEV_XIP is not set
389# CONFIG_CDROM_PKTCDVD is not set 476# CONFIG_CDROM_PKTCDVD is not set
390# CONFIG_ATA_OVER_ETH is not set 477# CONFIG_ATA_OVER_ETH is not set
391CONFIG_MISC_DEVICES=y 478CONFIG_MISC_DEVICES=y
392# CONFIG_EEPROM_93CX6 is not set 479# CONFIG_EEPROM_93CX6 is not set
480# CONFIG_ENCLOSURE_SERVICES is not set
481CONFIG_HAVE_IDE=y
393# CONFIG_IDE is not set 482# CONFIG_IDE is not set
394 483
395# 484#
@@ -461,6 +550,7 @@ CONFIG_SMC91X=y
461# 550#
462# CONFIG_WLAN_PRE80211 is not set 551# CONFIG_WLAN_PRE80211 is not set
463# CONFIG_WLAN_80211 is not set 552# CONFIG_WLAN_80211 is not set
553# CONFIG_IWLWIFI_LEDS is not set
464# CONFIG_WAN is not set 554# CONFIG_WAN is not set
465# CONFIG_PPP is not set 555# CONFIG_PPP is not set
466# CONFIG_SLIP is not set 556# CONFIG_SLIP is not set
@@ -482,13 +572,20 @@ CONFIG_INPUT=y
482# 572#
483# CONFIG_INPUT_MOUSEDEV is not set 573# CONFIG_INPUT_MOUSEDEV is not set
484# CONFIG_INPUT_JOYDEV is not set 574# CONFIG_INPUT_JOYDEV is not set
485# CONFIG_INPUT_EVDEV is not set 575CONFIG_INPUT_EVDEV=y
486# CONFIG_INPUT_EVBUG is not set 576# CONFIG_INPUT_EVBUG is not set
487 577
488# 578#
489# Input Device Drivers 579# Input Device Drivers
490# 580#
491# CONFIG_INPUT_KEYBOARD is not set 581CONFIG_INPUT_KEYBOARD=y
582# CONFIG_KEYBOARD_ATKBD is not set
583# CONFIG_KEYBOARD_SUNKBD is not set
584# CONFIG_KEYBOARD_LKKBD is not set
585# CONFIG_KEYBOARD_XTKBD is not set
586# CONFIG_KEYBOARD_NEWTON is not set
587# CONFIG_KEYBOARD_STOWAWAY is not set
588CONFIG_KEYBOARD_SH_KEYSC=y
492# CONFIG_INPUT_MOUSE is not set 589# CONFIG_INPUT_MOUSE is not set
493# CONFIG_INPUT_JOYSTICK is not set 590# CONFIG_INPUT_JOYSTICK is not set
494# CONFIG_INPUT_TABLET is not set 591# CONFIG_INPUT_TABLET is not set
@@ -508,6 +605,7 @@ CONFIG_VT=y
508CONFIG_VT_CONSOLE=y 605CONFIG_VT_CONSOLE=y
509CONFIG_HW_CONSOLE=y 606CONFIG_HW_CONSOLE=y
510CONFIG_VT_HW_CONSOLE_BINDING=y 607CONFIG_VT_HW_CONSOLE_BINDING=y
608CONFIG_DEVKMEM=y
511# CONFIG_SERIAL_NONSTANDARD is not set 609# CONFIG_SERIAL_NONSTANDARD is not set
512 610
513# 611#
@@ -531,16 +629,40 @@ CONFIG_HW_RANDOM=y
531# CONFIG_R3964 is not set 629# CONFIG_R3964 is not set
532# CONFIG_RAW_DRIVER is not set 630# CONFIG_RAW_DRIVER is not set
533# CONFIG_TCG_TPM is not set 631# CONFIG_TCG_TPM is not set
534# CONFIG_I2C is not set 632CONFIG_I2C=y
535 633CONFIG_I2C_BOARDINFO=y
536# 634# CONFIG_I2C_CHARDEV is not set
537# SPI support 635
538# 636#
637# I2C Hardware Bus support
638#
639# CONFIG_I2C_OCORES is not set
640# CONFIG_I2C_PARPORT_LIGHT is not set
641# CONFIG_I2C_SIMTEC is not set
642# CONFIG_I2C_TAOS_EVM is not set
643# CONFIG_I2C_STUB is not set
644# CONFIG_I2C_PCA_PLATFORM is not set
645CONFIG_I2C_SH_MOBILE=y
646
647#
648# Miscellaneous I2C Chip support
649#
650# CONFIG_DS1682 is not set
651# CONFIG_SENSORS_EEPROM is not set
652# CONFIG_SENSORS_PCF8574 is not set
653# CONFIG_PCF8575 is not set
654# CONFIG_SENSORS_PCF8591 is not set
655# CONFIG_SENSORS_MAX6875 is not set
656# CONFIG_SENSORS_TSL2550 is not set
657# CONFIG_I2C_DEBUG_CORE is not set
658# CONFIG_I2C_DEBUG_ALGO is not set
659# CONFIG_I2C_DEBUG_BUS is not set
660# CONFIG_I2C_DEBUG_CHIP is not set
539# CONFIG_SPI is not set 661# CONFIG_SPI is not set
540# CONFIG_SPI_MASTER is not set
541# CONFIG_W1 is not set 662# CONFIG_W1 is not set
542# CONFIG_POWER_SUPPLY is not set 663# CONFIG_POWER_SUPPLY is not set
543# CONFIG_HWMON is not set 664# CONFIG_HWMON is not set
665# CONFIG_THERMAL is not set
544# CONFIG_WATCHDOG is not set 666# CONFIG_WATCHDOG is not set
545 667
546# 668#
@@ -553,12 +675,22 @@ CONFIG_SSB_POSSIBLE=y
553# Multifunction device drivers 675# Multifunction device drivers
554# 676#
555# CONFIG_MFD_SM501 is not set 677# CONFIG_MFD_SM501 is not set
678# CONFIG_HTC_PASIC3 is not set
556 679
557# 680#
558# Multimedia devices 681# Multimedia devices
559# 682#
683
684#
685# Multimedia core support
686#
560# CONFIG_VIDEO_DEV is not set 687# CONFIG_VIDEO_DEV is not set
561# CONFIG_DVB_CORE is not set 688# CONFIG_DVB_CORE is not set
689# CONFIG_VIDEO_MEDIA is not set
690
691#
692# Multimedia drivers
693#
562# CONFIG_DAB is not set 694# CONFIG_DAB is not set
563 695
564# 696#
@@ -592,6 +724,8 @@ CONFIG_USB_ARCH_HAS_HCD=y
592# CONFIG_USB_ARCH_HAS_OHCI is not set 724# CONFIG_USB_ARCH_HAS_OHCI is not set
593# CONFIG_USB_ARCH_HAS_EHCI is not set 725# CONFIG_USB_ARCH_HAS_EHCI is not set
594# CONFIG_USB is not set 726# CONFIG_USB is not set
727# CONFIG_USB_OTG_WHITELIST is not set
728# CONFIG_USB_OTG_BLACKLIST_HUB is not set
595 729
596# 730#
597# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 731# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -608,6 +742,7 @@ CONFIG_USB_GADGET_SELECTED=y
608CONFIG_USB_GADGET_M66592=y 742CONFIG_USB_GADGET_M66592=y
609CONFIG_USB_M66592=y 743CONFIG_USB_M66592=y
610CONFIG_SUPERH_BUILT_IN_M66592=y 744CONFIG_SUPERH_BUILT_IN_M66592=y
745# CONFIG_USB_GADGET_PXA27X is not set
611# CONFIG_USB_GADGET_GOKU is not set 746# CONFIG_USB_GADGET_GOKU is not set
612# CONFIG_USB_GADGET_LH7A40X is not set 747# CONFIG_USB_GADGET_LH7A40X is not set
613# CONFIG_USB_GADGET_OMAP is not set 748# CONFIG_USB_GADGET_OMAP is not set
@@ -623,7 +758,9 @@ CONFIG_USB_G_SERIAL=y
623# CONFIG_USB_MIDI_GADGET is not set 758# CONFIG_USB_MIDI_GADGET is not set
624# CONFIG_USB_G_PRINTER is not set 759# CONFIG_USB_G_PRINTER is not set
625# CONFIG_MMC is not set 760# CONFIG_MMC is not set
761# CONFIG_MEMSTICK is not set
626# CONFIG_NEW_LEDS is not set 762# CONFIG_NEW_LEDS is not set
763# CONFIG_ACCESSIBILITY is not set
627CONFIG_RTC_LIB=y 764CONFIG_RTC_LIB=y
628CONFIG_RTC_CLASS=y 765CONFIG_RTC_CLASS=y
629CONFIG_RTC_HCTOSYS=y 766CONFIG_RTC_HCTOSYS=y
@@ -640,15 +777,31 @@ CONFIG_RTC_INTF_DEV=y
640# CONFIG_RTC_DRV_TEST is not set 777# CONFIG_RTC_DRV_TEST is not set
641 778
642# 779#
780# I2C RTC drivers
781#
782# CONFIG_RTC_DRV_DS1307 is not set
783# CONFIG_RTC_DRV_DS1374 is not set
784# CONFIG_RTC_DRV_DS1672 is not set
785# CONFIG_RTC_DRV_MAX6900 is not set
786CONFIG_RTC_DRV_RS5C372=y
787# CONFIG_RTC_DRV_ISL1208 is not set
788# CONFIG_RTC_DRV_X1205 is not set
789# CONFIG_RTC_DRV_PCF8563 is not set
790# CONFIG_RTC_DRV_PCF8583 is not set
791# CONFIG_RTC_DRV_M41T80 is not set
792# CONFIG_RTC_DRV_S35390A is not set
793
794#
643# SPI RTC drivers 795# SPI RTC drivers
644# 796#
645 797
646# 798#
647# Platform RTC drivers 799# Platform RTC drivers
648# 800#
801# CONFIG_RTC_DRV_DS1511 is not set
649# CONFIG_RTC_DRV_DS1553 is not set 802# CONFIG_RTC_DRV_DS1553 is not set
650# CONFIG_RTC_DRV_STK17TA8 is not set
651# CONFIG_RTC_DRV_DS1742 is not set 803# CONFIG_RTC_DRV_DS1742 is not set
804# CONFIG_RTC_DRV_STK17TA8 is not set
652# CONFIG_RTC_DRV_M48T86 is not set 805# CONFIG_RTC_DRV_M48T86 is not set
653# CONFIG_RTC_DRV_M48T59 is not set 806# CONFIG_RTC_DRV_M48T59 is not set
654# CONFIG_RTC_DRV_V3020 is not set 807# CONFIG_RTC_DRV_V3020 is not set
@@ -657,10 +810,6 @@ CONFIG_RTC_INTF_DEV=y
657# on-CPU RTC drivers 810# on-CPU RTC drivers
658# 811#
659CONFIG_RTC_DRV_SH=y 812CONFIG_RTC_DRV_SH=y
660
661#
662# Userspace I/O
663#
664# CONFIG_UIO is not set 813# CONFIG_UIO is not set
665 814
666# 815#
@@ -673,13 +822,10 @@ CONFIG_RTC_DRV_SH=y
673# CONFIG_JFS_FS is not set 822# CONFIG_JFS_FS is not set
674# CONFIG_FS_POSIX_ACL is not set 823# CONFIG_FS_POSIX_ACL is not set
675# CONFIG_XFS_FS is not set 824# CONFIG_XFS_FS is not set
676# CONFIG_GFS2_FS is not set
677# CONFIG_OCFS2_FS is not set 825# CONFIG_OCFS2_FS is not set
678# CONFIG_MINIX_FS is not set 826# CONFIG_DNOTIFY is not set
679# CONFIG_ROMFS_FS is not set
680# CONFIG_INOTIFY is not set 827# CONFIG_INOTIFY is not set
681# CONFIG_QUOTA is not set 828# CONFIG_QUOTA is not set
682# CONFIG_DNOTIFY is not set
683# CONFIG_AUTOFS_FS is not set 829# CONFIG_AUTOFS_FS is not set
684# CONFIG_AUTOFS4_FS is not set 830# CONFIG_AUTOFS4_FS is not set
685# CONFIG_FUSE_FS is not set 831# CONFIG_FUSE_FS is not set
@@ -720,10 +866,13 @@ CONFIG_TMPFS=y
720# CONFIG_BEFS_FS is not set 866# CONFIG_BEFS_FS is not set
721# CONFIG_BFS_FS is not set 867# CONFIG_BFS_FS is not set
722# CONFIG_EFS_FS is not set 868# CONFIG_EFS_FS is not set
869# CONFIG_JFFS2_FS is not set
723# CONFIG_CRAMFS is not set 870# CONFIG_CRAMFS is not set
724# CONFIG_VXFS_FS is not set 871# CONFIG_VXFS_FS is not set
872# CONFIG_MINIX_FS is not set
725# CONFIG_HPFS_FS is not set 873# CONFIG_HPFS_FS is not set
726# CONFIG_QNX4FS_FS is not set 874# CONFIG_QNX4FS_FS is not set
875# CONFIG_ROMFS_FS is not set
727# CONFIG_SYSV_FS is not set 876# CONFIG_SYSV_FS is not set
728# CONFIG_UFS_FS is not set 877# CONFIG_UFS_FS is not set
729# CONFIG_NETWORK_FILESYSTEMS is not set 878# CONFIG_NETWORK_FILESYSTEMS is not set
@@ -743,6 +892,7 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
743# CONFIG_PRINTK_TIME is not set 892# CONFIG_PRINTK_TIME is not set
744CONFIG_ENABLE_WARN_DEPRECATED=y 893CONFIG_ENABLE_WARN_DEPRECATED=y
745CONFIG_ENABLE_MUST_CHECK=y 894CONFIG_ENABLE_MUST_CHECK=y
895CONFIG_FRAME_WARN=1024
746# CONFIG_MAGIC_SYSRQ is not set 896# CONFIG_MAGIC_SYSRQ is not set
747# CONFIG_UNUSED_SYMBOLS is not set 897# CONFIG_UNUSED_SYMBOLS is not set
748CONFIG_DEBUG_FS=y 898CONFIG_DEBUG_FS=y
@@ -763,48 +913,77 @@ CONFIG_EARLY_PRINTK=y
763# CONFIG_SECURITY is not set 913# CONFIG_SECURITY is not set
764# CONFIG_SECURITY_FILE_CAPABILITIES is not set 914# CONFIG_SECURITY_FILE_CAPABILITIES is not set
765CONFIG_CRYPTO=y 915CONFIG_CRYPTO=y
766# CONFIG_CRYPTO_SEQIV is not set 916
917#
918# Crypto core or helper
919#
767# CONFIG_CRYPTO_MANAGER is not set 920# CONFIG_CRYPTO_MANAGER is not set
921# CONFIG_CRYPTO_GF128MUL is not set
922# CONFIG_CRYPTO_NULL is not set
923# CONFIG_CRYPTO_CRYPTD is not set
924# CONFIG_CRYPTO_AUTHENC is not set
925# CONFIG_CRYPTO_TEST is not set
926
927#
928# Authenticated Encryption with Associated Data
929#
930# CONFIG_CRYPTO_CCM is not set
931# CONFIG_CRYPTO_GCM is not set
932# CONFIG_CRYPTO_SEQIV is not set
933
934#
935# Block modes
936#
937# CONFIG_CRYPTO_CBC is not set
938# CONFIG_CRYPTO_CTR is not set
939# CONFIG_CRYPTO_CTS is not set
940# CONFIG_CRYPTO_ECB is not set
941# CONFIG_CRYPTO_LRW is not set
942# CONFIG_CRYPTO_PCBC is not set
943# CONFIG_CRYPTO_XTS is not set
944
945#
946# Hash modes
947#
768# CONFIG_CRYPTO_HMAC is not set 948# CONFIG_CRYPTO_HMAC is not set
769# CONFIG_CRYPTO_XCBC is not set 949# CONFIG_CRYPTO_XCBC is not set
770# CONFIG_CRYPTO_NULL is not set 950
951#
952# Digest
953#
954# CONFIG_CRYPTO_CRC32C is not set
771# CONFIG_CRYPTO_MD4 is not set 955# CONFIG_CRYPTO_MD4 is not set
772# CONFIG_CRYPTO_MD5 is not set 956# CONFIG_CRYPTO_MD5 is not set
957# CONFIG_CRYPTO_MICHAEL_MIC is not set
773# CONFIG_CRYPTO_SHA1 is not set 958# CONFIG_CRYPTO_SHA1 is not set
774# CONFIG_CRYPTO_SHA256 is not set 959# CONFIG_CRYPTO_SHA256 is not set
775# CONFIG_CRYPTO_SHA512 is not set 960# CONFIG_CRYPTO_SHA512 is not set
776# CONFIG_CRYPTO_WP512 is not set
777# CONFIG_CRYPTO_TGR192 is not set 961# CONFIG_CRYPTO_TGR192 is not set
778# CONFIG_CRYPTO_GF128MUL is not set 962# CONFIG_CRYPTO_WP512 is not set
779# CONFIG_CRYPTO_ECB is not set 963
780# CONFIG_CRYPTO_CBC is not set 964#
781# CONFIG_CRYPTO_PCBC is not set 965# Ciphers
782# CONFIG_CRYPTO_LRW is not set 966#
783# CONFIG_CRYPTO_XTS is not set
784# CONFIG_CRYPTO_CTR is not set
785# CONFIG_CRYPTO_GCM is not set
786# CONFIG_CRYPTO_CCM is not set
787# CONFIG_CRYPTO_CRYPTD is not set
788# CONFIG_CRYPTO_DES is not set
789# CONFIG_CRYPTO_FCRYPT is not set
790# CONFIG_CRYPTO_BLOWFISH is not set
791# CONFIG_CRYPTO_TWOFISH is not set
792# CONFIG_CRYPTO_SERPENT is not set
793# CONFIG_CRYPTO_AES is not set 967# CONFIG_CRYPTO_AES is not set
968# CONFIG_CRYPTO_ANUBIS is not set
969# CONFIG_CRYPTO_ARC4 is not set
970# CONFIG_CRYPTO_BLOWFISH is not set
971# CONFIG_CRYPTO_CAMELLIA is not set
794# CONFIG_CRYPTO_CAST5 is not set 972# CONFIG_CRYPTO_CAST5 is not set
795# CONFIG_CRYPTO_CAST6 is not set 973# CONFIG_CRYPTO_CAST6 is not set
796# CONFIG_CRYPTO_TEA is not set 974# CONFIG_CRYPTO_DES is not set
797# CONFIG_CRYPTO_ARC4 is not set 975# CONFIG_CRYPTO_FCRYPT is not set
798# CONFIG_CRYPTO_KHAZAD is not set 976# CONFIG_CRYPTO_KHAZAD is not set
799# CONFIG_CRYPTO_ANUBIS is not set
800# CONFIG_CRYPTO_SEED is not set
801# CONFIG_CRYPTO_SALSA20 is not set 977# CONFIG_CRYPTO_SALSA20 is not set
978# CONFIG_CRYPTO_SEED is not set
979# CONFIG_CRYPTO_SERPENT is not set
980# CONFIG_CRYPTO_TEA is not set
981# CONFIG_CRYPTO_TWOFISH is not set
982
983#
984# Compression
985#
802# CONFIG_CRYPTO_DEFLATE is not set 986# CONFIG_CRYPTO_DEFLATE is not set
803# CONFIG_CRYPTO_MICHAEL_MIC is not set
804# CONFIG_CRYPTO_CRC32C is not set
805# CONFIG_CRYPTO_CAMELLIA is not set
806# CONFIG_CRYPTO_TEST is not set
807# CONFIG_CRYPTO_AUTHENC is not set
808# CONFIG_CRYPTO_LZO is not set 987# CONFIG_CRYPTO_LZO is not set
809CONFIG_CRYPTO_HW=y 988CONFIG_CRYPTO_HW=y
810 989
@@ -812,6 +991,7 @@ CONFIG_CRYPTO_HW=y
812# Library routines 991# Library routines
813# 992#
814CONFIG_BITREVERSE=y 993CONFIG_BITREVERSE=y
994# CONFIG_GENERIC_FIND_FIRST_BIT is not set
815# CONFIG_CRC_CCITT is not set 995# CONFIG_CRC_CCITT is not set
816# CONFIG_CRC16 is not set 996# CONFIG_CRC16 is not set
817# CONFIG_CRC_ITU_T is not set 997# CONFIG_CRC_ITU_T is not set
diff --git a/arch/sh/configs/rsk7203_defconfig b/arch/sh/configs/rsk7203_defconfig
new file mode 100644
index 000000000000..a0ebd439cbd2
--- /dev/null
+++ b/arch/sh/configs/rsk7203_defconfig
@@ -0,0 +1,841 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.26-rc4
4# Tue Jun 3 13:02:42 2008
5#
6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y
8CONFIG_RWSEM_GENERIC_SPINLOCK=y
9CONFIG_GENERIC_BUG=y
10CONFIG_GENERIC_FIND_NEXT_BIT=y
11CONFIG_GENERIC_HWEIGHT=y
12CONFIG_GENERIC_HARDIRQS=y
13CONFIG_GENERIC_IRQ_PROBE=y
14CONFIG_GENERIC_CALIBRATE_DELAY=y
15# CONFIG_GENERIC_TIME is not set
16# CONFIG_GENERIC_CLOCKEVENTS is not set
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
21CONFIG_ARCH_NO_VIRT_TO_BUS=y
22CONFIG_ARCH_SUPPORTS_AOUT=y
23CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
24
25#
26# General setup
27#
28CONFIG_EXPERIMENTAL=y
29CONFIG_BROKEN_ON_SMP=y
30CONFIG_INIT_ENV_ARG_LIMIT=32
31CONFIG_LOCALVERSION=""
32# CONFIG_LOCALVERSION_AUTO is not set
33CONFIG_SYSVIPC=y
34CONFIG_SYSVIPC_SYSCTL=y
35CONFIG_POSIX_MQUEUE=y
36# CONFIG_BSD_PROCESS_ACCT is not set
37# CONFIG_TASKSTATS is not set
38# CONFIG_AUDIT is not set
39# CONFIG_IKCONFIG is not set
40CONFIG_LOG_BUF_SHIFT=14
41# CONFIG_CGROUPS is not set
42CONFIG_GROUP_SCHED=y
43CONFIG_FAIR_GROUP_SCHED=y
44# CONFIG_RT_GROUP_SCHED is not set
45CONFIG_USER_SCHED=y
46# CONFIG_CGROUP_SCHED is not set
47CONFIG_SYSFS_DEPRECATED=y
48CONFIG_SYSFS_DEPRECATED_V2=y
49# CONFIG_RELAY is not set
50# CONFIG_NAMESPACES is not set
51CONFIG_BLK_DEV_INITRD=y
52CONFIG_INITRAMFS_SOURCE=""
53CONFIG_CC_OPTIMIZE_FOR_SIZE=y
54CONFIG_SYSCTL=y
55CONFIG_EMBEDDED=y
56CONFIG_UID16=y
57CONFIG_SYSCTL_SYSCALL=y
58CONFIG_SYSCTL_SYSCALL_CHECK=y
59CONFIG_KALLSYMS=y
60CONFIG_KALLSYMS_ALL=y
61# CONFIG_KALLSYMS_EXTRA_PASS is not set
62CONFIG_HOTPLUG=y
63CONFIG_PRINTK=y
64CONFIG_BUG=y
65CONFIG_ELF_CORE=y
66CONFIG_COMPAT_BRK=y
67CONFIG_BASE_FULL=y
68CONFIG_FUTEX=y
69CONFIG_ANON_INODES=y
70CONFIG_EPOLL=y
71CONFIG_SIGNALFD=y
72CONFIG_TIMERFD=y
73CONFIG_EVENTFD=y
74CONFIG_VM_EVENT_COUNTERS=y
75CONFIG_SLAB=y
76# CONFIG_SLUB is not set
77# CONFIG_SLOB is not set
78CONFIG_PROFILING=y
79# CONFIG_MARKERS is not set
80CONFIG_OPROFILE=y
81CONFIG_HAVE_OPROFILE=y
82# CONFIG_HAVE_KPROBES is not set
83# CONFIG_HAVE_KRETPROBES is not set
84# CONFIG_HAVE_DMA_ATTRS is not set
85CONFIG_SLABINFO=y
86CONFIG_RT_MUTEXES=y
87CONFIG_TINY_SHMEM=y
88CONFIG_BASE_SMALL=0
89# CONFIG_MODULES is not set
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# CONFIG_BLK_DEV_BSG 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"
108CONFIG_CLASSIC_RCU=y
109
110#
111# System type
112#
113CONFIG_CPU_SH2=y
114CONFIG_CPU_SH2A=y
115# CONFIG_CPU_SUBTYPE_SH7619 is not set
116CONFIG_CPU_SUBTYPE_SH7203=y
117# CONFIG_CPU_SUBTYPE_SH7206 is not set
118# CONFIG_CPU_SUBTYPE_SH7263 is not set
119# CONFIG_CPU_SUBTYPE_MXG is not set
120# CONFIG_CPU_SUBTYPE_SH7705 is not set
121# CONFIG_CPU_SUBTYPE_SH7706 is not set
122# CONFIG_CPU_SUBTYPE_SH7707 is not set
123# CONFIG_CPU_SUBTYPE_SH7708 is not set
124# CONFIG_CPU_SUBTYPE_SH7709 is not set
125# CONFIG_CPU_SUBTYPE_SH7710 is not set
126# CONFIG_CPU_SUBTYPE_SH7712 is not set
127# CONFIG_CPU_SUBTYPE_SH7720 is not set
128# CONFIG_CPU_SUBTYPE_SH7721 is not set
129# CONFIG_CPU_SUBTYPE_SH7750 is not set
130# CONFIG_CPU_SUBTYPE_SH7091 is not set
131# CONFIG_CPU_SUBTYPE_SH7750R is not set
132# CONFIG_CPU_SUBTYPE_SH7750S is not set
133# CONFIG_CPU_SUBTYPE_SH7751 is not set
134# CONFIG_CPU_SUBTYPE_SH7751R is not set
135# CONFIG_CPU_SUBTYPE_SH7760 is not set
136# CONFIG_CPU_SUBTYPE_SH4_202 is not set
137# CONFIG_CPU_SUBTYPE_SH7723 is not set
138# CONFIG_CPU_SUBTYPE_SH7763 is not set
139# CONFIG_CPU_SUBTYPE_SH7770 is not set
140# CONFIG_CPU_SUBTYPE_SH7780 is not set
141# CONFIG_CPU_SUBTYPE_SH7785 is not set
142# CONFIG_CPU_SUBTYPE_SHX3 is not set
143# CONFIG_CPU_SUBTYPE_SH7343 is not set
144# CONFIG_CPU_SUBTYPE_SH7722 is not set
145# CONFIG_CPU_SUBTYPE_SH7366 is not set
146# CONFIG_CPU_SUBTYPE_SH5_101 is not set
147# CONFIG_CPU_SUBTYPE_SH5_103 is not set
148
149#
150# Memory management options
151#
152CONFIG_QUICKLIST=y
153CONFIG_PAGE_OFFSET=0x00000000
154CONFIG_MEMORY_START=0x0c000000
155CONFIG_MEMORY_SIZE=0x01000000
156CONFIG_29BIT=y
157CONFIG_ARCH_FLATMEM_ENABLE=y
158CONFIG_ARCH_SPARSEMEM_ENABLE=y
159CONFIG_ARCH_SPARSEMEM_DEFAULT=y
160CONFIG_MAX_ACTIVE_REGIONS=1
161CONFIG_ARCH_POPULATES_NODE_MAP=y
162CONFIG_ARCH_SELECT_MEMORY_MODEL=y
163CONFIG_PAGE_SIZE_4KB=y
164# CONFIG_PAGE_SIZE_8KB is not set
165# CONFIG_PAGE_SIZE_64KB is not set
166CONFIG_SELECT_MEMORY_MODEL=y
167CONFIG_FLATMEM_MANUAL=y
168# CONFIG_DISCONTIGMEM_MANUAL is not set
169# CONFIG_SPARSEMEM_MANUAL is not set
170CONFIG_FLATMEM=y
171CONFIG_FLAT_NODE_MEM_MAP=y
172CONFIG_SPARSEMEM_STATIC=y
173# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
174CONFIG_PAGEFLAGS_EXTENDED=y
175CONFIG_SPLIT_PTLOCK_CPUS=4
176# CONFIG_RESOURCES_64BIT is not set
177CONFIG_ZONE_DMA_FLAG=0
178CONFIG_NR_QUICK=2
179
180#
181# Cache configuration
182#
183# CONFIG_SH_DIRECT_MAPPED is not set
184CONFIG_CACHE_WRITEBACK=y
185# CONFIG_CACHE_WRITETHROUGH is not set
186# CONFIG_CACHE_OFF is not set
187
188#
189# Processor features
190#
191# CONFIG_CPU_LITTLE_ENDIAN is not set
192CONFIG_CPU_BIG_ENDIAN=y
193CONFIG_SH_FPU=y
194CONFIG_CPU_HAS_FPU=y
195
196#
197# Board support
198#
199
200#
201# Timer and clock configuration
202#
203CONFIG_SH_CMT=y
204# CONFIG_SH_MTU2 is not set
205CONFIG_SH_TIMER_IRQ=142
206CONFIG_SH_PCLK_FREQ=16670800
207CONFIG_SH_CLK_MD=0
208# CONFIG_TICK_ONESHOT is not set
209
210#
211# CPU Frequency scaling
212#
213CONFIG_CPU_FREQ=y
214CONFIG_CPU_FREQ_TABLE=y
215# CONFIG_CPU_FREQ_DEBUG is not set
216CONFIG_CPU_FREQ_STAT=y
217# CONFIG_CPU_FREQ_STAT_DETAILS is not set
218CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
219# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
220# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
221# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
222# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
223CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
224# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
225# CONFIG_CPU_FREQ_GOV_USERSPACE is not set
226# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
227# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
228CONFIG_SH_CPU_FREQ=y
229
230#
231# DMA support
232#
233
234#
235# Companion Chips
236#
237
238#
239# Additional SuperH Device Drivers
240#
241CONFIG_HEARTBEAT=y
242# CONFIG_PUSH_SWITCH is not set
243
244#
245# Kernel features
246#
247# CONFIG_HZ_100 is not set
248# CONFIG_HZ_250 is not set
249# CONFIG_HZ_300 is not set
250CONFIG_HZ_1000=y
251CONFIG_HZ=1000
252# CONFIG_SCHED_HRTICK is not set
253# CONFIG_KEXEC is not set
254# CONFIG_CRASH_DUMP is not set
255CONFIG_PREEMPT_NONE=y
256# CONFIG_PREEMPT_VOLUNTARY is not set
257# CONFIG_PREEMPT is not set
258CONFIG_GUSA=y
259
260#
261# Boot options
262#
263CONFIG_ZERO_PAGE_OFFSET=0x00001000
264CONFIG_BOOT_LINK_OFFSET=0x00800000
265CONFIG_CMDLINE_BOOL=y
266CONFIG_CMDLINE="console=ttySC0,115200 earlyprintk=serial ignore_loglevel"
267
268#
269# Bus options
270#
271# CONFIG_ARCH_SUPPORTS_MSI is not set
272# CONFIG_PCCARD is not set
273
274#
275# Executable file formats
276#
277CONFIG_BINFMT_FLAT=y
278CONFIG_BINFMT_ZFLAT=y
279CONFIG_BINFMT_SHARED_FLAT=y
280# CONFIG_BINFMT_MISC is not set
281
282#
283# Networking
284#
285CONFIG_NET=y
286
287#
288# Networking options
289#
290# CONFIG_PACKET is not set
291# CONFIG_UNIX is not set
292# CONFIG_NET_KEY is not set
293CONFIG_INET=y
294# CONFIG_IP_MULTICAST is not set
295# CONFIG_IP_ADVANCED_ROUTER is not set
296CONFIG_IP_FIB_HASH=y
297CONFIG_IP_PNP=y
298CONFIG_IP_PNP_DHCP=y
299# CONFIG_IP_PNP_BOOTP is not set
300# CONFIG_IP_PNP_RARP is not set
301# CONFIG_NET_IPIP is not set
302# CONFIG_NET_IPGRE is not set
303# CONFIG_ARPD is not set
304# CONFIG_SYN_COOKIES is not set
305# CONFIG_INET_AH is not set
306# CONFIG_INET_ESP is not set
307# CONFIG_INET_IPCOMP is not set
308# CONFIG_INET_XFRM_TUNNEL is not set
309# CONFIG_INET_TUNNEL is not set
310# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
311# CONFIG_INET_XFRM_MODE_TUNNEL is not set
312# CONFIG_INET_XFRM_MODE_BEET is not set
313# CONFIG_INET_LRO is not set
314# CONFIG_INET_DIAG is not set
315# CONFIG_TCP_CONG_ADVANCED is not set
316CONFIG_TCP_CONG_CUBIC=y
317CONFIG_DEFAULT_TCP_CONG="cubic"
318# CONFIG_TCP_MD5SIG is not set
319# CONFIG_IPV6 is not set
320# CONFIG_NETWORK_SECMARK is not set
321# CONFIG_NETFILTER is not set
322# CONFIG_IP_DCCP is not set
323# CONFIG_IP_SCTP is not set
324# CONFIG_TIPC is not set
325# CONFIG_ATM is not set
326# CONFIG_BRIDGE is not set
327# CONFIG_VLAN_8021Q is not set
328# CONFIG_DECNET is not set
329# CONFIG_LLC2 is not set
330# CONFIG_IPX is not set
331# CONFIG_ATALK is not set
332# CONFIG_X25 is not set
333# CONFIG_LAPB is not set
334# CONFIG_ECONET is not set
335# CONFIG_WAN_ROUTER is not set
336# CONFIG_NET_SCHED is not set
337
338#
339# Network testing
340#
341# CONFIG_NET_PKTGEN is not set
342# CONFIG_HAMRADIO is not set
343# CONFIG_CAN is not set
344# CONFIG_IRDA is not set
345# CONFIG_BT is not set
346# CONFIG_AF_RXRPC is not set
347
348#
349# Wireless
350#
351# CONFIG_CFG80211 is not set
352# CONFIG_WIRELESS_EXT is not set
353# CONFIG_MAC80211 is not set
354# CONFIG_IEEE80211 is not set
355# CONFIG_RFKILL is not set
356# CONFIG_NET_9P is not set
357
358#
359# Device Drivers
360#
361
362#
363# Generic Driver Options
364#
365CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
366# CONFIG_STANDALONE is not set
367# CONFIG_PREVENT_FIRMWARE_BUILD is not set
368# CONFIG_FW_LOADER is not set
369# CONFIG_DEBUG_DRIVER is not set
370# CONFIG_DEBUG_DEVRES is not set
371# CONFIG_SYS_HYPERVISOR is not set
372# CONFIG_CONNECTOR is not set
373CONFIG_MTD=y
374# CONFIG_MTD_DEBUG is not set
375CONFIG_MTD_CONCAT=y
376CONFIG_MTD_PARTITIONS=y
377CONFIG_MTD_REDBOOT_PARTS=y
378CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
379# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
380# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
381# CONFIG_MTD_CMDLINE_PARTS is not set
382# CONFIG_MTD_AR7_PARTS is not set
383
384#
385# User Modules And Translation Layers
386#
387CONFIG_MTD_CHAR=y
388CONFIG_MTD_BLKDEVS=y
389CONFIG_MTD_BLOCK=y
390# CONFIG_FTL is not set
391# CONFIG_NFTL is not set
392# CONFIG_INFTL is not set
393# CONFIG_RFD_FTL is not set
394# CONFIG_SSFDC is not set
395# CONFIG_MTD_OOPS is not set
396
397#
398# RAM/ROM/Flash chip drivers
399#
400CONFIG_MTD_CFI=y
401# CONFIG_MTD_JEDECPROBE is not set
402CONFIG_MTD_GEN_PROBE=y
403# CONFIG_MTD_CFI_ADV_OPTIONS is not set
404CONFIG_MTD_MAP_BANK_WIDTH_1=y
405CONFIG_MTD_MAP_BANK_WIDTH_2=y
406CONFIG_MTD_MAP_BANK_WIDTH_4=y
407# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
408# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
409# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
410CONFIG_MTD_CFI_I1=y
411CONFIG_MTD_CFI_I2=y
412# CONFIG_MTD_CFI_I4 is not set
413# CONFIG_MTD_CFI_I8 is not set
414# CONFIG_MTD_CFI_INTELEXT is not set
415CONFIG_MTD_CFI_AMDSTD=y
416# CONFIG_MTD_CFI_STAA is not set
417CONFIG_MTD_CFI_UTIL=y
418# CONFIG_MTD_RAM is not set
419# CONFIG_MTD_ROM is not set
420# CONFIG_MTD_ABSENT is not set
421
422#
423# Mapping drivers for chip access
424#
425# CONFIG_MTD_COMPLEX_MAPPINGS is not set
426CONFIG_MTD_PHYSMAP=y
427CONFIG_MTD_PHYSMAP_START=0x20000000
428CONFIG_MTD_PHYSMAP_LEN=0x01000000
429CONFIG_MTD_PHYSMAP_BANKWIDTH=4
430# CONFIG_MTD_UCLINUX is not set
431# CONFIG_MTD_PLATRAM is not set
432
433#
434# Self-contained MTD device drivers
435#
436# CONFIG_MTD_SLRAM is not set
437# CONFIG_MTD_PHRAM is not set
438# CONFIG_MTD_MTDRAM is not set
439# CONFIG_MTD_BLOCK2MTD is not set
440
441#
442# Disk-On-Chip Device Drivers
443#
444# CONFIG_MTD_DOC2000 is not set
445# CONFIG_MTD_DOC2001 is not set
446# CONFIG_MTD_DOC2001PLUS is not set
447# CONFIG_MTD_NAND is not set
448# CONFIG_MTD_ONENAND is not set
449
450#
451# UBI - Unsorted block images
452#
453# CONFIG_MTD_UBI is not set
454# CONFIG_PARPORT is not set
455CONFIG_BLK_DEV=y
456# CONFIG_BLK_DEV_COW_COMMON is not set
457# CONFIG_BLK_DEV_LOOP is not set
458# CONFIG_BLK_DEV_NBD is not set
459# CONFIG_BLK_DEV_RAM is not set
460# CONFIG_CDROM_PKTCDVD is not set
461# CONFIG_ATA_OVER_ETH is not set
462CONFIG_MISC_DEVICES=y
463# CONFIG_EEPROM_93CX6 is not set
464# CONFIG_ENCLOSURE_SERVICES is not set
465CONFIG_HAVE_IDE=y
466# CONFIG_IDE is not set
467
468#
469# SCSI device support
470#
471# CONFIG_RAID_ATTRS is not set
472# CONFIG_SCSI is not set
473# CONFIG_SCSI_DMA is not set
474# CONFIG_SCSI_NETLINK is not set
475# CONFIG_ATA is not set
476# CONFIG_MD is not set
477CONFIG_NETDEVICES=y
478# CONFIG_NETDEVICES_MULTIQUEUE is not set
479# CONFIG_DUMMY is not set
480# CONFIG_BONDING is not set
481# CONFIG_MACVLAN is not set
482# CONFIG_EQUALIZER is not set
483# CONFIG_TUN is not set
484# CONFIG_VETH is not set
485# CONFIG_PHYLIB is not set
486CONFIG_NET_ETHERNET=y
487CONFIG_MII=y
488# CONFIG_AX88796 is not set
489# CONFIG_STNIC is not set
490CONFIG_SMC91X=y
491# CONFIG_IBM_NEW_EMAC_ZMII is not set
492# CONFIG_IBM_NEW_EMAC_RGMII is not set
493# CONFIG_IBM_NEW_EMAC_TAH is not set
494# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
495# CONFIG_B44 is not set
496CONFIG_NETDEV_1000=y
497# CONFIG_E1000E_ENABLED is not set
498CONFIG_NETDEV_10000=y
499
500#
501# Wireless LAN
502#
503# CONFIG_WLAN_PRE80211 is not set
504# CONFIG_WLAN_80211 is not set
505# CONFIG_IWLWIFI_LEDS is not set
506# CONFIG_WAN is not set
507# CONFIG_PPP is not set
508# CONFIG_SLIP is not set
509# CONFIG_NETCONSOLE is not set
510# CONFIG_NETPOLL is not set
511# CONFIG_NET_POLL_CONTROLLER is not set
512# CONFIG_ISDN is not set
513# CONFIG_PHONE is not set
514
515#
516# Input device support
517#
518CONFIG_INPUT=y
519# CONFIG_INPUT_FF_MEMLESS is not set
520# CONFIG_INPUT_POLLDEV is not set
521
522#
523# Userland interfaces
524#
525# CONFIG_INPUT_MOUSEDEV is not set
526# CONFIG_INPUT_JOYDEV is not set
527# CONFIG_INPUT_EVDEV is not set
528# CONFIG_INPUT_EVBUG is not set
529
530#
531# Input Device Drivers
532#
533# CONFIG_INPUT_KEYBOARD is not set
534# CONFIG_INPUT_MOUSE is not set
535# CONFIG_INPUT_JOYSTICK is not set
536# CONFIG_INPUT_TABLET is not set
537# CONFIG_INPUT_TOUCHSCREEN is not set
538# CONFIG_INPUT_MISC is not set
539
540#
541# Hardware I/O ports
542#
543# CONFIG_SERIO is not set
544# CONFIG_GAMEPORT is not set
545
546#
547# Character devices
548#
549# CONFIG_VT is not set
550CONFIG_DEVKMEM=y
551# CONFIG_SERIAL_NONSTANDARD is not set
552
553#
554# Serial drivers
555#
556# CONFIG_SERIAL_8250 is not set
557
558#
559# Non-8250 serial port support
560#
561CONFIG_SERIAL_SH_SCI=y
562CONFIG_SERIAL_SH_SCI_NR_UARTS=4
563CONFIG_SERIAL_SH_SCI_CONSOLE=y
564CONFIG_SERIAL_CORE=y
565CONFIG_SERIAL_CORE_CONSOLE=y
566# CONFIG_UNIX98_PTYS is not set
567# CONFIG_LEGACY_PTYS is not set
568# CONFIG_IPMI_HANDLER is not set
569# CONFIG_HW_RANDOM is not set
570# CONFIG_R3964 is not set
571# CONFIG_RAW_DRIVER is not set
572# CONFIG_TCG_TPM is not set
573# CONFIG_I2C is not set
574# CONFIG_SPI is not set
575# CONFIG_W1 is not set
576# CONFIG_POWER_SUPPLY is not set
577# CONFIG_HWMON is not set
578CONFIG_THERMAL=y
579# CONFIG_WATCHDOG is not set
580
581#
582# Sonics Silicon Backplane
583#
584CONFIG_SSB_POSSIBLE=y
585# CONFIG_SSB is not set
586
587#
588# Multifunction device drivers
589#
590# CONFIG_MFD_SM501 is not set
591# CONFIG_HTC_PASIC3 is not set
592
593#
594# Multimedia devices
595#
596
597#
598# Multimedia core support
599#
600# CONFIG_VIDEO_DEV is not set
601# CONFIG_DVB_CORE is not set
602# CONFIG_VIDEO_MEDIA is not set
603
604#
605# Multimedia drivers
606#
607CONFIG_DAB=y
608
609#
610# Graphics support
611#
612# CONFIG_VGASTATE is not set
613CONFIG_VIDEO_OUTPUT_CONTROL=y
614# CONFIG_FB is not set
615# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
616
617#
618# Display device support
619#
620# CONFIG_DISPLAY_SUPPORT is not set
621
622#
623# Sound
624#
625# CONFIG_SOUND is not set
626CONFIG_HID_SUPPORT=y
627CONFIG_HID=y
628# CONFIG_HID_DEBUG is not set
629# CONFIG_HIDRAW is not set
630CONFIG_USB_SUPPORT=y
631CONFIG_USB_ARCH_HAS_HCD=y
632# CONFIG_USB_ARCH_HAS_OHCI is not set
633# CONFIG_USB_ARCH_HAS_EHCI is not set
634# CONFIG_USB is not set
635# CONFIG_USB_OTG_WHITELIST is not set
636# CONFIG_USB_OTG_BLACKLIST_HUB is not set
637
638#
639# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
640#
641# CONFIG_USB_GADGET is not set
642# CONFIG_MMC is not set
643# CONFIG_MEMSTICK is not set
644# CONFIG_NEW_LEDS is not set
645# CONFIG_ACCESSIBILITY is not set
646CONFIG_RTC_LIB=y
647CONFIG_RTC_CLASS=y
648CONFIG_RTC_HCTOSYS=y
649CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
650# CONFIG_RTC_DEBUG is not set
651
652#
653# RTC interfaces
654#
655CONFIG_RTC_INTF_SYSFS=y
656CONFIG_RTC_INTF_PROC=y
657CONFIG_RTC_INTF_DEV=y
658# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
659# CONFIG_RTC_DRV_TEST is not set
660
661#
662# SPI RTC drivers
663#
664
665#
666# Platform RTC drivers
667#
668# CONFIG_RTC_DRV_DS1511 is not set
669# CONFIG_RTC_DRV_DS1553 is not set
670# CONFIG_RTC_DRV_DS1742 is not set
671# CONFIG_RTC_DRV_STK17TA8 is not set
672# CONFIG_RTC_DRV_M48T86 is not set
673# CONFIG_RTC_DRV_M48T59 is not set
674# CONFIG_RTC_DRV_V3020 is not set
675
676#
677# on-CPU RTC drivers
678#
679CONFIG_RTC_DRV_SH=y
680# CONFIG_UIO is not set
681
682#
683# File systems
684#
685# CONFIG_EXT2_FS is not set
686# CONFIG_EXT3_FS is not set
687# CONFIG_EXT4DEV_FS is not set
688# CONFIG_REISERFS_FS is not set
689# CONFIG_JFS_FS is not set
690# CONFIG_FS_POSIX_ACL is not set
691# CONFIG_XFS_FS is not set
692# CONFIG_OCFS2_FS is not set
693# CONFIG_DNOTIFY is not set
694# CONFIG_INOTIFY is not set
695# CONFIG_QUOTA is not set
696# CONFIG_AUTOFS_FS is not set
697# CONFIG_AUTOFS4_FS is not set
698# CONFIG_FUSE_FS is not set
699
700#
701# CD-ROM/DVD Filesystems
702#
703# CONFIG_ISO9660_FS is not set
704# CONFIG_UDF_FS is not set
705
706#
707# DOS/FAT/NT Filesystems
708#
709# CONFIG_MSDOS_FS is not set
710# CONFIG_VFAT_FS is not set
711# CONFIG_NTFS_FS is not set
712
713#
714# Pseudo filesystems
715#
716CONFIG_PROC_FS=y
717CONFIG_PROC_SYSCTL=y
718CONFIG_SYSFS=y
719# CONFIG_TMPFS is not set
720# CONFIG_HUGETLB_PAGE is not set
721# CONFIG_CONFIGFS_FS is not set
722
723#
724# Miscellaneous filesystems
725#
726# CONFIG_ADFS_FS is not set
727# CONFIG_AFFS_FS is not set
728# CONFIG_HFS_FS is not set
729# CONFIG_HFSPLUS_FS is not set
730# CONFIG_BEFS_FS is not set
731# CONFIG_BFS_FS is not set
732# CONFIG_EFS_FS is not set
733# CONFIG_JFFS2_FS is not set
734# CONFIG_CRAMFS is not set
735# CONFIG_VXFS_FS is not set
736# CONFIG_MINIX_FS is not set
737# CONFIG_HPFS_FS is not set
738# CONFIG_QNX4FS_FS is not set
739CONFIG_ROMFS_FS=y
740# CONFIG_SYSV_FS is not set
741# CONFIG_UFS_FS is not set
742CONFIG_NETWORK_FILESYSTEMS=y
743CONFIG_NFS_FS=y
744# CONFIG_NFS_V3 is not set
745# CONFIG_NFS_V4 is not set
746# CONFIG_NFSD is not set
747CONFIG_ROOT_NFS=y
748CONFIG_LOCKD=y
749CONFIG_NFS_COMMON=y
750CONFIG_SUNRPC=y
751# CONFIG_SUNRPC_BIND34 is not set
752# CONFIG_RPCSEC_GSS_KRB5 is not set
753# CONFIG_RPCSEC_GSS_SPKM3 is not set
754# CONFIG_SMB_FS is not set
755# CONFIG_CIFS is not set
756# CONFIG_NCP_FS is not set
757# CONFIG_CODA_FS is not set
758# CONFIG_AFS_FS is not set
759
760#
761# Partition Types
762#
763# CONFIG_PARTITION_ADVANCED is not set
764CONFIG_MSDOS_PARTITION=y
765# CONFIG_NLS is not set
766# CONFIG_DLM is not set
767
768#
769# Kernel hacking
770#
771CONFIG_TRACE_IRQFLAGS_SUPPORT=y
772# CONFIG_PRINTK_TIME is not set
773CONFIG_ENABLE_WARN_DEPRECATED=y
774# CONFIG_ENABLE_MUST_CHECK is not set
775CONFIG_FRAME_WARN=1024
776CONFIG_MAGIC_SYSRQ=y
777# CONFIG_UNUSED_SYMBOLS is not set
778# CONFIG_DEBUG_FS is not set
779# CONFIG_HEADERS_CHECK is not set
780CONFIG_DEBUG_KERNEL=y
781CONFIG_DEBUG_SHIRQ=y
782CONFIG_DETECT_SOFTLOCKUP=y
783CONFIG_SCHED_DEBUG=y
784# CONFIG_SCHEDSTATS is not set
785# CONFIG_TIMER_STATS is not set
786# CONFIG_DEBUG_OBJECTS is not set
787# CONFIG_DEBUG_SLAB is not set
788# CONFIG_DEBUG_RT_MUTEXES is not set
789# CONFIG_RT_MUTEX_TESTER is not set
790# CONFIG_DEBUG_SPINLOCK is not set
791CONFIG_DEBUG_MUTEXES=y
792# CONFIG_DEBUG_LOCK_ALLOC is not set
793# CONFIG_PROVE_LOCKING is not set
794# CONFIG_LOCK_STAT is not set
795CONFIG_DEBUG_SPINLOCK_SLEEP=y
796# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
797# CONFIG_DEBUG_KOBJECT is not set
798CONFIG_DEBUG_BUGVERBOSE=y
799CONFIG_DEBUG_INFO=y
800# CONFIG_DEBUG_VM is not set
801# CONFIG_DEBUG_WRITECOUNT is not set
802# CONFIG_DEBUG_LIST is not set
803# CONFIG_DEBUG_SG is not set
804CONFIG_FRAME_POINTER=y
805# CONFIG_BOOT_PRINTK_DELAY is not set
806# CONFIG_BACKTRACE_SELF_TEST is not set
807# CONFIG_FAULT_INJECTION is not set
808# CONFIG_SAMPLES is not set
809# CONFIG_SH_STANDARD_BIOS is not set
810CONFIG_EARLY_SCIF_CONSOLE=y
811CONFIG_EARLY_SCIF_CONSOLE_PORT=0xfffe8000
812CONFIG_EARLY_PRINTK=y
813CONFIG_DEBUG_BOOTMEM=y
814CONFIG_DEBUG_STACKOVERFLOW=y
815CONFIG_DEBUG_STACK_USAGE=y
816# CONFIG_IRQSTACKS is not set
817
818#
819# Security options
820#
821# CONFIG_KEYS is not set
822# CONFIG_SECURITY is not set
823# CONFIG_SECURITY_FILE_CAPABILITIES is not set
824# CONFIG_CRYPTO is not set
825
826#
827# Library routines
828#
829CONFIG_BITREVERSE=y
830# CONFIG_GENERIC_FIND_FIRST_BIT is not set
831# CONFIG_CRC_CCITT is not set
832# CONFIG_CRC16 is not set
833# CONFIG_CRC_ITU_T is not set
834CONFIG_CRC32=y
835# CONFIG_CRC7 is not set
836# CONFIG_LIBCRC32C is not set
837CONFIG_ZLIB_INFLATE=y
838CONFIG_PLIST=y
839CONFIG_HAS_IOMEM=y
840CONFIG_HAS_IOPORT=y
841CONFIG_HAS_DMA=y
diff --git a/arch/sh/configs/se7206_defconfig b/arch/sh/configs/se7206_defconfig
index 0d0cda908270..6b34baa26eae 100644
--- a/arch/sh/configs/se7206_defconfig
+++ b/arch/sh/configs/se7206_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.23-rc4 3# Linux kernel version: 2.6.26-rc4
4# Thu Sep 13 16:40:16 2007 4# Tue Jun 3 20:27:08 2008
5# 5#
6CONFIG_SUPERH=y 6CONFIG_SUPERH=y
7CONFIG_SUPERH32=y
7CONFIG_RWSEM_GENERIC_SPINLOCK=y 8CONFIG_RWSEM_GENERIC_SPINLOCK=y
8CONFIG_GENERIC_BUG=y 9CONFIG_GENERIC_BUG=y
9CONFIG_GENERIC_FIND_NEXT_BIT=y 10CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -18,6 +19,7 @@ CONFIG_LOCKDEP_SUPPORT=y
18# CONFIG_ARCH_HAS_ILOG2_U32 is not set 19# CONFIG_ARCH_HAS_ILOG2_U32 is not set
19# CONFIG_ARCH_HAS_ILOG2_U64 is not set 20# CONFIG_ARCH_HAS_ILOG2_U64 is not set
20CONFIG_ARCH_NO_VIRT_TO_BUS=y 21CONFIG_ARCH_NO_VIRT_TO_BUS=y
22CONFIG_ARCH_SUPPORTS_AOUT=y
21CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 23CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
22 24
23# 25#
@@ -25,47 +27,82 @@ CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
25# 27#
26CONFIG_EXPERIMENTAL=y 28CONFIG_EXPERIMENTAL=y
27CONFIG_BROKEN_ON_SMP=y 29CONFIG_BROKEN_ON_SMP=y
30CONFIG_LOCK_KERNEL=y
28CONFIG_INIT_ENV_ARG_LIMIT=32 31CONFIG_INIT_ENV_ARG_LIMIT=32
29CONFIG_LOCALVERSION="" 32CONFIG_LOCALVERSION=""
30# CONFIG_LOCALVERSION_AUTO is not set 33CONFIG_LOCALVERSION_AUTO=y
31# CONFIG_SYSVIPC is not set 34CONFIG_SYSVIPC=y
32# CONFIG_POSIX_MQUEUE is not set 35CONFIG_SYSVIPC_SYSCTL=y
33# CONFIG_BSD_PROCESS_ACCT is not set 36CONFIG_POSIX_MQUEUE=y
37CONFIG_BSD_PROCESS_ACCT=y
38# CONFIG_BSD_PROCESS_ACCT_V3 is not set
34# CONFIG_TASKSTATS is not set 39# CONFIG_TASKSTATS is not set
35# CONFIG_USER_NS is not set 40CONFIG_AUDIT=y
36# CONFIG_AUDIT is not set 41CONFIG_AUDITSYSCALL=y
37# CONFIG_IKCONFIG is not set 42# CONFIG_IKCONFIG is not set
38CONFIG_LOG_BUF_SHIFT=14 43CONFIG_LOG_BUF_SHIFT=14
39CONFIG_SYSFS_DEPRECATED=y 44CONFIG_CGROUPS=y
40# CONFIG_RELAY is not set 45CONFIG_CGROUP_DEBUG=y
41# CONFIG_BLK_DEV_INITRD is not set 46CONFIG_CGROUP_NS=y
47CONFIG_CGROUP_DEVICE=y
48# CONFIG_GROUP_SCHED is not set
49CONFIG_CGROUP_CPUACCT=y
50CONFIG_RESOURCE_COUNTERS=y
51CONFIG_MM_OWNER=y
52CONFIG_CGROUP_MEM_RES_CTLR=y
53# CONFIG_SYSFS_DEPRECATED_V2 is not set
54CONFIG_RELAY=y
55CONFIG_NAMESPACES=y
56CONFIG_UTS_NS=y
57CONFIG_IPC_NS=y
58CONFIG_USER_NS=y
59CONFIG_PID_NS=y
60CONFIG_BLK_DEV_INITRD=y
61CONFIG_INITRAMFS_SOURCE=""
42CONFIG_CC_OPTIMIZE_FOR_SIZE=y 62CONFIG_CC_OPTIMIZE_FOR_SIZE=y
43CONFIG_SYSCTL=y 63CONFIG_SYSCTL=y
44CONFIG_EMBEDDED=y 64CONFIG_EMBEDDED=y
45# CONFIG_UID16 is not set 65# CONFIG_UID16 is not set
46# CONFIG_SYSCTL_SYSCALL is not set 66# CONFIG_SYSCTL_SYSCALL is not set
47# CONFIG_KALLSYMS is not set 67CONFIG_KALLSYMS=y
48# CONFIG_HOTPLUG is not set 68CONFIG_KALLSYMS_ALL=y
69# CONFIG_KALLSYMS_EXTRA_PASS is not set
70CONFIG_HOTPLUG=y
49CONFIG_PRINTK=y 71CONFIG_PRINTK=y
50CONFIG_BUG=y 72CONFIG_BUG=y
51# CONFIG_ELF_CORE is not set 73# CONFIG_ELF_CORE is not set
52# CONFIG_BASE_FULL is not set 74# CONFIG_COMPAT_BRK is not set
53# CONFIG_FUTEX is not set 75CONFIG_BASE_FULL=y
76CONFIG_FUTEX=y
54CONFIG_ANON_INODES=y 77CONFIG_ANON_INODES=y
55# CONFIG_EPOLL is not set 78CONFIG_EPOLL=y
56CONFIG_SIGNALFD=y 79CONFIG_SIGNALFD=y
57CONFIG_TIMERFD=y 80CONFIG_TIMERFD=y
58CONFIG_EVENTFD=y 81CONFIG_EVENTFD=y
59# CONFIG_VM_EVENT_COUNTERS is not set 82CONFIG_VM_EVENT_COUNTERS=y
60CONFIG_SLUB_DEBUG=y
61# CONFIG_SLAB is not set 83# CONFIG_SLAB is not set
62CONFIG_SLUB=y 84# CONFIG_SLUB is not set
63# CONFIG_SLOB is not set 85CONFIG_SLOB=y
86CONFIG_PROFILING=y
87# CONFIG_MARKERS is not set
88CONFIG_OPROFILE=y
89CONFIG_HAVE_OPROFILE=y
90# CONFIG_HAVE_KPROBES is not set
91# CONFIG_HAVE_KRETPROBES is not set
92# CONFIG_HAVE_DMA_ATTRS is not set
93CONFIG_RT_MUTEXES=y
64CONFIG_TINY_SHMEM=y 94CONFIG_TINY_SHMEM=y
65CONFIG_BASE_SMALL=1 95CONFIG_BASE_SMALL=0
66# CONFIG_MODULES is not set 96CONFIG_MODULES=y
97# CONFIG_MODULE_FORCE_LOAD is not set
98CONFIG_MODULE_UNLOAD=y
99# CONFIG_MODULE_FORCE_UNLOAD is not set
100# CONFIG_MODVERSIONS is not set
101# CONFIG_MODULE_SRCVERSION_ALL is not set
102# CONFIG_KMOD is not set
67CONFIG_BLOCK=y 103CONFIG_BLOCK=y
68# CONFIG_LBD is not set 104# CONFIG_LBD is not set
105# CONFIG_BLK_DEV_IO_TRACE is not set
69# CONFIG_LSF is not set 106# CONFIG_LSF is not set
70# CONFIG_BLK_DEV_BSG is not set 107# CONFIG_BLK_DEV_BSG is not set
71 108
@@ -81,6 +118,7 @@ CONFIG_IOSCHED_NOOP=y
81# CONFIG_DEFAULT_CFQ is not set 118# CONFIG_DEFAULT_CFQ is not set
82CONFIG_DEFAULT_NOOP=y 119CONFIG_DEFAULT_NOOP=y
83CONFIG_DEFAULT_IOSCHED="noop" 120CONFIG_DEFAULT_IOSCHED="noop"
121# CONFIG_CLASSIC_RCU is not set
84 122
85# 123#
86# System type 124# System type
@@ -88,7 +126,10 @@ CONFIG_DEFAULT_IOSCHED="noop"
88CONFIG_CPU_SH2=y 126CONFIG_CPU_SH2=y
89CONFIG_CPU_SH2A=y 127CONFIG_CPU_SH2A=y
90# CONFIG_CPU_SUBTYPE_SH7619 is not set 128# CONFIG_CPU_SUBTYPE_SH7619 is not set
129# CONFIG_CPU_SUBTYPE_SH7203 is not set
91CONFIG_CPU_SUBTYPE_SH7206=y 130CONFIG_CPU_SUBTYPE_SH7206=y
131# CONFIG_CPU_SUBTYPE_SH7263 is not set
132# CONFIG_CPU_SUBTYPE_MXG is not set
92# CONFIG_CPU_SUBTYPE_SH7705 is not set 133# CONFIG_CPU_SUBTYPE_SH7705 is not set
93# CONFIG_CPU_SUBTYPE_SH7706 is not set 134# CONFIG_CPU_SUBTYPE_SH7706 is not set
94# CONFIG_CPU_SUBTYPE_SH7707 is not set 135# CONFIG_CPU_SUBTYPE_SH7707 is not set
@@ -97,6 +138,7 @@ CONFIG_CPU_SUBTYPE_SH7206=y
97# CONFIG_CPU_SUBTYPE_SH7710 is not set 138# CONFIG_CPU_SUBTYPE_SH7710 is not set
98# CONFIG_CPU_SUBTYPE_SH7712 is not set 139# CONFIG_CPU_SUBTYPE_SH7712 is not set
99# CONFIG_CPU_SUBTYPE_SH7720 is not set 140# CONFIG_CPU_SUBTYPE_SH7720 is not set
141# CONFIG_CPU_SUBTYPE_SH7721 is not set
100# CONFIG_CPU_SUBTYPE_SH7750 is not set 142# CONFIG_CPU_SUBTYPE_SH7750 is not set
101# CONFIG_CPU_SUBTYPE_SH7091 is not set 143# CONFIG_CPU_SUBTYPE_SH7091 is not set
102# CONFIG_CPU_SUBTYPE_SH7750R is not set 144# CONFIG_CPU_SUBTYPE_SH7750R is not set
@@ -105,14 +147,17 @@ CONFIG_CPU_SUBTYPE_SH7206=y
105# CONFIG_CPU_SUBTYPE_SH7751R is not set 147# CONFIG_CPU_SUBTYPE_SH7751R is not set
106# CONFIG_CPU_SUBTYPE_SH7760 is not set 148# CONFIG_CPU_SUBTYPE_SH7760 is not set
107# CONFIG_CPU_SUBTYPE_SH4_202 is not set 149# CONFIG_CPU_SUBTYPE_SH4_202 is not set
108# CONFIG_CPU_SUBTYPE_ST40STB1 is not set 150# CONFIG_CPU_SUBTYPE_SH7723 is not set
109# CONFIG_CPU_SUBTYPE_ST40GX1 is not set 151# CONFIG_CPU_SUBTYPE_SH7763 is not set
110# CONFIG_CPU_SUBTYPE_SH7770 is not set 152# CONFIG_CPU_SUBTYPE_SH7770 is not set
111# CONFIG_CPU_SUBTYPE_SH7780 is not set 153# CONFIG_CPU_SUBTYPE_SH7780 is not set
112# CONFIG_CPU_SUBTYPE_SH7785 is not set 154# CONFIG_CPU_SUBTYPE_SH7785 is not set
113# CONFIG_CPU_SUBTYPE_SHX3 is not set 155# CONFIG_CPU_SUBTYPE_SHX3 is not set
114# CONFIG_CPU_SUBTYPE_SH7343 is not set 156# CONFIG_CPU_SUBTYPE_SH7343 is not set
115# CONFIG_CPU_SUBTYPE_SH7722 is not set 157# CONFIG_CPU_SUBTYPE_SH7722 is not set
158# CONFIG_CPU_SUBTYPE_SH7366 is not set
159# CONFIG_CPU_SUBTYPE_SH5_101 is not set
160# CONFIG_CPU_SUBTYPE_SH5_103 is not set
116 161
117# 162#
118# Memory management options 163# Memory management options
@@ -121,23 +166,25 @@ CONFIG_QUICKLIST=y
121CONFIG_PAGE_OFFSET=0x00000000 166CONFIG_PAGE_OFFSET=0x00000000
122CONFIG_MEMORY_START=0x0c000000 167CONFIG_MEMORY_START=0x0c000000
123CONFIG_MEMORY_SIZE=0x04000000 168CONFIG_MEMORY_SIZE=0x04000000
169CONFIG_29BIT=y
124CONFIG_ARCH_FLATMEM_ENABLE=y 170CONFIG_ARCH_FLATMEM_ENABLE=y
125CONFIG_ARCH_SPARSEMEM_ENABLE=y 171CONFIG_ARCH_SPARSEMEM_ENABLE=y
126CONFIG_ARCH_SPARSEMEM_DEFAULT=y 172CONFIG_ARCH_SPARSEMEM_DEFAULT=y
127CONFIG_MAX_ACTIVE_REGIONS=1 173CONFIG_MAX_ACTIVE_REGIONS=1
128CONFIG_ARCH_POPULATES_NODE_MAP=y 174CONFIG_ARCH_POPULATES_NODE_MAP=y
129CONFIG_ARCH_SELECT_MEMORY_MODEL=y 175CONFIG_ARCH_SELECT_MEMORY_MODEL=y
130CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
131CONFIG_PAGE_SIZE_4KB=y 176CONFIG_PAGE_SIZE_4KB=y
132# CONFIG_PAGE_SIZE_8KB is not set 177# CONFIG_PAGE_SIZE_8KB is not set
133# CONFIG_PAGE_SIZE_64KB is not set 178# CONFIG_PAGE_SIZE_64KB is not set
134CONFIG_SELECT_MEMORY_MODEL=y 179CONFIG_SELECT_MEMORY_MODEL=y
135# CONFIG_FLATMEM_MANUAL is not set 180CONFIG_FLATMEM_MANUAL=y
136# CONFIG_DISCONTIGMEM_MANUAL is not set 181# CONFIG_DISCONTIGMEM_MANUAL is not set
137CONFIG_SPARSEMEM_MANUAL=y 182# CONFIG_SPARSEMEM_MANUAL is not set
138CONFIG_SPARSEMEM=y 183CONFIG_FLATMEM=y
139CONFIG_HAVE_MEMORY_PRESENT=y 184CONFIG_FLAT_NODE_MEM_MAP=y
140CONFIG_SPARSEMEM_STATIC=y 185CONFIG_SPARSEMEM_STATIC=y
186# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
187CONFIG_PAGEFLAGS_EXTENDED=y
141CONFIG_SPLIT_PTLOCK_CPUS=4 188CONFIG_SPLIT_PTLOCK_CPUS=4
142# CONFIG_RESOURCES_64BIT is not set 189# CONFIG_RESOURCES_64BIT is not set
143CONFIG_ZONE_DMA_FLAG=0 190CONFIG_ZONE_DMA_FLAG=0
@@ -183,13 +230,16 @@ CONFIG_CPU_FREQ_TABLE=y
183CONFIG_CPU_FREQ_STAT=y 230CONFIG_CPU_FREQ_STAT=y
184# CONFIG_CPU_FREQ_STAT_DETAILS is not set 231# CONFIG_CPU_FREQ_STAT_DETAILS is not set
185CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y 232CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
233# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
186# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set 234# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
235# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
236# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
187CONFIG_CPU_FREQ_GOV_PERFORMANCE=y 237CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
188# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set 238# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
189# CONFIG_CPU_FREQ_GOV_USERSPACE is not set 239# CONFIG_CPU_FREQ_GOV_USERSPACE is not set
190# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set 240# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
191# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set 241# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
192# CONFIG_SH_CPU_FREQ is not set 242CONFIG_SH_CPU_FREQ=y
193 243
194# 244#
195# DMA support 245# DMA support
@@ -213,11 +263,15 @@ CONFIG_HEARTBEAT=y
213# CONFIG_HZ_300 is not set 263# CONFIG_HZ_300 is not set
214CONFIG_HZ_1000=y 264CONFIG_HZ_1000=y
215CONFIG_HZ=1000 265CONFIG_HZ=1000
216# CONFIG_KEXEC is not set 266# CONFIG_SCHED_HRTICK is not set
267CONFIG_KEXEC=y
217# CONFIG_CRASH_DUMP is not set 268# CONFIG_CRASH_DUMP is not set
218CONFIG_PREEMPT_NONE=y 269# CONFIG_PREEMPT_NONE is not set
219# CONFIG_PREEMPT_VOLUNTARY is not set 270# CONFIG_PREEMPT_VOLUNTARY is not set
220# CONFIG_PREEMPT is not set 271CONFIG_PREEMPT=y
272CONFIG_PREEMPT_RCU=y
273CONFIG_RCU_TRACE=y
274CONFIG_GUSA=y
221 275
222# 276#
223# Boot options 277# Boot options
@@ -225,25 +279,25 @@ CONFIG_PREEMPT_NONE=y
225CONFIG_ZERO_PAGE_OFFSET=0x00001000 279CONFIG_ZERO_PAGE_OFFSET=0x00001000
226CONFIG_BOOT_LINK_OFFSET=0x00800000 280CONFIG_BOOT_LINK_OFFSET=0x00800000
227CONFIG_CMDLINE_BOOL=y 281CONFIG_CMDLINE_BOOL=y
228CONFIG_CMDLINE="console=ttySC3,115200 earlyprintk=serial ignore_loglevel" 282CONFIG_CMDLINE="console=ttySC3,115200 ignore_loglevel earlyprintk=serial"
229 283
230# 284#
231# Bus options 285# Bus options
232# 286#
233# CONFIG_CF_ENABLER is not set 287CONFIG_CF_ENABLER=y
288# CONFIG_CF_AREA5 is not set
289CONFIG_CF_AREA6=y
290CONFIG_CF_BASE_ADDR=0xb8000000
234# CONFIG_ARCH_SUPPORTS_MSI is not set 291# CONFIG_ARCH_SUPPORTS_MSI is not set
235 292# CONFIG_PCCARD is not set
236#
237# PCCARD (PCMCIA/CardBus) support
238#
239 293
240# 294#
241# Executable file formats 295# Executable file formats
242# 296#
243CONFIG_BINFMT_FLAT=y 297CONFIG_BINFMT_FLAT=y
244CONFIG_BINFMT_ZFLAT=y 298CONFIG_BINFMT_ZFLAT=y
245# CONFIG_BINFMT_SHARED_FLAT is not set 299CONFIG_BINFMT_SHARED_FLAT=y
246# CONFIG_BINFMT_MISC is not set 300CONFIG_BINFMT_MISC=y
247 301
248# 302#
249# Networking 303# Networking
@@ -253,14 +307,24 @@ CONFIG_NET=y
253# 307#
254# Networking options 308# Networking options
255# 309#
256# CONFIG_PACKET is not set 310CONFIG_PACKET=y
257# CONFIG_UNIX is not set 311# CONFIG_PACKET_MMAP is not set
258# CONFIG_NET_KEY is not set 312CONFIG_UNIX=y
313CONFIG_XFRM=y
314# CONFIG_XFRM_USER is not set
315# CONFIG_XFRM_SUB_POLICY is not set
316# CONFIG_XFRM_MIGRATE is not set
317# CONFIG_XFRM_STATISTICS is not set
318CONFIG_NET_KEY=y
319# CONFIG_NET_KEY_MIGRATE is not set
259CONFIG_INET=y 320CONFIG_INET=y
260# CONFIG_IP_MULTICAST is not set 321# CONFIG_IP_MULTICAST is not set
261# CONFIG_IP_ADVANCED_ROUTER is not set 322# CONFIG_IP_ADVANCED_ROUTER is not set
262CONFIG_IP_FIB_HASH=y 323CONFIG_IP_FIB_HASH=y
263# CONFIG_IP_PNP is not set 324CONFIG_IP_PNP=y
325CONFIG_IP_PNP_DHCP=y
326# CONFIG_IP_PNP_BOOTP is not set
327# CONFIG_IP_PNP_RARP is not set
264# CONFIG_NET_IPIP is not set 328# CONFIG_NET_IPIP is not set
265# CONFIG_NET_IPGRE is not set 329# CONFIG_NET_IPGRE is not set
266# CONFIG_ARPD is not set 330# CONFIG_ARPD is not set
@@ -273,14 +337,13 @@ CONFIG_IP_FIB_HASH=y
273# CONFIG_INET_XFRM_MODE_TRANSPORT is not set 337# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
274# CONFIG_INET_XFRM_MODE_TUNNEL is not set 338# CONFIG_INET_XFRM_MODE_TUNNEL is not set
275# CONFIG_INET_XFRM_MODE_BEET is not set 339# CONFIG_INET_XFRM_MODE_BEET is not set
340# CONFIG_INET_LRO is not set
276# CONFIG_INET_DIAG is not set 341# CONFIG_INET_DIAG is not set
277# CONFIG_TCP_CONG_ADVANCED is not set 342# CONFIG_TCP_CONG_ADVANCED is not set
278CONFIG_TCP_CONG_CUBIC=y 343CONFIG_TCP_CONG_CUBIC=y
279CONFIG_DEFAULT_TCP_CONG="cubic" 344CONFIG_DEFAULT_TCP_CONG="cubic"
280# CONFIG_TCP_MD5SIG is not set 345# CONFIG_TCP_MD5SIG is not set
281# CONFIG_IPV6 is not set 346# CONFIG_IPV6 is not set
282# CONFIG_INET6_XFRM_TUNNEL is not set
283# CONFIG_INET6_TUNNEL is not set
284# CONFIG_NETWORK_SECMARK is not set 347# CONFIG_NETWORK_SECMARK is not set
285# CONFIG_NETFILTER is not set 348# CONFIG_NETFILTER is not set
286# CONFIG_IP_DCCP is not set 349# CONFIG_IP_DCCP is not set
@@ -297,10 +360,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
297# CONFIG_LAPB is not set 360# CONFIG_LAPB is not set
298# CONFIG_ECONET is not set 361# CONFIG_ECONET is not set
299# CONFIG_WAN_ROUTER is not set 362# CONFIG_WAN_ROUTER is not set
300
301#
302# QoS and/or fair queueing
303#
304# CONFIG_NET_SCHED is not set 363# CONFIG_NET_SCHED is not set
305 364
306# 365#
@@ -308,6 +367,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
308# 367#
309# CONFIG_NET_PKTGEN is not set 368# CONFIG_NET_PKTGEN is not set
310# CONFIG_HAMRADIO is not set 369# CONFIG_HAMRADIO is not set
370# CONFIG_CAN is not set
311# CONFIG_IRDA is not set 371# CONFIG_IRDA is not set
312# CONFIG_BT is not set 372# CONFIG_BT is not set
313# CONFIG_AF_RXRPC is not set 373# CONFIG_AF_RXRPC is not set
@@ -329,8 +389,10 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
329# 389#
330# Generic Driver Options 390# Generic Driver Options
331# 391#
392CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
332# CONFIG_STANDALONE is not set 393# CONFIG_STANDALONE is not set
333# CONFIG_PREVENT_FIRMWARE_BUILD is not set 394# CONFIG_PREVENT_FIRMWARE_BUILD is not set
395# CONFIG_FW_LOADER is not set
334# CONFIG_DEBUG_DRIVER is not set 396# CONFIG_DEBUG_DRIVER is not set
335# CONFIG_DEBUG_DEVRES is not set 397# CONFIG_DEBUG_DEVRES is not set
336# CONFIG_SYS_HYPERVISOR is not set 398# CONFIG_SYS_HYPERVISOR is not set
@@ -339,11 +401,9 @@ CONFIG_MTD=y
339# CONFIG_MTD_DEBUG is not set 401# CONFIG_MTD_DEBUG is not set
340CONFIG_MTD_CONCAT=y 402CONFIG_MTD_CONCAT=y
341CONFIG_MTD_PARTITIONS=y 403CONFIG_MTD_PARTITIONS=y
342CONFIG_MTD_REDBOOT_PARTS=y 404# CONFIG_MTD_REDBOOT_PARTS is not set
343CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
344# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
345# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
346# CONFIG_MTD_CMDLINE_PARTS is not set 405# CONFIG_MTD_CMDLINE_PARTS is not set
406# CONFIG_MTD_AR7_PARTS is not set
347 407
348# 408#
349# User Modules And Translation Layers 409# User Modules And Translation Layers
@@ -356,6 +416,7 @@ CONFIG_MTD_BLOCK=y
356# CONFIG_INFTL is not set 416# CONFIG_INFTL is not set
357# CONFIG_RFD_FTL is not set 417# CONFIG_RFD_FTL is not set
358# CONFIG_SSFDC is not set 418# CONFIG_SSFDC is not set
419# CONFIG_MTD_OOPS is not set
359 420
360# 421#
361# RAM/ROM/Flash chip drivers 422# RAM/ROM/Flash chip drivers
@@ -390,7 +451,6 @@ CONFIG_MTD_PHYSMAP=y
390CONFIG_MTD_PHYSMAP_START=0x20000000 451CONFIG_MTD_PHYSMAP_START=0x20000000
391CONFIG_MTD_PHYSMAP_LEN=0x01000000 452CONFIG_MTD_PHYSMAP_LEN=0x01000000
392CONFIG_MTD_PHYSMAP_BANKWIDTH=4 453CONFIG_MTD_PHYSMAP_BANKWIDTH=4
393# CONFIG_MTD_SOLUTIONENGINE is not set
394# CONFIG_MTD_UCLINUX is not set 454# CONFIG_MTD_UCLINUX is not set
395# CONFIG_MTD_PLATRAM is not set 455# CONFIG_MTD_PLATRAM is not set
396 456
@@ -418,13 +478,19 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=4
418# CONFIG_PARPORT is not set 478# CONFIG_PARPORT is not set
419CONFIG_BLK_DEV=y 479CONFIG_BLK_DEV=y
420# CONFIG_BLK_DEV_COW_COMMON is not set 480# CONFIG_BLK_DEV_COW_COMMON is not set
421# CONFIG_BLK_DEV_LOOP is not set 481CONFIG_BLK_DEV_LOOP=y
482# CONFIG_BLK_DEV_CRYPTOLOOP is not set
422# CONFIG_BLK_DEV_NBD is not set 483# CONFIG_BLK_DEV_NBD is not set
423# CONFIG_BLK_DEV_RAM is not set 484CONFIG_BLK_DEV_RAM=y
485CONFIG_BLK_DEV_RAM_COUNT=16
486CONFIG_BLK_DEV_RAM_SIZE=4096
487# CONFIG_BLK_DEV_XIP is not set
424# CONFIG_CDROM_PKTCDVD is not set 488# CONFIG_CDROM_PKTCDVD is not set
425# CONFIG_ATA_OVER_ETH is not set 489# CONFIG_ATA_OVER_ETH is not set
426CONFIG_MISC_DEVICES=y 490CONFIG_MISC_DEVICES=y
427# CONFIG_EEPROM_93CX6 is not set 491CONFIG_EEPROM_93CX6=y
492# CONFIG_ENCLOSURE_SERVICES is not set
493CONFIG_HAVE_IDE=y
428# CONFIG_IDE is not set 494# CONFIG_IDE is not set
429 495
430# 496#
@@ -443,23 +509,30 @@ CONFIG_NETDEVICES=y
443# CONFIG_MACVLAN is not set 509# CONFIG_MACVLAN is not set
444# CONFIG_EQUALIZER is not set 510# CONFIG_EQUALIZER is not set
445# CONFIG_TUN is not set 511# CONFIG_TUN is not set
512# CONFIG_VETH is not set
446# CONFIG_PHYLIB is not set 513# CONFIG_PHYLIB is not set
447CONFIG_NET_ETHERNET=y 514CONFIG_NET_ETHERNET=y
448CONFIG_MII=y 515CONFIG_MII=y
516# CONFIG_AX88796 is not set
449# CONFIG_STNIC is not set 517# CONFIG_STNIC is not set
450CONFIG_SMC91X=y 518CONFIG_SMC91X=y
451CONFIG_NETDEV_1000=y 519# CONFIG_IBM_NEW_EMAC_ZMII is not set
452CONFIG_NETDEV_10000=y 520# CONFIG_IBM_NEW_EMAC_RGMII is not set
521# CONFIG_IBM_NEW_EMAC_TAH is not set
522# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
523# CONFIG_B44 is not set
524# CONFIG_NETDEV_1000 is not set
525# CONFIG_NETDEV_10000 is not set
453 526
454# 527#
455# Wireless LAN 528# Wireless LAN
456# 529#
457# CONFIG_WLAN_PRE80211 is not set 530# CONFIG_WLAN_PRE80211 is not set
458# CONFIG_WLAN_80211 is not set 531# CONFIG_WLAN_80211 is not set
532# CONFIG_IWLWIFI_LEDS is not set
459# CONFIG_WAN is not set 533# CONFIG_WAN is not set
460# CONFIG_PPP is not set 534# CONFIG_PPP is not set
461# CONFIG_SLIP is not set 535# CONFIG_SLIP is not set
462# CONFIG_SHAPER is not set
463# CONFIG_NETCONSOLE is not set 536# CONFIG_NETCONSOLE is not set
464# CONFIG_NETPOLL is not set 537# CONFIG_NETPOLL is not set
465# CONFIG_NET_POLL_CONTROLLER is not set 538# CONFIG_NET_POLL_CONTROLLER is not set
@@ -469,28 +542,7 @@ CONFIG_NETDEV_10000=y
469# 542#
470# Input device support 543# Input device support
471# 544#
472CONFIG_INPUT=y 545# CONFIG_INPUT is not set
473# CONFIG_INPUT_FF_MEMLESS is not set
474# CONFIG_INPUT_POLLDEV is not set
475
476#
477# Userland interfaces
478#
479# CONFIG_INPUT_MOUSEDEV is not set
480# CONFIG_INPUT_JOYDEV is not set
481# CONFIG_INPUT_TSDEV is not set
482# CONFIG_INPUT_EVDEV is not set
483# CONFIG_INPUT_EVBUG is not set
484
485#
486# Input Device Drivers
487#
488# CONFIG_INPUT_KEYBOARD is not set
489# CONFIG_INPUT_MOUSE is not set
490# CONFIG_INPUT_JOYSTICK is not set
491# CONFIG_INPUT_TABLET is not set
492# CONFIG_INPUT_TOUCHSCREEN is not set
493# CONFIG_INPUT_MISC is not set
494 546
495# 547#
496# Hardware I/O ports 548# Hardware I/O ports
@@ -502,6 +554,7 @@ CONFIG_INPUT=y
502# Character devices 554# Character devices
503# 555#
504# CONFIG_VT is not set 556# CONFIG_VT is not set
557# CONFIG_DEVKMEM is not set
505# CONFIG_SERIAL_NONSTANDARD is not set 558# CONFIG_SERIAL_NONSTANDARD is not set
506 559
507# 560#
@@ -520,106 +573,119 @@ CONFIG_SERIAL_CORE_CONSOLE=y
520# CONFIG_UNIX98_PTYS is not set 573# CONFIG_UNIX98_PTYS is not set
521# CONFIG_LEGACY_PTYS is not set 574# CONFIG_LEGACY_PTYS is not set
522# CONFIG_IPMI_HANDLER is not set 575# CONFIG_IPMI_HANDLER is not set
523# CONFIG_WATCHDOG is not set
524# CONFIG_HW_RANDOM is not set 576# CONFIG_HW_RANDOM is not set
525# CONFIG_R3964 is not set 577# CONFIG_R3964 is not set
526# CONFIG_RAW_DRIVER is not set 578# CONFIG_RAW_DRIVER is not set
527# CONFIG_TCG_TPM is not set 579# CONFIG_TCG_TPM is not set
528# CONFIG_I2C is not set 580# CONFIG_I2C is not set
529
530#
531# SPI support
532#
533# CONFIG_SPI is not set 581# CONFIG_SPI is not set
534# CONFIG_SPI_MASTER is not set
535# CONFIG_W1 is not set 582# CONFIG_W1 is not set
536# CONFIG_POWER_SUPPLY is not set 583# CONFIG_POWER_SUPPLY is not set
537# CONFIG_HWMON is not set 584# CONFIG_HWMON is not set
585# CONFIG_THERMAL is not set
586# CONFIG_WATCHDOG is not set
587
588#
589# Sonics Silicon Backplane
590#
591CONFIG_SSB_POSSIBLE=y
592# CONFIG_SSB is not set
538 593
539# 594#
540# Multifunction device drivers 595# Multifunction device drivers
541# 596#
542# CONFIG_MFD_SM501 is not set 597# CONFIG_MFD_SM501 is not set
598# CONFIG_HTC_PASIC3 is not set
543 599
544# 600#
545# Multimedia devices 601# Multimedia devices
546# 602#
603
604#
605# Multimedia core support
606#
547# CONFIG_VIDEO_DEV is not set 607# CONFIG_VIDEO_DEV is not set
548# CONFIG_DVB_CORE is not set 608# CONFIG_DVB_CORE is not set
549CONFIG_DAB=y 609# CONFIG_VIDEO_MEDIA is not set
610
611#
612# Multimedia drivers
613#
614# CONFIG_DAB is not set
550 615
551# 616#
552# Graphics support 617# Graphics support
553# 618#
619# CONFIG_VGASTATE is not set
620# CONFIG_VIDEO_OUTPUT_CONTROL is not set
621# CONFIG_FB is not set
554# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 622# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
555 623
556# 624#
557# Display device support 625# Display device support
558# 626#
559# CONFIG_DISPLAY_SUPPORT is not set 627# CONFIG_DISPLAY_SUPPORT is not set
560# CONFIG_VGASTATE is not set
561CONFIG_VIDEO_OUTPUT_CONTROL=y
562# CONFIG_FB is not set
563 628
564# 629#
565# Sound 630# Sound
566# 631#
567# CONFIG_SOUND is not set 632# CONFIG_SOUND is not set
568CONFIG_HID_SUPPORT=y 633# CONFIG_USB_SUPPORT is not set
569CONFIG_HID=y
570# CONFIG_HID_DEBUG is not set
571CONFIG_USB_SUPPORT=y
572CONFIG_USB_ARCH_HAS_HCD=y
573# CONFIG_USB_ARCH_HAS_OHCI is not set
574# CONFIG_USB_ARCH_HAS_EHCI is not set
575# CONFIG_USB is not set
576
577#
578# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
579#
580
581#
582# USB Gadget Support
583#
584# CONFIG_USB_GADGET is not set
585# CONFIG_MMC is not set 634# CONFIG_MMC is not set
635# CONFIG_MEMSTICK is not set
586# CONFIG_NEW_LEDS is not set 636# CONFIG_NEW_LEDS is not set
587# CONFIG_RTC_CLASS is not set 637# CONFIG_ACCESSIBILITY is not set
638CONFIG_RTC_LIB=y
639CONFIG_RTC_CLASS=y
640CONFIG_RTC_HCTOSYS=y
641CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
642# CONFIG_RTC_DEBUG is not set
588 643
589# 644#
590# DMA Engine support 645# RTC interfaces
591# 646#
592# CONFIG_DMA_ENGINE is not set 647CONFIG_RTC_INTF_SYSFS=y
648CONFIG_RTC_INTF_PROC=y
649CONFIG_RTC_INTF_DEV=y
650# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
651# CONFIG_RTC_DRV_TEST is not set
593 652
594# 653#
595# DMA Clients 654# SPI RTC drivers
596# 655#
597 656
598# 657#
599# DMA Devices 658# Platform RTC drivers
600# 659#
660# CONFIG_RTC_DRV_DS1511 is not set
661# CONFIG_RTC_DRV_DS1553 is not set
662# CONFIG_RTC_DRV_DS1742 is not set
663# CONFIG_RTC_DRV_STK17TA8 is not set
664# CONFIG_RTC_DRV_M48T86 is not set
665# CONFIG_RTC_DRV_M48T59 is not set
666# CONFIG_RTC_DRV_V3020 is not set
601 667
602# 668#
603# Userspace I/O 669# on-CPU RTC drivers
604# 670#
671CONFIG_RTC_DRV_SH=y
605# CONFIG_UIO is not set 672# CONFIG_UIO is not set
606 673
607# 674#
608# File systems 675# File systems
609# 676#
610# CONFIG_EXT2_FS is not set 677CONFIG_EXT2_FS=y
678# CONFIG_EXT2_FS_XATTR is not set
611# CONFIG_EXT3_FS is not set 679# CONFIG_EXT3_FS is not set
612# CONFIG_EXT4DEV_FS is not set 680# CONFIG_EXT4DEV_FS is not set
613# CONFIG_REISERFS_FS is not set 681# CONFIG_REISERFS_FS is not set
614# CONFIG_JFS_FS is not set 682# CONFIG_JFS_FS is not set
615# CONFIG_FS_POSIX_ACL is not set 683# CONFIG_FS_POSIX_ACL is not set
616# CONFIG_XFS_FS is not set 684# CONFIG_XFS_FS is not set
617# CONFIG_GFS2_FS is not set 685# CONFIG_OCFS2_FS is not set
618# CONFIG_MINIX_FS is not set 686# CONFIG_DNOTIFY is not set
619CONFIG_ROMFS_FS=y
620# CONFIG_INOTIFY is not set 687# CONFIG_INOTIFY is not set
621# CONFIG_QUOTA is not set 688# CONFIG_QUOTA is not set
622# CONFIG_DNOTIFY is not set
623# CONFIG_AUTOFS_FS is not set 689# CONFIG_AUTOFS_FS is not set
624# CONFIG_AUTOFS4_FS is not set 690# CONFIG_AUTOFS4_FS is not set
625# CONFIG_FUSE_FS is not set 691# CONFIG_FUSE_FS is not set
@@ -642,10 +708,11 @@ CONFIG_ROMFS_FS=y
642# 708#
643CONFIG_PROC_FS=y 709CONFIG_PROC_FS=y
644CONFIG_PROC_SYSCTL=y 710CONFIG_PROC_SYSCTL=y
645# CONFIG_SYSFS is not set 711CONFIG_SYSFS=y
646# CONFIG_TMPFS is not set 712CONFIG_TMPFS=y
713# CONFIG_TMPFS_POSIX_ACL is not set
647# CONFIG_HUGETLB_PAGE is not set 714# CONFIG_HUGETLB_PAGE is not set
648CONFIG_RAMFS=y 715CONFIG_CONFIGFS_FS=y
649 716
650# 717#
651# Miscellaneous filesystems 718# Miscellaneous filesystems
@@ -658,18 +725,28 @@ CONFIG_RAMFS=y
658# CONFIG_BFS_FS is not set 725# CONFIG_BFS_FS is not set
659# CONFIG_EFS_FS is not set 726# CONFIG_EFS_FS is not set
660# CONFIG_JFFS2_FS is not set 727# CONFIG_JFFS2_FS is not set
661# CONFIG_CRAMFS is not set 728CONFIG_CRAMFS=y
662# CONFIG_VXFS_FS is not set 729# CONFIG_VXFS_FS is not set
730# CONFIG_MINIX_FS is not set
663# CONFIG_HPFS_FS is not set 731# CONFIG_HPFS_FS is not set
664# CONFIG_QNX4FS_FS is not set 732# CONFIG_QNX4FS_FS is not set
733CONFIG_ROMFS_FS=y
665# CONFIG_SYSV_FS is not set 734# CONFIG_SYSV_FS is not set
666# CONFIG_UFS_FS is not set 735# CONFIG_UFS_FS is not set
667 736CONFIG_NETWORK_FILESYSTEMS=y
668# 737CONFIG_NFS_FS=y
669# Network File Systems 738CONFIG_NFS_V3=y
670# 739# CONFIG_NFS_V3_ACL is not set
671# CONFIG_NFS_FS is not set 740# CONFIG_NFS_V4 is not set
672# CONFIG_NFSD is not set 741# CONFIG_NFSD is not set
742CONFIG_ROOT_NFS=y
743CONFIG_LOCKD=y
744CONFIG_LOCKD_V4=y
745CONFIG_NFS_COMMON=y
746CONFIG_SUNRPC=y
747# CONFIG_SUNRPC_BIND34 is not set
748# CONFIG_RPCSEC_GSS_KRB5 is not set
749# CONFIG_RPCSEC_GSS_SPKM3 is not set
673# CONFIG_SMB_FS is not set 750# CONFIG_SMB_FS is not set
674# CONFIG_CIFS is not set 751# CONFIG_CIFS is not set
675# CONFIG_NCP_FS is not set 752# CONFIG_NCP_FS is not set
@@ -681,30 +758,20 @@ CONFIG_RAMFS=y
681# 758#
682# CONFIG_PARTITION_ADVANCED is not set 759# CONFIG_PARTITION_ADVANCED is not set
683CONFIG_MSDOS_PARTITION=y 760CONFIG_MSDOS_PARTITION=y
684
685#
686# Native Language Support
687#
688# CONFIG_NLS is not set 761# CONFIG_NLS is not set
689 762# CONFIG_DLM is not set
690#
691# Distributed Lock Manager
692#
693
694#
695# Profiling support
696#
697CONFIG_PROFILING=y
698# CONFIG_OPROFILE is not set
699 763
700# 764#
701# Kernel hacking 765# Kernel hacking
702# 766#
703CONFIG_TRACE_IRQFLAGS_SUPPORT=y 767CONFIG_TRACE_IRQFLAGS_SUPPORT=y
704# CONFIG_PRINTK_TIME is not set 768# CONFIG_PRINTK_TIME is not set
769CONFIG_ENABLE_WARN_DEPRECATED=y
705# CONFIG_ENABLE_MUST_CHECK is not set 770# CONFIG_ENABLE_MUST_CHECK is not set
771CONFIG_FRAME_WARN=1024
706# CONFIG_MAGIC_SYSRQ is not set 772# CONFIG_MAGIC_SYSRQ is not set
707# CONFIG_UNUSED_SYMBOLS is not set 773# CONFIG_UNUSED_SYMBOLS is not set
774CONFIG_DEBUG_FS=y
708# CONFIG_HEADERS_CHECK is not set 775# CONFIG_HEADERS_CHECK is not set
709CONFIG_DEBUG_KERNEL=y 776CONFIG_DEBUG_KERNEL=y
710# CONFIG_DEBUG_SHIRQ is not set 777# CONFIG_DEBUG_SHIRQ is not set
@@ -712,7 +779,10 @@ CONFIG_DETECT_SOFTLOCKUP=y
712CONFIG_SCHED_DEBUG=y 779CONFIG_SCHED_DEBUG=y
713# CONFIG_SCHEDSTATS is not set 780# CONFIG_SCHEDSTATS is not set
714# CONFIG_TIMER_STATS is not set 781# CONFIG_TIMER_STATS is not set
715CONFIG_SLUB_DEBUG_ON=y 782# CONFIG_DEBUG_OBJECTS is not set
783CONFIG_DEBUG_PREEMPT=y
784# CONFIG_DEBUG_RT_MUTEXES is not set
785# CONFIG_RT_MUTEX_TESTER is not set
716# CONFIG_DEBUG_SPINLOCK is not set 786# CONFIG_DEBUG_SPINLOCK is not set
717# CONFIG_DEBUG_MUTEXES is not set 787# CONFIG_DEBUG_MUTEXES is not set
718# CONFIG_DEBUG_LOCK_ALLOC is not set 788# CONFIG_DEBUG_LOCK_ALLOC is not set
@@ -722,38 +792,123 @@ CONFIG_DEBUG_SPINLOCK_SLEEP=y
722# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 792# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
723# CONFIG_DEBUG_KOBJECT is not set 793# CONFIG_DEBUG_KOBJECT is not set
724CONFIG_DEBUG_BUGVERBOSE=y 794CONFIG_DEBUG_BUGVERBOSE=y
725CONFIG_DEBUG_INFO=y 795# CONFIG_DEBUG_INFO is not set
726# CONFIG_DEBUG_VM is not set 796CONFIG_DEBUG_VM=y
727# CONFIG_DEBUG_LIST is not set 797# CONFIG_DEBUG_WRITECOUNT is not set
798CONFIG_DEBUG_LIST=y
799# CONFIG_DEBUG_SG is not set
728CONFIG_FRAME_POINTER=y 800CONFIG_FRAME_POINTER=y
729CONFIG_FORCED_INLINING=y 801# CONFIG_BOOT_PRINTK_DELAY is not set
802# CONFIG_RCU_TORTURE_TEST is not set
803# CONFIG_BACKTRACE_SELF_TEST is not set
730# CONFIG_FAULT_INJECTION is not set 804# CONFIG_FAULT_INJECTION is not set
805# CONFIG_SAMPLES is not set
731# CONFIG_SH_STANDARD_BIOS is not set 806# CONFIG_SH_STANDARD_BIOS is not set
732CONFIG_EARLY_SCIF_CONSOLE=y 807# CONFIG_EARLY_SCIF_CONSOLE is not set
733CONFIG_EARLY_SCIF_CONSOLE_PORT=0xfffe9800
734CONFIG_EARLY_PRINTK=y
735# CONFIG_DEBUG_BOOTMEM is not set 808# CONFIG_DEBUG_BOOTMEM is not set
736CONFIG_DEBUG_STACKOVERFLOW=y 809CONFIG_DEBUG_STACKOVERFLOW=y
737CONFIG_DEBUG_STACK_USAGE=y 810CONFIG_DEBUG_STACK_USAGE=y
738# CONFIG_4KSTACKS is not set 811# CONFIG_IRQSTACKS is not set
739 812
740# 813#
741# Security options 814# Security options
742# 815#
743# CONFIG_KEYS is not set 816# CONFIG_KEYS is not set
744# CONFIG_CRYPTO is not set 817# CONFIG_SECURITY is not set
818# CONFIG_SECURITY_FILE_CAPABILITIES is not set
819CONFIG_CRYPTO=y
820
821#
822# Crypto core or helper
823#
824CONFIG_CRYPTO_ALGAPI=y
825# CONFIG_CRYPTO_MANAGER is not set
826# CONFIG_CRYPTO_GF128MUL is not set
827# CONFIG_CRYPTO_NULL is not set
828# CONFIG_CRYPTO_CRYPTD is not set
829# CONFIG_CRYPTO_AUTHENC is not set
830# CONFIG_CRYPTO_TEST is not set
831
832#
833# Authenticated Encryption with Associated Data
834#
835# CONFIG_CRYPTO_CCM is not set
836# CONFIG_CRYPTO_GCM is not set
837# CONFIG_CRYPTO_SEQIV is not set
838
839#
840# Block modes
841#
842# CONFIG_CRYPTO_CBC is not set
843# CONFIG_CRYPTO_CTR is not set
844# CONFIG_CRYPTO_CTS is not set
845# CONFIG_CRYPTO_ECB is not set
846# CONFIG_CRYPTO_LRW is not set
847# CONFIG_CRYPTO_PCBC is not set
848# CONFIG_CRYPTO_XTS is not set
849
850#
851# Hash modes
852#
853# CONFIG_CRYPTO_HMAC is not set
854# CONFIG_CRYPTO_XCBC is not set
855
856#
857# Digest
858#
859# CONFIG_CRYPTO_CRC32C is not set
860# CONFIG_CRYPTO_MD4 is not set
861# CONFIG_CRYPTO_MD5 is not set
862# CONFIG_CRYPTO_MICHAEL_MIC is not set
863# CONFIG_CRYPTO_SHA1 is not set
864# CONFIG_CRYPTO_SHA256 is not set
865# CONFIG_CRYPTO_SHA512 is not set
866# CONFIG_CRYPTO_TGR192 is not set
867# CONFIG_CRYPTO_WP512 is not set
868
869#
870# Ciphers
871#
872# CONFIG_CRYPTO_AES is not set
873# CONFIG_CRYPTO_ANUBIS is not set
874# CONFIG_CRYPTO_ARC4 is not set
875# CONFIG_CRYPTO_BLOWFISH is not set
876# CONFIG_CRYPTO_CAMELLIA is not set
877# CONFIG_CRYPTO_CAST5 is not set
878# CONFIG_CRYPTO_CAST6 is not set
879# CONFIG_CRYPTO_DES is not set
880# CONFIG_CRYPTO_FCRYPT is not set
881# CONFIG_CRYPTO_KHAZAD is not set
882# CONFIG_CRYPTO_SALSA20 is not set
883# CONFIG_CRYPTO_SEED is not set
884# CONFIG_CRYPTO_SERPENT is not set
885# CONFIG_CRYPTO_TEA is not set
886# CONFIG_CRYPTO_TWOFISH is not set
887
888#
889# Compression
890#
891CONFIG_CRYPTO_DEFLATE=y
892CONFIG_CRYPTO_LZO=y
893# CONFIG_CRYPTO_HW is not set
745 894
746# 895#
747# Library routines 896# Library routines
748# 897#
749CONFIG_BITREVERSE=y 898CONFIG_BITREVERSE=y
750# CONFIG_CRC_CCITT is not set 899# CONFIG_GENERIC_FIND_FIRST_BIT is not set
751# CONFIG_CRC16 is not set 900CONFIG_CRC_CCITT=y
752# CONFIG_CRC_ITU_T is not set 901CONFIG_CRC16=y
902CONFIG_CRC_ITU_T=y
753CONFIG_CRC32=y 903CONFIG_CRC32=y
754# CONFIG_CRC7 is not set 904CONFIG_CRC7=y
755# CONFIG_LIBCRC32C is not set 905CONFIG_LIBCRC32C=y
906CONFIG_AUDIT_GENERIC=y
756CONFIG_ZLIB_INFLATE=y 907CONFIG_ZLIB_INFLATE=y
908CONFIG_ZLIB_DEFLATE=y
909CONFIG_LZO_COMPRESS=y
910CONFIG_LZO_DECOMPRESS=y
911CONFIG_PLIST=y
757CONFIG_HAS_IOMEM=y 912CONFIG_HAS_IOMEM=y
758CONFIG_HAS_IOPORT=y 913CONFIG_HAS_IOPORT=y
759CONFIG_HAS_DMA=y 914CONFIG_HAS_DMA=y
diff --git a/arch/sh/drivers/heartbeat.c b/arch/sh/drivers/heartbeat.c
index ab77b0e0fa0e..938817e34e2b 100644
--- a/arch/sh/drivers/heartbeat.c
+++ b/arch/sh/drivers/heartbeat.c
@@ -154,4 +154,4 @@ module_exit(heartbeat_exit);
154 154
155MODULE_VERSION(DRV_VERSION); 155MODULE_VERSION(DRV_VERSION);
156MODULE_AUTHOR("Paul Mundt"); 156MODULE_AUTHOR("Paul Mundt");
157MODULE_LICENSE("GPLv2"); 157MODULE_LICENSE("GPL v2");
diff --git a/arch/sh/kernel/cpu/irq/intc-sh5.c b/arch/sh/kernel/cpu/irq/intc-sh5.c
index de45c6a3e33b..79baa47af977 100644
--- a/arch/sh/kernel/cpu/irq/intc-sh5.c
+++ b/arch/sh/kernel/cpu/irq/intc-sh5.c
@@ -242,6 +242,7 @@ void __init plat_irq_setup(void)
242 reg += 8; 242 reg += 8;
243 } 243 }
244 } 244 }
245 }
245#endif 246#endif
246 247
247 /* 248 /*
diff --git a/arch/sh/kernel/cpu/sh4/probe.c b/arch/sh/kernel/cpu/sh4/probe.c
index ebceb0dadff5..be4926969181 100644
--- a/arch/sh/kernel/cpu/sh4/probe.c
+++ b/arch/sh/kernel/cpu/sh4/probe.c
@@ -132,6 +132,7 @@ int __init detect_cpu_and_cache_system(void)
132 132
133 switch (prr) { 133 switch (prr) {
134 case 0x50: 134 case 0x50:
135 case 0x51:
135 boot_cpu_data.type = CPU_SH7723; 136 boot_cpu_data.type = CPU_SH7723;
136 boot_cpu_data.flags |= CPU_HAS_FPU | CPU_HAS_L2_CACHE; 137 boot_cpu_data.flags |= CPU_HAS_FPU | CPU_HAS_L2_CACHE;
137 break; 138 break;
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
index 069314037049..62ebccf18b3c 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
@@ -16,7 +16,7 @@
16 16
17static struct resource usbf_resources[] = { 17static struct resource usbf_resources[] = {
18 [0] = { 18 [0] = {
19 .name = "USBF", 19 .name = "m66592_udc",
20 .start = 0x04480000, 20 .start = 0x04480000,
21 .end = 0x044800FF, 21 .end = 0x044800FF,
22 .flags = IORESOURCE_MEM, 22 .flags = IORESOURCE_MEM,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
index 16925cf28db8..a0470f2f5479 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
@@ -16,6 +16,21 @@
16 16
17static struct plat_sci_port sci_platform_data[] = { 17static struct plat_sci_port sci_platform_data[] = {
18 { 18 {
19 .mapbase = 0xffe00000,
20 .flags = UPF_BOOT_AUTOCONF,
21 .type = PORT_SCIF,
22 .irqs = { 80, 80, 80, 80 },
23 },{
24 .mapbase = 0xffe10000,
25 .flags = UPF_BOOT_AUTOCONF,
26 .type = PORT_SCIF,
27 .irqs = { 81, 81, 81, 81 },
28 },{
29 .mapbase = 0xffe20000,
30 .flags = UPF_BOOT_AUTOCONF,
31 .type = PORT_SCIF,
32 .irqs = { 82, 82, 82, 82 },
33 },{
19 .mapbase = 0xa4e30000, 34 .mapbase = 0xa4e30000,
20 .flags = UPF_BOOT_AUTOCONF, 35 .flags = UPF_BOOT_AUTOCONF,
21 .type = PORT_SCI, 36 .type = PORT_SCI,
@@ -73,9 +88,35 @@ static struct platform_device rtc_device = {
73 .resource = rtc_resources, 88 .resource = rtc_resources,
74}; 89};
75 90
91static struct resource sh7723_usb_host_resources[] = {
92 [0] = {
93 .name = "r8a66597_hcd",
94 .start = 0xa4d80000,
95 .end = 0xa4d800ff,
96 .flags = IORESOURCE_MEM,
97 },
98 [1] = {
99 .start = 65,
100 .end = 65,
101 .flags = IORESOURCE_IRQ,
102 },
103};
104
105static struct platform_device sh7723_usb_host_device = {
106 .name = "r8a66597_hcd",
107 .id = 0,
108 .dev = {
109 .dma_mask = NULL, /* not use dma */
110 .coherent_dma_mask = 0xffffffff,
111 },
112 .num_resources = ARRAY_SIZE(sh7723_usb_host_resources),
113 .resource = sh7723_usb_host_resources,
114};
115
76static struct platform_device *sh7723_devices[] __initdata = { 116static struct platform_device *sh7723_devices[] __initdata = {
77 &sci_device, 117 &sci_device,
78 &rtc_device, 118 &rtc_device,
119 &sh7723_usb_host_device,
79}; 120};
80 121
81static int __init sh7723_devices_setup(void) 122static int __init sh7723_devices_setup(void)
@@ -153,7 +194,7 @@ static struct intc_vect vectors[] __initdata = {
153 INTC_VECT(VIO_VOUI,0x8E0), 194 INTC_VECT(VIO_VOUI,0x8E0),
154 195
155 INTC_VECT(SCIFA_SCIFA0,0x900), 196 INTC_VECT(SCIFA_SCIFA0,0x900),
156 INTC_VECT(VPU_VPUI,0x920), 197 INTC_VECT(VPU_VPUI,0x980),
157 INTC_VECT(TPU_TPUI,0x9A0), 198 INTC_VECT(TPU_TPUI,0x9A0),
158 INTC_VECT(ADC_ADI,0x9E0), 199 INTC_VECT(ADC_ADI,0x9E0),
159 INTC_VECT(USB_USI0,0xA20), 200 INTC_VECT(USB_USI0,0xA20),
@@ -292,9 +333,3 @@ void __init plat_irq_setup(void)
292{ 333{
293 register_intc_controller(&intc_desc); 334 register_intc_controller(&intc_desc);
294} 335}
295
296void __init plat_mem_setup(void)
297{
298 /* Register the URAM space as Node 1 */
299 setup_bootmem_node(1, 0x055f0000, 0x05610000);
300}
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c
index ae2b22219f02..f189a559462b 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c
@@ -291,8 +291,9 @@ static struct intc_sense_reg irq_sense_registers[] __initdata = {
291}; 291};
292 292
293static DECLARE_INTC_DESC(intc_irq_desc, "sh7763-irq", irq_vectors, 293static DECLARE_INTC_DESC(intc_irq_desc, "sh7763-irq", irq_vectors,
294 NULL, NULL, irq_mask_registers, irq_prio_registers, 294 NULL, irq_mask_registers, irq_prio_registers,
295 irq_sense_registers); 295 irq_sense_registers);
296
296 297
297/* External interrupt pins in IRL mode */ 298/* External interrupt pins in IRL mode */
298static struct intc_vect irl_vectors[] __initdata = { 299static struct intc_vect irl_vectors[] __initdata = {
@@ -324,10 +325,10 @@ static struct intc_mask_reg irl7654_mask_registers[] __initdata = {
324}; 325};
325 326
326static DECLARE_INTC_DESC(intc_irl7654_desc, "sh7763-irl7654", irl_vectors, 327static DECLARE_INTC_DESC(intc_irl7654_desc, "sh7763-irl7654", irl_vectors,
327 NULL, NULL, irl7654_mask_registers, NULL, NULL); 328 NULL, irl7654_mask_registers, NULL, NULL);
328 329
329static DECLARE_INTC_DESC(intc_irl3210_desc, "sh7763-irl3210", irl_vectors, 330static DECLARE_INTC_DESC(intc_irl3210_desc, "sh7763-irl3210", irl_vectors,
330 NULL, NULL, irl3210_mask_registers, NULL, NULL); 331 NULL, irl3210_mask_registers, NULL, NULL);
331 332
332#define INTC_ICR0 0xffd00000 333#define INTC_ICR0 0xffd00000
333#define INTC_INTMSK0 0xffd00044 334#define INTC_INTMSK0 0xffd00044
diff --git a/arch/sh/kernel/module.c b/arch/sh/kernel/module.c
index b3d0a03b4c76..5482e65375a9 100644
--- a/arch/sh/kernel/module.c
+++ b/arch/sh/kernel/module.c
@@ -30,6 +30,7 @@
30#include <linux/fs.h> 30#include <linux/fs.h>
31#include <linux/string.h> 31#include <linux/string.h>
32#include <linux/kernel.h> 32#include <linux/kernel.h>
33#include <asm/unaligned.h>
33 34
34void *module_alloc(unsigned long size) 35void *module_alloc(unsigned long size)
35{ 36{
@@ -56,34 +57,6 @@ int module_frob_arch_sections(Elf_Ehdr *hdr,
56 return 0; 57 return 0;
57} 58}
58 59
59#ifdef CONFIG_SUPERH32
60#define COPY_UNALIGNED_WORD(sw, tw, align) \
61{ \
62 void *__s = &(sw), *__t = &(tw); \
63 unsigned short *__s2 = __s, *__t2 = __t; \
64 unsigned char *__s1 = __s, *__t1 = __t; \
65 switch ((align)) \
66 { \
67 case 0: \
68 *(unsigned long *) __t = *(unsigned long *) __s; \
69 break; \
70 case 2: \
71 *__t2++ = *__s2++; \
72 *__t2 = *__s2; \
73 break; \
74 default: \
75 *__t1++ = *__s1++; \
76 *__t1++ = *__s1++; \
77 *__t1++ = *__s1++; \
78 *__t1 = *__s1; \
79 break; \
80 } \
81}
82#else
83/* One thing SHmedia doesn't screw up! */
84#define COPY_UNALIGNED_WORD(sw, tw, align) { (tw) = (sw); }
85#endif
86
87int apply_relocate_add(Elf32_Shdr *sechdrs, 60int apply_relocate_add(Elf32_Shdr *sechdrs,
88 const char *strtab, 61 const char *strtab,
89 unsigned int symindex, 62 unsigned int symindex,
@@ -96,7 +69,6 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
96 Elf32_Addr relocation; 69 Elf32_Addr relocation;
97 uint32_t *location; 70 uint32_t *location;
98 uint32_t value; 71 uint32_t value;
99 int align;
100 72
101 pr_debug("Applying relocate section %u to %u\n", relsec, 73 pr_debug("Applying relocate section %u to %u\n", relsec,
102 sechdrs[relsec].sh_info); 74 sechdrs[relsec].sh_info);
@@ -109,7 +81,6 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
109 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr 81 sym = (Elf32_Sym *)sechdrs[symindex].sh_addr
110 + ELF32_R_SYM(rel[i].r_info); 82 + ELF32_R_SYM(rel[i].r_info);
111 relocation = sym->st_value + rel[i].r_addend; 83 relocation = sym->st_value + rel[i].r_addend;
112 align = (int)location & 3;
113 84
114#ifdef CONFIG_SUPERH64 85#ifdef CONFIG_SUPERH64
115 /* For text addresses, bit2 of the st_other field indicates 86 /* For text addresses, bit2 of the st_other field indicates
@@ -122,15 +93,15 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
122 93
123 switch (ELF32_R_TYPE(rel[i].r_info)) { 94 switch (ELF32_R_TYPE(rel[i].r_info)) {
124 case R_SH_DIR32: 95 case R_SH_DIR32:
125 COPY_UNALIGNED_WORD (*location, value, align); 96 value = get_unaligned(location);
126 value += relocation; 97 value += relocation;
127 COPY_UNALIGNED_WORD (value, *location, align); 98 put_unaligned(value, location);
128 break; 99 break;
129 case R_SH_REL32: 100 case R_SH_REL32:
130 relocation = (relocation - (Elf32_Addr) location); 101 relocation = (relocation - (Elf32_Addr) location);
131 COPY_UNALIGNED_WORD (*location, value, align); 102 value = get_unaligned(location);
132 value += relocation; 103 value += relocation;
133 COPY_UNALIGNED_WORD (value, *location, align); 104 put_unaligned(value, location);
134 break; 105 break;
135 case R_SH_IMM_LOW16: 106 case R_SH_IMM_LOW16:
136 *location = (*location & ~0x3fffc00) | 107 *location = (*location & ~0x3fffc00) |
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index d211fdb24584..789724e61e83 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -1,4 +1,3 @@
1# $Id: config.in,v 1.113 2002/01/24 22:14:44 davem Exp $
2# For a description of the syntax of this configuration file, 1# For a description of the syntax of this configuration file,
3# see Documentation/kbuild/kconfig-language.txt. 2# see Documentation/kbuild/kconfig-language.txt.
4# 3#
diff --git a/arch/sparc/boot/Makefile b/arch/sparc/boot/Makefile
index b365084316ac..22d331e1e941 100644
--- a/arch/sparc/boot/Makefile
+++ b/arch/sparc/boot/Makefile
@@ -1,4 +1,3 @@
1# $Id: Makefile,v 1.10 2000/02/23 08:17:46 jj Exp $
2# Makefile for the Sparc boot stuff. 1# Makefile for the Sparc boot stuff.
3# 2#
4# Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 3# Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc/boot/btfixupprep.c b/arch/sparc/boot/btfixupprep.c
index dc7b0546e3bb..52a4208fe4f0 100644
--- a/arch/sparc/boot/btfixupprep.c
+++ b/arch/sparc/boot/btfixupprep.c
@@ -1,4 +1,4 @@
1/* $Id: btfixupprep.c,v 1.6 2001/08/22 15:27:47 davem Exp $ 1/*
2 Simple utility to prepare vmlinux image for sparc. 2 Simple utility to prepare vmlinux image for sparc.
3 Resolves all BTFIXUP uses and settings and creates 3 Resolves all BTFIXUP uses and settings and creates
4 a special .s object to link to the image. 4 a special .s object to link to the image.
diff --git a/arch/sparc/boot/piggyback.c b/arch/sparc/boot/piggyback.c
index 6962cc68ed5b..c9f500c1a8b2 100644
--- a/arch/sparc/boot/piggyback.c
+++ b/arch/sparc/boot/piggyback.c
@@ -1,4 +1,4 @@
1/* $Id: piggyback.c,v 1.4 2000/12/05 00:48:57 anton Exp $ 1/*
2 Simple utility to make a single-image install kernel with initial ramdisk 2 Simple utility to make a single-image install kernel with initial ramdisk
3 for Sparc tftpbooting without need to set up nfs. 3 for Sparc tftpbooting without need to set up nfs.
4 4
diff --git a/arch/sparc/kernel/ebus.c b/arch/sparc/kernel/ebus.c
index 96344ff2bbe1..92c6fc07e59c 100644
--- a/arch/sparc/kernel/ebus.c
+++ b/arch/sparc/kernel/ebus.c
@@ -1,4 +1,4 @@
1/* $Id: ebus.c,v 1.20 2002/01/05 01:13:43 davem Exp $ 1/*
2 * ebus.c: PCI to EBus bridge device. 2 * ebus.c: PCI to EBus bridge device.
3 * 3 *
4 * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) 4 * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be)
diff --git a/arch/sparc/kernel/etrap.S b/arch/sparc/kernel/etrap.S
index a8b35bed12a2..f37d961d67a6 100644
--- a/arch/sparc/kernel/etrap.S
+++ b/arch/sparc/kernel/etrap.S
@@ -1,4 +1,4 @@
1/* $Id: etrap.S,v 1.31 2000/01/08 16:38:18 anton Exp $ 1/*
2 * etrap.S: Sparc trap window preparation for entry into the 2 * etrap.S: Sparc trap window preparation for entry into the
3 * Linux kernel. 3 * Linux kernel.
4 * 4 *
diff --git a/arch/sparc/kernel/head.S b/arch/sparc/kernel/head.S
index 8bec05fa5795..3bfd6085a91d 100644
--- a/arch/sparc/kernel/head.S
+++ b/arch/sparc/kernel/head.S
@@ -1,4 +1,4 @@
1/* $Id: head.S,v 1.105 2001/08/12 09:08:56 davem Exp $ 1/*
2 * head.S: The initial boot code for the Sparc port of Linux. 2 * head.S: The initial boot code for the Sparc port of Linux.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc/kernel/idprom.c b/arch/sparc/kernel/idprom.c
index 3a5bad525394..7220562cdb34 100644
--- a/arch/sparc/kernel/idprom.c
+++ b/arch/sparc/kernel/idprom.c
@@ -1,4 +1,4 @@
1/* $Id: idprom.c,v 1.24 1999/08/31 06:54:20 davem Exp $ 1/*
2 * idprom.c: Routines to load the idprom into kernel addresses and 2 * idprom.c: Routines to load the idprom into kernel addresses and
3 * interpret the data contained within. 3 * interpret the data contained within.
4 * 4 *
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
index ad0ede24ca1d..7b17522f59bf 100644
--- a/arch/sparc/kernel/ioport.c
+++ b/arch/sparc/kernel/ioport.c
@@ -1,4 +1,4 @@
1/* $Id: ioport.c,v 1.45 2001/10/30 04:54:21 davem Exp $ 1/*
2 * ioport.c: Simple io mapping allocator. 2 * ioport.c: Simple io mapping allocator.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c
index 01a6756ba371..087390b092b0 100644
--- a/arch/sparc/kernel/irq.c
+++ b/arch/sparc/kernel/irq.c
@@ -1,4 +1,4 @@
1/* $Id: irq.c,v 1.114 2001/12/11 04:55:51 davem Exp $ 1/*
2 * arch/sparc/kernel/irq.c: Interrupt request handling routines. On the 2 * arch/sparc/kernel/irq.c: Interrupt request handling routines. On the
3 * Sparc the IRQs are basically 'cast in stone' 3 * Sparc the IRQs are basically 'cast in stone'
4 * and you are supposed to probe the prom's device 4 * and you are supposed to probe the prom's device
diff --git a/arch/sparc/kernel/led.c b/arch/sparc/kernel/led.c
index 59e9344e7a0d..adaaed4ea2fb 100644
--- a/arch/sparc/kernel/led.c
+++ b/arch/sparc/kernel/led.c
@@ -2,6 +2,7 @@
2#include <linux/module.h> 2#include <linux/module.h>
3#include <linux/init.h> 3#include <linux/init.h>
4#include <linux/proc_fs.h> 4#include <linux/proc_fs.h>
5#include <linux/seq_file.h>
5#include <linux/string.h> 6#include <linux/string.h>
6#include <linux/jiffies.h> 7#include <linux/jiffies.h>
7#include <linux/timer.h> 8#include <linux/timer.h>
@@ -45,21 +46,22 @@ static void led_blink(unsigned long timeout)
45 add_timer(&led_blink_timer); 46 add_timer(&led_blink_timer);
46} 47}
47 48
48static int led_read_proc(char *buf, char **start, off_t offset, int count, 49static int led_proc_show(struct seq_file *m, void *v)
49 int *eof, void *data)
50{ 50{
51 int len = 0;
52
53 if (get_auxio() & AUXIO_LED) 51 if (get_auxio() & AUXIO_LED)
54 len = sprintf(buf, "on\n"); 52 seq_puts(m, "on\n");
55 else 53 else
56 len = sprintf(buf, "off\n"); 54 seq_puts(m, "off\n");
55 return 0;
56}
57 57
58 return len; 58static int led_proc_open(struct inode *inode, struct file *file)
59{
60 return single_open(file, led_proc_show, NULL);
59} 61}
60 62
61static int led_write_proc(struct file *file, const char __user *buffer, 63static ssize_t led_proc_write(struct file *file, const char __user *buffer,
62 unsigned long count, void *data) 64 size_t count, loff_t *ppos)
63{ 65{
64 char *buf = NULL; 66 char *buf = NULL;
65 67
@@ -103,6 +105,15 @@ static int led_write_proc(struct file *file, const char __user *buffer,
103 return count; 105 return count;
104} 106}
105 107
108static const struct file_operations led_proc_fops = {
109 .owner = THIS_MODULE,
110 .open = led_proc_open,
111 .read = seq_read,
112 .llseek = seq_lseek,
113 .release = single_release,
114 .write = led_proc_write,
115};
116
106static struct proc_dir_entry *led; 117static struct proc_dir_entry *led;
107 118
108#define LED_VERSION "0.1" 119#define LED_VERSION "0.1"
@@ -112,12 +123,9 @@ static int __init led_init(void)
112 init_timer(&led_blink_timer); 123 init_timer(&led_blink_timer);
113 led_blink_timer.function = led_blink; 124 led_blink_timer.function = led_blink;
114 125
115 led = create_proc_entry("led", 0, NULL); 126 led = proc_create("led", 0, NULL, &led_proc_fops);
116 if (!led) 127 if (!led)
117 return -ENOMEM; 128 return -ENOMEM;
118
119 led->read_proc = led_read_proc; /* reader function */
120 led->write_proc = led_write_proc; /* writer function */
121 led->owner = THIS_MODULE; 129 led->owner = THIS_MODULE;
122 130
123 printk(KERN_INFO 131 printk(KERN_INFO
diff --git a/arch/sparc/kernel/muldiv.c b/arch/sparc/kernel/muldiv.c
index 37b9a4942232..e352239e72c8 100644
--- a/arch/sparc/kernel/muldiv.c
+++ b/arch/sparc/kernel/muldiv.c
@@ -1,4 +1,4 @@
1/* $Id: muldiv.c,v 1.5 1997/12/15 20:07:20 ecd Exp $ 1/*
2 * muldiv.c: Hardware multiply/division illegal instruction trap 2 * muldiv.c: Hardware multiply/division illegal instruction trap
3 * for sun4c/sun4 (which do not have those instructions) 3 * for sun4c/sun4 (which do not have those instructions)
4 * 4 *
diff --git a/arch/sparc/kernel/rtrap.S b/arch/sparc/kernel/rtrap.S
index ab818cdc4cc0..ce30082ab266 100644
--- a/arch/sparc/kernel/rtrap.S
+++ b/arch/sparc/kernel/rtrap.S
@@ -1,4 +1,4 @@
1/* $Id: rtrap.S,v 1.58 2002/01/31 03:30:05 davem Exp $ 1/*
2 * rtrap.S: Return from Sparc trap low-level code. 2 * rtrap.S: Return from Sparc trap low-level code.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc/kernel/setup.c b/arch/sparc/kernel/setup.c
index 8a55c4f0df84..a0ea0bc6f471 100644
--- a/arch/sparc/kernel/setup.c
+++ b/arch/sparc/kernel/setup.c
@@ -1,4 +1,4 @@
1/* $Id: setup.c,v 1.126 2001/11/13 00:49:27 davem Exp $ 1/*
2 * linux/arch/sparc/kernel/setup.c 2 * linux/arch/sparc/kernel/setup.c
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c
index aa8ee06cf488..b23cea5ca5d1 100644
--- a/arch/sparc/kernel/sparc_ksyms.c
+++ b/arch/sparc/kernel/sparc_ksyms.c
@@ -1,4 +1,4 @@
1/* $Id: sparc_ksyms.c,v 1.107 2001/07/17 16:17:33 anton Exp $ 1/*
2 * arch/sparc/kernel/ksyms.c: Sparc specific ksyms support. 2 * arch/sparc/kernel/ksyms.c: Sparc specific ksyms support.
3 * 3 *
4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c
index e0efab2a6bef..8ac5661cafff 100644
--- a/arch/sparc/kernel/sun4d_irq.c
+++ b/arch/sparc/kernel/sun4d_irq.c
@@ -1,4 +1,4 @@
1/* $Id: sun4d_irq.c,v 1.29 2001/12/11 04:55:51 davem Exp $ 1/*
2 * arch/sparc/kernel/sun4d_irq.c: 2 * arch/sparc/kernel/sun4d_irq.c:
3 * SS1000/SC2000 interrupt handling. 3 * SS1000/SC2000 interrupt handling.
4 * 4 *
diff --git a/arch/sparc/kernel/trampoline.S b/arch/sparc/kernel/trampoline.S
index 2dcdaa1fd8cd..356c56aebc62 100644
--- a/arch/sparc/kernel/trampoline.S
+++ b/arch/sparc/kernel/trampoline.S
@@ -1,4 +1,4 @@
1/* $Id: trampoline.S,v 1.14 2002/01/11 08:45:38 davem Exp $ 1/*
2 * trampoline.S: SMP cpu boot-up trampoline code. 2 * trampoline.S: SMP cpu boot-up trampoline code.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc/kernel/traps.c b/arch/sparc/kernel/traps.c
index d404e7994527..978e9d85949e 100644
--- a/arch/sparc/kernel/traps.c
+++ b/arch/sparc/kernel/traps.c
@@ -1,4 +1,4 @@
1/* $Id: traps.c,v 1.64 2000/09/03 15:00:49 anton Exp $ 1/*
2 * arch/sparc/kernel/traps.c 2 * arch/sparc/kernel/traps.c
3 * 3 *
4 * Copyright 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc/kernel/unaligned.c b/arch/sparc/kernel/unaligned.c
index 33857be16661..c2a28c5ad650 100644
--- a/arch/sparc/kernel/unaligned.c
+++ b/arch/sparc/kernel/unaligned.c
@@ -1,4 +1,4 @@
1/* $Id: unaligned.c,v 1.23 2001/12/21 00:54:31 davem Exp $ 1/*
2 * unaligned.c: Unaligned load/store trap handling with special 2 * unaligned.c: Unaligned load/store trap handling with special
3 * cases for the kernel to do them more quickly. 3 * cases for the kernel to do them more quickly.
4 * 4 *
diff --git a/arch/sparc/kernel/wof.S b/arch/sparc/kernel/wof.S
index 083b1215d515..4bce38dfe3c5 100644
--- a/arch/sparc/kernel/wof.S
+++ b/arch/sparc/kernel/wof.S
@@ -1,4 +1,4 @@
1/* $Id: wof.S,v 1.40 2000/01/08 16:38:18 anton Exp $ 1/*
2 * wof.S: Sparc window overflow handler. 2 * wof.S: Sparc window overflow handler.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc/kernel/wuf.S b/arch/sparc/kernel/wuf.S
index d1a266bf103a..82e5145b0f77 100644
--- a/arch/sparc/kernel/wuf.S
+++ b/arch/sparc/kernel/wuf.S
@@ -1,4 +1,4 @@
1/* $Id: wuf.S,v 1.39 2000/01/08 16:38:18 anton Exp $ 1/*
2 * wuf.S: Window underflow trap handler for the Sparc. 2 * wuf.S: Window underflow trap handler for the Sparc.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller 4 * Copyright (C) 1995 David S. Miller
diff --git a/arch/sparc/lib/Makefile b/arch/sparc/lib/Makefile
index 76effdbea075..6e303e10c3b9 100644
--- a/arch/sparc/lib/Makefile
+++ b/arch/sparc/lib/Makefile
@@ -1,4 +1,3 @@
1# $Id: Makefile,v 1.35 2000/12/15 00:41:18 davem Exp $
2# Makefile for Sparc library files.. 1# Makefile for Sparc library files..
3# 2#
4 3
diff --git a/arch/sparc/lib/ashldi3.S b/arch/sparc/lib/ashldi3.S
index 52418a0cb3dd..17912e608716 100644
--- a/arch/sparc/lib/ashldi3.S
+++ b/arch/sparc/lib/ashldi3.S
@@ -1,4 +1,4 @@
1/* $Id: ashldi3.S,v 1.2 1999/11/19 04:11:46 davem Exp $ 1/*
2 * ashldi3.S: GCC emits these for certain drivers playing 2 * ashldi3.S: GCC emits these for certain drivers playing
3 * with long longs. 3 * with long longs.
4 * 4 *
diff --git a/arch/sparc/lib/ashrdi3.S b/arch/sparc/lib/ashrdi3.S
index 2848237598a4..85398fd6dcc9 100644
--- a/arch/sparc/lib/ashrdi3.S
+++ b/arch/sparc/lib/ashrdi3.S
@@ -1,4 +1,4 @@
1/* $Id: ashrdi3.S,v 1.4 1999/11/19 04:11:49 davem Exp $ 1/*
2 * ashrdi3.S: The filesystem code creates all kinds of references to 2 * ashrdi3.S: The filesystem code creates all kinds of references to
3 * this little routine on the sparc with gcc. 3 * this little routine on the sparc with gcc.
4 * 4 *
diff --git a/arch/sparc/lib/blockops.S b/arch/sparc/lib/blockops.S
index a7c7ffaa4a94..804be87f9a42 100644
--- a/arch/sparc/lib/blockops.S
+++ b/arch/sparc/lib/blockops.S
@@ -1,4 +1,4 @@
1/* $Id: blockops.S,v 1.8 1998/01/30 10:58:44 jj Exp $ 1/*
2 * blockops.S: Common block zero optimized routines. 2 * blockops.S: Common block zero optimized routines.
3 * 3 *
4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc/lib/locks.S b/arch/sparc/lib/locks.S
index b1df55cb2215..64f53f2b673d 100644
--- a/arch/sparc/lib/locks.S
+++ b/arch/sparc/lib/locks.S
@@ -1,4 +1,4 @@
1/* $Id: locks.S,v 1.16 2000/02/26 11:02:47 anton Exp $ 1/*
2 * locks.S: SMP low-level lock primitives on Sparc. 2 * locks.S: SMP low-level lock primitives on Sparc.
3 * 3 *
4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc/lib/lshrdi3.S b/arch/sparc/lib/lshrdi3.S
index 35abf5b2bd15..47a1354c1602 100644
--- a/arch/sparc/lib/lshrdi3.S
+++ b/arch/sparc/lib/lshrdi3.S
@@ -1,4 +1,3 @@
1/* $Id: lshrdi3.S,v 1.1 1999/03/21 06:37:45 davem Exp $ */
2 1
3 .globl __lshrdi3 2 .globl __lshrdi3
4__lshrdi3: 3__lshrdi3:
diff --git a/arch/sparc/lib/memscan.S b/arch/sparc/lib/memscan.S
index 28e78ff090ac..4ff1657dfc24 100644
--- a/arch/sparc/lib/memscan.S
+++ b/arch/sparc/lib/memscan.S
@@ -1,4 +1,4 @@
1/* $Id: memscan.S,v 1.4 1996/09/08 02:01:20 davem Exp $ 1/*
2 * memscan.S: Optimized memscan for the Sparc. 2 * memscan.S: Optimized memscan for the Sparc.
3 * 3 *
4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc/lib/mul.S b/arch/sparc/lib/mul.S
index da693560d878..c45470d0b0ce 100644
--- a/arch/sparc/lib/mul.S
+++ b/arch/sparc/lib/mul.S
@@ -1,4 +1,4 @@
1/* $Id: mul.S,v 1.4 1996/09/30 02:22:32 davem Exp $ 1/*
2 * mul.S: This routine was taken from glibc-1.09 and is covered 2 * mul.S: This routine was taken from glibc-1.09 and is covered
3 * by the GNU Library General Public License Version 2. 3 * by the GNU Library General Public License Version 2.
4 */ 4 */
diff --git a/arch/sparc/lib/rem.S b/arch/sparc/lib/rem.S
index bf015a90d07e..42fb86252815 100644
--- a/arch/sparc/lib/rem.S
+++ b/arch/sparc/lib/rem.S
@@ -1,4 +1,4 @@
1/* $Id: rem.S,v 1.7 1996/09/30 02:22:34 davem Exp $ 1/*
2 * rem.S: This routine was taken from glibc-1.09 and is covered 2 * rem.S: This routine was taken from glibc-1.09 and is covered
3 * by the GNU Library General Public License Version 2. 3 * by the GNU Library General Public License Version 2.
4 */ 4 */
diff --git a/arch/sparc/lib/rwsem.S b/arch/sparc/lib/rwsem.S
index f406b1f22791..9675268e7fde 100644
--- a/arch/sparc/lib/rwsem.S
+++ b/arch/sparc/lib/rwsem.S
@@ -1,4 +1,4 @@
1/* $Id: rwsem.S,v 1.5 2000/05/09 17:40:13 davem Exp $ 1/*
2 * Assembly part of rw semaphores. 2 * Assembly part of rw semaphores.
3 * 3 *
4 * Copyright (C) 1999 Jakub Jelinek (jakub@redhat.com) 4 * Copyright (C) 1999 Jakub Jelinek (jakub@redhat.com)
diff --git a/arch/sparc/lib/sdiv.S b/arch/sparc/lib/sdiv.S
index af9451629d0b..f0a0d4e4db78 100644
--- a/arch/sparc/lib/sdiv.S
+++ b/arch/sparc/lib/sdiv.S
@@ -1,4 +1,4 @@
1/* $Id: sdiv.S,v 1.6 1996/10/02 17:37:00 davem Exp $ 1/*
2 * sdiv.S: This routine was taken from glibc-1.09 and is covered 2 * sdiv.S: This routine was taken from glibc-1.09 and is covered
3 * by the GNU Library General Public License Version 2. 3 * by the GNU Library General Public License Version 2.
4 */ 4 */
diff --git a/arch/sparc/lib/strncmp.S b/arch/sparc/lib/strncmp.S
index 615626805d4b..494ec664537a 100644
--- a/arch/sparc/lib/strncmp.S
+++ b/arch/sparc/lib/strncmp.S
@@ -1,4 +1,4 @@
1/* $Id: strncmp.S,v 1.2 1996/09/09 02:47:20 davem Exp $ 1/*
2 * strncmp.S: Hand optimized Sparc assembly of GCC output from GNU libc 2 * strncmp.S: Hand optimized Sparc assembly of GCC output from GNU libc
3 * generic strncmp routine. 3 * generic strncmp routine.
4 */ 4 */
diff --git a/arch/sparc/lib/udiv.S b/arch/sparc/lib/udiv.S
index 169e01da6715..2101405bdfcb 100644
--- a/arch/sparc/lib/udiv.S
+++ b/arch/sparc/lib/udiv.S
@@ -1,4 +1,4 @@
1/* $Id: udiv.S,v 1.4 1996/09/30 02:22:38 davem Exp $ 1/*
2 * udiv.S: This routine was taken from glibc-1.09 and is covered 2 * udiv.S: This routine was taken from glibc-1.09 and is covered
3 * by the GNU Library General Public License Version 2. 3 * by the GNU Library General Public License Version 2.
4 */ 4 */
diff --git a/arch/sparc/lib/umul.S b/arch/sparc/lib/umul.S
index f0e5b20a2536..1f36ae682529 100644
--- a/arch/sparc/lib/umul.S
+++ b/arch/sparc/lib/umul.S
@@ -1,4 +1,4 @@
1/* $Id: umul.S,v 1.4 1996/09/30 02:22:39 davem Exp $ 1/*
2 * umul.S: This routine was taken from glibc-1.09 and is covered 2 * umul.S: This routine was taken from glibc-1.09 and is covered
3 * by the GNU Library General Public License Version 2. 3 * by the GNU Library General Public License Version 2.
4 */ 4 */
diff --git a/arch/sparc/lib/urem.S b/arch/sparc/lib/urem.S
index 6b92bdc8b04c..77123eb83c44 100644
--- a/arch/sparc/lib/urem.S
+++ b/arch/sparc/lib/urem.S
@@ -1,4 +1,4 @@
1/* $Id: urem.S,v 1.4 1996/09/30 02:22:42 davem Exp $ 1/*
2 * urem.S: This routine was taken from glibc-1.09 and is covered 2 * urem.S: This routine was taken from glibc-1.09 and is covered
3 * by the GNU Library General Public License Version 2. 3 * by the GNU Library General Public License Version 2.
4 */ 4 */
diff --git a/arch/sparc/math-emu/ashldi3.S b/arch/sparc/math-emu/ashldi3.S
index eab1d097296a..7230ff5c7aa1 100644
--- a/arch/sparc/math-emu/ashldi3.S
+++ b/arch/sparc/math-emu/ashldi3.S
@@ -1,4 +1,4 @@
1/* $Id: ashldi3.S,v 1.1 1998/04/06 16:09:28 jj Exp $ 1/*
2 * ashldi3.S: Math-emu code creates all kinds of references to 2 * ashldi3.S: Math-emu code creates all kinds of references to
3 * this little routine on the sparc with gcc. 3 * this little routine on the sparc with gcc.
4 * 4 *
diff --git a/arch/sparc/mm/Makefile b/arch/sparc/mm/Makefile
index 16eeba4b991a..109c8b22cb38 100644
--- a/arch/sparc/mm/Makefile
+++ b/arch/sparc/mm/Makefile
@@ -1,4 +1,3 @@
1# $Id: Makefile,v 1.38 2000/12/15 00:41:22 davem Exp $
2# Makefile for the linux Sparc-specific parts of the memory manager. 1# Makefile for the linux Sparc-specific parts of the memory manager.
3# 2#
4 3
diff --git a/arch/sparc/mm/fault.c b/arch/sparc/mm/fault.c
index abd50795a7b6..0a3cd8f6cfe4 100644
--- a/arch/sparc/mm/fault.c
+++ b/arch/sparc/mm/fault.c
@@ -1,4 +1,4 @@
1/* $Id: fault.c,v 1.122 2001/11/17 07:19:26 davem Exp $ 1/*
2 * fault.c: Page fault handlers for the Sparc. 2 * fault.c: Page fault handlers for the Sparc.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc/mm/generic.c b/arch/sparc/mm/generic.c
index 1ef7fa03fefe..a289261da9fd 100644
--- a/arch/sparc/mm/generic.c
+++ b/arch/sparc/mm/generic.c
@@ -1,4 +1,4 @@
1/* $Id: generic.c,v 1.14 2001/12/21 04:56:15 davem Exp $ 1/*
2 * generic.c: Generic Sparc mm routines that are not dependent upon 2 * generic.c: Generic Sparc mm routines that are not dependent upon
3 * MMU type but are Sparc specific. 3 * MMU type but are Sparc specific.
4 * 4 *
diff --git a/arch/sparc/mm/hypersparc.S b/arch/sparc/mm/hypersparc.S
index d29cc24c5bba..44aad32eeb4e 100644
--- a/arch/sparc/mm/hypersparc.S
+++ b/arch/sparc/mm/hypersparc.S
@@ -1,4 +1,4 @@
1/* $Id: hypersparc.S,v 1.18 2001/12/21 04:56:15 davem Exp $ 1/*
2 * hypersparc.S: High speed Hypersparc mmu/cache operations. 2 * hypersparc.S: High speed Hypersparc mmu/cache operations.
3 * 3 *
4 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc/mm/init.c b/arch/sparc/mm/init.c
index b89837accc88..7794ecb896e3 100644
--- a/arch/sparc/mm/init.c
+++ b/arch/sparc/mm/init.c
@@ -1,4 +1,4 @@
1/* $Id: init.c,v 1.103 2001/11/19 19:03:08 davem Exp $ 1/*
2 * linux/arch/sparc/mm/init.c 2 * linux/arch/sparc/mm/init.c
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc/mm/io-unit.c b/arch/sparc/mm/io-unit.c
index b86dfce8eee4..f167835db3df 100644
--- a/arch/sparc/mm/io-unit.c
+++ b/arch/sparc/mm/io-unit.c
@@ -1,4 +1,4 @@
1/* $Id: io-unit.c,v 1.24 2001/12/17 07:05:09 davem Exp $ 1/*
2 * io-unit.c: IO-UNIT specific routines for memory management. 2 * io-unit.c: IO-UNIT specific routines for memory management.
3 * 3 *
4 * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 4 * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
diff --git a/arch/sparc/mm/loadmmu.c b/arch/sparc/mm/loadmmu.c
index 2d9cd65160a4..652be05acbea 100644
--- a/arch/sparc/mm/loadmmu.c
+++ b/arch/sparc/mm/loadmmu.c
@@ -1,4 +1,4 @@
1/* $Id: loadmmu.c,v 1.56 2000/02/08 20:24:21 davem Exp $ 1/*
2 * loadmmu.c: This code loads up all the mm function pointers once the 2 * loadmmu.c: This code loads up all the mm function pointers once the
3 * machine type has been determined. It also sets the static 3 * machine type has been determined. It also sets the static
4 * mmu values such as PAGE_NONE, etc. 4 * mmu values such as PAGE_NONE, etc.
diff --git a/arch/sparc/mm/nosrmmu.c b/arch/sparc/mm/nosrmmu.c
index 9e215659697e..3701f70fc30a 100644
--- a/arch/sparc/mm/nosrmmu.c
+++ b/arch/sparc/mm/nosrmmu.c
@@ -1,4 +1,4 @@
1/* $Id: nosrmmu.c,v 1.5 1999/11/19 04:11:54 davem Exp $ 1/*
2 * nosrmmu.c: This file is a bunch of dummies for sun4 compiles, 2 * nosrmmu.c: This file is a bunch of dummies for sun4 compiles,
3 * so that it does not need srmmu and avoid ifdefs. 3 * so that it does not need srmmu and avoid ifdefs.
4 * 4 *
diff --git a/arch/sparc/mm/nosun4c.c b/arch/sparc/mm/nosun4c.c
index ea2e2105341d..196263f895b7 100644
--- a/arch/sparc/mm/nosun4c.c
+++ b/arch/sparc/mm/nosun4c.c
@@ -1,4 +1,4 @@
1/* $Id: nosun4c.c,v 1.3 2000/02/14 04:52:36 jj Exp $ 1/*
2 * nosun4c.c: This file is a bunch of dummies for SMP compiles, 2 * nosun4c.c: This file is a bunch of dummies for SMP compiles,
3 * so that it does not need sun4c and avoid ifdefs. 3 * so that it does not need sun4c and avoid ifdefs.
4 * 4 *
diff --git a/arch/sparc/mm/swift.S b/arch/sparc/mm/swift.S
index 9f4cd396a0fa..c801c3953a00 100644
--- a/arch/sparc/mm/swift.S
+++ b/arch/sparc/mm/swift.S
@@ -1,4 +1,4 @@
1/* $Id: swift.S,v 1.9 2002/01/08 11:11:59 davem Exp $ 1/*
2 * swift.S: MicroSparc-II mmu/cache operations. 2 * swift.S: MicroSparc-II mmu/cache operations.
3 * 3 *
4 * Copyright (C) 1999 David S. Miller (davem@redhat.com) 4 * Copyright (C) 1999 David S. Miller (davem@redhat.com)
diff --git a/arch/sparc/mm/tsunami.S b/arch/sparc/mm/tsunami.S
index 4988e6a310bb..db0d6de33a87 100644
--- a/arch/sparc/mm/tsunami.S
+++ b/arch/sparc/mm/tsunami.S
@@ -1,4 +1,4 @@
1/* $Id: tsunami.S,v 1.7 2001/12/21 04:56:15 davem Exp $ 1/*
2 * tsunami.S: High speed MicroSparc-I mmu/cache operations. 2 * tsunami.S: High speed MicroSparc-I mmu/cache operations.
3 * 3 *
4 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc/mm/viking.S b/arch/sparc/mm/viking.S
index 754c622548a5..6dfcc13d3100 100644
--- a/arch/sparc/mm/viking.S
+++ b/arch/sparc/mm/viking.S
@@ -1,4 +1,4 @@
1/* $Id: viking.S,v 1.19 2001/12/21 04:56:15 davem Exp $ 1/*
2 * viking.S: High speed Viking cache/mmu operations 2 * viking.S: High speed Viking cache/mmu operations
3 * 3 *
4 * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) 4 * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be)
diff --git a/arch/sparc/prom/Makefile b/arch/sparc/prom/Makefile
index 2b217ee40703..7f5eacfcfbcf 100644
--- a/arch/sparc/prom/Makefile
+++ b/arch/sparc/prom/Makefile
@@ -1,4 +1,3 @@
1# $Id: Makefile,v 1.8 2000/12/15 00:41:22 davem Exp $
2# Makefile for the Sun Boot PROM interface library under 1# Makefile for the Sun Boot PROM interface library under
3# Linux. 2# Linux.
4# 3#
diff --git a/arch/sparc/prom/bootstr.c b/arch/sparc/prom/bootstr.c
index cfdeac2788d1..5a35c768ff7c 100644
--- a/arch/sparc/prom/bootstr.c
+++ b/arch/sparc/prom/bootstr.c
@@ -1,4 +1,4 @@
1/* $Id: bootstr.c,v 1.20 2000/02/08 20:24:23 davem Exp $ 1/*
2 * bootstr.c: Boot string/argument acquisition from the PROM. 2 * bootstr.c: Boot string/argument acquisition from the PROM.
3 * 3 *
4 * Copyright(C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright(C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc/prom/console.c b/arch/sparc/prom/console.c
index 2a007a784415..790057a34616 100644
--- a/arch/sparc/prom/console.c
+++ b/arch/sparc/prom/console.c
@@ -1,4 +1,4 @@
1/* $Id: console.c,v 1.25 2001/10/30 04:54:22 davem Exp $ 1/*
2 * console.c: Routines that deal with sending and receiving IO 2 * console.c: Routines that deal with sending and receiving IO
3 * to/from the current console device using the PROM. 3 * to/from the current console device using the PROM.
4 * 4 *
diff --git a/arch/sparc/prom/devmap.c b/arch/sparc/prom/devmap.c
index eb12073578ad..1e517915b0df 100644
--- a/arch/sparc/prom/devmap.c
+++ b/arch/sparc/prom/devmap.c
@@ -1,4 +1,4 @@
1/* $Id: devmap.c,v 1.7 2000/08/26 02:38:03 anton Exp $ 1/*
2 * promdevmap.c: Map device/IO areas to virtual addresses. 2 * promdevmap.c: Map device/IO areas to virtual addresses.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc/prom/devops.c b/arch/sparc/prom/devops.c
index 61919b54f6cc..9f1a95c91ad1 100644
--- a/arch/sparc/prom/devops.c
+++ b/arch/sparc/prom/devops.c
@@ -1,4 +1,4 @@
1/* $Id: devops.c,v 1.13 2000/08/26 02:38:03 anton Exp $ 1/*
2 * devops.c: Device operations using the PROM. 2 * devops.c: Device operations using the PROM.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc/prom/init.c b/arch/sparc/prom/init.c
index 2fa3a474e3a2..729f87066945 100644
--- a/arch/sparc/prom/init.c
+++ b/arch/sparc/prom/init.c
@@ -1,4 +1,4 @@
1/* $Id: init.c,v 1.14 2000/01/29 01:09:12 anton Exp $ 1/*
2 * init.c: Initialize internal variables used by the PROM 2 * init.c: Initialize internal variables used by the PROM
3 * library functions. 3 * library functions.
4 * 4 *
diff --git a/arch/sparc/prom/misc.c b/arch/sparc/prom/misc.c
index d9fb3af41c1f..49b5057b9601 100644
--- a/arch/sparc/prom/misc.c
+++ b/arch/sparc/prom/misc.c
@@ -1,4 +1,4 @@
1/* $Id: misc.c,v 1.18 2000/08/26 02:38:03 anton Exp $ 1/*
2 * misc.c: Miscellaneous prom functions that don't belong 2 * misc.c: Miscellaneous prom functions that don't belong
3 * anywhere else. 3 * anywhere else.
4 * 4 *
diff --git a/arch/sparc/prom/mp.c b/arch/sparc/prom/mp.c
index 92fe3739fdb8..4c4dc79f65af 100644
--- a/arch/sparc/prom/mp.c
+++ b/arch/sparc/prom/mp.c
@@ -1,4 +1,4 @@
1/* $Id: mp.c,v 1.12 2000/08/26 02:38:03 anton Exp $ 1/*
2 * mp.c: OpenBoot Prom Multiprocessor support routines. Don't call 2 * mp.c: OpenBoot Prom Multiprocessor support routines. Don't call
3 * these on a UP or else you will halt and catch fire. ;) 3 * these on a UP or else you will halt and catch fire. ;)
4 * 4 *
diff --git a/arch/sparc/prom/palloc.c b/arch/sparc/prom/palloc.c
index 84ce8bc54473..20be339cc2ce 100644
--- a/arch/sparc/prom/palloc.c
+++ b/arch/sparc/prom/palloc.c
@@ -1,4 +1,4 @@
1/* $Id: palloc.c,v 1.4 1996/04/25 06:09:48 davem Exp $ 1/*
2 * palloc.c: Memory allocation from the Sun PROM. 2 * palloc.c: Memory allocation from the Sun PROM.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc/prom/ranges.c b/arch/sparc/prom/ranges.c
index a2920323c900..f9b7def35f6e 100644
--- a/arch/sparc/prom/ranges.c
+++ b/arch/sparc/prom/ranges.c
@@ -1,4 +1,4 @@
1/* $Id: ranges.c,v 1.15 2001/12/19 00:29:51 davem Exp $ 1/*
2 * ranges.c: Handle ranges in newer proms for obio/sbus. 2 * ranges.c: Handle ranges in newer proms for obio/sbus.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc/prom/segment.c b/arch/sparc/prom/segment.c
index 09d6460165ab..04fd03a7f926 100644
--- a/arch/sparc/prom/segment.c
+++ b/arch/sparc/prom/segment.c
@@ -1,4 +1,4 @@
1/* $Id: segment.c,v 1.7 2000/08/26 02:38:03 anton Exp $ 1/*
2 * segment.c: Prom routine to map segments in other contexts before 2 * segment.c: Prom routine to map segments in other contexts before
3 * a standalone is completely mapped. This is for sun4 and 3 * a standalone is completely mapped. This is for sun4 and
4 * sun4c architectures only. 4 * sun4c architectures only.
diff --git a/arch/sparc/prom/tree.c b/arch/sparc/prom/tree.c
index 5ec246573a98..f228fe057b24 100644
--- a/arch/sparc/prom/tree.c
+++ b/arch/sparc/prom/tree.c
@@ -1,4 +1,4 @@
1/* $Id: tree.c,v 1.26 2000/08/26 02:38:03 anton Exp $ 1/*
2 * tree.c: Basic device tree traversal/scanning for the Linux 2 * tree.c: Basic device tree traversal/scanning for the Linux
3 * prom library. 3 * prom library.
4 * 4 *
diff --git a/arch/sparc64/Makefile b/arch/sparc64/Makefile
index 9cb75c852b45..4b8f2b084c21 100644
--- a/arch/sparc64/Makefile
+++ b/arch/sparc64/Makefile
@@ -1,4 +1,3 @@
1# $Id: Makefile,v 1.52 2002/02/09 19:49:31 davem Exp $
2# sparc64/Makefile 1# sparc64/Makefile
3# 2#
4# Makefile for the architecture dependent flags and dependencies on the 3# Makefile for the architecture dependent flags and dependencies on the
diff --git a/arch/sparc64/boot/Makefile b/arch/sparc64/boot/Makefile
index 6968a6da57da..0458b5244f09 100644
--- a/arch/sparc64/boot/Makefile
+++ b/arch/sparc64/boot/Makefile
@@ -1,4 +1,3 @@
1# $Id: Makefile,v 1.4 1997/12/15 20:08:56 ecd Exp $
2# Makefile for the Sparc64 boot stuff. 1# Makefile for the Sparc64 boot stuff.
3# 2#
4# Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 3# Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc64/boot/piggyback.c b/arch/sparc64/boot/piggyback.c
index 36f907408c60..de364bfed0bb 100644
--- a/arch/sparc64/boot/piggyback.c
+++ b/arch/sparc64/boot/piggyback.c
@@ -1,4 +1,4 @@
1/* $Id: piggyback.c,v 1.2 2000/09/19 14:34:39 anton Exp $ 1/*
2 Simple utility to make a single-image install kernel with initial ramdisk 2 Simple utility to make a single-image install kernel with initial ramdisk
3 for Sparc64 tftpbooting without need to set up nfs. 3 for Sparc64 tftpbooting without need to set up nfs.
4 4
diff --git a/arch/sparc64/kernel/dtlb_prot.S b/arch/sparc64/kernel/dtlb_prot.S
index e0a920162604..b2c2c5be281c 100644
--- a/arch/sparc64/kernel/dtlb_prot.S
+++ b/arch/sparc64/kernel/dtlb_prot.S
@@ -1,4 +1,4 @@
1/* $Id: dtlb_prot.S,v 1.22 2001/04/11 23:40:32 davem Exp $ 1/*
2 * dtlb_prot.S: DTLB protection trap strategy. 2 * dtlb_prot.S: DTLB protection trap strategy.
3 * This is included directly into the trap table. 3 * This is included directly into the trap table.
4 * 4 *
diff --git a/arch/sparc64/kernel/ebus.c b/arch/sparc64/kernel/ebus.c
index bc2632274840..c49d0388b793 100644
--- a/arch/sparc64/kernel/ebus.c
+++ b/arch/sparc64/kernel/ebus.c
@@ -1,4 +1,4 @@
1/* $Id: ebus.c,v 1.64 2001/11/08 04:41:33 davem Exp $ 1/*
2 * ebus.c: PCI to EBus bridge device. 2 * ebus.c: PCI to EBus bridge device.
3 * 3 *
4 * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) 4 * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be)
diff --git a/arch/sparc64/kernel/etrap.S b/arch/sparc64/kernel/etrap.S
index f25e1da3fd03..29ce489bc188 100644
--- a/arch/sparc64/kernel/etrap.S
+++ b/arch/sparc64/kernel/etrap.S
@@ -1,4 +1,4 @@
1/* $Id: etrap.S,v 1.46 2002/02/09 19:49:30 davem Exp $ 1/*
2 * etrap.S: Preparing for entry into the kernel on Sparc V9. 2 * etrap.S: Preparing for entry into the kernel on Sparc V9.
3 * 3 *
4 * Copyright (C) 1996, 1997 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1996, 1997 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc64/kernel/idprom.c b/arch/sparc64/kernel/idprom.c
index 3b6789e09a72..5b45a808c621 100644
--- a/arch/sparc64/kernel/idprom.c
+++ b/arch/sparc64/kernel/idprom.c
@@ -1,4 +1,4 @@
1/* $Id: idprom.c,v 1.3 1999/08/31 06:54:53 davem Exp $ 1/*
2 * idprom.c: Routines to load the idprom into kernel addresses and 2 * idprom.c: Routines to load the idprom into kernel addresses and
3 * interpret the data contained within. 3 * interpret the data contained within.
4 * 4 *
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c
index 4129c0449856..2084f81a76e1 100644
--- a/arch/sparc64/kernel/process.c
+++ b/arch/sparc64/kernel/process.c
@@ -1,6 +1,6 @@
1/* arch/sparc64/kernel/process.c 1/* arch/sparc64/kernel/process.c
2 * 2 *
3 * Copyright (C) 1995, 1996 David S. Miller (davem@caip.rutgers.edu) 3 * Copyright (C) 1995, 1996, 2008 David S. Miller (davem@davemloft.net)
4 * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be) 4 * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be)
5 * Copyright (C) 1997, 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 5 * Copyright (C) 1997, 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
6 */ 6 */
@@ -30,6 +30,7 @@
30#include <linux/init.h> 30#include <linux/init.h>
31#include <linux/cpu.h> 31#include <linux/cpu.h>
32#include <linux/elfcore.h> 32#include <linux/elfcore.h>
33#include <linux/sysrq.h>
33 34
34#include <asm/oplib.h> 35#include <asm/oplib.h>
35#include <asm/uaccess.h> 36#include <asm/uaccess.h>
@@ -49,6 +50,8 @@
49#include <asm/sstate.h> 50#include <asm/sstate.h>
50#include <asm/reboot.h> 51#include <asm/reboot.h>
51#include <asm/syscalls.h> 52#include <asm/syscalls.h>
53#include <asm/irq_regs.h>
54#include <asm/smp.h>
52 55
53/* #define VERBOSE_SHOWREGS */ 56/* #define VERBOSE_SHOWREGS */
54 57
@@ -298,6 +301,118 @@ void show_regs(struct pt_regs *regs)
298#endif 301#endif
299} 302}
300 303
304#ifdef CONFIG_MAGIC_SYSRQ
305struct global_reg_snapshot global_reg_snapshot[NR_CPUS];
306static DEFINE_SPINLOCK(global_reg_snapshot_lock);
307
308static void __global_reg_self(struct thread_info *tp, struct pt_regs *regs,
309 int this_cpu)
310{
311 flushw_all();
312
313 global_reg_snapshot[this_cpu].tstate = regs->tstate;
314 global_reg_snapshot[this_cpu].tpc = regs->tpc;
315 global_reg_snapshot[this_cpu].tnpc = regs->tnpc;
316 global_reg_snapshot[this_cpu].o7 = regs->u_regs[UREG_I7];
317
318 if (regs->tstate & TSTATE_PRIV) {
319 struct reg_window *rw;
320
321 rw = (struct reg_window *)
322 (regs->u_regs[UREG_FP] + STACK_BIAS);
323 global_reg_snapshot[this_cpu].i7 = rw->ins[6];
324 } else
325 global_reg_snapshot[this_cpu].i7 = 0;
326
327 global_reg_snapshot[this_cpu].thread = tp;
328}
329
330/* In order to avoid hangs we do not try to synchronize with the
331 * global register dump client cpus. The last store they make is to
332 * the thread pointer, so do a short poll waiting for that to become
333 * non-NULL.
334 */
335static void __global_reg_poll(struct global_reg_snapshot *gp)
336{
337 int limit = 0;
338
339 while (!gp->thread && ++limit < 100) {
340 barrier();
341 udelay(1);
342 }
343}
344
345static void sysrq_handle_globreg(int key, struct tty_struct *tty)
346{
347 struct thread_info *tp = current_thread_info();
348 struct pt_regs *regs = get_irq_regs();
349#ifdef CONFIG_KALLSYMS
350 char buffer[KSYM_SYMBOL_LEN];
351#endif
352 unsigned long flags;
353 int this_cpu, cpu;
354
355 if (!regs)
356 regs = tp->kregs;
357
358 spin_lock_irqsave(&global_reg_snapshot_lock, flags);
359
360 memset(global_reg_snapshot, 0, sizeof(global_reg_snapshot));
361
362 this_cpu = raw_smp_processor_id();
363
364 __global_reg_self(tp, regs, this_cpu);
365
366 smp_fetch_global_regs();
367
368 for_each_online_cpu(cpu) {
369 struct global_reg_snapshot *gp = &global_reg_snapshot[cpu];
370 struct thread_info *tp;
371
372 __global_reg_poll(gp);
373
374 tp = gp->thread;
375 printk("%c CPU[%3d]: TSTATE[%016lx] TPC[%016lx] TNPC[%016lx] TASK[%s:%d]\n",
376 (cpu == this_cpu ? '*' : ' '), cpu,
377 gp->tstate, gp->tpc, gp->tnpc,
378 ((tp && tp->task) ? tp->task->comm : "NULL"),
379 ((tp && tp->task) ? tp->task->pid : -1));
380#ifdef CONFIG_KALLSYMS
381 if (gp->tstate & TSTATE_PRIV) {
382 sprint_symbol(buffer, gp->tpc);
383 printk(" TPC[%s] ", buffer);
384 sprint_symbol(buffer, gp->o7);
385 printk("O7[%s] ", buffer);
386 sprint_symbol(buffer, gp->i7);
387 printk("I7[%s]\n", buffer);
388 } else
389#endif
390 {
391 printk(" TPC[%lx] O7[%lx] I7[%lx]\n",
392 gp->tpc, gp->o7, gp->i7);
393 }
394 }
395
396 memset(global_reg_snapshot, 0, sizeof(global_reg_snapshot));
397
398 spin_unlock_irqrestore(&global_reg_snapshot_lock, flags);
399}
400
401static struct sysrq_key_op sparc_globalreg_op = {
402 .handler = sysrq_handle_globreg,
403 .help_msg = "Globalregs",
404 .action_msg = "Show Global CPU Regs",
405};
406
407static int __init sparc_globreg_init(void)
408{
409 return register_sysrq_key('y', &sparc_globalreg_op);
410}
411
412core_initcall(sparc_globreg_init);
413
414#endif
415
301unsigned long thread_saved_pc(struct task_struct *tsk) 416unsigned long thread_saved_pc(struct task_struct *tsk)
302{ 417{
303 struct thread_info *ti = task_thread_info(tsk); 418 struct thread_info *ti = task_thread_info(tsk);
@@ -542,20 +657,39 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
542 struct task_struct *p, struct pt_regs *regs) 657 struct task_struct *p, struct pt_regs *regs)
543{ 658{
544 struct thread_info *t = task_thread_info(p); 659 struct thread_info *t = task_thread_info(p);
660 struct sparc_stackf *parent_sf;
661 unsigned long child_stack_sz;
545 char *child_trap_frame; 662 char *child_trap_frame;
663 int kernel_thread;
546 664
547 /* Calculate offset to stack_frame & pt_regs */ 665 kernel_thread = (regs->tstate & TSTATE_PRIV) ? 1 : 0;
548 child_trap_frame = task_stack_page(p) + (THREAD_SIZE - (TRACEREG_SZ+STACKFRAME_SZ)); 666 parent_sf = ((struct sparc_stackf *) regs) - 1;
549 memcpy(child_trap_frame, (((struct sparc_stackf *)regs)-1), (TRACEREG_SZ+STACKFRAME_SZ));
550 667
551 t->flags = (t->flags & ~((0xffUL << TI_FLAG_CWP_SHIFT) | (0xffUL << TI_FLAG_CURRENT_DS_SHIFT))) | 668 /* Calculate offset to stack_frame & pt_regs */
669 child_stack_sz = ((STACKFRAME_SZ + TRACEREG_SZ) +
670 (kernel_thread ? STACKFRAME_SZ : 0));
671 child_trap_frame = (task_stack_page(p) +
672 (THREAD_SIZE - child_stack_sz));
673 memcpy(child_trap_frame, parent_sf, child_stack_sz);
674
675 t->flags = (t->flags & ~((0xffUL << TI_FLAG_CWP_SHIFT) |
676 (0xffUL << TI_FLAG_CURRENT_DS_SHIFT))) |
552 (((regs->tstate + 1) & TSTATE_CWP) << TI_FLAG_CWP_SHIFT); 677 (((regs->tstate + 1) & TSTATE_CWP) << TI_FLAG_CWP_SHIFT);
553 t->new_child = 1; 678 t->new_child = 1;
554 t->ksp = ((unsigned long) child_trap_frame) - STACK_BIAS; 679 t->ksp = ((unsigned long) child_trap_frame) - STACK_BIAS;
555 t->kregs = (struct pt_regs *)(child_trap_frame+sizeof(struct sparc_stackf)); 680 t->kregs = (struct pt_regs *) (child_trap_frame +
681 sizeof(struct sparc_stackf));
556 t->fpsaved[0] = 0; 682 t->fpsaved[0] = 0;
557 683
558 if (regs->tstate & TSTATE_PRIV) { 684 if (kernel_thread) {
685 struct sparc_stackf *child_sf = (struct sparc_stackf *)
686 (child_trap_frame + (STACKFRAME_SZ + TRACEREG_SZ));
687
688 /* Zero terminate the stack backtrace. */
689 child_sf->fp = NULL;
690 t->kregs->u_regs[UREG_FP] =
691 ((unsigned long) child_sf) - STACK_BIAS;
692
559 /* Special case, if we are spawning a kernel thread from 693 /* Special case, if we are spawning a kernel thread from
560 * a userspace task (via KMOD, NFS, or similar) we must 694 * a userspace task (via KMOD, NFS, or similar) we must
561 * disable performance counters in the child because the 695 * disable performance counters in the child because the
@@ -566,12 +700,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
566 t->pcr_reg = 0; 700 t->pcr_reg = 0;
567 t->flags &= ~_TIF_PERFCTR; 701 t->flags &= ~_TIF_PERFCTR;
568 } 702 }
569 t->kregs->u_regs[UREG_FP] = t->ksp;
570 t->flags |= ((long)ASI_P << TI_FLAG_CURRENT_DS_SHIFT); 703 t->flags |= ((long)ASI_P << TI_FLAG_CURRENT_DS_SHIFT);
571 flush_register_windows();
572 memcpy((void *)(t->ksp + STACK_BIAS),
573 (void *)(regs->u_regs[UREG_FP] + STACK_BIAS),
574 sizeof(struct sparc_stackf));
575 t->kregs->u_regs[UREG_G6] = (unsigned long) t; 704 t->kregs->u_regs[UREG_G6] = (unsigned long) t;
576 t->kregs->u_regs[UREG_G4] = (unsigned long) t->task; 705 t->kregs->u_regs[UREG_G4] = (unsigned long) t->task;
577 } else { 706 } else {
diff --git a/arch/sparc64/kernel/rtrap.S b/arch/sparc64/kernel/rtrap.S
index 16689b2930db..c6fc695fe1fe 100644
--- a/arch/sparc64/kernel/rtrap.S
+++ b/arch/sparc64/kernel/rtrap.S
@@ -1,4 +1,4 @@
1/* $Id: rtrap.S,v 1.61 2002/02/09 19:49:31 davem Exp $ 1/*
2 * rtrap.S: Preparing for return from trap on Sparc V9. 2 * rtrap.S: Preparing for return from trap on Sparc V9.
3 * 3 *
4 * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 4 * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
@@ -363,6 +363,7 @@ kern_rtt: rdpr %canrestore, %g1
363 brz,pn %g1, kern_rtt_fill 363 brz,pn %g1, kern_rtt_fill
364 nop 364 nop
365kern_rtt_restore: 365kern_rtt_restore:
366 stw %g0, [%sp + PTREGS_OFF + PT_V9_MAGIC]
366 restore 367 restore
367 retry 368 retry
368 369
diff --git a/arch/sparc64/kernel/sbus.c b/arch/sparc64/kernel/sbus.c
index fa2827c4a3ad..e33a8a660e9e 100644
--- a/arch/sparc64/kernel/sbus.c
+++ b/arch/sparc64/kernel/sbus.c
@@ -1,4 +1,4 @@
1/* $Id: sbus.c,v 1.19 2002/01/23 11:27:32 davem Exp $ 1/*
2 * sbus.c: UltraSparc SBUS controller support. 2 * sbus.c: UltraSparc SBUS controller support.
3 * 3 *
4 * Copyright (C) 1999 David S. Miller (davem@redhat.com) 4 * Copyright (C) 1999 David S. Miller (davem@redhat.com)
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c
index da5e6ee0c661..c8b03a4f68bf 100644
--- a/arch/sparc64/kernel/setup.c
+++ b/arch/sparc64/kernel/setup.c
@@ -1,4 +1,4 @@
1/* $Id: setup.c,v 1.72 2002/02/09 19:49:30 davem Exp $ 1/*
2 * linux/arch/sparc64/kernel/setup.c 2 * linux/arch/sparc64/kernel/setup.c
3 * 3 *
4 * Copyright (C) 1995,1996 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995,1996 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc64/kernel/signal.c b/arch/sparc64/kernel/signal.c
index 6e4dc67d16af..9667e96fd513 100644
--- a/arch/sparc64/kernel/signal.c
+++ b/arch/sparc64/kernel/signal.c
@@ -1,4 +1,4 @@
1/* $Id: signal.c,v 1.60 2002/02/09 19:49:31 davem Exp $ 1/*
2 * arch/sparc64/kernel/signal.c 2 * arch/sparc64/kernel/signal.c
3 * 3 *
4 * Copyright (C) 1991, 1992 Linus Torvalds 4 * Copyright (C) 1991, 1992 Linus Torvalds
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index 0d6403a630ac..fa63c68a1819 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -900,6 +900,9 @@ extern unsigned long xcall_flush_tlb_mm;
900extern unsigned long xcall_flush_tlb_pending; 900extern unsigned long xcall_flush_tlb_pending;
901extern unsigned long xcall_flush_tlb_kernel_range; 901extern unsigned long xcall_flush_tlb_kernel_range;
902extern unsigned long xcall_report_regs; 902extern unsigned long xcall_report_regs;
903#ifdef CONFIG_MAGIC_SYSRQ
904extern unsigned long xcall_fetch_glob_regs;
905#endif
903extern unsigned long xcall_receive_signal; 906extern unsigned long xcall_receive_signal;
904extern unsigned long xcall_new_mmu_context_version; 907extern unsigned long xcall_new_mmu_context_version;
905#ifdef CONFIG_KGDB 908#ifdef CONFIG_KGDB
@@ -1080,6 +1083,13 @@ void smp_report_regs(void)
1080 smp_cross_call(&xcall_report_regs, 0, 0, 0); 1083 smp_cross_call(&xcall_report_regs, 0, 0, 0);
1081} 1084}
1082 1085
1086#ifdef CONFIG_MAGIC_SYSRQ
1087void smp_fetch_global_regs(void)
1088{
1089 smp_cross_call(&xcall_fetch_glob_regs, 0, 0, 0);
1090}
1091#endif
1092
1083/* We know that the window frames of the user have been flushed 1093/* We know that the window frames of the user have been flushed
1084 * to the stack before we get here because all callers of us 1094 * to the stack before we get here because all callers of us
1085 * are flush_tlb_*() routines, and these run after flush_cache_*() 1095 * are flush_tlb_*() routines, and these run after flush_cache_*()
diff --git a/arch/sparc64/kernel/stacktrace.c b/arch/sparc64/kernel/stacktrace.c
index 01b52f561af4..c73ce3f4197e 100644
--- a/arch/sparc64/kernel/stacktrace.c
+++ b/arch/sparc64/kernel/stacktrace.c
@@ -19,7 +19,7 @@ void save_stack_trace(struct stack_trace *trace)
19 fp = ksp + STACK_BIAS; 19 fp = ksp + STACK_BIAS;
20 thread_base = (unsigned long) tp; 20 thread_base = (unsigned long) tp;
21 do { 21 do {
22 struct reg_window *rw; 22 struct sparc_stackf *sf;
23 struct pt_regs *regs; 23 struct pt_regs *regs;
24 unsigned long pc; 24 unsigned long pc;
25 25
@@ -28,15 +28,17 @@ void save_stack_trace(struct stack_trace *trace)
28 fp >= (thread_base + THREAD_SIZE)) 28 fp >= (thread_base + THREAD_SIZE))
29 break; 29 break;
30 30
31 rw = (struct reg_window *) fp; 31 sf = (struct sparc_stackf *) fp;
32 regs = (struct pt_regs *) (rw + 1); 32 regs = (struct pt_regs *) (sf + 1);
33 33
34 if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC) { 34 if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC) {
35 if (!(regs->tstate & TSTATE_PRIV))
36 break;
35 pc = regs->tpc; 37 pc = regs->tpc;
36 fp = regs->u_regs[UREG_I6] + STACK_BIAS; 38 fp = regs->u_regs[UREG_I6] + STACK_BIAS;
37 } else { 39 } else {
38 pc = rw->ins[7]; 40 pc = sf->callers_pc;
39 fp = rw->ins[6] + STACK_BIAS; 41 fp = (unsigned long)sf->fp + STACK_BIAS;
40 } 42 }
41 43
42 if (trace->skip > 0) 44 if (trace->skip > 0)
diff --git a/arch/sparc64/kernel/starfire.c b/arch/sparc64/kernel/starfire.c
index b930fee7708a..7461581b3bb9 100644
--- a/arch/sparc64/kernel/starfire.c
+++ b/arch/sparc64/kernel/starfire.c
@@ -1,4 +1,4 @@
1/* $Id: starfire.c,v 1.10 2001/04/14 21:13:45 davem Exp $ 1/*
2 * starfire.c: Starfire/E10000 support. 2 * starfire.c: Starfire/E10000 support.
3 * 3 *
4 * Copyright (C) 1998 David S. Miller (davem@redhat.com) 4 * Copyright (C) 1998 David S. Miller (davem@redhat.com)
diff --git a/arch/sparc64/kernel/sys32.S b/arch/sparc64/kernel/sys32.S
index 010a737908ee..ade18ba0c686 100644
--- a/arch/sparc64/kernel/sys32.S
+++ b/arch/sparc64/kernel/sys32.S
@@ -1,4 +1,4 @@
1/* $Id: sys32.S,v 1.12 2000/03/24 04:17:37 davem Exp $ 1/*
2 * sys32.S: I-cache tricks for 32-bit compatibility layer simple 2 * sys32.S: I-cache tricks for 32-bit compatibility layer simple
3 * conversions. 3 * conversions.
4 * 4 *
diff --git a/arch/sparc64/kernel/trampoline.S b/arch/sparc64/kernel/trampoline.S
index 56ff55211341..704a3afcfd06 100644
--- a/arch/sparc64/kernel/trampoline.S
+++ b/arch/sparc64/kernel/trampoline.S
@@ -1,4 +1,4 @@
1/* $Id: trampoline.S,v 1.26 2002/02/09 19:49:30 davem Exp $ 1/*
2 * trampoline.S: Jump start slave processors on sparc64. 2 * trampoline.S: Jump start slave processors on sparc64.
3 * 3 *
4 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c
index d9b8d46707d1..369749262653 100644
--- a/arch/sparc64/kernel/traps.c
+++ b/arch/sparc64/kernel/traps.c
@@ -2116,7 +2116,7 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
2116 printk("\n"); 2116 printk("\n");
2117#endif 2117#endif
2118 do { 2118 do {
2119 struct reg_window *rw; 2119 struct sparc_stackf *sf;
2120 struct pt_regs *regs; 2120 struct pt_regs *regs;
2121 unsigned long pc; 2121 unsigned long pc;
2122 2122
@@ -2124,15 +2124,17 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
2124 if (fp < (thread_base + sizeof(struct thread_info)) || 2124 if (fp < (thread_base + sizeof(struct thread_info)) ||
2125 fp >= (thread_base + THREAD_SIZE)) 2125 fp >= (thread_base + THREAD_SIZE))
2126 break; 2126 break;
2127 rw = (struct reg_window *)fp; 2127 sf = (struct sparc_stackf *) fp;
2128 regs = (struct pt_regs *) (rw + 1); 2128 regs = (struct pt_regs *) (sf + 1);
2129 2129
2130 if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC) { 2130 if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC) {
2131 if (!(regs->tstate & TSTATE_PRIV))
2132 break;
2131 pc = regs->tpc; 2133 pc = regs->tpc;
2132 fp = regs->u_regs[UREG_I6] + STACK_BIAS; 2134 fp = regs->u_regs[UREG_I6] + STACK_BIAS;
2133 } else { 2135 } else {
2134 pc = rw->ins[7]; 2136 pc = sf->callers_pc;
2135 fp = rw->ins[6] + STACK_BIAS; 2137 fp = (unsigned long)sf->fp + STACK_BIAS;
2136 } 2138 }
2137 2139
2138 printk(" [%016lx] ", pc); 2140 printk(" [%016lx] ", pc);
diff --git a/arch/sparc64/kernel/unaligned.c b/arch/sparc64/kernel/unaligned.c
index 1a511e9f0d3e..afa7fc4f5193 100644
--- a/arch/sparc64/kernel/unaligned.c
+++ b/arch/sparc64/kernel/unaligned.c
@@ -1,4 +1,4 @@
1/* $Id: unaligned.c,v 1.24 2002/02/09 19:49:31 davem Exp $ 1/*
2 * unaligned.c: Unaligned load/store trap handling with special 2 * unaligned.c: Unaligned load/store trap handling with special
3 * cases for the kernel to do them more quickly. 3 * cases for the kernel to do them more quickly.
4 * 4 *
diff --git a/arch/sparc64/lib/PeeCeeI.c b/arch/sparc64/lib/PeeCeeI.c
index 3c6cfbb20360..8b313f11bc8d 100644
--- a/arch/sparc64/lib/PeeCeeI.c
+++ b/arch/sparc64/lib/PeeCeeI.c
@@ -1,4 +1,4 @@
1/* $Id: PeeCeeI.c,v 1.4 1999/09/06 01:17:35 davem Exp $ 1/*
2 * PeeCeeI.c: The emerging standard... 2 * PeeCeeI.c: The emerging standard...
3 * 3 *
4 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc64/lib/VISsave.S b/arch/sparc64/lib/VISsave.S
index a0ded5c5aa5c..b320ae9e2e2e 100644
--- a/arch/sparc64/lib/VISsave.S
+++ b/arch/sparc64/lib/VISsave.S
@@ -1,4 +1,4 @@
1/* $Id: VISsave.S,v 1.6 2002/02/09 19:49:30 davem Exp $ 1/*
2 * VISsave.S: Code for saving FPU register state for 2 * VISsave.S: Code for saving FPU register state for
3 * VIS routines. One should not call this directly, 3 * VIS routines. One should not call this directly,
4 * but use macros provided in <asm/visasm.h>. 4 * but use macros provided in <asm/visasm.h>.
diff --git a/arch/sparc64/lib/memcmp.S b/arch/sparc64/lib/memcmp.S
index c90ad96c51b9..d3fdaa898566 100644
--- a/arch/sparc64/lib/memcmp.S
+++ b/arch/sparc64/lib/memcmp.S
@@ -1,4 +1,4 @@
1/* $Id: memcmp.S,v 1.3 2000/03/23 07:51:08 davem Exp $ 1/*
2 * Sparc64 optimized memcmp code. 2 * Sparc64 optimized memcmp code.
3 * 3 *
4 * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 4 * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
diff --git a/arch/sparc64/lib/memscan.S b/arch/sparc64/lib/memscan.S
index 5e72d4911417..5686dfa5dc15 100644
--- a/arch/sparc64/lib/memscan.S
+++ b/arch/sparc64/lib/memscan.S
@@ -1,4 +1,4 @@
1/* $Id: memscan.S,v 1.3 2000/01/31 04:59:10 davem Exp $ 1/*
2 * memscan.S: Optimized memscan for Sparc64. 2 * memscan.S: Optimized memscan for Sparc64.
3 * 3 *
4 * Copyright (C) 1997,1998 Jakub Jelinek (jj@ultra.linux.cz) 4 * Copyright (C) 1997,1998 Jakub Jelinek (jj@ultra.linux.cz)
diff --git a/arch/sparc64/lib/strncmp.S b/arch/sparc64/lib/strncmp.S
index 6f14f53dbabe..980e83751556 100644
--- a/arch/sparc64/lib/strncmp.S
+++ b/arch/sparc64/lib/strncmp.S
@@ -1,4 +1,4 @@
1/* $Id: strncmp.S,v 1.2 1997/03/11 17:51:44 jj Exp $ 1/*
2 * Sparc64 optimized strncmp code. 2 * Sparc64 optimized strncmp code.
3 * 3 *
4 * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 4 * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
diff --git a/arch/sparc64/lib/strncpy_from_user.S b/arch/sparc64/lib/strncpy_from_user.S
index b2f499f79427..511c8f136f95 100644
--- a/arch/sparc64/lib/strncpy_from_user.S
+++ b/arch/sparc64/lib/strncpy_from_user.S
@@ -1,4 +1,4 @@
1/* $Id: strncpy_from_user.S,v 1.6 1999/05/25 16:53:05 jj Exp $ 1/*
2 * strncpy_from_user.S: Sparc64 strncpy from userspace. 2 * strncpy_from_user.S: Sparc64 strncpy from userspace.
3 * 3 *
4 * Copyright (C) 1997, 1999 Jakub Jelinek (jj@ultra.linux.cz) 4 * Copyright (C) 1997, 1999 Jakub Jelinek (jj@ultra.linux.cz)
diff --git a/arch/sparc64/math-emu/math.c b/arch/sparc64/math-emu/math.c
index 6ee496c2864a..add053e0f3b3 100644
--- a/arch/sparc64/math-emu/math.c
+++ b/arch/sparc64/math-emu/math.c
@@ -1,4 +1,4 @@
1/* $Id: math.c,v 1.11 1999/12/20 05:02:25 davem Exp $ 1/*
2 * arch/sparc64/math-emu/math.c 2 * arch/sparc64/math-emu/math.c
3 * 3 *
4 * Copyright (C) 1997,1999 Jakub Jelinek (jj@ultra.linux.cz) 4 * Copyright (C) 1997,1999 Jakub Jelinek (jj@ultra.linux.cz)
diff --git a/arch/sparc64/math-emu/sfp-util.h b/arch/sparc64/math-emu/sfp-util.h
index 31e474738cf6..425d3cf01af4 100644
--- a/arch/sparc64/math-emu/sfp-util.h
+++ b/arch/sparc64/math-emu/sfp-util.h
@@ -1,4 +1,4 @@
1/* $Id: sfp-util.h,v 1.5 2001/06/10 06:48:46 davem Exp $ 1/*
2 * arch/sparc64/math-emu/sfp-util.h 2 * arch/sparc64/math-emu/sfp-util.h
3 * 3 *
4 * Copyright (C) 1999 Jakub Jelinek (jj@ultra.linux.cz) 4 * Copyright (C) 1999 Jakub Jelinek (jj@ultra.linux.cz)
diff --git a/arch/sparc64/mm/Makefile b/arch/sparc64/mm/Makefile
index e415bf942bcd..68d04c0370f4 100644
--- a/arch/sparc64/mm/Makefile
+++ b/arch/sparc64/mm/Makefile
@@ -1,4 +1,3 @@
1# $Id: Makefile,v 1.8 2000/12/14 22:57:25 davem Exp $
2# Makefile for the linux Sparc64-specific parts of the memory manager. 1# Makefile for the linux Sparc64-specific parts of the memory manager.
3# 2#
4 3
diff --git a/arch/sparc64/mm/fault.c b/arch/sparc64/mm/fault.c
index 2650d0d33ac2..236f4d228d2b 100644
--- a/arch/sparc64/mm/fault.c
+++ b/arch/sparc64/mm/fault.c
@@ -1,4 +1,4 @@
1/* $Id: fault.c,v 1.59 2002/02/09 19:49:31 davem Exp $ 1/*
2 * arch/sparc64/mm/fault.c: Page fault handlers for the 64-bit Sparc. 2 * arch/sparc64/mm/fault.c: Page fault handlers for the 64-bit Sparc.
3 * 3 *
4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc64/mm/generic.c b/arch/sparc64/mm/generic.c
index af9d81db0b38..f362c2037013 100644
--- a/arch/sparc64/mm/generic.c
+++ b/arch/sparc64/mm/generic.c
@@ -1,4 +1,4 @@
1/* $Id: generic.c,v 1.18 2001/12/21 04:56:15 davem Exp $ 1/*
2 * generic.c: Generic Sparc mm routines that are not dependent upon 2 * generic.c: Generic Sparc mm routines that are not dependent upon
3 * MMU type but are Sparc specific. 3 * MMU type but are Sparc specific.
4 * 4 *
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index 3c7b9471eafb..84898c44dd4d 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -1,4 +1,4 @@
1/* $Id: init.c,v 1.209 2002/02/09 19:49:31 davem Exp $ 1/*
2 * arch/sparc64/mm/init.c 2 * arch/sparc64/mm/init.c
3 * 3 *
4 * Copyright (C) 1996-1999 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1996-1999 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc64/mm/ultra.S b/arch/sparc64/mm/ultra.S
index 796e005dad8b..9bb2d90a9df6 100644
--- a/arch/sparc64/mm/ultra.S
+++ b/arch/sparc64/mm/ultra.S
@@ -1,7 +1,7 @@
1/* $Id: ultra.S,v 1.72 2002/02/09 19:49:31 davem Exp $ 1/*
2 * ultra.S: Don't expand these all over the place... 2 * ultra.S: Don't expand these all over the place...
3 * 3 *
4 * Copyright (C) 1997, 2000 David S. Miller (davem@redhat.com) 4 * Copyright (C) 1997, 2000, 2008 David S. Miller (davem@davemloft.net)
5 */ 5 */
6 6
7#include <asm/asi.h> 7#include <asm/asi.h>
@@ -15,6 +15,7 @@
15#include <asm/thread_info.h> 15#include <asm/thread_info.h>
16#include <asm/cacheflush.h> 16#include <asm/cacheflush.h>
17#include <asm/hypervisor.h> 17#include <asm/hypervisor.h>
18#include <asm/cpudata.h>
18 19
19 /* Basically, most of the Spitfire vs. Cheetah madness 20 /* Basically, most of the Spitfire vs. Cheetah madness
20 * has to do with the fact that Cheetah does not support 21 * has to do with the fact that Cheetah does not support
@@ -514,6 +515,32 @@ xcall_report_regs:
514 b rtrap_xcall 515 b rtrap_xcall
515 ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 516 ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1
516 517
518#ifdef CONFIG_MAGIC_SYSRQ
519 .globl xcall_fetch_glob_regs
520xcall_fetch_glob_regs:
521 sethi %hi(global_reg_snapshot), %g1
522 or %g1, %lo(global_reg_snapshot), %g1
523 __GET_CPUID(%g2)
524 sllx %g2, 6, %g3
525 add %g1, %g3, %g1
526 rdpr %tstate, %g7
527 stx %g7, [%g1 + GR_SNAP_TSTATE]
528 rdpr %tpc, %g7
529 stx %g7, [%g1 + GR_SNAP_TPC]
530 rdpr %tnpc, %g7
531 stx %g7, [%g1 + GR_SNAP_TNPC]
532 stx %o7, [%g1 + GR_SNAP_O7]
533 stx %i7, [%g1 + GR_SNAP_I7]
534 sethi %hi(trap_block), %g7
535 or %g7, %lo(trap_block), %g7
536 sllx %g2, TRAP_BLOCK_SZ_SHIFT, %g2
537 add %g7, %g2, %g7
538 ldx [%g7 + TRAP_PER_CPU_THREAD], %g3
539 membar #StoreStore
540 stx %g3, [%g1 + GR_SNAP_THREAD]
541 retry
542#endif /* CONFIG_MAGIC_SYSRQ */
543
517#ifdef DCACHE_ALIASING_POSSIBLE 544#ifdef DCACHE_ALIASING_POSSIBLE
518 .align 32 545 .align 32
519 .globl xcall_flush_dcache_page_cheetah 546 .globl xcall_flush_dcache_page_cheetah
diff --git a/arch/sparc64/prom/Makefile b/arch/sparc64/prom/Makefile
index 3d33ed27bc27..8c94483ca54d 100644
--- a/arch/sparc64/prom/Makefile
+++ b/arch/sparc64/prom/Makefile
@@ -1,4 +1,3 @@
1# $Id: Makefile,v 1.7 2000/12/14 22:57:25 davem Exp $
2# Makefile for the Sun Boot PROM interface library under 1# Makefile for the Sun Boot PROM interface library under
3# Linux. 2# Linux.
4# 3#
diff --git a/arch/sparc64/prom/bootstr.c b/arch/sparc64/prom/bootstr.c
index a7278614e99d..ab9ccc63b388 100644
--- a/arch/sparc64/prom/bootstr.c
+++ b/arch/sparc64/prom/bootstr.c
@@ -1,4 +1,4 @@
1/* $Id: bootstr.c,v 1.6 1999/08/31 06:55:01 davem Exp $ 1/*
2 * bootstr.c: Boot string/argument acquisition from the PROM. 2 * bootstr.c: Boot string/argument acquisition from the PROM.
3 * 3 *
4 * Copyright(C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright(C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc64/prom/devops.c b/arch/sparc64/prom/devops.c
index 4641839eb39a..9dbd803e46e1 100644
--- a/arch/sparc64/prom/devops.c
+++ b/arch/sparc64/prom/devops.c
@@ -1,4 +1,4 @@
1/* $Id: devops.c,v 1.3 1997/10/29 07:43:28 ecd Exp $ 1/*
2 * devops.c: Device operations using the PROM. 2 * devops.c: Device operations using the PROM.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc64/prom/init.c b/arch/sparc64/prom/init.c
index 87e7c7ea0ee6..7b00f89490a4 100644
--- a/arch/sparc64/prom/init.c
+++ b/arch/sparc64/prom/init.c
@@ -1,4 +1,4 @@
1/* $Id: init.c,v 1.10 1999/09/21 14:35:59 davem Exp $ 1/*
2 * init.c: Initialize internal variables used by the PROM 2 * init.c: Initialize internal variables used by the PROM
3 * library functions. 3 * library functions.
4 * 4 *
diff --git a/arch/sparc64/prom/misc.c b/arch/sparc64/prom/misc.c
index 47a877a15abd..9b0c0760901e 100644
--- a/arch/sparc64/prom/misc.c
+++ b/arch/sparc64/prom/misc.c
@@ -1,4 +1,4 @@
1/* $Id: misc.c,v 1.20 2001/09/21 03:17:07 kanoj Exp $ 1/*
2 * misc.c: Miscellaneous prom functions that don't belong 2 * misc.c: Miscellaneous prom functions that don't belong
3 * anywhere else. 3 * anywhere else.
4 * 4 *
diff --git a/arch/sparc64/prom/p1275.c b/arch/sparc64/prom/p1275.c
index 7fcccc0e19cf..4b7c937bba61 100644
--- a/arch/sparc64/prom/p1275.c
+++ b/arch/sparc64/prom/p1275.c
@@ -1,4 +1,4 @@
1/* $Id: p1275.c,v 1.22 2001/10/18 09:40:00 davem Exp $ 1/*
2 * p1275.c: Sun IEEE 1275 PROM low level interface routines 2 * p1275.c: Sun IEEE 1275 PROM low level interface routines
3 * 3 *
4 * Copyright (C) 1996,1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 4 * Copyright (C) 1996,1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
diff --git a/arch/sparc64/prom/tree.c b/arch/sparc64/prom/tree.c
index a99ccd7fb1b0..281aea44790b 100644
--- a/arch/sparc64/prom/tree.c
+++ b/arch/sparc64/prom/tree.c
@@ -1,4 +1,4 @@
1/* $Id: tree.c,v 1.10 1998/01/10 22:39:00 ecd Exp $ 1/*
2 * tree.c: Basic device tree traversal/scanning for the Linux 2 * tree.c: Basic device tree traversal/scanning for the Linux
3 * prom library. 3 * prom library.
4 * 4 *
diff --git a/arch/um/Kconfig b/arch/um/Kconfig
index dba8e05f0287..6976812cfb18 100644
--- a/arch/um/Kconfig
+++ b/arch/um/Kconfig
@@ -259,6 +259,8 @@ if BROKEN
259 source "drivers/mtd/Kconfig" 259 source "drivers/mtd/Kconfig"
260endif 260endif
261 261
262source "drivers/leds/Kconfig"
263
262#This is just to shut up some Kconfig warnings, so no prompt. 264#This is just to shut up some Kconfig warnings, so no prompt.
263config INPUT 265config INPUT
264 bool 266 bool
diff --git a/arch/um/drivers/pcap_user.c b/arch/um/drivers/pcap_user.c
index e9809356c530..5f903587d69e 100644
--- a/arch/um/drivers/pcap_user.c
+++ b/arch/um/drivers/pcap_user.c
@@ -50,7 +50,7 @@ static int pcap_open(void *data)
50 return -EIO; 50 return -EIO;
51 } 51 }
52 52
53 pri->compiled = kmalloc(sizeof(struct bpf_program), 53 pri->compiled = uml_kmalloc(sizeof(struct bpf_program),
54 UM_GFP_KERNEL); 54 UM_GFP_KERNEL);
55 if (pri->compiled == NULL) { 55 if (pri->compiled == NULL) {
56 printk(UM_KERN_ERR "pcap_open : kmalloc failed\n"); 56 printk(UM_KERN_ERR "pcap_open : kmalloc failed\n");
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 44ad1607be2d..b58fb8941d8d 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -49,7 +49,6 @@
49#include "irq_user.h" 49#include "irq_user.h"
50#include "irq_kern.h" 50#include "irq_kern.h"
51#include "ubd_user.h" 51#include "ubd_user.h"
52#include "kern_util.h"
53#include "os.h" 52#include "os.h"
54#include "mem.h" 53#include "mem.h"
55#include "mem_kern.h" 54#include "mem_kern.h"
diff --git a/arch/um/include/os.h b/arch/um/include/os.h
index e2716ac8889a..db5be46e3e18 100644
--- a/arch/um/include/os.h
+++ b/arch/um/include/os.h
@@ -299,6 +299,6 @@ extern int os_arch_prctl(int pid, int code, unsigned long *addr);
299extern int get_pty(void); 299extern int get_pty(void);
300 300
301/* sys-$ARCH/task_size.c */ 301/* sys-$ARCH/task_size.c */
302extern unsigned long os_get_task_size(void); 302extern unsigned long os_get_top_address(void);
303 303
304#endif 304#endif
diff --git a/arch/um/kernel/ksyms.c b/arch/um/kernel/ksyms.c
index 66e2a305a8d6..ccc02a616c22 100644
--- a/arch/um/kernel/ksyms.c
+++ b/arch/um/kernel/ksyms.c
@@ -60,6 +60,11 @@ EXPORT_SYMBOL(os_rcv_fd);
60EXPORT_SYMBOL(run_helper); 60EXPORT_SYMBOL(run_helper);
61EXPORT_SYMBOL(start_thread); 61EXPORT_SYMBOL(start_thread);
62 62
63EXPORT_SYMBOL(add_sigio_fd);
64EXPORT_SYMBOL(ignore_sigio_fd);
65EXPORT_SYMBOL(deactivate_fd);
66EXPORT_SYMBOL(sigio_broken);
67
63#ifdef CONFIG_SMP 68#ifdef CONFIG_SMP
64 69
65/* required for SMP */ 70/* required for SMP */
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c
index 9db85b2ce698..8d84250324b3 100644
--- a/arch/um/kernel/um_arch.c
+++ b/arch/um/kernel/um_arch.c
@@ -274,7 +274,7 @@ int __init linux_main(int argc, char **argv)
274 if (have_root == 0) 274 if (have_root == 0)
275 add_arg(DEFAULT_COMMAND_LINE); 275 add_arg(DEFAULT_COMMAND_LINE);
276 276
277 host_task_size = os_get_task_size(); 277 host_task_size = os_get_top_address();
278 /* 278 /*
279 * TASK_SIZE needs to be PGDIR_SIZE aligned or else exit_mmap craps 279 * TASK_SIZE needs to be PGDIR_SIZE aligned or else exit_mmap craps
280 * out 280 * out
diff --git a/arch/um/os-Linux/helper.c b/arch/um/os-Linux/helper.c
index 74ca7aabf4e1..30860b89ec58 100644
--- a/arch/um/os-Linux/helper.c
+++ b/arch/um/os-Linux/helper.c
@@ -7,6 +7,7 @@
7#include <unistd.h> 7#include <unistd.h>
8#include <errno.h> 8#include <errno.h>
9#include <sched.h> 9#include <sched.h>
10#include <linux/limits.h>
10#include <sys/socket.h> 11#include <sys/socket.h>
11#include <sys/wait.h> 12#include <sys/wait.h>
12#include "kern_constants.h" 13#include "kern_constants.h"
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
index 6be028ca1817..172ad8f72e12 100644
--- a/arch/um/os-Linux/skas/process.c
+++ b/arch/um/os-Linux/skas/process.c
@@ -55,7 +55,7 @@ static int ptrace_dump_regs(int pid)
55 * Signals that are OK to receive in the stub - we'll just continue it. 55 * Signals that are OK to receive in the stub - we'll just continue it.
56 * SIGWINCH will happen when UML is inside a detached screen. 56 * SIGWINCH will happen when UML is inside a detached screen.
57 */ 57 */
58#define STUB_SIG_MASK (1 << SIGVTALRM) 58#define STUB_SIG_MASK ((1 << SIGVTALRM) | (1 << SIGWINCH))
59 59
60/* Signals that the stub will finish with - anything else is an error */ 60/* Signals that the stub will finish with - anything else is an error */
61#define STUB_DONE_MASK (1 << SIGTRAP) 61#define STUB_DONE_MASK (1 << SIGTRAP)
diff --git a/arch/um/os-Linux/start_up.c b/arch/um/os-Linux/start_up.c
index b4b36e0f2e89..183db26d01bf 100644
--- a/arch/um/os-Linux/start_up.c
+++ b/arch/um/os-Linux/start_up.c
@@ -121,8 +121,10 @@ static int stop_ptraced_child(int pid, int exitcode, int mustexit)
121{ 121{
122 int status, n, ret = 0; 122 int status, n, ret = 0;
123 123
124 if (ptrace(PTRACE_CONT, pid, 0, 0) < 0) 124 if (ptrace(PTRACE_CONT, pid, 0, 0) < 0) {
125 fatal_perror("stop_ptraced_child : ptrace failed"); 125 perror("stop_ptraced_child : ptrace failed");
126 return -1;
127 }
126 CATCH_EINTR(n = waitpid(pid, &status, 0)); 128 CATCH_EINTR(n = waitpid(pid, &status, 0));
127 if (!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) { 129 if (!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) {
128 int exit_with = WEXITSTATUS(status); 130 int exit_with = WEXITSTATUS(status);
@@ -212,7 +214,7 @@ static void __init check_sysemu(void)
212 if (n < 0) 214 if (n < 0)
213 fatal_perror("check_sysemu : wait failed"); 215 fatal_perror("check_sysemu : wait failed");
214 if (!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP)) 216 if (!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP))
215 fatal("check_sysemu : expected SIGTRAP, got status = %d", 217 fatal("check_sysemu : expected SIGTRAP, got status = %d\n",
216 status); 218 status);
217 219
218 if (ptrace(PTRACE_GETREGS, pid, 0, regs) < 0) 220 if (ptrace(PTRACE_GETREGS, pid, 0, regs) < 0)
@@ -254,9 +256,11 @@ static void __init check_sysemu(void)
254 256
255 if (WIFSTOPPED(status) && 257 if (WIFSTOPPED(status) &&
256 (WSTOPSIG(status) == (SIGTRAP|0x80))) { 258 (WSTOPSIG(status) == (SIGTRAP|0x80))) {
257 if (!count) 259 if (!count) {
258 fatal("check_ptrace : SYSEMU_SINGLESTEP " 260 non_fatal("check_ptrace : SYSEMU_SINGLESTEP "
259 "doesn't singlestep"); 261 "doesn't singlestep");
262 goto fail;
263 }
260 n = ptrace(PTRACE_POKEUSR, pid, PT_SYSCALL_RET_OFFSET, 264 n = ptrace(PTRACE_POKEUSR, pid, PT_SYSCALL_RET_OFFSET,
261 os_getpid()); 265 os_getpid());
262 if (n < 0) 266 if (n < 0)
@@ -266,9 +270,12 @@ static void __init check_sysemu(void)
266 } 270 }
267 else if (WIFSTOPPED(status) && (WSTOPSIG(status) == SIGTRAP)) 271 else if (WIFSTOPPED(status) && (WSTOPSIG(status) == SIGTRAP))
268 count++; 272 count++;
269 else 273 else {
270 fatal("check_ptrace : expected SIGTRAP or " 274 non_fatal("check_ptrace : expected SIGTRAP or "
271 "(SIGTRAP | 0x80), got status = %d", status); 275 "(SIGTRAP | 0x80), got status = %d\n",
276 status);
277 goto fail;
278 }
272 } 279 }
273 if (stop_ptraced_child(pid, 0, 0) < 0) 280 if (stop_ptraced_child(pid, 0, 0) < 0)
274 goto fail_stopped; 281 goto fail_stopped;
diff --git a/arch/um/os-Linux/sys-i386/registers.c b/arch/um/os-Linux/sys-i386/registers.c
index c6183e7aec3d..229f7a53d8da 100644
--- a/arch/um/os-Linux/sys-i386/registers.c
+++ b/arch/um/os-Linux/sys-i386/registers.c
@@ -5,7 +5,8 @@
5 */ 5 */
6 6
7#include <errno.h> 7#include <errno.h>
8#include <asm/user.h> 8#include <sys/ptrace.h>
9#include <sys/user.h>
9#include "kern_constants.h" 10#include "kern_constants.h"
10#include "longjmp.h" 11#include "longjmp.h"
11#include "user.h" 12#include "user.h"
@@ -75,7 +76,7 @@ int put_fp_registers(int pid, unsigned long *regs)
75 76
76void arch_init_registers(int pid) 77void arch_init_registers(int pid)
77{ 78{
78 struct user_fxsr_struct fpx_regs; 79 struct user_fpxregs_struct fpx_regs;
79 int err; 80 int err;
80 81
81 err = ptrace(PTRACE_GETFPXREGS, pid, 0, &fpx_regs); 82 err = ptrace(PTRACE_GETFPXREGS, pid, 0, &fpx_regs);
diff --git a/arch/um/os-Linux/sys-i386/task_size.c b/arch/um/os-Linux/sys-i386/task_size.c
index ccb49b0aff59..be04c1e183bf 100644
--- a/arch/um/os-Linux/sys-i386/task_size.c
+++ b/arch/um/os-Linux/sys-i386/task_size.c
@@ -63,7 +63,7 @@ static int page_ok(unsigned long page)
63 return ok; 63 return ok;
64} 64}
65 65
66unsigned long os_get_task_size(void) 66unsigned long os_get_top_address(void)
67{ 67{
68 struct sigaction sa, old; 68 struct sigaction sa, old;
69 unsigned long bottom = 0; 69 unsigned long bottom = 0;
@@ -76,9 +76,9 @@ unsigned long os_get_task_size(void)
76 * hosts, but shouldn't hurt otherwise. 76 * hosts, but shouldn't hurt otherwise.
77 */ 77 */
78 unsigned long top = 0xffffd000 >> UM_KERN_PAGE_SHIFT; 78 unsigned long top = 0xffffd000 >> UM_KERN_PAGE_SHIFT;
79 unsigned long test; 79 unsigned long test, original;
80 80
81 printf("Locating the top of the address space ... "); 81 printf("Locating the bottom of the address space ... ");
82 fflush(stdout); 82 fflush(stdout);
83 83
84 /* 84 /*
@@ -89,16 +89,31 @@ unsigned long os_get_task_size(void)
89 sigemptyset(&sa.sa_mask); 89 sigemptyset(&sa.sa_mask);
90 sa.sa_flags = SA_NODEFER; 90 sa.sa_flags = SA_NODEFER;
91 if (sigaction(SIGSEGV, &sa, &old)) { 91 if (sigaction(SIGSEGV, &sa, &old)) {
92 perror("os_get_task_size"); 92 perror("os_get_top_address");
93 exit(1); 93 exit(1);
94 } 94 }
95 95
96 if (!page_ok(bottom)) { 96 /* Manually scan the address space, bottom-up, until we find
97 fprintf(stderr, "Address 0x%x no good?\n", 97 * the first valid page (or run out of them).
98 bottom << UM_KERN_PAGE_SHIFT); 98 */
99 for (bottom = 0; bottom < top; bottom++) {
100 if (page_ok(bottom))
101 break;
102 }
103
104 /* If we've got this far, we ran out of pages. */
105 if (bottom == top) {
106 fprintf(stderr, "Unable to determine bottom of address "
107 "space.\n");
99 exit(1); 108 exit(1);
100 } 109 }
101 110
111 printf("0x%x\n", bottom << UM_KERN_PAGE_SHIFT);
112 printf("Locating the top of the address space ... ");
113 fflush(stdout);
114
115 original = bottom;
116
102 /* This could happen with a 4G/4G split */ 117 /* This could happen with a 4G/4G split */
103 if (page_ok(top)) 118 if (page_ok(top))
104 goto out; 119 goto out;
@@ -114,7 +129,7 @@ unsigned long os_get_task_size(void)
114out: 129out:
115 /* Restore the old SIGSEGV handling */ 130 /* Restore the old SIGSEGV handling */
116 if (sigaction(SIGSEGV, &old, NULL)) { 131 if (sigaction(SIGSEGV, &old, NULL)) {
117 perror("os_get_task_size"); 132 perror("os_get_top_address");
118 exit(1); 133 exit(1);
119 } 134 }
120 top <<= UM_KERN_PAGE_SHIFT; 135 top <<= UM_KERN_PAGE_SHIFT;
diff --git a/arch/um/os-Linux/sys-x86_64/task_size.c b/arch/um/os-Linux/sys-x86_64/task_size.c
index fad6f57f8ee3..26a0dd1f349c 100644
--- a/arch/um/os-Linux/sys-x86_64/task_size.c
+++ b/arch/um/os-Linux/sys-x86_64/task_size.c
@@ -1,4 +1,4 @@
1unsigned long os_get_task_size(unsigned long shift) 1unsigned long os_get_top_address(unsigned long shift)
2{ 2{
3 /* The old value of CONFIG_TOP_ADDR */ 3 /* The old value of CONFIG_TOP_ADDR */
4 return 0x7fc0000000; 4 return 0x7fc0000000;
diff --git a/arch/um/os-Linux/time.c b/arch/um/os-Linux/time.c
index bee98f466d66..dec5678fc17f 100644
--- a/arch/um/os-Linux/time.c
+++ b/arch/um/os-Linux/time.c
@@ -106,6 +106,10 @@ static void deliver_alarm(void)
106 unsigned long long this_tick = os_nsecs(); 106 unsigned long long this_tick = os_nsecs();
107 int one_tick = UM_NSEC_PER_SEC / UM_HZ; 107 int one_tick = UM_NSEC_PER_SEC / UM_HZ;
108 108
109 /* Protection against the host's time going backwards */
110 if ((last_tick != 0) && (this_tick < last_tick))
111 this_tick = last_tick;
112
109 if (last_tick == 0) 113 if (last_tick == 0)
110 last_tick = this_tick - one_tick; 114 last_tick = this_tick - one_tick;
111 115
@@ -148,6 +152,9 @@ static int after_sleep_interval(struct timespec *ts)
148 start_usecs = usec; 152 start_usecs = usec;
149 153
150 start_usecs -= skew / UM_NSEC_PER_USEC; 154 start_usecs -= skew / UM_NSEC_PER_USEC;
155 if (start_usecs < 0)
156 start_usecs = 0;
157
151 tv = ((struct timeval) { .tv_sec = start_usecs / UM_USEC_PER_SEC, 158 tv = ((struct timeval) { .tv_sec = start_usecs / UM_USEC_PER_SEC,
152 .tv_usec = start_usecs % UM_USEC_PER_SEC }); 159 .tv_usec = start_usecs % UM_USEC_PER_SEC });
153 interval = ((struct itimerval) { { 0, usec }, tv }); 160 interval = ((struct itimerval) { { 0, usec }, tv });
diff --git a/arch/um/sys-x86_64/ksyms.c b/arch/um/sys-x86_64/ksyms.c
index 4d7d1a812d8f..1db2fce00948 100644
--- a/arch/um/sys-x86_64/ksyms.c
+++ b/arch/um/sys-x86_64/ksyms.c
@@ -1,5 +1,11 @@
1#include "linux/module.h" 1#include <linux/module.h>
2#include "asm/string.h" 2#include <asm/string.h>
3#include <asm/checksum.h>
3 4
4/*XXX: we need them because they would be exported by x86_64 */ 5/*XXX: we need them because they would be exported by x86_64 */
6#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || __GNUC__ > 4
7EXPORT_SYMBOL(memcpy);
8#else
5EXPORT_SYMBOL(__memcpy); 9EXPORT_SYMBOL(__memcpy);
10#endif
11EXPORT_SYMBOL(csum_partial);
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index fe361ae7ef2f..5d2858119930 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -26,17 +26,10 @@ config X86
26 select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64) 26 select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64)
27 select HAVE_ARCH_KGDB if !X86_VOYAGER 27 select HAVE_ARCH_KGDB if !X86_VOYAGER
28 28
29config DEFCONFIG_LIST 29config ARCH_DEFCONFIG
30 string 30 string
31 depends on X86_32 31 default "arch/x86/configs/i386_defconfig" if X86_32
32 option defconfig_list 32 default "arch/x86/configs/x86_64_defconfig" if X86_64
33 default "arch/x86/configs/i386_defconfig"
34
35config DEFCONFIG_LIST
36 string
37 depends on X86_64
38 option defconfig_list
39 default "arch/x86/configs/x86_64_defconfig"
40 33
41 34
42config GENERIC_LOCKBREAK 35config GENERIC_LOCKBREAK
@@ -258,7 +251,7 @@ config X86_ELAN
258 251
259config X86_VOYAGER 252config X86_VOYAGER
260 bool "Voyager (NCR)" 253 bool "Voyager (NCR)"
261 depends on X86_32 && (SMP || BROKEN) 254 depends on X86_32 && (SMP || BROKEN) && !PCI
262 help 255 help
263 Voyager is an MCA-based 32-way capable SMP architecture proprietary 256 Voyager is an MCA-based 32-way capable SMP architecture proprietary
264 to NCR Corp. Machine classes 345x/35xx/4100/51xx are Voyager-based. 257 to NCR Corp. Machine classes 345x/35xx/4100/51xx are Voyager-based.
@@ -270,7 +263,7 @@ config X86_VOYAGER
270 263
271config X86_NUMAQ 264config X86_NUMAQ
272 bool "NUMAQ (IBM/Sequent)" 265 bool "NUMAQ (IBM/Sequent)"
273 depends on SMP && X86_32 266 depends on SMP && X86_32 && PCI
274 select NUMA 267 select NUMA
275 help 268 help
276 This option is used for getting Linux to run on a (IBM/Sequent) NUMA 269 This option is used for getting Linux to run on a (IBM/Sequent) NUMA
@@ -300,7 +293,7 @@ config X86_BIGSMP
300 293
301config X86_VISWS 294config X86_VISWS
302 bool "SGI 320/540 (Visual Workstation)" 295 bool "SGI 320/540 (Visual Workstation)"
303 depends on X86_32 296 depends on X86_32 && !PCI
304 help 297 help
305 The SGI Visual Workstation series is an IA32-based workstation 298 The SGI Visual Workstation series is an IA32-based workstation
306 based on SGI systems chips with some legacy PC hardware attached. 299 based on SGI systems chips with some legacy PC hardware attached.
@@ -344,7 +337,7 @@ config X86_RDC321X
344config X86_VSMP 337config X86_VSMP
345 bool "Support for ScaleMP vSMP" 338 bool "Support for ScaleMP vSMP"
346 select PARAVIRT 339 select PARAVIRT
347 depends on X86_64 340 depends on X86_64 && !PCI
348 help 341 help
349 Support for ScaleMP vSMP systems. Say 'Y' here if this kernel is 342 Support for ScaleMP vSMP systems. Say 'Y' here if this kernel is
350 supposed to run on these EM64T-based machines. Only choose this option 343 supposed to run on these EM64T-based machines. Only choose this option
@@ -390,6 +383,7 @@ config VMI
390config KVM_CLOCK 383config KVM_CLOCK
391 bool "KVM paravirtualized clock" 384 bool "KVM paravirtualized clock"
392 select PARAVIRT 385 select PARAVIRT
386 select PARAVIRT_CLOCK
393 depends on !(X86_VISWS || X86_VOYAGER) 387 depends on !(X86_VISWS || X86_VOYAGER)
394 help 388 help
395 Turning on this option will allow you to run a paravirtualized clock 389 Turning on this option will allow you to run a paravirtualized clock
@@ -417,37 +411,25 @@ config PARAVIRT
417 over full virtualization. However, when run without a hypervisor 411 over full virtualization. However, when run without a hypervisor
418 the kernel is theoretically slower and slightly larger. 412 the kernel is theoretically slower and slightly larger.
419 413
414config PARAVIRT_CLOCK
415 bool
416 default n
417
420endif 418endif
421 419
422config MEMTEST_BOOTPARAM 420config MEMTEST
423 bool "Memtest boot parameter" 421 bool "Memtest"
424 depends on X86_64 422 depends on X86_64
425 default y 423 default y
426 help 424 help
427 This option adds a kernel parameter 'memtest', which allows memtest 425 This option adds a kernel parameter 'memtest', which allows memtest
428 to be disabled at boot. If this option is selected, memtest 426 to be set.
429 functionality can be disabled with memtest=0 on the kernel 427 memtest=0, mean disabled; -- default
430 command line. The purpose of this option is to allow a single 428 memtest=1, mean do 1 test pattern;
431 kernel image to be distributed with memtest built in, but not 429 ...
432 necessarily enabled. 430 memtest=4, mean do 4 test patterns.
433
434 If you are unsure how to answer this question, answer Y. 431 If you are unsure how to answer this question, answer Y.
435 432
436config MEMTEST_BOOTPARAM_VALUE
437 int "Memtest boot parameter default value (0-4)"
438 depends on MEMTEST_BOOTPARAM
439 range 0 4
440 default 0
441 help
442 This option sets the default value for the kernel parameter
443 'memtest', which allows memtest to be disabled at boot. If this
444 option is set to 0 (zero), the memtest kernel parameter will
445 default to 0, disabling memtest at bootup. If this option is
446 set to 4, the memtest kernel parameter will default to 4,
447 enabling memtest at bootup, and use that as pattern number.
448
449 If you are unsure how to answer this question, answer 0.
450
451config ACPI_SRAT 433config ACPI_SRAT
452 def_bool y 434 def_bool y
453 depends on X86_32 && ACPI && NUMA && (X86_SUMMIT || X86_GENERICARCH) 435 depends on X86_32 && ACPI && NUMA && (X86_SUMMIT || X86_GENERICARCH)
@@ -565,18 +547,18 @@ config IOMMU_HELPER
565 def_bool (CALGARY_IOMMU || GART_IOMMU || SWIOTLB) 547 def_bool (CALGARY_IOMMU || GART_IOMMU || SWIOTLB)
566 548
567config NR_CPUS 549config NR_CPUS
568 int "Maximum number of CPUs (2-255)" 550 int "Maximum number of CPUs (2-4096)"
569 range 2 255 551 range 2 4096
570 depends on SMP 552 depends on SMP
571 default "32" if X86_NUMAQ || X86_SUMMIT || X86_BIGSMP || X86_ES7000 553 default "32" if X86_NUMAQ || X86_SUMMIT || X86_BIGSMP || X86_ES7000
572 default "8" 554 default "8"
573 help 555 help
574 This allows you to specify the maximum number of CPUs which this 556 This allows you to specify the maximum number of CPUs which this
575 kernel will support. The maximum supported value is 255 and the 557 kernel will support. The maximum supported value is 4096 and the
576 minimum value which makes sense is 2. 558 minimum value which makes sense is 2.
577 559
578 This is purely to save memory - each supported CPU adds 560 This is purely to save memory - each supported CPU adds
579 approximately eight kilobytes to the kernel image. 561 approximately one kilobyte to the kernel image.
580 562
581config SCHED_SMT 563config SCHED_SMT
582 bool "SMT (Hyperthreading) scheduler support" 564 bool "SMT (Hyperthreading) scheduler support"
@@ -968,8 +950,8 @@ config NUMA_EMU
968 number of nodes. This is only useful for debugging. 950 number of nodes. This is only useful for debugging.
969 951
970config NODES_SHIFT 952config NODES_SHIFT
971 int "Max num nodes shift(1-15)" 953 int "Max num nodes shift(1-9)"
972 range 1 15 if X86_64 954 range 1 9 if X86_64
973 default "6" if X86_64 955 default "6" if X86_64
974 default "4" if X86_NUMAQ 956 default "4" if X86_NUMAQ
975 default "3" 957 default "3"
@@ -1477,8 +1459,7 @@ endmenu
1477menu "Bus options (PCI etc.)" 1459menu "Bus options (PCI etc.)"
1478 1460
1479config PCI 1461config PCI
1480 bool "PCI support" if !X86_VISWS && !X86_VSMP 1462 bool "PCI support"
1481 depends on !X86_VOYAGER
1482 default y 1463 default y
1483 select ARCH_SUPPORTS_MSI if (X86_LOCAL_APIC && X86_IO_APIC) 1464 select ARCH_SUPPORTS_MSI if (X86_LOCAL_APIC && X86_IO_APIC)
1484 help 1465 help
@@ -1515,13 +1496,13 @@ config PCI_GOMMCONFIG
1515config PCI_GODIRECT 1496config PCI_GODIRECT
1516 bool "Direct" 1497 bool "Direct"
1517 1498
1518config PCI_GOANY
1519 bool "Any"
1520
1521config PCI_GOOLPC 1499config PCI_GOOLPC
1522 bool "OLPC" 1500 bool "OLPC"
1523 depends on OLPC 1501 depends on OLPC
1524 1502
1503config PCI_GOANY
1504 bool "Any"
1505
1525endchoice 1506endchoice
1526 1507
1527config PCI_BIOS 1508config PCI_BIOS
@@ -1538,9 +1519,8 @@ config PCI_MMCONFIG
1538 depends on X86_32 && PCI && ACPI && (PCI_GOMMCONFIG || PCI_GOANY) 1519 depends on X86_32 && PCI && ACPI && (PCI_GOMMCONFIG || PCI_GOANY)
1539 1520
1540config PCI_OLPC 1521config PCI_OLPC
1541 bool 1522 def_bool y
1542 depends on PCI && PCI_GOOLPC 1523 depends on PCI && OLPC && (PCI_GOOLPC || PCI_GOANY)
1543 default y
1544 1524
1545config PCI_DOMAINS 1525config PCI_DOMAINS
1546 def_bool y 1526 def_bool y
diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
index 2ad6301849a1..3d22bb8175b4 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -399,6 +399,10 @@ config X86_TSC
399 def_bool y 399 def_bool y
400 depends on ((MWINCHIP3D || MWINCHIP2 || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MCORE2) && !X86_NUMAQ) || X86_64 400 depends on ((MWINCHIP3D || MWINCHIP2 || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MCORE2) && !X86_NUMAQ) || X86_64
401 401
402config X86_CMPXCHG64
403 def_bool y
404 depends on X86_PAE || X86_64
405
402# this should be set for all -march=.. options where the compiler 406# this should be set for all -march=.. options where the compiler
403# generates cmov. 407# generates cmov.
404config X86_CMOV 408config X86_CMOV
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
index ac1e31ba4795..18363374d51a 100644
--- a/arch/x86/Kconfig.debug
+++ b/arch/x86/Kconfig.debug
@@ -6,15 +6,19 @@ config TRACE_IRQFLAGS_SUPPORT
6source "lib/Kconfig.debug" 6source "lib/Kconfig.debug"
7 7
8config NONPROMISC_DEVMEM 8config NONPROMISC_DEVMEM
9 bool "Disable promiscuous /dev/mem" 9 bool "Filter access to /dev/mem"
10 help 10 help
11 The /dev/mem file by default only allows userspace access to PCI 11 If this option is left off, you allow userspace access to all
12 space and the BIOS code and data regions. This is sufficient for 12 of memory, including kernel and userspace memory. Accidental
13 dosemu and X and all common users of /dev/mem. With this config 13 access to this is obviously disastrous, but specific access can
14 option, you allow userspace access to all of memory, including 14 be used by people debugging the kernel.
15 kernel and userspace memory. Accidental access to this is 15
16 obviously disasterous, but specific access can be used by people 16 If this option is switched on, the /dev/mem file only allows
17 debugging the kernel. 17 userspace access to PCI space and the BIOS code and data regions.
18 This is sufficient for dosemu and X and all common users of
19 /dev/mem.
20
21 If in doubt, say Y.
18 22
19config EARLY_PRINTK 23config EARLY_PRINTK
20 bool "Early printk" if EMBEDDED 24 bool "Early printk" if EMBEDDED
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 3cff3c894cf3..5df0d1e330b1 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -210,12 +210,12 @@ all: bzImage
210 210
211# KBUILD_IMAGE specify target image being built 211# KBUILD_IMAGE specify target image being built
212 KBUILD_IMAGE := $(boot)/bzImage 212 KBUILD_IMAGE := $(boot)/bzImage
213zImage zlilo zdisk: KBUILD_IMAGE := arch/x86/boot/zImage 213zImage zlilo zdisk: KBUILD_IMAGE := $(boot)/zImage
214 214
215zImage bzImage: vmlinux 215zImage bzImage: vmlinux
216 $(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE) 216 $(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE)
217 $(Q)mkdir -p $(objtree)/arch/$(UTS_MACHINE)/boot 217 $(Q)mkdir -p $(objtree)/arch/$(UTS_MACHINE)/boot
218 $(Q)ln -fsn ../../x86/boot/bzImage $(objtree)/arch/$(UTS_MACHINE)/boot/bzImage 218 $(Q)ln -fsn ../../x86/boot/bzImage $(objtree)/arch/$(UTS_MACHINE)/boot/$@
219 219
220compressed: zImage 220compressed: zImage
221 221
diff --git a/arch/x86/boot/a20.c b/arch/x86/boot/a20.c
index 90943f83e84d..e01aafd03bde 100644
--- a/arch/x86/boot/a20.c
+++ b/arch/x86/boot/a20.c
@@ -115,8 +115,6 @@ static void enable_a20_fast(void)
115 115
116int enable_a20(void) 116int enable_a20(void)
117{ 117{
118 int loops = A20_ENABLE_LOOPS;
119
120#if defined(CONFIG_X86_ELAN) 118#if defined(CONFIG_X86_ELAN)
121 /* Elan croaks if we try to touch the KBC */ 119 /* Elan croaks if we try to touch the KBC */
122 enable_a20_fast(); 120 enable_a20_fast();
@@ -128,6 +126,7 @@ int enable_a20(void)
128 enable_a20_kbc(); 126 enable_a20_kbc();
129 return 0; 127 return 0;
130#else 128#else
129 int loops = A20_ENABLE_LOOPS;
131 while (loops--) { 130 while (loops--) {
132 /* First, check to see if A20 is already enabled 131 /* First, check to see if A20 is already enabled
133 (legacy free, etc.) */ 132 (legacy free, etc.) */
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index d8819efac81d..1d5dff4123e1 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -30,6 +30,7 @@
30#include <asm/page.h> 30#include <asm/page.h>
31#include <asm/boot.h> 31#include <asm/boot.h>
32#include <asm/msr.h> 32#include <asm/msr.h>
33#include <asm/processor-flags.h>
33#include <asm/asm-offsets.h> 34#include <asm/asm-offsets.h>
34 35
35.section ".text.head" 36.section ".text.head"
@@ -109,7 +110,7 @@ startup_32:
109 110
110 /* Enable PAE mode */ 111 /* Enable PAE mode */
111 xorl %eax, %eax 112 xorl %eax, %eax
112 orl $(1 << 5), %eax 113 orl $(X86_CR4_PAE), %eax
113 movl %eax, %cr4 114 movl %eax, %cr4
114 115
115 /* 116 /*
@@ -170,7 +171,7 @@ startup_32:
170 pushl %eax 171 pushl %eax
171 172
172 /* Enter paged protected Mode, activating Long Mode */ 173 /* Enter paged protected Mode, activating Long Mode */
173 movl $0x80000001, %eax /* Enable Paging and Protected mode */ 174 movl $(X86_CR0_PG | X86_CR0_PE), %eax /* Enable Paging and Protected mode */
174 movl %eax, %cr0 175 movl %eax, %cr0
175 176
176 /* Jump from 32bit compatibility mode into 64bit mode. */ 177 /* Jump from 32bit compatibility mode into 64bit mode. */
diff --git a/arch/x86/boot/printf.c b/arch/x86/boot/printf.c
index c1d00c0274c4..50e47cdbdddd 100644
--- a/arch/x86/boot/printf.c
+++ b/arch/x86/boot/printf.c
@@ -56,7 +56,7 @@ static char *number(char *str, long num, int base, int size, int precision,
56 if (type & LEFT) 56 if (type & LEFT)
57 type &= ~ZEROPAD; 57 type &= ~ZEROPAD;
58 if (base < 2 || base > 36) 58 if (base < 2 || base > 36)
59 return 0; 59 return NULL;
60 c = (type & ZEROPAD) ? '0' : ' '; 60 c = (type & ZEROPAD) ? '0' : ' ';
61 sign = 0; 61 sign = 0;
62 if (type & SIGN) { 62 if (type & SIGN) {
diff --git a/arch/x86/boot/video-vga.c b/arch/x86/boot/video-vga.c
index 40ecb8d7688c..b939cb476dec 100644
--- a/arch/x86/boot/video-vga.c
+++ b/arch/x86/boot/video-vga.c
@@ -259,8 +259,7 @@ static int vga_probe(void)
259 return mode_count[adapter]; 259 return mode_count[adapter];
260} 260}
261 261
262__videocard video_vga = 262__videocard video_vga = {
263{
264 .card_name = "VGA", 263 .card_name = "VGA",
265 .probe = vga_probe, 264 .probe = vga_probe,
266 .set_mode = vga_set_mode, 265 .set_mode = vga_set_mode,
diff --git a/arch/x86/configs/i386_defconfig b/arch/x86/configs/i386_defconfig
index ad7ddaaff588..9bc34e2033ec 100644
--- a/arch/x86/configs/i386_defconfig
+++ b/arch/x86/configs/i386_defconfig
@@ -1,54 +1,103 @@
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-git14 3# Linux kernel version: 2.6.26-rc1
4# Fri Jul 20 09:53:15 2007 4# Sun May 4 19:59:02 2008
5# 5#
6# CONFIG_64BIT is not set
6CONFIG_X86_32=y 7CONFIG_X86_32=y
8# CONFIG_X86_64 is not set
9CONFIG_X86=y
10CONFIG_DEFCONFIG_LIST="arch/x86/configs/i386_defconfig"
11# CONFIG_GENERIC_LOCKBREAK is not set
7CONFIG_GENERIC_TIME=y 12CONFIG_GENERIC_TIME=y
13CONFIG_GENERIC_CMOS_UPDATE=y
8CONFIG_CLOCKSOURCE_WATCHDOG=y 14CONFIG_CLOCKSOURCE_WATCHDOG=y
9CONFIG_GENERIC_CLOCKEVENTS=y 15CONFIG_GENERIC_CLOCKEVENTS=y
10CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y 16CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
11CONFIG_LOCKDEP_SUPPORT=y 17CONFIG_LOCKDEP_SUPPORT=y
12CONFIG_STACKTRACE_SUPPORT=y 18CONFIG_STACKTRACE_SUPPORT=y
13CONFIG_SEMAPHORE_SLEEPERS=y 19CONFIG_HAVE_LATENCYTOP_SUPPORT=y
14CONFIG_X86=y 20CONFIG_FAST_CMPXCHG_LOCAL=y
15CONFIG_MMU=y 21CONFIG_MMU=y
16CONFIG_ZONE_DMA=y 22CONFIG_ZONE_DMA=y
17CONFIG_QUICKLIST=y
18CONFIG_GENERIC_ISA_DMA=y 23CONFIG_GENERIC_ISA_DMA=y
19CONFIG_GENERIC_IOMAP=y 24CONFIG_GENERIC_IOMAP=y
20CONFIG_GENERIC_BUG=y 25CONFIG_GENERIC_BUG=y
21CONFIG_GENERIC_HWEIGHT=y 26CONFIG_GENERIC_HWEIGHT=y
27# CONFIG_GENERIC_GPIO is not set
22CONFIG_ARCH_MAY_HAVE_PC_FDC=y 28CONFIG_ARCH_MAY_HAVE_PC_FDC=y
23CONFIG_DMI=y 29# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
24CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 30CONFIG_RWSEM_XCHGADD_ALGORITHM=y
31# CONFIG_ARCH_HAS_ILOG2_U32 is not set
32# CONFIG_ARCH_HAS_ILOG2_U64 is not set
33CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
34CONFIG_GENERIC_CALIBRATE_DELAY=y
35# CONFIG_GENERIC_TIME_VSYSCALL is not set
36CONFIG_ARCH_HAS_CPU_RELAX=y
37CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
38CONFIG_HAVE_SETUP_PER_CPU_AREA=y
39# CONFIG_HAVE_CPUMASK_OF_CPU_MAP is not set
40CONFIG_ARCH_HIBERNATION_POSSIBLE=y
41CONFIG_ARCH_SUSPEND_POSSIBLE=y
42# CONFIG_ZONE_DMA32 is not set
43CONFIG_ARCH_POPULATES_NODE_MAP=y
44# CONFIG_AUDIT_ARCH is not set
45CONFIG_ARCH_SUPPORTS_AOUT=y
46CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
47CONFIG_GENERIC_HARDIRQS=y
48CONFIG_GENERIC_IRQ_PROBE=y
49CONFIG_GENERIC_PENDING_IRQ=y
50CONFIG_X86_SMP=y
51CONFIG_X86_32_SMP=y
52CONFIG_X86_HT=y
53CONFIG_X86_BIOS_REBOOT=y
54CONFIG_X86_TRAMPOLINE=y
55CONFIG_KTIME_SCALAR=y
25 56
26# 57#
27# Code maturity level options 58# General setup
28# 59#
29CONFIG_EXPERIMENTAL=y 60CONFIG_EXPERIMENTAL=y
30CONFIG_LOCK_KERNEL=y 61CONFIG_LOCK_KERNEL=y
31CONFIG_INIT_ENV_ARG_LIMIT=32 62CONFIG_INIT_ENV_ARG_LIMIT=32
32
33#
34# General setup
35#
36CONFIG_LOCALVERSION="" 63CONFIG_LOCALVERSION=""
37CONFIG_LOCALVERSION_AUTO=y 64# CONFIG_LOCALVERSION_AUTO is not set
38CONFIG_SWAP=y 65CONFIG_SWAP=y
39CONFIG_SYSVIPC=y 66CONFIG_SYSVIPC=y
40CONFIG_SYSVIPC_SYSCTL=y 67CONFIG_SYSVIPC_SYSCTL=y
41CONFIG_POSIX_MQUEUE=y 68CONFIG_POSIX_MQUEUE=y
42# CONFIG_BSD_PROCESS_ACCT is not set 69CONFIG_BSD_PROCESS_ACCT=y
43# CONFIG_TASKSTATS is not set 70# CONFIG_BSD_PROCESS_ACCT_V3 is not set
44# CONFIG_USER_NS is not set 71CONFIG_TASKSTATS=y
45# CONFIG_AUDIT is not set 72CONFIG_TASK_DELAY_ACCT=y
46CONFIG_IKCONFIG=y 73CONFIG_TASK_XACCT=y
47CONFIG_IKCONFIG_PROC=y 74CONFIG_TASK_IO_ACCOUNTING=y
48CONFIG_LOG_BUF_SHIFT=18 75CONFIG_AUDIT=y
49# CONFIG_CPUSETS is not set 76CONFIG_AUDITSYSCALL=y
50CONFIG_SYSFS_DEPRECATED=y 77CONFIG_AUDIT_TREE=y
78# CONFIG_IKCONFIG is not set
79CONFIG_LOG_BUF_SHIFT=17
80CONFIG_CGROUPS=y
81# CONFIG_CGROUP_DEBUG is not set
82CONFIG_CGROUP_NS=y
83# CONFIG_CGROUP_DEVICE is not set
84CONFIG_CPUSETS=y
85CONFIG_GROUP_SCHED=y
86CONFIG_FAIR_GROUP_SCHED=y
87# CONFIG_RT_GROUP_SCHED is not set
88# CONFIG_USER_SCHED is not set
89CONFIG_CGROUP_SCHED=y
90CONFIG_CGROUP_CPUACCT=y
91CONFIG_RESOURCE_COUNTERS=y
92# CONFIG_CGROUP_MEM_RES_CTLR is not set
93# CONFIG_SYSFS_DEPRECATED_V2 is not set
94CONFIG_PROC_PID_CPUSET=y
51CONFIG_RELAY=y 95CONFIG_RELAY=y
96CONFIG_NAMESPACES=y
97CONFIG_UTS_NS=y
98CONFIG_IPC_NS=y
99CONFIG_USER_NS=y
100CONFIG_PID_NS=y
52CONFIG_BLK_DEV_INITRD=y 101CONFIG_BLK_DEV_INITRD=y
53CONFIG_INITRAMFS_SOURCE="" 102CONFIG_INITRAMFS_SOURCE=""
54CONFIG_CC_OPTIMIZE_FOR_SIZE=y 103CONFIG_CC_OPTIMIZE_FOR_SIZE=y
@@ -56,13 +105,15 @@ CONFIG_SYSCTL=y
56# CONFIG_EMBEDDED is not set 105# CONFIG_EMBEDDED is not set
57CONFIG_UID16=y 106CONFIG_UID16=y
58CONFIG_SYSCTL_SYSCALL=y 107CONFIG_SYSCTL_SYSCALL=y
108CONFIG_SYSCTL_SYSCALL_CHECK=y
59CONFIG_KALLSYMS=y 109CONFIG_KALLSYMS=y
60CONFIG_KALLSYMS_ALL=y 110CONFIG_KALLSYMS_ALL=y
61# CONFIG_KALLSYMS_EXTRA_PASS is not set 111CONFIG_KALLSYMS_EXTRA_PASS=y
62CONFIG_HOTPLUG=y 112CONFIG_HOTPLUG=y
63CONFIG_PRINTK=y 113CONFIG_PRINTK=y
64CONFIG_BUG=y 114CONFIG_BUG=y
65CONFIG_ELF_CORE=y 115CONFIG_ELF_CORE=y
116# CONFIG_COMPAT_BRK is not set
66CONFIG_BASE_FULL=y 117CONFIG_BASE_FULL=y
67CONFIG_FUTEX=y 118CONFIG_FUTEX=y
68CONFIG_ANON_INODES=y 119CONFIG_ANON_INODES=y
@@ -76,6 +127,17 @@ CONFIG_SLUB_DEBUG=y
76# CONFIG_SLAB is not set 127# CONFIG_SLAB is not set
77CONFIG_SLUB=y 128CONFIG_SLUB=y
78# CONFIG_SLOB is not set 129# CONFIG_SLOB is not set
130CONFIG_PROFILING=y
131CONFIG_MARKERS=y
132# CONFIG_OPROFILE is not set
133CONFIG_HAVE_OPROFILE=y
134CONFIG_KPROBES=y
135CONFIG_KRETPROBES=y
136CONFIG_HAVE_KPROBES=y
137CONFIG_HAVE_KRETPROBES=y
138# CONFIG_HAVE_DMA_ATTRS is not set
139CONFIG_PROC_PAGE_MONITOR=y
140CONFIG_SLABINFO=y
79CONFIG_RT_MUTEXES=y 141CONFIG_RT_MUTEXES=y
80# CONFIG_TINY_SHMEM is not set 142# CONFIG_TINY_SHMEM is not set
81CONFIG_BASE_SMALL=0 143CONFIG_BASE_SMALL=0
@@ -87,10 +149,10 @@ CONFIG_MODULE_FORCE_UNLOAD=y
87# CONFIG_KMOD is not set 149# CONFIG_KMOD is not set
88CONFIG_STOP_MACHINE=y 150CONFIG_STOP_MACHINE=y
89CONFIG_BLOCK=y 151CONFIG_BLOCK=y
90CONFIG_LBD=y 152# CONFIG_LBD is not set
91# CONFIG_BLK_DEV_IO_TRACE is not set 153CONFIG_BLK_DEV_IO_TRACE=y
92# CONFIG_LSF is not set 154# CONFIG_LSF is not set
93# CONFIG_BLK_DEV_BSG is not set 155CONFIG_BLK_DEV_BSG=y
94 156
95# 157#
96# IO Schedulers 158# IO Schedulers
@@ -103,7 +165,8 @@ CONFIG_IOSCHED_CFQ=y
103# CONFIG_DEFAULT_DEADLINE is not set 165# CONFIG_DEFAULT_DEADLINE is not set
104CONFIG_DEFAULT_CFQ=y 166CONFIG_DEFAULT_CFQ=y
105# CONFIG_DEFAULT_NOOP is not set 167# CONFIG_DEFAULT_NOOP is not set
106CONFIG_DEFAULT_IOSCHED="anticipatory" 168CONFIG_DEFAULT_IOSCHED="cfq"
169CONFIG_CLASSIC_RCU=y
107 170
108# 171#
109# Processor type and features 172# Processor type and features
@@ -111,18 +174,21 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
111CONFIG_TICK_ONESHOT=y 174CONFIG_TICK_ONESHOT=y
112CONFIG_NO_HZ=y 175CONFIG_NO_HZ=y
113CONFIG_HIGH_RES_TIMERS=y 176CONFIG_HIGH_RES_TIMERS=y
177CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
114CONFIG_SMP=y 178CONFIG_SMP=y
115# CONFIG_X86_PC is not set 179CONFIG_X86_PC=y
116# CONFIG_X86_ELAN is not set 180# CONFIG_X86_ELAN is not set
117# CONFIG_X86_VOYAGER is not set 181# CONFIG_X86_VOYAGER is not set
118# CONFIG_X86_NUMAQ is not set 182# CONFIG_X86_NUMAQ is not set
119# CONFIG_X86_SUMMIT is not set 183# CONFIG_X86_SUMMIT is not set
120# CONFIG_X86_BIGSMP is not set 184# CONFIG_X86_BIGSMP is not set
121# CONFIG_X86_VISWS is not set 185# CONFIG_X86_VISWS is not set
122CONFIG_X86_GENERICARCH=y 186# CONFIG_X86_GENERICARCH is not set
123# CONFIG_X86_ES7000 is not set 187# CONFIG_X86_ES7000 is not set
124# CONFIG_PARAVIRT is not set 188# CONFIG_X86_RDC321X is not set
125CONFIG_X86_CYCLONE_TIMER=y 189# CONFIG_X86_VSMP is not set
190CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
191# CONFIG_PARAVIRT_GUEST is not set
126# CONFIG_M386 is not set 192# CONFIG_M386 is not set
127# CONFIG_M486 is not set 193# CONFIG_M486 is not set
128# CONFIG_M586 is not set 194# CONFIG_M586 is not set
@@ -130,9 +196,8 @@ CONFIG_X86_CYCLONE_TIMER=y
130# CONFIG_M586MMX is not set 196# CONFIG_M586MMX is not set
131# CONFIG_M686 is not set 197# CONFIG_M686 is not set
132# CONFIG_MPENTIUMII is not set 198# CONFIG_MPENTIUMII is not set
133CONFIG_MPENTIUMIII=y 199# CONFIG_MPENTIUMIII is not set
134# CONFIG_MPENTIUMM is not set 200# CONFIG_MPENTIUMM is not set
135# CONFIG_MCORE2 is not set
136# CONFIG_MPENTIUM4 is not set 201# CONFIG_MPENTIUM4 is not set
137# CONFIG_MK6 is not set 202# CONFIG_MK6 is not set
138# CONFIG_MK7 is not set 203# CONFIG_MK7 is not set
@@ -147,14 +212,14 @@ CONFIG_MPENTIUMIII=y
147# CONFIG_MCYRIXIII is not set 212# CONFIG_MCYRIXIII is not set
148# CONFIG_MVIAC3_2 is not set 213# CONFIG_MVIAC3_2 is not set
149# CONFIG_MVIAC7 is not set 214# CONFIG_MVIAC7 is not set
150CONFIG_X86_GENERIC=y 215# CONFIG_MPSC is not set
216CONFIG_MCORE2=y
217# CONFIG_GENERIC_CPU is not set
218# CONFIG_X86_GENERIC is not set
219CONFIG_X86_CPU=y
151CONFIG_X86_CMPXCHG=y 220CONFIG_X86_CMPXCHG=y
152CONFIG_X86_L1_CACHE_SHIFT=7 221CONFIG_X86_L1_CACHE_SHIFT=6
153CONFIG_X86_XADD=y 222CONFIG_X86_XADD=y
154CONFIG_RWSEM_XCHGADD_ALGORITHM=y
155# CONFIG_ARCH_HAS_ILOG2_U32 is not set
156# CONFIG_ARCH_HAS_ILOG2_U64 is not set
157CONFIG_GENERIC_CALIBRATE_DELAY=y
158CONFIG_X86_WP_WORKS_OK=y 223CONFIG_X86_WP_WORKS_OK=y
159CONFIG_X86_INVLPG=y 224CONFIG_X86_INVLPG=y
160CONFIG_X86_BSWAP=y 225CONFIG_X86_BSWAP=y
@@ -162,106 +227,120 @@ CONFIG_X86_POPAD_OK=y
162CONFIG_X86_GOOD_APIC=y 227CONFIG_X86_GOOD_APIC=y
163CONFIG_X86_INTEL_USERCOPY=y 228CONFIG_X86_INTEL_USERCOPY=y
164CONFIG_X86_USE_PPRO_CHECKSUM=y 229CONFIG_X86_USE_PPRO_CHECKSUM=y
230CONFIG_X86_P6_NOP=y
165CONFIG_X86_TSC=y 231CONFIG_X86_TSC=y
166CONFIG_X86_CMOV=y 232CONFIG_X86_MINIMUM_CPU_FAMILY=6
167CONFIG_X86_MINIMUM_CPU_FAMILY=4 233CONFIG_X86_DEBUGCTLMSR=y
168CONFIG_HPET_TIMER=y 234CONFIG_HPET_TIMER=y
169CONFIG_HPET_EMULATE_RTC=y 235CONFIG_HPET_EMULATE_RTC=y
170CONFIG_NR_CPUS=32 236CONFIG_DMI=y
171CONFIG_SCHED_SMT=y 237# CONFIG_IOMMU_HELPER is not set
238CONFIG_NR_CPUS=4
239# CONFIG_SCHED_SMT is not set
172CONFIG_SCHED_MC=y 240CONFIG_SCHED_MC=y
173# CONFIG_PREEMPT_NONE is not set 241# CONFIG_PREEMPT_NONE is not set
174CONFIG_PREEMPT_VOLUNTARY=y 242CONFIG_PREEMPT_VOLUNTARY=y
175# CONFIG_PREEMPT is not set 243# CONFIG_PREEMPT is not set
176CONFIG_PREEMPT_BKL=y
177CONFIG_X86_LOCAL_APIC=y 244CONFIG_X86_LOCAL_APIC=y
178CONFIG_X86_IO_APIC=y 245CONFIG_X86_IO_APIC=y
179CONFIG_X86_MCE=y 246# CONFIG_X86_MCE is not set
180CONFIG_X86_MCE_NONFATAL=y
181CONFIG_X86_MCE_P4THERMAL=y
182CONFIG_VM86=y 247CONFIG_VM86=y
183# CONFIG_TOSHIBA is not set 248# CONFIG_TOSHIBA is not set
184# CONFIG_I8K is not set 249# CONFIG_I8K is not set
185# CONFIG_X86_REBOOTFIXUPS is not set 250# CONFIG_X86_REBOOTFIXUPS is not set
186CONFIG_MICROCODE=y 251# CONFIG_MICROCODE is not set
187CONFIG_MICROCODE_OLD_INTERFACE=y
188CONFIG_X86_MSR=y 252CONFIG_X86_MSR=y
189CONFIG_X86_CPUID=y 253CONFIG_X86_CPUID=y
190
191#
192# Firmware Drivers
193#
194# CONFIG_EDD is not set
195# CONFIG_DELL_RBU is not set
196# CONFIG_DCDBAS is not set
197CONFIG_DMIID=y
198# CONFIG_NOHIGHMEM is not set 254# CONFIG_NOHIGHMEM is not set
199CONFIG_HIGHMEM4G=y 255CONFIG_HIGHMEM4G=y
200# CONFIG_HIGHMEM64G is not set 256# CONFIG_HIGHMEM64G is not set
201CONFIG_PAGE_OFFSET=0xC0000000 257CONFIG_PAGE_OFFSET=0xC0000000
202CONFIG_HIGHMEM=y 258CONFIG_HIGHMEM=y
203CONFIG_ARCH_POPULATES_NODE_MAP=y 259CONFIG_NEED_NODE_MEMMAP_SIZE=y
260CONFIG_ARCH_FLATMEM_ENABLE=y
261CONFIG_ARCH_SPARSEMEM_ENABLE=y
262CONFIG_ARCH_SELECT_MEMORY_MODEL=y
204CONFIG_SELECT_MEMORY_MODEL=y 263CONFIG_SELECT_MEMORY_MODEL=y
205CONFIG_FLATMEM_MANUAL=y 264# CONFIG_FLATMEM_MANUAL is not set
206# CONFIG_DISCONTIGMEM_MANUAL is not set 265# CONFIG_DISCONTIGMEM_MANUAL is not set
207# CONFIG_SPARSEMEM_MANUAL is not set 266CONFIG_SPARSEMEM_MANUAL=y
208CONFIG_FLATMEM=y 267CONFIG_SPARSEMEM=y
209CONFIG_FLAT_NODE_MEM_MAP=y 268CONFIG_HAVE_MEMORY_PRESENT=y
210# CONFIG_SPARSEMEM_STATIC is not set 269CONFIG_SPARSEMEM_STATIC=y
270# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
271
272#
273# Memory hotplug is currently incompatible with Software Suspend
274#
275CONFIG_PAGEFLAGS_EXTENDED=y
211CONFIG_SPLIT_PTLOCK_CPUS=4 276CONFIG_SPLIT_PTLOCK_CPUS=4
212CONFIG_RESOURCES_64BIT=y 277CONFIG_RESOURCES_64BIT=y
213CONFIG_ZONE_DMA_FLAG=1 278CONFIG_ZONE_DMA_FLAG=1
214CONFIG_BOUNCE=y 279CONFIG_BOUNCE=y
215CONFIG_NR_QUICK=1
216CONFIG_VIRT_TO_BUS=y 280CONFIG_VIRT_TO_BUS=y
217# CONFIG_HIGHPTE is not set 281# CONFIG_HIGHPTE is not set
218# CONFIG_MATH_EMULATION is not set 282# CONFIG_MATH_EMULATION is not set
219CONFIG_MTRR=y 283CONFIG_MTRR=y
220# CONFIG_EFI is not set 284# CONFIG_X86_PAT is not set
285CONFIG_EFI=y
221# CONFIG_IRQBALANCE is not set 286# CONFIG_IRQBALANCE is not set
222CONFIG_SECCOMP=y 287CONFIG_SECCOMP=y
223# CONFIG_HZ_100 is not set 288# CONFIG_HZ_100 is not set
224CONFIG_HZ_250=y 289# CONFIG_HZ_250 is not set
225# CONFIG_HZ_300 is not set 290# CONFIG_HZ_300 is not set
226# CONFIG_HZ_1000 is not set 291CONFIG_HZ_1000=y
227CONFIG_HZ=250 292CONFIG_HZ=1000
228# CONFIG_KEXEC is not set 293CONFIG_SCHED_HRTICK=y
229# CONFIG_CRASH_DUMP is not set 294CONFIG_KEXEC=y
230CONFIG_PHYSICAL_START=0x100000 295CONFIG_CRASH_DUMP=y
231# CONFIG_RELOCATABLE is not set 296CONFIG_PHYSICAL_START=0x1000000
232CONFIG_PHYSICAL_ALIGN=0x100000 297CONFIG_RELOCATABLE=y
233# CONFIG_HOTPLUG_CPU is not set 298CONFIG_PHYSICAL_ALIGN=0x200000
234CONFIG_COMPAT_VDSO=y 299CONFIG_HOTPLUG_CPU=y
300# CONFIG_COMPAT_VDSO is not set
235CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 301CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
236 302
237# 303#
238# Power management options (ACPI, APM) 304# Power management options
239# 305#
240CONFIG_PM=y 306CONFIG_PM=y
241CONFIG_PM_LEGACY=y 307CONFIG_PM_DEBUG=y
242# CONFIG_PM_DEBUG is not set 308# CONFIG_PM_VERBOSE is not set
243 309CONFIG_CAN_PM_TRACE=y
244# 310CONFIG_PM_TRACE=y
245# ACPI (Advanced Configuration and Power Interface) Support 311CONFIG_PM_TRACE_RTC=y
246# 312CONFIG_PM_SLEEP_SMP=y
313CONFIG_PM_SLEEP=y
314CONFIG_SUSPEND=y
315CONFIG_SUSPEND_FREEZER=y
316CONFIG_HIBERNATION=y
317CONFIG_PM_STD_PARTITION=""
247CONFIG_ACPI=y 318CONFIG_ACPI=y
319CONFIG_ACPI_SLEEP=y
248CONFIG_ACPI_PROCFS=y 320CONFIG_ACPI_PROCFS=y
321CONFIG_ACPI_PROCFS_POWER=y
322CONFIG_ACPI_SYSFS_POWER=y
323CONFIG_ACPI_PROC_EVENT=y
249CONFIG_ACPI_AC=y 324CONFIG_ACPI_AC=y
250CONFIG_ACPI_BATTERY=y 325CONFIG_ACPI_BATTERY=y
251CONFIG_ACPI_BUTTON=y 326CONFIG_ACPI_BUTTON=y
252CONFIG_ACPI_FAN=y 327CONFIG_ACPI_FAN=y
253# CONFIG_ACPI_DOCK is not set 328CONFIG_ACPI_DOCK=y
329# CONFIG_ACPI_BAY is not set
254CONFIG_ACPI_PROCESSOR=y 330CONFIG_ACPI_PROCESSOR=y
331CONFIG_ACPI_HOTPLUG_CPU=y
255CONFIG_ACPI_THERMAL=y 332CONFIG_ACPI_THERMAL=y
333# CONFIG_ACPI_WMI is not set
256# CONFIG_ACPI_ASUS is not set 334# CONFIG_ACPI_ASUS is not set
257# CONFIG_ACPI_TOSHIBA is not set 335# CONFIG_ACPI_TOSHIBA is not set
258CONFIG_ACPI_BLACKLIST_YEAR=2001 336# CONFIG_ACPI_CUSTOM_DSDT is not set
259CONFIG_ACPI_DEBUG=y 337CONFIG_ACPI_BLACKLIST_YEAR=0
338# CONFIG_ACPI_DEBUG is not set
260CONFIG_ACPI_EC=y 339CONFIG_ACPI_EC=y
261CONFIG_ACPI_POWER=y 340CONFIG_ACPI_POWER=y
262CONFIG_ACPI_SYSTEM=y 341CONFIG_ACPI_SYSTEM=y
263CONFIG_X86_PM_TIMER=y 342CONFIG_X86_PM_TIMER=y
264# CONFIG_ACPI_CONTAINER is not set 343CONFIG_ACPI_CONTAINER=y
265# CONFIG_ACPI_SBS is not set 344# CONFIG_ACPI_SBS is not set
266# CONFIG_APM is not set 345# CONFIG_APM is not set
267 346
@@ -271,15 +350,17 @@ CONFIG_X86_PM_TIMER=y
271CONFIG_CPU_FREQ=y 350CONFIG_CPU_FREQ=y
272CONFIG_CPU_FREQ_TABLE=y 351CONFIG_CPU_FREQ_TABLE=y
273CONFIG_CPU_FREQ_DEBUG=y 352CONFIG_CPU_FREQ_DEBUG=y
274CONFIG_CPU_FREQ_STAT=y 353# CONFIG_CPU_FREQ_STAT is not set
275# CONFIG_CPU_FREQ_STAT_DETAILS is not set 354# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
276CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y 355# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
277# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set 356CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
357# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
358# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
278CONFIG_CPU_FREQ_GOV_PERFORMANCE=y 359CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
279# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set 360# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
280CONFIG_CPU_FREQ_GOV_USERSPACE=y 361CONFIG_CPU_FREQ_GOV_USERSPACE=y
281CONFIG_CPU_FREQ_GOV_ONDEMAND=y 362CONFIG_CPU_FREQ_GOV_ONDEMAND=y
282CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y 363# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
283 364
284# 365#
285# CPUFreq processor drivers 366# CPUFreq processor drivers
@@ -287,8 +368,7 @@ CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
287CONFIG_X86_ACPI_CPUFREQ=y 368CONFIG_X86_ACPI_CPUFREQ=y
288# CONFIG_X86_POWERNOW_K6 is not set 369# CONFIG_X86_POWERNOW_K6 is not set
289# CONFIG_X86_POWERNOW_K7 is not set 370# CONFIG_X86_POWERNOW_K7 is not set
290CONFIG_X86_POWERNOW_K8=y 371# CONFIG_X86_POWERNOW_K8 is not set
291CONFIG_X86_POWERNOW_K8_ACPI=y
292# CONFIG_X86_GX_SUSPMOD is not set 372# CONFIG_X86_GX_SUSPMOD is not set
293# CONFIG_X86_SPEEDSTEP_CENTRINO is not set 373# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
294# CONFIG_X86_SPEEDSTEP_ICH is not set 374# CONFIG_X86_SPEEDSTEP_ICH is not set
@@ -302,43 +382,72 @@ CONFIG_X86_POWERNOW_K8_ACPI=y
302# 382#
303# shared options 383# shared options
304# 384#
305CONFIG_X86_ACPI_CPUFREQ_PROC_INTF=y 385# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
306# CONFIG_X86_SPEEDSTEP_LIB is not set 386# CONFIG_X86_SPEEDSTEP_LIB is not set
387CONFIG_CPU_IDLE=y
388CONFIG_CPU_IDLE_GOV_LADDER=y
389CONFIG_CPU_IDLE_GOV_MENU=y
307 390
308# 391#
309# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 392# Bus options (PCI etc.)
310# 393#
311CONFIG_PCI=y 394CONFIG_PCI=y
312# CONFIG_PCI_GOBIOS is not set 395# CONFIG_PCI_GOBIOS is not set
313# CONFIG_PCI_GOMMCONFIG is not set 396# CONFIG_PCI_GOMMCONFIG is not set
314# CONFIG_PCI_GODIRECT is not set 397# CONFIG_PCI_GODIRECT is not set
315CONFIG_PCI_GOANY=y 398CONFIG_PCI_GOANY=y
399# CONFIG_PCI_GOOLPC is not set
316CONFIG_PCI_BIOS=y 400CONFIG_PCI_BIOS=y
317CONFIG_PCI_DIRECT=y 401CONFIG_PCI_DIRECT=y
318CONFIG_PCI_MMCONFIG=y 402CONFIG_PCI_MMCONFIG=y
319# CONFIG_PCIEPORTBUS is not set 403CONFIG_PCI_DOMAINS=y
404CONFIG_PCIEPORTBUS=y
405# CONFIG_HOTPLUG_PCI_PCIE is not set
406CONFIG_PCIEAER=y
407# CONFIG_PCIEASPM is not set
320CONFIG_ARCH_SUPPORTS_MSI=y 408CONFIG_ARCH_SUPPORTS_MSI=y
321CONFIG_PCI_MSI=y 409CONFIG_PCI_MSI=y
410# CONFIG_PCI_LEGACY is not set
322# CONFIG_PCI_DEBUG is not set 411# CONFIG_PCI_DEBUG is not set
323# CONFIG_HT_IRQ is not set 412CONFIG_HT_IRQ=y
324CONFIG_ISA_DMA_API=y 413CONFIG_ISA_DMA_API=y
325# CONFIG_ISA is not set 414# CONFIG_ISA is not set
326# CONFIG_MCA is not set 415# CONFIG_MCA is not set
327# CONFIG_SCx200 is not set 416# CONFIG_SCx200 is not set
417# CONFIG_OLPC is not set
328CONFIG_K8_NB=y 418CONFIG_K8_NB=y
329 419CONFIG_PCCARD=y
330# 420# CONFIG_PCMCIA_DEBUG is not set
331# PCCARD (PCMCIA/CardBus) support 421CONFIG_PCMCIA=y
332# 422CONFIG_PCMCIA_LOAD_CIS=y
333# CONFIG_PCCARD is not set 423CONFIG_PCMCIA_IOCTL=y
334# CONFIG_HOTPLUG_PCI is not set 424CONFIG_CARDBUS=y
335 425
336# 426#
337# Executable file formats 427# PC-card bridges
428#
429CONFIG_YENTA=y
430CONFIG_YENTA_O2=y
431CONFIG_YENTA_RICOH=y
432CONFIG_YENTA_TI=y
433CONFIG_YENTA_ENE_TUNE=y
434CONFIG_YENTA_TOSHIBA=y
435# CONFIG_PD6729 is not set
436# CONFIG_I82092 is not set
437CONFIG_PCCARD_NONSTATIC=y
438CONFIG_HOTPLUG_PCI=y
439# CONFIG_HOTPLUG_PCI_FAKE is not set
440# CONFIG_HOTPLUG_PCI_IBM is not set
441# CONFIG_HOTPLUG_PCI_ACPI is not set
442# CONFIG_HOTPLUG_PCI_CPCI is not set
443# CONFIG_HOTPLUG_PCI_SHPC is not set
444
445#
446# Executable file formats / Emulations
338# 447#
339CONFIG_BINFMT_ELF=y 448CONFIG_BINFMT_ELF=y
340# CONFIG_BINFMT_AOUT is not set 449# CONFIG_BINFMT_AOUT is not set
341# CONFIG_BINFMT_MISC is not set 450CONFIG_BINFMT_MISC=y
342 451
343# 452#
344# Networking 453# Networking
@@ -349,59 +458,142 @@ CONFIG_NET=y
349# Networking options 458# Networking options
350# 459#
351CONFIG_PACKET=y 460CONFIG_PACKET=y
352# CONFIG_PACKET_MMAP is not set 461CONFIG_PACKET_MMAP=y
353CONFIG_UNIX=y 462CONFIG_UNIX=y
354CONFIG_XFRM=y 463CONFIG_XFRM=y
355# CONFIG_XFRM_USER is not set 464CONFIG_XFRM_USER=y
356# CONFIG_XFRM_SUB_POLICY is not set 465# CONFIG_XFRM_SUB_POLICY is not set
357# CONFIG_XFRM_MIGRATE is not set 466# CONFIG_XFRM_MIGRATE is not set
467# CONFIG_XFRM_STATISTICS is not set
358# CONFIG_NET_KEY is not set 468# CONFIG_NET_KEY is not set
359CONFIG_INET=y 469CONFIG_INET=y
360CONFIG_IP_MULTICAST=y 470CONFIG_IP_MULTICAST=y
361# CONFIG_IP_ADVANCED_ROUTER is not set 471CONFIG_IP_ADVANCED_ROUTER=y
472CONFIG_ASK_IP_FIB_HASH=y
473# CONFIG_IP_FIB_TRIE is not set
362CONFIG_IP_FIB_HASH=y 474CONFIG_IP_FIB_HASH=y
363CONFIG_IP_PNP=y 475CONFIG_IP_MULTIPLE_TABLES=y
364CONFIG_IP_PNP_DHCP=y 476CONFIG_IP_ROUTE_MULTIPATH=y
365# CONFIG_IP_PNP_BOOTP is not set 477CONFIG_IP_ROUTE_VERBOSE=y
366# CONFIG_IP_PNP_RARP is not set 478# CONFIG_IP_PNP is not set
367# CONFIG_NET_IPIP is not set 479# CONFIG_NET_IPIP is not set
368# CONFIG_NET_IPGRE is not set 480# CONFIG_NET_IPGRE is not set
369# CONFIG_IP_MROUTE is not set 481CONFIG_IP_MROUTE=y
482CONFIG_IP_PIMSM_V1=y
483CONFIG_IP_PIMSM_V2=y
370# CONFIG_ARPD is not set 484# CONFIG_ARPD is not set
371# CONFIG_SYN_COOKIES is not set 485CONFIG_SYN_COOKIES=y
372# CONFIG_INET_AH is not set 486# CONFIG_INET_AH is not set
373# CONFIG_INET_ESP is not set 487# CONFIG_INET_ESP is not set
374# CONFIG_INET_IPCOMP is not set 488# CONFIG_INET_IPCOMP is not set
375# CONFIG_INET_XFRM_TUNNEL is not set 489# CONFIG_INET_XFRM_TUNNEL is not set
376CONFIG_INET_TUNNEL=y 490CONFIG_INET_TUNNEL=y
377CONFIG_INET_XFRM_MODE_TRANSPORT=y 491# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
378CONFIG_INET_XFRM_MODE_TUNNEL=y 492# CONFIG_INET_XFRM_MODE_TUNNEL is not set
379# CONFIG_INET_XFRM_MODE_BEET is not set 493# CONFIG_INET_XFRM_MODE_BEET is not set
380CONFIG_INET_DIAG=y 494CONFIG_INET_LRO=y
381CONFIG_INET_TCP_DIAG=y 495# CONFIG_INET_DIAG is not set
382# CONFIG_TCP_CONG_ADVANCED is not set 496CONFIG_TCP_CONG_ADVANCED=y
497# CONFIG_TCP_CONG_BIC is not set
383CONFIG_TCP_CONG_CUBIC=y 498CONFIG_TCP_CONG_CUBIC=y
499# CONFIG_TCP_CONG_WESTWOOD is not set
500# CONFIG_TCP_CONG_HTCP is not set
501# CONFIG_TCP_CONG_HSTCP is not set
502# CONFIG_TCP_CONG_HYBLA is not set
503# CONFIG_TCP_CONG_VEGAS is not set
504# CONFIG_TCP_CONG_SCALABLE is not set
505# CONFIG_TCP_CONG_LP is not set
506# CONFIG_TCP_CONG_VENO is not set
507# CONFIG_TCP_CONG_YEAH is not set
508# CONFIG_TCP_CONG_ILLINOIS is not set
509# CONFIG_DEFAULT_BIC is not set
510CONFIG_DEFAULT_CUBIC=y
511# CONFIG_DEFAULT_HTCP is not set
512# CONFIG_DEFAULT_VEGAS is not set
513# CONFIG_DEFAULT_WESTWOOD is not set
514# CONFIG_DEFAULT_RENO is not set
384CONFIG_DEFAULT_TCP_CONG="cubic" 515CONFIG_DEFAULT_TCP_CONG="cubic"
385# CONFIG_TCP_MD5SIG is not set 516CONFIG_TCP_MD5SIG=y
517# CONFIG_IP_VS is not set
386CONFIG_IPV6=y 518CONFIG_IPV6=y
387# CONFIG_IPV6_PRIVACY is not set 519# CONFIG_IPV6_PRIVACY is not set
388# CONFIG_IPV6_ROUTER_PREF is not set 520# CONFIG_IPV6_ROUTER_PREF is not set
389# CONFIG_IPV6_OPTIMISTIC_DAD is not set 521# CONFIG_IPV6_OPTIMISTIC_DAD is not set
390# CONFIG_INET6_AH is not set 522CONFIG_INET6_AH=y
391# CONFIG_INET6_ESP is not set 523CONFIG_INET6_ESP=y
392# CONFIG_INET6_IPCOMP is not set 524# CONFIG_INET6_IPCOMP is not set
393# CONFIG_IPV6_MIP6 is not set 525# CONFIG_IPV6_MIP6 is not set
394# CONFIG_INET6_XFRM_TUNNEL is not set 526# CONFIG_INET6_XFRM_TUNNEL is not set
395# CONFIG_INET6_TUNNEL is not set 527# CONFIG_INET6_TUNNEL is not set
396CONFIG_INET6_XFRM_MODE_TRANSPORT=y 528CONFIG_INET6_XFRM_MODE_TRANSPORT=y
397CONFIG_INET6_XFRM_MODE_TUNNEL=y 529CONFIG_INET6_XFRM_MODE_TUNNEL=y
398# CONFIG_INET6_XFRM_MODE_BEET is not set 530CONFIG_INET6_XFRM_MODE_BEET=y
399# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set 531# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
400CONFIG_IPV6_SIT=y 532CONFIG_IPV6_SIT=y
533CONFIG_IPV6_NDISC_NODETYPE=y
401# CONFIG_IPV6_TUNNEL is not set 534# CONFIG_IPV6_TUNNEL is not set
402# CONFIG_IPV6_MULTIPLE_TABLES is not set 535# CONFIG_IPV6_MULTIPLE_TABLES is not set
403# CONFIG_NETWORK_SECMARK is not set 536# CONFIG_IPV6_MROUTE is not set
404# CONFIG_NETFILTER is not set 537CONFIG_NETLABEL=y
538CONFIG_NETWORK_SECMARK=y
539CONFIG_NETFILTER=y
540# CONFIG_NETFILTER_DEBUG is not set
541# CONFIG_NETFILTER_ADVANCED is not set
542
543#
544# Core Netfilter Configuration
545#
546CONFIG_NETFILTER_NETLINK=y
547CONFIG_NETFILTER_NETLINK_LOG=y
548CONFIG_NF_CONNTRACK=y
549CONFIG_NF_CONNTRACK_SECMARK=y
550CONFIG_NF_CONNTRACK_FTP=y
551CONFIG_NF_CONNTRACK_IRC=y
552CONFIG_NF_CONNTRACK_SIP=y
553CONFIG_NF_CT_NETLINK=y
554CONFIG_NETFILTER_XTABLES=y
555CONFIG_NETFILTER_XT_TARGET_MARK=y
556CONFIG_NETFILTER_XT_TARGET_NFLOG=y
557CONFIG_NETFILTER_XT_TARGET_SECMARK=y
558CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y
559CONFIG_NETFILTER_XT_TARGET_TCPMSS=y
560CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y
561CONFIG_NETFILTER_XT_MATCH_MARK=y
562CONFIG_NETFILTER_XT_MATCH_POLICY=y
563CONFIG_NETFILTER_XT_MATCH_STATE=y
564
565#
566# IP: Netfilter Configuration
567#
568CONFIG_NF_CONNTRACK_IPV4=y
569CONFIG_NF_CONNTRACK_PROC_COMPAT=y
570CONFIG_IP_NF_IPTABLES=y
571CONFIG_IP_NF_FILTER=y
572CONFIG_IP_NF_TARGET_REJECT=y
573CONFIG_IP_NF_TARGET_LOG=y
574CONFIG_IP_NF_TARGET_ULOG=y
575CONFIG_NF_NAT=y
576CONFIG_NF_NAT_NEEDED=y
577CONFIG_IP_NF_TARGET_MASQUERADE=y
578CONFIG_NF_NAT_FTP=y
579CONFIG_NF_NAT_IRC=y
580# CONFIG_NF_NAT_TFTP is not set
581# CONFIG_NF_NAT_AMANDA is not set
582# CONFIG_NF_NAT_PPTP is not set
583# CONFIG_NF_NAT_H323 is not set
584CONFIG_NF_NAT_SIP=y
585CONFIG_IP_NF_MANGLE=y
586
587#
588# IPv6: Netfilter Configuration
589#
590CONFIG_NF_CONNTRACK_IPV6=y
591CONFIG_IP6_NF_IPTABLES=y
592CONFIG_IP6_NF_MATCH_IPV6HEADER=y
593CONFIG_IP6_NF_FILTER=y
594CONFIG_IP6_NF_TARGET_LOG=y
595CONFIG_IP6_NF_TARGET_REJECT=y
596CONFIG_IP6_NF_MANGLE=y
405# CONFIG_IP_DCCP is not set 597# CONFIG_IP_DCCP is not set
406# CONFIG_IP_SCTP is not set 598# CONFIG_IP_SCTP is not set
407# CONFIG_TIPC is not set 599# CONFIG_TIPC is not set
@@ -409,6 +601,7 @@ CONFIG_IPV6_SIT=y
409# CONFIG_BRIDGE is not set 601# CONFIG_BRIDGE is not set
410# CONFIG_VLAN_8021Q is not set 602# CONFIG_VLAN_8021Q is not set
411# CONFIG_DECNET is not set 603# CONFIG_DECNET is not set
604CONFIG_LLC=y
412# CONFIG_LLC2 is not set 605# CONFIG_LLC2 is not set
413# CONFIG_IPX is not set 606# CONFIG_IPX is not set
414# CONFIG_ATALK is not set 607# CONFIG_ATALK is not set
@@ -416,28 +609,99 @@ CONFIG_IPV6_SIT=y
416# CONFIG_LAPB is not set 609# CONFIG_LAPB is not set
417# CONFIG_ECONET is not set 610# CONFIG_ECONET is not set
418# CONFIG_WAN_ROUTER is not set 611# CONFIG_WAN_ROUTER is not set
419 612CONFIG_NET_SCHED=y
420# 613
421# QoS and/or fair queueing 614#
422# 615# Queueing/Scheduling
423# CONFIG_NET_SCHED is not set 616#
617# CONFIG_NET_SCH_CBQ is not set
618# CONFIG_NET_SCH_HTB is not set
619# CONFIG_NET_SCH_HFSC is not set
620# CONFIG_NET_SCH_PRIO is not set
621# CONFIG_NET_SCH_RR is not set
622# CONFIG_NET_SCH_RED is not set
623# CONFIG_NET_SCH_SFQ is not set
624# CONFIG_NET_SCH_TEQL is not set
625# CONFIG_NET_SCH_TBF is not set
626# CONFIG_NET_SCH_GRED is not set
627# CONFIG_NET_SCH_DSMARK is not set
628# CONFIG_NET_SCH_NETEM is not set
629# CONFIG_NET_SCH_INGRESS is not set
630
631#
632# Classification
633#
634CONFIG_NET_CLS=y
635# CONFIG_NET_CLS_BASIC is not set
636# CONFIG_NET_CLS_TCINDEX is not set
637# CONFIG_NET_CLS_ROUTE4 is not set
638# CONFIG_NET_CLS_FW is not set
639# CONFIG_NET_CLS_U32 is not set
640# CONFIG_NET_CLS_RSVP is not set
641# CONFIG_NET_CLS_RSVP6 is not set
642# CONFIG_NET_CLS_FLOW is not set
643CONFIG_NET_EMATCH=y
644CONFIG_NET_EMATCH_STACK=32
645# CONFIG_NET_EMATCH_CMP is not set
646# CONFIG_NET_EMATCH_NBYTE is not set
647# CONFIG_NET_EMATCH_U32 is not set
648# CONFIG_NET_EMATCH_META is not set
649# CONFIG_NET_EMATCH_TEXT is not set
650CONFIG_NET_CLS_ACT=y
651# CONFIG_NET_ACT_POLICE is not set
652# CONFIG_NET_ACT_GACT is not set
653# CONFIG_NET_ACT_MIRRED is not set
654# CONFIG_NET_ACT_IPT is not set
655# CONFIG_NET_ACT_NAT is not set
656# CONFIG_NET_ACT_PEDIT is not set
657# CONFIG_NET_ACT_SIMP is not set
658CONFIG_NET_SCH_FIFO=y
424 659
425# 660#
426# Network testing 661# Network testing
427# 662#
428# CONFIG_NET_PKTGEN is not set 663# CONFIG_NET_PKTGEN is not set
429# CONFIG_NET_TCPPROBE is not set 664# CONFIG_NET_TCPPROBE is not set
430# CONFIG_HAMRADIO is not set 665CONFIG_HAMRADIO=y
666
667#
668# Packet Radio protocols
669#
670# CONFIG_AX25 is not set
671# CONFIG_CAN is not set
431# CONFIG_IRDA is not set 672# CONFIG_IRDA is not set
432# CONFIG_BT is not set 673# CONFIG_BT is not set
433# CONFIG_AF_RXRPC is not set 674# CONFIG_AF_RXRPC is not set
675CONFIG_FIB_RULES=y
434 676
435# 677#
436# Wireless 678# Wireless
437# 679#
438# CONFIG_CFG80211 is not set 680CONFIG_CFG80211=y
439# CONFIG_WIRELESS_EXT is not set 681CONFIG_NL80211=y
440# CONFIG_MAC80211 is not set 682CONFIG_WIRELESS_EXT=y
683CONFIG_MAC80211=y
684
685#
686# Rate control algorithm selection
687#
688CONFIG_MAC80211_RC_DEFAULT_PID=y
689# CONFIG_MAC80211_RC_DEFAULT_NONE is not set
690
691#
692# Selecting 'y' for an algorithm will
693#
694
695#
696# build the algorithm into mac80211.
697#
698CONFIG_MAC80211_RC_DEFAULT="pid"
699CONFIG_MAC80211_RC_PID=y
700# CONFIG_MAC80211_MESH is not set
701CONFIG_MAC80211_LEDS=y
702# CONFIG_MAC80211_DEBUGFS is not set
703# CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT is not set
704# CONFIG_MAC80211_DEBUG is not set
441# CONFIG_IEEE80211 is not set 705# CONFIG_IEEE80211 is not set
442# CONFIG_RFKILL is not set 706# CONFIG_RFKILL is not set
443# CONFIG_NET_9P is not set 707# CONFIG_NET_9P is not set
@@ -449,13 +713,15 @@ CONFIG_IPV6_SIT=y
449# 713#
450# Generic Driver Options 714# Generic Driver Options
451# 715#
716CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
452CONFIG_STANDALONE=y 717CONFIG_STANDALONE=y
453CONFIG_PREVENT_FIRMWARE_BUILD=y 718CONFIG_PREVENT_FIRMWARE_BUILD=y
454CONFIG_FW_LOADER=y 719CONFIG_FW_LOADER=y
455# CONFIG_DEBUG_DRIVER is not set 720# CONFIG_DEBUG_DRIVER is not set
456# CONFIG_DEBUG_DEVRES is not set 721CONFIG_DEBUG_DEVRES=y
457# CONFIG_SYS_HYPERVISOR is not set 722# CONFIG_SYS_HYPERVISOR is not set
458# CONFIG_CONNECTOR is not set 723CONFIG_CONNECTOR=y
724CONFIG_PROC_EVENTS=y
459# CONFIG_MTD is not set 725# CONFIG_MTD is not set
460# CONFIG_PARPORT is not set 726# CONFIG_PARPORT is not set
461CONFIG_PNP=y 727CONFIG_PNP=y
@@ -466,7 +732,7 @@ CONFIG_PNP=y
466# 732#
467CONFIG_PNPACPI=y 733CONFIG_PNPACPI=y
468CONFIG_BLK_DEV=y 734CONFIG_BLK_DEV=y
469CONFIG_BLK_DEV_FD=y 735# CONFIG_BLK_DEV_FD is not set
470# CONFIG_BLK_CPQ_DA is not set 736# CONFIG_BLK_CPQ_DA is not set
471# CONFIG_BLK_CPQ_CISS_DA is not set 737# CONFIG_BLK_CPQ_CISS_DA is not set
472# CONFIG_BLK_DEV_DAC960 is not set 738# CONFIG_BLK_DEV_DAC960 is not set
@@ -479,8 +745,8 @@ CONFIG_BLK_DEV_LOOP=y
479# CONFIG_BLK_DEV_UB is not set 745# CONFIG_BLK_DEV_UB is not set
480CONFIG_BLK_DEV_RAM=y 746CONFIG_BLK_DEV_RAM=y
481CONFIG_BLK_DEV_RAM_COUNT=16 747CONFIG_BLK_DEV_RAM_COUNT=16
482CONFIG_BLK_DEV_RAM_SIZE=4096 748CONFIG_BLK_DEV_RAM_SIZE=16384
483CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 749# CONFIG_BLK_DEV_XIP is not set
484# CONFIG_CDROM_PKTCDVD is not set 750# CONFIG_CDROM_PKTCDVD is not set
485# CONFIG_ATA_OVER_ETH is not set 751# CONFIG_ATA_OVER_ETH is not set
486CONFIG_MISC_DEVICES=y 752CONFIG_MISC_DEVICES=y
@@ -489,73 +755,17 @@ CONFIG_MISC_DEVICES=y
489# CONFIG_EEPROM_93CX6 is not set 755# CONFIG_EEPROM_93CX6 is not set
490# CONFIG_SGI_IOC4 is not set 756# CONFIG_SGI_IOC4 is not set
491# CONFIG_TIFM_CORE is not set 757# CONFIG_TIFM_CORE is not set
758# CONFIG_ACER_WMI is not set
759# CONFIG_ASUS_LAPTOP is not set
760# CONFIG_FUJITSU_LAPTOP is not set
761# CONFIG_TC1100_WMI is not set
762# CONFIG_MSI_LAPTOP is not set
492# CONFIG_SONY_LAPTOP is not set 763# CONFIG_SONY_LAPTOP is not set
493# CONFIG_THINKPAD_ACPI is not set 764# CONFIG_THINKPAD_ACPI is not set
494CONFIG_IDE=y 765# CONFIG_INTEL_MENLOW is not set
495CONFIG_BLK_DEV_IDE=y 766# CONFIG_ENCLOSURE_SERVICES is not set
496 767CONFIG_HAVE_IDE=y
497# 768# CONFIG_IDE is not set
498# Please see Documentation/ide.txt for help/info on IDE drives
499#
500# CONFIG_BLK_DEV_IDE_SATA is not set
501# CONFIG_BLK_DEV_HD_IDE is not set
502CONFIG_BLK_DEV_IDEDISK=y
503CONFIG_IDEDISK_MULTI_MODE=y
504CONFIG_BLK_DEV_IDECD=y
505# CONFIG_BLK_DEV_IDETAPE is not set
506# CONFIG_BLK_DEV_IDEFLOPPY is not set
507# CONFIG_BLK_DEV_IDESCSI is not set
508CONFIG_BLK_DEV_IDEACPI=y
509# CONFIG_IDE_TASK_IOCTL is not set
510CONFIG_IDE_PROC_FS=y
511
512#
513# IDE chipset support/bugfixes
514#
515CONFIG_IDE_GENERIC=y
516# CONFIG_BLK_DEV_CMD640 is not set
517# CONFIG_BLK_DEV_IDEPNP is not set
518CONFIG_BLK_DEV_IDEPCI=y
519# CONFIG_IDEPCI_SHARE_IRQ is not set
520CONFIG_IDEPCI_PCIBUS_ORDER=y
521# CONFIG_BLK_DEV_OFFBOARD is not set
522# CONFIG_BLK_DEV_GENERIC is not set
523# CONFIG_BLK_DEV_OPTI621 is not set
524# CONFIG_BLK_DEV_RZ1000 is not set
525CONFIG_BLK_DEV_IDEDMA_PCI=y
526# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
527# CONFIG_IDEDMA_ONLYDISK is not set
528# CONFIG_BLK_DEV_AEC62XX is not set
529# CONFIG_BLK_DEV_ALI15X3 is not set
530CONFIG_BLK_DEV_AMD74XX=y
531# CONFIG_BLK_DEV_ATIIXP is not set
532# CONFIG_BLK_DEV_CMD64X is not set
533# CONFIG_BLK_DEV_TRIFLEX is not set
534# CONFIG_BLK_DEV_CY82C693 is not set
535# CONFIG_BLK_DEV_CS5520 is not set
536# CONFIG_BLK_DEV_CS5530 is not set
537# CONFIG_BLK_DEV_CS5535 is not set
538# CONFIG_BLK_DEV_HPT34X is not set
539# CONFIG_BLK_DEV_HPT366 is not set
540# CONFIG_BLK_DEV_JMICRON is not set
541# CONFIG_BLK_DEV_SC1200 is not set
542CONFIG_BLK_DEV_PIIX=y
543# CONFIG_BLK_DEV_IT8213 is not set
544# CONFIG_BLK_DEV_IT821X is not set
545# CONFIG_BLK_DEV_NS87415 is not set
546# CONFIG_BLK_DEV_PDC202XX_OLD is not set
547# CONFIG_BLK_DEV_PDC202XX_NEW is not set
548# CONFIG_BLK_DEV_SVWKS is not set
549# CONFIG_BLK_DEV_SIIMAGE is not set
550# CONFIG_BLK_DEV_SIS5513 is not set
551# CONFIG_BLK_DEV_SLC90E66 is not set
552# CONFIG_BLK_DEV_TRM290 is not set
553# CONFIG_BLK_DEV_VIA82CXXX is not set
554# CONFIG_BLK_DEV_TC86C001 is not set
555# CONFIG_IDE_ARM is not set
556CONFIG_BLK_DEV_IDEDMA=y
557# CONFIG_IDEDMA_IVB is not set
558# CONFIG_BLK_DEV_HD is not set
559 769
560# 770#
561# SCSI device support 771# SCSI device support
@@ -564,8 +774,8 @@ CONFIG_BLK_DEV_IDEDMA=y
564CONFIG_SCSI=y 774CONFIG_SCSI=y
565CONFIG_SCSI_DMA=y 775CONFIG_SCSI_DMA=y
566# CONFIG_SCSI_TGT is not set 776# CONFIG_SCSI_TGT is not set
567CONFIG_SCSI_NETLINK=y 777# CONFIG_SCSI_NETLINK is not set
568# CONFIG_SCSI_PROC_FS is not set 778CONFIG_SCSI_PROC_FS=y
569 779
570# 780#
571# SCSI support type (disk, tape, CD-ROM) 781# SCSI support type (disk, tape, CD-ROM)
@@ -574,7 +784,7 @@ CONFIG_BLK_DEV_SD=y
574# CONFIG_CHR_DEV_ST is not set 784# CONFIG_CHR_DEV_ST is not set
575# CONFIG_CHR_DEV_OSST is not set 785# CONFIG_CHR_DEV_OSST is not set
576CONFIG_BLK_DEV_SR=y 786CONFIG_BLK_DEV_SR=y
577# CONFIG_BLK_DEV_SR_VENDOR is not set 787CONFIG_BLK_DEV_SR_VENDOR=y
578CONFIG_CHR_DEV_SG=y 788CONFIG_CHR_DEV_SG=y
579# CONFIG_CHR_DEV_SCH is not set 789# CONFIG_CHR_DEV_SCH is not set
580 790
@@ -582,7 +792,7 @@ CONFIG_CHR_DEV_SG=y
582# Some SCSI devices (e.g. CD jukebox) support multiple LUNs 792# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
583# 793#
584# CONFIG_SCSI_MULTI_LUN is not set 794# CONFIG_SCSI_MULTI_LUN is not set
585# CONFIG_SCSI_CONSTANTS is not set 795CONFIG_SCSI_CONSTANTS=y
586# CONFIG_SCSI_LOGGING is not set 796# CONFIG_SCSI_LOGGING is not set
587# CONFIG_SCSI_SCAN_ASYNC is not set 797# CONFIG_SCSI_SCAN_ASYNC is not set
588CONFIG_SCSI_WAIT_SCAN=m 798CONFIG_SCSI_WAIT_SCAN=m
@@ -591,81 +801,37 @@ CONFIG_SCSI_WAIT_SCAN=m
591# SCSI Transports 801# SCSI Transports
592# 802#
593CONFIG_SCSI_SPI_ATTRS=y 803CONFIG_SCSI_SPI_ATTRS=y
594CONFIG_SCSI_FC_ATTRS=y 804# CONFIG_SCSI_FC_ATTRS is not set
595# CONFIG_SCSI_ISCSI_ATTRS is not set 805# CONFIG_SCSI_ISCSI_ATTRS is not set
596# CONFIG_SCSI_SAS_ATTRS is not set 806# CONFIG_SCSI_SAS_ATTRS is not set
597# CONFIG_SCSI_SAS_LIBSAS is not set 807# CONFIG_SCSI_SAS_LIBSAS is not set
598 808# CONFIG_SCSI_SRP_ATTRS is not set
599# 809# CONFIG_SCSI_LOWLEVEL is not set
600# SCSI low-level drivers 810# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
601#
602# CONFIG_ISCSI_TCP is not set
603CONFIG_BLK_DEV_3W_XXXX_RAID=y
604# CONFIG_SCSI_3W_9XXX is not set
605# CONFIG_SCSI_ACARD is not set
606# CONFIG_SCSI_AACRAID is not set
607CONFIG_SCSI_AIC7XXX=y
608CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
609CONFIG_AIC7XXX_RESET_DELAY_MS=5000
610CONFIG_AIC7XXX_DEBUG_ENABLE=y
611CONFIG_AIC7XXX_DEBUG_MASK=0
612CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
613# CONFIG_SCSI_AIC7XXX_OLD is not set
614CONFIG_SCSI_AIC79XX=y
615CONFIG_AIC79XX_CMDS_PER_DEVICE=32
616CONFIG_AIC79XX_RESET_DELAY_MS=4000
617# CONFIG_AIC79XX_DEBUG_ENABLE is not set
618CONFIG_AIC79XX_DEBUG_MASK=0
619# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
620# CONFIG_SCSI_AIC94XX is not set
621# CONFIG_SCSI_DPT_I2O is not set
622# CONFIG_SCSI_ADVANSYS is not set
623# CONFIG_SCSI_ARCMSR is not set
624# CONFIG_MEGARAID_NEWGEN is not set
625# CONFIG_MEGARAID_LEGACY is not set
626# CONFIG_MEGARAID_SAS is not set
627# CONFIG_SCSI_HPTIOP is not set
628# CONFIG_SCSI_BUSLOGIC is not set
629# CONFIG_SCSI_DMX3191D is not set
630# CONFIG_SCSI_EATA is not set
631# CONFIG_SCSI_FUTURE_DOMAIN is not set
632# CONFIG_SCSI_GDTH is not set
633# CONFIG_SCSI_IPS is not set
634# CONFIG_SCSI_INITIO is not set
635# CONFIG_SCSI_INIA100 is not set
636# CONFIG_SCSI_STEX is not set
637# CONFIG_SCSI_SYM53C8XX_2 is not set
638# CONFIG_SCSI_IPR is not set
639# CONFIG_SCSI_QLOGIC_1280 is not set
640# CONFIG_SCSI_QLA_FC is not set
641# CONFIG_SCSI_QLA_ISCSI is not set
642# CONFIG_SCSI_LPFC is not set
643# CONFIG_SCSI_DC395x is not set
644# CONFIG_SCSI_DC390T is not set
645# CONFIG_SCSI_NSP32 is not set
646# CONFIG_SCSI_DEBUG is not set
647# CONFIG_SCSI_SRP is not set
648CONFIG_ATA=y 811CONFIG_ATA=y
649# CONFIG_ATA_NONSTANDARD is not set 812# CONFIG_ATA_NONSTANDARD is not set
650CONFIG_ATA_ACPI=y 813CONFIG_ATA_ACPI=y
814CONFIG_SATA_PMP=y
651CONFIG_SATA_AHCI=y 815CONFIG_SATA_AHCI=y
652CONFIG_SATA_SVW=y 816# CONFIG_SATA_SIL24 is not set
817CONFIG_ATA_SFF=y
818# CONFIG_SATA_SVW is not set
653CONFIG_ATA_PIIX=y 819CONFIG_ATA_PIIX=y
654# CONFIG_SATA_MV is not set 820# CONFIG_SATA_MV is not set
655CONFIG_SATA_NV=y 821# CONFIG_SATA_NV is not set
656# CONFIG_PDC_ADMA is not set 822# CONFIG_PDC_ADMA is not set
657# CONFIG_SATA_QSTOR is not set 823# CONFIG_SATA_QSTOR is not set
658# CONFIG_SATA_PROMISE is not set 824# CONFIG_SATA_PROMISE is not set
659# CONFIG_SATA_SX4 is not set 825# CONFIG_SATA_SX4 is not set
660CONFIG_SATA_SIL=y 826# CONFIG_SATA_SIL is not set
661# CONFIG_SATA_SIL24 is not set
662# CONFIG_SATA_SIS is not set 827# CONFIG_SATA_SIS is not set
663# CONFIG_SATA_ULI is not set 828# CONFIG_SATA_ULI is not set
664CONFIG_SATA_VIA=y 829# CONFIG_SATA_VIA is not set
665# CONFIG_SATA_VITESSE is not set 830# CONFIG_SATA_VITESSE is not set
666# CONFIG_SATA_INIC162X is not set 831# CONFIG_SATA_INIC162X is not set
832# CONFIG_PATA_ACPI is not set
667# CONFIG_PATA_ALI is not set 833# CONFIG_PATA_ALI is not set
668# CONFIG_PATA_AMD is not set 834CONFIG_PATA_AMD=y
669# CONFIG_PATA_ARTOP is not set 835# CONFIG_PATA_ARTOP is not set
670# CONFIG_PATA_ATIIXP is not set 836# CONFIG_PATA_ATIIXP is not set
671# CONFIG_PATA_CMD640_PCI is not set 837# CONFIG_PATA_CMD640_PCI is not set
@@ -673,6 +839,7 @@ CONFIG_SATA_VIA=y
673# CONFIG_PATA_CS5520 is not set 839# CONFIG_PATA_CS5520 is not set
674# CONFIG_PATA_CS5530 is not set 840# CONFIG_PATA_CS5530 is not set
675# CONFIG_PATA_CS5535 is not set 841# CONFIG_PATA_CS5535 is not set
842# CONFIG_PATA_CS5536 is not set
676# CONFIG_PATA_CYPRESS is not set 843# CONFIG_PATA_CYPRESS is not set
677# CONFIG_PATA_EFAR is not set 844# CONFIG_PATA_EFAR is not set
678# CONFIG_ATA_GENERIC is not set 845# CONFIG_ATA_GENERIC is not set
@@ -686,11 +853,14 @@ CONFIG_SATA_VIA=y
686# CONFIG_PATA_TRIFLEX is not set 853# CONFIG_PATA_TRIFLEX is not set
687# CONFIG_PATA_MARVELL is not set 854# CONFIG_PATA_MARVELL is not set
688# CONFIG_PATA_MPIIX is not set 855# CONFIG_PATA_MPIIX is not set
689# CONFIG_PATA_OLDPIIX is not set 856CONFIG_PATA_OLDPIIX=y
690# CONFIG_PATA_NETCELL is not set 857# CONFIG_PATA_NETCELL is not set
858# CONFIG_PATA_NINJA32 is not set
691# CONFIG_PATA_NS87410 is not set 859# CONFIG_PATA_NS87410 is not set
860# CONFIG_PATA_NS87415 is not set
692# CONFIG_PATA_OPTI is not set 861# CONFIG_PATA_OPTI is not set
693# CONFIG_PATA_OPTIDMA is not set 862# CONFIG_PATA_OPTIDMA is not set
863# CONFIG_PATA_PCMCIA is not set
694# CONFIG_PATA_PDC_OLD is not set 864# CONFIG_PATA_PDC_OLD is not set
695# CONFIG_PATA_RADISYS is not set 865# CONFIG_PATA_RADISYS is not set
696# CONFIG_PATA_RZ1000 is not set 866# CONFIG_PATA_RZ1000 is not set
@@ -702,65 +872,42 @@ CONFIG_SATA_VIA=y
702# CONFIG_PATA_VIA is not set 872# CONFIG_PATA_VIA is not set
703# CONFIG_PATA_WINBOND is not set 873# CONFIG_PATA_WINBOND is not set
704CONFIG_MD=y 874CONFIG_MD=y
705# CONFIG_BLK_DEV_MD is not set 875CONFIG_BLK_DEV_MD=y
876# CONFIG_MD_LINEAR is not set
877# CONFIG_MD_RAID0 is not set
878# CONFIG_MD_RAID1 is not set
879# CONFIG_MD_RAID10 is not set
880# CONFIG_MD_RAID456 is not set
881# CONFIG_MD_MULTIPATH is not set
882# CONFIG_MD_FAULTY is not set
706CONFIG_BLK_DEV_DM=y 883CONFIG_BLK_DEV_DM=y
707# CONFIG_DM_DEBUG is not set 884# CONFIG_DM_DEBUG is not set
708# CONFIG_DM_CRYPT is not set 885# CONFIG_DM_CRYPT is not set
709# CONFIG_DM_SNAPSHOT is not set 886# CONFIG_DM_SNAPSHOT is not set
710# CONFIG_DM_MIRROR is not set 887CONFIG_DM_MIRROR=y
711# CONFIG_DM_ZERO is not set 888CONFIG_DM_ZERO=y
712# CONFIG_DM_MULTIPATH is not set 889# CONFIG_DM_MULTIPATH is not set
713# CONFIG_DM_DELAY is not set 890# CONFIG_DM_DELAY is not set
714 891# CONFIG_DM_UEVENT is not set
715# 892# CONFIG_FUSION is not set
716# Fusion MPT device support
717#
718CONFIG_FUSION=y
719CONFIG_FUSION_SPI=y
720# CONFIG_FUSION_FC is not set
721# CONFIG_FUSION_SAS is not set
722CONFIG_FUSION_MAX_SGE=128
723# CONFIG_FUSION_CTL is not set
724 893
725# 894#
726# IEEE 1394 (FireWire) support 895# IEEE 1394 (FireWire) support
727# 896#
728# CONFIG_FIREWIRE is not set 897# CONFIG_FIREWIRE is not set
729CONFIG_IEEE1394=y 898# CONFIG_IEEE1394 is not set
730
731#
732# Subsystem Options
733#
734# CONFIG_IEEE1394_VERBOSEDEBUG is not set
735
736#
737# Controllers
738#
739
740#
741# Texas Instruments PCILynx requires I2C
742#
743CONFIG_IEEE1394_OHCI1394=y
744
745#
746# Protocols
747#
748# CONFIG_IEEE1394_VIDEO1394 is not set
749# CONFIG_IEEE1394_SBP2 is not set
750# CONFIG_IEEE1394_ETH1394_ROM_ENTRY is not set
751# CONFIG_IEEE1394_ETH1394 is not set
752# CONFIG_IEEE1394_DV1394 is not set
753CONFIG_IEEE1394_RAWIO=y
754# CONFIG_I2O is not set 899# CONFIG_I2O is not set
755CONFIG_MACINTOSH_DRIVERS=y 900CONFIG_MACINTOSH_DRIVERS=y
756# CONFIG_MAC_EMUMOUSEBTN is not set 901CONFIG_MAC_EMUMOUSEBTN=y
757CONFIG_NETDEVICES=y 902CONFIG_NETDEVICES=y
758CONFIG_NETDEVICES_MULTIQUEUE=y 903# CONFIG_NETDEVICES_MULTIQUEUE is not set
904# CONFIG_IFB is not set
759# CONFIG_DUMMY is not set 905# CONFIG_DUMMY is not set
760# CONFIG_BONDING is not set 906# CONFIG_BONDING is not set
761# CONFIG_MACVLAN is not set 907# CONFIG_MACVLAN is not set
762# CONFIG_EQUALIZER is not set 908# CONFIG_EQUALIZER is not set
763# CONFIG_TUN is not set 909# CONFIG_TUN is not set
910# CONFIG_VETH is not set
764# CONFIG_NET_SB1000 is not set 911# CONFIG_NET_SB1000 is not set
765# CONFIG_ARCNET is not set 912# CONFIG_ARCNET is not set
766# CONFIG_PHYLIB is not set 913# CONFIG_PHYLIB is not set
@@ -770,38 +917,40 @@ CONFIG_MII=y
770# CONFIG_SUNGEM is not set 917# CONFIG_SUNGEM is not set
771# CONFIG_CASSINI is not set 918# CONFIG_CASSINI is not set
772CONFIG_NET_VENDOR_3COM=y 919CONFIG_NET_VENDOR_3COM=y
773CONFIG_VORTEX=y 920# CONFIG_VORTEX is not set
774# CONFIG_TYPHOON is not set 921# CONFIG_TYPHOON is not set
775CONFIG_NET_TULIP=y 922CONFIG_NET_TULIP=y
776# CONFIG_DE2104X is not set 923# CONFIG_DE2104X is not set
777CONFIG_TULIP=y 924# CONFIG_TULIP is not set
778# CONFIG_TULIP_MWI is not set
779# CONFIG_TULIP_MMIO is not set
780# CONFIG_TULIP_NAPI is not set
781# CONFIG_DE4X5 is not set 925# CONFIG_DE4X5 is not set
782# CONFIG_WINBOND_840 is not set 926# CONFIG_WINBOND_840 is not set
783# CONFIG_DM9102 is not set 927# CONFIG_DM9102 is not set
784# CONFIG_ULI526X is not set 928# CONFIG_ULI526X is not set
929# CONFIG_PCMCIA_XIRCOM is not set
785# CONFIG_HP100 is not set 930# CONFIG_HP100 is not set
931# CONFIG_IBM_NEW_EMAC_ZMII is not set
932# CONFIG_IBM_NEW_EMAC_RGMII is not set
933# CONFIG_IBM_NEW_EMAC_TAH is not set
934# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
786CONFIG_NET_PCI=y 935CONFIG_NET_PCI=y
787# CONFIG_PCNET32 is not set 936# CONFIG_PCNET32 is not set
788# CONFIG_AMD8111_ETH is not set 937# CONFIG_AMD8111_ETH is not set
789# CONFIG_ADAPTEC_STARFIRE is not set 938# CONFIG_ADAPTEC_STARFIRE is not set
790CONFIG_B44=y 939# CONFIG_B44 is not set
791CONFIG_FORCEDETH=y 940CONFIG_FORCEDETH=y
792# CONFIG_FORCEDETH_NAPI is not set 941# CONFIG_FORCEDETH_NAPI is not set
793# CONFIG_DGRS is not set
794# CONFIG_EEPRO100 is not set 942# CONFIG_EEPRO100 is not set
795CONFIG_E100=y 943CONFIG_E100=y
796# CONFIG_FEALNX is not set 944# CONFIG_FEALNX is not set
797# CONFIG_NATSEMI is not set 945# CONFIG_NATSEMI is not set
798# CONFIG_NE2K_PCI is not set 946# CONFIG_NE2K_PCI is not set
799CONFIG_8139CP=y 947# CONFIG_8139CP is not set
800CONFIG_8139TOO=y 948CONFIG_8139TOO=y
801# CONFIG_8139TOO_PIO is not set 949CONFIG_8139TOO_PIO=y
802# CONFIG_8139TOO_TUNE_TWISTER is not set 950# CONFIG_8139TOO_TUNE_TWISTER is not set
803# CONFIG_8139TOO_8129 is not set 951# CONFIG_8139TOO_8129 is not set
804# CONFIG_8139_OLD_RX_RESET is not set 952# CONFIG_8139_OLD_RX_RESET is not set
953# CONFIG_R6040 is not set
805# CONFIG_SIS900 is not set 954# CONFIG_SIS900 is not set
806# CONFIG_EPIC100 is not set 955# CONFIG_EPIC100 is not set
807# CONFIG_SUNDANCE is not set 956# CONFIG_SUNDANCE is not set
@@ -814,34 +963,75 @@ CONFIG_NETDEV_1000=y
814CONFIG_E1000=y 963CONFIG_E1000=y
815# CONFIG_E1000_NAPI is not set 964# CONFIG_E1000_NAPI is not set
816# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set 965# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
966# CONFIG_E1000E is not set
967# CONFIG_E1000E_ENABLED is not set
968# CONFIG_IP1000 is not set
969# CONFIG_IGB is not set
817# CONFIG_NS83820 is not set 970# CONFIG_NS83820 is not set
818# CONFIG_HAMACHI is not set 971# CONFIG_HAMACHI is not set
819# CONFIG_YELLOWFIN is not set 972# CONFIG_YELLOWFIN is not set
820CONFIG_R8169=y 973# CONFIG_R8169 is not set
821# CONFIG_R8169_NAPI is not set
822# CONFIG_SIS190 is not set 974# CONFIG_SIS190 is not set
823# CONFIG_SKGE is not set 975# CONFIG_SKGE is not set
824CONFIG_SKY2=y 976CONFIG_SKY2=y
977# CONFIG_SKY2_DEBUG is not set
825# CONFIG_VIA_VELOCITY is not set 978# CONFIG_VIA_VELOCITY is not set
826CONFIG_TIGON3=y 979CONFIG_TIGON3=y
827CONFIG_BNX2=y 980# CONFIG_BNX2 is not set
828# CONFIG_QLA3XXX is not set 981# CONFIG_QLA3XXX is not set
829# CONFIG_ATL1 is not set 982# CONFIG_ATL1 is not set
830CONFIG_NETDEV_10000=y 983CONFIG_NETDEV_10000=y
831# CONFIG_CHELSIO_T1 is not set 984# CONFIG_CHELSIO_T1 is not set
832# CONFIG_CHELSIO_T3 is not set 985# CONFIG_CHELSIO_T3 is not set
986# CONFIG_IXGBE is not set
833# CONFIG_IXGB is not set 987# CONFIG_IXGB is not set
834# CONFIG_S2IO is not set 988# CONFIG_S2IO is not set
835# CONFIG_MYRI10GE is not set 989# CONFIG_MYRI10GE is not set
836# CONFIG_NETXEN_NIC is not set 990# CONFIG_NETXEN_NIC is not set
991# CONFIG_NIU is not set
837# CONFIG_MLX4_CORE is not set 992# CONFIG_MLX4_CORE is not set
838# CONFIG_TR is not set 993# CONFIG_TEHUTI is not set
994# CONFIG_BNX2X is not set
995# CONFIG_SFC is not set
996CONFIG_TR=y
997# CONFIG_IBMOL is not set
998# CONFIG_IBMLS is not set
999# CONFIG_3C359 is not set
1000# CONFIG_TMS380TR is not set
839 1001
840# 1002#
841# Wireless LAN 1003# Wireless LAN
842# 1004#
843# CONFIG_WLAN_PRE80211 is not set 1005# CONFIG_WLAN_PRE80211 is not set
844# CONFIG_WLAN_80211 is not set 1006CONFIG_WLAN_80211=y
1007# CONFIG_PCMCIA_RAYCS is not set
1008# CONFIG_IPW2100 is not set
1009# CONFIG_IPW2200 is not set
1010# CONFIG_LIBERTAS is not set
1011# CONFIG_AIRO is not set
1012# CONFIG_HERMES is not set
1013# CONFIG_ATMEL is not set
1014# CONFIG_AIRO_CS is not set
1015# CONFIG_PCMCIA_WL3501 is not set
1016# CONFIG_PRISM54 is not set
1017# CONFIG_USB_ZD1201 is not set
1018# CONFIG_USB_NET_RNDIS_WLAN is not set
1019# CONFIG_RTL8180 is not set
1020# CONFIG_RTL8187 is not set
1021# CONFIG_ADM8211 is not set
1022# CONFIG_P54_COMMON is not set
1023CONFIG_ATH5K=y
1024# CONFIG_ATH5K_DEBUG is not set
1025# CONFIG_IWLWIFI is not set
1026# CONFIG_IWLCORE is not set
1027# CONFIG_IWLWIFI_LEDS is not set
1028# CONFIG_IWL4965 is not set
1029# CONFIG_IWL3945 is not set
1030# CONFIG_HOSTAP is not set
1031# CONFIG_B43 is not set
1032# CONFIG_B43LEGACY is not set
1033# CONFIG_ZD1211RW is not set
1034# CONFIG_RT2X00 is not set
845 1035
846# 1036#
847# USB Network Adapters 1037# USB Network Adapters
@@ -850,16 +1040,27 @@ CONFIG_NETDEV_10000=y
850# CONFIG_USB_KAWETH is not set 1040# CONFIG_USB_KAWETH is not set
851# CONFIG_USB_PEGASUS is not set 1041# CONFIG_USB_PEGASUS is not set
852# CONFIG_USB_RTL8150 is not set 1042# CONFIG_USB_RTL8150 is not set
853# CONFIG_USB_USBNET_MII is not set
854# CONFIG_USB_USBNET is not set 1043# CONFIG_USB_USBNET is not set
1044CONFIG_NET_PCMCIA=y
1045# CONFIG_PCMCIA_3C589 is not set
1046# CONFIG_PCMCIA_3C574 is not set
1047# CONFIG_PCMCIA_FMVJ18X is not set
1048# CONFIG_PCMCIA_PCNET is not set
1049# CONFIG_PCMCIA_NMCLAN is not set
1050# CONFIG_PCMCIA_SMC91C92 is not set
1051# CONFIG_PCMCIA_XIRC2PS is not set
1052# CONFIG_PCMCIA_AXNET is not set
1053# CONFIG_PCMCIA_IBMTR is not set
855# CONFIG_WAN is not set 1054# CONFIG_WAN is not set
856# CONFIG_FDDI is not set 1055CONFIG_FDDI=y
1056# CONFIG_DEFXX is not set
1057# CONFIG_SKFP is not set
857# CONFIG_HIPPI is not set 1058# CONFIG_HIPPI is not set
858# CONFIG_PPP is not set 1059# CONFIG_PPP is not set
859# CONFIG_SLIP is not set 1060# CONFIG_SLIP is not set
860# CONFIG_NET_FC is not set 1061# CONFIG_NET_FC is not set
861# CONFIG_SHAPER is not set
862CONFIG_NETCONSOLE=y 1062CONFIG_NETCONSOLE=y
1063# CONFIG_NETCONSOLE_DYNAMIC is not set
863CONFIG_NETPOLL=y 1064CONFIG_NETPOLL=y
864# CONFIG_NETPOLL_TRAP is not set 1065# CONFIG_NETPOLL_TRAP is not set
865CONFIG_NET_POLL_CONTROLLER=y 1066CONFIG_NET_POLL_CONTROLLER=y
@@ -870,18 +1071,17 @@ CONFIG_NET_POLL_CONTROLLER=y
870# Input device support 1071# Input device support
871# 1072#
872CONFIG_INPUT=y 1073CONFIG_INPUT=y
873# CONFIG_INPUT_FF_MEMLESS is not set 1074CONFIG_INPUT_FF_MEMLESS=y
874# CONFIG_INPUT_POLLDEV is not set 1075CONFIG_INPUT_POLLDEV=y
875 1076
876# 1077#
877# Userland interfaces 1078# Userland interfaces
878# 1079#
879CONFIG_INPUT_MOUSEDEV=y 1080CONFIG_INPUT_MOUSEDEV=y
880CONFIG_INPUT_MOUSEDEV_PSAUX=y 1081# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
881CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 1082CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
882CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 1083CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
883# CONFIG_INPUT_JOYDEV is not set 1084# CONFIG_INPUT_JOYDEV is not set
884# CONFIG_INPUT_TSDEV is not set
885CONFIG_INPUT_EVDEV=y 1085CONFIG_INPUT_EVDEV=y
886# CONFIG_INPUT_EVBUG is not set 1086# CONFIG_INPUT_EVBUG is not set
887 1087
@@ -906,17 +1106,63 @@ CONFIG_MOUSE_PS2_TRACKPOINT=y
906# CONFIG_MOUSE_SERIAL is not set 1106# CONFIG_MOUSE_SERIAL is not set
907# CONFIG_MOUSE_APPLETOUCH is not set 1107# CONFIG_MOUSE_APPLETOUCH is not set
908# CONFIG_MOUSE_VSXXXAA is not set 1108# CONFIG_MOUSE_VSXXXAA is not set
909# CONFIG_INPUT_JOYSTICK is not set 1109CONFIG_INPUT_JOYSTICK=y
910# CONFIG_INPUT_TABLET is not set 1110# CONFIG_JOYSTICK_ANALOG is not set
911# CONFIG_INPUT_TOUCHSCREEN is not set 1111# CONFIG_JOYSTICK_A3D is not set
912# CONFIG_INPUT_MISC is not set 1112# CONFIG_JOYSTICK_ADI is not set
1113# CONFIG_JOYSTICK_COBRA is not set
1114# CONFIG_JOYSTICK_GF2K is not set
1115# CONFIG_JOYSTICK_GRIP is not set
1116# CONFIG_JOYSTICK_GRIP_MP is not set
1117# CONFIG_JOYSTICK_GUILLEMOT is not set
1118# CONFIG_JOYSTICK_INTERACT is not set
1119# CONFIG_JOYSTICK_SIDEWINDER is not set
1120# CONFIG_JOYSTICK_TMDC is not set
1121# CONFIG_JOYSTICK_IFORCE is not set
1122# CONFIG_JOYSTICK_WARRIOR is not set
1123# CONFIG_JOYSTICK_MAGELLAN is not set
1124# CONFIG_JOYSTICK_SPACEORB is not set
1125# CONFIG_JOYSTICK_SPACEBALL is not set
1126# CONFIG_JOYSTICK_STINGER is not set
1127# CONFIG_JOYSTICK_TWIDJOY is not set
1128# CONFIG_JOYSTICK_ZHENHUA is not set
1129# CONFIG_JOYSTICK_JOYDUMP is not set
1130# CONFIG_JOYSTICK_XPAD is not set
1131CONFIG_INPUT_TABLET=y
1132# CONFIG_TABLET_USB_ACECAD is not set
1133# CONFIG_TABLET_USB_AIPTEK is not set
1134# CONFIG_TABLET_USB_GTCO is not set
1135# CONFIG_TABLET_USB_KBTAB is not set
1136# CONFIG_TABLET_USB_WACOM is not set
1137CONFIG_INPUT_TOUCHSCREEN=y
1138# CONFIG_TOUCHSCREEN_FUJITSU is not set
1139# CONFIG_TOUCHSCREEN_GUNZE is not set
1140# CONFIG_TOUCHSCREEN_ELO is not set
1141# CONFIG_TOUCHSCREEN_MTOUCH is not set
1142# CONFIG_TOUCHSCREEN_MK712 is not set
1143# CONFIG_TOUCHSCREEN_PENMOUNT is not set
1144# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
1145# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
1146# CONFIG_TOUCHSCREEN_UCB1400 is not set
1147# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
1148CONFIG_INPUT_MISC=y
1149# CONFIG_INPUT_PCSPKR is not set
1150# CONFIG_INPUT_APANEL is not set
1151# CONFIG_INPUT_WISTRON_BTNS is not set
1152# CONFIG_INPUT_ATLAS_BTNS is not set
1153# CONFIG_INPUT_ATI_REMOTE is not set
1154# CONFIG_INPUT_ATI_REMOTE2 is not set
1155# CONFIG_INPUT_KEYSPAN_REMOTE is not set
1156# CONFIG_INPUT_POWERMATE is not set
1157# CONFIG_INPUT_YEALINK is not set
1158# CONFIG_INPUT_UINPUT is not set
913 1159
914# 1160#
915# Hardware I/O ports 1161# Hardware I/O ports
916# 1162#
917CONFIG_SERIO=y 1163CONFIG_SERIO=y
918CONFIG_SERIO_I8042=y 1164CONFIG_SERIO_I8042=y
919# CONFIG_SERIO_SERPORT is not set 1165CONFIG_SERIO_SERPORT=y
920# CONFIG_SERIO_CT82C710 is not set 1166# CONFIG_SERIO_CT82C710 is not set
921# CONFIG_SERIO_PCIPS2 is not set 1167# CONFIG_SERIO_PCIPS2 is not set
922CONFIG_SERIO_LIBPS2=y 1168CONFIG_SERIO_LIBPS2=y
@@ -929,8 +1175,26 @@ CONFIG_SERIO_LIBPS2=y
929CONFIG_VT=y 1175CONFIG_VT=y
930CONFIG_VT_CONSOLE=y 1176CONFIG_VT_CONSOLE=y
931CONFIG_HW_CONSOLE=y 1177CONFIG_HW_CONSOLE=y
932# CONFIG_VT_HW_CONSOLE_BINDING is not set 1178CONFIG_VT_HW_CONSOLE_BINDING=y
933# CONFIG_SERIAL_NONSTANDARD is not set 1179CONFIG_DEVKMEM=y
1180CONFIG_SERIAL_NONSTANDARD=y
1181# CONFIG_COMPUTONE is not set
1182# CONFIG_ROCKETPORT is not set
1183# CONFIG_CYCLADES is not set
1184# CONFIG_DIGIEPCA is not set
1185# CONFIG_MOXA_INTELLIO is not set
1186# CONFIG_MOXA_SMARTIO is not set
1187# CONFIG_ISI is not set
1188# CONFIG_SYNCLINK is not set
1189# CONFIG_SYNCLINKMP is not set
1190# CONFIG_SYNCLINK_GT is not set
1191# CONFIG_N_HDLC is not set
1192# CONFIG_RISCOM8 is not set
1193# CONFIG_SPECIALIX is not set
1194# CONFIG_SX is not set
1195# CONFIG_RIO is not set
1196# CONFIG_STALDRV is not set
1197# CONFIG_NOZOMI is not set
934 1198
935# 1199#
936# Serial drivers 1200# Serial drivers
@@ -940,9 +1204,14 @@ CONFIG_SERIAL_8250_CONSOLE=y
940CONFIG_FIX_EARLYCON_MEM=y 1204CONFIG_FIX_EARLYCON_MEM=y
941CONFIG_SERIAL_8250_PCI=y 1205CONFIG_SERIAL_8250_PCI=y
942CONFIG_SERIAL_8250_PNP=y 1206CONFIG_SERIAL_8250_PNP=y
943CONFIG_SERIAL_8250_NR_UARTS=4 1207# CONFIG_SERIAL_8250_CS is not set
1208CONFIG_SERIAL_8250_NR_UARTS=32
944CONFIG_SERIAL_8250_RUNTIME_UARTS=4 1209CONFIG_SERIAL_8250_RUNTIME_UARTS=4
945# CONFIG_SERIAL_8250_EXTENDED is not set 1210CONFIG_SERIAL_8250_EXTENDED=y
1211CONFIG_SERIAL_8250_MANY_PORTS=y
1212CONFIG_SERIAL_8250_SHARE_IRQ=y
1213CONFIG_SERIAL_8250_DETECT_IRQ=y
1214CONFIG_SERIAL_8250_RSA=y
946 1215
947# 1216#
948# Non-8250 serial port support 1217# Non-8250 serial port support
@@ -951,89 +1220,275 @@ CONFIG_SERIAL_CORE=y
951CONFIG_SERIAL_CORE_CONSOLE=y 1220CONFIG_SERIAL_CORE_CONSOLE=y
952# CONFIG_SERIAL_JSM is not set 1221# CONFIG_SERIAL_JSM is not set
953CONFIG_UNIX98_PTYS=y 1222CONFIG_UNIX98_PTYS=y
954CONFIG_LEGACY_PTYS=y 1223# CONFIG_LEGACY_PTYS is not set
955CONFIG_LEGACY_PTY_COUNT=256
956# CONFIG_IPMI_HANDLER is not set 1224# CONFIG_IPMI_HANDLER is not set
957# CONFIG_WATCHDOG is not set
958CONFIG_HW_RANDOM=y 1225CONFIG_HW_RANDOM=y
959CONFIG_HW_RANDOM_INTEL=y 1226# CONFIG_HW_RANDOM_INTEL is not set
960CONFIG_HW_RANDOM_AMD=y 1227# CONFIG_HW_RANDOM_AMD is not set
961CONFIG_HW_RANDOM_GEODE=y 1228CONFIG_HW_RANDOM_GEODE=y
962CONFIG_HW_RANDOM_VIA=y 1229CONFIG_HW_RANDOM_VIA=y
963# CONFIG_NVRAM is not set 1230CONFIG_NVRAM=y
964CONFIG_RTC=y
965# CONFIG_R3964 is not set 1231# CONFIG_R3964 is not set
966# CONFIG_APPLICOM is not set 1232# CONFIG_APPLICOM is not set
967# CONFIG_SONYPI is not set 1233# CONFIG_SONYPI is not set
968CONFIG_AGP=y 1234
969# CONFIG_AGP_ALI is not set 1235#
970# CONFIG_AGP_ATI is not set 1236# PCMCIA character devices
971# CONFIG_AGP_AMD is not set 1237#
972CONFIG_AGP_AMD64=y 1238# CONFIG_SYNCLINK_CS is not set
973CONFIG_AGP_INTEL=y 1239# CONFIG_CARDMAN_4000 is not set
974# CONFIG_AGP_NVIDIA is not set 1240# CONFIG_CARDMAN_4040 is not set
975# CONFIG_AGP_SIS is not set 1241# CONFIG_IPWIRELESS is not set
976# CONFIG_AGP_SWORKS is not set
977# CONFIG_AGP_VIA is not set
978# CONFIG_AGP_EFFICEON is not set
979# CONFIG_DRM is not set
980# CONFIG_MWAVE is not set 1242# CONFIG_MWAVE is not set
981# CONFIG_PC8736x_GPIO is not set 1243# CONFIG_PC8736x_GPIO is not set
982# CONFIG_NSC_GPIO is not set 1244# CONFIG_NSC_GPIO is not set
983# CONFIG_CS5535_GPIO is not set 1245# CONFIG_CS5535_GPIO is not set
984CONFIG_RAW_DRIVER=y 1246# CONFIG_RAW_DRIVER is not set
985CONFIG_MAX_RAW_DEVS=256
986CONFIG_HPET=y 1247CONFIG_HPET=y
987# CONFIG_HPET_RTC_IRQ is not set 1248# CONFIG_HPET_RTC_IRQ is not set
988CONFIG_HPET_MMAP=y 1249# CONFIG_HPET_MMAP is not set
989# CONFIG_HANGCHECK_TIMER is not set 1250# CONFIG_HANGCHECK_TIMER is not set
990# CONFIG_TCG_TPM is not set 1251# CONFIG_TCG_TPM is not set
991# CONFIG_TELCLOCK is not set 1252# CONFIG_TELCLOCK is not set
992CONFIG_DEVPORT=y 1253CONFIG_DEVPORT=y
993# CONFIG_I2C is not set 1254CONFIG_I2C=y
994 1255CONFIG_I2C_BOARDINFO=y
995# 1256# CONFIG_I2C_CHARDEV is not set
996# SPI support 1257
997# 1258#
1259# I2C Hardware Bus support
1260#
1261# CONFIG_I2C_ALI1535 is not set
1262# CONFIG_I2C_ALI1563 is not set
1263# CONFIG_I2C_ALI15X3 is not set
1264# CONFIG_I2C_AMD756 is not set
1265# CONFIG_I2C_AMD8111 is not set
1266CONFIG_I2C_I801=y
1267# CONFIG_I2C_I810 is not set
1268# CONFIG_I2C_PIIX4 is not set
1269# CONFIG_I2C_NFORCE2 is not set
1270# CONFIG_I2C_OCORES is not set
1271# CONFIG_I2C_PARPORT_LIGHT is not set
1272# CONFIG_I2C_PROSAVAGE is not set
1273# CONFIG_I2C_SAVAGE4 is not set
1274# CONFIG_I2C_SIMTEC is not set
1275# CONFIG_SCx200_ACB is not set
1276# CONFIG_I2C_SIS5595 is not set
1277# CONFIG_I2C_SIS630 is not set
1278# CONFIG_I2C_SIS96X is not set
1279# CONFIG_I2C_TAOS_EVM is not set
1280# CONFIG_I2C_STUB is not set
1281# CONFIG_I2C_TINY_USB is not set
1282# CONFIG_I2C_VIA is not set
1283# CONFIG_I2C_VIAPRO is not set
1284# CONFIG_I2C_VOODOO3 is not set
1285# CONFIG_I2C_PCA_PLATFORM is not set
1286
1287#
1288# Miscellaneous I2C Chip support
1289#
1290# CONFIG_DS1682 is not set
1291# CONFIG_SENSORS_EEPROM is not set
1292# CONFIG_SENSORS_PCF8574 is not set
1293# CONFIG_PCF8575 is not set
1294# CONFIG_SENSORS_PCF8591 is not set
1295# CONFIG_SENSORS_MAX6875 is not set
1296# CONFIG_SENSORS_TSL2550 is not set
1297# CONFIG_I2C_DEBUG_CORE is not set
1298# CONFIG_I2C_DEBUG_ALGO is not set
1299# CONFIG_I2C_DEBUG_BUS is not set
1300# CONFIG_I2C_DEBUG_CHIP is not set
998# CONFIG_SPI is not set 1301# CONFIG_SPI is not set
999# CONFIG_SPI_MASTER is not set
1000# CONFIG_W1 is not set 1302# CONFIG_W1 is not set
1001# CONFIG_POWER_SUPPLY is not set 1303CONFIG_POWER_SUPPLY=y
1304# CONFIG_POWER_SUPPLY_DEBUG is not set
1305# CONFIG_PDA_POWER is not set
1306# CONFIG_BATTERY_DS2760 is not set
1002# CONFIG_HWMON is not set 1307# CONFIG_HWMON is not set
1308CONFIG_THERMAL=y
1309CONFIG_WATCHDOG=y
1310# CONFIG_WATCHDOG_NOWAYOUT is not set
1311
1312#
1313# Watchdog Device Drivers
1314#
1315# CONFIG_SOFT_WATCHDOG is not set
1316# CONFIG_ACQUIRE_WDT is not set
1317# CONFIG_ADVANTECH_WDT is not set
1318# CONFIG_ALIM1535_WDT is not set
1319# CONFIG_ALIM7101_WDT is not set
1320# CONFIG_SC520_WDT is not set
1321# CONFIG_EUROTECH_WDT is not set
1322# CONFIG_IB700_WDT is not set
1323# CONFIG_IBMASR is not set
1324# CONFIG_WAFER_WDT is not set
1325# CONFIG_I6300ESB_WDT is not set
1326# CONFIG_ITCO_WDT is not set
1327# CONFIG_IT8712F_WDT is not set
1328# CONFIG_HP_WATCHDOG is not set
1329# CONFIG_SC1200_WDT is not set
1330# CONFIG_PC87413_WDT is not set
1331# CONFIG_60XX_WDT is not set
1332# CONFIG_SBC8360_WDT is not set
1333# CONFIG_SBC7240_WDT is not set
1334# CONFIG_CPU5_WDT is not set
1335# CONFIG_SMSC37B787_WDT is not set
1336# CONFIG_W83627HF_WDT is not set
1337# CONFIG_W83697HF_WDT is not set
1338# CONFIG_W83877F_WDT is not set
1339# CONFIG_W83977F_WDT is not set
1340# CONFIG_MACHZ_WDT is not set
1341# CONFIG_SBC_EPX_C3_WATCHDOG is not set
1342
1343#
1344# PCI-based Watchdog Cards
1345#
1346# CONFIG_PCIPCWATCHDOG is not set
1347# CONFIG_WDTPCI is not set
1348
1349#
1350# USB-based Watchdog Cards
1351#
1352# CONFIG_USBPCWATCHDOG is not set
1353
1354#
1355# Sonics Silicon Backplane
1356#
1357CONFIG_SSB_POSSIBLE=y
1358# CONFIG_SSB is not set
1003 1359
1004# 1360#
1005# Multifunction device drivers 1361# Multifunction device drivers
1006# 1362#
1007# CONFIG_MFD_SM501 is not set 1363# CONFIG_MFD_SM501 is not set
1364# CONFIG_HTC_PASIC3 is not set
1008 1365
1009# 1366#
1010# Multimedia devices 1367# Multimedia devices
1011# 1368#
1369
1370#
1371# Multimedia core support
1372#
1012# CONFIG_VIDEO_DEV is not set 1373# CONFIG_VIDEO_DEV is not set
1013# CONFIG_DVB_CORE is not set 1374# CONFIG_DVB_CORE is not set
1375
1376#
1377# Multimedia drivers
1378#
1014CONFIG_DAB=y 1379CONFIG_DAB=y
1015# CONFIG_USB_DABUSB is not set 1380# CONFIG_USB_DABUSB is not set
1016 1381
1017# 1382#
1018# Graphics support 1383# Graphics support
1019# 1384#
1020# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 1385CONFIG_AGP=y
1386# CONFIG_AGP_ALI is not set
1387# CONFIG_AGP_ATI is not set
1388# CONFIG_AGP_AMD is not set
1389CONFIG_AGP_AMD64=y
1390CONFIG_AGP_INTEL=y
1391# CONFIG_AGP_NVIDIA is not set
1392# CONFIG_AGP_SIS is not set
1393# CONFIG_AGP_SWORKS is not set
1394# CONFIG_AGP_VIA is not set
1395# CONFIG_AGP_EFFICEON is not set
1396CONFIG_DRM=y
1397# CONFIG_DRM_TDFX is not set
1398# CONFIG_DRM_R128 is not set
1399# CONFIG_DRM_RADEON is not set
1400# CONFIG_DRM_I810 is not set
1401# CONFIG_DRM_I830 is not set
1402CONFIG_DRM_I915=y
1403# CONFIG_DRM_MGA is not set
1404# CONFIG_DRM_SIS is not set
1405# CONFIG_DRM_VIA is not set
1406# CONFIG_DRM_SAVAGE is not set
1407# CONFIG_VGASTATE is not set
1408# CONFIG_VIDEO_OUTPUT_CONTROL is not set
1409CONFIG_FB=y
1410# CONFIG_FIRMWARE_EDID is not set
1411# CONFIG_FB_DDC is not set
1412CONFIG_FB_CFB_FILLRECT=y
1413CONFIG_FB_CFB_COPYAREA=y
1414CONFIG_FB_CFB_IMAGEBLIT=y
1415# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
1416# CONFIG_FB_SYS_FILLRECT is not set
1417# CONFIG_FB_SYS_COPYAREA is not set
1418# CONFIG_FB_SYS_IMAGEBLIT is not set
1419# CONFIG_FB_FOREIGN_ENDIAN is not set
1420# CONFIG_FB_SYS_FOPS is not set
1421CONFIG_FB_DEFERRED_IO=y
1422# CONFIG_FB_SVGALIB is not set
1423# CONFIG_FB_MACMODES is not set
1424# CONFIG_FB_BACKLIGHT is not set
1425CONFIG_FB_MODE_HELPERS=y
1426CONFIG_FB_TILEBLITTING=y
1427
1428#
1429# Frame buffer hardware drivers
1430#
1431# CONFIG_FB_CIRRUS is not set
1432# CONFIG_FB_PM2 is not set
1433# CONFIG_FB_CYBER2000 is not set
1434# CONFIG_FB_ARC is not set
1435# CONFIG_FB_ASILIANT is not set
1436# CONFIG_FB_IMSTT is not set
1437# CONFIG_FB_VGA16 is not set
1438# CONFIG_FB_UVESA is not set
1439# CONFIG_FB_VESA is not set
1440CONFIG_FB_EFI=y
1441# CONFIG_FB_IMAC is not set
1442# CONFIG_FB_N411 is not set
1443# CONFIG_FB_HGA is not set
1444# CONFIG_FB_S1D13XXX is not set
1445# CONFIG_FB_NVIDIA is not set
1446# CONFIG_FB_RIVA is not set
1447# CONFIG_FB_I810 is not set
1448# CONFIG_FB_LE80578 is not set
1449# CONFIG_FB_INTEL is not set
1450# CONFIG_FB_MATROX is not set
1451# CONFIG_FB_RADEON is not set
1452# CONFIG_FB_ATY128 is not set
1453# CONFIG_FB_ATY is not set
1454# CONFIG_FB_S3 is not set
1455# CONFIG_FB_SAVAGE is not set
1456# CONFIG_FB_SIS is not set
1457# CONFIG_FB_NEOMAGIC is not set
1458# CONFIG_FB_KYRO is not set
1459# CONFIG_FB_3DFX is not set
1460# CONFIG_FB_VOODOO1 is not set
1461# CONFIG_FB_VT8623 is not set
1462# CONFIG_FB_CYBLA is not set
1463# CONFIG_FB_TRIDENT is not set
1464# CONFIG_FB_ARK is not set
1465# CONFIG_FB_PM3 is not set
1466# CONFIG_FB_GEODE is not set
1467# CONFIG_FB_VIRTUAL is not set
1468CONFIG_BACKLIGHT_LCD_SUPPORT=y
1469# CONFIG_LCD_CLASS_DEVICE is not set
1470CONFIG_BACKLIGHT_CLASS_DEVICE=y
1471# CONFIG_BACKLIGHT_CORGI is not set
1472# CONFIG_BACKLIGHT_PROGEAR is not set
1021 1473
1022# 1474#
1023# Display device support 1475# Display device support
1024# 1476#
1025# CONFIG_DISPLAY_SUPPORT is not set 1477# CONFIG_DISPLAY_SUPPORT is not set
1026# CONFIG_VGASTATE is not set
1027# CONFIG_FB is not set
1028 1478
1029# 1479#
1030# Console display driver support 1480# Console display driver support
1031# 1481#
1032CONFIG_VGA_CONSOLE=y 1482CONFIG_VGA_CONSOLE=y
1033CONFIG_VGACON_SOFT_SCROLLBACK=y 1483CONFIG_VGACON_SOFT_SCROLLBACK=y
1034CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=128 1484CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64
1035CONFIG_VIDEO_SELECT=y 1485CONFIG_VIDEO_SELECT=y
1036CONFIG_DUMMY_CONSOLE=y 1486CONFIG_DUMMY_CONSOLE=y
1487# CONFIG_FRAMEBUFFER_CONSOLE is not set
1488CONFIG_LOGO=y
1489# CONFIG_LOGO_LINUX_MONO is not set
1490# CONFIG_LOGO_LINUX_VGA16 is not set
1491CONFIG_LOGO_LINUX_CLUT224=y
1037 1492
1038# 1493#
1039# Sound 1494# Sound
@@ -1043,33 +1498,167 @@ CONFIG_SOUND=y
1043# 1498#
1044# Advanced Linux Sound Architecture 1499# Advanced Linux Sound Architecture
1045# 1500#
1046# CONFIG_SND is not set 1501CONFIG_SND=y
1502CONFIG_SND_TIMER=y
1503CONFIG_SND_PCM=y
1504CONFIG_SND_HWDEP=y
1505CONFIG_SND_SEQUENCER=y
1506CONFIG_SND_SEQ_DUMMY=y
1507CONFIG_SND_OSSEMUL=y
1508CONFIG_SND_MIXER_OSS=y
1509CONFIG_SND_PCM_OSS=y
1510CONFIG_SND_PCM_OSS_PLUGINS=y
1511CONFIG_SND_SEQUENCER_OSS=y
1512CONFIG_SND_DYNAMIC_MINORS=y
1513CONFIG_SND_SUPPORT_OLD_API=y
1514CONFIG_SND_VERBOSE_PROCFS=y
1515# CONFIG_SND_VERBOSE_PRINTK is not set
1516# CONFIG_SND_DEBUG is not set
1517CONFIG_SND_VMASTER=y
1518
1519#
1520# Generic devices
1521#
1522# CONFIG_SND_PCSP is not set
1523# CONFIG_SND_DUMMY is not set
1524# CONFIG_SND_VIRMIDI is not set
1525# CONFIG_SND_MTPAV is not set
1526# CONFIG_SND_SERIAL_U16550 is not set
1527# CONFIG_SND_MPU401 is not set
1528
1529#
1530# PCI devices
1531#
1532# CONFIG_SND_AD1889 is not set
1533# CONFIG_SND_ALS300 is not set
1534# CONFIG_SND_ALS4000 is not set
1535# CONFIG_SND_ALI5451 is not set
1536# CONFIG_SND_ATIIXP is not set
1537# CONFIG_SND_ATIIXP_MODEM is not set
1538# CONFIG_SND_AU8810 is not set
1539# CONFIG_SND_AU8820 is not set
1540# CONFIG_SND_AU8830 is not set
1541# CONFIG_SND_AW2 is not set
1542# CONFIG_SND_AZT3328 is not set
1543# CONFIG_SND_BT87X is not set
1544# CONFIG_SND_CA0106 is not set
1545# CONFIG_SND_CMIPCI is not set
1546# CONFIG_SND_OXYGEN is not set
1547# CONFIG_SND_CS4281 is not set
1548# CONFIG_SND_CS46XX is not set
1549# CONFIG_SND_CS5530 is not set
1550# CONFIG_SND_CS5535AUDIO is not set
1551# CONFIG_SND_DARLA20 is not set
1552# CONFIG_SND_GINA20 is not set
1553# CONFIG_SND_LAYLA20 is not set
1554# CONFIG_SND_DARLA24 is not set
1555# CONFIG_SND_GINA24 is not set
1556# CONFIG_SND_LAYLA24 is not set
1557# CONFIG_SND_MONA is not set
1558# CONFIG_SND_MIA is not set
1559# CONFIG_SND_ECHO3G is not set
1560# CONFIG_SND_INDIGO is not set
1561# CONFIG_SND_INDIGOIO is not set
1562# CONFIG_SND_INDIGODJ is not set
1563# CONFIG_SND_EMU10K1 is not set
1564# CONFIG_SND_EMU10K1X is not set
1565# CONFIG_SND_ENS1370 is not set
1566# CONFIG_SND_ENS1371 is not set
1567# CONFIG_SND_ES1938 is not set
1568# CONFIG_SND_ES1968 is not set
1569# CONFIG_SND_FM801 is not set
1570CONFIG_SND_HDA_INTEL=y
1571CONFIG_SND_HDA_HWDEP=y
1572CONFIG_SND_HDA_CODEC_REALTEK=y
1573CONFIG_SND_HDA_CODEC_ANALOG=y
1574CONFIG_SND_HDA_CODEC_SIGMATEL=y
1575CONFIG_SND_HDA_CODEC_VIA=y
1576CONFIG_SND_HDA_CODEC_ATIHDMI=y
1577CONFIG_SND_HDA_CODEC_CONEXANT=y
1578CONFIG_SND_HDA_CODEC_CMEDIA=y
1579CONFIG_SND_HDA_CODEC_SI3054=y
1580CONFIG_SND_HDA_GENERIC=y
1581# CONFIG_SND_HDA_POWER_SAVE is not set
1582# CONFIG_SND_HDSP is not set
1583# CONFIG_SND_HDSPM is not set
1584# CONFIG_SND_HIFIER is not set
1585# CONFIG_SND_ICE1712 is not set
1586# CONFIG_SND_ICE1724 is not set
1587# CONFIG_SND_INTEL8X0 is not set
1588# CONFIG_SND_INTEL8X0M is not set
1589# CONFIG_SND_KORG1212 is not set
1590# CONFIG_SND_MAESTRO3 is not set
1591# CONFIG_SND_MIXART is not set
1592# CONFIG_SND_NM256 is not set
1593# CONFIG_SND_PCXHR is not set
1594# CONFIG_SND_RIPTIDE is not set
1595# CONFIG_SND_RME32 is not set
1596# CONFIG_SND_RME96 is not set
1597# CONFIG_SND_RME9652 is not set
1598# CONFIG_SND_SIS7019 is not set
1599# CONFIG_SND_SONICVIBES is not set
1600# CONFIG_SND_TRIDENT is not set
1601# CONFIG_SND_VIA82XX is not set
1602# CONFIG_SND_VIA82XX_MODEM is not set
1603# CONFIG_SND_VIRTUOSO is not set
1604# CONFIG_SND_VX222 is not set
1605# CONFIG_SND_YMFPCI is not set
1606
1607#
1608# USB devices
1609#
1610# CONFIG_SND_USB_AUDIO is not set
1611# CONFIG_SND_USB_USX2Y is not set
1612# CONFIG_SND_USB_CAIAQ is not set
1613
1614#
1615# PCMCIA devices
1616#
1617# CONFIG_SND_VXPOCKET is not set
1618# CONFIG_SND_PDAUDIOCF is not set
1619
1620#
1621# System on Chip audio support
1622#
1623# CONFIG_SND_SOC is not set
1624
1625#
1626# ALSA SoC audio for Freescale SOCs
1627#
1628
1629#
1630# SoC Audio for the Texas Instruments OMAP
1631#
1047 1632
1048# 1633#
1049# Open Sound System 1634# Open Sound System
1050# 1635#
1051CONFIG_SOUND_PRIME=y 1636# CONFIG_SOUND_PRIME is not set
1052# CONFIG_SOUND_TRIDENT is not set
1053# CONFIG_SOUND_MSNDCLAS is not set
1054# CONFIG_SOUND_MSNDPIN is not set
1055# CONFIG_SOUND_OSS is not set
1056CONFIG_HID_SUPPORT=y 1637CONFIG_HID_SUPPORT=y
1057CONFIG_HID=y 1638CONFIG_HID=y
1058# CONFIG_HID_DEBUG is not set 1639CONFIG_HID_DEBUG=y
1640CONFIG_HIDRAW=y
1059 1641
1060# 1642#
1061# USB Input Devices 1643# USB Input Devices
1062# 1644#
1063CONFIG_USB_HID=y 1645CONFIG_USB_HID=y
1064# CONFIG_USB_HIDINPUT_POWERBOOK is not set 1646CONFIG_USB_HIDINPUT_POWERBOOK=y
1065# CONFIG_HID_FF is not set 1647CONFIG_HID_FF=y
1066# CONFIG_USB_HIDDEV is not set 1648CONFIG_HID_PID=y
1649CONFIG_LOGITECH_FF=y
1650# CONFIG_LOGIRUMBLEPAD2_FF is not set
1651CONFIG_PANTHERLORD_FF=y
1652CONFIG_THRUSTMASTER_FF=y
1653CONFIG_ZEROPLUS_FF=y
1654CONFIG_USB_HIDDEV=y
1067CONFIG_USB_SUPPORT=y 1655CONFIG_USB_SUPPORT=y
1068CONFIG_USB_ARCH_HAS_HCD=y 1656CONFIG_USB_ARCH_HAS_HCD=y
1069CONFIG_USB_ARCH_HAS_OHCI=y 1657CONFIG_USB_ARCH_HAS_OHCI=y
1070CONFIG_USB_ARCH_HAS_EHCI=y 1658CONFIG_USB_ARCH_HAS_EHCI=y
1071CONFIG_USB=y 1659CONFIG_USB=y
1072# CONFIG_USB_DEBUG is not set 1660CONFIG_USB_DEBUG=y
1661CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
1073 1662
1074# 1663#
1075# Miscellaneous USB options 1664# Miscellaneous USB options
@@ -1077,18 +1666,18 @@ CONFIG_USB=y
1077CONFIG_USB_DEVICEFS=y 1666CONFIG_USB_DEVICEFS=y
1078# CONFIG_USB_DEVICE_CLASS is not set 1667# CONFIG_USB_DEVICE_CLASS is not set
1079# CONFIG_USB_DYNAMIC_MINORS is not set 1668# CONFIG_USB_DYNAMIC_MINORS is not set
1080# CONFIG_USB_SUSPEND is not set 1669CONFIG_USB_SUSPEND=y
1081# CONFIG_USB_PERSIST is not set
1082# CONFIG_USB_OTG is not set 1670# CONFIG_USB_OTG is not set
1083 1671
1084# 1672#
1085# USB Host Controller Drivers 1673# USB Host Controller Drivers
1086# 1674#
1675# CONFIG_USB_C67X00_HCD is not set
1087CONFIG_USB_EHCI_HCD=y 1676CONFIG_USB_EHCI_HCD=y
1088# CONFIG_USB_EHCI_SPLIT_ISO is not set
1089# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1677# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1090# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1678# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1091# CONFIG_USB_ISP116X_HCD is not set 1679# CONFIG_USB_ISP116X_HCD is not set
1680# CONFIG_USB_ISP1760_HCD is not set
1092CONFIG_USB_OHCI_HCD=y 1681CONFIG_USB_OHCI_HCD=y
1093# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1682# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1094# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set 1683# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
@@ -1121,8 +1710,10 @@ CONFIG_USB_STORAGE=y
1121# CONFIG_USB_STORAGE_SDDR55 is not set 1710# CONFIG_USB_STORAGE_SDDR55 is not set
1122# CONFIG_USB_STORAGE_JUMPSHOT is not set 1711# CONFIG_USB_STORAGE_JUMPSHOT is not set
1123# CONFIG_USB_STORAGE_ALAUDA is not set 1712# CONFIG_USB_STORAGE_ALAUDA is not set
1713# CONFIG_USB_STORAGE_ONETOUCH is not set
1124# CONFIG_USB_STORAGE_KARMA is not set 1714# CONFIG_USB_STORAGE_KARMA is not set
1125# CONFIG_USB_LIBUSUAL is not set 1715# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1716CONFIG_USB_LIBUSUAL=y
1126 1717
1127# 1718#
1128# USB Imaging devices 1719# USB Imaging devices
@@ -1134,10 +1725,6 @@ CONFIG_USB_MON=y
1134# 1725#
1135# USB port drivers 1726# USB port drivers
1136# 1727#
1137
1138#
1139# USB Serial Converter support
1140#
1141# CONFIG_USB_SERIAL is not set 1728# CONFIG_USB_SERIAL is not set
1142 1729
1143# 1730#
@@ -1163,90 +1750,125 @@ CONFIG_USB_MON=y
1163# CONFIG_USB_TRANCEVIBRATOR is not set 1750# CONFIG_USB_TRANCEVIBRATOR is not set
1164# CONFIG_USB_IOWARRIOR is not set 1751# CONFIG_USB_IOWARRIOR is not set
1165# CONFIG_USB_TEST is not set 1752# CONFIG_USB_TEST is not set
1753# CONFIG_USB_GADGET is not set
1754# CONFIG_MMC is not set
1755# CONFIG_MEMSTICK is not set
1756CONFIG_NEW_LEDS=y
1757CONFIG_LEDS_CLASS=y
1166 1758
1167# 1759#
1168# USB DSL modem support 1760# LED drivers
1169# 1761#
1762# CONFIG_LEDS_CLEVO_MAIL is not set
1170 1763
1171# 1764#
1172# USB Gadget Support 1765# LED Triggers
1173# 1766#
1174# CONFIG_USB_GADGET is not set 1767CONFIG_LEDS_TRIGGERS=y
1175# CONFIG_MMC is not set 1768# CONFIG_LEDS_TRIGGER_TIMER is not set
1769# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
1770# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
1771# CONFIG_ACCESSIBILITY is not set
1772# CONFIG_INFINIBAND is not set
1773CONFIG_EDAC=y
1176 1774
1177# 1775#
1178# LED devices 1776# Reporting subsystems
1179# 1777#
1180# CONFIG_NEW_LEDS is not set 1778# CONFIG_EDAC_DEBUG is not set
1779# CONFIG_EDAC_MM_EDAC is not set
1780CONFIG_RTC_LIB=y
1781CONFIG_RTC_CLASS=y
1782# CONFIG_RTC_HCTOSYS is not set
1783# CONFIG_RTC_DEBUG is not set
1181 1784
1182# 1785#
1183# LED drivers 1786# RTC interfaces
1184# 1787#
1788CONFIG_RTC_INTF_SYSFS=y
1789CONFIG_RTC_INTF_PROC=y
1790CONFIG_RTC_INTF_DEV=y
1791# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1792# CONFIG_RTC_DRV_TEST is not set
1185 1793
1186# 1794#
1187# LED Triggers 1795# I2C RTC drivers
1188# 1796#
1189# CONFIG_INFINIBAND is not set 1797# CONFIG_RTC_DRV_DS1307 is not set
1190# CONFIG_EDAC is not set 1798# CONFIG_RTC_DRV_DS1374 is not set
1799# CONFIG_RTC_DRV_DS1672 is not set
1800# CONFIG_RTC_DRV_MAX6900 is not set
1801# CONFIG_RTC_DRV_RS5C372 is not set
1802# CONFIG_RTC_DRV_ISL1208 is not set
1803# CONFIG_RTC_DRV_X1205 is not set
1804# CONFIG_RTC_DRV_PCF8563 is not set
1805# CONFIG_RTC_DRV_PCF8583 is not set
1806# CONFIG_RTC_DRV_M41T80 is not set
1807# CONFIG_RTC_DRV_S35390A is not set
1191 1808
1192# 1809#
1193# Real Time Clock 1810# SPI RTC drivers
1194# 1811#
1195# CONFIG_RTC_CLASS is not set
1196 1812
1197# 1813#
1198# DMA Engine support 1814# Platform RTC drivers
1199# 1815#
1200# CONFIG_DMA_ENGINE is not set 1816CONFIG_RTC_DRV_CMOS=y
1817# CONFIG_RTC_DRV_DS1511 is not set
1818# CONFIG_RTC_DRV_DS1553 is not set
1819# CONFIG_RTC_DRV_DS1742 is not set
1820# CONFIG_RTC_DRV_STK17TA8 is not set
1821# CONFIG_RTC_DRV_M48T86 is not set
1822# CONFIG_RTC_DRV_M48T59 is not set
1823# CONFIG_RTC_DRV_V3020 is not set
1201 1824
1202# 1825#
1203# DMA Clients 1826# on-CPU RTC drivers
1204# 1827#
1828CONFIG_DMADEVICES=y
1205 1829
1206# 1830#
1207# DMA Devices 1831# DMA Devices
1208# 1832#
1209CONFIG_VIRTUALIZATION=y 1833# CONFIG_INTEL_IOATDMA is not set
1210# CONFIG_KVM is not set 1834# CONFIG_UIO is not set
1211 1835
1212# 1836#
1213# Userspace I/O 1837# Firmware Drivers
1214# 1838#
1215# CONFIG_UIO is not set 1839# CONFIG_EDD is not set
1840CONFIG_EFI_VARS=y
1841# CONFIG_DELL_RBU is not set
1842# CONFIG_DCDBAS is not set
1843CONFIG_DMIID=y
1844# CONFIG_ISCSI_IBFT_FIND is not set
1216 1845
1217# 1846#
1218# File systems 1847# File systems
1219# 1848#
1220CONFIG_EXT2_FS=y 1849# CONFIG_EXT2_FS is not set
1221CONFIG_EXT2_FS_XATTR=y
1222CONFIG_EXT2_FS_POSIX_ACL=y
1223# CONFIG_EXT2_FS_SECURITY is not set
1224# CONFIG_EXT2_FS_XIP is not set
1225CONFIG_EXT3_FS=y 1850CONFIG_EXT3_FS=y
1226CONFIG_EXT3_FS_XATTR=y 1851CONFIG_EXT3_FS_XATTR=y
1227CONFIG_EXT3_FS_POSIX_ACL=y 1852CONFIG_EXT3_FS_POSIX_ACL=y
1228# CONFIG_EXT3_FS_SECURITY is not set 1853CONFIG_EXT3_FS_SECURITY=y
1229# CONFIG_EXT4DEV_FS is not set 1854# CONFIG_EXT4DEV_FS is not set
1230CONFIG_JBD=y 1855CONFIG_JBD=y
1231# CONFIG_JBD_DEBUG is not set 1856# CONFIG_JBD_DEBUG is not set
1232CONFIG_FS_MBCACHE=y 1857CONFIG_FS_MBCACHE=y
1233CONFIG_REISERFS_FS=y 1858# CONFIG_REISERFS_FS is not set
1234# CONFIG_REISERFS_CHECK is not set
1235# CONFIG_REISERFS_PROC_INFO is not set
1236CONFIG_REISERFS_FS_XATTR=y
1237CONFIG_REISERFS_FS_POSIX_ACL=y
1238# CONFIG_REISERFS_FS_SECURITY is not set
1239# CONFIG_JFS_FS is not set 1859# CONFIG_JFS_FS is not set
1240CONFIG_FS_POSIX_ACL=y 1860CONFIG_FS_POSIX_ACL=y
1241# CONFIG_XFS_FS is not set 1861# CONFIG_XFS_FS is not set
1242# CONFIG_GFS2_FS is not set
1243# CONFIG_OCFS2_FS is not set 1862# CONFIG_OCFS2_FS is not set
1244# CONFIG_MINIX_FS is not set 1863CONFIG_DNOTIFY=y
1245# CONFIG_ROMFS_FS is not set
1246CONFIG_INOTIFY=y 1864CONFIG_INOTIFY=y
1247CONFIG_INOTIFY_USER=y 1865CONFIG_INOTIFY_USER=y
1248# CONFIG_QUOTA is not set 1866CONFIG_QUOTA=y
1249CONFIG_DNOTIFY=y 1867CONFIG_QUOTA_NETLINK_INTERFACE=y
1868# CONFIG_PRINT_QUOTA_WARNING is not set
1869# CONFIG_QFMT_V1 is not set
1870CONFIG_QFMT_V2=y
1871CONFIG_QUOTACTL=y
1250# CONFIG_AUTOFS_FS is not set 1872# CONFIG_AUTOFS_FS is not set
1251CONFIG_AUTOFS4_FS=y 1873CONFIG_AUTOFS4_FS=y
1252# CONFIG_FUSE_FS is not set 1874# CONFIG_FUSE_FS is not set
@@ -1256,8 +1878,8 @@ CONFIG_GENERIC_ACL=y
1256# CD-ROM/DVD Filesystems 1878# CD-ROM/DVD Filesystems
1257# 1879#
1258CONFIG_ISO9660_FS=y 1880CONFIG_ISO9660_FS=y
1259# CONFIG_JOLIET is not set 1881CONFIG_JOLIET=y
1260# CONFIG_ZISOFS is not set 1882CONFIG_ZISOFS=y
1261# CONFIG_UDF_FS is not set 1883# CONFIG_UDF_FS is not set
1262 1884
1263# 1885#
@@ -1275,13 +1897,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1275# 1897#
1276CONFIG_PROC_FS=y 1898CONFIG_PROC_FS=y
1277CONFIG_PROC_KCORE=y 1899CONFIG_PROC_KCORE=y
1900CONFIG_PROC_VMCORE=y
1278CONFIG_PROC_SYSCTL=y 1901CONFIG_PROC_SYSCTL=y
1279CONFIG_SYSFS=y 1902CONFIG_SYSFS=y
1280CONFIG_TMPFS=y 1903CONFIG_TMPFS=y
1281CONFIG_TMPFS_POSIX_ACL=y 1904CONFIG_TMPFS_POSIX_ACL=y
1282CONFIG_HUGETLBFS=y 1905CONFIG_HUGETLBFS=y
1283CONFIG_HUGETLB_PAGE=y 1906CONFIG_HUGETLB_PAGE=y
1284CONFIG_RAMFS=y
1285# CONFIG_CONFIGFS_FS is not set 1907# CONFIG_CONFIGFS_FS is not set
1286 1908
1287# 1909#
@@ -1289,6 +1911,7 @@ CONFIG_RAMFS=y
1289# 1911#
1290# CONFIG_ADFS_FS is not set 1912# CONFIG_ADFS_FS is not set
1291# CONFIG_AFFS_FS is not set 1913# CONFIG_AFFS_FS is not set
1914# CONFIG_ECRYPT_FS is not set
1292# CONFIG_HFS_FS is not set 1915# CONFIG_HFS_FS is not set
1293# CONFIG_HFSPLUS_FS is not set 1916# CONFIG_HFSPLUS_FS is not set
1294# CONFIG_BEFS_FS is not set 1917# CONFIG_BEFS_FS is not set
@@ -1296,33 +1919,15 @@ CONFIG_RAMFS=y
1296# CONFIG_EFS_FS is not set 1919# CONFIG_EFS_FS is not set
1297# CONFIG_CRAMFS is not set 1920# CONFIG_CRAMFS is not set
1298# CONFIG_VXFS_FS is not set 1921# CONFIG_VXFS_FS is not set
1922# CONFIG_MINIX_FS is not set
1299# CONFIG_HPFS_FS is not set 1923# CONFIG_HPFS_FS is not set
1300# CONFIG_QNX4FS_FS is not set 1924# CONFIG_QNX4FS_FS is not set
1925# CONFIG_ROMFS_FS is not set
1301# CONFIG_SYSV_FS is not set 1926# CONFIG_SYSV_FS is not set
1302# CONFIG_UFS_FS is not set 1927# CONFIG_UFS_FS is not set
1303 1928CONFIG_NETWORK_FILESYSTEMS=y
1304# 1929# CONFIG_NFS_FS is not set
1305# Network File Systems 1930# CONFIG_NFSD is not set
1306#
1307CONFIG_NFS_FS=y
1308CONFIG_NFS_V3=y
1309# CONFIG_NFS_V3_ACL is not set
1310# CONFIG_NFS_V4 is not set
1311# CONFIG_NFS_DIRECTIO is not set
1312CONFIG_NFSD=y
1313CONFIG_NFSD_V3=y
1314# CONFIG_NFSD_V3_ACL is not set
1315# CONFIG_NFSD_V4 is not set
1316CONFIG_NFSD_TCP=y
1317CONFIG_ROOT_NFS=y
1318CONFIG_LOCKD=y
1319CONFIG_LOCKD_V4=y
1320CONFIG_EXPORTFS=y
1321CONFIG_NFS_COMMON=y
1322CONFIG_SUNRPC=y
1323# CONFIG_SUNRPC_BIND34 is not set
1324# CONFIG_RPCSEC_GSS_KRB5 is not set
1325# CONFIG_RPCSEC_GSS_SPKM3 is not set
1326# CONFIG_SMB_FS is not set 1931# CONFIG_SMB_FS is not set
1327# CONFIG_CIFS is not set 1932# CONFIG_CIFS is not set
1328# CONFIG_NCP_FS is not set 1933# CONFIG_NCP_FS is not set
@@ -1332,14 +1937,26 @@ CONFIG_SUNRPC=y
1332# 1937#
1333# Partition Types 1938# Partition Types
1334# 1939#
1335# CONFIG_PARTITION_ADVANCED is not set 1940CONFIG_PARTITION_ADVANCED=y
1941# CONFIG_ACORN_PARTITION is not set
1942CONFIG_OSF_PARTITION=y
1943CONFIG_AMIGA_PARTITION=y
1944# CONFIG_ATARI_PARTITION is not set
1945CONFIG_MAC_PARTITION=y
1336CONFIG_MSDOS_PARTITION=y 1946CONFIG_MSDOS_PARTITION=y
1337 1947CONFIG_BSD_DISKLABEL=y
1338# 1948CONFIG_MINIX_SUBPARTITION=y
1339# Native Language Support 1949CONFIG_SOLARIS_X86_PARTITION=y
1340# 1950CONFIG_UNIXWARE_DISKLABEL=y
1951# CONFIG_LDM_PARTITION is not set
1952CONFIG_SGI_PARTITION=y
1953# CONFIG_ULTRIX_PARTITION is not set
1954CONFIG_SUN_PARTITION=y
1955CONFIG_KARMA_PARTITION=y
1956CONFIG_EFI_PARTITION=y
1957# CONFIG_SYSV68_PARTITION is not set
1341CONFIG_NLS=y 1958CONFIG_NLS=y
1342CONFIG_NLS_DEFAULT="iso8859-1" 1959CONFIG_NLS_DEFAULT="utf8"
1343CONFIG_NLS_CODEPAGE_437=y 1960CONFIG_NLS_CODEPAGE_437=y
1344# CONFIG_NLS_CODEPAGE_737 is not set 1961# CONFIG_NLS_CODEPAGE_737 is not set
1345# CONFIG_NLS_CODEPAGE_775 is not set 1962# CONFIG_NLS_CODEPAGE_775 is not set
@@ -1374,37 +1991,33 @@ CONFIG_NLS_ISO8859_1=y
1374# CONFIG_NLS_ISO8859_9 is not set 1991# CONFIG_NLS_ISO8859_9 is not set
1375# CONFIG_NLS_ISO8859_13 is not set 1992# CONFIG_NLS_ISO8859_13 is not set
1376# CONFIG_NLS_ISO8859_14 is not set 1993# CONFIG_NLS_ISO8859_14 is not set
1377CONFIG_NLS_ISO8859_15=y 1994# CONFIG_NLS_ISO8859_15 is not set
1378# CONFIG_NLS_KOI8_R is not set 1995# CONFIG_NLS_KOI8_R is not set
1379# CONFIG_NLS_KOI8_U is not set 1996# CONFIG_NLS_KOI8_U is not set
1380CONFIG_NLS_UTF8=y 1997CONFIG_NLS_UTF8=y
1381
1382#
1383# Distributed Lock Manager
1384#
1385# CONFIG_DLM is not set 1998# CONFIG_DLM is not set
1386CONFIG_INSTRUMENTATION=y
1387CONFIG_PROFILING=y
1388CONFIG_OPROFILE=y
1389CONFIG_KPROBES=y
1390 1999
1391# 2000#
1392# Kernel hacking 2001# Kernel hacking
1393# 2002#
1394CONFIG_TRACE_IRQFLAGS_SUPPORT=y 2003CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1395# CONFIG_PRINTK_TIME is not set 2004# CONFIG_PRINTK_TIME is not set
2005# CONFIG_ENABLE_WARN_DEPRECATED is not set
1396# CONFIG_ENABLE_MUST_CHECK is not set 2006# CONFIG_ENABLE_MUST_CHECK is not set
2007CONFIG_FRAME_WARN=2048
1397CONFIG_MAGIC_SYSRQ=y 2008CONFIG_MAGIC_SYSRQ=y
1398CONFIG_UNUSED_SYMBOLS=y 2009# CONFIG_UNUSED_SYMBOLS is not set
1399# CONFIG_DEBUG_FS is not set 2010CONFIG_DEBUG_FS=y
1400# CONFIG_HEADERS_CHECK is not set 2011# CONFIG_HEADERS_CHECK is not set
1401CONFIG_DEBUG_KERNEL=y 2012CONFIG_DEBUG_KERNEL=y
1402# CONFIG_DEBUG_SHIRQ is not set 2013# CONFIG_DEBUG_SHIRQ is not set
1403CONFIG_DETECT_SOFTLOCKUP=y 2014# CONFIG_DETECT_SOFTLOCKUP is not set
1404# CONFIG_SCHED_DEBUG is not set 2015# CONFIG_SCHED_DEBUG is not set
1405# CONFIG_SCHEDSTATS is not set 2016CONFIG_SCHEDSTATS=y
1406CONFIG_TIMER_STATS=y 2017CONFIG_TIMER_STATS=y
2018# CONFIG_DEBUG_OBJECTS is not set
1407# CONFIG_SLUB_DEBUG_ON is not set 2019# CONFIG_SLUB_DEBUG_ON is not set
2020# CONFIG_SLUB_STATS is not set
1408# CONFIG_DEBUG_RT_MUTEXES is not set 2021# CONFIG_DEBUG_RT_MUTEXES is not set
1409# CONFIG_RT_MUTEX_TESTER is not set 2022# CONFIG_RT_MUTEX_TESTER is not set
1410# CONFIG_DEBUG_SPINLOCK is not set 2023# CONFIG_DEBUG_SPINLOCK is not set
@@ -1419,48 +2032,174 @@ CONFIG_TIMER_STATS=y
1419CONFIG_DEBUG_BUGVERBOSE=y 2032CONFIG_DEBUG_BUGVERBOSE=y
1420# CONFIG_DEBUG_INFO is not set 2033# CONFIG_DEBUG_INFO is not set
1421# CONFIG_DEBUG_VM is not set 2034# CONFIG_DEBUG_VM is not set
2035# CONFIG_DEBUG_WRITECOUNT is not set
1422# CONFIG_DEBUG_LIST is not set 2036# CONFIG_DEBUG_LIST is not set
1423# CONFIG_FRAME_POINTER is not set 2037# CONFIG_DEBUG_SG is not set
1424CONFIG_OPTIMIZE_INLINING=y 2038CONFIG_FRAME_POINTER=y
2039# CONFIG_BOOT_PRINTK_DELAY is not set
1425# CONFIG_RCU_TORTURE_TEST is not set 2040# CONFIG_RCU_TORTURE_TEST is not set
2041# CONFIG_KPROBES_SANITY_TEST is not set
2042# CONFIG_BACKTRACE_SELF_TEST is not set
1426# CONFIG_LKDTM is not set 2043# CONFIG_LKDTM is not set
1427# CONFIG_FAULT_INJECTION is not set 2044# CONFIG_FAULT_INJECTION is not set
2045# CONFIG_LATENCYTOP is not set
2046CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
2047# CONFIG_SAMPLES is not set
2048# CONFIG_KGDB is not set
2049CONFIG_HAVE_ARCH_KGDB=y
2050# CONFIG_NONPROMISC_DEVMEM is not set
1428CONFIG_EARLY_PRINTK=y 2051CONFIG_EARLY_PRINTK=y
1429CONFIG_DEBUG_STACKOVERFLOW=y 2052CONFIG_DEBUG_STACKOVERFLOW=y
1430# CONFIG_DEBUG_STACK_USAGE is not set 2053CONFIG_DEBUG_STACK_USAGE=y
1431# CONFIG_DEBUG_RODATA is not set 2054# CONFIG_DEBUG_PAGEALLOC is not set
2055# CONFIG_X86_PTDUMP is not set
2056CONFIG_DEBUG_RODATA=y
2057# CONFIG_DEBUG_RODATA_TEST is not set
2058CONFIG_DEBUG_NX_TEST=m
1432# CONFIG_4KSTACKS is not set 2059# CONFIG_4KSTACKS is not set
1433CONFIG_X86_FIND_SMP_CONFIG=y 2060CONFIG_X86_FIND_SMP_CONFIG=y
1434CONFIG_X86_MPPARSE=y 2061CONFIG_X86_MPPARSE=y
1435CONFIG_DOUBLEFAULT=y 2062CONFIG_DOUBLEFAULT=y
2063CONFIG_IO_DELAY_TYPE_0X80=0
2064CONFIG_IO_DELAY_TYPE_0XED=1
2065CONFIG_IO_DELAY_TYPE_UDELAY=2
2066CONFIG_IO_DELAY_TYPE_NONE=3
2067CONFIG_IO_DELAY_0X80=y
2068# CONFIG_IO_DELAY_0XED is not set
2069# CONFIG_IO_DELAY_UDELAY is not set
2070# CONFIG_IO_DELAY_NONE is not set
2071CONFIG_DEFAULT_IO_DELAY_TYPE=0
2072CONFIG_DEBUG_BOOT_PARAMS=y
2073# CONFIG_CPA_DEBUG is not set
1436 2074
1437# 2075#
1438# Security options 2076# Security options
1439# 2077#
1440# CONFIG_KEYS is not set 2078CONFIG_KEYS=y
1441# CONFIG_SECURITY is not set 2079CONFIG_KEYS_DEBUG_PROC_KEYS=y
1442# CONFIG_CRYPTO is not set 2080CONFIG_SECURITY=y
2081CONFIG_SECURITY_NETWORK=y
2082# CONFIG_SECURITY_NETWORK_XFRM is not set
2083CONFIG_SECURITY_CAPABILITIES=y
2084CONFIG_SECURITY_FILE_CAPABILITIES=y
2085# CONFIG_SECURITY_ROOTPLUG is not set
2086CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=65536
2087CONFIG_SECURITY_SELINUX=y
2088CONFIG_SECURITY_SELINUX_BOOTPARAM=y
2089CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
2090CONFIG_SECURITY_SELINUX_DISABLE=y
2091CONFIG_SECURITY_SELINUX_DEVELOP=y
2092CONFIG_SECURITY_SELINUX_AVC_STATS=y
2093CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
2094# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set
2095# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
2096# CONFIG_SECURITY_SMACK is not set
2097CONFIG_CRYPTO=y
2098
2099#
2100# Crypto core or helper
2101#
2102CONFIG_CRYPTO_ALGAPI=y
2103CONFIG_CRYPTO_AEAD=y
2104CONFIG_CRYPTO_BLKCIPHER=y
2105CONFIG_CRYPTO_HASH=y
2106CONFIG_CRYPTO_MANAGER=y
2107# CONFIG_CRYPTO_GF128MUL is not set
2108# CONFIG_CRYPTO_NULL is not set
2109# CONFIG_CRYPTO_CRYPTD is not set
2110CONFIG_CRYPTO_AUTHENC=y
2111# CONFIG_CRYPTO_TEST is not set
2112
2113#
2114# Authenticated Encryption with Associated Data
2115#
2116# CONFIG_CRYPTO_CCM is not set
2117# CONFIG_CRYPTO_GCM is not set
2118# CONFIG_CRYPTO_SEQIV is not set
2119
2120#
2121# Block modes
2122#
2123CONFIG_CRYPTO_CBC=y
2124# CONFIG_CRYPTO_CTR is not set
2125# CONFIG_CRYPTO_CTS is not set
2126CONFIG_CRYPTO_ECB=y
2127# CONFIG_CRYPTO_LRW is not set
2128# CONFIG_CRYPTO_PCBC is not set
2129# CONFIG_CRYPTO_XTS is not set
2130
2131#
2132# Hash modes
2133#
2134CONFIG_CRYPTO_HMAC=y
2135# CONFIG_CRYPTO_XCBC is not set
2136
2137#
2138# Digest
2139#
2140# CONFIG_CRYPTO_CRC32C is not set
2141# CONFIG_CRYPTO_MD4 is not set
2142CONFIG_CRYPTO_MD5=y
2143# CONFIG_CRYPTO_MICHAEL_MIC is not set
2144CONFIG_CRYPTO_SHA1=y
2145# CONFIG_CRYPTO_SHA256 is not set
2146# CONFIG_CRYPTO_SHA512 is not set
2147# CONFIG_CRYPTO_TGR192 is not set
2148# CONFIG_CRYPTO_WP512 is not set
2149
2150#
2151# Ciphers
2152#
2153CONFIG_CRYPTO_AES=y
2154# CONFIG_CRYPTO_AES_586 is not set
2155# CONFIG_CRYPTO_ANUBIS is not set
2156CONFIG_CRYPTO_ARC4=y
2157# CONFIG_CRYPTO_BLOWFISH is not set
2158# CONFIG_CRYPTO_CAMELLIA is not set
2159# CONFIG_CRYPTO_CAST5 is not set
2160# CONFIG_CRYPTO_CAST6 is not set
2161CONFIG_CRYPTO_DES=y
2162# CONFIG_CRYPTO_FCRYPT is not set
2163# CONFIG_CRYPTO_KHAZAD is not set
2164# CONFIG_CRYPTO_SALSA20 is not set
2165# CONFIG_CRYPTO_SALSA20_586 is not set
2166# CONFIG_CRYPTO_SEED is not set
2167# CONFIG_CRYPTO_SERPENT is not set
2168# CONFIG_CRYPTO_TEA is not set
2169# CONFIG_CRYPTO_TWOFISH is not set
2170# CONFIG_CRYPTO_TWOFISH_586 is not set
2171
2172#
2173# Compression
2174#
2175# CONFIG_CRYPTO_DEFLATE is not set
2176# CONFIG_CRYPTO_LZO is not set
2177CONFIG_CRYPTO_HW=y
2178# CONFIG_CRYPTO_DEV_PADLOCK is not set
2179# CONFIG_CRYPTO_DEV_GEODE is not set
2180# CONFIG_CRYPTO_DEV_HIFN_795X is not set
2181CONFIG_HAVE_KVM=y
2182CONFIG_VIRTUALIZATION=y
2183# CONFIG_KVM is not set
2184# CONFIG_LGUEST is not set
2185# CONFIG_VIRTIO_PCI is not set
2186# CONFIG_VIRTIO_BALLOON is not set
1443 2187
1444# 2188#
1445# Library routines 2189# Library routines
1446# 2190#
1447CONFIG_BITREVERSE=y 2191CONFIG_BITREVERSE=y
2192CONFIG_GENERIC_FIND_FIRST_BIT=y
2193CONFIG_GENERIC_FIND_NEXT_BIT=y
1448# CONFIG_CRC_CCITT is not set 2194# CONFIG_CRC_CCITT is not set
1449# CONFIG_CRC16 is not set 2195# CONFIG_CRC16 is not set
1450# CONFIG_CRC_ITU_T is not set 2196# CONFIG_CRC_ITU_T is not set
1451CONFIG_CRC32=y 2197CONFIG_CRC32=y
1452# CONFIG_CRC7 is not set 2198# CONFIG_CRC7 is not set
1453# CONFIG_LIBCRC32C is not set 2199# CONFIG_LIBCRC32C is not set
2200CONFIG_AUDIT_GENERIC=y
1454CONFIG_ZLIB_INFLATE=y 2201CONFIG_ZLIB_INFLATE=y
1455CONFIG_PLIST=y 2202CONFIG_PLIST=y
1456CONFIG_HAS_IOMEM=y 2203CONFIG_HAS_IOMEM=y
1457CONFIG_HAS_IOPORT=y 2204CONFIG_HAS_IOPORT=y
1458CONFIG_HAS_DMA=y 2205CONFIG_HAS_DMA=y
1459CONFIG_GENERIC_HARDIRQS=y
1460CONFIG_GENERIC_IRQ_PROBE=y
1461CONFIG_GENERIC_PENDING_IRQ=y
1462CONFIG_X86_SMP=y
1463CONFIG_X86_HT=y
1464CONFIG_X86_BIOS_REBOOT=y
1465CONFIG_X86_TRAMPOLINE=y
1466CONFIG_KTIME_SCALAR=y
diff --git a/arch/x86/configs/x86_64_defconfig b/arch/x86/configs/x86_64_defconfig
index 2d6f5b2809d2..ae5124e064d4 100644
--- a/arch/x86/configs/x86_64_defconfig
+++ b/arch/x86/configs/x86_64_defconfig
@@ -1,64 +1,103 @@
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-git14 3# Linux kernel version: 2.6.26-rc1
4# Fri Jul 20 09:53:15 2007 4# Sun May 4 19:59:57 2008
5# 5#
6CONFIG_X86_64=y
7CONFIG_64BIT=y 6CONFIG_64BIT=y
7# CONFIG_X86_32 is not set
8CONFIG_X86_64=y
8CONFIG_X86=y 9CONFIG_X86=y
10CONFIG_DEFCONFIG_LIST="arch/x86/configs/x86_64_defconfig"
11# CONFIG_GENERIC_LOCKBREAK is not set
9CONFIG_GENERIC_TIME=y 12CONFIG_GENERIC_TIME=y
10CONFIG_GENERIC_TIME_VSYSCALL=y
11CONFIG_GENERIC_CMOS_UPDATE=y 13CONFIG_GENERIC_CMOS_UPDATE=y
12CONFIG_ZONE_DMA32=y 14CONFIG_CLOCKSOURCE_WATCHDOG=y
15CONFIG_GENERIC_CLOCKEVENTS=y
16CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
13CONFIG_LOCKDEP_SUPPORT=y 17CONFIG_LOCKDEP_SUPPORT=y
14CONFIG_STACKTRACE_SUPPORT=y 18CONFIG_STACKTRACE_SUPPORT=y
15CONFIG_SEMAPHORE_SLEEPERS=y 19CONFIG_HAVE_LATENCYTOP_SUPPORT=y
20CONFIG_FAST_CMPXCHG_LOCAL=y
16CONFIG_MMU=y 21CONFIG_MMU=y
17CONFIG_ZONE_DMA=y 22CONFIG_ZONE_DMA=y
18CONFIG_QUICKLIST=y
19CONFIG_NR_QUICK=2
20CONFIG_RWSEM_GENERIC_SPINLOCK=y
21CONFIG_GENERIC_HWEIGHT=y
22CONFIG_GENERIC_CALIBRATE_DELAY=y
23CONFIG_X86_CMPXCHG=y
24CONFIG_EARLY_PRINTK=y
25CONFIG_GENERIC_ISA_DMA=y 23CONFIG_GENERIC_ISA_DMA=y
26CONFIG_GENERIC_IOMAP=y 24CONFIG_GENERIC_IOMAP=y
27CONFIG_ARCH_MAY_HAVE_PC_FDC=y
28CONFIG_ARCH_POPULATES_NODE_MAP=y
29CONFIG_DMI=y
30CONFIG_AUDIT_ARCH=y
31CONFIG_GENERIC_BUG=y 25CONFIG_GENERIC_BUG=y
26CONFIG_GENERIC_HWEIGHT=y
27# CONFIG_GENERIC_GPIO is not set
28CONFIG_ARCH_MAY_HAVE_PC_FDC=y
29CONFIG_RWSEM_GENERIC_SPINLOCK=y
30# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
32# CONFIG_ARCH_HAS_ILOG2_U32 is not set 31# CONFIG_ARCH_HAS_ILOG2_U32 is not set
33# CONFIG_ARCH_HAS_ILOG2_U64 is not set 32# CONFIG_ARCH_HAS_ILOG2_U64 is not set
34CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 33CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
34CONFIG_GENERIC_CALIBRATE_DELAY=y
35CONFIG_GENERIC_TIME_VSYSCALL=y
36CONFIG_ARCH_HAS_CPU_RELAX=y
37CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
38CONFIG_HAVE_SETUP_PER_CPU_AREA=y
39CONFIG_HAVE_CPUMASK_OF_CPU_MAP=y
40CONFIG_ARCH_HIBERNATION_POSSIBLE=y
41CONFIG_ARCH_SUSPEND_POSSIBLE=y
42CONFIG_ZONE_DMA32=y
43CONFIG_ARCH_POPULATES_NODE_MAP=y
44CONFIG_AUDIT_ARCH=y
45CONFIG_ARCH_SUPPORTS_AOUT=y
46CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
47CONFIG_GENERIC_HARDIRQS=y
48CONFIG_GENERIC_IRQ_PROBE=y
49CONFIG_GENERIC_PENDING_IRQ=y
50CONFIG_X86_SMP=y
51CONFIG_X86_64_SMP=y
52CONFIG_X86_HT=y
53CONFIG_X86_BIOS_REBOOT=y
54CONFIG_X86_TRAMPOLINE=y
55# CONFIG_KTIME_SCALAR is not set
35 56
36# 57#
37# Code maturity level options 58# General setup
38# 59#
39CONFIG_EXPERIMENTAL=y 60CONFIG_EXPERIMENTAL=y
40CONFIG_LOCK_KERNEL=y 61CONFIG_LOCK_KERNEL=y
41CONFIG_INIT_ENV_ARG_LIMIT=32 62CONFIG_INIT_ENV_ARG_LIMIT=32
42
43#
44# General setup
45#
46CONFIG_LOCALVERSION="" 63CONFIG_LOCALVERSION=""
47CONFIG_LOCALVERSION_AUTO=y 64# CONFIG_LOCALVERSION_AUTO is not set
48CONFIG_SWAP=y 65CONFIG_SWAP=y
49CONFIG_SYSVIPC=y 66CONFIG_SYSVIPC=y
50CONFIG_SYSVIPC_SYSCTL=y 67CONFIG_SYSVIPC_SYSCTL=y
51CONFIG_POSIX_MQUEUE=y 68CONFIG_POSIX_MQUEUE=y
52# CONFIG_BSD_PROCESS_ACCT is not set 69CONFIG_BSD_PROCESS_ACCT=y
53# CONFIG_TASKSTATS is not set 70# CONFIG_BSD_PROCESS_ACCT_V3 is not set
54# CONFIG_USER_NS is not set 71CONFIG_TASKSTATS=y
55# CONFIG_AUDIT is not set 72CONFIG_TASK_DELAY_ACCT=y
56CONFIG_IKCONFIG=y 73CONFIG_TASK_XACCT=y
57CONFIG_IKCONFIG_PROC=y 74CONFIG_TASK_IO_ACCOUNTING=y
58CONFIG_LOG_BUF_SHIFT=18 75CONFIG_AUDIT=y
59# CONFIG_CPUSETS is not set 76CONFIG_AUDITSYSCALL=y
60CONFIG_SYSFS_DEPRECATED=y 77CONFIG_AUDIT_TREE=y
78# CONFIG_IKCONFIG is not set
79CONFIG_LOG_BUF_SHIFT=17
80CONFIG_CGROUPS=y
81# CONFIG_CGROUP_DEBUG is not set
82CONFIG_CGROUP_NS=y
83# CONFIG_CGROUP_DEVICE is not set
84CONFIG_CPUSETS=y
85CONFIG_GROUP_SCHED=y
86CONFIG_FAIR_GROUP_SCHED=y
87# CONFIG_RT_GROUP_SCHED is not set
88# CONFIG_USER_SCHED is not set
89CONFIG_CGROUP_SCHED=y
90CONFIG_CGROUP_CPUACCT=y
91CONFIG_RESOURCE_COUNTERS=y
92# CONFIG_CGROUP_MEM_RES_CTLR is not set
93# CONFIG_SYSFS_DEPRECATED_V2 is not set
94CONFIG_PROC_PID_CPUSET=y
61CONFIG_RELAY=y 95CONFIG_RELAY=y
96CONFIG_NAMESPACES=y
97CONFIG_UTS_NS=y
98CONFIG_IPC_NS=y
99CONFIG_USER_NS=y
100CONFIG_PID_NS=y
62CONFIG_BLK_DEV_INITRD=y 101CONFIG_BLK_DEV_INITRD=y
63CONFIG_INITRAMFS_SOURCE="" 102CONFIG_INITRAMFS_SOURCE=""
64CONFIG_CC_OPTIMIZE_FOR_SIZE=y 103CONFIG_CC_OPTIMIZE_FOR_SIZE=y
@@ -66,13 +105,15 @@ CONFIG_SYSCTL=y
66# CONFIG_EMBEDDED is not set 105# CONFIG_EMBEDDED is not set
67CONFIG_UID16=y 106CONFIG_UID16=y
68CONFIG_SYSCTL_SYSCALL=y 107CONFIG_SYSCTL_SYSCALL=y
108CONFIG_SYSCTL_SYSCALL_CHECK=y
69CONFIG_KALLSYMS=y 109CONFIG_KALLSYMS=y
70CONFIG_KALLSYMS_ALL=y 110CONFIG_KALLSYMS_ALL=y
71# CONFIG_KALLSYMS_EXTRA_PASS is not set 111CONFIG_KALLSYMS_EXTRA_PASS=y
72CONFIG_HOTPLUG=y 112CONFIG_HOTPLUG=y
73CONFIG_PRINTK=y 113CONFIG_PRINTK=y
74CONFIG_BUG=y 114CONFIG_BUG=y
75CONFIG_ELF_CORE=y 115CONFIG_ELF_CORE=y
116# CONFIG_COMPAT_BRK is not set
76CONFIG_BASE_FULL=y 117CONFIG_BASE_FULL=y
77CONFIG_FUTEX=y 118CONFIG_FUTEX=y
78CONFIG_ANON_INODES=y 119CONFIG_ANON_INODES=y
@@ -82,9 +123,21 @@ CONFIG_TIMERFD=y
82CONFIG_EVENTFD=y 123CONFIG_EVENTFD=y
83CONFIG_SHMEM=y 124CONFIG_SHMEM=y
84CONFIG_VM_EVENT_COUNTERS=y 125CONFIG_VM_EVENT_COUNTERS=y
85CONFIG_SLAB=y 126CONFIG_SLUB_DEBUG=y
86# CONFIG_SLUB is not set 127# CONFIG_SLAB is not set
128CONFIG_SLUB=y
87# CONFIG_SLOB is not set 129# CONFIG_SLOB is not set
130CONFIG_PROFILING=y
131CONFIG_MARKERS=y
132# CONFIG_OPROFILE is not set
133CONFIG_HAVE_OPROFILE=y
134CONFIG_KPROBES=y
135CONFIG_KRETPROBES=y
136CONFIG_HAVE_KPROBES=y
137CONFIG_HAVE_KRETPROBES=y
138# CONFIG_HAVE_DMA_ATTRS is not set
139CONFIG_PROC_PAGE_MONITOR=y
140CONFIG_SLABINFO=y
88CONFIG_RT_MUTEXES=y 141CONFIG_RT_MUTEXES=y
89# CONFIG_TINY_SHMEM is not set 142# CONFIG_TINY_SHMEM is not set
90CONFIG_BASE_SMALL=0 143CONFIG_BASE_SMALL=0
@@ -96,14 +149,15 @@ CONFIG_MODULE_FORCE_UNLOAD=y
96# CONFIG_KMOD is not set 149# CONFIG_KMOD is not set
97CONFIG_STOP_MACHINE=y 150CONFIG_STOP_MACHINE=y
98CONFIG_BLOCK=y 151CONFIG_BLOCK=y
99# CONFIG_BLK_DEV_IO_TRACE is not set 152CONFIG_BLK_DEV_IO_TRACE=y
100# CONFIG_BLK_DEV_BSG is not set 153CONFIG_BLK_DEV_BSG=y
154CONFIG_BLOCK_COMPAT=y
101 155
102# 156#
103# IO Schedulers 157# IO Schedulers
104# 158#
105CONFIG_IOSCHED_NOOP=y 159CONFIG_IOSCHED_NOOP=y
106# CONFIG_IOSCHED_AS is not set 160CONFIG_IOSCHED_AS=y
107CONFIG_IOSCHED_DEADLINE=y 161CONFIG_IOSCHED_DEADLINE=y
108CONFIG_IOSCHED_CFQ=y 162CONFIG_IOSCHED_CFQ=y
109# CONFIG_DEFAULT_AS is not set 163# CONFIG_DEFAULT_AS is not set
@@ -111,107 +165,177 @@ CONFIG_IOSCHED_CFQ=y
111CONFIG_DEFAULT_CFQ=y 165CONFIG_DEFAULT_CFQ=y
112# CONFIG_DEFAULT_NOOP is not set 166# CONFIG_DEFAULT_NOOP is not set
113CONFIG_DEFAULT_IOSCHED="cfq" 167CONFIG_DEFAULT_IOSCHED="cfq"
168CONFIG_CLASSIC_RCU=y
114 169
115# 170#
116# Processor type and features 171# Processor type and features
117# 172#
173CONFIG_TICK_ONESHOT=y
174CONFIG_NO_HZ=y
175CONFIG_HIGH_RES_TIMERS=y
176CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
177CONFIG_SMP=y
118CONFIG_X86_PC=y 178CONFIG_X86_PC=y
179# CONFIG_X86_ELAN is not set
180# CONFIG_X86_VOYAGER is not set
181# CONFIG_X86_NUMAQ is not set
182# CONFIG_X86_SUMMIT is not set
183# CONFIG_X86_BIGSMP is not set
184# CONFIG_X86_VISWS is not set
185# CONFIG_X86_GENERICARCH is not set
186# CONFIG_X86_ES7000 is not set
187# CONFIG_X86_RDC321X is not set
119# CONFIG_X86_VSMP is not set 188# CONFIG_X86_VSMP is not set
189# CONFIG_PARAVIRT_GUEST is not set
190CONFIG_MEMTEST_BOOTPARAM=y
191CONFIG_MEMTEST_BOOTPARAM_VALUE=0
192# CONFIG_M386 is not set
193# CONFIG_M486 is not set
194# CONFIG_M586 is not set
195# CONFIG_M586TSC is not set
196# CONFIG_M586MMX is not set
197# CONFIG_M686 is not set
198# CONFIG_MPENTIUMII is not set
199# CONFIG_MPENTIUMIII is not set
200# CONFIG_MPENTIUMM is not set
201# CONFIG_MPENTIUM4 is not set
202# CONFIG_MK6 is not set
203# CONFIG_MK7 is not set
120# CONFIG_MK8 is not set 204# CONFIG_MK8 is not set
205# CONFIG_MCRUSOE is not set
206# CONFIG_MEFFICEON is not set
207# CONFIG_MWINCHIPC6 is not set
208# CONFIG_MWINCHIP2 is not set
209# CONFIG_MWINCHIP3D is not set
210# CONFIG_MGEODEGX1 is not set
211# CONFIG_MGEODE_LX is not set
212# CONFIG_MCYRIXIII is not set
213# CONFIG_MVIAC3_2 is not set
214# CONFIG_MVIAC7 is not set
121# CONFIG_MPSC is not set 215# CONFIG_MPSC is not set
122# CONFIG_MCORE2 is not set 216CONFIG_MCORE2=y
123CONFIG_GENERIC_CPU=y 217# CONFIG_GENERIC_CPU is not set
124CONFIG_X86_L1_CACHE_BYTES=128 218CONFIG_X86_CPU=y
125CONFIG_X86_L1_CACHE_SHIFT=7 219CONFIG_X86_L1_CACHE_BYTES=64
126CONFIG_X86_INTERNODE_CACHE_BYTES=128 220CONFIG_X86_INTERNODE_CACHE_BYTES=64
127CONFIG_X86_TSC=y 221CONFIG_X86_CMPXCHG=y
222CONFIG_X86_L1_CACHE_SHIFT=6
128CONFIG_X86_GOOD_APIC=y 223CONFIG_X86_GOOD_APIC=y
129# CONFIG_MICROCODE is not set 224CONFIG_X86_INTEL_USERCOPY=y
130CONFIG_X86_MSR=y 225CONFIG_X86_USE_PPRO_CHECKSUM=y
131CONFIG_X86_CPUID=y 226CONFIG_X86_P6_NOP=y
132CONFIG_X86_HT=y 227CONFIG_X86_TSC=y
133CONFIG_X86_IO_APIC=y 228CONFIG_X86_CMOV=y
134CONFIG_X86_LOCAL_APIC=y 229CONFIG_X86_MINIMUM_CPU_FAMILY=64
135CONFIG_MTRR=y 230CONFIG_X86_DEBUGCTLMSR=y
136CONFIG_SMP=y 231CONFIG_HPET_TIMER=y
137CONFIG_SCHED_SMT=y 232CONFIG_HPET_EMULATE_RTC=y
233CONFIG_DMI=y
234CONFIG_GART_IOMMU=y
235CONFIG_CALGARY_IOMMU=y
236CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT=y
237CONFIG_SWIOTLB=y
238CONFIG_IOMMU_HELPER=y
239CONFIG_NR_CPUS=4
240# CONFIG_SCHED_SMT is not set
138CONFIG_SCHED_MC=y 241CONFIG_SCHED_MC=y
139# CONFIG_PREEMPT_NONE is not set 242# CONFIG_PREEMPT_NONE is not set
140CONFIG_PREEMPT_VOLUNTARY=y 243CONFIG_PREEMPT_VOLUNTARY=y
141# CONFIG_PREEMPT is not set 244# CONFIG_PREEMPT is not set
142CONFIG_PREEMPT_BKL=y 245CONFIG_X86_LOCAL_APIC=y
246CONFIG_X86_IO_APIC=y
247# CONFIG_X86_MCE is not set
248# CONFIG_I8K is not set
249# CONFIG_MICROCODE is not set
250CONFIG_X86_MSR=y
251CONFIG_X86_CPUID=y
143CONFIG_NUMA=y 252CONFIG_NUMA=y
144CONFIG_K8_NUMA=y 253CONFIG_K8_NUMA=y
145CONFIG_NODES_SHIFT=6
146CONFIG_X86_64_ACPI_NUMA=y 254CONFIG_X86_64_ACPI_NUMA=y
147CONFIG_NUMA_EMU=y 255CONFIG_NODES_SPAN_OTHER_NODES=y
256# CONFIG_NUMA_EMU is not set
257CONFIG_NODES_SHIFT=6
258CONFIG_ARCH_SPARSEMEM_DEFAULT=y
259CONFIG_ARCH_SPARSEMEM_ENABLE=y
260CONFIG_ARCH_SELECT_MEMORY_MODEL=y
261CONFIG_SELECT_MEMORY_MODEL=y
262# CONFIG_FLATMEM_MANUAL is not set
263# CONFIG_DISCONTIGMEM_MANUAL is not set
264CONFIG_SPARSEMEM_MANUAL=y
265CONFIG_SPARSEMEM=y
148CONFIG_NEED_MULTIPLE_NODES=y 266CONFIG_NEED_MULTIPLE_NODES=y
267CONFIG_HAVE_MEMORY_PRESENT=y
149# CONFIG_SPARSEMEM_STATIC is not set 268# CONFIG_SPARSEMEM_STATIC is not set
269CONFIG_SPARSEMEM_EXTREME=y
270CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
271CONFIG_SPARSEMEM_VMEMMAP=y
272
273#
274# Memory hotplug is currently incompatible with Software Suspend
275#
276CONFIG_PAGEFLAGS_EXTENDED=y
150CONFIG_SPLIT_PTLOCK_CPUS=4 277CONFIG_SPLIT_PTLOCK_CPUS=4
151CONFIG_MIGRATION=y 278CONFIG_MIGRATION=y
152CONFIG_RESOURCES_64BIT=y 279CONFIG_RESOURCES_64BIT=y
153CONFIG_ZONE_DMA_FLAG=1 280CONFIG_ZONE_DMA_FLAG=1
154CONFIG_BOUNCE=y 281CONFIG_BOUNCE=y
155CONFIG_VIRT_TO_BUS=y 282CONFIG_VIRT_TO_BUS=y
156CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y 283CONFIG_MTRR=y
157CONFIG_OUT_OF_LINE_PFN_TO_PAGE=y 284# CONFIG_X86_PAT is not set
158CONFIG_NR_CPUS=32 285CONFIG_EFI=y
159CONFIG_PHYSICAL_ALIGN=0x200000
160CONFIG_HOTPLUG_CPU=y
161CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
162CONFIG_HPET_TIMER=y
163CONFIG_HPET_EMULATE_RTC=y
164CONFIG_GART_IOMMU=y
165# CONFIG_CALGARY_IOMMU is not set
166CONFIG_SWIOTLB=y
167CONFIG_X86_MCE=y
168CONFIG_X86_MCE_INTEL=y
169CONFIG_X86_MCE_AMD=y
170# CONFIG_KEXEC is not set
171# CONFIG_CRASH_DUMP is not set
172# CONFIG_RELOCATABLE is not set
173CONFIG_PHYSICAL_START=0x200000
174CONFIG_SECCOMP=y 286CONFIG_SECCOMP=y
175# CONFIG_CC_STACKPROTECTOR is not set
176# CONFIG_HZ_100 is not set 287# CONFIG_HZ_100 is not set
177CONFIG_HZ_250=y 288# CONFIG_HZ_250 is not set
178# CONFIG_HZ_300 is not set 289# CONFIG_HZ_300 is not set
179# CONFIG_HZ_1000 is not set 290CONFIG_HZ_1000=y
180CONFIG_HZ=250 291CONFIG_HZ=1000
181CONFIG_K8_NB=y 292CONFIG_SCHED_HRTICK=y
182CONFIG_GENERIC_HARDIRQS=y 293CONFIG_KEXEC=y
183CONFIG_GENERIC_IRQ_PROBE=y 294CONFIG_CRASH_DUMP=y
184CONFIG_ISA_DMA_API=y 295CONFIG_PHYSICAL_START=0x1000000
185CONFIG_GENERIC_PENDING_IRQ=y 296CONFIG_RELOCATABLE=y
297CONFIG_PHYSICAL_ALIGN=0x200000
298CONFIG_HOTPLUG_CPU=y
299# CONFIG_COMPAT_VDSO is not set
300CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
301CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
186 302
187# 303#
188# Power management options 304# Power management options
189# 305#
306CONFIG_ARCH_HIBERNATION_HEADER=y
190CONFIG_PM=y 307CONFIG_PM=y
191# CONFIG_PM_LEGACY is not set 308CONFIG_PM_DEBUG=y
192# CONFIG_PM_DEBUG is not set 309# CONFIG_PM_VERBOSE is not set
310CONFIG_CAN_PM_TRACE=y
311CONFIG_PM_TRACE=y
312CONFIG_PM_TRACE_RTC=y
313CONFIG_PM_SLEEP_SMP=y
314CONFIG_PM_SLEEP=y
315CONFIG_SUSPEND=y
316CONFIG_SUSPEND_FREEZER=y
193CONFIG_HIBERNATION=y 317CONFIG_HIBERNATION=y
194CONFIG_PM_STD_PARTITION="" 318CONFIG_PM_STD_PARTITION=""
195
196#
197# ACPI (Advanced Configuration and Power Interface) Support
198#
199CONFIG_ACPI=y 319CONFIG_ACPI=y
200CONFIG_ACPI_SLEEP=y 320CONFIG_ACPI_SLEEP=y
201CONFIG_ACPI_SLEEP_PROC_FS=y
202CONFIG_ACPI_SLEEP_PROC_SLEEP=y
203CONFIG_ACPI_PROCFS=y 321CONFIG_ACPI_PROCFS=y
322CONFIG_ACPI_PROCFS_POWER=y
323CONFIG_ACPI_SYSFS_POWER=y
324CONFIG_ACPI_PROC_EVENT=y
204CONFIG_ACPI_AC=y 325CONFIG_ACPI_AC=y
205CONFIG_ACPI_BATTERY=y 326CONFIG_ACPI_BATTERY=y
206CONFIG_ACPI_BUTTON=y 327CONFIG_ACPI_BUTTON=y
207CONFIG_ACPI_FAN=y 328CONFIG_ACPI_FAN=y
208# CONFIG_ACPI_DOCK is not set 329CONFIG_ACPI_DOCK=y
330# CONFIG_ACPI_BAY is not set
209CONFIG_ACPI_PROCESSOR=y 331CONFIG_ACPI_PROCESSOR=y
210CONFIG_ACPI_HOTPLUG_CPU=y 332CONFIG_ACPI_HOTPLUG_CPU=y
211CONFIG_ACPI_THERMAL=y 333CONFIG_ACPI_THERMAL=y
212CONFIG_ACPI_NUMA=y 334CONFIG_ACPI_NUMA=y
335# CONFIG_ACPI_WMI is not set
213# CONFIG_ACPI_ASUS is not set 336# CONFIG_ACPI_ASUS is not set
214# CONFIG_ACPI_TOSHIBA is not set 337# CONFIG_ACPI_TOSHIBA is not set
338# CONFIG_ACPI_CUSTOM_DSDT is not set
215CONFIG_ACPI_BLACKLIST_YEAR=0 339CONFIG_ACPI_BLACKLIST_YEAR=0
216# CONFIG_ACPI_DEBUG is not set 340# CONFIG_ACPI_DEBUG is not set
217CONFIG_ACPI_EC=y 341CONFIG_ACPI_EC=y
@@ -227,29 +351,34 @@ CONFIG_ACPI_CONTAINER=y
227CONFIG_CPU_FREQ=y 351CONFIG_CPU_FREQ=y
228CONFIG_CPU_FREQ_TABLE=y 352CONFIG_CPU_FREQ_TABLE=y
229CONFIG_CPU_FREQ_DEBUG=y 353CONFIG_CPU_FREQ_DEBUG=y
230CONFIG_CPU_FREQ_STAT=y 354# CONFIG_CPU_FREQ_STAT is not set
231# CONFIG_CPU_FREQ_STAT_DETAILS is not set 355# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
232CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y 356# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
233# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set 357CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
358# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
359# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
234CONFIG_CPU_FREQ_GOV_PERFORMANCE=y 360CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
235# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set 361# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
236CONFIG_CPU_FREQ_GOV_USERSPACE=y 362CONFIG_CPU_FREQ_GOV_USERSPACE=y
237CONFIG_CPU_FREQ_GOV_ONDEMAND=y 363CONFIG_CPU_FREQ_GOV_ONDEMAND=y
238CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y 364# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
239 365
240# 366#
241# CPUFreq processor drivers 367# CPUFreq processor drivers
242# 368#
243CONFIG_X86_POWERNOW_K8=y
244CONFIG_X86_POWERNOW_K8_ACPI=y
245# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
246CONFIG_X86_ACPI_CPUFREQ=y 369CONFIG_X86_ACPI_CPUFREQ=y
370# CONFIG_X86_POWERNOW_K8 is not set
371# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
372# CONFIG_X86_P4_CLOCKMOD is not set
247 373
248# 374#
249# shared options 375# shared options
250# 376#
251CONFIG_X86_ACPI_CPUFREQ_PROC_INTF=y 377# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
252# CONFIG_X86_SPEEDSTEP_LIB is not set 378# CONFIG_X86_SPEEDSTEP_LIB is not set
379CONFIG_CPU_IDLE=y
380CONFIG_CPU_IDLE_GOV_LADDER=y
381CONFIG_CPU_IDLE_GOV_MENU=y
253 382
254# 383#
255# Bus options (PCI etc.) 384# Bus options (PCI etc.)
@@ -257,27 +386,56 @@ CONFIG_X86_ACPI_CPUFREQ_PROC_INTF=y
257CONFIG_PCI=y 386CONFIG_PCI=y
258CONFIG_PCI_DIRECT=y 387CONFIG_PCI_DIRECT=y
259CONFIG_PCI_MMCONFIG=y 388CONFIG_PCI_MMCONFIG=y
389CONFIG_PCI_DOMAINS=y
390CONFIG_DMAR=y
391CONFIG_DMAR_GFX_WA=y
392CONFIG_DMAR_FLOPPY_WA=y
260CONFIG_PCIEPORTBUS=y 393CONFIG_PCIEPORTBUS=y
394# CONFIG_HOTPLUG_PCI_PCIE is not set
261CONFIG_PCIEAER=y 395CONFIG_PCIEAER=y
396# CONFIG_PCIEASPM is not set
262CONFIG_ARCH_SUPPORTS_MSI=y 397CONFIG_ARCH_SUPPORTS_MSI=y
263CONFIG_PCI_MSI=y 398CONFIG_PCI_MSI=y
399# CONFIG_PCI_LEGACY is not set
264# CONFIG_PCI_DEBUG is not set 400# CONFIG_PCI_DEBUG is not set
265# CONFIG_HT_IRQ is not set 401CONFIG_HT_IRQ=y
266 402CONFIG_ISA_DMA_API=y
267# 403CONFIG_K8_NB=y
268# PCCARD (PCMCIA/CardBus) support 404CONFIG_PCCARD=y
269# 405# CONFIG_PCMCIA_DEBUG is not set
270# CONFIG_PCCARD is not set 406CONFIG_PCMCIA=y
271# CONFIG_HOTPLUG_PCI is not set 407CONFIG_PCMCIA_LOAD_CIS=y
408CONFIG_PCMCIA_IOCTL=y
409CONFIG_CARDBUS=y
410
411#
412# PC-card bridges
413#
414CONFIG_YENTA=y
415CONFIG_YENTA_O2=y
416CONFIG_YENTA_RICOH=y
417CONFIG_YENTA_TI=y
418CONFIG_YENTA_ENE_TUNE=y
419CONFIG_YENTA_TOSHIBA=y
420# CONFIG_PD6729 is not set
421# CONFIG_I82092 is not set
422CONFIG_PCCARD_NONSTATIC=y
423CONFIG_HOTPLUG_PCI=y
424# CONFIG_HOTPLUG_PCI_FAKE is not set
425# CONFIG_HOTPLUG_PCI_ACPI is not set
426# CONFIG_HOTPLUG_PCI_CPCI is not set
427# CONFIG_HOTPLUG_PCI_SHPC is not set
272 428
273# 429#
274# Executable file formats / Emulations 430# Executable file formats / Emulations
275# 431#
276CONFIG_BINFMT_ELF=y 432CONFIG_BINFMT_ELF=y
277# CONFIG_BINFMT_MISC is not set 433CONFIG_COMPAT_BINFMT_ELF=y
434CONFIG_BINFMT_MISC=y
278CONFIG_IA32_EMULATION=y 435CONFIG_IA32_EMULATION=y
279CONFIG_IA32_AOUT=y 436# CONFIG_IA32_AOUT is not set
280CONFIG_COMPAT=y 437CONFIG_COMPAT=y
438CONFIG_COMPAT_FOR_U64_ALIGNMENT=y
281CONFIG_SYSVIPC_COMPAT=y 439CONFIG_SYSVIPC_COMPAT=y
282 440
283# 441#
@@ -289,22 +447,31 @@ CONFIG_NET=y
289# Networking options 447# Networking options
290# 448#
291CONFIG_PACKET=y 449CONFIG_PACKET=y
292# CONFIG_PACKET_MMAP is not set 450CONFIG_PACKET_MMAP=y
293CONFIG_UNIX=y 451CONFIG_UNIX=y
452CONFIG_XFRM=y
453CONFIG_XFRM_USER=y
454# CONFIG_XFRM_SUB_POLICY is not set
455# CONFIG_XFRM_MIGRATE is not set
456# CONFIG_XFRM_STATISTICS is not set
294# CONFIG_NET_KEY is not set 457# CONFIG_NET_KEY is not set
295CONFIG_INET=y 458CONFIG_INET=y
296CONFIG_IP_MULTICAST=y 459CONFIG_IP_MULTICAST=y
297# CONFIG_IP_ADVANCED_ROUTER is not set 460CONFIG_IP_ADVANCED_ROUTER=y
461CONFIG_ASK_IP_FIB_HASH=y
462# CONFIG_IP_FIB_TRIE is not set
298CONFIG_IP_FIB_HASH=y 463CONFIG_IP_FIB_HASH=y
299CONFIG_IP_PNP=y 464CONFIG_IP_MULTIPLE_TABLES=y
300CONFIG_IP_PNP_DHCP=y 465CONFIG_IP_ROUTE_MULTIPATH=y
301# CONFIG_IP_PNP_BOOTP is not set 466CONFIG_IP_ROUTE_VERBOSE=y
302# CONFIG_IP_PNP_RARP is not set 467# CONFIG_IP_PNP is not set
303# CONFIG_NET_IPIP is not set 468# CONFIG_NET_IPIP is not set
304# CONFIG_NET_IPGRE is not set 469# CONFIG_NET_IPGRE is not set
305# CONFIG_IP_MROUTE is not set 470CONFIG_IP_MROUTE=y
471CONFIG_IP_PIMSM_V1=y
472CONFIG_IP_PIMSM_V2=y
306# CONFIG_ARPD is not set 473# CONFIG_ARPD is not set
307# CONFIG_SYN_COOKIES is not set 474CONFIG_SYN_COOKIES=y
308# CONFIG_INET_AH is not set 475# CONFIG_INET_AH is not set
309# CONFIG_INET_ESP is not set 476# CONFIG_INET_ESP is not set
310# CONFIG_INET_IPCOMP is not set 477# CONFIG_INET_IPCOMP is not set
@@ -313,31 +480,109 @@ CONFIG_INET_TUNNEL=y
313# CONFIG_INET_XFRM_MODE_TRANSPORT is not set 480# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
314# CONFIG_INET_XFRM_MODE_TUNNEL is not set 481# CONFIG_INET_XFRM_MODE_TUNNEL is not set
315# CONFIG_INET_XFRM_MODE_BEET is not set 482# CONFIG_INET_XFRM_MODE_BEET is not set
316CONFIG_INET_DIAG=y 483CONFIG_INET_LRO=y
317CONFIG_INET_TCP_DIAG=y 484# CONFIG_INET_DIAG is not set
318# CONFIG_TCP_CONG_ADVANCED is not set 485CONFIG_TCP_CONG_ADVANCED=y
486# CONFIG_TCP_CONG_BIC is not set
319CONFIG_TCP_CONG_CUBIC=y 487CONFIG_TCP_CONG_CUBIC=y
488# CONFIG_TCP_CONG_WESTWOOD is not set
489# CONFIG_TCP_CONG_HTCP is not set
490# CONFIG_TCP_CONG_HSTCP is not set
491# CONFIG_TCP_CONG_HYBLA is not set
492# CONFIG_TCP_CONG_VEGAS is not set
493# CONFIG_TCP_CONG_SCALABLE is not set
494# CONFIG_TCP_CONG_LP is not set
495# CONFIG_TCP_CONG_VENO is not set
496# CONFIG_TCP_CONG_YEAH is not set
497# CONFIG_TCP_CONG_ILLINOIS is not set
498# CONFIG_DEFAULT_BIC is not set
499CONFIG_DEFAULT_CUBIC=y
500# CONFIG_DEFAULT_HTCP is not set
501# CONFIG_DEFAULT_VEGAS is not set
502# CONFIG_DEFAULT_WESTWOOD is not set
503# CONFIG_DEFAULT_RENO is not set
320CONFIG_DEFAULT_TCP_CONG="cubic" 504CONFIG_DEFAULT_TCP_CONG="cubic"
321# CONFIG_TCP_MD5SIG is not set 505CONFIG_TCP_MD5SIG=y
506# CONFIG_IP_VS is not set
322CONFIG_IPV6=y 507CONFIG_IPV6=y
323# CONFIG_IPV6_PRIVACY is not set 508# CONFIG_IPV6_PRIVACY is not set
324# CONFIG_IPV6_ROUTER_PREF is not set 509# CONFIG_IPV6_ROUTER_PREF is not set
325# CONFIG_IPV6_OPTIMISTIC_DAD is not set 510# CONFIG_IPV6_OPTIMISTIC_DAD is not set
326# CONFIG_INET6_AH is not set 511CONFIG_INET6_AH=y
327# CONFIG_INET6_ESP is not set 512CONFIG_INET6_ESP=y
328# CONFIG_INET6_IPCOMP is not set 513# CONFIG_INET6_IPCOMP is not set
329# CONFIG_IPV6_MIP6 is not set 514# CONFIG_IPV6_MIP6 is not set
330# CONFIG_INET6_XFRM_TUNNEL is not set 515# CONFIG_INET6_XFRM_TUNNEL is not set
331# CONFIG_INET6_TUNNEL is not set 516# CONFIG_INET6_TUNNEL is not set
332# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set 517CONFIG_INET6_XFRM_MODE_TRANSPORT=y
333# CONFIG_INET6_XFRM_MODE_TUNNEL is not set 518CONFIG_INET6_XFRM_MODE_TUNNEL=y
334# CONFIG_INET6_XFRM_MODE_BEET is not set 519CONFIG_INET6_XFRM_MODE_BEET=y
335# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set 520# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
336CONFIG_IPV6_SIT=y 521CONFIG_IPV6_SIT=y
522CONFIG_IPV6_NDISC_NODETYPE=y
337# CONFIG_IPV6_TUNNEL is not set 523# CONFIG_IPV6_TUNNEL is not set
338# CONFIG_IPV6_MULTIPLE_TABLES is not set 524# CONFIG_IPV6_MULTIPLE_TABLES is not set
339# CONFIG_NETWORK_SECMARK is not set 525# CONFIG_IPV6_MROUTE is not set
340# CONFIG_NETFILTER is not set 526CONFIG_NETLABEL=y
527CONFIG_NETWORK_SECMARK=y
528CONFIG_NETFILTER=y
529# CONFIG_NETFILTER_DEBUG is not set
530# CONFIG_NETFILTER_ADVANCED is not set
531
532#
533# Core Netfilter Configuration
534#
535CONFIG_NETFILTER_NETLINK=y
536CONFIG_NETFILTER_NETLINK_LOG=y
537CONFIG_NF_CONNTRACK=y
538CONFIG_NF_CONNTRACK_SECMARK=y
539CONFIG_NF_CONNTRACK_FTP=y
540CONFIG_NF_CONNTRACK_IRC=y
541CONFIG_NF_CONNTRACK_SIP=y
542CONFIG_NF_CT_NETLINK=y
543CONFIG_NETFILTER_XTABLES=y
544CONFIG_NETFILTER_XT_TARGET_MARK=y
545CONFIG_NETFILTER_XT_TARGET_NFLOG=y
546CONFIG_NETFILTER_XT_TARGET_SECMARK=y
547CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y
548CONFIG_NETFILTER_XT_TARGET_TCPMSS=y
549CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y
550CONFIG_NETFILTER_XT_MATCH_MARK=y
551CONFIG_NETFILTER_XT_MATCH_POLICY=y
552CONFIG_NETFILTER_XT_MATCH_STATE=y
553
554#
555# IP: Netfilter Configuration
556#
557CONFIG_NF_CONNTRACK_IPV4=y
558CONFIG_NF_CONNTRACK_PROC_COMPAT=y
559CONFIG_IP_NF_IPTABLES=y
560CONFIG_IP_NF_FILTER=y
561CONFIG_IP_NF_TARGET_REJECT=y
562CONFIG_IP_NF_TARGET_LOG=y
563CONFIG_IP_NF_TARGET_ULOG=y
564CONFIG_NF_NAT=y
565CONFIG_NF_NAT_NEEDED=y
566CONFIG_IP_NF_TARGET_MASQUERADE=y
567CONFIG_NF_NAT_FTP=y
568CONFIG_NF_NAT_IRC=y
569# CONFIG_NF_NAT_TFTP is not set
570# CONFIG_NF_NAT_AMANDA is not set
571# CONFIG_NF_NAT_PPTP is not set
572# CONFIG_NF_NAT_H323 is not set
573CONFIG_NF_NAT_SIP=y
574CONFIG_IP_NF_MANGLE=y
575
576#
577# IPv6: Netfilter Configuration
578#
579CONFIG_NF_CONNTRACK_IPV6=y
580CONFIG_IP6_NF_IPTABLES=y
581CONFIG_IP6_NF_MATCH_IPV6HEADER=y
582CONFIG_IP6_NF_FILTER=y
583CONFIG_IP6_NF_TARGET_LOG=y
584CONFIG_IP6_NF_TARGET_REJECT=y
585CONFIG_IP6_NF_MANGLE=y
341# CONFIG_IP_DCCP is not set 586# CONFIG_IP_DCCP is not set
342# CONFIG_IP_SCTP is not set 587# CONFIG_IP_SCTP is not set
343# CONFIG_TIPC is not set 588# CONFIG_TIPC is not set
@@ -345,6 +590,7 @@ CONFIG_IPV6_SIT=y
345# CONFIG_BRIDGE is not set 590# CONFIG_BRIDGE is not set
346# CONFIG_VLAN_8021Q is not set 591# CONFIG_VLAN_8021Q is not set
347# CONFIG_DECNET is not set 592# CONFIG_DECNET is not set
593CONFIG_LLC=y
348# CONFIG_LLC2 is not set 594# CONFIG_LLC2 is not set
349# CONFIG_IPX is not set 595# CONFIG_IPX is not set
350# CONFIG_ATALK is not set 596# CONFIG_ATALK is not set
@@ -352,28 +598,99 @@ CONFIG_IPV6_SIT=y
352# CONFIG_LAPB is not set 598# CONFIG_LAPB is not set
353# CONFIG_ECONET is not set 599# CONFIG_ECONET is not set
354# CONFIG_WAN_ROUTER is not set 600# CONFIG_WAN_ROUTER is not set
355 601CONFIG_NET_SCHED=y
356# 602
357# QoS and/or fair queueing 603#
358# 604# Queueing/Scheduling
359# CONFIG_NET_SCHED is not set 605#
606# CONFIG_NET_SCH_CBQ is not set
607# CONFIG_NET_SCH_HTB is not set
608# CONFIG_NET_SCH_HFSC is not set
609# CONFIG_NET_SCH_PRIO is not set
610# CONFIG_NET_SCH_RR is not set
611# CONFIG_NET_SCH_RED is not set
612# CONFIG_NET_SCH_SFQ is not set
613# CONFIG_NET_SCH_TEQL is not set
614# CONFIG_NET_SCH_TBF is not set
615# CONFIG_NET_SCH_GRED is not set
616# CONFIG_NET_SCH_DSMARK is not set
617# CONFIG_NET_SCH_NETEM is not set
618# CONFIG_NET_SCH_INGRESS is not set
619
620#
621# Classification
622#
623CONFIG_NET_CLS=y
624# CONFIG_NET_CLS_BASIC is not set
625# CONFIG_NET_CLS_TCINDEX is not set
626# CONFIG_NET_CLS_ROUTE4 is not set
627# CONFIG_NET_CLS_FW is not set
628# CONFIG_NET_CLS_U32 is not set
629# CONFIG_NET_CLS_RSVP is not set
630# CONFIG_NET_CLS_RSVP6 is not set
631# CONFIG_NET_CLS_FLOW is not set
632CONFIG_NET_EMATCH=y
633CONFIG_NET_EMATCH_STACK=32
634# CONFIG_NET_EMATCH_CMP is not set
635# CONFIG_NET_EMATCH_NBYTE is not set
636# CONFIG_NET_EMATCH_U32 is not set
637# CONFIG_NET_EMATCH_META is not set
638# CONFIG_NET_EMATCH_TEXT is not set
639CONFIG_NET_CLS_ACT=y
640# CONFIG_NET_ACT_POLICE is not set
641# CONFIG_NET_ACT_GACT is not set
642# CONFIG_NET_ACT_MIRRED is not set
643# CONFIG_NET_ACT_IPT is not set
644# CONFIG_NET_ACT_NAT is not set
645# CONFIG_NET_ACT_PEDIT is not set
646# CONFIG_NET_ACT_SIMP is not set
647CONFIG_NET_SCH_FIFO=y
360 648
361# 649#
362# Network testing 650# Network testing
363# 651#
364# CONFIG_NET_PKTGEN is not set 652# CONFIG_NET_PKTGEN is not set
365# CONFIG_NET_TCPPROBE is not set 653# CONFIG_NET_TCPPROBE is not set
366# CONFIG_HAMRADIO is not set 654CONFIG_HAMRADIO=y
655
656#
657# Packet Radio protocols
658#
659# CONFIG_AX25 is not set
660# CONFIG_CAN is not set
367# CONFIG_IRDA is not set 661# CONFIG_IRDA is not set
368# CONFIG_BT is not set 662# CONFIG_BT is not set
369# CONFIG_AF_RXRPC is not set 663# CONFIG_AF_RXRPC is not set
664CONFIG_FIB_RULES=y
370 665
371# 666#
372# Wireless 667# Wireless
373# 668#
374# CONFIG_CFG80211 is not set 669CONFIG_CFG80211=y
375# CONFIG_WIRELESS_EXT is not set 670CONFIG_NL80211=y
376# CONFIG_MAC80211 is not set 671CONFIG_WIRELESS_EXT=y
672CONFIG_MAC80211=y
673
674#
675# Rate control algorithm selection
676#
677CONFIG_MAC80211_RC_DEFAULT_PID=y
678# CONFIG_MAC80211_RC_DEFAULT_NONE is not set
679
680#
681# Selecting 'y' for an algorithm will
682#
683
684#
685# build the algorithm into mac80211.
686#
687CONFIG_MAC80211_RC_DEFAULT="pid"
688CONFIG_MAC80211_RC_PID=y
689# CONFIG_MAC80211_MESH is not set
690CONFIG_MAC80211_LEDS=y
691# CONFIG_MAC80211_DEBUGFS is not set
692# CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT is not set
693# CONFIG_MAC80211_DEBUG is not set
377# CONFIG_IEEE80211 is not set 694# CONFIG_IEEE80211 is not set
378# CONFIG_RFKILL is not set 695# CONFIG_RFKILL is not set
379# CONFIG_NET_9P is not set 696# CONFIG_NET_9P is not set
@@ -385,13 +702,15 @@ CONFIG_IPV6_SIT=y
385# 702#
386# Generic Driver Options 703# Generic Driver Options
387# 704#
705CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
388CONFIG_STANDALONE=y 706CONFIG_STANDALONE=y
389CONFIG_PREVENT_FIRMWARE_BUILD=y 707CONFIG_PREVENT_FIRMWARE_BUILD=y
390CONFIG_FW_LOADER=y 708CONFIG_FW_LOADER=y
391# CONFIG_DEBUG_DRIVER is not set 709# CONFIG_DEBUG_DRIVER is not set
392# CONFIG_DEBUG_DEVRES is not set 710CONFIG_DEBUG_DEVRES=y
393# CONFIG_SYS_HYPERVISOR is not set 711# CONFIG_SYS_HYPERVISOR is not set
394# CONFIG_CONNECTOR is not set 712CONFIG_CONNECTOR=y
713CONFIG_PROC_EVENTS=y
395# CONFIG_MTD is not set 714# CONFIG_MTD is not set
396# CONFIG_PARPORT is not set 715# CONFIG_PARPORT is not set
397CONFIG_PNP=y 716CONFIG_PNP=y
@@ -402,7 +721,7 @@ CONFIG_PNP=y
402# 721#
403CONFIG_PNPACPI=y 722CONFIG_PNPACPI=y
404CONFIG_BLK_DEV=y 723CONFIG_BLK_DEV=y
405CONFIG_BLK_DEV_FD=y 724# CONFIG_BLK_DEV_FD is not set
406# CONFIG_BLK_CPQ_DA is not set 725# CONFIG_BLK_CPQ_DA is not set
407# CONFIG_BLK_CPQ_CISS_DA is not set 726# CONFIG_BLK_CPQ_CISS_DA is not set
408# CONFIG_BLK_DEV_DAC960 is not set 727# CONFIG_BLK_DEV_DAC960 is not set
@@ -415,8 +734,8 @@ CONFIG_BLK_DEV_LOOP=y
415# CONFIG_BLK_DEV_UB is not set 734# CONFIG_BLK_DEV_UB is not set
416CONFIG_BLK_DEV_RAM=y 735CONFIG_BLK_DEV_RAM=y
417CONFIG_BLK_DEV_RAM_COUNT=16 736CONFIG_BLK_DEV_RAM_COUNT=16
418CONFIG_BLK_DEV_RAM_SIZE=4096 737CONFIG_BLK_DEV_RAM_SIZE=16384
419CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 738# CONFIG_BLK_DEV_XIP is not set
420# CONFIG_CDROM_PKTCDVD is not set 739# CONFIG_CDROM_PKTCDVD is not set
421# CONFIG_ATA_OVER_ETH is not set 740# CONFIG_ATA_OVER_ETH is not set
422CONFIG_MISC_DEVICES=y 741CONFIG_MISC_DEVICES=y
@@ -425,72 +744,16 @@ CONFIG_MISC_DEVICES=y
425# CONFIG_EEPROM_93CX6 is not set 744# CONFIG_EEPROM_93CX6 is not set
426# CONFIG_SGI_IOC4 is not set 745# CONFIG_SGI_IOC4 is not set
427# CONFIG_TIFM_CORE is not set 746# CONFIG_TIFM_CORE is not set
747# CONFIG_ACER_WMI is not set
748# CONFIG_ASUS_LAPTOP is not set
749# CONFIG_FUJITSU_LAPTOP is not set
750# CONFIG_MSI_LAPTOP is not set
428# CONFIG_SONY_LAPTOP is not set 751# CONFIG_SONY_LAPTOP is not set
429# CONFIG_THINKPAD_ACPI is not set 752# CONFIG_THINKPAD_ACPI is not set
430CONFIG_IDE=y 753# CONFIG_INTEL_MENLOW is not set
431CONFIG_BLK_DEV_IDE=y 754# CONFIG_ENCLOSURE_SERVICES is not set
432 755CONFIG_HAVE_IDE=y
433# 756# CONFIG_IDE is not set
434# Please see Documentation/ide.txt for help/info on IDE drives
435#
436# CONFIG_BLK_DEV_IDE_SATA is not set
437# CONFIG_BLK_DEV_HD_IDE is not set
438CONFIG_BLK_DEV_IDEDISK=y
439CONFIG_IDEDISK_MULTI_MODE=y
440CONFIG_BLK_DEV_IDECD=y
441# CONFIG_BLK_DEV_IDETAPE is not set
442# CONFIG_BLK_DEV_IDEFLOPPY is not set
443# CONFIG_BLK_DEV_IDESCSI is not set
444CONFIG_BLK_DEV_IDEACPI=y
445# CONFIG_IDE_TASK_IOCTL is not set
446CONFIG_IDE_PROC_FS=y
447
448#
449# IDE chipset support/bugfixes
450#
451CONFIG_IDE_GENERIC=y
452# CONFIG_BLK_DEV_CMD640 is not set
453# CONFIG_BLK_DEV_IDEPNP is not set
454CONFIG_BLK_DEV_IDEPCI=y
455# CONFIG_IDEPCI_SHARE_IRQ is not set
456CONFIG_IDEPCI_PCIBUS_ORDER=y
457# CONFIG_BLK_DEV_OFFBOARD is not set
458# CONFIG_BLK_DEV_GENERIC is not set
459# CONFIG_BLK_DEV_OPTI621 is not set
460# CONFIG_BLK_DEV_RZ1000 is not set
461CONFIG_BLK_DEV_IDEDMA_PCI=y
462# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
463# CONFIG_IDEDMA_ONLYDISK is not set
464# CONFIG_BLK_DEV_AEC62XX is not set
465# CONFIG_BLK_DEV_ALI15X3 is not set
466CONFIG_BLK_DEV_AMD74XX=y
467CONFIG_BLK_DEV_ATIIXP=y
468# CONFIG_BLK_DEV_CMD64X is not set
469# CONFIG_BLK_DEV_TRIFLEX is not set
470# CONFIG_BLK_DEV_CY82C693 is not set
471# CONFIG_BLK_DEV_CS5520 is not set
472# CONFIG_BLK_DEV_CS5530 is not set
473# CONFIG_BLK_DEV_HPT34X is not set
474# CONFIG_BLK_DEV_HPT366 is not set
475# CONFIG_BLK_DEV_JMICRON is not set
476# CONFIG_BLK_DEV_SC1200 is not set
477CONFIG_BLK_DEV_PIIX=y
478# CONFIG_BLK_DEV_IT8213 is not set
479# CONFIG_BLK_DEV_IT821X is not set
480# CONFIG_BLK_DEV_NS87415 is not set
481# CONFIG_BLK_DEV_PDC202XX_OLD is not set
482CONFIG_BLK_DEV_PDC202XX_NEW=y
483# CONFIG_BLK_DEV_SVWKS is not set
484# CONFIG_BLK_DEV_SIIMAGE is not set
485# CONFIG_BLK_DEV_SIS5513 is not set
486# CONFIG_BLK_DEV_SLC90E66 is not set
487# CONFIG_BLK_DEV_TRM290 is not set
488# CONFIG_BLK_DEV_VIA82CXXX is not set
489# CONFIG_BLK_DEV_TC86C001 is not set
490# CONFIG_IDE_ARM is not set
491CONFIG_BLK_DEV_IDEDMA=y
492# CONFIG_IDEDMA_IVB is not set
493# CONFIG_BLK_DEV_HD is not set
494 757
495# 758#
496# SCSI device support 759# SCSI device support
@@ -499,8 +762,8 @@ CONFIG_BLK_DEV_IDEDMA=y
499CONFIG_SCSI=y 762CONFIG_SCSI=y
500CONFIG_SCSI_DMA=y 763CONFIG_SCSI_DMA=y
501# CONFIG_SCSI_TGT is not set 764# CONFIG_SCSI_TGT is not set
502CONFIG_SCSI_NETLINK=y 765# CONFIG_SCSI_NETLINK is not set
503# CONFIG_SCSI_PROC_FS is not set 766CONFIG_SCSI_PROC_FS=y
504 767
505# 768#
506# SCSI support type (disk, tape, CD-ROM) 769# SCSI support type (disk, tape, CD-ROM)
@@ -509,7 +772,7 @@ CONFIG_BLK_DEV_SD=y
509# CONFIG_CHR_DEV_ST is not set 772# CONFIG_CHR_DEV_ST is not set
510# CONFIG_CHR_DEV_OSST is not set 773# CONFIG_CHR_DEV_OSST is not set
511CONFIG_BLK_DEV_SR=y 774CONFIG_BLK_DEV_SR=y
512# CONFIG_BLK_DEV_SR_VENDOR is not set 775CONFIG_BLK_DEV_SR_VENDOR=y
513CONFIG_CHR_DEV_SG=y 776CONFIG_CHR_DEV_SG=y
514# CONFIG_CHR_DEV_SCH is not set 777# CONFIG_CHR_DEV_SCH is not set
515 778
@@ -526,73 +789,37 @@ CONFIG_SCSI_WAIT_SCAN=m
526# SCSI Transports 789# SCSI Transports
527# 790#
528CONFIG_SCSI_SPI_ATTRS=y 791CONFIG_SCSI_SPI_ATTRS=y
529CONFIG_SCSI_FC_ATTRS=y 792# CONFIG_SCSI_FC_ATTRS is not set
530# CONFIG_SCSI_ISCSI_ATTRS is not set 793# CONFIG_SCSI_ISCSI_ATTRS is not set
531CONFIG_SCSI_SAS_ATTRS=y 794# CONFIG_SCSI_SAS_ATTRS is not set
532# CONFIG_SCSI_SAS_LIBSAS is not set 795# CONFIG_SCSI_SAS_LIBSAS is not set
533 796# CONFIG_SCSI_SRP_ATTRS is not set
534# 797# CONFIG_SCSI_LOWLEVEL is not set
535# SCSI low-level drivers 798# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
536#
537# CONFIG_ISCSI_TCP is not set
538# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
539# CONFIG_SCSI_3W_9XXX is not set
540# CONFIG_SCSI_ACARD is not set
541# CONFIG_SCSI_AACRAID is not set
542# CONFIG_SCSI_AIC7XXX is not set
543# CONFIG_SCSI_AIC7XXX_OLD is not set
544CONFIG_SCSI_AIC79XX=y
545CONFIG_AIC79XX_CMDS_PER_DEVICE=32
546CONFIG_AIC79XX_RESET_DELAY_MS=4000
547# CONFIG_AIC79XX_DEBUG_ENABLE is not set
548CONFIG_AIC79XX_DEBUG_MASK=0
549# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
550# CONFIG_SCSI_AIC94XX is not set
551# CONFIG_SCSI_ARCMSR is not set
552# CONFIG_MEGARAID_NEWGEN is not set
553# CONFIG_MEGARAID_LEGACY is not set
554# CONFIG_MEGARAID_SAS is not set
555# CONFIG_SCSI_HPTIOP is not set
556# CONFIG_SCSI_BUSLOGIC is not set
557# CONFIG_SCSI_DMX3191D is not set
558# CONFIG_SCSI_EATA is not set
559# CONFIG_SCSI_FUTURE_DOMAIN is not set
560# CONFIG_SCSI_GDTH is not set
561# CONFIG_SCSI_IPS is not set
562# CONFIG_SCSI_INITIO is not set
563# CONFIG_SCSI_INIA100 is not set
564# CONFIG_SCSI_STEX is not set
565# CONFIG_SCSI_SYM53C8XX_2 is not set
566# CONFIG_SCSI_IPR is not set
567# CONFIG_SCSI_QLOGIC_1280 is not set
568# CONFIG_SCSI_QLA_FC is not set
569# CONFIG_SCSI_QLA_ISCSI is not set
570# CONFIG_SCSI_LPFC is not set
571# CONFIG_SCSI_DC395x is not set
572# CONFIG_SCSI_DC390T is not set
573# CONFIG_SCSI_DEBUG is not set
574# CONFIG_SCSI_SRP is not set
575CONFIG_ATA=y 799CONFIG_ATA=y
576# CONFIG_ATA_NONSTANDARD is not set 800# CONFIG_ATA_NONSTANDARD is not set
577CONFIG_ATA_ACPI=y 801CONFIG_ATA_ACPI=y
802CONFIG_SATA_PMP=y
578CONFIG_SATA_AHCI=y 803CONFIG_SATA_AHCI=y
579CONFIG_SATA_SVW=y 804# CONFIG_SATA_SIL24 is not set
805CONFIG_ATA_SFF=y
806# CONFIG_SATA_SVW is not set
580CONFIG_ATA_PIIX=y 807CONFIG_ATA_PIIX=y
581# CONFIG_SATA_MV is not set 808# CONFIG_SATA_MV is not set
582CONFIG_SATA_NV=y 809# CONFIG_SATA_NV is not set
583# CONFIG_PDC_ADMA is not set 810# CONFIG_PDC_ADMA is not set
584# CONFIG_SATA_QSTOR is not set 811# CONFIG_SATA_QSTOR is not set
585# CONFIG_SATA_PROMISE is not set 812# CONFIG_SATA_PROMISE is not set
586# CONFIG_SATA_SX4 is not set 813# CONFIG_SATA_SX4 is not set
587CONFIG_SATA_SIL=y 814# CONFIG_SATA_SIL is not set
588# CONFIG_SATA_SIL24 is not set
589# CONFIG_SATA_SIS is not set 815# CONFIG_SATA_SIS is not set
590# CONFIG_SATA_ULI is not set 816# CONFIG_SATA_ULI is not set
591CONFIG_SATA_VIA=y 817# CONFIG_SATA_VIA is not set
592# CONFIG_SATA_VITESSE is not set 818# CONFIG_SATA_VITESSE is not set
593# CONFIG_SATA_INIC162X is not set 819# CONFIG_SATA_INIC162X is not set
820# CONFIG_PATA_ACPI is not set
594# CONFIG_PATA_ALI is not set 821# CONFIG_PATA_ALI is not set
595# CONFIG_PATA_AMD is not set 822CONFIG_PATA_AMD=y
596# CONFIG_PATA_ARTOP is not set 823# CONFIG_PATA_ARTOP is not set
597# CONFIG_PATA_ATIIXP is not set 824# CONFIG_PATA_ATIIXP is not set
598# CONFIG_PATA_CMD640_PCI is not set 825# CONFIG_PATA_CMD640_PCI is not set
@@ -612,11 +839,14 @@ CONFIG_SATA_VIA=y
612# CONFIG_PATA_TRIFLEX is not set 839# CONFIG_PATA_TRIFLEX is not set
613# CONFIG_PATA_MARVELL is not set 840# CONFIG_PATA_MARVELL is not set
614# CONFIG_PATA_MPIIX is not set 841# CONFIG_PATA_MPIIX is not set
615# CONFIG_PATA_OLDPIIX is not set 842CONFIG_PATA_OLDPIIX=y
616# CONFIG_PATA_NETCELL is not set 843# CONFIG_PATA_NETCELL is not set
844# CONFIG_PATA_NINJA32 is not set
617# CONFIG_PATA_NS87410 is not set 845# CONFIG_PATA_NS87410 is not set
846# CONFIG_PATA_NS87415 is not set
618# CONFIG_PATA_OPTI is not set 847# CONFIG_PATA_OPTI is not set
619# CONFIG_PATA_OPTIDMA is not set 848# CONFIG_PATA_OPTIDMA is not set
849# CONFIG_PATA_PCMCIA is not set
620# CONFIG_PATA_PDC_OLD is not set 850# CONFIG_PATA_PDC_OLD is not set
621# CONFIG_PATA_RADISYS is not set 851# CONFIG_PATA_RADISYS is not set
622# CONFIG_PATA_RZ1000 is not set 852# CONFIG_PATA_RZ1000 is not set
@@ -628,65 +858,42 @@ CONFIG_SATA_VIA=y
628# CONFIG_PATA_VIA is not set 858# CONFIG_PATA_VIA is not set
629# CONFIG_PATA_WINBOND is not set 859# CONFIG_PATA_WINBOND is not set
630CONFIG_MD=y 860CONFIG_MD=y
631# CONFIG_BLK_DEV_MD is not set 861CONFIG_BLK_DEV_MD=y
862# CONFIG_MD_LINEAR is not set
863# CONFIG_MD_RAID0 is not set
864# CONFIG_MD_RAID1 is not set
865# CONFIG_MD_RAID10 is not set
866# CONFIG_MD_RAID456 is not set
867# CONFIG_MD_MULTIPATH is not set
868# CONFIG_MD_FAULTY is not set
632CONFIG_BLK_DEV_DM=y 869CONFIG_BLK_DEV_DM=y
633# CONFIG_DM_DEBUG is not set 870# CONFIG_DM_DEBUG is not set
634# CONFIG_DM_CRYPT is not set 871# CONFIG_DM_CRYPT is not set
635# CONFIG_DM_SNAPSHOT is not set 872# CONFIG_DM_SNAPSHOT is not set
636# CONFIG_DM_MIRROR is not set 873CONFIG_DM_MIRROR=y
637# CONFIG_DM_ZERO is not set 874CONFIG_DM_ZERO=y
638# CONFIG_DM_MULTIPATH is not set 875# CONFIG_DM_MULTIPATH is not set
639# CONFIG_DM_DELAY is not set 876# CONFIG_DM_DELAY is not set
640 877# CONFIG_DM_UEVENT is not set
641# 878# CONFIG_FUSION is not set
642# Fusion MPT device support
643#
644CONFIG_FUSION=y
645CONFIG_FUSION_SPI=y
646# CONFIG_FUSION_FC is not set
647# CONFIG_FUSION_SAS is not set
648CONFIG_FUSION_MAX_SGE=128
649# CONFIG_FUSION_CTL is not set
650 879
651# 880#
652# IEEE 1394 (FireWire) support 881# IEEE 1394 (FireWire) support
653# 882#
654# CONFIG_FIREWIRE is not set 883# CONFIG_FIREWIRE is not set
655CONFIG_IEEE1394=y 884# CONFIG_IEEE1394 is not set
656
657#
658# Subsystem Options
659#
660# CONFIG_IEEE1394_VERBOSEDEBUG is not set
661
662#
663# Controllers
664#
665
666#
667# Texas Instruments PCILynx requires I2C
668#
669CONFIG_IEEE1394_OHCI1394=y
670
671#
672# Protocols
673#
674# CONFIG_IEEE1394_VIDEO1394 is not set
675# CONFIG_IEEE1394_SBP2 is not set
676# CONFIG_IEEE1394_ETH1394_ROM_ENTRY is not set
677# CONFIG_IEEE1394_ETH1394 is not set
678# CONFIG_IEEE1394_DV1394 is not set
679CONFIG_IEEE1394_RAWIO=y
680# CONFIG_I2O is not set 885# CONFIG_I2O is not set
681CONFIG_MACINTOSH_DRIVERS=y 886CONFIG_MACINTOSH_DRIVERS=y
682# CONFIG_MAC_EMUMOUSEBTN is not set 887CONFIG_MAC_EMUMOUSEBTN=y
683CONFIG_NETDEVICES=y 888CONFIG_NETDEVICES=y
684CONFIG_NETDEVICES_MULTIQUEUE=y 889# CONFIG_NETDEVICES_MULTIQUEUE is not set
890# CONFIG_IFB is not set
685# CONFIG_DUMMY is not set 891# CONFIG_DUMMY is not set
686# CONFIG_BONDING is not set 892# CONFIG_BONDING is not set
687# CONFIG_MACVLAN is not set 893# CONFIG_MACVLAN is not set
688# CONFIG_EQUALIZER is not set 894# CONFIG_EQUALIZER is not set
689CONFIG_TUN=y 895# CONFIG_TUN is not set
896# CONFIG_VETH is not set
690# CONFIG_NET_SB1000 is not set 897# CONFIG_NET_SB1000 is not set
691# CONFIG_ARCNET is not set 898# CONFIG_ARCNET is not set
692# CONFIG_PHYLIB is not set 899# CONFIG_PHYLIB is not set
@@ -696,39 +903,40 @@ CONFIG_MII=y
696# CONFIG_SUNGEM is not set 903# CONFIG_SUNGEM is not set
697# CONFIG_CASSINI is not set 904# CONFIG_CASSINI is not set
698CONFIG_NET_VENDOR_3COM=y 905CONFIG_NET_VENDOR_3COM=y
699CONFIG_VORTEX=y 906# CONFIG_VORTEX is not set
700# CONFIG_TYPHOON is not set 907# CONFIG_TYPHOON is not set
701CONFIG_NET_TULIP=y 908CONFIG_NET_TULIP=y
702# CONFIG_DE2104X is not set 909# CONFIG_DE2104X is not set
703CONFIG_TULIP=y 910# CONFIG_TULIP is not set
704# CONFIG_TULIP_MWI is not set
705# CONFIG_TULIP_MMIO is not set
706# CONFIG_TULIP_NAPI is not set
707# CONFIG_DE4X5 is not set 911# CONFIG_DE4X5 is not set
708# CONFIG_WINBOND_840 is not set 912# CONFIG_WINBOND_840 is not set
709# CONFIG_DM9102 is not set 913# CONFIG_DM9102 is not set
710# CONFIG_ULI526X is not set 914# CONFIG_ULI526X is not set
915# CONFIG_PCMCIA_XIRCOM is not set
711# CONFIG_HP100 is not set 916# CONFIG_HP100 is not set
917# CONFIG_IBM_NEW_EMAC_ZMII is not set
918# CONFIG_IBM_NEW_EMAC_RGMII is not set
919# CONFIG_IBM_NEW_EMAC_TAH is not set
920# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
712CONFIG_NET_PCI=y 921CONFIG_NET_PCI=y
713# CONFIG_PCNET32 is not set 922# CONFIG_PCNET32 is not set
714CONFIG_AMD8111_ETH=y 923# CONFIG_AMD8111_ETH is not set
715# CONFIG_AMD8111E_NAPI is not set
716# CONFIG_ADAPTEC_STARFIRE is not set 924# CONFIG_ADAPTEC_STARFIRE is not set
717CONFIG_B44=y 925# CONFIG_B44 is not set
718CONFIG_FORCEDETH=y 926CONFIG_FORCEDETH=y
719# CONFIG_FORCEDETH_NAPI is not set 927# CONFIG_FORCEDETH_NAPI is not set
720# CONFIG_DGRS is not set
721# CONFIG_EEPRO100 is not set 928# CONFIG_EEPRO100 is not set
722CONFIG_E100=y 929CONFIG_E100=y
723# CONFIG_FEALNX is not set 930# CONFIG_FEALNX is not set
724# CONFIG_NATSEMI is not set 931# CONFIG_NATSEMI is not set
725# CONFIG_NE2K_PCI is not set 932# CONFIG_NE2K_PCI is not set
726CONFIG_8139CP=y 933# CONFIG_8139CP is not set
727CONFIG_8139TOO=y 934CONFIG_8139TOO=y
728# CONFIG_8139TOO_PIO is not set 935CONFIG_8139TOO_PIO=y
729# CONFIG_8139TOO_TUNE_TWISTER is not set 936# CONFIG_8139TOO_TUNE_TWISTER is not set
730# CONFIG_8139TOO_8129 is not set 937# CONFIG_8139TOO_8129 is not set
731# CONFIG_8139_OLD_RX_RESET is not set 938# CONFIG_8139_OLD_RX_RESET is not set
939# CONFIG_R6040 is not set
732# CONFIG_SIS900 is not set 940# CONFIG_SIS900 is not set
733# CONFIG_EPIC100 is not set 941# CONFIG_EPIC100 is not set
734# CONFIG_SUNDANCE is not set 942# CONFIG_SUNDANCE is not set
@@ -740,34 +948,74 @@ CONFIG_NETDEV_1000=y
740CONFIG_E1000=y 948CONFIG_E1000=y
741# CONFIG_E1000_NAPI is not set 949# CONFIG_E1000_NAPI is not set
742# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set 950# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
951# CONFIG_E1000E is not set
952# CONFIG_E1000E_ENABLED is not set
953# CONFIG_IP1000 is not set
954# CONFIG_IGB is not set
743# CONFIG_NS83820 is not set 955# CONFIG_NS83820 is not set
744# CONFIG_HAMACHI is not set 956# CONFIG_HAMACHI is not set
745# CONFIG_YELLOWFIN is not set 957# CONFIG_YELLOWFIN is not set
746# CONFIG_R8169 is not set 958# CONFIG_R8169 is not set
747# CONFIG_SIS190 is not set 959# CONFIG_SIS190 is not set
748# CONFIG_SKGE is not set 960# CONFIG_SKGE is not set
749# CONFIG_SKY2 is not set 961CONFIG_SKY2=y
962# CONFIG_SKY2_DEBUG is not set
750# CONFIG_VIA_VELOCITY is not set 963# CONFIG_VIA_VELOCITY is not set
751CONFIG_TIGON3=y 964CONFIG_TIGON3=y
752CONFIG_BNX2=y 965# CONFIG_BNX2 is not set
753# CONFIG_QLA3XXX is not set 966# CONFIG_QLA3XXX is not set
754# CONFIG_ATL1 is not set 967# CONFIG_ATL1 is not set
755CONFIG_NETDEV_10000=y 968CONFIG_NETDEV_10000=y
756# CONFIG_CHELSIO_T1 is not set 969# CONFIG_CHELSIO_T1 is not set
757# CONFIG_CHELSIO_T3 is not set 970# CONFIG_CHELSIO_T3 is not set
971# CONFIG_IXGBE is not set
758# CONFIG_IXGB is not set 972# CONFIG_IXGB is not set
759CONFIG_S2IO=m 973# CONFIG_S2IO is not set
760# CONFIG_S2IO_NAPI is not set
761# CONFIG_MYRI10GE is not set 974# CONFIG_MYRI10GE is not set
762# CONFIG_NETXEN_NIC is not set 975# CONFIG_NETXEN_NIC is not set
976# CONFIG_NIU is not set
763# CONFIG_MLX4_CORE is not set 977# CONFIG_MLX4_CORE is not set
764# CONFIG_TR is not set 978# CONFIG_TEHUTI is not set
979# CONFIG_BNX2X is not set
980# CONFIG_SFC is not set
981CONFIG_TR=y
982# CONFIG_IBMOL is not set
983# CONFIG_3C359 is not set
984# CONFIG_TMS380TR is not set
765 985
766# 986#
767# Wireless LAN 987# Wireless LAN
768# 988#
769# CONFIG_WLAN_PRE80211 is not set 989# CONFIG_WLAN_PRE80211 is not set
770# CONFIG_WLAN_80211 is not set 990CONFIG_WLAN_80211=y
991# CONFIG_PCMCIA_RAYCS is not set
992# CONFIG_IPW2100 is not set
993# CONFIG_IPW2200 is not set
994# CONFIG_LIBERTAS is not set
995# CONFIG_AIRO is not set
996# CONFIG_HERMES is not set
997# CONFIG_ATMEL is not set
998# CONFIG_AIRO_CS is not set
999# CONFIG_PCMCIA_WL3501 is not set
1000# CONFIG_PRISM54 is not set
1001# CONFIG_USB_ZD1201 is not set
1002# CONFIG_USB_NET_RNDIS_WLAN is not set
1003# CONFIG_RTL8180 is not set
1004# CONFIG_RTL8187 is not set
1005# CONFIG_ADM8211 is not set
1006# CONFIG_P54_COMMON is not set
1007CONFIG_ATH5K=y
1008# CONFIG_ATH5K_DEBUG is not set
1009# CONFIG_IWLWIFI is not set
1010# CONFIG_IWLCORE is not set
1011# CONFIG_IWLWIFI_LEDS is not set
1012# CONFIG_IWL4965 is not set
1013# CONFIG_IWL3945 is not set
1014# CONFIG_HOSTAP is not set
1015# CONFIG_B43 is not set
1016# CONFIG_B43LEGACY is not set
1017# CONFIG_ZD1211RW is not set
1018# CONFIG_RT2X00 is not set
771 1019
772# 1020#
773# USB Network Adapters 1021# USB Network Adapters
@@ -776,16 +1024,26 @@ CONFIG_S2IO=m
776# CONFIG_USB_KAWETH is not set 1024# CONFIG_USB_KAWETH is not set
777# CONFIG_USB_PEGASUS is not set 1025# CONFIG_USB_PEGASUS is not set
778# CONFIG_USB_RTL8150 is not set 1026# CONFIG_USB_RTL8150 is not set
779# CONFIG_USB_USBNET_MII is not set
780# CONFIG_USB_USBNET is not set 1027# CONFIG_USB_USBNET is not set
1028CONFIG_NET_PCMCIA=y
1029# CONFIG_PCMCIA_3C589 is not set
1030# CONFIG_PCMCIA_3C574 is not set
1031# CONFIG_PCMCIA_FMVJ18X is not set
1032# CONFIG_PCMCIA_PCNET is not set
1033# CONFIG_PCMCIA_NMCLAN is not set
1034# CONFIG_PCMCIA_SMC91C92 is not set
1035# CONFIG_PCMCIA_XIRC2PS is not set
1036# CONFIG_PCMCIA_AXNET is not set
781# CONFIG_WAN is not set 1037# CONFIG_WAN is not set
782# CONFIG_FDDI is not set 1038CONFIG_FDDI=y
1039# CONFIG_DEFXX is not set
1040# CONFIG_SKFP is not set
783# CONFIG_HIPPI is not set 1041# CONFIG_HIPPI is not set
784# CONFIG_PPP is not set 1042# CONFIG_PPP is not set
785# CONFIG_SLIP is not set 1043# CONFIG_SLIP is not set
786# CONFIG_NET_FC is not set 1044# CONFIG_NET_FC is not set
787# CONFIG_SHAPER is not set
788CONFIG_NETCONSOLE=y 1045CONFIG_NETCONSOLE=y
1046# CONFIG_NETCONSOLE_DYNAMIC is not set
789CONFIG_NETPOLL=y 1047CONFIG_NETPOLL=y
790# CONFIG_NETPOLL_TRAP is not set 1048# CONFIG_NETPOLL_TRAP is not set
791CONFIG_NET_POLL_CONTROLLER=y 1049CONFIG_NET_POLL_CONTROLLER=y
@@ -796,18 +1054,17 @@ CONFIG_NET_POLL_CONTROLLER=y
796# Input device support 1054# Input device support
797# 1055#
798CONFIG_INPUT=y 1056CONFIG_INPUT=y
799# CONFIG_INPUT_FF_MEMLESS is not set 1057CONFIG_INPUT_FF_MEMLESS=y
800# CONFIG_INPUT_POLLDEV is not set 1058CONFIG_INPUT_POLLDEV=y
801 1059
802# 1060#
803# Userland interfaces 1061# Userland interfaces
804# 1062#
805CONFIG_INPUT_MOUSEDEV=y 1063CONFIG_INPUT_MOUSEDEV=y
806CONFIG_INPUT_MOUSEDEV_PSAUX=y 1064# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
807CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 1065CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
808CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 1066CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
809# CONFIG_INPUT_JOYDEV is not set 1067# CONFIG_INPUT_JOYDEV is not set
810# CONFIG_INPUT_TSDEV is not set
811CONFIG_INPUT_EVDEV=y 1068CONFIG_INPUT_EVDEV=y
812# CONFIG_INPUT_EVBUG is not set 1069# CONFIG_INPUT_EVBUG is not set
813 1070
@@ -832,17 +1089,62 @@ CONFIG_MOUSE_PS2_TRACKPOINT=y
832# CONFIG_MOUSE_SERIAL is not set 1089# CONFIG_MOUSE_SERIAL is not set
833# CONFIG_MOUSE_APPLETOUCH is not set 1090# CONFIG_MOUSE_APPLETOUCH is not set
834# CONFIG_MOUSE_VSXXXAA is not set 1091# CONFIG_MOUSE_VSXXXAA is not set
835# CONFIG_INPUT_JOYSTICK is not set 1092CONFIG_INPUT_JOYSTICK=y
836# CONFIG_INPUT_TABLET is not set 1093# CONFIG_JOYSTICK_ANALOG is not set
837# CONFIG_INPUT_TOUCHSCREEN is not set 1094# CONFIG_JOYSTICK_A3D is not set
838# CONFIG_INPUT_MISC is not set 1095# CONFIG_JOYSTICK_ADI is not set
1096# CONFIG_JOYSTICK_COBRA is not set
1097# CONFIG_JOYSTICK_GF2K is not set
1098# CONFIG_JOYSTICK_GRIP is not set
1099# CONFIG_JOYSTICK_GRIP_MP is not set
1100# CONFIG_JOYSTICK_GUILLEMOT is not set
1101# CONFIG_JOYSTICK_INTERACT is not set
1102# CONFIG_JOYSTICK_SIDEWINDER is not set
1103# CONFIG_JOYSTICK_TMDC is not set
1104# CONFIG_JOYSTICK_IFORCE is not set
1105# CONFIG_JOYSTICK_WARRIOR is not set
1106# CONFIG_JOYSTICK_MAGELLAN is not set
1107# CONFIG_JOYSTICK_SPACEORB is not set
1108# CONFIG_JOYSTICK_SPACEBALL is not set
1109# CONFIG_JOYSTICK_STINGER is not set
1110# CONFIG_JOYSTICK_TWIDJOY is not set
1111# CONFIG_JOYSTICK_ZHENHUA is not set
1112# CONFIG_JOYSTICK_JOYDUMP is not set
1113# CONFIG_JOYSTICK_XPAD is not set
1114CONFIG_INPUT_TABLET=y
1115# CONFIG_TABLET_USB_ACECAD is not set
1116# CONFIG_TABLET_USB_AIPTEK is not set
1117# CONFIG_TABLET_USB_GTCO is not set
1118# CONFIG_TABLET_USB_KBTAB is not set
1119# CONFIG_TABLET_USB_WACOM is not set
1120CONFIG_INPUT_TOUCHSCREEN=y
1121# CONFIG_TOUCHSCREEN_FUJITSU is not set
1122# CONFIG_TOUCHSCREEN_GUNZE is not set
1123# CONFIG_TOUCHSCREEN_ELO is not set
1124# CONFIG_TOUCHSCREEN_MTOUCH is not set
1125# CONFIG_TOUCHSCREEN_MK712 is not set
1126# CONFIG_TOUCHSCREEN_PENMOUNT is not set
1127# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
1128# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
1129# CONFIG_TOUCHSCREEN_UCB1400 is not set
1130# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
1131CONFIG_INPUT_MISC=y
1132# CONFIG_INPUT_PCSPKR is not set
1133# CONFIG_INPUT_APANEL is not set
1134# CONFIG_INPUT_ATLAS_BTNS is not set
1135# CONFIG_INPUT_ATI_REMOTE is not set
1136# CONFIG_INPUT_ATI_REMOTE2 is not set
1137# CONFIG_INPUT_KEYSPAN_REMOTE is not set
1138# CONFIG_INPUT_POWERMATE is not set
1139# CONFIG_INPUT_YEALINK is not set
1140# CONFIG_INPUT_UINPUT is not set
839 1141
840# 1142#
841# Hardware I/O ports 1143# Hardware I/O ports
842# 1144#
843CONFIG_SERIO=y 1145CONFIG_SERIO=y
844CONFIG_SERIO_I8042=y 1146CONFIG_SERIO_I8042=y
845# CONFIG_SERIO_SERPORT is not set 1147CONFIG_SERIO_SERPORT=y
846# CONFIG_SERIO_CT82C710 is not set 1148# CONFIG_SERIO_CT82C710 is not set
847# CONFIG_SERIO_PCIPS2 is not set 1149# CONFIG_SERIO_PCIPS2 is not set
848CONFIG_SERIO_LIBPS2=y 1150CONFIG_SERIO_LIBPS2=y
@@ -855,8 +1157,26 @@ CONFIG_SERIO_LIBPS2=y
855CONFIG_VT=y 1157CONFIG_VT=y
856CONFIG_VT_CONSOLE=y 1158CONFIG_VT_CONSOLE=y
857CONFIG_HW_CONSOLE=y 1159CONFIG_HW_CONSOLE=y
858# CONFIG_VT_HW_CONSOLE_BINDING is not set 1160CONFIG_VT_HW_CONSOLE_BINDING=y
859# CONFIG_SERIAL_NONSTANDARD is not set 1161CONFIG_DEVKMEM=y
1162CONFIG_SERIAL_NONSTANDARD=y
1163# CONFIG_COMPUTONE is not set
1164# CONFIG_ROCKETPORT is not set
1165# CONFIG_CYCLADES is not set
1166# CONFIG_DIGIEPCA is not set
1167# CONFIG_MOXA_INTELLIO is not set
1168# CONFIG_MOXA_SMARTIO is not set
1169# CONFIG_ISI is not set
1170# CONFIG_SYNCLINK is not set
1171# CONFIG_SYNCLINKMP is not set
1172# CONFIG_SYNCLINK_GT is not set
1173# CONFIG_N_HDLC is not set
1174# CONFIG_RISCOM8 is not set
1175# CONFIG_SPECIALIX is not set
1176# CONFIG_SX is not set
1177# CONFIG_RIO is not set
1178# CONFIG_STALDRV is not set
1179# CONFIG_NOZOMI is not set
860 1180
861# 1181#
862# Serial drivers 1182# Serial drivers
@@ -866,9 +1186,14 @@ CONFIG_SERIAL_8250_CONSOLE=y
866CONFIG_FIX_EARLYCON_MEM=y 1186CONFIG_FIX_EARLYCON_MEM=y
867CONFIG_SERIAL_8250_PCI=y 1187CONFIG_SERIAL_8250_PCI=y
868CONFIG_SERIAL_8250_PNP=y 1188CONFIG_SERIAL_8250_PNP=y
869CONFIG_SERIAL_8250_NR_UARTS=4 1189# CONFIG_SERIAL_8250_CS is not set
1190CONFIG_SERIAL_8250_NR_UARTS=32
870CONFIG_SERIAL_8250_RUNTIME_UARTS=4 1191CONFIG_SERIAL_8250_RUNTIME_UARTS=4
871# CONFIG_SERIAL_8250_EXTENDED is not set 1192CONFIG_SERIAL_8250_EXTENDED=y
1193CONFIG_SERIAL_8250_MANY_PORTS=y
1194CONFIG_SERIAL_8250_SHARE_IRQ=y
1195CONFIG_SERIAL_8250_DETECT_IRQ=y
1196CONFIG_SERIAL_8250_RSA=y
872 1197
873# 1198#
874# Non-8250 serial port support 1199# Non-8250 serial port support
@@ -877,78 +1202,260 @@ CONFIG_SERIAL_CORE=y
877CONFIG_SERIAL_CORE_CONSOLE=y 1202CONFIG_SERIAL_CORE_CONSOLE=y
878# CONFIG_SERIAL_JSM is not set 1203# CONFIG_SERIAL_JSM is not set
879CONFIG_UNIX98_PTYS=y 1204CONFIG_UNIX98_PTYS=y
880CONFIG_LEGACY_PTYS=y 1205# CONFIG_LEGACY_PTYS is not set
881CONFIG_LEGACY_PTY_COUNT=256
882# CONFIG_IPMI_HANDLER is not set 1206# CONFIG_IPMI_HANDLER is not set
883# CONFIG_WATCHDOG is not set
884CONFIG_HW_RANDOM=y 1207CONFIG_HW_RANDOM=y
885CONFIG_HW_RANDOM_INTEL=y 1208# CONFIG_HW_RANDOM_INTEL is not set
886CONFIG_HW_RANDOM_AMD=y 1209# CONFIG_HW_RANDOM_AMD is not set
887# CONFIG_NVRAM is not set 1210CONFIG_NVRAM=y
888CONFIG_RTC=y
889# CONFIG_R3964 is not set 1211# CONFIG_R3964 is not set
890# CONFIG_APPLICOM is not set 1212# CONFIG_APPLICOM is not set
891CONFIG_AGP=y 1213
892CONFIG_AGP_AMD64=y 1214#
893CONFIG_AGP_INTEL=y 1215# PCMCIA character devices
894# CONFIG_AGP_SIS is not set 1216#
895# CONFIG_AGP_VIA is not set 1217# CONFIG_SYNCLINK_CS is not set
896# CONFIG_DRM is not set 1218# CONFIG_CARDMAN_4000 is not set
1219# CONFIG_CARDMAN_4040 is not set
1220# CONFIG_IPWIRELESS is not set
897# CONFIG_MWAVE is not set 1221# CONFIG_MWAVE is not set
898# CONFIG_PC8736x_GPIO is not set 1222# CONFIG_PC8736x_GPIO is not set
899CONFIG_RAW_DRIVER=y 1223# CONFIG_RAW_DRIVER is not set
900CONFIG_MAX_RAW_DEVS=256
901CONFIG_HPET=y 1224CONFIG_HPET=y
902# CONFIG_HPET_RTC_IRQ is not set 1225# CONFIG_HPET_RTC_IRQ is not set
903CONFIG_HPET_MMAP=y 1226# CONFIG_HPET_MMAP is not set
904# CONFIG_HANGCHECK_TIMER is not set 1227# CONFIG_HANGCHECK_TIMER is not set
905# CONFIG_TCG_TPM is not set 1228# CONFIG_TCG_TPM is not set
906# CONFIG_TELCLOCK is not set 1229# CONFIG_TELCLOCK is not set
907CONFIG_DEVPORT=y 1230CONFIG_DEVPORT=y
908# CONFIG_I2C is not set 1231CONFIG_I2C=y
909 1232CONFIG_I2C_BOARDINFO=y
910# 1233# CONFIG_I2C_CHARDEV is not set
911# SPI support 1234
912# 1235#
1236# I2C Hardware Bus support
1237#
1238# CONFIG_I2C_ALI1535 is not set
1239# CONFIG_I2C_ALI1563 is not set
1240# CONFIG_I2C_ALI15X3 is not set
1241# CONFIG_I2C_AMD756 is not set
1242# CONFIG_I2C_AMD8111 is not set
1243CONFIG_I2C_I801=y
1244# CONFIG_I2C_I810 is not set
1245# CONFIG_I2C_PIIX4 is not set
1246# CONFIG_I2C_NFORCE2 is not set
1247# CONFIG_I2C_OCORES is not set
1248# CONFIG_I2C_PARPORT_LIGHT is not set
1249# CONFIG_I2C_PROSAVAGE is not set
1250# CONFIG_I2C_SAVAGE4 is not set
1251# CONFIG_I2C_SIMTEC is not set
1252# CONFIG_I2C_SIS5595 is not set
1253# CONFIG_I2C_SIS630 is not set
1254# CONFIG_I2C_SIS96X is not set
1255# CONFIG_I2C_TAOS_EVM is not set
1256# CONFIG_I2C_STUB is not set
1257# CONFIG_I2C_TINY_USB is not set
1258# CONFIG_I2C_VIA is not set
1259# CONFIG_I2C_VIAPRO is not set
1260# CONFIG_I2C_VOODOO3 is not set
1261# CONFIG_I2C_PCA_PLATFORM is not set
1262
1263#
1264# Miscellaneous I2C Chip support
1265#
1266# CONFIG_DS1682 is not set
1267# CONFIG_SENSORS_EEPROM is not set
1268# CONFIG_SENSORS_PCF8574 is not set
1269# CONFIG_PCF8575 is not set
1270# CONFIG_SENSORS_PCF8591 is not set
1271# CONFIG_SENSORS_MAX6875 is not set
1272# CONFIG_SENSORS_TSL2550 is not set
1273# CONFIG_I2C_DEBUG_CORE is not set
1274# CONFIG_I2C_DEBUG_ALGO is not set
1275# CONFIG_I2C_DEBUG_BUS is not set
1276# CONFIG_I2C_DEBUG_CHIP is not set
913# CONFIG_SPI is not set 1277# CONFIG_SPI is not set
914# CONFIG_SPI_MASTER is not set
915# CONFIG_W1 is not set 1278# CONFIG_W1 is not set
916# CONFIG_POWER_SUPPLY is not set 1279CONFIG_POWER_SUPPLY=y
1280# CONFIG_POWER_SUPPLY_DEBUG is not set
1281# CONFIG_PDA_POWER is not set
1282# CONFIG_BATTERY_DS2760 is not set
917# CONFIG_HWMON is not set 1283# CONFIG_HWMON is not set
1284CONFIG_THERMAL=y
1285CONFIG_WATCHDOG=y
1286# CONFIG_WATCHDOG_NOWAYOUT is not set
1287
1288#
1289# Watchdog Device Drivers
1290#
1291# CONFIG_SOFT_WATCHDOG is not set
1292# CONFIG_ACQUIRE_WDT is not set
1293# CONFIG_ADVANTECH_WDT is not set
1294# CONFIG_ALIM1535_WDT is not set
1295# CONFIG_ALIM7101_WDT is not set
1296# CONFIG_SC520_WDT is not set
1297# CONFIG_EUROTECH_WDT is not set
1298# CONFIG_IB700_WDT is not set
1299# CONFIG_IBMASR is not set
1300# CONFIG_WAFER_WDT is not set
1301# CONFIG_I6300ESB_WDT is not set
1302# CONFIG_ITCO_WDT is not set
1303# CONFIG_IT8712F_WDT is not set
1304# CONFIG_HP_WATCHDOG is not set
1305# CONFIG_SC1200_WDT is not set
1306# CONFIG_PC87413_WDT is not set
1307# CONFIG_60XX_WDT is not set
1308# CONFIG_SBC8360_WDT is not set
1309# CONFIG_CPU5_WDT is not set
1310# CONFIG_SMSC37B787_WDT is not set
1311# CONFIG_W83627HF_WDT is not set
1312# CONFIG_W83697HF_WDT is not set
1313# CONFIG_W83877F_WDT is not set
1314# CONFIG_W83977F_WDT is not set
1315# CONFIG_MACHZ_WDT is not set
1316# CONFIG_SBC_EPX_C3_WATCHDOG is not set
1317
1318#
1319# PCI-based Watchdog Cards
1320#
1321# CONFIG_PCIPCWATCHDOG is not set
1322# CONFIG_WDTPCI is not set
1323
1324#
1325# USB-based Watchdog Cards
1326#
1327# CONFIG_USBPCWATCHDOG is not set
1328
1329#
1330# Sonics Silicon Backplane
1331#
1332CONFIG_SSB_POSSIBLE=y
1333# CONFIG_SSB is not set
918 1334
919# 1335#
920# Multifunction device drivers 1336# Multifunction device drivers
921# 1337#
922# CONFIG_MFD_SM501 is not set 1338# CONFIG_MFD_SM501 is not set
1339# CONFIG_HTC_PASIC3 is not set
923 1340
924# 1341#
925# Multimedia devices 1342# Multimedia devices
926# 1343#
1344
1345#
1346# Multimedia core support
1347#
927# CONFIG_VIDEO_DEV is not set 1348# CONFIG_VIDEO_DEV is not set
928# CONFIG_DVB_CORE is not set 1349# CONFIG_DVB_CORE is not set
1350
1351#
1352# Multimedia drivers
1353#
929CONFIG_DAB=y 1354CONFIG_DAB=y
930# CONFIG_USB_DABUSB is not set 1355# CONFIG_USB_DABUSB is not set
931 1356
932# 1357#
933# Graphics support 1358# Graphics support
934# 1359#
935# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 1360CONFIG_AGP=y
1361CONFIG_AGP_AMD64=y
1362CONFIG_AGP_INTEL=y
1363# CONFIG_AGP_SIS is not set
1364# CONFIG_AGP_VIA is not set
1365CONFIG_DRM=y
1366# CONFIG_DRM_TDFX is not set
1367# CONFIG_DRM_R128 is not set
1368# CONFIG_DRM_RADEON is not set
1369# CONFIG_DRM_I810 is not set
1370# CONFIG_DRM_I830 is not set
1371CONFIG_DRM_I915=y
1372# CONFIG_DRM_MGA is not set
1373# CONFIG_DRM_SIS is not set
1374# CONFIG_DRM_VIA is not set
1375# CONFIG_DRM_SAVAGE is not set
1376# CONFIG_VGASTATE is not set
1377# CONFIG_VIDEO_OUTPUT_CONTROL is not set
1378CONFIG_FB=y
1379# CONFIG_FIRMWARE_EDID is not set
1380# CONFIG_FB_DDC is not set
1381CONFIG_FB_CFB_FILLRECT=y
1382CONFIG_FB_CFB_COPYAREA=y
1383CONFIG_FB_CFB_IMAGEBLIT=y
1384# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
1385# CONFIG_FB_SYS_FILLRECT is not set
1386# CONFIG_FB_SYS_COPYAREA is not set
1387# CONFIG_FB_SYS_IMAGEBLIT is not set
1388# CONFIG_FB_FOREIGN_ENDIAN is not set
1389# CONFIG_FB_SYS_FOPS is not set
1390CONFIG_FB_DEFERRED_IO=y
1391# CONFIG_FB_SVGALIB is not set
1392# CONFIG_FB_MACMODES is not set
1393# CONFIG_FB_BACKLIGHT is not set
1394CONFIG_FB_MODE_HELPERS=y
1395CONFIG_FB_TILEBLITTING=y
1396
1397#
1398# Frame buffer hardware drivers
1399#
1400# CONFIG_FB_CIRRUS is not set
1401# CONFIG_FB_PM2 is not set
1402# CONFIG_FB_CYBER2000 is not set
1403# CONFIG_FB_ARC is not set
1404# CONFIG_FB_ASILIANT is not set
1405# CONFIG_FB_IMSTT is not set
1406# CONFIG_FB_VGA16 is not set
1407# CONFIG_FB_UVESA is not set
1408# CONFIG_FB_VESA is not set
1409CONFIG_FB_EFI=y
1410# CONFIG_FB_IMAC is not set
1411# CONFIG_FB_N411 is not set
1412# CONFIG_FB_HGA is not set
1413# CONFIG_FB_S1D13XXX is not set
1414# CONFIG_FB_NVIDIA is not set
1415# CONFIG_FB_RIVA is not set
1416# CONFIG_FB_LE80578 is not set
1417# CONFIG_FB_INTEL is not set
1418# CONFIG_FB_MATROX is not set
1419# CONFIG_FB_RADEON is not set
1420# CONFIG_FB_ATY128 is not set
1421# CONFIG_FB_ATY is not set
1422# CONFIG_FB_S3 is not set
1423# CONFIG_FB_SAVAGE is not set
1424# CONFIG_FB_SIS is not set
1425# CONFIG_FB_NEOMAGIC is not set
1426# CONFIG_FB_KYRO is not set
1427# CONFIG_FB_3DFX is not set
1428# CONFIG_FB_VOODOO1 is not set
1429# CONFIG_FB_VT8623 is not set
1430# CONFIG_FB_TRIDENT is not set
1431# CONFIG_FB_ARK is not set
1432# CONFIG_FB_PM3 is not set
1433# CONFIG_FB_GEODE is not set
1434# CONFIG_FB_VIRTUAL is not set
1435CONFIG_BACKLIGHT_LCD_SUPPORT=y
1436# CONFIG_LCD_CLASS_DEVICE is not set
1437CONFIG_BACKLIGHT_CLASS_DEVICE=y
1438# CONFIG_BACKLIGHT_CORGI is not set
1439# CONFIG_BACKLIGHT_PROGEAR is not set
936 1440
937# 1441#
938# Display device support 1442# Display device support
939# 1443#
940# CONFIG_DISPLAY_SUPPORT is not set 1444# CONFIG_DISPLAY_SUPPORT is not set
941# CONFIG_VGASTATE is not set
942# CONFIG_FB is not set
943 1445
944# 1446#
945# Console display driver support 1447# Console display driver support
946# 1448#
947CONFIG_VGA_CONSOLE=y 1449CONFIG_VGA_CONSOLE=y
948CONFIG_VGACON_SOFT_SCROLLBACK=y 1450CONFIG_VGACON_SOFT_SCROLLBACK=y
949CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=256 1451CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64
950CONFIG_VIDEO_SELECT=y 1452CONFIG_VIDEO_SELECT=y
951CONFIG_DUMMY_CONSOLE=y 1453CONFIG_DUMMY_CONSOLE=y
1454# CONFIG_FRAMEBUFFER_CONSOLE is not set
1455CONFIG_LOGO=y
1456# CONFIG_LOGO_LINUX_MONO is not set
1457# CONFIG_LOGO_LINUX_VGA16 is not set
1458CONFIG_LOGO_LINUX_CLUT224=y
952 1459
953# 1460#
954# Sound 1461# Sound
@@ -958,33 +1465,165 @@ CONFIG_SOUND=y
958# 1465#
959# Advanced Linux Sound Architecture 1466# Advanced Linux Sound Architecture
960# 1467#
961# CONFIG_SND is not set 1468CONFIG_SND=y
1469CONFIG_SND_TIMER=y
1470CONFIG_SND_PCM=y
1471CONFIG_SND_HWDEP=y
1472CONFIG_SND_SEQUENCER=y
1473CONFIG_SND_SEQ_DUMMY=y
1474CONFIG_SND_OSSEMUL=y
1475CONFIG_SND_MIXER_OSS=y
1476CONFIG_SND_PCM_OSS=y
1477CONFIG_SND_PCM_OSS_PLUGINS=y
1478CONFIG_SND_SEQUENCER_OSS=y
1479CONFIG_SND_DYNAMIC_MINORS=y
1480CONFIG_SND_SUPPORT_OLD_API=y
1481CONFIG_SND_VERBOSE_PROCFS=y
1482# CONFIG_SND_VERBOSE_PRINTK is not set
1483# CONFIG_SND_DEBUG is not set
1484CONFIG_SND_VMASTER=y
1485
1486#
1487# Generic devices
1488#
1489# CONFIG_SND_PCSP is not set
1490# CONFIG_SND_DUMMY is not set
1491# CONFIG_SND_VIRMIDI is not set
1492# CONFIG_SND_MTPAV is not set
1493# CONFIG_SND_SERIAL_U16550 is not set
1494# CONFIG_SND_MPU401 is not set
1495
1496#
1497# PCI devices
1498#
1499# CONFIG_SND_AD1889 is not set
1500# CONFIG_SND_ALS300 is not set
1501# CONFIG_SND_ALS4000 is not set
1502# CONFIG_SND_ALI5451 is not set
1503# CONFIG_SND_ATIIXP is not set
1504# CONFIG_SND_ATIIXP_MODEM is not set
1505# CONFIG_SND_AU8810 is not set
1506# CONFIG_SND_AU8820 is not set
1507# CONFIG_SND_AU8830 is not set
1508# CONFIG_SND_AW2 is not set
1509# CONFIG_SND_AZT3328 is not set
1510# CONFIG_SND_BT87X is not set
1511# CONFIG_SND_CA0106 is not set
1512# CONFIG_SND_CMIPCI is not set
1513# CONFIG_SND_OXYGEN is not set
1514# CONFIG_SND_CS4281 is not set
1515# CONFIG_SND_CS46XX is not set
1516# CONFIG_SND_CS5530 is not set
1517# CONFIG_SND_DARLA20 is not set
1518# CONFIG_SND_GINA20 is not set
1519# CONFIG_SND_LAYLA20 is not set
1520# CONFIG_SND_DARLA24 is not set
1521# CONFIG_SND_GINA24 is not set
1522# CONFIG_SND_LAYLA24 is not set
1523# CONFIG_SND_MONA is not set
1524# CONFIG_SND_MIA is not set
1525# CONFIG_SND_ECHO3G is not set
1526# CONFIG_SND_INDIGO is not set
1527# CONFIG_SND_INDIGOIO is not set
1528# CONFIG_SND_INDIGODJ is not set
1529# CONFIG_SND_EMU10K1 is not set
1530# CONFIG_SND_EMU10K1X is not set
1531# CONFIG_SND_ENS1370 is not set
1532# CONFIG_SND_ENS1371 is not set
1533# CONFIG_SND_ES1938 is not set
1534# CONFIG_SND_ES1968 is not set
1535# CONFIG_SND_FM801 is not set
1536CONFIG_SND_HDA_INTEL=y
1537CONFIG_SND_HDA_HWDEP=y
1538CONFIG_SND_HDA_CODEC_REALTEK=y
1539CONFIG_SND_HDA_CODEC_ANALOG=y
1540CONFIG_SND_HDA_CODEC_SIGMATEL=y
1541CONFIG_SND_HDA_CODEC_VIA=y
1542CONFIG_SND_HDA_CODEC_ATIHDMI=y
1543CONFIG_SND_HDA_CODEC_CONEXANT=y
1544CONFIG_SND_HDA_CODEC_CMEDIA=y
1545CONFIG_SND_HDA_CODEC_SI3054=y
1546CONFIG_SND_HDA_GENERIC=y
1547# CONFIG_SND_HDA_POWER_SAVE is not set
1548# CONFIG_SND_HDSP is not set
1549# CONFIG_SND_HDSPM is not set
1550# CONFIG_SND_HIFIER is not set
1551# CONFIG_SND_ICE1712 is not set
1552# CONFIG_SND_ICE1724 is not set
1553# CONFIG_SND_INTEL8X0 is not set
1554# CONFIG_SND_INTEL8X0M is not set
1555# CONFIG_SND_KORG1212 is not set
1556# CONFIG_SND_MAESTRO3 is not set
1557# CONFIG_SND_MIXART is not set
1558# CONFIG_SND_NM256 is not set
1559# CONFIG_SND_PCXHR is not set
1560# CONFIG_SND_RIPTIDE is not set
1561# CONFIG_SND_RME32 is not set
1562# CONFIG_SND_RME96 is not set
1563# CONFIG_SND_RME9652 is not set
1564# CONFIG_SND_SONICVIBES is not set
1565# CONFIG_SND_TRIDENT is not set
1566# CONFIG_SND_VIA82XX is not set
1567# CONFIG_SND_VIA82XX_MODEM is not set
1568# CONFIG_SND_VIRTUOSO is not set
1569# CONFIG_SND_VX222 is not set
1570# CONFIG_SND_YMFPCI is not set
1571
1572#
1573# USB devices
1574#
1575# CONFIG_SND_USB_AUDIO is not set
1576# CONFIG_SND_USB_USX2Y is not set
1577# CONFIG_SND_USB_CAIAQ is not set
1578
1579#
1580# PCMCIA devices
1581#
1582# CONFIG_SND_VXPOCKET is not set
1583# CONFIG_SND_PDAUDIOCF is not set
1584
1585#
1586# System on Chip audio support
1587#
1588# CONFIG_SND_SOC is not set
1589
1590#
1591# ALSA SoC audio for Freescale SOCs
1592#
1593
1594#
1595# SoC Audio for the Texas Instruments OMAP
1596#
962 1597
963# 1598#
964# Open Sound System 1599# Open Sound System
965# 1600#
966CONFIG_SOUND_PRIME=y 1601# CONFIG_SOUND_PRIME is not set
967# CONFIG_SOUND_TRIDENT is not set
968# CONFIG_SOUND_MSNDCLAS is not set
969# CONFIG_SOUND_MSNDPIN is not set
970# CONFIG_SOUND_OSS is not set
971CONFIG_HID_SUPPORT=y 1602CONFIG_HID_SUPPORT=y
972CONFIG_HID=y 1603CONFIG_HID=y
973# CONFIG_HID_DEBUG is not set 1604CONFIG_HID_DEBUG=y
1605CONFIG_HIDRAW=y
974 1606
975# 1607#
976# USB Input Devices 1608# USB Input Devices
977# 1609#
978CONFIG_USB_HID=y 1610CONFIG_USB_HID=y
979# CONFIG_USB_HIDINPUT_POWERBOOK is not set 1611CONFIG_USB_HIDINPUT_POWERBOOK=y
980# CONFIG_HID_FF is not set 1612CONFIG_HID_FF=y
981# CONFIG_USB_HIDDEV is not set 1613CONFIG_HID_PID=y
1614CONFIG_LOGITECH_FF=y
1615# CONFIG_LOGIRUMBLEPAD2_FF is not set
1616CONFIG_PANTHERLORD_FF=y
1617CONFIG_THRUSTMASTER_FF=y
1618CONFIG_ZEROPLUS_FF=y
1619CONFIG_USB_HIDDEV=y
982CONFIG_USB_SUPPORT=y 1620CONFIG_USB_SUPPORT=y
983CONFIG_USB_ARCH_HAS_HCD=y 1621CONFIG_USB_ARCH_HAS_HCD=y
984CONFIG_USB_ARCH_HAS_OHCI=y 1622CONFIG_USB_ARCH_HAS_OHCI=y
985CONFIG_USB_ARCH_HAS_EHCI=y 1623CONFIG_USB_ARCH_HAS_EHCI=y
986CONFIG_USB=y 1624CONFIG_USB=y
987# CONFIG_USB_DEBUG is not set 1625CONFIG_USB_DEBUG=y
1626CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
988 1627
989# 1628#
990# Miscellaneous USB options 1629# Miscellaneous USB options
@@ -992,18 +1631,18 @@ CONFIG_USB=y
992CONFIG_USB_DEVICEFS=y 1631CONFIG_USB_DEVICEFS=y
993# CONFIG_USB_DEVICE_CLASS is not set 1632# CONFIG_USB_DEVICE_CLASS is not set
994# CONFIG_USB_DYNAMIC_MINORS is not set 1633# CONFIG_USB_DYNAMIC_MINORS is not set
995# CONFIG_USB_SUSPEND is not set 1634CONFIG_USB_SUSPEND=y
996# CONFIG_USB_PERSIST is not set
997# CONFIG_USB_OTG is not set 1635# CONFIG_USB_OTG is not set
998 1636
999# 1637#
1000# USB Host Controller Drivers 1638# USB Host Controller Drivers
1001# 1639#
1640# CONFIG_USB_C67X00_HCD is not set
1002CONFIG_USB_EHCI_HCD=y 1641CONFIG_USB_EHCI_HCD=y
1003# CONFIG_USB_EHCI_SPLIT_ISO is not set
1004# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1642# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1005# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1643# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1006# CONFIG_USB_ISP116X_HCD is not set 1644# CONFIG_USB_ISP116X_HCD is not set
1645# CONFIG_USB_ISP1760_HCD is not set
1007CONFIG_USB_OHCI_HCD=y 1646CONFIG_USB_OHCI_HCD=y
1008# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1647# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1009# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set 1648# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
@@ -1036,8 +1675,10 @@ CONFIG_USB_STORAGE=y
1036# CONFIG_USB_STORAGE_SDDR55 is not set 1675# CONFIG_USB_STORAGE_SDDR55 is not set
1037# CONFIG_USB_STORAGE_JUMPSHOT is not set 1676# CONFIG_USB_STORAGE_JUMPSHOT is not set
1038# CONFIG_USB_STORAGE_ALAUDA is not set 1677# CONFIG_USB_STORAGE_ALAUDA is not set
1678# CONFIG_USB_STORAGE_ONETOUCH is not set
1039# CONFIG_USB_STORAGE_KARMA is not set 1679# CONFIG_USB_STORAGE_KARMA is not set
1040# CONFIG_USB_LIBUSUAL is not set 1680# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1681CONFIG_USB_LIBUSUAL=y
1041 1682
1042# 1683#
1043# USB Imaging devices 1684# USB Imaging devices
@@ -1049,10 +1690,6 @@ CONFIG_USB_MON=y
1049# 1690#
1050# USB port drivers 1691# USB port drivers
1051# 1692#
1052
1053#
1054# USB Serial Converter support
1055#
1056# CONFIG_USB_SERIAL is not set 1693# CONFIG_USB_SERIAL is not set
1057 1694
1058# 1695#
@@ -1078,98 +1715,126 @@ CONFIG_USB_MON=y
1078# CONFIG_USB_TRANCEVIBRATOR is not set 1715# CONFIG_USB_TRANCEVIBRATOR is not set
1079# CONFIG_USB_IOWARRIOR is not set 1716# CONFIG_USB_IOWARRIOR is not set
1080# CONFIG_USB_TEST is not set 1717# CONFIG_USB_TEST is not set
1718# CONFIG_USB_GADGET is not set
1719# CONFIG_MMC is not set
1720# CONFIG_MEMSTICK is not set
1721CONFIG_NEW_LEDS=y
1722CONFIG_LEDS_CLASS=y
1081 1723
1082# 1724#
1083# USB DSL modem support 1725# LED drivers
1084# 1726#
1727# CONFIG_LEDS_CLEVO_MAIL is not set
1085 1728
1086# 1729#
1087# USB Gadget Support 1730# LED Triggers
1088# 1731#
1089# CONFIG_USB_GADGET is not set 1732CONFIG_LEDS_TRIGGERS=y
1090# CONFIG_MMC is not set 1733# CONFIG_LEDS_TRIGGER_TIMER is not set
1734# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
1735# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
1736# CONFIG_ACCESSIBILITY is not set
1737# CONFIG_INFINIBAND is not set
1738CONFIG_EDAC=y
1091 1739
1092# 1740#
1093# LED devices 1741# Reporting subsystems
1094# 1742#
1095# CONFIG_NEW_LEDS is not set 1743# CONFIG_EDAC_DEBUG is not set
1744# CONFIG_EDAC_MM_EDAC is not set
1745CONFIG_RTC_LIB=y
1746CONFIG_RTC_CLASS=y
1747# CONFIG_RTC_HCTOSYS is not set
1748# CONFIG_RTC_DEBUG is not set
1096 1749
1097# 1750#
1098# LED drivers 1751# RTC interfaces
1099# 1752#
1753CONFIG_RTC_INTF_SYSFS=y
1754CONFIG_RTC_INTF_PROC=y
1755CONFIG_RTC_INTF_DEV=y
1756# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1757# CONFIG_RTC_DRV_TEST is not set
1100 1758
1101# 1759#
1102# LED Triggers 1760# I2C RTC drivers
1103# 1761#
1104# CONFIG_INFINIBAND is not set 1762# CONFIG_RTC_DRV_DS1307 is not set
1105# CONFIG_EDAC is not set 1763# CONFIG_RTC_DRV_DS1374 is not set
1764# CONFIG_RTC_DRV_DS1672 is not set
1765# CONFIG_RTC_DRV_MAX6900 is not set
1766# CONFIG_RTC_DRV_RS5C372 is not set
1767# CONFIG_RTC_DRV_ISL1208 is not set
1768# CONFIG_RTC_DRV_X1205 is not set
1769# CONFIG_RTC_DRV_PCF8563 is not set
1770# CONFIG_RTC_DRV_PCF8583 is not set
1771# CONFIG_RTC_DRV_M41T80 is not set
1772# CONFIG_RTC_DRV_S35390A is not set
1106 1773
1107# 1774#
1108# Real Time Clock 1775# SPI RTC drivers
1109# 1776#
1110# CONFIG_RTC_CLASS is not set
1111 1777
1112# 1778#
1113# DMA Engine support 1779# Platform RTC drivers
1114# 1780#
1115# CONFIG_DMA_ENGINE is not set 1781CONFIG_RTC_DRV_CMOS=y
1782# CONFIG_RTC_DRV_DS1511 is not set
1783# CONFIG_RTC_DRV_DS1553 is not set
1784# CONFIG_RTC_DRV_DS1742 is not set
1785# CONFIG_RTC_DRV_STK17TA8 is not set
1786# CONFIG_RTC_DRV_M48T86 is not set
1787# CONFIG_RTC_DRV_M48T59 is not set
1788# CONFIG_RTC_DRV_V3020 is not set
1116 1789
1117# 1790#
1118# DMA Clients 1791# on-CPU RTC drivers
1119# 1792#
1793CONFIG_DMADEVICES=y
1120 1794
1121# 1795#
1122# DMA Devices 1796# DMA Devices
1123# 1797#
1124CONFIG_VIRTUALIZATION=y 1798# CONFIG_INTEL_IOATDMA is not set
1125# CONFIG_KVM is not set
1126
1127#
1128# Userspace I/O
1129#
1130# CONFIG_UIO is not set 1799# CONFIG_UIO is not set
1131 1800
1132# 1801#
1133# Firmware Drivers 1802# Firmware Drivers
1134# 1803#
1135# CONFIG_EDD is not set 1804# CONFIG_EDD is not set
1805CONFIG_EFI_VARS=y
1136# CONFIG_DELL_RBU is not set 1806# CONFIG_DELL_RBU is not set
1137# CONFIG_DCDBAS is not set 1807# CONFIG_DCDBAS is not set
1138CONFIG_DMIID=y 1808CONFIG_DMIID=y
1809# CONFIG_ISCSI_IBFT_FIND is not set
1139 1810
1140# 1811#
1141# File systems 1812# File systems
1142# 1813#
1143CONFIG_EXT2_FS=y 1814# CONFIG_EXT2_FS is not set
1144CONFIG_EXT2_FS_XATTR=y
1145CONFIG_EXT2_FS_POSIX_ACL=y
1146# CONFIG_EXT2_FS_SECURITY is not set
1147# CONFIG_EXT2_FS_XIP is not set
1148CONFIG_EXT3_FS=y 1815CONFIG_EXT3_FS=y
1149CONFIG_EXT3_FS_XATTR=y 1816CONFIG_EXT3_FS_XATTR=y
1150CONFIG_EXT3_FS_POSIX_ACL=y 1817CONFIG_EXT3_FS_POSIX_ACL=y
1151# CONFIG_EXT3_FS_SECURITY is not set 1818CONFIG_EXT3_FS_SECURITY=y
1152# CONFIG_EXT4DEV_FS is not set 1819# CONFIG_EXT4DEV_FS is not set
1153CONFIG_JBD=y 1820CONFIG_JBD=y
1154# CONFIG_JBD_DEBUG is not set 1821# CONFIG_JBD_DEBUG is not set
1155CONFIG_FS_MBCACHE=y 1822CONFIG_FS_MBCACHE=y
1156CONFIG_REISERFS_FS=y 1823# CONFIG_REISERFS_FS is not set
1157# CONFIG_REISERFS_CHECK is not set
1158# CONFIG_REISERFS_PROC_INFO is not set
1159CONFIG_REISERFS_FS_XATTR=y
1160CONFIG_REISERFS_FS_POSIX_ACL=y
1161# CONFIG_REISERFS_FS_SECURITY is not set
1162# CONFIG_JFS_FS is not set 1824# CONFIG_JFS_FS is not set
1163CONFIG_FS_POSIX_ACL=y 1825CONFIG_FS_POSIX_ACL=y
1164# CONFIG_XFS_FS is not set 1826# CONFIG_XFS_FS is not set
1165# CONFIG_GFS2_FS is not set 1827# CONFIG_GFS2_FS is not set
1166# CONFIG_OCFS2_FS is not set 1828# CONFIG_OCFS2_FS is not set
1167# CONFIG_MINIX_FS is not set 1829CONFIG_DNOTIFY=y
1168# CONFIG_ROMFS_FS is not set
1169CONFIG_INOTIFY=y 1830CONFIG_INOTIFY=y
1170CONFIG_INOTIFY_USER=y 1831CONFIG_INOTIFY_USER=y
1171# CONFIG_QUOTA is not set 1832CONFIG_QUOTA=y
1172CONFIG_DNOTIFY=y 1833CONFIG_QUOTA_NETLINK_INTERFACE=y
1834# CONFIG_PRINT_QUOTA_WARNING is not set
1835# CONFIG_QFMT_V1 is not set
1836CONFIG_QFMT_V2=y
1837CONFIG_QUOTACTL=y
1173# CONFIG_AUTOFS_FS is not set 1838# CONFIG_AUTOFS_FS is not set
1174CONFIG_AUTOFS4_FS=y 1839CONFIG_AUTOFS4_FS=y
1175# CONFIG_FUSE_FS is not set 1840# CONFIG_FUSE_FS is not set
@@ -1180,7 +1845,7 @@ CONFIG_GENERIC_ACL=y
1180# 1845#
1181CONFIG_ISO9660_FS=y 1846CONFIG_ISO9660_FS=y
1182CONFIG_JOLIET=y 1847CONFIG_JOLIET=y
1183# CONFIG_ZISOFS is not set 1848CONFIG_ZISOFS=y
1184# CONFIG_UDF_FS is not set 1849# CONFIG_UDF_FS is not set
1185 1850
1186# 1851#
@@ -1198,13 +1863,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1198# 1863#
1199CONFIG_PROC_FS=y 1864CONFIG_PROC_FS=y
1200CONFIG_PROC_KCORE=y 1865CONFIG_PROC_KCORE=y
1866CONFIG_PROC_VMCORE=y
1201CONFIG_PROC_SYSCTL=y 1867CONFIG_PROC_SYSCTL=y
1202CONFIG_SYSFS=y 1868CONFIG_SYSFS=y
1203CONFIG_TMPFS=y 1869CONFIG_TMPFS=y
1204CONFIG_TMPFS_POSIX_ACL=y 1870CONFIG_TMPFS_POSIX_ACL=y
1205CONFIG_HUGETLBFS=y 1871CONFIG_HUGETLBFS=y
1206CONFIG_HUGETLB_PAGE=y 1872CONFIG_HUGETLB_PAGE=y
1207CONFIG_RAMFS=y
1208# CONFIG_CONFIGFS_FS is not set 1873# CONFIG_CONFIGFS_FS is not set
1209 1874
1210# 1875#
@@ -1212,6 +1877,7 @@ CONFIG_RAMFS=y
1212# 1877#
1213# CONFIG_ADFS_FS is not set 1878# CONFIG_ADFS_FS is not set
1214# CONFIG_AFFS_FS is not set 1879# CONFIG_AFFS_FS is not set
1880# CONFIG_ECRYPT_FS is not set
1215# CONFIG_HFS_FS is not set 1881# CONFIG_HFS_FS is not set
1216# CONFIG_HFSPLUS_FS is not set 1882# CONFIG_HFSPLUS_FS is not set
1217# CONFIG_BEFS_FS is not set 1883# CONFIG_BEFS_FS is not set
@@ -1219,33 +1885,15 @@ CONFIG_RAMFS=y
1219# CONFIG_EFS_FS is not set 1885# CONFIG_EFS_FS is not set
1220# CONFIG_CRAMFS is not set 1886# CONFIG_CRAMFS is not set
1221# CONFIG_VXFS_FS is not set 1887# CONFIG_VXFS_FS is not set
1888# CONFIG_MINIX_FS is not set
1222# CONFIG_HPFS_FS is not set 1889# CONFIG_HPFS_FS is not set
1223# CONFIG_QNX4FS_FS is not set 1890# CONFIG_QNX4FS_FS is not set
1891# CONFIG_ROMFS_FS is not set
1224# CONFIG_SYSV_FS is not set 1892# CONFIG_SYSV_FS is not set
1225# CONFIG_UFS_FS is not set 1893# CONFIG_UFS_FS is not set
1226 1894CONFIG_NETWORK_FILESYSTEMS=y
1227# 1895# CONFIG_NFS_FS is not set
1228# Network File Systems 1896# CONFIG_NFSD is not set
1229#
1230CONFIG_NFS_FS=y
1231CONFIG_NFS_V3=y
1232# CONFIG_NFS_V3_ACL is not set
1233# CONFIG_NFS_V4 is not set
1234# CONFIG_NFS_DIRECTIO is not set
1235CONFIG_NFSD=y
1236CONFIG_NFSD_V3=y
1237# CONFIG_NFSD_V3_ACL is not set
1238# CONFIG_NFSD_V4 is not set
1239CONFIG_NFSD_TCP=y
1240CONFIG_ROOT_NFS=y
1241CONFIG_LOCKD=y
1242CONFIG_LOCKD_V4=y
1243CONFIG_EXPORTFS=y
1244CONFIG_NFS_COMMON=y
1245CONFIG_SUNRPC=y
1246# CONFIG_SUNRPC_BIND34 is not set
1247# CONFIG_RPCSEC_GSS_KRB5 is not set
1248# CONFIG_RPCSEC_GSS_SPKM3 is not set
1249# CONFIG_SMB_FS is not set 1897# CONFIG_SMB_FS is not set
1250# CONFIG_CIFS is not set 1898# CONFIG_CIFS is not set
1251# CONFIG_NCP_FS is not set 1899# CONFIG_NCP_FS is not set
@@ -1255,14 +1903,26 @@ CONFIG_SUNRPC=y
1255# 1903#
1256# Partition Types 1904# Partition Types
1257# 1905#
1258# CONFIG_PARTITION_ADVANCED is not set 1906CONFIG_PARTITION_ADVANCED=y
1907# CONFIG_ACORN_PARTITION is not set
1908CONFIG_OSF_PARTITION=y
1909CONFIG_AMIGA_PARTITION=y
1910# CONFIG_ATARI_PARTITION is not set
1911CONFIG_MAC_PARTITION=y
1259CONFIG_MSDOS_PARTITION=y 1912CONFIG_MSDOS_PARTITION=y
1260 1913CONFIG_BSD_DISKLABEL=y
1261# 1914CONFIG_MINIX_SUBPARTITION=y
1262# Native Language Support 1915CONFIG_SOLARIS_X86_PARTITION=y
1263# 1916CONFIG_UNIXWARE_DISKLABEL=y
1917# CONFIG_LDM_PARTITION is not set
1918CONFIG_SGI_PARTITION=y
1919# CONFIG_ULTRIX_PARTITION is not set
1920CONFIG_SUN_PARTITION=y
1921CONFIG_KARMA_PARTITION=y
1922CONFIG_EFI_PARTITION=y
1923# CONFIG_SYSV68_PARTITION is not set
1264CONFIG_NLS=y 1924CONFIG_NLS=y
1265CONFIG_NLS_DEFAULT="iso8859-1" 1925CONFIG_NLS_DEFAULT="utf8"
1266CONFIG_NLS_CODEPAGE_437=y 1926CONFIG_NLS_CODEPAGE_437=y
1267# CONFIG_NLS_CODEPAGE_737 is not set 1927# CONFIG_NLS_CODEPAGE_737 is not set
1268# CONFIG_NLS_CODEPAGE_775 is not set 1928# CONFIG_NLS_CODEPAGE_775 is not set
@@ -1297,40 +1957,33 @@ CONFIG_NLS_ISO8859_1=y
1297# CONFIG_NLS_ISO8859_9 is not set 1957# CONFIG_NLS_ISO8859_9 is not set
1298# CONFIG_NLS_ISO8859_13 is not set 1958# CONFIG_NLS_ISO8859_13 is not set
1299# CONFIG_NLS_ISO8859_14 is not set 1959# CONFIG_NLS_ISO8859_14 is not set
1300CONFIG_NLS_ISO8859_15=y 1960# CONFIG_NLS_ISO8859_15 is not set
1301# CONFIG_NLS_KOI8_R is not set 1961# CONFIG_NLS_KOI8_R is not set
1302# CONFIG_NLS_KOI8_U is not set 1962# CONFIG_NLS_KOI8_U is not set
1303CONFIG_NLS_UTF8=y 1963CONFIG_NLS_UTF8=y
1304
1305#
1306# Distributed Lock Manager
1307#
1308# CONFIG_DLM is not set 1964# CONFIG_DLM is not set
1309 1965
1310# 1966#
1311# Instrumentation Support
1312#
1313CONFIG_PROFILING=y
1314CONFIG_OPROFILE=y
1315CONFIG_KPROBES=y
1316
1317#
1318# Kernel hacking 1967# Kernel hacking
1319# 1968#
1320CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1969CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1321# CONFIG_PRINTK_TIME is not set 1970# CONFIG_PRINTK_TIME is not set
1971# CONFIG_ENABLE_WARN_DEPRECATED is not set
1322# CONFIG_ENABLE_MUST_CHECK is not set 1972# CONFIG_ENABLE_MUST_CHECK is not set
1973CONFIG_FRAME_WARN=2048
1323CONFIG_MAGIC_SYSRQ=y 1974CONFIG_MAGIC_SYSRQ=y
1324CONFIG_UNUSED_SYMBOLS=y 1975# CONFIG_UNUSED_SYMBOLS is not set
1325CONFIG_DEBUG_FS=y 1976CONFIG_DEBUG_FS=y
1326# CONFIG_HEADERS_CHECK is not set 1977# CONFIG_HEADERS_CHECK is not set
1327CONFIG_DEBUG_KERNEL=y 1978CONFIG_DEBUG_KERNEL=y
1328# CONFIG_DEBUG_SHIRQ is not set 1979# CONFIG_DEBUG_SHIRQ is not set
1329CONFIG_DETECT_SOFTLOCKUP=y 1980# CONFIG_DETECT_SOFTLOCKUP is not set
1330# CONFIG_SCHED_DEBUG is not set 1981# CONFIG_SCHED_DEBUG is not set
1331# CONFIG_SCHEDSTATS is not set 1982CONFIG_SCHEDSTATS=y
1332CONFIG_TIMER_STATS=y 1983CONFIG_TIMER_STATS=y
1333# CONFIG_DEBUG_SLAB is not set 1984# CONFIG_DEBUG_OBJECTS is not set
1985# CONFIG_SLUB_DEBUG_ON is not set
1986# CONFIG_SLUB_STATS is not set
1334# CONFIG_DEBUG_RT_MUTEXES is not set 1987# CONFIG_DEBUG_RT_MUTEXES is not set
1335# CONFIG_RT_MUTEX_TESTER is not set 1988# CONFIG_RT_MUTEX_TESTER is not set
1336# CONFIG_DEBUG_SPINLOCK is not set 1989# CONFIG_DEBUG_SPINLOCK is not set
@@ -1344,28 +1997,162 @@ CONFIG_TIMER_STATS=y
1344CONFIG_DEBUG_BUGVERBOSE=y 1997CONFIG_DEBUG_BUGVERBOSE=y
1345# CONFIG_DEBUG_INFO is not set 1998# CONFIG_DEBUG_INFO is not set
1346# CONFIG_DEBUG_VM is not set 1999# CONFIG_DEBUG_VM is not set
2000# CONFIG_DEBUG_WRITECOUNT is not set
1347# CONFIG_DEBUG_LIST is not set 2001# CONFIG_DEBUG_LIST is not set
1348# CONFIG_FRAME_POINTER is not set 2002# CONFIG_DEBUG_SG is not set
1349CONFIG_OPTIMIZE_INLINING=y 2003CONFIG_FRAME_POINTER=y
2004# CONFIG_BOOT_PRINTK_DELAY is not set
1350# CONFIG_RCU_TORTURE_TEST is not set 2005# CONFIG_RCU_TORTURE_TEST is not set
2006# CONFIG_KPROBES_SANITY_TEST is not set
2007# CONFIG_BACKTRACE_SELF_TEST is not set
1351# CONFIG_LKDTM is not set 2008# CONFIG_LKDTM is not set
1352# CONFIG_FAULT_INJECTION is not set 2009# CONFIG_FAULT_INJECTION is not set
1353# CONFIG_DEBUG_RODATA is not set 2010# CONFIG_LATENCYTOP is not set
1354# CONFIG_IOMMU_DEBUG is not set 2011CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
2012# CONFIG_SAMPLES is not set
2013# CONFIG_KGDB is not set
2014CONFIG_HAVE_ARCH_KGDB=y
2015# CONFIG_NONPROMISC_DEVMEM is not set
2016CONFIG_EARLY_PRINTK=y
1355CONFIG_DEBUG_STACKOVERFLOW=y 2017CONFIG_DEBUG_STACKOVERFLOW=y
1356# CONFIG_DEBUG_STACK_USAGE is not set 2018CONFIG_DEBUG_STACK_USAGE=y
2019# CONFIG_DEBUG_PAGEALLOC is not set
2020# CONFIG_DEBUG_PER_CPU_MAPS is not set
2021# CONFIG_X86_PTDUMP is not set
2022CONFIG_DEBUG_RODATA=y
2023# CONFIG_DIRECT_GBPAGES is not set
2024# CONFIG_DEBUG_RODATA_TEST is not set
2025CONFIG_DEBUG_NX_TEST=m
2026CONFIG_X86_MPPARSE=y
2027# CONFIG_IOMMU_DEBUG is not set
2028CONFIG_IO_DELAY_TYPE_0X80=0
2029CONFIG_IO_DELAY_TYPE_0XED=1
2030CONFIG_IO_DELAY_TYPE_UDELAY=2
2031CONFIG_IO_DELAY_TYPE_NONE=3
2032CONFIG_IO_DELAY_0X80=y
2033# CONFIG_IO_DELAY_0XED is not set
2034# CONFIG_IO_DELAY_UDELAY is not set
2035# CONFIG_IO_DELAY_NONE is not set
2036CONFIG_DEFAULT_IO_DELAY_TYPE=0
2037CONFIG_DEBUG_BOOT_PARAMS=y
2038# CONFIG_CPA_DEBUG is not set
1357 2039
1358# 2040#
1359# Security options 2041# Security options
1360# 2042#
1361# CONFIG_KEYS is not set 2043CONFIG_KEYS=y
1362# CONFIG_SECURITY is not set 2044CONFIG_KEYS_DEBUG_PROC_KEYS=y
1363# CONFIG_CRYPTO is not set 2045CONFIG_SECURITY=y
2046CONFIG_SECURITY_NETWORK=y
2047# CONFIG_SECURITY_NETWORK_XFRM is not set
2048CONFIG_SECURITY_CAPABILITIES=y
2049CONFIG_SECURITY_FILE_CAPABILITIES=y
2050# CONFIG_SECURITY_ROOTPLUG is not set
2051CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=65536
2052CONFIG_SECURITY_SELINUX=y
2053CONFIG_SECURITY_SELINUX_BOOTPARAM=y
2054CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
2055CONFIG_SECURITY_SELINUX_DISABLE=y
2056CONFIG_SECURITY_SELINUX_DEVELOP=y
2057CONFIG_SECURITY_SELINUX_AVC_STATS=y
2058CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
2059# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set
2060# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
2061# CONFIG_SECURITY_SMACK is not set
2062CONFIG_CRYPTO=y
2063
2064#
2065# Crypto core or helper
2066#
2067CONFIG_CRYPTO_ALGAPI=y
2068CONFIG_CRYPTO_AEAD=y
2069CONFIG_CRYPTO_BLKCIPHER=y
2070CONFIG_CRYPTO_HASH=y
2071CONFIG_CRYPTO_MANAGER=y
2072# CONFIG_CRYPTO_GF128MUL is not set
2073# CONFIG_CRYPTO_NULL is not set
2074# CONFIG_CRYPTO_CRYPTD is not set
2075CONFIG_CRYPTO_AUTHENC=y
2076# CONFIG_CRYPTO_TEST is not set
2077
2078#
2079# Authenticated Encryption with Associated Data
2080#
2081# CONFIG_CRYPTO_CCM is not set
2082# CONFIG_CRYPTO_GCM is not set
2083# CONFIG_CRYPTO_SEQIV is not set
2084
2085#
2086# Block modes
2087#
2088CONFIG_CRYPTO_CBC=y
2089# CONFIG_CRYPTO_CTR is not set
2090# CONFIG_CRYPTO_CTS is not set
2091CONFIG_CRYPTO_ECB=y
2092# CONFIG_CRYPTO_LRW is not set
2093# CONFIG_CRYPTO_PCBC is not set
2094# CONFIG_CRYPTO_XTS is not set
2095
2096#
2097# Hash modes
2098#
2099CONFIG_CRYPTO_HMAC=y
2100# CONFIG_CRYPTO_XCBC is not set
2101
2102#
2103# Digest
2104#
2105# CONFIG_CRYPTO_CRC32C is not set
2106# CONFIG_CRYPTO_MD4 is not set
2107CONFIG_CRYPTO_MD5=y
2108# CONFIG_CRYPTO_MICHAEL_MIC is not set
2109CONFIG_CRYPTO_SHA1=y
2110# CONFIG_CRYPTO_SHA256 is not set
2111# CONFIG_CRYPTO_SHA512 is not set
2112# CONFIG_CRYPTO_TGR192 is not set
2113# CONFIG_CRYPTO_WP512 is not set
2114
2115#
2116# Ciphers
2117#
2118CONFIG_CRYPTO_AES=y
2119# CONFIG_CRYPTO_AES_X86_64 is not set
2120# CONFIG_CRYPTO_ANUBIS is not set
2121CONFIG_CRYPTO_ARC4=y
2122# CONFIG_CRYPTO_BLOWFISH is not set
2123# CONFIG_CRYPTO_CAMELLIA is not set
2124# CONFIG_CRYPTO_CAST5 is not set
2125# CONFIG_CRYPTO_CAST6 is not set
2126CONFIG_CRYPTO_DES=y
2127# CONFIG_CRYPTO_FCRYPT is not set
2128# CONFIG_CRYPTO_KHAZAD is not set
2129# CONFIG_CRYPTO_SALSA20 is not set
2130# CONFIG_CRYPTO_SALSA20_X86_64 is not set
2131# CONFIG_CRYPTO_SEED is not set
2132# CONFIG_CRYPTO_SERPENT is not set
2133# CONFIG_CRYPTO_TEA is not set
2134# CONFIG_CRYPTO_TWOFISH is not set
2135# CONFIG_CRYPTO_TWOFISH_X86_64 is not set
2136
2137#
2138# Compression
2139#
2140# CONFIG_CRYPTO_DEFLATE is not set
2141# CONFIG_CRYPTO_LZO is not set
2142CONFIG_CRYPTO_HW=y
2143# CONFIG_CRYPTO_DEV_HIFN_795X is not set
2144CONFIG_HAVE_KVM=y
2145CONFIG_VIRTUALIZATION=y
2146# CONFIG_KVM is not set
2147# CONFIG_VIRTIO_PCI is not set
2148# CONFIG_VIRTIO_BALLOON is not set
1364 2149
1365# 2150#
1366# Library routines 2151# Library routines
1367# 2152#
1368CONFIG_BITREVERSE=y 2153CONFIG_BITREVERSE=y
2154CONFIG_GENERIC_FIND_FIRST_BIT=y
2155CONFIG_GENERIC_FIND_NEXT_BIT=y
1369# CONFIG_CRC_CCITT is not set 2156# CONFIG_CRC_CCITT is not set
1370# CONFIG_CRC16 is not set 2157# CONFIG_CRC16 is not set
1371# CONFIG_CRC_ITU_T is not set 2158# CONFIG_CRC_ITU_T is not set
diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
index b5e329da166c..3aefbce2de48 100644
--- a/arch/x86/ia32/ia32entry.S
+++ b/arch/x86/ia32/ia32entry.S
@@ -370,13 +370,11 @@ quiet_ni_syscall:
370 PTREGSCALL stub32_rt_sigreturn, sys32_rt_sigreturn, %rdi 370 PTREGSCALL stub32_rt_sigreturn, sys32_rt_sigreturn, %rdi
371 PTREGSCALL stub32_sigreturn, sys32_sigreturn, %rdi 371 PTREGSCALL stub32_sigreturn, sys32_sigreturn, %rdi
372 PTREGSCALL stub32_sigaltstack, sys32_sigaltstack, %rdx 372 PTREGSCALL stub32_sigaltstack, sys32_sigaltstack, %rdx
373 PTREGSCALL stub32_sigsuspend, sys32_sigsuspend, %rcx
374 PTREGSCALL stub32_execve, sys32_execve, %rcx 373 PTREGSCALL stub32_execve, sys32_execve, %rcx
375 PTREGSCALL stub32_fork, sys_fork, %rdi 374 PTREGSCALL stub32_fork, sys_fork, %rdi
376 PTREGSCALL stub32_clone, sys32_clone, %rdx 375 PTREGSCALL stub32_clone, sys32_clone, %rdx
377 PTREGSCALL stub32_vfork, sys_vfork, %rdi 376 PTREGSCALL stub32_vfork, sys_vfork, %rdi
378 PTREGSCALL stub32_iopl, sys_iopl, %rsi 377 PTREGSCALL stub32_iopl, sys_iopl, %rsi
379 PTREGSCALL stub32_rt_sigsuspend, sys_rt_sigsuspend, %rdx
380 378
381ENTRY(ia32_ptregs_common) 379ENTRY(ia32_ptregs_common)
382 popq %r11 380 popq %r11
@@ -476,7 +474,7 @@ ia32_sys_call_table:
476 .quad sys_ssetmask 474 .quad sys_ssetmask
477 .quad sys_setreuid16 /* 70 */ 475 .quad sys_setreuid16 /* 70 */
478 .quad sys_setregid16 476 .quad sys_setregid16
479 .quad stub32_sigsuspend 477 .quad sys32_sigsuspend
480 .quad compat_sys_sigpending 478 .quad compat_sys_sigpending
481 .quad sys_sethostname 479 .quad sys_sethostname
482 .quad compat_sys_setrlimit /* 75 */ 480 .quad compat_sys_setrlimit /* 75 */
@@ -583,7 +581,7 @@ ia32_sys_call_table:
583 .quad sys32_rt_sigpending 581 .quad sys32_rt_sigpending
584 .quad compat_sys_rt_sigtimedwait 582 .quad compat_sys_rt_sigtimedwait
585 .quad sys32_rt_sigqueueinfo 583 .quad sys32_rt_sigqueueinfo
586 .quad stub32_rt_sigsuspend 584 .quad sys_rt_sigsuspend
587 .quad sys32_pread /* 180 */ 585 .quad sys32_pread /* 180 */
588 .quad sys32_pwrite 586 .quad sys32_pwrite
589 .quad sys_chown16 587 .quad sys_chown16
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 5e618c3b4720..8a42b797cd6b 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -18,14 +18,13 @@ CFLAGS_tsc_64.o := $(nostackp)
18obj-y := process_$(BITS).o signal_$(BITS).o entry_$(BITS).o 18obj-y := process_$(BITS).o signal_$(BITS).o entry_$(BITS).o
19obj-y += traps_$(BITS).o irq_$(BITS).o 19obj-y += traps_$(BITS).o irq_$(BITS).o
20obj-y += time_$(BITS).o ioport.o ldt.o 20obj-y += time_$(BITS).o ioport.o ldt.o
21obj-y += setup_$(BITS).o i8259_$(BITS).o setup.o 21obj-y += setup_$(BITS).o i8259.o irqinit_$(BITS).o setup.o
22obj-$(CONFIG_X86_32) += sys_i386_32.o i386_ksyms_32.o 22obj-$(CONFIG_X86_32) += sys_i386_32.o i386_ksyms_32.o
23obj-$(CONFIG_X86_64) += sys_x86_64.o x8664_ksyms_64.o 23obj-$(CONFIG_X86_64) += sys_x86_64.o x8664_ksyms_64.o
24obj-$(CONFIG_X86_64) += syscall_64.o vsyscall_64.o setup64.o 24obj-$(CONFIG_X86_64) += syscall_64.o vsyscall_64.o setup64.o
25obj-y += bootflag.o e820_$(BITS).o 25obj-y += bootflag.o e820_$(BITS).o
26obj-y += pci-dma.o quirks.o i8237.o topology.o kdebugfs.o 26obj-y += pci-dma.o quirks.o i8237.o topology.o kdebugfs.o
27obj-y += alternative.o i8253.o pci-nommu.o 27obj-y += alternative.o i8253.o pci-nommu.o
28obj-$(CONFIG_X86_64) += bugs_64.o
29obj-y += tsc_$(BITS).o io_delay.o rtc.o 28obj-y += tsc_$(BITS).o io_delay.o rtc.o
30 29
31obj-$(CONFIG_X86_TRAMPOLINE) += trampoline.o 30obj-$(CONFIG_X86_TRAMPOLINE) += trampoline.o
@@ -82,6 +81,7 @@ obj-$(CONFIG_VMI) += vmi_32.o vmiclock_32.o
82obj-$(CONFIG_KVM_GUEST) += kvm.o 81obj-$(CONFIG_KVM_GUEST) += kvm.o
83obj-$(CONFIG_KVM_CLOCK) += kvmclock.o 82obj-$(CONFIG_KVM_CLOCK) += kvmclock.o
84obj-$(CONFIG_PARAVIRT) += paravirt.o paravirt_patch_$(BITS).o 83obj-$(CONFIG_PARAVIRT) += paravirt.o paravirt_patch_$(BITS).o
84obj-$(CONFIG_PARAVIRT_CLOCK) += pvclock.o
85 85
86obj-$(CONFIG_PCSPKR_PLATFORM) += pcspeaker.o 86obj-$(CONFIG_PCSPKR_PLATFORM) += pcspeaker.o
87 87
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index c49ebcc6c41e..33c5216fd3e1 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -242,12 +242,19 @@ static int __init acpi_parse_madt(struct acpi_table_header *table)
242 242
243static void __cpuinit acpi_register_lapic(int id, u8 enabled) 243static void __cpuinit acpi_register_lapic(int id, u8 enabled)
244{ 244{
245 unsigned int ver = 0;
246
245 if (!enabled) { 247 if (!enabled) {
246 ++disabled_cpus; 248 ++disabled_cpus;
247 return; 249 return;
248 } 250 }
249 251
250 generic_processor_info(id, 0); 252#ifdef CONFIG_X86_32
253 if (boot_cpu_physical_apicid != -1U)
254 ver = apic_version[boot_cpu_physical_apicid];
255#endif
256
257 generic_processor_info(id, ver);
251} 258}
252 259
253static int __init 260static int __init
@@ -767,8 +774,13 @@ static void __init acpi_register_lapic_address(unsigned long address)
767 mp_lapic_addr = address; 774 mp_lapic_addr = address;
768 775
769 set_fixmap_nocache(FIX_APIC_BASE, address); 776 set_fixmap_nocache(FIX_APIC_BASE, address);
770 if (boot_cpu_physical_apicid == -1U) 777 if (boot_cpu_physical_apicid == -1U) {
771 boot_cpu_physical_apicid = GET_APIC_ID(read_apic_id()); 778 boot_cpu_physical_apicid = GET_APIC_ID(read_apic_id());
779#ifdef CONFIG_X86_32
780 apic_version[boot_cpu_physical_apicid] =
781 GET_APIC_VERSION(apic_read(APIC_LVR));
782#endif
783 }
772} 784}
773 785
774static int __init early_acpi_parse_madt_lapic_addr_ovr(void) 786static int __init early_acpi_parse_madt_lapic_addr_ovr(void)
diff --git a/arch/x86/kernel/acpi/realmode/wakeup.S b/arch/x86/kernel/acpi/realmode/wakeup.S
index f9b77fb37e5b..3355973b12ac 100644
--- a/arch/x86/kernel/acpi/realmode/wakeup.S
+++ b/arch/x86/kernel/acpi/realmode/wakeup.S
@@ -5,6 +5,7 @@
5#include <asm/msr-index.h> 5#include <asm/msr-index.h>
6#include <asm/page.h> 6#include <asm/page.h>
7#include <asm/pgtable.h> 7#include <asm/pgtable.h>
8#include <asm/processor-flags.h>
8 9
9 .code16 10 .code16
10 .section ".header", "a" 11 .section ".header", "a"
@@ -24,6 +25,11 @@ pmode_gdt: .quad 0
24realmode_flags: .long 0 25realmode_flags: .long 0
25real_magic: .long 0 26real_magic: .long 0
26trampoline_segment: .word 0 27trampoline_segment: .word 0
28_pad1: .byte 0
29wakeup_jmp: .byte 0xea /* ljmpw */
30wakeup_jmp_off: .word 3f
31wakeup_jmp_seg: .word 0
32wakeup_gdt: .quad 0, 0, 0
27signature: .long 0x51ee1111 33signature: .long 0x51ee1111
28 34
29 .text 35 .text
@@ -34,11 +40,34 @@ _start:
34 cli 40 cli
35 cld 41 cld
36 42
43 /* Apparently some dimwit BIOS programmers don't know how to
44 program a PM to RM transition, and we might end up here with
45 junk in the data segment descriptor registers. The only way
46 to repair that is to go into PM and fix it ourselves... */
47 movw $16, %cx
48 lgdtl %cs:wakeup_gdt
49 movl %cr0, %eax
50 orb $X86_CR0_PE, %al
51 movl %eax, %cr0
52 jmp 1f
531: ljmpw $8, $2f
542:
55 movw %cx, %ds
56 movw %cx, %es
57 movw %cx, %ss
58 movw %cx, %fs
59 movw %cx, %gs
60
61 andb $~X86_CR0_PE, %al
62 movl %eax, %cr0
63 jmp wakeup_jmp
643:
37 /* Set up segments */ 65 /* Set up segments */
38 movw %cs, %ax 66 movw %cs, %ax
39 movw %ax, %ds 67 movw %ax, %ds
40 movw %ax, %es 68 movw %ax, %es
41 movw %ax, %ss 69 movw %ax, %ss
70 lidtl wakeup_idt
42 71
43 movl $wakeup_stack_end, %esp 72 movl $wakeup_stack_end, %esp
44 73
@@ -98,7 +127,14 @@ bogus_real_magic:
98 jmp 1b 127 jmp 1b
99 128
100 .data 129 .data
101 .balign 4 130 .balign 8
131
132 /* This is the standard real-mode IDT */
133wakeup_idt:
134 .word 0xffff /* limit */
135 .long 0 /* address */
136 .word 0
137
102 .globl HEAP, heap_end 138 .globl HEAP, heap_end
103HEAP: 139HEAP:
104 .long wakeup_heap 140 .long wakeup_heap
diff --git a/arch/x86/kernel/acpi/realmode/wakeup.h b/arch/x86/kernel/acpi/realmode/wakeup.h
index ef8166fe8020..69d38d0b2b64 100644
--- a/arch/x86/kernel/acpi/realmode/wakeup.h
+++ b/arch/x86/kernel/acpi/realmode/wakeup.h
@@ -24,6 +24,11 @@ struct wakeup_header {
24 u32 realmode_flags; 24 u32 realmode_flags;
25 u32 real_magic; 25 u32 real_magic;
26 u16 trampoline_segment; /* segment with trampoline code, 64-bit only */ 26 u16 trampoline_segment; /* segment with trampoline code, 64-bit only */
27 u8 _pad1;
28 u8 wakeup_jmp;
29 u16 wakeup_jmp_off;
30 u16 wakeup_jmp_seg;
31 u64 wakeup_gdt[3];
27 u32 signature; /* To check we have correct structure */ 32 u32 signature; /* To check we have correct structure */
28} __attribute__((__packed__)); 33} __attribute__((__packed__));
29 34
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
index afc25ee9964b..36af01f029ed 100644
--- a/arch/x86/kernel/acpi/sleep.c
+++ b/arch/x86/kernel/acpi/sleep.c
@@ -50,6 +50,20 @@ int acpi_save_state_mem(void)
50 50
51 header->video_mode = saved_video_mode; 51 header->video_mode = saved_video_mode;
52 52
53 header->wakeup_jmp_seg = acpi_wakeup_address >> 4;
54 /* GDT[0]: GDT self-pointer */
55 header->wakeup_gdt[0] =
56 (u64)(sizeof(header->wakeup_gdt) - 1) +
57 ((u64)(acpi_wakeup_address +
58 ((char *)&header->wakeup_gdt - (char *)acpi_realmode))
59 << 16);
60 /* GDT[1]: real-mode-like code segment */
61 header->wakeup_gdt[1] = (0x009bULL << 40) +
62 ((u64)acpi_wakeup_address << 16) + 0xffff;
63 /* GDT[2]: real-mode-like data segment */
64 header->wakeup_gdt[2] = (0x0093ULL << 40) +
65 ((u64)acpi_wakeup_address << 16) + 0xffff;
66
53#ifndef CONFIG_64BIT 67#ifndef CONFIG_64BIT
54 store_gdt((struct desc_ptr *)&header->pmode_gdt); 68 store_gdt((struct desc_ptr *)&header->pmode_gdt);
55 69
@@ -111,7 +125,7 @@ void __init acpi_reserve_bootmem(void)
111 return; 125 return;
112 } 126 }
113 127
114 acpi_wakeup_address = acpi_realmode; 128 acpi_wakeup_address = virt_to_phys((void *)acpi_realmode);
115} 129}
116 130
117 131
diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
index 479926d9e004..e819362c7068 100644
--- a/arch/x86/kernel/aperture_64.c
+++ b/arch/x86/kernel/aperture_64.c
@@ -35,6 +35,18 @@ int fallback_aper_force __initdata;
35 35
36int fix_aperture __initdata = 1; 36int fix_aperture __initdata = 1;
37 37
38struct bus_dev_range {
39 int bus;
40 int dev_base;
41 int dev_limit;
42};
43
44static struct bus_dev_range bus_dev_ranges[] __initdata = {
45 { 0x00, 0x18, 0x20},
46 { 0xff, 0x00, 0x20},
47 { 0xfe, 0x00, 0x20}
48};
49
38static struct resource gart_resource = { 50static struct resource gart_resource = {
39 .name = "GART", 51 .name = "GART",
40 .flags = IORESOURCE_MEM, 52 .flags = IORESOURCE_MEM,
@@ -55,8 +67,9 @@ static u32 __init allocate_aperture(void)
55 u32 aper_size; 67 u32 aper_size;
56 void *p; 68 void *p;
57 69
58 if (fallback_aper_order > 7) 70 /* aper_size should <= 1G */
59 fallback_aper_order = 7; 71 if (fallback_aper_order > 5)
72 fallback_aper_order = 5;
60 aper_size = (32 * 1024 * 1024) << fallback_aper_order; 73 aper_size = (32 * 1024 * 1024) << fallback_aper_order;
61 74
62 /* 75 /*
@@ -65,7 +78,20 @@ static u32 __init allocate_aperture(void)
65 * memory. Unfortunately we cannot move it up because that would 78 * memory. Unfortunately we cannot move it up because that would
66 * make the IOMMU useless. 79 * make the IOMMU useless.
67 */ 80 */
68 p = __alloc_bootmem_nopanic(aper_size, aper_size, 0); 81 /*
82 * using 512M as goal, in case kexec will load kernel_big
83 * that will do the on position decompress, and could overlap with
84 * that positon with gart that is used.
85 * sequende:
86 * kernel_small
87 * ==> kexec (with kdump trigger path or previous doesn't shutdown gart)
88 * ==> kernel_small(gart area become e820_reserved)
89 * ==> kexec (with kdump trigger path or previous doesn't shutdown gart)
90 * ==> kerne_big (uncompressed size will be big than 64M or 128M)
91 * so don't use 512M below as gart iommu, leave the space for kernel
92 * code for safe
93 */
94 p = __alloc_bootmem_nopanic(aper_size, aper_size, 512ULL<<20);
69 if (!p || __pa(p)+aper_size > 0xffffffff) { 95 if (!p || __pa(p)+aper_size > 0xffffffff) {
70 printk(KERN_ERR 96 printk(KERN_ERR
71 "Cannot allocate aperture memory hole (%p,%uK)\n", 97 "Cannot allocate aperture memory hole (%p,%uK)\n",
@@ -83,69 +109,53 @@ static u32 __init allocate_aperture(void)
83 return (u32)__pa(p); 109 return (u32)__pa(p);
84} 110}
85 111
86static int __init aperture_valid(u64 aper_base, u32 aper_size)
87{
88 if (!aper_base)
89 return 0;
90
91 if (aper_base + aper_size > 0x100000000UL) {
92 printk(KERN_ERR "Aperture beyond 4GB. Ignoring.\n");
93 return 0;
94 }
95 if (e820_any_mapped(aper_base, aper_base + aper_size, E820_RAM)) {
96 printk(KERN_ERR "Aperture pointing to e820 RAM. Ignoring.\n");
97 return 0;
98 }
99 if (aper_size < 64*1024*1024) {
100 printk(KERN_ERR "Aperture too small (%d MB)\n", aper_size>>20);
101 return 0;
102 }
103
104 return 1;
105}
106 112
107/* Find a PCI capability */ 113/* Find a PCI capability */
108static __u32 __init find_cap(int num, int slot, int func, int cap) 114static u32 __init find_cap(int bus, int slot, int func, int cap)
109{ 115{
110 int bytes; 116 int bytes;
111 u8 pos; 117 u8 pos;
112 118
113 if (!(read_pci_config_16(num, slot, func, PCI_STATUS) & 119 if (!(read_pci_config_16(bus, slot, func, PCI_STATUS) &
114 PCI_STATUS_CAP_LIST)) 120 PCI_STATUS_CAP_LIST))
115 return 0; 121 return 0;
116 122
117 pos = read_pci_config_byte(num, slot, func, PCI_CAPABILITY_LIST); 123 pos = read_pci_config_byte(bus, slot, func, PCI_CAPABILITY_LIST);
118 for (bytes = 0; bytes < 48 && pos >= 0x40; bytes++) { 124 for (bytes = 0; bytes < 48 && pos >= 0x40; bytes++) {
119 u8 id; 125 u8 id;
120 126
121 pos &= ~3; 127 pos &= ~3;
122 id = read_pci_config_byte(num, slot, func, pos+PCI_CAP_LIST_ID); 128 id = read_pci_config_byte(bus, slot, func, pos+PCI_CAP_LIST_ID);
123 if (id == 0xff) 129 if (id == 0xff)
124 break; 130 break;
125 if (id == cap) 131 if (id == cap)
126 return pos; 132 return pos;
127 pos = read_pci_config_byte(num, slot, func, 133 pos = read_pci_config_byte(bus, slot, func,
128 pos+PCI_CAP_LIST_NEXT); 134 pos+PCI_CAP_LIST_NEXT);
129 } 135 }
130 return 0; 136 return 0;
131} 137}
132 138
133/* Read a standard AGPv3 bridge header */ 139/* Read a standard AGPv3 bridge header */
134static __u32 __init read_agp(int num, int slot, int func, int cap, u32 *order) 140static u32 __init read_agp(int bus, int slot, int func, int cap, u32 *order)
135{ 141{
136 u32 apsize; 142 u32 apsize;
137 u32 apsizereg; 143 u32 apsizereg;
138 int nbits; 144 int nbits;
139 u32 aper_low, aper_hi; 145 u32 aper_low, aper_hi;
140 u64 aper; 146 u64 aper;
147 u32 old_order;
141 148
142 printk(KERN_INFO "AGP bridge at %02x:%02x:%02x\n", num, slot, func); 149 printk(KERN_INFO "AGP bridge at %02x:%02x:%02x\n", bus, slot, func);
143 apsizereg = read_pci_config_16(num, slot, func, cap + 0x14); 150 apsizereg = read_pci_config_16(bus, slot, func, cap + 0x14);
144 if (apsizereg == 0xffffffff) { 151 if (apsizereg == 0xffffffff) {
145 printk(KERN_ERR "APSIZE in AGP bridge unreadable\n"); 152 printk(KERN_ERR "APSIZE in AGP bridge unreadable\n");
146 return 0; 153 return 0;
147 } 154 }
148 155
156 /* old_order could be the value from NB gart setting */
157 old_order = *order;
158
149 apsize = apsizereg & 0xfff; 159 apsize = apsizereg & 0xfff;
150 /* Some BIOS use weird encodings not in the AGPv3 table. */ 160 /* Some BIOS use weird encodings not in the AGPv3 table. */
151 if (apsize & 0xff) 161 if (apsize & 0xff)
@@ -155,14 +165,26 @@ static __u32 __init read_agp(int num, int slot, int func, int cap, u32 *order)
155 if ((int)*order < 0) /* < 32MB */ 165 if ((int)*order < 0) /* < 32MB */
156 *order = 0; 166 *order = 0;
157 167
158 aper_low = read_pci_config(num, slot, func, 0x10); 168 aper_low = read_pci_config(bus, slot, func, 0x10);
159 aper_hi = read_pci_config(num, slot, func, 0x14); 169 aper_hi = read_pci_config(bus, slot, func, 0x14);
160 aper = (aper_low & ~((1<<22)-1)) | ((u64)aper_hi << 32); 170 aper = (aper_low & ~((1<<22)-1)) | ((u64)aper_hi << 32);
161 171
172 /*
173 * On some sick chips, APSIZE is 0. It means it wants 4G
174 * so let double check that order, and lets trust AMD NB settings:
175 */
176 printk(KERN_INFO "Aperture from AGP @ %Lx old size %u MB\n",
177 aper, 32 << old_order);
178 if (aper + (32ULL<<(20 + *order)) > 0x100000000ULL) {
179 printk(KERN_INFO "Aperture size %u MB (APSIZE %x) is not right, using settings from NB\n",
180 32 << *order, apsizereg);
181 *order = old_order;
182 }
183
162 printk(KERN_INFO "Aperture from AGP @ %Lx size %u MB (APSIZE %x)\n", 184 printk(KERN_INFO "Aperture from AGP @ %Lx size %u MB (APSIZE %x)\n",
163 aper, 32 << *order, apsizereg); 185 aper, 32 << *order, apsizereg);
164 186
165 if (!aperture_valid(aper, (32*1024*1024) << *order)) 187 if (!aperture_valid(aper, (32*1024*1024) << *order, 32<<20))
166 return 0; 188 return 0;
167 return (u32)aper; 189 return (u32)aper;
168} 190}
@@ -180,17 +202,17 @@ static __u32 __init read_agp(int num, int slot, int func, int cap, u32 *order)
180 * the AGP bridges should be always an own bus on the HT hierarchy, 202 * the AGP bridges should be always an own bus on the HT hierarchy,
181 * but do it here for future safety. 203 * but do it here for future safety.
182 */ 204 */
183static __u32 __init search_agp_bridge(u32 *order, int *valid_agp) 205static u32 __init search_agp_bridge(u32 *order, int *valid_agp)
184{ 206{
185 int num, slot, func; 207 int bus, slot, func;
186 208
187 /* Poor man's PCI discovery */ 209 /* Poor man's PCI discovery */
188 for (num = 0; num < 256; num++) { 210 for (bus = 0; bus < 256; bus++) {
189 for (slot = 0; slot < 32; slot++) { 211 for (slot = 0; slot < 32; slot++) {
190 for (func = 0; func < 8; func++) { 212 for (func = 0; func < 8; func++) {
191 u32 class, cap; 213 u32 class, cap;
192 u8 type; 214 u8 type;
193 class = read_pci_config(num, slot, func, 215 class = read_pci_config(bus, slot, func,
194 PCI_CLASS_REVISION); 216 PCI_CLASS_REVISION);
195 if (class == 0xffffffff) 217 if (class == 0xffffffff)
196 break; 218 break;
@@ -199,17 +221,17 @@ static __u32 __init search_agp_bridge(u32 *order, int *valid_agp)
199 case PCI_CLASS_BRIDGE_HOST: 221 case PCI_CLASS_BRIDGE_HOST:
200 case PCI_CLASS_BRIDGE_OTHER: /* needed? */ 222 case PCI_CLASS_BRIDGE_OTHER: /* needed? */
201 /* AGP bridge? */ 223 /* AGP bridge? */
202 cap = find_cap(num, slot, func, 224 cap = find_cap(bus, slot, func,
203 PCI_CAP_ID_AGP); 225 PCI_CAP_ID_AGP);
204 if (!cap) 226 if (!cap)
205 break; 227 break;
206 *valid_agp = 1; 228 *valid_agp = 1;
207 return read_agp(num, slot, func, cap, 229 return read_agp(bus, slot, func, cap,
208 order); 230 order);
209 } 231 }
210 232
211 /* No multi-function device? */ 233 /* No multi-function device? */
212 type = read_pci_config_byte(num, slot, func, 234 type = read_pci_config_byte(bus, slot, func,
213 PCI_HEADER_TYPE); 235 PCI_HEADER_TYPE);
214 if (!(type & 0x80)) 236 if (!(type & 0x80))
215 break; 237 break;
@@ -249,36 +271,50 @@ void __init early_gart_iommu_check(void)
249 * or BIOS forget to put that in reserved. 271 * or BIOS forget to put that in reserved.
250 * try to update e820 to make that region as reserved. 272 * try to update e820 to make that region as reserved.
251 */ 273 */
252 int fix, num; 274 int i, fix, slot;
253 u32 ctl; 275 u32 ctl;
254 u32 aper_size = 0, aper_order = 0, last_aper_order = 0; 276 u32 aper_size = 0, aper_order = 0, last_aper_order = 0;
255 u64 aper_base = 0, last_aper_base = 0; 277 u64 aper_base = 0, last_aper_base = 0;
256 int aper_enabled = 0, last_aper_enabled = 0; 278 int aper_enabled = 0, last_aper_enabled = 0, last_valid = 0;
257 279
258 if (!early_pci_allowed()) 280 if (!early_pci_allowed())
259 return; 281 return;
260 282
283 /* This is mostly duplicate of iommu_hole_init */
261 fix = 0; 284 fix = 0;
262 for (num = 24; num < 32; num++) { 285 for (i = 0; i < ARRAY_SIZE(bus_dev_ranges); i++) {
263 if (!early_is_k8_nb(read_pci_config(0, num, 3, 0x00))) 286 int bus;
264 continue; 287 int dev_base, dev_limit;
265 288
266 ctl = read_pci_config(0, num, 3, 0x90); 289 bus = bus_dev_ranges[i].bus;
267 aper_enabled = ctl & 1; 290 dev_base = bus_dev_ranges[i].dev_base;
268 aper_order = (ctl >> 1) & 7; 291 dev_limit = bus_dev_ranges[i].dev_limit;
269 aper_size = (32 * 1024 * 1024) << aper_order; 292
270 aper_base = read_pci_config(0, num, 3, 0x94) & 0x7fff; 293 for (slot = dev_base; slot < dev_limit; slot++) {
271 aper_base <<= 25; 294 if (!early_is_k8_nb(read_pci_config(bus, slot, 3, 0x00)))
272 295 continue;
273 if ((last_aper_order && aper_order != last_aper_order) || 296
274 (last_aper_base && aper_base != last_aper_base) || 297 ctl = read_pci_config(bus, slot, 3, AMD64_GARTAPERTURECTL);
275 (last_aper_enabled && aper_enabled != last_aper_enabled)) { 298 aper_enabled = ctl & AMD64_GARTEN;
276 fix = 1; 299 aper_order = (ctl >> 1) & 7;
277 break; 300 aper_size = (32 * 1024 * 1024) << aper_order;
301 aper_base = read_pci_config(bus, slot, 3, AMD64_GARTAPERTUREBASE) & 0x7fff;
302 aper_base <<= 25;
303
304 if (last_valid) {
305 if ((aper_order != last_aper_order) ||
306 (aper_base != last_aper_base) ||
307 (aper_enabled != last_aper_enabled)) {
308 fix = 1;
309 break;
310 }
311 }
312
313 last_aper_order = aper_order;
314 last_aper_base = aper_base;
315 last_aper_enabled = aper_enabled;
316 last_valid = 1;
278 } 317 }
279 last_aper_order = aper_order;
280 last_aper_base = aper_base;
281 last_aper_enabled = aper_enabled;
282 } 318 }
283 319
284 if (!fix && !aper_enabled) 320 if (!fix && !aper_enabled)
@@ -290,32 +326,46 @@ void __init early_gart_iommu_check(void)
290 if (gart_fix_e820 && !fix && aper_enabled) { 326 if (gart_fix_e820 && !fix && aper_enabled) {
291 if (e820_any_mapped(aper_base, aper_base + aper_size, 327 if (e820_any_mapped(aper_base, aper_base + aper_size,
292 E820_RAM)) { 328 E820_RAM)) {
293 /* reserved it, so we can resuse it in second kernel */ 329 /* reserve it, so we can reuse it in second kernel */
294 printk(KERN_INFO "update e820 for GART\n"); 330 printk(KERN_INFO "update e820 for GART\n");
295 add_memory_region(aper_base, aper_size, E820_RESERVED); 331 add_memory_region(aper_base, aper_size, E820_RESERVED);
296 update_e820(); 332 update_e820();
297 } 333 }
298 return;
299 } 334 }
300 335
336 if (!fix)
337 return;
338
301 /* different nodes have different setting, disable them all at first*/ 339 /* different nodes have different setting, disable them all at first*/
302 for (num = 24; num < 32; num++) { 340 for (i = 0; i < ARRAY_SIZE(bus_dev_ranges); i++) {
303 if (!early_is_k8_nb(read_pci_config(0, num, 3, 0x00))) 341 int bus;
304 continue; 342 int dev_base, dev_limit;
343
344 bus = bus_dev_ranges[i].bus;
345 dev_base = bus_dev_ranges[i].dev_base;
346 dev_limit = bus_dev_ranges[i].dev_limit;
347
348 for (slot = dev_base; slot < dev_limit; slot++) {
349 if (!early_is_k8_nb(read_pci_config(bus, slot, 3, 0x00)))
350 continue;
305 351
306 ctl = read_pci_config(0, num, 3, 0x90); 352 ctl = read_pci_config(bus, slot, 3, AMD64_GARTAPERTURECTL);
307 ctl &= ~1; 353 ctl &= ~AMD64_GARTEN;
308 write_pci_config(0, num, 3, 0x90, ctl); 354 write_pci_config(bus, slot, 3, AMD64_GARTAPERTURECTL, ctl);
355 }
309 } 356 }
310 357
311} 358}
312 359
360static int __initdata printed_gart_size_msg;
361
313void __init gart_iommu_hole_init(void) 362void __init gart_iommu_hole_init(void)
314{ 363{
364 u32 agp_aper_base = 0, agp_aper_order = 0;
315 u32 aper_size, aper_alloc = 0, aper_order = 0, last_aper_order = 0; 365 u32 aper_size, aper_alloc = 0, aper_order = 0, last_aper_order = 0;
316 u64 aper_base, last_aper_base = 0; 366 u64 aper_base, last_aper_base = 0;
317 int fix, num, valid_agp = 0; 367 int fix, slot, valid_agp = 0;
318 int node; 368 int i, node;
319 369
320 if (gart_iommu_aperture_disabled || !fix_aperture || 370 if (gart_iommu_aperture_disabled || !fix_aperture ||
321 !early_pci_allowed()) 371 !early_pci_allowed())
@@ -323,38 +373,63 @@ void __init gart_iommu_hole_init(void)
323 373
324 printk(KERN_INFO "Checking aperture...\n"); 374 printk(KERN_INFO "Checking aperture...\n");
325 375
376 if (!fallback_aper_force)
377 agp_aper_base = search_agp_bridge(&agp_aper_order, &valid_agp);
378
326 fix = 0; 379 fix = 0;
327 node = 0; 380 node = 0;
328 for (num = 24; num < 32; num++) { 381 for (i = 0; i < ARRAY_SIZE(bus_dev_ranges); i++) {
329 if (!early_is_k8_nb(read_pci_config(0, num, 3, 0x00))) 382 int bus;
330 continue; 383 int dev_base, dev_limit;
331 384
332 iommu_detected = 1; 385 bus = bus_dev_ranges[i].bus;
333 gart_iommu_aperture = 1; 386 dev_base = bus_dev_ranges[i].dev_base;
334 387 dev_limit = bus_dev_ranges[i].dev_limit;
335 aper_order = (read_pci_config(0, num, 3, 0x90) >> 1) & 7; 388
336 aper_size = (32 * 1024 * 1024) << aper_order; 389 for (slot = dev_base; slot < dev_limit; slot++) {
337 aper_base = read_pci_config(0, num, 3, 0x94) & 0x7fff; 390 if (!early_is_k8_nb(read_pci_config(bus, slot, 3, 0x00)))
338 aper_base <<= 25; 391 continue;
339 392
340 printk(KERN_INFO "Node %d: aperture @ %Lx size %u MB\n", 393 iommu_detected = 1;
341 node, aper_base, aper_size >> 20); 394 gart_iommu_aperture = 1;
342 node++; 395
343 396 aper_order = (read_pci_config(bus, slot, 3, AMD64_GARTAPERTURECTL) >> 1) & 7;
344 if (!aperture_valid(aper_base, aper_size)) { 397 aper_size = (32 * 1024 * 1024) << aper_order;
345 fix = 1; 398 aper_base = read_pci_config(bus, slot, 3, AMD64_GARTAPERTUREBASE) & 0x7fff;
346 break; 399 aper_base <<= 25;
347 } 400
401 printk(KERN_INFO "Node %d: aperture @ %Lx size %u MB\n",
402 node, aper_base, aper_size >> 20);
403 node++;
404
405 if (!aperture_valid(aper_base, aper_size, 64<<20)) {
406 if (valid_agp && agp_aper_base &&
407 agp_aper_base == aper_base &&
408 agp_aper_order == aper_order) {
409 /* the same between two setting from NB and agp */
410 if (!no_iommu && end_pfn > MAX_DMA32_PFN && !printed_gart_size_msg) {
411 printk(KERN_ERR "you are using iommu with agp, but GART size is less than 64M\n");
412 printk(KERN_ERR "please increase GART size in your BIOS setup\n");
413 printk(KERN_ERR "if BIOS doesn't have that option, contact your HW vendor!\n");
414 printed_gart_size_msg = 1;
415 }
416 } else {
417 fix = 1;
418 goto out;
419 }
420 }
348 421
349 if ((last_aper_order && aper_order != last_aper_order) || 422 if ((last_aper_order && aper_order != last_aper_order) ||
350 (last_aper_base && aper_base != last_aper_base)) { 423 (last_aper_base && aper_base != last_aper_base)) {
351 fix = 1; 424 fix = 1;
352 break; 425 goto out;
426 }
427 last_aper_order = aper_order;
428 last_aper_base = aper_base;
353 } 429 }
354 last_aper_order = aper_order;
355 last_aper_base = aper_base;
356 } 430 }
357 431
432out:
358 if (!fix && !fallback_aper_force) { 433 if (!fix && !fallback_aper_force) {
359 if (last_aper_base) { 434 if (last_aper_base) {
360 unsigned long n = (32 * 1024 * 1024) << last_aper_order; 435 unsigned long n = (32 * 1024 * 1024) << last_aper_order;
@@ -364,8 +439,10 @@ void __init gart_iommu_hole_init(void)
364 return; 439 return;
365 } 440 }
366 441
367 if (!fallback_aper_force) 442 if (!fallback_aper_force) {
368 aper_alloc = search_agp_bridge(&aper_order, &valid_agp); 443 aper_alloc = agp_aper_base;
444 aper_order = agp_aper_order;
445 }
369 446
370 if (aper_alloc) { 447 if (aper_alloc) {
371 /* Got the aperture from the AGP bridge */ 448 /* Got the aperture from the AGP bridge */
@@ -401,16 +478,24 @@ void __init gart_iommu_hole_init(void)
401 } 478 }
402 479
403 /* Fix up the north bridges */ 480 /* Fix up the north bridges */
404 for (num = 24; num < 32; num++) { 481 for (i = 0; i < ARRAY_SIZE(bus_dev_ranges); i++) {
405 if (!early_is_k8_nb(read_pci_config(0, num, 3, 0x00))) 482 int bus;
406 continue; 483 int dev_base, dev_limit;
407 484
408 /* 485 bus = bus_dev_ranges[i].bus;
409 * Don't enable translation yet. That is done later. 486 dev_base = bus_dev_ranges[i].dev_base;
410 * Assume this BIOS didn't initialise the GART so 487 dev_limit = bus_dev_ranges[i].dev_limit;
411 * just overwrite all previous bits 488 for (slot = dev_base; slot < dev_limit; slot++) {
412 */ 489 if (!early_is_k8_nb(read_pci_config(bus, slot, 3, 0x00)))
413 write_pci_config(0, num, 3, 0x90, aper_order<<1); 490 continue;
414 write_pci_config(0, num, 3, 0x94, aper_alloc>>25); 491
492 /* Don't enable translation yet. That is done later.
493 Assume this BIOS didn't initialise the GART so
494 just overwrite all previous bits */
495 write_pci_config(bus, slot, 3, AMD64_GARTAPERTURECTL, aper_order << 1);
496 write_pci_config(bus, slot, 3, AMD64_GARTAPERTUREBASE, aper_alloc >> 25);
497 }
415 } 498 }
499
500 set_up_gart_resume(aper_order, aper_alloc);
416} 501}
diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c
index 4b99b1bdeb6c..45d8da405ad9 100644
--- a/arch/x86/kernel/apic_32.c
+++ b/arch/x86/kernel/apic_32.c
@@ -64,9 +64,8 @@ static int enable_local_apic __initdata;
64 64
65/* Local APIC timer verification ok */ 65/* Local APIC timer verification ok */
66static int local_apic_timer_verify_ok; 66static int local_apic_timer_verify_ok;
67/* Disable local APIC timer from the kernel commandline or via dmi quirk 67/* Disable local APIC timer from the kernel commandline or via dmi quirk */
68 or using CPU MSR check */ 68static int local_apic_timer_disabled;
69int local_apic_timer_disabled;
70/* Local APIC timer works in C2 */ 69/* Local APIC timer works in C2 */
71int local_apic_timer_c2_ok; 70int local_apic_timer_c2_ok;
72EXPORT_SYMBOL_GPL(local_apic_timer_c2_ok); 71EXPORT_SYMBOL_GPL(local_apic_timer_c2_ok);
@@ -1154,9 +1153,6 @@ static int __init detect_init_APIC(void)
1154 if (l & MSR_IA32_APICBASE_ENABLE) 1153 if (l & MSR_IA32_APICBASE_ENABLE)
1155 mp_lapic_addr = l & MSR_IA32_APICBASE_BASE; 1154 mp_lapic_addr = l & MSR_IA32_APICBASE_BASE;
1156 1155
1157 if (nmi_watchdog != NMI_NONE && nmi_watchdog != NMI_DISABLED)
1158 nmi_watchdog = NMI_LOCAL_APIC;
1159
1160 printk(KERN_INFO "Found and enabled local APIC!\n"); 1156 printk(KERN_INFO "Found and enabled local APIC!\n");
1161 1157
1162 apic_pm_activate(); 1158 apic_pm_activate();
@@ -1269,6 +1265,10 @@ int __init APIC_init_uniprocessor(void)
1269 1265
1270 setup_local_APIC(); 1266 setup_local_APIC();
1271 1267
1268#ifdef CONFIG_X86_IO_APIC
1269 if (!smp_found_config || skip_ioapic_setup || !nr_ioapics)
1270#endif
1271 localise_nmi_watchdog();
1272 end_local_APIC_setup(); 1272 end_local_APIC_setup();
1273#ifdef CONFIG_X86_IO_APIC 1273#ifdef CONFIG_X86_IO_APIC
1274 if (smp_found_config) 1274 if (smp_found_config)
diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c
index 5910020c3f24..3ef7752aa8e5 100644
--- a/arch/x86/kernel/apic_64.c
+++ b/arch/x86/kernel/apic_64.c
@@ -43,7 +43,7 @@
43#include <mach_ipi.h> 43#include <mach_ipi.h>
44#include <mach_apic.h> 44#include <mach_apic.h>
45 45
46int disable_apic_timer __cpuinitdata; 46static int disable_apic_timer __cpuinitdata;
47static int apic_calibrate_pmtmr __initdata; 47static int apic_calibrate_pmtmr __initdata;
48int disable_apic; 48int disable_apic;
49 49
@@ -422,32 +422,8 @@ void __init setup_boot_APIC_clock(void)
422 setup_APIC_timer(); 422 setup_APIC_timer();
423} 423}
424 424
425/*
426 * AMD C1E enabled CPUs have a real nasty problem: Some BIOSes set the
427 * C1E flag only in the secondary CPU, so when we detect the wreckage
428 * we already have enabled the boot CPU local apic timer. Check, if
429 * disable_apic_timer is set and the DUMMY flag is cleared. If yes,
430 * set the DUMMY flag again and force the broadcast mode in the
431 * clockevents layer.
432 */
433static void __cpuinit check_boot_apic_timer_broadcast(void)
434{
435 if (!disable_apic_timer ||
436 (lapic_clockevent.features & CLOCK_EVT_FEAT_DUMMY))
437 return;
438
439 printk(KERN_INFO "AMD C1E detected late. Force timer broadcast.\n");
440 lapic_clockevent.features |= CLOCK_EVT_FEAT_DUMMY;
441
442 local_irq_enable();
443 clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_FORCE,
444 &boot_cpu_physical_apicid);
445 local_irq_disable();
446}
447
448void __cpuinit setup_secondary_APIC_clock(void) 425void __cpuinit setup_secondary_APIC_clock(void)
449{ 426{
450 check_boot_apic_timer_broadcast();
451 setup_APIC_timer(); 427 setup_APIC_timer();
452} 428}
453 429
@@ -534,7 +510,7 @@ int setup_profiling_timer(unsigned int multiplier)
534 */ 510 */
535void clear_local_APIC(void) 511void clear_local_APIC(void)
536{ 512{
537 int maxlvt = lapic_get_maxlvt(); 513 int maxlvt;
538 u32 v; 514 u32 v;
539 515
540 /* APIC hasn't been mapped yet */ 516 /* APIC hasn't been mapped yet */
@@ -875,7 +851,7 @@ static int __init detect_init_APIC(void)
875 851
876void __init early_init_lapic_mapping(void) 852void __init early_init_lapic_mapping(void)
877{ 853{
878 unsigned long apic_phys; 854 unsigned long phys_addr;
879 855
880 /* 856 /*
881 * If no local APIC can be found then go out 857 * If no local APIC can be found then go out
@@ -884,11 +860,11 @@ void __init early_init_lapic_mapping(void)
884 if (!smp_found_config) 860 if (!smp_found_config)
885 return; 861 return;
886 862
887 apic_phys = mp_lapic_addr; 863 phys_addr = mp_lapic_addr;
888 864
889 set_fixmap_nocache(FIX_APIC_BASE, apic_phys); 865 set_fixmap_nocache(FIX_APIC_BASE, phys_addr);
890 apic_printk(APIC_VERBOSE, "mapped APIC to %16lx (%16lx)\n", 866 apic_printk(APIC_VERBOSE, "mapped APIC to %16lx (%16lx)\n",
891 APIC_BASE, apic_phys); 867 APIC_BASE, phys_addr);
892 868
893 /* 869 /*
894 * Fetch the APIC ID of the BSP in case we have a 870 * Fetch the APIC ID of the BSP in case we have a
@@ -954,6 +930,8 @@ int __init APIC_init_uniprocessor(void)
954 if (!skip_ioapic_setup && nr_ioapics) 930 if (!skip_ioapic_setup && nr_ioapics)
955 enable_IO_APIC(); 931 enable_IO_APIC();
956 932
933 if (!smp_found_config || skip_ioapic_setup || !nr_ioapics)
934 localise_nmi_watchdog();
957 end_local_APIC_setup(); 935 end_local_APIC_setup();
958 936
959 if (smp_found_config && !skip_ioapic_setup && nr_ioapics) 937 if (smp_found_config && !skip_ioapic_setup && nr_ioapics)
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
index bf9290e29013..00e6d1370954 100644
--- a/arch/x86/kernel/apm_32.c
+++ b/arch/x86/kernel/apm_32.c
@@ -228,6 +228,7 @@
228#include <linux/suspend.h> 228#include <linux/suspend.h>
229#include <linux/kthread.h> 229#include <linux/kthread.h>
230#include <linux/jiffies.h> 230#include <linux/jiffies.h>
231#include <linux/smp_lock.h>
231 232
232#include <asm/system.h> 233#include <asm/system.h>
233#include <asm/uaccess.h> 234#include <asm/uaccess.h>
@@ -1149,7 +1150,7 @@ static void queue_event(apm_event_t event, struct apm_user *sender)
1149 as->event_tail = 0; 1150 as->event_tail = 0;
1150 } 1151 }
1151 as->events[as->event_head] = event; 1152 as->events[as->event_head] = event;
1152 if ((!as->suser) || (!as->writer)) 1153 if (!as->suser || !as->writer)
1153 continue; 1154 continue;
1154 switch (event) { 1155 switch (event) {
1155 case APM_SYS_SUSPEND: 1156 case APM_SYS_SUSPEND:
@@ -1396,7 +1397,7 @@ static void apm_mainloop(void)
1396 1397
1397static int check_apm_user(struct apm_user *as, const char *func) 1398static int check_apm_user(struct apm_user *as, const char *func)
1398{ 1399{
1399 if ((as == NULL) || (as->magic != APM_BIOS_MAGIC)) { 1400 if (as == NULL || as->magic != APM_BIOS_MAGIC) {
1400 printk(KERN_ERR "apm: %s passed bad filp\n", func); 1401 printk(KERN_ERR "apm: %s passed bad filp\n", func);
1401 return 1; 1402 return 1;
1402 } 1403 }
@@ -1459,18 +1460,19 @@ static unsigned int do_poll(struct file *fp, poll_table *wait)
1459 return 0; 1460 return 0;
1460} 1461}
1461 1462
1462static int do_ioctl(struct inode *inode, struct file *filp, 1463static long do_ioctl(struct file *filp, u_int cmd, u_long arg)
1463 u_int cmd, u_long arg)
1464{ 1464{
1465 struct apm_user *as; 1465 struct apm_user *as;
1466 int ret;
1466 1467
1467 as = filp->private_data; 1468 as = filp->private_data;
1468 if (check_apm_user(as, "ioctl")) 1469 if (check_apm_user(as, "ioctl"))
1469 return -EIO; 1470 return -EIO;
1470 if ((!as->suser) || (!as->writer)) 1471 if (!as->suser || !as->writer)
1471 return -EPERM; 1472 return -EPERM;
1472 switch (cmd) { 1473 switch (cmd) {
1473 case APM_IOC_STANDBY: 1474 case APM_IOC_STANDBY:
1475 lock_kernel();
1474 if (as->standbys_read > 0) { 1476 if (as->standbys_read > 0) {
1475 as->standbys_read--; 1477 as->standbys_read--;
1476 as->standbys_pending--; 1478 as->standbys_pending--;
@@ -1479,8 +1481,10 @@ static int do_ioctl(struct inode *inode, struct file *filp,
1479 queue_event(APM_USER_STANDBY, as); 1481 queue_event(APM_USER_STANDBY, as);
1480 if (standbys_pending <= 0) 1482 if (standbys_pending <= 0)
1481 standby(); 1483 standby();
1484 unlock_kernel();
1482 break; 1485 break;
1483 case APM_IOC_SUSPEND: 1486 case APM_IOC_SUSPEND:
1487 lock_kernel();
1484 if (as->suspends_read > 0) { 1488 if (as->suspends_read > 0) {
1485 as->suspends_read--; 1489 as->suspends_read--;
1486 as->suspends_pending--; 1490 as->suspends_pending--;
@@ -1488,16 +1492,17 @@ static int do_ioctl(struct inode *inode, struct file *filp,
1488 } else 1492 } else
1489 queue_event(APM_USER_SUSPEND, as); 1493 queue_event(APM_USER_SUSPEND, as);
1490 if (suspends_pending <= 0) { 1494 if (suspends_pending <= 0) {
1491 return suspend(1); 1495 ret = suspend(1);
1492 } else { 1496 } else {
1493 as->suspend_wait = 1; 1497 as->suspend_wait = 1;
1494 wait_event_interruptible(apm_suspend_waitqueue, 1498 wait_event_interruptible(apm_suspend_waitqueue,
1495 as->suspend_wait == 0); 1499 as->suspend_wait == 0);
1496 return as->suspend_result; 1500 ret = as->suspend_result;
1497 } 1501 }
1498 break; 1502 unlock_kernel();
1503 return ret;
1499 default: 1504 default:
1500 return -EINVAL; 1505 return -ENOTTY;
1501 } 1506 }
1502 return 0; 1507 return 0;
1503} 1508}
@@ -1860,7 +1865,7 @@ static const struct file_operations apm_bios_fops = {
1860 .owner = THIS_MODULE, 1865 .owner = THIS_MODULE,
1861 .read = do_read, 1866 .read = do_read,
1862 .poll = do_poll, 1867 .poll = do_poll,
1863 .ioctl = do_ioctl, 1868 .unlocked_ioctl = do_ioctl,
1864 .open = do_open, 1869 .open = do_open,
1865 .release = do_release, 1870 .release = do_release,
1866}; 1871};
diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index a0c6f8190887..65b1be5fe9ce 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -6,11 +6,15 @@ obj-y := intel_cacheinfo.o addon_cpuid_features.o
6obj-y += proc.o feature_names.o 6obj-y += proc.o feature_names.o
7 7
8obj-$(CONFIG_X86_32) += common.o bugs.o 8obj-$(CONFIG_X86_32) += common.o bugs.o
9obj-$(CONFIG_X86_64) += bugs_64.o
9obj-$(CONFIG_X86_32) += amd.o 10obj-$(CONFIG_X86_32) += amd.o
11obj-$(CONFIG_X86_64) += amd_64.o
10obj-$(CONFIG_X86_32) += cyrix.o 12obj-$(CONFIG_X86_32) += cyrix.o
11obj-$(CONFIG_X86_32) += centaur.o 13obj-$(CONFIG_X86_32) += centaur.o
14obj-$(CONFIG_X86_64) += centaur_64.o
12obj-$(CONFIG_X86_32) += transmeta.o 15obj-$(CONFIG_X86_32) += transmeta.o
13obj-$(CONFIG_X86_32) += intel.o 16obj-$(CONFIG_X86_32) += intel.o
17obj-$(CONFIG_X86_64) += intel_64.o
14obj-$(CONFIG_X86_32) += umc.o 18obj-$(CONFIG_X86_32) += umc.o
15 19
16obj-$(CONFIG_X86_MCE) += mcheck/ 20obj-$(CONFIG_X86_MCE) += mcheck/
diff --git a/arch/x86/kernel/cpu/addon_cpuid_features.c b/arch/x86/kernel/cpu/addon_cpuid_features.c
index c2e1ce33c7cb..84a8220a6072 100644
--- a/arch/x86/kernel/cpu/addon_cpuid_features.c
+++ b/arch/x86/kernel/cpu/addon_cpuid_features.c
@@ -1,9 +1,7 @@
1
2/* 1/*
3 * Routines to indentify additional cpu features that are scattered in 2 * Routines to indentify additional cpu features that are scattered in
4 * cpuid space. 3 * cpuid space.
5 */ 4 */
6
7#include <linux/cpu.h> 5#include <linux/cpu.h>
8 6
9#include <asm/pat.h> 7#include <asm/pat.h>
@@ -53,19 +51,20 @@ void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c)
53#ifdef CONFIG_X86_PAT 51#ifdef CONFIG_X86_PAT
54void __cpuinit validate_pat_support(struct cpuinfo_x86 *c) 52void __cpuinit validate_pat_support(struct cpuinfo_x86 *c)
55{ 53{
54 if (!cpu_has_pat)
55 pat_disable("PAT not supported by CPU.");
56
56 switch (c->x86_vendor) { 57 switch (c->x86_vendor) {
57 case X86_VENDOR_AMD:
58 if (c->x86 >= 0xf && c->x86 <= 0x11)
59 return;
60 break;
61 case X86_VENDOR_INTEL: 58 case X86_VENDOR_INTEL:
62 if (c->x86 == 0xF || (c->x86 == 6 && c->x86_model >= 15)) 59 if (c->x86 == 0xF || (c->x86 == 6 && c->x86_model >= 15))
63 return; 60 return;
64 break; 61 break;
62 case X86_VENDOR_AMD:
63 case X86_VENDOR_CENTAUR:
64 case X86_VENDOR_TRANSMETA:
65 return;
65 } 66 }
66 67
67 pat_disable(cpu_has_pat ? 68 pat_disable("PAT disabled. Not yet verified on this CPU type.");
68 "PAT disabled. Not yet verified on this CPU type." :
69 "PAT not supported by CPU.");
70} 69}
71#endif 70#endif
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 245866828294..81a07ca65d44 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -24,43 +24,6 @@
24extern void vide(void); 24extern void vide(void);
25__asm__(".align 4\nvide: ret"); 25__asm__(".align 4\nvide: ret");
26 26
27#ifdef CONFIG_X86_LOCAL_APIC
28#define ENABLE_C1E_MASK 0x18000000
29#define CPUID_PROCESSOR_SIGNATURE 1
30#define CPUID_XFAM 0x0ff00000
31#define CPUID_XFAM_K8 0x00000000
32#define CPUID_XFAM_10H 0x00100000
33#define CPUID_XFAM_11H 0x00200000
34#define CPUID_XMOD 0x000f0000
35#define CPUID_XMOD_REV_F 0x00040000
36
37/* AMD systems with C1E don't have a working lAPIC timer. Check for that. */
38static __cpuinit int amd_apic_timer_broken(void)
39{
40 u32 lo, hi;
41 u32 eax = cpuid_eax(CPUID_PROCESSOR_SIGNATURE);
42 switch (eax & CPUID_XFAM) {
43 case CPUID_XFAM_K8:
44 if ((eax & CPUID_XMOD) < CPUID_XMOD_REV_F)
45 break;
46 case CPUID_XFAM_10H:
47 case CPUID_XFAM_11H:
48 rdmsr(MSR_K8_ENABLE_C1E, lo, hi);
49 if (lo & ENABLE_C1E_MASK) {
50 if (smp_processor_id() != boot_cpu_physical_apicid)
51 printk(KERN_INFO "AMD C1E detected late. "
52 " Force timer broadcast.\n");
53 return 1;
54 }
55 break;
56 default:
57 /* err on the side of caution */
58 return 1;
59 }
60 return 0;
61}
62#endif
63
64int force_mwait __cpuinitdata; 27int force_mwait __cpuinitdata;
65 28
66static void __cpuinit early_init_amd(struct cpuinfo_x86 *c) 29static void __cpuinit early_init_amd(struct cpuinfo_x86 *c)
@@ -297,11 +260,6 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
297 num_cache_leaves = 3; 260 num_cache_leaves = 3;
298 } 261 }
299 262
300#ifdef CONFIG_X86_LOCAL_APIC
301 if (amd_apic_timer_broken())
302 local_apic_timer_disabled = 1;
303#endif
304
305 /* K6s reports MCEs but don't actually have all the MSRs */ 263 /* K6s reports MCEs but don't actually have all the MSRs */
306 if (c->x86 < 6) 264 if (c->x86 < 6)
307 clear_cpu_cap(c, X86_FEATURE_MCE); 265 clear_cpu_cap(c, X86_FEATURE_MCE);
diff --git a/arch/x86/kernel/cpu/amd_64.c b/arch/x86/kernel/cpu/amd_64.c
new file mode 100644
index 000000000000..30b7557c9641
--- /dev/null
+++ b/arch/x86/kernel/cpu/amd_64.c
@@ -0,0 +1,211 @@
1#include <linux/init.h>
2#include <linux/mm.h>
3
4#include <asm/numa_64.h>
5#include <asm/mmconfig.h>
6#include <asm/cacheflush.h>
7
8#include <mach_apic.h>
9
10#include "cpu.h"
11
12int force_mwait __cpuinitdata;
13
14#ifdef CONFIG_NUMA
15static int __cpuinit nearby_node(int apicid)
16{
17 int i, node;
18
19 for (i = apicid - 1; i >= 0; i--) {
20 node = apicid_to_node[i];
21 if (node != NUMA_NO_NODE && node_online(node))
22 return node;
23 }
24 for (i = apicid + 1; i < MAX_LOCAL_APIC; i++) {
25 node = apicid_to_node[i];
26 if (node != NUMA_NO_NODE && node_online(node))
27 return node;
28 }
29 return first_node(node_online_map); /* Shouldn't happen */
30}
31#endif
32
33/*
34 * On a AMD dual core setup the lower bits of the APIC id distingush the cores.
35 * Assumes number of cores is a power of two.
36 */
37static void __cpuinit amd_detect_cmp(struct cpuinfo_x86 *c)
38{
39#ifdef CONFIG_SMP
40 unsigned bits;
41#ifdef CONFIG_NUMA
42 int cpu = smp_processor_id();
43 int node = 0;
44 unsigned apicid = hard_smp_processor_id();
45#endif
46 bits = c->x86_coreid_bits;
47
48 /* Low order bits define the core id (index of core in socket) */
49 c->cpu_core_id = c->initial_apicid & ((1 << bits)-1);
50 /* Convert the initial APIC ID into the socket ID */
51 c->phys_proc_id = c->initial_apicid >> bits;
52
53#ifdef CONFIG_NUMA
54 node = c->phys_proc_id;
55 if (apicid_to_node[apicid] != NUMA_NO_NODE)
56 node = apicid_to_node[apicid];
57 if (!node_online(node)) {
58 /* Two possibilities here:
59 - The CPU is missing memory and no node was created.
60 In that case try picking one from a nearby CPU
61 - The APIC IDs differ from the HyperTransport node IDs
62 which the K8 northbridge parsing fills in.
63 Assume they are all increased by a constant offset,
64 but in the same order as the HT nodeids.
65 If that doesn't result in a usable node fall back to the
66 path for the previous case. */
67
68 int ht_nodeid = c->initial_apicid;
69
70 if (ht_nodeid >= 0 &&
71 apicid_to_node[ht_nodeid] != NUMA_NO_NODE)
72 node = apicid_to_node[ht_nodeid];
73 /* Pick a nearby node */
74 if (!node_online(node))
75 node = nearby_node(apicid);
76 }
77 numa_set_node(cpu, node);
78
79 printk(KERN_INFO "CPU %d/%x -> Node %d\n", cpu, apicid, node);
80#endif
81#endif
82}
83
84static void __cpuinit early_init_amd_mc(struct cpuinfo_x86 *c)
85{
86#ifdef CONFIG_SMP
87 unsigned bits, ecx;
88
89 /* Multi core CPU? */
90 if (c->extended_cpuid_level < 0x80000008)
91 return;
92
93 ecx = cpuid_ecx(0x80000008);
94
95 c->x86_max_cores = (ecx & 0xff) + 1;
96
97 /* CPU telling us the core id bits shift? */
98 bits = (ecx >> 12) & 0xF;
99
100 /* Otherwise recompute */
101 if (bits == 0) {
102 while ((1 << bits) < c->x86_max_cores)
103 bits++;
104 }
105
106 c->x86_coreid_bits = bits;
107
108#endif
109}
110
111static void __cpuinit early_init_amd(struct cpuinfo_x86 *c)
112{
113 early_init_amd_mc(c);
114
115 /* c->x86_power is 8000_0007 edx. Bit 8 is constant TSC */
116 if (c->x86_power & (1<<8))
117 set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
118}
119
120static void __cpuinit init_amd(struct cpuinfo_x86 *c)
121{
122 unsigned level;
123
124#ifdef CONFIG_SMP
125 unsigned long value;
126
127 /*
128 * Disable TLB flush filter by setting HWCR.FFDIS on K8
129 * bit 6 of msr C001_0015
130 *
131 * Errata 63 for SH-B3 steppings
132 * Errata 122 for all steppings (F+ have it disabled by default)
133 */
134 if (c->x86 == 15) {
135 rdmsrl(MSR_K8_HWCR, value);
136 value |= 1 << 6;
137 wrmsrl(MSR_K8_HWCR, value);
138 }
139#endif
140
141 /* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
142 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */
143 clear_cpu_cap(c, 0*32+31);
144
145 /* On C+ stepping K8 rep microcode works well for copy/memset */
146 level = cpuid_eax(1);
147 if (c->x86 == 15 && ((level >= 0x0f48 && level < 0x0f50) ||
148 level >= 0x0f58))
149 set_cpu_cap(c, X86_FEATURE_REP_GOOD);
150 if (c->x86 == 0x10 || c->x86 == 0x11)
151 set_cpu_cap(c, X86_FEATURE_REP_GOOD);
152
153 /* Enable workaround for FXSAVE leak */
154 if (c->x86 >= 6)
155 set_cpu_cap(c, X86_FEATURE_FXSAVE_LEAK);
156
157 level = get_model_name(c);
158 if (!level) {
159 switch (c->x86) {
160 case 15:
161 /* Should distinguish Models here, but this is only
162 a fallback anyways. */
163 strcpy(c->x86_model_id, "Hammer");
164 break;
165 }
166 }
167 display_cacheinfo(c);
168
169 /* Multi core CPU? */
170 if (c->extended_cpuid_level >= 0x80000008)
171 amd_detect_cmp(c);
172
173 if (c->extended_cpuid_level >= 0x80000006 &&
174 (cpuid_edx(0x80000006) & 0xf000))
175 num_cache_leaves = 4;
176 else
177 num_cache_leaves = 3;
178
179 if (c->x86 == 0xf || c->x86 == 0x10 || c->x86 == 0x11)
180 set_cpu_cap(c, X86_FEATURE_K8);
181
182 /* MFENCE stops RDTSC speculation */
183 set_cpu_cap(c, X86_FEATURE_MFENCE_RDTSC);
184
185 if (c->x86 == 0x10)
186 fam10h_check_enable_mmcfg();
187
188 if (c == &boot_cpu_data && c->x86 >= 0xf && c->x86 <= 0x11) {
189 unsigned long long tseg;
190
191 /*
192 * Split up direct mapping around the TSEG SMM area.
193 * Don't do it for gbpages because there seems very little
194 * benefit in doing so.
195 */
196 if (!rdmsrl_safe(MSR_K8_TSEG_ADDR, &tseg) &&
197 (tseg >> PMD_SHIFT) <
198 (max_pfn_mapped >> (PMD_SHIFT-PAGE_SHIFT)))
199 set_memory_4k((unsigned long)__va(tseg), 1);
200 }
201}
202
203static struct cpu_dev amd_cpu_dev __cpuinitdata = {
204 .c_vendor = "AMD",
205 .c_ident = { "AuthenticAMD" },
206 .c_early_init = early_init_amd,
207 .c_init = init_amd,
208};
209
210cpu_vendor_dev_register(X86_VENDOR_AMD, &amd_cpu_dev);
211
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index 170d2f5523b2..1b1c56bb338f 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -59,8 +59,12 @@ static void __init check_fpu(void)
59 return; 59 return;
60 } 60 }
61 61
62/* trap_init() enabled FXSR and company _before_ testing for FP problems here. */ 62 /*
63 /* Test for the divl bug.. */ 63 * trap_init() enabled FXSR and company _before_ testing for FP
64 * problems here.
65 *
66 * Test for the divl bug..
67 */
64 __asm__("fninit\n\t" 68 __asm__("fninit\n\t"
65 "fldl %1\n\t" 69 "fldl %1\n\t"
66 "fdivl %2\n\t" 70 "fdivl %2\n\t"
@@ -108,10 +112,15 @@ static void __init check_popad(void)
108 "movl $12345678,%%eax; movl $0,%%edi; pusha; popa; movl (%%edx,%%edi),%%ecx " 112 "movl $12345678,%%eax; movl $0,%%edi; pusha; popa; movl (%%edx,%%edi),%%ecx "
109 : "=&a" (res) 113 : "=&a" (res)
110 : "d" (inp) 114 : "d" (inp)
111 : "ecx", "edi" ); 115 : "ecx", "edi");
112 /* If this fails, it means that any user program may lock the CPU hard. Too bad. */ 116 /*
113 if (res != 12345678) printk( "Buggy.\n" ); 117 * If this fails, it means that any user program may lock the
114 else printk( "OK.\n" ); 118 * CPU hard. Too bad.
119 */
120 if (res != 12345678)
121 printk("Buggy.\n");
122 else
123 printk("OK.\n");
115#endif 124#endif
116} 125}
117 126
@@ -137,7 +146,8 @@ static void __init check_config(void)
137 * i486+ only features! (WP works in supervisor mode and the 146 * i486+ only features! (WP works in supervisor mode and the
138 * new "invlpg" and "bswap" instructions) 147 * new "invlpg" and "bswap" instructions)
139 */ 148 */
140#if defined(CONFIG_X86_WP_WORKS_OK) || defined(CONFIG_X86_INVLPG) || defined(CONFIG_X86_BSWAP) 149#if defined(CONFIG_X86_WP_WORKS_OK) || defined(CONFIG_X86_INVLPG) || \
150 defined(CONFIG_X86_BSWAP)
141 if (boot_cpu_data.x86 == 3) 151 if (boot_cpu_data.x86 == 3)
142 panic("Kernel requires i486+ for 'invlpg' and other features"); 152 panic("Kernel requires i486+ for 'invlpg' and other features");
143#endif 153#endif
@@ -170,6 +180,7 @@ void __init check_bugs(void)
170 check_fpu(); 180 check_fpu();
171 check_hlt(); 181 check_hlt();
172 check_popad(); 182 check_popad();
173 init_utsname()->machine[1] = '0' + (boot_cpu_data.x86 > 6 ? 6 : boot_cpu_data.x86); 183 init_utsname()->machine[1] =
184 '0' + (boot_cpu_data.x86 > 6 ? 6 : boot_cpu_data.x86);
174 alternative_instructions(); 185 alternative_instructions();
175} 186}
diff --git a/arch/x86/kernel/bugs_64.c b/arch/x86/kernel/cpu/bugs_64.c
index 9a3ed0649d4e..9a3ed0649d4e 100644
--- a/arch/x86/kernel/bugs_64.c
+++ b/arch/x86/kernel/cpu/bugs_64.c
diff --git a/arch/x86/kernel/cpu/centaur_64.c b/arch/x86/kernel/cpu/centaur_64.c
new file mode 100644
index 000000000000..13526fd5cce1
--- /dev/null
+++ b/arch/x86/kernel/cpu/centaur_64.c
@@ -0,0 +1,43 @@
1#include <linux/init.h>
2#include <linux/smp.h>
3
4#include <asm/cpufeature.h>
5#include <asm/processor.h>
6
7#include "cpu.h"
8
9static void __cpuinit early_init_centaur(struct cpuinfo_x86 *c)
10{
11 if (c->x86 == 0x6 && c->x86_model >= 0xf)
12 set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
13}
14
15static void __cpuinit init_centaur(struct cpuinfo_x86 *c)
16{
17 /* Cache sizes */
18 unsigned n;
19
20 n = c->extended_cpuid_level;
21 if (n >= 0x80000008) {
22 unsigned eax = cpuid_eax(0x80000008);
23 c->x86_virt_bits = (eax >> 8) & 0xff;
24 c->x86_phys_bits = eax & 0xff;
25 }
26
27 if (c->x86 == 0x6 && c->x86_model >= 0xf) {
28 c->x86_cache_alignment = c->x86_clflush_size * 2;
29 set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
30 set_cpu_cap(c, X86_FEATURE_REP_GOOD);
31 }
32 set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC);
33}
34
35static struct cpu_dev centaur_cpu_dev __cpuinitdata = {
36 .c_vendor = "Centaur",
37 .c_ident = { "CentaurHauls" },
38 .c_early_init = early_init_centaur,
39 .c_init = init_centaur,
40};
41
42cpu_vendor_dev_register(X86_VENDOR_CENTAUR, &centaur_cpu_dev);
43
diff --git a/arch/x86/kernel/cpu/cpu.h b/arch/x86/kernel/cpu/cpu.h
index 783691b2a738..4d894e8565fe 100644
--- a/arch/x86/kernel/cpu/cpu.h
+++ b/arch/x86/kernel/cpu/cpu.h
@@ -1,3 +1,6 @@
1#ifndef ARCH_X86_CPU_H
2
3#define ARCH_X86_CPU_H
1 4
2struct cpu_model_info { 5struct cpu_model_info {
3 int vendor; 6 int vendor;
@@ -36,3 +39,5 @@ extern struct cpu_vendor_dev __x86cpuvendor_start[], __x86cpuvendor_end[];
36 39
37extern int get_model_name(struct cpuinfo_x86 *c); 40extern int get_model_name(struct cpuinfo_x86 *c);
38extern void display_cacheinfo(struct cpuinfo_x86 *c); 41extern void display_cacheinfo(struct cpuinfo_x86 *c);
42
43#endif
diff --git a/arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c b/arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c
index f03e9153618e..965ea52767ac 100644
--- a/arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c
+++ b/arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c
@@ -26,9 +26,10 @@
26#define NFORCE2_SAFE_DISTANCE 50 26#define NFORCE2_SAFE_DISTANCE 50
27 27
28/* Delay in ms between FSB changes */ 28/* Delay in ms between FSB changes */
29//#define NFORCE2_DELAY 10 29/* #define NFORCE2_DELAY 10 */
30 30
31/* nforce2_chipset: 31/*
32 * nforce2_chipset:
32 * FSB is changed using the chipset 33 * FSB is changed using the chipset
33 */ 34 */
34static struct pci_dev *nforce2_chipset_dev; 35static struct pci_dev *nforce2_chipset_dev;
@@ -36,13 +37,13 @@ static struct pci_dev *nforce2_chipset_dev;
36/* fid: 37/* fid:
37 * multiplier * 10 38 * multiplier * 10
38 */ 39 */
39static int fid = 0; 40static int fid;
40 41
41/* min_fsb, max_fsb: 42/* min_fsb, max_fsb:
42 * minimum and maximum FSB (= FSB at boot time) 43 * minimum and maximum FSB (= FSB at boot time)
43 */ 44 */
44static int min_fsb = 0; 45static int min_fsb;
45static int max_fsb = 0; 46static int max_fsb;
46 47
47MODULE_AUTHOR("Sebastian Witt <se.witt@gmx.net>"); 48MODULE_AUTHOR("Sebastian Witt <se.witt@gmx.net>");
48MODULE_DESCRIPTION("nForce2 FSB changing cpufreq driver"); 49MODULE_DESCRIPTION("nForce2 FSB changing cpufreq driver");
@@ -53,7 +54,7 @@ module_param(min_fsb, int, 0444);
53 54
54MODULE_PARM_DESC(fid, "CPU multiplier to use (11.5 = 115)"); 55MODULE_PARM_DESC(fid, "CPU multiplier to use (11.5 = 115)");
55MODULE_PARM_DESC(min_fsb, 56MODULE_PARM_DESC(min_fsb,
56 "Minimum FSB to use, if not defined: current FSB - 50"); 57 "Minimum FSB to use, if not defined: current FSB - 50");
57 58
58#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "cpufreq-nforce2", msg) 59#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "cpufreq-nforce2", msg)
59 60
@@ -139,7 +140,7 @@ static unsigned int nforce2_fsb_read(int bootfsb)
139 140
140 /* Get chipset boot FSB from subdevice 5 (FSB at boot-time) */ 141 /* Get chipset boot FSB from subdevice 5 (FSB at boot-time) */
141 nforce2_sub5 = pci_get_subsys(PCI_VENDOR_ID_NVIDIA, 142 nforce2_sub5 = pci_get_subsys(PCI_VENDOR_ID_NVIDIA,
142 0x01EF,PCI_ANY_ID,PCI_ANY_ID,NULL); 143 0x01EF, PCI_ANY_ID, PCI_ANY_ID, NULL);
143 if (!nforce2_sub5) 144 if (!nforce2_sub5)
144 return 0; 145 return 0;
145 146
@@ -147,13 +148,13 @@ static unsigned int nforce2_fsb_read(int bootfsb)
147 fsb /= 1000000; 148 fsb /= 1000000;
148 149
149 /* Check if PLL register is already set */ 150 /* Check if PLL register is already set */
150 pci_read_config_byte(nforce2_chipset_dev,NFORCE2_PLLENABLE, (u8 *)&temp); 151 pci_read_config_byte(nforce2_chipset_dev, NFORCE2_PLLENABLE, (u8 *)&temp);
151 152
152 if(bootfsb || !temp) 153 if (bootfsb || !temp)
153 return fsb; 154 return fsb;
154 155
155 /* Use PLL register FSB value */ 156 /* Use PLL register FSB value */
156 pci_read_config_dword(nforce2_chipset_dev,NFORCE2_PLLREG, &temp); 157 pci_read_config_dword(nforce2_chipset_dev, NFORCE2_PLLREG, &temp);
157 fsb = nforce2_calc_fsb(temp); 158 fsb = nforce2_calc_fsb(temp);
158 159
159 return fsb; 160 return fsb;
@@ -184,7 +185,7 @@ static int nforce2_set_fsb(unsigned int fsb)
184 } 185 }
185 186
186 /* First write? Then set actual value */ 187 /* First write? Then set actual value */
187 pci_read_config_byte(nforce2_chipset_dev,NFORCE2_PLLENABLE, (u8 *)&temp); 188 pci_read_config_byte(nforce2_chipset_dev, NFORCE2_PLLENABLE, (u8 *)&temp);
188 if (!temp) { 189 if (!temp) {
189 pll = nforce2_calc_pll(tfsb); 190 pll = nforce2_calc_pll(tfsb);
190 191
@@ -210,7 +211,8 @@ static int nforce2_set_fsb(unsigned int fsb)
210 tfsb--; 211 tfsb--;
211 212
212 /* Calculate the PLL reg. value */ 213 /* Calculate the PLL reg. value */
213 if ((pll = nforce2_calc_pll(tfsb)) == -1) 214 pll = nforce2_calc_pll(tfsb);
215 if (pll == -1)
214 return -EINVAL; 216 return -EINVAL;
215 217
216 nforce2_write_pll(pll); 218 nforce2_write_pll(pll);
@@ -249,7 +251,7 @@ static unsigned int nforce2_get(unsigned int cpu)
249static int nforce2_target(struct cpufreq_policy *policy, 251static int nforce2_target(struct cpufreq_policy *policy,
250 unsigned int target_freq, unsigned int relation) 252 unsigned int target_freq, unsigned int relation)
251{ 253{
252// unsigned long flags; 254/* unsigned long flags; */
253 struct cpufreq_freqs freqs; 255 struct cpufreq_freqs freqs;
254 unsigned int target_fsb; 256 unsigned int target_fsb;
255 257
@@ -271,17 +273,17 @@ static int nforce2_target(struct cpufreq_policy *policy,
271 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); 273 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
272 274
273 /* Disable IRQs */ 275 /* Disable IRQs */
274 //local_irq_save(flags); 276 /* local_irq_save(flags); */
275 277
276 if (nforce2_set_fsb(target_fsb) < 0) 278 if (nforce2_set_fsb(target_fsb) < 0)
277 printk(KERN_ERR "cpufreq: Changing FSB to %d failed\n", 279 printk(KERN_ERR "cpufreq: Changing FSB to %d failed\n",
278 target_fsb); 280 target_fsb);
279 else 281 else
280 dprintk("Changed FSB successfully to %d\n", 282 dprintk("Changed FSB successfully to %d\n",
281 target_fsb); 283 target_fsb);
282 284
283 /* Enable IRQs */ 285 /* Enable IRQs */
284 //local_irq_restore(flags); 286 /* local_irq_restore(flags); */
285 287
286 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 288 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
287 289
@@ -302,8 +304,8 @@ static int nforce2_verify(struct cpufreq_policy *policy)
302 policy->max = (fsb_pol_max + 1) * fid * 100; 304 policy->max = (fsb_pol_max + 1) * fid * 100;
303 305
304 cpufreq_verify_within_limits(policy, 306 cpufreq_verify_within_limits(policy,
305 policy->cpuinfo.min_freq, 307 policy->cpuinfo.min_freq,
306 policy->cpuinfo.max_freq); 308 policy->cpuinfo.max_freq);
307 return 0; 309 return 0;
308} 310}
309 311
@@ -347,7 +349,7 @@ static int nforce2_cpu_init(struct cpufreq_policy *policy)
347 /* Set maximum FSB to FSB at boot time */ 349 /* Set maximum FSB to FSB at boot time */
348 max_fsb = nforce2_fsb_read(1); 350 max_fsb = nforce2_fsb_read(1);
349 351
350 if(!max_fsb) 352 if (!max_fsb)
351 return -EIO; 353 return -EIO;
352 354
353 if (!min_fsb) 355 if (!min_fsb)
diff --git a/arch/x86/kernel/cpu/cpufreq/longrun.c b/arch/x86/kernel/cpu/cpufreq/longrun.c
index af4a867a097c..777a7ff075de 100644
--- a/arch/x86/kernel/cpu/cpufreq/longrun.c
+++ b/arch/x86/kernel/cpu/cpufreq/longrun.c
@@ -245,7 +245,7 @@ static unsigned int __init longrun_determine_freqs(unsigned int *low_freq,
245 if ((ecx > 95) || (ecx == 0) || (eax < ebx)) 245 if ((ecx > 95) || (ecx == 0) || (eax < ebx))
246 return -EIO; 246 return -EIO;
247 247
248 edx = (eax - ebx) / (100 - ecx); 248 edx = ((eax - ebx) * 100) / (100 - ecx);
249 *low_freq = edx * 1000; /* back to kHz */ 249 *low_freq = edx * 1000; /* back to kHz */
250 250
251 dprintk("low frequency is %u kHz\n", *low_freq); 251 dprintk("low frequency is %u kHz\n", *low_freq);
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
index 46d4034d9f37..206791eb46e3 100644
--- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
@@ -1127,12 +1127,23 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
1127 * an UP version, and is deprecated by AMD. 1127 * an UP version, and is deprecated by AMD.
1128 */ 1128 */
1129 if (num_online_cpus() != 1) { 1129 if (num_online_cpus() != 1) {
1130 printk(KERN_ERR PFX "MP systems not supported by PSB BIOS structure\n"); 1130#ifndef CONFIG_ACPI_PROCESSOR
1131 printk(KERN_ERR PFX "ACPI Processor support is required "
1132 "for SMP systems but is absent. Please load the "
1133 "ACPI Processor module before starting this "
1134 "driver.\n");
1135#else
1136 printk(KERN_ERR PFX "Your BIOS does not provide ACPI "
1137 "_PSS objects in a way that Linux understands. "
1138 "Please report this to the Linux ACPI maintainers"
1139 " and complain to your BIOS vendor.\n");
1140#endif
1131 kfree(data); 1141 kfree(data);
1132 return -ENODEV; 1142 return -ENODEV;
1133 } 1143 }
1134 if (pol->cpu != 0) { 1144 if (pol->cpu != 0) {
1135 printk(KERN_ERR PFX "No _PSS objects for CPU other than CPU0\n"); 1145 printk(KERN_ERR PFX "No ACPI _PSS objects for CPU other than "
1146 "CPU0. Complain to your BIOS vendor.\n");
1136 kfree(data); 1147 kfree(data);
1137 return -ENODEV; 1148 return -ENODEV;
1138 } 1149 }
diff --git a/arch/x86/kernel/cpu/intel_64.c b/arch/x86/kernel/cpu/intel_64.c
new file mode 100644
index 000000000000..fcb1cc9d75ca
--- /dev/null
+++ b/arch/x86/kernel/cpu/intel_64.c
@@ -0,0 +1,103 @@
1#include <linux/init.h>
2#include <linux/smp.h>
3#include <asm/processor.h>
4#include <asm/ptrace.h>
5#include <asm/topology.h>
6#include <asm/numa_64.h>
7
8#include "cpu.h"
9
10static void __cpuinit early_init_intel(struct cpuinfo_x86 *c)
11{
12 if ((c->x86 == 0xf && c->x86_model >= 0x03) ||
13 (c->x86 == 0x6 && c->x86_model >= 0x0e))
14 set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
15}
16
17/*
18 * find out the number of processor cores on the die
19 */
20static int __cpuinit intel_num_cpu_cores(struct cpuinfo_x86 *c)
21{
22 unsigned int eax, t;
23
24 if (c->cpuid_level < 4)
25 return 1;
26
27 cpuid_count(4, 0, &eax, &t, &t, &t);
28
29 if (eax & 0x1f)
30 return ((eax >> 26) + 1);
31 else
32 return 1;
33}
34
35static void __cpuinit srat_detect_node(void)
36{
37#ifdef CONFIG_NUMA
38 unsigned node;
39 int cpu = smp_processor_id();
40 int apicid = hard_smp_processor_id();
41
42 /* Don't do the funky fallback heuristics the AMD version employs
43 for now. */
44 node = apicid_to_node[apicid];
45 if (node == NUMA_NO_NODE || !node_online(node))
46 node = first_node(node_online_map);
47 numa_set_node(cpu, node);
48
49 printk(KERN_INFO "CPU %d/%x -> Node %d\n", cpu, apicid, node);
50#endif
51}
52
53static void __cpuinit init_intel(struct cpuinfo_x86 *c)
54{
55 /* Cache sizes */
56 unsigned n;
57
58 init_intel_cacheinfo(c);
59 if (c->cpuid_level > 9) {
60 unsigned eax = cpuid_eax(10);
61 /* Check for version and the number of counters */
62 if ((eax & 0xff) && (((eax>>8) & 0xff) > 1))
63 set_cpu_cap(c, X86_FEATURE_ARCH_PERFMON);
64 }
65
66 if (cpu_has_ds) {
67 unsigned int l1, l2;
68 rdmsr(MSR_IA32_MISC_ENABLE, l1, l2);
69 if (!(l1 & (1<<11)))
70 set_cpu_cap(c, X86_FEATURE_BTS);
71 if (!(l1 & (1<<12)))
72 set_cpu_cap(c, X86_FEATURE_PEBS);
73 }
74
75
76 if (cpu_has_bts)
77 ds_init_intel(c);
78
79 n = c->extended_cpuid_level;
80 if (n >= 0x80000008) {
81 unsigned eax = cpuid_eax(0x80000008);
82 c->x86_virt_bits = (eax >> 8) & 0xff;
83 c->x86_phys_bits = eax & 0xff;
84 }
85
86 if (c->x86 == 15)
87 c->x86_cache_alignment = c->x86_clflush_size * 2;
88 if (c->x86 == 6)
89 set_cpu_cap(c, X86_FEATURE_REP_GOOD);
90 set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC);
91 c->x86_max_cores = intel_num_cpu_cores(c);
92
93 srat_detect_node();
94}
95
96static struct cpu_dev intel_cpu_dev __cpuinitdata = {
97 .c_vendor = "Intel",
98 .c_ident = { "GenuineIntel" },
99 .c_early_init = early_init_intel,
100 .c_init = init_intel,
101};
102cpu_vendor_dev_register(X86_VENDOR_INTEL, &intel_cpu_dev);
103
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
index 26d615dcb149..2c8afafa18e8 100644
--- a/arch/x86/kernel/cpu/intel_cacheinfo.c
+++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
@@ -62,6 +62,7 @@ static struct _cache_table cache_table[] __cpuinitdata =
62 { 0x4b, LVL_3, 8192 }, /* 16-way set assoc, 64 byte line size */ 62 { 0x4b, LVL_3, 8192 }, /* 16-way set assoc, 64 byte line size */
63 { 0x4c, LVL_3, 12288 }, /* 12-way set assoc, 64 byte line size */ 63 { 0x4c, LVL_3, 12288 }, /* 12-way set assoc, 64 byte line size */
64 { 0x4d, LVL_3, 16384 }, /* 16-way set assoc, 64 byte line size */ 64 { 0x4d, LVL_3, 16384 }, /* 16-way set assoc, 64 byte line size */
65 { 0x4e, LVL_2, 6144 }, /* 24-way set assoc, 64 byte line size */
65 { 0x60, LVL_1_DATA, 16 }, /* 8-way set assoc, sectored cache, 64 byte line size */ 66 { 0x60, LVL_1_DATA, 16 }, /* 8-way set assoc, sectored cache, 64 byte line size */
66 { 0x66, LVL_1_DATA, 8 }, /* 4-way set assoc, sectored cache, 64 byte line size */ 67 { 0x66, LVL_1_DATA, 8 }, /* 4-way set assoc, sectored cache, 64 byte line size */
67 { 0x67, LVL_1_DATA, 16 }, /* 4-way set assoc, sectored cache, 64 byte line size */ 68 { 0x67, LVL_1_DATA, 16 }, /* 4-way set assoc, sectored cache, 64 byte line size */
diff --git a/arch/x86/kernel/cpu/mcheck/k7.c b/arch/x86/kernel/cpu/mcheck/k7.c
index e633c9c2b764..f390c9f66351 100644
--- a/arch/x86/kernel/cpu/mcheck/k7.c
+++ b/arch/x86/kernel/cpu/mcheck/k7.c
@@ -9,23 +9,23 @@
9#include <linux/interrupt.h> 9#include <linux/interrupt.h>
10#include <linux/smp.h> 10#include <linux/smp.h>
11 11
12#include <asm/processor.h> 12#include <asm/processor.h>
13#include <asm/system.h> 13#include <asm/system.h>
14#include <asm/msr.h> 14#include <asm/msr.h>
15 15
16#include "mce.h" 16#include "mce.h"
17 17
18/* Machine Check Handler For AMD Athlon/Duron */ 18/* Machine Check Handler For AMD Athlon/Duron */
19static void k7_machine_check(struct pt_regs * regs, long error_code) 19static void k7_machine_check(struct pt_regs *regs, long error_code)
20{ 20{
21 int recover=1; 21 int recover = 1;
22 u32 alow, ahigh, high, low; 22 u32 alow, ahigh, high, low;
23 u32 mcgstl, mcgsth; 23 u32 mcgstl, mcgsth;
24 int i; 24 int i;
25 25
26 rdmsr (MSR_IA32_MCG_STATUS, mcgstl, mcgsth); 26 rdmsr(MSR_IA32_MCG_STATUS, mcgstl, mcgsth);
27 if (mcgstl & (1<<0)) /* Recoverable ? */ 27 if (mcgstl & (1<<0)) /* Recoverable ? */
28 recover=0; 28 recover = 0;
29 29
30 printk(KERN_EMERG "CPU %d: Machine Check Exception: %08x%08x\n", 30 printk(KERN_EMERG "CPU %d: Machine Check Exception: %08x%08x\n",
31 smp_processor_id(), mcgsth, mcgstl); 31 smp_processor_id(), mcgsth, mcgstl);
@@ -60,12 +60,12 @@ static void k7_machine_check(struct pt_regs * regs, long error_code)
60 } 60 }
61 61
62 if (recover&2) 62 if (recover&2)
63 panic ("CPU context corrupt"); 63 panic("CPU context corrupt");
64 if (recover&1) 64 if (recover&1)
65 panic ("Unable to continue"); 65 panic("Unable to continue");
66 printk (KERN_EMERG "Attempting to continue.\n"); 66 printk(KERN_EMERG "Attempting to continue.\n");
67 mcgstl &= ~(1<<2); 67 mcgstl &= ~(1<<2);
68 wrmsr (MSR_IA32_MCG_STATUS,mcgstl, mcgsth); 68 wrmsr(MSR_IA32_MCG_STATUS, mcgstl, mcgsth);
69} 69}
70 70
71 71
@@ -81,25 +81,25 @@ void amd_mcheck_init(struct cpuinfo_x86 *c)
81 machine_check_vector = k7_machine_check; 81 machine_check_vector = k7_machine_check;
82 wmb(); 82 wmb();
83 83
84 printk (KERN_INFO "Intel machine check architecture supported.\n"); 84 printk(KERN_INFO "Intel machine check architecture supported.\n");
85 rdmsr (MSR_IA32_MCG_CAP, l, h); 85 rdmsr(MSR_IA32_MCG_CAP, l, h);
86 if (l & (1<<8)) /* Control register present ? */ 86 if (l & (1<<8)) /* Control register present ? */
87 wrmsr (MSR_IA32_MCG_CTL, 0xffffffff, 0xffffffff); 87 wrmsr(MSR_IA32_MCG_CTL, 0xffffffff, 0xffffffff);
88 nr_mce_banks = l & 0xff; 88 nr_mce_banks = l & 0xff;
89 89
90 /* Clear status for MC index 0 separately, we don't touch CTL, 90 /* Clear status for MC index 0 separately, we don't touch CTL,
91 * as some K7 Athlons cause spurious MCEs when its enabled. */ 91 * as some K7 Athlons cause spurious MCEs when its enabled. */
92 if (boot_cpu_data.x86 == 6) { 92 if (boot_cpu_data.x86 == 6) {
93 wrmsr (MSR_IA32_MC0_STATUS, 0x0, 0x0); 93 wrmsr(MSR_IA32_MC0_STATUS, 0x0, 0x0);
94 i = 1; 94 i = 1;
95 } else 95 } else
96 i = 0; 96 i = 0;
97 for (; i<nr_mce_banks; i++) { 97 for (; i < nr_mce_banks; i++) {
98 wrmsr (MSR_IA32_MC0_CTL+4*i, 0xffffffff, 0xffffffff); 98 wrmsr(MSR_IA32_MC0_CTL+4*i, 0xffffffff, 0xffffffff);
99 wrmsr (MSR_IA32_MC0_STATUS+4*i, 0x0, 0x0); 99 wrmsr(MSR_IA32_MC0_STATUS+4*i, 0x0, 0x0);
100 } 100 }
101 101
102 set_in_cr4 (X86_CR4_MCE); 102 set_in_cr4(X86_CR4_MCE);
103 printk (KERN_INFO "Intel machine check reporting enabled on CPU#%d.\n", 103 printk(KERN_INFO "Intel machine check reporting enabled on CPU#%d.\n",
104 smp_processor_id()); 104 smp_processor_id());
105} 105}
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c
index e07e8c068ae0..501ca1cea27d 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_64.c
@@ -31,7 +31,7 @@
31#include <asm/idle.h> 31#include <asm/idle.h>
32 32
33#define MISC_MCELOG_MINOR 227 33#define MISC_MCELOG_MINOR 227
34#define NR_BANKS 6 34#define NR_SYSFS_BANKS 6
35 35
36atomic_t mce_entry; 36atomic_t mce_entry;
37 37
@@ -46,7 +46,7 @@ static int mce_dont_init;
46 */ 46 */
47static int tolerant = 1; 47static int tolerant = 1;
48static int banks; 48static int banks;
49static unsigned long bank[NR_BANKS] = { [0 ... NR_BANKS-1] = ~0UL }; 49static unsigned long bank[NR_SYSFS_BANKS] = { [0 ... NR_SYSFS_BANKS-1] = ~0UL };
50static unsigned long notify_user; 50static unsigned long notify_user;
51static int rip_msr; 51static int rip_msr;
52static int mce_bootlog = -1; 52static int mce_bootlog = -1;
@@ -209,7 +209,7 @@ void do_machine_check(struct pt_regs * regs, long error_code)
209 barrier(); 209 barrier();
210 210
211 for (i = 0; i < banks; i++) { 211 for (i = 0; i < banks; i++) {
212 if (!bank[i]) 212 if (i < NR_SYSFS_BANKS && !bank[i])
213 continue; 213 continue;
214 214
215 m.misc = 0; 215 m.misc = 0;
@@ -444,9 +444,10 @@ static void mce_init(void *dummy)
444 444
445 rdmsrl(MSR_IA32_MCG_CAP, cap); 445 rdmsrl(MSR_IA32_MCG_CAP, cap);
446 banks = cap & 0xff; 446 banks = cap & 0xff;
447 if (banks > NR_BANKS) { 447 if (banks > MCE_EXTENDED_BANK) {
448 printk(KERN_INFO "MCE: warning: using only %d banks\n", banks); 448 banks = MCE_EXTENDED_BANK;
449 banks = NR_BANKS; 449 printk(KERN_INFO "MCE: warning: using only %d banks\n",
450 MCE_EXTENDED_BANK);
450 } 451 }
451 /* Use accurate RIP reporting if available. */ 452 /* Use accurate RIP reporting if available. */
452 if ((cap & (1<<9)) && ((cap >> 16) & 0xff) >= 9) 453 if ((cap & (1<<9)) && ((cap >> 16) & 0xff) >= 9)
@@ -462,7 +463,11 @@ static void mce_init(void *dummy)
462 wrmsr(MSR_IA32_MCG_CTL, 0xffffffff, 0xffffffff); 463 wrmsr(MSR_IA32_MCG_CTL, 0xffffffff, 0xffffffff);
463 464
464 for (i = 0; i < banks; i++) { 465 for (i = 0; i < banks; i++) {
465 wrmsrl(MSR_IA32_MC0_CTL+4*i, bank[i]); 466 if (i < NR_SYSFS_BANKS)
467 wrmsrl(MSR_IA32_MC0_CTL+4*i, bank[i]);
468 else
469 wrmsrl(MSR_IA32_MC0_CTL+4*i, ~0UL);
470
466 wrmsrl(MSR_IA32_MC0_STATUS+4*i, 0); 471 wrmsrl(MSR_IA32_MC0_STATUS+4*i, 0);
467 } 472 }
468} 473}
@@ -766,7 +771,10 @@ DEFINE_PER_CPU(struct sys_device, device_mce);
766 } \ 771 } \
767 static SYSDEV_ATTR(name, 0644, show_ ## name, set_ ## name); 772 static SYSDEV_ATTR(name, 0644, show_ ## name, set_ ## name);
768 773
769/* TBD should generate these dynamically based on number of available banks */ 774/*
775 * TBD should generate these dynamically based on number of available banks.
776 * Have only 6 contol banks in /sysfs until then.
777 */
770ACCESSOR(bank0ctl,bank[0],mce_restart()) 778ACCESSOR(bank0ctl,bank[0],mce_restart())
771ACCESSOR(bank1ctl,bank[1],mce_restart()) 779ACCESSOR(bank1ctl,bank[1],mce_restart())
772ACCESSOR(bank2ctl,bank[2],mce_restart()) 780ACCESSOR(bank2ctl,bank[2],mce_restart())
diff --git a/arch/x86/kernel/cpu/mcheck/p4.c b/arch/x86/kernel/cpu/mcheck/p4.c
index cb03345554a5..eef001ad3bde 100644
--- a/arch/x86/kernel/cpu/mcheck/p4.c
+++ b/arch/x86/kernel/cpu/mcheck/p4.c
@@ -8,7 +8,7 @@
8#include <linux/interrupt.h> 8#include <linux/interrupt.h>
9#include <linux/smp.h> 9#include <linux/smp.h>
10 10
11#include <asm/processor.h> 11#include <asm/processor.h>
12#include <asm/system.h> 12#include <asm/system.h>
13#include <asm/msr.h> 13#include <asm/msr.h>
14#include <asm/apic.h> 14#include <asm/apic.h>
@@ -32,12 +32,12 @@ struct intel_mce_extended_msrs {
32 /* u32 *reserved[]; */ 32 /* u32 *reserved[]; */
33}; 33};
34 34
35static int mce_num_extended_msrs = 0; 35static int mce_num_extended_msrs;
36 36
37 37
38#ifdef CONFIG_X86_MCE_P4THERMAL 38#ifdef CONFIG_X86_MCE_P4THERMAL
39static void unexpected_thermal_interrupt(struct pt_regs *regs) 39static void unexpected_thermal_interrupt(struct pt_regs *regs)
40{ 40{
41 printk(KERN_ERR "CPU%d: Unexpected LVT TMR interrupt!\n", 41 printk(KERN_ERR "CPU%d: Unexpected LVT TMR interrupt!\n",
42 smp_processor_id()); 42 smp_processor_id());
43 add_taint(TAINT_MACHINE_CHECK); 43 add_taint(TAINT_MACHINE_CHECK);
@@ -83,7 +83,7 @@ static void intel_init_thermal(struct cpuinfo_x86 *c)
83 * be some SMM goo which handles it, so we can't even put a handler 83 * be some SMM goo which handles it, so we can't even put a handler
84 * since it might be delivered via SMI already -zwanem. 84 * since it might be delivered via SMI already -zwanem.
85 */ 85 */
86 rdmsr (MSR_IA32_MISC_ENABLE, l, h); 86 rdmsr(MSR_IA32_MISC_ENABLE, l, h);
87 h = apic_read(APIC_LVTTHMR); 87 h = apic_read(APIC_LVTTHMR);
88 if ((l & (1<<3)) && (h & APIC_DM_SMI)) { 88 if ((l & (1<<3)) && (h & APIC_DM_SMI)) {
89 printk(KERN_DEBUG "CPU%d: Thermal monitoring handled by SMI\n", 89 printk(KERN_DEBUG "CPU%d: Thermal monitoring handled by SMI\n",
@@ -91,7 +91,7 @@ static void intel_init_thermal(struct cpuinfo_x86 *c)
91 return; /* -EBUSY */ 91 return; /* -EBUSY */
92 } 92 }
93 93
94 /* check whether a vector already exists, temporarily masked? */ 94 /* check whether a vector already exists, temporarily masked? */
95 if (h & APIC_VECTOR_MASK) { 95 if (h & APIC_VECTOR_MASK) {
96 printk(KERN_DEBUG "CPU%d: Thermal LVT vector (%#x) already " 96 printk(KERN_DEBUG "CPU%d: Thermal LVT vector (%#x) already "
97 "installed\n", 97 "installed\n",
@@ -104,18 +104,18 @@ static void intel_init_thermal(struct cpuinfo_x86 *c)
104 h |= (APIC_DM_FIXED | APIC_LVT_MASKED); /* we'll mask till we're ready */ 104 h |= (APIC_DM_FIXED | APIC_LVT_MASKED); /* we'll mask till we're ready */
105 apic_write_around(APIC_LVTTHMR, h); 105 apic_write_around(APIC_LVTTHMR, h);
106 106
107 rdmsr (MSR_IA32_THERM_INTERRUPT, l, h); 107 rdmsr(MSR_IA32_THERM_INTERRUPT, l, h);
108 wrmsr (MSR_IA32_THERM_INTERRUPT, l | 0x03 , h); 108 wrmsr(MSR_IA32_THERM_INTERRUPT, l | 0x03 , h);
109 109
110 /* ok we're good to go... */ 110 /* ok we're good to go... */
111 vendor_thermal_interrupt = intel_thermal_interrupt; 111 vendor_thermal_interrupt = intel_thermal_interrupt;
112
113 rdmsr (MSR_IA32_MISC_ENABLE, l, h);
114 wrmsr (MSR_IA32_MISC_ENABLE, l | (1<<3), h);
115 112
116 l = apic_read (APIC_LVTTHMR); 113 rdmsr(MSR_IA32_MISC_ENABLE, l, h);
117 apic_write_around (APIC_LVTTHMR, l & ~APIC_LVT_MASKED); 114 wrmsr(MSR_IA32_MISC_ENABLE, l | (1<<3), h);
118 printk (KERN_INFO "CPU%d: Thermal monitoring enabled\n", cpu); 115
116 l = apic_read(APIC_LVTTHMR);
117 apic_write_around(APIC_LVTTHMR, l & ~APIC_LVT_MASKED);
118 printk(KERN_INFO "CPU%d: Thermal monitoring enabled\n", cpu);
119 119
120 /* enable thermal throttle processing */ 120 /* enable thermal throttle processing */
121 atomic_set(&therm_throt_en, 1); 121 atomic_set(&therm_throt_en, 1);
@@ -129,28 +129,28 @@ static inline void intel_get_extended_msrs(struct intel_mce_extended_msrs *r)
129{ 129{
130 u32 h; 130 u32 h;
131 131
132 rdmsr (MSR_IA32_MCG_EAX, r->eax, h); 132 rdmsr(MSR_IA32_MCG_EAX, r->eax, h);
133 rdmsr (MSR_IA32_MCG_EBX, r->ebx, h); 133 rdmsr(MSR_IA32_MCG_EBX, r->ebx, h);
134 rdmsr (MSR_IA32_MCG_ECX, r->ecx, h); 134 rdmsr(MSR_IA32_MCG_ECX, r->ecx, h);
135 rdmsr (MSR_IA32_MCG_EDX, r->edx, h); 135 rdmsr(MSR_IA32_MCG_EDX, r->edx, h);
136 rdmsr (MSR_IA32_MCG_ESI, r->esi, h); 136 rdmsr(MSR_IA32_MCG_ESI, r->esi, h);
137 rdmsr (MSR_IA32_MCG_EDI, r->edi, h); 137 rdmsr(MSR_IA32_MCG_EDI, r->edi, h);
138 rdmsr (MSR_IA32_MCG_EBP, r->ebp, h); 138 rdmsr(MSR_IA32_MCG_EBP, r->ebp, h);
139 rdmsr (MSR_IA32_MCG_ESP, r->esp, h); 139 rdmsr(MSR_IA32_MCG_ESP, r->esp, h);
140 rdmsr (MSR_IA32_MCG_EFLAGS, r->eflags, h); 140 rdmsr(MSR_IA32_MCG_EFLAGS, r->eflags, h);
141 rdmsr (MSR_IA32_MCG_EIP, r->eip, h); 141 rdmsr(MSR_IA32_MCG_EIP, r->eip, h);
142} 142}
143 143
144static void intel_machine_check(struct pt_regs * regs, long error_code) 144static void intel_machine_check(struct pt_regs *regs, long error_code)
145{ 145{
146 int recover=1; 146 int recover = 1;
147 u32 alow, ahigh, high, low; 147 u32 alow, ahigh, high, low;
148 u32 mcgstl, mcgsth; 148 u32 mcgstl, mcgsth;
149 int i; 149 int i;
150 150
151 rdmsr (MSR_IA32_MCG_STATUS, mcgstl, mcgsth); 151 rdmsr(MSR_IA32_MCG_STATUS, mcgstl, mcgsth);
152 if (mcgstl & (1<<0)) /* Recoverable ? */ 152 if (mcgstl & (1<<0)) /* Recoverable ? */
153 recover=0; 153 recover = 0;
154 154
155 printk(KERN_EMERG "CPU %d: Machine Check Exception: %08x%08x\n", 155 printk(KERN_EMERG "CPU %d: Machine Check Exception: %08x%08x\n",
156 smp_processor_id(), mcgsth, mcgstl); 156 smp_processor_id(), mcgsth, mcgstl);
@@ -191,20 +191,20 @@ static void intel_machine_check(struct pt_regs * regs, long error_code)
191 } 191 }
192 192
193 if (recover & 2) 193 if (recover & 2)
194 panic ("CPU context corrupt"); 194 panic("CPU context corrupt");
195 if (recover & 1) 195 if (recover & 1)
196 panic ("Unable to continue"); 196 panic("Unable to continue");
197 197
198 printk(KERN_EMERG "Attempting to continue.\n"); 198 printk(KERN_EMERG "Attempting to continue.\n");
199 /* 199 /*
200 * Do not clear the MSR_IA32_MCi_STATUS if the error is not 200 * Do not clear the MSR_IA32_MCi_STATUS if the error is not
201 * recoverable/continuable.This will allow BIOS to look at the MSRs 201 * recoverable/continuable.This will allow BIOS to look at the MSRs
202 * for errors if the OS could not log the error. 202 * for errors if the OS could not log the error.
203 */ 203 */
204 for (i=0; i<nr_mce_banks; i++) { 204 for (i = 0; i < nr_mce_banks; i++) {
205 u32 msr; 205 u32 msr;
206 msr = MSR_IA32_MC0_STATUS+i*4; 206 msr = MSR_IA32_MC0_STATUS+i*4;
207 rdmsr (msr, low, high); 207 rdmsr(msr, low, high);
208 if (high&(1<<31)) { 208 if (high&(1<<31)) {
209 /* Clear it */ 209 /* Clear it */
210 wrmsr(msr, 0UL, 0UL); 210 wrmsr(msr, 0UL, 0UL);
@@ -214,7 +214,7 @@ static void intel_machine_check(struct pt_regs * regs, long error_code)
214 } 214 }
215 } 215 }
216 mcgstl &= ~(1<<2); 216 mcgstl &= ~(1<<2);
217 wrmsr (MSR_IA32_MCG_STATUS,mcgstl, mcgsth); 217 wrmsr(MSR_IA32_MCG_STATUS, mcgstl, mcgsth);
218} 218}
219 219
220 220
@@ -222,30 +222,30 @@ void intel_p4_mcheck_init(struct cpuinfo_x86 *c)
222{ 222{
223 u32 l, h; 223 u32 l, h;
224 int i; 224 int i;
225 225
226 machine_check_vector = intel_machine_check; 226 machine_check_vector = intel_machine_check;
227 wmb(); 227 wmb();
228 228
229 printk (KERN_INFO "Intel machine check architecture supported.\n"); 229 printk(KERN_INFO "Intel machine check architecture supported.\n");
230 rdmsr (MSR_IA32_MCG_CAP, l, h); 230 rdmsr(MSR_IA32_MCG_CAP, l, h);
231 if (l & (1<<8)) /* Control register present ? */ 231 if (l & (1<<8)) /* Control register present ? */
232 wrmsr (MSR_IA32_MCG_CTL, 0xffffffff, 0xffffffff); 232 wrmsr(MSR_IA32_MCG_CTL, 0xffffffff, 0xffffffff);
233 nr_mce_banks = l & 0xff; 233 nr_mce_banks = l & 0xff;
234 234
235 for (i=0; i<nr_mce_banks; i++) { 235 for (i = 0; i < nr_mce_banks; i++) {
236 wrmsr (MSR_IA32_MC0_CTL+4*i, 0xffffffff, 0xffffffff); 236 wrmsr(MSR_IA32_MC0_CTL+4*i, 0xffffffff, 0xffffffff);
237 wrmsr (MSR_IA32_MC0_STATUS+4*i, 0x0, 0x0); 237 wrmsr(MSR_IA32_MC0_STATUS+4*i, 0x0, 0x0);
238 } 238 }
239 239
240 set_in_cr4 (X86_CR4_MCE); 240 set_in_cr4(X86_CR4_MCE);
241 printk (KERN_INFO "Intel machine check reporting enabled on CPU#%d.\n", 241 printk(KERN_INFO "Intel machine check reporting enabled on CPU#%d.\n",
242 smp_processor_id()); 242 smp_processor_id());
243 243
244 /* Check for P4/Xeon extended MCE MSRs */ 244 /* Check for P4/Xeon extended MCE MSRs */
245 rdmsr (MSR_IA32_MCG_CAP, l, h); 245 rdmsr(MSR_IA32_MCG_CAP, l, h);
246 if (l & (1<<9)) {/* MCG_EXT_P */ 246 if (l & (1<<9)) {/* MCG_EXT_P */
247 mce_num_extended_msrs = (l >> 16) & 0xff; 247 mce_num_extended_msrs = (l >> 16) & 0xff;
248 printk (KERN_INFO "CPU%d: Intel P4/Xeon Extended MCE MSRs (%d)" 248 printk(KERN_INFO "CPU%d: Intel P4/Xeon Extended MCE MSRs (%d)"
249 " available\n", 249 " available\n",
250 smp_processor_id(), mce_num_extended_msrs); 250 smp_processor_id(), mce_num_extended_msrs);
251 251
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
index 9f51e1ea9e82..84fd9f2a28ff 100644
--- a/arch/x86/kernel/early-quirks.c
+++ b/arch/x86/kernel/early-quirks.c
@@ -98,17 +98,6 @@ static void __init nvidia_bugs(int num, int slot, int func)
98 98
99} 99}
100 100
101static void __init ati_bugs(int num, int slot, int func)
102{
103#ifdef CONFIG_X86_IO_APIC
104 if (timer_over_8254 == 1) {
105 timer_over_8254 = 0;
106 printk(KERN_INFO
107 "ATI board detected. Disabling timer routing over 8254.\n");
108 }
109#endif
110}
111
112#define QFLAG_APPLY_ONCE 0x1 101#define QFLAG_APPLY_ONCE 0x1
113#define QFLAG_APPLIED 0x2 102#define QFLAG_APPLIED 0x2
114#define QFLAG_DONE (QFLAG_APPLY_ONCE|QFLAG_APPLIED) 103#define QFLAG_DONE (QFLAG_APPLY_ONCE|QFLAG_APPLIED)
@@ -126,8 +115,6 @@ static struct chipset early_qrk[] __initdata = {
126 PCI_CLASS_BRIDGE_PCI, PCI_ANY_ID, QFLAG_APPLY_ONCE, nvidia_bugs }, 115 PCI_CLASS_BRIDGE_PCI, PCI_ANY_ID, QFLAG_APPLY_ONCE, nvidia_bugs },
127 { PCI_VENDOR_ID_VIA, PCI_ANY_ID, 116 { PCI_VENDOR_ID_VIA, PCI_ANY_ID,
128 PCI_CLASS_BRIDGE_PCI, PCI_ANY_ID, QFLAG_APPLY_ONCE, via_bugs }, 117 PCI_CLASS_BRIDGE_PCI, PCI_ANY_ID, QFLAG_APPLY_ONCE, via_bugs },
129 { PCI_VENDOR_ID_ATI, PCI_ANY_ID,
130 PCI_CLASS_BRIDGE_PCI, PCI_ANY_ID, QFLAG_APPLY_ONCE, ati_bugs },
131 { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_K8_NB, 118 { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_K8_NB,
132 PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, fix_hypertransport_config }, 119 PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, fix_hypertransport_config },
133 {} 120 {}
diff --git a/arch/x86/kernel/efi_32.c b/arch/x86/kernel/efi_32.c
index 5d23d85624d4..4b63c8e1f13b 100644
--- a/arch/x86/kernel/efi_32.c
+++ b/arch/x86/kernel/efi_32.c
@@ -49,13 +49,13 @@ void efi_call_phys_prelog(void)
49 local_irq_save(efi_rt_eflags); 49 local_irq_save(efi_rt_eflags);
50 50
51 /* 51 /*
52 * If I don't have PSE, I should just duplicate two entries in page 52 * If I don't have PAE, I should just duplicate two entries in page
53 * directory. If I have PSE, I just need to duplicate one entry in 53 * directory. If I have PAE, I just need to duplicate one entry in
54 * page directory. 54 * page directory.
55 */ 55 */
56 cr4 = read_cr4(); 56 cr4 = read_cr4();
57 57
58 if (cr4 & X86_CR4_PSE) { 58 if (cr4 & X86_CR4_PAE) {
59 efi_bak_pg_dir_pointer[0].pgd = 59 efi_bak_pg_dir_pointer[0].pgd =
60 swapper_pg_dir[pgd_index(0)].pgd; 60 swapper_pg_dir[pgd_index(0)].pgd;
61 swapper_pg_dir[0].pgd = 61 swapper_pg_dir[0].pgd =
@@ -93,7 +93,7 @@ void efi_call_phys_epilog(void)
93 93
94 cr4 = read_cr4(); 94 cr4 = read_cr4();
95 95
96 if (cr4 & X86_CR4_PSE) { 96 if (cr4 & X86_CR4_PAE) {
97 swapper_pg_dir[pgd_index(0)].pgd = 97 swapper_pg_dir[pgd_index(0)].pgd =
98 efi_bak_pg_dir_pointer[0].pgd; 98 efi_bak_pg_dir_pointer[0].pgd;
99 } else { 99 } else {
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index 2a609dc3271c..c778e4fa55a2 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -248,6 +248,7 @@ ENTRY(resume_userspace)
248 DISABLE_INTERRUPTS(CLBR_ANY) # make sure we don't miss an interrupt 248 DISABLE_INTERRUPTS(CLBR_ANY) # make sure we don't miss an interrupt
249 # setting need_resched or sigpending 249 # setting need_resched or sigpending
250 # between sampling and the iret 250 # between sampling and the iret
251 TRACE_IRQS_OFF
251 movl TI_flags(%ebp), %ecx 252 movl TI_flags(%ebp), %ecx
252 andl $_TIF_WORK_MASK, %ecx # is there any work to be done on 253 andl $_TIF_WORK_MASK, %ecx # is there any work to be done on
253 # int/exception return? 254 # int/exception return?
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
index 556a8df522a7..5cf0aa993f4f 100644
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -420,7 +420,6 @@ END(\label)
420 PTREGSCALL stub_clone, sys_clone, %r8 420 PTREGSCALL stub_clone, sys_clone, %r8
421 PTREGSCALL stub_fork, sys_fork, %rdi 421 PTREGSCALL stub_fork, sys_fork, %rdi
422 PTREGSCALL stub_vfork, sys_vfork, %rdi 422 PTREGSCALL stub_vfork, sys_vfork, %rdi
423 PTREGSCALL stub_rt_sigsuspend, sys_rt_sigsuspend, %rdx
424 PTREGSCALL stub_sigaltstack, sys_sigaltstack, %rdx 423 PTREGSCALL stub_sigaltstack, sys_sigaltstack, %rdx
425 PTREGSCALL stub_iopl, sys_iopl, %rsi 424 PTREGSCALL stub_iopl, sys_iopl, %rsi
426 425
@@ -1120,10 +1119,6 @@ ENTRY(coprocessor_segment_overrun)
1120 zeroentry do_coprocessor_segment_overrun 1119 zeroentry do_coprocessor_segment_overrun
1121END(coprocessor_segment_overrun) 1120END(coprocessor_segment_overrun)
1122 1121
1123ENTRY(reserved)
1124 zeroentry do_reserved
1125END(reserved)
1126
1127 /* runs on exception stack */ 1122 /* runs on exception stack */
1128ENTRY(double_fault) 1123ENTRY(double_fault)
1129 XCPT_FRAME 1124 XCPT_FRAME
diff --git a/arch/x86/kernel/geode_32.c b/arch/x86/kernel/geode_32.c
index e8edd63ab000..9b08e852fd1a 100644
--- a/arch/x86/kernel/geode_32.c
+++ b/arch/x86/kernel/geode_32.c
@@ -166,6 +166,8 @@ int geode_has_vsa2(void)
166 static int has_vsa2 = -1; 166 static int has_vsa2 = -1;
167 167
168 if (has_vsa2 == -1) { 168 if (has_vsa2 == -1) {
169 u16 val;
170
169 /* 171 /*
170 * The VSA has virtual registers that we can query for a 172 * The VSA has virtual registers that we can query for a
171 * signature. 173 * signature.
@@ -173,7 +175,8 @@ int geode_has_vsa2(void)
173 outw(VSA_VR_UNLOCK, VSA_VRC_INDEX); 175 outw(VSA_VR_UNLOCK, VSA_VRC_INDEX);
174 outw(VSA_VR_SIGNATURE, VSA_VRC_INDEX); 176 outw(VSA_VR_SIGNATURE, VSA_VRC_INDEX);
175 177
176 has_vsa2 = (inw(VSA_VRC_DATA) == VSA_SIG); 178 val = inw(VSA_VRC_DATA);
179 has_vsa2 = (val == AMD_VSA_SIG || val == GSW_VSA_SIG);
177 } 180 }
178 181
179 return has_vsa2; 182 return has_vsa2;
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index b2cc73768a9d..f7357cc0162c 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86/kernel/head_32.S
@@ -189,7 +189,7 @@ default_entry:
189 * this stage. 189 * this stage.
190 */ 190 */
191 191
192#define KPMDS ((0x100000000-__PAGE_OFFSET) >> 30) /* Number of kernel PMDs */ 192#define KPMDS (((-__PAGE_OFFSET) >> 30) & 3) /* Number of kernel PMDs */
193 193
194 xorl %ebx,%ebx /* %ebx is kept at zero */ 194 xorl %ebx,%ebx /* %ebx is kept at zero */
195 195
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
index 10a1955bb1d1..263b9d14753e 100644
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -18,6 +18,7 @@
18#include <asm/page.h> 18#include <asm/page.h>
19#include <asm/msr.h> 19#include <asm/msr.h>
20#include <asm/cache.h> 20#include <asm/cache.h>
21#include <asm/processor-flags.h>
21 22
22#ifdef CONFIG_PARAVIRT 23#ifdef CONFIG_PARAVIRT
23#include <asm/asm-offsets.h> 24#include <asm/asm-offsets.h>
@@ -128,7 +129,7 @@ ident_complete:
128 /* Fixup phys_base */ 129 /* Fixup phys_base */
129 addq %rbp, phys_base(%rip) 130 addq %rbp, phys_base(%rip)
130 131
131#ifdef CONFIG_SMP 132#ifdef CONFIG_X86_TRAMPOLINE
132 addq %rbp, trampoline_level4_pgt + 0(%rip) 133 addq %rbp, trampoline_level4_pgt + 0(%rip)
133 addq %rbp, trampoline_level4_pgt + (511*8)(%rip) 134 addq %rbp, trampoline_level4_pgt + (511*8)(%rip)
134#endif 135#endif
@@ -154,9 +155,7 @@ ENTRY(secondary_startup_64)
154 */ 155 */
155 156
156 /* Enable PAE mode and PGE */ 157 /* Enable PAE mode and PGE */
157 xorq %rax, %rax 158 movl $(X86_CR4_PAE | X86_CR4_PGE), %eax
158 btsq $5, %rax
159 btsq $7, %rax
160 movq %rax, %cr4 159 movq %rax, %cr4
161 160
162 /* Setup early boot stage 4 level pagetables. */ 161 /* Setup early boot stage 4 level pagetables. */
@@ -184,14 +183,10 @@ ENTRY(secondary_startup_64)
1841: wrmsr /* Make changes effective */ 1831: wrmsr /* Make changes effective */
185 184
186 /* Setup cr0 */ 185 /* Setup cr0 */
187#define CR0_PM 1 /* protected mode */ 186#define CR0_STATE (X86_CR0_PE | X86_CR0_MP | X86_CR0_ET | \
188#define CR0_MP (1<<1) 187 X86_CR0_NE | X86_CR0_WP | X86_CR0_AM | \
189#define CR0_ET (1<<4) 188 X86_CR0_PG)
190#define CR0_NE (1<<5) 189 movl $CR0_STATE, %eax
191#define CR0_WP (1<<16)
192#define CR0_AM (1<<18)
193#define CR0_PAGING (1<<31)
194 movl $CR0_PM|CR0_MP|CR0_ET|CR0_NE|CR0_WP|CR0_AM|CR0_PAGING,%eax
195 /* Make changes effective */ 190 /* Make changes effective */
196 movq %rax, %cr0 191 movq %rax, %cr0
197 192
@@ -327,11 +322,11 @@ early_idt_ripmsg:
327ENTRY(name) 322ENTRY(name)
328 323
329/* Automate the creation of 1 to 1 mapping pmd entries */ 324/* Automate the creation of 1 to 1 mapping pmd entries */
330#define PMDS(START, PERM, COUNT) \ 325#define PMDS(START, PERM, COUNT) \
331 i = 0 ; \ 326 i = 0 ; \
332 .rept (COUNT) ; \ 327 .rept (COUNT) ; \
333 .quad (START) + (i << 21) + (PERM) ; \ 328 .quad (START) + (i << PMD_SHIFT) + (PERM) ; \
334 i = i + 1 ; \ 329 i = i + 1 ; \
335 .endr 330 .endr
336 331
337 /* 332 /*
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index 9b5cfcdfc426..ea230ec69057 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -17,7 +17,7 @@
17 17
18/* FSEC = 10^-15 18/* FSEC = 10^-15
19 NSEC = 10^-9 */ 19 NSEC = 10^-9 */
20#define FSEC_PER_NSEC 1000000 20#define FSEC_PER_NSEC 1000000L
21 21
22/* 22/*
23 * HPET address is set in acpi/boot.c, when an ACPI entry exists 23 * HPET address is set in acpi/boot.c, when an ACPI entry exists
@@ -206,20 +206,19 @@ static void hpet_enable_legacy_int(void)
206 206
207static void hpet_legacy_clockevent_register(void) 207static void hpet_legacy_clockevent_register(void)
208{ 208{
209 uint64_t hpet_freq;
210
211 /* Start HPET legacy interrupts */ 209 /* Start HPET legacy interrupts */
212 hpet_enable_legacy_int(); 210 hpet_enable_legacy_int();
213 211
214 /* 212 /*
215 * The period is a femto seconds value. We need to calculate the 213 * The mult factor is defined as (include/linux/clockchips.h)
216 * scaled math multiplication factor for nanosecond to hpet tick 214 * mult/2^shift = cyc/ns (in contrast to ns/cyc in clocksource.h)
217 * conversion. 215 * hpet_period is in units of femtoseconds (per cycle), so
216 * mult/2^shift = cyc/ns = 10^6/hpet_period
217 * mult = (10^6 * 2^shift)/hpet_period
218 * mult = (FSEC_PER_NSEC << hpet_clockevent.shift)/hpet_period
218 */ 219 */
219 hpet_freq = 1000000000000000ULL; 220 hpet_clockevent.mult = div_sc((unsigned long) FSEC_PER_NSEC,
220 do_div(hpet_freq, hpet_period); 221 hpet_period, hpet_clockevent.shift);
221 hpet_clockevent.mult = div_sc((unsigned long) hpet_freq,
222 NSEC_PER_SEC, hpet_clockevent.shift);
223 /* Calculate the min / max delta */ 222 /* Calculate the min / max delta */
224 hpet_clockevent.max_delta_ns = clockevent_delta2ns(0x7FFFFFFF, 223 hpet_clockevent.max_delta_ns = clockevent_delta2ns(0x7FFFFFFF,
225 &hpet_clockevent); 224 &hpet_clockevent);
@@ -324,7 +323,7 @@ static struct clocksource clocksource_hpet = {
324 323
325static int hpet_clocksource_register(void) 324static int hpet_clocksource_register(void)
326{ 325{
327 u64 tmp, start, now; 326 u64 start, now;
328 cycle_t t1; 327 cycle_t t1;
329 328
330 /* Start the counter */ 329 /* Start the counter */
@@ -351,21 +350,15 @@ static int hpet_clocksource_register(void)
351 return -ENODEV; 350 return -ENODEV;
352 } 351 }
353 352
354 /* Initialize and register HPET clocksource 353 /*
355 * 354 * The definition of mult is (include/linux/clocksource.h)
356 * hpet period is in femto seconds per cycle 355 * mult/2^shift = ns/cyc and hpet_period is in units of fsec/cyc
357 * so we need to convert this to ns/cyc units 356 * so we first need to convert hpet_period to ns/cyc units:
358 * approximated by mult/2^shift 357 * mult/2^shift = ns/cyc = hpet_period/10^6
359 * 358 * mult = (hpet_period * 2^shift)/10^6
360 * fsec/cyc * 1nsec/1000000fsec = nsec/cyc = mult/2^shift 359 * mult = (hpet_period << shift)/FSEC_PER_NSEC
361 * fsec/cyc * 1ns/1000000fsec * 2^shift = mult
362 * fsec/cyc * 2^shift * 1nsec/1000000fsec = mult
363 * (fsec/cyc << shift)/1000000 = mult
364 * (hpet_period << shift)/FSEC_PER_NSEC = mult
365 */ 360 */
366 tmp = (u64)hpet_period << HPET_SHIFT; 361 clocksource_hpet.mult = div_sc(hpet_period, FSEC_PER_NSEC, HPET_SHIFT);
367 do_div(tmp, FSEC_PER_NSEC);
368 clocksource_hpet.mult = (u32)tmp;
369 362
370 clocksource_register(&clocksource_hpet); 363 clocksource_register(&clocksource_hpet);
371 364
diff --git a/arch/x86/kernel/i387.c b/arch/x86/kernel/i387.c
index e03cc952f233..95e80e5033c3 100644
--- a/arch/x86/kernel/i387.c
+++ b/arch/x86/kernel/i387.c
@@ -56,6 +56,11 @@ void __cpuinit mxcsr_feature_mask_init(void)
56 56
57void __init init_thread_xstate(void) 57void __init init_thread_xstate(void)
58{ 58{
59 if (!HAVE_HWFP) {
60 xstate_size = sizeof(struct i387_soft_struct);
61 return;
62 }
63
59 if (cpu_has_fxsr) 64 if (cpu_has_fxsr)
60 xstate_size = sizeof(struct i387_fxsave_struct); 65 xstate_size = sizeof(struct i387_fxsave_struct);
61#ifdef CONFIG_X86_32 66#ifdef CONFIG_X86_32
@@ -94,7 +99,7 @@ void __cpuinit fpu_init(void)
94int init_fpu(struct task_struct *tsk) 99int init_fpu(struct task_struct *tsk)
95{ 100{
96 if (tsk_used_math(tsk)) { 101 if (tsk_used_math(tsk)) {
97 if (tsk == current) 102 if (HAVE_HWFP && tsk == current)
98 unlazy_fpu(tsk); 103 unlazy_fpu(tsk);
99 return 0; 104 return 0;
100 } 105 }
@@ -109,6 +114,15 @@ int init_fpu(struct task_struct *tsk)
109 return -ENOMEM; 114 return -ENOMEM;
110 } 115 }
111 116
117#ifdef CONFIG_X86_32
118 if (!HAVE_HWFP) {
119 memset(tsk->thread.xstate, 0, xstate_size);
120 finit();
121 set_stopped_child_used_math(tsk);
122 return 0;
123 }
124#endif
125
112 if (cpu_has_fxsr) { 126 if (cpu_has_fxsr) {
113 struct i387_fxsave_struct *fx = &tsk->thread.xstate->fxsave; 127 struct i387_fxsave_struct *fx = &tsk->thread.xstate->fxsave;
114 128
@@ -148,7 +162,7 @@ int xfpregs_get(struct task_struct *target, const struct user_regset *regset,
148 int ret; 162 int ret;
149 163
150 if (!cpu_has_fxsr) 164 if (!cpu_has_fxsr)
151 return -ENODEV; 165 return -EIO;
152 166
153 ret = init_fpu(target); 167 ret = init_fpu(target);
154 if (ret) 168 if (ret)
@@ -165,7 +179,7 @@ int xfpregs_set(struct task_struct *target, const struct user_regset *regset,
165 int ret; 179 int ret;
166 180
167 if (!cpu_has_fxsr) 181 if (!cpu_has_fxsr)
168 return -ENODEV; 182 return -EIO;
169 183
170 ret = init_fpu(target); 184 ret = init_fpu(target);
171 if (ret) 185 if (ret)
@@ -330,13 +344,13 @@ int fpregs_get(struct task_struct *target, const struct user_regset *regset,
330 struct user_i387_ia32_struct env; 344 struct user_i387_ia32_struct env;
331 int ret; 345 int ret;
332 346
333 if (!HAVE_HWFP)
334 return fpregs_soft_get(target, regset, pos, count, kbuf, ubuf);
335
336 ret = init_fpu(target); 347 ret = init_fpu(target);
337 if (ret) 348 if (ret)
338 return ret; 349 return ret;
339 350
351 if (!HAVE_HWFP)
352 return fpregs_soft_get(target, regset, pos, count, kbuf, ubuf);
353
340 if (!cpu_has_fxsr) { 354 if (!cpu_has_fxsr) {
341 return user_regset_copyout(&pos, &count, &kbuf, &ubuf, 355 return user_regset_copyout(&pos, &count, &kbuf, &ubuf,
342 &target->thread.xstate->fsave, 0, 356 &target->thread.xstate->fsave, 0,
@@ -360,15 +374,15 @@ int fpregs_set(struct task_struct *target, const struct user_regset *regset,
360 struct user_i387_ia32_struct env; 374 struct user_i387_ia32_struct env;
361 int ret; 375 int ret;
362 376
363 if (!HAVE_HWFP)
364 return fpregs_soft_set(target, regset, pos, count, kbuf, ubuf);
365
366 ret = init_fpu(target); 377 ret = init_fpu(target);
367 if (ret) 378 if (ret)
368 return ret; 379 return ret;
369 380
370 set_stopped_child_used_math(target); 381 set_stopped_child_used_math(target);
371 382
383 if (!HAVE_HWFP)
384 return fpregs_soft_set(target, regset, pos, count, kbuf, ubuf);
385
372 if (!cpu_has_fxsr) { 386 if (!cpu_has_fxsr) {
373 return user_regset_copyin(&pos, &count, &kbuf, &ubuf, 387 return user_regset_copyin(&pos, &count, &kbuf, &ubuf,
374 &target->thread.xstate->fsave, 0, -1); 388 &target->thread.xstate->fsave, 0, -1);
@@ -474,18 +488,18 @@ static int restore_i387_fxsave(struct _fpstate_ia32 __user *buf)
474int restore_i387_ia32(struct _fpstate_ia32 __user *buf) 488int restore_i387_ia32(struct _fpstate_ia32 __user *buf)
475{ 489{
476 int err; 490 int err;
491 struct task_struct *tsk = current;
477 492
478 if (HAVE_HWFP) { 493 if (HAVE_HWFP)
479 struct task_struct *tsk = current;
480
481 clear_fpu(tsk); 494 clear_fpu(tsk);
482 495
483 if (!used_math()) { 496 if (!used_math()) {
484 err = init_fpu(tsk); 497 err = init_fpu(tsk);
485 if (err) 498 if (err)
486 return err; 499 return err;
487 } 500 }
488 501
502 if (HAVE_HWFP) {
489 if (cpu_has_fxsr) 503 if (cpu_has_fxsr)
490 err = restore_i387_fxsave(buf); 504 err = restore_i387_fxsave(buf);
491 else 505 else
diff --git a/arch/x86/kernel/i8259_32.c b/arch/x86/kernel/i8259.c
index fe631967d625..7a0fda8f01b5 100644
--- a/arch/x86/kernel/i8259_32.c
+++ b/arch/x86/kernel/i8259.c
@@ -1,8 +1,10 @@
1#include <linux/linkage.h>
1#include <linux/errno.h> 2#include <linux/errno.h>
2#include <linux/signal.h> 3#include <linux/signal.h>
3#include <linux/sched.h> 4#include <linux/sched.h>
4#include <linux/ioport.h> 5#include <linux/ioport.h>
5#include <linux/interrupt.h> 6#include <linux/interrupt.h>
7#include <linux/timex.h>
6#include <linux/slab.h> 8#include <linux/slab.h>
7#include <linux/random.h> 9#include <linux/random.h>
8#include <linux/init.h> 10#include <linux/init.h>
@@ -10,10 +12,12 @@
10#include <linux/sysdev.h> 12#include <linux/sysdev.h>
11#include <linux/bitops.h> 13#include <linux/bitops.h>
12 14
15#include <asm/acpi.h>
13#include <asm/atomic.h> 16#include <asm/atomic.h>
14#include <asm/system.h> 17#include <asm/system.h>
15#include <asm/io.h> 18#include <asm/io.h>
16#include <asm/timer.h> 19#include <asm/timer.h>
20#include <asm/hw_irq.h>
17#include <asm/pgtable.h> 21#include <asm/pgtable.h>
18#include <asm/delay.h> 22#include <asm/delay.h>
19#include <asm/desc.h> 23#include <asm/desc.h>
@@ -32,7 +36,7 @@ static int i8259A_auto_eoi;
32DEFINE_SPINLOCK(i8259A_lock); 36DEFINE_SPINLOCK(i8259A_lock);
33static void mask_and_ack_8259A(unsigned int); 37static void mask_and_ack_8259A(unsigned int);
34 38
35static struct irq_chip i8259A_chip = { 39struct irq_chip i8259A_chip = {
36 .name = "XT-PIC", 40 .name = "XT-PIC",
37 .mask = disable_8259A_irq, 41 .mask = disable_8259A_irq,
38 .disable = disable_8259A_irq, 42 .disable = disable_8259A_irq,
@@ -125,14 +129,14 @@ static inline int i8259A_irq_real(unsigned int irq)
125 int irqmask = 1<<irq; 129 int irqmask = 1<<irq;
126 130
127 if (irq < 8) { 131 if (irq < 8) {
128 outb(0x0B,PIC_MASTER_CMD); /* ISR register */ 132 outb(0x0B, PIC_MASTER_CMD); /* ISR register */
129 value = inb(PIC_MASTER_CMD) & irqmask; 133 value = inb(PIC_MASTER_CMD) & irqmask;
130 outb(0x0A,PIC_MASTER_CMD); /* back to the IRR register */ 134 outb(0x0A, PIC_MASTER_CMD); /* back to the IRR register */
131 return value; 135 return value;
132 } 136 }
133 outb(0x0B,PIC_SLAVE_CMD); /* ISR register */ 137 outb(0x0B, PIC_SLAVE_CMD); /* ISR register */
134 value = inb(PIC_SLAVE_CMD) & (irqmask >> 8); 138 value = inb(PIC_SLAVE_CMD) & (irqmask >> 8);
135 outb(0x0A,PIC_SLAVE_CMD); /* back to the IRR register */ 139 outb(0x0A, PIC_SLAVE_CMD); /* back to the IRR register */
136 return value; 140 return value;
137} 141}
138 142
@@ -171,12 +175,14 @@ handle_real_irq:
171 if (irq & 8) { 175 if (irq & 8) {
172 inb(PIC_SLAVE_IMR); /* DUMMY - (do we need this?) */ 176 inb(PIC_SLAVE_IMR); /* DUMMY - (do we need this?) */
173 outb(cached_slave_mask, PIC_SLAVE_IMR); 177 outb(cached_slave_mask, PIC_SLAVE_IMR);
174 outb(0x60+(irq&7),PIC_SLAVE_CMD);/* 'Specific EOI' to slave */ 178 /* 'Specific EOI' to slave */
175 outb(0x60+PIC_CASCADE_IR,PIC_MASTER_CMD); /* 'Specific EOI' to master-IRQ2 */ 179 outb(0x60+(irq&7), PIC_SLAVE_CMD);
180 /* 'Specific EOI' to master-IRQ2 */
181 outb(0x60+PIC_CASCADE_IR, PIC_MASTER_CMD);
176 } else { 182 } else {
177 inb(PIC_MASTER_IMR); /* DUMMY - (do we need this?) */ 183 inb(PIC_MASTER_IMR); /* DUMMY - (do we need this?) */
178 outb(cached_master_mask, PIC_MASTER_IMR); 184 outb(cached_master_mask, PIC_MASTER_IMR);
179 outb(0x60+irq,PIC_MASTER_CMD); /* 'Specific EOI to master */ 185 outb(0x60+irq, PIC_MASTER_CMD); /* 'Specific EOI to master */
180 } 186 }
181 spin_unlock_irqrestore(&i8259A_lock, flags); 187 spin_unlock_irqrestore(&i8259A_lock, flags);
182 return; 188 return;
@@ -199,7 +205,8 @@ spurious_8259A_irq:
199 * lets ACK and report it. [once per IRQ] 205 * lets ACK and report it. [once per IRQ]
200 */ 206 */
201 if (!(spurious_irq_mask & irqmask)) { 207 if (!(spurious_irq_mask & irqmask)) {
202 printk(KERN_DEBUG "spurious 8259A interrupt: IRQ%d.\n", irq); 208 printk(KERN_DEBUG
209 "spurious 8259A interrupt: IRQ%d.\n", irq);
203 spurious_irq_mask |= irqmask; 210 spurious_irq_mask |= irqmask;
204 } 211 }
205 atomic_inc(&irq_err_count); 212 atomic_inc(&irq_err_count);
@@ -290,17 +297,34 @@ void init_8259A(int auto_eoi)
290 * outb_pic - this has to work on a wide range of PC hardware. 297 * outb_pic - this has to work on a wide range of PC hardware.
291 */ 298 */
292 outb_pic(0x11, PIC_MASTER_CMD); /* ICW1: select 8259A-1 init */ 299 outb_pic(0x11, PIC_MASTER_CMD); /* ICW1: select 8259A-1 init */
300#ifndef CONFIG_X86_64
293 outb_pic(0x20 + 0, PIC_MASTER_IMR); /* ICW2: 8259A-1 IR0-7 mapped to 0x20-0x27 */ 301 outb_pic(0x20 + 0, PIC_MASTER_IMR); /* ICW2: 8259A-1 IR0-7 mapped to 0x20-0x27 */
294 outb_pic(1U << PIC_CASCADE_IR, PIC_MASTER_IMR); /* 8259A-1 (the master) has a slave on IR2 */ 302 outb_pic(1U << PIC_CASCADE_IR, PIC_MASTER_IMR); /* 8259A-1 (the master) has a slave on IR2 */
303#else /* CONFIG_X86_64 */
304 /* ICW2: 8259A-1 IR0-7 mapped to 0x30-0x37 */
305 outb_pic(IRQ0_VECTOR, PIC_MASTER_IMR);
306 /* 8259A-1 (the master) has a slave on IR2 */
307 outb_pic(0x04, PIC_MASTER_IMR);
308#endif /* CONFIG_X86_64 */
295 if (auto_eoi) /* master does Auto EOI */ 309 if (auto_eoi) /* master does Auto EOI */
296 outb_pic(MASTER_ICW4_DEFAULT | PIC_ICW4_AEOI, PIC_MASTER_IMR); 310 outb_pic(MASTER_ICW4_DEFAULT | PIC_ICW4_AEOI, PIC_MASTER_IMR);
297 else /* master expects normal EOI */ 311 else /* master expects normal EOI */
298 outb_pic(MASTER_ICW4_DEFAULT, PIC_MASTER_IMR); 312 outb_pic(MASTER_ICW4_DEFAULT, PIC_MASTER_IMR);
299 313
300 outb_pic(0x11, PIC_SLAVE_CMD); /* ICW1: select 8259A-2 init */ 314 outb_pic(0x11, PIC_SLAVE_CMD); /* ICW1: select 8259A-2 init */
315#ifndef CONFIG_X86_64
301 outb_pic(0x20 + 8, PIC_SLAVE_IMR); /* ICW2: 8259A-2 IR0-7 mapped to 0x28-0x2f */ 316 outb_pic(0x20 + 8, PIC_SLAVE_IMR); /* ICW2: 8259A-2 IR0-7 mapped to 0x28-0x2f */
302 outb_pic(PIC_CASCADE_IR, PIC_SLAVE_IMR); /* 8259A-2 is a slave on master's IR2 */ 317 outb_pic(PIC_CASCADE_IR, PIC_SLAVE_IMR); /* 8259A-2 is a slave on master's IR2 */
303 outb_pic(SLAVE_ICW4_DEFAULT, PIC_SLAVE_IMR); /* (slave's support for AEOI in flat mode is to be investigated) */ 318 outb_pic(SLAVE_ICW4_DEFAULT, PIC_SLAVE_IMR); /* (slave's support for AEOI in flat mode is to be investigated) */
319#else /* CONFIG_X86_64 */
320 /* ICW2: 8259A-2 IR0-7 mapped to 0x38-0x3f */
321 outb_pic(IRQ8_VECTOR, PIC_SLAVE_IMR);
322 /* 8259A-2 is a slave on master's IR2 */
323 outb_pic(PIC_CASCADE_IR, PIC_SLAVE_IMR);
324 /* (slave's support for AEOI in flat mode is to be investigated) */
325 outb_pic(SLAVE_ICW4_DEFAULT, PIC_SLAVE_IMR);
326
327#endif /* CONFIG_X86_64 */
304 if (auto_eoi) 328 if (auto_eoi)
305 /* 329 /*
306 * In AEOI mode we just have to mask the interrupt 330 * In AEOI mode we just have to mask the interrupt
@@ -317,93 +341,3 @@ void init_8259A(int auto_eoi)
317 341
318 spin_unlock_irqrestore(&i8259A_lock, flags); 342 spin_unlock_irqrestore(&i8259A_lock, flags);
319} 343}
320
321/*
322 * Note that on a 486, we don't want to do a SIGFPE on an irq13
323 * as the irq is unreliable, and exception 16 works correctly
324 * (ie as explained in the intel literature). On a 386, you
325 * can't use exception 16 due to bad IBM design, so we have to
326 * rely on the less exact irq13.
327 *
328 * Careful.. Not only is IRQ13 unreliable, but it is also
329 * leads to races. IBM designers who came up with it should
330 * be shot.
331 */
332
333
334static irqreturn_t math_error_irq(int cpl, void *dev_id)
335{
336 extern void math_error(void __user *);
337 outb(0,0xF0);
338 if (ignore_fpu_irq || !boot_cpu_data.hard_math)
339 return IRQ_NONE;
340 math_error((void __user *)get_irq_regs()->ip);
341 return IRQ_HANDLED;
342}
343
344/*
345 * New motherboards sometimes make IRQ 13 be a PCI interrupt,
346 * so allow interrupt sharing.
347 */
348static struct irqaction fpu_irq = {
349 .handler = math_error_irq,
350 .mask = CPU_MASK_NONE,
351 .name = "fpu",
352};
353
354void __init init_ISA_irqs (void)
355{
356 int i;
357
358#ifdef CONFIG_X86_LOCAL_APIC
359 init_bsp_APIC();
360#endif
361 init_8259A(0);
362
363 /*
364 * 16 old-style INTA-cycle interrupts:
365 */
366 for (i = 0; i < 16; i++) {
367 set_irq_chip_and_handler_name(i, &i8259A_chip,
368 handle_level_irq, "XT");
369 }
370}
371
372/* Overridden in paravirt.c */
373void init_IRQ(void) __attribute__((weak, alias("native_init_IRQ")));
374
375void __init native_init_IRQ(void)
376{
377 int i;
378
379 /* all the set up before the call gates are initialised */
380 pre_intr_init_hook();
381
382 /*
383 * Cover the whole vector space, no vector can escape
384 * us. (some of these will be overridden and become
385 * 'special' SMP interrupts)
386 */
387 for (i = 0; i < (NR_VECTORS - FIRST_EXTERNAL_VECTOR); i++) {
388 int vector = FIRST_EXTERNAL_VECTOR + i;
389 if (i >= NR_IRQS)
390 break;
391 /* SYSCALL_VECTOR was reserved in trap_init. */
392 if (!test_bit(vector, used_vectors))
393 set_intr_gate(vector, interrupt[i]);
394 }
395
396 /* setup after call gates are initialised (usually add in
397 * the architecture specific gates)
398 */
399 intr_init_hook();
400
401 /*
402 * External FPU? Set up irq13 if so, for
403 * original braindamaged IBM FERR coupling.
404 */
405 if (boot_cpu_data.hard_math && !cpu_has_fpu)
406 setup_irq(FPU_IRQ, &fpu_irq);
407
408 irq_ctx_init(smp_processor_id());
409}
diff --git a/arch/x86/kernel/i8259_64.c b/arch/x86/kernel/i8259_64.c
deleted file mode 100644
index fa57a1568508..000000000000
--- a/arch/x86/kernel/i8259_64.c
+++ /dev/null
@@ -1,512 +0,0 @@
1#include <linux/linkage.h>
2#include <linux/errno.h>
3#include <linux/signal.h>
4#include <linux/sched.h>
5#include <linux/ioport.h>
6#include <linux/interrupt.h>
7#include <linux/timex.h>
8#include <linux/slab.h>
9#include <linux/random.h>
10#include <linux/init.h>
11#include <linux/kernel_stat.h>
12#include <linux/sysdev.h>
13#include <linux/bitops.h>
14
15#include <asm/acpi.h>
16#include <asm/atomic.h>
17#include <asm/system.h>
18#include <asm/io.h>
19#include <asm/hw_irq.h>
20#include <asm/pgtable.h>
21#include <asm/delay.h>
22#include <asm/desc.h>
23#include <asm/apic.h>
24#include <asm/i8259.h>
25
26/*
27 * Common place to define all x86 IRQ vectors
28 *
29 * This builds up the IRQ handler stubs using some ugly macros in irq.h
30 *
31 * These macros create the low-level assembly IRQ routines that save
32 * register context and call do_IRQ(). do_IRQ() then does all the
33 * operations that are needed to keep the AT (or SMP IOAPIC)
34 * interrupt-controller happy.
35 */
36
37#define BI(x,y) \
38 BUILD_IRQ(x##y)
39
40#define BUILD_16_IRQS(x) \
41 BI(x,0) BI(x,1) BI(x,2) BI(x,3) \
42 BI(x,4) BI(x,5) BI(x,6) BI(x,7) \
43 BI(x,8) BI(x,9) BI(x,a) BI(x,b) \
44 BI(x,c) BI(x,d) BI(x,e) BI(x,f)
45
46/*
47 * ISA PIC or low IO-APIC triggered (INTA-cycle or APIC) interrupts:
48 * (these are usually mapped to vectors 0x30-0x3f)
49 */
50
51/*
52 * The IO-APIC gives us many more interrupt sources. Most of these
53 * are unused but an SMP system is supposed to have enough memory ...
54 * sometimes (mostly wrt. hw bugs) we get corrupted vectors all
55 * across the spectrum, so we really want to be prepared to get all
56 * of these. Plus, more powerful systems might have more than 64
57 * IO-APIC registers.
58 *
59 * (these are usually mapped into the 0x30-0xff vector range)
60 */
61 BUILD_16_IRQS(0x2) BUILD_16_IRQS(0x3)
62BUILD_16_IRQS(0x4) BUILD_16_IRQS(0x5) BUILD_16_IRQS(0x6) BUILD_16_IRQS(0x7)
63BUILD_16_IRQS(0x8) BUILD_16_IRQS(0x9) BUILD_16_IRQS(0xa) BUILD_16_IRQS(0xb)
64BUILD_16_IRQS(0xc) BUILD_16_IRQS(0xd) BUILD_16_IRQS(0xe) BUILD_16_IRQS(0xf)
65
66#undef BUILD_16_IRQS
67#undef BI
68
69
70#define IRQ(x,y) \
71 IRQ##x##y##_interrupt
72
73#define IRQLIST_16(x) \
74 IRQ(x,0), IRQ(x,1), IRQ(x,2), IRQ(x,3), \
75 IRQ(x,4), IRQ(x,5), IRQ(x,6), IRQ(x,7), \
76 IRQ(x,8), IRQ(x,9), IRQ(x,a), IRQ(x,b), \
77 IRQ(x,c), IRQ(x,d), IRQ(x,e), IRQ(x,f)
78
79/* for the irq vectors */
80static void (*__initdata interrupt[NR_VECTORS - FIRST_EXTERNAL_VECTOR])(void) = {
81 IRQLIST_16(0x2), IRQLIST_16(0x3),
82 IRQLIST_16(0x4), IRQLIST_16(0x5), IRQLIST_16(0x6), IRQLIST_16(0x7),
83 IRQLIST_16(0x8), IRQLIST_16(0x9), IRQLIST_16(0xa), IRQLIST_16(0xb),
84 IRQLIST_16(0xc), IRQLIST_16(0xd), IRQLIST_16(0xe), IRQLIST_16(0xf)
85};
86
87#undef IRQ
88#undef IRQLIST_16
89
90/*
91 * This is the 'legacy' 8259A Programmable Interrupt Controller,
92 * present in the majority of PC/AT boxes.
93 * plus some generic x86 specific things if generic specifics makes
94 * any sense at all.
95 * this file should become arch/i386/kernel/irq.c when the old irq.c
96 * moves to arch independent land
97 */
98
99static int i8259A_auto_eoi;
100DEFINE_SPINLOCK(i8259A_lock);
101static void mask_and_ack_8259A(unsigned int);
102
103static struct irq_chip i8259A_chip = {
104 .name = "XT-PIC",
105 .mask = disable_8259A_irq,
106 .disable = disable_8259A_irq,
107 .unmask = enable_8259A_irq,
108 .mask_ack = mask_and_ack_8259A,
109};
110
111/*
112 * 8259A PIC functions to handle ISA devices:
113 */
114
115/*
116 * This contains the irq mask for both 8259A irq controllers,
117 */
118unsigned int cached_irq_mask = 0xffff;
119
120/*
121 * Not all IRQs can be routed through the IO-APIC, eg. on certain (older)
122 * boards the timer interrupt is not really connected to any IO-APIC pin,
123 * it's fed to the master 8259A's IR0 line only.
124 *
125 * Any '1' bit in this mask means the IRQ is routed through the IO-APIC.
126 * this 'mixed mode' IRQ handling costs nothing because it's only used
127 * at IRQ setup time.
128 */
129unsigned long io_apic_irqs;
130
131void disable_8259A_irq(unsigned int irq)
132{
133 unsigned int mask = 1 << irq;
134 unsigned long flags;
135
136 spin_lock_irqsave(&i8259A_lock, flags);
137 cached_irq_mask |= mask;
138 if (irq & 8)
139 outb(cached_slave_mask, PIC_SLAVE_IMR);
140 else
141 outb(cached_master_mask, PIC_MASTER_IMR);
142 spin_unlock_irqrestore(&i8259A_lock, flags);
143}
144
145void enable_8259A_irq(unsigned int irq)
146{
147 unsigned int mask = ~(1 << irq);
148 unsigned long flags;
149
150 spin_lock_irqsave(&i8259A_lock, flags);
151 cached_irq_mask &= mask;
152 if (irq & 8)
153 outb(cached_slave_mask, PIC_SLAVE_IMR);
154 else
155 outb(cached_master_mask, PIC_MASTER_IMR);
156 spin_unlock_irqrestore(&i8259A_lock, flags);
157}
158
159int i8259A_irq_pending(unsigned int irq)
160{
161 unsigned int mask = 1<<irq;
162 unsigned long flags;
163 int ret;
164
165 spin_lock_irqsave(&i8259A_lock, flags);
166 if (irq < 8)
167 ret = inb(PIC_MASTER_CMD) & mask;
168 else
169 ret = inb(PIC_SLAVE_CMD) & (mask >> 8);
170 spin_unlock_irqrestore(&i8259A_lock, flags);
171
172 return ret;
173}
174
175void make_8259A_irq(unsigned int irq)
176{
177 disable_irq_nosync(irq);
178 io_apic_irqs &= ~(1<<irq);
179 set_irq_chip_and_handler_name(irq, &i8259A_chip, handle_level_irq,
180 "XT");
181 enable_irq(irq);
182}
183
184/*
185 * This function assumes to be called rarely. Switching between
186 * 8259A registers is slow.
187 * This has to be protected by the irq controller spinlock
188 * before being called.
189 */
190static inline int i8259A_irq_real(unsigned int irq)
191{
192 int value;
193 int irqmask = 1<<irq;
194
195 if (irq < 8) {
196 outb(0x0B,PIC_MASTER_CMD); /* ISR register */
197 value = inb(PIC_MASTER_CMD) & irqmask;
198 outb(0x0A,PIC_MASTER_CMD); /* back to the IRR register */
199 return value;
200 }
201 outb(0x0B,PIC_SLAVE_CMD); /* ISR register */
202 value = inb(PIC_SLAVE_CMD) & (irqmask >> 8);
203 outb(0x0A,PIC_SLAVE_CMD); /* back to the IRR register */
204 return value;
205}
206
207/*
208 * Careful! The 8259A is a fragile beast, it pretty
209 * much _has_ to be done exactly like this (mask it
210 * first, _then_ send the EOI, and the order of EOI
211 * to the two 8259s is important!
212 */
213static void mask_and_ack_8259A(unsigned int irq)
214{
215 unsigned int irqmask = 1 << irq;
216 unsigned long flags;
217
218 spin_lock_irqsave(&i8259A_lock, flags);
219 /*
220 * Lightweight spurious IRQ detection. We do not want
221 * to overdo spurious IRQ handling - it's usually a sign
222 * of hardware problems, so we only do the checks we can
223 * do without slowing down good hardware unnecessarily.
224 *
225 * Note that IRQ7 and IRQ15 (the two spurious IRQs
226 * usually resulting from the 8259A-1|2 PICs) occur
227 * even if the IRQ is masked in the 8259A. Thus we
228 * can check spurious 8259A IRQs without doing the
229 * quite slow i8259A_irq_real() call for every IRQ.
230 * This does not cover 100% of spurious interrupts,
231 * but should be enough to warn the user that there
232 * is something bad going on ...
233 */
234 if (cached_irq_mask & irqmask)
235 goto spurious_8259A_irq;
236 cached_irq_mask |= irqmask;
237
238handle_real_irq:
239 if (irq & 8) {
240 inb(PIC_SLAVE_IMR); /* DUMMY - (do we need this?) */
241 outb(cached_slave_mask, PIC_SLAVE_IMR);
242 /* 'Specific EOI' to slave */
243 outb(0x60+(irq&7),PIC_SLAVE_CMD);
244 /* 'Specific EOI' to master-IRQ2 */
245 outb(0x60+PIC_CASCADE_IR,PIC_MASTER_CMD);
246 } else {
247 inb(PIC_MASTER_IMR); /* DUMMY - (do we need this?) */
248 outb(cached_master_mask, PIC_MASTER_IMR);
249 /* 'Specific EOI' to master */
250 outb(0x60+irq,PIC_MASTER_CMD);
251 }
252 spin_unlock_irqrestore(&i8259A_lock, flags);
253 return;
254
255spurious_8259A_irq:
256 /*
257 * this is the slow path - should happen rarely.
258 */
259 if (i8259A_irq_real(irq))
260 /*
261 * oops, the IRQ _is_ in service according to the
262 * 8259A - not spurious, go handle it.
263 */
264 goto handle_real_irq;
265
266 {
267 static int spurious_irq_mask;
268 /*
269 * At this point we can be sure the IRQ is spurious,
270 * lets ACK and report it. [once per IRQ]
271 */
272 if (!(spurious_irq_mask & irqmask)) {
273 printk(KERN_DEBUG
274 "spurious 8259A interrupt: IRQ%d.\n", irq);
275 spurious_irq_mask |= irqmask;
276 }
277 atomic_inc(&irq_err_count);
278 /*
279 * Theoretically we do not have to handle this IRQ,
280 * but in Linux this does not cause problems and is
281 * simpler for us.
282 */
283 goto handle_real_irq;
284 }
285}
286
287static char irq_trigger[2];
288/**
289 * ELCR registers (0x4d0, 0x4d1) control edge/level of IRQ
290 */
291static void restore_ELCR(char *trigger)
292{
293 outb(trigger[0], 0x4d0);
294 outb(trigger[1], 0x4d1);
295}
296
297static void save_ELCR(char *trigger)
298{
299 /* IRQ 0,1,2,8,13 are marked as reserved */
300 trigger[0] = inb(0x4d0) & 0xF8;
301 trigger[1] = inb(0x4d1) & 0xDE;
302}
303
304static int i8259A_resume(struct sys_device *dev)
305{
306 init_8259A(i8259A_auto_eoi);
307 restore_ELCR(irq_trigger);
308 return 0;
309}
310
311static int i8259A_suspend(struct sys_device *dev, pm_message_t state)
312{
313 save_ELCR(irq_trigger);
314 return 0;
315}
316
317static int i8259A_shutdown(struct sys_device *dev)
318{
319 /* Put the i8259A into a quiescent state that
320 * the kernel initialization code can get it
321 * out of.
322 */
323 outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */
324 outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-1 */
325 return 0;
326}
327
328static struct sysdev_class i8259_sysdev_class = {
329 .name = "i8259",
330 .suspend = i8259A_suspend,
331 .resume = i8259A_resume,
332 .shutdown = i8259A_shutdown,
333};
334
335static struct sys_device device_i8259A = {
336 .id = 0,
337 .cls = &i8259_sysdev_class,
338};
339
340static int __init i8259A_init_sysfs(void)
341{
342 int error = sysdev_class_register(&i8259_sysdev_class);
343 if (!error)
344 error = sysdev_register(&device_i8259A);
345 return error;
346}
347
348device_initcall(i8259A_init_sysfs);
349
350void init_8259A(int auto_eoi)
351{
352 unsigned long flags;
353
354 i8259A_auto_eoi = auto_eoi;
355
356 spin_lock_irqsave(&i8259A_lock, flags);
357
358 outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */
359 outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-2 */
360
361 /*
362 * outb_pic - this has to work on a wide range of PC hardware.
363 */
364 outb_pic(0x11, PIC_MASTER_CMD); /* ICW1: select 8259A-1 init */
365 /* ICW2: 8259A-1 IR0-7 mapped to 0x30-0x37 */
366 outb_pic(IRQ0_VECTOR, PIC_MASTER_IMR);
367 /* 8259A-1 (the master) has a slave on IR2 */
368 outb_pic(0x04, PIC_MASTER_IMR);
369 if (auto_eoi) /* master does Auto EOI */
370 outb_pic(MASTER_ICW4_DEFAULT | PIC_ICW4_AEOI, PIC_MASTER_IMR);
371 else /* master expects normal EOI */
372 outb_pic(MASTER_ICW4_DEFAULT, PIC_MASTER_IMR);
373
374 outb_pic(0x11, PIC_SLAVE_CMD); /* ICW1: select 8259A-2 init */
375 /* ICW2: 8259A-2 IR0-7 mapped to 0x38-0x3f */
376 outb_pic(IRQ8_VECTOR, PIC_SLAVE_IMR);
377 /* 8259A-2 is a slave on master's IR2 */
378 outb_pic(PIC_CASCADE_IR, PIC_SLAVE_IMR);
379 /* (slave's support for AEOI in flat mode is to be investigated) */
380 outb_pic(SLAVE_ICW4_DEFAULT, PIC_SLAVE_IMR);
381
382 if (auto_eoi)
383 /*
384 * In AEOI mode we just have to mask the interrupt
385 * when acking.
386 */
387 i8259A_chip.mask_ack = disable_8259A_irq;
388 else
389 i8259A_chip.mask_ack = mask_and_ack_8259A;
390
391 udelay(100); /* wait for 8259A to initialize */
392
393 outb(cached_master_mask, PIC_MASTER_IMR); /* restore master IRQ mask */
394 outb(cached_slave_mask, PIC_SLAVE_IMR); /* restore slave IRQ mask */
395
396 spin_unlock_irqrestore(&i8259A_lock, flags);
397}
398
399
400
401
402/*
403 * IRQ2 is cascade interrupt to second interrupt controller
404 */
405
406static struct irqaction irq2 = {
407 .handler = no_action,
408 .mask = CPU_MASK_NONE,
409 .name = "cascade",
410};
411DEFINE_PER_CPU(vector_irq_t, vector_irq) = {
412 [0 ... IRQ0_VECTOR - 1] = -1,
413 [IRQ0_VECTOR] = 0,
414 [IRQ1_VECTOR] = 1,
415 [IRQ2_VECTOR] = 2,
416 [IRQ3_VECTOR] = 3,
417 [IRQ4_VECTOR] = 4,
418 [IRQ5_VECTOR] = 5,
419 [IRQ6_VECTOR] = 6,
420 [IRQ7_VECTOR] = 7,
421 [IRQ8_VECTOR] = 8,
422 [IRQ9_VECTOR] = 9,
423 [IRQ10_VECTOR] = 10,
424 [IRQ11_VECTOR] = 11,
425 [IRQ12_VECTOR] = 12,
426 [IRQ13_VECTOR] = 13,
427 [IRQ14_VECTOR] = 14,
428 [IRQ15_VECTOR] = 15,
429 [IRQ15_VECTOR + 1 ... NR_VECTORS - 1] = -1
430};
431
432void __init init_ISA_irqs (void)
433{
434 int i;
435
436 init_bsp_APIC();
437 init_8259A(0);
438
439 for (i = 0; i < NR_IRQS; i++) {
440 irq_desc[i].status = IRQ_DISABLED;
441 irq_desc[i].action = NULL;
442 irq_desc[i].depth = 1;
443
444 if (i < 16) {
445 /*
446 * 16 old-style INTA-cycle interrupts:
447 */
448 set_irq_chip_and_handler_name(i, &i8259A_chip,
449 handle_level_irq, "XT");
450 } else {
451 /*
452 * 'high' PCI IRQs filled in on demand
453 */
454 irq_desc[i].chip = &no_irq_chip;
455 }
456 }
457}
458
459void init_IRQ(void) __attribute__((weak, alias("native_init_IRQ")));
460
461void __init native_init_IRQ(void)
462{
463 int i;
464
465 init_ISA_irqs();
466 /*
467 * Cover the whole vector space, no vector can escape
468 * us. (some of these will be overridden and become
469 * 'special' SMP interrupts)
470 */
471 for (i = 0; i < (NR_VECTORS - FIRST_EXTERNAL_VECTOR); i++) {
472 int vector = FIRST_EXTERNAL_VECTOR + i;
473 if (vector != IA32_SYSCALL_VECTOR)
474 set_intr_gate(vector, interrupt[i]);
475 }
476
477#ifdef CONFIG_SMP
478 /*
479 * The reschedule interrupt is a CPU-to-CPU reschedule-helper
480 * IPI, driven by wakeup.
481 */
482 set_intr_gate(RESCHEDULE_VECTOR, reschedule_interrupt);
483
484 /* IPIs for invalidation */
485 set_intr_gate(INVALIDATE_TLB_VECTOR_START+0, invalidate_interrupt0);
486 set_intr_gate(INVALIDATE_TLB_VECTOR_START+1, invalidate_interrupt1);
487 set_intr_gate(INVALIDATE_TLB_VECTOR_START+2, invalidate_interrupt2);
488 set_intr_gate(INVALIDATE_TLB_VECTOR_START+3, invalidate_interrupt3);
489 set_intr_gate(INVALIDATE_TLB_VECTOR_START+4, invalidate_interrupt4);
490 set_intr_gate(INVALIDATE_TLB_VECTOR_START+5, invalidate_interrupt5);
491 set_intr_gate(INVALIDATE_TLB_VECTOR_START+6, invalidate_interrupt6);
492 set_intr_gate(INVALIDATE_TLB_VECTOR_START+7, invalidate_interrupt7);
493
494 /* IPI for generic function call */
495 set_intr_gate(CALL_FUNCTION_VECTOR, call_function_interrupt);
496
497 /* Low priority IPI to cleanup after moving an irq */
498 set_intr_gate(IRQ_MOVE_CLEANUP_VECTOR, irq_move_cleanup_interrupt);
499#endif
500 set_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt);
501 set_intr_gate(THRESHOLD_APIC_VECTOR, threshold_interrupt);
502
503 /* self generated IPI for local APIC timer */
504 set_intr_gate(LOCAL_TIMER_VECTOR, apic_timer_interrupt);
505
506 /* IPI vectors for APIC spurious and error interrupts */
507 set_intr_gate(SPURIOUS_APIC_VECTOR, spurious_interrupt);
508 set_intr_gate(ERROR_APIC_VECTOR, error_interrupt);
509
510 if (!acpi_ioapic)
511 setup_irq(2, &irq2);
512}
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c
index a40d54fc1fdd..d4f9df2b022a 100644
--- a/arch/x86/kernel/io_apic_32.c
+++ b/arch/x86/kernel/io_apic_32.c
@@ -58,7 +58,7 @@ static struct { int pin, apic; } ioapic_i8259 = { -1, -1 };
58static DEFINE_SPINLOCK(ioapic_lock); 58static DEFINE_SPINLOCK(ioapic_lock);
59static DEFINE_SPINLOCK(vector_lock); 59static DEFINE_SPINLOCK(vector_lock);
60 60
61int timer_over_8254 __initdata = 1; 61int timer_through_8259 __initdata;
62 62
63/* 63/*
64 * Is the SiS APIC rmw bug present ? 64 * Is the SiS APIC rmw bug present ?
@@ -239,7 +239,7 @@ static void __init replace_pin_at_irq(unsigned int irq,
239 } 239 }
240} 240}
241 241
242static void __modify_IO_APIC_irq (unsigned int irq, unsigned long enable, unsigned long disable) 242static void __modify_IO_APIC_irq(unsigned int irq, unsigned long enable, unsigned long disable)
243{ 243{
244 struct irq_pin_list *entry = irq_2_pin + irq; 244 struct irq_pin_list *entry = irq_2_pin + irq;
245 unsigned int pin, reg; 245 unsigned int pin, reg;
@@ -259,30 +259,32 @@ static void __modify_IO_APIC_irq (unsigned int irq, unsigned long enable, unsign
259} 259}
260 260
261/* mask = 1 */ 261/* mask = 1 */
262static void __mask_IO_APIC_irq (unsigned int irq) 262static void __mask_IO_APIC_irq(unsigned int irq)
263{ 263{
264 __modify_IO_APIC_irq(irq, 0x00010000, 0); 264 __modify_IO_APIC_irq(irq, IO_APIC_REDIR_MASKED, 0);
265} 265}
266 266
267/* mask = 0 */ 267/* mask = 0 */
268static void __unmask_IO_APIC_irq (unsigned int irq) 268static void __unmask_IO_APIC_irq(unsigned int irq)
269{ 269{
270 __modify_IO_APIC_irq(irq, 0, 0x00010000); 270 __modify_IO_APIC_irq(irq, 0, IO_APIC_REDIR_MASKED);
271} 271}
272 272
273/* mask = 1, trigger = 0 */ 273/* mask = 1, trigger = 0 */
274static void __mask_and_edge_IO_APIC_irq (unsigned int irq) 274static void __mask_and_edge_IO_APIC_irq(unsigned int irq)
275{ 275{
276 __modify_IO_APIC_irq(irq, 0x00010000, 0x00008000); 276 __modify_IO_APIC_irq(irq, IO_APIC_REDIR_MASKED,
277 IO_APIC_REDIR_LEVEL_TRIGGER);
277} 278}
278 279
279/* mask = 0, trigger = 1 */ 280/* mask = 0, trigger = 1 */
280static void __unmask_and_level_IO_APIC_irq (unsigned int irq) 281static void __unmask_and_level_IO_APIC_irq(unsigned int irq)
281{ 282{
282 __modify_IO_APIC_irq(irq, 0x00008000, 0x00010000); 283 __modify_IO_APIC_irq(irq, IO_APIC_REDIR_LEVEL_TRIGGER,
284 IO_APIC_REDIR_MASKED);
283} 285}
284 286
285static void mask_IO_APIC_irq (unsigned int irq) 287static void mask_IO_APIC_irq(unsigned int irq)
286{ 288{
287 unsigned long flags; 289 unsigned long flags;
288 290
@@ -291,7 +293,7 @@ static void mask_IO_APIC_irq (unsigned int irq)
291 spin_unlock_irqrestore(&ioapic_lock, flags); 293 spin_unlock_irqrestore(&ioapic_lock, flags);
292} 294}
293 295
294static void unmask_IO_APIC_irq (unsigned int irq) 296static void unmask_IO_APIC_irq(unsigned int irq)
295{ 297{
296 unsigned long flags; 298 unsigned long flags;
297 299
@@ -303,7 +305,7 @@ static void unmask_IO_APIC_irq (unsigned int irq)
303static void clear_IO_APIC_pin(unsigned int apic, unsigned int pin) 305static void clear_IO_APIC_pin(unsigned int apic, unsigned int pin)
304{ 306{
305 struct IO_APIC_route_entry entry; 307 struct IO_APIC_route_entry entry;
306 308
307 /* Check delivery_mode to be sure we're not clearing an SMI pin */ 309 /* Check delivery_mode to be sure we're not clearing an SMI pin */
308 entry = ioapic_read_entry(apic, pin); 310 entry = ioapic_read_entry(apic, pin);
309 if (entry.delivery_mode == dest_SMI) 311 if (entry.delivery_mode == dest_SMI)
@@ -315,7 +317,7 @@ static void clear_IO_APIC_pin(unsigned int apic, unsigned int pin)
315 ioapic_mask_entry(apic, pin); 317 ioapic_mask_entry(apic, pin);
316} 318}
317 319
318static void clear_IO_APIC (void) 320static void clear_IO_APIC(void)
319{ 321{
320 int apic, pin; 322 int apic, pin;
321 323
@@ -332,7 +334,7 @@ static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t cpumask)
332 struct irq_pin_list *entry = irq_2_pin + irq; 334 struct irq_pin_list *entry = irq_2_pin + irq;
333 unsigned int apicid_value; 335 unsigned int apicid_value;
334 cpumask_t tmp; 336 cpumask_t tmp;
335 337
336 cpus_and(tmp, cpumask, cpu_online_map); 338 cpus_and(tmp, cpumask, cpu_online_map);
337 if (cpus_empty(tmp)) 339 if (cpus_empty(tmp))
338 tmp = TARGET_CPUS; 340 tmp = TARGET_CPUS;
@@ -361,7 +363,7 @@ static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t cpumask)
361# include <linux/kernel_stat.h> /* kstat */ 363# include <linux/kernel_stat.h> /* kstat */
362# include <linux/slab.h> /* kmalloc() */ 364# include <linux/slab.h> /* kmalloc() */
363# include <linux/timer.h> 365# include <linux/timer.h>
364 366
365#define IRQBALANCE_CHECK_ARCH -999 367#define IRQBALANCE_CHECK_ARCH -999
366#define MAX_BALANCED_IRQ_INTERVAL (5*HZ) 368#define MAX_BALANCED_IRQ_INTERVAL (5*HZ)
367#define MIN_BALANCED_IRQ_INTERVAL (HZ/2) 369#define MIN_BALANCED_IRQ_INTERVAL (HZ/2)
@@ -373,14 +375,14 @@ static int physical_balance __read_mostly;
373static long balanced_irq_interval __read_mostly = MAX_BALANCED_IRQ_INTERVAL; 375static long balanced_irq_interval __read_mostly = MAX_BALANCED_IRQ_INTERVAL;
374 376
375static struct irq_cpu_info { 377static struct irq_cpu_info {
376 unsigned long * last_irq; 378 unsigned long *last_irq;
377 unsigned long * irq_delta; 379 unsigned long *irq_delta;
378 unsigned long irq; 380 unsigned long irq;
379} irq_cpu_data[NR_CPUS]; 381} irq_cpu_data[NR_CPUS];
380 382
381#define CPU_IRQ(cpu) (irq_cpu_data[cpu].irq) 383#define CPU_IRQ(cpu) (irq_cpu_data[cpu].irq)
382#define LAST_CPU_IRQ(cpu,irq) (irq_cpu_data[cpu].last_irq[irq]) 384#define LAST_CPU_IRQ(cpu, irq) (irq_cpu_data[cpu].last_irq[irq])
383#define IRQ_DELTA(cpu,irq) (irq_cpu_data[cpu].irq_delta[irq]) 385#define IRQ_DELTA(cpu, irq) (irq_cpu_data[cpu].irq_delta[irq])
384 386
385#define IDLE_ENOUGH(cpu,now) \ 387#define IDLE_ENOUGH(cpu,now) \
386 (idle_cpu(cpu) && ((now) - per_cpu(irq_stat, (cpu)).idle_timestamp > 1)) 388 (idle_cpu(cpu) && ((now) - per_cpu(irq_stat, (cpu)).idle_timestamp > 1))
@@ -419,8 +421,8 @@ inside:
419 if (cpu == -1) 421 if (cpu == -1)
420 cpu = NR_CPUS-1; 422 cpu = NR_CPUS-1;
421 } 423 }
422 } while (!cpu_online(cpu) || !IRQ_ALLOWED(cpu,allowed_mask) || 424 } while (!cpu_online(cpu) || !IRQ_ALLOWED(cpu, allowed_mask) ||
423 (search_idle && !IDLE_ENOUGH(cpu,now))); 425 (search_idle && !IDLE_ENOUGH(cpu, now)));
424 426
425 return cpu; 427 return cpu;
426} 428}
@@ -430,15 +432,14 @@ static inline void balance_irq(int cpu, int irq)
430 unsigned long now = jiffies; 432 unsigned long now = jiffies;
431 cpumask_t allowed_mask; 433 cpumask_t allowed_mask;
432 unsigned int new_cpu; 434 unsigned int new_cpu;
433 435
434 if (irqbalance_disabled) 436 if (irqbalance_disabled)
435 return; 437 return;
436 438
437 cpus_and(allowed_mask, cpu_online_map, balance_irq_affinity[irq]); 439 cpus_and(allowed_mask, cpu_online_map, balance_irq_affinity[irq]);
438 new_cpu = move(cpu, allowed_mask, now, 1); 440 new_cpu = move(cpu, allowed_mask, now, 1);
439 if (cpu != new_cpu) { 441 if (cpu != new_cpu)
440 set_pending_irq(irq, cpumask_of_cpu(new_cpu)); 442 set_pending_irq(irq, cpumask_of_cpu(new_cpu));
441 }
442} 443}
443 444
444static inline void rotate_irqs_among_cpus(unsigned long useful_load_threshold) 445static inline void rotate_irqs_among_cpus(unsigned long useful_load_threshold)
@@ -450,14 +451,14 @@ static inline void rotate_irqs_among_cpus(unsigned long useful_load_threshold)
450 if (!irq_desc[j].action) 451 if (!irq_desc[j].action)
451 continue; 452 continue;
452 /* Is it a significant load ? */ 453 /* Is it a significant load ? */
453 if (IRQ_DELTA(CPU_TO_PACKAGEINDEX(i),j) < 454 if (IRQ_DELTA(CPU_TO_PACKAGEINDEX(i), j) <
454 useful_load_threshold) 455 useful_load_threshold)
455 continue; 456 continue;
456 balance_irq(i, j); 457 balance_irq(i, j);
457 } 458 }
458 } 459 }
459 balanced_irq_interval = max((long)MIN_BALANCED_IRQ_INTERVAL, 460 balanced_irq_interval = max((long)MIN_BALANCED_IRQ_INTERVAL,
460 balanced_irq_interval - BALANCED_IRQ_LESS_DELTA); 461 balanced_irq_interval - BALANCED_IRQ_LESS_DELTA);
461 return; 462 return;
462} 463}
463 464
@@ -486,22 +487,22 @@ static void do_irq_balance(void)
486 /* Is this an active IRQ or balancing disabled ? */ 487 /* Is this an active IRQ or balancing disabled ? */
487 if (!irq_desc[j].action || irq_balancing_disabled(j)) 488 if (!irq_desc[j].action || irq_balancing_disabled(j))
488 continue; 489 continue;
489 if ( package_index == i ) 490 if (package_index == i)
490 IRQ_DELTA(package_index,j) = 0; 491 IRQ_DELTA(package_index, j) = 0;
491 /* Determine the total count per processor per IRQ */ 492 /* Determine the total count per processor per IRQ */
492 value_now = (unsigned long) kstat_cpu(i).irqs[j]; 493 value_now = (unsigned long) kstat_cpu(i).irqs[j];
493 494
494 /* Determine the activity per processor per IRQ */ 495 /* Determine the activity per processor per IRQ */
495 delta = value_now - LAST_CPU_IRQ(i,j); 496 delta = value_now - LAST_CPU_IRQ(i, j);
496 497
497 /* Update last_cpu_irq[][] for the next time */ 498 /* Update last_cpu_irq[][] for the next time */
498 LAST_CPU_IRQ(i,j) = value_now; 499 LAST_CPU_IRQ(i, j) = value_now;
499 500
500 /* Ignore IRQs whose rate is less than the clock */ 501 /* Ignore IRQs whose rate is less than the clock */
501 if (delta < useful_load_threshold) 502 if (delta < useful_load_threshold)
502 continue; 503 continue;
503 /* update the load for the processor or package total */ 504 /* update the load for the processor or package total */
504 IRQ_DELTA(package_index,j) += delta; 505 IRQ_DELTA(package_index, j) += delta;
505 506
506 /* Keep track of the higher numbered sibling as well */ 507 /* Keep track of the higher numbered sibling as well */
507 if (i != package_index) 508 if (i != package_index)
@@ -527,7 +528,8 @@ static void do_irq_balance(void)
527 max_cpu_irq = ULONG_MAX; 528 max_cpu_irq = ULONG_MAX;
528 529
529tryanothercpu: 530tryanothercpu:
530 /* Look for heaviest loaded processor. 531 /*
532 * Look for heaviest loaded processor.
531 * We may come back to get the next heaviest loaded processor. 533 * We may come back to get the next heaviest loaded processor.
532 * Skip processors with trivial loads. 534 * Skip processors with trivial loads.
533 */ 535 */
@@ -536,7 +538,7 @@ tryanothercpu:
536 for_each_online_cpu(i) { 538 for_each_online_cpu(i) {
537 if (i != CPU_TO_PACKAGEINDEX(i)) 539 if (i != CPU_TO_PACKAGEINDEX(i))
538 continue; 540 continue;
539 if (max_cpu_irq <= CPU_IRQ(i)) 541 if (max_cpu_irq <= CPU_IRQ(i))
540 continue; 542 continue;
541 if (tmp_cpu_irq < CPU_IRQ(i)) { 543 if (tmp_cpu_irq < CPU_IRQ(i)) {
542 tmp_cpu_irq = CPU_IRQ(i); 544 tmp_cpu_irq = CPU_IRQ(i);
@@ -545,8 +547,9 @@ tryanothercpu:
545 } 547 }
546 548
547 if (tmp_loaded == -1) { 549 if (tmp_loaded == -1) {
548 /* In the case of small number of heavy interrupt sources, 550 /*
549 * loading some of the cpus too much. We use Ingo's original 551 * In the case of small number of heavy interrupt sources,
552 * loading some of the cpus too much. We use Ingo's original
550 * approach to rotate them around. 553 * approach to rotate them around.
551 */ 554 */
552 if (!first_attempt && imbalance >= useful_load_threshold) { 555 if (!first_attempt && imbalance >= useful_load_threshold) {
@@ -555,13 +558,14 @@ tryanothercpu:
555 } 558 }
556 goto not_worth_the_effort; 559 goto not_worth_the_effort;
557 } 560 }
558 561
559 first_attempt = 0; /* heaviest search */ 562 first_attempt = 0; /* heaviest search */
560 max_cpu_irq = tmp_cpu_irq; /* load */ 563 max_cpu_irq = tmp_cpu_irq; /* load */
561 max_loaded = tmp_loaded; /* processor */ 564 max_loaded = tmp_loaded; /* processor */
562 imbalance = (max_cpu_irq - min_cpu_irq) / 2; 565 imbalance = (max_cpu_irq - min_cpu_irq) / 2;
563 566
564 /* if imbalance is less than approx 10% of max load, then 567 /*
568 * if imbalance is less than approx 10% of max load, then
565 * observe diminishing returns action. - quit 569 * observe diminishing returns action. - quit
566 */ 570 */
567 if (imbalance < (max_cpu_irq >> 3)) 571 if (imbalance < (max_cpu_irq >> 3))
@@ -577,26 +581,25 @@ tryanotherirq:
577 /* Is this an active IRQ? */ 581 /* Is this an active IRQ? */
578 if (!irq_desc[j].action) 582 if (!irq_desc[j].action)
579 continue; 583 continue;
580 if (imbalance <= IRQ_DELTA(max_loaded,j)) 584 if (imbalance <= IRQ_DELTA(max_loaded, j))
581 continue; 585 continue;
582 /* Try to find the IRQ that is closest to the imbalance 586 /* Try to find the IRQ that is closest to the imbalance
583 * without going over. 587 * without going over.
584 */ 588 */
585 if (move_this_load < IRQ_DELTA(max_loaded,j)) { 589 if (move_this_load < IRQ_DELTA(max_loaded, j)) {
586 move_this_load = IRQ_DELTA(max_loaded,j); 590 move_this_load = IRQ_DELTA(max_loaded, j);
587 selected_irq = j; 591 selected_irq = j;
588 } 592 }
589 } 593 }
590 if (selected_irq == -1) { 594 if (selected_irq == -1)
591 goto tryanothercpu; 595 goto tryanothercpu;
592 }
593 596
594 imbalance = move_this_load; 597 imbalance = move_this_load;
595 598
596 /* For physical_balance case, we accumulated both load 599 /* For physical_balance case, we accumulated both load
597 * values in the one of the siblings cpu_irq[], 600 * values in the one of the siblings cpu_irq[],
598 * to use the same code for physical and logical processors 601 * to use the same code for physical and logical processors
599 * as much as possible. 602 * as much as possible.
600 * 603 *
601 * NOTE: the cpu_irq[] array holds the sum of the load for 604 * NOTE: the cpu_irq[] array holds the sum of the load for
602 * sibling A and sibling B in the slot for the lowest numbered 605 * sibling A and sibling B in the slot for the lowest numbered
@@ -625,11 +628,11 @@ tryanotherirq:
625 /* mark for change destination */ 628 /* mark for change destination */
626 set_pending_irq(selected_irq, cpumask_of_cpu(min_loaded)); 629 set_pending_irq(selected_irq, cpumask_of_cpu(min_loaded));
627 630
628 /* Since we made a change, come back sooner to 631 /* Since we made a change, come back sooner to
629 * check for more variation. 632 * check for more variation.
630 */ 633 */
631 balanced_irq_interval = max((long)MIN_BALANCED_IRQ_INTERVAL, 634 balanced_irq_interval = max((long)MIN_BALANCED_IRQ_INTERVAL,
632 balanced_irq_interval - BALANCED_IRQ_LESS_DELTA); 635 balanced_irq_interval - BALANCED_IRQ_LESS_DELTA);
633 return; 636 return;
634 } 637 }
635 goto tryanotherirq; 638 goto tryanotherirq;
@@ -640,7 +643,7 @@ not_worth_the_effort:
640 * upward 643 * upward
641 */ 644 */
642 balanced_irq_interval = min((long)MAX_BALANCED_IRQ_INTERVAL, 645 balanced_irq_interval = min((long)MAX_BALANCED_IRQ_INTERVAL,
643 balanced_irq_interval + BALANCED_IRQ_MORE_DELTA); 646 balanced_irq_interval + BALANCED_IRQ_MORE_DELTA);
644 return; 647 return;
645} 648}
646 649
@@ -679,13 +682,13 @@ static int __init balanced_irq_init(void)
679 cpumask_t tmp; 682 cpumask_t tmp;
680 683
681 cpus_shift_right(tmp, cpu_online_map, 2); 684 cpus_shift_right(tmp, cpu_online_map, 2);
682 c = &boot_cpu_data; 685 c = &boot_cpu_data;
683 /* When not overwritten by the command line ask subarchitecture. */ 686 /* When not overwritten by the command line ask subarchitecture. */
684 if (irqbalance_disabled == IRQBALANCE_CHECK_ARCH) 687 if (irqbalance_disabled == IRQBALANCE_CHECK_ARCH)
685 irqbalance_disabled = NO_BALANCE_IRQ; 688 irqbalance_disabled = NO_BALANCE_IRQ;
686 if (irqbalance_disabled) 689 if (irqbalance_disabled)
687 return 0; 690 return 0;
688 691
689 /* disable irqbalance completely if there is only one processor online */ 692 /* disable irqbalance completely if there is only one processor online */
690 if (num_online_cpus() < 2) { 693 if (num_online_cpus() < 2) {
691 irqbalance_disabled = 1; 694 irqbalance_disabled = 1;
@@ -699,16 +702,14 @@ static int __init balanced_irq_init(void)
699 physical_balance = 1; 702 physical_balance = 1;
700 703
701 for_each_online_cpu(i) { 704 for_each_online_cpu(i) {
702 irq_cpu_data[i].irq_delta = kmalloc(sizeof(unsigned long) * NR_IRQS, GFP_KERNEL); 705 irq_cpu_data[i].irq_delta = kzalloc(sizeof(unsigned long) * NR_IRQS, GFP_KERNEL);
703 irq_cpu_data[i].last_irq = kmalloc(sizeof(unsigned long) * NR_IRQS, GFP_KERNEL); 706 irq_cpu_data[i].last_irq = kzalloc(sizeof(unsigned long) * NR_IRQS, GFP_KERNEL);
704 if (irq_cpu_data[i].irq_delta == NULL || irq_cpu_data[i].last_irq == NULL) { 707 if (irq_cpu_data[i].irq_delta == NULL || irq_cpu_data[i].last_irq == NULL) {
705 printk(KERN_ERR "balanced_irq_init: out of memory"); 708 printk(KERN_ERR "balanced_irq_init: out of memory");
706 goto failed; 709 goto failed;
707 } 710 }
708 memset(irq_cpu_data[i].irq_delta,0,sizeof(unsigned long) * NR_IRQS);
709 memset(irq_cpu_data[i].last_irq,0,sizeof(unsigned long) * NR_IRQS);
710 } 711 }
711 712
712 printk(KERN_INFO "Starting balanced_irq\n"); 713 printk(KERN_INFO "Starting balanced_irq\n");
713 if (!IS_ERR(kthread_run(balanced_irq, NULL, "kirqd"))) 714 if (!IS_ERR(kthread_run(balanced_irq, NULL, "kirqd")))
714 return 0; 715 return 0;
@@ -843,7 +844,7 @@ static int __init find_isa_irq_apic(int irq, int type)
843 } 844 }
844 if (i < mp_irq_entries) { 845 if (i < mp_irq_entries) {
845 int apic; 846 int apic;
846 for(apic = 0; apic < nr_ioapics; apic++) { 847 for (apic = 0; apic < nr_ioapics; apic++) {
847 if (mp_ioapics[apic].mpc_apicid == mp_irqs[i].mpc_dstapic) 848 if (mp_ioapics[apic].mpc_apicid == mp_irqs[i].mpc_dstapic)
848 return apic; 849 return apic;
849 } 850 }
@@ -880,7 +881,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin)
880 !mp_irqs[i].mpc_irqtype && 881 !mp_irqs[i].mpc_irqtype &&
881 (bus == lbus) && 882 (bus == lbus) &&
882 (slot == ((mp_irqs[i].mpc_srcbusirq >> 2) & 0x1f))) { 883 (slot == ((mp_irqs[i].mpc_srcbusirq >> 2) & 0x1f))) {
883 int irq = pin_2_irq(i,apic,mp_irqs[i].mpc_dstirq); 884 int irq = pin_2_irq(i, apic, mp_irqs[i].mpc_dstirq);
884 885
885 if (!(apic || IO_APIC_IRQ(irq))) 886 if (!(apic || IO_APIC_IRQ(irq)))
886 continue; 887 continue;
@@ -900,7 +901,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin)
900EXPORT_SYMBOL(IO_APIC_get_PCI_irq_vector); 901EXPORT_SYMBOL(IO_APIC_get_PCI_irq_vector);
901 902
902/* 903/*
903 * This function currently is only a helper for the i386 smp boot process where 904 * This function currently is only a helper for the i386 smp boot process where
904 * we need to reprogram the ioredtbls to cater for the cpus which have come online 905 * we need to reprogram the ioredtbls to cater for the cpus which have come online
905 * so mask in all cases should simply be TARGET_CPUS 906 * so mask in all cases should simply be TARGET_CPUS
906 */ 907 */
@@ -975,37 +976,36 @@ static int MPBIOS_polarity(int idx)
975 /* 976 /*
976 * Determine IRQ line polarity (high active or low active): 977 * Determine IRQ line polarity (high active or low active):
977 */ 978 */
978 switch (mp_irqs[idx].mpc_irqflag & 3) 979 switch (mp_irqs[idx].mpc_irqflag & 3) {
980 case 0: /* conforms, ie. bus-type dependent polarity */
979 { 981 {
980 case 0: /* conforms, ie. bus-type dependent polarity */ 982 polarity = test_bit(bus, mp_bus_not_pci)?
981 { 983 default_ISA_polarity(idx):
982 polarity = test_bit(bus, mp_bus_not_pci)? 984 default_PCI_polarity(idx);
983 default_ISA_polarity(idx): 985 break;
984 default_PCI_polarity(idx); 986 }
985 break; 987 case 1: /* high active */
986 } 988 {
987 case 1: /* high active */ 989 polarity = 0;
988 { 990 break;
989 polarity = 0; 991 }
990 break; 992 case 2: /* reserved */
991 } 993 {
992 case 2: /* reserved */ 994 printk(KERN_WARNING "broken BIOS!!\n");
993 { 995 polarity = 1;
994 printk(KERN_WARNING "broken BIOS!!\n"); 996 break;
995 polarity = 1; 997 }
996 break; 998 case 3: /* low active */
997 } 999 {
998 case 3: /* low active */ 1000 polarity = 1;
999 { 1001 break;
1000 polarity = 1; 1002 }
1001 break; 1003 default: /* invalid */
1002 } 1004 {
1003 default: /* invalid */ 1005 printk(KERN_WARNING "broken BIOS!!\n");
1004 { 1006 polarity = 1;
1005 printk(KERN_WARNING "broken BIOS!!\n"); 1007 break;
1006 polarity = 1; 1008 }
1007 break;
1008 }
1009 } 1009 }
1010 return polarity; 1010 return polarity;
1011} 1011}
@@ -1018,69 +1018,67 @@ static int MPBIOS_trigger(int idx)
1018 /* 1018 /*
1019 * Determine IRQ trigger mode (edge or level sensitive): 1019 * Determine IRQ trigger mode (edge or level sensitive):
1020 */ 1020 */
1021 switch ((mp_irqs[idx].mpc_irqflag>>2) & 3) 1021 switch ((mp_irqs[idx].mpc_irqflag>>2) & 3) {
1022 case 0: /* conforms, ie. bus-type dependent */
1022 { 1023 {
1023 case 0: /* conforms, ie. bus-type dependent */ 1024 trigger = test_bit(bus, mp_bus_not_pci)?
1024 { 1025 default_ISA_trigger(idx):
1025 trigger = test_bit(bus, mp_bus_not_pci)? 1026 default_PCI_trigger(idx);
1026 default_ISA_trigger(idx):
1027 default_PCI_trigger(idx);
1028#if defined(CONFIG_EISA) || defined(CONFIG_MCA) 1027#if defined(CONFIG_EISA) || defined(CONFIG_MCA)
1029 switch (mp_bus_id_to_type[bus]) 1028 switch (mp_bus_id_to_type[bus]) {
1030 { 1029 case MP_BUS_ISA: /* ISA pin */
1031 case MP_BUS_ISA: /* ISA pin */ 1030 {
1032 { 1031 /* set before the switch */
1033 /* set before the switch */
1034 break;
1035 }
1036 case MP_BUS_EISA: /* EISA pin */
1037 {
1038 trigger = default_EISA_trigger(idx);
1039 break;
1040 }
1041 case MP_BUS_PCI: /* PCI pin */
1042 {
1043 /* set before the switch */
1044 break;
1045 }
1046 case MP_BUS_MCA: /* MCA pin */
1047 {
1048 trigger = default_MCA_trigger(idx);
1049 break;
1050 }
1051 default:
1052 {
1053 printk(KERN_WARNING "broken BIOS!!\n");
1054 trigger = 1;
1055 break;
1056 }
1057 }
1058#endif
1059 break; 1032 break;
1060 } 1033 }
1061 case 1: /* edge */ 1034 case MP_BUS_EISA: /* EISA pin */
1062 { 1035 {
1063 trigger = 0; 1036 trigger = default_EISA_trigger(idx);
1064 break; 1037 break;
1065 } 1038 }
1066 case 2: /* reserved */ 1039 case MP_BUS_PCI: /* PCI pin */
1067 { 1040 {
1068 printk(KERN_WARNING "broken BIOS!!\n"); 1041 /* set before the switch */
1069 trigger = 1;
1070 break; 1042 break;
1071 } 1043 }
1072 case 3: /* level */ 1044 case MP_BUS_MCA: /* MCA pin */
1073 { 1045 {
1074 trigger = 1; 1046 trigger = default_MCA_trigger(idx);
1075 break; 1047 break;
1076 } 1048 }
1077 default: /* invalid */ 1049 default:
1078 { 1050 {
1079 printk(KERN_WARNING "broken BIOS!!\n"); 1051 printk(KERN_WARNING "broken BIOS!!\n");
1080 trigger = 0; 1052 trigger = 1;
1081 break; 1053 break;
1082 } 1054 }
1083 } 1055 }
1056#endif
1057 break;
1058 }
1059 case 1: /* edge */
1060 {
1061 trigger = 0;
1062 break;
1063 }
1064 case 2: /* reserved */
1065 {
1066 printk(KERN_WARNING "broken BIOS!!\n");
1067 trigger = 1;
1068 break;
1069 }
1070 case 3: /* level */
1071 {
1072 trigger = 1;
1073 break;
1074 }
1075 default: /* invalid */
1076 {
1077 printk(KERN_WARNING "broken BIOS!!\n");
1078 trigger = 0;
1079 break;
1080 }
1081 }
1084 return trigger; 1082 return trigger;
1085} 1083}
1086 1084
@@ -1148,8 +1146,8 @@ static inline int IO_APIC_irq_trigger(int irq)
1148 1146
1149 for (apic = 0; apic < nr_ioapics; apic++) { 1147 for (apic = 0; apic < nr_ioapics; apic++) {
1150 for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) { 1148 for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) {
1151 idx = find_irq_entry(apic,pin,mp_INT); 1149 idx = find_irq_entry(apic, pin, mp_INT);
1152 if ((idx != -1) && (irq == pin_2_irq(idx,apic,pin))) 1150 if ((idx != -1) && (irq == pin_2_irq(idx, apic, pin)))
1153 return irq_trigger(idx); 1151 return irq_trigger(idx);
1154 } 1152 }
1155 } 1153 }
@@ -1164,7 +1162,7 @@ static u8 irq_vector[NR_IRQ_VECTORS] __read_mostly = { FIRST_DEVICE_VECTOR , 0 }
1164 1162
1165static int __assign_irq_vector(int irq) 1163static int __assign_irq_vector(int irq)
1166{ 1164{
1167 static int current_vector = FIRST_DEVICE_VECTOR, current_offset = 0; 1165 static int current_vector = FIRST_DEVICE_VECTOR, current_offset;
1168 int vector, offset; 1166 int vector, offset;
1169 1167
1170 BUG_ON((unsigned)irq >= NR_IRQ_VECTORS); 1168 BUG_ON((unsigned)irq >= NR_IRQ_VECTORS);
@@ -1237,15 +1235,15 @@ static void __init setup_IO_APIC_irqs(void)
1237 /* 1235 /*
1238 * add it to the IO-APIC irq-routing table: 1236 * add it to the IO-APIC irq-routing table:
1239 */ 1237 */
1240 memset(&entry,0,sizeof(entry)); 1238 memset(&entry, 0, sizeof(entry));
1241 1239
1242 entry.delivery_mode = INT_DELIVERY_MODE; 1240 entry.delivery_mode = INT_DELIVERY_MODE;
1243 entry.dest_mode = INT_DEST_MODE; 1241 entry.dest_mode = INT_DEST_MODE;
1244 entry.mask = 0; /* enable IRQ */ 1242 entry.mask = 0; /* enable IRQ */
1245 entry.dest.logical.logical_dest = 1243 entry.dest.logical.logical_dest =
1246 cpu_mask_to_apicid(TARGET_CPUS); 1244 cpu_mask_to_apicid(TARGET_CPUS);
1247 1245
1248 idx = find_irq_entry(apic,pin,mp_INT); 1246 idx = find_irq_entry(apic, pin, mp_INT);
1249 if (idx == -1) { 1247 if (idx == -1) {
1250 if (first_notcon) { 1248 if (first_notcon) {
1251 apic_printk(APIC_VERBOSE, KERN_DEBUG 1249 apic_printk(APIC_VERBOSE, KERN_DEBUG
@@ -1289,7 +1287,7 @@ static void __init setup_IO_APIC_irqs(void)
1289 vector = assign_irq_vector(irq); 1287 vector = assign_irq_vector(irq);
1290 entry.vector = vector; 1288 entry.vector = vector;
1291 ioapic_register_intr(irq, vector, IOAPIC_AUTO); 1289 ioapic_register_intr(irq, vector, IOAPIC_AUTO);
1292 1290
1293 if (!apic && (irq < 16)) 1291 if (!apic && (irq < 16))
1294 disable_8259A_irq(irq); 1292 disable_8259A_irq(irq);
1295 } 1293 }
@@ -1302,25 +1300,21 @@ static void __init setup_IO_APIC_irqs(void)
1302} 1300}
1303 1301
1304/* 1302/*
1305 * Set up the 8259A-master output pin: 1303 * Set up the timer pin, possibly with the 8259A-master behind.
1306 */ 1304 */
1307static void __init setup_ExtINT_IRQ0_pin(unsigned int apic, unsigned int pin, int vector) 1305static void __init setup_timer_IRQ0_pin(unsigned int apic, unsigned int pin,
1306 int vector)
1308{ 1307{
1309 struct IO_APIC_route_entry entry; 1308 struct IO_APIC_route_entry entry;
1310 1309
1311 memset(&entry,0,sizeof(entry)); 1310 memset(&entry, 0, sizeof(entry));
1312
1313 disable_8259A_irq(0);
1314
1315 /* mask LVT0 */
1316 apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
1317 1311
1318 /* 1312 /*
1319 * We use logical delivery to get the timer IRQ 1313 * We use logical delivery to get the timer IRQ
1320 * to the first CPU. 1314 * to the first CPU.
1321 */ 1315 */
1322 entry.dest_mode = INT_DEST_MODE; 1316 entry.dest_mode = INT_DEST_MODE;
1323 entry.mask = 0; /* unmask IRQ now */ 1317 entry.mask = 1; /* mask IRQ now */
1324 entry.dest.logical.logical_dest = cpu_mask_to_apicid(TARGET_CPUS); 1318 entry.dest.logical.logical_dest = cpu_mask_to_apicid(TARGET_CPUS);
1325 entry.delivery_mode = INT_DELIVERY_MODE; 1319 entry.delivery_mode = INT_DELIVERY_MODE;
1326 entry.polarity = 0; 1320 entry.polarity = 0;
@@ -1329,17 +1323,14 @@ static void __init setup_ExtINT_IRQ0_pin(unsigned int apic, unsigned int pin, in
1329 1323
1330 /* 1324 /*
1331 * The timer IRQ doesn't have to know that behind the 1325 * The timer IRQ doesn't have to know that behind the
1332 * scene we have a 8259A-master in AEOI mode ... 1326 * scene we may have a 8259A-master in AEOI mode ...
1333 */ 1327 */
1334 irq_desc[0].chip = &ioapic_chip; 1328 ioapic_register_intr(0, vector, IOAPIC_EDGE);
1335 set_irq_handler(0, handle_edge_irq);
1336 1329
1337 /* 1330 /*
1338 * Add it to the IO-APIC irq-routing table: 1331 * Add it to the IO-APIC irq-routing table:
1339 */ 1332 */
1340 ioapic_write_entry(apic, pin, entry); 1333 ioapic_write_entry(apic, pin, entry);
1341
1342 enable_8259A_irq(0);
1343} 1334}
1344 1335
1345void __init print_IO_APIC(void) 1336void __init print_IO_APIC(void)
@@ -1354,7 +1345,7 @@ void __init print_IO_APIC(void)
1354 if (apic_verbosity == APIC_QUIET) 1345 if (apic_verbosity == APIC_QUIET)
1355 return; 1346 return;
1356 1347
1357 printk(KERN_DEBUG "number of MP IRQ sources: %d.\n", mp_irq_entries); 1348 printk(KERN_DEBUG "number of MP IRQ sources: %d.\n", mp_irq_entries);
1358 for (i = 0; i < nr_ioapics; i++) 1349 for (i = 0; i < nr_ioapics; i++)
1359 printk(KERN_DEBUG "number of IO-APIC #%d registers: %d.\n", 1350 printk(KERN_DEBUG "number of IO-APIC #%d registers: %d.\n",
1360 mp_ioapics[i].mpc_apicid, nr_ioapic_registers[i]); 1351 mp_ioapics[i].mpc_apicid, nr_ioapic_registers[i]);
@@ -1459,7 +1450,7 @@ void __init print_IO_APIC(void)
1459 1450
1460#if 0 1451#if 0
1461 1452
1462static void print_APIC_bitfield (int base) 1453static void print_APIC_bitfield(int base)
1463{ 1454{
1464 unsigned int v; 1455 unsigned int v;
1465 int i, j; 1456 int i, j;
@@ -1480,7 +1471,7 @@ static void print_APIC_bitfield (int base)
1480 } 1471 }
1481} 1472}
1482 1473
1483void /*__init*/ print_local_APIC(void * dummy) 1474void /*__init*/ print_local_APIC(void *dummy)
1484{ 1475{
1485 unsigned int v, ver, maxlvt; 1476 unsigned int v, ver, maxlvt;
1486 1477
@@ -1489,6 +1480,7 @@ void /*__init*/ print_local_APIC(void * dummy)
1489 1480
1490 printk("\n" KERN_DEBUG "printing local APIC contents on CPU#%d/%d:\n", 1481 printk("\n" KERN_DEBUG "printing local APIC contents on CPU#%d/%d:\n",
1491 smp_processor_id(), hard_smp_processor_id()); 1482 smp_processor_id(), hard_smp_processor_id());
1483 v = apic_read(APIC_ID);
1492 printk(KERN_INFO "... APIC ID: %08x (%01x)\n", v, 1484 printk(KERN_INFO "... APIC ID: %08x (%01x)\n", v,
1493 GET_APIC_ID(read_apic_id())); 1485 GET_APIC_ID(read_apic_id()));
1494 v = apic_read(APIC_LVR); 1486 v = apic_read(APIC_LVR);
@@ -1563,7 +1555,7 @@ void /*__init*/ print_local_APIC(void * dummy)
1563 printk("\n"); 1555 printk("\n");
1564} 1556}
1565 1557
1566void print_all_local_APICs (void) 1558void print_all_local_APICs(void)
1567{ 1559{
1568 on_each_cpu(print_local_APIC, NULL, 1, 1); 1560 on_each_cpu(print_local_APIC, NULL, 1, 1);
1569} 1561}
@@ -1586,11 +1578,11 @@ void /*__init*/ print_PIC(void)
1586 v = inb(0xa0) << 8 | inb(0x20); 1578 v = inb(0xa0) << 8 | inb(0x20);
1587 printk(KERN_DEBUG "... PIC IRR: %04x\n", v); 1579 printk(KERN_DEBUG "... PIC IRR: %04x\n", v);
1588 1580
1589 outb(0x0b,0xa0); 1581 outb(0x0b, 0xa0);
1590 outb(0x0b,0x20); 1582 outb(0x0b, 0x20);
1591 v = inb(0xa0) << 8 | inb(0x20); 1583 v = inb(0xa0) << 8 | inb(0x20);
1592 outb(0x0a,0xa0); 1584 outb(0x0a, 0xa0);
1593 outb(0x0a,0x20); 1585 outb(0x0a, 0x20);
1594 1586
1595 spin_unlock_irqrestore(&i8259A_lock, flags); 1587 spin_unlock_irqrestore(&i8259A_lock, flags);
1596 1588
@@ -1626,7 +1618,7 @@ static void __init enable_IO_APIC(void)
1626 spin_unlock_irqrestore(&ioapic_lock, flags); 1618 spin_unlock_irqrestore(&ioapic_lock, flags);
1627 nr_ioapic_registers[apic] = reg_01.bits.entries+1; 1619 nr_ioapic_registers[apic] = reg_01.bits.entries+1;
1628 } 1620 }
1629 for(apic = 0; apic < nr_ioapics; apic++) { 1621 for (apic = 0; apic < nr_ioapics; apic++) {
1630 int pin; 1622 int pin;
1631 /* See if any of the pins is in ExtINT mode */ 1623 /* See if any of the pins is in ExtINT mode */
1632 for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) { 1624 for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) {
@@ -1748,7 +1740,7 @@ static void __init setup_ioapic_ids_from_mpc(void)
1748 spin_lock_irqsave(&ioapic_lock, flags); 1740 spin_lock_irqsave(&ioapic_lock, flags);
1749 reg_00.raw = io_apic_read(apic, 0); 1741 reg_00.raw = io_apic_read(apic, 0);
1750 spin_unlock_irqrestore(&ioapic_lock, flags); 1742 spin_unlock_irqrestore(&ioapic_lock, flags);
1751 1743
1752 old_id = mp_ioapics[apic].mpc_apicid; 1744 old_id = mp_ioapics[apic].mpc_apicid;
1753 1745
1754 if (mp_ioapics[apic].mpc_apicid >= get_physical_broadcast()) { 1746 if (mp_ioapics[apic].mpc_apicid >= get_physical_broadcast()) {
@@ -1800,7 +1792,7 @@ static void __init setup_ioapic_ids_from_mpc(void)
1800 /* 1792 /*
1801 * Read the right value from the MPC table and 1793 * Read the right value from the MPC table and
1802 * write it into the ID register. 1794 * write it into the ID register.
1803 */ 1795 */
1804 apic_printk(APIC_VERBOSE, KERN_INFO 1796 apic_printk(APIC_VERBOSE, KERN_INFO
1805 "...changing IO-APIC physical APIC ID to %d ...", 1797 "...changing IO-APIC physical APIC ID to %d ...",
1806 mp_ioapics[apic].mpc_apicid); 1798 mp_ioapics[apic].mpc_apicid);
@@ -2020,7 +2012,7 @@ static void ack_apic(unsigned int irq)
2020 ack_APIC_irq(); 2012 ack_APIC_irq();
2021} 2013}
2022 2014
2023static void mask_lapic_irq (unsigned int irq) 2015static void mask_lapic_irq(unsigned int irq)
2024{ 2016{
2025 unsigned long v; 2017 unsigned long v;
2026 2018
@@ -2028,7 +2020,7 @@ static void mask_lapic_irq (unsigned int irq)
2028 apic_write_around(APIC_LVT0, v | APIC_LVT_MASKED); 2020 apic_write_around(APIC_LVT0, v | APIC_LVT_MASKED);
2029} 2021}
2030 2022
2031static void unmask_lapic_irq (unsigned int irq) 2023static void unmask_lapic_irq(unsigned int irq)
2032{ 2024{
2033 unsigned long v; 2025 unsigned long v;
2034 2026
@@ -2037,7 +2029,7 @@ static void unmask_lapic_irq (unsigned int irq)
2037} 2029}
2038 2030
2039static struct irq_chip lapic_chip __read_mostly = { 2031static struct irq_chip lapic_chip __read_mostly = {
2040 .name = "local-APIC-edge", 2032 .name = "local-APIC",
2041 .mask = mask_lapic_irq, 2033 .mask = mask_lapic_irq,
2042 .unmask = unmask_lapic_irq, 2034 .unmask = unmask_lapic_irq,
2043 .eoi = ack_apic, 2035 .eoi = ack_apic,
@@ -2046,14 +2038,14 @@ static struct irq_chip lapic_chip __read_mostly = {
2046static void __init setup_nmi(void) 2038static void __init setup_nmi(void)
2047{ 2039{
2048 /* 2040 /*
2049 * Dirty trick to enable the NMI watchdog ... 2041 * Dirty trick to enable the NMI watchdog ...
2050 * We put the 8259A master into AEOI mode and 2042 * We put the 8259A master into AEOI mode and
2051 * unmask on all local APICs LVT0 as NMI. 2043 * unmask on all local APICs LVT0 as NMI.
2052 * 2044 *
2053 * The idea to use the 8259A in AEOI mode ('8259A Virtual Wire') 2045 * The idea to use the 8259A in AEOI mode ('8259A Virtual Wire')
2054 * is from Maciej W. Rozycki - so we do not have to EOI from 2046 * is from Maciej W. Rozycki - so we do not have to EOI from
2055 * the NMI handler or the timer interrupt. 2047 * the NMI handler or the timer interrupt.
2056 */ 2048 */
2057 apic_printk(APIC_VERBOSE, KERN_INFO "activating NMI Watchdog ..."); 2049 apic_printk(APIC_VERBOSE, KERN_INFO "activating NMI Watchdog ...");
2058 2050
2059 enable_NMI_through_LVT0(); 2051 enable_NMI_through_LVT0();
@@ -2129,6 +2121,7 @@ static inline void __init unlock_ExtINT_logic(void)
2129static inline void __init check_timer(void) 2121static inline void __init check_timer(void)
2130{ 2122{
2131 int apic1, pin1, apic2, pin2; 2123 int apic1, pin1, apic2, pin2;
2124 int no_pin1 = 0;
2132 int vector; 2125 int vector;
2133 unsigned int ver; 2126 unsigned int ver;
2134 unsigned long flags; 2127 unsigned long flags;
@@ -2146,21 +2139,17 @@ static inline void __init check_timer(void)
2146 set_intr_gate(vector, interrupt[0]); 2139 set_intr_gate(vector, interrupt[0]);
2147 2140
2148 /* 2141 /*
2149 * Subtle, code in do_timer_interrupt() expects an AEOI 2142 * As IRQ0 is to be enabled in the 8259A, the virtual
2150 * mode for the 8259A whenever interrupts are routed 2143 * wire has to be disabled in the local APIC. Also
2151 * through I/O APICs. Also IRQ0 has to be enabled in 2144 * timer interrupts need to be acknowledged manually in
2152 * the 8259A which implies the virtual wire has to be 2145 * the 8259A for the i82489DX when using the NMI
2153 * disabled in the local APIC. Finally timer interrupts 2146 * watchdog as that APIC treats NMIs as level-triggered.
2154 * need to be acknowledged manually in the 8259A for 2147 * The AEOI mode will finish them in the 8259A
2155 * timer_interrupt() and for the i82489DX when using 2148 * automatically.
2156 * the NMI watchdog.
2157 */ 2149 */
2158 apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); 2150 apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
2159 init_8259A(1); 2151 init_8259A(1);
2160 timer_ack = !cpu_has_tsc; 2152 timer_ack = (nmi_watchdog == NMI_IO_APIC && !APIC_INTEGRATED(ver));
2161 timer_ack |= (nmi_watchdog == NMI_IO_APIC && !APIC_INTEGRATED(ver));
2162 if (timer_over_8254 > 0)
2163 enable_8259A_irq(0);
2164 2153
2165 pin1 = find_isa_irq_pin(0, mp_INT); 2154 pin1 = find_isa_irq_pin(0, mp_INT);
2166 apic1 = find_isa_irq_apic(0, mp_INT); 2155 apic1 = find_isa_irq_apic(0, mp_INT);
@@ -2170,14 +2159,33 @@ static inline void __init check_timer(void)
2170 printk(KERN_INFO "..TIMER: vector=0x%02X apic1=%d pin1=%d apic2=%d pin2=%d\n", 2159 printk(KERN_INFO "..TIMER: vector=0x%02X apic1=%d pin1=%d apic2=%d pin2=%d\n",
2171 vector, apic1, pin1, apic2, pin2); 2160 vector, apic1, pin1, apic2, pin2);
2172 2161
2162 /*
2163 * Some BIOS writers are clueless and report the ExtINTA
2164 * I/O APIC input from the cascaded 8259A as the timer
2165 * interrupt input. So just in case, if only one pin
2166 * was found above, try it both directly and through the
2167 * 8259A.
2168 */
2169 if (pin1 == -1) {
2170 pin1 = pin2;
2171 apic1 = apic2;
2172 no_pin1 = 1;
2173 } else if (pin2 == -1) {
2174 pin2 = pin1;
2175 apic2 = apic1;
2176 }
2177
2173 if (pin1 != -1) { 2178 if (pin1 != -1) {
2174 /* 2179 /*
2175 * Ok, does IRQ0 through the IOAPIC work? 2180 * Ok, does IRQ0 through the IOAPIC work?
2176 */ 2181 */
2182 if (no_pin1) {
2183 add_pin_to_irq(0, apic1, pin1);
2184 setup_timer_IRQ0_pin(apic1, pin1, vector);
2185 }
2177 unmask_IO_APIC_irq(0); 2186 unmask_IO_APIC_irq(0);
2178 if (timer_irq_works()) { 2187 if (timer_irq_works()) {
2179 if (nmi_watchdog == NMI_IO_APIC) { 2188 if (nmi_watchdog == NMI_IO_APIC) {
2180 disable_8259A_irq(0);
2181 setup_nmi(); 2189 setup_nmi();
2182 enable_8259A_irq(0); 2190 enable_8259A_irq(0);
2183 } 2191 }
@@ -2186,43 +2194,46 @@ static inline void __init check_timer(void)
2186 goto out; 2194 goto out;
2187 } 2195 }
2188 clear_IO_APIC_pin(apic1, pin1); 2196 clear_IO_APIC_pin(apic1, pin1);
2189 printk(KERN_ERR "..MP-BIOS bug: 8254 timer not connected to " 2197 if (!no_pin1)
2190 "IO-APIC\n"); 2198 printk(KERN_ERR "..MP-BIOS bug: "
2191 } 2199 "8254 timer not connected to IO-APIC\n");
2192 2200
2193 printk(KERN_INFO "...trying to set up timer (IRQ0) through the 8259A ... "); 2201 printk(KERN_INFO "...trying to set up timer (IRQ0) "
2194 if (pin2 != -1) { 2202 "through the 8259A ... ");
2195 printk("\n..... (found pin %d) ...", pin2); 2203 printk("\n..... (found pin %d) ...", pin2);
2196 /* 2204 /*
2197 * legacy devices should be connected to IO APIC #0 2205 * legacy devices should be connected to IO APIC #0
2198 */ 2206 */
2199 setup_ExtINT_IRQ0_pin(apic2, pin2, vector); 2207 replace_pin_at_irq(0, apic1, pin1, apic2, pin2);
2208 setup_timer_IRQ0_pin(apic2, pin2, vector);
2209 unmask_IO_APIC_irq(0);
2210 enable_8259A_irq(0);
2200 if (timer_irq_works()) { 2211 if (timer_irq_works()) {
2201 printk("works.\n"); 2212 printk("works.\n");
2202 if (pin1 != -1) 2213 timer_through_8259 = 1;
2203 replace_pin_at_irq(0, apic1, pin1, apic2, pin2);
2204 else
2205 add_pin_to_irq(0, apic2, pin2);
2206 if (nmi_watchdog == NMI_IO_APIC) { 2214 if (nmi_watchdog == NMI_IO_APIC) {
2215 disable_8259A_irq(0);
2207 setup_nmi(); 2216 setup_nmi();
2217 enable_8259A_irq(0);
2208 } 2218 }
2209 goto out; 2219 goto out;
2210 } 2220 }
2211 /* 2221 /*
2212 * Cleanup, just in case ... 2222 * Cleanup, just in case ...
2213 */ 2223 */
2224 disable_8259A_irq(0);
2214 clear_IO_APIC_pin(apic2, pin2); 2225 clear_IO_APIC_pin(apic2, pin2);
2226 printk(" failed.\n");
2215 } 2227 }
2216 printk(" failed.\n");
2217 2228
2218 if (nmi_watchdog == NMI_IO_APIC) { 2229 if (nmi_watchdog == NMI_IO_APIC) {
2219 printk(KERN_WARNING "timer doesn't work through the IO-APIC - disabling NMI Watchdog!\n"); 2230 printk(KERN_WARNING "timer doesn't work through the IO-APIC - disabling NMI Watchdog!\n");
2220 nmi_watchdog = 0; 2231 nmi_watchdog = NMI_NONE;
2221 } 2232 }
2233 timer_ack = 0;
2222 2234
2223 printk(KERN_INFO "...trying to set up timer as Virtual Wire IRQ..."); 2235 printk(KERN_INFO "...trying to set up timer as Virtual Wire IRQ...");
2224 2236
2225 disable_8259A_irq(0);
2226 set_irq_chip_and_handler_name(0, &lapic_chip, handle_fasteoi_irq, 2237 set_irq_chip_and_handler_name(0, &lapic_chip, handle_fasteoi_irq,
2227 "fasteoi"); 2238 "fasteoi");
2228 apic_write_around(APIC_LVT0, APIC_DM_FIXED | vector); /* Fixed mode */ 2239 apic_write_around(APIC_LVT0, APIC_DM_FIXED | vector); /* Fixed mode */
@@ -2232,12 +2243,12 @@ static inline void __init check_timer(void)
2232 printk(" works.\n"); 2243 printk(" works.\n");
2233 goto out; 2244 goto out;
2234 } 2245 }
2246 disable_8259A_irq(0);
2235 apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | vector); 2247 apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | vector);
2236 printk(" failed.\n"); 2248 printk(" failed.\n");
2237 2249
2238 printk(KERN_INFO "...trying to set up timer as ExtINT IRQ..."); 2250 printk(KERN_INFO "...trying to set up timer as ExtINT IRQ...");
2239 2251
2240 timer_ack = 0;
2241 init_8259A(0); 2252 init_8259A(0);
2242 make_8259A_irq(0); 2253 make_8259A_irq(0);
2243 apic_write_around(APIC_LVT0, APIC_DM_EXTINT); 2254 apic_write_around(APIC_LVT0, APIC_DM_EXTINT);
@@ -2294,28 +2305,14 @@ void __init setup_IO_APIC(void)
2294 print_IO_APIC(); 2305 print_IO_APIC();
2295} 2306}
2296 2307
2297static int __init setup_disable_8254_timer(char *s)
2298{
2299 timer_over_8254 = -1;
2300 return 1;
2301}
2302static int __init setup_enable_8254_timer(char *s)
2303{
2304 timer_over_8254 = 2;
2305 return 1;
2306}
2307
2308__setup("disable_8254_timer", setup_disable_8254_timer);
2309__setup("enable_8254_timer", setup_enable_8254_timer);
2310
2311/* 2308/*
2312 * Called after all the initialization is done. If we didnt find any 2309 * Called after all the initialization is done. If we didnt find any
2313 * APIC bugs then we can allow the modify fast path 2310 * APIC bugs then we can allow the modify fast path
2314 */ 2311 */
2315 2312
2316static int __init io_apic_bug_finalize(void) 2313static int __init io_apic_bug_finalize(void)
2317{ 2314{
2318 if(sis_apic_bug == -1) 2315 if (sis_apic_bug == -1)
2319 sis_apic_bug = 0; 2316 sis_apic_bug = 0;
2320 return 0; 2317 return 0;
2321} 2318}
@@ -2326,17 +2323,17 @@ struct sysfs_ioapic_data {
2326 struct sys_device dev; 2323 struct sys_device dev;
2327 struct IO_APIC_route_entry entry[0]; 2324 struct IO_APIC_route_entry entry[0];
2328}; 2325};
2329static struct sysfs_ioapic_data * mp_ioapic_data[MAX_IO_APICS]; 2326static struct sysfs_ioapic_data *mp_ioapic_data[MAX_IO_APICS];
2330 2327
2331static int ioapic_suspend(struct sys_device *dev, pm_message_t state) 2328static int ioapic_suspend(struct sys_device *dev, pm_message_t state)
2332{ 2329{
2333 struct IO_APIC_route_entry *entry; 2330 struct IO_APIC_route_entry *entry;
2334 struct sysfs_ioapic_data *data; 2331 struct sysfs_ioapic_data *data;
2335 int i; 2332 int i;
2336 2333
2337 data = container_of(dev, struct sysfs_ioapic_data, dev); 2334 data = container_of(dev, struct sysfs_ioapic_data, dev);
2338 entry = data->entry; 2335 entry = data->entry;
2339 for (i = 0; i < nr_ioapic_registers[dev->id]; i ++) 2336 for (i = 0; i < nr_ioapic_registers[dev->id]; i++)
2340 entry[i] = ioapic_read_entry(dev->id, i); 2337 entry[i] = ioapic_read_entry(dev->id, i);
2341 2338
2342 return 0; 2339 return 0;
@@ -2349,7 +2346,7 @@ static int ioapic_resume(struct sys_device *dev)
2349 unsigned long flags; 2346 unsigned long flags;
2350 union IO_APIC_reg_00 reg_00; 2347 union IO_APIC_reg_00 reg_00;
2351 int i; 2348 int i;
2352 2349
2353 data = container_of(dev, struct sysfs_ioapic_data, dev); 2350 data = container_of(dev, struct sysfs_ioapic_data, dev);
2354 entry = data->entry; 2351 entry = data->entry;
2355 2352
@@ -2360,7 +2357,7 @@ static int ioapic_resume(struct sys_device *dev)
2360 io_apic_write(dev->id, 0, reg_00.raw); 2357 io_apic_write(dev->id, 0, reg_00.raw);
2361 } 2358 }
2362 spin_unlock_irqrestore(&ioapic_lock, flags); 2359 spin_unlock_irqrestore(&ioapic_lock, flags);
2363 for (i = 0; i < nr_ioapic_registers[dev->id]; i ++) 2360 for (i = 0; i < nr_ioapic_registers[dev->id]; i++)
2364 ioapic_write_entry(dev->id, i, entry[i]); 2361 ioapic_write_entry(dev->id, i, entry[i]);
2365 2362
2366 return 0; 2363 return 0;
@@ -2374,24 +2371,23 @@ static struct sysdev_class ioapic_sysdev_class = {
2374 2371
2375static int __init ioapic_init_sysfs(void) 2372static int __init ioapic_init_sysfs(void)
2376{ 2373{
2377 struct sys_device * dev; 2374 struct sys_device *dev;
2378 int i, size, error = 0; 2375 int i, size, error = 0;
2379 2376
2380 error = sysdev_class_register(&ioapic_sysdev_class); 2377 error = sysdev_class_register(&ioapic_sysdev_class);
2381 if (error) 2378 if (error)
2382 return error; 2379 return error;
2383 2380
2384 for (i = 0; i < nr_ioapics; i++ ) { 2381 for (i = 0; i < nr_ioapics; i++) {
2385 size = sizeof(struct sys_device) + nr_ioapic_registers[i] 2382 size = sizeof(struct sys_device) + nr_ioapic_registers[i]
2386 * sizeof(struct IO_APIC_route_entry); 2383 * sizeof(struct IO_APIC_route_entry);
2387 mp_ioapic_data[i] = kmalloc(size, GFP_KERNEL); 2384 mp_ioapic_data[i] = kzalloc(size, GFP_KERNEL);
2388 if (!mp_ioapic_data[i]) { 2385 if (!mp_ioapic_data[i]) {
2389 printk(KERN_ERR "Can't suspend/resume IOAPIC %d\n", i); 2386 printk(KERN_ERR "Can't suspend/resume IOAPIC %d\n", i);
2390 continue; 2387 continue;
2391 } 2388 }
2392 memset(mp_ioapic_data[i], 0, size);
2393 dev = &mp_ioapic_data[i]->dev; 2389 dev = &mp_ioapic_data[i]->dev;
2394 dev->id = i; 2390 dev->id = i;
2395 dev->cls = &ioapic_sysdev_class; 2391 dev->cls = &ioapic_sysdev_class;
2396 error = sysdev_register(dev); 2392 error = sysdev_register(dev);
2397 if (error) { 2393 if (error) {
@@ -2466,7 +2462,7 @@ static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq, struct msi_ms
2466 msg->address_lo = 2462 msg->address_lo =
2467 MSI_ADDR_BASE_LO | 2463 MSI_ADDR_BASE_LO |
2468 ((INT_DEST_MODE == 0) ? 2464 ((INT_DEST_MODE == 0) ?
2469 MSI_ADDR_DEST_MODE_PHYSICAL: 2465MSI_ADDR_DEST_MODE_PHYSICAL:
2470 MSI_ADDR_DEST_MODE_LOGICAL) | 2466 MSI_ADDR_DEST_MODE_LOGICAL) |
2471 ((INT_DELIVERY_MODE != dest_LowestPrio) ? 2467 ((INT_DELIVERY_MODE != dest_LowestPrio) ?
2472 MSI_ADDR_REDIRECTION_CPU: 2468 MSI_ADDR_REDIRECTION_CPU:
@@ -2477,7 +2473,7 @@ static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq, struct msi_ms
2477 MSI_DATA_TRIGGER_EDGE | 2473 MSI_DATA_TRIGGER_EDGE |
2478 MSI_DATA_LEVEL_ASSERT | 2474 MSI_DATA_LEVEL_ASSERT |
2479 ((INT_DELIVERY_MODE != dest_LowestPrio) ? 2475 ((INT_DELIVERY_MODE != dest_LowestPrio) ?
2480 MSI_DATA_DELIVERY_FIXED: 2476MSI_DATA_DELIVERY_FIXED:
2481 MSI_DATA_DELIVERY_LOWPRI) | 2477 MSI_DATA_DELIVERY_LOWPRI) |
2482 MSI_DATA_VECTOR(vector); 2478 MSI_DATA_VECTOR(vector);
2483 } 2479 }
@@ -2648,12 +2644,12 @@ int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev)
2648#endif /* CONFIG_HT_IRQ */ 2644#endif /* CONFIG_HT_IRQ */
2649 2645
2650/* -------------------------------------------------------------------------- 2646/* --------------------------------------------------------------------------
2651 ACPI-based IOAPIC Configuration 2647 ACPI-based IOAPIC Configuration
2652 -------------------------------------------------------------------------- */ 2648 -------------------------------------------------------------------------- */
2653 2649
2654#ifdef CONFIG_ACPI 2650#ifdef CONFIG_ACPI
2655 2651
2656int __init io_apic_get_unique_id (int ioapic, int apic_id) 2652int __init io_apic_get_unique_id(int ioapic, int apic_id)
2657{ 2653{
2658 union IO_APIC_reg_00 reg_00; 2654 union IO_APIC_reg_00 reg_00;
2659 static physid_mask_t apic_id_map = PHYSID_MASK_NONE; 2655 static physid_mask_t apic_id_map = PHYSID_MASK_NONE;
@@ -2662,10 +2658,10 @@ int __init io_apic_get_unique_id (int ioapic, int apic_id)
2662 int i = 0; 2658 int i = 0;
2663 2659
2664 /* 2660 /*
2665 * The P4 platform supports up to 256 APIC IDs on two separate APIC 2661 * The P4 platform supports up to 256 APIC IDs on two separate APIC
2666 * buses (one for LAPICs, one for IOAPICs), where predecessors only 2662 * buses (one for LAPICs, one for IOAPICs), where predecessors only
2667 * supports up to 16 on one shared APIC bus. 2663 * supports up to 16 on one shared APIC bus.
2668 * 2664 *
2669 * TBD: Expand LAPIC/IOAPIC support on P4-class systems to take full 2665 * TBD: Expand LAPIC/IOAPIC support on P4-class systems to take full
2670 * advantage of new APIC bus architecture. 2666 * advantage of new APIC bus architecture.
2671 */ 2667 */
@@ -2684,7 +2680,7 @@ int __init io_apic_get_unique_id (int ioapic, int apic_id)
2684 } 2680 }
2685 2681
2686 /* 2682 /*
2687 * Every APIC in a system must have a unique ID or we get lots of nice 2683 * Every APIC in a system must have a unique ID or we get lots of nice
2688 * 'stuck on smp_invalidate_needed IPI wait' messages. 2684 * 'stuck on smp_invalidate_needed IPI wait' messages.
2689 */ 2685 */
2690 if (check_apicid_used(apic_id_map, apic_id)) { 2686 if (check_apicid_used(apic_id_map, apic_id)) {
@@ -2701,7 +2697,7 @@ int __init io_apic_get_unique_id (int ioapic, int apic_id)
2701 "trying %d\n", ioapic, apic_id, i); 2697 "trying %d\n", ioapic, apic_id, i);
2702 2698
2703 apic_id = i; 2699 apic_id = i;
2704 } 2700 }
2705 2701
2706 tmp = apicid_to_cpu_present(apic_id); 2702 tmp = apicid_to_cpu_present(apic_id);
2707 physids_or(apic_id_map, apic_id_map, tmp); 2703 physids_or(apic_id_map, apic_id_map, tmp);
@@ -2728,7 +2724,7 @@ int __init io_apic_get_unique_id (int ioapic, int apic_id)
2728} 2724}
2729 2725
2730 2726
2731int __init io_apic_get_version (int ioapic) 2727int __init io_apic_get_version(int ioapic)
2732{ 2728{
2733 union IO_APIC_reg_01 reg_01; 2729 union IO_APIC_reg_01 reg_01;
2734 unsigned long flags; 2730 unsigned long flags;
@@ -2741,7 +2737,7 @@ int __init io_apic_get_version (int ioapic)
2741} 2737}
2742 2738
2743 2739
2744int __init io_apic_get_redir_entries (int ioapic) 2740int __init io_apic_get_redir_entries(int ioapic)
2745{ 2741{
2746 union IO_APIC_reg_01 reg_01; 2742 union IO_APIC_reg_01 reg_01;
2747 unsigned long flags; 2743 unsigned long flags;
@@ -2754,7 +2750,7 @@ int __init io_apic_get_redir_entries (int ioapic)
2754} 2750}
2755 2751
2756 2752
2757int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int active_high_low) 2753int io_apic_set_pci_routing(int ioapic, int pin, int irq, int edge_level, int active_high_low)
2758{ 2754{
2759 struct IO_APIC_route_entry entry; 2755 struct IO_APIC_route_entry entry;
2760 2756
@@ -2770,7 +2766,7 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int a
2770 * corresponding device driver registers for this IRQ. 2766 * corresponding device driver registers for this IRQ.
2771 */ 2767 */
2772 2768
2773 memset(&entry,0,sizeof(entry)); 2769 memset(&entry, 0, sizeof(entry));
2774 2770
2775 entry.delivery_mode = INT_DELIVERY_MODE; 2771 entry.delivery_mode = INT_DELIVERY_MODE;
2776 entry.dest_mode = INT_DEST_MODE; 2772 entry.dest_mode = INT_DEST_MODE;
diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c
index ef1a8dfcc529..e5ef60303562 100644
--- a/arch/x86/kernel/io_apic_64.c
+++ b/arch/x86/kernel/io_apic_64.c
@@ -61,7 +61,7 @@ struct irq_cfg {
61}; 61};
62 62
63/* irq_cfg is indexed by the sum of all RTEs in all I/O APICs. */ 63/* irq_cfg is indexed by the sum of all RTEs in all I/O APICs. */
64struct irq_cfg irq_cfg[NR_IRQS] __read_mostly = { 64static struct irq_cfg irq_cfg[NR_IRQS] __read_mostly = {
65 [0] = { .domain = CPU_MASK_ALL, .vector = IRQ0_VECTOR, }, 65 [0] = { .domain = CPU_MASK_ALL, .vector = IRQ0_VECTOR, },
66 [1] = { .domain = CPU_MASK_ALL, .vector = IRQ1_VECTOR, }, 66 [1] = { .domain = CPU_MASK_ALL, .vector = IRQ1_VECTOR, },
67 [2] = { .domain = CPU_MASK_ALL, .vector = IRQ2_VECTOR, }, 67 [2] = { .domain = CPU_MASK_ALL, .vector = IRQ2_VECTOR, },
@@ -90,7 +90,7 @@ static int no_timer_check;
90 90
91static int disable_timer_pin_1 __initdata; 91static int disable_timer_pin_1 __initdata;
92 92
93int timer_over_8254 __initdata = 1; 93int timer_through_8259 __initdata;
94 94
95/* Where if anywhere is the i8259 connect in external int mode */ 95/* Where if anywhere is the i8259 connect in external int mode */
96static struct { int pin, apic; } ioapic_i8259 = { -1, -1 }; 96static struct { int pin, apic; } ioapic_i8259 = { -1, -1 };
@@ -183,7 +183,7 @@ static bool io_apic_level_ack_pending(unsigned int irq)
183 break; 183 break;
184 reg = io_apic_read(entry->apic, 0x10 + pin*2); 184 reg = io_apic_read(entry->apic, 0x10 + pin*2);
185 /* Is the remote IRR bit set? */ 185 /* Is the remote IRR bit set? */
186 if ((reg >> 14) & 1) { 186 if (reg & IO_APIC_REDIR_REMOTE_IRR) {
187 spin_unlock_irqrestore(&ioapic_lock, flags); 187 spin_unlock_irqrestore(&ioapic_lock, flags);
188 return true; 188 return true;
189 } 189 }
@@ -298,7 +298,7 @@ static void __target_IO_APIC_irq(unsigned int irq, unsigned int dest, u8 vector)
298 break; 298 break;
299 io_apic_write(apic, 0x11 + pin*2, dest); 299 io_apic_write(apic, 0x11 + pin*2, dest);
300 reg = io_apic_read(apic, 0x10 + pin*2); 300 reg = io_apic_read(apic, 0x10 + pin*2);
301 reg &= ~0x000000ff; 301 reg &= ~IO_APIC_REDIR_VECTOR_MASK;
302 reg |= vector; 302 reg |= vector;
303 io_apic_modify(apic, reg); 303 io_apic_modify(apic, reg);
304 if (!entry->next) 304 if (!entry->next)
@@ -360,16 +360,37 @@ static void add_pin_to_irq(unsigned int irq, int apic, int pin)
360 entry->pin = pin; 360 entry->pin = pin;
361} 361}
362 362
363/*
364 * Reroute an IRQ to a different pin.
365 */
366static void __init replace_pin_at_irq(unsigned int irq,
367 int oldapic, int oldpin,
368 int newapic, int newpin)
369{
370 struct irq_pin_list *entry = irq_2_pin + irq;
371
372 while (1) {
373 if (entry->apic == oldapic && entry->pin == oldpin) {
374 entry->apic = newapic;
375 entry->pin = newpin;
376 }
377 if (!entry->next)
378 break;
379 entry = irq_2_pin + entry->next;
380 }
381}
382
363 383
364#define DO_ACTION(name,R,ACTION, FINAL) \ 384#define DO_ACTION(name,R,ACTION, FINAL) \
365 \ 385 \
366 static void name##_IO_APIC_irq (unsigned int irq) \ 386 static void name##_IO_APIC_irq (unsigned int irq) \
367 __DO_ACTION(R, ACTION, FINAL) 387 __DO_ACTION(R, ACTION, FINAL)
368 388
369DO_ACTION( __mask, 0, |= 0x00010000, io_apic_sync(entry->apic) ) 389/* mask = 1 */
370 /* mask = 1 */ 390DO_ACTION(__mask, 0, |= IO_APIC_REDIR_MASKED, io_apic_sync(entry->apic))
371DO_ACTION( __unmask, 0, &= 0xfffeffff, ) 391
372 /* mask = 0 */ 392/* mask = 0 */
393DO_ACTION(__unmask, 0, &= ~IO_APIC_REDIR_MASKED, )
373 394
374static void mask_IO_APIC_irq (unsigned int irq) 395static void mask_IO_APIC_irq (unsigned int irq)
375{ 396{
@@ -430,20 +451,6 @@ static int __init disable_timer_pin_setup(char *arg)
430} 451}
431__setup("disable_timer_pin_1", disable_timer_pin_setup); 452__setup("disable_timer_pin_1", disable_timer_pin_setup);
432 453
433static int __init setup_disable_8254_timer(char *s)
434{
435 timer_over_8254 = -1;
436 return 1;
437}
438static int __init setup_enable_8254_timer(char *s)
439{
440 timer_over_8254 = 2;
441 return 1;
442}
443
444__setup("disable_8254_timer", setup_disable_8254_timer);
445__setup("enable_8254_timer", setup_enable_8254_timer);
446
447 454
448/* 455/*
449 * Find the IRQ entry number of a certain pin. 456 * Find the IRQ entry number of a certain pin.
@@ -911,26 +918,21 @@ static void __init setup_IO_APIC_irqs(void)
911} 918}
912 919
913/* 920/*
914 * Set up the 8259A-master output pin as broadcast to all 921 * Set up the timer pin, possibly with the 8259A-master behind.
915 * CPUs.
916 */ 922 */
917static void __init setup_ExtINT_IRQ0_pin(unsigned int apic, unsigned int pin, int vector) 923static void __init setup_timer_IRQ0_pin(unsigned int apic, unsigned int pin,
924 int vector)
918{ 925{
919 struct IO_APIC_route_entry entry; 926 struct IO_APIC_route_entry entry;
920 927
921 memset(&entry, 0, sizeof(entry)); 928 memset(&entry, 0, sizeof(entry));
922 929
923 disable_8259A_irq(0);
924
925 /* mask LVT0 */
926 apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
927
928 /* 930 /*
929 * We use logical delivery to get the timer IRQ 931 * We use logical delivery to get the timer IRQ
930 * to the first CPU. 932 * to the first CPU.
931 */ 933 */
932 entry.dest_mode = INT_DEST_MODE; 934 entry.dest_mode = INT_DEST_MODE;
933 entry.mask = 0; /* unmask IRQ now */ 935 entry.mask = 1; /* mask IRQ now */
934 entry.dest = cpu_mask_to_apicid(TARGET_CPUS); 936 entry.dest = cpu_mask_to_apicid(TARGET_CPUS);
935 entry.delivery_mode = INT_DELIVERY_MODE; 937 entry.delivery_mode = INT_DELIVERY_MODE;
936 entry.polarity = 0; 938 entry.polarity = 0;
@@ -939,7 +941,7 @@ static void __init setup_ExtINT_IRQ0_pin(unsigned int apic, unsigned int pin, in
939 941
940 /* 942 /*
941 * The timer IRQ doesn't have to know that behind the 943 * The timer IRQ doesn't have to know that behind the
942 * scene we have a 8259A-master in AEOI mode ... 944 * scene we may have a 8259A-master in AEOI mode ...
943 */ 945 */
944 set_irq_chip_and_handler_name(0, &ioapic_chip, handle_edge_irq, "edge"); 946 set_irq_chip_and_handler_name(0, &ioapic_chip, handle_edge_irq, "edge");
945 947
@@ -947,8 +949,6 @@ static void __init setup_ExtINT_IRQ0_pin(unsigned int apic, unsigned int pin, in
947 * Add it to the IO-APIC irq-routing table: 949 * Add it to the IO-APIC irq-routing table:
948 */ 950 */
949 ioapic_write_entry(apic, pin, entry); 951 ioapic_write_entry(apic, pin, entry);
950
951 enable_8259A_irq(0);
952} 952}
953 953
954void __apicdebuginit print_IO_APIC(void) 954void __apicdebuginit print_IO_APIC(void)
@@ -1077,6 +1077,7 @@ void __apicdebuginit print_local_APIC(void * dummy)
1077 1077
1078 printk("\n" KERN_DEBUG "printing local APIC contents on CPU#%d/%d:\n", 1078 printk("\n" KERN_DEBUG "printing local APIC contents on CPU#%d/%d:\n",
1079 smp_processor_id(), hard_smp_processor_id()); 1079 smp_processor_id(), hard_smp_processor_id());
1080 v = apic_read(APIC_ID);
1080 printk(KERN_INFO "... APIC ID: %08x (%01x)\n", v, GET_APIC_ID(read_apic_id())); 1081 printk(KERN_INFO "... APIC ID: %08x (%01x)\n", v, GET_APIC_ID(read_apic_id()));
1081 v = apic_read(APIC_LVR); 1082 v = apic_read(APIC_LVR);
1082 printk(KERN_INFO "... APIC VERSION: %08x\n", v); 1083 printk(KERN_INFO "... APIC VERSION: %08x\n", v);
@@ -1659,6 +1660,7 @@ static inline void __init check_timer(void)
1659 struct irq_cfg *cfg = irq_cfg + 0; 1660 struct irq_cfg *cfg = irq_cfg + 0;
1660 int apic1, pin1, apic2, pin2; 1661 int apic1, pin1, apic2, pin2;
1661 unsigned long flags; 1662 unsigned long flags;
1663 int no_pin1 = 0;
1662 1664
1663 local_irq_save(flags); 1665 local_irq_save(flags);
1664 1666
@@ -1669,16 +1671,11 @@ static inline void __init check_timer(void)
1669 assign_irq_vector(0, TARGET_CPUS); 1671 assign_irq_vector(0, TARGET_CPUS);
1670 1672
1671 /* 1673 /*
1672 * Subtle, code in do_timer_interrupt() expects an AEOI 1674 * As IRQ0 is to be enabled in the 8259A, the virtual
1673 * mode for the 8259A whenever interrupts are routed 1675 * wire has to be disabled in the local APIC.
1674 * through I/O APICs. Also IRQ0 has to be enabled in
1675 * the 8259A which implies the virtual wire has to be
1676 * disabled in the local APIC.
1677 */ 1676 */
1678 apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); 1677 apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
1679 init_8259A(1); 1678 init_8259A(1);
1680 if (timer_over_8254 > 0)
1681 enable_8259A_irq(0);
1682 1679
1683 pin1 = find_isa_irq_pin(0, mp_INT); 1680 pin1 = find_isa_irq_pin(0, mp_INT);
1684 apic1 = find_isa_irq_apic(0, mp_INT); 1681 apic1 = find_isa_irq_apic(0, mp_INT);
@@ -1688,15 +1685,39 @@ static inline void __init check_timer(void)
1688 apic_printk(APIC_VERBOSE,KERN_INFO "..TIMER: vector=0x%02X apic1=%d pin1=%d apic2=%d pin2=%d\n", 1685 apic_printk(APIC_VERBOSE,KERN_INFO "..TIMER: vector=0x%02X apic1=%d pin1=%d apic2=%d pin2=%d\n",
1689 cfg->vector, apic1, pin1, apic2, pin2); 1686 cfg->vector, apic1, pin1, apic2, pin2);
1690 1687
1688 /*
1689 * Some BIOS writers are clueless and report the ExtINTA
1690 * I/O APIC input from the cascaded 8259A as the timer
1691 * interrupt input. So just in case, if only one pin
1692 * was found above, try it both directly and through the
1693 * 8259A.
1694 */
1695 if (pin1 == -1) {
1696 pin1 = pin2;
1697 apic1 = apic2;
1698 no_pin1 = 1;
1699 } else if (pin2 == -1) {
1700 pin2 = pin1;
1701 apic2 = apic1;
1702 }
1703
1704 replace_pin_at_irq(0, 0, 0, apic1, pin1);
1705 apic1 = 0;
1706 pin1 = 0;
1707 setup_timer_IRQ0_pin(apic1, pin1, cfg->vector);
1708
1691 if (pin1 != -1) { 1709 if (pin1 != -1) {
1692 /* 1710 /*
1693 * Ok, does IRQ0 through the IOAPIC work? 1711 * Ok, does IRQ0 through the IOAPIC work?
1694 */ 1712 */
1713 if (no_pin1) {
1714 add_pin_to_irq(0, apic1, pin1);
1715 setup_timer_IRQ0_pin(apic1, pin1, cfg->vector);
1716 }
1695 unmask_IO_APIC_irq(0); 1717 unmask_IO_APIC_irq(0);
1696 if (!no_timer_check && timer_irq_works()) { 1718 if (!no_timer_check && timer_irq_works()) {
1697 nmi_watchdog_default(); 1719 nmi_watchdog_default();
1698 if (nmi_watchdog == NMI_IO_APIC) { 1720 if (nmi_watchdog == NMI_IO_APIC) {
1699 disable_8259A_irq(0);
1700 setup_nmi(); 1721 setup_nmi();
1701 enable_8259A_irq(0); 1722 enable_8259A_irq(0);
1702 } 1723 }
@@ -1705,42 +1726,48 @@ static inline void __init check_timer(void)
1705 goto out; 1726 goto out;
1706 } 1727 }
1707 clear_IO_APIC_pin(apic1, pin1); 1728 clear_IO_APIC_pin(apic1, pin1);
1708 apic_printk(APIC_QUIET,KERN_ERR "..MP-BIOS bug: 8254 timer not " 1729 if (!no_pin1)
1709 "connected to IO-APIC\n"); 1730 apic_printk(APIC_QUIET,KERN_ERR "..MP-BIOS bug: "
1710 } 1731 "8254 timer not connected to IO-APIC\n");
1711 1732
1712 apic_printk(APIC_VERBOSE,KERN_INFO "...trying to set up timer (IRQ0) " 1733 apic_printk(APIC_VERBOSE,KERN_INFO
1713 "through the 8259A ... "); 1734 "...trying to set up timer (IRQ0) "
1714 if (pin2 != -1) { 1735 "through the 8259A ... ");
1715 apic_printk(APIC_VERBOSE,"\n..... (found apic %d pin %d) ...", 1736 apic_printk(APIC_VERBOSE,"\n..... (found apic %d pin %d) ...",
1716 apic2, pin2); 1737 apic2, pin2);
1717 /* 1738 /*
1718 * legacy devices should be connected to IO APIC #0 1739 * legacy devices should be connected to IO APIC #0
1719 */ 1740 */
1720 setup_ExtINT_IRQ0_pin(apic2, pin2, cfg->vector); 1741 replace_pin_at_irq(0, apic1, pin1, apic2, pin2);
1742 setup_timer_IRQ0_pin(apic2, pin2, cfg->vector);
1743 unmask_IO_APIC_irq(0);
1744 enable_8259A_irq(0);
1721 if (timer_irq_works()) { 1745 if (timer_irq_works()) {
1722 apic_printk(APIC_VERBOSE," works.\n"); 1746 apic_printk(APIC_VERBOSE," works.\n");
1747 timer_through_8259 = 1;
1723 nmi_watchdog_default(); 1748 nmi_watchdog_default();
1724 if (nmi_watchdog == NMI_IO_APIC) { 1749 if (nmi_watchdog == NMI_IO_APIC) {
1750 disable_8259A_irq(0);
1725 setup_nmi(); 1751 setup_nmi();
1752 enable_8259A_irq(0);
1726 } 1753 }
1727 goto out; 1754 goto out;
1728 } 1755 }
1729 /* 1756 /*
1730 * Cleanup, just in case ... 1757 * Cleanup, just in case ...
1731 */ 1758 */
1759 disable_8259A_irq(0);
1732 clear_IO_APIC_pin(apic2, pin2); 1760 clear_IO_APIC_pin(apic2, pin2);
1761 apic_printk(APIC_VERBOSE," failed.\n");
1733 } 1762 }
1734 apic_printk(APIC_VERBOSE," failed.\n");
1735 1763
1736 if (nmi_watchdog == NMI_IO_APIC) { 1764 if (nmi_watchdog == NMI_IO_APIC) {
1737 printk(KERN_WARNING "timer doesn't work through the IO-APIC - disabling NMI Watchdog!\n"); 1765 printk(KERN_WARNING "timer doesn't work through the IO-APIC - disabling NMI Watchdog!\n");
1738 nmi_watchdog = 0; 1766 nmi_watchdog = NMI_NONE;
1739 } 1767 }
1740 1768
1741 apic_printk(APIC_VERBOSE, KERN_INFO "...trying to set up timer as Virtual Wire IRQ..."); 1769 apic_printk(APIC_VERBOSE, KERN_INFO "...trying to set up timer as Virtual Wire IRQ...");
1742 1770
1743 disable_8259A_irq(0);
1744 irq_desc[0].chip = &lapic_irq_type; 1771 irq_desc[0].chip = &lapic_irq_type;
1745 apic_write(APIC_LVT0, APIC_DM_FIXED | cfg->vector); /* Fixed mode */ 1772 apic_write(APIC_LVT0, APIC_DM_FIXED | cfg->vector); /* Fixed mode */
1746 enable_8259A_irq(0); 1773 enable_8259A_irq(0);
@@ -1749,6 +1776,7 @@ static inline void __init check_timer(void)
1749 apic_printk(APIC_VERBOSE," works.\n"); 1776 apic_printk(APIC_VERBOSE," works.\n");
1750 goto out; 1777 goto out;
1751 } 1778 }
1779 disable_8259A_irq(0);
1752 apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | cfg->vector); 1780 apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | cfg->vector);
1753 apic_printk(APIC_VERBOSE," failed.\n"); 1781 apic_printk(APIC_VERBOSE," failed.\n");
1754 1782
diff --git a/arch/x86/kernel/ipi.c b/arch/x86/kernel/ipi.c
index c0df7b89ca23..9d98cda39ad9 100644
--- a/arch/x86/kernel/ipi.c
+++ b/arch/x86/kernel/ipi.c
@@ -8,7 +8,6 @@
8#include <linux/kernel_stat.h> 8#include <linux/kernel_stat.h>
9#include <linux/mc146818rtc.h> 9#include <linux/mc146818rtc.h>
10#include <linux/cache.h> 10#include <linux/cache.h>
11#include <linux/interrupt.h>
12#include <linux/cpu.h> 11#include <linux/cpu.h>
13#include <linux/module.h> 12#include <linux/module.h>
14 13
diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c
index 147352df28b9..468acd04aa2e 100644
--- a/arch/x86/kernel/irq_32.c
+++ b/arch/x86/kernel/irq_32.c
@@ -313,16 +313,20 @@ skip:
313 per_cpu(irq_stat,j).irq_tlb_count); 313 per_cpu(irq_stat,j).irq_tlb_count);
314 seq_printf(p, " TLB shootdowns\n"); 314 seq_printf(p, " TLB shootdowns\n");
315#endif 315#endif
316#ifdef CONFIG_X86_MCE
316 seq_printf(p, "TRM: "); 317 seq_printf(p, "TRM: ");
317 for_each_online_cpu(j) 318 for_each_online_cpu(j)
318 seq_printf(p, "%10u ", 319 seq_printf(p, "%10u ",
319 per_cpu(irq_stat,j).irq_thermal_count); 320 per_cpu(irq_stat,j).irq_thermal_count);
320 seq_printf(p, " Thermal event interrupts\n"); 321 seq_printf(p, " Thermal event interrupts\n");
322#endif
323#ifdef CONFIG_X86_LOCAL_APIC
321 seq_printf(p, "SPU: "); 324 seq_printf(p, "SPU: ");
322 for_each_online_cpu(j) 325 for_each_online_cpu(j)
323 seq_printf(p, "%10u ", 326 seq_printf(p, "%10u ",
324 per_cpu(irq_stat,j).irq_spurious_count); 327 per_cpu(irq_stat,j).irq_spurious_count);
325 seq_printf(p, " Spurious interrupts\n"); 328 seq_printf(p, " Spurious interrupts\n");
329#endif
326 seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); 330 seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
327#if defined(CONFIG_X86_IO_APIC) 331#if defined(CONFIG_X86_IO_APIC)
328 seq_printf(p, "MIS: %10u\n", atomic_read(&irq_mis_count)); 332 seq_printf(p, "MIS: %10u\n", atomic_read(&irq_mis_count));
@@ -331,6 +335,40 @@ skip:
331 return 0; 335 return 0;
332} 336}
333 337
338/*
339 * /proc/stat helpers
340 */
341u64 arch_irq_stat_cpu(unsigned int cpu)
342{
343 u64 sum = nmi_count(cpu);
344
345#ifdef CONFIG_X86_LOCAL_APIC
346 sum += per_cpu(irq_stat, cpu).apic_timer_irqs;
347#endif
348#ifdef CONFIG_SMP
349 sum += per_cpu(irq_stat, cpu).irq_resched_count;
350 sum += per_cpu(irq_stat, cpu).irq_call_count;
351 sum += per_cpu(irq_stat, cpu).irq_tlb_count;
352#endif
353#ifdef CONFIG_X86_MCE
354 sum += per_cpu(irq_stat, cpu).irq_thermal_count;
355#endif
356#ifdef CONFIG_X86_LOCAL_APIC
357 sum += per_cpu(irq_stat, cpu).irq_spurious_count;
358#endif
359 return sum;
360}
361
362u64 arch_irq_stat(void)
363{
364 u64 sum = atomic_read(&irq_err_count);
365
366#ifdef CONFIG_X86_IO_APIC
367 sum += atomic_read(&irq_mis_count);
368#endif
369 return sum;
370}
371
334#ifdef CONFIG_HOTPLUG_CPU 372#ifdef CONFIG_HOTPLUG_CPU
335#include <mach_apic.h> 373#include <mach_apic.h>
336 374
diff --git a/arch/x86/kernel/irq_64.c b/arch/x86/kernel/irq_64.c
index 3aac15466a91..1f78b238d8d2 100644
--- a/arch/x86/kernel/irq_64.c
+++ b/arch/x86/kernel/irq_64.c
@@ -135,6 +135,7 @@ skip:
135 seq_printf(p, "%10u ", cpu_pda(j)->irq_tlb_count); 135 seq_printf(p, "%10u ", cpu_pda(j)->irq_tlb_count);
136 seq_printf(p, " TLB shootdowns\n"); 136 seq_printf(p, " TLB shootdowns\n");
137#endif 137#endif
138#ifdef CONFIG_X86_MCE
138 seq_printf(p, "TRM: "); 139 seq_printf(p, "TRM: ");
139 for_each_online_cpu(j) 140 for_each_online_cpu(j)
140 seq_printf(p, "%10u ", cpu_pda(j)->irq_thermal_count); 141 seq_printf(p, "%10u ", cpu_pda(j)->irq_thermal_count);
@@ -143,6 +144,7 @@ skip:
143 for_each_online_cpu(j) 144 for_each_online_cpu(j)
144 seq_printf(p, "%10u ", cpu_pda(j)->irq_threshold_count); 145 seq_printf(p, "%10u ", cpu_pda(j)->irq_threshold_count);
145 seq_printf(p, " Threshold APIC interrupts\n"); 146 seq_printf(p, " Threshold APIC interrupts\n");
147#endif
146 seq_printf(p, "SPU: "); 148 seq_printf(p, "SPU: ");
147 for_each_online_cpu(j) 149 for_each_online_cpu(j)
148 seq_printf(p, "%10u ", cpu_pda(j)->irq_spurious_count); 150 seq_printf(p, "%10u ", cpu_pda(j)->irq_spurious_count);
@@ -153,6 +155,32 @@ skip:
153} 155}
154 156
155/* 157/*
158 * /proc/stat helpers
159 */
160u64 arch_irq_stat_cpu(unsigned int cpu)
161{
162 u64 sum = cpu_pda(cpu)->__nmi_count;
163
164 sum += cpu_pda(cpu)->apic_timer_irqs;
165#ifdef CONFIG_SMP
166 sum += cpu_pda(cpu)->irq_resched_count;
167 sum += cpu_pda(cpu)->irq_call_count;
168 sum += cpu_pda(cpu)->irq_tlb_count;
169#endif
170#ifdef CONFIG_X86_MCE
171 sum += cpu_pda(cpu)->irq_thermal_count;
172 sum += cpu_pda(cpu)->irq_threshold_count;
173#endif
174 sum += cpu_pda(cpu)->irq_spurious_count;
175 return sum;
176}
177
178u64 arch_irq_stat(void)
179{
180 return atomic_read(&irq_err_count);
181}
182
183/*
156 * do_IRQ handles all normal device IRQ's (the special 184 * do_IRQ handles all normal device IRQ's (the special
157 * SMP cross-CPU interrupts have their own specific 185 * SMP cross-CPU interrupts have their own specific
158 * handlers). 186 * handlers).
diff --git a/arch/x86/kernel/irqinit_32.c b/arch/x86/kernel/irqinit_32.c
new file mode 100644
index 000000000000..d66914287ee1
--- /dev/null
+++ b/arch/x86/kernel/irqinit_32.c
@@ -0,0 +1,114 @@
1#include <linux/errno.h>
2#include <linux/signal.h>
3#include <linux/sched.h>
4#include <linux/ioport.h>
5#include <linux/interrupt.h>
6#include <linux/slab.h>
7#include <linux/random.h>
8#include <linux/init.h>
9#include <linux/kernel_stat.h>
10#include <linux/sysdev.h>
11#include <linux/bitops.h>
12
13#include <asm/atomic.h>
14#include <asm/system.h>
15#include <asm/io.h>
16#include <asm/timer.h>
17#include <asm/pgtable.h>
18#include <asm/delay.h>
19#include <asm/desc.h>
20#include <asm/apic.h>
21#include <asm/arch_hooks.h>
22#include <asm/i8259.h>
23
24
25
26/*
27 * Note that on a 486, we don't want to do a SIGFPE on an irq13
28 * as the irq is unreliable, and exception 16 works correctly
29 * (ie as explained in the intel literature). On a 386, you
30 * can't use exception 16 due to bad IBM design, so we have to
31 * rely on the less exact irq13.
32 *
33 * Careful.. Not only is IRQ13 unreliable, but it is also
34 * leads to races. IBM designers who came up with it should
35 * be shot.
36 */
37
38
39static irqreturn_t math_error_irq(int cpl, void *dev_id)
40{
41 extern void math_error(void __user *);
42 outb(0,0xF0);
43 if (ignore_fpu_irq || !boot_cpu_data.hard_math)
44 return IRQ_NONE;
45 math_error((void __user *)get_irq_regs()->ip);
46 return IRQ_HANDLED;
47}
48
49/*
50 * New motherboards sometimes make IRQ 13 be a PCI interrupt,
51 * so allow interrupt sharing.
52 */
53static struct irqaction fpu_irq = {
54 .handler = math_error_irq,
55 .mask = CPU_MASK_NONE,
56 .name = "fpu",
57};
58
59void __init init_ISA_irqs (void)
60{
61 int i;
62
63#ifdef CONFIG_X86_LOCAL_APIC
64 init_bsp_APIC();
65#endif
66 init_8259A(0);
67
68 /*
69 * 16 old-style INTA-cycle interrupts:
70 */
71 for (i = 0; i < 16; i++) {
72 set_irq_chip_and_handler_name(i, &i8259A_chip,
73 handle_level_irq, "XT");
74 }
75}
76
77/* Overridden in paravirt.c */
78void init_IRQ(void) __attribute__((weak, alias("native_init_IRQ")));
79
80void __init native_init_IRQ(void)
81{
82 int i;
83
84 /* all the set up before the call gates are initialised */
85 pre_intr_init_hook();
86
87 /*
88 * Cover the whole vector space, no vector can escape
89 * us. (some of these will be overridden and become
90 * 'special' SMP interrupts)
91 */
92 for (i = 0; i < (NR_VECTORS - FIRST_EXTERNAL_VECTOR); i++) {
93 int vector = FIRST_EXTERNAL_VECTOR + i;
94 if (i >= NR_IRQS)
95 break;
96 /* SYSCALL_VECTOR was reserved in trap_init. */
97 if (!test_bit(vector, used_vectors))
98 set_intr_gate(vector, interrupt[i]);
99 }
100
101 /* setup after call gates are initialised (usually add in
102 * the architecture specific gates)
103 */
104 intr_init_hook();
105
106 /*
107 * External FPU? Set up irq13 if so, for
108 * original braindamaged IBM FERR coupling.
109 */
110 if (boot_cpu_data.hard_math && !cpu_has_fpu)
111 setup_irq(FPU_IRQ, &fpu_irq);
112
113 irq_ctx_init(smp_processor_id());
114}
diff --git a/arch/x86/kernel/irqinit_64.c b/arch/x86/kernel/irqinit_64.c
new file mode 100644
index 000000000000..64bc0f14285f
--- /dev/null
+++ b/arch/x86/kernel/irqinit_64.c
@@ -0,0 +1,203 @@
1#include <linux/linkage.h>
2#include <linux/errno.h>
3#include <linux/signal.h>
4#include <linux/sched.h>
5#include <linux/ioport.h>
6#include <linux/interrupt.h>
7#include <linux/timex.h>
8#include <linux/slab.h>
9#include <linux/random.h>
10#include <linux/init.h>
11#include <linux/kernel_stat.h>
12#include <linux/sysdev.h>
13#include <linux/bitops.h>
14
15#include <asm/acpi.h>
16#include <asm/atomic.h>
17#include <asm/system.h>
18#include <asm/io.h>
19#include <asm/hw_irq.h>
20#include <asm/pgtable.h>
21#include <asm/delay.h>
22#include <asm/desc.h>
23#include <asm/apic.h>
24#include <asm/i8259.h>
25
26/*
27 * Common place to define all x86 IRQ vectors
28 *
29 * This builds up the IRQ handler stubs using some ugly macros in irq.h
30 *
31 * These macros create the low-level assembly IRQ routines that save
32 * register context and call do_IRQ(). do_IRQ() then does all the
33 * operations that are needed to keep the AT (or SMP IOAPIC)
34 * interrupt-controller happy.
35 */
36
37#define BI(x,y) \
38 BUILD_IRQ(x##y)
39
40#define BUILD_16_IRQS(x) \
41 BI(x,0) BI(x,1) BI(x,2) BI(x,3) \
42 BI(x,4) BI(x,5) BI(x,6) BI(x,7) \
43 BI(x,8) BI(x,9) BI(x,a) BI(x,b) \
44 BI(x,c) BI(x,d) BI(x,e) BI(x,f)
45
46/*
47 * ISA PIC or low IO-APIC triggered (INTA-cycle or APIC) interrupts:
48 * (these are usually mapped to vectors 0x30-0x3f)
49 */
50
51/*
52 * The IO-APIC gives us many more interrupt sources. Most of these
53 * are unused but an SMP system is supposed to have enough memory ...
54 * sometimes (mostly wrt. hw bugs) we get corrupted vectors all
55 * across the spectrum, so we really want to be prepared to get all
56 * of these. Plus, more powerful systems might have more than 64
57 * IO-APIC registers.
58 *
59 * (these are usually mapped into the 0x30-0xff vector range)
60 */
61 BUILD_16_IRQS(0x2) BUILD_16_IRQS(0x3)
62BUILD_16_IRQS(0x4) BUILD_16_IRQS(0x5) BUILD_16_IRQS(0x6) BUILD_16_IRQS(0x7)
63BUILD_16_IRQS(0x8) BUILD_16_IRQS(0x9) BUILD_16_IRQS(0xa) BUILD_16_IRQS(0xb)
64BUILD_16_IRQS(0xc) BUILD_16_IRQS(0xd) BUILD_16_IRQS(0xe) BUILD_16_IRQS(0xf)
65
66#undef BUILD_16_IRQS
67#undef BI
68
69
70#define IRQ(x,y) \
71 IRQ##x##y##_interrupt
72
73#define IRQLIST_16(x) \
74 IRQ(x,0), IRQ(x,1), IRQ(x,2), IRQ(x,3), \
75 IRQ(x,4), IRQ(x,5), IRQ(x,6), IRQ(x,7), \
76 IRQ(x,8), IRQ(x,9), IRQ(x,a), IRQ(x,b), \
77 IRQ(x,c), IRQ(x,d), IRQ(x,e), IRQ(x,f)
78
79/* for the irq vectors */
80static void (*__initdata interrupt[NR_VECTORS - FIRST_EXTERNAL_VECTOR])(void) = {
81 IRQLIST_16(0x2), IRQLIST_16(0x3),
82 IRQLIST_16(0x4), IRQLIST_16(0x5), IRQLIST_16(0x6), IRQLIST_16(0x7),
83 IRQLIST_16(0x8), IRQLIST_16(0x9), IRQLIST_16(0xa), IRQLIST_16(0xb),
84 IRQLIST_16(0xc), IRQLIST_16(0xd), IRQLIST_16(0xe), IRQLIST_16(0xf)
85};
86
87#undef IRQ
88#undef IRQLIST_16
89
90
91
92
93/*
94 * IRQ2 is cascade interrupt to second interrupt controller
95 */
96
97static struct irqaction irq2 = {
98 .handler = no_action,
99 .mask = CPU_MASK_NONE,
100 .name = "cascade",
101};
102DEFINE_PER_CPU(vector_irq_t, vector_irq) = {
103 [0 ... IRQ0_VECTOR - 1] = -1,
104 [IRQ0_VECTOR] = 0,
105 [IRQ1_VECTOR] = 1,
106 [IRQ2_VECTOR] = 2,
107 [IRQ3_VECTOR] = 3,
108 [IRQ4_VECTOR] = 4,
109 [IRQ5_VECTOR] = 5,
110 [IRQ6_VECTOR] = 6,
111 [IRQ7_VECTOR] = 7,
112 [IRQ8_VECTOR] = 8,
113 [IRQ9_VECTOR] = 9,
114 [IRQ10_VECTOR] = 10,
115 [IRQ11_VECTOR] = 11,
116 [IRQ12_VECTOR] = 12,
117 [IRQ13_VECTOR] = 13,
118 [IRQ14_VECTOR] = 14,
119 [IRQ15_VECTOR] = 15,
120 [IRQ15_VECTOR + 1 ... NR_VECTORS - 1] = -1
121};
122
123static void __init init_ISA_irqs (void)
124{
125 int i;
126
127 init_bsp_APIC();
128 init_8259A(0);
129
130 for (i = 0; i < NR_IRQS; i++) {
131 irq_desc[i].status = IRQ_DISABLED;
132 irq_desc[i].action = NULL;
133 irq_desc[i].depth = 1;
134
135 if (i < 16) {
136 /*
137 * 16 old-style INTA-cycle interrupts:
138 */
139 set_irq_chip_and_handler_name(i, &i8259A_chip,
140 handle_level_irq, "XT");
141 } else {
142 /*
143 * 'high' PCI IRQs filled in on demand
144 */
145 irq_desc[i].chip = &no_irq_chip;
146 }
147 }
148}
149
150void init_IRQ(void) __attribute__((weak, alias("native_init_IRQ")));
151
152void __init native_init_IRQ(void)
153{
154 int i;
155
156 init_ISA_irqs();
157 /*
158 * Cover the whole vector space, no vector can escape
159 * us. (some of these will be overridden and become
160 * 'special' SMP interrupts)
161 */
162 for (i = 0; i < (NR_VECTORS - FIRST_EXTERNAL_VECTOR); i++) {
163 int vector = FIRST_EXTERNAL_VECTOR + i;
164 if (vector != IA32_SYSCALL_VECTOR)
165 set_intr_gate(vector, interrupt[i]);
166 }
167
168#ifdef CONFIG_SMP
169 /*
170 * The reschedule interrupt is a CPU-to-CPU reschedule-helper
171 * IPI, driven by wakeup.
172 */
173 set_intr_gate(RESCHEDULE_VECTOR, reschedule_interrupt);
174
175 /* IPIs for invalidation */
176 set_intr_gate(INVALIDATE_TLB_VECTOR_START+0, invalidate_interrupt0);
177 set_intr_gate(INVALIDATE_TLB_VECTOR_START+1, invalidate_interrupt1);
178 set_intr_gate(INVALIDATE_TLB_VECTOR_START+2, invalidate_interrupt2);
179 set_intr_gate(INVALIDATE_TLB_VECTOR_START+3, invalidate_interrupt3);
180 set_intr_gate(INVALIDATE_TLB_VECTOR_START+4, invalidate_interrupt4);
181 set_intr_gate(INVALIDATE_TLB_VECTOR_START+5, invalidate_interrupt5);
182 set_intr_gate(INVALIDATE_TLB_VECTOR_START+6, invalidate_interrupt6);
183 set_intr_gate(INVALIDATE_TLB_VECTOR_START+7, invalidate_interrupt7);
184
185 /* IPI for generic function call */
186 set_intr_gate(CALL_FUNCTION_VECTOR, call_function_interrupt);
187
188 /* Low priority IPI to cleanup after moving an irq */
189 set_intr_gate(IRQ_MOVE_CLEANUP_VECTOR, irq_move_cleanup_interrupt);
190#endif
191 set_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt);
192 set_intr_gate(THRESHOLD_APIC_VECTOR, threshold_interrupt);
193
194 /* self generated IPI for local APIC timer */
195 set_intr_gate(LOCAL_TIMER_VECTOR, apic_timer_interrupt);
196
197 /* IPI vectors for APIC spurious and error interrupts */
198 set_intr_gate(SPURIOUS_APIC_VECTOR, spurious_interrupt);
199 set_intr_gate(ERROR_APIC_VECTOR, error_interrupt);
200
201 if (!acpi_ioapic)
202 setup_irq(2, &irq2);
203}
diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c
index 4bc1be5d5472..87edf1ceb1df 100644
--- a/arch/x86/kernel/kvmclock.c
+++ b/arch/x86/kernel/kvmclock.c
@@ -18,6 +18,7 @@
18 18
19#include <linux/clocksource.h> 19#include <linux/clocksource.h>
20#include <linux/kvm_para.h> 20#include <linux/kvm_para.h>
21#include <asm/pvclock.h>
21#include <asm/arch_hooks.h> 22#include <asm/arch_hooks.h>
22#include <asm/msr.h> 23#include <asm/msr.h>
23#include <asm/apic.h> 24#include <asm/apic.h>
@@ -36,83 +37,47 @@ static int parse_no_kvmclock(char *arg)
36early_param("no-kvmclock", parse_no_kvmclock); 37early_param("no-kvmclock", parse_no_kvmclock);
37 38
38/* The hypervisor will put information about time periodically here */ 39/* The hypervisor will put information about time periodically here */
39static DEFINE_PER_CPU_SHARED_ALIGNED(struct kvm_vcpu_time_info, hv_clock); 40static DEFINE_PER_CPU_SHARED_ALIGNED(struct pvclock_vcpu_time_info, hv_clock);
40#define get_clock(cpu, field) per_cpu(hv_clock, cpu).field 41static struct pvclock_wall_clock wall_clock;
41 42
42static inline u64 kvm_get_delta(u64 last_tsc)
43{
44 int cpu = smp_processor_id();
45 u64 delta = native_read_tsc() - last_tsc;
46 return (delta * get_clock(cpu, tsc_to_system_mul)) >> KVM_SCALE;
47}
48
49static struct kvm_wall_clock wall_clock;
50static cycle_t kvm_clock_read(void);
51/* 43/*
52 * The wallclock is the time of day when we booted. Since then, some time may 44 * The wallclock is the time of day when we booted. Since then, some time may
53 * have elapsed since the hypervisor wrote the data. So we try to account for 45 * have elapsed since the hypervisor wrote the data. So we try to account for
54 * that with system time 46 * that with system time
55 */ 47 */
56unsigned long kvm_get_wallclock(void) 48static unsigned long kvm_get_wallclock(void)
57{ 49{
58 u32 wc_sec, wc_nsec; 50 struct pvclock_vcpu_time_info *vcpu_time;
59 u64 delta;
60 struct timespec ts; 51 struct timespec ts;
61 int version, nsec;
62 int low, high; 52 int low, high;
63 53
64 low = (int)__pa(&wall_clock); 54 low = (int)__pa(&wall_clock);
65 high = ((u64)__pa(&wall_clock) >> 32); 55 high = ((u64)__pa(&wall_clock) >> 32);
56 native_write_msr(MSR_KVM_WALL_CLOCK, low, high);
66 57
67 delta = kvm_clock_read(); 58 vcpu_time = &get_cpu_var(hv_clock);
59 pvclock_read_wallclock(&wall_clock, vcpu_time, &ts);
60 put_cpu_var(hv_clock);
68 61
69 native_write_msr(MSR_KVM_WALL_CLOCK, low, high); 62 return ts.tv_sec;
70 do {
71 version = wall_clock.wc_version;
72 rmb();
73 wc_sec = wall_clock.wc_sec;
74 wc_nsec = wall_clock.wc_nsec;
75 rmb();
76 } while ((wall_clock.wc_version != version) || (version & 1));
77
78 delta = kvm_clock_read() - delta;
79 delta += wc_nsec;
80 nsec = do_div(delta, NSEC_PER_SEC);
81 set_normalized_timespec(&ts, wc_sec + delta, nsec);
82 /*
83 * Of all mechanisms of time adjustment I've tested, this one
84 * was the champion!
85 */
86 return ts.tv_sec + 1;
87} 63}
88 64
89int kvm_set_wallclock(unsigned long now) 65static int kvm_set_wallclock(unsigned long now)
90{ 66{
91 return 0; 67 return -1;
92} 68}
93 69
94/*
95 * This is our read_clock function. The host puts an tsc timestamp each time
96 * it updates a new time. Without the tsc adjustment, we can have a situation
97 * in which a vcpu starts to run earlier (smaller system_time), but probes
98 * time later (compared to another vcpu), leading to backwards time
99 */
100static cycle_t kvm_clock_read(void) 70static cycle_t kvm_clock_read(void)
101{ 71{
102 u64 last_tsc, now; 72 struct pvclock_vcpu_time_info *src;
103 int cpu; 73 cycle_t ret;
104 74
105 preempt_disable(); 75 src = &get_cpu_var(hv_clock);
106 cpu = smp_processor_id(); 76 ret = pvclock_clocksource_read(src);
107 77 put_cpu_var(hv_clock);
108 last_tsc = get_clock(cpu, tsc_timestamp); 78 return ret;
109 now = get_clock(cpu, system_time);
110
111 now += kvm_get_delta(last_tsc);
112 preempt_enable();
113
114 return now;
115} 79}
80
116static struct clocksource kvm_clock = { 81static struct clocksource kvm_clock = {
117 .name = "kvm-clock", 82 .name = "kvm-clock",
118 .read = kvm_clock_read, 83 .read = kvm_clock_read,
@@ -123,13 +88,14 @@ static struct clocksource kvm_clock = {
123 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 88 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
124}; 89};
125 90
126static int kvm_register_clock(void) 91static int kvm_register_clock(char *txt)
127{ 92{
128 int cpu = smp_processor_id(); 93 int cpu = smp_processor_id();
129 int low, high; 94 int low, high;
130 low = (int)__pa(&per_cpu(hv_clock, cpu)) | 1; 95 low = (int)__pa(&per_cpu(hv_clock, cpu)) | 1;
131 high = ((u64)__pa(&per_cpu(hv_clock, cpu)) >> 32); 96 high = ((u64)__pa(&per_cpu(hv_clock, cpu)) >> 32);
132 97 printk(KERN_INFO "kvm-clock: cpu %d, msr %x:%x, %s\n",
98 cpu, high, low, txt);
133 return native_write_msr_safe(MSR_KVM_SYSTEM_TIME, low, high); 99 return native_write_msr_safe(MSR_KVM_SYSTEM_TIME, low, high);
134} 100}
135 101
@@ -140,12 +106,20 @@ static void kvm_setup_secondary_clock(void)
140 * Now that the first cpu already had this clocksource initialized, 106 * Now that the first cpu already had this clocksource initialized,
141 * we shouldn't fail. 107 * we shouldn't fail.
142 */ 108 */
143 WARN_ON(kvm_register_clock()); 109 WARN_ON(kvm_register_clock("secondary cpu clock"));
144 /* ok, done with our trickery, call native */ 110 /* ok, done with our trickery, call native */
145 setup_secondary_APIC_clock(); 111 setup_secondary_APIC_clock();
146} 112}
147#endif 113#endif
148 114
115#ifdef CONFIG_SMP
116void __init kvm_smp_prepare_boot_cpu(void)
117{
118 WARN_ON(kvm_register_clock("primary cpu clock"));
119 native_smp_prepare_boot_cpu();
120}
121#endif
122
149/* 123/*
150 * After the clock is registered, the host will keep writing to the 124 * After the clock is registered, the host will keep writing to the
151 * registered memory location. If the guest happens to shutdown, this memory 125 * registered memory location. If the guest happens to shutdown, this memory
@@ -174,7 +148,7 @@ void __init kvmclock_init(void)
174 return; 148 return;
175 149
176 if (kvmclock && kvm_para_has_feature(KVM_FEATURE_CLOCKSOURCE)) { 150 if (kvmclock && kvm_para_has_feature(KVM_FEATURE_CLOCKSOURCE)) {
177 if (kvm_register_clock()) 151 if (kvm_register_clock("boot clock"))
178 return; 152 return;
179 pv_time_ops.get_wallclock = kvm_get_wallclock; 153 pv_time_ops.get_wallclock = kvm_get_wallclock;
180 pv_time_ops.set_wallclock = kvm_set_wallclock; 154 pv_time_ops.set_wallclock = kvm_set_wallclock;
@@ -182,6 +156,9 @@ void __init kvmclock_init(void)
182#ifdef CONFIG_X86_LOCAL_APIC 156#ifdef CONFIG_X86_LOCAL_APIC
183 pv_apic_ops.setup_secondary_clock = kvm_setup_secondary_clock; 157 pv_apic_ops.setup_secondary_clock = kvm_setup_secondary_clock;
184#endif 158#endif
159#ifdef CONFIG_SMP
160 smp_ops.smp_prepare_boot_cpu = kvm_smp_prepare_boot_cpu;
161#endif
185 machine_ops.shutdown = kvm_shutdown; 162 machine_ops.shutdown = kvm_shutdown;
186#ifdef CONFIG_KEXEC 163#ifdef CONFIG_KEXEC
187 machine_ops.crash_shutdown = kvm_crash_shutdown; 164 machine_ops.crash_shutdown = kvm_crash_shutdown;
diff --git a/arch/x86/kernel/ldt.c b/arch/x86/kernel/ldt.c
index 0224c3637c73..21f2bae98c15 100644
--- a/arch/x86/kernel/ldt.c
+++ b/arch/x86/kernel/ldt.c
@@ -20,9 +20,9 @@
20#include <asm/mmu_context.h> 20#include <asm/mmu_context.h>
21 21
22#ifdef CONFIG_SMP 22#ifdef CONFIG_SMP
23static void flush_ldt(void *null) 23static void flush_ldt(void *current_mm)
24{ 24{
25 if (current->active_mm) 25 if (current->active_mm == current_mm)
26 load_LDT(&current->active_mm->context); 26 load_LDT(&current->active_mm->context);
27} 27}
28#endif 28#endif
@@ -68,7 +68,7 @@ static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
68 load_LDT(pc); 68 load_LDT(pc);
69 mask = cpumask_of_cpu(smp_processor_id()); 69 mask = cpumask_of_cpu(smp_processor_id());
70 if (!cpus_equal(current->mm->cpu_vm_mask, mask)) 70 if (!cpus_equal(current->mm->cpu_vm_mask, mask))
71 smp_call_function(flush_ldt, NULL, 1, 1); 71 smp_call_function(flush_ldt, current->mm, 1, 1);
72 preempt_enable(); 72 preempt_enable();
73#else 73#else
74 load_LDT(pc); 74 load_LDT(pc);
diff --git a/arch/x86/kernel/machine_kexec_32.c b/arch/x86/kernel/machine_kexec_32.c
index d0b234c9fc31..f4960171bc66 100644
--- a/arch/x86/kernel/machine_kexec_32.c
+++ b/arch/x86/kernel/machine_kexec_32.c
@@ -39,7 +39,7 @@ static void set_idt(void *newidt, __u16 limit)
39 curidt.address = (unsigned long)newidt; 39 curidt.address = (unsigned long)newidt;
40 40
41 load_idt(&curidt); 41 load_idt(&curidt);
42}; 42}
43 43
44 44
45static void set_gdt(void *newgdt, __u16 limit) 45static void set_gdt(void *newgdt, __u16 limit)
@@ -51,7 +51,7 @@ static void set_gdt(void *newgdt, __u16 limit)
51 curgdt.address = (unsigned long)newgdt; 51 curgdt.address = (unsigned long)newgdt;
52 52
53 load_gdt(&curgdt); 53 load_gdt(&curgdt);
54}; 54}
55 55
56static void load_segments(void) 56static void load_segments(void)
57{ 57{
diff --git a/arch/x86/kernel/mfgpt_32.c b/arch/x86/kernel/mfgpt_32.c
index 3cad17fe026b..07c0f828f488 100644
--- a/arch/x86/kernel/mfgpt_32.c
+++ b/arch/x86/kernel/mfgpt_32.c
@@ -155,6 +155,7 @@ int geode_mfgpt_toggle_event(int timer, int cmp, int event, int enable)
155 wrmsr(msr, value, dummy); 155 wrmsr(msr, value, dummy);
156 return 0; 156 return 0;
157} 157}
158EXPORT_SYMBOL_GPL(geode_mfgpt_toggle_event);
158 159
159int geode_mfgpt_set_irq(int timer, int cmp, int irq, int enable) 160int geode_mfgpt_set_irq(int timer, int cmp, int irq, int enable)
160{ 161{
@@ -222,6 +223,7 @@ int geode_mfgpt_alloc_timer(int timer, int domain)
222 /* No timers available - too bad */ 223 /* No timers available - too bad */
223 return -1; 224 return -1;
224} 225}
226EXPORT_SYMBOL_GPL(geode_mfgpt_alloc_timer);
225 227
226 228
227#ifdef CONFIG_GEODE_MFGPT_TIMER 229#ifdef CONFIG_GEODE_MFGPT_TIMER
diff --git a/arch/x86/kernel/microcode.c b/arch/x86/kernel/microcode.c
index 69729e38b78a..9758fea87c5b 100644
--- a/arch/x86/kernel/microcode.c
+++ b/arch/x86/kernel/microcode.c
@@ -5,13 +5,14 @@
5 * 2006 Shaohua Li <shaohua.li@intel.com> 5 * 2006 Shaohua Li <shaohua.li@intel.com>
6 * 6 *
7 * This driver allows to upgrade microcode on Intel processors 7 * This driver allows to upgrade microcode on Intel processors
8 * belonging to IA-32 family - PentiumPro, Pentium II, 8 * belonging to IA-32 family - PentiumPro, Pentium II,
9 * Pentium III, Xeon, Pentium 4, etc. 9 * Pentium III, Xeon, Pentium 4, etc.
10 * 10 *
11 * Reference: Section 8.10 of Volume III, Intel Pentium 4 Manual, 11 * Reference: Section 8.11 of Volume 3a, IA-32 Intel? Architecture
12 * Order Number 245472 or free download from: 12 * Software Developer's Manual
13 * 13 * Order Number 253668 or free download from:
14 * http://developer.intel.com/design/pentium4/manuals/245472.htm 14 *
15 * http://developer.intel.com/design/pentium4/manuals/253668.htm
15 * 16 *
16 * For more information, go to http://www.urbanmyth.org/microcode 17 * For more information, go to http://www.urbanmyth.org/microcode
17 * 18 *
@@ -58,12 +59,12 @@
58 * nature of implementation. 59 * nature of implementation.
59 * 1.11 22 Mar 2002 Tigran Aivazian <tigran@veritas.com> 60 * 1.11 22 Mar 2002 Tigran Aivazian <tigran@veritas.com>
60 * Fix the panic when writing zero-length microcode chunk. 61 * Fix the panic when writing zero-length microcode chunk.
61 * 1.12 29 Sep 2003 Nitin Kamble <nitin.a.kamble@intel.com>, 62 * 1.12 29 Sep 2003 Nitin Kamble <nitin.a.kamble@intel.com>,
62 * Jun Nakajima <jun.nakajima@intel.com> 63 * Jun Nakajima <jun.nakajima@intel.com>
63 * Support for the microcode updates in the new format. 64 * Support for the microcode updates in the new format.
64 * 1.13 10 Oct 2003 Tigran Aivazian <tigran@veritas.com> 65 * 1.13 10 Oct 2003 Tigran Aivazian <tigran@veritas.com>
65 * Removed ->read() method and obsoleted MICROCODE_IOCFREE ioctl 66 * Removed ->read() method and obsoleted MICROCODE_IOCFREE ioctl
66 * because we no longer hold a copy of applied microcode 67 * because we no longer hold a copy of applied microcode
67 * in kernel memory. 68 * in kernel memory.
68 * 1.14 25 Jun 2004 Tigran Aivazian <tigran@veritas.com> 69 * 1.14 25 Jun 2004 Tigran Aivazian <tigran@veritas.com>
69 * Fix sigmatch() macro to handle old CPUs with pf == 0. 70 * Fix sigmatch() macro to handle old CPUs with pf == 0.
@@ -320,11 +321,11 @@ static void apply_microcode(int cpu)
320 return; 321 return;
321 322
322 /* serialize access to the physical write to MSR 0x79 */ 323 /* serialize access to the physical write to MSR 0x79 */
323 spin_lock_irqsave(&microcode_update_lock, flags); 324 spin_lock_irqsave(&microcode_update_lock, flags);
324 325
325 /* write microcode via MSR 0x79 */ 326 /* write microcode via MSR 0x79 */
326 wrmsr(MSR_IA32_UCODE_WRITE, 327 wrmsr(MSR_IA32_UCODE_WRITE,
327 (unsigned long) uci->mc->bits, 328 (unsigned long) uci->mc->bits,
328 (unsigned long) uci->mc->bits >> 16 >> 16); 329 (unsigned long) uci->mc->bits >> 16 >> 16);
329 wrmsr(MSR_IA32_UCODE_REV, 0, 0); 330 wrmsr(MSR_IA32_UCODE_REV, 0, 0);
330 331
@@ -341,7 +342,7 @@ static void apply_microcode(int cpu)
341 return; 342 return;
342 } 343 }
343 printk(KERN_INFO "microcode: CPU%d updated from revision " 344 printk(KERN_INFO "microcode: CPU%d updated from revision "
344 "0x%x to 0x%x, date = %08x \n", 345 "0x%x to 0x%x, date = %08x \n",
345 cpu_num, uci->rev, val[1], uci->mc->hdr.date); 346 cpu_num, uci->rev, val[1], uci->mc->hdr.date);
346 uci->rev = val[1]; 347 uci->rev = val[1];
347} 348}
@@ -534,7 +535,7 @@ static int cpu_request_microcode(int cpu)
534 c->x86, c->x86_model, c->x86_mask); 535 c->x86, c->x86_model, c->x86_mask);
535 error = request_firmware(&firmware, name, &microcode_pdev->dev); 536 error = request_firmware(&firmware, name, &microcode_pdev->dev);
536 if (error) { 537 if (error) {
537 pr_debug("microcode: ucode data file %s load failed\n", name); 538 pr_debug("microcode: data file %s load failed\n", name);
538 return error; 539 return error;
539 } 540 }
540 buf = firmware->data; 541 buf = firmware->data;
@@ -805,6 +806,9 @@ static int __init microcode_init (void)
805{ 806{
806 int error; 807 int error;
807 808
809 printk(KERN_INFO
810 "IA-32 Microcode Update Driver: v" MICROCODE_VERSION " <tigran@aivazian.fsnet.co.uk>\n");
811
808 error = microcode_dev_init(); 812 error = microcode_dev_init();
809 if (error) 813 if (error)
810 return error; 814 return error;
@@ -825,9 +829,6 @@ static int __init microcode_init (void)
825 } 829 }
826 830
827 register_hotcpu_notifier(&mc_cpu_notifier); 831 register_hotcpu_notifier(&mc_cpu_notifier);
828
829 printk(KERN_INFO
830 "IA-32 Microcode Update Driver: v" MICROCODE_VERSION " <tigran@aivazian.fsnet.co.uk>\n");
831 return 0; 832 return 0;
832} 833}
833 834
diff --git a/arch/x86/kernel/mmconf-fam10h_64.c b/arch/x86/kernel/mmconf-fam10h_64.c
index edc5fbfe85c0..fdfdc550b366 100644
--- a/arch/x86/kernel/mmconf-fam10h_64.c
+++ b/arch/x86/kernel/mmconf-fam10h_64.c
@@ -12,6 +12,7 @@
12#include <asm/io.h> 12#include <asm/io.h>
13#include <asm/msr.h> 13#include <asm/msr.h>
14#include <asm/acpi.h> 14#include <asm/acpi.h>
15#include <asm/mmconfig.h>
15 16
16#include "../pci/pci.h" 17#include "../pci/pci.h"
17 18
diff --git a/arch/x86/kernel/nmi_32.c b/arch/x86/kernel/nmi_32.c
index 11b14bbaa61e..6580dae46277 100644
--- a/arch/x86/kernel/nmi_32.c
+++ b/arch/x86/kernel/nmi_32.c
@@ -24,6 +24,8 @@
24#include <linux/kdebug.h> 24#include <linux/kdebug.h>
25#include <linux/slab.h> 25#include <linux/slab.h>
26 26
27#include <asm/i8259.h>
28#include <asm/io_apic.h>
27#include <asm/smp.h> 29#include <asm/smp.h>
28#include <asm/nmi.h> 30#include <asm/nmi.h>
29#include <asm/timer.h> 31#include <asm/timer.h>
@@ -131,7 +133,9 @@ int __init check_nmi_watchdog(void)
131 kfree(prev_nmi_count); 133 kfree(prev_nmi_count);
132 return 0; 134 return 0;
133error: 135error:
134 timer_ack = !cpu_has_tsc; 136 if (nmi_watchdog == NMI_IO_APIC && !timer_through_8259)
137 disable_8259A_irq(0);
138 timer_ack = 0;
135 139
136 return -1; 140 return -1;
137} 141}
diff --git a/arch/x86/kernel/nmi_64.c b/arch/x86/kernel/nmi_64.c
index 5a29ded994fa..0060e44e8989 100644
--- a/arch/x86/kernel/nmi_64.c
+++ b/arch/x86/kernel/nmi_64.c
@@ -21,6 +21,8 @@
21#include <linux/cpumask.h> 21#include <linux/cpumask.h>
22#include <linux/kdebug.h> 22#include <linux/kdebug.h>
23 23
24#include <asm/i8259.h>
25#include <asm/io_apic.h>
24#include <asm/smp.h> 26#include <asm/smp.h>
25#include <asm/nmi.h> 27#include <asm/nmi.h>
26#include <asm/proto.h> 28#include <asm/proto.h>
@@ -90,7 +92,7 @@ int __init check_nmi_watchdog(void)
90 92
91 prev_nmi_count = kmalloc(NR_CPUS * sizeof(int), GFP_KERNEL); 93 prev_nmi_count = kmalloc(NR_CPUS * sizeof(int), GFP_KERNEL);
92 if (!prev_nmi_count) 94 if (!prev_nmi_count)
93 return -1; 95 goto error;
94 96
95 printk(KERN_INFO "Testing NMI watchdog ... "); 97 printk(KERN_INFO "Testing NMI watchdog ... ");
96 98
@@ -121,7 +123,7 @@ int __init check_nmi_watchdog(void)
121 if (!atomic_read(&nmi_active)) { 123 if (!atomic_read(&nmi_active)) {
122 kfree(prev_nmi_count); 124 kfree(prev_nmi_count);
123 atomic_set(&nmi_active, -1); 125 atomic_set(&nmi_active, -1);
124 return -1; 126 goto error;
125 } 127 }
126 printk("OK.\n"); 128 printk("OK.\n");
127 129
@@ -132,6 +134,11 @@ int __init check_nmi_watchdog(void)
132 134
133 kfree(prev_nmi_count); 135 kfree(prev_nmi_count);
134 return 0; 136 return 0;
137error:
138 if (nmi_watchdog == NMI_IO_APIC && !timer_through_8259)
139 disable_8259A_irq(0);
140
141 return -1;
135} 142}
136 143
137static int __init setup_nmi_watchdog(char *str) 144static int __init setup_nmi_watchdog(char *str)
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
index 74f0c5ea2a03..f1ab0f727007 100644
--- a/arch/x86/kernel/paravirt.c
+++ b/arch/x86/kernel/paravirt.c
@@ -380,6 +380,9 @@ struct pv_mmu_ops pv_mmu_ops = {
380 .pte_update = paravirt_nop, 380 .pte_update = paravirt_nop,
381 .pte_update_defer = paravirt_nop, 381 .pte_update_defer = paravirt_nop,
382 382
383 .ptep_modify_prot_start = __ptep_modify_prot_start,
384 .ptep_modify_prot_commit = __ptep_modify_prot_commit,
385
383#ifdef CONFIG_HIGHPTE 386#ifdef CONFIG_HIGHPTE
384 .kmap_atomic_pte = kmap_atomic, 387 .kmap_atomic_pte = kmap_atomic,
385#endif 388#endif
@@ -403,6 +406,7 @@ struct pv_mmu_ops pv_mmu_ops = {
403#endif /* PAGETABLE_LEVELS >= 3 */ 406#endif /* PAGETABLE_LEVELS >= 3 */
404 407
405 .pte_val = native_pte_val, 408 .pte_val = native_pte_val,
409 .pte_flags = native_pte_val,
406 .pgd_val = native_pgd_val, 410 .pgd_val = native_pgd_val,
407 411
408 .make_pte = native_make_pte, 412 .make_pte = native_make_pte,
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index c5ef1af8e79d..3c43109ba054 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -77,10 +77,14 @@ void __init dma32_reserve_bootmem(void)
77 if (end_pfn <= MAX_DMA32_PFN) 77 if (end_pfn <= MAX_DMA32_PFN)
78 return; 78 return;
79 79
80 /*
81 * check aperture_64.c allocate_aperture() for reason about
82 * using 512M as goal
83 */
80 align = 64ULL<<20; 84 align = 64ULL<<20;
81 size = round_up(dma32_bootmem_size, align); 85 size = round_up(dma32_bootmem_size, align);
82 dma32_bootmem_ptr = __alloc_bootmem_nopanic(size, align, 86 dma32_bootmem_ptr = __alloc_bootmem_nopanic(size, align,
83 __pa(MAX_DMA_ADDRESS)); 87 512ULL<<20);
84 if (dma32_bootmem_ptr) 88 if (dma32_bootmem_ptr)
85 dma32_bootmem_size = size; 89 dma32_bootmem_size = size;
86 else 90 else
@@ -88,7 +92,6 @@ void __init dma32_reserve_bootmem(void)
88} 92}
89static void __init dma32_free_bootmem(void) 93static void __init dma32_free_bootmem(void)
90{ 94{
91 int node;
92 95
93 if (end_pfn <= MAX_DMA32_PFN) 96 if (end_pfn <= MAX_DMA32_PFN)
94 return; 97 return;
@@ -96,9 +99,7 @@ static void __init dma32_free_bootmem(void)
96 if (!dma32_bootmem_ptr) 99 if (!dma32_bootmem_ptr)
97 return; 100 return;
98 101
99 for_each_online_node(node) 102 free_bootmem(__pa(dma32_bootmem_ptr), dma32_bootmem_size);
100 free_bootmem_node(NODE_DATA(node), __pa(dma32_bootmem_ptr),
101 dma32_bootmem_size);
102 103
103 dma32_bootmem_ptr = NULL; 104 dma32_bootmem_ptr = NULL;
104 dma32_bootmem_size = 0; 105 dma32_bootmem_size = 0;
@@ -357,7 +358,7 @@ int dma_supported(struct device *dev, u64 mask)
357EXPORT_SYMBOL(dma_supported); 358EXPORT_SYMBOL(dma_supported);
358 359
359/* Allocate DMA memory on node near device */ 360/* Allocate DMA memory on node near device */
360noinline struct page * 361static noinline struct page *
361dma_alloc_pages(struct device *dev, gfp_t gfp, unsigned order) 362dma_alloc_pages(struct device *dev, gfp_t gfp, unsigned order)
362{ 363{
363 int node; 364 int node;
@@ -378,6 +379,7 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
378 struct page *page; 379 struct page *page;
379 unsigned long dma_mask = 0; 380 unsigned long dma_mask = 0;
380 dma_addr_t bus; 381 dma_addr_t bus;
382 int noretry = 0;
381 383
382 /* ignore region specifiers */ 384 /* ignore region specifiers */
383 gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32); 385 gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32);
@@ -397,20 +399,25 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
397 if (dev->dma_mask == NULL) 399 if (dev->dma_mask == NULL)
398 return NULL; 400 return NULL;
399 401
400 /* Don't invoke OOM killer */ 402 /* Don't invoke OOM killer or retry in lower 16MB DMA zone */
401 gfp |= __GFP_NORETRY; 403 if (gfp & __GFP_DMA)
404 noretry = 1;
402 405
403#ifdef CONFIG_X86_64 406#ifdef CONFIG_X86_64
404 /* Why <=? Even when the mask is smaller than 4GB it is often 407 /* Why <=? Even when the mask is smaller than 4GB it is often
405 larger than 16MB and in this case we have a chance of 408 larger than 16MB and in this case we have a chance of
406 finding fitting memory in the next higher zone first. If 409 finding fitting memory in the next higher zone first. If
407 not retry with true GFP_DMA. -AK */ 410 not retry with true GFP_DMA. -AK */
408 if (dma_mask <= DMA_32BIT_MASK && !(gfp & GFP_DMA)) 411 if (dma_mask <= DMA_32BIT_MASK && !(gfp & GFP_DMA)) {
409 gfp |= GFP_DMA32; 412 gfp |= GFP_DMA32;
413 if (dma_mask < DMA_32BIT_MASK)
414 noretry = 1;
415 }
410#endif 416#endif
411 417
412 again: 418 again:
413 page = dma_alloc_pages(dev, gfp, get_order(size)); 419 page = dma_alloc_pages(dev,
420 noretry ? gfp | __GFP_NORETRY : gfp, get_order(size));
414 if (page == NULL) 421 if (page == NULL)
415 return NULL; 422 return NULL;
416 423
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c
index c07455d1695f..021f3c684a62 100644
--- a/arch/x86/kernel/pci-gart_64.c
+++ b/arch/x86/kernel/pci-gart_64.c
@@ -26,6 +26,7 @@
26#include <linux/kdebug.h> 26#include <linux/kdebug.h>
27#include <linux/scatterlist.h> 27#include <linux/scatterlist.h>
28#include <linux/iommu-helper.h> 28#include <linux/iommu-helper.h>
29#include <linux/sysdev.h>
29#include <asm/atomic.h> 30#include <asm/atomic.h>
30#include <asm/io.h> 31#include <asm/io.h>
31#include <asm/mtrr.h> 32#include <asm/mtrr.h>
@@ -103,7 +104,6 @@ static unsigned long alloc_iommu(struct device *dev, int size)
103 size, base_index, boundary_size, 0); 104 size, base_index, boundary_size, 0);
104 } 105 }
105 if (offset != -1) { 106 if (offset != -1) {
106 set_bit_string(iommu_gart_bitmap, offset, size);
107 next_bit = offset+size; 107 next_bit = offset+size;
108 if (next_bit >= iommu_pages) { 108 if (next_bit >= iommu_pages) {
109 next_bit = 0; 109 next_bit = 0;
@@ -533,8 +533,8 @@ static __init unsigned read_aperture(struct pci_dev *dev, u32 *size)
533 unsigned aper_size = 0, aper_base_32, aper_order; 533 unsigned aper_size = 0, aper_base_32, aper_order;
534 u64 aper_base; 534 u64 aper_base;
535 535
536 pci_read_config_dword(dev, 0x94, &aper_base_32); 536 pci_read_config_dword(dev, AMD64_GARTAPERTUREBASE, &aper_base_32);
537 pci_read_config_dword(dev, 0x90, &aper_order); 537 pci_read_config_dword(dev, AMD64_GARTAPERTURECTL, &aper_order);
538 aper_order = (aper_order >> 1) & 7; 538 aper_order = (aper_order >> 1) & 7;
539 539
540 aper_base = aper_base_32 & 0x7fff; 540 aper_base = aper_base_32 & 0x7fff;
@@ -548,6 +548,77 @@ static __init unsigned read_aperture(struct pci_dev *dev, u32 *size)
548 return aper_base; 548 return aper_base;
549} 549}
550 550
551static void enable_gart_translations(void)
552{
553 int i;
554
555 for (i = 0; i < num_k8_northbridges; i++) {
556 struct pci_dev *dev = k8_northbridges[i];
557
558 enable_gart_translation(dev, __pa(agp_gatt_table));
559 }
560}
561
562/*
563 * If fix_up_north_bridges is set, the north bridges have to be fixed up on
564 * resume in the same way as they are handled in gart_iommu_hole_init().
565 */
566static bool fix_up_north_bridges;
567static u32 aperture_order;
568static u32 aperture_alloc;
569
570void set_up_gart_resume(u32 aper_order, u32 aper_alloc)
571{
572 fix_up_north_bridges = true;
573 aperture_order = aper_order;
574 aperture_alloc = aper_alloc;
575}
576
577static int gart_resume(struct sys_device *dev)
578{
579 printk(KERN_INFO "PCI-DMA: Resuming GART IOMMU\n");
580
581 if (fix_up_north_bridges) {
582 int i;
583
584 printk(KERN_INFO "PCI-DMA: Restoring GART aperture settings\n");
585
586 for (i = 0; i < num_k8_northbridges; i++) {
587 struct pci_dev *dev = k8_northbridges[i];
588
589 /*
590 * Don't enable translations just yet. That is the next
591 * step. Restore the pre-suspend aperture settings.
592 */
593 pci_write_config_dword(dev, AMD64_GARTAPERTURECTL,
594 aperture_order << 1);
595 pci_write_config_dword(dev, AMD64_GARTAPERTUREBASE,
596 aperture_alloc >> 25);
597 }
598 }
599
600 enable_gart_translations();
601
602 return 0;
603}
604
605static int gart_suspend(struct sys_device *dev, pm_message_t state)
606{
607 return 0;
608}
609
610static struct sysdev_class gart_sysdev_class = {
611 .name = "gart",
612 .suspend = gart_suspend,
613 .resume = gart_resume,
614
615};
616
617static struct sys_device device_gart = {
618 .id = 0,
619 .cls = &gart_sysdev_class,
620};
621
551/* 622/*
552 * Private Northbridge GATT initialization in case we cannot use the 623 * Private Northbridge GATT initialization in case we cannot use the
553 * AGP driver for some reason. 624 * AGP driver for some reason.
@@ -558,7 +629,7 @@ static __init int init_k8_gatt(struct agp_kern_info *info)
558 unsigned aper_base, new_aper_base; 629 unsigned aper_base, new_aper_base;
559 struct pci_dev *dev; 630 struct pci_dev *dev;
560 void *gatt; 631 void *gatt;
561 int i; 632 int i, error;
562 633
563 printk(KERN_INFO "PCI-DMA: Disabling AGP.\n"); 634 printk(KERN_INFO "PCI-DMA: Disabling AGP.\n");
564 aper_size = aper_base = info->aper_size = 0; 635 aper_size = aper_base = info->aper_size = 0;
@@ -591,21 +662,14 @@ static __init int init_k8_gatt(struct agp_kern_info *info)
591 memset(gatt, 0, gatt_size); 662 memset(gatt, 0, gatt_size);
592 agp_gatt_table = gatt; 663 agp_gatt_table = gatt;
593 664
594 for (i = 0; i < num_k8_northbridges; i++) { 665 enable_gart_translations();
595 u32 gatt_reg;
596 u32 ctl;
597 666
598 dev = k8_northbridges[i]; 667 error = sysdev_class_register(&gart_sysdev_class);
599 gatt_reg = __pa(gatt) >> 12; 668 if (!error)
600 gatt_reg <<= 4; 669 error = sysdev_register(&device_gart);
601 pci_write_config_dword(dev, 0x98, gatt_reg); 670 if (error)
602 pci_read_config_dword(dev, 0x90, &ctl); 671 panic("Could not register gart_sysdev -- would corrupt data on next suspend");
603 672
604 ctl |= 1;
605 ctl &= ~((1<<4) | (1<<5));
606
607 pci_write_config_dword(dev, 0x90, ctl);
608 }
609 flush_gart(); 673 flush_gart();
610 674
611 printk(KERN_INFO "PCI-DMA: aperture base @ %x size %u KB\n", 675 printk(KERN_INFO "PCI-DMA: aperture base @ %x size %u KB\n",
@@ -648,11 +712,11 @@ void gart_iommu_shutdown(void)
648 u32 ctl; 712 u32 ctl;
649 713
650 dev = k8_northbridges[i]; 714 dev = k8_northbridges[i];
651 pci_read_config_dword(dev, 0x90, &ctl); 715 pci_read_config_dword(dev, AMD64_GARTAPERTURECTL, &ctl);
652 716
653 ctl &= ~1; 717 ctl &= ~GARTEN;
654 718
655 pci_write_config_dword(dev, 0x90, ctl); 719 pci_write_config_dword(dev, AMD64_GARTAPERTURECTL, ctl);
656 } 720 }
657} 721}
658 722
@@ -759,10 +823,10 @@ void __init gart_iommu_init(void)
759 wbinvd(); 823 wbinvd();
760 824
761 /* 825 /*
762 * Try to workaround a bug (thanks to BenH) 826 * Try to workaround a bug (thanks to BenH):
763 * Set unmapped entries to a scratch page instead of 0. 827 * Set unmapped entries to a scratch page instead of 0.
764 * Any prefetches that hit unmapped entries won't get an bus abort 828 * Any prefetches that hit unmapped entries won't get an bus abort
765 * then. 829 * then. (P2P bridge may be prefetching on DMA reads).
766 */ 830 */
767 scratch = get_zeroed_page(GFP_KERNEL); 831 scratch = get_zeroed_page(GFP_KERNEL);
768 if (!scratch) 832 if (!scratch)
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index ba370dc8685b..4061d63aabe7 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -6,6 +6,7 @@
6#include <linux/sched.h> 6#include <linux/sched.h>
7#include <linux/module.h> 7#include <linux/module.h>
8#include <linux/pm.h> 8#include <linux/pm.h>
9#include <linux/clockchips.h>
9 10
10struct kmem_cache *task_xstate_cachep; 11struct kmem_cache *task_xstate_cachep;
11 12
@@ -45,6 +46,76 @@ void arch_task_cache_init(void)
45 SLAB_PANIC, NULL); 46 SLAB_PANIC, NULL);
46} 47}
47 48
49/*
50 * Idle related variables and functions
51 */
52unsigned long boot_option_idle_override = 0;
53EXPORT_SYMBOL(boot_option_idle_override);
54
55/*
56 * Powermanagement idle function, if any..
57 */
58void (*pm_idle)(void);
59EXPORT_SYMBOL(pm_idle);
60
61#ifdef CONFIG_X86_32
62/*
63 * This halt magic was a workaround for ancient floppy DMA
64 * wreckage. It should be safe to remove.
65 */
66static int hlt_counter;
67void disable_hlt(void)
68{
69 hlt_counter++;
70}
71EXPORT_SYMBOL(disable_hlt);
72
73void enable_hlt(void)
74{
75 hlt_counter--;
76}
77EXPORT_SYMBOL(enable_hlt);
78
79static inline int hlt_use_halt(void)
80{
81 return (!hlt_counter && boot_cpu_data.hlt_works_ok);
82}
83#else
84static inline int hlt_use_halt(void)
85{
86 return 1;
87}
88#endif
89
90/*
91 * We use this if we don't have any better
92 * idle routine..
93 */
94void default_idle(void)
95{
96 if (hlt_use_halt()) {
97 current_thread_info()->status &= ~TS_POLLING;
98 /*
99 * TS_POLLING-cleared state must be visible before we
100 * test NEED_RESCHED:
101 */
102 smp_mb();
103
104 if (!need_resched())
105 safe_halt(); /* enables interrupts racelessly */
106 else
107 local_irq_enable();
108 current_thread_info()->status |= TS_POLLING;
109 } else {
110 local_irq_enable();
111 /* loop is done by the caller */
112 cpu_relax();
113 }
114}
115#ifdef CONFIG_APM_MODULE
116EXPORT_SYMBOL(default_idle);
117#endif
118
48static void do_nothing(void *unused) 119static void do_nothing(void *unused)
49{ 120{
50} 121}
@@ -122,44 +193,129 @@ static void poll_idle(void)
122 * 193 *
123 * idle=mwait overrides this decision and forces the usage of mwait. 194 * idle=mwait overrides this decision and forces the usage of mwait.
124 */ 195 */
196
197#define MWAIT_INFO 0x05
198#define MWAIT_ECX_EXTENDED_INFO 0x01
199#define MWAIT_EDX_C1 0xf0
200
125static int __cpuinit mwait_usable(const struct cpuinfo_x86 *c) 201static int __cpuinit mwait_usable(const struct cpuinfo_x86 *c)
126{ 202{
203 u32 eax, ebx, ecx, edx;
204
127 if (force_mwait) 205 if (force_mwait)
128 return 1; 206 return 1;
129 207
130 if (c->x86_vendor == X86_VENDOR_AMD) { 208 if (c->cpuid_level < MWAIT_INFO)
131 switch(c->x86) { 209 return 0;
132 case 0x10: 210
133 case 0x11: 211 cpuid(MWAIT_INFO, &eax, &ebx, &ecx, &edx);
134 return 0; 212 /* Check, whether EDX has extended info about MWAIT */
135 } 213 if (!(ecx & MWAIT_ECX_EXTENDED_INFO))
136 } 214 return 1;
215
216 /*
217 * edx enumeratios MONITOR/MWAIT extensions. Check, whether
218 * C1 supports MWAIT
219 */
220 return (edx & MWAIT_EDX_C1);
221}
222
223/*
224 * Check for AMD CPUs, which have potentially C1E support
225 */
226static int __cpuinit check_c1e_idle(const struct cpuinfo_x86 *c)
227{
228 if (c->x86_vendor != X86_VENDOR_AMD)
229 return 0;
230
231 if (c->x86 < 0x0F)
232 return 0;
233
234 /* Family 0x0f models < rev F do not have C1E */
235 if (c->x86 == 0x0f && c->x86_model < 0x40)
236 return 0;
237
137 return 1; 238 return 1;
138} 239}
139 240
140void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c) 241/*
242 * C1E aware idle routine. We check for C1E active in the interrupt
243 * pending message MSR. If we detect C1E, then we handle it the same
244 * way as C3 power states (local apic timer and TSC stop)
245 */
246static void c1e_idle(void)
141{ 247{
142 static int selected; 248 static cpumask_t c1e_mask = CPU_MASK_NONE;
249 static int c1e_detected;
143 250
144 if (selected) 251 if (need_resched())
145 return; 252 return;
253
254 if (!c1e_detected) {
255 u32 lo, hi;
256
257 rdmsr(MSR_K8_INT_PENDING_MSG, lo, hi);
258 if (lo & K8_INTP_C1E_ACTIVE_MASK) {
259 c1e_detected = 1;
260 mark_tsc_unstable("TSC halt in C1E");
261 printk(KERN_INFO "System has C1E enabled\n");
262 }
263 }
264
265 if (c1e_detected) {
266 int cpu = smp_processor_id();
267
268 if (!cpu_isset(cpu, c1e_mask)) {
269 cpu_set(cpu, c1e_mask);
270 /*
271 * Force broadcast so ACPI can not interfere. Needs
272 * to run with interrupts enabled as it uses
273 * smp_function_call.
274 */
275 local_irq_enable();
276 clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_FORCE,
277 &cpu);
278 printk(KERN_INFO "Switch to broadcast mode on CPU%d\n",
279 cpu);
280 local_irq_disable();
281 }
282 clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu);
283
284 default_idle();
285
286 /*
287 * The switch back from broadcast mode needs to be
288 * called with interrupts disabled.
289 */
290 local_irq_disable();
291 clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu);
292 local_irq_enable();
293 } else
294 default_idle();
295}
296
297void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c)
298{
146#ifdef CONFIG_X86_SMP 299#ifdef CONFIG_X86_SMP
147 if (pm_idle == poll_idle && smp_num_siblings > 1) { 300 if (pm_idle == poll_idle && smp_num_siblings > 1) {
148 printk(KERN_WARNING "WARNING: polling idle and HT enabled," 301 printk(KERN_WARNING "WARNING: polling idle and HT enabled,"
149 " performance may degrade.\n"); 302 " performance may degrade.\n");
150 } 303 }
151#endif 304#endif
305 if (pm_idle)
306 return;
307
152 if (cpu_has(c, X86_FEATURE_MWAIT) && mwait_usable(c)) { 308 if (cpu_has(c, X86_FEATURE_MWAIT) && mwait_usable(c)) {
153 /* 309 /*
154 * Skip, if setup has overridden idle.
155 * One CPU supports mwait => All CPUs supports mwait 310 * One CPU supports mwait => All CPUs supports mwait
156 */ 311 */
157 if (!pm_idle) { 312 printk(KERN_INFO "using mwait in idle threads.\n");
158 printk(KERN_INFO "using mwait in idle threads.\n"); 313 pm_idle = mwait_idle;
159 pm_idle = mwait_idle; 314 } else if (check_c1e_idle(c)) {
160 } 315 printk(KERN_INFO "using C1E aware idle routine\n");
161 } 316 pm_idle = c1e_idle;
162 selected = 1; 317 } else
318 pm_idle = default_idle;
163} 319}
164 320
165static int __init idle_setup(char *str) 321static int __init idle_setup(char *str)
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
index f8476dfbb60d..c2a11d77b1b5 100644
--- a/arch/x86/kernel/process_32.c
+++ b/arch/x86/kernel/process_32.c
@@ -58,11 +58,6 @@
58 58
59asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); 59asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
60 60
61static int hlt_counter;
62
63unsigned long boot_option_idle_override = 0;
64EXPORT_SYMBOL(boot_option_idle_override);
65
66DEFINE_PER_CPU(struct task_struct *, current_task) = &init_task; 61DEFINE_PER_CPU(struct task_struct *, current_task) = &init_task;
67EXPORT_PER_CPU_SYMBOL(current_task); 62EXPORT_PER_CPU_SYMBOL(current_task);
68 63
@@ -77,55 +72,6 @@ unsigned long thread_saved_pc(struct task_struct *tsk)
77 return ((unsigned long *)tsk->thread.sp)[3]; 72 return ((unsigned long *)tsk->thread.sp)[3];
78} 73}
79 74
80/*
81 * Powermanagement idle function, if any..
82 */
83void (*pm_idle)(void);
84EXPORT_SYMBOL(pm_idle);
85
86void disable_hlt(void)
87{
88 hlt_counter++;
89}
90
91EXPORT_SYMBOL(disable_hlt);
92
93void enable_hlt(void)
94{
95 hlt_counter--;
96}
97
98EXPORT_SYMBOL(enable_hlt);
99
100/*
101 * We use this if we don't have any better
102 * idle routine..
103 */
104void default_idle(void)
105{
106 if (!hlt_counter && boot_cpu_data.hlt_works_ok) {
107 current_thread_info()->status &= ~TS_POLLING;
108 /*
109 * TS_POLLING-cleared state must be visible before we
110 * test NEED_RESCHED:
111 */
112 smp_mb();
113
114 if (!need_resched())
115 safe_halt(); /* enables interrupts racelessly */
116 else
117 local_irq_enable();
118 current_thread_info()->status |= TS_POLLING;
119 } else {
120 local_irq_enable();
121 /* loop is done by the caller */
122 cpu_relax();
123 }
124}
125#ifdef CONFIG_APM_MODULE
126EXPORT_SYMBOL(default_idle);
127#endif
128
129#ifdef CONFIG_HOTPLUG_CPU 75#ifdef CONFIG_HOTPLUG_CPU
130#include <asm/nmi.h> 76#include <asm/nmi.h>
131/* We don't actually take CPU down, just spin without interrupts. */ 77/* We don't actually take CPU down, just spin without interrupts. */
@@ -168,24 +114,19 @@ void cpu_idle(void)
168 while (1) { 114 while (1) {
169 tick_nohz_stop_sched_tick(); 115 tick_nohz_stop_sched_tick();
170 while (!need_resched()) { 116 while (!need_resched()) {
171 void (*idle)(void);
172 117
173 check_pgt_cache(); 118 check_pgt_cache();
174 rmb(); 119 rmb();
175 idle = pm_idle;
176 120
177 if (rcu_pending(cpu)) 121 if (rcu_pending(cpu))
178 rcu_check_callbacks(cpu, 0); 122 rcu_check_callbacks(cpu, 0);
179 123
180 if (!idle)
181 idle = default_idle;
182
183 if (cpu_is_offline(cpu)) 124 if (cpu_is_offline(cpu))
184 play_dead(); 125 play_dead();
185 126
186 local_irq_disable(); 127 local_irq_disable();
187 __get_cpu_var(irq_stat).idle_timestamp = jiffies; 128 __get_cpu_var(irq_stat).idle_timestamp = jiffies;
188 idle(); 129 pm_idle();
189 } 130 }
190 tick_nohz_restart_sched_tick(); 131 tick_nohz_restart_sched_tick();
191 preempt_enable_no_resched(); 132 preempt_enable_no_resched();
@@ -333,6 +274,7 @@ void flush_thread(void)
333 /* 274 /*
334 * Forget coprocessor state.. 275 * Forget coprocessor state..
335 */ 276 */
277 tsk->fpu_counter = 0;
336 clear_fpu(tsk); 278 clear_fpu(tsk);
337 clear_used_math(); 279 clear_used_math();
338} 280}
@@ -649,8 +591,11 @@ struct task_struct * __switch_to(struct task_struct *prev_p, struct task_struct
649 /* If the task has used fpu the last 5 timeslices, just do a full 591 /* If the task has used fpu the last 5 timeslices, just do a full
650 * restore of the math state immediately to avoid the trap; the 592 * restore of the math state immediately to avoid the trap; the
651 * chances of needing FPU soon are obviously high now 593 * chances of needing FPU soon are obviously high now
594 *
595 * tsk_used_math() checks prevent calling math_state_restore(),
596 * which can sleep in the case of !tsk_used_math()
652 */ 597 */
653 if (next_p->fpu_counter > 5) 598 if (tsk_used_math(next_p) && next_p->fpu_counter > 5)
654 math_state_restore(); 599 math_state_restore();
655 600
656 /* 601 /*
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index e2319f39988b..290183e9731a 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -56,15 +56,6 @@ asmlinkage extern void ret_from_fork(void);
56 56
57unsigned long kernel_thread_flags = CLONE_VM | CLONE_UNTRACED; 57unsigned long kernel_thread_flags = CLONE_VM | CLONE_UNTRACED;
58 58
59unsigned long boot_option_idle_override = 0;
60EXPORT_SYMBOL(boot_option_idle_override);
61
62/*
63 * Powermanagement idle function, if any..
64 */
65void (*pm_idle)(void);
66EXPORT_SYMBOL(pm_idle);
67
68static ATOMIC_NOTIFIER_HEAD(idle_notifier); 59static ATOMIC_NOTIFIER_HEAD(idle_notifier);
69 60
70void idle_notifier_register(struct notifier_block *n) 61void idle_notifier_register(struct notifier_block *n)
@@ -94,25 +85,6 @@ void exit_idle(void)
94 __exit_idle(); 85 __exit_idle();
95} 86}
96 87
97/*
98 * We use this if we don't have any better
99 * idle routine..
100 */
101void default_idle(void)
102{
103 current_thread_info()->status &= ~TS_POLLING;
104 /*
105 * TS_POLLING-cleared state must be visible before we
106 * test NEED_RESCHED:
107 */
108 smp_mb();
109 if (!need_resched())
110 safe_halt(); /* enables interrupts racelessly */
111 else
112 local_irq_enable();
113 current_thread_info()->status |= TS_POLLING;
114}
115
116#ifdef CONFIG_HOTPLUG_CPU 88#ifdef CONFIG_HOTPLUG_CPU
117DECLARE_PER_CPU(int, cpu_state); 89DECLARE_PER_CPU(int, cpu_state);
118 90
@@ -150,12 +122,9 @@ void cpu_idle(void)
150 while (1) { 122 while (1) {
151 tick_nohz_stop_sched_tick(); 123 tick_nohz_stop_sched_tick();
152 while (!need_resched()) { 124 while (!need_resched()) {
153 void (*idle)(void);
154 125
155 rmb(); 126 rmb();
156 idle = pm_idle; 127
157 if (!idle)
158 idle = default_idle;
159 if (cpu_is_offline(smp_processor_id())) 128 if (cpu_is_offline(smp_processor_id()))
160 play_dead(); 129 play_dead();
161 /* 130 /*
@@ -165,7 +134,7 @@ void cpu_idle(void)
165 */ 134 */
166 local_irq_disable(); 135 local_irq_disable();
167 enter_idle(); 136 enter_idle();
168 idle(); 137 pm_idle();
169 /* In many cases the interrupt that ended idle 138 /* In many cases the interrupt that ended idle
170 has already called exit_idle. But some idle 139 has already called exit_idle. But some idle
171 loops can be woken up without interrupt. */ 140 loops can be woken up without interrupt. */
@@ -294,6 +263,7 @@ void flush_thread(void)
294 /* 263 /*
295 * Forget coprocessor state.. 264 * Forget coprocessor state..
296 */ 265 */
266 tsk->fpu_counter = 0;
297 clear_fpu(tsk); 267 clear_fpu(tsk);
298 clear_used_math(); 268 clear_used_math();
299} 269}
@@ -658,8 +628,11 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
658 /* If the task has used fpu the last 5 timeslices, just do a full 628 /* If the task has used fpu the last 5 timeslices, just do a full
659 * restore of the math state immediately to avoid the trap; the 629 * restore of the math state immediately to avoid the trap; the
660 * chances of needing FPU soon are obviously high now 630 * chances of needing FPU soon are obviously high now
631 *
632 * tsk_used_math() checks prevent calling math_state_restore(),
633 * which can sleep in the case of !tsk_used_math()
661 */ 634 */
662 if (next_p->fpu_counter>5) 635 if (tsk_used_math(next_p) && next_p->fpu_counter > 5)
663 math_state_restore(); 636 math_state_restore();
664 return prev_p; 637 return prev_p;
665} 638}
diff --git a/arch/x86/kernel/pvclock.c b/arch/x86/kernel/pvclock.c
new file mode 100644
index 000000000000..05fbe9a0325a
--- /dev/null
+++ b/arch/x86/kernel/pvclock.c
@@ -0,0 +1,141 @@
1/* paravirtual clock -- common code used by kvm/xen
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2 of the License, or
6 (at your option) any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16*/
17
18#include <linux/kernel.h>
19#include <linux/percpu.h>
20#include <asm/pvclock.h>
21
22/*
23 * These are perodically updated
24 * xen: magic shared_info page
25 * kvm: gpa registered via msr
26 * and then copied here.
27 */
28struct pvclock_shadow_time {
29 u64 tsc_timestamp; /* TSC at last update of time vals. */
30 u64 system_timestamp; /* Time, in nanosecs, since boot. */
31 u32 tsc_to_nsec_mul;
32 int tsc_shift;
33 u32 version;
34};
35
36/*
37 * Scale a 64-bit delta by scaling and multiplying by a 32-bit fraction,
38 * yielding a 64-bit result.
39 */
40static inline u64 scale_delta(u64 delta, u32 mul_frac, int shift)
41{
42 u64 product;
43#ifdef __i386__
44 u32 tmp1, tmp2;
45#endif
46
47 if (shift < 0)
48 delta >>= -shift;
49 else
50 delta <<= shift;
51
52#ifdef __i386__
53 __asm__ (
54 "mul %5 ; "
55 "mov %4,%%eax ; "
56 "mov %%edx,%4 ; "
57 "mul %5 ; "
58 "xor %5,%5 ; "
59 "add %4,%%eax ; "
60 "adc %5,%%edx ; "
61 : "=A" (product), "=r" (tmp1), "=r" (tmp2)
62 : "a" ((u32)delta), "1" ((u32)(delta >> 32)), "2" (mul_frac) );
63#elif __x86_64__
64 __asm__ (
65 "mul %%rdx ; shrd $32,%%rdx,%%rax"
66 : "=a" (product) : "0" (delta), "d" ((u64)mul_frac) );
67#else
68#error implement me!
69#endif
70
71 return product;
72}
73
74static u64 pvclock_get_nsec_offset(struct pvclock_shadow_time *shadow)
75{
76 u64 delta = native_read_tsc() - shadow->tsc_timestamp;
77 return scale_delta(delta, shadow->tsc_to_nsec_mul, shadow->tsc_shift);
78}
79
80/*
81 * Reads a consistent set of time-base values from hypervisor,
82 * into a shadow data area.
83 */
84static unsigned pvclock_get_time_values(struct pvclock_shadow_time *dst,
85 struct pvclock_vcpu_time_info *src)
86{
87 do {
88 dst->version = src->version;
89 rmb(); /* fetch version before data */
90 dst->tsc_timestamp = src->tsc_timestamp;
91 dst->system_timestamp = src->system_time;
92 dst->tsc_to_nsec_mul = src->tsc_to_system_mul;
93 dst->tsc_shift = src->tsc_shift;
94 rmb(); /* test version after fetching data */
95 } while ((src->version & 1) || (dst->version != src->version));
96
97 return dst->version;
98}
99
100cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src)
101{
102 struct pvclock_shadow_time shadow;
103 unsigned version;
104 cycle_t ret, offset;
105
106 do {
107 version = pvclock_get_time_values(&shadow, src);
108 barrier();
109 offset = pvclock_get_nsec_offset(&shadow);
110 ret = shadow.system_timestamp + offset;
111 barrier();
112 } while (version != src->version);
113
114 return ret;
115}
116
117void pvclock_read_wallclock(struct pvclock_wall_clock *wall_clock,
118 struct pvclock_vcpu_time_info *vcpu_time,
119 struct timespec *ts)
120{
121 u32 version;
122 u64 delta;
123 struct timespec now;
124
125 /* get wallclock at system boot */
126 do {
127 version = wall_clock->version;
128 rmb(); /* fetch version before time */
129 now.tv_sec = wall_clock->sec;
130 now.tv_nsec = wall_clock->nsec;
131 rmb(); /* fetch time before checking version */
132 } while ((wall_clock->version & 1) || (version != wall_clock->version));
133
134 delta = pvclock_clocksource_read(vcpu_time); /* time since system boot */
135 delta += now.tv_sec * (u64)NSEC_PER_SEC + now.tv_nsec;
136
137 now.tv_nsec = do_div(delta, NSEC_PER_SEC);
138 now.tv_sec = delta;
139
140 set_normalized_timespec(ts, now.tv_sec, now.tv_nsec);
141}
diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c
index d89a648fe710..79bdcd11c66e 100644
--- a/arch/x86/kernel/quirks.c
+++ b/arch/x86/kernel/quirks.c
@@ -65,6 +65,7 @@ static enum {
65 ICH_FORCE_HPET_RESUME, 65 ICH_FORCE_HPET_RESUME,
66 VT8237_FORCE_HPET_RESUME, 66 VT8237_FORCE_HPET_RESUME,
67 NVIDIA_FORCE_HPET_RESUME, 67 NVIDIA_FORCE_HPET_RESUME,
68 ATI_FORCE_HPET_RESUME,
68} force_hpet_resume_type; 69} force_hpet_resume_type;
69 70
70static void __iomem *rcba_base; 71static void __iomem *rcba_base;
@@ -158,6 +159,8 @@ static void ich_force_enable_hpet(struct pci_dev *dev)
158 159
159DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB2_0, 160DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB2_0,
160 ich_force_enable_hpet); 161 ich_force_enable_hpet);
162DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_0,
163 ich_force_enable_hpet);
161DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1, 164DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1,
162 ich_force_enable_hpet); 165 ich_force_enable_hpet);
163DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_0, 166DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_0,
@@ -174,6 +177,12 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9_7,
174 177
175static struct pci_dev *cached_dev; 178static struct pci_dev *cached_dev;
176 179
180static void hpet_print_force_info(void)
181{
182 printk(KERN_INFO "HPET not enabled in BIOS. "
183 "You might try hpet=force boot option\n");
184}
185
177static void old_ich_force_hpet_resume(void) 186static void old_ich_force_hpet_resume(void)
178{ 187{
179 u32 val; 188 u32 val;
@@ -253,6 +262,8 @@ static void old_ich_force_enable_hpet_user(struct pci_dev *dev)
253{ 262{
254 if (hpet_force_user) 263 if (hpet_force_user)
255 old_ich_force_enable_hpet(dev); 264 old_ich_force_enable_hpet(dev);
265 else
266 hpet_print_force_info();
256} 267}
257 268
258DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0, 269DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0,
@@ -290,8 +301,13 @@ static void vt8237_force_enable_hpet(struct pci_dev *dev)
290{ 301{
291 u32 uninitialized_var(val); 302 u32 uninitialized_var(val);
292 303
293 if (!hpet_force_user || hpet_address || force_hpet_address) 304 if (hpet_address || force_hpet_address)
305 return;
306
307 if (!hpet_force_user) {
308 hpet_print_force_info();
294 return; 309 return;
310 }
295 311
296 pci_read_config_dword(dev, 0x68, &val); 312 pci_read_config_dword(dev, 0x68, &val);
297 /* 313 /*
@@ -330,6 +346,36 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235,
330DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, 346DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237,
331 vt8237_force_enable_hpet); 347 vt8237_force_enable_hpet);
332 348
349static void ati_force_hpet_resume(void)
350{
351 pci_write_config_dword(cached_dev, 0x14, 0xfed00000);
352 printk(KERN_DEBUG "Force enabled HPET at resume\n");
353}
354
355static void ati_force_enable_hpet(struct pci_dev *dev)
356{
357 u32 uninitialized_var(val);
358
359 if (hpet_address || force_hpet_address)
360 return;
361
362 if (!hpet_force_user) {
363 hpet_print_force_info();
364 return;
365 }
366
367 pci_write_config_dword(dev, 0x14, 0xfed00000);
368 pci_read_config_dword(dev, 0x14, &val);
369 force_hpet_address = val;
370 force_hpet_resume_type = ATI_FORCE_HPET_RESUME;
371 dev_printk(KERN_DEBUG, &dev->dev, "Force enabled HPET at 0x%lx\n",
372 force_hpet_address);
373 cached_dev = dev;
374 return;
375}
376DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS,
377 ati_force_enable_hpet);
378
333/* 379/*
334 * Undocumented chipset feature taken from LinuxBIOS. 380 * Undocumented chipset feature taken from LinuxBIOS.
335 */ 381 */
@@ -343,8 +389,13 @@ static void nvidia_force_enable_hpet(struct pci_dev *dev)
343{ 389{
344 u32 uninitialized_var(val); 390 u32 uninitialized_var(val);
345 391
346 if (!hpet_force_user || hpet_address || force_hpet_address) 392 if (hpet_address || force_hpet_address)
393 return;
394
395 if (!hpet_force_user) {
396 hpet_print_force_info();
347 return; 397 return;
398 }
348 399
349 pci_write_config_dword(dev, 0x44, 0xfed00001); 400 pci_write_config_dword(dev, 0x44, 0xfed00001);
350 pci_read_config_dword(dev, 0x44, &val); 401 pci_read_config_dword(dev, 0x44, &val);
@@ -397,6 +448,9 @@ void force_hpet_resume(void)
397 case NVIDIA_FORCE_HPET_RESUME: 448 case NVIDIA_FORCE_HPET_RESUME:
398 nvidia_force_hpet_resume(); 449 nvidia_force_hpet_resume();
399 return; 450 return;
451 case ATI_FORCE_HPET_RESUME:
452 ati_force_hpet_resume();
453 return;
400 default: 454 default:
401 break; 455 break;
402 } 456 }
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index f6be7d5f82f8..f8a62160e151 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -27,7 +27,7 @@
27void (*pm_power_off)(void); 27void (*pm_power_off)(void);
28EXPORT_SYMBOL(pm_power_off); 28EXPORT_SYMBOL(pm_power_off);
29 29
30static long no_idt[3]; 30static const struct desc_ptr no_idt = {};
31static int reboot_mode; 31static int reboot_mode;
32enum reboot_type reboot_type = BOOT_KBD; 32enum reboot_type reboot_type = BOOT_KBD;
33int reboot_force; 33int reboot_force;
@@ -201,15 +201,15 @@ core_initcall(reboot_init);
201 controller to pulse the CPU reset line, which is more thorough, but 201 controller to pulse the CPU reset line, which is more thorough, but
202 doesn't work with at least one type of 486 motherboard. It is easy 202 doesn't work with at least one type of 486 motherboard. It is easy
203 to stop this code working; hence the copious comments. */ 203 to stop this code working; hence the copious comments. */
204static unsigned long long 204static const unsigned long long
205real_mode_gdt_entries [3] = 205real_mode_gdt_entries [3] =
206{ 206{
207 0x0000000000000000ULL, /* Null descriptor */ 207 0x0000000000000000ULL, /* Null descriptor */
208 0x00009a000000ffffULL, /* 16-bit real-mode 64k code at 0x00000000 */ 208 0x00009b000000ffffULL, /* 16-bit real-mode 64k code at 0x00000000 */
209 0x000092000100ffffULL /* 16-bit real-mode 64k data at 0x00000100 */ 209 0x000093000100ffffULL /* 16-bit real-mode 64k data at 0x00000100 */
210}; 210};
211 211
212static struct desc_ptr 212static const struct desc_ptr
213real_mode_gdt = { sizeof (real_mode_gdt_entries) - 1, (long)real_mode_gdt_entries }, 213real_mode_gdt = { sizeof (real_mode_gdt_entries) - 1, (long)real_mode_gdt_entries },
214real_mode_idt = { 0x3ff, 0 }; 214real_mode_idt = { 0x3ff, 0 };
215 215
@@ -231,7 +231,7 @@ real_mode_idt = { 0x3ff, 0 };
231 231
232 More could be done here to set up the registers as if a CPU reset had 232 More could be done here to set up the registers as if a CPU reset had
233 occurred; hopefully real BIOSs don't assume much. */ 233 occurred; hopefully real BIOSs don't assume much. */
234static unsigned char real_mode_switch [] = 234static const unsigned char real_mode_switch [] =
235{ 235{
236 0x66, 0x0f, 0x20, 0xc0, /* movl %cr0,%eax */ 236 0x66, 0x0f, 0x20, 0xc0, /* movl %cr0,%eax */
237 0x66, 0x83, 0xe0, 0x11, /* andl $0x00000011,%eax */ 237 0x66, 0x83, 0xe0, 0x11, /* andl $0x00000011,%eax */
@@ -245,7 +245,7 @@ static unsigned char real_mode_switch [] =
245 0x24, 0x10, /* f: andb $0x10,al */ 245 0x24, 0x10, /* f: andb $0x10,al */
246 0x66, 0x0f, 0x22, 0xc0 /* movl %eax,%cr0 */ 246 0x66, 0x0f, 0x22, 0xc0 /* movl %eax,%cr0 */
247}; 247};
248static unsigned char jump_to_bios [] = 248static const unsigned char jump_to_bios [] =
249{ 249{
250 0xea, 0x00, 0x00, 0xff, 0xff /* ljmp $0xffff,$0x0000 */ 250 0xea, 0x00, 0x00, 0xff, 0xff /* ljmp $0xffff,$0x0000 */
251}; 251};
@@ -255,7 +255,7 @@ static unsigned char jump_to_bios [] =
255 * specified by the code and length parameters. 255 * specified by the code and length parameters.
256 * We assume that length will aways be less that 100! 256 * We assume that length will aways be less that 100!
257 */ 257 */
258void machine_real_restart(unsigned char *code, int length) 258void machine_real_restart(const unsigned char *code, int length)
259{ 259{
260 local_irq_disable(); 260 local_irq_disable();
261 261
@@ -368,7 +368,7 @@ static void native_machine_emergency_restart(void)
368 } 368 }
369 369
370 case BOOT_TRIPLE: 370 case BOOT_TRIPLE:
371 load_idt((const struct desc_ptr *)&no_idt); 371 load_idt(&no_idt);
372 __asm__ __volatile__("int3"); 372 __asm__ __volatile__("int3");
373 373
374 reboot_type = BOOT_KBD; 374 reboot_type = BOOT_KBD;
diff --git a/arch/x86/kernel/reboot_fixups_32.c b/arch/x86/kernel/reboot_fixups_32.c
index dec0b5ec25c2..61a837743fe5 100644
--- a/arch/x86/kernel/reboot_fixups_32.c
+++ b/arch/x86/kernel/reboot_fixups_32.c
@@ -49,7 +49,7 @@ struct device_fixup {
49 void (*reboot_fixup)(struct pci_dev *); 49 void (*reboot_fixup)(struct pci_dev *);
50}; 50};
51 51
52static struct device_fixup fixups_table[] = { 52static const struct device_fixup fixups_table[] = {
53{ PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY, cs5530a_warm_reset }, 53{ PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY, cs5530a_warm_reset },
54{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_ISA, cs5536_warm_reset }, 54{ PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_ISA, cs5536_warm_reset },
55{ PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SC1100_BRIDGE, cs5530a_warm_reset }, 55{ PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SC1100_BRIDGE, cs5530a_warm_reset },
@@ -64,7 +64,7 @@ static struct device_fixup fixups_table[] = {
64 */ 64 */
65void mach_reboot_fixups(void) 65void mach_reboot_fixups(void)
66{ 66{
67 struct device_fixup *cur; 67 const struct device_fixup *cur;
68 struct pci_dev *dev; 68 struct pci_dev *dev;
69 int i; 69 int i;
70 70
diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c
index 9615eee9b775..05191bbc68b8 100644
--- a/arch/x86/kernel/rtc.c
+++ b/arch/x86/kernel/rtc.c
@@ -4,6 +4,8 @@
4#include <linux/acpi.h> 4#include <linux/acpi.h>
5#include <linux/bcd.h> 5#include <linux/bcd.h>
6#include <linux/mc146818rtc.h> 6#include <linux/mc146818rtc.h>
7#include <linux/platform_device.h>
8#include <linux/pnp.h>
7 9
8#include <asm/time.h> 10#include <asm/time.h>
9#include <asm/vsyscall.h> 11#include <asm/vsyscall.h>
@@ -197,3 +199,35 @@ unsigned long long native_read_tsc(void)
197} 199}
198EXPORT_SYMBOL(native_read_tsc); 200EXPORT_SYMBOL(native_read_tsc);
199 201
202
203static struct resource rtc_resources[] = {
204 [0] = {
205 .start = RTC_PORT(0),
206 .end = RTC_PORT(1),
207 .flags = IORESOURCE_IO,
208 },
209 [1] = {
210 .start = RTC_IRQ,
211 .end = RTC_IRQ,
212 .flags = IORESOURCE_IRQ,
213 }
214};
215
216static struct platform_device rtc_device = {
217 .name = "rtc_cmos",
218 .id = -1,
219 .resource = rtc_resources,
220 .num_resources = ARRAY_SIZE(rtc_resources),
221};
222
223static __init int add_rtc_cmos(void)
224{
225#ifdef CONFIG_PNP
226 if (!pnp_platform_devices)
227 platform_device_register(&rtc_device);
228#else
229 platform_device_register(&rtc_device);
230#endif /* CONFIG_PNP */
231 return 0;
232}
233device_initcall(add_rtc_cmos);
diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c
index 2c5f8b213e86..5a2f8e063887 100644
--- a/arch/x86/kernel/setup_32.c
+++ b/arch/x86/kernel/setup_32.c
@@ -532,10 +532,16 @@ static void __init reserve_crashkernel(void)
532 (unsigned long)(crash_size >> 20), 532 (unsigned long)(crash_size >> 20),
533 (unsigned long)(crash_base >> 20), 533 (unsigned long)(crash_base >> 20),
534 (unsigned long)(total_mem >> 20)); 534 (unsigned long)(total_mem >> 20));
535
536 if (reserve_bootmem(crash_base, crash_size,
537 BOOTMEM_EXCLUSIVE) < 0) {
538 printk(KERN_INFO "crashkernel reservation "
539 "failed - memory is in use\n");
540 return;
541 }
542
535 crashk_res.start = crash_base; 543 crashk_res.start = crash_base;
536 crashk_res.end = crash_base + crash_size - 1; 544 crashk_res.end = crash_base + crash_size - 1;
537 reserve_bootmem(crash_base, crash_size,
538 BOOTMEM_DEFAULT);
539 } else 545 } else
540 printk(KERN_INFO "crashkernel reservation failed - " 546 printk(KERN_INFO "crashkernel reservation failed - "
541 "you have to specify a base address\n"); 547 "you have to specify a base address\n");
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c
index 6dff1286ad8a..545440e471b2 100644
--- a/arch/x86/kernel/setup_64.c
+++ b/arch/x86/kernel/setup_64.c
@@ -71,6 +71,7 @@
71#include <asm/topology.h> 71#include <asm/topology.h>
72#include <asm/trampoline.h> 72#include <asm/trampoline.h>
73#include <asm/pat.h> 73#include <asm/pat.h>
74#include <asm/mmconfig.h>
74 75
75#include <mach_apic.h> 76#include <mach_apic.h>
76#ifdef CONFIG_PARAVIRT 77#ifdef CONFIG_PARAVIRT
@@ -79,6 +80,8 @@
79#define ARCH_SETUP 80#define ARCH_SETUP
80#endif 81#endif
81 82
83#include "cpu/cpu.h"
84
82/* 85/*
83 * Machine setup.. 86 * Machine setup..
84 */ 87 */
@@ -95,8 +98,6 @@ int bootloader_type;
95 98
96unsigned long saved_video_mode; 99unsigned long saved_video_mode;
97 100
98int force_mwait __cpuinitdata;
99
100/* 101/*
101 * Early DMI memory 102 * Early DMI memory
102 */ 103 */
@@ -118,7 +119,7 @@ EXPORT_SYMBOL_GPL(edid_info);
118 119
119extern int root_mountflags; 120extern int root_mountflags;
120 121
121char __initdata command_line[COMMAND_LINE_SIZE]; 122static char __initdata command_line[COMMAND_LINE_SIZE];
122 123
123static struct resource standard_io_resources[] = { 124static struct resource standard_io_resources[] = {
124 { .name = "dma1", .start = 0x00, .end = 0x1f, 125 { .name = "dma1", .start = 0x00, .end = 0x1f,
@@ -164,6 +165,7 @@ static struct resource bss_resource = {
164 .flags = IORESOURCE_RAM, 165 .flags = IORESOURCE_RAM,
165}; 166};
166 167
168static void __init early_cpu_init(void);
167static void __cpuinit early_identify_cpu(struct cpuinfo_x86 *c); 169static void __cpuinit early_identify_cpu(struct cpuinfo_x86 *c);
168 170
169#ifdef CONFIG_PROC_VMCORE 171#ifdef CONFIG_PROC_VMCORE
@@ -293,18 +295,6 @@ static void __init parse_setup_data(void)
293 } 295 }
294} 296}
295 297
296#ifdef CONFIG_PCI_MMCONFIG
297extern void __cpuinit fam10h_check_enable_mmcfg(void);
298extern void __init check_enable_amd_mmconf_dmi(void);
299#else
300void __cpuinit fam10h_check_enable_mmcfg(void)
301{
302}
303void __init check_enable_amd_mmconf_dmi(void)
304{
305}
306#endif
307
308/* 298/*
309 * setup_arch - architecture-specific boot-time initializations 299 * setup_arch - architecture-specific boot-time initializations
310 * 300 *
@@ -352,6 +342,7 @@ void __init setup_arch(char **cmdline_p)
352 bss_resource.start = virt_to_phys(&__bss_start); 342 bss_resource.start = virt_to_phys(&__bss_start);
353 bss_resource.end = virt_to_phys(&__bss_stop)-1; 343 bss_resource.end = virt_to_phys(&__bss_stop)-1;
354 344
345 early_cpu_init();
355 early_identify_cpu(&boot_cpu_data); 346 early_identify_cpu(&boot_cpu_data);
356 347
357 strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE); 348 strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
@@ -537,7 +528,20 @@ void __init setup_arch(char **cmdline_p)
537 check_enable_amd_mmconf_dmi(); 528 check_enable_amd_mmconf_dmi();
538} 529}
539 530
540static int __cpuinit get_model_name(struct cpuinfo_x86 *c) 531struct cpu_dev *cpu_devs[X86_VENDOR_NUM] = {};
532
533static void __cpuinit default_init(struct cpuinfo_x86 *c)
534{
535 display_cacheinfo(c);
536}
537
538static struct cpu_dev __cpuinitdata default_cpu = {
539 .c_init = default_init,
540 .c_vendor = "Unknown",
541};
542static struct cpu_dev *this_cpu __cpuinitdata = &default_cpu;
543
544int __cpuinit get_model_name(struct cpuinfo_x86 *c)
541{ 545{
542 unsigned int *v; 546 unsigned int *v;
543 547
@@ -553,7 +557,7 @@ static int __cpuinit get_model_name(struct cpuinfo_x86 *c)
553} 557}
554 558
555 559
556static void __cpuinit display_cacheinfo(struct cpuinfo_x86 *c) 560void __cpuinit display_cacheinfo(struct cpuinfo_x86 *c)
557{ 561{
558 unsigned int n, dummy, eax, ebx, ecx, edx; 562 unsigned int n, dummy, eax, ebx, ecx, edx;
559 563
@@ -585,228 +589,6 @@ static void __cpuinit display_cacheinfo(struct cpuinfo_x86 *c)
585 } 589 }
586} 590}
587 591
588#ifdef CONFIG_NUMA
589static int __cpuinit nearby_node(int apicid)
590{
591 int i, node;
592
593 for (i = apicid - 1; i >= 0; i--) {
594 node = apicid_to_node[i];
595 if (node != NUMA_NO_NODE && node_online(node))
596 return node;
597 }
598 for (i = apicid + 1; i < MAX_LOCAL_APIC; i++) {
599 node = apicid_to_node[i];
600 if (node != NUMA_NO_NODE && node_online(node))
601 return node;
602 }
603 return first_node(node_online_map); /* Shouldn't happen */
604}
605#endif
606
607/*
608 * On a AMD dual core setup the lower bits of the APIC id distingush the cores.
609 * Assumes number of cores is a power of two.
610 */
611static void __cpuinit amd_detect_cmp(struct cpuinfo_x86 *c)
612{
613#ifdef CONFIG_SMP
614 unsigned bits;
615#ifdef CONFIG_NUMA
616 int cpu = smp_processor_id();
617 int node = 0;
618 unsigned apicid = hard_smp_processor_id();
619#endif
620 bits = c->x86_coreid_bits;
621
622 /* Low order bits define the core id (index of core in socket) */
623 c->cpu_core_id = c->initial_apicid & ((1 << bits)-1);
624 /* Convert the initial APIC ID into the socket ID */
625 c->phys_proc_id = c->initial_apicid >> bits;
626
627#ifdef CONFIG_NUMA
628 node = c->phys_proc_id;
629 if (apicid_to_node[apicid] != NUMA_NO_NODE)
630 node = apicid_to_node[apicid];
631 if (!node_online(node)) {
632 /* Two possibilities here:
633 - The CPU is missing memory and no node was created.
634 In that case try picking one from a nearby CPU
635 - The APIC IDs differ from the HyperTransport node IDs
636 which the K8 northbridge parsing fills in.
637 Assume they are all increased by a constant offset,
638 but in the same order as the HT nodeids.
639 If that doesn't result in a usable node fall back to the
640 path for the previous case. */
641
642 int ht_nodeid = c->initial_apicid;
643
644 if (ht_nodeid >= 0 &&
645 apicid_to_node[ht_nodeid] != NUMA_NO_NODE)
646 node = apicid_to_node[ht_nodeid];
647 /* Pick a nearby node */
648 if (!node_online(node))
649 node = nearby_node(apicid);
650 }
651 numa_set_node(cpu, node);
652
653 printk(KERN_INFO "CPU %d/%x -> Node %d\n", cpu, apicid, node);
654#endif
655#endif
656}
657
658static void __cpuinit early_init_amd_mc(struct cpuinfo_x86 *c)
659{
660#ifdef CONFIG_SMP
661 unsigned bits, ecx;
662
663 /* Multi core CPU? */
664 if (c->extended_cpuid_level < 0x80000008)
665 return;
666
667 ecx = cpuid_ecx(0x80000008);
668
669 c->x86_max_cores = (ecx & 0xff) + 1;
670
671 /* CPU telling us the core id bits shift? */
672 bits = (ecx >> 12) & 0xF;
673
674 /* Otherwise recompute */
675 if (bits == 0) {
676 while ((1 << bits) < c->x86_max_cores)
677 bits++;
678 }
679
680 c->x86_coreid_bits = bits;
681
682#endif
683}
684
685#define ENABLE_C1E_MASK 0x18000000
686#define CPUID_PROCESSOR_SIGNATURE 1
687#define CPUID_XFAM 0x0ff00000
688#define CPUID_XFAM_K8 0x00000000
689#define CPUID_XFAM_10H 0x00100000
690#define CPUID_XFAM_11H 0x00200000
691#define CPUID_XMOD 0x000f0000
692#define CPUID_XMOD_REV_F 0x00040000
693
694/* AMD systems with C1E don't have a working lAPIC timer. Check for that. */
695static __cpuinit int amd_apic_timer_broken(void)
696{
697 u32 lo, hi, eax = cpuid_eax(CPUID_PROCESSOR_SIGNATURE);
698
699 switch (eax & CPUID_XFAM) {
700 case CPUID_XFAM_K8:
701 if ((eax & CPUID_XMOD) < CPUID_XMOD_REV_F)
702 break;
703 case CPUID_XFAM_10H:
704 case CPUID_XFAM_11H:
705 rdmsr(MSR_K8_ENABLE_C1E, lo, hi);
706 if (lo & ENABLE_C1E_MASK)
707 return 1;
708 break;
709 default:
710 /* err on the side of caution */
711 return 1;
712 }
713 return 0;
714}
715
716static void __cpuinit early_init_amd(struct cpuinfo_x86 *c)
717{
718 early_init_amd_mc(c);
719
720 /* c->x86_power is 8000_0007 edx. Bit 8 is constant TSC */
721 if (c->x86_power & (1<<8))
722 set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
723}
724
725static void __cpuinit init_amd(struct cpuinfo_x86 *c)
726{
727 unsigned level;
728
729#ifdef CONFIG_SMP
730 unsigned long value;
731
732 /*
733 * Disable TLB flush filter by setting HWCR.FFDIS on K8
734 * bit 6 of msr C001_0015
735 *
736 * Errata 63 for SH-B3 steppings
737 * Errata 122 for all steppings (F+ have it disabled by default)
738 */
739 if (c->x86 == 15) {
740 rdmsrl(MSR_K8_HWCR, value);
741 value |= 1 << 6;
742 wrmsrl(MSR_K8_HWCR, value);
743 }
744#endif
745
746 /* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
747 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */
748 clear_cpu_cap(c, 0*32+31);
749
750 /* On C+ stepping K8 rep microcode works well for copy/memset */
751 level = cpuid_eax(1);
752 if (c->x86 == 15 && ((level >= 0x0f48 && level < 0x0f50) ||
753 level >= 0x0f58))
754 set_cpu_cap(c, X86_FEATURE_REP_GOOD);
755 if (c->x86 == 0x10 || c->x86 == 0x11)
756 set_cpu_cap(c, X86_FEATURE_REP_GOOD);
757
758 /* Enable workaround for FXSAVE leak */
759 if (c->x86 >= 6)
760 set_cpu_cap(c, X86_FEATURE_FXSAVE_LEAK);
761
762 level = get_model_name(c);
763 if (!level) {
764 switch (c->x86) {
765 case 15:
766 /* Should distinguish Models here, but this is only
767 a fallback anyways. */
768 strcpy(c->x86_model_id, "Hammer");
769 break;
770 }
771 }
772 display_cacheinfo(c);
773
774 /* Multi core CPU? */
775 if (c->extended_cpuid_level >= 0x80000008)
776 amd_detect_cmp(c);
777
778 if (c->extended_cpuid_level >= 0x80000006 &&
779 (cpuid_edx(0x80000006) & 0xf000))
780 num_cache_leaves = 4;
781 else
782 num_cache_leaves = 3;
783
784 if (c->x86 == 0xf || c->x86 == 0x10 || c->x86 == 0x11)
785 set_cpu_cap(c, X86_FEATURE_K8);
786
787 /* MFENCE stops RDTSC speculation */
788 set_cpu_cap(c, X86_FEATURE_MFENCE_RDTSC);
789
790 if (c->x86 == 0x10)
791 fam10h_check_enable_mmcfg();
792
793 if (amd_apic_timer_broken())
794 disable_apic_timer = 1;
795
796 if (c == &boot_cpu_data && c->x86 >= 0xf && c->x86 <= 0x11) {
797 unsigned long long tseg;
798
799 /*
800 * Split up direct mapping around the TSEG SMM area.
801 * Don't do it for gbpages because there seems very little
802 * benefit in doing so.
803 */
804 if (!rdmsrl_safe(MSR_K8_TSEG_ADDR, &tseg) &&
805 (tseg >> PMD_SHIFT) < (max_pfn_mapped >> (PMD_SHIFT-PAGE_SHIFT)))
806 set_memory_4k((unsigned long)__va(tseg), 1);
807 }
808}
809
810void __cpuinit detect_ht(struct cpuinfo_x86 *c) 592void __cpuinit detect_ht(struct cpuinfo_x86 *c)
811{ 593{
812#ifdef CONFIG_SMP 594#ifdef CONFIG_SMP
@@ -857,135 +639,59 @@ out:
857#endif 639#endif
858} 640}
859 641
860/* 642static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c)
861 * find out the number of processor cores on the die
862 */
863static int __cpuinit intel_num_cpu_cores(struct cpuinfo_x86 *c)
864{
865 unsigned int eax, t;
866
867 if (c->cpuid_level < 4)
868 return 1;
869
870 cpuid_count(4, 0, &eax, &t, &t, &t);
871
872 if (eax & 0x1f)
873 return ((eax >> 26) + 1);
874 else
875 return 1;
876}
877
878static void __cpuinit srat_detect_node(void)
879{
880#ifdef CONFIG_NUMA
881 unsigned node;
882 int cpu = smp_processor_id();
883 int apicid = hard_smp_processor_id();
884
885 /* Don't do the funky fallback heuristics the AMD version employs
886 for now. */
887 node = apicid_to_node[apicid];
888 if (node == NUMA_NO_NODE || !node_online(node))
889 node = first_node(node_online_map);
890 numa_set_node(cpu, node);
891
892 printk(KERN_INFO "CPU %d/%x -> Node %d\n", cpu, apicid, node);
893#endif
894}
895
896static void __cpuinit early_init_intel(struct cpuinfo_x86 *c)
897{
898 if ((c->x86 == 0xf && c->x86_model >= 0x03) ||
899 (c->x86 == 0x6 && c->x86_model >= 0x0e))
900 set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
901}
902
903static void __cpuinit init_intel(struct cpuinfo_x86 *c)
904{ 643{
905 /* Cache sizes */ 644 char *v = c->x86_vendor_id;
906 unsigned n; 645 int i;
907 646 static int printed;
908 init_intel_cacheinfo(c); 647
909 if (c->cpuid_level > 9) { 648 for (i = 0; i < X86_VENDOR_NUM; i++) {
910 unsigned eax = cpuid_eax(10); 649 if (cpu_devs[i]) {
911 /* Check for version and the number of counters */ 650 if (!strcmp(v, cpu_devs[i]->c_ident[0]) ||
912 if ((eax & 0xff) && (((eax>>8) & 0xff) > 1)) 651 (cpu_devs[i]->c_ident[1] &&
913 set_cpu_cap(c, X86_FEATURE_ARCH_PERFMON); 652 !strcmp(v, cpu_devs[i]->c_ident[1]))) {
653 c->x86_vendor = i;
654 this_cpu = cpu_devs[i];
655 return;
656 }
657 }
914 } 658 }
915 659 if (!printed) {
916 if (cpu_has_ds) { 660 printed++;
917 unsigned int l1, l2; 661 printk(KERN_ERR "CPU: Vendor unknown, using generic init.\n");
918 rdmsr(MSR_IA32_MISC_ENABLE, l1, l2); 662 printk(KERN_ERR "CPU: Your system may be unstable.\n");
919 if (!(l1 & (1<<11)))
920 set_cpu_cap(c, X86_FEATURE_BTS);
921 if (!(l1 & (1<<12)))
922 set_cpu_cap(c, X86_FEATURE_PEBS);
923 } 663 }
924 664 c->x86_vendor = X86_VENDOR_UNKNOWN;
925
926 if (cpu_has_bts)
927 ds_init_intel(c);
928
929 n = c->extended_cpuid_level;
930 if (n >= 0x80000008) {
931 unsigned eax = cpuid_eax(0x80000008);
932 c->x86_virt_bits = (eax >> 8) & 0xff;
933 c->x86_phys_bits = eax & 0xff;
934 /* CPUID workaround for Intel 0F34 CPU */
935 if (c->x86_vendor == X86_VENDOR_INTEL &&
936 c->x86 == 0xF && c->x86_model == 0x3 &&
937 c->x86_mask == 0x4)
938 c->x86_phys_bits = 36;
939 }
940
941 if (c->x86 == 15)
942 c->x86_cache_alignment = c->x86_clflush_size * 2;
943 if (c->x86 == 6)
944 set_cpu_cap(c, X86_FEATURE_REP_GOOD);
945 set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC);
946 c->x86_max_cores = intel_num_cpu_cores(c);
947
948 srat_detect_node();
949}
950
951static void __cpuinit early_init_centaur(struct cpuinfo_x86 *c)
952{
953 if (c->x86 == 0x6 && c->x86_model >= 0xf)
954 set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
955} 665}
956 666
957static void __cpuinit init_centaur(struct cpuinfo_x86 *c) 667static void __init early_cpu_support_print(void)
958{ 668{
959 /* Cache sizes */ 669 int i,j;
960 unsigned n; 670 struct cpu_dev *cpu_devx;
961 671
962 n = c->extended_cpuid_level; 672 printk("KERNEL supported cpus:\n");
963 if (n >= 0x80000008) { 673 for (i = 0; i < X86_VENDOR_NUM; i++) {
964 unsigned eax = cpuid_eax(0x80000008); 674 cpu_devx = cpu_devs[i];
965 c->x86_virt_bits = (eax >> 8) & 0xff; 675 if (!cpu_devx)
966 c->x86_phys_bits = eax & 0xff; 676 continue;
967 } 677 for (j = 0; j < 2; j++) {
968 678 if (!cpu_devx->c_ident[j])
969 if (c->x86 == 0x6 && c->x86_model >= 0xf) { 679 continue;
970 c->x86_cache_alignment = c->x86_clflush_size * 2; 680 printk(" %s %s\n", cpu_devx->c_vendor,
971 set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC); 681 cpu_devx->c_ident[j]);
972 set_cpu_cap(c, X86_FEATURE_REP_GOOD); 682 }
973 } 683 }
974 set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC);
975} 684}
976 685
977static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c) 686static void __init early_cpu_init(void)
978{ 687{
979 char *v = c->x86_vendor_id; 688 struct cpu_vendor_dev *cvdev;
980 689
981 if (!strcmp(v, "AuthenticAMD")) 690 for (cvdev = __x86cpuvendor_start ;
982 c->x86_vendor = X86_VENDOR_AMD; 691 cvdev < __x86cpuvendor_end ;
983 else if (!strcmp(v, "GenuineIntel")) 692 cvdev++)
984 c->x86_vendor = X86_VENDOR_INTEL; 693 cpu_devs[cvdev->vendor] = cvdev->cpu_dev;
985 else if (!strcmp(v, "CentaurHauls")) 694 early_cpu_support_print();
986 c->x86_vendor = X86_VENDOR_CENTAUR;
987 else
988 c->x86_vendor = X86_VENDOR_UNKNOWN;
989} 695}
990 696
991/* Do some early cpuid on the boot CPU to get some parameter that are 697/* Do some early cpuid on the boot CPU to get some parameter that are
@@ -1066,17 +772,9 @@ static void __cpuinit early_identify_cpu(struct cpuinfo_x86 *c)
1066 if (c->extended_cpuid_level >= 0x80000007) 772 if (c->extended_cpuid_level >= 0x80000007)
1067 c->x86_power = cpuid_edx(0x80000007); 773 c->x86_power = cpuid_edx(0x80000007);
1068 774
1069 switch (c->x86_vendor) { 775 if (c->x86_vendor != X86_VENDOR_UNKNOWN &&
1070 case X86_VENDOR_AMD: 776 cpu_devs[c->x86_vendor]->c_early_init)
1071 early_init_amd(c); 777 cpu_devs[c->x86_vendor]->c_early_init(c);
1072 break;
1073 case X86_VENDOR_INTEL:
1074 early_init_intel(c);
1075 break;
1076 case X86_VENDOR_CENTAUR:
1077 early_init_centaur(c);
1078 break;
1079 }
1080 778
1081 validate_pat_support(c); 779 validate_pat_support(c);
1082} 780}
@@ -1104,24 +802,8 @@ void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
1104 * At the end of this section, c->x86_capability better 802 * At the end of this section, c->x86_capability better
1105 * indicate the features this CPU genuinely supports! 803 * indicate the features this CPU genuinely supports!
1106 */ 804 */
1107 switch (c->x86_vendor) { 805 if (this_cpu->c_init)
1108 case X86_VENDOR_AMD: 806 this_cpu->c_init(c);
1109 init_amd(c);
1110 break;
1111
1112 case X86_VENDOR_INTEL:
1113 init_intel(c);
1114 break;
1115
1116 case X86_VENDOR_CENTAUR:
1117 init_centaur(c);
1118 break;
1119
1120 case X86_VENDOR_UNKNOWN:
1121 default:
1122 display_cacheinfo(c);
1123 break;
1124 }
1125 807
1126 detect_ht(c); 808 detect_ht(c);
1127 809
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 38988491c622..f2b666756299 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -59,7 +59,6 @@
59#include <asm/pgtable.h> 59#include <asm/pgtable.h>
60#include <asm/tlbflush.h> 60#include <asm/tlbflush.h>
61#include <asm/mtrr.h> 61#include <asm/mtrr.h>
62#include <asm/nmi.h>
63#include <asm/vmi.h> 62#include <asm/vmi.h>
64#include <asm/genapic.h> 63#include <asm/genapic.h>
65#include <linux/mc146818rtc.h> 64#include <linux/mc146818rtc.h>
@@ -996,7 +995,6 @@ do_rest:
996#endif 995#endif
997 cpu_clear(cpu, cpu_callout_map); /* was set by do_boot_cpu() */ 996 cpu_clear(cpu, cpu_callout_map); /* was set by do_boot_cpu() */
998 cpu_clear(cpu, cpu_initialized); /* was set by cpu_init() */ 997 cpu_clear(cpu, cpu_initialized); /* was set by cpu_init() */
999 cpu_clear(cpu, cpu_possible_map);
1000 cpu_clear(cpu, cpu_present_map); 998 cpu_clear(cpu, cpu_present_map);
1001 per_cpu(x86_cpu_to_apicid, cpu) = BAD_APICID; 999 per_cpu(x86_cpu_to_apicid, cpu) = BAD_APICID;
1002 } 1000 }
@@ -1158,9 +1156,11 @@ static int __init smp_sanity_check(unsigned max_cpus)
1158 * If SMP should be disabled, then really disable it! 1156 * If SMP should be disabled, then really disable it!
1159 */ 1157 */
1160 if (!max_cpus) { 1158 if (!max_cpus) {
1161 printk(KERN_INFO "SMP mode deactivated," 1159 printk(KERN_INFO "SMP mode deactivated.\n");
1162 "forcing use of dummy APIC emulation.\n");
1163 smpboot_clear_io_apic(); 1160 smpboot_clear_io_apic();
1161
1162 localise_nmi_watchdog();
1163
1164#ifdef CONFIG_X86_32 1164#ifdef CONFIG_X86_32
1165 connect_bsp_APIC(); 1165 connect_bsp_APIC();
1166#endif 1166#endif
@@ -1190,6 +1190,7 @@ static void __init smp_cpu_index_default(void)
1190 */ 1190 */
1191void __init native_smp_prepare_cpus(unsigned int max_cpus) 1191void __init native_smp_prepare_cpus(unsigned int max_cpus)
1192{ 1192{
1193 preempt_disable();
1193 nmi_watchdog_default(); 1194 nmi_watchdog_default();
1194 smp_cpu_index_default(); 1195 smp_cpu_index_default();
1195 current_cpu_data = boot_cpu_data; 1196 current_cpu_data = boot_cpu_data;
@@ -1206,7 +1207,7 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
1206 if (smp_sanity_check(max_cpus) < 0) { 1207 if (smp_sanity_check(max_cpus) < 0) {
1207 printk(KERN_INFO "SMP disabled\n"); 1208 printk(KERN_INFO "SMP disabled\n");
1208 disable_smp(); 1209 disable_smp();
1209 return; 1210 goto out;
1210 } 1211 }
1211 1212
1212 preempt_disable(); 1213 preempt_disable();
@@ -1246,6 +1247,8 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
1246 printk(KERN_INFO "CPU%d: ", 0); 1247 printk(KERN_INFO "CPU%d: ", 0);
1247 print_cpu_info(&cpu_data(0)); 1248 print_cpu_info(&cpu_data(0));
1248 setup_boot_clock(); 1249 setup_boot_clock();
1250out:
1251 preempt_enable();
1249} 1252}
1250/* 1253/*
1251 * Early setup to make printk work. 1254 * Early setup to make printk work.
diff --git a/arch/x86/kernel/sys_i386_32.c b/arch/x86/kernel/sys_i386_32.c
index d2ab52cc1d6b..7066cb855a60 100644
--- a/arch/x86/kernel/sys_i386_32.c
+++ b/arch/x86/kernel/sys_i386_32.c
@@ -19,8 +19,8 @@
19#include <linux/utsname.h> 19#include <linux/utsname.h>
20#include <linux/ipc.h> 20#include <linux/ipc.h>
21 21
22#include <asm/uaccess.h> 22#include <linux/uaccess.h>
23#include <asm/unistd.h> 23#include <linux/unistd.h>
24 24
25asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, 25asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
26 unsigned long prot, unsigned long flags, 26 unsigned long prot, unsigned long flags,
@@ -103,7 +103,7 @@ asmlinkage int old_select(struct sel_arg_struct __user *arg)
103 * 103 *
104 * This is really horribly ugly. 104 * This is really horribly ugly.
105 */ 105 */
106asmlinkage int sys_ipc (uint call, int first, int second, 106asmlinkage int sys_ipc(uint call, int first, int second,
107 int third, void __user *ptr, long fifth) 107 int third, void __user *ptr, long fifth)
108{ 108{
109 int version, ret; 109 int version, ret;
@@ -113,24 +113,24 @@ asmlinkage int sys_ipc (uint call, int first, int second,
113 113
114 switch (call) { 114 switch (call) {
115 case SEMOP: 115 case SEMOP:
116 return sys_semtimedop (first, (struct sembuf __user *)ptr, second, NULL); 116 return sys_semtimedop(first, (struct sembuf __user *)ptr, second, NULL);
117 case SEMTIMEDOP: 117 case SEMTIMEDOP:
118 return sys_semtimedop(first, (struct sembuf __user *)ptr, second, 118 return sys_semtimedop(first, (struct sembuf __user *)ptr, second,
119 (const struct timespec __user *)fifth); 119 (const struct timespec __user *)fifth);
120 120
121 case SEMGET: 121 case SEMGET:
122 return sys_semget (first, second, third); 122 return sys_semget(first, second, third);
123 case SEMCTL: { 123 case SEMCTL: {
124 union semun fourth; 124 union semun fourth;
125 if (!ptr) 125 if (!ptr)
126 return -EINVAL; 126 return -EINVAL;
127 if (get_user(fourth.__pad, (void __user * __user *) ptr)) 127 if (get_user(fourth.__pad, (void __user * __user *) ptr))
128 return -EFAULT; 128 return -EFAULT;
129 return sys_semctl (first, second, third, fourth); 129 return sys_semctl(first, second, third, fourth);
130 } 130 }
131 131
132 case MSGSND: 132 case MSGSND:
133 return sys_msgsnd (first, (struct msgbuf __user *) ptr, 133 return sys_msgsnd(first, (struct msgbuf __user *) ptr,
134 second, third); 134 second, third);
135 case MSGRCV: 135 case MSGRCV:
136 switch (version) { 136 switch (version) {
@@ -138,45 +138,45 @@ asmlinkage int sys_ipc (uint call, int first, int second,
138 struct ipc_kludge tmp; 138 struct ipc_kludge tmp;
139 if (!ptr) 139 if (!ptr)
140 return -EINVAL; 140 return -EINVAL;
141 141
142 if (copy_from_user(&tmp, 142 if (copy_from_user(&tmp,
143 (struct ipc_kludge __user *) ptr, 143 (struct ipc_kludge __user *) ptr,
144 sizeof (tmp))) 144 sizeof(tmp)))
145 return -EFAULT; 145 return -EFAULT;
146 return sys_msgrcv (first, tmp.msgp, second, 146 return sys_msgrcv(first, tmp.msgp, second,
147 tmp.msgtyp, third); 147 tmp.msgtyp, third);
148 } 148 }
149 default: 149 default:
150 return sys_msgrcv (first, 150 return sys_msgrcv(first,
151 (struct msgbuf __user *) ptr, 151 (struct msgbuf __user *) ptr,
152 second, fifth, third); 152 second, fifth, third);
153 } 153 }
154 case MSGGET: 154 case MSGGET:
155 return sys_msgget ((key_t) first, second); 155 return sys_msgget((key_t) first, second);
156 case MSGCTL: 156 case MSGCTL:
157 return sys_msgctl (first, second, (struct msqid_ds __user *) ptr); 157 return sys_msgctl(first, second, (struct msqid_ds __user *) ptr);
158 158
159 case SHMAT: 159 case SHMAT:
160 switch (version) { 160 switch (version) {
161 default: { 161 default: {
162 ulong raddr; 162 ulong raddr;
163 ret = do_shmat (first, (char __user *) ptr, second, &raddr); 163 ret = do_shmat(first, (char __user *) ptr, second, &raddr);
164 if (ret) 164 if (ret)
165 return ret; 165 return ret;
166 return put_user (raddr, (ulong __user *) third); 166 return put_user(raddr, (ulong __user *) third);
167 } 167 }
168 case 1: /* iBCS2 emulator entry point */ 168 case 1: /* iBCS2 emulator entry point */
169 if (!segment_eq(get_fs(), get_ds())) 169 if (!segment_eq(get_fs(), get_ds()))
170 return -EINVAL; 170 return -EINVAL;
171 /* The "(ulong *) third" is valid _only_ because of the kernel segment thing */ 171 /* The "(ulong *) third" is valid _only_ because of the kernel segment thing */
172 return do_shmat (first, (char __user *) ptr, second, (ulong *) third); 172 return do_shmat(first, (char __user *) ptr, second, (ulong *) third);
173 } 173 }
174 case SHMDT: 174 case SHMDT:
175 return sys_shmdt ((char __user *)ptr); 175 return sys_shmdt((char __user *)ptr);
176 case SHMGET: 176 case SHMGET:
177 return sys_shmget (first, second, third); 177 return sys_shmget(first, second, third);
178 case SHMCTL: 178 case SHMCTL:
179 return sys_shmctl (first, second, 179 return sys_shmctl(first, second,
180 (struct shmid_ds __user *) ptr); 180 (struct shmid_ds __user *) ptr);
181 default: 181 default:
182 return -ENOSYS; 182 return -ENOSYS;
@@ -186,28 +186,28 @@ asmlinkage int sys_ipc (uint call, int first, int second,
186/* 186/*
187 * Old cruft 187 * Old cruft
188 */ 188 */
189asmlinkage int sys_uname(struct old_utsname __user * name) 189asmlinkage int sys_uname(struct old_utsname __user *name)
190{ 190{
191 int err; 191 int err;
192 if (!name) 192 if (!name)
193 return -EFAULT; 193 return -EFAULT;
194 down_read(&uts_sem); 194 down_read(&uts_sem);
195 err = copy_to_user(name, utsname(), sizeof (*name)); 195 err = copy_to_user(name, utsname(), sizeof(*name));
196 up_read(&uts_sem); 196 up_read(&uts_sem);
197 return err?-EFAULT:0; 197 return err? -EFAULT:0;
198} 198}
199 199
200asmlinkage int sys_olduname(struct oldold_utsname __user * name) 200asmlinkage int sys_olduname(struct oldold_utsname __user *name)
201{ 201{
202 int error; 202 int error;
203 203
204 if (!name) 204 if (!name)
205 return -EFAULT; 205 return -EFAULT;
206 if (!access_ok(VERIFY_WRITE,name,sizeof(struct oldold_utsname))) 206 if (!access_ok(VERIFY_WRITE, name, sizeof(struct oldold_utsname)))
207 return -EFAULT; 207 return -EFAULT;
208 208
209 down_read(&uts_sem); 209 down_read(&uts_sem);
210 210
211 error = __copy_to_user(&name->sysname, &utsname()->sysname, 211 error = __copy_to_user(&name->sysname, &utsname()->sysname,
212 __OLD_UTS_LEN); 212 __OLD_UTS_LEN);
213 error |= __put_user(0, name->sysname + __OLD_UTS_LEN); 213 error |= __put_user(0, name->sysname + __OLD_UTS_LEN);
@@ -223,9 +223,9 @@ asmlinkage int sys_olduname(struct oldold_utsname __user * name)
223 error |= __copy_to_user(&name->machine, &utsname()->machine, 223 error |= __copy_to_user(&name->machine, &utsname()->machine,
224 __OLD_UTS_LEN); 224 __OLD_UTS_LEN);
225 error |= __put_user(0, name->machine + __OLD_UTS_LEN); 225 error |= __put_user(0, name->machine + __OLD_UTS_LEN);
226 226
227 up_read(&uts_sem); 227 up_read(&uts_sem);
228 228
229 error = error ? -EFAULT : 0; 229 error = error ? -EFAULT : 0;
230 230
231 return error; 231 return error;
@@ -241,6 +241,6 @@ int kernel_execve(const char *filename, char *const argv[], char *const envp[])
241 long __res; 241 long __res;
242 asm volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx" 242 asm volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx"
243 : "=a" (__res) 243 : "=a" (__res)
244 : "0" (__NR_execve),"ri" (filename),"c" (argv), "d" (envp) : "memory"); 244 : "0" (__NR_execve), "ri" (filename), "c" (argv), "d" (envp) : "memory");
245 return __res; 245 return __res;
246} 246}
diff --git a/arch/x86/kernel/time_32.c b/arch/x86/kernel/time_32.c
index 2ff21f398934..5f29f12da50c 100644
--- a/arch/x86/kernel/time_32.c
+++ b/arch/x86/kernel/time_32.c
@@ -84,8 +84,7 @@ irqreturn_t timer_interrupt(int irq, void *dev_id)
84 if (timer_ack) { 84 if (timer_ack) {
85 /* 85 /*
86 * Subtle, when I/O APICs are used we have to ack timer IRQ 86 * Subtle, when I/O APICs are used we have to ack timer IRQ
87 * manually to reset the IRR bit for do_slow_gettimeoffset(). 87 * manually to deassert NMI lines for the watchdog if run
88 * This will also deassert NMI lines for the watchdog if run
89 * on an 82489DX-based system. 88 * on an 82489DX-based system.
90 */ 89 */
91 spin_lock(&i8259A_lock); 90 spin_lock(&i8259A_lock);
diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c
index bde6f63e15d5..08d752de4eee 100644
--- a/arch/x86/kernel/traps_32.c
+++ b/arch/x86/kernel/traps_32.c
@@ -544,6 +544,7 @@ vm86_trap:
544#define DO_ERROR(trapnr, signr, str, name) \ 544#define DO_ERROR(trapnr, signr, str, name) \
545void do_##name(struct pt_regs *regs, long error_code) \ 545void do_##name(struct pt_regs *regs, long error_code) \
546{ \ 546{ \
547 trace_hardirqs_fixup(); \
547 if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \ 548 if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) \
548 == NOTIFY_STOP) \ 549 == NOTIFY_STOP) \
549 return; \ 550 return; \
diff --git a/arch/x86/kernel/traps_64.c b/arch/x86/kernel/traps_64.c
index adff76ea97c4..ec6d3b2130c4 100644
--- a/arch/x86/kernel/traps_64.c
+++ b/arch/x86/kernel/traps_64.c
@@ -71,7 +71,6 @@ asmlinkage void general_protection(void);
71asmlinkage void page_fault(void); 71asmlinkage void page_fault(void);
72asmlinkage void coprocessor_error(void); 72asmlinkage void coprocessor_error(void);
73asmlinkage void simd_coprocessor_error(void); 73asmlinkage void simd_coprocessor_error(void);
74asmlinkage void reserved(void);
75asmlinkage void alignment_check(void); 74asmlinkage void alignment_check(void);
76asmlinkage void machine_check(void); 75asmlinkage void machine_check(void);
77asmlinkage void spurious_interrupt_bug(void); 76asmlinkage void spurious_interrupt_bug(void);
@@ -702,12 +701,10 @@ DO_ERROR_INFO( 0, SIGFPE, "divide error", divide_error, FPE_INTDIV, regs->ip)
702DO_ERROR( 4, SIGSEGV, "overflow", overflow) 701DO_ERROR( 4, SIGSEGV, "overflow", overflow)
703DO_ERROR( 5, SIGSEGV, "bounds", bounds) 702DO_ERROR( 5, SIGSEGV, "bounds", bounds)
704DO_ERROR_INFO( 6, SIGILL, "invalid opcode", invalid_op, ILL_ILLOPN, regs->ip) 703DO_ERROR_INFO( 6, SIGILL, "invalid opcode", invalid_op, ILL_ILLOPN, regs->ip)
705DO_ERROR( 7, SIGSEGV, "device not available", device_not_available)
706DO_ERROR( 9, SIGFPE, "coprocessor segment overrun", coprocessor_segment_overrun) 704DO_ERROR( 9, SIGFPE, "coprocessor segment overrun", coprocessor_segment_overrun)
707DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS) 705DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS)
708DO_ERROR(11, SIGBUS, "segment not present", segment_not_present) 706DO_ERROR(11, SIGBUS, "segment not present", segment_not_present)
709DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, 0) 707DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, 0)
710DO_ERROR(18, SIGSEGV, "reserved", reserved)
711 708
712/* Runs on IST stack */ 709/* Runs on IST stack */
713asmlinkage void do_stack_segment(struct pt_regs *regs, long error_code) 710asmlinkage void do_stack_segment(struct pt_regs *regs, long error_code)
diff --git a/arch/x86/kernel/tsc_32.c b/arch/x86/kernel/tsc_32.c
index e4790728b224..774a5a83c296 100644
--- a/arch/x86/kernel/tsc_32.c
+++ b/arch/x86/kernel/tsc_32.c
@@ -14,7 +14,10 @@
14 14
15#include "mach_timer.h" 15#include "mach_timer.h"
16 16
17static int tsc_enabled; 17/* native_sched_clock() is called before tsc_init(), so
18 we must start with the TSC soft disabled to prevent
19 erroneous rdtsc usage on !cpu_has_tsc processors */
20static int tsc_disabled = -1;
18 21
19/* 22/*
20 * On some systems the TSC frequency does not 23 * On some systems the TSC frequency does not
@@ -28,8 +31,8 @@ EXPORT_SYMBOL_GPL(tsc_khz);
28static int __init tsc_setup(char *str) 31static int __init tsc_setup(char *str)
29{ 32{
30 printk(KERN_WARNING "notsc: Kernel compiled with CONFIG_X86_TSC, " 33 printk(KERN_WARNING "notsc: Kernel compiled with CONFIG_X86_TSC, "
31 "cannot disable TSC completely.\n"); 34 "cannot disable TSC completely.\n");
32 mark_tsc_unstable("user disabled TSC"); 35 tsc_disabled = 1;
33 return 1; 36 return 1;
34} 37}
35#else 38#else
@@ -120,7 +123,7 @@ unsigned long long native_sched_clock(void)
120 * very important for it to be as fast as the platform 123 * very important for it to be as fast as the platform
121 * can achive it. ) 124 * can achive it. )
122 */ 125 */
123 if (unlikely(!tsc_enabled && !tsc_unstable)) 126 if (unlikely(tsc_disabled))
124 /* No locking but a rare wrong value is not a big deal: */ 127 /* No locking but a rare wrong value is not a big deal: */
125 return (jiffies_64 - INITIAL_JIFFIES) * (1000000000 / HZ); 128 return (jiffies_64 - INITIAL_JIFFIES) * (1000000000 / HZ);
126 129
@@ -283,7 +286,6 @@ core_initcall(cpufreq_tsc);
283 286
284/* clock source code */ 287/* clock source code */
285 288
286static unsigned long current_tsc_khz;
287static struct clocksource clocksource_tsc; 289static struct clocksource clocksource_tsc;
288 290
289/* 291/*
@@ -322,7 +324,6 @@ void mark_tsc_unstable(char *reason)
322{ 324{
323 if (!tsc_unstable) { 325 if (!tsc_unstable) {
324 tsc_unstable = 1; 326 tsc_unstable = 1;
325 tsc_enabled = 0;
326 printk("Marking TSC unstable due to: %s.\n", reason); 327 printk("Marking TSC unstable due to: %s.\n", reason);
327 /* Can be called before registration */ 328 /* Can be called before registration */
328 if (clocksource_tsc.mult) 329 if (clocksource_tsc.mult)
@@ -336,7 +337,7 @@ EXPORT_SYMBOL_GPL(mark_tsc_unstable);
336static int __init dmi_mark_tsc_unstable(const struct dmi_system_id *d) 337static int __init dmi_mark_tsc_unstable(const struct dmi_system_id *d)
337{ 338{
338 printk(KERN_NOTICE "%s detected: marking TSC unstable.\n", 339 printk(KERN_NOTICE "%s detected: marking TSC unstable.\n",
339 d->ident); 340 d->ident);
340 tsc_unstable = 1; 341 tsc_unstable = 1;
341 return 0; 342 return 0;
342} 343}
@@ -403,7 +404,7 @@ void __init tsc_init(void)
403{ 404{
404 int cpu; 405 int cpu;
405 406
406 if (!cpu_has_tsc) 407 if (!cpu_has_tsc || tsc_disabled > 0)
407 return; 408 return;
408 409
409 cpu_khz = calculate_cpu_khz(); 410 cpu_khz = calculate_cpu_khz();
@@ -414,6 +415,9 @@ void __init tsc_init(void)
414 return; 415 return;
415 } 416 }
416 417
418 /* now allow native_sched_clock() to use rdtsc */
419 tsc_disabled = 0;
420
417 printk("Detected %lu.%03lu MHz processor.\n", 421 printk("Detected %lu.%03lu MHz processor.\n",
418 (unsigned long)cpu_khz / 1000, 422 (unsigned long)cpu_khz / 1000,
419 (unsigned long)cpu_khz % 1000); 423 (unsigned long)cpu_khz % 1000);
@@ -434,15 +438,12 @@ void __init tsc_init(void)
434 438
435 unsynchronized_tsc(); 439 unsynchronized_tsc();
436 check_geode_tsc_reliable(); 440 check_geode_tsc_reliable();
437 current_tsc_khz = tsc_khz; 441 clocksource_tsc.mult = clocksource_khz2mult(tsc_khz,
438 clocksource_tsc.mult = clocksource_khz2mult(current_tsc_khz, 442 clocksource_tsc.shift);
439 clocksource_tsc.shift);
440 /* lower the rating if we already know its unstable: */ 443 /* lower the rating if we already know its unstable: */
441 if (check_tsc_unstable()) { 444 if (check_tsc_unstable()) {
442 clocksource_tsc.rating = 0; 445 clocksource_tsc.rating = 0;
443 clocksource_tsc.flags &= ~CLOCK_SOURCE_IS_CONTINUOUS; 446 clocksource_tsc.flags &= ~CLOCK_SOURCE_IS_CONTINUOUS;
444 } else 447 }
445 tsc_enabled = 1;
446
447 clocksource_register(&clocksource_tsc); 448 clocksource_register(&clocksource_tsc);
448} 449}
diff --git a/arch/x86/kernel/tsc_64.c b/arch/x86/kernel/tsc_64.c
index fcc16e58609e..9898fb01edfd 100644
--- a/arch/x86/kernel/tsc_64.c
+++ b/arch/x86/kernel/tsc_64.c
@@ -227,14 +227,14 @@ void __init tsc_calibrate(void)
227 /* hpet or pmtimer available ? */ 227 /* hpet or pmtimer available ? */
228 if (!hpet && !pm1 && !pm2) { 228 if (!hpet && !pm1 && !pm2) {
229 printk(KERN_INFO "TSC calibrated against PIT\n"); 229 printk(KERN_INFO "TSC calibrated against PIT\n");
230 return; 230 goto out;
231 } 231 }
232 232
233 /* Check, whether the sampling was disturbed by an SMI */ 233 /* Check, whether the sampling was disturbed by an SMI */
234 if (tsc1 == ULONG_MAX || tsc2 == ULONG_MAX) { 234 if (tsc1 == ULONG_MAX || tsc2 == ULONG_MAX) {
235 printk(KERN_WARNING "TSC calibration disturbed by SMI, " 235 printk(KERN_WARNING "TSC calibration disturbed by SMI, "
236 "using PIT calibration result\n"); 236 "using PIT calibration result\n");
237 return; 237 goto out;
238 } 238 }
239 239
240 tsc2 = (tsc2 - tsc1) * 1000000L; 240 tsc2 = (tsc2 - tsc1) * 1000000L;
@@ -242,7 +242,7 @@ void __init tsc_calibrate(void)
242 if (hpet) { 242 if (hpet) {
243 printk(KERN_INFO "TSC calibrated against HPET\n"); 243 printk(KERN_INFO "TSC calibrated against HPET\n");
244 if (hpet2 < hpet1) 244 if (hpet2 < hpet1)
245 hpet2 += 0x100000000; 245 hpet2 += 0x100000000UL;
246 hpet2 -= hpet1; 246 hpet2 -= hpet1;
247 tsc1 = (hpet2 * hpet_readl(HPET_PERIOD)) / 1000000; 247 tsc1 = (hpet2 * hpet_readl(HPET_PERIOD)) / 1000000;
248 } else { 248 } else {
@@ -255,6 +255,7 @@ void __init tsc_calibrate(void)
255 255
256 tsc_khz = tsc2 / tsc1; 256 tsc_khz = tsc2 / tsc1;
257 257
258out:
258 for_each_possible_cpu(cpu) 259 for_each_possible_cpu(cpu)
259 set_cyc2ns_scale(tsc_khz, cpu); 260 set_cyc2ns_scale(tsc_khz, cpu);
260} 261}
diff --git a/arch/x86/kernel/vmlinux_32.lds.S b/arch/x86/kernel/vmlinux_32.lds.S
index ce5ed083a1e9..2674f5796275 100644
--- a/arch/x86/kernel/vmlinux_32.lds.S
+++ b/arch/x86/kernel/vmlinux_32.lds.S
@@ -60,13 +60,6 @@ SECTIONS
60 60
61 BUG_TABLE :text 61 BUG_TABLE :text
62 62
63 . = ALIGN(4);
64 .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) {
65 __tracedata_start = .;
66 *(.tracedata)
67 __tracedata_end = .;
68 }
69
70 RODATA 63 RODATA
71 64
72 /* writeable */ 65 /* writeable */
diff --git a/arch/x86/kernel/vmlinux_64.lds.S b/arch/x86/kernel/vmlinux_64.lds.S
index fad3674b06a5..fd246e22fe6b 100644
--- a/arch/x86/kernel/vmlinux_64.lds.S
+++ b/arch/x86/kernel/vmlinux_64.lds.S
@@ -53,13 +53,6 @@ SECTIONS
53 53
54 RODATA 54 RODATA
55 55
56 . = ALIGN(4);
57 .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) {
58 __tracedata_start = .;
59 *(.tracedata)
60 __tracedata_end = .;
61 }
62
63 . = ALIGN(PAGE_SIZE); /* Align data segment to page size boundary */ 56 . = ALIGN(PAGE_SIZE); /* Align data segment to page size boundary */
64 /* Data */ 57 /* Data */
65 .data : AT(ADDR(.data) - LOAD_OFFSET) { 58 .data : AT(ADDR(.data) - LOAD_OFFSET) {
@@ -177,6 +170,7 @@ SECTIONS
177 *(.con_initcall.init) 170 *(.con_initcall.init)
178 } 171 }
179 __con_initcall_end = .; 172 __con_initcall_end = .;
173 . = ALIGN(16);
180 __x86cpuvendor_start = .; 174 __x86cpuvendor_start = .;
181 .x86cpuvendor.init : AT(ADDR(.x86cpuvendor.init) - LOAD_OFFSET) { 175 .x86cpuvendor.init : AT(ADDR(.x86cpuvendor.init) - LOAD_OFFSET) {
182 *(.x86cpuvendor.init) 176 *(.x86cpuvendor.init)
diff --git a/arch/x86/kernel/vsmp_64.c b/arch/x86/kernel/vsmp_64.c
index ba8c0b75ab0a..0c029e8959c7 100644
--- a/arch/x86/kernel/vsmp_64.c
+++ b/arch/x86/kernel/vsmp_64.c
@@ -15,9 +15,12 @@
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/pci_ids.h> 16#include <linux/pci_ids.h>
17#include <linux/pci_regs.h> 17#include <linux/pci_regs.h>
18
19#include <asm/apic.h>
18#include <asm/pci-direct.h> 20#include <asm/pci-direct.h>
19#include <asm/io.h> 21#include <asm/io.h>
20#include <asm/paravirt.h> 22#include <asm/paravirt.h>
23#include <asm/setup.h>
21 24
22#if defined CONFIG_PCI && defined CONFIG_PARAVIRT 25#if defined CONFIG_PCI && defined CONFIG_PARAVIRT
23/* 26/*
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
index 7c077a9d9777..3829aa7b663f 100644
--- a/arch/x86/kvm/i8254.c
+++ b/arch/x86/kvm/i8254.c
@@ -200,10 +200,12 @@ int __pit_timer_fn(struct kvm_kpit_state *ps)
200 200
201 atomic_inc(&pt->pending); 201 atomic_inc(&pt->pending);
202 smp_mb__after_atomic_inc(); 202 smp_mb__after_atomic_inc();
203 /* FIXME: handle case where the guest is in guest mode */ 203 if (vcpu0) {
204 if (vcpu0 && waitqueue_active(&vcpu0->wq)) { 204 set_bit(KVM_REQ_PENDING_TIMER, &vcpu0->requests);
205 vcpu0->arch.mp_state = KVM_MP_STATE_RUNNABLE; 205 if (waitqueue_active(&vcpu0->wq)) {
206 wake_up_interruptible(&vcpu0->wq); 206 vcpu0->arch.mp_state = KVM_MP_STATE_RUNNABLE;
207 wake_up_interruptible(&vcpu0->wq);
208 }
207 } 209 }
208 210
209 pt->timer.expires = ktime_add_ns(pt->timer.expires, pt->period); 211 pt->timer.expires = ktime_add_ns(pt->timer.expires, pt->period);
@@ -237,6 +239,19 @@ static enum hrtimer_restart pit_timer_fn(struct hrtimer *data)
237 return HRTIMER_NORESTART; 239 return HRTIMER_NORESTART;
238} 240}
239 241
242void __kvm_migrate_pit_timer(struct kvm_vcpu *vcpu)
243{
244 struct kvm_pit *pit = vcpu->kvm->arch.vpit;
245 struct hrtimer *timer;
246
247 if (vcpu->vcpu_id != 0 || !pit)
248 return;
249
250 timer = &pit->pit_state.pit_timer.timer;
251 if (hrtimer_cancel(timer))
252 hrtimer_start(timer, timer->expires, HRTIMER_MODE_ABS);
253}
254
240static void destroy_pit_timer(struct kvm_kpit_timer *pt) 255static void destroy_pit_timer(struct kvm_kpit_timer *pt)
241{ 256{
242 pr_debug("pit: execute del timer!\n"); 257 pr_debug("pit: execute del timer!\n");
diff --git a/arch/x86/kvm/irq.c b/arch/x86/kvm/irq.c
index ce1f583459b1..76d736b5f664 100644
--- a/arch/x86/kvm/irq.c
+++ b/arch/x86/kvm/irq.c
@@ -94,3 +94,9 @@ void kvm_timer_intr_post(struct kvm_vcpu *vcpu, int vec)
94 /* TODO: PIT, RTC etc. */ 94 /* TODO: PIT, RTC etc. */
95} 95}
96EXPORT_SYMBOL_GPL(kvm_timer_intr_post); 96EXPORT_SYMBOL_GPL(kvm_timer_intr_post);
97
98void __kvm_migrate_timers(struct kvm_vcpu *vcpu)
99{
100 __kvm_migrate_apic_timer(vcpu);
101 __kvm_migrate_pit_timer(vcpu);
102}
diff --git a/arch/x86/kvm/irq.h b/arch/x86/kvm/irq.h
index 1802134b836f..2a15be2275c0 100644
--- a/arch/x86/kvm/irq.h
+++ b/arch/x86/kvm/irq.h
@@ -84,6 +84,8 @@ void kvm_timer_intr_post(struct kvm_vcpu *vcpu, int vec);
84void kvm_inject_pending_timer_irqs(struct kvm_vcpu *vcpu); 84void kvm_inject_pending_timer_irqs(struct kvm_vcpu *vcpu);
85void kvm_inject_apic_timer_irqs(struct kvm_vcpu *vcpu); 85void kvm_inject_apic_timer_irqs(struct kvm_vcpu *vcpu);
86void __kvm_migrate_apic_timer(struct kvm_vcpu *vcpu); 86void __kvm_migrate_apic_timer(struct kvm_vcpu *vcpu);
87void __kvm_migrate_pit_timer(struct kvm_vcpu *vcpu);
88void __kvm_migrate_timers(struct kvm_vcpu *vcpu);
87 89
88int pit_has_pending_timer(struct kvm_vcpu *vcpu); 90int pit_has_pending_timer(struct kvm_vcpu *vcpu);
89int apic_has_pending_timer(struct kvm_vcpu *vcpu); 91int apic_has_pending_timer(struct kvm_vcpu *vcpu);
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index c297c50eba63..ebc03f5ae162 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -940,6 +940,7 @@ static int __apic_timer_fn(struct kvm_lapic *apic)
940 wait_queue_head_t *q = &apic->vcpu->wq; 940 wait_queue_head_t *q = &apic->vcpu->wq;
941 941
942 atomic_inc(&apic->timer.pending); 942 atomic_inc(&apic->timer.pending);
943 set_bit(KVM_REQ_PENDING_TIMER, &apic->vcpu->requests);
943 if (waitqueue_active(q)) { 944 if (waitqueue_active(q)) {
944 apic->vcpu->arch.mp_state = KVM_MP_STATE_RUNNABLE; 945 apic->vcpu->arch.mp_state = KVM_MP_STATE_RUNNABLE;
945 wake_up_interruptible(q); 946 wake_up_interruptible(q);
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 36c5406b1813..7e7c3969f7a2 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -640,6 +640,7 @@ static void rmap_write_protect(struct kvm *kvm, u64 gfn)
640 rmap_remove(kvm, spte); 640 rmap_remove(kvm, spte);
641 --kvm->stat.lpages; 641 --kvm->stat.lpages;
642 set_shadow_pte(spte, shadow_trap_nonpresent_pte); 642 set_shadow_pte(spte, shadow_trap_nonpresent_pte);
643 spte = NULL;
643 write_protected = 1; 644 write_protected = 1;
644 } 645 }
645 spte = rmap_next(kvm, rmapp, spte); 646 spte = rmap_next(kvm, rmapp, spte);
@@ -658,7 +659,7 @@ static int is_empty_shadow_page(u64 *spt)
658 u64 *end; 659 u64 *end;
659 660
660 for (pos = spt, end = pos + PAGE_SIZE / sizeof(u64); pos != end; pos++) 661 for (pos = spt, end = pos + PAGE_SIZE / sizeof(u64); pos != end; pos++)
661 if (*pos != shadow_trap_nonpresent_pte) { 662 if (is_shadow_present_pte(*pos)) {
662 printk(KERN_ERR "%s: %p %llx\n", __func__, 663 printk(KERN_ERR "%s: %p %llx\n", __func__,
663 pos, *pos); 664 pos, *pos);
664 return 0; 665 return 0;
@@ -1082,10 +1083,6 @@ static void mmu_set_spte(struct kvm_vcpu *vcpu, u64 *shadow_pte,
1082 struct kvm_mmu_page *shadow; 1083 struct kvm_mmu_page *shadow;
1083 1084
1084 spte |= PT_WRITABLE_MASK; 1085 spte |= PT_WRITABLE_MASK;
1085 if (user_fault) {
1086 mmu_unshadow(vcpu->kvm, gfn);
1087 goto unshadowed;
1088 }
1089 1086
1090 shadow = kvm_mmu_lookup_page(vcpu->kvm, gfn); 1087 shadow = kvm_mmu_lookup_page(vcpu->kvm, gfn);
1091 if (shadow || 1088 if (shadow ||
@@ -1102,8 +1099,6 @@ static void mmu_set_spte(struct kvm_vcpu *vcpu, u64 *shadow_pte,
1102 } 1099 }
1103 } 1100 }
1104 1101
1105unshadowed:
1106
1107 if (pte_access & ACC_WRITE_MASK) 1102 if (pte_access & ACC_WRITE_MASK)
1108 mark_page_dirty(vcpu->kvm, gfn); 1103 mark_page_dirty(vcpu->kvm, gfn);
1109 1104
@@ -1580,11 +1575,13 @@ static void mmu_pte_write_new_pte(struct kvm_vcpu *vcpu,
1580 u64 *spte, 1575 u64 *spte,
1581 const void *new) 1576 const void *new)
1582{ 1577{
1583 if ((sp->role.level != PT_PAGE_TABLE_LEVEL) 1578 if (sp->role.level != PT_PAGE_TABLE_LEVEL) {
1584 && !vcpu->arch.update_pte.largepage) { 1579 if (!vcpu->arch.update_pte.largepage ||
1585 ++vcpu->kvm->stat.mmu_pde_zapped; 1580 sp->role.glevels == PT32_ROOT_LEVEL) {
1586 return; 1581 ++vcpu->kvm->stat.mmu_pde_zapped;
1587 } 1582 return;
1583 }
1584 }
1588 1585
1589 ++vcpu->kvm->stat.mmu_pte_updated; 1586 ++vcpu->kvm->stat.mmu_pte_updated;
1590 if (sp->role.glevels == PT32_ROOT_LEVEL) 1587 if (sp->role.glevels == PT32_ROOT_LEVEL)
@@ -1858,6 +1855,7 @@ static void free_mmu_pages(struct kvm_vcpu *vcpu)
1858 sp = container_of(vcpu->kvm->arch.active_mmu_pages.next, 1855 sp = container_of(vcpu->kvm->arch.active_mmu_pages.next,
1859 struct kvm_mmu_page, link); 1856 struct kvm_mmu_page, link);
1860 kvm_mmu_zap_page(vcpu->kvm, sp); 1857 kvm_mmu_zap_page(vcpu->kvm, sp);
1858 cond_resched();
1861 } 1859 }
1862 free_page((unsigned long)vcpu->arch.mmu.pae_root); 1860 free_page((unsigned long)vcpu->arch.mmu.pae_root);
1863} 1861}
@@ -1996,7 +1994,7 @@ static struct shrinker mmu_shrinker = {
1996 .seeks = DEFAULT_SEEKS * 10, 1994 .seeks = DEFAULT_SEEKS * 10,
1997}; 1995};
1998 1996
1999void mmu_destroy_caches(void) 1997static void mmu_destroy_caches(void)
2000{ 1998{
2001 if (pte_chain_cache) 1999 if (pte_chain_cache)
2002 kmem_cache_destroy(pte_chain_cache); 2000 kmem_cache_destroy(pte_chain_cache);
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
index 156fe10288ae..934c7b619396 100644
--- a/arch/x86/kvm/paging_tmpl.h
+++ b/arch/x86/kvm/paging_tmpl.h
@@ -418,7 +418,7 @@ static int FNAME(page_fault)(struct kvm_vcpu *vcpu, gva_t addr,
418 418
419 /* mmio */ 419 /* mmio */
420 if (is_error_pfn(pfn)) { 420 if (is_error_pfn(pfn)) {
421 pgprintk("gfn %x is mmio\n", walker.gfn); 421 pgprintk("gfn %lx is mmio\n", walker.gfn);
422 kvm_release_pfn_clean(pfn); 422 kvm_release_pfn_clean(pfn);
423 return 1; 423 return 1;
424 } 424 }
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index ab22615eee89..6b0d5fa5bab3 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -688,7 +688,7 @@ static void svm_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
688 delta = vcpu->arch.host_tsc - tsc_this; 688 delta = vcpu->arch.host_tsc - tsc_this;
689 svm->vmcb->control.tsc_offset += delta; 689 svm->vmcb->control.tsc_offset += delta;
690 vcpu->cpu = cpu; 690 vcpu->cpu = cpu;
691 kvm_migrate_apic_timer(vcpu); 691 kvm_migrate_timers(vcpu);
692 } 692 }
693 693
694 for (i = 0; i < NR_HOST_SAVE_USER_MSRS; i++) 694 for (i = 0; i < NR_HOST_SAVE_USER_MSRS; i++)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index bfe4db11989c..540e95179074 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -566,7 +566,7 @@ static void vmx_save_host_state(struct kvm_vcpu *vcpu)
566 load_transition_efer(vmx); 566 load_transition_efer(vmx);
567} 567}
568 568
569static void vmx_load_host_state(struct vcpu_vmx *vmx) 569static void __vmx_load_host_state(struct vcpu_vmx *vmx)
570{ 570{
571 unsigned long flags; 571 unsigned long flags;
572 572
@@ -596,6 +596,13 @@ static void vmx_load_host_state(struct vcpu_vmx *vmx)
596 reload_host_efer(vmx); 596 reload_host_efer(vmx);
597} 597}
598 598
599static void vmx_load_host_state(struct vcpu_vmx *vmx)
600{
601 preempt_disable();
602 __vmx_load_host_state(vmx);
603 preempt_enable();
604}
605
599/* 606/*
600 * Switches to specified vcpu, until a matching vcpu_put(), but assumes 607 * Switches to specified vcpu, until a matching vcpu_put(), but assumes
601 * vcpu mutex is already taken. 608 * vcpu mutex is already taken.
@@ -608,7 +615,7 @@ static void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
608 615
609 if (vcpu->cpu != cpu) { 616 if (vcpu->cpu != cpu) {
610 vcpu_clear(vmx); 617 vcpu_clear(vmx);
611 kvm_migrate_apic_timer(vcpu); 618 kvm_migrate_timers(vcpu);
612 vpid_sync_vcpu_all(vmx); 619 vpid_sync_vcpu_all(vmx);
613 } 620 }
614 621
@@ -654,7 +661,7 @@ static void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
654 661
655static void vmx_vcpu_put(struct kvm_vcpu *vcpu) 662static void vmx_vcpu_put(struct kvm_vcpu *vcpu)
656{ 663{
657 vmx_load_host_state(to_vmx(vcpu)); 664 __vmx_load_host_state(to_vmx(vcpu));
658} 665}
659 666
660static void vmx_fpu_activate(struct kvm_vcpu *vcpu) 667static void vmx_fpu_activate(struct kvm_vcpu *vcpu)
@@ -884,11 +891,8 @@ static int vmx_set_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 data)
884 switch (msr_index) { 891 switch (msr_index) {
885#ifdef CONFIG_X86_64 892#ifdef CONFIG_X86_64
886 case MSR_EFER: 893 case MSR_EFER:
894 vmx_load_host_state(vmx);
887 ret = kvm_set_msr_common(vcpu, msr_index, data); 895 ret = kvm_set_msr_common(vcpu, msr_index, data);
888 if (vmx->host_state.loaded) {
889 reload_host_efer(vmx);
890 load_transition_efer(vmx);
891 }
892 break; 896 break;
893 case MSR_FS_BASE: 897 case MSR_FS_BASE:
894 vmcs_writel(GUEST_FS_BASE, data); 898 vmcs_writel(GUEST_FS_BASE, data);
@@ -910,11 +914,10 @@ static int vmx_set_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 data)
910 guest_write_tsc(data); 914 guest_write_tsc(data);
911 break; 915 break;
912 default: 916 default:
917 vmx_load_host_state(vmx);
913 msr = find_msr_entry(vmx, msr_index); 918 msr = find_msr_entry(vmx, msr_index);
914 if (msr) { 919 if (msr) {
915 msr->data = data; 920 msr->data = data;
916 if (vmx->host_state.loaded)
917 load_msrs(vmx->guest_msrs, vmx->save_nmsrs);
918 break; 921 break;
919 } 922 }
920 ret = kvm_set_msr_common(vcpu, msr_index, data); 923 ret = kvm_set_msr_common(vcpu, msr_index, data);
@@ -1036,6 +1039,7 @@ static void hardware_enable(void *garbage)
1036static void hardware_disable(void *garbage) 1039static void hardware_disable(void *garbage)
1037{ 1040{
1038 asm volatile (ASM_VMX_VMXOFF : : : "cc"); 1041 asm volatile (ASM_VMX_VMXOFF : : : "cc");
1042 write_cr4(read_cr4() & ~X86_CR4_VMXE);
1039} 1043}
1040 1044
1041static __init int adjust_vmx_controls(u32 ctl_min, u32 ctl_opt, 1045static __init int adjust_vmx_controls(u32 ctl_min, u32 ctl_opt,
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 21338bdb28ff..63a77caa59f1 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -492,8 +492,8 @@ static int do_set_msr(struct kvm_vcpu *vcpu, unsigned index, u64 *data)
492static void kvm_write_wall_clock(struct kvm *kvm, gpa_t wall_clock) 492static void kvm_write_wall_clock(struct kvm *kvm, gpa_t wall_clock)
493{ 493{
494 static int version; 494 static int version;
495 struct kvm_wall_clock wc; 495 struct pvclock_wall_clock wc;
496 struct timespec wc_ts; 496 struct timespec now, sys, boot;
497 497
498 if (!wall_clock) 498 if (!wall_clock)
499 return; 499 return;
@@ -502,10 +502,19 @@ static void kvm_write_wall_clock(struct kvm *kvm, gpa_t wall_clock)
502 502
503 kvm_write_guest(kvm, wall_clock, &version, sizeof(version)); 503 kvm_write_guest(kvm, wall_clock, &version, sizeof(version));
504 504
505 wc_ts = current_kernel_time(); 505 /*
506 wc.wc_sec = wc_ts.tv_sec; 506 * The guest calculates current wall clock time by adding
507 wc.wc_nsec = wc_ts.tv_nsec; 507 * system time (updated by kvm_write_guest_time below) to the
508 wc.wc_version = version; 508 * wall clock specified here. guest system time equals host
509 * system time for us, thus we must fill in host boot time here.
510 */
511 now = current_kernel_time();
512 ktime_get_ts(&sys);
513 boot = ns_to_timespec(timespec_to_ns(&now) - timespec_to_ns(&sys));
514
515 wc.sec = boot.tv_sec;
516 wc.nsec = boot.tv_nsec;
517 wc.version = version;
509 518
510 kvm_write_guest(kvm, wall_clock, &wc, sizeof(wc)); 519 kvm_write_guest(kvm, wall_clock, &wc, sizeof(wc));
511 520
@@ -513,6 +522,45 @@ static void kvm_write_wall_clock(struct kvm *kvm, gpa_t wall_clock)
513 kvm_write_guest(kvm, wall_clock, &version, sizeof(version)); 522 kvm_write_guest(kvm, wall_clock, &version, sizeof(version));
514} 523}
515 524
525static uint32_t div_frac(uint32_t dividend, uint32_t divisor)
526{
527 uint32_t quotient, remainder;
528
529 /* Don't try to replace with do_div(), this one calculates
530 * "(dividend << 32) / divisor" */
531 __asm__ ( "divl %4"
532 : "=a" (quotient), "=d" (remainder)
533 : "0" (0), "1" (dividend), "r" (divisor) );
534 return quotient;
535}
536
537static void kvm_set_time_scale(uint32_t tsc_khz, struct pvclock_vcpu_time_info *hv_clock)
538{
539 uint64_t nsecs = 1000000000LL;
540 int32_t shift = 0;
541 uint64_t tps64;
542 uint32_t tps32;
543
544 tps64 = tsc_khz * 1000LL;
545 while (tps64 > nsecs*2) {
546 tps64 >>= 1;
547 shift--;
548 }
549
550 tps32 = (uint32_t)tps64;
551 while (tps32 <= (uint32_t)nsecs) {
552 tps32 <<= 1;
553 shift++;
554 }
555
556 hv_clock->tsc_shift = shift;
557 hv_clock->tsc_to_system_mul = div_frac(nsecs, tps32);
558
559 pr_debug("%s: tsc_khz %u, tsc_shift %d, tsc_mul %u\n",
560 __FUNCTION__, tsc_khz, hv_clock->tsc_shift,
561 hv_clock->tsc_to_system_mul);
562}
563
516static void kvm_write_guest_time(struct kvm_vcpu *v) 564static void kvm_write_guest_time(struct kvm_vcpu *v)
517{ 565{
518 struct timespec ts; 566 struct timespec ts;
@@ -523,6 +571,11 @@ static void kvm_write_guest_time(struct kvm_vcpu *v)
523 if ((!vcpu->time_page)) 571 if ((!vcpu->time_page))
524 return; 572 return;
525 573
574 if (unlikely(vcpu->hv_clock_tsc_khz != tsc_khz)) {
575 kvm_set_time_scale(tsc_khz, &vcpu->hv_clock);
576 vcpu->hv_clock_tsc_khz = tsc_khz;
577 }
578
526 /* Keep irq disabled to prevent changes to the clock */ 579 /* Keep irq disabled to prevent changes to the clock */
527 local_irq_save(flags); 580 local_irq_save(flags);
528 kvm_get_msr(v, MSR_IA32_TIME_STAMP_COUNTER, 581 kvm_get_msr(v, MSR_IA32_TIME_STAMP_COUNTER,
@@ -537,14 +590,14 @@ static void kvm_write_guest_time(struct kvm_vcpu *v)
537 /* 590 /*
538 * The interface expects us to write an even number signaling that the 591 * The interface expects us to write an even number signaling that the
539 * update is finished. Since the guest won't see the intermediate 592 * update is finished. Since the guest won't see the intermediate
540 * state, we just write "2" at the end 593 * state, we just increase by 2 at the end.
541 */ 594 */
542 vcpu->hv_clock.version = 2; 595 vcpu->hv_clock.version += 2;
543 596
544 shared_kaddr = kmap_atomic(vcpu->time_page, KM_USER0); 597 shared_kaddr = kmap_atomic(vcpu->time_page, KM_USER0);
545 598
546 memcpy(shared_kaddr + vcpu->time_offset, &vcpu->hv_clock, 599 memcpy(shared_kaddr + vcpu->time_offset, &vcpu->hv_clock,
547 sizeof(vcpu->hv_clock)); 600 sizeof(vcpu->hv_clock));
548 601
549 kunmap_atomic(shared_kaddr, KM_USER0); 602 kunmap_atomic(shared_kaddr, KM_USER0);
550 603
@@ -599,10 +652,6 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data)
599 /* ...but clean it before doing the actual write */ 652 /* ...but clean it before doing the actual write */
600 vcpu->arch.time_offset = data & ~(PAGE_MASK | 1); 653 vcpu->arch.time_offset = data & ~(PAGE_MASK | 1);
601 654
602 vcpu->arch.hv_clock.tsc_to_system_mul =
603 clocksource_khz2mult(tsc_khz, 22);
604 vcpu->arch.hv_clock.tsc_shift = 22;
605
606 down_read(&current->mm->mmap_sem); 655 down_read(&current->mm->mmap_sem);
607 vcpu->arch.time_page = 656 vcpu->arch.time_page =
608 gfn_to_page(vcpu->kvm, data >> PAGE_SHIFT); 657 gfn_to_page(vcpu->kvm, data >> PAGE_SHIFT);
@@ -2758,7 +2807,9 @@ again:
2758 2807
2759 if (vcpu->requests) { 2808 if (vcpu->requests) {
2760 if (test_and_clear_bit(KVM_REQ_MIGRATE_TIMER, &vcpu->requests)) 2809 if (test_and_clear_bit(KVM_REQ_MIGRATE_TIMER, &vcpu->requests))
2761 __kvm_migrate_apic_timer(vcpu); 2810 __kvm_migrate_timers(vcpu);
2811 if (test_and_clear_bit(KVM_REQ_TLB_FLUSH, &vcpu->requests))
2812 kvm_x86_ops->tlb_flush(vcpu);
2762 if (test_and_clear_bit(KVM_REQ_REPORT_TPR_ACCESS, 2813 if (test_and_clear_bit(KVM_REQ_REPORT_TPR_ACCESS,
2763 &vcpu->requests)) { 2814 &vcpu->requests)) {
2764 kvm_run->exit_reason = KVM_EXIT_TPR_ACCESS; 2815 kvm_run->exit_reason = KVM_EXIT_TPR_ACCESS;
@@ -2772,6 +2823,7 @@ again:
2772 } 2823 }
2773 } 2824 }
2774 2825
2826 clear_bit(KVM_REQ_PENDING_TIMER, &vcpu->requests);
2775 kvm_inject_pending_timer_irqs(vcpu); 2827 kvm_inject_pending_timer_irqs(vcpu);
2776 2828
2777 preempt_disable(); 2829 preempt_disable();
@@ -2781,21 +2833,13 @@ again:
2781 2833
2782 local_irq_disable(); 2834 local_irq_disable();
2783 2835
2784 if (need_resched()) { 2836 if (vcpu->requests || need_resched()) {
2785 local_irq_enable(); 2837 local_irq_enable();
2786 preempt_enable(); 2838 preempt_enable();
2787 r = 1; 2839 r = 1;
2788 goto out; 2840 goto out;
2789 } 2841 }
2790 2842
2791 if (vcpu->requests)
2792 if (test_bit(KVM_REQ_MMU_RELOAD, &vcpu->requests)) {
2793 local_irq_enable();
2794 preempt_enable();
2795 r = 1;
2796 goto out;
2797 }
2798
2799 if (signal_pending(current)) { 2843 if (signal_pending(current)) {
2800 local_irq_enable(); 2844 local_irq_enable();
2801 preempt_enable(); 2845 preempt_enable();
@@ -2825,9 +2869,6 @@ again:
2825 2869
2826 kvm_guest_enter(); 2870 kvm_guest_enter();
2827 2871
2828 if (vcpu->requests)
2829 if (test_and_clear_bit(KVM_REQ_TLB_FLUSH, &vcpu->requests))
2830 kvm_x86_ops->tlb_flush(vcpu);
2831 2872
2832 KVMTRACE_0D(VMENTRY, vcpu, entryexit); 2873 KVMTRACE_0D(VMENTRY, vcpu, entryexit);
2833 kvm_x86_ops->run(vcpu, kvm_run); 2874 kvm_x86_ops->run(vcpu, kvm_run);
diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c
index 8a96320ab071..932f216d890c 100644
--- a/arch/x86/kvm/x86_emulate.c
+++ b/arch/x86/kvm/x86_emulate.c
@@ -1727,7 +1727,8 @@ twobyte_insn:
1727 if (rc) 1727 if (rc)
1728 goto done; 1728 goto done;
1729 1729
1730 kvm_emulate_hypercall(ctxt->vcpu); 1730 /* Let the processor re-execute the fixed hypercall */
1731 c->eip = ctxt->vcpu->arch.rip;
1731 /* Disable writeback. */ 1732 /* Disable writeback. */
1732 c->dst.type = OP_NONE; 1733 c->dst.type = OP_NONE;
1733 break; 1734 break;
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
index af65b2da3ba0..5c7e2fd52075 100644
--- a/arch/x86/lguest/boot.c
+++ b/arch/x86/lguest/boot.c
@@ -582,8 +582,9 @@ static void __init lguest_init_IRQ(void)
582 int vector = FIRST_EXTERNAL_VECTOR + i; 582 int vector = FIRST_EXTERNAL_VECTOR + i;
583 if (vector != SYSCALL_VECTOR) { 583 if (vector != SYSCALL_VECTOR) {
584 set_intr_gate(vector, interrupt[i]); 584 set_intr_gate(vector, interrupt[i]);
585 set_irq_chip_and_handler(i, &lguest_irq_controller, 585 set_irq_chip_and_handler_name(i, &lguest_irq_controller,
586 handle_level_irq); 586 handle_level_irq,
587 "level");
587 } 588 }
588 } 589 }
589 /* This call is required to set up for 4k stacks, where we have 590 /* This call is required to set up for 4k stacks, where we have
diff --git a/arch/x86/lib/copy_user_64.S b/arch/x86/lib/copy_user_64.S
index 70bebd310408..ee1c3f635157 100644
--- a/arch/x86/lib/copy_user_64.S
+++ b/arch/x86/lib/copy_user_64.S
@@ -217,19 +217,19 @@ ENTRY(copy_user_generic_unrolled)
217 /* table sorted by exception address */ 217 /* table sorted by exception address */
218 .section __ex_table,"a" 218 .section __ex_table,"a"
219 .align 8 219 .align 8
220 .quad .Ls1,.Ls1e 220 .quad .Ls1,.Ls1e /* Ls1-Ls4 have copied zero bytes */
221 .quad .Ls2,.Ls2e 221 .quad .Ls2,.Ls1e
222 .quad .Ls3,.Ls3e 222 .quad .Ls3,.Ls1e
223 .quad .Ls4,.Ls4e 223 .quad .Ls4,.Ls1e
224 .quad .Ld1,.Ls1e 224 .quad .Ld1,.Ls1e /* Ld1-Ld4 have copied 0-24 bytes */
225 .quad .Ld2,.Ls2e 225 .quad .Ld2,.Ls2e
226 .quad .Ld3,.Ls3e 226 .quad .Ld3,.Ls3e
227 .quad .Ld4,.Ls4e 227 .quad .Ld4,.Ls4e
228 .quad .Ls5,.Ls5e 228 .quad .Ls5,.Ls5e /* Ls5-Ls8 have copied 32 bytes */
229 .quad .Ls6,.Ls6e 229 .quad .Ls6,.Ls5e
230 .quad .Ls7,.Ls7e 230 .quad .Ls7,.Ls5e
231 .quad .Ls8,.Ls8e 231 .quad .Ls8,.Ls5e
232 .quad .Ld5,.Ls5e 232 .quad .Ld5,.Ls5e /* Ld5-Ld8 have copied 32-56 bytes */
233 .quad .Ld6,.Ls6e 233 .quad .Ld6,.Ls6e
234 .quad .Ld7,.Ls7e 234 .quad .Ld7,.Ls7e
235 .quad .Ld8,.Ls8e 235 .quad .Ld8,.Ls8e
@@ -244,11 +244,8 @@ ENTRY(copy_user_generic_unrolled)
244 .quad .Le5,.Le_zero 244 .quad .Le5,.Le_zero
245 .previous 245 .previous
246 246
247 /* compute 64-offset for main loop. 8 bytes accuracy with error on the
248 pessimistic side. this is gross. it would be better to fix the
249 interface. */
250 /* eax: zero, ebx: 64 */ 247 /* eax: zero, ebx: 64 */
251.Ls1e: addl $8,%eax 248.Ls1e: addl $8,%eax /* eax is bytes left uncopied within the loop (Ls1e: 64 .. Ls8e: 8) */
252.Ls2e: addl $8,%eax 249.Ls2e: addl $8,%eax
253.Ls3e: addl $8,%eax 250.Ls3e: addl $8,%eax
254.Ls4e: addl $8,%eax 251.Ls4e: addl $8,%eax
diff --git a/arch/x86/lib/copy_user_nocache_64.S b/arch/x86/lib/copy_user_nocache_64.S
index 5196762b3b0e..9d3d1ab83763 100644
--- a/arch/x86/lib/copy_user_nocache_64.S
+++ b/arch/x86/lib/copy_user_nocache_64.S
@@ -145,19 +145,19 @@ ENTRY(__copy_user_nocache)
145 /* table sorted by exception address */ 145 /* table sorted by exception address */
146 .section __ex_table,"a" 146 .section __ex_table,"a"
147 .align 8 147 .align 8
148 .quad .Ls1,.Ls1e 148 .quad .Ls1,.Ls1e /* .Ls[1-4] - 0 bytes copied */
149 .quad .Ls2,.Ls2e 149 .quad .Ls2,.Ls1e
150 .quad .Ls3,.Ls3e 150 .quad .Ls3,.Ls1e
151 .quad .Ls4,.Ls4e 151 .quad .Ls4,.Ls1e
152 .quad .Ld1,.Ls1e 152 .quad .Ld1,.Ls1e /* .Ld[1-4] - 0..24 bytes coped */
153 .quad .Ld2,.Ls2e 153 .quad .Ld2,.Ls2e
154 .quad .Ld3,.Ls3e 154 .quad .Ld3,.Ls3e
155 .quad .Ld4,.Ls4e 155 .quad .Ld4,.Ls4e
156 .quad .Ls5,.Ls5e 156 .quad .Ls5,.Ls5e /* .Ls[5-8] - 32 bytes copied */
157 .quad .Ls6,.Ls6e 157 .quad .Ls6,.Ls5e
158 .quad .Ls7,.Ls7e 158 .quad .Ls7,.Ls5e
159 .quad .Ls8,.Ls8e 159 .quad .Ls8,.Ls5e
160 .quad .Ld5,.Ls5e 160 .quad .Ld5,.Ls5e /* .Ld[5-8] - 32..56 bytes copied */
161 .quad .Ld6,.Ls6e 161 .quad .Ld6,.Ls6e
162 .quad .Ld7,.Ls7e 162 .quad .Ld7,.Ls7e
163 .quad .Ld8,.Ls8e 163 .quad .Ld8,.Ls8e
@@ -172,11 +172,8 @@ ENTRY(__copy_user_nocache)
172 .quad .Le5,.Le_zero 172 .quad .Le5,.Le_zero
173 .previous 173 .previous
174 174
175 /* compute 64-offset for main loop. 8 bytes accuracy with error on the
176 pessimistic side. this is gross. it would be better to fix the
177 interface. */
178 /* eax: zero, ebx: 64 */ 175 /* eax: zero, ebx: 64 */
179.Ls1e: addl $8,%eax 176.Ls1e: addl $8,%eax /* eax: bytes left uncopied: Ls1e: 64 .. Ls8e: 8 */
180.Ls2e: addl $8,%eax 177.Ls2e: addl $8,%eax
181.Ls3e: addl $8,%eax 178.Ls3e: addl $8,%eax
182.Ls4e: addl $8,%eax 179.Ls4e: addl $8,%eax
diff --git a/arch/x86/lib/delay_32.c b/arch/x86/lib/delay_32.c
index 4535e6d147ad..d710f2d167bb 100644
--- a/arch/x86/lib/delay_32.c
+++ b/arch/x86/lib/delay_32.c
@@ -44,13 +44,36 @@ static void delay_loop(unsigned long loops)
44static void delay_tsc(unsigned long loops) 44static void delay_tsc(unsigned long loops)
45{ 45{
46 unsigned long bclock, now; 46 unsigned long bclock, now;
47 int cpu;
47 48
48 preempt_disable(); /* TSC's are per-cpu */ 49 preempt_disable();
50 cpu = smp_processor_id();
49 rdtscl(bclock); 51 rdtscl(bclock);
50 do { 52 for (;;) {
51 rep_nop();
52 rdtscl(now); 53 rdtscl(now);
53 } while ((now-bclock) < loops); 54 if ((now - bclock) >= loops)
55 break;
56
57 /* Allow RT tasks to run */
58 preempt_enable();
59 rep_nop();
60 preempt_disable();
61
62 /*
63 * It is possible that we moved to another CPU, and
64 * since TSC's are per-cpu we need to calculate
65 * that. The delay must guarantee that we wait "at
66 * least" the amount of time. Being moved to another
67 * CPU could make the wait longer but we just need to
68 * make sure we waited long enough. Rebalance the
69 * counter for this CPU.
70 */
71 if (unlikely(cpu != smp_processor_id())) {
72 loops -= (now - bclock);
73 cpu = smp_processor_id();
74 rdtscl(bclock);
75 }
76 }
54 preempt_enable(); 77 preempt_enable();
55} 78}
56 79
diff --git a/arch/x86/lib/delay_64.c b/arch/x86/lib/delay_64.c
index bbc610518516..4c441be92641 100644
--- a/arch/x86/lib/delay_64.c
+++ b/arch/x86/lib/delay_64.c
@@ -31,14 +31,36 @@ int __devinit read_current_timer(unsigned long *timer_value)
31void __delay(unsigned long loops) 31void __delay(unsigned long loops)
32{ 32{
33 unsigned bclock, now; 33 unsigned bclock, now;
34 int cpu;
34 35
35 preempt_disable(); /* TSC's are pre-cpu */ 36 preempt_disable();
37 cpu = smp_processor_id();
36 rdtscl(bclock); 38 rdtscl(bclock);
37 do { 39 for (;;) {
38 rep_nop();
39 rdtscl(now); 40 rdtscl(now);
41 if ((now - bclock) >= loops)
42 break;
43
44 /* Allow RT tasks to run */
45 preempt_enable();
46 rep_nop();
47 preempt_disable();
48
49 /*
50 * It is possible that we moved to another CPU, and
51 * since TSC's are per-cpu we need to calculate
52 * that. The delay must guarantee that we wait "at
53 * least" the amount of time. Being moved to another
54 * CPU could make the wait longer but we just need to
55 * make sure we waited long enough. Rebalance the
56 * counter for this CPU.
57 */
58 if (unlikely(cpu != smp_processor_id())) {
59 loops -= (now - bclock);
60 cpu = smp_processor_id();
61 rdtscl(bclock);
62 }
40 } 63 }
41 while ((now-bclock) < loops);
42 preempt_enable(); 64 preempt_enable();
43} 65}
44EXPORT_SYMBOL(__delay); 66EXPORT_SYMBOL(__delay);
diff --git a/arch/x86/math-emu/fpu_entry.c b/arch/x86/math-emu/fpu_entry.c
index 6e38d877ea77..c7b06feb139b 100644
--- a/arch/x86/math-emu/fpu_entry.c
+++ b/arch/x86/math-emu/fpu_entry.c
@@ -30,6 +30,7 @@
30#include <asm/uaccess.h> 30#include <asm/uaccess.h>
31#include <asm/desc.h> 31#include <asm/desc.h>
32#include <asm/user.h> 32#include <asm/user.h>
33#include <asm/i387.h>
33 34
34#include "fpu_system.h" 35#include "fpu_system.h"
35#include "fpu_emu.h" 36#include "fpu_emu.h"
@@ -146,6 +147,13 @@ asmlinkage void math_emulate(long arg)
146 unsigned long code_limit = 0; /* Initialized to stop compiler warnings */ 147 unsigned long code_limit = 0; /* Initialized to stop compiler warnings */
147 struct desc_struct code_descriptor; 148 struct desc_struct code_descriptor;
148 149
150 if (!used_math()) {
151 if (init_fpu(current)) {
152 do_group_exit(SIGKILL);
153 return;
154 }
155 }
156
149#ifdef RE_ENTRANT_CHECKING 157#ifdef RE_ENTRANT_CHECKING
150 if (emulating) { 158 if (emulating) {
151 printk("ERROR: wm-FPU-emu is not RE-ENTRANT!\n"); 159 printk("ERROR: wm-FPU-emu is not RE-ENTRANT!\n");
@@ -153,11 +161,6 @@ asmlinkage void math_emulate(long arg)
153 RE_ENTRANT_CHECK_ON; 161 RE_ENTRANT_CHECK_ON;
154#endif /* RE_ENTRANT_CHECKING */ 162#endif /* RE_ENTRANT_CHECKING */
155 163
156 if (!used_math()) {
157 finit();
158 set_used_math();
159 }
160
161 SETUP_DATA_AREA(arg); 164 SETUP_DATA_AREA(arg);
162 165
163 FPU_ORIG_EIP = FPU_EIP; 166 FPU_ORIG_EIP = FPU_EIP;
diff --git a/arch/x86/math-emu/reg_constant.c b/arch/x86/math-emu/reg_constant.c
index 04869e64b18e..00548354912f 100644
--- a/arch/x86/math-emu/reg_constant.c
+++ b/arch/x86/math-emu/reg_constant.c
@@ -16,8 +16,8 @@
16#include "reg_constant.h" 16#include "reg_constant.h"
17#include "control_w.h" 17#include "control_w.h"
18 18
19#define MAKE_REG(s,e,l,h) { l, h, \ 19#define MAKE_REG(s, e, l, h) { l, h, \
20 ((EXTENDED_Ebias+(e)) | ((SIGN_##s != 0)*0x8000)) } 20 ((EXTENDED_Ebias+(e)) | ((SIGN_##s != 0)*0x8000)) }
21 21
22FPU_REG const CONST_1 = MAKE_REG(POS, 0, 0x00000000, 0x80000000); 22FPU_REG const CONST_1 = MAKE_REG(POS, 0, 0x00000000, 0x80000000);
23#if 0 23#if 0
@@ -40,7 +40,7 @@ FPU_REG const CONST_PI2extra = MAKE_REG(NEG, -66,
40FPU_REG const CONST_Z = MAKE_REG(POS, EXP_UNDER, 0x0, 0x0); 40FPU_REG const CONST_Z = MAKE_REG(POS, EXP_UNDER, 0x0, 0x0);
41 41
42/* Only the sign and significand (and tag) are used in internal NaNs */ 42/* Only the sign and significand (and tag) are used in internal NaNs */
43/* The 80486 never generates one of these 43/* The 80486 never generates one of these
44FPU_REG const CONST_SNAN = MAKE_REG(POS, EXP_OVER, 0x00000001, 0x80000000); 44FPU_REG const CONST_SNAN = MAKE_REG(POS, EXP_OVER, 0x00000001, 0x80000000);
45 */ 45 */
46/* This is the real indefinite QNaN */ 46/* This is the real indefinite QNaN */
@@ -49,7 +49,7 @@ FPU_REG const CONST_QNaN = MAKE_REG(NEG, EXP_OVER, 0x00000000, 0xC0000000);
49/* Only the sign (and tag) is used in internal infinities */ 49/* Only the sign (and tag) is used in internal infinities */
50FPU_REG const CONST_INF = MAKE_REG(POS, EXP_OVER, 0x00000000, 0x80000000); 50FPU_REG const CONST_INF = MAKE_REG(POS, EXP_OVER, 0x00000000, 0x80000000);
51 51
52static void fld_const(FPU_REG const *c, int adj, u_char tag) 52static void fld_const(FPU_REG const * c, int adj, u_char tag)
53{ 53{
54 FPU_REG *st_new_ptr; 54 FPU_REG *st_new_ptr;
55 55
diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c
index 2c24bea92c66..0bb0caed8971 100644
--- a/arch/x86/mm/dump_pagetables.c
+++ b/arch/x86/mm/dump_pagetables.c
@@ -42,7 +42,7 @@ static struct addr_marker address_markers[] = {
42 { 0, "User Space" }, 42 { 0, "User Space" },
43#ifdef CONFIG_X86_64 43#ifdef CONFIG_X86_64
44 { 0x8000000000000000UL, "Kernel Space" }, 44 { 0x8000000000000000UL, "Kernel Space" },
45 { 0xffff810000000000UL, "Low Kernel Mapping" }, 45 { PAGE_OFFSET, "Low Kernel Mapping" },
46 { VMALLOC_START, "vmalloc() Area" }, 46 { VMALLOC_START, "vmalloc() Area" },
47 { VMEMMAP_START, "Vmemmap" }, 47 { VMEMMAP_START, "Vmemmap" },
48 { __START_KERNEL_map, "High Kernel Mapping" }, 48 { __START_KERNEL_map, "High Kernel Mapping" },
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index fd7e1798c75a..1e64795714c8 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -55,11 +55,7 @@ static inline int notify_page_fault(struct pt_regs *regs)
55 int ret = 0; 55 int ret = 0;
56 56
57 /* kprobe_running() needs smp_processor_id() */ 57 /* kprobe_running() needs smp_processor_id() */
58#ifdef CONFIG_X86_32
59 if (!user_mode_vm(regs)) { 58 if (!user_mode_vm(regs)) {
60#else
61 if (!user_mode(regs)) {
62#endif
63 preempt_disable(); 59 preempt_disable();
64 if (kprobe_running() && kprobe_fault_handler(regs, 14)) 60 if (kprobe_running() && kprobe_fault_handler(regs, 14))
65 ret = 1; 61 ret = 1;
@@ -497,6 +493,11 @@ static int vmalloc_fault(unsigned long address)
497 unsigned long pgd_paddr; 493 unsigned long pgd_paddr;
498 pmd_t *pmd_k; 494 pmd_t *pmd_k;
499 pte_t *pte_k; 495 pte_t *pte_k;
496
497 /* Make sure we are in vmalloc area */
498 if (!(address >= VMALLOC_START && address < VMALLOC_END))
499 return -1;
500
500 /* 501 /*
501 * Synchronize this task's top level page-table 502 * Synchronize this task's top level page-table
502 * with the 'reference' page table. 503 * with the 'reference' page table.
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index ec30d10154b6..d71be0eb0130 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -162,6 +162,7 @@ static void __init kernel_physical_mapping_init(pgd_t *pgd_base)
162 pgd_t *pgd; 162 pgd_t *pgd;
163 pmd_t *pmd; 163 pmd_t *pmd;
164 pte_t *pte; 164 pte_t *pte;
165 unsigned pages_2m = 0, pages_4k = 0;
165 166
166 pgd_idx = pgd_index(PAGE_OFFSET); 167 pgd_idx = pgd_index(PAGE_OFFSET);
167 pgd = pgd_base + pgd_idx; 168 pgd = pgd_base + pgd_idx;
@@ -197,6 +198,7 @@ static void __init kernel_physical_mapping_init(pgd_t *pgd_base)
197 is_kernel_text(addr2)) 198 is_kernel_text(addr2))
198 prot = PAGE_KERNEL_LARGE_EXEC; 199 prot = PAGE_KERNEL_LARGE_EXEC;
199 200
201 pages_2m++;
200 set_pmd(pmd, pfn_pmd(pfn, prot)); 202 set_pmd(pmd, pfn_pmd(pfn, prot));
201 203
202 pfn += PTRS_PER_PTE; 204 pfn += PTRS_PER_PTE;
@@ -213,11 +215,14 @@ static void __init kernel_physical_mapping_init(pgd_t *pgd_base)
213 if (is_kernel_text(addr)) 215 if (is_kernel_text(addr))
214 prot = PAGE_KERNEL_EXEC; 216 prot = PAGE_KERNEL_EXEC;
215 217
218 pages_4k++;
216 set_pte(pte, pfn_pte(pfn, prot)); 219 set_pte(pte, pfn_pte(pfn, prot));
217 } 220 }
218 max_pfn_mapped = pfn; 221 max_pfn_mapped = pfn;
219 } 222 }
220 } 223 }
224 update_page_count(PG_LEVEL_2M, pages_2m);
225 update_page_count(PG_LEVEL_4K, pages_4k);
221} 226}
222 227
223static inline int page_kills_ppro(unsigned long pagenr) 228static inline int page_kills_ppro(unsigned long pagenr)
@@ -571,17 +576,6 @@ void __init mem_init(void)
571#endif 576#endif
572 bad_ppro = ppro_with_ram_bug(); 577 bad_ppro = ppro_with_ram_bug();
573 578
574#ifdef CONFIG_HIGHMEM
575 /* check that fixmap and pkmap do not overlap */
576 if (PKMAP_BASE + LAST_PKMAP*PAGE_SIZE >= FIXADDR_START) {
577 printk(KERN_ERR
578 "fixmap and kmap areas overlap - this will crash\n");
579 printk(KERN_ERR "pkstart: %lxh pkend: %lxh fixstart %lxh\n",
580 PKMAP_BASE, PKMAP_BASE + LAST_PKMAP*PAGE_SIZE,
581 FIXADDR_START);
582 BUG();
583 }
584#endif
585 /* this will put all low memory onto the freelists */ 579 /* this will put all low memory onto the freelists */
586 totalram_pages += free_all_bootmem(); 580 totalram_pages += free_all_bootmem();
587 581
@@ -614,7 +608,6 @@ void __init mem_init(void)
614 (unsigned long) (totalhigh_pages << (PAGE_SHIFT-10)) 608 (unsigned long) (totalhigh_pages << (PAGE_SHIFT-10))
615 ); 609 );
616 610
617#if 1 /* double-sanity-check paranoia */
618 printk(KERN_INFO "virtual kernel memory layout:\n" 611 printk(KERN_INFO "virtual kernel memory layout:\n"
619 " fixmap : 0x%08lx - 0x%08lx (%4ld kB)\n" 612 " fixmap : 0x%08lx - 0x%08lx (%4ld kB)\n"
620#ifdef CONFIG_HIGHMEM 613#ifdef CONFIG_HIGHMEM
@@ -655,7 +648,6 @@ void __init mem_init(void)
655#endif 648#endif
656 BUG_ON(VMALLOC_START > VMALLOC_END); 649 BUG_ON(VMALLOC_START > VMALLOC_END);
657 BUG_ON((unsigned long)high_memory > VMALLOC_START); 650 BUG_ON((unsigned long)high_memory > VMALLOC_START);
658#endif /* double-sanity-check paranoia */
659 651
660 if (boot_cpu_data.wp_works_ok < 0) 652 if (boot_cpu_data.wp_works_ok < 0)
661 test_wp_bit(); 653 test_wp_bit();
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index 32ba13b0f818..48623ae628fb 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -18,6 +18,7 @@
18#include <linux/swap.h> 18#include <linux/swap.h>
19#include <linux/smp.h> 19#include <linux/smp.h>
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/initrd.h>
21#include <linux/pagemap.h> 22#include <linux/pagemap.h>
22#include <linux/bootmem.h> 23#include <linux/bootmem.h>
23#include <linux/proc_fs.h> 24#include <linux/proc_fs.h>
@@ -135,7 +136,7 @@ static __init void *spp_getpage(void)
135 return ptr; 136 return ptr;
136} 137}
137 138
138static void 139static __init void
139set_pte_phys(unsigned long vaddr, unsigned long phys, pgprot_t prot) 140set_pte_phys(unsigned long vaddr, unsigned long phys, pgprot_t prot)
140{ 141{
141 pgd_t *pgd; 142 pgd_t *pgd;
@@ -206,7 +207,7 @@ void __init cleanup_highmap(void)
206 pmd_t *last_pmd = pmd + PTRS_PER_PMD; 207 pmd_t *last_pmd = pmd + PTRS_PER_PMD;
207 208
208 for (; pmd < last_pmd; pmd++, vaddr += PMD_SIZE) { 209 for (; pmd < last_pmd; pmd++, vaddr += PMD_SIZE) {
209 if (!pmd_present(*pmd)) 210 if (pmd_none(*pmd))
210 continue; 211 continue;
211 if (vaddr < (unsigned long) _text || vaddr > end) 212 if (vaddr < (unsigned long) _text || vaddr > end)
212 set_pmd(pmd, __pmd(0)); 213 set_pmd(pmd, __pmd(0));
@@ -214,7 +215,7 @@ void __init cleanup_highmap(void)
214} 215}
215 216
216/* NOTE: this is meant to be run only at boot */ 217/* NOTE: this is meant to be run only at boot */
217void __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t prot) 218void __init __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t prot)
218{ 219{
219 unsigned long address = __fix_to_virt(idx); 220 unsigned long address = __fix_to_virt(idx);
220 221
@@ -312,6 +313,8 @@ __meminit void early_iounmap(void *addr, unsigned long size)
312static unsigned long __meminit 313static unsigned long __meminit
313phys_pmd_init(pmd_t *pmd_page, unsigned long address, unsigned long end) 314phys_pmd_init(pmd_t *pmd_page, unsigned long address, unsigned long end)
314{ 315{
316 unsigned long pages = 0;
317
315 int i = pmd_index(address); 318 int i = pmd_index(address);
316 319
317 for (; i < PTRS_PER_PMD; i++, address += PMD_SIZE) { 320 for (; i < PTRS_PER_PMD; i++, address += PMD_SIZE) {
@@ -328,9 +331,11 @@ phys_pmd_init(pmd_t *pmd_page, unsigned long address, unsigned long end)
328 if (pmd_val(*pmd)) 331 if (pmd_val(*pmd))
329 continue; 332 continue;
330 333
334 pages++;
331 set_pte((pte_t *)pmd, 335 set_pte((pte_t *)pmd,
332 pfn_pte(address >> PAGE_SHIFT, PAGE_KERNEL_LARGE)); 336 pfn_pte(address >> PAGE_SHIFT, PAGE_KERNEL_LARGE));
333 } 337 }
338 update_page_count(PG_LEVEL_2M, pages);
334 return address; 339 return address;
335} 340}
336 341
@@ -350,6 +355,7 @@ phys_pmd_update(pud_t *pud, unsigned long address, unsigned long end)
350static unsigned long __meminit 355static unsigned long __meminit
351phys_pud_init(pud_t *pud_page, unsigned long addr, unsigned long end) 356phys_pud_init(pud_t *pud_page, unsigned long addr, unsigned long end)
352{ 357{
358 unsigned long pages = 0;
353 unsigned long last_map_addr = end; 359 unsigned long last_map_addr = end;
354 int i = pud_index(addr); 360 int i = pud_index(addr);
355 361
@@ -374,6 +380,7 @@ phys_pud_init(pud_t *pud_page, unsigned long addr, unsigned long end)
374 } 380 }
375 381
376 if (direct_gbpages) { 382 if (direct_gbpages) {
383 pages++;
377 set_pte((pte_t *)pud, 384 set_pte((pte_t *)pud,
378 pfn_pte(addr >> PAGE_SHIFT, PAGE_KERNEL_LARGE)); 385 pfn_pte(addr >> PAGE_SHIFT, PAGE_KERNEL_LARGE));
379 last_map_addr = (addr & PUD_MASK) + PUD_SIZE; 386 last_map_addr = (addr & PUD_MASK) + PUD_SIZE;
@@ -390,6 +397,7 @@ phys_pud_init(pud_t *pud_page, unsigned long addr, unsigned long end)
390 unmap_low_page(pmd); 397 unmap_low_page(pmd);
391 } 398 }
392 __flush_tlb_all(); 399 __flush_tlb_all();
400 update_page_count(PG_LEVEL_1G, pages);
393 401
394 return last_map_addr >> PAGE_SHIFT; 402 return last_map_addr >> PAGE_SHIFT;
395} 403}
@@ -431,7 +439,7 @@ static void __init init_gbpages(void)
431 direct_gbpages = 0; 439 direct_gbpages = 0;
432} 440}
433 441
434#ifdef CONFIG_MEMTEST_BOOTPARAM 442#ifdef CONFIG_MEMTEST
435 443
436static void __init memtest(unsigned long start_phys, unsigned long size, 444static void __init memtest(unsigned long start_phys, unsigned long size,
437 unsigned pattern) 445 unsigned pattern)
@@ -493,7 +501,8 @@ static void __init memtest(unsigned long start_phys, unsigned long size,
493 501
494} 502}
495 503
496static int memtest_pattern __initdata = CONFIG_MEMTEST_BOOTPARAM_VALUE; 504/* default is disabled */
505static int memtest_pattern __initdata;
497 506
498static int __init parse_memtest(char *arg) 507static int __init parse_memtest(char *arg)
499{ 508{
@@ -506,7 +515,7 @@ early_param("memtest", parse_memtest);
506 515
507static void __init early_memtest(unsigned long start, unsigned long end) 516static void __init early_memtest(unsigned long start, unsigned long end)
508{ 517{
509 unsigned long t_start, t_size; 518 u64 t_start, t_size;
510 unsigned pattern; 519 unsigned pattern;
511 520
512 if (!memtest_pattern) 521 if (!memtest_pattern)
@@ -525,8 +534,9 @@ static void __init early_memtest(unsigned long start, unsigned long end)
525 if (t_start + t_size > end) 534 if (t_start + t_size > end)
526 t_size = end - t_start; 535 t_size = end - t_start;
527 536
528 printk(KERN_CONT "\n %016lx - %016lx pattern %d", 537 printk(KERN_CONT "\n %016llx - %016llx pattern %d",
529 t_start, t_start + t_size, pattern); 538 (unsigned long long)t_start,
539 (unsigned long long)t_start + t_size, pattern);
530 540
531 memtest(t_start, t_size, pattern); 541 memtest(t_start, t_size, pattern);
532 542
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index 71bb3159031a..416ea415f5c2 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -142,7 +142,7 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,
142 /* 142 /*
143 * Don't remap the low PCI/ISA area, it's always mapped.. 143 * Don't remap the low PCI/ISA area, it's always mapped..
144 */ 144 */
145 if (phys_addr >= ISA_START_ADDRESS && last_addr < ISA_END_ADDRESS) 145 if (is_ISA_range(phys_addr, last_addr))
146 return (__force void __iomem *)phys_to_virt(phys_addr); 146 return (__force void __iomem *)phys_to_virt(phys_addr);
147 147
148 /* 148 /*
@@ -261,7 +261,7 @@ void __iomem *ioremap_nocache(resource_size_t phys_addr, unsigned long size)
261{ 261{
262 /* 262 /*
263 * Ideally, this should be: 263 * Ideally, this should be:
264 * pat_wc_enabled ? _PAGE_CACHE_UC : _PAGE_CACHE_UC_MINUS; 264 * pat_enabled ? _PAGE_CACHE_UC : _PAGE_CACHE_UC_MINUS;
265 * 265 *
266 * Till we fix all X drivers to use ioremap_wc(), we will use 266 * Till we fix all X drivers to use ioremap_wc(), we will use
267 * UC MINUS. 267 * UC MINUS.
@@ -285,7 +285,7 @@ EXPORT_SYMBOL(ioremap_nocache);
285 */ 285 */
286void __iomem *ioremap_wc(unsigned long phys_addr, unsigned long size) 286void __iomem *ioremap_wc(unsigned long phys_addr, unsigned long size)
287{ 287{
288 if (pat_wc_enabled) 288 if (pat_enabled)
289 return __ioremap_caller(phys_addr, size, _PAGE_CACHE_WC, 289 return __ioremap_caller(phys_addr, size, _PAGE_CACHE_WC,
290 __builtin_return_address(0)); 290 __builtin_return_address(0));
291 else 291 else
@@ -318,8 +318,8 @@ void iounmap(volatile void __iomem *addr)
318 * vm_area and by simply returning an address into the kernel mapping 318 * vm_area and by simply returning an address into the kernel mapping
319 * of ISA space. So handle that here. 319 * of ISA space. So handle that here.
320 */ 320 */
321 if (addr >= phys_to_virt(ISA_START_ADDRESS) && 321 if ((void __force *)addr >= phys_to_virt(ISA_START_ADDRESS) &&
322 addr < phys_to_virt(ISA_END_ADDRESS)) 322 (void __force *)addr < phys_to_virt(ISA_END_ADDRESS))
323 return; 323 return;
324 324
325 addr = (volatile void __iomem *) 325 addr = (volatile void __iomem *)
@@ -332,7 +332,7 @@ void iounmap(volatile void __iomem *addr)
332 cpa takes care of the direct mappings. */ 332 cpa takes care of the direct mappings. */
333 read_lock(&vmlist_lock); 333 read_lock(&vmlist_lock);
334 for (p = vmlist; p; p = p->next) { 334 for (p = vmlist; p; p = p->next) {
335 if (p->addr == addr) 335 if (p->addr == (void __force *)addr)
336 break; 336 break;
337 } 337 }
338 read_unlock(&vmlist_lock); 338 read_unlock(&vmlist_lock);
@@ -346,7 +346,7 @@ void iounmap(volatile void __iomem *addr)
346 free_memtype(p->phys_addr, p->phys_addr + get_vm_area_size(p)); 346 free_memtype(p->phys_addr, p->phys_addr + get_vm_area_size(p));
347 347
348 /* Finally remove it */ 348 /* Finally remove it */
349 o = remove_vm_area((void *)addr); 349 o = remove_vm_area((void __force *)addr);
350 BUG_ON(p != o || o == NULL); 350 BUG_ON(p != o || o == NULL);
351 kfree(p); 351 kfree(p);
352} 352}
@@ -365,7 +365,7 @@ void *xlate_dev_mem_ptr(unsigned long phys)
365 if (page_is_ram(start >> PAGE_SHIFT)) 365 if (page_is_ram(start >> PAGE_SHIFT))
366 return __va(phys); 366 return __va(phys);
367 367
368 addr = (void *)ioremap(start, PAGE_SIZE); 368 addr = (void __force *)ioremap(start, PAGE_SIZE);
369 if (addr) 369 if (addr)
370 addr = (void *)((unsigned long)addr | (phys & ~PAGE_MASK)); 370 addr = (void *)((unsigned long)addr | (phys & ~PAGE_MASK));
371 371
@@ -593,10 +593,11 @@ void __init early_iounmap(void *addr, unsigned long size)
593 unsigned long offset; 593 unsigned long offset;
594 unsigned int nrpages; 594 unsigned int nrpages;
595 enum fixed_addresses idx; 595 enum fixed_addresses idx;
596 unsigned int nesting; 596 int nesting;
597 597
598 nesting = --early_ioremap_nested; 598 nesting = --early_ioremap_nested;
599 WARN_ON(nesting < 0); 599 if (WARN_ON(nesting < 0))
600 return;
600 601
601 if (early_ioremap_debug) { 602 if (early_ioremap_debug) {
602 printk(KERN_INFO "early_iounmap(%p, %08lx) [%d]\n", addr, 603 printk(KERN_INFO "early_iounmap(%p, %08lx) [%d]\n", addr,
diff --git a/arch/x86/mm/k8topology_64.c b/arch/x86/mm/k8topology_64.c
index 1f476e477844..0ea66b532c35 100644
--- a/arch/x86/mm/k8topology_64.c
+++ b/arch/x86/mm/k8topology_64.c
@@ -22,6 +22,7 @@
22#include <asm/numa.h> 22#include <asm/numa.h>
23#include <asm/mpspec.h> 23#include <asm/mpspec.h>
24#include <asm/apic.h> 24#include <asm/apic.h>
25#include <asm/k8.h>
25 26
26static __init int find_northbridge(void) 27static __init int find_northbridge(void)
27{ 28{
@@ -73,17 +74,12 @@ static __init void early_get_boot_cpu_id(void)
73 74
74int __init k8_scan_nodes(unsigned long start, unsigned long end) 75int __init k8_scan_nodes(unsigned long start, unsigned long end)
75{ 76{
77 unsigned numnodes, cores, bits, apicid_base;
76 unsigned long prevbase; 78 unsigned long prevbase;
77 struct bootnode nodes[8]; 79 struct bootnode nodes[8];
78 int nodeid, i, nb;
79 unsigned char nodeids[8]; 80 unsigned char nodeids[8];
80 int found = 0; 81 int i, j, nb, found = 0;
81 u32 reg; 82 u32 nodeid, reg;
82 unsigned numnodes;
83 unsigned cores;
84 unsigned bits;
85 int j;
86 unsigned apicid_base;
87 83
88 if (!early_pci_allowed()) 84 if (!early_pci_allowed())
89 return -1; 85 return -1;
@@ -105,7 +101,6 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end)
105 prevbase = 0; 101 prevbase = 0;
106 for (i = 0; i < 8; i++) { 102 for (i = 0; i < 8; i++) {
107 unsigned long base, limit; 103 unsigned long base, limit;
108 u32 nodeid;
109 104
110 base = read_pci_config(0, nb, 1, 0x40 + i*8); 105 base = read_pci_config(0, nb, 1, 0x40 + i*8);
111 limit = read_pci_config(0, nb, 1, 0x44 + i*8); 106 limit = read_pci_config(0, nb, 1, 0x44 + i*8);
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index 60bcb5b6a37e..afd40054d157 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -34,6 +34,41 @@ struct cpa_data {
34 unsigned force_split : 1; 34 unsigned force_split : 1;
35}; 35};
36 36
37#ifdef CONFIG_PROC_FS
38static unsigned long direct_pages_count[PG_LEVEL_NUM];
39
40void update_page_count(int level, unsigned long pages)
41{
42 unsigned long flags;
43
44 /* Protect against CPA */
45 spin_lock_irqsave(&pgd_lock, flags);
46 direct_pages_count[level] += pages;
47 spin_unlock_irqrestore(&pgd_lock, flags);
48}
49
50static void split_page_count(int level)
51{
52 direct_pages_count[level]--;
53 direct_pages_count[level - 1] += PTRS_PER_PTE;
54}
55
56int arch_report_meminfo(char *page)
57{
58 int n = sprintf(page, "DirectMap4k: %8lu\n"
59 "DirectMap2M: %8lu\n",
60 direct_pages_count[PG_LEVEL_4K],
61 direct_pages_count[PG_LEVEL_2M]);
62#ifdef CONFIG_X86_64
63 n += sprintf(page + n, "DirectMap1G: %8lu\n",
64 direct_pages_count[PG_LEVEL_1G]);
65#endif
66 return n;
67}
68#else
69static inline void split_page_count(int level) { }
70#endif
71
37#ifdef CONFIG_X86_64 72#ifdef CONFIG_X86_64
38 73
39static inline unsigned long highmap_start_pfn(void) 74static inline unsigned long highmap_start_pfn(void)
@@ -500,6 +535,10 @@ static int split_large_page(pte_t *kpte, unsigned long address)
500 for (i = 0; i < PTRS_PER_PTE; i++, pfn += pfninc) 535 for (i = 0; i < PTRS_PER_PTE; i++, pfn += pfninc)
501 set_pte(&pbase[i], pfn_pte(pfn, ref_prot)); 536 set_pte(&pbase[i], pfn_pte(pfn, ref_prot));
502 537
538 if (address >= (unsigned long)__va(0) &&
539 address < (unsigned long)__va(max_pfn_mapped << PAGE_SHIFT))
540 split_page_count(level);
541
503 /* 542 /*
504 * Install the new, split up pagetable. Important details here: 543 * Install the new, split up pagetable. Important details here:
505 * 544 *
@@ -805,7 +844,7 @@ int _set_memory_wc(unsigned long addr, int numpages)
805 844
806int set_memory_wc(unsigned long addr, int numpages) 845int set_memory_wc(unsigned long addr, int numpages)
807{ 846{
808 if (!pat_wc_enabled) 847 if (!pat_enabled)
809 return set_memory_uc(addr, numpages); 848 return set_memory_uc(addr, numpages);
810 849
811 if (reserve_memtype(addr, addr + numpages * PAGE_SIZE, 850 if (reserve_memtype(addr, addr + numpages * PAGE_SIZE,
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index de3a99812450..a885a1019b8a 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -26,15 +26,15 @@
26#include <asm/io.h> 26#include <asm/io.h>
27 27
28#ifdef CONFIG_X86_PAT 28#ifdef CONFIG_X86_PAT
29int __read_mostly pat_wc_enabled = 1; 29int __read_mostly pat_enabled = 1;
30 30
31void __cpuinit pat_disable(char *reason) 31void __cpuinit pat_disable(char *reason)
32{ 32{
33 pat_wc_enabled = 0; 33 pat_enabled = 0;
34 printk(KERN_INFO "%s\n", reason); 34 printk(KERN_INFO "%s\n", reason);
35} 35}
36 36
37static int nopat(char *str) 37static int __init nopat(char *str)
38{ 38{
39 pat_disable("PAT support disabled."); 39 pat_disable("PAT support disabled.");
40 return 0; 40 return 0;
@@ -42,6 +42,19 @@ static int nopat(char *str)
42early_param("nopat", nopat); 42early_param("nopat", nopat);
43#endif 43#endif
44 44
45
46static int debug_enable;
47static int __init pat_debug_setup(char *str)
48{
49 debug_enable = 1;
50 return 0;
51}
52__setup("debugpat", pat_debug_setup);
53
54#define dprintk(fmt, arg...) \
55 do { if (debug_enable) printk(KERN_INFO fmt, ##arg); } while (0)
56
57
45static u64 __read_mostly boot_pat_state; 58static u64 __read_mostly boot_pat_state;
46 59
47enum { 60enum {
@@ -53,24 +66,25 @@ enum {
53 PAT_UC_MINUS = 7, /* UC, but can be overriden by MTRR */ 66 PAT_UC_MINUS = 7, /* UC, but can be overriden by MTRR */
54}; 67};
55 68
56#define PAT(x,y) ((u64)PAT_ ## y << ((x)*8)) 69#define PAT(x, y) ((u64)PAT_ ## y << ((x)*8))
57 70
58void pat_init(void) 71void pat_init(void)
59{ 72{
60 u64 pat; 73 u64 pat;
61 74
62 if (!pat_wc_enabled) 75 if (!pat_enabled)
63 return; 76 return;
64 77
65 /* Paranoia check. */ 78 /* Paranoia check. */
66 if (!cpu_has_pat) { 79 if (!cpu_has_pat && boot_pat_state) {
67 printk(KERN_ERR "PAT enabled, but CPU feature cleared\n");
68 /* 80 /*
69 * Panic if this happens on the secondary CPU, and we 81 * If this happens we are on a secondary CPU, but
70 * switched to PAT on the boot CPU. We have no way to 82 * switched to PAT on the boot CPU. We have no way to
71 * undo PAT. 83 * undo PAT.
72 */ 84 */
73 BUG_ON(boot_pat_state); 85 printk(KERN_ERR "PAT enabled, "
86 "but not supported by secondary CPU\n");
87 BUG();
74 } 88 }
75 89
76 /* Set PWT to Write-Combining. All other bits stay the same */ 90 /* Set PWT to Write-Combining. All other bits stay the same */
@@ -86,8 +100,8 @@ void pat_init(void)
86 * 011 UC _PAGE_CACHE_UC 100 * 011 UC _PAGE_CACHE_UC
87 * PAT bit unused 101 * PAT bit unused
88 */ 102 */
89 pat = PAT(0,WB) | PAT(1,WC) | PAT(2,UC_MINUS) | PAT(3,UC) | 103 pat = PAT(0, WB) | PAT(1, WC) | PAT(2, UC_MINUS) | PAT(3, UC) |
90 PAT(4,WB) | PAT(5,WC) | PAT(6,UC_MINUS) | PAT(7,UC); 104 PAT(4, WB) | PAT(5, WC) | PAT(6, UC_MINUS) | PAT(7, UC);
91 105
92 /* Boot CPU check */ 106 /* Boot CPU check */
93 if (!boot_pat_state) 107 if (!boot_pat_state)
@@ -103,11 +117,11 @@ void pat_init(void)
103static char *cattr_name(unsigned long flags) 117static char *cattr_name(unsigned long flags)
104{ 118{
105 switch (flags & _PAGE_CACHE_MASK) { 119 switch (flags & _PAGE_CACHE_MASK) {
106 case _PAGE_CACHE_UC: return "uncached"; 120 case _PAGE_CACHE_UC: return "uncached";
107 case _PAGE_CACHE_UC_MINUS: return "uncached-minus"; 121 case _PAGE_CACHE_UC_MINUS: return "uncached-minus";
108 case _PAGE_CACHE_WB: return "write-back"; 122 case _PAGE_CACHE_WB: return "write-back";
109 case _PAGE_CACHE_WC: return "write-combining"; 123 case _PAGE_CACHE_WC: return "write-combining";
110 default: return "broken"; 124 default: return "broken";
111 } 125 }
112} 126}
113 127
@@ -145,46 +159,50 @@ static DEFINE_SPINLOCK(memtype_lock); /* protects memtype list */
145 * The intersection is based on "Effective Memory Type" tables in IA-32 159 * The intersection is based on "Effective Memory Type" tables in IA-32
146 * SDM vol 3a 160 * SDM vol 3a
147 */ 161 */
148static int pat_x_mtrr_type(u64 start, u64 end, unsigned long prot, 162static unsigned long pat_x_mtrr_type(u64 start, u64 end, unsigned long req_type)
149 unsigned long *ret_prot)
150{ 163{
151 unsigned long pat_type; 164 /*
152 u8 mtrr_type; 165 * Look for MTRR hint to get the effective type in case where PAT
153 166 * request is for WB.
154 mtrr_type = mtrr_type_lookup(start, end); 167 */
155 if (mtrr_type == 0xFF) { /* MTRR not enabled */ 168 if (req_type == _PAGE_CACHE_WB) {
156 *ret_prot = prot; 169 u8 mtrr_type;
157 return 0; 170
158 } 171 mtrr_type = mtrr_type_lookup(start, end);
159 if (mtrr_type == 0xFE) { /* MTRR match error */ 172 if (mtrr_type == MTRR_TYPE_UNCACHABLE)
160 *ret_prot = _PAGE_CACHE_UC; 173 return _PAGE_CACHE_UC;
161 return -1; 174 if (mtrr_type == MTRR_TYPE_WRCOMB)
162 } 175 return _PAGE_CACHE_WC;
163 if (mtrr_type != MTRR_TYPE_UNCACHABLE &&
164 mtrr_type != MTRR_TYPE_WRBACK &&
165 mtrr_type != MTRR_TYPE_WRCOMB) { /* MTRR type unhandled */
166 *ret_prot = _PAGE_CACHE_UC;
167 return -1;
168 } 176 }
169 177
170 pat_type = prot & _PAGE_CACHE_MASK; 178 return req_type;
171 prot &= (~_PAGE_CACHE_MASK); 179}
172 180
173 /* Currently doing intersection by hand. Optimize it later. */ 181static int chk_conflict(struct memtype *new, struct memtype *entry,
174 if (pat_type == _PAGE_CACHE_WC) { 182 unsigned long *type)
175 *ret_prot = prot | _PAGE_CACHE_WC; 183{
176 } else if (pat_type == _PAGE_CACHE_UC_MINUS) { 184 if (new->type != entry->type) {
177 *ret_prot = prot | _PAGE_CACHE_UC_MINUS; 185 if (type) {
178 } else if (pat_type == _PAGE_CACHE_UC || 186 new->type = entry->type;
179 mtrr_type == MTRR_TYPE_UNCACHABLE) { 187 *type = entry->type;
180 *ret_prot = prot | _PAGE_CACHE_UC; 188 } else
181 } else if (mtrr_type == MTRR_TYPE_WRCOMB) { 189 goto conflict;
182 *ret_prot = prot | _PAGE_CACHE_WC;
183 } else {
184 *ret_prot = prot | _PAGE_CACHE_WB;
185 } 190 }
186 191
192 /* check overlaps with more than one entry in the list */
193 list_for_each_entry_continue(entry, &memtype_list, nd) {
194 if (new->end <= entry->start)
195 break;
196 else if (new->type != entry->type)
197 goto conflict;
198 }
187 return 0; 199 return 0;
200
201 conflict:
202 printk(KERN_INFO "%s:%d conflicting memory types "
203 "%Lx-%Lx %s<->%s\n", current->comm, current->pid, new->start,
204 new->end, cattr_name(new->type), cattr_name(entry->type));
205 return -EBUSY;
188} 206}
189 207
190/* 208/*
@@ -197,251 +215,134 @@ static int pat_x_mtrr_type(u64 start, u64 end, unsigned long prot,
197 * req_type will have a special case value '-1', when requester want to inherit 215 * req_type will have a special case value '-1', when requester want to inherit
198 * the memory type from mtrr (if WB), existing PAT, defaulting to UC_MINUS. 216 * the memory type from mtrr (if WB), existing PAT, defaulting to UC_MINUS.
199 * 217 *
200 * If ret_type is NULL, function will return an error if it cannot reserve the 218 * If new_type is NULL, function will return an error if it cannot reserve the
201 * region with req_type. If ret_type is non-null, function will return 219 * region with req_type. If new_type is non-NULL, function will return
202 * available type in ret_type in case of no error. In case of any error 220 * available type in new_type in case of no error. In case of any error
203 * it will return a negative return value. 221 * it will return a negative return value.
204 */ 222 */
205int reserve_memtype(u64 start, u64 end, unsigned long req_type, 223int reserve_memtype(u64 start, u64 end, unsigned long req_type,
206 unsigned long *ret_type) 224 unsigned long *new_type)
207{ 225{
208 struct memtype *new_entry = NULL; 226 struct memtype *new, *entry;
209 struct memtype *parse;
210 unsigned long actual_type; 227 unsigned long actual_type;
228 struct list_head *where;
211 int err = 0; 229 int err = 0;
212 230
213 /* Only track when pat_wc_enabled */ 231 BUG_ON(start >= end); /* end is exclusive */
214 if (!pat_wc_enabled) { 232
233 if (!pat_enabled) {
215 /* This is identical to page table setting without PAT */ 234 /* This is identical to page table setting without PAT */
216 if (ret_type) { 235 if (new_type) {
217 if (req_type == -1) { 236 if (req_type == -1)
218 *ret_type = _PAGE_CACHE_WB; 237 *new_type = _PAGE_CACHE_WB;
219 } else { 238 else
220 *ret_type = req_type; 239 *new_type = req_type & _PAGE_CACHE_MASK;
221 }
222 } 240 }
223 return 0; 241 return 0;
224 } 242 }
225 243
226 /* Low ISA region is always mapped WB in page table. No need to track */ 244 /* Low ISA region is always mapped WB in page table. No need to track */
227 if (start >= ISA_START_ADDRESS && (end - 1) <= ISA_END_ADDRESS) { 245 if (is_ISA_range(start, end - 1)) {
228 if (ret_type) 246 if (new_type)
229 *ret_type = _PAGE_CACHE_WB; 247 *new_type = _PAGE_CACHE_WB;
230
231 return 0; 248 return 0;
232 } 249 }
233 250
234 if (req_type == -1) { 251 if (req_type == -1) {
235 /* 252 /*
236 * Special case where caller wants to inherit from mtrr or 253 * Call mtrr_lookup to get the type hint. This is an
237 * existing pat mapping, defaulting to UC_MINUS in case of 254 * optimization for /dev/mem mmap'ers into WB memory (BIOS
238 * no match. 255 * tools and ACPI tools). Use WB request for WB memory and use
256 * UC_MINUS otherwise.
239 */ 257 */
240 u8 mtrr_type = mtrr_type_lookup(start, end); 258 u8 mtrr_type = mtrr_type_lookup(start, end);
241 if (mtrr_type == 0xFE) { /* MTRR match error */
242 err = -1;
243 }
244 259
245 if (mtrr_type == MTRR_TYPE_WRBACK) { 260 if (mtrr_type == MTRR_TYPE_WRBACK)
246 req_type = _PAGE_CACHE_WB;
247 actual_type = _PAGE_CACHE_WB; 261 actual_type = _PAGE_CACHE_WB;
248 } else { 262 else
249 req_type = _PAGE_CACHE_UC_MINUS;
250 actual_type = _PAGE_CACHE_UC_MINUS; 263 actual_type = _PAGE_CACHE_UC_MINUS;
251 } 264 } else
252 } else { 265 actual_type = pat_x_mtrr_type(start, end,
253 req_type &= _PAGE_CACHE_MASK; 266 req_type & _PAGE_CACHE_MASK);
254 err = pat_x_mtrr_type(start, end, req_type, &actual_type);
255 }
256 267
257 if (err) { 268 new = kmalloc(sizeof(struct memtype), GFP_KERNEL);
258 if (ret_type) 269 if (!new)
259 *ret_type = actual_type;
260
261 return -EINVAL;
262 }
263
264 new_entry = kmalloc(sizeof(struct memtype), GFP_KERNEL);
265 if (!new_entry)
266 return -ENOMEM; 270 return -ENOMEM;
267 271
268 new_entry->start = start; 272 new->start = start;
269 new_entry->end = end; 273 new->end = end;
270 new_entry->type = actual_type; 274 new->type = actual_type;
271 275
272 if (ret_type) 276 if (new_type)
273 *ret_type = actual_type; 277 *new_type = actual_type;
274 278
275 spin_lock(&memtype_lock); 279 spin_lock(&memtype_lock);
276 280
277 /* Search for existing mapping that overlaps the current range */ 281 /* Search for existing mapping that overlaps the current range */
278 list_for_each_entry(parse, &memtype_list, nd) { 282 where = NULL;
279 struct memtype *saved_ptr; 283 list_for_each_entry(entry, &memtype_list, nd) {
280 284 if (end <= entry->start) {
281 if (parse->start >= end) { 285 where = entry->nd.prev;
282 pr_debug("New Entry\n");
283 list_add(&new_entry->nd, parse->nd.prev);
284 new_entry = NULL;
285 break; 286 break;
286 } 287 } else if (start <= entry->start) { /* end > entry->start */
287 288 err = chk_conflict(new, entry, new_type);
288 if (start <= parse->start && end >= parse->start) { 289 if (!err) {
289 if (actual_type != parse->type && ret_type) { 290 dprintk("Overlap at 0x%Lx-0x%Lx\n",
290 actual_type = parse->type; 291 entry->start, entry->end);
291 *ret_type = actual_type; 292 where = entry->nd.prev;
292 new_entry->type = actual_type;
293 }
294
295 if (actual_type != parse->type) {
296 printk(
297 KERN_INFO "%s:%d conflicting memory types %Lx-%Lx %s<->%s\n",
298 current->comm, current->pid,
299 start, end,
300 cattr_name(actual_type),
301 cattr_name(parse->type));
302 err = -EBUSY;
303 break;
304 }
305
306 saved_ptr = parse;
307 /*
308 * Check to see whether the request overlaps more
309 * than one entry in the list
310 */
311 list_for_each_entry_continue(parse, &memtype_list, nd) {
312 if (end <= parse->start) {
313 break;
314 }
315
316 if (actual_type != parse->type) {
317 printk(
318 KERN_INFO "%s:%d conflicting memory types %Lx-%Lx %s<->%s\n",
319 current->comm, current->pid,
320 start, end,
321 cattr_name(actual_type),
322 cattr_name(parse->type));
323 err = -EBUSY;
324 break;
325 }
326 } 293 }
327
328 if (err) {
329 break;
330 }
331
332 pr_debug("Overlap at 0x%Lx-0x%Lx\n",
333 saved_ptr->start, saved_ptr->end);
334 /* No conflict. Go ahead and add this new entry */
335 list_add(&new_entry->nd, saved_ptr->nd.prev);
336 new_entry = NULL;
337 break; 294 break;
338 } 295 } else if (start < entry->end) { /* start > entry->start */
339 296 err = chk_conflict(new, entry, new_type);
340 if (start < parse->end) { 297 if (!err) {
341 if (actual_type != parse->type && ret_type) { 298 dprintk("Overlap at 0x%Lx-0x%Lx\n",
342 actual_type = parse->type; 299 entry->start, entry->end);
343 *ret_type = actual_type; 300 where = &entry->nd;
344 new_entry->type = actual_type;
345 }
346
347 if (actual_type != parse->type) {
348 printk(
349 KERN_INFO "%s:%d conflicting memory types %Lx-%Lx %s<->%s\n",
350 current->comm, current->pid,
351 start, end,
352 cattr_name(actual_type),
353 cattr_name(parse->type));
354 err = -EBUSY;
355 break;
356 } 301 }
357
358 saved_ptr = parse;
359 /*
360 * Check to see whether the request overlaps more
361 * than one entry in the list
362 */
363 list_for_each_entry_continue(parse, &memtype_list, nd) {
364 if (end <= parse->start) {
365 break;
366 }
367
368 if (actual_type != parse->type) {
369 printk(
370 KERN_INFO "%s:%d conflicting memory types %Lx-%Lx %s<->%s\n",
371 current->comm, current->pid,
372 start, end,
373 cattr_name(actual_type),
374 cattr_name(parse->type));
375 err = -EBUSY;
376 break;
377 }
378 }
379
380 if (err) {
381 break;
382 }
383
384 pr_debug(KERN_INFO "Overlap at 0x%Lx-0x%Lx\n",
385 saved_ptr->start, saved_ptr->end);
386 /* No conflict. Go ahead and add this new entry */
387 list_add(&new_entry->nd, &saved_ptr->nd);
388 new_entry = NULL;
389 break; 302 break;
390 } 303 }
391 } 304 }
392 305
393 if (err) { 306 if (err) {
394 printk(KERN_INFO 307 printk(KERN_INFO "reserve_memtype failed 0x%Lx-0x%Lx, "
395 "reserve_memtype failed 0x%Lx-0x%Lx, track %s, req %s\n", 308 "track %s, req %s\n",
396 start, end, cattr_name(new_entry->type), 309 start, end, cattr_name(new->type), cattr_name(req_type));
397 cattr_name(req_type)); 310 kfree(new);
398 kfree(new_entry);
399 spin_unlock(&memtype_lock); 311 spin_unlock(&memtype_lock);
400 return err; 312 return err;
401 } 313 }
402 314
403 if (new_entry) { 315 if (where)
404 /* No conflict. Not yet added to the list. Add to the tail */ 316 list_add(&new->nd, where);
405 list_add_tail(&new_entry->nd, &memtype_list); 317 else
406 pr_debug("New Entry\n"); 318 list_add_tail(&new->nd, &memtype_list);
407 }
408
409 if (ret_type) {
410 pr_debug(
411 "reserve_memtype added 0x%Lx-0x%Lx, track %s, req %s, ret %s\n",
412 start, end, cattr_name(actual_type),
413 cattr_name(req_type), cattr_name(*ret_type));
414 } else {
415 pr_debug(
416 "reserve_memtype added 0x%Lx-0x%Lx, track %s, req %s\n",
417 start, end, cattr_name(actual_type),
418 cattr_name(req_type));
419 }
420 319
421 spin_unlock(&memtype_lock); 320 spin_unlock(&memtype_lock);
321
322 dprintk("reserve_memtype added 0x%Lx-0x%Lx, track %s, req %s, ret %s\n",
323 start, end, cattr_name(new->type), cattr_name(req_type),
324 new_type ? cattr_name(*new_type) : "-");
325
422 return err; 326 return err;
423} 327}
424 328
425int free_memtype(u64 start, u64 end) 329int free_memtype(u64 start, u64 end)
426{ 330{
427 struct memtype *ml; 331 struct memtype *entry;
428 int err = -EINVAL; 332 int err = -EINVAL;
429 333
430 /* Only track when pat_wc_enabled */ 334 if (!pat_enabled)
431 if (!pat_wc_enabled) {
432 return 0; 335 return 0;
433 }
434 336
435 /* Low ISA region is always mapped WB. No need to track */ 337 /* Low ISA region is always mapped WB. No need to track */
436 if (start >= ISA_START_ADDRESS && end <= ISA_END_ADDRESS) { 338 if (is_ISA_range(start, end - 1))
437 return 0; 339 return 0;
438 }
439 340
440 spin_lock(&memtype_lock); 341 spin_lock(&memtype_lock);
441 list_for_each_entry(ml, &memtype_list, nd) { 342 list_for_each_entry(entry, &memtype_list, nd) {
442 if (ml->start == start && ml->end == end) { 343 if (entry->start == start && entry->end == end) {
443 list_del(&ml->nd); 344 list_del(&entry->nd);
444 kfree(ml); 345 kfree(entry);
445 err = 0; 346 err = 0;
446 break; 347 break;
447 } 348 }
@@ -453,7 +354,7 @@ int free_memtype(u64 start, u64 end)
453 current->comm, current->pid, start, end); 354 current->comm, current->pid, start, end);
454 } 355 }
455 356
456 pr_debug("free_memtype request 0x%Lx-0x%Lx\n", start, end); 357 dprintk("free_memtype request 0x%Lx-0x%Lx\n", start, end);
457 return err; 358 return err;
458} 359}
459 360
@@ -522,12 +423,12 @@ int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
522 * caching for the high addresses through the KEN pin, but 423 * caching for the high addresses through the KEN pin, but
523 * we maintain the tradition of paranoia in this code. 424 * we maintain the tradition of paranoia in this code.
524 */ 425 */
525 if (!pat_wc_enabled && 426 if (!pat_enabled &&
526 ! ( test_bit(X86_FEATURE_MTRR, boot_cpu_data.x86_capability) || 427 !(boot_cpu_has(X86_FEATURE_MTRR) ||
527 test_bit(X86_FEATURE_K6_MTRR, boot_cpu_data.x86_capability) || 428 boot_cpu_has(X86_FEATURE_K6_MTRR) ||
528 test_bit(X86_FEATURE_CYRIX_ARR, boot_cpu_data.x86_capability) || 429 boot_cpu_has(X86_FEATURE_CYRIX_ARR) ||
529 test_bit(X86_FEATURE_CENTAUR_MCR, boot_cpu_data.x86_capability)) && 430 boot_cpu_has(X86_FEATURE_CENTAUR_MCR)) &&
530 (pfn << PAGE_SHIFT) >= __pa(high_memory)) { 431 (pfn << PAGE_SHIFT) >= __pa(high_memory)) {
531 flags = _PAGE_CACHE_UC; 432 flags = _PAGE_CACHE_UC;
532 } 433 }
533#endif 434#endif
@@ -549,7 +450,7 @@ int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
549 return 0; 450 return 0;
550 451
551 if (pfn <= max_pfn_mapped && 452 if (pfn <= max_pfn_mapped &&
552 ioremap_change_attr((unsigned long)__va(offset), size, flags) < 0) { 453 ioremap_change_attr((unsigned long)__va(offset), size, flags) < 0) {
553 free_memtype(offset, offset + size); 454 free_memtype(offset, offset + size);
554 printk(KERN_INFO 455 printk(KERN_INFO
555 "%s:%d /dev/mem ioremap_change_attr failed %s for %Lx-%Lx\n", 456 "%s:%d /dev/mem ioremap_change_attr failed %s for %Lx-%Lx\n",
@@ -587,4 +488,3 @@ void unmap_devmem(unsigned long pfn, unsigned long size, pgprot_t vma_prot)
587 488
588 free_memtype(addr, addr + size); 489 free_memtype(addr, addr + size);
589} 490}
590
diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c
index 50159764f694..ee1d6d39edd4 100644
--- a/arch/x86/mm/pgtable.c
+++ b/arch/x86/mm/pgtable.c
@@ -255,7 +255,7 @@ int ptep_test_and_clear_young(struct vm_area_struct *vma,
255 255
256 if (pte_young(*ptep)) 256 if (pte_young(*ptep))
257 ret = test_and_clear_bit(_PAGE_BIT_ACCESSED, 257 ret = test_and_clear_bit(_PAGE_BIT_ACCESSED,
258 &ptep->pte); 258 (unsigned long *) &ptep->pte);
259 259
260 if (ret) 260 if (ret)
261 pte_update(vma->vm_mm, addr, ptep); 261 pte_update(vma->vm_mm, addr, ptep);
diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c
index 3890234e5b26..391d51035871 100644
--- a/arch/x86/mm/srat_64.c
+++ b/arch/x86/mm/srat_64.c
@@ -97,36 +97,9 @@ static __init inline int srat_disabled(void)
97 return numa_off || acpi_numa < 0; 97 return numa_off || acpi_numa < 0;
98} 98}
99 99
100/*
101 * A lot of BIOS fill in 10 (= no distance) everywhere. This messes
102 * up the NUMA heuristics which wants the local node to have a smaller
103 * distance than the others.
104 * Do some quick checks here and only use the SLIT if it passes.
105 */
106static __init int slit_valid(struct acpi_table_slit *slit)
107{
108 int i, j;
109 int d = slit->locality_count;
110 for (i = 0; i < d; i++) {
111 for (j = 0; j < d; j++) {
112 u8 val = slit->entry[d*i + j];
113 if (i == j) {
114 if (val != LOCAL_DISTANCE)
115 return 0;
116 } else if (val <= LOCAL_DISTANCE)
117 return 0;
118 }
119 }
120 return 1;
121}
122
123/* Callback for SLIT parsing */ 100/* Callback for SLIT parsing */
124void __init acpi_numa_slit_init(struct acpi_table_slit *slit) 101void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
125{ 102{
126 if (!slit_valid(slit)) {
127 printk(KERN_INFO "ACPI: SLIT table looks invalid. Not used.\n");
128 return;
129 }
130 acpi_slit = slit; 103 acpi_slit = slit;
131} 104}
132 105
@@ -522,6 +495,7 @@ int __node_distance(int a, int b)
522 495
523EXPORT_SYMBOL(__node_distance); 496EXPORT_SYMBOL(__node_distance);
524 497
498#if defined(CONFIG_MEMORY_HOTPLUG_SPARSE) || defined(CONFIG_ACPI_HOTPLUG_MEMORY)
525int memory_add_physaddr_to_nid(u64 start) 499int memory_add_physaddr_to_nid(u64 start)
526{ 500{
527 int i, ret = 0; 501 int i, ret = 0;
@@ -533,4 +507,4 @@ int memory_add_physaddr_to_nid(u64 start)
533 return ret; 507 return ret;
534} 508}
535EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid); 509EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
536 510#endif
diff --git a/arch/x86/pci/Makefile_32 b/arch/x86/pci/Makefile_32
index 89ec35d00efd..f647e7e56da4 100644
--- a/arch/x86/pci/Makefile_32
+++ b/arch/x86/pci/Makefile_32
@@ -22,3 +22,4 @@ pci-$(CONFIG_X86_NUMAQ) := numa.o irq.o
22pci-$(CONFIG_NUMA) += mp_bus_to_node.o 22pci-$(CONFIG_NUMA) += mp_bus_to_node.o
23 23
24obj-y += $(pci-y) common.o early.o 24obj-y += $(pci-y) common.o early.o
25obj-y += amd_bus.o
diff --git a/arch/x86/pci/Makefile_64 b/arch/x86/pci/Makefile_64
index 8fbd19832cf6..fd47068c95de 100644
--- a/arch/x86/pci/Makefile_64
+++ b/arch/x86/pci/Makefile_64
@@ -13,5 +13,5 @@ obj-y += legacy.o irq.o common.o early.o
13# mmconfig has a 64bit special 13# mmconfig has a 64bit special
14obj-$(CONFIG_PCI_MMCONFIG) += mmconfig_64.o direct.o mmconfig-shared.o 14obj-$(CONFIG_PCI_MMCONFIG) += mmconfig_64.o direct.o mmconfig-shared.o
15 15
16obj-y += k8-bus_64.o 16obj-y += amd_bus.o
17 17
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
index d95de2f199cd..464279da49c4 100644
--- a/arch/x86/pci/acpi.c
+++ b/arch/x86/pci/acpi.c
@@ -218,7 +218,6 @@ struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_device *device, int do
218 return bus; 218 return bus;
219} 219}
220 220
221extern int pci_routeirq;
222static int __init pci_acpi_init(void) 221static int __init pci_acpi_init(void)
223{ 222{
224 struct pci_dev *dev = NULL; 223 struct pci_dev *dev = NULL;
diff --git a/arch/x86/pci/k8-bus_64.c b/arch/x86/pci/amd_bus.c
index 5c2799c20e47..15f505d3a78e 100644
--- a/arch/x86/pci/k8-bus_64.c
+++ b/arch/x86/pci/amd_bus.c
@@ -1,5 +1,9 @@
1#include <linux/init.h> 1#include <linux/init.h>
2#include <linux/pci.h> 2#include <linux/pci.h>
3#include "pci.h"
4
5#ifdef CONFIG_X86_64
6
3#include <asm/pci-direct.h> 7#include <asm/pci-direct.h>
4#include <asm/mpspec.h> 8#include <asm/mpspec.h>
5#include <linux/cpumask.h> 9#include <linux/cpumask.h>
@@ -526,3 +530,31 @@ static int __init early_fill_mp_bus_info(void)
526} 530}
527 531
528postcore_initcall(early_fill_mp_bus_info); 532postcore_initcall(early_fill_mp_bus_info);
533
534#endif
535
536/* common 32/64 bit code */
537
538#define ENABLE_CF8_EXT_CFG (1ULL << 46)
539
540static void enable_pci_io_ecs_per_cpu(void *unused)
541{
542 u64 reg;
543 rdmsrl(MSR_AMD64_NB_CFG, reg);
544 if (!(reg & ENABLE_CF8_EXT_CFG)) {
545 reg |= ENABLE_CF8_EXT_CFG;
546 wrmsrl(MSR_AMD64_NB_CFG, reg);
547 }
548}
549
550static int __init enable_pci_io_ecs(void)
551{
552 /* assume all cpus from fam10h have IO ECS */
553 if (boot_cpu_data.x86 < 0x10)
554 return 0;
555 on_each_cpu(enable_pci_io_ecs_per_cpu, NULL, 1, 1);
556 pci_probe |= PCI_HAS_IO_ECS;
557 return 0;
558}
559
560postcore_initcall(enable_pci_io_ecs);
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
index 8545c8a9d107..940185ecaeda 100644
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
@@ -302,18 +302,18 @@ static struct dmi_system_id __devinitdata pciprobe_dmi_table[] = {
302 }, 302 },
303 { 303 {
304 .callback = set_bf_sort, 304 .callback = set_bf_sort,
305 .ident = "HP ProLiant DL385 G2", 305 .ident = "HP ProLiant DL360",
306 .matches = { 306 .matches = {
307 DMI_MATCH(DMI_SYS_VENDOR, "HP"), 307 DMI_MATCH(DMI_SYS_VENDOR, "HP"),
308 DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL385 G2"), 308 DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL360"),
309 }, 309 },
310 }, 310 },
311 { 311 {
312 .callback = set_bf_sort, 312 .callback = set_bf_sort,
313 .ident = "HP ProLiant DL585 G2", 313 .ident = "HP ProLiant DL380",
314 .matches = { 314 .matches = {
315 DMI_MATCH(DMI_SYS_VENDOR, "HP"), 315 DMI_MATCH(DMI_SYS_VENDOR, "HP"),
316 DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL585 G2"), 316 DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL380"),
317 }, 317 },
318 }, 318 },
319#ifdef __i386__ 319#ifdef __i386__
@@ -328,18 +328,18 @@ static struct dmi_system_id __devinitdata pciprobe_dmi_table[] = {
328#endif 328#endif
329 { 329 {
330 .callback = set_bf_sort, 330 .callback = set_bf_sort,
331 .ident = "HP ProLiant DL385 G2", 331 .ident = "HP ProLiant DL360",
332 .matches = { 332 .matches = {
333 DMI_MATCH(DMI_SYS_VENDOR, "HP"), 333 DMI_MATCH(DMI_SYS_VENDOR, "HP"),
334 DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL385 G2"), 334 DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL360"),
335 }, 335 },
336 }, 336 },
337 { 337 {
338 .callback = set_bf_sort, 338 .callback = set_bf_sort,
339 .ident = "HP ProLiant DL585 G2", 339 .ident = "HP ProLiant DL380",
340 .matches = { 340 .matches = {
341 DMI_MATCH(DMI_SYS_VENDOR, "HP"), 341 DMI_MATCH(DMI_SYS_VENDOR, "HP"),
342 DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL585 G2"), 342 DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL380"),
343 }, 343 },
344 }, 344 },
345 {} 345 {}
diff --git a/arch/x86/pci/direct.c b/arch/x86/pci/direct.c
index 21d1e0e0d535..9915293500fb 100644
--- a/arch/x86/pci/direct.c
+++ b/arch/x86/pci/direct.c
@@ -8,18 +8,21 @@
8#include "pci.h" 8#include "pci.h"
9 9
10/* 10/*
11 * Functions for accessing PCI configuration space with type 1 accesses 11 * Functions for accessing PCI base (first 256 bytes) and extended
12 * (4096 bytes per PCI function) configuration space with type 1
13 * accesses.
12 */ 14 */
13 15
14#define PCI_CONF1_ADDRESS(bus, devfn, reg) \ 16#define PCI_CONF1_ADDRESS(bus, devfn, reg) \
15 (0x80000000 | (bus << 16) | (devfn << 8) | (reg & ~3)) 17 (0x80000000 | ((reg & 0xF00) << 16) | (bus << 16) \
18 | (devfn << 8) | (reg & 0xFC))
16 19
17static int pci_conf1_read(unsigned int seg, unsigned int bus, 20static int pci_conf1_read(unsigned int seg, unsigned int bus,
18 unsigned int devfn, int reg, int len, u32 *value) 21 unsigned int devfn, int reg, int len, u32 *value)
19{ 22{
20 unsigned long flags; 23 unsigned long flags;
21 24
22 if ((bus > 255) || (devfn > 255) || (reg > 255)) { 25 if ((bus > 255) || (devfn > 255) || (reg > 4095)) {
23 *value = -1; 26 *value = -1;
24 return -EINVAL; 27 return -EINVAL;
25 } 28 }
@@ -50,7 +53,7 @@ static int pci_conf1_write(unsigned int seg, unsigned int bus,
50{ 53{
51 unsigned long flags; 54 unsigned long flags;
52 55
53 if ((bus > 255) || (devfn > 255) || (reg > 255)) 56 if ((bus > 255) || (devfn > 255) || (reg > 4095))
54 return -EINVAL; 57 return -EINVAL;
55 58
56 spin_lock_irqsave(&pci_config_lock, flags); 59 spin_lock_irqsave(&pci_config_lock, flags);
@@ -260,10 +263,18 @@ void __init pci_direct_init(int type)
260 return; 263 return;
261 printk(KERN_INFO "PCI: Using configuration type %d for base access\n", 264 printk(KERN_INFO "PCI: Using configuration type %d for base access\n",
262 type); 265 type);
263 if (type == 1) 266 if (type == 1) {
264 raw_pci_ops = &pci_direct_conf1; 267 raw_pci_ops = &pci_direct_conf1;
265 else 268 if (raw_pci_ext_ops)
266 raw_pci_ops = &pci_direct_conf2; 269 return;
270 if (!(pci_probe & PCI_HAS_IO_ECS))
271 return;
272 printk(KERN_INFO "PCI: Using configuration type 1 "
273 "for extended access\n");
274 raw_pci_ext_ops = &pci_direct_conf1;
275 return;
276 }
277 raw_pci_ops = &pci_direct_conf2;
267} 278}
268 279
269int __init pci_direct_probe(void) 280int __init pci_direct_probe(void)
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
index 10fb308fded8..6ccd7a108cd4 100644
--- a/arch/x86/pci/i386.c
+++ b/arch/x86/pci/i386.c
@@ -299,9 +299,9 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
299 return -EINVAL; 299 return -EINVAL;
300 300
301 prot = pgprot_val(vma->vm_page_prot); 301 prot = pgprot_val(vma->vm_page_prot);
302 if (pat_wc_enabled && write_combine) 302 if (pat_enabled && write_combine)
303 prot |= _PAGE_CACHE_WC; 303 prot |= _PAGE_CACHE_WC;
304 else if (pat_wc_enabled || boot_cpu_data.x86 > 3) 304 else if (pat_enabled || boot_cpu_data.x86 > 3)
305 /* 305 /*
306 * ioremap() and ioremap_nocache() defaults to UC MINUS for now. 306 * ioremap() and ioremap_nocache() defaults to UC MINUS for now.
307 * To avoid attribute conflicts, request UC MINUS here 307 * To avoid attribute conflicts, request UC MINUS here
diff --git a/arch/x86/pci/init.c b/arch/x86/pci/init.c
index e70b9c57b88e..b821f4462d99 100644
--- a/arch/x86/pci/init.c
+++ b/arch/x86/pci/init.c
@@ -15,7 +15,8 @@ static __init int pci_access_init(void)
15 pci_mmcfg_early_init(); 15 pci_mmcfg_early_init();
16 16
17#ifdef CONFIG_PCI_OLPC 17#ifdef CONFIG_PCI_OLPC
18 pci_olpc_init(); 18 if (!pci_olpc_init())
19 return 0; /* skip additional checks if it's an XO */
19#endif 20#endif
20#ifdef CONFIG_PCI_BIOS 21#ifdef CONFIG_PCI_BIOS
21 pci_pcbios_init(); 22 pci_pcbios_init();
diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c
index 0908fca901bf..f0859de23e20 100644
--- a/arch/x86/pci/irq.c
+++ b/arch/x86/pci/irq.c
@@ -11,8 +11,8 @@
11#include <linux/slab.h> 11#include <linux/slab.h>
12#include <linux/interrupt.h> 12#include <linux/interrupt.h>
13#include <linux/dmi.h> 13#include <linux/dmi.h>
14#include <asm/io.h> 14#include <linux/io.h>
15#include <asm/smp.h> 15#include <linux/smp.h>
16#include <asm/io_apic.h> 16#include <asm/io_apic.h>
17#include <linux/irq.h> 17#include <linux/irq.h>
18#include <linux/acpi.h> 18#include <linux/acpi.h>
@@ -61,7 +61,7 @@ void (*pcibios_disable_irq)(struct pci_dev *dev) = NULL;
61 * and perform checksum verification. 61 * and perform checksum verification.
62 */ 62 */
63 63
64static inline struct irq_routing_table * pirq_check_routing_table(u8 *addr) 64static inline struct irq_routing_table *pirq_check_routing_table(u8 *addr)
65{ 65{
66 struct irq_routing_table *rt; 66 struct irq_routing_table *rt;
67 int i; 67 int i;
@@ -74,7 +74,7 @@ static inline struct irq_routing_table * pirq_check_routing_table(u8 *addr)
74 rt->size < sizeof(struct irq_routing_table)) 74 rt->size < sizeof(struct irq_routing_table))
75 return NULL; 75 return NULL;
76 sum = 0; 76 sum = 0;
77 for (i=0; i < rt->size; i++) 77 for (i = 0; i < rt->size; i++)
78 sum += addr[i]; 78 sum += addr[i];
79 if (!sum) { 79 if (!sum) {
80 DBG(KERN_DEBUG "PCI: Interrupt Routing Table found at 0x%p\n", rt); 80 DBG(KERN_DEBUG "PCI: Interrupt Routing Table found at 0x%p\n", rt);
@@ -100,7 +100,7 @@ static struct irq_routing_table * __init pirq_find_routing_table(void)
100 return rt; 100 return rt;
101 printk(KERN_WARNING "PCI: PIRQ table NOT found at pirqaddr\n"); 101 printk(KERN_WARNING "PCI: PIRQ table NOT found at pirqaddr\n");
102 } 102 }
103 for(addr = (u8 *) __va(0xf0000); addr < (u8 *) __va(0x100000); addr += 16) { 103 for (addr = (u8 *) __va(0xf0000); addr < (u8 *) __va(0x100000); addr += 16) {
104 rt = pirq_check_routing_table(addr); 104 rt = pirq_check_routing_table(addr);
105 if (rt) 105 if (rt)
106 return rt; 106 return rt;
@@ -122,20 +122,20 @@ static void __init pirq_peer_trick(void)
122 struct irq_info *e; 122 struct irq_info *e;
123 123
124 memset(busmap, 0, sizeof(busmap)); 124 memset(busmap, 0, sizeof(busmap));
125 for(i=0; i < (rt->size - sizeof(struct irq_routing_table)) / sizeof(struct irq_info); i++) { 125 for (i = 0; i < (rt->size - sizeof(struct irq_routing_table)) / sizeof(struct irq_info); i++) {
126 e = &rt->slots[i]; 126 e = &rt->slots[i];
127#ifdef DEBUG 127#ifdef DEBUG
128 { 128 {
129 int j; 129 int j;
130 DBG(KERN_DEBUG "%02x:%02x slot=%02x", e->bus, e->devfn/8, e->slot); 130 DBG(KERN_DEBUG "%02x:%02x slot=%02x", e->bus, e->devfn/8, e->slot);
131 for(j=0; j<4; j++) 131 for (j = 0; j < 4; j++)
132 DBG(" %d:%02x/%04x", j, e->irq[j].link, e->irq[j].bitmap); 132 DBG(" %d:%02x/%04x", j, e->irq[j].link, e->irq[j].bitmap);
133 DBG("\n"); 133 DBG("\n");
134 } 134 }
135#endif 135#endif
136 busmap[e->bus] = 1; 136 busmap[e->bus] = 1;
137 } 137 }
138 for(i = 1; i < 256; i++) { 138 for (i = 1; i < 256; i++) {
139 int node; 139 int node;
140 if (!busmap[i] || pci_find_bus(0, i)) 140 if (!busmap[i] || pci_find_bus(0, i))
141 continue; 141 continue;
@@ -285,7 +285,7 @@ static int pirq_ite_get(struct pci_dev *router, struct pci_dev *dev, int pirq)
285 static const unsigned char pirqmap[4] = { 1, 0, 2, 3 }; 285 static const unsigned char pirqmap[4] = { 1, 0, 2, 3 };
286 286
287 WARN_ON_ONCE(pirq > 4); 287 WARN_ON_ONCE(pirq > 4);
288 return read_config_nybble(router,0x43, pirqmap[pirq-1]); 288 return read_config_nybble(router, 0x43, pirqmap[pirq-1]);
289} 289}
290 290
291static int pirq_ite_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) 291static int pirq_ite_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq)
@@ -314,7 +314,7 @@ static int pirq_opti_set(struct pci_dev *router, struct pci_dev *dev, int pirq,
314 314
315/* 315/*
316 * Cyrix: nibble offset 0x5C 316 * Cyrix: nibble offset 0x5C
317 * 0x5C bits 7:4 is INTB bits 3:0 is INTA 317 * 0x5C bits 7:4 is INTB bits 3:0 is INTA
318 * 0x5D bits 7:4 is INTD bits 3:0 is INTC 318 * 0x5D bits 7:4 is INTD bits 3:0 is INTC
319 */ 319 */
320static int pirq_cyrix_get(struct pci_dev *router, struct pci_dev *dev, int pirq) 320static int pirq_cyrix_get(struct pci_dev *router, struct pci_dev *dev, int pirq)
@@ -350,7 +350,7 @@ static int pirq_cyrix_set(struct pci_dev *router, struct pci_dev *dev, int pirq,
350 * Apparently there are systems implementing PCI routing table using 350 * Apparently there are systems implementing PCI routing table using
351 * link values 0x01-0x04 and others using 0x41-0x44 for PCI INTA..D. 351 * link values 0x01-0x04 and others using 0x41-0x44 for PCI INTA..D.
352 * We try our best to handle both link mappings. 352 * We try our best to handle both link mappings.
353 * 353 *
354 * Currently (2003-05-21) it appears most SiS chipsets follow the 354 * Currently (2003-05-21) it appears most SiS chipsets follow the
355 * definition of routing registers from the SiS-5595 southbridge. 355 * definition of routing registers from the SiS-5595 southbridge.
356 * According to the SiS 5595 datasheets the revision id's of the 356 * According to the SiS 5595 datasheets the revision id's of the
@@ -370,7 +370,7 @@ static int pirq_cyrix_set(struct pci_dev *router, struct pci_dev *dev, int pirq,
370 * 370 *
371 * 0x62: USBIRQ: 371 * 0x62: USBIRQ:
372 * bit 6 OHCI function disabled (0), enabled (1) 372 * bit 6 OHCI function disabled (0), enabled (1)
373 * 373 *
374 * 0x6a: ACPI/SCI IRQ: bits 4-6 reserved 374 * 0x6a: ACPI/SCI IRQ: bits 4-6 reserved
375 * 375 *
376 * 0x7e: Data Acq. Module IRQ - bits 4-6 reserved 376 * 0x7e: Data Acq. Module IRQ - bits 4-6 reserved
@@ -487,9 +487,7 @@ static int pirq_amd756_get(struct pci_dev *router, struct pci_dev *dev, int pirq
487 u8 irq; 487 u8 irq;
488 irq = 0; 488 irq = 0;
489 if (pirq <= 4) 489 if (pirq <= 4)
490 {
491 irq = read_config_nybble(router, 0x56, pirq - 1); 490 irq = read_config_nybble(router, 0x56, pirq - 1);
492 }
493 printk(KERN_INFO "AMD756: dev %04x:%04x, router pirq : %d get irq : %2d\n", 491 printk(KERN_INFO "AMD756: dev %04x:%04x, router pirq : %d get irq : %2d\n",
494 dev->vendor, dev->device, pirq, irq); 492 dev->vendor, dev->device, pirq, irq);
495 return irq; 493 return irq;
@@ -497,12 +495,10 @@ static int pirq_amd756_get(struct pci_dev *router, struct pci_dev *dev, int pirq
497 495
498static int pirq_amd756_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) 496static int pirq_amd756_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq)
499{ 497{
500 printk(KERN_INFO "AMD756: dev %04x:%04x, router pirq : %d SET irq : %2d\n", 498 printk(KERN_INFO "AMD756: dev %04x:%04x, router pirq : %d SET irq : %2d\n",
501 dev->vendor, dev->device, pirq, irq); 499 dev->vendor, dev->device, pirq, irq);
502 if (pirq <= 4) 500 if (pirq <= 4)
503 {
504 write_config_nybble(router, 0x56, pirq - 1, irq); 501 write_config_nybble(router, 0x56, pirq - 1, irq);
505 }
506 return 1; 502 return 1;
507} 503}
508 504
@@ -549,50 +545,49 @@ static __init int intel_router_probe(struct irq_router *r, struct pci_dev *route
549 if (pci_dev_present(pirq_440gx)) 545 if (pci_dev_present(pirq_440gx))
550 return 0; 546 return 0;
551 547
552 switch(device) 548 switch (device) {
553 { 549 case PCI_DEVICE_ID_INTEL_82371FB_0:
554 case PCI_DEVICE_ID_INTEL_82371FB_0: 550 case PCI_DEVICE_ID_INTEL_82371SB_0:
555 case PCI_DEVICE_ID_INTEL_82371SB_0: 551 case PCI_DEVICE_ID_INTEL_82371AB_0:
556 case PCI_DEVICE_ID_INTEL_82371AB_0: 552 case PCI_DEVICE_ID_INTEL_82371MX:
557 case PCI_DEVICE_ID_INTEL_82371MX: 553 case PCI_DEVICE_ID_INTEL_82443MX_0:
558 case PCI_DEVICE_ID_INTEL_82443MX_0: 554 case PCI_DEVICE_ID_INTEL_82801AA_0:
559 case PCI_DEVICE_ID_INTEL_82801AA_0: 555 case PCI_DEVICE_ID_INTEL_82801AB_0:
560 case PCI_DEVICE_ID_INTEL_82801AB_0: 556 case PCI_DEVICE_ID_INTEL_82801BA_0:
561 case PCI_DEVICE_ID_INTEL_82801BA_0: 557 case PCI_DEVICE_ID_INTEL_82801BA_10:
562 case PCI_DEVICE_ID_INTEL_82801BA_10: 558 case PCI_DEVICE_ID_INTEL_82801CA_0:
563 case PCI_DEVICE_ID_INTEL_82801CA_0: 559 case PCI_DEVICE_ID_INTEL_82801CA_12:
564 case PCI_DEVICE_ID_INTEL_82801CA_12: 560 case PCI_DEVICE_ID_INTEL_82801DB_0:
565 case PCI_DEVICE_ID_INTEL_82801DB_0: 561 case PCI_DEVICE_ID_INTEL_82801E_0:
566 case PCI_DEVICE_ID_INTEL_82801E_0: 562 case PCI_DEVICE_ID_INTEL_82801EB_0:
567 case PCI_DEVICE_ID_INTEL_82801EB_0: 563 case PCI_DEVICE_ID_INTEL_ESB_1:
568 case PCI_DEVICE_ID_INTEL_ESB_1: 564 case PCI_DEVICE_ID_INTEL_ICH6_0:
569 case PCI_DEVICE_ID_INTEL_ICH6_0: 565 case PCI_DEVICE_ID_INTEL_ICH6_1:
570 case PCI_DEVICE_ID_INTEL_ICH6_1: 566 case PCI_DEVICE_ID_INTEL_ICH7_0:
571 case PCI_DEVICE_ID_INTEL_ICH7_0: 567 case PCI_DEVICE_ID_INTEL_ICH7_1:
572 case PCI_DEVICE_ID_INTEL_ICH7_1: 568 case PCI_DEVICE_ID_INTEL_ICH7_30:
573 case PCI_DEVICE_ID_INTEL_ICH7_30: 569 case PCI_DEVICE_ID_INTEL_ICH7_31:
574 case PCI_DEVICE_ID_INTEL_ICH7_31: 570 case PCI_DEVICE_ID_INTEL_ESB2_0:
575 case PCI_DEVICE_ID_INTEL_ESB2_0: 571 case PCI_DEVICE_ID_INTEL_ICH8_0:
576 case PCI_DEVICE_ID_INTEL_ICH8_0: 572 case PCI_DEVICE_ID_INTEL_ICH8_1:
577 case PCI_DEVICE_ID_INTEL_ICH8_1: 573 case PCI_DEVICE_ID_INTEL_ICH8_2:
578 case PCI_DEVICE_ID_INTEL_ICH8_2: 574 case PCI_DEVICE_ID_INTEL_ICH8_3:
579 case PCI_DEVICE_ID_INTEL_ICH8_3: 575 case PCI_DEVICE_ID_INTEL_ICH8_4:
580 case PCI_DEVICE_ID_INTEL_ICH8_4: 576 case PCI_DEVICE_ID_INTEL_ICH9_0:
581 case PCI_DEVICE_ID_INTEL_ICH9_0: 577 case PCI_DEVICE_ID_INTEL_ICH9_1:
582 case PCI_DEVICE_ID_INTEL_ICH9_1: 578 case PCI_DEVICE_ID_INTEL_ICH9_2:
583 case PCI_DEVICE_ID_INTEL_ICH9_2: 579 case PCI_DEVICE_ID_INTEL_ICH9_3:
584 case PCI_DEVICE_ID_INTEL_ICH9_3: 580 case PCI_DEVICE_ID_INTEL_ICH9_4:
585 case PCI_DEVICE_ID_INTEL_ICH9_4: 581 case PCI_DEVICE_ID_INTEL_ICH9_5:
586 case PCI_DEVICE_ID_INTEL_ICH9_5: 582 case PCI_DEVICE_ID_INTEL_TOLAPAI_0:
587 case PCI_DEVICE_ID_INTEL_TOLAPAI_0: 583 case PCI_DEVICE_ID_INTEL_ICH10_0:
588 case PCI_DEVICE_ID_INTEL_ICH10_0: 584 case PCI_DEVICE_ID_INTEL_ICH10_1:
589 case PCI_DEVICE_ID_INTEL_ICH10_1: 585 case PCI_DEVICE_ID_INTEL_ICH10_2:
590 case PCI_DEVICE_ID_INTEL_ICH10_2: 586 case PCI_DEVICE_ID_INTEL_ICH10_3:
591 case PCI_DEVICE_ID_INTEL_ICH10_3: 587 r->name = "PIIX/ICH";
592 r->name = "PIIX/ICH"; 588 r->get = pirq_piix_get;
593 r->get = pirq_piix_get; 589 r->set = pirq_piix_set;
594 r->set = pirq_piix_set; 590 return 1;
595 return 1;
596 } 591 }
597 return 0; 592 return 0;
598} 593}
@@ -606,7 +601,7 @@ static __init int via_router_probe(struct irq_router *r,
606 * workarounds for some buggy BIOSes 601 * workarounds for some buggy BIOSes
607 */ 602 */
608 if (device == PCI_DEVICE_ID_VIA_82C586_0) { 603 if (device == PCI_DEVICE_ID_VIA_82C586_0) {
609 switch(router->device) { 604 switch (router->device) {
610 case PCI_DEVICE_ID_VIA_82C686: 605 case PCI_DEVICE_ID_VIA_82C686:
611 /* 606 /*
612 * Asus k7m bios wrongly reports 82C686A 607 * Asus k7m bios wrongly reports 82C686A
@@ -621,10 +616,17 @@ static __init int via_router_probe(struct irq_router *r,
621 */ 616 */
622 device = PCI_DEVICE_ID_VIA_8235; 617 device = PCI_DEVICE_ID_VIA_8235;
623 break; 618 break;
619 case PCI_DEVICE_ID_VIA_8237:
620 /**
621 * Asus a7v600 bios wrongly reports 8237
622 * as 586-compatible
623 */
624 device = PCI_DEVICE_ID_VIA_8237;
625 break;
624 } 626 }
625 } 627 }
626 628
627 switch(device) { 629 switch (device) {
628 case PCI_DEVICE_ID_VIA_82C586_0: 630 case PCI_DEVICE_ID_VIA_82C586_0:
629 r->name = "VIA"; 631 r->name = "VIA";
630 r->get = pirq_via586_get; 632 r->get = pirq_via586_get;
@@ -647,13 +649,12 @@ static __init int via_router_probe(struct irq_router *r,
647 649
648static __init int vlsi_router_probe(struct irq_router *r, struct pci_dev *router, u16 device) 650static __init int vlsi_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
649{ 651{
650 switch(device) 652 switch (device) {
651 { 653 case PCI_DEVICE_ID_VLSI_82C534:
652 case PCI_DEVICE_ID_VLSI_82C534: 654 r->name = "VLSI 82C534";
653 r->name = "VLSI 82C534"; 655 r->get = pirq_vlsi_get;
654 r->get = pirq_vlsi_get; 656 r->set = pirq_vlsi_set;
655 r->set = pirq_vlsi_set; 657 return 1;
656 return 1;
657 } 658 }
658 return 0; 659 return 0;
659} 660}
@@ -661,14 +662,13 @@ static __init int vlsi_router_probe(struct irq_router *r, struct pci_dev *router
661 662
662static __init int serverworks_router_probe(struct irq_router *r, struct pci_dev *router, u16 device) 663static __init int serverworks_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
663{ 664{
664 switch(device) 665 switch (device) {
665 { 666 case PCI_DEVICE_ID_SERVERWORKS_OSB4:
666 case PCI_DEVICE_ID_SERVERWORKS_OSB4: 667 case PCI_DEVICE_ID_SERVERWORKS_CSB5:
667 case PCI_DEVICE_ID_SERVERWORKS_CSB5: 668 r->name = "ServerWorks";
668 r->name = "ServerWorks"; 669 r->get = pirq_serverworks_get;
669 r->get = pirq_serverworks_get; 670 r->set = pirq_serverworks_set;
670 r->set = pirq_serverworks_set; 671 return 1;
671 return 1;
672 } 672 }
673 return 0; 673 return 0;
674} 674}
@@ -677,7 +677,7 @@ static __init int sis_router_probe(struct irq_router *r, struct pci_dev *router,
677{ 677{
678 if (device != PCI_DEVICE_ID_SI_503) 678 if (device != PCI_DEVICE_ID_SI_503)
679 return 0; 679 return 0;
680 680
681 r->name = "SIS"; 681 r->name = "SIS";
682 r->get = pirq_sis_get; 682 r->get = pirq_sis_get;
683 r->set = pirq_sis_set; 683 r->set = pirq_sis_set;
@@ -686,47 +686,43 @@ static __init int sis_router_probe(struct irq_router *r, struct pci_dev *router,
686 686
687static __init int cyrix_router_probe(struct irq_router *r, struct pci_dev *router, u16 device) 687static __init int cyrix_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
688{ 688{
689 switch(device) 689 switch (device) {
690 { 690 case PCI_DEVICE_ID_CYRIX_5520:
691 case PCI_DEVICE_ID_CYRIX_5520: 691 r->name = "NatSemi";
692 r->name = "NatSemi"; 692 r->get = pirq_cyrix_get;
693 r->get = pirq_cyrix_get; 693 r->set = pirq_cyrix_set;
694 r->set = pirq_cyrix_set; 694 return 1;
695 return 1;
696 } 695 }
697 return 0; 696 return 0;
698} 697}
699 698
700static __init int opti_router_probe(struct irq_router *r, struct pci_dev *router, u16 device) 699static __init int opti_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
701{ 700{
702 switch(device) 701 switch (device) {
703 { 702 case PCI_DEVICE_ID_OPTI_82C700:
704 case PCI_DEVICE_ID_OPTI_82C700: 703 r->name = "OPTI";
705 r->name = "OPTI"; 704 r->get = pirq_opti_get;
706 r->get = pirq_opti_get; 705 r->set = pirq_opti_set;
707 r->set = pirq_opti_set; 706 return 1;
708 return 1;
709 } 707 }
710 return 0; 708 return 0;
711} 709}
712 710
713static __init int ite_router_probe(struct irq_router *r, struct pci_dev *router, u16 device) 711static __init int ite_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
714{ 712{
715 switch(device) 713 switch (device) {
716 { 714 case PCI_DEVICE_ID_ITE_IT8330G_0:
717 case PCI_DEVICE_ID_ITE_IT8330G_0: 715 r->name = "ITE";
718 r->name = "ITE"; 716 r->get = pirq_ite_get;
719 r->get = pirq_ite_get; 717 r->set = pirq_ite_set;
720 r->set = pirq_ite_set; 718 return 1;
721 return 1;
722 } 719 }
723 return 0; 720 return 0;
724} 721}
725 722
726static __init int ali_router_probe(struct irq_router *r, struct pci_dev *router, u16 device) 723static __init int ali_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
727{ 724{
728 switch(device) 725 switch (device) {
729 {
730 case PCI_DEVICE_ID_AL_M1533: 726 case PCI_DEVICE_ID_AL_M1533:
731 case PCI_DEVICE_ID_AL_M1563: 727 case PCI_DEVICE_ID_AL_M1563:
732 printk(KERN_DEBUG "PCI: Using ALI IRQ Router\n"); 728 printk(KERN_DEBUG "PCI: Using ALI IRQ Router\n");
@@ -740,25 +736,24 @@ static __init int ali_router_probe(struct irq_router *r, struct pci_dev *router,
740 736
741static __init int amd_router_probe(struct irq_router *r, struct pci_dev *router, u16 device) 737static __init int amd_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
742{ 738{
743 switch(device) 739 switch (device) {
744 { 740 case PCI_DEVICE_ID_AMD_VIPER_740B:
745 case PCI_DEVICE_ID_AMD_VIPER_740B: 741 r->name = "AMD756";
746 r->name = "AMD756"; 742 break;
747 break; 743 case PCI_DEVICE_ID_AMD_VIPER_7413:
748 case PCI_DEVICE_ID_AMD_VIPER_7413: 744 r->name = "AMD766";
749 r->name = "AMD766"; 745 break;
750 break; 746 case PCI_DEVICE_ID_AMD_VIPER_7443:
751 case PCI_DEVICE_ID_AMD_VIPER_7443: 747 r->name = "AMD768";
752 r->name = "AMD768"; 748 break;
753 break; 749 default:
754 default: 750 return 0;
755 return 0;
756 } 751 }
757 r->get = pirq_amd756_get; 752 r->get = pirq_amd756_get;
758 r->set = pirq_amd756_set; 753 r->set = pirq_amd756_set;
759 return 1; 754 return 1;
760} 755}
761 756
762static __init int pico_router_probe(struct irq_router *r, struct pci_dev *router, u16 device) 757static __init int pico_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
763{ 758{
764 switch (device) { 759 switch (device) {
@@ -800,7 +795,7 @@ static struct pci_dev *pirq_router_dev;
800 * FIXME: should we have an option to say "generic for 795 * FIXME: should we have an option to say "generic for
801 * chipset" ? 796 * chipset" ?
802 */ 797 */
803 798
804static void __init pirq_find_router(struct irq_router *r) 799static void __init pirq_find_router(struct irq_router *r)
805{ 800{
806 struct irq_routing_table *rt = pirq_table; 801 struct irq_routing_table *rt = pirq_table;
@@ -819,7 +814,7 @@ static void __init pirq_find_router(struct irq_router *r)
819 r->name = "default"; 814 r->name = "default";
820 r->get = NULL; 815 r->get = NULL;
821 r->set = NULL; 816 r->set = NULL;
822 817
823 DBG(KERN_DEBUG "PCI: Attempting to find IRQ router for %04x:%04x\n", 818 DBG(KERN_DEBUG "PCI: Attempting to find IRQ router for %04x:%04x\n",
824 rt->rtr_vendor, rt->rtr_device); 819 rt->rtr_vendor, rt->rtr_device);
825 820
@@ -830,7 +825,7 @@ static void __init pirq_find_router(struct irq_router *r)
830 return; 825 return;
831 } 826 }
832 827
833 for( h = pirq_routers; h->vendor; h++) { 828 for (h = pirq_routers; h->vendor; h++) {
834 /* First look for a router match */ 829 /* First look for a router match */
835 if (rt->rtr_vendor == h->vendor && h->probe(r, pirq_router_dev, rt->rtr_device)) 830 if (rt->rtr_vendor == h->vendor && h->probe(r, pirq_router_dev, rt->rtr_device))
836 break; 831 break;
@@ -882,7 +877,7 @@ static int pcibios_lookup_irq(struct pci_dev *dev, int assign)
882 877
883 if (!pirq_table) 878 if (!pirq_table)
884 return 0; 879 return 0;
885 880
886 DBG(KERN_DEBUG "IRQ for %s[%c]", pci_name(dev), 'A' + pin); 881 DBG(KERN_DEBUG "IRQ for %s[%c]", pci_name(dev), 'A' + pin);
887 info = pirq_get_info(dev); 882 info = pirq_get_info(dev);
888 if (!info) { 883 if (!info) {
@@ -921,8 +916,10 @@ static int pcibios_lookup_irq(struct pci_dev *dev, int assign)
921 */ 916 */
922 newirq = dev->irq; 917 newirq = dev->irq;
923 if (newirq && !((1 << newirq) & mask)) { 918 if (newirq && !((1 << newirq) & mask)) {
924 if ( pci_probe & PCI_USE_PIRQ_MASK) newirq = 0; 919 if (pci_probe & PCI_USE_PIRQ_MASK)
925 else printk("\n" KERN_WARNING 920 newirq = 0;
921 else
922 printk("\n" KERN_WARNING
926 "PCI: IRQ %i for device %s doesn't match PIRQ mask " 923 "PCI: IRQ %i for device %s doesn't match PIRQ mask "
927 "- try pci=usepirqmask\n" KERN_DEBUG, newirq, 924 "- try pci=usepirqmask\n" KERN_DEBUG, newirq,
928 pci_name(dev)); 925 pci_name(dev));
@@ -942,8 +939,8 @@ static int pcibios_lookup_irq(struct pci_dev *dev, int assign)
942 irq = pirq & 0xf; 939 irq = pirq & 0xf;
943 DBG(" -> hardcoded IRQ %d\n", irq); 940 DBG(" -> hardcoded IRQ %d\n", irq);
944 msg = "Hardcoded"; 941 msg = "Hardcoded";
945 } else if ( r->get && (irq = r->get(pirq_router_dev, dev, pirq)) && \ 942 } else if (r->get && (irq = r->get(pirq_router_dev, dev, pirq)) && \
946 ((!(pci_probe & PCI_USE_PIRQ_MASK)) || ((1 << irq) & mask)) ) { 943 ((!(pci_probe & PCI_USE_PIRQ_MASK)) || ((1 << irq) & mask))) {
947 DBG(" -> got IRQ %d\n", irq); 944 DBG(" -> got IRQ %d\n", irq);
948 msg = "Found"; 945 msg = "Found";
949 eisa_set_level_irq(irq); 946 eisa_set_level_irq(irq);
@@ -978,15 +975,15 @@ static int pcibios_lookup_irq(struct pci_dev *dev, int assign)
978 continue; 975 continue;
979 if (info->irq[pin].link == pirq) { 976 if (info->irq[pin].link == pirq) {
980 /* We refuse to override the dev->irq information. Give a warning! */ 977 /* We refuse to override the dev->irq information. Give a warning! */
981 if ( dev2->irq && dev2->irq != irq && \ 978 if (dev2->irq && dev2->irq != irq && \
982 (!(pci_probe & PCI_USE_PIRQ_MASK) || \ 979 (!(pci_probe & PCI_USE_PIRQ_MASK) || \
983 ((1 << dev2->irq) & mask)) ) { 980 ((1 << dev2->irq) & mask))) {
984#ifndef CONFIG_PCI_MSI 981#ifndef CONFIG_PCI_MSI
985 printk(KERN_INFO "IRQ routing conflict for %s, have irq %d, want irq %d\n", 982 printk(KERN_INFO "IRQ routing conflict for %s, have irq %d, want irq %d\n",
986 pci_name(dev2), dev2->irq, irq); 983 pci_name(dev2), dev2->irq, irq);
987#endif 984#endif
988 continue; 985 continue;
989 } 986 }
990 dev2->irq = irq; 987 dev2->irq = irq;
991 pirq_penalty[irq]++; 988 pirq_penalty[irq]++;
992 if (dev != dev2) 989 if (dev != dev2)
@@ -1024,8 +1021,7 @@ static void __init pcibios_fixup_irqs(void)
1024 /* 1021 /*
1025 * Recalculate IRQ numbers if we use the I/O APIC. 1022 * Recalculate IRQ numbers if we use the I/O APIC.
1026 */ 1023 */
1027 if (io_apic_assign_pci_irqs) 1024 if (io_apic_assign_pci_irqs) {
1028 {
1029 int irq; 1025 int irq;
1030 1026
1031 if (pin) { 1027 if (pin) {
@@ -1038,10 +1034,10 @@ static void __init pcibios_fixup_irqs(void)
1038 * busses itself so we should get into this branch reliably. 1034 * busses itself so we should get into this branch reliably.
1039 */ 1035 */
1040 if (irq < 0 && dev->bus->parent) { /* go back to the bridge */ 1036 if (irq < 0 && dev->bus->parent) { /* go back to the bridge */
1041 struct pci_dev * bridge = dev->bus->self; 1037 struct pci_dev *bridge = dev->bus->self;
1042 1038
1043 pin = (pin + PCI_SLOT(dev->devfn)) % 4; 1039 pin = (pin + PCI_SLOT(dev->devfn)) % 4;
1044 irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number, 1040 irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number,
1045 PCI_SLOT(bridge->devfn), pin); 1041 PCI_SLOT(bridge->devfn), pin);
1046 if (irq >= 0) 1042 if (irq >= 0)
1047 printk(KERN_WARNING "PCI: using PPB %s[%c] to get irq %d\n", 1043 printk(KERN_WARNING "PCI: using PPB %s[%c] to get irq %d\n",
@@ -1131,7 +1127,7 @@ static int __init pcibios_irq_init(void)
1131 pirq_find_router(&pirq_router); 1127 pirq_find_router(&pirq_router);
1132 if (pirq_table->exclusive_irqs) { 1128 if (pirq_table->exclusive_irqs) {
1133 int i; 1129 int i;
1134 for (i=0; i<16; i++) 1130 for (i = 0; i < 16; i++)
1135 if (!(pirq_table->exclusive_irqs & (1 << i))) 1131 if (!(pirq_table->exclusive_irqs & (1 << i)))
1136 pirq_penalty[i] += 100; 1132 pirq_penalty[i] += 100;
1137 } 1133 }
@@ -1196,10 +1192,10 @@ static int pirq_enable_irq(struct pci_dev *dev)
1196 */ 1192 */
1197 temp_dev = dev; 1193 temp_dev = dev;
1198 while (irq < 0 && dev->bus->parent) { /* go back to the bridge */ 1194 while (irq < 0 && dev->bus->parent) { /* go back to the bridge */
1199 struct pci_dev * bridge = dev->bus->self; 1195 struct pci_dev *bridge = dev->bus->self;
1200 1196
1201 pin = (pin + PCI_SLOT(dev->devfn)) % 4; 1197 pin = (pin + PCI_SLOT(dev->devfn)) % 4;
1202 irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number, 1198 irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number,
1203 PCI_SLOT(bridge->devfn), pin); 1199 PCI_SLOT(bridge->devfn), pin);
1204 if (irq >= 0) 1200 if (irq >= 0)
1205 printk(KERN_WARNING "PCI: using PPB %s[%c] to get irq %d\n", 1201 printk(KERN_WARNING "PCI: using PPB %s[%c] to get irq %d\n",
diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c
index 0cfebecf2a8f..23faaa890ffc 100644
--- a/arch/x86/pci/mmconfig-shared.c
+++ b/arch/x86/pci/mmconfig-shared.c
@@ -374,7 +374,7 @@ reject:
374 374
375static int __initdata known_bridge; 375static int __initdata known_bridge;
376 376
377void __init __pci_mmcfg_init(int early) 377static void __init __pci_mmcfg_init(int early)
378{ 378{
379 /* MMCONFIG disabled */ 379 /* MMCONFIG disabled */
380 if ((pci_probe & PCI_PROBE_MMCONF) == 0) 380 if ((pci_probe & PCI_PROBE_MMCONF) == 0)
diff --git a/arch/x86/pci/olpc.c b/arch/x86/pci/olpc.c
index 5e7636558c02..e11e9e803d5f 100644
--- a/arch/x86/pci/olpc.c
+++ b/arch/x86/pci/olpc.c
@@ -302,12 +302,13 @@ static struct pci_raw_ops pci_olpc_conf = {
302 .write = pci_olpc_write, 302 .write = pci_olpc_write,
303}; 303};
304 304
305void __init pci_olpc_init(void) 305int __init pci_olpc_init(void)
306{ 306{
307 if (!machine_is_olpc() || olpc_has_vsa()) 307 if (!machine_is_olpc() || olpc_has_vsa())
308 return; 308 return -ENODEV;
309 309
310 printk(KERN_INFO "PCI: Using configuration type OLPC\n"); 310 printk(KERN_INFO "PCI: Using configuration type OLPC\n");
311 raw_pci_ops = &pci_olpc_conf; 311 raw_pci_ops = &pci_olpc_conf;
312 is_lx = is_geode_lx(); 312 is_lx = is_geode_lx();
313 return 0;
313} 314}
diff --git a/arch/x86/pci/pci.h b/arch/x86/pci/pci.h
index f3972b12c60a..ba263e626a68 100644
--- a/arch/x86/pci/pci.h
+++ b/arch/x86/pci/pci.h
@@ -27,6 +27,7 @@
27#define PCI_CAN_SKIP_ISA_ALIGN 0x8000 27#define PCI_CAN_SKIP_ISA_ALIGN 0x8000
28#define PCI_USE__CRS 0x10000 28#define PCI_USE__CRS 0x10000
29#define PCI_CHECK_ENABLE_AMD_MMCONF 0x20000 29#define PCI_CHECK_ENABLE_AMD_MMCONF 0x20000
30#define PCI_HAS_IO_ECS 0x40000
30 31
31extern unsigned int pci_probe; 32extern unsigned int pci_probe;
32extern unsigned long pirq_table_addr; 33extern unsigned long pirq_table_addr;
@@ -101,7 +102,7 @@ extern struct pci_raw_ops pci_direct_conf1;
101extern int pci_direct_probe(void); 102extern int pci_direct_probe(void);
102extern void pci_direct_init(int type); 103extern void pci_direct_init(int type);
103extern void pci_pcbios_init(void); 104extern void pci_pcbios_init(void);
104extern void pci_olpc_init(void); 105extern int pci_olpc_init(void);
105 106
106/* pci-mmconfig.c */ 107/* pci-mmconfig.c */
107 108
diff --git a/arch/x86/vdso/vclock_gettime.c b/arch/x86/vdso/vclock_gettime.c
index 23476c2ebfc4..efa2ba7c6005 100644
--- a/arch/x86/vdso/vclock_gettime.c
+++ b/arch/x86/vdso/vclock_gettime.c
@@ -106,9 +106,9 @@ int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz)
106 do_realtime((struct timespec *)tv); 106 do_realtime((struct timespec *)tv);
107 tv->tv_usec /= 1000; 107 tv->tv_usec /= 1000;
108 if (unlikely(tz != NULL)) { 108 if (unlikely(tz != NULL)) {
109 /* This relies on gcc inlining the memcpy. We'll notice 109 /* Avoid memcpy. Some old compilers fail to inline it */
110 if it ever fails to do so. */ 110 tz->tz_minuteswest = gtod->sys_tz.tz_minuteswest;
111 memcpy(tz, &gtod->sys_tz, sizeof(struct timezone)); 111 tz->tz_dsttime = gtod->sys_tz.tz_dsttime;
112 } 112 }
113 return 0; 113 return 0;
114 } 114 }
diff --git a/arch/x86/vdso/vma.c b/arch/x86/vdso/vma.c
index 3fdd51497a83..19a6cfaf5db9 100644
--- a/arch/x86/vdso/vma.c
+++ b/arch/x86/vdso/vma.c
@@ -16,7 +16,7 @@
16#include "vextern.h" /* Just for VMAGIC. */ 16#include "vextern.h" /* Just for VMAGIC. */
17#undef VEXTERN 17#undef VEXTERN
18 18
19int vdso_enabled = 1; 19unsigned int __read_mostly vdso_enabled = 1;
20 20
21extern char vdso_start[], vdso_end[]; 21extern char vdso_start[], vdso_end[];
22extern unsigned short vdso_sync_cpuid; 22extern unsigned short vdso_sync_cpuid;
diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig
index 2e641be2737e..c2cc99580871 100644
--- a/arch/x86/xen/Kconfig
+++ b/arch/x86/xen/Kconfig
@@ -5,9 +5,20 @@
5config XEN 5config XEN
6 bool "Xen guest support" 6 bool "Xen guest support"
7 select PARAVIRT 7 select PARAVIRT
8 select PARAVIRT_CLOCK
8 depends on X86_32 9 depends on X86_32
9 depends on X86_CMPXCHG && X86_TSC && !(X86_VISWS || X86_VOYAGER) 10 depends on X86_CMPXCHG && X86_TSC && X86_PAE && !(X86_VISWS || X86_VOYAGER)
10 help 11 help
11 This is the Linux Xen port. Enabling this will allow the 12 This is the Linux Xen port. Enabling this will allow the
12 kernel to boot in a paravirtualized environment under the 13 kernel to boot in a paravirtualized environment under the
13 Xen hypervisor. 14 Xen hypervisor.
15
16config XEN_MAX_DOMAIN_MEMORY
17 int "Maximum allowed size of a domain in gigabytes"
18 default 8
19 depends on XEN
20 help
21 The pseudo-physical to machine address array is sized
22 according to the maximum possible memory size of a Xen
23 domain. This array uses 1 page per gigabyte, so there's no
24 need to be too stingy here. \ No newline at end of file
diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile
index 3d8df981d5fd..2ba2d1649131 100644
--- a/arch/x86/xen/Makefile
+++ b/arch/x86/xen/Makefile
@@ -1,4 +1,4 @@
1obj-y := enlighten.o setup.o multicalls.o mmu.o \ 1obj-y := enlighten.o setup.o multicalls.o mmu.o \
2 time.o manage.o xen-asm.o grant-table.o 2 time.o xen-asm.o grant-table.o suspend.o
3 3
4obj-$(CONFIG_SMP) += smp.o 4obj-$(CONFIG_SMP) += smp.o
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index c8a56e457d61..bd74229081c3 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -75,13 +75,13 @@ DEFINE_PER_CPU(unsigned long, xen_current_cr3); /* actual vcpu cr3 */
75struct start_info *xen_start_info; 75struct start_info *xen_start_info;
76EXPORT_SYMBOL_GPL(xen_start_info); 76EXPORT_SYMBOL_GPL(xen_start_info);
77 77
78static /* __initdata */ struct shared_info dummy_shared_info; 78struct shared_info xen_dummy_shared_info;
79 79
80/* 80/*
81 * Point at some empty memory to start with. We map the real shared_info 81 * Point at some empty memory to start with. We map the real shared_info
82 * page as soon as fixmap is up and running. 82 * page as soon as fixmap is up and running.
83 */ 83 */
84struct shared_info *HYPERVISOR_shared_info = (void *)&dummy_shared_info; 84struct shared_info *HYPERVISOR_shared_info = (void *)&xen_dummy_shared_info;
85 85
86/* 86/*
87 * Flag to determine whether vcpu info placement is available on all 87 * Flag to determine whether vcpu info placement is available on all
@@ -98,13 +98,13 @@ struct shared_info *HYPERVISOR_shared_info = (void *)&dummy_shared_info;
98 */ 98 */
99static int have_vcpu_info_placement = 1; 99static int have_vcpu_info_placement = 1;
100 100
101static void __init xen_vcpu_setup(int cpu) 101static void xen_vcpu_setup(int cpu)
102{ 102{
103 struct vcpu_register_vcpu_info info; 103 struct vcpu_register_vcpu_info info;
104 int err; 104 int err;
105 struct vcpu_info *vcpup; 105 struct vcpu_info *vcpup;
106 106
107 BUG_ON(HYPERVISOR_shared_info == &dummy_shared_info); 107 BUG_ON(HYPERVISOR_shared_info == &xen_dummy_shared_info);
108 per_cpu(xen_vcpu, cpu) = &HYPERVISOR_shared_info->vcpu_info[cpu]; 108 per_cpu(xen_vcpu, cpu) = &HYPERVISOR_shared_info->vcpu_info[cpu];
109 109
110 if (!have_vcpu_info_placement) 110 if (!have_vcpu_info_placement)
@@ -136,11 +136,41 @@ static void __init xen_vcpu_setup(int cpu)
136 } 136 }
137} 137}
138 138
139/*
140 * On restore, set the vcpu placement up again.
141 * If it fails, then we're in a bad state, since
142 * we can't back out from using it...
143 */
144void xen_vcpu_restore(void)
145{
146 if (have_vcpu_info_placement) {
147 int cpu;
148
149 for_each_online_cpu(cpu) {
150 bool other_cpu = (cpu != smp_processor_id());
151
152 if (other_cpu &&
153 HYPERVISOR_vcpu_op(VCPUOP_down, cpu, NULL))
154 BUG();
155
156 xen_vcpu_setup(cpu);
157
158 if (other_cpu &&
159 HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL))
160 BUG();
161 }
162
163 BUG_ON(!have_vcpu_info_placement);
164 }
165}
166
139static void __init xen_banner(void) 167static void __init xen_banner(void)
140{ 168{
141 printk(KERN_INFO "Booting paravirtualized kernel on %s\n", 169 printk(KERN_INFO "Booting paravirtualized kernel on %s\n",
142 pv_info.name); 170 pv_info.name);
143 printk(KERN_INFO "Hypervisor signature: %s\n", xen_start_info->magic); 171 printk(KERN_INFO "Hypervisor signature: %s%s\n",
172 xen_start_info->magic,
173 xen_feature(XENFEAT_mmu_pt_update_preserve_ad) ? " (preserve-AD)" : "");
144} 174}
145 175
146static void xen_cpuid(unsigned int *ax, unsigned int *bx, 176static void xen_cpuid(unsigned int *ax, unsigned int *bx,
@@ -235,13 +265,13 @@ static void xen_irq_enable(void)
235{ 265{
236 struct vcpu_info *vcpu; 266 struct vcpu_info *vcpu;
237 267
238 /* There's a one instruction preempt window here. We need to 268 /* We don't need to worry about being preempted here, since
239 make sure we're don't switch CPUs between getting the vcpu 269 either a) interrupts are disabled, so no preemption, or b)
240 pointer and updating the mask. */ 270 the caller is confused and is trying to re-enable interrupts
241 preempt_disable(); 271 on an indeterminate processor. */
272
242 vcpu = x86_read_percpu(xen_vcpu); 273 vcpu = x86_read_percpu(xen_vcpu);
243 vcpu->evtchn_upcall_mask = 0; 274 vcpu->evtchn_upcall_mask = 0;
244 preempt_enable_no_resched();
245 275
246 /* Doesn't matter if we get preempted here, because any 276 /* Doesn't matter if we get preempted here, because any
247 pending event will get dealt with anyway. */ 277 pending event will get dealt with anyway. */
@@ -254,7 +284,7 @@ static void xen_irq_enable(void)
254static void xen_safe_halt(void) 284static void xen_safe_halt(void)
255{ 285{
256 /* Blocking includes an implicit local_irq_enable(). */ 286 /* Blocking includes an implicit local_irq_enable(). */
257 if (HYPERVISOR_sched_op(SCHEDOP_block, 0) != 0) 287 if (HYPERVISOR_sched_op(SCHEDOP_block, NULL) != 0)
258 BUG(); 288 BUG();
259} 289}
260 290
@@ -607,6 +637,30 @@ static void xen_flush_tlb_others(const cpumask_t *cpus, struct mm_struct *mm,
607 xen_mc_issue(PARAVIRT_LAZY_MMU); 637 xen_mc_issue(PARAVIRT_LAZY_MMU);
608} 638}
609 639
640static void xen_clts(void)
641{
642 struct multicall_space mcs;
643
644 mcs = xen_mc_entry(0);
645
646 MULTI_fpu_taskswitch(mcs.mc, 0);
647
648 xen_mc_issue(PARAVIRT_LAZY_CPU);
649}
650
651static void xen_write_cr0(unsigned long cr0)
652{
653 struct multicall_space mcs;
654
655 /* Only pay attention to cr0.TS; everything else is
656 ignored. */
657 mcs = xen_mc_entry(0);
658
659 MULTI_fpu_taskswitch(mcs.mc, (cr0 & X86_CR0_TS) != 0);
660
661 xen_mc_issue(PARAVIRT_LAZY_CPU);
662}
663
610static void xen_write_cr2(unsigned long cr2) 664static void xen_write_cr2(unsigned long cr2)
611{ 665{
612 x86_read_percpu(xen_vcpu)->arch.cr2 = cr2; 666 x86_read_percpu(xen_vcpu)->arch.cr2 = cr2;
@@ -624,8 +678,10 @@ static unsigned long xen_read_cr2_direct(void)
624 678
625static void xen_write_cr4(unsigned long cr4) 679static void xen_write_cr4(unsigned long cr4)
626{ 680{
627 /* Just ignore cr4 changes; Xen doesn't allow us to do 681 cr4 &= ~X86_CR4_PGE;
628 anything anyway. */ 682 cr4 &= ~X86_CR4_PSE;
683
684 native_write_cr4(cr4);
629} 685}
630 686
631static unsigned long xen_read_cr3(void) 687static unsigned long xen_read_cr3(void)
@@ -785,38 +841,35 @@ static __init void xen_set_pte_init(pte_t *ptep, pte_t pte)
785static __init void xen_pagetable_setup_start(pgd_t *base) 841static __init void xen_pagetable_setup_start(pgd_t *base)
786{ 842{
787 pgd_t *xen_pgd = (pgd_t *)xen_start_info->pt_base; 843 pgd_t *xen_pgd = (pgd_t *)xen_start_info->pt_base;
844 int i;
788 845
789 /* special set_pte for pagetable initialization */ 846 /* special set_pte for pagetable initialization */
790 pv_mmu_ops.set_pte = xen_set_pte_init; 847 pv_mmu_ops.set_pte = xen_set_pte_init;
791 848
792 init_mm.pgd = base; 849 init_mm.pgd = base;
793 /* 850 /*
794 * copy top-level of Xen-supplied pagetable into place. For 851 * copy top-level of Xen-supplied pagetable into place. This
795 * !PAE we can use this as-is, but for PAE it is a stand-in 852 * is a stand-in while we copy the pmd pages.
796 * while we copy the pmd pages.
797 */ 853 */
798 memcpy(base, xen_pgd, PTRS_PER_PGD * sizeof(pgd_t)); 854 memcpy(base, xen_pgd, PTRS_PER_PGD * sizeof(pgd_t));
799 855
800 if (PTRS_PER_PMD > 1) { 856 /*
801 int i; 857 * For PAE, need to allocate new pmds, rather than
802 /* 858 * share Xen's, since Xen doesn't like pmd's being
803 * For PAE, need to allocate new pmds, rather than 859 * shared between address spaces.
804 * share Xen's, since Xen doesn't like pmd's being 860 */
805 * shared between address spaces. 861 for (i = 0; i < PTRS_PER_PGD; i++) {
806 */ 862 if (pgd_val_ma(xen_pgd[i]) & _PAGE_PRESENT) {
807 for (i = 0; i < PTRS_PER_PGD; i++) { 863 pmd_t *pmd = (pmd_t *)alloc_bootmem_low_pages(PAGE_SIZE);
808 if (pgd_val_ma(xen_pgd[i]) & _PAGE_PRESENT) {
809 pmd_t *pmd = (pmd_t *)alloc_bootmem_low_pages(PAGE_SIZE);
810 864
811 memcpy(pmd, (void *)pgd_page_vaddr(xen_pgd[i]), 865 memcpy(pmd, (void *)pgd_page_vaddr(xen_pgd[i]),
812 PAGE_SIZE); 866 PAGE_SIZE);
813 867
814 make_lowmem_page_readonly(pmd); 868 make_lowmem_page_readonly(pmd);
815 869
816 set_pgd(&base[i], __pgd(1 + __pa(pmd))); 870 set_pgd(&base[i], __pgd(1 + __pa(pmd)));
817 } else 871 } else
818 pgd_clear(&base[i]); 872 pgd_clear(&base[i]);
819 }
820 } 873 }
821 874
822 /* make sure zero_page is mapped RO so we can use it in pagetables */ 875 /* make sure zero_page is mapped RO so we can use it in pagetables */
@@ -834,7 +887,7 @@ static __init void xen_pagetable_setup_start(pgd_t *base)
834 PFN_DOWN(__pa(xen_start_info->pt_base))); 887 PFN_DOWN(__pa(xen_start_info->pt_base)));
835} 888}
836 889
837static __init void setup_shared_info(void) 890void xen_setup_shared_info(void)
838{ 891{
839 if (!xen_feature(XENFEAT_auto_translated_physmap)) { 892 if (!xen_feature(XENFEAT_auto_translated_physmap)) {
840 unsigned long addr = fix_to_virt(FIX_PARAVIRT_BOOTMAP); 893 unsigned long addr = fix_to_virt(FIX_PARAVIRT_BOOTMAP);
@@ -857,6 +910,8 @@ static __init void setup_shared_info(void)
857 /* In UP this is as good a place as any to set up shared info */ 910 /* In UP this is as good a place as any to set up shared info */
858 xen_setup_vcpu_info_placement(); 911 xen_setup_vcpu_info_placement();
859#endif 912#endif
913
914 xen_setup_mfn_list_list();
860} 915}
861 916
862static __init void xen_pagetable_setup_done(pgd_t *base) 917static __init void xen_pagetable_setup_done(pgd_t *base)
@@ -869,25 +924,23 @@ static __init void xen_pagetable_setup_done(pgd_t *base)
869 pv_mmu_ops.release_pmd = xen_release_pmd; 924 pv_mmu_ops.release_pmd = xen_release_pmd;
870 pv_mmu_ops.set_pte = xen_set_pte; 925 pv_mmu_ops.set_pte = xen_set_pte;
871 926
872 setup_shared_info(); 927 xen_setup_shared_info();
873 928
874 /* Actually pin the pagetable down, but we can't set PG_pinned 929 /* Actually pin the pagetable down, but we can't set PG_pinned
875 yet because the page structures don't exist yet. */ 930 yet because the page structures don't exist yet. */
876 { 931 pin_pagetable_pfn(MMUEXT_PIN_L3_TABLE, PFN_DOWN(__pa(base)));
877 unsigned level; 932}
878 933
879#ifdef CONFIG_X86_PAE 934static __init void xen_post_allocator_init(void)
880 level = MMUEXT_PIN_L3_TABLE; 935{
881#else 936 pv_mmu_ops.set_pmd = xen_set_pmd;
882 level = MMUEXT_PIN_L2_TABLE; 937 pv_mmu_ops.set_pud = xen_set_pud;
883#endif
884 938
885 pin_pagetable_pfn(level, PFN_DOWN(__pa(base))); 939 xen_mark_init_mm_pinned();
886 }
887} 940}
888 941
889/* This is called once we have the cpu_possible_map */ 942/* This is called once we have the cpu_possible_map */
890void __init xen_setup_vcpu_info_placement(void) 943void xen_setup_vcpu_info_placement(void)
891{ 944{
892 int cpu; 945 int cpu;
893 946
@@ -973,7 +1026,7 @@ static const struct pv_init_ops xen_init_ops __initdata = {
973 .banner = xen_banner, 1026 .banner = xen_banner,
974 .memory_setup = xen_memory_setup, 1027 .memory_setup = xen_memory_setup,
975 .arch_setup = xen_arch_setup, 1028 .arch_setup = xen_arch_setup,
976 .post_allocator_init = xen_mark_init_mm_pinned, 1029 .post_allocator_init = xen_post_allocator_init,
977}; 1030};
978 1031
979static const struct pv_time_ops xen_time_ops __initdata = { 1032static const struct pv_time_ops xen_time_ops __initdata = {
@@ -991,10 +1044,10 @@ static const struct pv_cpu_ops xen_cpu_ops __initdata = {
991 .set_debugreg = xen_set_debugreg, 1044 .set_debugreg = xen_set_debugreg,
992 .get_debugreg = xen_get_debugreg, 1045 .get_debugreg = xen_get_debugreg,
993 1046
994 .clts = native_clts, 1047 .clts = xen_clts,
995 1048
996 .read_cr0 = native_read_cr0, 1049 .read_cr0 = native_read_cr0,
997 .write_cr0 = native_write_cr0, 1050 .write_cr0 = xen_write_cr0,
998 1051
999 .read_cr4 = native_read_cr4, 1052 .read_cr4 = native_read_cr4,
1000 .read_cr4_safe = native_read_cr4_safe, 1053 .read_cr4_safe = native_read_cr4_safe,
@@ -1085,24 +1138,26 @@ static const struct pv_mmu_ops xen_mmu_ops __initdata = {
1085 1138
1086 .set_pte = NULL, /* see xen_pagetable_setup_* */ 1139 .set_pte = NULL, /* see xen_pagetable_setup_* */
1087 .set_pte_at = xen_set_pte_at, 1140 .set_pte_at = xen_set_pte_at,
1088 .set_pmd = xen_set_pmd, 1141 .set_pmd = xen_set_pmd_hyper,
1142
1143 .ptep_modify_prot_start = __ptep_modify_prot_start,
1144 .ptep_modify_prot_commit = __ptep_modify_prot_commit,
1089 1145
1090 .pte_val = xen_pte_val, 1146 .pte_val = xen_pte_val,
1147 .pte_flags = native_pte_val,
1091 .pgd_val = xen_pgd_val, 1148 .pgd_val = xen_pgd_val,
1092 1149
1093 .make_pte = xen_make_pte, 1150 .make_pte = xen_make_pte,
1094 .make_pgd = xen_make_pgd, 1151 .make_pgd = xen_make_pgd,
1095 1152
1096#ifdef CONFIG_X86_PAE
1097 .set_pte_atomic = xen_set_pte_atomic, 1153 .set_pte_atomic = xen_set_pte_atomic,
1098 .set_pte_present = xen_set_pte_at, 1154 .set_pte_present = xen_set_pte_at,
1099 .set_pud = xen_set_pud, 1155 .set_pud = xen_set_pud_hyper,
1100 .pte_clear = xen_pte_clear, 1156 .pte_clear = xen_pte_clear,
1101 .pmd_clear = xen_pmd_clear, 1157 .pmd_clear = xen_pmd_clear,
1102 1158
1103 .make_pmd = xen_make_pmd, 1159 .make_pmd = xen_make_pmd,
1104 .pmd_val = xen_pmd_val, 1160 .pmd_val = xen_pmd_val,
1105#endif /* PAE */
1106 1161
1107 .activate_mm = xen_activate_mm, 1162 .activate_mm = xen_activate_mm,
1108 .dup_mmap = xen_dup_mmap, 1163 .dup_mmap = xen_dup_mmap,
@@ -1129,11 +1184,13 @@ static const struct smp_ops xen_smp_ops __initdata = {
1129 1184
1130static void xen_reboot(int reason) 1185static void xen_reboot(int reason)
1131{ 1186{
1187 struct sched_shutdown r = { .reason = reason };
1188
1132#ifdef CONFIG_SMP 1189#ifdef CONFIG_SMP
1133 smp_send_stop(); 1190 smp_send_stop();
1134#endif 1191#endif
1135 1192
1136 if (HYPERVISOR_sched_op(SCHEDOP_shutdown, reason)) 1193 if (HYPERVISOR_sched_op(SCHEDOP_shutdown, &r))
1137 BUG(); 1194 BUG();
1138} 1195}
1139 1196
@@ -1188,6 +1245,8 @@ asmlinkage void __init xen_start_kernel(void)
1188 1245
1189 BUG_ON(memcmp(xen_start_info->magic, "xen-3", 5) != 0); 1246 BUG_ON(memcmp(xen_start_info->magic, "xen-3", 5) != 0);
1190 1247
1248 xen_setup_features();
1249
1191 /* Install Xen paravirt ops */ 1250 /* Install Xen paravirt ops */
1192 pv_info = xen_info; 1251 pv_info = xen_info;
1193 pv_init_ops = xen_init_ops; 1252 pv_init_ops = xen_init_ops;
@@ -1197,17 +1256,20 @@ asmlinkage void __init xen_start_kernel(void)
1197 pv_apic_ops = xen_apic_ops; 1256 pv_apic_ops = xen_apic_ops;
1198 pv_mmu_ops = xen_mmu_ops; 1257 pv_mmu_ops = xen_mmu_ops;
1199 1258
1259 if (xen_feature(XENFEAT_mmu_pt_update_preserve_ad)) {
1260 pv_mmu_ops.ptep_modify_prot_start = xen_ptep_modify_prot_start;
1261 pv_mmu_ops.ptep_modify_prot_commit = xen_ptep_modify_prot_commit;
1262 }
1263
1200 machine_ops = xen_machine_ops; 1264 machine_ops = xen_machine_ops;
1201 1265
1202#ifdef CONFIG_SMP 1266#ifdef CONFIG_SMP
1203 smp_ops = xen_smp_ops; 1267 smp_ops = xen_smp_ops;
1204#endif 1268#endif
1205 1269
1206 xen_setup_features();
1207
1208 /* Get mfn list */ 1270 /* Get mfn list */
1209 if (!xen_feature(XENFEAT_auto_translated_physmap)) 1271 if (!xen_feature(XENFEAT_auto_translated_physmap))
1210 phys_to_machine_mapping = (unsigned long *)xen_start_info->mfn_list; 1272 xen_build_dynamic_phys_to_machine();
1211 1273
1212 pgd = (pgd_t *)xen_start_info->pt_base; 1274 pgd = (pgd_t *)xen_start_info->pt_base;
1213 1275
@@ -1228,6 +1290,11 @@ asmlinkage void __init xen_start_kernel(void)
1228 if (xen_feature(XENFEAT_supervisor_mode_kernel)) 1290 if (xen_feature(XENFEAT_supervisor_mode_kernel))
1229 pv_info.kernel_rpl = 0; 1291 pv_info.kernel_rpl = 0;
1230 1292
1293 /* Prevent unwanted bits from being set in PTEs. */
1294 __supported_pte_mask &= ~_PAGE_GLOBAL;
1295 if (!is_initial_xendomain())
1296 __supported_pte_mask &= ~(_PAGE_PWT | _PAGE_PCD);
1297
1231 /* set the limit of our address space */ 1298 /* set the limit of our address space */
1232 xen_reserve_top(); 1299 xen_reserve_top();
1233 1300
@@ -1242,8 +1309,11 @@ asmlinkage void __init xen_start_kernel(void)
1242 ? __pa(xen_start_info->mod_start) : 0; 1309 ? __pa(xen_start_info->mod_start) : 0;
1243 boot_params.hdr.ramdisk_size = xen_start_info->mod_len; 1310 boot_params.hdr.ramdisk_size = xen_start_info->mod_len;
1244 1311
1245 if (!is_initial_xendomain()) 1312 if (!is_initial_xendomain()) {
1313 add_preferred_console("xenboot", 0, NULL);
1314 add_preferred_console("tty", 0, NULL);
1246 add_preferred_console("hvc", 0, NULL); 1315 add_preferred_console("hvc", 0, NULL);
1316 }
1247 1317
1248 /* Start the world */ 1318 /* Start the world */
1249 start_kernel(); 1319 start_kernel();
diff --git a/arch/x86/xen/manage.c b/arch/x86/xen/manage.c
deleted file mode 100644
index aa7af9e6abc0..000000000000
--- a/arch/x86/xen/manage.c
+++ /dev/null
@@ -1,143 +0,0 @@
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/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index 126766d43aea..42b3b9ed641d 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -56,11 +56,136 @@
56#include "multicalls.h" 56#include "multicalls.h"
57#include "mmu.h" 57#include "mmu.h"
58 58
59#define P2M_ENTRIES_PER_PAGE (PAGE_SIZE / sizeof(unsigned long))
60#define TOP_ENTRIES (MAX_DOMAIN_PAGES / P2M_ENTRIES_PER_PAGE)
61
62/* Placeholder for holes in the address space */
63static unsigned long p2m_missing[P2M_ENTRIES_PER_PAGE]
64 __attribute__((section(".data.page_aligned"))) =
65 { [ 0 ... P2M_ENTRIES_PER_PAGE-1 ] = ~0UL };
66
67 /* Array of pointers to pages containing p2m entries */
68static unsigned long *p2m_top[TOP_ENTRIES]
69 __attribute__((section(".data.page_aligned"))) =
70 { [ 0 ... TOP_ENTRIES - 1] = &p2m_missing[0] };
71
72/* Arrays of p2m arrays expressed in mfns used for save/restore */
73static unsigned long p2m_top_mfn[TOP_ENTRIES]
74 __attribute__((section(".bss.page_aligned")));
75
76static unsigned long p2m_top_mfn_list[
77 PAGE_ALIGN(TOP_ENTRIES / P2M_ENTRIES_PER_PAGE)]
78 __attribute__((section(".bss.page_aligned")));
79
80static inline unsigned p2m_top_index(unsigned long pfn)
81{
82 BUG_ON(pfn >= MAX_DOMAIN_PAGES);
83 return pfn / P2M_ENTRIES_PER_PAGE;
84}
85
86static inline unsigned p2m_index(unsigned long pfn)
87{
88 return pfn % P2M_ENTRIES_PER_PAGE;
89}
90
91/* Build the parallel p2m_top_mfn structures */
92void xen_setup_mfn_list_list(void)
93{
94 unsigned pfn, idx;
95
96 for(pfn = 0; pfn < MAX_DOMAIN_PAGES; pfn += P2M_ENTRIES_PER_PAGE) {
97 unsigned topidx = p2m_top_index(pfn);
98
99 p2m_top_mfn[topidx] = virt_to_mfn(p2m_top[topidx]);
100 }
101
102 for(idx = 0; idx < ARRAY_SIZE(p2m_top_mfn_list); idx++) {
103 unsigned topidx = idx * P2M_ENTRIES_PER_PAGE;
104 p2m_top_mfn_list[idx] = virt_to_mfn(&p2m_top_mfn[topidx]);
105 }
106
107 BUG_ON(HYPERVISOR_shared_info == &xen_dummy_shared_info);
108
109 HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list_list =
110 virt_to_mfn(p2m_top_mfn_list);
111 HYPERVISOR_shared_info->arch.max_pfn = xen_start_info->nr_pages;
112}
113
114/* Set up p2m_top to point to the domain-builder provided p2m pages */
115void __init xen_build_dynamic_phys_to_machine(void)
116{
117 unsigned long *mfn_list = (unsigned long *)xen_start_info->mfn_list;
118 unsigned long max_pfn = min(MAX_DOMAIN_PAGES, xen_start_info->nr_pages);
119 unsigned pfn;
120
121 for(pfn = 0; pfn < max_pfn; pfn += P2M_ENTRIES_PER_PAGE) {
122 unsigned topidx = p2m_top_index(pfn);
123
124 p2m_top[topidx] = &mfn_list[pfn];
125 }
126}
127
128unsigned long get_phys_to_machine(unsigned long pfn)
129{
130 unsigned topidx, idx;
131
132 if (unlikely(pfn >= MAX_DOMAIN_PAGES))
133 return INVALID_P2M_ENTRY;
134
135 topidx = p2m_top_index(pfn);
136 idx = p2m_index(pfn);
137 return p2m_top[topidx][idx];
138}
139EXPORT_SYMBOL_GPL(get_phys_to_machine);
140
141static void alloc_p2m(unsigned long **pp, unsigned long *mfnp)
142{
143 unsigned long *p;
144 unsigned i;
145
146 p = (void *)__get_free_page(GFP_KERNEL | __GFP_NOFAIL);
147 BUG_ON(p == NULL);
148
149 for(i = 0; i < P2M_ENTRIES_PER_PAGE; i++)
150 p[i] = INVALID_P2M_ENTRY;
151
152 if (cmpxchg(pp, p2m_missing, p) != p2m_missing)
153 free_page((unsigned long)p);
154 else
155 *mfnp = virt_to_mfn(p);
156}
157
158void set_phys_to_machine(unsigned long pfn, unsigned long mfn)
159{
160 unsigned topidx, idx;
161
162 if (unlikely(xen_feature(XENFEAT_auto_translated_physmap))) {
163 BUG_ON(pfn != mfn && mfn != INVALID_P2M_ENTRY);
164 return;
165 }
166
167 if (unlikely(pfn >= MAX_DOMAIN_PAGES)) {
168 BUG_ON(mfn != INVALID_P2M_ENTRY);
169 return;
170 }
171
172 topidx = p2m_top_index(pfn);
173 if (p2m_top[topidx] == p2m_missing) {
174 /* no need to allocate a page to store an invalid entry */
175 if (mfn == INVALID_P2M_ENTRY)
176 return;
177 alloc_p2m(&p2m_top[topidx], &p2m_top_mfn[topidx]);
178 }
179
180 idx = p2m_index(pfn);
181 p2m_top[topidx][idx] = mfn;
182}
183
59xmaddr_t arbitrary_virt_to_machine(unsigned long address) 184xmaddr_t arbitrary_virt_to_machine(unsigned long address)
60{ 185{
61 unsigned int level; 186 unsigned int level;
62 pte_t *pte = lookup_address(address, &level); 187 pte_t *pte = lookup_address(address, &level);
63 unsigned offset = address & PAGE_MASK; 188 unsigned offset = address & ~PAGE_MASK;
64 189
65 BUG_ON(pte == NULL); 190 BUG_ON(pte == NULL);
66 191
@@ -98,24 +223,60 @@ void make_lowmem_page_readwrite(void *vaddr)
98} 223}
99 224
100 225
101void xen_set_pmd(pmd_t *ptr, pmd_t val) 226static bool page_pinned(void *ptr)
227{
228 struct page *page = virt_to_page(ptr);
229
230 return PagePinned(page);
231}
232
233static void extend_mmu_update(const struct mmu_update *update)
102{ 234{
103 struct multicall_space mcs; 235 struct multicall_space mcs;
104 struct mmu_update *u; 236 struct mmu_update *u;
105 237
106 preempt_disable(); 238 mcs = xen_mc_extend_args(__HYPERVISOR_mmu_update, sizeof(*u));
239
240 if (mcs.mc != NULL)
241 mcs.mc->args[1]++;
242 else {
243 mcs = __xen_mc_entry(sizeof(*u));
244 MULTI_mmu_update(mcs.mc, mcs.args, 1, NULL, DOMID_SELF);
245 }
107 246
108 mcs = xen_mc_entry(sizeof(*u));
109 u = mcs.args; 247 u = mcs.args;
110 u->ptr = virt_to_machine(ptr).maddr; 248 *u = *update;
111 u->val = pmd_val_ma(val); 249}
112 MULTI_mmu_update(mcs.mc, u, 1, NULL, DOMID_SELF); 250
251void xen_set_pmd_hyper(pmd_t *ptr, pmd_t val)
252{
253 struct mmu_update u;
254
255 preempt_disable();
256
257 xen_mc_batch();
258
259 u.ptr = virt_to_machine(ptr).maddr;
260 u.val = pmd_val_ma(val);
261 extend_mmu_update(&u);
113 262
114 xen_mc_issue(PARAVIRT_LAZY_MMU); 263 xen_mc_issue(PARAVIRT_LAZY_MMU);
115 264
116 preempt_enable(); 265 preempt_enable();
117} 266}
118 267
268void xen_set_pmd(pmd_t *ptr, pmd_t val)
269{
270 /* If page is not pinned, we can just update the entry
271 directly */
272 if (!page_pinned(ptr)) {
273 *ptr = val;
274 return;
275 }
276
277 xen_set_pmd_hyper(ptr, val);
278}
279
119/* 280/*
120 * Associate a virtual page frame with a given physical page frame 281 * Associate a virtual page frame with a given physical page frame
121 * and protection flags for that frame. 282 * and protection flags for that frame.
@@ -179,68 +340,105 @@ out:
179 preempt_enable(); 340 preempt_enable();
180} 341}
181 342
182pteval_t xen_pte_val(pte_t pte) 343pte_t xen_ptep_modify_prot_start(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
183{ 344{
184 pteval_t ret = pte.pte; 345 /* Just return the pte as-is. We preserve the bits on commit */
346 return *ptep;
347}
348
349void xen_ptep_modify_prot_commit(struct mm_struct *mm, unsigned long addr,
350 pte_t *ptep, pte_t pte)
351{
352 struct mmu_update u;
353
354 xen_mc_batch();
185 355
186 if (ret & _PAGE_PRESENT) 356 u.ptr = virt_to_machine(ptep).maddr | MMU_PT_UPDATE_PRESERVE_AD;
187 ret = machine_to_phys(XMADDR(ret)).paddr | _PAGE_PRESENT; 357 u.val = pte_val_ma(pte);
358 extend_mmu_update(&u);
188 359
189 return ret; 360 xen_mc_issue(PARAVIRT_LAZY_MMU);
190} 361}
191 362
192pgdval_t xen_pgd_val(pgd_t pgd) 363/* Assume pteval_t is equivalent to all the other *val_t types. */
364static pteval_t pte_mfn_to_pfn(pteval_t val)
193{ 365{
194 pgdval_t ret = pgd.pgd; 366 if (val & _PAGE_PRESENT) {
195 if (ret & _PAGE_PRESENT) 367 unsigned long mfn = (val & PTE_MASK) >> PAGE_SHIFT;
196 ret = machine_to_phys(XMADDR(ret)).paddr | _PAGE_PRESENT; 368 pteval_t flags = val & ~PTE_MASK;
197 return ret; 369 val = ((pteval_t)mfn_to_pfn(mfn) << PAGE_SHIFT) | flags;
370 }
371
372 return val;
198} 373}
199 374
200pte_t xen_make_pte(pteval_t pte) 375static pteval_t pte_pfn_to_mfn(pteval_t val)
201{ 376{
202 if (pte & _PAGE_PRESENT) { 377 if (val & _PAGE_PRESENT) {
203 pte = phys_to_machine(XPADDR(pte)).maddr; 378 unsigned long pfn = (val & PTE_MASK) >> PAGE_SHIFT;
204 pte &= ~(_PAGE_PCD | _PAGE_PWT); 379 pteval_t flags = val & ~PTE_MASK;
380 val = ((pteval_t)pfn_to_mfn(pfn) << PAGE_SHIFT) | flags;
205 } 381 }
206 382
207 return (pte_t){ .pte = pte }; 383 return val;
208} 384}
209 385
210pgd_t xen_make_pgd(pgdval_t pgd) 386pteval_t xen_pte_val(pte_t pte)
211{ 387{
212 if (pgd & _PAGE_PRESENT) 388 return pte_mfn_to_pfn(pte.pte);
213 pgd = phys_to_machine(XPADDR(pgd)).maddr; 389}
214 390
215 return (pgd_t){ pgd }; 391pgdval_t xen_pgd_val(pgd_t pgd)
392{
393 return pte_mfn_to_pfn(pgd.pgd);
394}
395
396pte_t xen_make_pte(pteval_t pte)
397{
398 pte = pte_pfn_to_mfn(pte);
399 return native_make_pte(pte);
400}
401
402pgd_t xen_make_pgd(pgdval_t pgd)
403{
404 pgd = pte_pfn_to_mfn(pgd);
405 return native_make_pgd(pgd);
216} 406}
217 407
218pmdval_t xen_pmd_val(pmd_t pmd) 408pmdval_t xen_pmd_val(pmd_t pmd)
219{ 409{
220 pmdval_t ret = native_pmd_val(pmd); 410 return pte_mfn_to_pfn(pmd.pmd);
221 if (ret & _PAGE_PRESENT)
222 ret = machine_to_phys(XMADDR(ret)).paddr | _PAGE_PRESENT;
223 return ret;
224} 411}
225#ifdef CONFIG_X86_PAE 412
226void xen_set_pud(pud_t *ptr, pud_t val) 413void xen_set_pud_hyper(pud_t *ptr, pud_t val)
227{ 414{
228 struct multicall_space mcs; 415 struct mmu_update u;
229 struct mmu_update *u;
230 416
231 preempt_disable(); 417 preempt_disable();
232 418
233 mcs = xen_mc_entry(sizeof(*u)); 419 xen_mc_batch();
234 u = mcs.args; 420
235 u->ptr = virt_to_machine(ptr).maddr; 421 u.ptr = virt_to_machine(ptr).maddr;
236 u->val = pud_val_ma(val); 422 u.val = pud_val_ma(val);
237 MULTI_mmu_update(mcs.mc, u, 1, NULL, DOMID_SELF); 423 extend_mmu_update(&u);
238 424
239 xen_mc_issue(PARAVIRT_LAZY_MMU); 425 xen_mc_issue(PARAVIRT_LAZY_MMU);
240 426
241 preempt_enable(); 427 preempt_enable();
242} 428}
243 429
430void xen_set_pud(pud_t *ptr, pud_t val)
431{
432 /* If page is not pinned, we can just update the entry
433 directly */
434 if (!page_pinned(ptr)) {
435 *ptr = val;
436 return;
437 }
438
439 xen_set_pud_hyper(ptr, val);
440}
441
244void xen_set_pte(pte_t *ptep, pte_t pte) 442void xen_set_pte(pte_t *ptep, pte_t pte)
245{ 443{
246 ptep->pte_high = pte.pte_high; 444 ptep->pte_high = pte.pte_high;
@@ -262,22 +460,14 @@ void xen_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
262 460
263void xen_pmd_clear(pmd_t *pmdp) 461void xen_pmd_clear(pmd_t *pmdp)
264{ 462{
265 xen_set_pmd(pmdp, __pmd(0)); 463 set_pmd(pmdp, __pmd(0));
266} 464}
267 465
268pmd_t xen_make_pmd(pmdval_t pmd) 466pmd_t xen_make_pmd(pmdval_t pmd)
269{ 467{
270 if (pmd & _PAGE_PRESENT) 468 pmd = pte_pfn_to_mfn(pmd);
271 pmd = phys_to_machine(XPADDR(pmd)).maddr;
272
273 return native_make_pmd(pmd); 469 return native_make_pmd(pmd);
274} 470}
275#else /* !PAE */
276void xen_set_pte(pte_t *ptep, pte_t pte)
277{
278 *ptep = pte;
279}
280#endif /* CONFIG_X86_PAE */
281 471
282/* 472/*
283 (Yet another) pagetable walker. This one is intended for pinning a 473 (Yet another) pagetable walker. This one is intended for pinning a
@@ -430,8 +620,6 @@ static int pin_page(struct page *page, enum pt_level level)
430 read-only, and can be pinned. */ 620 read-only, and can be pinned. */
431void xen_pgd_pin(pgd_t *pgd) 621void xen_pgd_pin(pgd_t *pgd)
432{ 622{
433 unsigned level;
434
435 xen_mc_batch(); 623 xen_mc_batch();
436 624
437 if (pgd_walk(pgd, pin_page, TASK_SIZE)) { 625 if (pgd_walk(pgd, pin_page, TASK_SIZE)) {
@@ -441,15 +629,31 @@ void xen_pgd_pin(pgd_t *pgd)
441 xen_mc_batch(); 629 xen_mc_batch();
442 } 630 }
443 631
444#ifdef CONFIG_X86_PAE 632 xen_do_pin(MMUEXT_PIN_L3_TABLE, PFN_DOWN(__pa(pgd)));
445 level = MMUEXT_PIN_L3_TABLE; 633 xen_mc_issue(0);
446#else 634}
447 level = MMUEXT_PIN_L2_TABLE; 635
448#endif 636/*
637 * On save, we need to pin all pagetables to make sure they get their
638 * mfns turned into pfns. Search the list for any unpinned pgds and pin
639 * them (unpinned pgds are not currently in use, probably because the
640 * process is under construction or destruction).
641 */
642void xen_mm_pin_all(void)
643{
644 unsigned long flags;
645 struct page *page;
449 646
450 xen_do_pin(level, PFN_DOWN(__pa(pgd))); 647 spin_lock_irqsave(&pgd_lock, flags);
451 648
452 xen_mc_issue(0); 649 list_for_each_entry(page, &pgd_list, lru) {
650 if (!PagePinned(page)) {
651 xen_pgd_pin((pgd_t *)page_address(page));
652 SetPageSavePinned(page);
653 }
654 }
655
656 spin_unlock_irqrestore(&pgd_lock, flags);
453} 657}
454 658
455/* The init_mm pagetable is really pinned as soon as its created, but 659/* The init_mm pagetable is really pinned as soon as its created, but
@@ -509,6 +713,29 @@ static void xen_pgd_unpin(pgd_t *pgd)
509 xen_mc_issue(0); 713 xen_mc_issue(0);
510} 714}
511 715
716/*
717 * On resume, undo any pinning done at save, so that the rest of the
718 * kernel doesn't see any unexpected pinned pagetables.
719 */
720void xen_mm_unpin_all(void)
721{
722 unsigned long flags;
723 struct page *page;
724
725 spin_lock_irqsave(&pgd_lock, flags);
726
727 list_for_each_entry(page, &pgd_list, lru) {
728 if (PageSavePinned(page)) {
729 BUG_ON(!PagePinned(page));
730 printk("unpinning pinned %p\n", page_address(page));
731 xen_pgd_unpin((pgd_t *)page_address(page));
732 ClearPageSavePinned(page);
733 }
734 }
735
736 spin_unlock_irqrestore(&pgd_lock, flags);
737}
738
512void xen_activate_mm(struct mm_struct *prev, struct mm_struct *next) 739void xen_activate_mm(struct mm_struct *prev, struct mm_struct *next)
513{ 740{
514 spin_lock(&next->page_table_lock); 741 spin_lock(&next->page_table_lock);
@@ -602,7 +829,7 @@ void xen_exit_mmap(struct mm_struct *mm)
602 spin_lock(&mm->page_table_lock); 829 spin_lock(&mm->page_table_lock);
603 830
604 /* pgd may not be pinned in the error exit path of execve */ 831 /* pgd may not be pinned in the error exit path of execve */
605 if (PagePinned(virt_to_page(mm->pgd))) 832 if (page_pinned(mm->pgd))
606 xen_pgd_unpin(mm->pgd); 833 xen_pgd_unpin(mm->pgd);
607 834
608 spin_unlock(&mm->page_table_lock); 835 spin_unlock(&mm->page_table_lock);
diff --git a/arch/x86/xen/mmu.h b/arch/x86/xen/mmu.h
index b5e189b1519d..297bf9f5b8bc 100644
--- a/arch/x86/xen/mmu.h
+++ b/arch/x86/xen/mmu.h
@@ -25,10 +25,6 @@ enum pt_level {
25 25
26void set_pte_mfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags); 26void set_pte_mfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags);
27 27
28void xen_set_pte(pte_t *ptep, pte_t pteval);
29void xen_set_pte_at(struct mm_struct *mm, unsigned long addr,
30 pte_t *ptep, pte_t pteval);
31void xen_set_pmd(pmd_t *pmdp, pmd_t pmdval);
32 28
33void xen_activate_mm(struct mm_struct *prev, struct mm_struct *next); 29void xen_activate_mm(struct mm_struct *prev, struct mm_struct *next);
34void xen_dup_mmap(struct mm_struct *oldmm, struct mm_struct *mm); 30void xen_dup_mmap(struct mm_struct *oldmm, struct mm_struct *mm);
@@ -37,31 +33,27 @@ void xen_exit_mmap(struct mm_struct *mm);
37void xen_pgd_pin(pgd_t *pgd); 33void xen_pgd_pin(pgd_t *pgd);
38//void xen_pgd_unpin(pgd_t *pgd); 34//void xen_pgd_unpin(pgd_t *pgd);
39 35
40#ifdef CONFIG_X86_PAE 36pteval_t xen_pte_val(pte_t);
41unsigned long long xen_pte_val(pte_t); 37pmdval_t xen_pmd_val(pmd_t);
42unsigned long long xen_pmd_val(pmd_t); 38pgdval_t xen_pgd_val(pgd_t);
43unsigned long long xen_pgd_val(pgd_t);
44 39
45pte_t xen_make_pte(unsigned long long); 40pte_t xen_make_pte(pteval_t);
46pmd_t xen_make_pmd(unsigned long long); 41pmd_t xen_make_pmd(pmdval_t);
47pgd_t xen_make_pgd(unsigned long long); 42pgd_t xen_make_pgd(pgdval_t);
48 43
44void xen_set_pte(pte_t *ptep, pte_t pteval);
49void xen_set_pte_at(struct mm_struct *mm, unsigned long addr, 45void xen_set_pte_at(struct mm_struct *mm, unsigned long addr,
50 pte_t *ptep, pte_t pteval); 46 pte_t *ptep, pte_t pteval);
51void xen_set_pte_atomic(pte_t *ptep, pte_t pte); 47void xen_set_pte_atomic(pte_t *ptep, pte_t pte);
48void xen_set_pmd(pmd_t *pmdp, pmd_t pmdval);
52void xen_set_pud(pud_t *ptr, pud_t val); 49void xen_set_pud(pud_t *ptr, pud_t val);
50void xen_set_pmd_hyper(pmd_t *pmdp, pmd_t pmdval);
51void xen_set_pud_hyper(pud_t *ptr, pud_t val);
53void xen_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep); 52void xen_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep);
54void xen_pmd_clear(pmd_t *pmdp); 53void xen_pmd_clear(pmd_t *pmdp);
55 54
56 55pte_t xen_ptep_modify_prot_start(struct mm_struct *mm, unsigned long addr, pte_t *ptep);
57#else 56void xen_ptep_modify_prot_commit(struct mm_struct *mm, unsigned long addr,
58unsigned long xen_pte_val(pte_t); 57 pte_t *ptep, pte_t pte);
59unsigned long xen_pmd_val(pmd_t);
60unsigned long xen_pgd_val(pgd_t);
61
62pte_t xen_make_pte(unsigned long);
63pmd_t xen_make_pmd(unsigned long);
64pgd_t xen_make_pgd(unsigned long);
65#endif
66 58
67#endif /* _XEN_MMU_H */ 59#endif /* _XEN_MMU_H */
diff --git a/arch/x86/xen/multicalls.c b/arch/x86/xen/multicalls.c
index 5791eb2e3750..3c63c4da7ed1 100644
--- a/arch/x86/xen/multicalls.c
+++ b/arch/x86/xen/multicalls.c
@@ -29,14 +29,14 @@
29#define MC_DEBUG 1 29#define MC_DEBUG 1
30 30
31#define MC_BATCH 32 31#define MC_BATCH 32
32#define MC_ARGS (MC_BATCH * 16 / sizeof(u64)) 32#define MC_ARGS (MC_BATCH * 16)
33 33
34struct mc_buffer { 34struct mc_buffer {
35 struct multicall_entry entries[MC_BATCH]; 35 struct multicall_entry entries[MC_BATCH];
36#if MC_DEBUG 36#if MC_DEBUG
37 struct multicall_entry debug[MC_BATCH]; 37 struct multicall_entry debug[MC_BATCH];
38#endif 38#endif
39 u64 args[MC_ARGS]; 39 unsigned char args[MC_ARGS];
40 struct callback { 40 struct callback {
41 void (*fn)(void *); 41 void (*fn)(void *);
42 void *data; 42 void *data;
@@ -107,20 +107,48 @@ struct multicall_space __xen_mc_entry(size_t args)
107{ 107{
108 struct mc_buffer *b = &__get_cpu_var(mc_buffer); 108 struct mc_buffer *b = &__get_cpu_var(mc_buffer);
109 struct multicall_space ret; 109 struct multicall_space ret;
110 unsigned argspace = (args + sizeof(u64) - 1) / sizeof(u64); 110 unsigned argidx = roundup(b->argidx, sizeof(u64));
111 111
112 BUG_ON(preemptible()); 112 BUG_ON(preemptible());
113 BUG_ON(argspace > MC_ARGS); 113 BUG_ON(b->argidx > MC_ARGS);
114 114
115 if (b->mcidx == MC_BATCH || 115 if (b->mcidx == MC_BATCH ||
116 (b->argidx + argspace) > MC_ARGS) 116 (argidx + args) > MC_ARGS) {
117 xen_mc_flush(); 117 xen_mc_flush();
118 argidx = roundup(b->argidx, sizeof(u64));
119 }
118 120
119 ret.mc = &b->entries[b->mcidx]; 121 ret.mc = &b->entries[b->mcidx];
120 b->mcidx++; 122 b->mcidx++;
123 ret.args = &b->args[argidx];
124 b->argidx = argidx + args;
125
126 BUG_ON(b->argidx > MC_ARGS);
127 return ret;
128}
129
130struct multicall_space xen_mc_extend_args(unsigned long op, size_t size)
131{
132 struct mc_buffer *b = &__get_cpu_var(mc_buffer);
133 struct multicall_space ret = { NULL, NULL };
134
135 BUG_ON(preemptible());
136 BUG_ON(b->argidx > MC_ARGS);
137
138 if (b->mcidx == 0)
139 return ret;
140
141 if (b->entries[b->mcidx - 1].op != op)
142 return ret;
143
144 if ((b->argidx + size) > MC_ARGS)
145 return ret;
146
147 ret.mc = &b->entries[b->mcidx - 1];
121 ret.args = &b->args[b->argidx]; 148 ret.args = &b->args[b->argidx];
122 b->argidx += argspace; 149 b->argidx += size;
123 150
151 BUG_ON(b->argidx > MC_ARGS);
124 return ret; 152 return ret;
125} 153}
126 154
diff --git a/arch/x86/xen/multicalls.h b/arch/x86/xen/multicalls.h
index 8bae996d99a3..858938241616 100644
--- a/arch/x86/xen/multicalls.h
+++ b/arch/x86/xen/multicalls.h
@@ -45,4 +45,16 @@ static inline void xen_mc_issue(unsigned mode)
45/* Set up a callback to be called when the current batch is flushed */ 45/* Set up a callback to be called when the current batch is flushed */
46void xen_mc_callback(void (*fn)(void *), void *data); 46void xen_mc_callback(void (*fn)(void *), void *data);
47 47
48/*
49 * Try to extend the arguments of the previous multicall command. The
50 * previous command's op must match. If it does, then it attempts to
51 * extend the argument space allocated to the multicall entry by
52 * arg_size bytes.
53 *
54 * The returned multicall_space will return with mc pointing to the
55 * command on success, or NULL on failure, and args pointing to the
56 * newly allocated space.
57 */
58struct multicall_space xen_mc_extend_args(unsigned long op, size_t arg_size);
59
48#endif /* _XEN_MULTICALLS_H */ 60#endif /* _XEN_MULTICALLS_H */
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index 82517e4a752a..488447878a9d 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -16,6 +16,7 @@
16#include <asm/xen/hypervisor.h> 16#include <asm/xen/hypervisor.h>
17#include <asm/xen/hypercall.h> 17#include <asm/xen/hypercall.h>
18 18
19#include <xen/page.h>
19#include <xen/interface/callback.h> 20#include <xen/interface/callback.h>
20#include <xen/interface/physdev.h> 21#include <xen/interface/physdev.h>
21#include <xen/features.h> 22#include <xen/features.h>
@@ -27,8 +28,6 @@
27extern const char xen_hypervisor_callback[]; 28extern const char xen_hypervisor_callback[];
28extern const char xen_failsafe_callback[]; 29extern const char xen_failsafe_callback[];
29 30
30unsigned long *phys_to_machine_mapping;
31EXPORT_SYMBOL(phys_to_machine_mapping);
32 31
33/** 32/**
34 * machine_specific_memory_setup - Hook for machine specific memory setup. 33 * machine_specific_memory_setup - Hook for machine specific memory setup.
@@ -38,6 +37,8 @@ char * __init xen_memory_setup(void)
38{ 37{
39 unsigned long max_pfn = xen_start_info->nr_pages; 38 unsigned long max_pfn = xen_start_info->nr_pages;
40 39
40 max_pfn = min(MAX_DOMAIN_PAGES, max_pfn);
41
41 e820.nr_map = 0; 42 e820.nr_map = 0;
42 add_memory_region(0, LOWMEMSIZE(), E820_RAM); 43 add_memory_region(0, LOWMEMSIZE(), E820_RAM);
43 add_memory_region(HIGH_MEMORY, PFN_PHYS(max_pfn)-HIGH_MEMORY, E820_RAM); 44 add_memory_region(HIGH_MEMORY, PFN_PHYS(max_pfn)-HIGH_MEMORY, E820_RAM);
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
index 94e69000f982..d2e3c20127d7 100644
--- a/arch/x86/xen/smp.c
+++ b/arch/x86/xen/smp.c
@@ -35,7 +35,7 @@
35#include "xen-ops.h" 35#include "xen-ops.h"
36#include "mmu.h" 36#include "mmu.h"
37 37
38static cpumask_t xen_cpu_initialized_map; 38cpumask_t xen_cpu_initialized_map;
39static DEFINE_PER_CPU(int, resched_irq) = -1; 39static DEFINE_PER_CPU(int, resched_irq) = -1;
40static DEFINE_PER_CPU(int, callfunc_irq) = -1; 40static DEFINE_PER_CPU(int, callfunc_irq) = -1;
41static DEFINE_PER_CPU(int, debug_irq) = -1; 41static DEFINE_PER_CPU(int, debug_irq) = -1;
@@ -65,6 +65,12 @@ static struct call_data_struct *call_data;
65 */ 65 */
66static irqreturn_t xen_reschedule_interrupt(int irq, void *dev_id) 66static irqreturn_t xen_reschedule_interrupt(int irq, void *dev_id)
67{ 67{
68#ifdef CONFIG_X86_32
69 __get_cpu_var(irq_stat).irq_resched_count++;
70#else
71 add_pda(irq_resched_count, 1);
72#endif
73
68 return IRQ_HANDLED; 74 return IRQ_HANDLED;
69} 75}
70 76
diff --git a/arch/x86/xen/suspend.c b/arch/x86/xen/suspend.c
new file mode 100644
index 000000000000..251669a932d4
--- /dev/null
+++ b/arch/x86/xen/suspend.c
@@ -0,0 +1,45 @@
1#include <linux/types.h>
2
3#include <xen/interface/xen.h>
4#include <xen/grant_table.h>
5#include <xen/events.h>
6
7#include <asm/xen/hypercall.h>
8#include <asm/xen/page.h>
9
10#include "xen-ops.h"
11#include "mmu.h"
12
13void xen_pre_suspend(void)
14{
15 xen_start_info->store_mfn = mfn_to_pfn(xen_start_info->store_mfn);
16 xen_start_info->console.domU.mfn =
17 mfn_to_pfn(xen_start_info->console.domU.mfn);
18
19 BUG_ON(!irqs_disabled());
20
21 HYPERVISOR_shared_info = &xen_dummy_shared_info;
22 if (HYPERVISOR_update_va_mapping(fix_to_virt(FIX_PARAVIRT_BOOTMAP),
23 __pte_ma(0), 0))
24 BUG();
25}
26
27void xen_post_suspend(int suspend_cancelled)
28{
29 xen_setup_shared_info();
30
31 if (suspend_cancelled) {
32 xen_start_info->store_mfn =
33 pfn_to_mfn(xen_start_info->store_mfn);
34 xen_start_info->console.domU.mfn =
35 pfn_to_mfn(xen_start_info->console.domU.mfn);
36 } else {
37#ifdef CONFIG_SMP
38 xen_cpu_initialized_map = cpu_online_map;
39#endif
40 xen_vcpu_restore();
41 xen_timer_resume();
42 }
43
44}
45
diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c
index c39e1a5aa241..64f0038b9558 100644
--- a/arch/x86/xen/time.c
+++ b/arch/x86/xen/time.c
@@ -12,7 +12,9 @@
12#include <linux/clocksource.h> 12#include <linux/clocksource.h>
13#include <linux/clockchips.h> 13#include <linux/clockchips.h>
14#include <linux/kernel_stat.h> 14#include <linux/kernel_stat.h>
15#include <linux/math64.h>
15 16
17#include <asm/pvclock.h>
16#include <asm/xen/hypervisor.h> 18#include <asm/xen/hypervisor.h>
17#include <asm/xen/hypercall.h> 19#include <asm/xen/hypercall.h>
18 20
@@ -30,17 +32,6 @@
30 32
31static cycle_t xen_clocksource_read(void); 33static cycle_t xen_clocksource_read(void);
32 34
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 */ 35/* runstate info updated by Xen */
45static DEFINE_PER_CPU(struct vcpu_runstate_info, runstate); 36static DEFINE_PER_CPU(struct vcpu_runstate_info, runstate);
46 37
@@ -150,11 +141,7 @@ static void do_stolen_accounting(void)
150 if (stolen < 0) 141 if (stolen < 0)
151 stolen = 0; 142 stolen = 0;
152 143
153 ticks = 0; 144 ticks = iter_div_u64_rem(stolen, NS_PER_TICK, &stolen);
154 while (stolen >= NS_PER_TICK) {
155 ticks++;
156 stolen -= NS_PER_TICK;
157 }
158 __get_cpu_var(residual_stolen) = stolen; 145 __get_cpu_var(residual_stolen) = stolen;
159 account_steal_time(NULL, ticks); 146 account_steal_time(NULL, ticks);
160 147
@@ -166,11 +153,7 @@ static void do_stolen_accounting(void)
166 if (blocked < 0) 153 if (blocked < 0)
167 blocked = 0; 154 blocked = 0;
168 155
169 ticks = 0; 156 ticks = iter_div_u64_rem(blocked, NS_PER_TICK, &blocked);
170 while (blocked >= NS_PER_TICK) {
171 ticks++;
172 blocked -= NS_PER_TICK;
173 }
174 __get_cpu_var(residual_blocked) = blocked; 157 __get_cpu_var(residual_blocked) = blocked;
175 account_steal_time(idle_task(smp_processor_id()), ticks); 158 account_steal_time(idle_task(smp_processor_id()), ticks);
176} 159}
@@ -218,7 +201,7 @@ unsigned long long xen_sched_clock(void)
218unsigned long xen_cpu_khz(void) 201unsigned long xen_cpu_khz(void)
219{ 202{
220 u64 xen_khz = 1000000ULL << 32; 203 u64 xen_khz = 1000000ULL << 32;
221 const struct vcpu_time_info *info = 204 const struct pvclock_vcpu_time_info *info =
222 &HYPERVISOR_shared_info->vcpu_info[0].time; 205 &HYPERVISOR_shared_info->vcpu_info[0].time;
223 206
224 do_div(xen_khz, info->tsc_to_system_mul); 207 do_div(xen_khz, info->tsc_to_system_mul);
@@ -230,121 +213,26 @@ unsigned long xen_cpu_khz(void)
230 return xen_khz; 213 return xen_khz;
231} 214}
232 215
233/*
234 * Reads a consistent set of time-base values from Xen, into a shadow data
235 * area.
236 */
237static unsigned get_time_values_from_xen(void)
238{
239 struct vcpu_time_info *src;
240 struct shadow_time_info *dst;
241
242 /* src is shared memory with the hypervisor, so we need to
243 make sure we get a consistent snapshot, even in the face of
244 being preempted. */
245 src = &__get_cpu_var(xen_vcpu)->time;
246 dst = &__get_cpu_var(shadow_time);
247
248 do {
249 dst->version = src->version;
250 rmb(); /* fetch version before data */
251 dst->tsc_timestamp = src->tsc_timestamp;
252 dst->system_timestamp = src->system_time;
253 dst->tsc_to_nsec_mul = src->tsc_to_system_mul;
254 dst->tsc_shift = src->tsc_shift;
255 rmb(); /* test version after fetching data */
256 } while ((src->version & 1) | (dst->version ^ src->version));
257
258 return dst->version;
259}
260
261/*
262 * Scale a 64-bit delta by scaling and multiplying by a 32-bit fraction,
263 * yielding a 64-bit result.
264 */
265static inline u64 scale_delta(u64 delta, u32 mul_frac, int shift)
266{
267 u64 product;
268#ifdef __i386__
269 u32 tmp1, tmp2;
270#endif
271
272 if (shift < 0)
273 delta >>= -shift;
274 else
275 delta <<= shift;
276
277#ifdef __i386__
278 __asm__ (
279 "mul %5 ; "
280 "mov %4,%%eax ; "
281 "mov %%edx,%4 ; "
282 "mul %5 ; "
283 "xor %5,%5 ; "
284 "add %4,%%eax ; "
285 "adc %5,%%edx ; "
286 : "=A" (product), "=r" (tmp1), "=r" (tmp2)
287 : "a" ((u32)delta), "1" ((u32)(delta >> 32)), "2" (mul_frac) );
288#elif __x86_64__
289 __asm__ (
290 "mul %%rdx ; shrd $32,%%rdx,%%rax"
291 : "=a" (product) : "0" (delta), "d" ((u64)mul_frac) );
292#else
293#error implement me!
294#endif
295
296 return product;
297}
298
299static u64 get_nsec_offset(struct shadow_time_info *shadow)
300{
301 u64 now, delta;
302 now = native_read_tsc();
303 delta = now - shadow->tsc_timestamp;
304 return scale_delta(delta, shadow->tsc_to_nsec_mul, shadow->tsc_shift);
305}
306
307static cycle_t xen_clocksource_read(void) 216static cycle_t xen_clocksource_read(void)
308{ 217{
309 struct shadow_time_info *shadow = &get_cpu_var(shadow_time); 218 struct pvclock_vcpu_time_info *src;
310 cycle_t ret; 219 cycle_t ret;
311 unsigned version;
312
313 do {
314 version = get_time_values_from_xen();
315 barrier();
316 ret = shadow->system_timestamp + get_nsec_offset(shadow);
317 barrier();
318 } while (version != __get_cpu_var(xen_vcpu)->time.version);
319
320 put_cpu_var(shadow_time);
321 220
221 src = &get_cpu_var(xen_vcpu)->time;
222 ret = pvclock_clocksource_read(src);
223 put_cpu_var(xen_vcpu);
322 return ret; 224 return ret;
323} 225}
324 226
325static void xen_read_wallclock(struct timespec *ts) 227static void xen_read_wallclock(struct timespec *ts)
326{ 228{
327 const struct shared_info *s = HYPERVISOR_shared_info; 229 struct shared_info *s = HYPERVISOR_shared_info;
328 u32 version; 230 struct pvclock_wall_clock *wall_clock = &(s->wc);
329 u64 delta; 231 struct pvclock_vcpu_time_info *vcpu_time;
330 struct timespec now;
331
332 /* get wallclock at system boot */
333 do {
334 version = s->wc_version;
335 rmb(); /* fetch version before time */
336 now.tv_sec = s->wc_sec;
337 now.tv_nsec = s->wc_nsec;
338 rmb(); /* fetch time before checking version */
339 } while ((s->wc_version & 1) | (version ^ s->wc_version));
340
341 delta = xen_clocksource_read(); /* time since system boot */
342 delta += now.tv_sec * (u64)NSEC_PER_SEC + now.tv_nsec;
343
344 now.tv_nsec = do_div(delta, NSEC_PER_SEC);
345 now.tv_sec = delta;
346 232
347 set_normalized_timespec(ts, now.tv_sec, now.tv_nsec); 233 vcpu_time = &get_cpu_var(xen_vcpu)->time;
234 pvclock_read_wallclock(wall_clock, vcpu_time, ts);
235 put_cpu_var(xen_vcpu);
348} 236}
349 237
350unsigned long xen_get_wallclock(void) 238unsigned long xen_get_wallclock(void)
@@ -352,7 +240,6 @@ unsigned long xen_get_wallclock(void)
352 struct timespec ts; 240 struct timespec ts;
353 241
354 xen_read_wallclock(&ts); 242 xen_read_wallclock(&ts);
355
356 return ts.tv_sec; 243 return ts.tv_sec;
357} 244}
358 245
@@ -572,12 +459,23 @@ void xen_setup_cpu_clockevents(void)
572 clockevents_register_device(&__get_cpu_var(xen_clock_events)); 459 clockevents_register_device(&__get_cpu_var(xen_clock_events));
573} 460}
574 461
462void xen_timer_resume(void)
463{
464 int cpu;
465
466 if (xen_clockevent != &xen_vcpuop_clockevent)
467 return;
468
469 for_each_online_cpu(cpu) {
470 if (HYPERVISOR_vcpu_op(VCPUOP_stop_periodic_timer, cpu, NULL))
471 BUG();
472 }
473}
474
575__init void xen_time_init(void) 475__init void xen_time_init(void)
576{ 476{
577 int cpu = smp_processor_id(); 477 int cpu = smp_processor_id();
578 478
579 get_time_values_from_xen();
580
581 clocksource_register(&xen_clocksource); 479 clocksource_register(&xen_clocksource);
582 480
583 if (HYPERVISOR_vcpu_op(VCPUOP_stop_periodic_timer, cpu, NULL) == 0) { 481 if (HYPERVISOR_vcpu_op(VCPUOP_stop_periodic_timer, cpu, NULL) == 0) {
diff --git a/arch/x86/xen/xen-head.S b/arch/x86/xen/xen-head.S
index 288d587ce73c..7c0cf6320a0a 100644
--- a/arch/x86/xen/xen-head.S
+++ b/arch/x86/xen/xen-head.S
@@ -7,6 +7,7 @@
7#include <linux/init.h> 7#include <linux/init.h>
8#include <asm/boot.h> 8#include <asm/boot.h>
9#include <xen/interface/elfnote.h> 9#include <xen/interface/elfnote.h>
10#include <asm/xen/interface.h>
10 11
11 __INIT 12 __INIT
12ENTRY(startup_xen) 13ENTRY(startup_xen)
@@ -17,7 +18,7 @@ ENTRY(startup_xen)
17 18
18 __FINIT 19 __FINIT
19 20
20.pushsection .bss.page_aligned 21.pushsection .text
21 .align PAGE_SIZE_asm 22 .align PAGE_SIZE_asm
22ENTRY(hypercall_page) 23ENTRY(hypercall_page)
23 .skip 0x1000 24 .skip 0x1000
@@ -30,11 +31,11 @@ ENTRY(hypercall_page)
30 ELFNOTE(Xen, XEN_ELFNOTE_ENTRY, .long startup_xen) 31 ELFNOTE(Xen, XEN_ELFNOTE_ENTRY, .long startup_xen)
31 ELFNOTE(Xen, XEN_ELFNOTE_HYPERCALL_PAGE, .long hypercall_page) 32 ELFNOTE(Xen, XEN_ELFNOTE_HYPERCALL_PAGE, .long hypercall_page)
32 ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .asciz "!writable_page_tables|pae_pgdir_above_4gb") 33 ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .asciz "!writable_page_tables|pae_pgdir_above_4gb")
33#ifdef CONFIG_X86_PAE
34 ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE, .asciz "yes") 34 ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE, .asciz "yes")
35#else
36 ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE, .asciz "no")
37#endif
38 ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz "generic") 35 ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz "generic")
36 ELFNOTE(Xen, XEN_ELFNOTE_L1_MFN_VALID,
37 .quad _PAGE_PRESENT; .quad _PAGE_PRESENT)
38 ELFNOTE(Xen, XEN_ELFNOTE_SUSPEND_CANCEL, .long 1)
39 ELFNOTE(Xen, XEN_ELFNOTE_HV_START_LOW, .long __HYPERVISOR_VIRT_START)
39 40
40#endif /*CONFIG_XEN */ 41#endif /*CONFIG_XEN */
diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
index f1063ae08037..9a055592a307 100644
--- a/arch/x86/xen/xen-ops.h
+++ b/arch/x86/xen/xen-ops.h
@@ -9,18 +9,26 @@
9extern const char xen_hypervisor_callback[]; 9extern const char xen_hypervisor_callback[];
10extern const char xen_failsafe_callback[]; 10extern const char xen_failsafe_callback[];
11 11
12struct trap_info;
12void xen_copy_trap_info(struct trap_info *traps); 13void xen_copy_trap_info(struct trap_info *traps);
13 14
14DECLARE_PER_CPU(unsigned long, xen_cr3); 15DECLARE_PER_CPU(unsigned long, xen_cr3);
15DECLARE_PER_CPU(unsigned long, xen_current_cr3); 16DECLARE_PER_CPU(unsigned long, xen_current_cr3);
16 17
17extern struct start_info *xen_start_info; 18extern struct start_info *xen_start_info;
19extern struct shared_info xen_dummy_shared_info;
18extern struct shared_info *HYPERVISOR_shared_info; 20extern struct shared_info *HYPERVISOR_shared_info;
19 21
22void xen_setup_mfn_list_list(void);
23void xen_setup_shared_info(void);
24
20char * __init xen_memory_setup(void); 25char * __init xen_memory_setup(void);
21void __init xen_arch_setup(void); 26void __init xen_arch_setup(void);
22void __init xen_init_IRQ(void); 27void __init xen_init_IRQ(void);
23void xen_enable_sysenter(void); 28void xen_enable_sysenter(void);
29void xen_vcpu_restore(void);
30
31void __init xen_build_dynamic_phys_to_machine(void);
24 32
25void xen_setup_timer(int cpu); 33void xen_setup_timer(int cpu);
26void xen_setup_cpu_clockevents(void); 34void xen_setup_cpu_clockevents(void);
@@ -29,6 +37,7 @@ void __init xen_time_init(void);
29unsigned long xen_get_wallclock(void); 37unsigned long xen_get_wallclock(void);
30int xen_set_wallclock(unsigned long time); 38int xen_set_wallclock(unsigned long time);
31unsigned long long xen_sched_clock(void); 39unsigned long long xen_sched_clock(void);
40void xen_timer_resume(void);
32 41
33irqreturn_t xen_debug_interrupt(int irq, void *dev_id); 42irqreturn_t xen_debug_interrupt(int irq, void *dev_id);
34 43
@@ -54,6 +63,8 @@ int xen_smp_call_function_single(int cpu, void (*func) (void *info), void *info,
54int xen_smp_call_function_mask(cpumask_t mask, void (*func)(void *), 63int xen_smp_call_function_mask(cpumask_t mask, void (*func)(void *),
55 void *info, int wait); 64 void *info, int wait);
56 65
66extern cpumask_t xen_cpu_initialized_map;
67
57 68
58/* Declare an asm function, along with symbols needed to make it 69/* Declare an asm function, along with symbols needed to make it
59 inlineable */ 70 inlineable */
diff --git a/block/as-iosched.c b/block/as-iosched.c
index 8c3946787dbb..743f33a01a07 100644
--- a/block/as-iosched.c
+++ b/block/as-iosched.c
@@ -831,6 +831,8 @@ static void as_completed_request(struct request_queue *q, struct request *rq)
831 } 831 }
832 832
833 if (ad->changed_batch && ad->nr_dispatched == 1) { 833 if (ad->changed_batch && ad->nr_dispatched == 1) {
834 ad->current_batch_expires = jiffies +
835 ad->batch_expire[ad->batch_data_dir];
834 kblockd_schedule_work(&ad->antic_work); 836 kblockd_schedule_work(&ad->antic_work);
835 ad->changed_batch = 0; 837 ad->changed_batch = 0;
836 838
diff --git a/block/blk-core.c b/block/blk-core.c
index 6a9cc0d22a61..1905aaba49fb 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -806,35 +806,32 @@ static struct request *get_request_wait(struct request_queue *q, int rw_flags,
806 rq = get_request(q, rw_flags, bio, GFP_NOIO); 806 rq = get_request(q, rw_flags, bio, GFP_NOIO);
807 while (!rq) { 807 while (!rq) {
808 DEFINE_WAIT(wait); 808 DEFINE_WAIT(wait);
809 struct io_context *ioc;
809 struct request_list *rl = &q->rq; 810 struct request_list *rl = &q->rq;
810 811
811 prepare_to_wait_exclusive(&rl->wait[rw], &wait, 812 prepare_to_wait_exclusive(&rl->wait[rw], &wait,
812 TASK_UNINTERRUPTIBLE); 813 TASK_UNINTERRUPTIBLE);
813 814
814 rq = get_request(q, rw_flags, bio, GFP_NOIO); 815 blk_add_trace_generic(q, bio, rw, BLK_TA_SLEEPRQ);
815
816 if (!rq) {
817 struct io_context *ioc;
818 816
819 blk_add_trace_generic(q, bio, rw, BLK_TA_SLEEPRQ); 817 __generic_unplug_device(q);
820 818 spin_unlock_irq(q->queue_lock);
821 __generic_unplug_device(q); 819 io_schedule();
822 spin_unlock_irq(q->queue_lock);
823 io_schedule();
824 820
825 /* 821 /*
826 * After sleeping, we become a "batching" process and 822 * After sleeping, we become a "batching" process and
827 * will be able to allocate at least one request, and 823 * will be able to allocate at least one request, and
828 * up to a big batch of them for a small period time. 824 * up to a big batch of them for a small period time.
829 * See ioc_batching, ioc_set_batching 825 * See ioc_batching, ioc_set_batching
830 */ 826 */
831 ioc = current_io_context(GFP_NOIO, q->node); 827 ioc = current_io_context(GFP_NOIO, q->node);
832 ioc_set_batching(q, ioc); 828 ioc_set_batching(q, ioc);
833 829
834 spin_lock_irq(q->queue_lock); 830 spin_lock_irq(q->queue_lock);
835 }
836 finish_wait(&rl->wait[rw], &wait); 831 finish_wait(&rl->wait[rw], &wait);
837 } 832
833 rq = get_request(q, rw_flags, bio, GFP_NOIO);
834 };
838 835
839 return rq; 836 return rq;
840} 837}
diff --git a/block/blktrace.c b/block/blktrace.c
index b2cbb4e5d767..8d3a27780260 100644
--- a/block/blktrace.c
+++ b/block/blktrace.c
@@ -75,6 +75,24 @@ static void trace_note_time(struct blk_trace *bt)
75 local_irq_restore(flags); 75 local_irq_restore(flags);
76} 76}
77 77
78void __trace_note_message(struct blk_trace *bt, const char *fmt, ...)
79{
80 int n;
81 va_list args;
82 unsigned long flags;
83 char *buf;
84
85 local_irq_save(flags);
86 buf = per_cpu_ptr(bt->msg_data, smp_processor_id());
87 va_start(args, fmt);
88 n = vscnprintf(buf, BLK_TN_MAX_MSG, fmt, args);
89 va_end(args);
90
91 trace_note(bt, 0, BLK_TN_MESSAGE, buf, n);
92 local_irq_restore(flags);
93}
94EXPORT_SYMBOL_GPL(__trace_note_message);
95
78static int act_log_check(struct blk_trace *bt, u32 what, sector_t sector, 96static int act_log_check(struct blk_trace *bt, u32 what, sector_t sector,
79 pid_t pid) 97 pid_t pid)
80{ 98{
@@ -141,10 +159,7 @@ void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes,
141 /* 159 /*
142 * A word about the locking here - we disable interrupts to reserve 160 * A word about the locking here - we disable interrupts to reserve
143 * some space in the relay per-cpu buffer, to prevent an irq 161 * some space in the relay per-cpu buffer, to prevent an irq
144 * from coming in and stepping on our toes. Once reserved, it's 162 * from coming in and stepping on our toes.
145 * enough to get preemption disabled to prevent read of this data
146 * before we are through filling it. get_cpu()/put_cpu() does this
147 * for us
148 */ 163 */
149 local_irq_save(flags); 164 local_irq_save(flags);
150 165
@@ -232,6 +247,7 @@ static void blk_trace_cleanup(struct blk_trace *bt)
232 debugfs_remove(bt->dropped_file); 247 debugfs_remove(bt->dropped_file);
233 blk_remove_tree(bt->dir); 248 blk_remove_tree(bt->dir);
234 free_percpu(bt->sequence); 249 free_percpu(bt->sequence);
250 free_percpu(bt->msg_data);
235 kfree(bt); 251 kfree(bt);
236} 252}
237 253
@@ -346,6 +362,10 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
346 if (!bt->sequence) 362 if (!bt->sequence)
347 goto err; 363 goto err;
348 364
365 bt->msg_data = __alloc_percpu(BLK_TN_MAX_MSG);
366 if (!bt->msg_data)
367 goto err;
368
349 ret = -ENOENT; 369 ret = -ENOENT;
350 dir = blk_create_tree(buts->name); 370 dir = blk_create_tree(buts->name);
351 if (!dir) 371 if (!dir)
@@ -392,6 +412,7 @@ err:
392 if (bt->dropped_file) 412 if (bt->dropped_file)
393 debugfs_remove(bt->dropped_file); 413 debugfs_remove(bt->dropped_file);
394 free_percpu(bt->sequence); 414 free_percpu(bt->sequence);
415 free_percpu(bt->msg_data);
395 if (bt->rchan) 416 if (bt->rchan)
396 relay_close(bt->rchan); 417 relay_close(bt->rchan);
397 kfree(bt); 418 kfree(bt);
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index b399c62936e0..d01b411c72f0 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -124,6 +124,8 @@ struct cfq_data {
124struct cfq_queue { 124struct cfq_queue {
125 /* reference count */ 125 /* reference count */
126 atomic_t ref; 126 atomic_t ref;
127 /* various state flags, see below */
128 unsigned int flags;
127 /* parent cfq_data */ 129 /* parent cfq_data */
128 struct cfq_data *cfqd; 130 struct cfq_data *cfqd;
129 /* service_tree member */ 131 /* service_tree member */
@@ -138,14 +140,14 @@ struct cfq_queue {
138 int queued[2]; 140 int queued[2];
139 /* currently allocated requests */ 141 /* currently allocated requests */
140 int allocated[2]; 142 int allocated[2];
141 /* pending metadata requests */
142 int meta_pending;
143 /* fifo list of requests in sort_list */ 143 /* fifo list of requests in sort_list */
144 struct list_head fifo; 144 struct list_head fifo;
145 145
146 unsigned long slice_end; 146 unsigned long slice_end;
147 long slice_resid; 147 long slice_resid;
148 148
149 /* pending metadata requests */
150 int meta_pending;
149 /* number of requests that are on the dispatch list or inside driver */ 151 /* number of requests that are on the dispatch list or inside driver */
150 int dispatched; 152 int dispatched;
151 153
@@ -153,8 +155,6 @@ struct cfq_queue {
153 unsigned short ioprio, org_ioprio; 155 unsigned short ioprio, org_ioprio;
154 unsigned short ioprio_class, org_ioprio_class; 156 unsigned short ioprio_class, org_ioprio_class;
155 157
156 /* various state flags, see below */
157 unsigned int flags;
158}; 158};
159 159
160enum cfqq_state_flags { 160enum cfqq_state_flags {
@@ -1142,6 +1142,9 @@ static void cfq_put_queue(struct cfq_queue *cfqq)
1142 kmem_cache_free(cfq_pool, cfqq); 1142 kmem_cache_free(cfq_pool, cfqq);
1143} 1143}
1144 1144
1145/*
1146 * Must always be called with the rcu_read_lock() held
1147 */
1145static void 1148static void
1146__call_for_each_cic(struct io_context *ioc, 1149__call_for_each_cic(struct io_context *ioc,
1147 void (*func)(struct io_context *, struct cfq_io_context *)) 1150 void (*func)(struct io_context *, struct cfq_io_context *))
@@ -1197,6 +1200,11 @@ static void cic_free_func(struct io_context *ioc, struct cfq_io_context *cic)
1197 cfq_cic_free(cic); 1200 cfq_cic_free(cic);
1198} 1201}
1199 1202
1203/*
1204 * Must be called with rcu_read_lock() held or preemption otherwise disabled.
1205 * Only two callers of this - ->dtor() which is called with the rcu_read_lock(),
1206 * and ->trim() which is called with the task lock held
1207 */
1200static void cfq_free_io_context(struct io_context *ioc) 1208static void cfq_free_io_context(struct io_context *ioc)
1201{ 1209{
1202 /* 1210 /*
@@ -1502,20 +1510,24 @@ static struct cfq_io_context *
1502cfq_cic_lookup(struct cfq_data *cfqd, struct io_context *ioc) 1510cfq_cic_lookup(struct cfq_data *cfqd, struct io_context *ioc)
1503{ 1511{
1504 struct cfq_io_context *cic; 1512 struct cfq_io_context *cic;
1513 unsigned long flags;
1505 void *k; 1514 void *k;
1506 1515
1507 if (unlikely(!ioc)) 1516 if (unlikely(!ioc))
1508 return NULL; 1517 return NULL;
1509 1518
1519 rcu_read_lock();
1520
1510 /* 1521 /*
1511 * we maintain a last-hit cache, to avoid browsing over the tree 1522 * we maintain a last-hit cache, to avoid browsing over the tree
1512 */ 1523 */
1513 cic = rcu_dereference(ioc->ioc_data); 1524 cic = rcu_dereference(ioc->ioc_data);
1514 if (cic && cic->key == cfqd) 1525 if (cic && cic->key == cfqd) {
1526 rcu_read_unlock();
1515 return cic; 1527 return cic;
1528 }
1516 1529
1517 do { 1530 do {
1518 rcu_read_lock();
1519 cic = radix_tree_lookup(&ioc->radix_root, (unsigned long) cfqd); 1531 cic = radix_tree_lookup(&ioc->radix_root, (unsigned long) cfqd);
1520 rcu_read_unlock(); 1532 rcu_read_unlock();
1521 if (!cic) 1533 if (!cic)
@@ -1524,10 +1536,13 @@ cfq_cic_lookup(struct cfq_data *cfqd, struct io_context *ioc)
1524 k = cic->key; 1536 k = cic->key;
1525 if (unlikely(!k)) { 1537 if (unlikely(!k)) {
1526 cfq_drop_dead_cic(cfqd, ioc, cic); 1538 cfq_drop_dead_cic(cfqd, ioc, cic);
1539 rcu_read_lock();
1527 continue; 1540 continue;
1528 } 1541 }
1529 1542
1543 spin_lock_irqsave(&ioc->lock, flags);
1530 rcu_assign_pointer(ioc->ioc_data, cic); 1544 rcu_assign_pointer(ioc->ioc_data, cic);
1545 spin_unlock_irqrestore(&ioc->lock, flags);
1531 break; 1546 break;
1532 } while (1); 1547 } while (1);
1533 1548
@@ -2134,6 +2149,10 @@ static void *cfq_init_queue(struct request_queue *q)
2134 2149
2135static void cfq_slab_kill(void) 2150static void cfq_slab_kill(void)
2136{ 2151{
2152 /*
2153 * Caller already ensured that pending RCU callbacks are completed,
2154 * so we should have no busy allocations at this point.
2155 */
2137 if (cfq_pool) 2156 if (cfq_pool)
2138 kmem_cache_destroy(cfq_pool); 2157 kmem_cache_destroy(cfq_pool);
2139 if (cfq_ioc_pool) 2158 if (cfq_ioc_pool)
@@ -2292,6 +2311,11 @@ static void __exit cfq_exit(void)
2292 ioc_gone = &all_gone; 2311 ioc_gone = &all_gone;
2293 /* ioc_gone's update must be visible before reading ioc_count */ 2312 /* ioc_gone's update must be visible before reading ioc_count */
2294 smp_wmb(); 2313 smp_wmb();
2314
2315 /*
2316 * this also protects us from entering cfq_slab_kill() with
2317 * pending RCU callbacks
2318 */
2295 if (elv_ioc_count_read(ioc_count)) 2319 if (elv_ioc_count_read(ioc_count))
2296 wait_for_completion(ioc_gone); 2320 wait_for_completion(ioc_gone);
2297 cfq_slab_kill(); 2321 cfq_slab_kill();
diff --git a/block/elevator.c b/block/elevator.c
index 980f8ae147b4..902dd1344d56 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -1110,6 +1110,8 @@ static int elevator_switch(struct request_queue *q, struct elevator_type *new_e)
1110 queue_flag_clear(QUEUE_FLAG_ELVSWITCH, q); 1110 queue_flag_clear(QUEUE_FLAG_ELVSWITCH, q);
1111 spin_unlock_irq(q->queue_lock); 1111 spin_unlock_irq(q->queue_lock);
1112 1112
1113 blk_add_trace_msg(q, "elv switch: %s", e->elevator_type->elevator_name);
1114
1113 return 1; 1115 return 1;
1114 1116
1115fail_register: 1117fail_register:
diff --git a/block/genhd.c b/block/genhd.c
index 129ad939f9dd..b922d4801c87 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -660,6 +660,8 @@ dev_t blk_lookup_devt(const char *name, int part)
660 660
661 mutex_lock(&block_class_lock); 661 mutex_lock(&block_class_lock);
662 list_for_each_entry(dev, &block_class.devices, node) { 662 list_for_each_entry(dev, &block_class.devices, node) {
663 if (dev->type != &disk_type)
664 continue;
663 if (strcmp(dev->bus_id, name) == 0) { 665 if (strcmp(dev->bus_id, name) == 0) {
664 struct gendisk *disk = dev_to_disk(dev); 666 struct gendisk *disk = dev_to_disk(dev);
665 667
diff --git a/crypto/cts.c b/crypto/cts.c
index c4e70bfb4970..ccf9c5de3958 100644
--- a/crypto/cts.c
+++ b/crypto/cts.c
@@ -89,6 +89,9 @@ static int cts_cbc_encrypt(struct crypto_cts_ctx *ctx,
89 if (lastn < 0) 89 if (lastn < 0)
90 return -EINVAL; 90 return -EINVAL;
91 91
92 sg_init_table(sgsrc, 1);
93 sg_init_table(sgdst, 1);
94
92 memset(s, 0, sizeof(s)); 95 memset(s, 0, sizeof(s));
93 scatterwalk_map_and_copy(s, src, offset, nbytes, 0); 96 scatterwalk_map_and_copy(s, src, offset, nbytes, 0);
94 97
@@ -172,6 +175,9 @@ static int cts_cbc_decrypt(struct crypto_cts_ctx *ctx,
172 if (lastn < 0) 175 if (lastn < 0)
173 return -EINVAL; 176 return -EINVAL;
174 177
178 sg_init_table(sgsrc, 1);
179 sg_init_table(sgdst, 1);
180
175 scatterwalk_map_and_copy(s, src, offset, nbytes, 0); 181 scatterwalk_map_and_copy(s, src, offset, nbytes, 0);
176 182
177 lcldesc.tfm = ctx->child; 183 lcldesc.tfm = ctx->child;
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
index 5b73f6a2cd86..831883b7d6c9 100644
--- a/drivers/acpi/ac.c
+++ b/drivers/acpi/ac.c
@@ -233,6 +233,9 @@ static void acpi_ac_notify(acpi_handle handle, u32 event, void *data)
233 233
234 device = ac->device; 234 device = ac->device;
235 switch (event) { 235 switch (event) {
236 default:
237 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
238 "Unsupported event [0x%x]\n", event));
236 case ACPI_AC_NOTIFY_STATUS: 239 case ACPI_AC_NOTIFY_STATUS:
237 case ACPI_NOTIFY_BUS_CHECK: 240 case ACPI_NOTIFY_BUS_CHECK:
238 case ACPI_NOTIFY_DEVICE_CHECK: 241 case ACPI_NOTIFY_DEVICE_CHECK:
@@ -244,11 +247,6 @@ static void acpi_ac_notify(acpi_handle handle, u32 event, void *data)
244#ifdef CONFIG_ACPI_SYSFS_POWER 247#ifdef CONFIG_ACPI_SYSFS_POWER
245 kobject_uevent(&ac->charger.dev->kobj, KOBJ_CHANGE); 248 kobject_uevent(&ac->charger.dev->kobj, KOBJ_CHANGE);
246#endif 249#endif
247 break;
248 default:
249 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
250 "Unsupported event [0x%x]\n", event));
251 break;
252 } 250 }
253 251
254 return; 252 return;
diff --git a/drivers/acpi/bay.c b/drivers/acpi/bay.c
index d2fc94161848..61b6c5beb2d3 100644
--- a/drivers/acpi/bay.c
+++ b/drivers/acpi/bay.c
@@ -301,16 +301,20 @@ static int bay_add(acpi_handle handle, int id)
301 */ 301 */
302 pdev->dev.uevent_suppress = 0; 302 pdev->dev.uevent_suppress = 0;
303 303
304 if (acpi_bay_add_fs(new_bay)) {
305 platform_device_unregister(new_bay->pdev);
306 goto bay_add_err;
307 }
308
309 /* register for events on this device */ 304 /* register for events on this device */
310 status = acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY, 305 status = acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY,
311 bay_notify, new_bay); 306 bay_notify, new_bay);
312 if (ACPI_FAILURE(status)) { 307 if (ACPI_FAILURE(status)) {
313 printk(KERN_ERR PREFIX "Error installing bay notify handler\n"); 308 printk(KERN_INFO PREFIX "Error installing bay notify handler\n");
309 platform_device_unregister(new_bay->pdev);
310 goto bay_add_err;
311 }
312
313 if (acpi_bay_add_fs(new_bay)) {
314 acpi_remove_notify_handler(handle, ACPI_SYSTEM_NOTIFY,
315 bay_notify);
316 platform_device_unregister(new_bay->pdev);
317 goto bay_add_err;
314 } 318 }
315 319
316 /* if we are on a dock station, we should register for dock 320 /* if we are on a dock station, we should register for dock
@@ -373,6 +377,9 @@ static int __init bay_init(void)
373 377
374 INIT_LIST_HEAD(&drive_bays); 378 INIT_LIST_HEAD(&drive_bays);
375 379
380 if (acpi_disabled)
381 return -ENODEV;
382
376 /* look for dockable drive bays */ 383 /* look for dockable drive bays */
377 acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, 384 acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
378 ACPI_UINT32_MAX, find_bay, &bays, NULL); 385 ACPI_UINT32_MAX, find_bay, &bays, NULL);
diff --git a/drivers/acpi/dispatcher/dsfield.c b/drivers/acpi/dispatcher/dsfield.c
index c78078315be9..f988a5e7d2b4 100644
--- a/drivers/acpi/dispatcher/dsfield.c
+++ b/drivers/acpi/dispatcher/dsfield.c
@@ -450,10 +450,6 @@ acpi_ds_init_field_objects(union acpi_parse_object *op,
450 return_ACPI_STATUS(AE_BAD_PARAMETER); 450 return_ACPI_STATUS(AE_BAD_PARAMETER);
451 } 451 }
452 452
453 if (!arg) {
454 return_ACPI_STATUS(AE_AML_NO_OPERAND);
455 }
456
457 /* Creating new namespace node(s), should not already exist */ 453 /* Creating new namespace node(s), should not already exist */
458 454
459 flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | 455 flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE |
@@ -467,6 +463,7 @@ acpi_ds_init_field_objects(union acpi_parse_object *op,
467 463
468 /* 464 /*
469 * Walk the list of entries in the field_list 465 * Walk the list of entries in the field_list
466 * Note: field_list can be of zero length. In this case, Arg will be NULL.
470 */ 467 */
471 while (arg) { 468 while (arg) {
472 /* 469 /*
diff --git a/drivers/acpi/dispatcher/dsmethod.c b/drivers/acpi/dispatcher/dsmethod.c
index e48a3ea03117..2509809a36cf 100644
--- a/drivers/acpi/dispatcher/dsmethod.c
+++ b/drivers/acpi/dispatcher/dsmethod.c
@@ -565,7 +565,7 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
565 565
566 acpi_os_release_mutex(method_desc->method. 566 acpi_os_release_mutex(method_desc->method.
567 mutex->mutex.os_mutex); 567 mutex->mutex.os_mutex);
568 method_desc->method.mutex->mutex.thread_id = 0; 568 method_desc->method.mutex->mutex.thread_id = NULL;
569 } 569 }
570 } 570 }
571 571
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index fa44fb96fc34..bb7c51f712bd 100644
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -834,7 +834,7 @@ static int dock_add(acpi_handle handle)
834 goto dock_add_err; 834 goto dock_add_err;
835 } 835 }
836 836
837 printk(KERN_INFO PREFIX "%s \n", ACPI_DOCK_DRIVER_DESCRIPTION); 837 printk(KERN_INFO PREFIX "%s\n", ACPI_DOCK_DRIVER_DESCRIPTION);
838 838
839 return 0; 839 return 0;
840 840
@@ -917,6 +917,9 @@ static int __init dock_init(void)
917 917
918 dock_station = NULL; 918 dock_station = NULL;
919 919
920 if (acpi_disabled)
921 return 0;
922
920 /* look for a dock station */ 923 /* look for a dock station */
921 acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, 924 acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
922 ACPI_UINT32_MAX, find_dock, &num, NULL); 925 ACPI_UINT32_MAX, find_dock, &num, NULL);
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 0924992187e8..5622aee996b2 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -194,7 +194,7 @@ static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll)
194 while (time_before(jiffies, delay)) { 194 while (time_before(jiffies, delay)) {
195 if (acpi_ec_check_status(ec, event)) 195 if (acpi_ec_check_status(ec, event))
196 return 0; 196 return 0;
197 udelay(ACPI_EC_UDELAY); 197 msleep(1);
198 } 198 }
199 } 199 }
200 pr_err(PREFIX "acpi_ec_wait timeout, status = 0x%2.2x, event = %s\n", 200 pr_err(PREFIX "acpi_ec_wait timeout, status = 0x%2.2x, event = %s\n",
diff --git a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c
index 24da921d13e3..39d742190584 100644
--- a/drivers/acpi/executer/exconfig.c
+++ b/drivers/acpi/executer/exconfig.c
@@ -375,9 +375,15 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
375 goto cleanup; 375 goto cleanup;
376 } 376 }
377 377
378 /*
379 * Add the table to the namespace.
380 *
381 * Note: We load the table objects relative to the root of the namespace.
382 * This appears to go against the ACPI specification, but we do it for
383 * compatibility with other ACPI implementations.
384 */
378 status = 385 status =
379 acpi_ex_add_table(table_index, walk_state->scope_info->scope.node, 386 acpi_ex_add_table(table_index, acpi_gbl_root_node, &ddb_handle);
380 &ddb_handle);
381 if (ACPI_FAILURE(status)) { 387 if (ACPI_FAILURE(status)) {
382 388
383 /* On error, table_ptr was deallocated above */ 389 /* On error, table_ptr was deallocated above */
diff --git a/drivers/acpi/executer/exmutex.c b/drivers/acpi/executer/exmutex.c
index c873ab40cd0e..a8bf3d713e28 100644
--- a/drivers/acpi/executer/exmutex.c
+++ b/drivers/acpi/executer/exmutex.c
@@ -326,7 +326,7 @@ acpi_status acpi_ex_release_mutex_object(union acpi_operand_object *obj_desc)
326 326
327 /* Clear mutex info */ 327 /* Clear mutex info */
328 328
329 obj_desc->mutex.thread_id = 0; 329 obj_desc->mutex.thread_id = NULL;
330 return_ACPI_STATUS(status); 330 return_ACPI_STATUS(status);
331} 331}
332 332
@@ -463,7 +463,7 @@ void acpi_ex_release_all_mutexes(struct acpi_thread_state *thread)
463 /* Mark mutex unowned */ 463 /* Mark mutex unowned */
464 464
465 obj_desc->mutex.owner_thread = NULL; 465 obj_desc->mutex.owner_thread = NULL;
466 obj_desc->mutex.thread_id = 0; 466 obj_desc->mutex.thread_id = NULL;
467 467
468 /* Update Thread sync_level (Last mutex is the important one) */ 468 /* Update Thread sync_level (Last mutex is the important one) */
469 469
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c
index 06f8634fe58b..9b227d4dc9c9 100644
--- a/drivers/acpi/glue.c
+++ b/drivers/acpi/glue.c
@@ -272,6 +272,12 @@ static u32 rtc_handler(void *context)
272static inline void rtc_wake_setup(void) 272static inline void rtc_wake_setup(void)
273{ 273{
274 acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, NULL); 274 acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, NULL);
275 /*
276 * After the RTC handler is installed, the Fixed_RTC event should
277 * be disabled. Only when the RTC alarm is set will it be enabled.
278 */
279 acpi_clear_event(ACPI_EVENT_RTC);
280 acpi_disable_event(ACPI_EVENT_RTC, 0);
275} 281}
276 282
277static void rtc_wake_on(struct device *dev) 283static void rtc_wake_on(struct device *dev)
@@ -327,6 +333,9 @@ static int __init acpi_rtc_init(void)
327{ 333{
328 struct device *dev = get_rtc_dev(); 334 struct device *dev = get_rtc_dev();
329 335
336 if (acpi_disabled)
337 return 0;
338
330 if (dev) { 339 if (dev) {
331 rtc_wake_setup(); 340 rtc_wake_setup();
332 rtc_info.wake_on = rtc_wake_on; 341 rtc_info.wake_on = rtc_wake_on;
diff --git a/drivers/acpi/hardware/hwsleep.c b/drivers/acpi/hardware/hwsleep.c
index d9937e05ec6a..dba3cfbe8cba 100644
--- a/drivers/acpi/hardware/hwsleep.c
+++ b/drivers/acpi/hardware/hwsleep.c
@@ -223,15 +223,17 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state)
223 break; 223 break;
224 } 224 }
225 225
226 /* Set the system indicators to show the desired sleep state. */ 226 /*
227 227 * Set the system indicators to show the desired sleep state.
228 * _SST is an optional method (return no error if not found)
229 */
228 status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL); 230 status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL);
229 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { 231 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
230 ACPI_EXCEPTION((AE_INFO, status, 232 ACPI_EXCEPTION((AE_INFO, status,
231 "While executing method _SST")); 233 "While executing method _SST"));
232 } 234 }
233 235
234 return_ACPI_STATUS(status); 236 return_ACPI_STATUS(AE_OK);
235} 237}
236 238
237ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep) 239ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep)
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
index 5d59cb33b1a5..658e5f3abae0 100644
--- a/drivers/acpi/numa.c
+++ b/drivers/acpi/numa.c
@@ -140,19 +140,42 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header)
140 } 140 }
141} 141}
142 142
143/*
144 * A lot of BIOS fill in 10 (= no distance) everywhere. This messes
145 * up the NUMA heuristics which wants the local node to have a smaller
146 * distance than the others.
147 * Do some quick checks here and only use the SLIT if it passes.
148 */
149static __init int slit_valid(struct acpi_table_slit *slit)
150{
151 int i, j;
152 int d = slit->locality_count;
153 for (i = 0; i < d; i++) {
154 for (j = 0; j < d; j++) {
155 u8 val = slit->entry[d*i + j];
156 if (i == j) {
157 if (val != LOCAL_DISTANCE)
158 return 0;
159 } else if (val <= LOCAL_DISTANCE)
160 return 0;
161 }
162 }
163 return 1;
164}
165
143static int __init acpi_parse_slit(struct acpi_table_header *table) 166static int __init acpi_parse_slit(struct acpi_table_header *table)
144{ 167{
145 struct acpi_table_slit *slit; 168 struct acpi_table_slit *slit;
146 u32 localities;
147 169
148 if (!table) 170 if (!table)
149 return -EINVAL; 171 return -EINVAL;
150 172
151 slit = (struct acpi_table_slit *)table; 173 slit = (struct acpi_table_slit *)table;
152 174
153 /* downcast just for %llu vs %lu for i386/ia64 */ 175 if (!slit_valid(slit)) {
154 localities = (u32) slit->locality_count; 176 printk(KERN_INFO "ACPI: SLIT table looks invalid. Not used.\n");
155 177 return -EINVAL;
178 }
156 acpi_numa_slit_init(slit); 179 acpi_numa_slit_init(slit);
157 180
158 return 0; 181 return 0;
diff --git a/drivers/acpi/parser/psargs.c b/drivers/acpi/parser/psargs.c
index f1e8bf65e24e..e94463778845 100644
--- a/drivers/acpi/parser/psargs.c
+++ b/drivers/acpi/parser/psargs.c
@@ -268,7 +268,7 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state,
268 */ 268 */
269 if (ACPI_SUCCESS(status) && 269 if (ACPI_SUCCESS(status) &&
270 possible_method_call && (node->type == ACPI_TYPE_METHOD)) { 270 possible_method_call && (node->type == ACPI_TYPE_METHOD)) {
271 if (walk_state->op->common.aml_opcode == AML_UNLOAD_OP) { 271 if (walk_state->opcode == AML_UNLOAD_OP) {
272 /* 272 /*
273 * acpi_ps_get_next_namestring has increased the AML pointer, 273 * acpi_ps_get_next_namestring has increased the AML pointer,
274 * so we need to restore the saved AML pointer for method call. 274 * so we need to restore the saved AML pointer for method call.
@@ -691,7 +691,7 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state,
691 691
692 /* To support super_name arg of Unload */ 692 /* To support super_name arg of Unload */
693 693
694 if (walk_state->op->common.aml_opcode == AML_UNLOAD_OP) { 694 if (walk_state->opcode == AML_UNLOAD_OP) {
695 status = 695 status =
696 acpi_ps_get_next_namepath(walk_state, 696 acpi_ps_get_next_namepath(walk_state,
697 parser_state, arg, 697 parser_state, arg,
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index 386e5aa48834..9dd0fa93b9e1 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -86,7 +86,6 @@ static int acpi_processor_info_open_fs(struct inode *inode, struct file *file);
86static void acpi_processor_notify(acpi_handle handle, u32 event, void *data); 86static void acpi_processor_notify(acpi_handle handle, u32 event, void *data);
87static acpi_status acpi_processor_hotadd_init(acpi_handle handle, int *p_cpu); 87static acpi_status acpi_processor_hotadd_init(acpi_handle handle, int *p_cpu);
88static int acpi_processor_handle_eject(struct acpi_processor *pr); 88static int acpi_processor_handle_eject(struct acpi_processor *pr);
89extern int acpi_processor_tstate_has_changed(struct acpi_processor *pr);
90 89
91 90
92static const struct acpi_device_id processor_device_ids[] = { 91static const struct acpi_device_id processor_device_ids[] = {
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 2dd2c1f3a01c..556ee1585192 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -1669,6 +1669,7 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr)
1669 return -EINVAL; 1669 return -EINVAL;
1670 } 1670 }
1671 1671
1672 dev->cpu = pr->id;
1672 for (i = 0; i < CPUIDLE_STATE_MAX; i++) { 1673 for (i = 0; i < CPUIDLE_STATE_MAX; i++) {
1673 dev->states[i].name[0] = '\0'; 1674 dev->states[i].name[0] = '\0';
1674 dev->states[i].desc[0] = '\0'; 1675 dev->states[i].desc[0] = '\0';
@@ -1738,7 +1739,7 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr)
1738 1739
1739int acpi_processor_cst_has_changed(struct acpi_processor *pr) 1740int acpi_processor_cst_has_changed(struct acpi_processor *pr)
1740{ 1741{
1741 int ret; 1742 int ret = 0;
1742 1743
1743 if (boot_option_idle_override) 1744 if (boot_option_idle_override)
1744 return 0; 1745 return 0;
@@ -1756,8 +1757,10 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr)
1756 cpuidle_pause_and_lock(); 1757 cpuidle_pause_and_lock();
1757 cpuidle_disable_device(&pr->power.dev); 1758 cpuidle_disable_device(&pr->power.dev);
1758 acpi_processor_get_power_info(pr); 1759 acpi_processor_get_power_info(pr);
1759 acpi_processor_setup_cpuidle(pr); 1760 if (pr->flags.power) {
1760 ret = cpuidle_enable_device(&pr->power.dev); 1761 acpi_processor_setup_cpuidle(pr);
1762 ret = cpuidle_enable_device(&pr->power.dev);
1763 }
1761 cpuidle_resume_and_unlock(); 1764 cpuidle_resume_and_unlock();
1762 1765
1763 return ret; 1766 return ret;
@@ -1813,7 +1816,6 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr,
1813 if (pr->flags.power) { 1816 if (pr->flags.power) {
1814#ifdef CONFIG_CPU_IDLE 1817#ifdef CONFIG_CPU_IDLE
1815 acpi_processor_setup_cpuidle(pr); 1818 acpi_processor_setup_cpuidle(pr);
1816 pr->power.dev.cpu = pr->id;
1817 if (cpuidle_register_device(&pr->power.dev)) 1819 if (cpuidle_register_device(&pr->power.dev))
1818 return -EIO; 1820 return -EIO;
1819#endif 1821#endif
@@ -1850,8 +1852,7 @@ int acpi_processor_power_exit(struct acpi_processor *pr,
1850 return 0; 1852 return 0;
1851 1853
1852#ifdef CONFIG_CPU_IDLE 1854#ifdef CONFIG_CPU_IDLE
1853 if (pr->flags.power) 1855 cpuidle_unregister_device(&pr->power.dev);
1854 cpuidle_unregister_device(&pr->power.dev);
1855#endif 1856#endif
1856 pr->flags.power_setup_done = 0; 1857 pr->flags.power_setup_done = 0;
1857 1858
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c
index c3b0cd88d09f..495c63a3e0af 100644
--- a/drivers/acpi/sleep/main.c
+++ b/drivers/acpi/sleep/main.c
@@ -36,9 +36,8 @@ static int acpi_sleep_prepare(u32 acpi_state)
36 if (!acpi_wakeup_address) { 36 if (!acpi_wakeup_address) {
37 return -EFAULT; 37 return -EFAULT;
38 } 38 }
39 acpi_set_firmware_waking_vector((acpi_physical_address) 39 acpi_set_firmware_waking_vector(
40 virt_to_phys((void *) 40 (acpi_physical_address)acpi_wakeup_address);
41 acpi_wakeup_address));
42 41
43 } 42 }
44 ACPI_FLUSH_CPU_CACHE(); 43 ACPI_FLUSH_CPU_CACHE();
diff --git a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c
index 8a5fe8710513..4ebbba2b6b19 100644
--- a/drivers/acpi/sleep/proc.c
+++ b/drivers/acpi/sleep/proc.c
@@ -315,8 +315,11 @@ acpi_system_write_alarm(struct file *file,
315 cmos_bcd_write(day, acpi_gbl_FADT.day_alarm, rtc_control); 315 cmos_bcd_write(day, acpi_gbl_FADT.day_alarm, rtc_control);
316 if (acpi_gbl_FADT.month_alarm) 316 if (acpi_gbl_FADT.month_alarm)
317 cmos_bcd_write(mo, acpi_gbl_FADT.month_alarm, rtc_control); 317 cmos_bcd_write(mo, acpi_gbl_FADT.month_alarm, rtc_control);
318 if (acpi_gbl_FADT.century) 318 if (acpi_gbl_FADT.century) {
319 if (adjust)
320 yr += cmos_bcd_read(acpi_gbl_FADT.century, rtc_control) * 100;
319 cmos_bcd_write(yr / 100, acpi_gbl_FADT.century, rtc_control); 321 cmos_bcd_write(yr / 100, acpi_gbl_FADT.century, rtc_control);
322 }
320 /* enable the rtc alarm interrupt */ 323 /* enable the rtc alarm interrupt */
321 rtc_control |= RTC_AIE; 324 rtc_control |= RTC_AIE;
322 CMOS_WRITE(rtc_control, RTC_CONTROL); 325 CMOS_WRITE(rtc_control, RTC_CONTROL);
@@ -495,6 +498,12 @@ static int __init acpi_sleep_proc_init(void)
495 acpi_root_dir, &acpi_system_alarm_fops); 498 acpi_root_dir, &acpi_system_alarm_fops);
496 499
497 acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, NULL); 500 acpi_install_fixed_event_handler(ACPI_EVENT_RTC, rtc_handler, NULL);
501 /*
502 * Disable the RTC event after installing RTC handler.
503 * Only when RTC alarm is set will it be enabled.
504 */
505 acpi_clear_event(ACPI_EVENT_RTC);
506 acpi_disable_event(ACPI_EVENT_RTC, 0);
498#endif /* HAVE_ACPI_LEGACY_ALARM */ 507#endif /* HAVE_ACPI_LEGACY_ALARM */
499 508
500 /* 'wakeup device' [R/W] */ 509 /* 'wakeup device' [R/W] */
diff --git a/drivers/acpi/system.c b/drivers/acpi/system.c
index 769f24855eb6..5bd2dec9a7ac 100644
--- a/drivers/acpi/system.c
+++ b/drivers/acpi/system.c
@@ -77,7 +77,6 @@ static ssize_t acpi_table_show(struct kobject *kobj,
77 container_of(bin_attr, struct acpi_table_attr, attr); 77 container_of(bin_attr, struct acpi_table_attr, attr);
78 struct acpi_table_header *table_header = NULL; 78 struct acpi_table_header *table_header = NULL;
79 acpi_status status; 79 acpi_status status;
80 ssize_t ret_count = count;
81 80
82 status = 81 status =
83 acpi_get_table(table_attr->name, table_attr->instance, 82 acpi_get_table(table_attr->name, table_attr->instance,
@@ -85,18 +84,8 @@ static ssize_t acpi_table_show(struct kobject *kobj,
85 if (ACPI_FAILURE(status)) 84 if (ACPI_FAILURE(status))
86 return -ENODEV; 85 return -ENODEV;
87 86
88 if (offset >= table_header->length) { 87 return memory_read_from_buffer(buf, count, &offset,
89 ret_count = 0; 88 table_header, table_header->length);
90 goto end;
91 }
92
93 if (offset + ret_count > table_header->length)
94 ret_count = table_header->length - offset;
95
96 memcpy(buf, ((char *)table_header) + offset, ret_count);
97
98 end:
99 return ret_count;
100} 89}
101 90
102static void acpi_table_attr_init(struct acpi_table_attr *table_attr, 91static void acpi_table_attr_init(struct acpi_table_attr *table_attr,
diff --git a/drivers/acpi/tables/tbinstal.c b/drivers/acpi/tables/tbinstal.c
index 402f93e1ff20..5336ce88f89f 100644
--- a/drivers/acpi/tables/tbinstal.c
+++ b/drivers/acpi/tables/tbinstal.c
@@ -123,24 +123,13 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc,
123 } 123 }
124 } 124 }
125 125
126 /* The table must be either an SSDT or a PSDT or an OEMx */ 126 /*
127 127 * Originally, we checked the table signature for "SSDT" or "PSDT" here.
128 if (!ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_PSDT)&& 128 * Next, we added support for OEMx tables, signature "OEM".
129 !ACPI_COMPARE_NAME(table_desc->pointer->signature, ACPI_SIG_SSDT)&& 129 * Valid tables were encountered with a null signature, so we've just
130 strncmp(table_desc->pointer->signature, "OEM", 3)) { 130 * given up on validating the signature, since it seems to be a waste
131 /* Check for a printable name */ 131 * of code. The original code was removed (05/2008).
132 if (acpi_ut_valid_acpi_name( 132 */
133 *(u32 *) table_desc->pointer->signature)) {
134 ACPI_ERROR((AE_INFO, "Table has invalid signature "
135 "[%4.4s], must be SSDT or PSDT",
136 table_desc->pointer->signature));
137 } else {
138 ACPI_ERROR((AE_INFO, "Table has invalid signature "
139 "(0x%8.8X), must be SSDT or PSDT",
140 *(u32 *) table_desc->pointer->signature));
141 }
142 return_ACPI_STATUS(AE_BAD_SIGNATURE);
143 }
144 133
145 (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); 134 (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES);
146 135
diff --git a/drivers/acpi/tables/tbxface.c b/drivers/acpi/tables/tbxface.c
index fb57b93c2495..0e319604d3e7 100644
--- a/drivers/acpi/tables/tbxface.c
+++ b/drivers/acpi/tables/tbxface.c
@@ -540,7 +540,7 @@ static acpi_status acpi_tb_load_namespace(void)
540 acpi_tb_print_table_header(0, table); 540 acpi_tb_print_table_header(0, table);
541 541
542 if (no_auto_ssdt == 0) { 542 if (no_auto_ssdt == 0) {
543 printk(KERN_WARNING "ACPI: DSDT override uses original SSDTs unless \"acpi_no_auto_ssdt\""); 543 printk(KERN_WARNING "ACPI: DSDT override uses original SSDTs unless \"acpi_no_auto_ssdt\"\n");
544 } 544 }
545 } 545 }
546 546
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 504385b1f211..84c795fb9b1e 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -364,10 +364,17 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
364 if (flag & ACPI_TRIPS_CRITICAL) { 364 if (flag & ACPI_TRIPS_CRITICAL) {
365 status = acpi_evaluate_integer(tz->device->handle, 365 status = acpi_evaluate_integer(tz->device->handle,
366 "_CRT", NULL, &tz->trips.critical.temperature); 366 "_CRT", NULL, &tz->trips.critical.temperature);
367 if (ACPI_FAILURE(status)) { 367 /*
368 * Treat freezing temperatures as invalid as well; some
369 * BIOSes return really low values and cause reboots at startup.
370 * Below zero (Celcius) values clearly aren't right for sure..
371 * ... so lets discard those as invalid.
372 */
373 if (ACPI_FAILURE(status) ||
374 tz->trips.critical.temperature <= 2732) {
368 tz->trips.critical.flags.valid = 0; 375 tz->trips.critical.flags.valid = 0;
369 ACPI_EXCEPTION((AE_INFO, status, 376 ACPI_EXCEPTION((AE_INFO, status,
370 "No critical threshold")); 377 "No or invalid critical threshold"));
371 return -ENODEV; 378 return -ENODEV;
372 } else { 379 } else {
373 tz->trips.critical.flags.valid = 1; 380 tz->trips.critical.flags.valid = 1;
diff --git a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c
index e4ba7192cd15..1f057b71db1a 100644
--- a/drivers/acpi/utilities/utmisc.c
+++ b/drivers/acpi/utilities/utmisc.c
@@ -1048,6 +1048,7 @@ acpi_ut_exception(char *module_name,
1048 va_start(args, format); 1048 va_start(args, format);
1049 acpi_os_vprintf(format, args); 1049 acpi_os_vprintf(format, args);
1050 acpi_os_printf(" [%X]\n", ACPI_CA_VERSION); 1050 acpi_os_printf(" [%X]\n", ACPI_CA_VERSION);
1051 va_end(args);
1051} 1052}
1052 1053
1053EXPORT_SYMBOL(acpi_ut_exception); 1054EXPORT_SYMBOL(acpi_ut_exception);
@@ -1063,7 +1064,6 @@ acpi_ut_warning(char *module_name, u32 line_number, char *format, ...)
1063 acpi_os_vprintf(format, args); 1064 acpi_os_vprintf(format, args);
1064 acpi_os_printf(" [%X]\n", ACPI_CA_VERSION); 1065 acpi_os_printf(" [%X]\n", ACPI_CA_VERSION);
1065 va_end(args); 1066 va_end(args);
1066 va_end(args);
1067} 1067}
1068 1068
1069void ACPI_INTERNAL_VAR_XFACE 1069void ACPI_INTERNAL_VAR_XFACE
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 5e5dda3a3027..d089c4519d45 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -1713,7 +1713,8 @@ acpi_video_bus_get_devices(struct acpi_video_bus *video,
1713 1713
1714 status = acpi_video_bus_get_one_device(dev, video); 1714 status = acpi_video_bus_get_one_device(dev, video);
1715 if (ACPI_FAILURE(status)) { 1715 if (ACPI_FAILURE(status)) {
1716 ACPI_EXCEPTION((AE_INFO, status, "Cant attach device")); 1716 ACPI_DEBUG_PRINT((ACPI_DB_WARN,
1717 "Cant attach device"));
1717 continue; 1718 continue;
1718 } 1719 }
1719 } 1720 }
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 9bf2986a2788..ae8494944c45 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -651,9 +651,17 @@ config PATA_WINBOND_VLB
651 Support for the Winbond W83759A controller on Vesa Local Bus 651 Support for the Winbond W83759A controller on Vesa Local Bus
652 systems. 652 systems.
653 653
654config HAVE_PATA_PLATFORM
655 bool
656 help
657 This is an internal configuration node for any machine that
658 uses pata-platform driver to enable the relevant driver in the
659 configuration structure without having to submit endless patches
660 to update the PATA_PLATFORM entry.
661
654config PATA_PLATFORM 662config PATA_PLATFORM
655 tristate "Generic platform device PATA support" 663 tristate "Generic platform device PATA support"
656 depends on EMBEDDED || ARCH_RPC || PPC 664 depends on EMBEDDED || ARCH_RPC || PPC || HAVE_PATA_PLATFORM
657 help 665 help
658 This option enables support for generic directly connected ATA 666 This option enables support for generic directly connected ATA
659 devices commonly found on embedded systems. 667 devices commonly found on embedded systems.
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 97f83fb2ee2e..5e6468a7ca4b 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -89,6 +89,8 @@ enum {
89 board_ahci_sb600 = 3, 89 board_ahci_sb600 = 3,
90 board_ahci_mv = 4, 90 board_ahci_mv = 4,
91 board_ahci_sb700 = 5, 91 board_ahci_sb700 = 5,
92 board_ahci_mcp65 = 6,
93 board_ahci_nopmp = 7,
92 94
93 /* global controller registers */ 95 /* global controller registers */
94 HOST_CAP = 0x00, /* host capabilities */ 96 HOST_CAP = 0x00, /* host capabilities */
@@ -190,6 +192,7 @@ enum {
190 AHCI_HFLAG_NO_PMP = (1 << 6), /* no PMP */ 192 AHCI_HFLAG_NO_PMP = (1 << 6), /* no PMP */
191 AHCI_HFLAG_NO_HOTPLUG = (1 << 7), /* ignore PxSERR.DIAG.N */ 193 AHCI_HFLAG_NO_HOTPLUG = (1 << 7), /* ignore PxSERR.DIAG.N */
192 AHCI_HFLAG_SECT255 = (1 << 8), /* max 255 sectors */ 194 AHCI_HFLAG_SECT255 = (1 << 8), /* max 255 sectors */
195 AHCI_HFLAG_YES_NCQ = (1 << 9), /* force NCQ cap on */
193 196
194 /* ap->flags bits */ 197 /* ap->flags bits */
195 198
@@ -253,6 +256,8 @@ static void ahci_pmp_attach(struct ata_port *ap);
253static void ahci_pmp_detach(struct ata_port *ap); 256static void ahci_pmp_detach(struct ata_port *ap);
254static int ahci_softreset(struct ata_link *link, unsigned int *class, 257static int ahci_softreset(struct ata_link *link, unsigned int *class,
255 unsigned long deadline); 258 unsigned long deadline);
259static int ahci_sb600_softreset(struct ata_link *link, unsigned int *class,
260 unsigned long deadline);
256static int ahci_hardreset(struct ata_link *link, unsigned int *class, 261static int ahci_hardreset(struct ata_link *link, unsigned int *class,
257 unsigned long deadline); 262 unsigned long deadline);
258static int ahci_vt8251_hardreset(struct ata_link *link, unsigned int *class, 263static int ahci_vt8251_hardreset(struct ata_link *link, unsigned int *class,
@@ -329,6 +334,12 @@ static struct ata_port_operations ahci_p5wdh_ops = {
329 .hardreset = ahci_p5wdh_hardreset, 334 .hardreset = ahci_p5wdh_hardreset,
330}; 335};
331 336
337static struct ata_port_operations ahci_sb600_ops = {
338 .inherits = &ahci_ops,
339 .softreset = ahci_sb600_softreset,
340 .pmp_softreset = ahci_sb600_softreset,
341};
342
332#define AHCI_HFLAGS(flags) .private_data = (void *)(flags) 343#define AHCI_HFLAGS(flags) .private_data = (void *)(flags)
333 344
334static const struct ata_port_info ahci_port_info[] = { 345static const struct ata_port_info ahci_port_info[] = {
@@ -359,11 +370,11 @@ static const struct ata_port_info ahci_port_info[] = {
359 { 370 {
360 AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL | 371 AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL |
361 AHCI_HFLAG_32BIT_ONLY | AHCI_HFLAG_NO_MSI | 372 AHCI_HFLAG_32BIT_ONLY | AHCI_HFLAG_NO_MSI |
362 AHCI_HFLAG_SECT255 | AHCI_HFLAG_NO_PMP), 373 AHCI_HFLAG_SECT255),
363 .flags = AHCI_FLAG_COMMON, 374 .flags = AHCI_FLAG_COMMON,
364 .pio_mask = 0x1f, /* pio0-4 */ 375 .pio_mask = 0x1f, /* pio0-4 */
365 .udma_mask = ATA_UDMA6, 376 .udma_mask = ATA_UDMA6,
366 .port_ops = &ahci_ops, 377 .port_ops = &ahci_sb600_ops,
367 }, 378 },
368 /* board_ahci_mv */ 379 /* board_ahci_mv */
369 { 380 {
@@ -377,8 +388,23 @@ static const struct ata_port_info ahci_port_info[] = {
377 }, 388 },
378 /* board_ahci_sb700 */ 389 /* board_ahci_sb700 */
379 { 390 {
380 AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL | 391 AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL),
381 AHCI_HFLAG_NO_PMP), 392 .flags = AHCI_FLAG_COMMON,
393 .pio_mask = 0x1f, /* pio0-4 */
394 .udma_mask = ATA_UDMA6,
395 .port_ops = &ahci_sb600_ops,
396 },
397 /* board_ahci_mcp65 */
398 {
399 AHCI_HFLAGS (AHCI_HFLAG_YES_NCQ),
400 .flags = AHCI_FLAG_COMMON,
401 .pio_mask = 0x1f, /* pio0-4 */
402 .udma_mask = ATA_UDMA6,
403 .port_ops = &ahci_ops,
404 },
405 /* board_ahci_nopmp */
406 {
407 AHCI_HFLAGS (AHCI_HFLAG_NO_PMP),
382 .flags = AHCI_FLAG_COMMON, 408 .flags = AHCI_FLAG_COMMON,
383 .pio_mask = 0x1f, /* pio0-4 */ 409 .pio_mask = 0x1f, /* pio0-4 */
384 .udma_mask = ATA_UDMA6, 410 .udma_mask = ATA_UDMA6,
@@ -438,14 +464,14 @@ static const struct pci_device_id ahci_pci_tbl[] = {
438 { PCI_VDEVICE(VIA, 0x6287), board_ahci_vt8251 }, /* VIA VT8251 */ 464 { PCI_VDEVICE(VIA, 0x6287), board_ahci_vt8251 }, /* VIA VT8251 */
439 465
440 /* NVIDIA */ 466 /* NVIDIA */
441 { PCI_VDEVICE(NVIDIA, 0x044c), board_ahci }, /* MCP65 */ 467 { PCI_VDEVICE(NVIDIA, 0x044c), board_ahci_mcp65 }, /* MCP65 */
442 { PCI_VDEVICE(NVIDIA, 0x044d), board_ahci }, /* MCP65 */ 468 { PCI_VDEVICE(NVIDIA, 0x044d), board_ahci_mcp65 }, /* MCP65 */
443 { PCI_VDEVICE(NVIDIA, 0x044e), board_ahci }, /* MCP65 */ 469 { PCI_VDEVICE(NVIDIA, 0x044e), board_ahci_mcp65 }, /* MCP65 */
444 { PCI_VDEVICE(NVIDIA, 0x044f), board_ahci }, /* MCP65 */ 470 { PCI_VDEVICE(NVIDIA, 0x044f), board_ahci_mcp65 }, /* MCP65 */
445 { PCI_VDEVICE(NVIDIA, 0x045c), board_ahci }, /* MCP65 */ 471 { PCI_VDEVICE(NVIDIA, 0x045c), board_ahci_mcp65 }, /* MCP65 */
446 { PCI_VDEVICE(NVIDIA, 0x045d), board_ahci }, /* MCP65 */ 472 { PCI_VDEVICE(NVIDIA, 0x045d), board_ahci_mcp65 }, /* MCP65 */
447 { PCI_VDEVICE(NVIDIA, 0x045e), board_ahci }, /* MCP65 */ 473 { PCI_VDEVICE(NVIDIA, 0x045e), board_ahci_mcp65 }, /* MCP65 */
448 { PCI_VDEVICE(NVIDIA, 0x045f), board_ahci }, /* MCP65 */ 474 { PCI_VDEVICE(NVIDIA, 0x045f), board_ahci_mcp65 }, /* MCP65 */
449 { PCI_VDEVICE(NVIDIA, 0x0550), board_ahci }, /* MCP67 */ 475 { PCI_VDEVICE(NVIDIA, 0x0550), board_ahci }, /* MCP67 */
450 { PCI_VDEVICE(NVIDIA, 0x0551), board_ahci }, /* MCP67 */ 476 { PCI_VDEVICE(NVIDIA, 0x0551), board_ahci }, /* MCP67 */
451 { PCI_VDEVICE(NVIDIA, 0x0552), board_ahci }, /* MCP67 */ 477 { PCI_VDEVICE(NVIDIA, 0x0552), board_ahci }, /* MCP67 */
@@ -502,15 +528,15 @@ static const struct pci_device_id ahci_pci_tbl[] = {
502 { PCI_VDEVICE(NVIDIA, 0x0bcd), board_ahci }, /* MCP7B */ 528 { PCI_VDEVICE(NVIDIA, 0x0bcd), board_ahci }, /* MCP7B */
503 { PCI_VDEVICE(NVIDIA, 0x0bce), board_ahci }, /* MCP7B */ 529 { PCI_VDEVICE(NVIDIA, 0x0bce), board_ahci }, /* MCP7B */
504 { PCI_VDEVICE(NVIDIA, 0x0bcf), board_ahci }, /* MCP7B */ 530 { PCI_VDEVICE(NVIDIA, 0x0bcf), board_ahci }, /* MCP7B */
505 { PCI_VDEVICE(NVIDIA, 0x0bd0), board_ahci }, /* MCP7B */ 531 { PCI_VDEVICE(NVIDIA, 0x0bc4), board_ahci }, /* MCP7B */
506 { PCI_VDEVICE(NVIDIA, 0x0bd1), board_ahci }, /* MCP7B */ 532 { PCI_VDEVICE(NVIDIA, 0x0bc5), board_ahci }, /* MCP7B */
507 { PCI_VDEVICE(NVIDIA, 0x0bd2), board_ahci }, /* MCP7B */ 533 { PCI_VDEVICE(NVIDIA, 0x0bc6), board_ahci }, /* MCP7B */
508 { PCI_VDEVICE(NVIDIA, 0x0bd3), board_ahci }, /* MCP7B */ 534 { PCI_VDEVICE(NVIDIA, 0x0bc7), board_ahci }, /* MCP7B */
509 535
510 /* SiS */ 536 /* SiS */
511 { PCI_VDEVICE(SI, 0x1184), board_ahci }, /* SiS 966 */ 537 { PCI_VDEVICE(SI, 0x1184), board_ahci_nopmp }, /* SiS 966 */
512 { PCI_VDEVICE(SI, 0x1185), board_ahci }, /* SiS 966 */ 538 { PCI_VDEVICE(SI, 0x1185), board_ahci_nopmp }, /* SiS 968 */
513 { PCI_VDEVICE(SI, 0x0186), board_ahci }, /* SiS 968 */ 539 { PCI_VDEVICE(SI, 0x0186), board_ahci_nopmp }, /* SiS 968 */
514 540
515 /* Marvell */ 541 /* Marvell */
516 { PCI_VDEVICE(MARVELL, 0x6145), board_ahci_mv }, /* 6145 */ 542 { PCI_VDEVICE(MARVELL, 0x6145), board_ahci_mv }, /* 6145 */
@@ -624,12 +650,26 @@ static void ahci_save_initial_config(struct pci_dev *pdev,
624 cap &= ~HOST_CAP_NCQ; 650 cap &= ~HOST_CAP_NCQ;
625 } 651 }
626 652
653 if (!(cap & HOST_CAP_NCQ) && (hpriv->flags & AHCI_HFLAG_YES_NCQ)) {
654 dev_printk(KERN_INFO, &pdev->dev,
655 "controller can do NCQ, turning on CAP_NCQ\n");
656 cap |= HOST_CAP_NCQ;
657 }
658
627 if ((cap & HOST_CAP_PMP) && (hpriv->flags & AHCI_HFLAG_NO_PMP)) { 659 if ((cap & HOST_CAP_PMP) && (hpriv->flags & AHCI_HFLAG_NO_PMP)) {
628 dev_printk(KERN_INFO, &pdev->dev, 660 dev_printk(KERN_INFO, &pdev->dev,
629 "controller can't do PMP, turning off CAP_PMP\n"); 661 "controller can't do PMP, turning off CAP_PMP\n");
630 cap &= ~HOST_CAP_PMP; 662 cap &= ~HOST_CAP_PMP;
631 } 663 }
632 664
665 if (pdev->vendor == PCI_VENDOR_ID_JMICRON && pdev->device == 0x2361 &&
666 port_map != 1) {
667 dev_printk(KERN_INFO, &pdev->dev,
668 "JMB361 has only one port, port_map 0x%x -> 0x%x\n",
669 port_map, 1);
670 port_map = 1;
671 }
672
633 /* 673 /*
634 * Temporary Marvell 6145 hack: PATA port presence 674 * Temporary Marvell 6145 hack: PATA port presence
635 * is asserted through the standard AHCI port 675 * is asserted through the standard AHCI port
@@ -1262,19 +1302,11 @@ static int ahci_exec_polled_cmd(struct ata_port *ap, int pmp,
1262 return 0; 1302 return 0;
1263} 1303}
1264 1304
1265static int ahci_check_ready(struct ata_link *link) 1305static int ahci_do_softreset(struct ata_link *link, unsigned int *class,
1266{ 1306 int pmp, unsigned long deadline,
1267 void __iomem *port_mmio = ahci_port_base(link->ap); 1307 int (*check_ready)(struct ata_link *link))
1268 u8 status = readl(port_mmio + PORT_TFDATA) & 0xFF;
1269
1270 return ata_check_ready(status);
1271}
1272
1273static int ahci_softreset(struct ata_link *link, unsigned int *class,
1274 unsigned long deadline)
1275{ 1308{
1276 struct ata_port *ap = link->ap; 1309 struct ata_port *ap = link->ap;
1277 int pmp = sata_srst_pmp(link);
1278 const char *reason = NULL; 1310 const char *reason = NULL;
1279 unsigned long now, msecs; 1311 unsigned long now, msecs;
1280 struct ata_taskfile tf; 1312 struct ata_taskfile tf;
@@ -1312,7 +1344,7 @@ static int ahci_softreset(struct ata_link *link, unsigned int *class,
1312 ahci_exec_polled_cmd(ap, pmp, &tf, 0, 0, 0); 1344 ahci_exec_polled_cmd(ap, pmp, &tf, 0, 0, 0);
1313 1345
1314 /* wait for link to become ready */ 1346 /* wait for link to become ready */
1315 rc = ata_wait_after_reset(link, deadline, ahci_check_ready); 1347 rc = ata_wait_after_reset(link, deadline, check_ready);
1316 /* link occupied, -ENODEV too is an error */ 1348 /* link occupied, -ENODEV too is an error */
1317 if (rc) { 1349 if (rc) {
1318 reason = "device not ready"; 1350 reason = "device not ready";
@@ -1328,6 +1360,72 @@ static int ahci_softreset(struct ata_link *link, unsigned int *class,
1328 return rc; 1360 return rc;
1329} 1361}
1330 1362
1363static int ahci_check_ready(struct ata_link *link)
1364{
1365 void __iomem *port_mmio = ahci_port_base(link->ap);
1366 u8 status = readl(port_mmio + PORT_TFDATA) & 0xFF;
1367
1368 return ata_check_ready(status);
1369}
1370
1371static int ahci_softreset(struct ata_link *link, unsigned int *class,
1372 unsigned long deadline)
1373{
1374 int pmp = sata_srst_pmp(link);
1375
1376 DPRINTK("ENTER\n");
1377
1378 return ahci_do_softreset(link, class, pmp, deadline, ahci_check_ready);
1379}
1380
1381static int ahci_sb600_check_ready(struct ata_link *link)
1382{
1383 void __iomem *port_mmio = ahci_port_base(link->ap);
1384 u8 status = readl(port_mmio + PORT_TFDATA) & 0xFF;
1385 u32 irq_status = readl(port_mmio + PORT_IRQ_STAT);
1386
1387 /*
1388 * There is no need to check TFDATA if BAD PMP is found due to HW bug,
1389 * which can save timeout delay.
1390 */
1391 if (irq_status & PORT_IRQ_BAD_PMP)
1392 return -EIO;
1393
1394 return ata_check_ready(status);
1395}
1396
1397static int ahci_sb600_softreset(struct ata_link *link, unsigned int *class,
1398 unsigned long deadline)
1399{
1400 struct ata_port *ap = link->ap;
1401 void __iomem *port_mmio = ahci_port_base(ap);
1402 int pmp = sata_srst_pmp(link);
1403 int rc;
1404 u32 irq_sts;
1405
1406 DPRINTK("ENTER\n");
1407
1408 rc = ahci_do_softreset(link, class, pmp, deadline,
1409 ahci_sb600_check_ready);
1410
1411 /*
1412 * Soft reset fails on some ATI chips with IPMS set when PMP
1413 * is enabled but SATA HDD/ODD is connected to SATA port,
1414 * do soft reset again to port 0.
1415 */
1416 if (rc == -EIO) {
1417 irq_sts = readl(port_mmio + PORT_IRQ_STAT);
1418 if (irq_sts & PORT_IRQ_BAD_PMP) {
1419 ata_link_printk(link, KERN_WARNING,
1420 "failed due to HW bug, retry pmp=0\n");
1421 rc = ahci_do_softreset(link, class, 0, deadline,
1422 ahci_check_ready);
1423 }
1424 }
1425
1426 return rc;
1427}
1428
1331static int ahci_hardreset(struct ata_link *link, unsigned int *class, 1429static int ahci_hardreset(struct ata_link *link, unsigned int *class,
1332 unsigned long deadline) 1430 unsigned long deadline)
1333{ 1431{
@@ -1679,7 +1777,7 @@ static irqreturn_t ahci_interrupt(int irq, void *dev_instance)
1679 struct ahci_host_priv *hpriv; 1777 struct ahci_host_priv *hpriv;
1680 unsigned int i, handled = 0; 1778 unsigned int i, handled = 0;
1681 void __iomem *mmio; 1779 void __iomem *mmio;
1682 u32 irq_stat, irq_ack = 0; 1780 u32 irq_stat, irq_masked;
1683 1781
1684 VPRINTK("ENTER\n"); 1782 VPRINTK("ENTER\n");
1685 1783
@@ -1688,16 +1786,17 @@ static irqreturn_t ahci_interrupt(int irq, void *dev_instance)
1688 1786
1689 /* sigh. 0xffffffff is a valid return from h/w */ 1787 /* sigh. 0xffffffff is a valid return from h/w */
1690 irq_stat = readl(mmio + HOST_IRQ_STAT); 1788 irq_stat = readl(mmio + HOST_IRQ_STAT);
1691 irq_stat &= hpriv->port_map;
1692 if (!irq_stat) 1789 if (!irq_stat)
1693 return IRQ_NONE; 1790 return IRQ_NONE;
1694 1791
1792 irq_masked = irq_stat & hpriv->port_map;
1793
1695 spin_lock(&host->lock); 1794 spin_lock(&host->lock);
1696 1795
1697 for (i = 0; i < host->n_ports; i++) { 1796 for (i = 0; i < host->n_ports; i++) {
1698 struct ata_port *ap; 1797 struct ata_port *ap;
1699 1798
1700 if (!(irq_stat & (1 << i))) 1799 if (!(irq_masked & (1 << i)))
1701 continue; 1800 continue;
1702 1801
1703 ap = host->ports[i]; 1802 ap = host->ports[i];
@@ -1711,14 +1810,20 @@ static irqreturn_t ahci_interrupt(int irq, void *dev_instance)
1711 "interrupt on disabled port %u\n", i); 1810 "interrupt on disabled port %u\n", i);
1712 } 1811 }
1713 1812
1714 irq_ack |= (1 << i);
1715 }
1716
1717 if (irq_ack) {
1718 writel(irq_ack, mmio + HOST_IRQ_STAT);
1719 handled = 1; 1813 handled = 1;
1720 } 1814 }
1721 1815
1816 /* HOST_IRQ_STAT behaves as level triggered latch meaning that
1817 * it should be cleared after all the port events are cleared;
1818 * otherwise, it will raise a spurious interrupt after each
1819 * valid one. Please read section 10.6.2 of ahci 1.1 for more
1820 * information.
1821 *
1822 * Also, use the unmasked value to clear interrupt as spurious
1823 * pending event on a dummy port might cause screaming IRQ.
1824 */
1825 writel(irq_stat, mmio + HOST_IRQ_STAT);
1826
1722 spin_unlock(&host->lock); 1827 spin_unlock(&host->lock);
1723 1828
1724 VPRINTK("EXIT\n"); 1829 VPRINTK("EXIT\n");
@@ -2118,7 +2223,8 @@ static void ahci_p5wdh_workaround(struct ata_host *host)
2118static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) 2223static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
2119{ 2224{
2120 static int printed_version; 2225 static int printed_version;
2121 struct ata_port_info pi = ahci_port_info[ent->driver_data]; 2226 unsigned int board_id = ent->driver_data;
2227 struct ata_port_info pi = ahci_port_info[board_id];
2122 const struct ata_port_info *ppi[] = { &pi, NULL }; 2228 const struct ata_port_info *ppi[] = { &pi, NULL };
2123 struct device *dev = &pdev->dev; 2229 struct device *dev = &pdev->dev;
2124 struct ahci_host_priv *hpriv; 2230 struct ahci_host_priv *hpriv;
@@ -2167,6 +2273,11 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
2167 return -ENOMEM; 2273 return -ENOMEM;
2168 hpriv->flags |= (unsigned long)pi.private_data; 2274 hpriv->flags |= (unsigned long)pi.private_data;
2169 2275
2276 /* MCP65 revision A1 and A2 can't do MSI */
2277 if (board_id == board_ahci_mcp65 &&
2278 (pdev->revision == 0xa1 || pdev->revision == 0xa2))
2279 hpriv->flags |= AHCI_HFLAG_NO_MSI;
2280
2170 if ((hpriv->flags & AHCI_HFLAG_NO_MSI) || pci_enable_msi(pdev)) 2281 if ((hpriv->flags & AHCI_HFLAG_NO_MSI) || pci_enable_msi(pdev))
2171 pci_intx(pdev, 1); 2282 pci_intx(pdev, 1);
2172 2283
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index a9027b8fbdd5..a90ae03f56b2 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -247,10 +247,11 @@ static const struct pci_device_id piix_pci_tbl[] = {
247 { 0x8086, 0x2820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata }, 247 { 0x8086, 0x2820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
248 /* SATA Controller 2 IDE (ICH8) */ 248 /* SATA Controller 2 IDE (ICH8) */
249 { 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, 249 { 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
250 /* Mobile SATA Controller IDE (ICH8M) */
251 { 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
252 /* Mobile SATA Controller IDE (ICH8M), Apple */ 250 /* Mobile SATA Controller IDE (ICH8M), Apple */
253 { 0x8086, 0x2828, 0x106b, 0x00a0, 0, 0, ich8m_apple_sata }, 251 { 0x8086, 0x2828, 0x106b, 0x00a0, 0, 0, ich8m_apple_sata },
252 { 0x8086, 0x2828, 0x106b, 0x00a1, 0, 0, ich8m_apple_sata },
253 /* Mobile SATA Controller IDE (ICH8M) */
254 { 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
254 /* SATA Controller IDE (ICH9) */ 255 /* SATA Controller IDE (ICH9) */
255 { 0x8086, 0x2920, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata }, 256 { 0x8086, 0x2920, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
256 /* SATA Controller IDE (ICH9) */ 257 /* SATA Controller IDE (ICH9) */
@@ -526,7 +527,7 @@ static struct ata_port_info piix_port_info[] = {
526 527
527 [ich8m_apple_sata] = 528 [ich8m_apple_sata] =
528 { 529 {
529 .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SIDPR, 530 .flags = PIIX_SATA_FLAGS,
530 .pio_mask = 0x1f, /* pio0-4 */ 531 .pio_mask = 0x1f, /* pio0-4 */
531 .mwdma_mask = 0x07, /* mwdma0-2 */ 532 .mwdma_mask = 0x07, /* mwdma0-2 */
532 .udma_mask = ATA_UDMA6, 533 .udma_mask = ATA_UDMA6,
@@ -573,6 +574,8 @@ static const struct ich_laptop ich_laptop[] = {
573 { 0x27DF, 0x1043, 0x1267 }, /* ICH7 on Asus W5F */ 574 { 0x27DF, 0x1043, 0x1267 }, /* ICH7 on Asus W5F */
574 { 0x27DF, 0x103C, 0x30A1 }, /* ICH7 on HP Compaq nc2400 */ 575 { 0x27DF, 0x103C, 0x30A1 }, /* ICH7 on HP Compaq nc2400 */
575 { 0x24CA, 0x1025, 0x0061 }, /* ICH4 on ACER Aspire 2023WLMi */ 576 { 0x24CA, 0x1025, 0x0061 }, /* ICH4 on ACER Aspire 2023WLMi */
577 { 0x24CA, 0x1025, 0x003d }, /* ICH4 on ACER TM290 */
578 { 0x266F, 0x1025, 0x0066 }, /* ICH6 on ACER Aspire 1694WLMi */
576 { 0x2653, 0x1043, 0x82D8 }, /* ICH6M on Asus Eee 701 */ 579 { 0x2653, 0x1043, 0x82D8 }, /* ICH6M on Asus Eee 701 */
577 /* end marker */ 580 /* end marker */
578 { 0, } 581 { 0, }
@@ -1040,6 +1043,13 @@ static int piix_broken_suspend(void)
1040 }, 1043 },
1041 }, 1044 },
1042 { 1045 {
1046 .ident = "TECRA M4",
1047 .matches = {
1048 DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
1049 DMI_MATCH(DMI_PRODUCT_NAME, "TECRA M4"),
1050 },
1051 },
1052 {
1043 .ident = "TECRA M5", 1053 .ident = "TECRA M5",
1044 .matches = { 1054 .matches = {
1045 DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), 1055 DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
index dbf6ca781f66..3ff8b14420d9 100644
--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -118,12 +118,62 @@ static void ata_acpi_associate_ide_port(struct ata_port *ap)
118 ap->pflags |= ATA_PFLAG_INIT_GTM_VALID; 118 ap->pflags |= ATA_PFLAG_INIT_GTM_VALID;
119} 119}
120 120
121static void ata_acpi_handle_hotplug(struct ata_port *ap, struct ata_device 121static void ata_acpi_eject_device(acpi_handle handle)
122 *dev, u32 event) 122{
123 struct acpi_object_list arg_list;
124 union acpi_object arg;
125
126 arg_list.count = 1;
127 arg_list.pointer = &arg;
128 arg.type = ACPI_TYPE_INTEGER;
129 arg.integer.value = 1;
130
131 if (ACPI_FAILURE(acpi_evaluate_object(handle, "_EJ0",
132 &arg_list, NULL)))
133 printk(KERN_ERR "Failed to evaluate _EJ0!\n");
134}
135
136/* @ap and @dev are the same as ata_acpi_handle_hotplug() */
137static void ata_acpi_detach_device(struct ata_port *ap, struct ata_device *dev)
138{
139 if (dev)
140 dev->flags |= ATA_DFLAG_DETACH;
141 else {
142 struct ata_link *tlink;
143 struct ata_device *tdev;
144
145 ata_port_for_each_link(tlink, ap)
146 ata_link_for_each_dev(tdev, tlink)
147 tdev->flags |= ATA_DFLAG_DETACH;
148 }
149
150 ata_port_schedule_eh(ap);
151}
152
153/**
154 * ata_acpi_handle_hotplug - ACPI event handler backend
155 * @ap: ATA port ACPI event occurred
156 * @dev: ATA device ACPI event occurred (can be NULL)
157 * @event: ACPI event which occurred
158 * @is_dock_event: boolean indicating whether the event was a dock one
159 *
160 * All ACPI bay / device realted events end up in this function. If
161 * the event is port-wide @dev is NULL. If the event is specific to a
162 * device, @dev points to it.
163 *
164 * Hotplug (as opposed to unplug) notification is always handled as
165 * port-wide while unplug only kills the target device on device-wide
166 * event.
167 *
168 * LOCKING:
169 * ACPI notify handler context. May sleep.
170 */
171static void ata_acpi_handle_hotplug(struct ata_port *ap, struct ata_device *dev,
172 u32 event, int is_dock_event)
123{ 173{
124 char event_string[12]; 174 char event_string[12];
125 char *envp[] = { event_string, NULL }; 175 char *envp[] = { event_string, NULL };
126 struct ata_eh_info *ehi; 176 struct ata_eh_info *ehi = &ap->link.eh_info;
127 struct kobject *kobj = NULL; 177 struct kobject *kobj = NULL;
128 int wait = 0; 178 int wait = 0;
129 unsigned long flags; 179 unsigned long flags;
@@ -131,87 +181,100 @@ static void ata_acpi_handle_hotplug(struct ata_port *ap, struct ata_device
131 unsigned long sta; 181 unsigned long sta;
132 acpi_status status; 182 acpi_status status;
133 183
134 if (!ap) 184 if (dev) {
135 ap = dev->link->ap; 185 if (dev->sdev)
136 ehi = &ap->link.eh_info; 186 kobj = &dev->sdev->sdev_gendev.kobj;
137
138 spin_lock_irqsave(ap->lock, flags);
139
140 if (dev)
141 handle = dev->acpi_handle; 187 handle = dev->acpi_handle;
142 else 188 } else {
189 kobj = &ap->dev->kobj;
143 handle = ap->acpi_handle; 190 handle = ap->acpi_handle;
191 }
144 192
145 status = acpi_get_handle(handle, "_EJ0", &tmphandle); 193 status = acpi_get_handle(handle, "_EJ0", &tmphandle);
146 if (ACPI_FAILURE(status)) { 194 if (ACPI_FAILURE(status))
147 /* This device is not ejectable */ 195 /* This device does not support hotplug */
148 spin_unlock_irqrestore(ap->lock, flags);
149 return; 196 return;
150 }
151 197
152 status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); 198 spin_lock_irqsave(ap->lock, flags);
153 if (ACPI_FAILURE(status)) {
154 printk ("Unable to determine bay status\n");
155 spin_unlock_irqrestore(ap->lock, flags);
156 return;
157 }
158 199
159 switch (event) { 200 switch (event) {
160 case ACPI_NOTIFY_BUS_CHECK: 201 case ACPI_NOTIFY_BUS_CHECK:
161 case ACPI_NOTIFY_DEVICE_CHECK: 202 case ACPI_NOTIFY_DEVICE_CHECK:
162 ata_ehi_push_desc(ehi, "ACPI event"); 203 ata_ehi_push_desc(ehi, "ACPI event");
163 if (!sta) { 204
164 /* Device has been unplugged */ 205 status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
165 if (dev) 206 if (ACPI_FAILURE(status)) {
166 dev->flags |= ATA_DFLAG_DETACH; 207 ata_port_printk(ap, KERN_ERR,
167 else { 208 "acpi: failed to determine bay status (0x%x)\n",
168 struct ata_link *tlink; 209 status);
169 struct ata_device *tdev; 210 break;
170 211 }
171 ata_port_for_each_link(tlink, ap) { 212
172 ata_link_for_each_dev(tdev, tlink) { 213 if (sta) {
173 tdev->flags |=
174 ATA_DFLAG_DETACH;
175 }
176 }
177 }
178 ata_port_schedule_eh(ap);
179 wait = 1;
180 } else {
181 ata_ehi_hotplugged(ehi); 214 ata_ehi_hotplugged(ehi);
182 ata_port_freeze(ap); 215 ata_port_freeze(ap);
216 } else {
217 /* The device has gone - unplug it */
218 ata_acpi_detach_device(ap, dev);
219 wait = 1;
183 } 220 }
221 break;
222 case ACPI_NOTIFY_EJECT_REQUEST:
223 ata_ehi_push_desc(ehi, "ACPI event");
224
225 if (!is_dock_event)
226 break;
227
228 /* undock event - immediate unplug */
229 ata_acpi_detach_device(ap, dev);
230 wait = 1;
231 break;
184 } 232 }
185 233
234 /* make sure kobj doesn't go away while ap->lock is released */
235 kobject_get(kobj);
236
186 spin_unlock_irqrestore(ap->lock, flags); 237 spin_unlock_irqrestore(ap->lock, flags);
187 238
188 if (wait) 239 if (wait) {
189 ata_port_wait_eh(ap); 240 ata_port_wait_eh(ap);
241 ata_acpi_eject_device(handle);
242 }
190 243
191 if (dev) { 244 if (kobj && !is_dock_event) {
192 if (dev->sdev)
193 kobj = &dev->sdev->sdev_gendev.kobj;
194 } else
195 kobj = &ap->dev->kobj;
196
197 if (kobj) {
198 sprintf(event_string, "BAY_EVENT=%d", event); 245 sprintf(event_string, "BAY_EVENT=%d", event);
199 kobject_uevent_env(kobj, KOBJ_CHANGE, envp); 246 kobject_uevent_env(kobj, KOBJ_CHANGE, envp);
200 } 247 }
248
249 kobject_put(kobj);
250}
251
252static void ata_acpi_dev_notify_dock(acpi_handle handle, u32 event, void *data)
253{
254 struct ata_device *dev = data;
255
256 ata_acpi_handle_hotplug(dev->link->ap, dev, event, 1);
257}
258
259static void ata_acpi_ap_notify_dock(acpi_handle handle, u32 event, void *data)
260{
261 struct ata_port *ap = data;
262
263 ata_acpi_handle_hotplug(ap, NULL, event, 1);
201} 264}
202 265
203static void ata_acpi_dev_notify(acpi_handle handle, u32 event, void *data) 266static void ata_acpi_dev_notify(acpi_handle handle, u32 event, void *data)
204{ 267{
205 struct ata_device *dev = data; 268 struct ata_device *dev = data;
206 269
207 ata_acpi_handle_hotplug(NULL, dev, event); 270 ata_acpi_handle_hotplug(dev->link->ap, dev, event, 0);
208} 271}
209 272
210static void ata_acpi_ap_notify(acpi_handle handle, u32 event, void *data) 273static void ata_acpi_ap_notify(acpi_handle handle, u32 event, void *data)
211{ 274{
212 struct ata_port *ap = data; 275 struct ata_port *ap = data;
213 276
214 ata_acpi_handle_hotplug(ap, NULL, event); 277 ata_acpi_handle_hotplug(ap, NULL, event, 0);
215} 278}
216 279
217/** 280/**
@@ -252,7 +315,7 @@ void ata_acpi_associate(struct ata_host *host)
252 ata_acpi_ap_notify, ap); 315 ata_acpi_ap_notify, ap);
253 /* we might be on a docking station */ 316 /* we might be on a docking station */
254 register_hotplug_dock_device(ap->acpi_handle, 317 register_hotplug_dock_device(ap->acpi_handle,
255 ata_acpi_ap_notify, ap); 318 ata_acpi_ap_notify_dock, ap);
256 } 319 }
257 320
258 for (j = 0; j < ata_link_max_devices(&ap->link); j++) { 321 for (j = 0; j < ata_link_max_devices(&ap->link); j++) {
@@ -264,7 +327,7 @@ void ata_acpi_associate(struct ata_host *host)
264 ata_acpi_dev_notify, dev); 327 ata_acpi_dev_notify, dev);
265 /* we might be on a docking station */ 328 /* we might be on a docking station */
266 register_hotplug_dock_device(dev->acpi_handle, 329 register_hotplug_dock_device(dev->acpi_handle,
267 ata_acpi_dev_notify, dev); 330 ata_acpi_dev_notify_dock, dev);
268 } 331 }
269 } 332 }
270 } 333 }
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 3c89f205c83f..303fc0d2b978 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4297,7 +4297,7 @@ void ata_sg_clean(struct ata_queued_cmd *qc)
4297} 4297}
4298 4298
4299/** 4299/**
4300 * ata_check_atapi_dma - Check whether ATAPI DMA can be supported 4300 * atapi_check_dma - Check whether ATAPI DMA can be supported
4301 * @qc: Metadata associated with taskfile to check 4301 * @qc: Metadata associated with taskfile to check
4302 * 4302 *
4303 * Allow low-level driver to filter ATA PACKET commands, returning 4303 * Allow low-level driver to filter ATA PACKET commands, returning
@@ -4310,7 +4310,7 @@ void ata_sg_clean(struct ata_queued_cmd *qc)
4310 * RETURNS: 0 when ATAPI DMA can be used 4310 * RETURNS: 0 when ATAPI DMA can be used
4311 * nonzero otherwise 4311 * nonzero otherwise
4312 */ 4312 */
4313int ata_check_atapi_dma(struct ata_queued_cmd *qc) 4313int atapi_check_dma(struct ata_queued_cmd *qc)
4314{ 4314{
4315 struct ata_port *ap = qc->ap; 4315 struct ata_port *ap = qc->ap;
4316 4316
@@ -5403,7 +5403,7 @@ static void ata_host_stop(struct device *gendev, void *res)
5403 */ 5403 */
5404static void ata_finalize_port_ops(struct ata_port_operations *ops) 5404static void ata_finalize_port_ops(struct ata_port_operations *ops)
5405{ 5405{
5406 static spinlock_t lock = SPIN_LOCK_UNLOCKED; 5406 static DEFINE_SPINLOCK(lock);
5407 const struct ata_port_operations *cur; 5407 const struct ata_port_operations *cur;
5408 void **begin = (void **)ops; 5408 void **begin = (void **)ops;
5409 void **end = (void **)&ops->inherits; 5409 void **end = (void **)&ops->inherits;
diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c
index 0f9386d4a5a0..7daf4c0f6216 100644
--- a/drivers/ata/libata-pmp.c
+++ b/drivers/ata/libata-pmp.c
@@ -322,9 +322,12 @@ static void sata_pmp_quirks(struct ata_port *ap)
322 if (vendor == 0x1095 && devid == 0x3726) { 322 if (vendor == 0x1095 && devid == 0x3726) {
323 /* sil3726 quirks */ 323 /* sil3726 quirks */
324 ata_port_for_each_link(link, ap) { 324 ata_port_for_each_link(link, ap) {
325 /* class code report is unreliable */ 325 /* Class code report is unreliable and SRST
326 * times out under certain configurations.
327 */
326 if (link->pmp < 5) 328 if (link->pmp < 5)
327 link->flags |= ATA_LFLAG_ASSUME_ATA; 329 link->flags |= ATA_LFLAG_NO_SRST |
330 ATA_LFLAG_ASSUME_ATA;
328 331
329 /* port 5 is for SEMB device and it doesn't like SRST */ 332 /* port 5 is for SEMB device and it doesn't like SRST */
330 if (link->pmp == 5) 333 if (link->pmp == 5)
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index aeb6e01d82ce..57a43649a461 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -1637,6 +1637,7 @@ defer:
1637 1637
1638/** 1638/**
1639 * ata_scsi_rbuf_get - Map response buffer. 1639 * ata_scsi_rbuf_get - Map response buffer.
1640 * @cmd: SCSI command containing buffer to be mapped.
1640 * @flags: unsigned long variable to store irq enable status 1641 * @flags: unsigned long variable to store irq enable status
1641 * @copy_in: copy in from user buffer 1642 * @copy_in: copy in from user buffer
1642 * 1643 *
@@ -1954,7 +1955,7 @@ static unsigned int ata_msense_ctl_mode(u8 *buf)
1954 1955
1955/** 1956/**
1956 * ata_msense_rw_recovery - Simulate MODE SENSE r/w error recovery page 1957 * ata_msense_rw_recovery - Simulate MODE SENSE r/w error recovery page
1957 * @bufp: output buffer 1958 * @buf: output buffer
1958 * 1959 *
1959 * Generate a generic MODE SENSE r/w error recovery page. 1960 * Generate a generic MODE SENSE r/w error recovery page.
1960 * 1961 *
@@ -2342,8 +2343,8 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc)
2342{ 2343{
2343 struct scsi_cmnd *scmd = qc->scsicmd; 2344 struct scsi_cmnd *scmd = qc->scsicmd;
2344 struct ata_device *dev = qc->dev; 2345 struct ata_device *dev = qc->dev;
2345 int using_pio = (dev->flags & ATA_DFLAG_PIO);
2346 int nodata = (scmd->sc_data_direction == DMA_NONE); 2346 int nodata = (scmd->sc_data_direction == DMA_NONE);
2347 int using_pio = !nodata && (dev->flags & ATA_DFLAG_PIO);
2347 unsigned int nbytes; 2348 unsigned int nbytes;
2348 2349
2349 memset(qc->cdb, 0, dev->cdb_len); 2350 memset(qc->cdb, 0, dev->cdb_len);
@@ -2361,7 +2362,7 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc)
2361 ata_qc_set_pc_nbytes(qc); 2362 ata_qc_set_pc_nbytes(qc);
2362 2363
2363 /* check whether ATAPI DMA is safe */ 2364 /* check whether ATAPI DMA is safe */
2364 if (!using_pio && ata_check_atapi_dma(qc)) 2365 if (!nodata && !using_pio && atapi_check_dma(qc))
2365 using_pio = 1; 2366 using_pio = 1;
2366 2367
2367 /* Some controller variants snoop this value for Packet 2368 /* Some controller variants snoop this value for Packet
@@ -2401,13 +2402,11 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc)
2401 qc->tf.lbam = (nbytes & 0xFF); 2402 qc->tf.lbam = (nbytes & 0xFF);
2402 qc->tf.lbah = (nbytes >> 8); 2403 qc->tf.lbah = (nbytes >> 8);
2403 2404
2404 if (using_pio || nodata) { 2405 if (nodata)
2405 /* no data, or PIO data xfer */ 2406 qc->tf.protocol = ATAPI_PROT_NODATA;
2406 if (nodata) 2407 else if (using_pio)
2407 qc->tf.protocol = ATAPI_PROT_NODATA; 2408 qc->tf.protocol = ATAPI_PROT_PIO;
2408 else 2409 else {
2409 qc->tf.protocol = ATAPI_PROT_PIO;
2410 } else {
2411 /* DMA data xfer */ 2410 /* DMA data xfer */
2412 qc->tf.protocol = ATAPI_PROT_DMA; 2411 qc->tf.protocol = ATAPI_PROT_DMA;
2413 qc->tf.feature |= ATAPI_PKT_DMA; 2412 qc->tf.feature |= ATAPI_PKT_DMA;
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 3c2d2289f85e..c0908c225483 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -247,7 +247,7 @@ u8 ata_sff_check_status(struct ata_port *ap)
247 * LOCKING: 247 * LOCKING:
248 * Inherited from caller. 248 * Inherited from caller.
249 */ 249 */
250u8 ata_sff_altstatus(struct ata_port *ap) 250static u8 ata_sff_altstatus(struct ata_port *ap)
251{ 251{
252 if (ap->ops->sff_check_altstatus) 252 if (ap->ops->sff_check_altstatus)
253 return ap->ops->sff_check_altstatus(ap); 253 return ap->ops->sff_check_altstatus(ap);
@@ -256,6 +256,93 @@ u8 ata_sff_altstatus(struct ata_port *ap)
256} 256}
257 257
258/** 258/**
259 * ata_sff_irq_status - Check if the device is busy
260 * @ap: port where the device is
261 *
262 * Determine if the port is currently busy. Uses altstatus
263 * if available in order to avoid clearing shared IRQ status
264 * when finding an IRQ source. Non ctl capable devices don't
265 * share interrupt lines fortunately for us.
266 *
267 * LOCKING:
268 * Inherited from caller.
269 */
270static u8 ata_sff_irq_status(struct ata_port *ap)
271{
272 u8 status;
273
274 if (ap->ops->sff_check_altstatus || ap->ioaddr.altstatus_addr) {
275 status = ata_sff_altstatus(ap);
276 /* Not us: We are busy */
277 if (status & ATA_BUSY)
278 return status;
279 }
280 /* Clear INTRQ latch */
281 status = ap->ops->sff_check_status(ap);
282 return status;
283}
284
285/**
286 * ata_sff_sync - Flush writes
287 * @ap: Port to wait for.
288 *
289 * CAUTION:
290 * If we have an mmio device with no ctl and no altstatus
291 * method this will fail. No such devices are known to exist.
292 *
293 * LOCKING:
294 * Inherited from caller.
295 */
296
297static void ata_sff_sync(struct ata_port *ap)
298{
299 if (ap->ops->sff_check_altstatus)
300 ap->ops->sff_check_altstatus(ap);
301 else if (ap->ioaddr.altstatus_addr)
302 ioread8(ap->ioaddr.altstatus_addr);
303}
304
305/**
306 * ata_sff_pause - Flush writes and wait 400nS
307 * @ap: Port to pause for.
308 *
309 * CAUTION:
310 * If we have an mmio device with no ctl and no altstatus
311 * method this will fail. No such devices are known to exist.
312 *
313 * LOCKING:
314 * Inherited from caller.
315 */
316
317void ata_sff_pause(struct ata_port *ap)
318{
319 ata_sff_sync(ap);
320 ndelay(400);
321}
322
323/**
324 * ata_sff_dma_pause - Pause before commencing DMA
325 * @ap: Port to pause for.
326 *
327 * Perform I/O fencing and ensure sufficient cycle delays occur
328 * for the HDMA1:0 transition
329 */
330
331void ata_sff_dma_pause(struct ata_port *ap)
332{
333 if (ap->ops->sff_check_altstatus || ap->ioaddr.altstatus_addr) {
334 /* An altstatus read will cause the needed delay without
335 messing up the IRQ status */
336 ata_sff_altstatus(ap);
337 return;
338 }
339 /* There are no DMA controllers without ctl. BUG here to ensure
340 we never violate the HDMA1:0 transition timing and risk
341 corruption. */
342 BUG();
343}
344
345/**
259 * ata_sff_busy_sleep - sleep until BSY clears, or timeout 346 * ata_sff_busy_sleep - sleep until BSY clears, or timeout
260 * @ap: port containing status register to be polled 347 * @ap: port containing status register to be polled
261 * @tmout_pat: impatience timeout 348 * @tmout_pat: impatience timeout
@@ -742,7 +829,7 @@ static void ata_pio_sectors(struct ata_queued_cmd *qc)
742 } else 829 } else
743 ata_pio_sector(qc); 830 ata_pio_sector(qc);
744 831
745 ata_sff_altstatus(qc->ap); /* flush */ 832 ata_sff_sync(qc->ap); /* flush */
746} 833}
747 834
748/** 835/**
@@ -763,8 +850,9 @@ static void atapi_send_cdb(struct ata_port *ap, struct ata_queued_cmd *qc)
763 WARN_ON(qc->dev->cdb_len < 12); 850 WARN_ON(qc->dev->cdb_len < 12);
764 851
765 ap->ops->sff_data_xfer(qc->dev, qc->cdb, qc->dev->cdb_len, 1); 852 ap->ops->sff_data_xfer(qc->dev, qc->cdb, qc->dev->cdb_len, 1);
766 ata_sff_altstatus(ap); /* flush */ 853 ata_sff_sync(ap);
767 854 /* FIXME: If the CDB is for DMA do we need to do the transition delay
855 or is bmdma_start guaranteed to do it ? */
768 switch (qc->tf.protocol) { 856 switch (qc->tf.protocol) {
769 case ATAPI_PROT_PIO: 857 case ATAPI_PROT_PIO:
770 ap->hsm_task_state = HSM_ST; 858 ap->hsm_task_state = HSM_ST;
@@ -905,7 +993,7 @@ static void atapi_pio_bytes(struct ata_queued_cmd *qc)
905 993
906 if (unlikely(__atapi_pio_bytes(qc, bytes))) 994 if (unlikely(__atapi_pio_bytes(qc, bytes)))
907 goto err_out; 995 goto err_out;
908 ata_sff_altstatus(ap); /* flush */ 996 ata_sff_sync(ap); /* flush */
909 997
910 return; 998 return;
911 999
@@ -1006,6 +1094,7 @@ static void ata_hsm_qc_complete(struct ata_queued_cmd *qc, int in_wq)
1006int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc, 1094int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc,
1007 u8 status, int in_wq) 1095 u8 status, int in_wq)
1008{ 1096{
1097 struct ata_eh_info *ehi = &ap->link.eh_info;
1009 unsigned long flags = 0; 1098 unsigned long flags = 0;
1010 int poll_next; 1099 int poll_next;
1011 1100
@@ -1037,9 +1126,12 @@ fsm_start:
1037 if (likely(status & (ATA_ERR | ATA_DF))) 1126 if (likely(status & (ATA_ERR | ATA_DF)))
1038 /* device stops HSM for abort/error */ 1127 /* device stops HSM for abort/error */
1039 qc->err_mask |= AC_ERR_DEV; 1128 qc->err_mask |= AC_ERR_DEV;
1040 else 1129 else {
1041 /* HSM violation. Let EH handle this */ 1130 /* HSM violation. Let EH handle this */
1131 ata_ehi_push_desc(ehi,
1132 "ST_FIRST: !(DRQ|ERR|DF)");
1042 qc->err_mask |= AC_ERR_HSM; 1133 qc->err_mask |= AC_ERR_HSM;
1134 }
1043 1135
1044 ap->hsm_task_state = HSM_ST_ERR; 1136 ap->hsm_task_state = HSM_ST_ERR;
1045 goto fsm_start; 1137 goto fsm_start;
@@ -1058,9 +1150,9 @@ fsm_start:
1058 * the CDB. 1150 * the CDB.
1059 */ 1151 */
1060 if (!(qc->dev->horkage & ATA_HORKAGE_STUCK_ERR)) { 1152 if (!(qc->dev->horkage & ATA_HORKAGE_STUCK_ERR)) {
1061 ata_port_printk(ap, KERN_WARNING, 1153 ata_ehi_push_desc(ehi, "ST_FIRST: "
1062 "DRQ=1 with device error, " 1154 "DRQ=1 with device error, "
1063 "dev_stat 0x%X\n", status); 1155 "dev_stat 0x%X", status);
1064 qc->err_mask |= AC_ERR_HSM; 1156 qc->err_mask |= AC_ERR_HSM;
1065 ap->hsm_task_state = HSM_ST_ERR; 1157 ap->hsm_task_state = HSM_ST_ERR;
1066 goto fsm_start; 1158 goto fsm_start;
@@ -1117,9 +1209,9 @@ fsm_start:
1117 * let the EH abort the command or reset the device. 1209 * let the EH abort the command or reset the device.
1118 */ 1210 */
1119 if (unlikely(status & (ATA_ERR | ATA_DF))) { 1211 if (unlikely(status & (ATA_ERR | ATA_DF))) {
1120 ata_port_printk(ap, KERN_WARNING, "DRQ=1 with " 1212 ata_ehi_push_desc(ehi, "ST-ATAPI: "
1121 "device error, dev_stat 0x%X\n", 1213 "DRQ=1 with device error, "
1122 status); 1214 "dev_stat 0x%X", status);
1123 qc->err_mask |= AC_ERR_HSM; 1215 qc->err_mask |= AC_ERR_HSM;
1124 ap->hsm_task_state = HSM_ST_ERR; 1216 ap->hsm_task_state = HSM_ST_ERR;
1125 goto fsm_start; 1217 goto fsm_start;
@@ -1138,13 +1230,17 @@ fsm_start:
1138 if (likely(status & (ATA_ERR | ATA_DF))) 1230 if (likely(status & (ATA_ERR | ATA_DF)))
1139 /* device stops HSM for abort/error */ 1231 /* device stops HSM for abort/error */
1140 qc->err_mask |= AC_ERR_DEV; 1232 qc->err_mask |= AC_ERR_DEV;
1141 else 1233 else {
1142 /* HSM violation. Let EH handle this. 1234 /* HSM violation. Let EH handle this.
1143 * Phantom devices also trigger this 1235 * Phantom devices also trigger this
1144 * condition. Mark hint. 1236 * condition. Mark hint.
1145 */ 1237 */
1238 ata_ehi_push_desc(ehi, "ST-ATA: "
1239 "DRQ=1 with device error, "
1240 "dev_stat 0x%X", status);
1146 qc->err_mask |= AC_ERR_HSM | 1241 qc->err_mask |= AC_ERR_HSM |
1147 AC_ERR_NODEV_HINT; 1242 AC_ERR_NODEV_HINT;
1243 }
1148 1244
1149 ap->hsm_task_state = HSM_ST_ERR; 1245 ap->hsm_task_state = HSM_ST_ERR;
1150 goto fsm_start; 1246 goto fsm_start;
@@ -1169,8 +1265,12 @@ fsm_start:
1169 status = ata_wait_idle(ap); 1265 status = ata_wait_idle(ap);
1170 } 1266 }
1171 1267
1172 if (status & (ATA_BUSY | ATA_DRQ)) 1268 if (status & (ATA_BUSY | ATA_DRQ)) {
1269 ata_ehi_push_desc(ehi, "ST-ATA: "
1270 "BUSY|DRQ persists on ERR|DF, "
1271 "dev_stat 0x%X", status);
1173 qc->err_mask |= AC_ERR_HSM; 1272 qc->err_mask |= AC_ERR_HSM;
1273 }
1174 1274
1175 /* ata_pio_sectors() might change the 1275 /* ata_pio_sectors() might change the
1176 * state to HSM_ST_LAST. so, the state 1276 * state to HSM_ST_LAST. so, the state
@@ -1489,14 +1589,10 @@ inline unsigned int ata_sff_host_intr(struct ata_port *ap,
1489 goto idle_irq; 1589 goto idle_irq;
1490 } 1590 }
1491 1591
1492 /* check altstatus */
1493 status = ata_sff_altstatus(ap);
1494 if (status & ATA_BUSY)
1495 goto idle_irq;
1496 1592
1497 /* check main status, clearing INTRQ */ 1593 /* check main status, clearing INTRQ if needed */
1498 status = ap->ops->sff_check_status(ap); 1594 status = ata_sff_irq_status(ap);
1499 if (unlikely(status & ATA_BUSY)) 1595 if (status & ATA_BUSY)
1500 goto idle_irq; 1596 goto idle_irq;
1501 1597
1502 /* ack bmdma irq events */ 1598 /* ack bmdma irq events */
@@ -2030,7 +2126,7 @@ void ata_sff_error_handler(struct ata_port *ap)
2030 ap->ops->bmdma_stop(qc); 2126 ap->ops->bmdma_stop(qc);
2031 } 2127 }
2032 2128
2033 ata_sff_altstatus(ap); 2129 ata_sff_sync(ap); /* FIXME: We don't need this */
2034 ap->ops->sff_check_status(ap); 2130 ap->ops->sff_check_status(ap);
2035 ap->ops->sff_irq_clear(ap); 2131 ap->ops->sff_irq_clear(ap);
2036 2132
@@ -2203,7 +2299,7 @@ void ata_bmdma_stop(struct ata_queued_cmd *qc)
2203 mmio + ATA_DMA_CMD); 2299 mmio + ATA_DMA_CMD);
2204 2300
2205 /* one-PIO-cycle guaranteed wait, per spec, for HDMA1:0 transition */ 2301 /* one-PIO-cycle guaranteed wait, per spec, for HDMA1:0 transition */
2206 ata_sff_altstatus(ap); /* dummy read */ 2302 ata_sff_dma_pause(ap);
2207} 2303}
2208 2304
2209/** 2305/**
@@ -2722,7 +2818,8 @@ EXPORT_SYMBOL_GPL(ata_sff_qc_prep);
2722EXPORT_SYMBOL_GPL(ata_sff_dumb_qc_prep); 2818EXPORT_SYMBOL_GPL(ata_sff_dumb_qc_prep);
2723EXPORT_SYMBOL_GPL(ata_sff_dev_select); 2819EXPORT_SYMBOL_GPL(ata_sff_dev_select);
2724EXPORT_SYMBOL_GPL(ata_sff_check_status); 2820EXPORT_SYMBOL_GPL(ata_sff_check_status);
2725EXPORT_SYMBOL_GPL(ata_sff_altstatus); 2821EXPORT_SYMBOL_GPL(ata_sff_dma_pause);
2822EXPORT_SYMBOL_GPL(ata_sff_pause);
2726EXPORT_SYMBOL_GPL(ata_sff_busy_sleep); 2823EXPORT_SYMBOL_GPL(ata_sff_busy_sleep);
2727EXPORT_SYMBOL_GPL(ata_sff_wait_ready); 2824EXPORT_SYMBOL_GPL(ata_sff_wait_ready);
2728EXPORT_SYMBOL_GPL(ata_sff_tf_load); 2825EXPORT_SYMBOL_GPL(ata_sff_tf_load);
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h
index 4514283937ea..1cf803adbc95 100644
--- a/drivers/ata/libata.h
+++ b/drivers/ata/libata.h
@@ -106,7 +106,7 @@ extern void ata_sg_clean(struct ata_queued_cmd *qc);
106extern void ata_qc_free(struct ata_queued_cmd *qc); 106extern void ata_qc_free(struct ata_queued_cmd *qc);
107extern void ata_qc_issue(struct ata_queued_cmd *qc); 107extern void ata_qc_issue(struct ata_queued_cmd *qc);
108extern void __ata_qc_complete(struct ata_queued_cmd *qc); 108extern void __ata_qc_complete(struct ata_queued_cmd *qc);
109extern int ata_check_atapi_dma(struct ata_queued_cmd *qc); 109extern int atapi_check_dma(struct ata_queued_cmd *qc);
110extern void swap_buf_le16(u16 *buf, unsigned int buf_words); 110extern void swap_buf_le16(u16 *buf, unsigned int buf_words);
111extern void ata_dev_init(struct ata_device *dev); 111extern void ata_dev_init(struct ata_device *dev);
112extern void ata_link_init(struct ata_port *ap, struct ata_link *link, int pmp); 112extern void ata_link_init(struct ata_port *ap, struct ata_link *link, int pmp);
diff --git a/drivers/ata/pata_icside.c b/drivers/ata/pata_icside.c
index 17138436423d..cf9e9848f8b5 100644
--- a/drivers/ata/pata_icside.c
+++ b/drivers/ata/pata_icside.c
@@ -270,7 +270,7 @@ static void pata_icside_bmdma_stop(struct ata_queued_cmd *qc)
270 disable_dma(state->dma); 270 disable_dma(state->dma);
271 271
272 /* see ata_bmdma_stop */ 272 /* see ata_bmdma_stop */
273 ata_sff_altstatus(ap); 273 ata_sff_dma_pause(ap);
274} 274}
275 275
276static u8 pata_icside_bmdma_status(struct ata_port *ap) 276static u8 pata_icside_bmdma_status(struct ata_port *ap)
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c
index 3d39f9dfec5a..41b4361bbf6e 100644
--- a/drivers/ata/pata_pcmcia.c
+++ b/drivers/ata/pata_pcmcia.c
@@ -414,6 +414,7 @@ static struct pcmcia_device_id pcmcia_devices[] = {
414 PCMCIA_DEVICE_PROD_ID12("IO DATA", "PCIDE", 0x547e66dc, 0x5c5ab149), 414 PCMCIA_DEVICE_PROD_ID12("IO DATA", "PCIDE", 0x547e66dc, 0x5c5ab149),
415 PCMCIA_DEVICE_PROD_ID12("IO DATA", "PCIDEII", 0x547e66dc, 0xb3662674), 415 PCMCIA_DEVICE_PROD_ID12("IO DATA", "PCIDEII", 0x547e66dc, 0xb3662674),
416 PCMCIA_DEVICE_PROD_ID12("LOOKMEET", "CBIDE2 ", 0xe37be2b5, 0x8671043b), 416 PCMCIA_DEVICE_PROD_ID12("LOOKMEET", "CBIDE2 ", 0xe37be2b5, 0x8671043b),
417 PCMCIA_DEVICE_PROD_ID12("M-Systems", "CF300", 0x7ed2ad87, 0x7e9e78ee),
417 PCMCIA_DEVICE_PROD_ID12("M-Systems", "CF500", 0x7ed2ad87, 0x7a13045c), 418 PCMCIA_DEVICE_PROD_ID12("M-Systems", "CF500", 0x7ed2ad87, 0x7a13045c),
418 PCMCIA_DEVICE_PROD_ID2("NinjaATA-", 0xebe0bd79), 419 PCMCIA_DEVICE_PROD_ID2("NinjaATA-", 0xebe0bd79),
419 PCMCIA_DEVICE_PROD_ID12("PCMCIA", "CD-ROM", 0x281f1c5d, 0x66536591), 420 PCMCIA_DEVICE_PROD_ID12("PCMCIA", "CD-ROM", 0x281f1c5d, 0x66536591),
@@ -424,6 +425,7 @@ static struct pcmcia_device_id pcmcia_devices[] = {
424 PCMCIA_DEVICE_PROD_ID12("SMI VENDOR", "SMI PRODUCT", 0x30896c92, 0x703cc5f6), 425 PCMCIA_DEVICE_PROD_ID12("SMI VENDOR", "SMI PRODUCT", 0x30896c92, 0x703cc5f6),
425 PCMCIA_DEVICE_PROD_ID12("TOSHIBA", "MK2001MPL", 0xb4585a1a, 0x3489e003), 426 PCMCIA_DEVICE_PROD_ID12("TOSHIBA", "MK2001MPL", 0xb4585a1a, 0x3489e003),
426 PCMCIA_DEVICE_PROD_ID1("TRANSCEND 512M ", 0xd0909443), 427 PCMCIA_DEVICE_PROD_ID1("TRANSCEND 512M ", 0xd0909443),
428 PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF45", 0x709b1bf1, 0xf68b6f32),
427 PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF80", 0x709b1bf1, 0x2a54d4b1), 429 PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF80", 0x709b1bf1, 0x2a54d4b1),
428 PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS2GCF120", 0x709b1bf1, 0x969aa4f2), 430 PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS2GCF120", 0x709b1bf1, 0x969aa4f2),
429 PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF120", 0x709b1bf1, 0xf54a91c8), 431 PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF120", 0x709b1bf1, 0xf54a91c8),
diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c
index a108d259f19d..f8b3ffc8ae9e 100644
--- a/drivers/ata/pata_rb532_cf.c
+++ b/drivers/ata/pata_rb532_cf.c
@@ -57,7 +57,9 @@ static inline void rb532_pata_finish_io(struct ata_port *ap)
57 struct ata_host *ah = ap->host; 57 struct ata_host *ah = ap->host;
58 struct rb532_cf_info *info = ah->private_data; 58 struct rb532_cf_info *info = ah->private_data;
59 59
60 ata_sff_altstatus(ap); 60 /* FIXME: Keep previous delay. If this is merely a fence then
61 ata_sff_sync might be sufficient. */
62 ata_sff_dma_pause(ap);
61 ndelay(RB500_CF_IO_DELAY); 63 ndelay(RB500_CF_IO_DELAY);
62 64
63 set_irq_type(info->irq, IRQ_TYPE_LEVEL_HIGH); 65 set_irq_type(info->irq, IRQ_TYPE_LEVEL_HIGH);
diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c
index e965b251ca24..bbf5aa345e68 100644
--- a/drivers/ata/pata_scc.c
+++ b/drivers/ata/pata_scc.c
@@ -726,7 +726,7 @@ static void scc_bmdma_stop (struct ata_queued_cmd *qc)
726 in_be32(bmid_base + SCC_DMA_CMD) & ~ATA_DMA_START); 726 in_be32(bmid_base + SCC_DMA_CMD) & ~ATA_DMA_START);
727 727
728 /* one-PIO-cycle guaranteed wait, per spec, for HDMA1:0 transition */ 728 /* one-PIO-cycle guaranteed wait, per spec, for HDMA1:0 transition */
729 ata_sff_altstatus(ap); /* dummy read */ 729 ata_sff_dma_pause(ap); /* dummy read */
730} 730}
731 731
732/** 732/**
@@ -747,7 +747,8 @@ static u8 scc_bmdma_status (struct ata_port *ap)
747 return host_stat; 747 return host_stat;
748 748
749 /* errata A252,A308 workaround: Step4 */ 749 /* errata A252,A308 workaround: Step4 */
750 if ((ata_sff_altstatus(ap) & ATA_ERR) && (int_status & INTSTS_INTRQ)) 750 if ((scc_check_altstatus(ap) & ATA_ERR)
751 && (int_status & INTSTS_INTRQ))
751 return (host_stat | ATA_DMA_INTR); 752 return (host_stat | ATA_DMA_INTR);
752 753
753 /* errata A308 workaround Step5 */ 754 /* errata A308 workaround Step5 */
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 853559e32315..3924e7209a44 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -34,7 +34,7 @@ enum {
34 34
35 SATA_FSL_HOST_FLAGS = (ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | 35 SATA_FSL_HOST_FLAGS = (ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
36 ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA | 36 ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA |
37 ATA_FLAG_NCQ), 37 ATA_FLAG_PMP | ATA_FLAG_NCQ),
38 38
39 SATA_FSL_MAX_CMDS = SATA_FSL_QUEUE_DEPTH, 39 SATA_FSL_MAX_CMDS = SATA_FSL_QUEUE_DEPTH,
40 SATA_FSL_CMD_HDR_SIZE = 16, /* 4 DWORDS */ 40 SATA_FSL_CMD_HDR_SIZE = 16, /* 4 DWORDS */
@@ -395,7 +395,7 @@ static void sata_fsl_qc_prep(struct ata_queued_cmd *qc)
395 cd = (struct command_desc *)pp->cmdentry + tag; 395 cd = (struct command_desc *)pp->cmdentry + tag;
396 cd_paddr = pp->cmdentry_paddr + tag * SATA_FSL_CMD_DESC_SIZE; 396 cd_paddr = pp->cmdentry_paddr + tag * SATA_FSL_CMD_DESC_SIZE;
397 397
398 ata_tf_to_fis(&qc->tf, 0, 1, (u8 *) &cd->cfis); 398 ata_tf_to_fis(&qc->tf, qc->dev->link->pmp, 1, (u8 *) &cd->cfis);
399 399
400 VPRINTK("Dumping cfis : 0x%x, 0x%x, 0x%x\n", 400 VPRINTK("Dumping cfis : 0x%x, 0x%x, 0x%x\n",
401 cd->cfis[0], cd->cfis[1], cd->cfis[2]); 401 cd->cfis[0], cd->cfis[1], cd->cfis[2]);
@@ -438,6 +438,8 @@ static unsigned int sata_fsl_qc_issue(struct ata_queued_cmd *qc)
438 ioread32(CA + hcr_base), 438 ioread32(CA + hcr_base),
439 ioread32(CE + hcr_base), ioread32(CC + hcr_base)); 439 ioread32(CE + hcr_base), ioread32(CC + hcr_base));
440 440
441 iowrite32(qc->dev->link->pmp, CQPMP + hcr_base);
442
441 /* Simply queue command to the controller/device */ 443 /* Simply queue command to the controller/device */
442 iowrite32(1 << tag, CQ + hcr_base); 444 iowrite32(1 << tag, CQ + hcr_base);
443 445
@@ -558,11 +560,36 @@ static void sata_fsl_thaw(struct ata_port *ap)
558 ioread32(hcr_base + HCONTROL), ioread32(hcr_base + HSTATUS)); 560 ioread32(hcr_base + HCONTROL), ioread32(hcr_base + HSTATUS));
559} 561}
560 562
563static void sata_fsl_pmp_attach(struct ata_port *ap)
564{
565 struct sata_fsl_host_priv *host_priv = ap->host->private_data;
566 void __iomem *hcr_base = host_priv->hcr_base;
567 u32 temp;
568
569 temp = ioread32(hcr_base + HCONTROL);
570 iowrite32((temp | HCONTROL_PMP_ATTACHED), hcr_base + HCONTROL);
571}
572
573static void sata_fsl_pmp_detach(struct ata_port *ap)
574{
575 struct sata_fsl_host_priv *host_priv = ap->host->private_data;
576 void __iomem *hcr_base = host_priv->hcr_base;
577 u32 temp;
578
579 temp = ioread32(hcr_base + HCONTROL);
580 temp &= ~HCONTROL_PMP_ATTACHED;
581 iowrite32(temp, hcr_base + HCONTROL);
582
583 /* enable interrupts on the controller/port */
584 temp = ioread32(hcr_base + HCONTROL);
585 iowrite32((temp | DEFAULT_PORT_IRQ_ENABLE_MASK), hcr_base + HCONTROL);
586
587}
588
561static int sata_fsl_port_start(struct ata_port *ap) 589static int sata_fsl_port_start(struct ata_port *ap)
562{ 590{
563 struct device *dev = ap->host->dev; 591 struct device *dev = ap->host->dev;
564 struct sata_fsl_port_priv *pp; 592 struct sata_fsl_port_priv *pp;
565 int retval;
566 void *mem; 593 void *mem;
567 dma_addr_t mem_dma; 594 dma_addr_t mem_dma;
568 struct sata_fsl_host_priv *host_priv = ap->host->private_data; 595 struct sata_fsl_host_priv *host_priv = ap->host->private_data;
@@ -688,12 +715,13 @@ static int sata_fsl_prereset(struct ata_link *link, unsigned long deadline)
688} 715}
689 716
690static int sata_fsl_softreset(struct ata_link *link, unsigned int *class, 717static int sata_fsl_softreset(struct ata_link *link, unsigned int *class,
691 unsigned long deadline) 718 unsigned long deadline)
692{ 719{
693 struct ata_port *ap = link->ap; 720 struct ata_port *ap = link->ap;
694 struct sata_fsl_port_priv *pp = ap->private_data; 721 struct sata_fsl_port_priv *pp = ap->private_data;
695 struct sata_fsl_host_priv *host_priv = ap->host->private_data; 722 struct sata_fsl_host_priv *host_priv = ap->host->private_data;
696 void __iomem *hcr_base = host_priv->hcr_base; 723 void __iomem *hcr_base = host_priv->hcr_base;
724 int pmp = sata_srst_pmp(link);
697 u32 temp; 725 u32 temp;
698 struct ata_taskfile tf; 726 struct ata_taskfile tf;
699 u8 *cfis; 727 u8 *cfis;
@@ -703,6 +731,9 @@ static int sata_fsl_softreset(struct ata_link *link, unsigned int *class,
703 731
704 DPRINTK("in xx_softreset\n"); 732 DPRINTK("in xx_softreset\n");
705 733
734 if (pmp != SATA_PMP_CTRL_PORT)
735 goto issue_srst;
736
706try_offline_again: 737try_offline_again:
707 /* 738 /*
708 * Force host controller to go off-line, aborting current operations 739 * Force host controller to go off-line, aborting current operations
@@ -746,6 +777,7 @@ try_offline_again:
746 777
747 temp = ioread32(hcr_base + HCONTROL); 778 temp = ioread32(hcr_base + HCONTROL);
748 temp |= (HCONTROL_ONLINE_PHY_RST | HCONTROL_SNOOP_ENABLE); 779 temp |= (HCONTROL_ONLINE_PHY_RST | HCONTROL_SNOOP_ENABLE);
780 temp |= HCONTROL_PMP_ATTACHED;
749 iowrite32(temp, hcr_base + HCONTROL); 781 iowrite32(temp, hcr_base + HCONTROL);
750 782
751 temp = ata_wait_register(hcr_base + HSTATUS, ONLINE, 0, 1, 500); 783 temp = ata_wait_register(hcr_base + HSTATUS, ONLINE, 0, 1, 500);
@@ -771,7 +803,8 @@ try_offline_again:
771 ata_port_printk(ap, KERN_WARNING, 803 ata_port_printk(ap, KERN_WARNING,
772 "No Device OR PHYRDY change,Hstatus = 0x%x\n", 804 "No Device OR PHYRDY change,Hstatus = 0x%x\n",
773 ioread32(hcr_base + HSTATUS)); 805 ioread32(hcr_base + HSTATUS));
774 goto err; 806 *class = ATA_DEV_NONE;
807 goto out;
775 } 808 }
776 809
777 /* 810 /*
@@ -783,7 +816,8 @@ try_offline_again:
783 816
784 if ((temp & 0xFF) != 0x18) { 817 if ((temp & 0xFF) != 0x18) {
785 ata_port_printk(ap, KERN_WARNING, "No Signature Update\n"); 818 ata_port_printk(ap, KERN_WARNING, "No Signature Update\n");
786 goto err; 819 *class = ATA_DEV_NONE;
820 goto out;
787 } else { 821 } else {
788 ata_port_printk(ap, KERN_INFO, 822 ata_port_printk(ap, KERN_INFO,
789 "Signature Update detected @ %d msecs\n", 823 "Signature Update detected @ %d msecs\n",
@@ -798,6 +832,7 @@ try_offline_again:
798 * reached here, we can send a command to the target device 832 * reached here, we can send a command to the target device
799 */ 833 */
800 834
835issue_srst:
801 DPRINTK("Sending SRST/device reset\n"); 836 DPRINTK("Sending SRST/device reset\n");
802 837
803 ata_tf_init(link->device, &tf); 838 ata_tf_init(link->device, &tf);
@@ -808,7 +843,7 @@ try_offline_again:
808 SRST_CMD | CMD_DESC_SNOOP_ENABLE, 0, 0, 5); 843 SRST_CMD | CMD_DESC_SNOOP_ENABLE, 0, 0, 5);
809 844
810 tf.ctl |= ATA_SRST; /* setup SRST bit in taskfile control reg */ 845 tf.ctl |= ATA_SRST; /* setup SRST bit in taskfile control reg */
811 ata_tf_to_fis(&tf, 0, 0, cfis); 846 ata_tf_to_fis(&tf, pmp, 0, cfis);
812 847
813 DPRINTK("Dumping cfis : 0x%x, 0x%x, 0x%x, 0x%x\n", 848 DPRINTK("Dumping cfis : 0x%x, 0x%x, 0x%x, 0x%x\n",
814 cfis[0], cfis[1], cfis[2], cfis[3]); 849 cfis[0], cfis[1], cfis[2], cfis[3]);
@@ -854,8 +889,10 @@ try_offline_again:
854 sata_fsl_setup_cmd_hdr_entry(pp, 0, CMD_DESC_SNOOP_ENABLE, 0, 0, 5); 889 sata_fsl_setup_cmd_hdr_entry(pp, 0, CMD_DESC_SNOOP_ENABLE, 0, 0, 5);
855 890
856 tf.ctl &= ~ATA_SRST; /* 2nd H2D Ctl. register FIS */ 891 tf.ctl &= ~ATA_SRST; /* 2nd H2D Ctl. register FIS */
857 ata_tf_to_fis(&tf, 0, 0, cfis); 892 ata_tf_to_fis(&tf, pmp, 0, cfis);
858 893
894 if (pmp != SATA_PMP_CTRL_PORT)
895 iowrite32(pmp, CQPMP + hcr_base);
859 iowrite32(1, CQ + hcr_base); 896 iowrite32(1, CQ + hcr_base);
860 msleep(150); /* ?? */ 897 msleep(150); /* ?? */
861 898
@@ -886,12 +923,21 @@ try_offline_again:
886 VPRINTK("cereg = 0x%x\n", ioread32(hcr_base + CE)); 923 VPRINTK("cereg = 0x%x\n", ioread32(hcr_base + CE));
887 } 924 }
888 925
926out:
889 return 0; 927 return 0;
890 928
891err: 929err:
892 return -EIO; 930 return -EIO;
893} 931}
894 932
933static void sata_fsl_error_handler(struct ata_port *ap)
934{
935
936 DPRINTK("in xx_error_handler\n");
937 sata_pmp_error_handler(ap);
938
939}
940
895static void sata_fsl_post_internal_cmd(struct ata_queued_cmd *qc) 941static void sata_fsl_post_internal_cmd(struct ata_queued_cmd *qc)
896{ 942{
897 if (qc->flags & ATA_QCFLAG_FAILED) 943 if (qc->flags & ATA_QCFLAG_FAILED)
@@ -905,18 +951,21 @@ static void sata_fsl_post_internal_cmd(struct ata_queued_cmd *qc)
905 951
906static void sata_fsl_error_intr(struct ata_port *ap) 952static void sata_fsl_error_intr(struct ata_port *ap)
907{ 953{
908 struct ata_link *link = &ap->link;
909 struct ata_eh_info *ehi = &link->eh_info;
910 struct sata_fsl_host_priv *host_priv = ap->host->private_data; 954 struct sata_fsl_host_priv *host_priv = ap->host->private_data;
911 void __iomem *hcr_base = host_priv->hcr_base; 955 void __iomem *hcr_base = host_priv->hcr_base;
912 u32 hstatus, dereg, cereg = 0, SError = 0; 956 u32 hstatus, dereg=0, cereg = 0, SError = 0;
913 unsigned int err_mask = 0, action = 0; 957 unsigned int err_mask = 0, action = 0;
914 struct ata_queued_cmd *qc; 958 int freeze = 0, abort=0;
915 int freeze = 0; 959 struct ata_link *link = NULL;
960 struct ata_queued_cmd *qc = NULL;
961 struct ata_eh_info *ehi;
916 962
917 hstatus = ioread32(hcr_base + HSTATUS); 963 hstatus = ioread32(hcr_base + HSTATUS);
918 cereg = ioread32(hcr_base + CE); 964 cereg = ioread32(hcr_base + CE);
919 965
966 /* first, analyze and record host port events */
967 link = &ap->link;
968 ehi = &link->eh_info;
920 ata_ehi_clear_desc(ehi); 969 ata_ehi_clear_desc(ehi);
921 970
922 /* 971 /*
@@ -926,42 +975,28 @@ static void sata_fsl_error_intr(struct ata_port *ap)
926 sata_fsl_scr_read(ap, SCR_ERROR, &SError); 975 sata_fsl_scr_read(ap, SCR_ERROR, &SError);
927 if (unlikely(SError & 0xFFFF0000)) { 976 if (unlikely(SError & 0xFFFF0000)) {
928 sata_fsl_scr_write(ap, SCR_ERROR, SError); 977 sata_fsl_scr_write(ap, SCR_ERROR, SError);
929 err_mask |= AC_ERR_ATA_BUS;
930 } 978 }
931 979
932 DPRINTK("error_intr,hStat=0x%x,CE=0x%x,DE =0x%x,SErr=0x%x\n", 980 DPRINTK("error_intr,hStat=0x%x,CE=0x%x,DE =0x%x,SErr=0x%x\n",
933 hstatus, cereg, ioread32(hcr_base + DE), SError); 981 hstatus, cereg, ioread32(hcr_base + DE), SError);
934 982
935 /* handle single device errors */ 983 /* handle fatal errors */
936 if (cereg) { 984 if (hstatus & FATAL_ERROR_DECODE) {
937 /* 985 ehi->err_mask |= AC_ERR_ATA_BUS;
938 * clear the command error, also clears queue to the device 986 ehi->action |= ATA_EH_SOFTRESET;
939 * in error, and we can (re)issue commands to this device.
940 * When a device is in error all commands queued into the
941 * host controller and at the device are considered aborted
942 * and the queue for that device is stopped. Now, after
943 * clearing the device error, we can issue commands to the
944 * device to interrogate it to find the source of the error.
945 */
946 dereg = ioread32(hcr_base + DE);
947 iowrite32(dereg, hcr_base + DE);
948 iowrite32(cereg, hcr_base + CE);
949 987
950 DPRINTK("single device error, CE=0x%x, DE=0x%x\n",
951 ioread32(hcr_base + CE), ioread32(hcr_base + DE));
952 /* 988 /*
953 * We should consider this as non fatal error, and TF must 989 * Ignore serror in case of fatal errors as we always want
954 * be updated as done below. 990 * to do a soft-reset of the FSL SATA controller. Analyzing
991 * serror may cause libata to schedule a hard-reset action,
992 * and hard-reset currently does not do controller
993 * offline/online, causing command timeouts and leads to an
994 * un-recoverable state, hence make libATA ignore
995 * autopsy in case of fatal errors.
955 */ 996 */
956 997
957 err_mask |= AC_ERR_DEV; 998 ehi->flags |= ATA_EHI_NO_AUTOPSY;
958 }
959 999
960 /* handle fatal errors */
961 if (hstatus & FATAL_ERROR_DECODE) {
962 err_mask |= AC_ERR_ATA_BUS;
963 action |= ATA_EH_RESET;
964 /* how will fatal error interrupts be completed ?? */
965 freeze = 1; 1000 freeze = 1;
966 } 1001 }
967 1002
@@ -971,30 +1006,83 @@ static void sata_fsl_error_intr(struct ata_port *ap)
971 1006
972 /* Setup a soft-reset EH action */ 1007 /* Setup a soft-reset EH action */
973 ata_ehi_hotplugged(ehi); 1008 ata_ehi_hotplugged(ehi);
1009 ata_ehi_push_desc(ehi, "%s", "PHY RDY changed");
974 freeze = 1; 1010 freeze = 1;
975 } 1011 }
976 1012
977 /* record error info */ 1013 /* handle single device errors */
978 qc = ata_qc_from_tag(ap, link->active_tag); 1014 if (cereg) {
1015 /*
1016 * clear the command error, also clears queue to the device
1017 * in error, and we can (re)issue commands to this device.
1018 * When a device is in error all commands queued into the
1019 * host controller and at the device are considered aborted
1020 * and the queue for that device is stopped. Now, after
1021 * clearing the device error, we can issue commands to the
1022 * device to interrogate it to find the source of the error.
1023 */
1024 abort = 1;
1025
1026 DPRINTK("single device error, CE=0x%x, DE=0x%x\n",
1027 ioread32(hcr_base + CE), ioread32(hcr_base + DE));
979 1028
980 if (qc) 1029 /* find out the offending link and qc */
1030 if (ap->nr_pmp_links) {
1031 dereg = ioread32(hcr_base + DE);
1032 iowrite32(dereg, hcr_base + DE);
1033 iowrite32(cereg, hcr_base + CE);
1034
1035 if (dereg < ap->nr_pmp_links) {
1036 link = &ap->pmp_link[dereg];
1037 ehi = &link->eh_info;
1038 qc = ata_qc_from_tag(ap, link->active_tag);
1039 /*
1040 * We should consider this as non fatal error,
1041 * and TF must be updated as done below.
1042 */
1043
1044 err_mask |= AC_ERR_DEV;
1045
1046 } else {
1047 err_mask |= AC_ERR_HSM;
1048 action |= ATA_EH_HARDRESET;
1049 freeze = 1;
1050 }
1051 } else {
1052 dereg = ioread32(hcr_base + DE);
1053 iowrite32(dereg, hcr_base + DE);
1054 iowrite32(cereg, hcr_base + CE);
1055
1056 qc = ata_qc_from_tag(ap, link->active_tag);
1057 /*
1058 * We should consider this as non fatal error,
1059 * and TF must be updated as done below.
1060 */
1061 err_mask |= AC_ERR_DEV;
1062 }
1063 }
1064
1065 /* record error info */
1066 if (qc) {
981 qc->err_mask |= err_mask; 1067 qc->err_mask |= err_mask;
982 else 1068 } else
983 ehi->err_mask |= err_mask; 1069 ehi->err_mask |= err_mask;
984 1070
985 ehi->action |= action; 1071 ehi->action |= action;
986 ehi->serror |= SError;
987 1072
988 /* freeze or abort */ 1073 /* freeze or abort */
989 if (freeze) 1074 if (freeze)
990 ata_port_freeze(ap); 1075 ata_port_freeze(ap);
991 else 1076 else if (abort) {
992 ata_port_abort(ap); 1077 if (qc)
1078 ata_link_abort(qc->dev->link);
1079 else
1080 ata_port_abort(ap);
1081 }
993} 1082}
994 1083
995static void sata_fsl_host_intr(struct ata_port *ap) 1084static void sata_fsl_host_intr(struct ata_port *ap)
996{ 1085{
997 struct ata_link *link = &ap->link;
998 struct sata_fsl_host_priv *host_priv = ap->host->private_data; 1086 struct sata_fsl_host_priv *host_priv = ap->host->private_data;
999 void __iomem *hcr_base = host_priv->hcr_base; 1087 void __iomem *hcr_base = host_priv->hcr_base;
1000 u32 hstatus, qc_active = 0; 1088 u32 hstatus, qc_active = 0;
@@ -1017,10 +1105,19 @@ static void sata_fsl_host_intr(struct ata_port *ap)
1017 return; 1105 return;
1018 } 1106 }
1019 1107
1020 if (link->sactive) { /* only true for NCQ commands */ 1108 /* Read command completed register */
1109 qc_active = ioread32(hcr_base + CC);
1110
1111 VPRINTK("Status of all queues :\n");
1112 VPRINTK("qc_active/CC = 0x%x, CA = 0x%x, CE=0x%x,CQ=0x%x,apqa=0x%x\n",
1113 qc_active,
1114 ioread32(hcr_base + CA),
1115 ioread32(hcr_base + CE),
1116 ioread32(hcr_base + CQ),
1117 ap->qc_active);
1118
1119 if (qc_active & ap->qc_active) {
1021 int i; 1120 int i;
1022 /* Read command completed register */
1023 qc_active = ioread32(hcr_base + CC);
1024 /* clear CC bit, this will also complete the interrupt */ 1121 /* clear CC bit, this will also complete the interrupt */
1025 iowrite32(qc_active, hcr_base + CC); 1122 iowrite32(qc_active, hcr_base + CC);
1026 1123
@@ -1032,8 +1129,9 @@ static void sata_fsl_host_intr(struct ata_port *ap)
1032 for (i = 0; i < SATA_FSL_QUEUE_DEPTH; i++) { 1129 for (i = 0; i < SATA_FSL_QUEUE_DEPTH; i++) {
1033 if (qc_active & (1 << i)) { 1130 if (qc_active & (1 << i)) {
1034 qc = ata_qc_from_tag(ap, i); 1131 qc = ata_qc_from_tag(ap, i);
1035 if (qc) 1132 if (qc) {
1036 ata_qc_complete(qc); 1133 ata_qc_complete(qc);
1134 }
1037 DPRINTK 1135 DPRINTK
1038 ("completing ncq cmd,tag=%d,CC=0x%x,CA=0x%x\n", 1136 ("completing ncq cmd,tag=%d,CC=0x%x,CA=0x%x\n",
1039 i, ioread32(hcr_base + CC), 1137 i, ioread32(hcr_base + CC),
@@ -1042,19 +1140,21 @@ static void sata_fsl_host_intr(struct ata_port *ap)
1042 } 1140 }
1043 return; 1141 return;
1044 1142
1045 } else if (ap->qc_active) { 1143 } else if ((ap->qc_active & (1 << ATA_TAG_INTERNAL))) {
1046 iowrite32(1, hcr_base + CC); 1144 iowrite32(1, hcr_base + CC);
1047 qc = ata_qc_from_tag(ap, link->active_tag); 1145 qc = ata_qc_from_tag(ap, ATA_TAG_INTERNAL);
1048 1146
1049 DPRINTK("completing non-ncq cmd, tag=%d,CC=0x%x\n", 1147 DPRINTK("completing non-ncq cmd, CC=0x%x\n",
1050 link->active_tag, ioread32(hcr_base + CC)); 1148 ioread32(hcr_base + CC));
1051 1149
1052 if (qc) 1150 if (qc) {
1053 ata_qc_complete(qc); 1151 ata_qc_complete(qc);
1152 }
1054 } else { 1153 } else {
1055 /* Spurious Interrupt!! */ 1154 /* Spurious Interrupt!! */
1056 DPRINTK("spurious interrupt!!, CC = 0x%x\n", 1155 DPRINTK("spurious interrupt!!, CC = 0x%x\n",
1057 ioread32(hcr_base + CC)); 1156 ioread32(hcr_base + CC));
1157 iowrite32(qc_active, hcr_base + CC);
1058 return; 1158 return;
1059 } 1159 }
1060} 1160}
@@ -1130,9 +1230,6 @@ static int sata_fsl_init_controller(struct ata_host *host)
1130 iowrite32(0x00000FFFF, hcr_base + CE); 1230 iowrite32(0x00000FFFF, hcr_base + CE);
1131 iowrite32(0x00000FFFF, hcr_base + DE); 1231 iowrite32(0x00000FFFF, hcr_base + DE);
1132 1232
1133 /* initially assuming no Port multiplier, set CQPMP to 0 */
1134 iowrite32(0x0, hcr_base + CQPMP);
1135
1136 /* 1233 /*
1137 * host controller will be brought on-line, during xx_port_start() 1234 * host controller will be brought on-line, during xx_port_start()
1138 * callback, that should also initiate the OOB, COMINIT sequence 1235 * callback, that should also initiate the OOB, COMINIT sequence
@@ -1154,8 +1251,8 @@ static struct scsi_host_template sata_fsl_sht = {
1154 .dma_boundary = ATA_DMA_BOUNDARY, 1251 .dma_boundary = ATA_DMA_BOUNDARY,
1155}; 1252};
1156 1253
1157static const struct ata_port_operations sata_fsl_ops = { 1254static struct ata_port_operations sata_fsl_ops = {
1158 .inherits = &sata_port_ops, 1255 .inherits = &sata_pmp_port_ops,
1159 1256
1160 .qc_prep = sata_fsl_qc_prep, 1257 .qc_prep = sata_fsl_qc_prep,
1161 .qc_issue = sata_fsl_qc_issue, 1258 .qc_issue = sata_fsl_qc_issue,
@@ -1168,10 +1265,15 @@ static const struct ata_port_operations sata_fsl_ops = {
1168 .thaw = sata_fsl_thaw, 1265 .thaw = sata_fsl_thaw,
1169 .prereset = sata_fsl_prereset, 1266 .prereset = sata_fsl_prereset,
1170 .softreset = sata_fsl_softreset, 1267 .softreset = sata_fsl_softreset,
1268 .pmp_softreset = sata_fsl_softreset,
1269 .error_handler = sata_fsl_error_handler,
1171 .post_internal_cmd = sata_fsl_post_internal_cmd, 1270 .post_internal_cmd = sata_fsl_post_internal_cmd,
1172 1271
1173 .port_start = sata_fsl_port_start, 1272 .port_start = sata_fsl_port_start,
1174 .port_stop = sata_fsl_port_stop, 1273 .port_stop = sata_fsl_port_stop,
1274
1275 .pmp_attach = sata_fsl_pmp_attach,
1276 .pmp_detach = sata_fsl_pmp_detach,
1175}; 1277};
1176 1278
1177static const struct ata_port_info sata_fsl_port_info[] = { 1279static const struct ata_port_info sata_fsl_port_info[] = {
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index fb81f0c7a8c2..ad169ffbc4cb 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -72,7 +72,7 @@
72#include <linux/libata.h> 72#include <linux/libata.h>
73 73
74#define DRV_NAME "sata_mv" 74#define DRV_NAME "sata_mv"
75#define DRV_VERSION "1.21" 75#define DRV_VERSION "1.24"
76 76
77enum { 77enum {
78 /* BAR's are enumerated in terms of pci_resource_start() terms */ 78 /* BAR's are enumerated in terms of pci_resource_start() terms */
@@ -122,8 +122,6 @@ enum {
122 /* Host Flags */ 122 /* Host Flags */
123 MV_FLAG_DUAL_HC = (1 << 30), /* two SATA Host Controllers */ 123 MV_FLAG_DUAL_HC = (1 << 30), /* two SATA Host Controllers */
124 MV_FLAG_IRQ_COALESCE = (1 << 29), /* IRQ coalescing capability */ 124 MV_FLAG_IRQ_COALESCE = (1 << 29), /* IRQ coalescing capability */
125 /* SoC integrated controllers, no PCI interface */
126 MV_FLAG_SOC = (1 << 28),
127 125
128 MV_COMMON_FLAGS = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | 126 MV_COMMON_FLAGS = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
129 ATA_FLAG_MMIO | ATA_FLAG_NO_ATAPI | 127 ATA_FLAG_MMIO | ATA_FLAG_NO_ATAPI |
@@ -226,6 +224,11 @@ enum {
226 224
227 PHY_MODE3 = 0x310, 225 PHY_MODE3 = 0x310,
228 PHY_MODE4 = 0x314, 226 PHY_MODE4 = 0x314,
227 PHY_MODE4_CFG_MASK = 0x00000003, /* phy internal config field */
228 PHY_MODE4_CFG_VALUE = 0x00000001, /* phy internal config field */
229 PHY_MODE4_RSVD_ZEROS = 0x5de3fffa, /* Gen2e always write zeros */
230 PHY_MODE4_RSVD_ONES = 0x00000005, /* Gen2e always write ones */
231
229 PHY_MODE2 = 0x330, 232 PHY_MODE2 = 0x330,
230 SATA_IFCTL_OFS = 0x344, 233 SATA_IFCTL_OFS = 0x344,
231 SATA_TESTCTL_OFS = 0x348, 234 SATA_TESTCTL_OFS = 0x348,
@@ -356,12 +359,12 @@ enum {
356 MV_HP_ERRATA_50XXB2 = (1 << 2), 359 MV_HP_ERRATA_50XXB2 = (1 << 2),
357 MV_HP_ERRATA_60X1B2 = (1 << 3), 360 MV_HP_ERRATA_60X1B2 = (1 << 3),
358 MV_HP_ERRATA_60X1C0 = (1 << 4), 361 MV_HP_ERRATA_60X1C0 = (1 << 4),
359 MV_HP_ERRATA_XX42A0 = (1 << 5),
360 MV_HP_GEN_I = (1 << 6), /* Generation I: 50xx */ 362 MV_HP_GEN_I = (1 << 6), /* Generation I: 50xx */
361 MV_HP_GEN_II = (1 << 7), /* Generation II: 60xx */ 363 MV_HP_GEN_II = (1 << 7), /* Generation II: 60xx */
362 MV_HP_GEN_IIE = (1 << 8), /* Generation IIE: 6042/7042 */ 364 MV_HP_GEN_IIE = (1 << 8), /* Generation IIE: 6042/7042 */
363 MV_HP_PCIE = (1 << 9), /* PCIe bus/regs: 7042 */ 365 MV_HP_PCIE = (1 << 9), /* PCIe bus/regs: 7042 */
364 MV_HP_CUT_THROUGH = (1 << 10), /* can use EDMA cut-through */ 366 MV_HP_CUT_THROUGH = (1 << 10), /* can use EDMA cut-through */
367 MV_HP_FLAG_SOC = (1 << 11), /* SystemOnChip, no PCI */
365 368
366 /* Port private flags (pp_flags) */ 369 /* Port private flags (pp_flags) */
367 MV_PP_FLAG_EDMA_EN = (1 << 0), /* is EDMA engine enabled? */ 370 MV_PP_FLAG_EDMA_EN = (1 << 0), /* is EDMA engine enabled? */
@@ -374,7 +377,7 @@ enum {
374#define IS_GEN_II(hpriv) ((hpriv)->hp_flags & MV_HP_GEN_II) 377#define IS_GEN_II(hpriv) ((hpriv)->hp_flags & MV_HP_GEN_II)
375#define IS_GEN_IIE(hpriv) ((hpriv)->hp_flags & MV_HP_GEN_IIE) 378#define IS_GEN_IIE(hpriv) ((hpriv)->hp_flags & MV_HP_GEN_IIE)
376#define IS_PCIE(hpriv) ((hpriv)->hp_flags & MV_HP_PCIE) 379#define IS_PCIE(hpriv) ((hpriv)->hp_flags & MV_HP_PCIE)
377#define HAS_PCI(host) (!((host)->ports[0]->flags & MV_FLAG_SOC)) 380#define IS_SOC(hpriv) ((hpriv)->hp_flags & MV_HP_FLAG_SOC)
378 381
379#define WINDOW_CTRL(i) (0x20030 + ((i) << 4)) 382#define WINDOW_CTRL(i) (0x20030 + ((i) << 4))
380#define WINDOW_BASE(i) (0x20034 + ((i) << 4)) 383#define WINDOW_BASE(i) (0x20034 + ((i) << 4))
@@ -652,7 +655,7 @@ static const struct ata_port_info mv_port_info[] = {
652 .port_ops = &mv_iie_ops, 655 .port_ops = &mv_iie_ops,
653 }, 656 },
654 { /* chip_soc */ 657 { /* chip_soc */
655 .flags = MV_GENIIE_FLAGS | MV_FLAG_SOC, 658 .flags = MV_GENIIE_FLAGS,
656 .pio_mask = 0x1f, /* pio0-4 */ 659 .pio_mask = 0x1f, /* pio0-4 */
657 .udma_mask = ATA_UDMA6, 660 .udma_mask = ATA_UDMA6,
658 .port_ops = &mv_iie_ops, 661 .port_ops = &mv_iie_ops,
@@ -812,12 +815,7 @@ static void mv_set_edma_ptrs(void __iomem *port_mmio,
812 writel((pp->crqb_dma >> 16) >> 16, port_mmio + EDMA_REQ_Q_BASE_HI_OFS); 815 writel((pp->crqb_dma >> 16) >> 16, port_mmio + EDMA_REQ_Q_BASE_HI_OFS);
813 writelfl((pp->crqb_dma & EDMA_REQ_Q_BASE_LO_MASK) | index, 816 writelfl((pp->crqb_dma & EDMA_REQ_Q_BASE_LO_MASK) | index,
814 port_mmio + EDMA_REQ_Q_IN_PTR_OFS); 817 port_mmio + EDMA_REQ_Q_IN_PTR_OFS);
815 818 writelfl(index, port_mmio + EDMA_REQ_Q_OUT_PTR_OFS);
816 if (hpriv->hp_flags & MV_HP_ERRATA_XX42A0)
817 writelfl((pp->crqb_dma & 0xffffffff) | index,
818 port_mmio + EDMA_REQ_Q_OUT_PTR_OFS);
819 else
820 writelfl(index, port_mmio + EDMA_REQ_Q_OUT_PTR_OFS);
821 819
822 /* 820 /*
823 * initialize response queue 821 * initialize response queue
@@ -827,13 +825,7 @@ static void mv_set_edma_ptrs(void __iomem *port_mmio,
827 825
828 WARN_ON(pp->crpb_dma & 0xff); 826 WARN_ON(pp->crpb_dma & 0xff);
829 writel((pp->crpb_dma >> 16) >> 16, port_mmio + EDMA_RSP_Q_BASE_HI_OFS); 827 writel((pp->crpb_dma >> 16) >> 16, port_mmio + EDMA_RSP_Q_BASE_HI_OFS);
830 828 writelfl(index, port_mmio + EDMA_RSP_Q_IN_PTR_OFS);
831 if (hpriv->hp_flags & MV_HP_ERRATA_XX42A0)
832 writelfl((pp->crpb_dma & 0xffffffff) | index,
833 port_mmio + EDMA_RSP_Q_IN_PTR_OFS);
834 else
835 writelfl(index, port_mmio + EDMA_RSP_Q_IN_PTR_OFS);
836
837 writelfl((pp->crpb_dma & EDMA_RSP_Q_BASE_LO_MASK) | index, 829 writelfl((pp->crpb_dma & EDMA_RSP_Q_BASE_LO_MASK) | index,
838 port_mmio + EDMA_RSP_Q_OUT_PTR_OFS); 830 port_mmio + EDMA_RSP_Q_OUT_PTR_OFS);
839} 831}
@@ -1254,7 +1246,7 @@ static void mv_edma_cfg(struct ata_port *ap, int want_ncq)
1254 1246
1255 cfg |= (1 << 23); /* do not mask PM field in rx'd FIS */ 1247 cfg |= (1 << 23); /* do not mask PM field in rx'd FIS */
1256 cfg |= (1 << 22); /* enab 4-entry host queue cache */ 1248 cfg |= (1 << 22); /* enab 4-entry host queue cache */
1257 if (HAS_PCI(ap->host)) 1249 if (!IS_SOC(hpriv))
1258 cfg |= (1 << 18); /* enab early completion */ 1250 cfg |= (1 << 18); /* enab early completion */
1259 if (hpriv->hp_flags & MV_HP_CUT_THROUGH) 1251 if (hpriv->hp_flags & MV_HP_CUT_THROUGH)
1260 cfg |= (1 << 17); /* enab cut-thru (dis stor&forwrd) */ 1252 cfg |= (1 << 17); /* enab cut-thru (dis stor&forwrd) */
@@ -1330,6 +1322,9 @@ static int mv_port_start(struct ata_port *ap)
1330 goto out_port_free_dma_mem; 1322 goto out_port_free_dma_mem;
1331 memset(pp->crpb, 0, MV_CRPB_Q_SZ); 1323 memset(pp->crpb, 0, MV_CRPB_Q_SZ);
1332 1324
1325 /* 6041/6081 Rev. "C0" (and newer) are okay with async notify */
1326 if (hpriv->hp_flags & MV_HP_ERRATA_60X1C0)
1327 ap->flags |= ATA_FLAG_AN;
1333 /* 1328 /*
1334 * For GEN_I, there's no NCQ, so we only allocate a single sg_tbl. 1329 * For GEN_I, there's no NCQ, so we only allocate a single sg_tbl.
1335 * For later hardware, we need one unique sg_tbl per NCQ tag. 1330 * For later hardware, we need one unique sg_tbl per NCQ tag.
@@ -1600,6 +1595,24 @@ static unsigned int mv_qc_issue(struct ata_queued_cmd *qc)
1600 1595
1601 if ((qc->tf.protocol != ATA_PROT_DMA) && 1596 if ((qc->tf.protocol != ATA_PROT_DMA) &&
1602 (qc->tf.protocol != ATA_PROT_NCQ)) { 1597 (qc->tf.protocol != ATA_PROT_NCQ)) {
1598 static int limit_warnings = 10;
1599 /*
1600 * Errata SATA#16, SATA#24: warn if multiple DRQs expected.
1601 *
1602 * Someday, we might implement special polling workarounds
1603 * for these, but it all seems rather unnecessary since we
1604 * normally use only DMA for commands which transfer more
1605 * than a single block of data.
1606 *
1607 * Much of the time, this could just work regardless.
1608 * So for now, just log the incident, and allow the attempt.
1609 */
1610 if (limit_warnings > 0 && (qc->nbytes / qc->sect_size) > 1) {
1611 --limit_warnings;
1612 ata_link_printk(qc->dev->link, KERN_WARNING, DRV_NAME
1613 ": attempting PIO w/multiple DRQ: "
1614 "this may fail due to h/w errata\n");
1615 }
1603 /* 1616 /*
1604 * We're about to send a non-EDMA capable command to the 1617 * We're about to send a non-EDMA capable command to the
1605 * port. Turn off EDMA so there won't be problems accessing 1618 * port. Turn off EDMA so there won't be problems accessing
@@ -2225,7 +2238,7 @@ static irqreturn_t mv_interrupt(int irq, void *dev_instance)
2225 * a bogus register value which can indicate HW removal or PCI fault. 2238 * a bogus register value which can indicate HW removal or PCI fault.
2226 */ 2239 */
2227 if (pending_irqs && main_irq_cause != 0xffffffffU) { 2240 if (pending_irqs && main_irq_cause != 0xffffffffU) {
2228 if (unlikely((pending_irqs & PCI_ERR) && HAS_PCI(host))) 2241 if (unlikely((pending_irqs & PCI_ERR) && !IS_SOC(hpriv)))
2229 handled = mv_pci_error(host, hpriv->base); 2242 handled = mv_pci_error(host, hpriv->base);
2230 else 2243 else
2231 handled = mv_host_intr(host, pending_irqs); 2244 handled = mv_host_intr(host, pending_irqs);
@@ -2547,7 +2560,7 @@ static void mv6_phy_errata(struct mv_host_priv *hpriv, void __iomem *mmio,
2547 hp_flags & (MV_HP_ERRATA_60X1B2 | MV_HP_ERRATA_60X1C0); 2560 hp_flags & (MV_HP_ERRATA_60X1B2 | MV_HP_ERRATA_60X1C0);
2548 int fix_phy_mode4 = 2561 int fix_phy_mode4 =
2549 hp_flags & (MV_HP_ERRATA_60X1B2 | MV_HP_ERRATA_60X1C0); 2562 hp_flags & (MV_HP_ERRATA_60X1B2 | MV_HP_ERRATA_60X1C0);
2550 u32 m2, tmp; 2563 u32 m2, m3;
2551 2564
2552 if (fix_phy_mode2) { 2565 if (fix_phy_mode2) {
2553 m2 = readl(port_mmio + PHY_MODE2); 2566 m2 = readl(port_mmio + PHY_MODE2);
@@ -2564,28 +2577,36 @@ static void mv6_phy_errata(struct mv_host_priv *hpriv, void __iomem *mmio,
2564 udelay(200); 2577 udelay(200);
2565 } 2578 }
2566 2579
2567 /* who knows what this magic does */ 2580 /*
2568 tmp = readl(port_mmio + PHY_MODE3); 2581 * Gen-II/IIe PHY_MODE3 errata RM#2:
2569 tmp &= ~0x7F800000; 2582 * Achieves better receiver noise performance than the h/w default:
2570 tmp |= 0x2A800000; 2583 */
2571 writel(tmp, port_mmio + PHY_MODE3); 2584 m3 = readl(port_mmio + PHY_MODE3);
2572 2585 m3 = (m3 & 0x1f) | (0x5555601 << 5);
2573 if (fix_phy_mode4) {
2574 u32 m4;
2575
2576 m4 = readl(port_mmio + PHY_MODE4);
2577
2578 if (hp_flags & MV_HP_ERRATA_60X1B2)
2579 tmp = readl(port_mmio + PHY_MODE3);
2580 2586
2581 /* workaround for errata FEr SATA#10 (part 1) */ 2587 /* Guideline 88F5182 (GL# SATA-S11) */
2582 m4 = (m4 & ~(1 << 1)) | (1 << 0); 2588 if (IS_SOC(hpriv))
2589 m3 &= ~0x1c;
2583 2590
2591 if (fix_phy_mode4) {
2592 u32 m4 = readl(port_mmio + PHY_MODE4);
2593 /*
2594 * Enforce reserved-bit restrictions on GenIIe devices only.
2595 * For earlier chipsets, force only the internal config field
2596 * (workaround for errata FEr SATA#10 part 1).
2597 */
2598 if (IS_GEN_IIE(hpriv))
2599 m4 = (m4 & ~PHY_MODE4_RSVD_ZEROS) | PHY_MODE4_RSVD_ONES;
2600 else
2601 m4 = (m4 & ~PHY_MODE4_CFG_MASK) | PHY_MODE4_CFG_VALUE;
2584 writel(m4, port_mmio + PHY_MODE4); 2602 writel(m4, port_mmio + PHY_MODE4);
2585
2586 if (hp_flags & MV_HP_ERRATA_60X1B2)
2587 writel(tmp, port_mmio + PHY_MODE3);
2588 } 2603 }
2604 /*
2605 * Workaround for 60x1-B2 errata SATA#13:
2606 * Any write to PHY_MODE4 (above) may corrupt PHY_MODE3,
2607 * so we must always rewrite PHY_MODE3 after PHY_MODE4.
2608 */
2609 writel(m3, port_mmio + PHY_MODE3);
2589 2610
2590 /* Revert values of pre-emphasis and signal amps to the saved ones */ 2611 /* Revert values of pre-emphasis and signal amps to the saved ones */
2591 m2 = readl(port_mmio + PHY_MODE2); 2612 m2 = readl(port_mmio + PHY_MODE2);
@@ -2876,7 +2897,7 @@ static unsigned int mv_in_pcix_mode(struct ata_host *host)
2876 void __iomem *mmio = hpriv->base; 2897 void __iomem *mmio = hpriv->base;
2877 u32 reg; 2898 u32 reg;
2878 2899
2879 if (!HAS_PCI(host) || !IS_PCIE(hpriv)) 2900 if (IS_SOC(hpriv) || !IS_PCIE(hpriv))
2880 return 0; /* not PCI-X capable */ 2901 return 0; /* not PCI-X capable */
2881 reg = readl(mmio + MV_PCI_MODE_OFS); 2902 reg = readl(mmio + MV_PCI_MODE_OFS);
2882 if ((reg & MV_PCI_MODE_MASK) == 0) 2903 if ((reg & MV_PCI_MODE_MASK) == 0)
@@ -3003,10 +3024,7 @@ static int mv_chip_id(struct ata_host *host, unsigned int board_idx)
3003 hp_flags |= MV_HP_CUT_THROUGH; 3024 hp_flags |= MV_HP_CUT_THROUGH;
3004 3025
3005 switch (pdev->revision) { 3026 switch (pdev->revision) {
3006 case 0x0: 3027 case 0x2: /* Rev.B0: the first/only public release */
3007 hp_flags |= MV_HP_ERRATA_XX42A0;
3008 break;
3009 case 0x1:
3010 hp_flags |= MV_HP_ERRATA_60X1C0; 3028 hp_flags |= MV_HP_ERRATA_60X1C0;
3011 break; 3029 break;
3012 default: 3030 default:
@@ -3018,7 +3036,7 @@ static int mv_chip_id(struct ata_host *host, unsigned int board_idx)
3018 break; 3036 break;
3019 case chip_soc: 3037 case chip_soc:
3020 hpriv->ops = &mv_soc_ops; 3038 hpriv->ops = &mv_soc_ops;
3021 hp_flags |= MV_HP_ERRATA_60X1C0; 3039 hp_flags |= MV_HP_FLAG_SOC | MV_HP_ERRATA_60X1C0;
3022 break; 3040 break;
3023 3041
3024 default: 3042 default:
@@ -3062,12 +3080,12 @@ static int mv_init_host(struct ata_host *host, unsigned int board_idx)
3062 if (rc) 3080 if (rc)
3063 goto done; 3081 goto done;
3064 3082
3065 if (HAS_PCI(host)) { 3083 if (IS_SOC(hpriv)) {
3066 hpriv->main_irq_cause_addr = mmio + PCI_HC_MAIN_IRQ_CAUSE_OFS;
3067 hpriv->main_irq_mask_addr = mmio + PCI_HC_MAIN_IRQ_MASK_OFS;
3068 } else {
3069 hpriv->main_irq_cause_addr = mmio + SOC_HC_MAIN_IRQ_CAUSE_OFS; 3084 hpriv->main_irq_cause_addr = mmio + SOC_HC_MAIN_IRQ_CAUSE_OFS;
3070 hpriv->main_irq_mask_addr = mmio + SOC_HC_MAIN_IRQ_MASK_OFS; 3085 hpriv->main_irq_mask_addr = mmio + SOC_HC_MAIN_IRQ_MASK_OFS;
3086 } else {
3087 hpriv->main_irq_cause_addr = mmio + PCI_HC_MAIN_IRQ_CAUSE_OFS;
3088 hpriv->main_irq_mask_addr = mmio + PCI_HC_MAIN_IRQ_MASK_OFS;
3071 } 3089 }
3072 3090
3073 /* global interrupt mask: 0 == mask everything */ 3091 /* global interrupt mask: 0 == mask everything */
@@ -3093,7 +3111,7 @@ static int mv_init_host(struct ata_host *host, unsigned int board_idx)
3093 mv_port_init(&ap->ioaddr, port_mmio); 3111 mv_port_init(&ap->ioaddr, port_mmio);
3094 3112
3095#ifdef CONFIG_PCI 3113#ifdef CONFIG_PCI
3096 if (HAS_PCI(host)) { 3114 if (!IS_SOC(hpriv)) {
3097 unsigned int offset = port_mmio - mmio; 3115 unsigned int offset = port_mmio - mmio;
3098 ata_port_pbar_desc(ap, MV_PRIMARY_BAR, -1, "mmio"); 3116 ata_port_pbar_desc(ap, MV_PRIMARY_BAR, -1, "mmio");
3099 ata_port_pbar_desc(ap, MV_PRIMARY_BAR, offset, "port"); 3117 ata_port_pbar_desc(ap, MV_PRIMARY_BAR, offset, "port");
@@ -3113,7 +3131,7 @@ static int mv_init_host(struct ata_host *host, unsigned int board_idx)
3113 writelfl(0, hc_mmio + HC_IRQ_CAUSE_OFS); 3131 writelfl(0, hc_mmio + HC_IRQ_CAUSE_OFS);
3114 } 3132 }
3115 3133
3116 if (HAS_PCI(host)) { 3134 if (!IS_SOC(hpriv)) {
3117 /* Clear any currently outstanding host interrupt conditions */ 3135 /* Clear any currently outstanding host interrupt conditions */
3118 writelfl(0, mmio + hpriv->irq_cause_ofs); 3136 writelfl(0, mmio + hpriv->irq_cause_ofs);
3119 3137
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c
index 8ee6b5b4ede7..84ffcc26a74b 100644
--- a/drivers/ata/sata_sil24.c
+++ b/drivers/ata/sata_sil24.c
@@ -370,6 +370,7 @@ static const struct pci_device_id sil24_pci_tbl[] = {
370 { PCI_VDEVICE(INTEL, 0x3124), BID_SIL3124 }, 370 { PCI_VDEVICE(INTEL, 0x3124), BID_SIL3124 },
371 { PCI_VDEVICE(CMD, 0x3132), BID_SIL3132 }, 371 { PCI_VDEVICE(CMD, 0x3132), BID_SIL3132 },
372 { PCI_VDEVICE(CMD, 0x0242), BID_SIL3132 }, 372 { PCI_VDEVICE(CMD, 0x0242), BID_SIL3132 },
373 { PCI_VDEVICE(CMD, 0x0244), BID_SIL3132 },
373 { PCI_VDEVICE(CMD, 0x3131), BID_SIL3131 }, 374 { PCI_VDEVICE(CMD, 0x3131), BID_SIL3131 },
374 { PCI_VDEVICE(CMD, 0x3531), BID_SIL3131 }, 375 { PCI_VDEVICE(CMD, 0x3531), BID_SIL3131 },
375 376
diff --git a/drivers/ata/sata_uli.c b/drivers/ata/sata_uli.c
index f277cea904ce..db529b849948 100644
--- a/drivers/ata/sata_uli.c
+++ b/drivers/ata/sata_uli.c
@@ -83,6 +83,7 @@ static struct ata_port_operations uli_ops = {
83 .inherits = &ata_bmdma_port_ops, 83 .inherits = &ata_bmdma_port_ops,
84 .scr_read = uli_scr_read, 84 .scr_read = uli_scr_read,
85 .scr_write = uli_scr_write, 85 .scr_write = uli_scr_write,
86 .hardreset = ATA_OP_NULL,
86}; 87};
87 88
88static const struct ata_port_info uli_port_info = { 89static const struct ata_port_info uli_port_info = {
diff --git a/drivers/atm/eni.h b/drivers/atm/eni.h
index d04fefb0841f..e4c9525e60b3 100644
--- a/drivers/atm/eni.h
+++ b/drivers/atm/eni.h
@@ -18,7 +18,6 @@
18#include "midway.h" 18#include "midway.h"
19 19
20 20
21#define KERNEL_OFFSET 0xC0000000 /* kernel 0x0 is at phys 0xC0000000 */
22#define DEV_LABEL "eni" 21#define DEV_LABEL "eni"
23 22
24#define UBR_BUFFER (128*1024) /* UBR buffer size */ 23#define UBR_BUFFER (128*1024) /* UBR buffer size */
diff --git a/drivers/atm/fore200e.h b/drivers/atm/fore200e.h
index 183841cc8fdf..8dd4aa76c3bd 100644
--- a/drivers/atm/fore200e.h
+++ b/drivers/atm/fore200e.h
@@ -1,4 +1,3 @@
1/* $Id: fore200e.h,v 1.4 2000/04/14 10:10:34 davem Exp $ */
2#ifndef _FORE200E_H 1#ifndef _FORE200E_H
3#define _FORE200E_H 2#define _FORE200E_H
4 3
diff --git a/drivers/atm/fore200e_mkfirm.c b/drivers/atm/fore200e_mkfirm.c
index 2ebe1a1e6f8b..520e14b488ff 100644
--- a/drivers/atm/fore200e_mkfirm.c
+++ b/drivers/atm/fore200e_mkfirm.c
@@ -1,6 +1,4 @@
1/* 1/*
2 $Id: fore200e_mkfirm.c,v 1.1 2000/02/21 16:04:32 davem Exp $
3
4 mkfirm.c: generates a C readable file from a binary firmware image 2 mkfirm.c: generates a C readable file from a binary firmware image
5 3
6 Christophe Lizzi (lizzi@{csti.fr, cnam.fr}), June 1999. 4 Christophe Lizzi (lizzi@{csti.fr, cnam.fr}), June 1999.
diff --git a/drivers/atm/he.c b/drivers/atm/he.c
index ffc4a5a41946..ea495b21f916 100644
--- a/drivers/atm/he.c
+++ b/drivers/atm/he.c
@@ -1542,7 +1542,8 @@ he_start(struct atm_dev *dev)
1542 /* initialize framer */ 1542 /* initialize framer */
1543 1543
1544#ifdef CONFIG_ATM_HE_USE_SUNI 1544#ifdef CONFIG_ATM_HE_USE_SUNI
1545 suni_init(he_dev->atm_dev); 1545 if (he_isMM(he_dev))
1546 suni_init(he_dev->atm_dev);
1546 if (he_dev->atm_dev->phy && he_dev->atm_dev->phy->start) 1547 if (he_dev->atm_dev->phy && he_dev->atm_dev->phy->start)
1547 he_dev->atm_dev->phy->start(he_dev->atm_dev); 1548 he_dev->atm_dev->phy->start(he_dev->atm_dev);
1548#endif /* CONFIG_ATM_HE_USE_SUNI */ 1549#endif /* CONFIG_ATM_HE_USE_SUNI */
@@ -1554,6 +1555,7 @@ he_start(struct atm_dev *dev)
1554 val = he_phy_get(he_dev->atm_dev, SUNI_TPOP_APM); 1555 val = he_phy_get(he_dev->atm_dev, SUNI_TPOP_APM);
1555 val = (val & ~SUNI_TPOP_APM_S) | (SUNI_TPOP_S_SDH << SUNI_TPOP_APM_S_SHIFT); 1556 val = (val & ~SUNI_TPOP_APM_S) | (SUNI_TPOP_S_SDH << SUNI_TPOP_APM_S_SHIFT);
1556 he_phy_put(he_dev->atm_dev, val, SUNI_TPOP_APM); 1557 he_phy_put(he_dev->atm_dev, val, SUNI_TPOP_APM);
1558 he_phy_put(he_dev->atm_dev, SUNI_TACP_IUCHP_CLP, SUNI_TACP_IUCHP);
1557 } 1559 }
1558 1560
1559 /* 5.1.12 enable transmit and receive */ 1561 /* 5.1.12 enable transmit and receive */
@@ -2844,10 +2846,15 @@ he_ioctl(struct atm_dev *atm_dev, unsigned int cmd, void __user *arg)
2844 if (copy_from_user(&reg, arg, 2846 if (copy_from_user(&reg, arg,
2845 sizeof(struct he_ioctl_reg))) 2847 sizeof(struct he_ioctl_reg)))
2846 return -EFAULT; 2848 return -EFAULT;
2847 2849
2848 spin_lock_irqsave(&he_dev->global_lock, flags); 2850 spin_lock_irqsave(&he_dev->global_lock, flags);
2849 switch (reg.type) { 2851 switch (reg.type) {
2850 case HE_REGTYPE_PCI: 2852 case HE_REGTYPE_PCI:
2853 if (reg.addr < 0 || reg.addr >= HE_REGMAP_SIZE) {
2854 err = -EINVAL;
2855 break;
2856 }
2857
2851 reg.val = he_readl(he_dev, reg.addr); 2858 reg.val = he_readl(he_dev, reg.addr);
2852 break; 2859 break;
2853 case HE_REGTYPE_RCM: 2860 case HE_REGTYPE_RCM:
diff --git a/drivers/atm/he.h b/drivers/atm/he.h
index 1dc277547a73..b87d6ccabac1 100644
--- a/drivers/atm/he.h
+++ b/drivers/atm/he.h
@@ -1,5 +1,3 @@
1/* $Id: he.h,v 1.4 2003/05/06 22:48:00 chas Exp $ */
2
3/* 1/*
4 2
5 he.h 3 he.h
@@ -269,13 +267,7 @@ struct he_dev {
269 267
270 char prod_id[30]; 268 char prod_id[30];
271 char mac_addr[6]; 269 char mac_addr[6];
272 int media; /* 270 int media;
273 * 0x26 = HE155 MM
274 * 0x27 = HE622 MM
275 * 0x46 = HE155 SM
276 * 0x47 = HE622 SM
277 */
278
279 271
280 unsigned int vcibits, vpibits; 272 unsigned int vcibits, vpibits;
281 unsigned int cells_per_row; 273 unsigned int cells_per_row;
@@ -394,6 +386,7 @@ struct he_vcc
394#define HE_DEV(dev) ((struct he_dev *) (dev)->dev_data) 386#define HE_DEV(dev) ((struct he_dev *) (dev)->dev_data)
395 387
396#define he_is622(dev) ((dev)->media & 0x1) 388#define he_is622(dev) ((dev)->media & 0x1)
389#define he_isMM(dev) ((dev)->media & 0x20)
397 390
398#define HE_REGMAP_SIZE 0x100000 391#define HE_REGMAP_SIZE 0x100000
399 392
@@ -878,8 +871,8 @@ struct he_vcc
878#define M_SN 0x3a /* integer */ 871#define M_SN 0x3a /* integer */
879#define MEDIA 0x3e /* integer */ 872#define MEDIA 0x3e /* integer */
880#define HE155MM 0x26 873#define HE155MM 0x26
881#define HE155SM 0x27 874#define HE622MM 0x27
882#define HE622MM 0x46 875#define HE155SM 0x46
883#define HE622SM 0x47 876#define HE622SM 0x47
884#define MAC_ADDR 0x42 /* char[] */ 877#define MAC_ADDR 0x42 /* char[] */
885 878
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
index 28d77b5195de..3a504e94a4d9 100644
--- a/drivers/atm/idt77252.c
+++ b/drivers/atm/idt77252.c
@@ -1,8 +1,4 @@
1/******************************************************************* 1/*******************************************************************
2 * ident "$Id: idt77252.c,v 1.2 2001/11/11 08:13:54 ecd Exp $"
3 *
4 * $Author: ecd $
5 * $Date: 2001/11/11 08:13:54 $
6 * 2 *
7 * Copyright (c) 2000 ATecoM GmbH 3 * Copyright (c) 2000 ATecoM GmbH
8 * 4 *
@@ -29,9 +25,6 @@
29 * 675 Mass Ave, Cambridge, MA 02139, USA. 25 * 675 Mass Ave, Cambridge, MA 02139, USA.
30 * 26 *
31 *******************************************************************/ 27 *******************************************************************/
32static char const rcsid[] =
33"$Id: idt77252.c,v 1.2 2001/11/11 08:13:54 ecd Exp $";
34
35 28
36#include <linux/module.h> 29#include <linux/module.h>
37#include <linux/pci.h> 30#include <linux/pci.h>
diff --git a/drivers/atm/idt77252.h b/drivers/atm/idt77252.h
index 6f2b4a5875fb..e83eaf120da0 100644
--- a/drivers/atm/idt77252.h
+++ b/drivers/atm/idt77252.h
@@ -1,8 +1,4 @@
1/******************************************************************* 1/*******************************************************************
2 * ident "$Id: idt77252.h,v 1.2 2001/11/11 08:13:54 ecd Exp $"
3 *
4 * $Author: ecd $
5 * $Date: 2001/11/11 08:13:54 $
6 * 2 *
7 * Copyright (c) 2000 ATecoM GmbH 3 * Copyright (c) 2000 ATecoM GmbH
8 * 4 *
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c
index 5c28ca7380ff..139fce6968a6 100644
--- a/drivers/atm/iphase.c
+++ b/drivers/atm/iphase.c
@@ -2562,17 +2562,11 @@ static int __devinit ia_start(struct atm_dev *dev)
2562 error = suni_init(dev); 2562 error = suni_init(dev);
2563 if (error) 2563 if (error)
2564 goto err_free_rx; 2564 goto err_free_rx;
2565 /* 2565 if (dev->phy->start) {
2566 * Enable interrupt on loss of signal 2566 error = dev->phy->start(dev);
2567 * SUNI_RSOP_CIE - 0x10 2567 if (error)
2568 * SUNI_RSOP_CIE_LOSE - 0x04 2568 goto err_free_rx;
2569 */ 2569 }
2570 ia_phy_put(dev, ia_phy_get(dev, 0x10) | 0x04, 0x10);
2571#ifndef MODULE
2572 error = dev->phy->start(dev);
2573 if (error)
2574 goto err_free_rx;
2575#endif
2576 /* Get iadev->carrier_detect status */ 2570 /* Get iadev->carrier_detect status */
2577 IaFrontEndIntr(iadev); 2571 IaFrontEndIntr(iadev);
2578 } 2572 }
@@ -3198,6 +3192,8 @@ static int __devinit ia_init_one(struct pci_dev *pdev,
3198 IF_INIT(printk("dev_id = 0x%x iadev->LineRate = %d \n", (u32)dev, 3192 IF_INIT(printk("dev_id = 0x%x iadev->LineRate = %d \n", (u32)dev,
3199 iadev->LineRate);) 3193 iadev->LineRate);)
3200 3194
3195 pci_set_drvdata(pdev, dev);
3196
3201 ia_dev[iadev_count] = iadev; 3197 ia_dev[iadev_count] = iadev;
3202 _ia_dev[iadev_count] = dev; 3198 _ia_dev[iadev_count] = dev;
3203 iadev_count++; 3199 iadev_count++;
@@ -3219,8 +3215,6 @@ static int __devinit ia_init_one(struct pci_dev *pdev,
3219 iadev->next_board = ia_boards; 3215 iadev->next_board = ia_boards;
3220 ia_boards = dev; 3216 ia_boards = dev;
3221 3217
3222 pci_set_drvdata(pdev, dev);
3223
3224 return 0; 3218 return 0;
3225 3219
3226err_out_deregister_dev: 3220err_out_deregister_dev:
@@ -3238,9 +3232,14 @@ static void __devexit ia_remove_one(struct pci_dev *pdev)
3238 struct atm_dev *dev = pci_get_drvdata(pdev); 3232 struct atm_dev *dev = pci_get_drvdata(pdev);
3239 IADEV *iadev = INPH_IA_DEV(dev); 3233 IADEV *iadev = INPH_IA_DEV(dev);
3240 3234
3241 ia_phy_put(dev, ia_phy_get(dev,0x10) & ~(0x4), 0x10); 3235 /* Disable phy interrupts */
3236 ia_phy_put(dev, ia_phy_get(dev, SUNI_RSOP_CIE) & ~(SUNI_RSOP_CIE_LOSE),
3237 SUNI_RSOP_CIE);
3242 udelay(1); 3238 udelay(1);
3243 3239
3240 if (dev->phy && dev->phy->stop)
3241 dev->phy->stop(dev);
3242
3244 /* De-register device */ 3243 /* De-register device */
3245 free_irq(iadev->irq, dev); 3244 free_irq(iadev->irq, dev);
3246 iadev_count--; 3245 iadev_count--;
diff --git a/drivers/atm/iphase.h b/drivers/atm/iphase.h
index 133eefcc0475..b2cd20f549cb 100644
--- a/drivers/atm/iphase.h
+++ b/drivers/atm/iphase.h
@@ -1025,7 +1025,8 @@ typedef struct iadev_t {
1025 spinlock_t rx_lock, misc_lock; 1025 spinlock_t rx_lock, misc_lock;
1026 struct atm_vcc **rx_open; /* list of all open VCs */ 1026 struct atm_vcc **rx_open; /* list of all open VCs */
1027 u16 num_rx_desc, rx_buf_sz, rxing; 1027 u16 num_rx_desc, rx_buf_sz, rxing;
1028 u32 rx_pkt_ram, rx_tmp_cnt, rx_tmp_jif; 1028 u32 rx_pkt_ram, rx_tmp_cnt;
1029 unsigned long rx_tmp_jif;
1029 void __iomem *RX_DESC_BASE_ADDR; 1030 void __iomem *RX_DESC_BASE_ADDR;
1030 u32 drop_rxpkt, drop_rxcell, rx_cell_cnt, rx_pkt_cnt; 1031 u32 drop_rxpkt, drop_rxcell, rx_cell_cnt, rx_pkt_cnt;
1031 struct atm_dev *next_board; /* other iphase devices */ 1032 struct atm_dev *next_board; /* other iphase devices */
diff --git a/drivers/atm/nicstarmac.copyright b/drivers/atm/nicstarmac.copyright
index 2e15b39fac4f..180531a83c62 100644
--- a/drivers/atm/nicstarmac.copyright
+++ b/drivers/atm/nicstarmac.copyright
@@ -13,7 +13,7 @@
13 * 13 *
14 * Modified to work with the IDT7721 nicstar -- AAL5 (tested) only. 14 * Modified to work with the IDT7721 nicstar -- AAL5 (tested) only.
15 * 15 *
16 * R. D. Rechenmacher <ron@fnal.gov>, Aug. 6, 1997 $Revision: 1.1 $ $Date: 1999/08/20 11:00:11 $ 16 * R. D. Rechenmacher <ron@fnal.gov>, Aug. 6, 1997
17 * 17 *
18 * Linux driver for the IDT77201 NICStAR PCI ATM controller. 18 * Linux driver for the IDT77201 NICStAR PCI ATM controller.
19 * PHY component is expected to be 155 Mbps S/UNI-Lite or IDT 77155; 19 * PHY component is expected to be 155 Mbps S/UNI-Lite or IDT 77155;
diff --git a/drivers/auxdisplay/Kconfig b/drivers/auxdisplay/Kconfig
index 043353bd0600..14b9d5f4c203 100644
--- a/drivers/auxdisplay/Kconfig
+++ b/drivers/auxdisplay/Kconfig
@@ -64,7 +64,7 @@ config KS0108_DELAY
64 Amount of time the ks0108 should wait between each control write 64 Amount of time the ks0108 should wait between each control write
65 to the parallel port. 65 to the parallel port.
66 66
67 If your driver seems to miss random writings, increment this. 67 If your LCD seems to miss random writings, increment this.
68 68
69 If you don't know what I'm talking about, ignore it. 69 If you don't know what I'm talking about, ignore it.
70 70
diff --git a/drivers/auxdisplay/cfag12864b.c b/drivers/auxdisplay/cfag12864b.c
index 80bb06105387..683509f013ab 100644
--- a/drivers/auxdisplay/cfag12864b.c
+++ b/drivers/auxdisplay/cfag12864b.c
@@ -5,7 +5,7 @@
5 * License: GPLv2 5 * License: GPLv2
6 * Depends: ks0108 6 * Depends: ks0108
7 * 7 *
8 * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> 8 * Author: Copyright (C) Miguel Ojeda Sandonis
9 * Date: 2006-10-31 9 * Date: 2006-10-31
10 * 10 *
11 * This program is free software; you can redistribute it and/or modify 11 * This program is free software; you can redistribute it and/or modify
@@ -398,5 +398,5 @@ module_init(cfag12864b_init);
398module_exit(cfag12864b_exit); 398module_exit(cfag12864b_exit);
399 399
400MODULE_LICENSE("GPL v2"); 400MODULE_LICENSE("GPL v2");
401MODULE_AUTHOR("Miguel Ojeda Sandonis <maxextreme@gmail.com>"); 401MODULE_AUTHOR("Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>");
402MODULE_DESCRIPTION("cfag12864b LCD driver"); 402MODULE_DESCRIPTION("cfag12864b LCD driver");
diff --git a/drivers/auxdisplay/cfag12864bfb.c b/drivers/auxdisplay/cfag12864bfb.c
index 307c190699e0..fe3a865be4e5 100644
--- a/drivers/auxdisplay/cfag12864bfb.c
+++ b/drivers/auxdisplay/cfag12864bfb.c
@@ -5,7 +5,7 @@
5 * License: GPLv2 5 * License: GPLv2
6 * Depends: cfag12864b 6 * Depends: cfag12864b
7 * 7 *
8 * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> 8 * Author: Copyright (C) Miguel Ojeda Sandonis
9 * Date: 2006-10-31 9 * Date: 2006-10-31
10 * 10 *
11 * This program is free software; you can redistribute it and/or modify 11 * This program is free software; you can redistribute it and/or modify
@@ -186,5 +186,5 @@ module_init(cfag12864bfb_init);
186module_exit(cfag12864bfb_exit); 186module_exit(cfag12864bfb_exit);
187 187
188MODULE_LICENSE("GPL v2"); 188MODULE_LICENSE("GPL v2");
189MODULE_AUTHOR("Miguel Ojeda Sandonis <maxextreme@gmail.com>"); 189MODULE_AUTHOR("Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>");
190MODULE_DESCRIPTION("cfag12864b LCD framebuffer driver"); 190MODULE_DESCRIPTION("cfag12864b LCD framebuffer driver");
diff --git a/drivers/auxdisplay/ks0108.c b/drivers/auxdisplay/ks0108.c
index e6c3646ef18c..5b93852392b8 100644
--- a/drivers/auxdisplay/ks0108.c
+++ b/drivers/auxdisplay/ks0108.c
@@ -5,7 +5,7 @@
5 * License: GPLv2 5 * License: GPLv2
6 * Depends: parport 6 * Depends: parport
7 * 7 *
8 * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> 8 * Author: Copyright (C) Miguel Ojeda Sandonis
9 * Date: 2006-10-31 9 * Date: 2006-10-31
10 * 10 *
11 * This program is free software; you can redistribute it and/or modify 11 * This program is free software; you can redistribute it and/or modify
@@ -173,6 +173,6 @@ module_init(ks0108_init);
173module_exit(ks0108_exit); 173module_exit(ks0108_exit);
174 174
175MODULE_LICENSE("GPL v2"); 175MODULE_LICENSE("GPL v2");
176MODULE_AUTHOR("Miguel Ojeda Sandonis <maxextreme@gmail.com>"); 176MODULE_AUTHOR("Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>");
177MODULE_DESCRIPTION("ks0108 LCD Controller driver"); 177MODULE_DESCRIPTION("ks0108 LCD Controller driver");
178 178
diff --git a/drivers/base/core.c b/drivers/base/core.c
index be288b5e4180..ee0a51a3a41d 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -760,6 +760,22 @@ static void device_remove_class_symlinks(struct device *dev)
760} 760}
761 761
762/** 762/**
763 * dev_set_name - set a device name
764 * @dev: device
765 * @fmt: format string for the device's name
766 */
767int dev_set_name(struct device *dev, const char *fmt, ...)
768{
769 va_list vargs;
770
771 va_start(vargs, fmt);
772 vsnprintf(dev->bus_id, sizeof(dev->bus_id), fmt, vargs);
773 va_end(vargs);
774 return 0;
775}
776EXPORT_SYMBOL_GPL(dev_set_name);
777
778/**
763 * device_add - add device to device hierarchy. 779 * device_add - add device to device hierarchy.
764 * @dev: device. 780 * @dev: device.
765 * 781 *
@@ -1084,11 +1100,13 @@ static void device_create_release(struct device *dev)
1084} 1100}
1085 1101
1086/** 1102/**
1087 * device_create - creates a device and registers it with sysfs 1103 * device_create_vargs - creates a device and registers it with sysfs
1088 * @class: pointer to the struct class that this device should be registered to 1104 * @class: pointer to the struct class that this device should be registered to
1089 * @parent: pointer to the parent struct device of this new device, if any 1105 * @parent: pointer to the parent struct device of this new device, if any
1090 * @devt: the dev_t for the char device to be added 1106 * @devt: the dev_t for the char device to be added
1107 * @drvdata: the data to be added to the device for callbacks
1091 * @fmt: string for the device's name 1108 * @fmt: string for the device's name
1109 * @args: va_list for the device's name
1092 * 1110 *
1093 * This function can be used by char device classes. A struct device 1111 * This function can be used by char device classes. A struct device
1094 * will be created in sysfs, registered to the specified class. 1112 * will be created in sysfs, registered to the specified class.
@@ -1104,10 +1122,10 @@ static void device_create_release(struct device *dev)
1104 * Note: the struct class passed to this function must have previously 1122 * Note: the struct class passed to this function must have previously
1105 * been created with a call to class_create(). 1123 * been created with a call to class_create().
1106 */ 1124 */
1107struct device *device_create(struct class *class, struct device *parent, 1125struct device *device_create_vargs(struct class *class, struct device *parent,
1108 dev_t devt, const char *fmt, ...) 1126 dev_t devt, void *drvdata, const char *fmt,
1127 va_list args)
1109{ 1128{
1110 va_list args;
1111 struct device *dev = NULL; 1129 struct device *dev = NULL;
1112 int retval = -ENODEV; 1130 int retval = -ENODEV;
1113 1131
@@ -1124,10 +1142,9 @@ struct device *device_create(struct class *class, struct device *parent,
1124 dev->class = class; 1142 dev->class = class;
1125 dev->parent = parent; 1143 dev->parent = parent;
1126 dev->release = device_create_release; 1144 dev->release = device_create_release;
1145 dev_set_drvdata(dev, drvdata);
1127 1146
1128 va_start(args, fmt);
1129 vsnprintf(dev->bus_id, BUS_ID_SIZE, fmt, args); 1147 vsnprintf(dev->bus_id, BUS_ID_SIZE, fmt, args);
1130 va_end(args);
1131 retval = device_register(dev); 1148 retval = device_register(dev);
1132 if (retval) 1149 if (retval)
1133 goto error; 1150 goto error;
@@ -1138,6 +1155,78 @@ error:
1138 kfree(dev); 1155 kfree(dev);
1139 return ERR_PTR(retval); 1156 return ERR_PTR(retval);
1140} 1157}
1158EXPORT_SYMBOL_GPL(device_create_vargs);
1159
1160/**
1161 * device_create_drvdata - creates a device and registers it with sysfs
1162 * @class: pointer to the struct class that this device should be registered to
1163 * @parent: pointer to the parent struct device of this new device, if any
1164 * @devt: the dev_t for the char device to be added
1165 * @drvdata: the data to be added to the device for callbacks
1166 * @fmt: string for the device's name
1167 *
1168 * This function can be used by char device classes. A struct device
1169 * will be created in sysfs, registered to the specified class.
1170 *
1171 * A "dev" file will be created, showing the dev_t for the device, if
1172 * the dev_t is not 0,0.
1173 * If a pointer to a parent struct device is passed in, the newly created
1174 * struct device will be a child of that device in sysfs.
1175 * The pointer to the struct device will be returned from the call.
1176 * Any further sysfs files that might be required can be created using this
1177 * pointer.
1178 *
1179 * Note: the struct class passed to this function must have previously
1180 * been created with a call to class_create().
1181 */
1182struct device *device_create_drvdata(struct class *class,
1183 struct device *parent,
1184 dev_t devt,
1185 void *drvdata,
1186 const char *fmt, ...)
1187{
1188 va_list vargs;
1189 struct device *dev;
1190
1191 va_start(vargs, fmt);
1192 dev = device_create_vargs(class, parent, devt, drvdata, fmt, vargs);
1193 va_end(vargs);
1194 return dev;
1195}
1196EXPORT_SYMBOL_GPL(device_create_drvdata);
1197
1198/**
1199 * device_create - creates a device and registers it with sysfs
1200 * @class: pointer to the struct class that this device should be registered to
1201 * @parent: pointer to the parent struct device of this new device, if any
1202 * @devt: the dev_t for the char device to be added
1203 * @fmt: string for the device's name
1204 *
1205 * This function can be used by char device classes. A struct device
1206 * will be created in sysfs, registered to the specified class.
1207 *
1208 * A "dev" file will be created, showing the dev_t for the device, if
1209 * the dev_t is not 0,0.
1210 * If a pointer to a parent struct device is passed in, the newly created
1211 * struct device will be a child of that device in sysfs.
1212 * The pointer to the struct device will be returned from the call.
1213 * Any further sysfs files that might be required can be created using this
1214 * pointer.
1215 *
1216 * Note: the struct class passed to this function must have previously
1217 * been created with a call to class_create().
1218 */
1219struct device *device_create(struct class *class, struct device *parent,
1220 dev_t devt, const char *fmt, ...)
1221{
1222 va_list vargs;
1223 struct device *dev;
1224
1225 va_start(vargs, fmt);
1226 dev = device_create_vargs(class, parent, devt, NULL, fmt, vargs);
1227 va_end(vargs);
1228 return dev;
1229}
1141EXPORT_SYMBOL_GPL(device_create); 1230EXPORT_SYMBOL_GPL(device_create);
1142 1231
1143static int __match_devt(struct device *dev, void *data) 1232static int __match_devt(struct device *dev, void *data)
@@ -1218,13 +1307,11 @@ int device_rename(struct device *dev, char *new_name)
1218 } 1307 }
1219#else 1308#else
1220 if (dev->class) { 1309 if (dev->class) {
1221 sysfs_remove_link(&dev->class->subsys.kobj, old_device_name);
1222 error = sysfs_create_link(&dev->class->subsys.kobj, &dev->kobj, 1310 error = sysfs_create_link(&dev->class->subsys.kobj, &dev->kobj,
1223 dev->bus_id); 1311 dev->bus_id);
1224 if (error) { 1312 if (error)
1225 dev_err(dev, "%s: sysfs_create_symlink failed (%d)\n", 1313 goto out;
1226 __func__, error); 1314 sysfs_remove_link(&dev->class->subsys.kobj, old_device_name);
1227 }
1228 } 1315 }
1229#endif 1316#endif
1230 1317
diff --git a/drivers/base/node.c b/drivers/base/node.c
index 39f3d1b3a213..0f867a083338 100644
--- a/drivers/base/node.c
+++ b/drivers/base/node.c
@@ -84,8 +84,8 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf)
84 nid, K(i.totalram), 84 nid, K(i.totalram),
85 nid, K(i.freeram), 85 nid, K(i.freeram),
86 nid, K(i.totalram - i.freeram), 86 nid, K(i.totalram - i.freeram),
87 nid, node_page_state(nid, NR_ACTIVE), 87 nid, K(node_page_state(nid, NR_ACTIVE)),
88 nid, node_page_state(nid, NR_INACTIVE), 88 nid, K(node_page_state(nid, NR_INACTIVE)),
89#ifdef CONFIG_HIGHMEM 89#ifdef CONFIG_HIGHMEM
90 nid, K(i.totalhigh), 90 nid, K(i.totalhigh),
91 nid, K(i.freehigh), 91 nid, K(i.freehigh),
diff --git a/drivers/base/power/trace.c b/drivers/base/power/trace.c
index 2b4b392dcbc1..87a7f1d02578 100644
--- a/drivers/base/power/trace.c
+++ b/drivers/base/power/trace.c
@@ -153,7 +153,7 @@ EXPORT_SYMBOL(set_trace_device);
153 * it's not any guarantee, but it's a high _likelihood_ that 153 * it's not any guarantee, but it's a high _likelihood_ that
154 * the match is valid). 154 * the match is valid).
155 */ 155 */
156void generate_resume_trace(void *tracedata, unsigned int user) 156void generate_resume_trace(const void *tracedata, unsigned int user)
157{ 157{
158 unsigned short lineno = *(unsigned short *)tracedata; 158 unsigned short lineno = *(unsigned short *)tracedata;
159 const char *file = *(const char **)(tracedata + 2); 159 const char *file = *(const char **)(tracedata + 2);
diff --git a/drivers/block/brd.c b/drivers/block/brd.c
index a196ef7f147f..24b97b0bef99 100644
--- a/drivers/block/brd.c
+++ b/drivers/block/brd.c
@@ -397,6 +397,7 @@ module_param(max_part, int, 0);
397MODULE_PARM_DESC(max_part, "Maximum number of partitions per RAM disk"); 397MODULE_PARM_DESC(max_part, "Maximum number of partitions per RAM disk");
398MODULE_LICENSE("GPL"); 398MODULE_LICENSE("GPL");
399MODULE_ALIAS_BLOCKDEV_MAJOR(RAMDISK_MAJOR); 399MODULE_ALIAS_BLOCKDEV_MAJOR(RAMDISK_MAJOR);
400MODULE_ALIAS("rd");
400 401
401#ifndef MODULE 402#ifndef MODULE
402/* Legacy boot options - nonmodular */ 403/* Legacy boot options - nonmodular */
@@ -447,6 +448,7 @@ static struct brd_device *brd_alloc(int i)
447 disk->fops = &brd_fops; 448 disk->fops = &brd_fops;
448 disk->private_data = brd; 449 disk->private_data = brd;
449 disk->queue = brd->brd_queue; 450 disk->queue = brd->brd_queue;
451 disk->flags |= GENHD_FL_SUPPRESS_PARTITION_INFO;
450 sprintf(disk->disk_name, "ram%d", i); 452 sprintf(disk->disk_name, "ram%d", i);
451 set_capacity(disk, rd_size * 2); 453 set_capacity(disk, rd_size * 2);
452 454
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index e336b05fe4a7..d81632cd7d06 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -53,15 +53,16 @@
53#include <linux/scatterlist.h> 53#include <linux/scatterlist.h>
54 54
55#define CCISS_DRIVER_VERSION(maj,min,submin) ((maj<<16)|(min<<8)|(submin)) 55#define CCISS_DRIVER_VERSION(maj,min,submin) ((maj<<16)|(min<<8)|(submin))
56#define DRIVER_NAME "HP CISS Driver (v 3.6.14)" 56#define DRIVER_NAME "HP CISS Driver (v 3.6.20)"
57#define DRIVER_VERSION CCISS_DRIVER_VERSION(3,6,14) 57#define DRIVER_VERSION CCISS_DRIVER_VERSION(3, 6, 20)
58 58
59/* Embedded module documentation macros - see modules.h */ 59/* Embedded module documentation macros - see modules.h */
60MODULE_AUTHOR("Hewlett-Packard Company"); 60MODULE_AUTHOR("Hewlett-Packard Company");
61MODULE_DESCRIPTION("Driver for HP Controller SA5xxx SA6xxx version 3.6.14"); 61MODULE_DESCRIPTION("Driver for HP Smart Array Controllers");
62MODULE_SUPPORTED_DEVICE("HP SA5i SA5i+ SA532 SA5300 SA5312 SA641 SA642 SA6400" 62MODULE_SUPPORTED_DEVICE("HP SA5i SA5i+ SA532 SA5300 SA5312 SA641 SA642 SA6400"
63 " SA6i P600 P800 P400 P400i E200 E200i E500"); 63 " SA6i P600 P800 P400 P400i E200 E200i E500 P700m"
64MODULE_VERSION("3.6.14"); 64 " Smart Array G2 Series SAS/SATA Controllers");
65MODULE_VERSION("3.6.20");
65MODULE_LICENSE("GPL"); 66MODULE_LICENSE("GPL");
66 67
67#include "cciss_cmd.h" 68#include "cciss_cmd.h"
@@ -90,6 +91,11 @@ static const struct pci_device_id cciss_pci_device_id[] = {
90 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, 0x103C, 0x3215}, 91 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, 0x103C, 0x3215},
91 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, 0x103C, 0x3237}, 92 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, 0x103C, 0x3237},
92 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, 0x103C, 0x323D}, 93 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, 0x103C, 0x323D},
94 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3241},
95 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3243},
96 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3245},
97 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3247},
98 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3249},
93 {PCI_VENDOR_ID_HP, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 99 {PCI_VENDOR_ID_HP, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
94 PCI_CLASS_STORAGE_RAID << 8, 0xffff << 8, 0}, 100 PCI_CLASS_STORAGE_RAID << 8, 0xffff << 8, 0},
95 {0,} 101 {0,}
@@ -100,30 +106,34 @@ MODULE_DEVICE_TABLE(pci, cciss_pci_device_id);
100/* board_id = Subsystem Device ID & Vendor ID 106/* board_id = Subsystem Device ID & Vendor ID
101 * product = Marketing Name for the board 107 * product = Marketing Name for the board
102 * access = Address of the struct of function pointers 108 * access = Address of the struct of function pointers
103 * nr_cmds = Number of commands supported by controller
104 */ 109 */
105static struct board_type products[] = { 110static struct board_type products[] = {
106 {0x40700E11, "Smart Array 5300", &SA5_access, 512}, 111 {0x40700E11, "Smart Array 5300", &SA5_access},
107 {0x40800E11, "Smart Array 5i", &SA5B_access, 512}, 112 {0x40800E11, "Smart Array 5i", &SA5B_access},
108 {0x40820E11, "Smart Array 532", &SA5B_access, 512}, 113 {0x40820E11, "Smart Array 532", &SA5B_access},
109 {0x40830E11, "Smart Array 5312", &SA5B_access, 512}, 114 {0x40830E11, "Smart Array 5312", &SA5B_access},
110 {0x409A0E11, "Smart Array 641", &SA5_access, 512}, 115 {0x409A0E11, "Smart Array 641", &SA5_access},
111 {0x409B0E11, "Smart Array 642", &SA5_access, 512}, 116 {0x409B0E11, "Smart Array 642", &SA5_access},
112 {0x409C0E11, "Smart Array 6400", &SA5_access, 512}, 117 {0x409C0E11, "Smart Array 6400", &SA5_access},
113 {0x409D0E11, "Smart Array 6400 EM", &SA5_access, 512}, 118 {0x409D0E11, "Smart Array 6400 EM", &SA5_access},
114 {0x40910E11, "Smart Array 6i", &SA5_access, 512}, 119 {0x40910E11, "Smart Array 6i", &SA5_access},
115 {0x3225103C, "Smart Array P600", &SA5_access, 512}, 120 {0x3225103C, "Smart Array P600", &SA5_access},
116 {0x3223103C, "Smart Array P800", &SA5_access, 512}, 121 {0x3223103C, "Smart Array P800", &SA5_access},
117 {0x3234103C, "Smart Array P400", &SA5_access, 512}, 122 {0x3234103C, "Smart Array P400", &SA5_access},
118 {0x3235103C, "Smart Array P400i", &SA5_access, 512}, 123 {0x3235103C, "Smart Array P400i", &SA5_access},
119 {0x3211103C, "Smart Array E200i", &SA5_access, 120}, 124 {0x3211103C, "Smart Array E200i", &SA5_access},
120 {0x3212103C, "Smart Array E200", &SA5_access, 120}, 125 {0x3212103C, "Smart Array E200", &SA5_access},
121 {0x3213103C, "Smart Array E200i", &SA5_access, 120}, 126 {0x3213103C, "Smart Array E200i", &SA5_access},
122 {0x3214103C, "Smart Array E200i", &SA5_access, 120}, 127 {0x3214103C, "Smart Array E200i", &SA5_access},
123 {0x3215103C, "Smart Array E200i", &SA5_access, 120}, 128 {0x3215103C, "Smart Array E200i", &SA5_access},
124 {0x3237103C, "Smart Array E500", &SA5_access, 512}, 129 {0x3237103C, "Smart Array E500", &SA5_access},
125 {0x323D103C, "Smart Array P700m", &SA5_access, 512}, 130 {0x323D103C, "Smart Array P700m", &SA5_access},
126 {0xFFFF103C, "Unknown Smart Array", &SA5_access, 120}, 131 {0x3241103C, "Smart Array P212", &SA5_access},
132 {0x3243103C, "Smart Array P410", &SA5_access},
133 {0x3245103C, "Smart Array P410i", &SA5_access},
134 {0x3247103C, "Smart Array P411", &SA5_access},
135 {0x3249103C, "Smart Array P812", &SA5_access},
136 {0xFFFF103C, "Unknown Smart Array", &SA5_access},
127}; 137};
128 138
129/* How long to wait (in milliseconds) for board to go into simple mode */ 139/* How long to wait (in milliseconds) for board to go into simple mode */
@@ -3075,11 +3085,20 @@ static int __devinit cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev)
3075 print_cfg_table(c->cfgtable); 3085 print_cfg_table(c->cfgtable);
3076#endif /* CCISS_DEBUG */ 3086#endif /* CCISS_DEBUG */
3077 3087
3088 /* Some controllers support Zero Memory Raid (ZMR).
3089 * When configured in ZMR mode the number of supported
3090 * commands drops to 64. So instead of just setting an
3091 * arbitrary value we make the driver a little smarter.
3092 * We read the config table to tell us how many commands
3093 * are supported on the controller then subtract 4 to
3094 * leave a little room for ioctl calls.
3095 */
3096 c->max_commands = readl(&(c->cfgtable->CmdsOutMax));
3078 for (i = 0; i < ARRAY_SIZE(products); i++) { 3097 for (i = 0; i < ARRAY_SIZE(products); i++) {
3079 if (board_id == products[i].board_id) { 3098 if (board_id == products[i].board_id) {
3080 c->product_name = products[i].product_name; 3099 c->product_name = products[i].product_name;
3081 c->access = *(products[i].access); 3100 c->access = *(products[i].access);
3082 c->nr_cmds = products[i].nr_cmds; 3101 c->nr_cmds = c->max_commands - 4;
3083 break; 3102 break;
3084 } 3103 }
3085 } 3104 }
@@ -3099,7 +3118,7 @@ static int __devinit cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev)
3099 if (subsystem_vendor_id == PCI_VENDOR_ID_HP) { 3118 if (subsystem_vendor_id == PCI_VENDOR_ID_HP) {
3100 c->product_name = products[i-1].product_name; 3119 c->product_name = products[i-1].product_name;
3101 c->access = *(products[i-1].access); 3120 c->access = *(products[i-1].access);
3102 c->nr_cmds = products[i-1].nr_cmds; 3121 c->nr_cmds = c->max_commands - 4;
3103 printk(KERN_WARNING "cciss: This is an unknown " 3122 printk(KERN_WARNING "cciss: This is an unknown "
3104 "Smart Array controller.\n" 3123 "Smart Array controller.\n"
3105 "cciss: Please update to the latest driver " 3124 "cciss: Please update to the latest driver "
@@ -3535,6 +3554,10 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
3535 for (j = 0; j <= hba[i]->highest_lun; j++) 3554 for (j = 0; j <= hba[i]->highest_lun; j++)
3536 add_disk(hba[i]->gendisk[j]); 3555 add_disk(hba[i]->gendisk[j]);
3537 3556
3557 /* we must register the controller even if no disks exist */
3558 if (hba[i]->highest_lun == -1)
3559 add_disk(hba[i]->gendisk[0]);
3560
3538 return 1; 3561 return 1;
3539 3562
3540 clean4: 3563 clean4:
diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c
index ebfe038d859e..f1c8feb5510b 100644
--- a/drivers/block/viodasd.c
+++ b/drivers/block/viodasd.c
@@ -3,7 +3,7 @@
3 * Authors: Dave Boutcher <boutcher@us.ibm.com> 3 * Authors: Dave Boutcher <boutcher@us.ibm.com>
4 * Ryan Arnold <ryanarn@us.ibm.com> 4 * Ryan Arnold <ryanarn@us.ibm.com>
5 * Colin Devilbiss <devilbis@us.ibm.com> 5 * Colin Devilbiss <devilbis@us.ibm.com>
6 * Stephen Rothwell <sfr@au1.ibm.com> 6 * Stephen Rothwell
7 * 7 *
8 * (C) Copyright 2000-2004 IBM Corporation 8 * (C) Copyright 2000-2004 IBM Corporation
9 * 9 *
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 84e064ffee52..dd7ea203f940 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -260,6 +260,10 @@ static int virtblk_probe(struct virtio_device *vdev)
260 if (virtio_has_feature(vdev, VIRTIO_BLK_F_BARRIER)) 260 if (virtio_has_feature(vdev, VIRTIO_BLK_F_BARRIER))
261 blk_queue_ordered(vblk->disk->queue, QUEUE_ORDERED_TAG, NULL); 261 blk_queue_ordered(vblk->disk->queue, QUEUE_ORDERED_TAG, NULL);
262 262
263 /* If disk is read-only in the host, the guest should obey */
264 if (virtio_has_feature(vdev, VIRTIO_BLK_F_RO))
265 set_disk_ro(vblk->disk, 1);
266
263 /* Host must always specify the capacity. */ 267 /* Host must always specify the capacity. */
264 vdev->config->get(vdev, offsetof(struct virtio_blk_config, capacity), 268 vdev->config->get(vdev, offsetof(struct virtio_blk_config, capacity),
265 &cap, sizeof(cap)); 269 &cap, sizeof(cap));
@@ -311,6 +315,7 @@ static void virtblk_remove(struct virtio_device *vdev)
311 /* Stop all the virtqueues. */ 315 /* Stop all the virtqueues. */
312 vdev->config->reset(vdev); 316 vdev->config->reset(vdev);
313 317
318 del_gendisk(vblk->disk);
314 blk_cleanup_queue(vblk->disk->queue); 319 blk_cleanup_queue(vblk->disk->queue);
315 put_disk(vblk->disk); 320 put_disk(vblk->disk);
316 mempool_destroy(vblk->pool); 321 mempool_destroy(vblk->pool);
@@ -325,7 +330,7 @@ static struct virtio_device_id id_table[] = {
325 330
326static unsigned int features[] = { 331static unsigned int features[] = {
327 VIRTIO_BLK_F_BARRIER, VIRTIO_BLK_F_SEG_MAX, VIRTIO_BLK_F_SIZE_MAX, 332 VIRTIO_BLK_F_BARRIER, VIRTIO_BLK_F_SEG_MAX, VIRTIO_BLK_F_SIZE_MAX,
328 VIRTIO_BLK_F_GEOMETRY, 333 VIRTIO_BLK_F_GEOMETRY, VIRTIO_BLK_F_RO,
329}; 334};
330 335
331static struct virtio_driver virtio_blk = { 336static struct virtio_driver virtio_blk = {
diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c
index 5245a4a0ba74..9d0dfe6e0d63 100644
--- a/drivers/cdrom/viocd.c
+++ b/drivers/cdrom/viocd.c
@@ -6,7 +6,7 @@
6 * Authors: Dave Boutcher <boutcher@us.ibm.com> 6 * Authors: Dave Boutcher <boutcher@us.ibm.com>
7 * Ryan Arnold <ryanarn@us.ibm.com> 7 * Ryan Arnold <ryanarn@us.ibm.com>
8 * Colin Devilbiss <devilbis@us.ibm.com> 8 * Colin Devilbiss <devilbis@us.ibm.com>
9 * Stephen Rothwell <sfr@au1.ibm.com> 9 * Stephen Rothwell
10 * 10 *
11 * (C) Copyright 2000-2004 IBM Corporation 11 * (C) Copyright 2000-2004 IBM Corporation
12 * 12 *
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index 595a925c62a9..2d854bb9373e 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -118,8 +118,8 @@ config COMPUTONE
118 order to become a dial-in server. If you have a card like that, say 118 order to become a dial-in server. If you have a card like that, say
119 Y here and read <file:Documentation/computone.txt>. 119 Y here and read <file:Documentation/computone.txt>.
120 120
121 To compile this driver as modules, choose M here: the 121 To compile this driver as module, choose M here: the
122 modules will be called ip2 and ip2main. 122 module will be called ip2.
123 123
124config ROCKETPORT 124config ROCKETPORT
125 tristate "Comtrol RocketPort support" 125 tristate "Comtrol RocketPort support"
@@ -749,7 +749,7 @@ config NVRAM
749if RTC_LIB=n 749if RTC_LIB=n
750 750
751config RTC 751config RTC
752 tristate "Enhanced Real Time Clock Support" 752 tristate "Enhanced Real Time Clock Support (legacy PC RTC driver)"
753 depends on !PPC && !PARISC && !IA64 && !M68K && !SPARC && !FRV \ 753 depends on !PPC && !PARISC && !IA64 && !M68K && !SPARC && !FRV \
754 && !ARM && !SUPERH && !S390 && !AVR32 754 && !ARM && !SUPERH && !S390 && !AVR32
755 ---help--- 755 ---help---
@@ -1036,9 +1036,9 @@ config HPET
1036 non-periodic and/or periodic. 1036 non-periodic and/or periodic.
1037 1037
1038config HPET_RTC_IRQ 1038config HPET_RTC_IRQ
1039 bool "HPET Control RTC IRQ" if !HPET_EMULATE_RTC 1039 bool
1040 default n 1040 default HPET_EMULATE_RTC
1041 depends on HPET 1041 depends on RTC && HPET
1042 help 1042 help
1043 If you say Y here, you will disable RTC_IRQ in drivers/char/rtc.c. It 1043 If you say Y here, you will disable RTC_IRQ in drivers/char/rtc.c. It
1044 is assumed the platform called hpet_alloc with the RTC IRQ values for 1044 is assumed the platform called hpet_alloc with the RTC IRQ values for
diff --git a/drivers/char/agp/agp.h b/drivers/char/agp/agp.h
index 99e6a406efb4..81e14bea54bd 100644
--- a/drivers/char/agp/agp.h
+++ b/drivers/char/agp/agp.h
@@ -99,8 +99,8 @@ struct agp_bridge_driver {
99 const void *aperture_sizes; 99 const void *aperture_sizes;
100 int num_aperture_sizes; 100 int num_aperture_sizes;
101 enum aper_size_type size_type; 101 enum aper_size_type size_type;
102 int cant_use_aperture; 102 bool cant_use_aperture;
103 int needs_scratch_page; 103 bool needs_scratch_page;
104 const struct gatt_mask *masks; 104 const struct gatt_mask *masks;
105 int (*fetch_size)(void); 105 int (*fetch_size)(void);
106 int (*configure)(void); 106 int (*configure)(void);
@@ -278,7 +278,7 @@ void agp_generic_destroy_page(void *addr, int flags);
278void agp_free_key(int key); 278void agp_free_key(int key);
279int agp_num_entries(void); 279int agp_num_entries(void);
280u32 agp_collect_device_status(struct agp_bridge_data *bridge, u32 mode, u32 command); 280u32 agp_collect_device_status(struct agp_bridge_data *bridge, u32 mode, u32 command);
281void agp_device_command(u32 command, int agp_v3); 281void agp_device_command(u32 command, bool agp_v3);
282int agp_3_5_enable(struct agp_bridge_data *bridge); 282int agp_3_5_enable(struct agp_bridge_data *bridge);
283void global_cache_flush(void); 283void global_cache_flush(void);
284void get_agp_version(struct agp_bridge_data *bridge); 284void get_agp_version(struct agp_bridge_data *bridge);
diff --git a/drivers/char/agp/alpha-agp.c b/drivers/char/agp/alpha-agp.c
index e77c17838c8a..5da89f6c6c25 100644
--- a/drivers/char/agp/alpha-agp.c
+++ b/drivers/char/agp/alpha-agp.c
@@ -80,7 +80,7 @@ static void alpha_core_agp_enable(struct agp_bridge_data *bridge, u32 mode)
80 agp->mode.bits.enable = 1; 80 agp->mode.bits.enable = 1;
81 agp->ops->configure(agp); 81 agp->ops->configure(agp);
82 82
83 agp_device_command(agp->mode.lw, 0); 83 agp_device_command(agp->mode.lw, false);
84} 84}
85 85
86static int alpha_core_agp_insert_memory(struct agp_memory *mem, off_t pg_start, 86static int alpha_core_agp_insert_memory(struct agp_memory *mem, off_t pg_start,
@@ -126,7 +126,7 @@ struct agp_bridge_driver alpha_core_agp_driver = {
126 .aperture_sizes = alpha_core_agp_sizes, 126 .aperture_sizes = alpha_core_agp_sizes,
127 .num_aperture_sizes = 1, 127 .num_aperture_sizes = 1,
128 .size_type = FIXED_APER_SIZE, 128 .size_type = FIXED_APER_SIZE,
129 .cant_use_aperture = 1, 129 .cant_use_aperture = true,
130 .masks = NULL, 130 .masks = NULL,
131 131
132 .fetch_size = alpha_core_agp_fetch_size, 132 .fetch_size = alpha_core_agp_fetch_size,
diff --git a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c
index 96bdb9296b07..39a0718bc616 100644
--- a/drivers/char/agp/amd-k7-agp.c
+++ b/drivers/char/agp/amd-k7-agp.c
@@ -314,9 +314,9 @@ static int amd_insert_memory(struct agp_memory *mem, off_t pg_start, int type)
314 j++; 314 j++;
315 } 315 }
316 316
317 if (mem->is_flushed == FALSE) { 317 if (!mem->is_flushed) {
318 global_cache_flush(); 318 global_cache_flush();
319 mem->is_flushed = TRUE; 319 mem->is_flushed = true;
320 } 320 }
321 321
322 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { 322 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
index d8200ac8f8cb..481ffe87c716 100644
--- a/drivers/char/agp/amd64-agp.c
+++ b/drivers/char/agp/amd64-agp.c
@@ -16,28 +16,9 @@
16#include <asm/page.h> /* PAGE_SIZE */ 16#include <asm/page.h> /* PAGE_SIZE */
17#include <asm/e820.h> 17#include <asm/e820.h>
18#include <asm/k8.h> 18#include <asm/k8.h>
19#include <asm/gart.h>
19#include "agp.h" 20#include "agp.h"
20 21
21/* PTE bits. */
22#define GPTE_VALID 1
23#define GPTE_COHERENT 2
24
25/* Aperture control register bits. */
26#define GARTEN (1<<0)
27#define DISGARTCPU (1<<4)
28#define DISGARTIO (1<<5)
29
30/* GART cache control register bits. */
31#define INVGART (1<<0)
32#define GARTPTEERR (1<<1)
33
34/* K8 On-cpu GART registers */
35#define AMD64_GARTAPERTURECTL 0x90
36#define AMD64_GARTAPERTUREBASE 0x94
37#define AMD64_GARTTABLEBASE 0x98
38#define AMD64_GARTCACHECTL 0x9c
39#define AMD64_GARTEN (1<<0)
40
41/* NVIDIA K8 registers */ 22/* NVIDIA K8 registers */
42#define NVIDIA_X86_64_0_APBASE 0x10 23#define NVIDIA_X86_64_0_APBASE 0x10
43#define NVIDIA_X86_64_1_APBASE1 0x50 24#define NVIDIA_X86_64_1_APBASE1 0x50
@@ -90,9 +71,9 @@ static int amd64_insert_memory(struct agp_memory *mem, off_t pg_start, int type)
90 j++; 71 j++;
91 } 72 }
92 73
93 if (mem->is_flushed == FALSE) { 74 if (!mem->is_flushed) {
94 global_cache_flush(); 75 global_cache_flush();
95 mem->is_flushed = TRUE; 76 mem->is_flushed = true;
96 } 77 }
97 78
98 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { 79 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
@@ -165,29 +146,18 @@ static int amd64_fetch_size(void)
165 * In a multiprocessor x86-64 system, this function gets 146 * In a multiprocessor x86-64 system, this function gets
166 * called once for each CPU. 147 * called once for each CPU.
167 */ 148 */
168static u64 amd64_configure (struct pci_dev *hammer, u64 gatt_table) 149static u64 amd64_configure(struct pci_dev *hammer, u64 gatt_table)
169{ 150{
170 u64 aperturebase; 151 u64 aperturebase;
171 u32 tmp; 152 u32 tmp;
172 u64 addr, aper_base; 153 u64 aper_base;
173 154
174 /* Address to map to */ 155 /* Address to map to */
175 pci_read_config_dword (hammer, AMD64_GARTAPERTUREBASE, &tmp); 156 pci_read_config_dword(hammer, AMD64_GARTAPERTUREBASE, &tmp);
176 aperturebase = tmp << 25; 157 aperturebase = tmp << 25;
177 aper_base = (aperturebase & PCI_BASE_ADDRESS_MEM_MASK); 158 aper_base = (aperturebase & PCI_BASE_ADDRESS_MEM_MASK);
178 159
179 /* address of the mappings table */ 160 enable_gart_translation(hammer, gatt_table);
180 addr = (u64) gatt_table;
181 addr >>= 12;
182 tmp = (u32) addr<<4;
183 tmp &= ~0xf;
184 pci_write_config_dword (hammer, AMD64_GARTTABLEBASE, tmp);
185
186 /* Enable GART translation for this hammer. */
187 pci_read_config_dword(hammer, AMD64_GARTAPERTURECTL, &tmp);
188 tmp |= GARTEN;
189 tmp &= ~(DISGARTCPU | DISGARTIO);
190 pci_write_config_dword(hammer, AMD64_GARTAPERTURECTL, tmp);
191 161
192 return aper_base; 162 return aper_base;
193} 163}
@@ -226,9 +196,9 @@ static void amd64_cleanup(void)
226 for (i = 0; i < num_k8_northbridges; i++) { 196 for (i = 0; i < num_k8_northbridges; i++) {
227 struct pci_dev *dev = k8_northbridges[i]; 197 struct pci_dev *dev = k8_northbridges[i];
228 /* disable gart translation */ 198 /* disable gart translation */
229 pci_read_config_dword (dev, AMD64_GARTAPERTURECTL, &tmp); 199 pci_read_config_dword(dev, AMD64_GARTAPERTURECTL, &tmp);
230 tmp &= ~AMD64_GARTEN; 200 tmp &= ~AMD64_GARTEN;
231 pci_write_config_dword (dev, AMD64_GARTAPERTURECTL, tmp); 201 pci_write_config_dword(dev, AMD64_GARTAPERTURECTL, tmp);
232 } 202 }
233} 203}
234 204
@@ -258,24 +228,10 @@ static const struct agp_bridge_driver amd_8151_driver = {
258}; 228};
259 229
260/* Some basic sanity checks for the aperture. */ 230/* Some basic sanity checks for the aperture. */
261static int __devinit aperture_valid(u64 aper, u32 size) 231static int __devinit agp_aperture_valid(u64 aper, u32 size)
262{ 232{
263 if (aper == 0) { 233 if (!aperture_valid(aper, size, 32*1024*1024))
264 printk(KERN_ERR PFX "No aperture\n");
265 return 0;
266 }
267 if (size < 32*1024*1024) {
268 printk(KERN_ERR PFX "Aperture too small (%d MB)\n", size>>20);
269 return 0;
270 }
271 if ((u64)aper + size > 0x100000000ULL) {
272 printk(KERN_ERR PFX "Aperture out of bounds\n");
273 return 0; 234 return 0;
274 }
275 if (e820_any_mapped(aper, aper + size, E820_RAM)) {
276 printk(KERN_ERR PFX "Aperture pointing to RAM\n");
277 return 0;
278 }
279 235
280 /* Request the Aperture. This catches cases when someone else 236 /* Request the Aperture. This catches cases when someone else
281 already put a mapping in there - happens with some very broken BIOS 237 already put a mapping in there - happens with some very broken BIOS
@@ -308,11 +264,11 @@ static __devinit int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp,
308 u32 nb_order, nb_base; 264 u32 nb_order, nb_base;
309 u16 apsize; 265 u16 apsize;
310 266
311 pci_read_config_dword(nb, 0x90, &nb_order); 267 pci_read_config_dword(nb, AMD64_GARTAPERTURECTL, &nb_order);
312 nb_order = (nb_order >> 1) & 7; 268 nb_order = (nb_order >> 1) & 7;
313 pci_read_config_dword(nb, 0x94, &nb_base); 269 pci_read_config_dword(nb, AMD64_GARTAPERTUREBASE, &nb_base);
314 nb_aper = nb_base << 25; 270 nb_aper = nb_base << 25;
315 if (aperture_valid(nb_aper, (32*1024*1024)<<nb_order)) { 271 if (agp_aperture_valid(nb_aper, (32*1024*1024)<<nb_order)) {
316 return 0; 272 return 0;
317 } 273 }
318 274
@@ -331,12 +287,23 @@ static __devinit int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp,
331 pci_read_config_dword(agp, 0x10, &aper_low); 287 pci_read_config_dword(agp, 0x10, &aper_low);
332 pci_read_config_dword(agp, 0x14, &aper_hi); 288 pci_read_config_dword(agp, 0x14, &aper_hi);
333 aper = (aper_low & ~((1<<22)-1)) | ((u64)aper_hi << 32); 289 aper = (aper_low & ~((1<<22)-1)) | ((u64)aper_hi << 32);
290
291 /*
292 * On some sick chips APSIZE is 0. This means it wants 4G
293 * so let double check that order, and lets trust the AMD NB settings
294 */
295 if (order >=0 && aper + (32ULL<<(20 + order)) > 0x100000000ULL) {
296 printk(KERN_INFO "Aperture size %u MB is not right, using settings from NB\n",
297 32 << order);
298 order = nb_order;
299 }
300
334 printk(KERN_INFO PFX "Aperture from AGP @ %Lx size %u MB\n", aper, 32 << order); 301 printk(KERN_INFO PFX "Aperture from AGP @ %Lx size %u MB\n", aper, 32 << order);
335 if (order < 0 || !aperture_valid(aper, (32*1024*1024)<<order)) 302 if (order < 0 || !agp_aperture_valid(aper, (32*1024*1024)<<order))
336 return -1; 303 return -1;
337 304
338 pci_write_config_dword(nb, 0x90, order << 1); 305 pci_write_config_dword(nb, AMD64_GARTAPERTURECTL, order << 1);
339 pci_write_config_dword(nb, 0x94, aper >> 25); 306 pci_write_config_dword(nb, AMD64_GARTAPERTUREBASE, aper >> 25);
340 307
341 return 0; 308 return 0;
342} 309}
diff --git a/drivers/char/agp/ati-agp.c b/drivers/char/agp/ati-agp.c
index 55c97f623242..3a4566c0d84f 100644
--- a/drivers/char/agp/ati-agp.c
+++ b/drivers/char/agp/ati-agp.c
@@ -287,10 +287,10 @@ static int ati_insert_memory(struct agp_memory * mem,
287 j++; 287 j++;
288 } 288 }
289 289
290 if (mem->is_flushed == FALSE) { 290 if (!mem->is_flushed) {
291 /*CACHE_FLUSH(); */ 291 /*CACHE_FLUSH(); */
292 global_cache_flush(); 292 global_cache_flush();
293 mem->is_flushed = TRUE; 293 mem->is_flushed = true;
294 } 294 }
295 295
296 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { 296 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
@@ -458,6 +458,10 @@ static struct agp_device_ids ati_agp_device_ids[] __devinitdata =
458 .chipset_name = "IGP9100/M", 458 .chipset_name = "IGP9100/M",
459 }, 459 },
460 { 460 {
461 .device_id = PCI_DEVICE_ID_ATI_RS350_133,
462 .chipset_name = "IGP9000/M",
463 },
464 {
461 .device_id = PCI_DEVICE_ID_ATI_RS350_200, 465 .device_id = PCI_DEVICE_ID_ATI_RS350_200,
462 .chipset_name = "IGP9100/M", 466 .chipset_name = "IGP9100/M",
463 }, 467 },
diff --git a/drivers/char/agp/backend.c b/drivers/char/agp/backend.c
index b1bdd015165c..1ec87104e68c 100644
--- a/drivers/char/agp/backend.c
+++ b/drivers/char/agp/backend.c
@@ -188,10 +188,10 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge)
188 188
189err_out: 189err_out:
190 if (bridge->driver->needs_scratch_page) { 190 if (bridge->driver->needs_scratch_page) {
191 bridge->driver->agp_destroy_page(gart_to_virt(bridge->scratch_page_real), 191 void *va = gart_to_virt(bridge->scratch_page_real);
192 AGP_PAGE_DESTROY_UNMAP); 192
193 bridge->driver->agp_destroy_page(gart_to_virt(bridge->scratch_page_real), 193 bridge->driver->agp_destroy_page(va, AGP_PAGE_DESTROY_UNMAP);
194 AGP_PAGE_DESTROY_FREE); 194 bridge->driver->agp_destroy_page(va, AGP_PAGE_DESTROY_FREE);
195 } 195 }
196 if (got_gatt) 196 if (got_gatt)
197 bridge->driver->free_gatt_table(bridge); 197 bridge->driver->free_gatt_table(bridge);
@@ -215,10 +215,10 @@ static void agp_backend_cleanup(struct agp_bridge_data *bridge)
215 215
216 if (bridge->driver->agp_destroy_page && 216 if (bridge->driver->agp_destroy_page &&
217 bridge->driver->needs_scratch_page) { 217 bridge->driver->needs_scratch_page) {
218 bridge->driver->agp_destroy_page(gart_to_virt(bridge->scratch_page_real), 218 void *va = gart_to_virt(bridge->scratch_page_real);
219 AGP_PAGE_DESTROY_UNMAP); 219
220 bridge->driver->agp_destroy_page(gart_to_virt(bridge->scratch_page_real), 220 bridge->driver->agp_destroy_page(va, AGP_PAGE_DESTROY_UNMAP);
221 AGP_PAGE_DESTROY_FREE); 221 bridge->driver->agp_destroy_page(va, AGP_PAGE_DESTROY_FREE);
222 } 222 }
223} 223}
224 224
diff --git a/drivers/char/agp/compat_ioctl.c b/drivers/char/agp/compat_ioctl.c
index 39275794fe63..58c57cb2518c 100644
--- a/drivers/char/agp/compat_ioctl.c
+++ b/drivers/char/agp/compat_ioctl.c
@@ -214,7 +214,7 @@ long compat_agp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
214 ret_val = -EINVAL; 214 ret_val = -EINVAL;
215 goto ioctl_out; 215 goto ioctl_out;
216 } 216 }
217 if ((agp_fe.backend_acquired != TRUE) && 217 if ((agp_fe.backend_acquired != true) &&
218 (cmd != AGPIOC_ACQUIRE32)) { 218 (cmd != AGPIOC_ACQUIRE32)) {
219 ret_val = -EBUSY; 219 ret_val = -EBUSY;
220 goto ioctl_out; 220 goto ioctl_out;
diff --git a/drivers/char/agp/efficeon-agp.c b/drivers/char/agp/efficeon-agp.c
index cac0009cebc1..8ca6f262ef85 100644
--- a/drivers/char/agp/efficeon-agp.c
+++ b/drivers/char/agp/efficeon-agp.c
@@ -249,9 +249,9 @@ static int efficeon_insert_memory(struct agp_memory * mem, off_t pg_start, int t
249 if (type != 0 || mem->type != 0) 249 if (type != 0 || mem->type != 0)
250 return -EINVAL; 250 return -EINVAL;
251 251
252 if (mem->is_flushed == FALSE) { 252 if (!mem->is_flushed) {
253 global_cache_flush(); 253 global_cache_flush();
254 mem->is_flushed = TRUE; 254 mem->is_flushed = true;
255 } 255 }
256 256
257 last_page = NULL; 257 last_page = NULL;
@@ -329,7 +329,7 @@ static const struct agp_bridge_driver efficeon_driver = {
329 .free_gatt_table = efficeon_free_gatt_table, 329 .free_gatt_table = efficeon_free_gatt_table,
330 .insert_memory = efficeon_insert_memory, 330 .insert_memory = efficeon_insert_memory,
331 .remove_memory = efficeon_remove_memory, 331 .remove_memory = efficeon_remove_memory,
332 .cant_use_aperture = 0, // 1 might be faster? 332 .cant_use_aperture = false, // true might be faster?
333 333
334 // Generic 334 // Generic
335 .alloc_by_type = agp_generic_alloc_by_type, 335 .alloc_by_type = agp_generic_alloc_by_type,
diff --git a/drivers/char/agp/frontend.c b/drivers/char/agp/frontend.c
index 857b26227d87..e6cb1ab03e06 100644
--- a/drivers/char/agp/frontend.c
+++ b/drivers/char/agp/frontend.c
@@ -395,7 +395,7 @@ static int agp_remove_controller(struct agp_controller *controller)
395 395
396 if (agp_fe.current_controller == controller) { 396 if (agp_fe.current_controller == controller) {
397 agp_fe.current_controller = NULL; 397 agp_fe.current_controller = NULL;
398 agp_fe.backend_acquired = FALSE; 398 agp_fe.backend_acquired = false;
399 agp_backend_release(agp_bridge); 399 agp_backend_release(agp_bridge);
400 } 400 }
401 kfree(controller); 401 kfree(controller);
@@ -443,7 +443,7 @@ static void agp_controller_release_current(struct agp_controller *controller,
443 } 443 }
444 444
445 agp_fe.current_controller = NULL; 445 agp_fe.current_controller = NULL;
446 agp_fe.used_by_controller = FALSE; 446 agp_fe.used_by_controller = false;
447 agp_backend_release(agp_bridge); 447 agp_backend_release(agp_bridge);
448} 448}
449 449
@@ -573,7 +573,7 @@ static int agp_mmap(struct file *file, struct vm_area_struct *vma)
573 573
574 mutex_lock(&(agp_fe.agp_mutex)); 574 mutex_lock(&(agp_fe.agp_mutex));
575 575
576 if (agp_fe.backend_acquired != TRUE) 576 if (agp_fe.backend_acquired != true)
577 goto out_eperm; 577 goto out_eperm;
578 578
579 if (!(test_bit(AGP_FF_IS_VALID, &priv->access_flags))) 579 if (!(test_bit(AGP_FF_IS_VALID, &priv->access_flags)))
@@ -768,7 +768,7 @@ int agpioc_acquire_wrap(struct agp_file_private *priv)
768 768
769 atomic_inc(&agp_bridge->agp_in_use); 769 atomic_inc(&agp_bridge->agp_in_use);
770 770
771 agp_fe.backend_acquired = TRUE; 771 agp_fe.backend_acquired = true;
772 772
773 controller = agp_find_controller_by_pid(priv->my_pid); 773 controller = agp_find_controller_by_pid(priv->my_pid);
774 774
@@ -778,7 +778,7 @@ int agpioc_acquire_wrap(struct agp_file_private *priv)
778 controller = agp_create_controller(priv->my_pid); 778 controller = agp_create_controller(priv->my_pid);
779 779
780 if (controller == NULL) { 780 if (controller == NULL) {
781 agp_fe.backend_acquired = FALSE; 781 agp_fe.backend_acquired = false;
782 agp_backend_release(agp_bridge); 782 agp_backend_release(agp_bridge);
783 return -ENOMEM; 783 return -ENOMEM;
784 } 784 }
@@ -981,7 +981,7 @@ static long agp_ioctl(struct file *file,
981 ret_val = -EINVAL; 981 ret_val = -EINVAL;
982 goto ioctl_out; 982 goto ioctl_out;
983 } 983 }
984 if ((agp_fe.backend_acquired != TRUE) && 984 if ((agp_fe.backend_acquired != true) &&
985 (cmd != AGPIOC_ACQUIRE)) { 985 (cmd != AGPIOC_ACQUIRE)) {
986 ret_val = -EBUSY; 986 ret_val = -EBUSY;
987 goto ioctl_out; 987 goto ioctl_out;
diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c
index 7fc0c99a3a58..564daaa6c7d0 100644
--- a/drivers/char/agp/generic.c
+++ b/drivers/char/agp/generic.c
@@ -96,13 +96,13 @@ EXPORT_SYMBOL(agp_flush_chipset);
96void agp_alloc_page_array(size_t size, struct agp_memory *mem) 96void agp_alloc_page_array(size_t size, struct agp_memory *mem)
97{ 97{
98 mem->memory = NULL; 98 mem->memory = NULL;
99 mem->vmalloc_flag = 0; 99 mem->vmalloc_flag = false;
100 100
101 if (size <= 2*PAGE_SIZE) 101 if (size <= 2*PAGE_SIZE)
102 mem->memory = kmalloc(size, GFP_KERNEL | __GFP_NORETRY); 102 mem->memory = kmalloc(size, GFP_KERNEL | __GFP_NORETRY);
103 if (mem->memory == NULL) { 103 if (mem->memory == NULL) {
104 mem->memory = vmalloc(size); 104 mem->memory = vmalloc(size);
105 mem->vmalloc_flag = 1; 105 mem->vmalloc_flag = true;
106 } 106 }
107} 107}
108EXPORT_SYMBOL(agp_alloc_page_array); 108EXPORT_SYMBOL(agp_alloc_page_array);
@@ -188,7 +188,7 @@ void agp_free_memory(struct agp_memory *curr)
188 if (curr == NULL) 188 if (curr == NULL)
189 return; 189 return;
190 190
191 if (curr->is_bound == TRUE) 191 if (curr->is_bound)
192 agp_unbind_memory(curr); 192 agp_unbind_memory(curr);
193 193
194 if (curr->type >= AGP_USER_TYPES) { 194 if (curr->type >= AGP_USER_TYPES) {
@@ -202,10 +202,13 @@ void agp_free_memory(struct agp_memory *curr)
202 } 202 }
203 if (curr->page_count != 0) { 203 if (curr->page_count != 0) {
204 for (i = 0; i < curr->page_count; i++) { 204 for (i = 0; i < curr->page_count; i++) {
205 curr->bridge->driver->agp_destroy_page(gart_to_virt(curr->memory[i]), AGP_PAGE_DESTROY_UNMAP); 205 curr->memory[i] = (unsigned long)gart_to_virt(curr->memory[i]);
206 curr->bridge->driver->agp_destroy_page((void *)curr->memory[i],
207 AGP_PAGE_DESTROY_UNMAP);
206 } 208 }
207 for (i = 0; i < curr->page_count; i++) { 209 for (i = 0; i < curr->page_count; i++) {
208 curr->bridge->driver->agp_destroy_page(gart_to_virt(curr->memory[i]), AGP_PAGE_DESTROY_FREE); 210 curr->bridge->driver->agp_destroy_page((void *)curr->memory[i],
211 AGP_PAGE_DESTROY_FREE);
209 } 212 }
210 } 213 }
211 agp_free_key(curr->key); 214 agp_free_key(curr->key);
@@ -411,20 +414,20 @@ int agp_bind_memory(struct agp_memory *curr, off_t pg_start)
411 if (curr == NULL) 414 if (curr == NULL)
412 return -EINVAL; 415 return -EINVAL;
413 416
414 if (curr->is_bound == TRUE) { 417 if (curr->is_bound) {
415 printk(KERN_INFO PFX "memory %p is already bound!\n", curr); 418 printk(KERN_INFO PFX "memory %p is already bound!\n", curr);
416 return -EINVAL; 419 return -EINVAL;
417 } 420 }
418 if (curr->is_flushed == FALSE) { 421 if (!curr->is_flushed) {
419 curr->bridge->driver->cache_flush(); 422 curr->bridge->driver->cache_flush();
420 curr->is_flushed = TRUE; 423 curr->is_flushed = true;
421 } 424 }
422 ret_val = curr->bridge->driver->insert_memory(curr, pg_start, curr->type); 425 ret_val = curr->bridge->driver->insert_memory(curr, pg_start, curr->type);
423 426
424 if (ret_val != 0) 427 if (ret_val != 0)
425 return ret_val; 428 return ret_val;
426 429
427 curr->is_bound = TRUE; 430 curr->is_bound = true;
428 curr->pg_start = pg_start; 431 curr->pg_start = pg_start;
429 return 0; 432 return 0;
430} 433}
@@ -446,7 +449,7 @@ int agp_unbind_memory(struct agp_memory *curr)
446 if (curr == NULL) 449 if (curr == NULL)
447 return -EINVAL; 450 return -EINVAL;
448 451
449 if (curr->is_bound != TRUE) { 452 if (!curr->is_bound) {
450 printk(KERN_INFO PFX "memory %p was not bound!\n", curr); 453 printk(KERN_INFO PFX "memory %p was not bound!\n", curr);
451 return -EINVAL; 454 return -EINVAL;
452 } 455 }
@@ -456,7 +459,7 @@ int agp_unbind_memory(struct agp_memory *curr)
456 if (ret_val != 0) 459 if (ret_val != 0)
457 return ret_val; 460 return ret_val;
458 461
459 curr->is_bound = FALSE; 462 curr->is_bound = false;
460 curr->pg_start = 0; 463 curr->pg_start = 0;
461 return 0; 464 return 0;
462} 465}
@@ -754,7 +757,7 @@ u32 agp_collect_device_status(struct agp_bridge_data *bridge, u32 requested_mode
754EXPORT_SYMBOL(agp_collect_device_status); 757EXPORT_SYMBOL(agp_collect_device_status);
755 758
756 759
757void agp_device_command(u32 bridge_agpstat, int agp_v3) 760void agp_device_command(u32 bridge_agpstat, bool agp_v3)
758{ 761{
759 struct pci_dev *device = NULL; 762 struct pci_dev *device = NULL;
760 int mode; 763 int mode;
@@ -818,7 +821,7 @@ void agp_generic_enable(struct agp_bridge_data *bridge, u32 requested_mode)
818 /* If we have 3.5, we can do the isoch stuff. */ 821 /* If we have 3.5, we can do the isoch stuff. */
819 if (bridge->minor_version >= 5) 822 if (bridge->minor_version >= 5)
820 agp_3_5_enable(bridge); 823 agp_3_5_enable(bridge);
821 agp_device_command(bridge_agpstat, TRUE); 824 agp_device_command(bridge_agpstat, true);
822 return; 825 return;
823 } else { 826 } else {
824 /* Disable calibration cycle in RX91<1> when not in AGP3.0 mode of operation.*/ 827 /* Disable calibration cycle in RX91<1> when not in AGP3.0 mode of operation.*/
@@ -835,7 +838,7 @@ void agp_generic_enable(struct agp_bridge_data *bridge, u32 requested_mode)
835 } 838 }
836 839
837 /* AGP v<3 */ 840 /* AGP v<3 */
838 agp_device_command(bridge_agpstat, FALSE); 841 agp_device_command(bridge_agpstat, false);
839} 842}
840EXPORT_SYMBOL(agp_generic_enable); 843EXPORT_SYMBOL(agp_generic_enable);
841 844
@@ -1083,9 +1086,9 @@ int agp_generic_insert_memory(struct agp_memory * mem, off_t pg_start, int type)
1083 j++; 1086 j++;
1084 } 1087 }
1085 1088
1086 if (mem->is_flushed == FALSE) { 1089 if (!mem->is_flushed) {
1087 bridge->driver->cache_flush(); 1090 bridge->driver->cache_flush();
1088 mem->is_flushed = TRUE; 1091 mem->is_flushed = true;
1089 } 1092 }
1090 1093
1091 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { 1094 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
diff --git a/drivers/char/agp/hp-agp.c b/drivers/char/agp/hp-agp.c
index cbb0444467ba..80d7317f85c9 100644
--- a/drivers/char/agp/hp-agp.c
+++ b/drivers/char/agp/hp-agp.c
@@ -353,9 +353,9 @@ hp_zx1_insert_memory (struct agp_memory *mem, off_t pg_start, int type)
353 j++; 353 j++;
354 } 354 }
355 355
356 if (mem->is_flushed == FALSE) { 356 if (!mem->is_flushed) {
357 global_cache_flush(); 357 global_cache_flush();
358 mem->is_flushed = TRUE; 358 mem->is_flushed = true;
359 } 359 }
360 360
361 for (i = 0, j = io_pg_start; i < mem->page_count; i++) { 361 for (i = 0, j = io_pg_start; i < mem->page_count; i++) {
@@ -437,7 +437,7 @@ const struct agp_bridge_driver hp_zx1_driver = {
437 .agp_alloc_page = agp_generic_alloc_page, 437 .agp_alloc_page = agp_generic_alloc_page,
438 .agp_destroy_page = agp_generic_destroy_page, 438 .agp_destroy_page = agp_generic_destroy_page,
439 .agp_type_to_mask_type = agp_generic_type_to_mask_type, 439 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
440 .cant_use_aperture = 1, 440 .cant_use_aperture = true,
441}; 441};
442 442
443static int __init 443static int __init
diff --git a/drivers/char/agp/i460-agp.c b/drivers/char/agp/i460-agp.c
index 76f581c85a7d..e587eebebc67 100644
--- a/drivers/char/agp/i460-agp.c
+++ b/drivers/char/agp/i460-agp.c
@@ -580,7 +580,7 @@ const struct agp_bridge_driver intel_i460_driver = {
580 .alloc_by_type = agp_generic_alloc_by_type, 580 .alloc_by_type = agp_generic_alloc_by_type,
581 .free_by_type = agp_generic_free_by_type, 581 .free_by_type = agp_generic_free_by_type,
582 .agp_type_to_mask_type = agp_generic_type_to_mask_type, 582 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
583 .cant_use_aperture = 1, 583 .cant_use_aperture = true,
584}; 584};
585 585
586static int __devinit agp_intel_i460_probe(struct pci_dev *pdev, 586static int __devinit agp_intel_i460_probe(struct pci_dev *pdev,
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index eeea50a1d22a..df702642ab8f 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -34,6 +34,12 @@
34#define PCI_DEVICE_ID_INTEL_Q33_IG 0x29D2 34#define PCI_DEVICE_ID_INTEL_Q33_IG 0x29D2
35#define PCI_DEVICE_ID_INTEL_IGD_HB 0x2A40 35#define PCI_DEVICE_ID_INTEL_IGD_HB 0x2A40
36#define PCI_DEVICE_ID_INTEL_IGD_IG 0x2A42 36#define PCI_DEVICE_ID_INTEL_IGD_IG 0x2A42
37#define PCI_DEVICE_ID_INTEL_IGD_E_HB 0x2E00
38#define PCI_DEVICE_ID_INTEL_IGD_E_IG 0x2E02
39#define PCI_DEVICE_ID_INTEL_Q45_HB 0x2E10
40#define PCI_DEVICE_ID_INTEL_Q45_IG 0x2E12
41#define PCI_DEVICE_ID_INTEL_G45_HB 0x2E20
42#define PCI_DEVICE_ID_INTEL_G45_IG 0x2E22
37 43
38/* cover 915 and 945 variants */ 44/* cover 915 and 945 variants */
39#define IS_I915 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_E7221_HB || \ 45#define IS_I915 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_E7221_HB || \
@@ -55,6 +61,10 @@
55 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q35_HB || \ 61 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q35_HB || \
56 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q33_HB) 62 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q33_HB)
57 63
64#define IS_G4X (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IGD_E_HB || \
65 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q45_HB || \
66 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G45_HB)
67
58extern int agp_memory_reserved; 68extern int agp_memory_reserved;
59 69
60 70
@@ -80,8 +90,13 @@ extern int agp_memory_reserved;
80#define I915_PTEADDR 0x1C 90#define I915_PTEADDR 0x1C
81#define I915_GMCH_GMS_STOLEN_48M (0x6 << 4) 91#define I915_GMCH_GMS_STOLEN_48M (0x6 << 4)
82#define I915_GMCH_GMS_STOLEN_64M (0x7 << 4) 92#define I915_GMCH_GMS_STOLEN_64M (0x7 << 4)
83#define G33_GMCH_GMS_STOLEN_128M (0x8 << 4) 93#define G33_GMCH_GMS_STOLEN_128M (0x8 << 4)
84#define G33_GMCH_GMS_STOLEN_256M (0x9 << 4) 94#define G33_GMCH_GMS_STOLEN_256M (0x9 << 4)
95#define INTEL_GMCH_GMS_STOLEN_96M (0xa << 4)
96#define INTEL_GMCH_GMS_STOLEN_160M (0xb << 4)
97#define INTEL_GMCH_GMS_STOLEN_224M (0xc << 4)
98#define INTEL_GMCH_GMS_STOLEN_352M (0xd << 4)
99
85#define I915_IFPADDR 0x60 100#define I915_IFPADDR 0x60
86 101
87/* Intel 965G registers */ 102/* Intel 965G registers */
@@ -325,7 +340,7 @@ static int intel_i810_insert_entries(struct agp_memory *mem, off_t pg_start,
325out: 340out:
326 ret = 0; 341 ret = 0;
327out_err: 342out_err:
328 mem->is_flushed = 1; 343 mem->is_flushed = true;
329 return ret; 344 return ret;
330} 345}
331 346
@@ -418,9 +433,11 @@ static void intel_i810_free_by_type(struct agp_memory *curr)
418 if (curr->page_count == 4) 433 if (curr->page_count == 4)
419 i8xx_destroy_pages(gart_to_virt(curr->memory[0])); 434 i8xx_destroy_pages(gart_to_virt(curr->memory[0]));
420 else { 435 else {
421 agp_bridge->driver->agp_destroy_page(gart_to_virt(curr->memory[0]), 436 void *va = gart_to_virt(curr->memory[0]);
437
438 agp_bridge->driver->agp_destroy_page(va,
422 AGP_PAGE_DESTROY_UNMAP); 439 AGP_PAGE_DESTROY_UNMAP);
423 agp_bridge->driver->agp_destroy_page(gart_to_virt(curr->memory[0]), 440 agp_bridge->driver->agp_destroy_page(va,
424 AGP_PAGE_DESTROY_FREE); 441 AGP_PAGE_DESTROY_FREE);
425 } 442 }
426 agp_free_page_array(curr); 443 agp_free_page_array(curr);
@@ -504,6 +521,10 @@ static void intel_i830_init_gtt_entries(void)
504 size = 512; 521 size = 512;
505 } 522 }
506 size += 4; 523 size += 4;
524 } else if (IS_G4X) {
525 /* On 4 series hardware, GTT stolen is separate from graphics
526 * stolen, ignore it in stolen gtt entries counting */
527 size = 0;
507 } else { 528 } else {
508 /* On previous hardware, the GTT size was just what was 529 /* On previous hardware, the GTT size was just what was
509 * required to map the aperture. 530 * required to map the aperture.
@@ -552,30 +573,54 @@ static void intel_i830_init_gtt_entries(void)
552 break; 573 break;
553 case I915_GMCH_GMS_STOLEN_48M: 574 case I915_GMCH_GMS_STOLEN_48M:
554 /* Check it's really I915G */ 575 /* Check it's really I915G */
555 if (IS_I915 || IS_I965 || IS_G33) 576 if (IS_I915 || IS_I965 || IS_G33 || IS_G4X)
556 gtt_entries = MB(48) - KB(size); 577 gtt_entries = MB(48) - KB(size);
557 else 578 else
558 gtt_entries = 0; 579 gtt_entries = 0;
559 break; 580 break;
560 case I915_GMCH_GMS_STOLEN_64M: 581 case I915_GMCH_GMS_STOLEN_64M:
561 /* Check it's really I915G */ 582 /* Check it's really I915G */
562 if (IS_I915 || IS_I965 || IS_G33) 583 if (IS_I915 || IS_I965 || IS_G33 || IS_G4X)
563 gtt_entries = MB(64) - KB(size); 584 gtt_entries = MB(64) - KB(size);
564 else 585 else
565 gtt_entries = 0; 586 gtt_entries = 0;
566 break; 587 break;
567 case G33_GMCH_GMS_STOLEN_128M: 588 case G33_GMCH_GMS_STOLEN_128M:
568 if (IS_G33) 589 if (IS_G33 || IS_I965 || IS_G4X)
569 gtt_entries = MB(128) - KB(size); 590 gtt_entries = MB(128) - KB(size);
570 else 591 else
571 gtt_entries = 0; 592 gtt_entries = 0;
572 break; 593 break;
573 case G33_GMCH_GMS_STOLEN_256M: 594 case G33_GMCH_GMS_STOLEN_256M:
574 if (IS_G33) 595 if (IS_G33 || IS_I965 || IS_G4X)
575 gtt_entries = MB(256) - KB(size); 596 gtt_entries = MB(256) - KB(size);
576 else 597 else
577 gtt_entries = 0; 598 gtt_entries = 0;
578 break; 599 break;
600 case INTEL_GMCH_GMS_STOLEN_96M:
601 if (IS_I965 || IS_G4X)
602 gtt_entries = MB(96) - KB(size);
603 else
604 gtt_entries = 0;
605 break;
606 case INTEL_GMCH_GMS_STOLEN_160M:
607 if (IS_I965 || IS_G4X)
608 gtt_entries = MB(160) - KB(size);
609 else
610 gtt_entries = 0;
611 break;
612 case INTEL_GMCH_GMS_STOLEN_224M:
613 if (IS_I965 || IS_G4X)
614 gtt_entries = MB(224) - KB(size);
615 else
616 gtt_entries = 0;
617 break;
618 case INTEL_GMCH_GMS_STOLEN_352M:
619 if (IS_I965 || IS_G4X)
620 gtt_entries = MB(352) - KB(size);
621 else
622 gtt_entries = 0;
623 break;
579 default: 624 default:
580 gtt_entries = 0; 625 gtt_entries = 0;
581 break; 626 break;
@@ -793,7 +838,7 @@ static int intel_i830_insert_entries(struct agp_memory *mem, off_t pg_start,
793out: 838out:
794 ret = 0; 839 ret = 0;
795out_err: 840out_err:
796 mem->is_flushed = 1; 841 mem->is_flushed = true;
797 return ret; 842 return ret;
798} 843}
799 844
@@ -903,7 +948,7 @@ static void intel_i9xx_setup_flush(void)
903 intel_private.ifp_resource.flags = IORESOURCE_MEM; 948 intel_private.ifp_resource.flags = IORESOURCE_MEM;
904 949
905 /* Setup chipset flush for 915 */ 950 /* Setup chipset flush for 915 */
906 if (IS_I965 || IS_G33) { 951 if (IS_I965 || IS_G33 || IS_G4X) {
907 intel_i965_g33_setup_chipset_flush(); 952 intel_i965_g33_setup_chipset_flush();
908 } else { 953 } else {
909 intel_i915_setup_chipset_flush(); 954 intel_i915_setup_chipset_flush();
@@ -1020,7 +1065,7 @@ static int intel_i915_insert_entries(struct agp_memory *mem, off_t pg_start,
1020 out: 1065 out:
1021 ret = 0; 1066 ret = 0;
1022 out_err: 1067 out_err:
1023 mem->is_flushed = 1; 1068 mem->is_flushed = true;
1024 return ret; 1069 return ret;
1025} 1070}
1026 1071
@@ -1134,53 +1179,64 @@ static unsigned long intel_i965_mask_memory(struct agp_bridge_data *bridge,
1134 return addr | bridge->driver->masks[type].mask; 1179 return addr | bridge->driver->masks[type].mask;
1135} 1180}
1136 1181
1182static void intel_i965_get_gtt_range(int *gtt_offset, int *gtt_size)
1183{
1184 switch (agp_bridge->dev->device) {
1185 case PCI_DEVICE_ID_INTEL_IGD_HB:
1186 case PCI_DEVICE_ID_INTEL_IGD_E_HB:
1187 case PCI_DEVICE_ID_INTEL_Q45_HB:
1188 case PCI_DEVICE_ID_INTEL_G45_HB:
1189 *gtt_offset = *gtt_size = MB(2);
1190 break;
1191 default:
1192 *gtt_offset = *gtt_size = KB(512);
1193 }
1194}
1195
1137/* The intel i965 automatically initializes the agp aperture during POST. 1196/* The intel i965 automatically initializes the agp aperture during POST.
1138 * Use the memory already set aside for in the GTT. 1197 * Use the memory already set aside for in the GTT.
1139 */ 1198 */
1140static int intel_i965_create_gatt_table(struct agp_bridge_data *bridge) 1199static int intel_i965_create_gatt_table(struct agp_bridge_data *bridge)
1141{ 1200{
1142 int page_order; 1201 int page_order;
1143 struct aper_size_info_fixed *size; 1202 struct aper_size_info_fixed *size;
1144 int num_entries; 1203 int num_entries;
1145 u32 temp; 1204 u32 temp;
1146 int gtt_offset, gtt_size; 1205 int gtt_offset, gtt_size;
1147 1206
1148 size = agp_bridge->current_size; 1207 size = agp_bridge->current_size;
1149 page_order = size->page_order; 1208 page_order = size->page_order;
1150 num_entries = size->num_entries; 1209 num_entries = size->num_entries;
1151 agp_bridge->gatt_table_real = NULL; 1210 agp_bridge->gatt_table_real = NULL;
1152 1211
1153 pci_read_config_dword(intel_private.pcidev, I915_MMADDR, &temp); 1212 pci_read_config_dword(intel_private.pcidev, I915_MMADDR, &temp);
1154 1213
1155 temp &= 0xfff00000; 1214 temp &= 0xfff00000;
1156 1215
1157 if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IGD_HB) 1216 intel_i965_get_gtt_range(&gtt_offset, &gtt_size);
1158 gtt_offset = gtt_size = MB(2);
1159 else
1160 gtt_offset = gtt_size = KB(512);
1161 1217
1162 intel_private.gtt = ioremap((temp + gtt_offset) , gtt_size); 1218 intel_private.gtt = ioremap((temp + gtt_offset) , gtt_size);
1163 1219
1164 if (!intel_private.gtt) 1220 if (!intel_private.gtt)
1165 return -ENOMEM; 1221 return -ENOMEM;
1166 1222
1167 intel_private.registers = ioremap(temp, 128 * 4096); 1223 intel_private.registers = ioremap(temp, 128 * 4096);
1168 if (!intel_private.registers) { 1224 if (!intel_private.registers) {
1169 iounmap(intel_private.gtt); 1225 iounmap(intel_private.gtt);
1170 return -ENOMEM; 1226 return -ENOMEM;
1171 } 1227 }
1172 1228
1173 temp = readl(intel_private.registers+I810_PGETBL_CTL) & 0xfffff000; 1229 temp = readl(intel_private.registers+I810_PGETBL_CTL) & 0xfffff000;
1174 global_cache_flush(); /* FIXME: ? */ 1230 global_cache_flush(); /* FIXME: ? */
1175 1231
1176 /* we have to call this as early as possible after the MMIO base address is known */ 1232 /* we have to call this as early as possible after the MMIO base address is known */
1177 intel_i830_init_gtt_entries(); 1233 intel_i830_init_gtt_entries();
1178 1234
1179 agp_bridge->gatt_table = NULL; 1235 agp_bridge->gatt_table = NULL;
1180 1236
1181 agp_bridge->gatt_bus_addr = temp; 1237 agp_bridge->gatt_bus_addr = temp;
1182 1238
1183 return 0; 1239 return 0;
1184} 1240}
1185 1241
1186 1242
@@ -1656,7 +1712,7 @@ static const struct agp_bridge_driver intel_810_driver = {
1656 .aperture_sizes = intel_i810_sizes, 1712 .aperture_sizes = intel_i810_sizes,
1657 .size_type = FIXED_APER_SIZE, 1713 .size_type = FIXED_APER_SIZE,
1658 .num_aperture_sizes = 2, 1714 .num_aperture_sizes = 2,
1659 .needs_scratch_page = TRUE, 1715 .needs_scratch_page = true,
1660 .configure = intel_i810_configure, 1716 .configure = intel_i810_configure,
1661 .fetch_size = intel_i810_fetch_size, 1717 .fetch_size = intel_i810_fetch_size,
1662 .cleanup = intel_i810_cleanup, 1718 .cleanup = intel_i810_cleanup,
@@ -1697,7 +1753,7 @@ static const struct agp_bridge_driver intel_815_driver = {
1697 .free_by_type = agp_generic_free_by_type, 1753 .free_by_type = agp_generic_free_by_type,
1698 .agp_alloc_page = agp_generic_alloc_page, 1754 .agp_alloc_page = agp_generic_alloc_page,
1699 .agp_destroy_page = agp_generic_destroy_page, 1755 .agp_destroy_page = agp_generic_destroy_page,
1700 .agp_type_to_mask_type = agp_generic_type_to_mask_type, 1756 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
1701}; 1757};
1702 1758
1703static const struct agp_bridge_driver intel_830_driver = { 1759static const struct agp_bridge_driver intel_830_driver = {
@@ -1705,7 +1761,7 @@ static const struct agp_bridge_driver intel_830_driver = {
1705 .aperture_sizes = intel_i830_sizes, 1761 .aperture_sizes = intel_i830_sizes,
1706 .size_type = FIXED_APER_SIZE, 1762 .size_type = FIXED_APER_SIZE,
1707 .num_aperture_sizes = 4, 1763 .num_aperture_sizes = 4,
1708 .needs_scratch_page = TRUE, 1764 .needs_scratch_page = true,
1709 .configure = intel_i830_configure, 1765 .configure = intel_i830_configure,
1710 .fetch_size = intel_i830_fetch_size, 1766 .fetch_size = intel_i830_fetch_size,
1711 .cleanup = intel_i830_cleanup, 1767 .cleanup = intel_i830_cleanup,
@@ -1876,7 +1932,7 @@ static const struct agp_bridge_driver intel_915_driver = {
1876 .aperture_sizes = intel_i830_sizes, 1932 .aperture_sizes = intel_i830_sizes,
1877 .size_type = FIXED_APER_SIZE, 1933 .size_type = FIXED_APER_SIZE,
1878 .num_aperture_sizes = 4, 1934 .num_aperture_sizes = 4,
1879 .needs_scratch_page = TRUE, 1935 .needs_scratch_page = true,
1880 .configure = intel_i915_configure, 1936 .configure = intel_i915_configure,
1881 .fetch_size = intel_i9xx_fetch_size, 1937 .fetch_size = intel_i9xx_fetch_size,
1882 .cleanup = intel_i915_cleanup, 1938 .cleanup = intel_i915_cleanup,
@@ -1898,28 +1954,28 @@ static const struct agp_bridge_driver intel_915_driver = {
1898}; 1954};
1899 1955
1900static const struct agp_bridge_driver intel_i965_driver = { 1956static const struct agp_bridge_driver intel_i965_driver = {
1901 .owner = THIS_MODULE, 1957 .owner = THIS_MODULE,
1902 .aperture_sizes = intel_i830_sizes, 1958 .aperture_sizes = intel_i830_sizes,
1903 .size_type = FIXED_APER_SIZE, 1959 .size_type = FIXED_APER_SIZE,
1904 .num_aperture_sizes = 4, 1960 .num_aperture_sizes = 4,
1905 .needs_scratch_page = TRUE, 1961 .needs_scratch_page = true,
1906 .configure = intel_i915_configure, 1962 .configure = intel_i915_configure,
1907 .fetch_size = intel_i9xx_fetch_size, 1963 .fetch_size = intel_i9xx_fetch_size,
1908 .cleanup = intel_i915_cleanup, 1964 .cleanup = intel_i915_cleanup,
1909 .tlb_flush = intel_i810_tlbflush, 1965 .tlb_flush = intel_i810_tlbflush,
1910 .mask_memory = intel_i965_mask_memory, 1966 .mask_memory = intel_i965_mask_memory,
1911 .masks = intel_i810_masks, 1967 .masks = intel_i810_masks,
1912 .agp_enable = intel_i810_agp_enable, 1968 .agp_enable = intel_i810_agp_enable,
1913 .cache_flush = global_cache_flush, 1969 .cache_flush = global_cache_flush,
1914 .create_gatt_table = intel_i965_create_gatt_table, 1970 .create_gatt_table = intel_i965_create_gatt_table,
1915 .free_gatt_table = intel_i830_free_gatt_table, 1971 .free_gatt_table = intel_i830_free_gatt_table,
1916 .insert_memory = intel_i915_insert_entries, 1972 .insert_memory = intel_i915_insert_entries,
1917 .remove_memory = intel_i915_remove_entries, 1973 .remove_memory = intel_i915_remove_entries,
1918 .alloc_by_type = intel_i830_alloc_by_type, 1974 .alloc_by_type = intel_i830_alloc_by_type,
1919 .free_by_type = intel_i810_free_by_type, 1975 .free_by_type = intel_i810_free_by_type,
1920 .agp_alloc_page = agp_generic_alloc_page, 1976 .agp_alloc_page = agp_generic_alloc_page,
1921 .agp_destroy_page = agp_generic_destroy_page, 1977 .agp_destroy_page = agp_generic_destroy_page,
1922 .agp_type_to_mask_type = intel_i830_type_to_mask_type, 1978 .agp_type_to_mask_type = intel_i830_type_to_mask_type,
1923 .chipset_flush = intel_i915_chipset_flush, 1979 .chipset_flush = intel_i915_chipset_flush,
1924}; 1980};
1925 1981
@@ -1948,28 +2004,28 @@ static const struct agp_bridge_driver intel_7505_driver = {
1948}; 2004};
1949 2005
1950static const struct agp_bridge_driver intel_g33_driver = { 2006static const struct agp_bridge_driver intel_g33_driver = {
1951 .owner = THIS_MODULE, 2007 .owner = THIS_MODULE,
1952 .aperture_sizes = intel_i830_sizes, 2008 .aperture_sizes = intel_i830_sizes,
1953 .size_type = FIXED_APER_SIZE, 2009 .size_type = FIXED_APER_SIZE,
1954 .num_aperture_sizes = 4, 2010 .num_aperture_sizes = 4,
1955 .needs_scratch_page = TRUE, 2011 .needs_scratch_page = true,
1956 .configure = intel_i915_configure, 2012 .configure = intel_i915_configure,
1957 .fetch_size = intel_i9xx_fetch_size, 2013 .fetch_size = intel_i9xx_fetch_size,
1958 .cleanup = intel_i915_cleanup, 2014 .cleanup = intel_i915_cleanup,
1959 .tlb_flush = intel_i810_tlbflush, 2015 .tlb_flush = intel_i810_tlbflush,
1960 .mask_memory = intel_i965_mask_memory, 2016 .mask_memory = intel_i965_mask_memory,
1961 .masks = intel_i810_masks, 2017 .masks = intel_i810_masks,
1962 .agp_enable = intel_i810_agp_enable, 2018 .agp_enable = intel_i810_agp_enable,
1963 .cache_flush = global_cache_flush, 2019 .cache_flush = global_cache_flush,
1964 .create_gatt_table = intel_i915_create_gatt_table, 2020 .create_gatt_table = intel_i915_create_gatt_table,
1965 .free_gatt_table = intel_i830_free_gatt_table, 2021 .free_gatt_table = intel_i830_free_gatt_table,
1966 .insert_memory = intel_i915_insert_entries, 2022 .insert_memory = intel_i915_insert_entries,
1967 .remove_memory = intel_i915_remove_entries, 2023 .remove_memory = intel_i915_remove_entries,
1968 .alloc_by_type = intel_i830_alloc_by_type, 2024 .alloc_by_type = intel_i830_alloc_by_type,
1969 .free_by_type = intel_i810_free_by_type, 2025 .free_by_type = intel_i810_free_by_type,
1970 .agp_alloc_page = agp_generic_alloc_page, 2026 .agp_alloc_page = agp_generic_alloc_page,
1971 .agp_destroy_page = agp_generic_destroy_page, 2027 .agp_destroy_page = agp_generic_destroy_page,
1972 .agp_type_to_mask_type = intel_i830_type_to_mask_type, 2028 .agp_type_to_mask_type = intel_i830_type_to_mask_type,
1973 .chipset_flush = intel_i915_chipset_flush, 2029 .chipset_flush = intel_i915_chipset_flush,
1974}; 2030};
1975 2031
@@ -2063,6 +2119,12 @@ static const struct intel_driver_description {
2063 NULL, &intel_g33_driver }, 2119 NULL, &intel_g33_driver },
2064 { PCI_DEVICE_ID_INTEL_IGD_HB, PCI_DEVICE_ID_INTEL_IGD_IG, 0, 2120 { PCI_DEVICE_ID_INTEL_IGD_HB, PCI_DEVICE_ID_INTEL_IGD_IG, 0,
2065 "Intel Integrated Graphics Device", NULL, &intel_i965_driver }, 2121 "Intel Integrated Graphics Device", NULL, &intel_i965_driver },
2122 { PCI_DEVICE_ID_INTEL_IGD_E_HB, PCI_DEVICE_ID_INTEL_IGD_E_IG, 0,
2123 "Intel Integrated Graphics Device", NULL, &intel_i965_driver },
2124 { PCI_DEVICE_ID_INTEL_Q45_HB, PCI_DEVICE_ID_INTEL_Q45_IG, 0,
2125 "Q45/Q43", NULL, &intel_i965_driver },
2126 { PCI_DEVICE_ID_INTEL_G45_HB, PCI_DEVICE_ID_INTEL_G45_IG, 0,
2127 "G45/G43", NULL, &intel_i965_driver },
2066 { 0, 0, 0, NULL, NULL, NULL } 2128 { 0, 0, 0, NULL, NULL, NULL }
2067}; 2129};
2068 2130
@@ -2254,6 +2316,9 @@ static struct pci_device_id agp_intel_pci_table[] = {
2254 ID(PCI_DEVICE_ID_INTEL_Q35_HB), 2316 ID(PCI_DEVICE_ID_INTEL_Q35_HB),
2255 ID(PCI_DEVICE_ID_INTEL_Q33_HB), 2317 ID(PCI_DEVICE_ID_INTEL_Q33_HB),
2256 ID(PCI_DEVICE_ID_INTEL_IGD_HB), 2318 ID(PCI_DEVICE_ID_INTEL_IGD_HB),
2319 ID(PCI_DEVICE_ID_INTEL_IGD_E_HB),
2320 ID(PCI_DEVICE_ID_INTEL_Q45_HB),
2321 ID(PCI_DEVICE_ID_INTEL_G45_HB),
2257 { } 2322 { }
2258}; 2323};
2259 2324
diff --git a/drivers/char/agp/nvidia-agp.c b/drivers/char/agp/nvidia-agp.c
index 225ed2a53d45..eaceb61ba2dc 100644
--- a/drivers/char/agp/nvidia-agp.c
+++ b/drivers/char/agp/nvidia-agp.c
@@ -214,9 +214,9 @@ static int nvidia_insert_memory(struct agp_memory *mem, off_t pg_start, int type
214 return -EBUSY; 214 return -EBUSY;
215 } 215 }
216 216
217 if (mem->is_flushed == FALSE) { 217 if (!mem->is_flushed) {
218 global_cache_flush(); 218 global_cache_flush();
219 mem->is_flushed = TRUE; 219 mem->is_flushed = true;
220 } 220 }
221 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { 221 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
222 writel(agp_bridge->driver->mask_memory(agp_bridge, 222 writel(agp_bridge->driver->mask_memory(agp_bridge,
diff --git a/drivers/char/agp/parisc-agp.c b/drivers/char/agp/parisc-agp.c
index 2939e3570f9d..8c42dcc5958c 100644
--- a/drivers/char/agp/parisc-agp.c
+++ b/drivers/char/agp/parisc-agp.c
@@ -141,9 +141,9 @@ parisc_agp_insert_memory(struct agp_memory *mem, off_t pg_start, int type)
141 j++; 141 j++;
142 } 142 }
143 143
144 if (mem->is_flushed == FALSE) { 144 if (!mem->is_flushed) {
145 global_cache_flush(); 145 global_cache_flush();
146 mem->is_flushed = TRUE; 146 mem->is_flushed = true;
147 } 147 }
148 148
149 for (i = 0, j = io_pg_start; i < mem->page_count; i++) { 149 for (i = 0, j = io_pg_start; i < mem->page_count; i++) {
@@ -226,7 +226,7 @@ static const struct agp_bridge_driver parisc_agp_driver = {
226 .agp_alloc_page = agp_generic_alloc_page, 226 .agp_alloc_page = agp_generic_alloc_page,
227 .agp_destroy_page = agp_generic_destroy_page, 227 .agp_destroy_page = agp_generic_destroy_page,
228 .agp_type_to_mask_type = agp_generic_type_to_mask_type, 228 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
229 .cant_use_aperture = 1, 229 .cant_use_aperture = true,
230}; 230};
231 231
232static int __init 232static int __init
diff --git a/drivers/char/agp/sgi-agp.c b/drivers/char/agp/sgi-agp.c
index 98cf8abb3e57..b972d83bb1b2 100644
--- a/drivers/char/agp/sgi-agp.c
+++ b/drivers/char/agp/sgi-agp.c
@@ -182,9 +182,9 @@ static int sgi_tioca_insert_memory(struct agp_memory *mem, off_t pg_start,
182 j++; 182 j++;
183 } 183 }
184 184
185 if (mem->is_flushed == FALSE) { 185 if (!mem->is_flushed) {
186 bridge->driver->cache_flush(); 186 bridge->driver->cache_flush();
187 mem->is_flushed = TRUE; 187 mem->is_flushed = true;
188 } 188 }
189 189
190 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { 190 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
@@ -264,8 +264,8 @@ const struct agp_bridge_driver sgi_tioca_driver = {
264 .agp_alloc_page = sgi_tioca_alloc_page, 264 .agp_alloc_page = sgi_tioca_alloc_page,
265 .agp_destroy_page = agp_generic_destroy_page, 265 .agp_destroy_page = agp_generic_destroy_page,
266 .agp_type_to_mask_type = agp_generic_type_to_mask_type, 266 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
267 .cant_use_aperture = 1, 267 .cant_use_aperture = true,
268 .needs_scratch_page = 0, 268 .needs_scratch_page = false,
269 .num_aperture_sizes = 1, 269 .num_aperture_sizes = 1,
270}; 270};
271 271
diff --git a/drivers/char/agp/sworks-agp.c b/drivers/char/agp/sworks-agp.c
index e08934e58f32..0e054c134490 100644
--- a/drivers/char/agp/sworks-agp.c
+++ b/drivers/char/agp/sworks-agp.c
@@ -339,9 +339,9 @@ static int serverworks_insert_memory(struct agp_memory *mem,
339 j++; 339 j++;
340 } 340 }
341 341
342 if (mem->is_flushed == FALSE) { 342 if (!mem->is_flushed) {
343 global_cache_flush(); 343 global_cache_flush();
344 mem->is_flushed = TRUE; 344 mem->is_flushed = true;
345 } 345 }
346 346
347 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { 347 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
@@ -412,7 +412,7 @@ static void serverworks_agp_enable(struct agp_bridge_data *bridge, u32 mode)
412 bridge->capndx + PCI_AGP_COMMAND, 412 bridge->capndx + PCI_AGP_COMMAND,
413 command); 413 command);
414 414
415 agp_device_command(command, 0); 415 agp_device_command(command, false);
416} 416}
417 417
418static const struct agp_bridge_driver sworks_driver = { 418static const struct agp_bridge_driver sworks_driver = {
diff --git a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-agp.c
index 42c0a600b1ac..d2fa3cfca02a 100644
--- a/drivers/char/agp/uninorth-agp.c
+++ b/drivers/char/agp/uninorth-agp.c
@@ -281,10 +281,10 @@ static void uninorth_agp_enable(struct agp_bridge_data *bridge, u32 mode)
281 281
282 if (uninorth_rev >= 0x30) { 282 if (uninorth_rev >= 0x30) {
283 /* This is an AGP V3 */ 283 /* This is an AGP V3 */
284 agp_device_command(command, (status & AGPSTAT_MODE_3_0)); 284 agp_device_command(command, (status & AGPSTAT_MODE_3_0) != 0);
285 } else { 285 } else {
286 /* AGP V2 */ 286 /* AGP V2 */
287 agp_device_command(command, 0); 287 agp_device_command(command, false);
288 } 288 }
289 289
290 uninorth_tlbflush(NULL); 290 uninorth_tlbflush(NULL);
@@ -511,7 +511,7 @@ const struct agp_bridge_driver uninorth_agp_driver = {
511 .agp_alloc_page = agp_generic_alloc_page, 511 .agp_alloc_page = agp_generic_alloc_page,
512 .agp_destroy_page = agp_generic_destroy_page, 512 .agp_destroy_page = agp_generic_destroy_page,
513 .agp_type_to_mask_type = agp_generic_type_to_mask_type, 513 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
514 .cant_use_aperture = 1, 514 .cant_use_aperture = true,
515}; 515};
516 516
517const struct agp_bridge_driver u3_agp_driver = { 517const struct agp_bridge_driver u3_agp_driver = {
@@ -536,8 +536,8 @@ const struct agp_bridge_driver u3_agp_driver = {
536 .agp_alloc_page = agp_generic_alloc_page, 536 .agp_alloc_page = agp_generic_alloc_page,
537 .agp_destroy_page = agp_generic_destroy_page, 537 .agp_destroy_page = agp_generic_destroy_page,
538 .agp_type_to_mask_type = agp_generic_type_to_mask_type, 538 .agp_type_to_mask_type = agp_generic_type_to_mask_type,
539 .cant_use_aperture = 1, 539 .cant_use_aperture = true,
540 .needs_scratch_page = 1, 540 .needs_scratch_page = true,
541}; 541};
542 542
543static struct agp_device_ids uninorth_agp_device_ids[] __devinitdata = { 543static struct agp_device_ids uninorth_agp_device_ids[] __devinitdata = {
diff --git a/drivers/char/agp/via-agp.c b/drivers/char/agp/via-agp.c
index 0ecc54d327bc..7b36476dff41 100644
--- a/drivers/char/agp/via-agp.c
+++ b/drivers/char/agp/via-agp.c
@@ -389,11 +389,20 @@ static struct agp_device_ids via_agp_device_ids[] __devinitdata =
389 .device_id = PCI_DEVICE_ID_VIA_VT3324, 389 .device_id = PCI_DEVICE_ID_VIA_VT3324,
390 .chipset_name = "CX700", 390 .chipset_name = "CX700",
391 }, 391 },
392 /* VT3336 */ 392 /* VT3336 - this is a chipset for AMD Athlon/K8 CPU. Due to K8's unique
393 * architecture, the AGP resource and behavior are different from
394 * the traditional AGP which resides only in chipset. AGP is used
395 * by 3D driver which wasn't available for the VT3336 and VT3364
396 * generation until now. Unfortunately, by testing, VT3364 works
397 * but VT3336 doesn't. - explaination from via, just leave this as
398 * as a placeholder to avoid future patches adding it back in.
399 */
400#if 0
393 { 401 {
394 .device_id = PCI_DEVICE_ID_VIA_VT3336, 402 .device_id = PCI_DEVICE_ID_VIA_VT3336,
395 .chipset_name = "VT3336", 403 .chipset_name = "VT3336",
396 }, 404 },
405#endif
397 /* P4M890 */ 406 /* P4M890 */
398 { 407 {
399 .device_id = PCI_DEVICE_ID_VIA_P4M890, 408 .device_id = PCI_DEVICE_ID_VIA_P4M890,
@@ -546,8 +555,8 @@ static const struct pci_device_id agp_via_pci_table[] = {
546 ID(PCI_DEVICE_ID_VIA_3296_0), 555 ID(PCI_DEVICE_ID_VIA_3296_0),
547 ID(PCI_DEVICE_ID_VIA_P4M800CE), 556 ID(PCI_DEVICE_ID_VIA_P4M800CE),
548 ID(PCI_DEVICE_ID_VIA_VT3324), 557 ID(PCI_DEVICE_ID_VIA_VT3324),
549 ID(PCI_DEVICE_ID_VIA_VT3336),
550 ID(PCI_DEVICE_ID_VIA_P4M890), 558 ID(PCI_DEVICE_ID_VIA_P4M890),
559 ID(PCI_DEVICE_ID_VIA_VT3364),
551 { } 560 { }
552}; 561};
553 562
diff --git a/drivers/char/drm/ati_pcigart.c b/drivers/char/drm/ati_pcigart.c
index b710426bab3e..c533d0c9ec61 100644
--- a/drivers/char/drm/ati_pcigart.c
+++ b/drivers/char/drm/ati_pcigart.c
@@ -76,7 +76,7 @@ int drm_ati_pcigart_cleanup(struct drm_device *dev, struct drm_ati_pcigart_info
76 for (i = 0; i < pages; i++) { 76 for (i = 0; i < pages; i++) {
77 if (!entry->busaddr[i]) 77 if (!entry->busaddr[i])
78 break; 78 break;
79 pci_unmap_single(dev->pdev, entry->busaddr[i], 79 pci_unmap_page(dev->pdev, entry->busaddr[i],
80 PAGE_SIZE, PCI_DMA_TODEVICE); 80 PAGE_SIZE, PCI_DMA_TODEVICE);
81 } 81 }
82 82
@@ -137,10 +137,8 @@ int drm_ati_pcigart_init(struct drm_device *dev, struct drm_ati_pcigart_info *ga
137 137
138 for (i = 0; i < pages; i++) { 138 for (i = 0; i < pages; i++) {
139 /* we need to support large memory configurations */ 139 /* we need to support large memory configurations */
140 entry->busaddr[i] = pci_map_single(dev->pdev, 140 entry->busaddr[i] = pci_map_page(dev->pdev, entry->pagelist[i],
141 page_address(entry-> 141 0, PAGE_SIZE, PCI_DMA_TODEVICE);
142 pagelist[i]),
143 PAGE_SIZE, PCI_DMA_TODEVICE);
144 if (entry->busaddr[i] == 0) { 142 if (entry->busaddr[i] == 0) {
145 DRM_ERROR("unable to map PCIGART pages!\n"); 143 DRM_ERROR("unable to map PCIGART pages!\n");
146 drm_ati_pcigart_cleanup(dev, gart_info); 144 drm_ati_pcigart_cleanup(dev, gart_info);
diff --git a/drivers/char/drm/drm.h b/drivers/char/drm/drm.h
index 3a05c6d5ebe1..38d3c6b8276a 100644
--- a/drivers/char/drm/drm.h
+++ b/drivers/char/drm/drm.h
@@ -628,7 +628,7 @@ struct drm_set_version {
628#define DRM_IOCTL_AGP_BIND DRM_IOW( 0x36, struct drm_agp_binding) 628#define DRM_IOCTL_AGP_BIND DRM_IOW( 0x36, struct drm_agp_binding)
629#define DRM_IOCTL_AGP_UNBIND DRM_IOW( 0x37, struct drm_agp_binding) 629#define DRM_IOCTL_AGP_UNBIND DRM_IOW( 0x37, struct drm_agp_binding)
630 630
631#define DRM_IOCTL_SG_ALLOC DRM_IOW( 0x38, struct drm_scatter_gather) 631#define DRM_IOCTL_SG_ALLOC DRM_IOWR(0x38, struct drm_scatter_gather)
632#define DRM_IOCTL_SG_FREE DRM_IOW( 0x39, struct drm_scatter_gather) 632#define DRM_IOCTL_SG_FREE DRM_IOW( 0x39, struct drm_scatter_gather)
633 633
634#define DRM_IOCTL_WAIT_VBLANK DRM_IOWR(0x3a, union drm_wait_vblank) 634#define DRM_IOCTL_WAIT_VBLANK DRM_IOWR(0x3a, union drm_wait_vblank)
diff --git a/drivers/char/drm/drm_drv.c b/drivers/char/drm/drm_drv.c
index fc54140551a7..564138714bb5 100644
--- a/drivers/char/drm/drm_drv.c
+++ b/drivers/char/drm/drm_drv.c
@@ -470,17 +470,18 @@ int drm_ioctl(struct inode *inode, struct file *filp,
470 if ((nr >= DRM_COMMAND_BASE) && (nr < DRM_COMMAND_END) && 470 if ((nr >= DRM_COMMAND_BASE) && (nr < DRM_COMMAND_END) &&
471 (nr < DRM_COMMAND_BASE + dev->driver->num_ioctls)) 471 (nr < DRM_COMMAND_BASE + dev->driver->num_ioctls))
472 ioctl = &dev->driver->ioctls[nr - DRM_COMMAND_BASE]; 472 ioctl = &dev->driver->ioctls[nr - DRM_COMMAND_BASE];
473 else if ((nr >= DRM_COMMAND_END) || (nr < DRM_COMMAND_BASE)) 473 else if ((nr >= DRM_COMMAND_END) || (nr < DRM_COMMAND_BASE)) {
474 ioctl = &drm_ioctls[nr]; 474 ioctl = &drm_ioctls[nr];
475 else 475 cmd = ioctl->cmd;
476 } else
476 goto err_i1; 477 goto err_i1;
477 478
479 /* Do not trust userspace, use our own definition */
478 func = ioctl->func; 480 func = ioctl->func;
479 /* is there a local override? */ 481 /* is there a local override? */
480 if ((nr == DRM_IOCTL_NR(DRM_IOCTL_DMA)) && dev->driver->dma_ioctl) 482 if ((nr == DRM_IOCTL_NR(DRM_IOCTL_DMA)) && dev->driver->dma_ioctl)
481 func = dev->driver->dma_ioctl; 483 func = dev->driver->dma_ioctl;
482 484
483
484 if (!func) { 485 if (!func) {
485 DRM_DEBUG("no function\n"); 486 DRM_DEBUG("no function\n");
486 retcode = -EINVAL; 487 retcode = -EINVAL;
diff --git a/drivers/char/drm/drm_pciids.h b/drivers/char/drm/drm_pciids.h
index a6a499f97e22..135bd19499fc 100644
--- a/drivers/char/drm/drm_pciids.h
+++ b/drivers/char/drm/drm_pciids.h
@@ -103,20 +103,18 @@
103 {0x1002, 0x5653, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ 103 {0x1002, 0x5653, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
104 {0x1002, 0x5834, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS300|RADEON_IS_IGP}, \ 104 {0x1002, 0x5834, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS300|RADEON_IS_IGP}, \
105 {0x1002, 0x5835, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS300|RADEON_IS_IGP|RADEON_IS_MOBILITY}, \ 105 {0x1002, 0x5835, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS300|RADEON_IS_IGP|RADEON_IS_MOBILITY}, \
106 {0x1002, 0x5954, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART}, \ 106 {0x1002, 0x5954, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS480|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART}, \
107 {0x1002, 0x5955, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART}, \ 107 {0x1002, 0x5955, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS480|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART}, \
108 {0x1002, 0x5974, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART}, \ 108 {0x1002, 0x5974, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS480|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART}, \
109 {0x1002, 0x5975, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART}, \ 109 {0x1002, 0x5975, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS480|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART}, \
110 {0x1002, 0x5960, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \ 110 {0x1002, 0x5960, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \
111 {0x1002, 0x5961, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \ 111 {0x1002, 0x5961, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \
112 {0x1002, 0x5962, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \ 112 {0x1002, 0x5962, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \
113 {0x1002, 0x5964, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \ 113 {0x1002, 0x5964, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \
114 {0x1002, 0x5965, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \ 114 {0x1002, 0x5965, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV280}, \
115 {0x1002, 0x5969, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV100}, \ 115 {0x1002, 0x5969, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV100}, \
116 {0x1002, 0x5a41, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART}, \ 116 {0x1002, 0x5a61, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS480|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART}, \
117 {0x1002, 0x5a42, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART}, \ 117 {0x1002, 0x5a62, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS480|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART}, \
118 {0x1002, 0x5a61, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART}, \
119 {0x1002, 0x5a62, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS400|RADEON_IS_IGP|RADEON_IS_MOBILITY|RADEON_IS_IGPGART}, \
120 {0x1002, 0x5b60, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \ 118 {0x1002, 0x5b60, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \
121 {0x1002, 0x5b62, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \ 119 {0x1002, 0x5b62, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \
122 {0x1002, 0x5b63, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \ 120 {0x1002, 0x5b63, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \
@@ -411,4 +409,7 @@
411 {0x8086, 0x2a02, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 409 {0x8086, 0x2a02, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
412 {0x8086, 0x2a12, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 410 {0x8086, 0x2a12, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
413 {0x8086, 0x2a42, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 411 {0x8086, 0x2a42, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
412 {0x8086, 0x2e02, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
413 {0x8086, 0x2e12, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
414 {0x8086, 0x2e22, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
414 {0, 0, 0} 415 {0, 0, 0}
diff --git a/drivers/char/drm/drm_sysfs.c b/drivers/char/drm/drm_sysfs.c
index 9a32169e88fb..af211a0ef179 100644
--- a/drivers/char/drm/drm_sysfs.c
+++ b/drivers/char/drm/drm_sysfs.c
@@ -34,8 +34,6 @@ static int drm_sysfs_suspend(struct device *dev, pm_message_t state)
34 struct drm_minor *drm_minor = to_drm_minor(dev); 34 struct drm_minor *drm_minor = to_drm_minor(dev);
35 struct drm_device *drm_dev = drm_minor->dev; 35 struct drm_device *drm_dev = drm_minor->dev;
36 36
37 printk(KERN_ERR "%s\n", __func__);
38
39 if (drm_dev->driver->suspend) 37 if (drm_dev->driver->suspend)
40 return drm_dev->driver->suspend(drm_dev, state); 38 return drm_dev->driver->suspend(drm_dev, state);
41 39
diff --git a/drivers/char/drm/i915_drv.c b/drivers/char/drm/i915_drv.c
index e8f3d682e3b1..93aed1c38bd2 100644
--- a/drivers/char/drm/i915_drv.c
+++ b/drivers/char/drm/i915_drv.c
@@ -389,6 +389,7 @@ static int i915_resume(struct drm_device *dev)
389 pci_restore_state(dev->pdev); 389 pci_restore_state(dev->pdev);
390 if (pci_enable_device(dev->pdev)) 390 if (pci_enable_device(dev->pdev))
391 return -1; 391 return -1;
392 pci_set_master(dev->pdev);
392 393
393 pci_write_config_byte(dev->pdev, LBB, dev_priv->saveLBB); 394 pci_write_config_byte(dev->pdev, LBB, dev_priv->saveLBB);
394 395
diff --git a/drivers/char/drm/i915_drv.h b/drivers/char/drm/i915_drv.h
index 1b20f7c0639c..d7326d92a237 100644
--- a/drivers/char/drm/i915_drv.h
+++ b/drivers/char/drm/i915_drv.h
@@ -1112,12 +1112,19 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
1112 (dev)->pci_device == 0x29A2 || \ 1112 (dev)->pci_device == 0x29A2 || \
1113 (dev)->pci_device == 0x2A02 || \ 1113 (dev)->pci_device == 0x2A02 || \
1114 (dev)->pci_device == 0x2A12 || \ 1114 (dev)->pci_device == 0x2A12 || \
1115 (dev)->pci_device == 0x2A42) 1115 (dev)->pci_device == 0x2A42 || \
1116 (dev)->pci_device == 0x2E02 || \
1117 (dev)->pci_device == 0x2E12 || \
1118 (dev)->pci_device == 0x2E22)
1116 1119
1117#define IS_I965GM(dev) ((dev)->pci_device == 0x2A02) 1120#define IS_I965GM(dev) ((dev)->pci_device == 0x2A02)
1118 1121
1119#define IS_IGD_GM(dev) ((dev)->pci_device == 0x2A42) 1122#define IS_IGD_GM(dev) ((dev)->pci_device == 0x2A42)
1120 1123
1124#define IS_G4X(dev) ((dev)->pci_device == 0x2E02 || \
1125 (dev)->pci_device == 0x2E12 || \
1126 (dev)->pci_device == 0x2E22)
1127
1121#define IS_G33(dev) ((dev)->pci_device == 0x29C2 || \ 1128#define IS_G33(dev) ((dev)->pci_device == 0x29C2 || \
1122 (dev)->pci_device == 0x29B2 || \ 1129 (dev)->pci_device == 0x29B2 || \
1123 (dev)->pci_device == 0x29D2) 1130 (dev)->pci_device == 0x29D2)
@@ -1128,7 +1135,7 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
1128#define IS_MOBILE(dev) (IS_I830(dev) || IS_I85X(dev) || IS_I915GM(dev) || \ 1135#define IS_MOBILE(dev) (IS_I830(dev) || IS_I85X(dev) || IS_I915GM(dev) || \
1129 IS_I945GM(dev) || IS_I965GM(dev) || IS_IGD_GM(dev)) 1136 IS_I945GM(dev) || IS_I965GM(dev) || IS_IGD_GM(dev))
1130 1137
1131#define I915_NEED_GFX_HWS(dev) (IS_G33(dev) || IS_IGD_GM(dev)) 1138#define I915_NEED_GFX_HWS(dev) (IS_G33(dev) || IS_IGD_GM(dev) || IS_G4X(dev))
1132 1139
1133#define PRIMARY_RINGBUFFER_SIZE (128*1024) 1140#define PRIMARY_RINGBUFFER_SIZE (128*1024)
1134 1141
diff --git a/drivers/char/drm/i915_irq.c b/drivers/char/drm/i915_irq.c
index f7f16e7a8bf3..df036118b8b1 100644
--- a/drivers/char/drm/i915_irq.c
+++ b/drivers/char/drm/i915_irq.c
@@ -62,11 +62,11 @@ static void i915_vblank_tasklet(struct drm_device *dev)
62 u32 ropcpp = (0xcc << 16) | ((cpp - 1) << 24); 62 u32 ropcpp = (0xcc << 16) | ((cpp - 1) << 24);
63 RING_LOCALS; 63 RING_LOCALS;
64 64
65 if (sarea_priv->front_tiled) { 65 if (IS_I965G(dev) && sarea_priv->front_tiled) {
66 cmd |= XY_SRC_COPY_BLT_DST_TILED; 66 cmd |= XY_SRC_COPY_BLT_DST_TILED;
67 dst_pitch >>= 2; 67 dst_pitch >>= 2;
68 } 68 }
69 if (sarea_priv->back_tiled) { 69 if (IS_I965G(dev) && sarea_priv->back_tiled) {
70 cmd |= XY_SRC_COPY_BLT_SRC_TILED; 70 cmd |= XY_SRC_COPY_BLT_SRC_TILED;
71 src_pitch >>= 2; 71 src_pitch >>= 2;
72 } 72 }
diff --git a/drivers/char/drm/r300_cmdbuf.c b/drivers/char/drm/r300_cmdbuf.c
index f535812e4057..702df45320f7 100644
--- a/drivers/char/drm/r300_cmdbuf.c
+++ b/drivers/char/drm/r300_cmdbuf.c
@@ -189,18 +189,12 @@ void r300_init_reg_flags(struct drm_device *dev)
189 ADD_RANGE(R300_RE_CULL_CNTL, 1); 189 ADD_RANGE(R300_RE_CULL_CNTL, 1);
190 ADD_RANGE(0x42C0, 2); 190 ADD_RANGE(0x42C0, 2);
191 ADD_RANGE(R300_RS_CNTL_0, 2); 191 ADD_RANGE(R300_RS_CNTL_0, 2);
192 ADD_RANGE(R300_RS_INTERP_0, 8); 192
193 ADD_RANGE(R300_RS_ROUTE_0, 8); 193 ADD_RANGE(R300_SC_HYPERZ, 2);
194 ADD_RANGE(0x43A4, 2);
195 ADD_RANGE(0x43E8, 1); 194 ADD_RANGE(0x43E8, 1);
196 ADD_RANGE(R300_PFS_CNTL_0, 3); 195
197 ADD_RANGE(R300_PFS_NODE_0, 4);
198 ADD_RANGE(R300_PFS_TEXI_0, 64);
199 ADD_RANGE(0x46A4, 5); 196 ADD_RANGE(0x46A4, 5);
200 ADD_RANGE(R300_PFS_INSTR0_0, 64); 197
201 ADD_RANGE(R300_PFS_INSTR1_0, 64);
202 ADD_RANGE(R300_PFS_INSTR2_0, 64);
203 ADD_RANGE(R300_PFS_INSTR3_0, 64);
204 ADD_RANGE(R300_RE_FOG_STATE, 1); 198 ADD_RANGE(R300_RE_FOG_STATE, 1);
205 ADD_RANGE(R300_FOG_COLOR_R, 3); 199 ADD_RANGE(R300_FOG_COLOR_R, 3);
206 ADD_RANGE(R300_PP_ALPHA_TEST, 2); 200 ADD_RANGE(R300_PP_ALPHA_TEST, 2);
@@ -215,14 +209,12 @@ void r300_init_reg_flags(struct drm_device *dev)
215 ADD_RANGE(0x4E50, 9); 209 ADD_RANGE(0x4E50, 9);
216 ADD_RANGE(0x4E88, 1); 210 ADD_RANGE(0x4E88, 1);
217 ADD_RANGE(0x4EA0, 2); 211 ADD_RANGE(0x4EA0, 2);
218 ADD_RANGE(R300_RB3D_ZSTENCIL_CNTL_0, 3); 212 ADD_RANGE(R300_ZB_CNTL, 3);
219 ADD_RANGE(R300_RB3D_ZSTENCIL_FORMAT, 4); 213 ADD_RANGE(R300_ZB_FORMAT, 4);
220 ADD_RANGE_MARK(R300_RB3D_DEPTHOFFSET, 1, MARK_CHECK_OFFSET); /* check offset */ 214 ADD_RANGE_MARK(R300_ZB_DEPTHOFFSET, 1, MARK_CHECK_OFFSET); /* check offset */
221 ADD_RANGE(R300_RB3D_DEPTHPITCH, 1); 215 ADD_RANGE(R300_ZB_DEPTHPITCH, 1);
222 ADD_RANGE(0x4F28, 1); 216 ADD_RANGE(R300_ZB_DEPTHCLEARVALUE, 1);
223 ADD_RANGE(0x4F30, 2); 217 ADD_RANGE(R300_ZB_ZMASK_OFFSET, 13);
224 ADD_RANGE(0x4F44, 1);
225 ADD_RANGE(0x4F54, 1);
226 218
227 ADD_RANGE(R300_TX_FILTER_0, 16); 219 ADD_RANGE(R300_TX_FILTER_0, 16);
228 ADD_RANGE(R300_TX_FILTER1_0, 16); 220 ADD_RANGE(R300_TX_FILTER1_0, 16);
@@ -235,13 +227,32 @@ void r300_init_reg_flags(struct drm_device *dev)
235 ADD_RANGE(R300_TX_BORDER_COLOR_0, 16); 227 ADD_RANGE(R300_TX_BORDER_COLOR_0, 16);
236 228
237 /* Sporadic registers used as primitives are emitted */ 229 /* Sporadic registers used as primitives are emitted */
238 ADD_RANGE(R300_RB3D_ZCACHE_CTLSTAT, 1); 230 ADD_RANGE(R300_ZB_ZCACHE_CTLSTAT, 1);
239 ADD_RANGE(R300_RB3D_DSTCACHE_CTLSTAT, 1); 231 ADD_RANGE(R300_RB3D_DSTCACHE_CTLSTAT, 1);
240 ADD_RANGE(R300_VAP_INPUT_ROUTE_0_0, 8); 232 ADD_RANGE(R300_VAP_INPUT_ROUTE_0_0, 8);
241 ADD_RANGE(R300_VAP_INPUT_ROUTE_1_0, 8); 233 ADD_RANGE(R300_VAP_INPUT_ROUTE_1_0, 8);
242 234
243 if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_RV515) { 235 if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_RV515) {
244 ADD_RANGE(0x4074, 16); 236 ADD_RANGE(R500_VAP_INDEX_OFFSET, 1);
237 ADD_RANGE(R500_US_CONFIG, 2);
238 ADD_RANGE(R500_US_CODE_ADDR, 3);
239 ADD_RANGE(R500_US_FC_CTRL, 1);
240 ADD_RANGE(R500_RS_IP_0, 16);
241 ADD_RANGE(R500_RS_INST_0, 16);
242 ADD_RANGE(R500_RB3D_COLOR_CLEAR_VALUE_AR, 2);
243 ADD_RANGE(R500_RB3D_CONSTANT_COLOR_AR, 2);
244 ADD_RANGE(R500_ZB_FIFO_SIZE, 2);
245 } else {
246 ADD_RANGE(R300_PFS_CNTL_0, 3);
247 ADD_RANGE(R300_PFS_NODE_0, 4);
248 ADD_RANGE(R300_PFS_TEXI_0, 64);
249 ADD_RANGE(R300_PFS_INSTR0_0, 64);
250 ADD_RANGE(R300_PFS_INSTR1_0, 64);
251 ADD_RANGE(R300_PFS_INSTR2_0, 64);
252 ADD_RANGE(R300_PFS_INSTR3_0, 64);
253 ADD_RANGE(R300_RS_INTERP_0, 8);
254 ADD_RANGE(R300_RS_ROUTE_0, 8);
255
245 } 256 }
246} 257}
247 258
@@ -707,8 +718,9 @@ static __inline__ void r300_pacify(drm_radeon_private_t *dev_priv)
707 BEGIN_RING(6); 718 BEGIN_RING(6);
708 OUT_RING(CP_PACKET0(R300_RB3D_DSTCACHE_CTLSTAT, 0)); 719 OUT_RING(CP_PACKET0(R300_RB3D_DSTCACHE_CTLSTAT, 0));
709 OUT_RING(R300_RB3D_DSTCACHE_UNKNOWN_0A); 720 OUT_RING(R300_RB3D_DSTCACHE_UNKNOWN_0A);
710 OUT_RING(CP_PACKET0(R300_RB3D_ZCACHE_CTLSTAT, 0)); 721 OUT_RING(CP_PACKET0(R300_ZB_ZCACHE_CTLSTAT, 0));
711 OUT_RING(R300_RB3D_ZCACHE_UNKNOWN_03); 722 OUT_RING(R300_ZB_ZCACHE_CTLSTAT_ZC_FLUSH_FLUSH_AND_FREE|
723 R300_ZB_ZCACHE_CTLSTAT_ZC_FREE_FREE);
712 OUT_RING(CP_PACKET3(RADEON_CP_NOP, 0)); 724 OUT_RING(CP_PACKET3(RADEON_CP_NOP, 0));
713 OUT_RING(0x0); 725 OUT_RING(0x0);
714 ADVANCE_RING(); 726 ADVANCE_RING();
@@ -829,6 +841,54 @@ static int r300_scratch(drm_radeon_private_t *dev_priv,
829} 841}
830 842
831/** 843/**
844 * Uploads user-supplied vertex program instructions or parameters onto
845 * the graphics card.
846 * Called by r300_do_cp_cmdbuf.
847 */
848static inline int r300_emit_r500fp(drm_radeon_private_t *dev_priv,
849 drm_radeon_kcmd_buffer_t *cmdbuf,
850 drm_r300_cmd_header_t header)
851{
852 int sz;
853 int addr;
854 int type;
855 int clamp;
856 int stride;
857 RING_LOCALS;
858
859 sz = header.r500fp.count;
860 /* address is 9 bits 0 - 8, bit 1 of flags is part of address */
861 addr = ((header.r500fp.adrhi_flags & 1) << 8) | header.r500fp.adrlo;
862
863 type = !!(header.r500fp.adrhi_flags & R500FP_CONSTANT_TYPE);
864 clamp = !!(header.r500fp.adrhi_flags & R500FP_CONSTANT_CLAMP);
865
866 addr |= (type << 16);
867 addr |= (clamp << 17);
868
869 stride = type ? 4 : 6;
870
871 DRM_DEBUG("r500fp %d %d type: %d\n", sz, addr, type);
872 if (!sz)
873 return 0;
874 if (sz * stride * 4 > cmdbuf->bufsz)
875 return -EINVAL;
876
877 BEGIN_RING(3 + sz * stride);
878 OUT_RING_REG(R500_GA_US_VECTOR_INDEX, addr);
879 OUT_RING(CP_PACKET0_TABLE(R500_GA_US_VECTOR_DATA, sz * stride - 1));
880 OUT_RING_TABLE((int *)cmdbuf->buf, sz * stride);
881
882 ADVANCE_RING();
883
884 cmdbuf->buf += sz * stride * 4;
885 cmdbuf->bufsz -= sz * stride * 4;
886
887 return 0;
888}
889
890
891/**
832 * Parses and validates a user-supplied command buffer and emits appropriate 892 * Parses and validates a user-supplied command buffer and emits appropriate
833 * commands on the DMA ring buffer. 893 * commands on the DMA ring buffer.
834 * Called by the ioctl handler function radeon_cp_cmdbuf. 894 * Called by the ioctl handler function radeon_cp_cmdbuf.
@@ -963,6 +1023,19 @@ int r300_do_cp_cmdbuf(struct drm_device *dev,
963 } 1023 }
964 break; 1024 break;
965 1025
1026 case R300_CMD_R500FP:
1027 if ((dev_priv->flags & RADEON_FAMILY_MASK) < CHIP_RV515) {
1028 DRM_ERROR("Calling r500 command on r300 card\n");
1029 ret = -EINVAL;
1030 goto cleanup;
1031 }
1032 DRM_DEBUG("R300_CMD_R500FP\n");
1033 ret = r300_emit_r500fp(dev_priv, cmdbuf, header);
1034 if (ret) {
1035 DRM_ERROR("r300_emit_r500fp failed\n");
1036 goto cleanup;
1037 }
1038 break;
966 default: 1039 default:
967 DRM_ERROR("bad cmd_type %i at %p\n", 1040 DRM_ERROR("bad cmd_type %i at %p\n",
968 header.header.cmd_type, 1041 header.header.cmd_type,
diff --git a/drivers/char/drm/r300_reg.h b/drivers/char/drm/r300_reg.h
index 8f664af9c4a4..a6802f26afc4 100644
--- a/drivers/char/drm/r300_reg.h
+++ b/drivers/char/drm/r300_reg.h
@@ -702,6 +702,27 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
702# define R300_RS_ROUTE_1_UNKNOWN11 (1 << 11) 702# define R300_RS_ROUTE_1_UNKNOWN11 (1 << 11)
703/* END: Rasterization / Interpolators - many guesses */ 703/* END: Rasterization / Interpolators - many guesses */
704 704
705/* Hierarchical Z Enable */
706#define R300_SC_HYPERZ 0x43a4
707# define R300_SC_HYPERZ_DISABLE (0 << 0)
708# define R300_SC_HYPERZ_ENABLE (1 << 0)
709# define R300_SC_HYPERZ_MIN (0 << 1)
710# define R300_SC_HYPERZ_MAX (1 << 1)
711# define R300_SC_HYPERZ_ADJ_256 (0 << 2)
712# define R300_SC_HYPERZ_ADJ_128 (1 << 2)
713# define R300_SC_HYPERZ_ADJ_64 (2 << 2)
714# define R300_SC_HYPERZ_ADJ_32 (3 << 2)
715# define R300_SC_HYPERZ_ADJ_16 (4 << 2)
716# define R300_SC_HYPERZ_ADJ_8 (5 << 2)
717# define R300_SC_HYPERZ_ADJ_4 (6 << 2)
718# define R300_SC_HYPERZ_ADJ_2 (7 << 2)
719# define R300_SC_HYPERZ_HZ_Z0MIN_NO (0 << 5)
720# define R300_SC_HYPERZ_HZ_Z0MIN (1 << 5)
721# define R300_SC_HYPERZ_HZ_Z0MAX_NO (0 << 6)
722# define R300_SC_HYPERZ_HZ_Z0MAX (1 << 6)
723
724#define R300_SC_EDGERULE 0x43a8
725
705/* BEGIN: Scissors and cliprects */ 726/* BEGIN: Scissors and cliprects */
706 727
707/* There are four clipping rectangles. Their corner coordinates are inclusive. 728/* There are four clipping rectangles. Their corner coordinates are inclusive.
@@ -1346,7 +1367,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
1346/* Guess by Vladimir. 1367/* Guess by Vladimir.
1347 * Set to 0A before 3D operations, set to 02 afterwards. 1368 * Set to 0A before 3D operations, set to 02 afterwards.
1348 */ 1369 */
1349#define R300_RB3D_DSTCACHE_CTLSTAT 0x4E4C 1370/*#define R300_RB3D_DSTCACHE_CTLSTAT 0x4E4C*/
1350# define R300_RB3D_DSTCACHE_UNKNOWN_02 0x00000002 1371# define R300_RB3D_DSTCACHE_UNKNOWN_02 0x00000002
1351# define R300_RB3D_DSTCACHE_UNKNOWN_0A 0x0000000A 1372# define R300_RB3D_DSTCACHE_UNKNOWN_0A 0x0000000A
1352 1373
@@ -1355,19 +1376,14 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
1355 * for this. 1376 * for this.
1356 * Bit (1<<8) is the "test" bit. so plain write is 6 - vd 1377 * Bit (1<<8) is the "test" bit. so plain write is 6 - vd
1357 */ 1378 */
1358#define R300_RB3D_ZSTENCIL_CNTL_0 0x4F00 1379#define R300_ZB_CNTL 0x4F00
1359# define R300_RB3D_Z_DISABLED_1 0x00000010 1380# define R300_STENCIL_ENABLE (1 << 0)
1360# define R300_RB3D_Z_DISABLED_2 0x00000014 1381# define R300_Z_ENABLE (1 << 1)
1361# define R300_RB3D_Z_TEST 0x00000012 1382# define R300_Z_WRITE_ENABLE (1 << 2)
1362# define R300_RB3D_Z_TEST_AND_WRITE 0x00000016 1383# define R300_Z_SIGNED_COMPARE (1 << 3)
1363# define R300_RB3D_Z_WRITE_ONLY 0x00000006 1384# define R300_STENCIL_FRONT_BACK (1 << 4)
1364 1385
1365# define R300_RB3D_Z_TEST 0x00000012 1386#define R300_ZB_ZSTENCILCNTL 0x4f04
1366# define R300_RB3D_Z_TEST_AND_WRITE 0x00000016
1367# define R300_RB3D_Z_WRITE_ONLY 0x00000006
1368# define R300_RB3D_STENCIL_ENABLE 0x00000001
1369
1370#define R300_RB3D_ZSTENCIL_CNTL_1 0x4F04
1371 /* functions */ 1387 /* functions */
1372# define R300_ZS_NEVER 0 1388# define R300_ZS_NEVER 0
1373# define R300_ZS_LESS 1 1389# define R300_ZS_LESS 1
@@ -1387,52 +1403,166 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
1387# define R300_ZS_INVERT 5 1403# define R300_ZS_INVERT 5
1388# define R300_ZS_INCR_WRAP 6 1404# define R300_ZS_INCR_WRAP 6
1389# define R300_ZS_DECR_WRAP 7 1405# define R300_ZS_DECR_WRAP 7
1406# define R300_Z_FUNC_SHIFT 0
1390 /* front and back refer to operations done for front 1407 /* front and back refer to operations done for front
1391 and back faces, i.e. separate stencil function support */ 1408 and back faces, i.e. separate stencil function support */
1392# define R300_RB3D_ZS1_DEPTH_FUNC_SHIFT 0 1409# define R300_S_FRONT_FUNC_SHIFT 3
1393# define R300_RB3D_ZS1_FRONT_FUNC_SHIFT 3 1410# define R300_S_FRONT_SFAIL_OP_SHIFT 6
1394# define R300_RB3D_ZS1_FRONT_FAIL_OP_SHIFT 6 1411# define R300_S_FRONT_ZPASS_OP_SHIFT 9
1395# define R300_RB3D_ZS1_FRONT_ZPASS_OP_SHIFT 9 1412# define R300_S_FRONT_ZFAIL_OP_SHIFT 12
1396# define R300_RB3D_ZS1_FRONT_ZFAIL_OP_SHIFT 12 1413# define R300_S_BACK_FUNC_SHIFT 15
1397# define R300_RB3D_ZS1_BACK_FUNC_SHIFT 15 1414# define R300_S_BACK_SFAIL_OP_SHIFT 18
1398# define R300_RB3D_ZS1_BACK_FAIL_OP_SHIFT 18 1415# define R300_S_BACK_ZPASS_OP_SHIFT 21
1399# define R300_RB3D_ZS1_BACK_ZPASS_OP_SHIFT 21 1416# define R300_S_BACK_ZFAIL_OP_SHIFT 24
1400# define R300_RB3D_ZS1_BACK_ZFAIL_OP_SHIFT 24 1417
1401 1418#define R300_ZB_STENCILREFMASK 0x4f08
1402#define R300_RB3D_ZSTENCIL_CNTL_2 0x4F08 1419# define R300_STENCILREF_SHIFT 0
1403# define R300_RB3D_ZS2_STENCIL_REF_SHIFT 0 1420# define R300_STENCILREF_MASK 0x000000ff
1404# define R300_RB3D_ZS2_STENCIL_MASK 0xFF 1421# define R300_STENCILMASK_SHIFT 8
1405# define R300_RB3D_ZS2_STENCIL_MASK_SHIFT 8 1422# define R300_STENCILMASK_MASK 0x0000ff00
1406# define R300_RB3D_ZS2_STENCIL_WRITE_MASK_SHIFT 16 1423# define R300_STENCILWRITEMASK_SHIFT 16
1424# define R300_STENCILWRITEMASK_MASK 0x00ff0000
1407 1425
1408/* gap */ 1426/* gap */
1409 1427
1410#define R300_RB3D_ZSTENCIL_FORMAT 0x4F10 1428#define R300_ZB_FORMAT 0x4f10
1411# define R300_DEPTH_FORMAT_16BIT_INT_Z (0 << 0) 1429# define R300_DEPTHFORMAT_16BIT_INT_Z (0 << 0)
1412# define R300_DEPTH_FORMAT_24BIT_INT_Z (2 << 0) 1430# define R300_DEPTHFORMAT_16BIT_13E3 (1 << 0)
1413 /* 16 bit format or some aditional bit ? */ 1431# define R300_DEPTHFORMAT_24BIT_INT_Z_8BIT_STENCIL (2 << 0)
1414# define R300_DEPTH_FORMAT_UNK32 (32 << 0) 1432/* reserved up to (15 << 0) */
1433# define R300_INVERT_13E3_LEADING_ONES (0 << 4)
1434# define R300_INVERT_13E3_LEADING_ZEROS (1 << 4)
1415 1435
1416#define R300_RB3D_EARLY_Z 0x4F14 1436#define R300_ZB_ZTOP 0x4F14
1417# define R300_EARLY_Z_DISABLE (0 << 0) 1437# define R300_ZTOP_DISABLE (0 << 0)
1418# define R300_EARLY_Z_ENABLE (1 << 0) 1438# define R300_ZTOP_ENABLE (1 << 0)
1419 1439
1420/* gap */ 1440/* gap */
1421 1441
1422#define R300_RB3D_ZCACHE_CTLSTAT 0x4F18 /* GUESS */ 1442#define R300_ZB_ZCACHE_CTLSTAT 0x4f18
1423# define R300_RB3D_ZCACHE_UNKNOWN_01 0x1 1443# define R300_ZB_ZCACHE_CTLSTAT_ZC_FLUSH_NO_EFFECT (0 << 0)
1424# define R300_RB3D_ZCACHE_UNKNOWN_03 0x3 1444# define R300_ZB_ZCACHE_CTLSTAT_ZC_FLUSH_FLUSH_AND_FREE (1 << 0)
1445# define R300_ZB_ZCACHE_CTLSTAT_ZC_FREE_NO_EFFECT (0 << 1)
1446# define R300_ZB_ZCACHE_CTLSTAT_ZC_FREE_FREE (1 << 1)
1447# define R300_ZB_ZCACHE_CTLSTAT_ZC_BUSY_IDLE (0 << 31)
1448# define R300_ZB_ZCACHE_CTLSTAT_ZC_BUSY_BUSY (1 << 31)
1449
1450#define R300_ZB_BW_CNTL 0x4f1c
1451# define R300_HIZ_DISABLE (0 << 0)
1452# define R300_HIZ_ENABLE (1 << 0)
1453# define R300_HIZ_MIN (0 << 1)
1454# define R300_HIZ_MAX (1 << 1)
1455# define R300_FAST_FILL_DISABLE (0 << 2)
1456# define R300_FAST_FILL_ENABLE (1 << 2)
1457# define R300_RD_COMP_DISABLE (0 << 3)
1458# define R300_RD_COMP_ENABLE (1 << 3)
1459# define R300_WR_COMP_DISABLE (0 << 4)
1460# define R300_WR_COMP_ENABLE (1 << 4)
1461# define R300_ZB_CB_CLEAR_RMW (0 << 5)
1462# define R300_ZB_CB_CLEAR_CACHE_LINEAR (1 << 5)
1463# define R300_FORCE_COMPRESSED_STENCIL_VALUE_DISABLE (0 << 6)
1464# define R300_FORCE_COMPRESSED_STENCIL_VALUE_ENABLE (1 << 6)
1465
1466# define R500_ZEQUAL_OPTIMIZE_ENABLE (0 << 7)
1467# define R500_ZEQUAL_OPTIMIZE_DISABLE (1 << 7)
1468# define R500_SEQUAL_OPTIMIZE_ENABLE (0 << 8)
1469# define R500_SEQUAL_OPTIMIZE_DISABLE (1 << 8)
1470
1471# define R500_BMASK_ENABLE (0 << 10)
1472# define R500_BMASK_DISABLE (1 << 10)
1473# define R500_HIZ_EQUAL_REJECT_DISABLE (0 << 11)
1474# define R500_HIZ_EQUAL_REJECT_ENABLE (1 << 11)
1475# define R500_HIZ_FP_EXP_BITS_DISABLE (0 << 12)
1476# define R500_HIZ_FP_EXP_BITS_1 (1 << 12)
1477# define R500_HIZ_FP_EXP_BITS_2 (2 << 12)
1478# define R500_HIZ_FP_EXP_BITS_3 (3 << 12)
1479# define R500_HIZ_FP_EXP_BITS_4 (4 << 12)
1480# define R500_HIZ_FP_EXP_BITS_5 (5 << 12)
1481# define R500_HIZ_FP_INVERT_LEADING_ONES (0 << 15)
1482# define R500_HIZ_FP_INVERT_LEADING_ZEROS (1 << 15)
1483# define R500_TILE_OVERWRITE_RECOMPRESSION_ENABLE (0 << 16)
1484# define R500_TILE_OVERWRITE_RECOMPRESSION_DISABLE (1 << 16)
1485# define R500_CONTIGUOUS_6XAA_SAMPLES_ENABLE (0 << 17)
1486# define R500_CONTIGUOUS_6XAA_SAMPLES_DISABLE (1 << 17)
1487# define R500_PEQ_PACKING_DISABLE (0 << 18)
1488# define R500_PEQ_PACKING_ENABLE (1 << 18)
1489# define R500_COVERED_PTR_MASKING_DISABLE (0 << 18)
1490# define R500_COVERED_PTR_MASKING_ENABLE (1 << 18)
1491
1425 1492
1426/* gap */ 1493/* gap */
1427 1494
1428#define R300_RB3D_DEPTHOFFSET 0x4F20 1495/* Z Buffer Address Offset.
1429#define R300_RB3D_DEPTHPITCH 0x4F24 1496 * Bits 31 to 5 are used for aligned Z buffer address offset for macro tiles.
1430# define R300_DEPTHPITCH_MASK 0x00001FF8 /* GUESS */ 1497 */
1431# define R300_DEPTH_TILE_ENABLE (1 << 16) /* GUESS */ 1498#define R300_ZB_DEPTHOFFSET 0x4f20
1432# define R300_DEPTH_MICROTILE_ENABLE (1 << 17) /* GUESS */ 1499
1433# define R300_DEPTH_ENDIAN_NO_SWAP (0 << 18) /* GUESS */ 1500/* Z Buffer Pitch and Endian Control */
1434# define R300_DEPTH_ENDIAN_WORD_SWAP (1 << 18) /* GUESS */ 1501#define R300_ZB_DEPTHPITCH 0x4f24
1435# define R300_DEPTH_ENDIAN_DWORD_SWAP (2 << 18) /* GUESS */ 1502# define R300_DEPTHPITCH_MASK 0x00003FFC
1503# define R300_DEPTHMACROTILE_DISABLE (0 << 16)
1504# define R300_DEPTHMACROTILE_ENABLE (1 << 16)
1505# define R300_DEPTHMICROTILE_LINEAR (0 << 17)
1506# define R300_DEPTHMICROTILE_TILED (1 << 17)
1507# define R300_DEPTHMICROTILE_TILED_SQUARE (2 << 17)
1508# define R300_DEPTHENDIAN_NO_SWAP (0 << 18)
1509# define R300_DEPTHENDIAN_WORD_SWAP (1 << 18)
1510# define R300_DEPTHENDIAN_DWORD_SWAP (2 << 18)
1511# define R300_DEPTHENDIAN_HALF_DWORD_SWAP (3 << 18)
1512
1513/* Z Buffer Clear Value */
1514#define R300_ZB_DEPTHCLEARVALUE 0x4f28
1515
1516#define R300_ZB_ZMASK_OFFSET 0x4f30
1517#define R300_ZB_ZMASK_PITCH 0x4f34
1518#define R300_ZB_ZMASK_WRINDEX 0x4f38
1519#define R300_ZB_ZMASK_DWORD 0x4f3c
1520#define R300_ZB_ZMASK_RDINDEX 0x4f40
1521
1522/* Hierarchical Z Memory Offset */
1523#define R300_ZB_HIZ_OFFSET 0x4f44
1524
1525/* Hierarchical Z Write Index */
1526#define R300_ZB_HIZ_WRINDEX 0x4f48
1527
1528/* Hierarchical Z Data */
1529#define R300_ZB_HIZ_DWORD 0x4f4c
1530
1531/* Hierarchical Z Read Index */
1532#define R300_ZB_HIZ_RDINDEX 0x4f50
1533
1534/* Hierarchical Z Pitch */
1535#define R300_ZB_HIZ_PITCH 0x4f54
1536
1537/* Z Buffer Z Pass Counter Data */
1538#define R300_ZB_ZPASS_DATA 0x4f58
1539
1540/* Z Buffer Z Pass Counter Address */
1541#define R300_ZB_ZPASS_ADDR 0x4f5c
1542
1543/* Depth buffer X and Y coordinate offset */
1544#define R300_ZB_DEPTHXY_OFFSET 0x4f60
1545# define R300_DEPTHX_OFFSET_SHIFT 1
1546# define R300_DEPTHX_OFFSET_MASK 0x000007FE
1547# define R300_DEPTHY_OFFSET_SHIFT 17
1548# define R300_DEPTHY_OFFSET_MASK 0x07FE0000
1549
1550/* Sets the fifo sizes */
1551#define R500_ZB_FIFO_SIZE 0x4fd0
1552# define R500_OP_FIFO_SIZE_FULL (0 << 0)
1553# define R500_OP_FIFO_SIZE_HALF (1 << 0)
1554# define R500_OP_FIFO_SIZE_QUATER (2 << 0)
1555# define R500_OP_FIFO_SIZE_EIGTHS (4 << 0)
1556
1557/* Stencil Reference Value and Mask for backfacing quads */
1558/* R300_ZB_STENCILREFMASK handles front face */
1559#define R500_ZB_STENCILREFMASK_BF 0x4fd4
1560# define R500_STENCILREF_SHIFT 0
1561# define R500_STENCILREF_MASK 0x000000ff
1562# define R500_STENCILMASK_SHIFT 8
1563# define R500_STENCILMASK_MASK 0x0000ff00
1564# define R500_STENCILWRITEMASK_SHIFT 16
1565# define R500_STENCILWRITEMASK_MASK 0x00ff0000
1436 1566
1437/* BEGIN: Vertex program instruction set */ 1567/* BEGIN: Vertex program instruction set */
1438 1568
@@ -1623,4 +1753,20 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
1623 */ 1753 */
1624#define R300_CP_CMD_BITBLT_MULTI 0xC0009B00 1754#define R300_CP_CMD_BITBLT_MULTI 0xC0009B00
1625 1755
1756#define R500_VAP_INDEX_OFFSET 0x208c
1757
1758#define R500_GA_US_VECTOR_INDEX 0x4250
1759#define R500_GA_US_VECTOR_DATA 0x4254
1760
1761#define R500_RS_IP_0 0x4074
1762#define R500_RS_INST_0 0x4320
1763
1764#define R500_US_CONFIG 0x4600
1765
1766#define R500_US_FC_CTRL 0x4624
1767#define R500_US_CODE_ADDR 0x4630
1768
1769#define R500_RB3D_COLOR_CLEAR_VALUE_AR 0x46c0
1770#define R500_RB3D_CONSTANT_COLOR_AR 0x4ef8
1771
1626#endif /* _R300_REG_H */ 1772#endif /* _R300_REG_H */
diff --git a/drivers/char/drm/radeon_cp.c b/drivers/char/drm/radeon_cp.c
index f6f6c92bf771..e53158f0ecb5 100644
--- a/drivers/char/drm/radeon_cp.c
+++ b/drivers/char/drm/radeon_cp.c
@@ -2,6 +2,7 @@
2/* 2/*
3 * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas. 3 * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas.
4 * Copyright 2000 VA Linux Systems, Inc., Fremont, California. 4 * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
5 * Copyright 2007 Advanced Micro Devices, Inc.
5 * All Rights Reserved. 6 * All Rights Reserved.
6 * 7 *
7 * Permission is hereby granted, free of charge, to any person obtaining a 8 * Permission is hereby granted, free of charge, to any person obtaining a
@@ -34,789 +35,13 @@
34#include "radeon_drv.h" 35#include "radeon_drv.h"
35#include "r300_reg.h" 36#include "r300_reg.h"
36 37
38#include "radeon_microcode.h"
39
37#define RADEON_FIFO_DEBUG 0 40#define RADEON_FIFO_DEBUG 0
38 41
39static int radeon_do_cleanup_cp(struct drm_device * dev); 42static int radeon_do_cleanup_cp(struct drm_device * dev);
40 43
41/* CP microcode (from ATI) */ 44static u32 R500_READ_MCIND(drm_radeon_private_t *dev_priv, int addr)
42static const u32 R200_cp_microcode[][2] = {
43 {0x21007000, 0000000000},
44 {0x20007000, 0000000000},
45 {0x000000ab, 0x00000004},
46 {0x000000af, 0x00000004},
47 {0x66544a49, 0000000000},
48 {0x49494174, 0000000000},
49 {0x54517d83, 0000000000},
50 {0x498d8b64, 0000000000},
51 {0x49494949, 0000000000},
52 {0x49da493c, 0000000000},
53 {0x49989898, 0000000000},
54 {0xd34949d5, 0000000000},
55 {0x9dc90e11, 0000000000},
56 {0xce9b9b9b, 0000000000},
57 {0x000f0000, 0x00000016},
58 {0x352e232c, 0000000000},
59 {0x00000013, 0x00000004},
60 {0x000f0000, 0x00000016},
61 {0x352e272c, 0000000000},
62 {0x000f0001, 0x00000016},
63 {0x3239362f, 0000000000},
64 {0x000077ef, 0x00000002},
65 {0x00061000, 0x00000002},
66 {0x00000020, 0x0000001a},
67 {0x00004000, 0x0000001e},
68 {0x00061000, 0x00000002},
69 {0x00000020, 0x0000001a},
70 {0x00004000, 0x0000001e},
71 {0x00061000, 0x00000002},
72 {0x00000020, 0x0000001a},
73 {0x00004000, 0x0000001e},
74 {0x00000016, 0x00000004},
75 {0x0003802a, 0x00000002},
76 {0x040067e0, 0x00000002},
77 {0x00000016, 0x00000004},
78 {0x000077e0, 0x00000002},
79 {0x00065000, 0x00000002},
80 {0x000037e1, 0x00000002},
81 {0x040067e1, 0x00000006},
82 {0x000077e0, 0x00000002},
83 {0x000077e1, 0x00000002},
84 {0x000077e1, 0x00000006},
85 {0xffffffff, 0000000000},
86 {0x10000000, 0000000000},
87 {0x0003802a, 0x00000002},
88 {0x040067e0, 0x00000006},
89 {0x00007675, 0x00000002},
90 {0x00007676, 0x00000002},
91 {0x00007677, 0x00000002},
92 {0x00007678, 0x00000006},
93 {0x0003802b, 0x00000002},
94 {0x04002676, 0x00000002},
95 {0x00007677, 0x00000002},
96 {0x00007678, 0x00000006},
97 {0x0000002e, 0x00000018},
98 {0x0000002e, 0x00000018},
99 {0000000000, 0x00000006},
100 {0x0000002f, 0x00000018},
101 {0x0000002f, 0x00000018},
102 {0000000000, 0x00000006},
103 {0x01605000, 0x00000002},
104 {0x00065000, 0x00000002},
105 {0x00098000, 0x00000002},
106 {0x00061000, 0x00000002},
107 {0x64c0603d, 0x00000004},
108 {0x00080000, 0x00000016},
109 {0000000000, 0000000000},
110 {0x0400251d, 0x00000002},
111 {0x00007580, 0x00000002},
112 {0x00067581, 0x00000002},
113 {0x04002580, 0x00000002},
114 {0x00067581, 0x00000002},
115 {0x00000046, 0x00000004},
116 {0x00005000, 0000000000},
117 {0x00061000, 0x00000002},
118 {0x0000750e, 0x00000002},
119 {0x00019000, 0x00000002},
120 {0x00011055, 0x00000014},
121 {0x00000055, 0x00000012},
122 {0x0400250f, 0x00000002},
123 {0x0000504a, 0x00000004},
124 {0x00007565, 0x00000002},
125 {0x00007566, 0x00000002},
126 {0x00000051, 0x00000004},
127 {0x01e655b4, 0x00000002},
128 {0x4401b0dc, 0x00000002},
129 {0x01c110dc, 0x00000002},
130 {0x2666705d, 0x00000018},
131 {0x040c2565, 0x00000002},
132 {0x0000005d, 0x00000018},
133 {0x04002564, 0x00000002},
134 {0x00007566, 0x00000002},
135 {0x00000054, 0x00000004},
136 {0x00401060, 0x00000008},
137 {0x00101000, 0x00000002},
138 {0x000d80ff, 0x00000002},
139 {0x00800063, 0x00000008},
140 {0x000f9000, 0x00000002},
141 {0x000e00ff, 0x00000002},
142 {0000000000, 0x00000006},
143 {0x00000080, 0x00000018},
144 {0x00000054, 0x00000004},
145 {0x00007576, 0x00000002},
146 {0x00065000, 0x00000002},
147 {0x00009000, 0x00000002},
148 {0x00041000, 0x00000002},
149 {0x0c00350e, 0x00000002},
150 {0x00049000, 0x00000002},
151 {0x00051000, 0x00000002},
152 {0x01e785f8, 0x00000002},
153 {0x00200000, 0x00000002},
154 {0x00600073, 0x0000000c},
155 {0x00007563, 0x00000002},
156 {0x006075f0, 0x00000021},
157 {0x20007068, 0x00000004},
158 {0x00005068, 0x00000004},
159 {0x00007576, 0x00000002},
160 {0x00007577, 0x00000002},
161 {0x0000750e, 0x00000002},
162 {0x0000750f, 0x00000002},
163 {0x00a05000, 0x00000002},
164 {0x00600076, 0x0000000c},
165 {0x006075f0, 0x00000021},
166 {0x000075f8, 0x00000002},
167 {0x00000076, 0x00000004},
168 {0x000a750e, 0x00000002},
169 {0x0020750f, 0x00000002},
170 {0x00600079, 0x00000004},
171 {0x00007570, 0x00000002},
172 {0x00007571, 0x00000002},
173 {0x00007572, 0x00000006},
174 {0x00005000, 0x00000002},
175 {0x00a05000, 0x00000002},
176 {0x00007568, 0x00000002},
177 {0x00061000, 0x00000002},
178 {0x00000084, 0x0000000c},
179 {0x00058000, 0x00000002},
180 {0x0c607562, 0x00000002},
181 {0x00000086, 0x00000004},
182 {0x00600085, 0x00000004},
183 {0x400070dd, 0000000000},
184 {0x000380dd, 0x00000002},
185 {0x00000093, 0x0000001c},
186 {0x00065095, 0x00000018},
187 {0x040025bb, 0x00000002},
188 {0x00061096, 0x00000018},
189 {0x040075bc, 0000000000},
190 {0x000075bb, 0x00000002},
191 {0x000075bc, 0000000000},
192 {0x00090000, 0x00000006},
193 {0x00090000, 0x00000002},
194 {0x000d8002, 0x00000006},
195 {0x00005000, 0x00000002},
196 {0x00007821, 0x00000002},
197 {0x00007800, 0000000000},
198 {0x00007821, 0x00000002},
199 {0x00007800, 0000000000},
200 {0x01665000, 0x00000002},
201 {0x000a0000, 0x00000002},
202 {0x000671cc, 0x00000002},
203 {0x0286f1cd, 0x00000002},
204 {0x000000a3, 0x00000010},
205 {0x21007000, 0000000000},
206 {0x000000aa, 0x0000001c},
207 {0x00065000, 0x00000002},
208 {0x000a0000, 0x00000002},
209 {0x00061000, 0x00000002},
210 {0x000b0000, 0x00000002},
211 {0x38067000, 0x00000002},
212 {0x000a00a6, 0x00000004},
213 {0x20007000, 0000000000},
214 {0x01200000, 0x00000002},
215 {0x20077000, 0x00000002},
216 {0x01200000, 0x00000002},
217 {0x20007000, 0000000000},
218 {0x00061000, 0x00000002},
219 {0x0120751b, 0x00000002},
220 {0x8040750a, 0x00000002},
221 {0x8040750b, 0x00000002},
222 {0x00110000, 0x00000002},
223 {0x000380dd, 0x00000002},
224 {0x000000bd, 0x0000001c},
225 {0x00061096, 0x00000018},
226 {0x844075bd, 0x00000002},
227 {0x00061095, 0x00000018},
228 {0x840075bb, 0x00000002},
229 {0x00061096, 0x00000018},
230 {0x844075bc, 0x00000002},
231 {0x000000c0, 0x00000004},
232 {0x804075bd, 0x00000002},
233 {0x800075bb, 0x00000002},
234 {0x804075bc, 0x00000002},
235 {0x00108000, 0x00000002},
236 {0x01400000, 0x00000002},
237 {0x006000c4, 0x0000000c},
238 {0x20c07000, 0x00000020},
239 {0x000000c6, 0x00000012},
240 {0x00800000, 0x00000006},
241 {0x0080751d, 0x00000006},
242 {0x000025bb, 0x00000002},
243 {0x000040c0, 0x00000004},
244 {0x0000775c, 0x00000002},
245 {0x00a05000, 0x00000002},
246 {0x00661000, 0x00000002},
247 {0x0460275d, 0x00000020},
248 {0x00004000, 0000000000},
249 {0x00007999, 0x00000002},
250 {0x00a05000, 0x00000002},
251 {0x00661000, 0x00000002},
252 {0x0460299b, 0x00000020},
253 {0x00004000, 0000000000},
254 {0x01e00830, 0x00000002},
255 {0x21007000, 0000000000},
256 {0x00005000, 0x00000002},
257 {0x00038042, 0x00000002},
258 {0x040025e0, 0x00000002},
259 {0x000075e1, 0000000000},
260 {0x00000001, 0000000000},
261 {0x000380d9, 0x00000002},
262 {0x04007394, 0000000000},
263 {0000000000, 0000000000},
264 {0000000000, 0000000000},
265 {0000000000, 0000000000},
266 {0000000000, 0000000000},
267 {0000000000, 0000000000},
268 {0000000000, 0000000000},
269 {0000000000, 0000000000},
270 {0000000000, 0000000000},
271 {0000000000, 0000000000},
272 {0000000000, 0000000000},
273 {0000000000, 0000000000},
274 {0000000000, 0000000000},
275 {0000000000, 0000000000},
276 {0000000000, 0000000000},
277 {0000000000, 0000000000},
278 {0000000000, 0000000000},
279 {0000000000, 0000000000},
280 {0000000000, 0000000000},
281 {0000000000, 0000000000},
282 {0000000000, 0000000000},
283 {0000000000, 0000000000},
284 {0000000000, 0000000000},
285 {0000000000, 0000000000},
286 {0000000000, 0000000000},
287 {0000000000, 0000000000},
288 {0000000000, 0000000000},
289 {0000000000, 0000000000},
290 {0000000000, 0000000000},
291 {0000000000, 0000000000},
292 {0000000000, 0000000000},
293 {0000000000, 0000000000},
294 {0000000000, 0000000000},
295 {0000000000, 0000000000},
296 {0000000000, 0000000000},
297 {0000000000, 0000000000},
298 {0000000000, 0000000000},
299};
300
301static const u32 radeon_cp_microcode[][2] = {
302 {0x21007000, 0000000000},
303 {0x20007000, 0000000000},
304 {0x000000b4, 0x00000004},
305 {0x000000b8, 0x00000004},
306 {0x6f5b4d4c, 0000000000},
307 {0x4c4c427f, 0000000000},
308 {0x5b568a92, 0000000000},
309 {0x4ca09c6d, 0000000000},
310 {0xad4c4c4c, 0000000000},
311 {0x4ce1af3d, 0000000000},
312 {0xd8afafaf, 0000000000},
313 {0xd64c4cdc, 0000000000},
314 {0x4cd10d10, 0000000000},
315 {0x000f0000, 0x00000016},
316 {0x362f242d, 0000000000},
317 {0x00000012, 0x00000004},
318 {0x000f0000, 0x00000016},
319 {0x362f282d, 0000000000},
320 {0x000380e7, 0x00000002},
321 {0x04002c97, 0x00000002},
322 {0x000f0001, 0x00000016},
323 {0x333a3730, 0000000000},
324 {0x000077ef, 0x00000002},
325 {0x00061000, 0x00000002},
326 {0x00000021, 0x0000001a},
327 {0x00004000, 0x0000001e},
328 {0x00061000, 0x00000002},
329 {0x00000021, 0x0000001a},
330 {0x00004000, 0x0000001e},
331 {0x00061000, 0x00000002},
332 {0x00000021, 0x0000001a},
333 {0x00004000, 0x0000001e},
334 {0x00000017, 0x00000004},
335 {0x0003802b, 0x00000002},
336 {0x040067e0, 0x00000002},
337 {0x00000017, 0x00000004},
338 {0x000077e0, 0x00000002},
339 {0x00065000, 0x00000002},
340 {0x000037e1, 0x00000002},
341 {0x040067e1, 0x00000006},
342 {0x000077e0, 0x00000002},
343 {0x000077e1, 0x00000002},
344 {0x000077e1, 0x00000006},
345 {0xffffffff, 0000000000},
346 {0x10000000, 0000000000},
347 {0x0003802b, 0x00000002},
348 {0x040067e0, 0x00000006},
349 {0x00007675, 0x00000002},
350 {0x00007676, 0x00000002},
351 {0x00007677, 0x00000002},
352 {0x00007678, 0x00000006},
353 {0x0003802c, 0x00000002},
354 {0x04002676, 0x00000002},
355 {0x00007677, 0x00000002},
356 {0x00007678, 0x00000006},
357 {0x0000002f, 0x00000018},
358 {0x0000002f, 0x00000018},
359 {0000000000, 0x00000006},
360 {0x00000030, 0x00000018},
361 {0x00000030, 0x00000018},
362 {0000000000, 0x00000006},
363 {0x01605000, 0x00000002},
364 {0x00065000, 0x00000002},
365 {0x00098000, 0x00000002},
366 {0x00061000, 0x00000002},
367 {0x64c0603e, 0x00000004},
368 {0x000380e6, 0x00000002},
369 {0x040025c5, 0x00000002},
370 {0x00080000, 0x00000016},
371 {0000000000, 0000000000},
372 {0x0400251d, 0x00000002},
373 {0x00007580, 0x00000002},
374 {0x00067581, 0x00000002},
375 {0x04002580, 0x00000002},
376 {0x00067581, 0x00000002},
377 {0x00000049, 0x00000004},
378 {0x00005000, 0000000000},
379 {0x000380e6, 0x00000002},
380 {0x040025c5, 0x00000002},
381 {0x00061000, 0x00000002},
382 {0x0000750e, 0x00000002},
383 {0x00019000, 0x00000002},
384 {0x00011055, 0x00000014},
385 {0x00000055, 0x00000012},
386 {0x0400250f, 0x00000002},
387 {0x0000504f, 0x00000004},
388 {0x000380e6, 0x00000002},
389 {0x040025c5, 0x00000002},
390 {0x00007565, 0x00000002},
391 {0x00007566, 0x00000002},
392 {0x00000058, 0x00000004},
393 {0x000380e6, 0x00000002},
394 {0x040025c5, 0x00000002},
395 {0x01e655b4, 0x00000002},
396 {0x4401b0e4, 0x00000002},
397 {0x01c110e4, 0x00000002},
398 {0x26667066, 0x00000018},
399 {0x040c2565, 0x00000002},
400 {0x00000066, 0x00000018},
401 {0x04002564, 0x00000002},
402 {0x00007566, 0x00000002},
403 {0x0000005d, 0x00000004},
404 {0x00401069, 0x00000008},
405 {0x00101000, 0x00000002},
406 {0x000d80ff, 0x00000002},
407 {0x0080006c, 0x00000008},
408 {0x000f9000, 0x00000002},
409 {0x000e00ff, 0x00000002},
410 {0000000000, 0x00000006},
411 {0x0000008f, 0x00000018},
412 {0x0000005b, 0x00000004},
413 {0x000380e6, 0x00000002},
414 {0x040025c5, 0x00000002},
415 {0x00007576, 0x00000002},
416 {0x00065000, 0x00000002},
417 {0x00009000, 0x00000002},
418 {0x00041000, 0x00000002},
419 {0x0c00350e, 0x00000002},
420 {0x00049000, 0x00000002},
421 {0x00051000, 0x00000002},
422 {0x01e785f8, 0x00000002},
423 {0x00200000, 0x00000002},
424 {0x0060007e, 0x0000000c},
425 {0x00007563, 0x00000002},
426 {0x006075f0, 0x00000021},
427 {0x20007073, 0x00000004},
428 {0x00005073, 0x00000004},
429 {0x000380e6, 0x00000002},
430 {0x040025c5, 0x00000002},
431 {0x00007576, 0x00000002},
432 {0x00007577, 0x00000002},
433 {0x0000750e, 0x00000002},
434 {0x0000750f, 0x00000002},
435 {0x00a05000, 0x00000002},
436 {0x00600083, 0x0000000c},
437 {0x006075f0, 0x00000021},
438 {0x000075f8, 0x00000002},
439 {0x00000083, 0x00000004},
440 {0x000a750e, 0x00000002},
441 {0x000380e6, 0x00000002},
442 {0x040025c5, 0x00000002},
443 {0x0020750f, 0x00000002},
444 {0x00600086, 0x00000004},
445 {0x00007570, 0x00000002},
446 {0x00007571, 0x00000002},
447 {0x00007572, 0x00000006},
448 {0x000380e6, 0x00000002},
449 {0x040025c5, 0x00000002},
450 {0x00005000, 0x00000002},
451 {0x00a05000, 0x00000002},
452 {0x00007568, 0x00000002},
453 {0x00061000, 0x00000002},
454 {0x00000095, 0x0000000c},
455 {0x00058000, 0x00000002},
456 {0x0c607562, 0x00000002},
457 {0x00000097, 0x00000004},
458 {0x000380e6, 0x00000002},
459 {0x040025c5, 0x00000002},
460 {0x00600096, 0x00000004},
461 {0x400070e5, 0000000000},
462 {0x000380e6, 0x00000002},
463 {0x040025c5, 0x00000002},
464 {0x000380e5, 0x00000002},
465 {0x000000a8, 0x0000001c},
466 {0x000650aa, 0x00000018},
467 {0x040025bb, 0x00000002},
468 {0x000610ab, 0x00000018},
469 {0x040075bc, 0000000000},
470 {0x000075bb, 0x00000002},
471 {0x000075bc, 0000000000},
472 {0x00090000, 0x00000006},
473 {0x00090000, 0x00000002},
474 {0x000d8002, 0x00000006},
475 {0x00007832, 0x00000002},
476 {0x00005000, 0x00000002},
477 {0x000380e7, 0x00000002},
478 {0x04002c97, 0x00000002},
479 {0x00007820, 0x00000002},
480 {0x00007821, 0x00000002},
481 {0x00007800, 0000000000},
482 {0x01200000, 0x00000002},
483 {0x20077000, 0x00000002},
484 {0x01200000, 0x00000002},
485 {0x20007000, 0x00000002},
486 {0x00061000, 0x00000002},
487 {0x0120751b, 0x00000002},
488 {0x8040750a, 0x00000002},
489 {0x8040750b, 0x00000002},
490 {0x00110000, 0x00000002},
491 {0x000380e5, 0x00000002},
492 {0x000000c6, 0x0000001c},
493 {0x000610ab, 0x00000018},
494 {0x844075bd, 0x00000002},
495 {0x000610aa, 0x00000018},
496 {0x840075bb, 0x00000002},
497 {0x000610ab, 0x00000018},
498 {0x844075bc, 0x00000002},
499 {0x000000c9, 0x00000004},
500 {0x804075bd, 0x00000002},
501 {0x800075bb, 0x00000002},
502 {0x804075bc, 0x00000002},
503 {0x00108000, 0x00000002},
504 {0x01400000, 0x00000002},
505 {0x006000cd, 0x0000000c},
506 {0x20c07000, 0x00000020},
507 {0x000000cf, 0x00000012},
508 {0x00800000, 0x00000006},
509 {0x0080751d, 0x00000006},
510 {0000000000, 0000000000},
511 {0x0000775c, 0x00000002},
512 {0x00a05000, 0x00000002},
513 {0x00661000, 0x00000002},
514 {0x0460275d, 0x00000020},
515 {0x00004000, 0000000000},
516 {0x01e00830, 0x00000002},
517 {0x21007000, 0000000000},
518 {0x6464614d, 0000000000},
519 {0x69687420, 0000000000},
520 {0x00000073, 0000000000},
521 {0000000000, 0000000000},
522 {0x00005000, 0x00000002},
523 {0x000380d0, 0x00000002},
524 {0x040025e0, 0x00000002},
525 {0x000075e1, 0000000000},
526 {0x00000001, 0000000000},
527 {0x000380e0, 0x00000002},
528 {0x04002394, 0x00000002},
529 {0x00005000, 0000000000},
530 {0000000000, 0000000000},
531 {0000000000, 0000000000},
532 {0x00000008, 0000000000},
533 {0x00000004, 0000000000},
534 {0000000000, 0000000000},
535 {0000000000, 0000000000},
536 {0000000000, 0000000000},
537 {0000000000, 0000000000},
538 {0000000000, 0000000000},
539 {0000000000, 0000000000},
540 {0000000000, 0000000000},
541 {0000000000, 0000000000},
542 {0000000000, 0000000000},
543 {0000000000, 0000000000},
544 {0000000000, 0000000000},
545 {0000000000, 0000000000},
546 {0000000000, 0000000000},
547 {0000000000, 0000000000},
548 {0000000000, 0000000000},
549 {0000000000, 0000000000},
550 {0000000000, 0000000000},
551 {0000000000, 0000000000},
552 {0000000000, 0000000000},
553 {0000000000, 0000000000},
554 {0000000000, 0000000000},
555 {0000000000, 0000000000},
556 {0000000000, 0000000000},
557 {0000000000, 0000000000},
558};
559
560static const u32 R300_cp_microcode[][2] = {
561 {0x4200e000, 0000000000},
562 {0x4000e000, 0000000000},
563 {0x000000af, 0x00000008},
564 {0x000000b3, 0x00000008},
565 {0x6c5a504f, 0000000000},
566 {0x4f4f497a, 0000000000},
567 {0x5a578288, 0000000000},
568 {0x4f91906a, 0000000000},
569 {0x4f4f4f4f, 0000000000},
570 {0x4fe24f44, 0000000000},
571 {0x4f9c9c9c, 0000000000},
572 {0xdc4f4fde, 0000000000},
573 {0xa1cd4f4f, 0000000000},
574 {0xd29d9d9d, 0000000000},
575 {0x4f0f9fd7, 0000000000},
576 {0x000ca000, 0x00000004},
577 {0x000d0012, 0x00000038},
578 {0x0000e8b4, 0x00000004},
579 {0x000d0014, 0x00000038},
580 {0x0000e8b6, 0x00000004},
581 {0x000d0016, 0x00000038},
582 {0x0000e854, 0x00000004},
583 {0x000d0018, 0x00000038},
584 {0x0000e855, 0x00000004},
585 {0x000d001a, 0x00000038},
586 {0x0000e856, 0x00000004},
587 {0x000d001c, 0x00000038},
588 {0x0000e857, 0x00000004},
589 {0x000d001e, 0x00000038},
590 {0x0000e824, 0x00000004},
591 {0x000d0020, 0x00000038},
592 {0x0000e825, 0x00000004},
593 {0x000d0022, 0x00000038},
594 {0x0000e830, 0x00000004},
595 {0x000d0024, 0x00000038},
596 {0x0000f0c0, 0x00000004},
597 {0x000d0026, 0x00000038},
598 {0x0000f0c1, 0x00000004},
599 {0x000d0028, 0x00000038},
600 {0x0000f041, 0x00000004},
601 {0x000d002a, 0x00000038},
602 {0x0000f184, 0x00000004},
603 {0x000d002c, 0x00000038},
604 {0x0000f185, 0x00000004},
605 {0x000d002e, 0x00000038},
606 {0x0000f186, 0x00000004},
607 {0x000d0030, 0x00000038},
608 {0x0000f187, 0x00000004},
609 {0x000d0032, 0x00000038},
610 {0x0000f180, 0x00000004},
611 {0x000d0034, 0x00000038},
612 {0x0000f393, 0x00000004},
613 {0x000d0036, 0x00000038},
614 {0x0000f38a, 0x00000004},
615 {0x000d0038, 0x00000038},
616 {0x0000f38e, 0x00000004},
617 {0x0000e821, 0x00000004},
618 {0x0140a000, 0x00000004},
619 {0x00000043, 0x00000018},
620 {0x00cce800, 0x00000004},
621 {0x001b0001, 0x00000004},
622 {0x08004800, 0x00000004},
623 {0x001b0001, 0x00000004},
624 {0x08004800, 0x00000004},
625 {0x001b0001, 0x00000004},
626 {0x08004800, 0x00000004},
627 {0x0000003a, 0x00000008},
628 {0x0000a000, 0000000000},
629 {0x02c0a000, 0x00000004},
630 {0x000ca000, 0x00000004},
631 {0x00130000, 0x00000004},
632 {0x000c2000, 0x00000004},
633 {0xc980c045, 0x00000008},
634 {0x2000451d, 0x00000004},
635 {0x0000e580, 0x00000004},
636 {0x000ce581, 0x00000004},
637 {0x08004580, 0x00000004},
638 {0x000ce581, 0x00000004},
639 {0x0000004c, 0x00000008},
640 {0x0000a000, 0000000000},
641 {0x000c2000, 0x00000004},
642 {0x0000e50e, 0x00000004},
643 {0x00032000, 0x00000004},
644 {0x00022056, 0x00000028},
645 {0x00000056, 0x00000024},
646 {0x0800450f, 0x00000004},
647 {0x0000a050, 0x00000008},
648 {0x0000e565, 0x00000004},
649 {0x0000e566, 0x00000004},
650 {0x00000057, 0x00000008},
651 {0x03cca5b4, 0x00000004},
652 {0x05432000, 0x00000004},
653 {0x00022000, 0x00000004},
654 {0x4ccce063, 0x00000030},
655 {0x08274565, 0x00000004},
656 {0x00000063, 0x00000030},
657 {0x08004564, 0x00000004},
658 {0x0000e566, 0x00000004},
659 {0x0000005a, 0x00000008},
660 {0x00802066, 0x00000010},
661 {0x00202000, 0x00000004},
662 {0x001b00ff, 0x00000004},
663 {0x01000069, 0x00000010},
664 {0x001f2000, 0x00000004},
665 {0x001c00ff, 0x00000004},
666 {0000000000, 0x0000000c},
667 {0x00000085, 0x00000030},
668 {0x0000005a, 0x00000008},
669 {0x0000e576, 0x00000004},
670 {0x000ca000, 0x00000004},
671 {0x00012000, 0x00000004},
672 {0x00082000, 0x00000004},
673 {0x1800650e, 0x00000004},
674 {0x00092000, 0x00000004},
675 {0x000a2000, 0x00000004},
676 {0x000f0000, 0x00000004},
677 {0x00400000, 0x00000004},
678 {0x00000079, 0x00000018},
679 {0x0000e563, 0x00000004},
680 {0x00c0e5f9, 0x000000c2},
681 {0x0000006e, 0x00000008},
682 {0x0000a06e, 0x00000008},
683 {0x0000e576, 0x00000004},
684 {0x0000e577, 0x00000004},
685 {0x0000e50e, 0x00000004},
686 {0x0000e50f, 0x00000004},
687 {0x0140a000, 0x00000004},
688 {0x0000007c, 0x00000018},
689 {0x00c0e5f9, 0x000000c2},
690 {0x0000007c, 0x00000008},
691 {0x0014e50e, 0x00000004},
692 {0x0040e50f, 0x00000004},
693 {0x00c0007f, 0x00000008},
694 {0x0000e570, 0x00000004},
695 {0x0000e571, 0x00000004},
696 {0x0000e572, 0x0000000c},
697 {0x0000a000, 0x00000004},
698 {0x0140a000, 0x00000004},
699 {0x0000e568, 0x00000004},
700 {0x000c2000, 0x00000004},
701 {0x00000089, 0x00000018},
702 {0x000b0000, 0x00000004},
703 {0x18c0e562, 0x00000004},
704 {0x0000008b, 0x00000008},
705 {0x00c0008a, 0x00000008},
706 {0x000700e4, 0x00000004},
707 {0x00000097, 0x00000038},
708 {0x000ca099, 0x00000030},
709 {0x080045bb, 0x00000004},
710 {0x000c209a, 0x00000030},
711 {0x0800e5bc, 0000000000},
712 {0x0000e5bb, 0x00000004},
713 {0x0000e5bc, 0000000000},
714 {0x00120000, 0x0000000c},
715 {0x00120000, 0x00000004},
716 {0x001b0002, 0x0000000c},
717 {0x0000a000, 0x00000004},
718 {0x0000e821, 0x00000004},
719 {0x0000e800, 0000000000},
720 {0x0000e821, 0x00000004},
721 {0x0000e82e, 0000000000},
722 {0x02cca000, 0x00000004},
723 {0x00140000, 0x00000004},
724 {0x000ce1cc, 0x00000004},
725 {0x050de1cd, 0x00000004},
726 {0x000000a7, 0x00000020},
727 {0x4200e000, 0000000000},
728 {0x000000ae, 0x00000038},
729 {0x000ca000, 0x00000004},
730 {0x00140000, 0x00000004},
731 {0x000c2000, 0x00000004},
732 {0x00160000, 0x00000004},
733 {0x700ce000, 0x00000004},
734 {0x001400aa, 0x00000008},
735 {0x4000e000, 0000000000},
736 {0x02400000, 0x00000004},
737 {0x400ee000, 0x00000004},
738 {0x02400000, 0x00000004},
739 {0x4000e000, 0000000000},
740 {0x000c2000, 0x00000004},
741 {0x0240e51b, 0x00000004},
742 {0x0080e50a, 0x00000005},
743 {0x0080e50b, 0x00000005},
744 {0x00220000, 0x00000004},
745 {0x000700e4, 0x00000004},
746 {0x000000c1, 0x00000038},
747 {0x000c209a, 0x00000030},
748 {0x0880e5bd, 0x00000005},
749 {0x000c2099, 0x00000030},
750 {0x0800e5bb, 0x00000005},
751 {0x000c209a, 0x00000030},
752 {0x0880e5bc, 0x00000005},
753 {0x000000c4, 0x00000008},
754 {0x0080e5bd, 0x00000005},
755 {0x0000e5bb, 0x00000005},
756 {0x0080e5bc, 0x00000005},
757 {0x00210000, 0x00000004},
758 {0x02800000, 0x00000004},
759 {0x00c000c8, 0x00000018},
760 {0x4180e000, 0x00000040},
761 {0x000000ca, 0x00000024},
762 {0x01000000, 0x0000000c},
763 {0x0100e51d, 0x0000000c},
764 {0x000045bb, 0x00000004},
765 {0x000080c4, 0x00000008},
766 {0x0000f3ce, 0x00000004},
767 {0x0140a000, 0x00000004},
768 {0x00cc2000, 0x00000004},
769 {0x08c053cf, 0x00000040},
770 {0x00008000, 0000000000},
771 {0x0000f3d2, 0x00000004},
772 {0x0140a000, 0x00000004},
773 {0x00cc2000, 0x00000004},
774 {0x08c053d3, 0x00000040},
775 {0x00008000, 0000000000},
776 {0x0000f39d, 0x00000004},
777 {0x0140a000, 0x00000004},
778 {0x00cc2000, 0x00000004},
779 {0x08c0539e, 0x00000040},
780 {0x00008000, 0000000000},
781 {0x03c00830, 0x00000004},
782 {0x4200e000, 0000000000},
783 {0x0000a000, 0x00000004},
784 {0x200045e0, 0x00000004},
785 {0x0000e5e1, 0000000000},
786 {0x00000001, 0000000000},
787 {0x000700e1, 0x00000004},
788 {0x0800e394, 0000000000},
789 {0000000000, 0000000000},
790 {0000000000, 0000000000},
791 {0000000000, 0000000000},
792 {0000000000, 0000000000},
793 {0000000000, 0000000000},
794 {0000000000, 0000000000},
795 {0000000000, 0000000000},
796 {0000000000, 0000000000},
797 {0000000000, 0000000000},
798 {0000000000, 0000000000},
799 {0000000000, 0000000000},
800 {0000000000, 0000000000},
801 {0000000000, 0000000000},
802 {0000000000, 0000000000},
803 {0000000000, 0000000000},
804 {0000000000, 0000000000},
805 {0000000000, 0000000000},
806 {0000000000, 0000000000},
807 {0000000000, 0000000000},
808 {0000000000, 0000000000},
809 {0000000000, 0000000000},
810 {0000000000, 0000000000},
811 {0000000000, 0000000000},
812 {0000000000, 0000000000},
813 {0000000000, 0000000000},
814 {0000000000, 0000000000},
815 {0000000000, 0000000000},
816 {0000000000, 0000000000},
817};
818
819static u32 RADEON_READ_MCIND(drm_radeon_private_t *dev_priv, int addr)
820{ 45{
821 u32 ret; 46 u32 ret;
822 RADEON_WRITE(R520_MC_IND_INDEX, 0x7f0000 | (addr & 0xff)); 47 RADEON_WRITE(R520_MC_IND_INDEX, 0x7f0000 | (addr & 0xff));
@@ -825,21 +50,41 @@ static u32 RADEON_READ_MCIND(drm_radeon_private_t *dev_priv, int addr)
825 return ret; 50 return ret;
826} 51}
827 52
53static u32 RS480_READ_MCIND(drm_radeon_private_t *dev_priv, int addr)
54{
55 u32 ret;
56 RADEON_WRITE(RS480_NB_MC_INDEX, addr & 0xff);
57 ret = RADEON_READ(RS480_NB_MC_DATA);
58 RADEON_WRITE(RS480_NB_MC_INDEX, 0xff);
59 return ret;
60}
61
828static u32 RS690_READ_MCIND(drm_radeon_private_t *dev_priv, int addr) 62static u32 RS690_READ_MCIND(drm_radeon_private_t *dev_priv, int addr)
829{ 63{
64 u32 ret;
830 RADEON_WRITE(RS690_MC_INDEX, (addr & RS690_MC_INDEX_MASK)); 65 RADEON_WRITE(RS690_MC_INDEX, (addr & RS690_MC_INDEX_MASK));
831 return RADEON_READ(RS690_MC_DATA); 66 ret = RADEON_READ(RS690_MC_DATA);
67 RADEON_WRITE(RS690_MC_INDEX, RS690_MC_INDEX_MASK);
68 return ret;
69}
70
71static u32 IGP_READ_MCIND(drm_radeon_private_t *dev_priv, int addr)
72{
73 if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS690)
74 return RS690_READ_MCIND(dev_priv, addr);
75 else
76 return RS480_READ_MCIND(dev_priv, addr);
832} 77}
833 78
834u32 radeon_read_fb_location(drm_radeon_private_t *dev_priv) 79u32 radeon_read_fb_location(drm_radeon_private_t *dev_priv)
835{ 80{
836 81
837 if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV515) 82 if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV515)
838 return RADEON_READ_MCIND(dev_priv, RV515_MC_FB_LOCATION); 83 return R500_READ_MCIND(dev_priv, RV515_MC_FB_LOCATION);
839 else if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS690) 84 else if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS690)
840 return RS690_READ_MCIND(dev_priv, RS690_MC_FB_LOCATION); 85 return RS690_READ_MCIND(dev_priv, RS690_MC_FB_LOCATION);
841 else if ((dev_priv->flags & RADEON_FAMILY_MASK) > CHIP_RV515) 86 else if ((dev_priv->flags & RADEON_FAMILY_MASK) > CHIP_RV515)
842 return RADEON_READ_MCIND(dev_priv, R520_MC_FB_LOCATION); 87 return R500_READ_MCIND(dev_priv, R520_MC_FB_LOCATION);
843 else 88 else
844 return RADEON_READ(RADEON_MC_FB_LOCATION); 89 return RADEON_READ(RADEON_MC_FB_LOCATION);
845} 90}
@@ -847,11 +92,11 @@ u32 radeon_read_fb_location(drm_radeon_private_t *dev_priv)
847static void radeon_write_fb_location(drm_radeon_private_t *dev_priv, u32 fb_loc) 92static void radeon_write_fb_location(drm_radeon_private_t *dev_priv, u32 fb_loc)
848{ 93{
849 if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV515) 94 if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV515)
850 RADEON_WRITE_MCIND(RV515_MC_FB_LOCATION, fb_loc); 95 R500_WRITE_MCIND(RV515_MC_FB_LOCATION, fb_loc);
851 else if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS690) 96 else if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS690)
852 RS690_WRITE_MCIND(RS690_MC_FB_LOCATION, fb_loc); 97 RS690_WRITE_MCIND(RS690_MC_FB_LOCATION, fb_loc);
853 else if ((dev_priv->flags & RADEON_FAMILY_MASK) > CHIP_RV515) 98 else if ((dev_priv->flags & RADEON_FAMILY_MASK) > CHIP_RV515)
854 RADEON_WRITE_MCIND(R520_MC_FB_LOCATION, fb_loc); 99 R500_WRITE_MCIND(R520_MC_FB_LOCATION, fb_loc);
855 else 100 else
856 RADEON_WRITE(RADEON_MC_FB_LOCATION, fb_loc); 101 RADEON_WRITE(RADEON_MC_FB_LOCATION, fb_loc);
857} 102}
@@ -859,15 +104,39 @@ static void radeon_write_fb_location(drm_radeon_private_t *dev_priv, u32 fb_loc)
859static void radeon_write_agp_location(drm_radeon_private_t *dev_priv, u32 agp_loc) 104static void radeon_write_agp_location(drm_radeon_private_t *dev_priv, u32 agp_loc)
860{ 105{
861 if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV515) 106 if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV515)
862 RADEON_WRITE_MCIND(RV515_MC_AGP_LOCATION, agp_loc); 107 R500_WRITE_MCIND(RV515_MC_AGP_LOCATION, agp_loc);
863 else if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS690) 108 else if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS690)
864 RS690_WRITE_MCIND(RS690_MC_AGP_LOCATION, agp_loc); 109 RS690_WRITE_MCIND(RS690_MC_AGP_LOCATION, agp_loc);
865 else if ((dev_priv->flags & RADEON_FAMILY_MASK) > CHIP_RV515) 110 else if ((dev_priv->flags & RADEON_FAMILY_MASK) > CHIP_RV515)
866 RADEON_WRITE_MCIND(R520_MC_AGP_LOCATION, agp_loc); 111 R500_WRITE_MCIND(R520_MC_AGP_LOCATION, agp_loc);
867 else 112 else
868 RADEON_WRITE(RADEON_MC_AGP_LOCATION, agp_loc); 113 RADEON_WRITE(RADEON_MC_AGP_LOCATION, agp_loc);
869} 114}
870 115
116static void radeon_write_agp_base(drm_radeon_private_t *dev_priv, u64 agp_base)
117{
118 u32 agp_base_hi = upper_32_bits(agp_base);
119 u32 agp_base_lo = agp_base & 0xffffffff;
120
121 if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV515) {
122 R500_WRITE_MCIND(RV515_MC_AGP_BASE, agp_base_lo);
123 R500_WRITE_MCIND(RV515_MC_AGP_BASE_2, agp_base_hi);
124 } else if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS690) {
125 RS690_WRITE_MCIND(RS690_MC_AGP_BASE, agp_base_lo);
126 RS690_WRITE_MCIND(RS690_MC_AGP_BASE_2, agp_base_hi);
127 } else if ((dev_priv->flags & RADEON_FAMILY_MASK) > CHIP_RV515) {
128 R500_WRITE_MCIND(R520_MC_AGP_BASE, agp_base_lo);
129 R500_WRITE_MCIND(R520_MC_AGP_BASE_2, agp_base_hi);
130 } else if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS480) {
131 RADEON_WRITE(RADEON_AGP_BASE, agp_base_lo);
132 RADEON_WRITE(RS480_AGP_BASE_2, 0);
133 } else {
134 RADEON_WRITE(RADEON_AGP_BASE, agp_base_lo);
135 if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R200)
136 RADEON_WRITE(RADEON_AGP_BASE_2, agp_base_hi);
137 }
138}
139
871static int RADEON_READ_PLL(struct drm_device * dev, int addr) 140static int RADEON_READ_PLL(struct drm_device * dev, int addr)
872{ 141{
873 drm_radeon_private_t *dev_priv = dev->dev_private; 142 drm_radeon_private_t *dev_priv = dev->dev_private;
@@ -882,15 +151,6 @@ static u32 RADEON_READ_PCIE(drm_radeon_private_t *dev_priv, int addr)
882 return RADEON_READ(RADEON_PCIE_DATA); 151 return RADEON_READ(RADEON_PCIE_DATA);
883} 152}
884 153
885static u32 RADEON_READ_IGPGART(drm_radeon_private_t *dev_priv, int addr)
886{
887 u32 ret;
888 RADEON_WRITE(RADEON_IGPGART_INDEX, addr & 0x7f);
889 ret = RADEON_READ(RADEON_IGPGART_DATA);
890 RADEON_WRITE(RADEON_IGPGART_INDEX, 0x7f);
891 return ret;
892}
893
894#if RADEON_FIFO_DEBUG 154#if RADEON_FIFO_DEBUG
895static void radeon_status(drm_radeon_private_t * dev_priv) 155static void radeon_status(drm_radeon_private_t * dev_priv)
896{ 156{
@@ -925,16 +185,36 @@ static int radeon_do_pixcache_flush(drm_radeon_private_t * dev_priv)
925 185
926 dev_priv->stats.boxes |= RADEON_BOX_WAIT_IDLE; 186 dev_priv->stats.boxes |= RADEON_BOX_WAIT_IDLE;
927 187
928 tmp = RADEON_READ(RADEON_RB3D_DSTCACHE_CTLSTAT); 188 if ((dev_priv->flags & RADEON_FAMILY_MASK) <= CHIP_RV280) {
929 tmp |= RADEON_RB3D_DC_FLUSH_ALL; 189 tmp = RADEON_READ(RADEON_RB3D_DSTCACHE_CTLSTAT);
930 RADEON_WRITE(RADEON_RB3D_DSTCACHE_CTLSTAT, tmp); 190 tmp |= RADEON_RB3D_DC_FLUSH_ALL;
191 RADEON_WRITE(RADEON_RB3D_DSTCACHE_CTLSTAT, tmp);
931 192
932 for (i = 0; i < dev_priv->usec_timeout; i++) { 193 for (i = 0; i < dev_priv->usec_timeout; i++) {
933 if (!(RADEON_READ(RADEON_RB3D_DSTCACHE_CTLSTAT) 194 if (!(RADEON_READ(RADEON_RB3D_DSTCACHE_CTLSTAT)
934 & RADEON_RB3D_DC_BUSY)) { 195 & RADEON_RB3D_DC_BUSY)) {
935 return 0; 196 return 0;
197 }
198 DRM_UDELAY(1);
199 }
200 } else {
201 /* 3D */
202 tmp = RADEON_READ(R300_RB3D_DSTCACHE_CTLSTAT);
203 tmp |= RADEON_RB3D_DC_FLUSH_ALL;
204 RADEON_WRITE(R300_RB3D_DSTCACHE_CTLSTAT, tmp);
205
206 /* 2D */
207 tmp = RADEON_READ(R300_DSTCACHE_CTLSTAT);
208 tmp |= RADEON_RB3D_DC_FLUSH_ALL;
209 RADEON_WRITE(R300_DSTCACHE_CTLSTAT, tmp);
210
211 for (i = 0; i < dev_priv->usec_timeout; i++) {
212 if (!(RADEON_READ(R300_DSTCACHE_CTLSTAT)
213 & RADEON_RB3D_DC_BUSY)) {
214 return 0;
215 }
216 DRM_UDELAY(1);
936 } 217 }
937 DRM_UDELAY(1);
938 } 218 }
939 219
940#if RADEON_FIFO_DEBUG 220#if RADEON_FIFO_DEBUG
@@ -991,6 +271,50 @@ static int radeon_do_wait_for_idle(drm_radeon_private_t * dev_priv)
991 return -EBUSY; 271 return -EBUSY;
992} 272}
993 273
274static void radeon_init_pipes(drm_radeon_private_t *dev_priv)
275{
276 uint32_t gb_tile_config, gb_pipe_sel = 0;
277
278 /* RS4xx/RS6xx/R4xx/R5xx */
279 if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R420) {
280 gb_pipe_sel = RADEON_READ(R400_GB_PIPE_SELECT);
281 dev_priv->num_gb_pipes = ((gb_pipe_sel >> 12) & 0x3) + 1;
282 } else {
283 /* R3xx */
284 if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_R300) ||
285 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_R350)) {
286 dev_priv->num_gb_pipes = 2;
287 } else {
288 /* R3Vxx */
289 dev_priv->num_gb_pipes = 1;
290 }
291 }
292 DRM_INFO("Num pipes: %d\n", dev_priv->num_gb_pipes);
293
294 gb_tile_config = (R300_ENABLE_TILING | R300_TILE_SIZE_16 /*| R300_SUBPIXEL_1_16*/);
295
296 switch (dev_priv->num_gb_pipes) {
297 case 2: gb_tile_config |= R300_PIPE_COUNT_R300; break;
298 case 3: gb_tile_config |= R300_PIPE_COUNT_R420_3P; break;
299 case 4: gb_tile_config |= R300_PIPE_COUNT_R420; break;
300 default:
301 case 1: gb_tile_config |= R300_PIPE_COUNT_RV350; break;
302 }
303
304 if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_RV515) {
305 RADEON_WRITE_PLL(R500_DYN_SCLK_PWMEM_PIPE, (1 | ((gb_pipe_sel >> 8) & 0xf) << 4));
306 RADEON_WRITE(R500_SU_REG_DEST, ((1 << dev_priv->num_gb_pipes) - 1));
307 }
308 RADEON_WRITE(R300_GB_TILE_CONFIG, gb_tile_config);
309 radeon_do_wait_for_idle(dev_priv);
310 RADEON_WRITE(R300_DST_PIPE_CONFIG, RADEON_READ(R300_DST_PIPE_CONFIG) | R300_PIPE_AUTO_CONFIG);
311 RADEON_WRITE(R300_RB2D_DSTCACHE_MODE, (RADEON_READ(R300_RB2D_DSTCACHE_MODE) |
312 R300_DC_AUTOFLUSH_ENABLE |
313 R300_DC_DC_DISABLE_IGNORE_PE));
314
315
316}
317
994/* ================================================================ 318/* ================================================================
995 * CP control, initialization 319 * CP control, initialization
996 */ 320 */
@@ -1004,8 +328,22 @@ static void radeon_cp_load_microcode(drm_radeon_private_t * dev_priv)
1004 radeon_do_wait_for_idle(dev_priv); 328 radeon_do_wait_for_idle(dev_priv);
1005 329
1006 RADEON_WRITE(RADEON_CP_ME_RAM_ADDR, 0); 330 RADEON_WRITE(RADEON_CP_ME_RAM_ADDR, 0);
1007 331 if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_R100) ||
1008 if (dev_priv->microcode_version == UCODE_R200) { 332 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV100) ||
333 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV200) ||
334 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS100) ||
335 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS200)) {
336 DRM_INFO("Loading R100 Microcode\n");
337 for (i = 0; i < 256; i++) {
338 RADEON_WRITE(RADEON_CP_ME_RAM_DATAH,
339 R100_cp_microcode[i][1]);
340 RADEON_WRITE(RADEON_CP_ME_RAM_DATAL,
341 R100_cp_microcode[i][0]);
342 }
343 } else if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_R200) ||
344 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV250) ||
345 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV280) ||
346 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS300)) {
1009 DRM_INFO("Loading R200 Microcode\n"); 347 DRM_INFO("Loading R200 Microcode\n");
1010 for (i = 0; i < 256; i++) { 348 for (i = 0; i < 256; i++) {
1011 RADEON_WRITE(RADEON_CP_ME_RAM_DATAH, 349 RADEON_WRITE(RADEON_CP_ME_RAM_DATAH,
@@ -1013,7 +351,11 @@ static void radeon_cp_load_microcode(drm_radeon_private_t * dev_priv)
1013 RADEON_WRITE(RADEON_CP_ME_RAM_DATAL, 351 RADEON_WRITE(RADEON_CP_ME_RAM_DATAL,
1014 R200_cp_microcode[i][0]); 352 R200_cp_microcode[i][0]);
1015 } 353 }
1016 } else if (dev_priv->microcode_version == UCODE_R300) { 354 } else if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_R300) ||
355 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_R350) ||
356 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV350) ||
357 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV380) ||
358 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS480)) {
1017 DRM_INFO("Loading R300 Microcode\n"); 359 DRM_INFO("Loading R300 Microcode\n");
1018 for (i = 0; i < 256; i++) { 360 for (i = 0; i < 256; i++) {
1019 RADEON_WRITE(RADEON_CP_ME_RAM_DATAH, 361 RADEON_WRITE(RADEON_CP_ME_RAM_DATAH,
@@ -1021,12 +363,35 @@ static void radeon_cp_load_microcode(drm_radeon_private_t * dev_priv)
1021 RADEON_WRITE(RADEON_CP_ME_RAM_DATAL, 363 RADEON_WRITE(RADEON_CP_ME_RAM_DATAL,
1022 R300_cp_microcode[i][0]); 364 R300_cp_microcode[i][0]);
1023 } 365 }
1024 } else { 366 } else if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_R420) ||
367 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV410)) {
368 DRM_INFO("Loading R400 Microcode\n");
1025 for (i = 0; i < 256; i++) { 369 for (i = 0; i < 256; i++) {
1026 RADEON_WRITE(RADEON_CP_ME_RAM_DATAH, 370 RADEON_WRITE(RADEON_CP_ME_RAM_DATAH,
1027 radeon_cp_microcode[i][1]); 371 R420_cp_microcode[i][1]);
1028 RADEON_WRITE(RADEON_CP_ME_RAM_DATAL, 372 RADEON_WRITE(RADEON_CP_ME_RAM_DATAL,
1029 radeon_cp_microcode[i][0]); 373 R420_cp_microcode[i][0]);
374 }
375 } else if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS690) {
376 DRM_INFO("Loading RS690 Microcode\n");
377 for (i = 0; i < 256; i++) {
378 RADEON_WRITE(RADEON_CP_ME_RAM_DATAH,
379 RS690_cp_microcode[i][1]);
380 RADEON_WRITE(RADEON_CP_ME_RAM_DATAL,
381 RS690_cp_microcode[i][0]);
382 }
383 } else if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV515) ||
384 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_R520) ||
385 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV530) ||
386 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_R580) ||
387 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV560) ||
388 ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV570)) {
389 DRM_INFO("Loading R500 Microcode\n");
390 for (i = 0; i < 256; i++) {
391 RADEON_WRITE(RADEON_CP_ME_RAM_DATAH,
392 R520_cp_microcode[i][1]);
393 RADEON_WRITE(RADEON_CP_ME_RAM_DATAL,
394 R520_cp_microcode[i][0]);
1030 } 395 }
1031 } 396 }
1032} 397}
@@ -1121,12 +486,13 @@ static void radeon_do_cp_stop(drm_radeon_private_t * dev_priv)
1121static int radeon_do_engine_reset(struct drm_device * dev) 486static int radeon_do_engine_reset(struct drm_device * dev)
1122{ 487{
1123 drm_radeon_private_t *dev_priv = dev->dev_private; 488 drm_radeon_private_t *dev_priv = dev->dev_private;
1124 u32 clock_cntl_index, mclk_cntl, rbbm_soft_reset; 489 u32 clock_cntl_index = 0, mclk_cntl = 0, rbbm_soft_reset;
1125 DRM_DEBUG("\n"); 490 DRM_DEBUG("\n");
1126 491
1127 radeon_do_pixcache_flush(dev_priv); 492 radeon_do_pixcache_flush(dev_priv);
1128 493
1129 if ((dev_priv->flags & RADEON_FAMILY_MASK) < CHIP_RV515) { 494 if ((dev_priv->flags & RADEON_FAMILY_MASK) <= CHIP_RV410) {
495 /* may need something similar for newer chips */
1130 clock_cntl_index = RADEON_READ(RADEON_CLOCK_CNTL_INDEX); 496 clock_cntl_index = RADEON_READ(RADEON_CLOCK_CNTL_INDEX);
1131 mclk_cntl = RADEON_READ_PLL(dev, RADEON_MCLK_CNTL); 497 mclk_cntl = RADEON_READ_PLL(dev, RADEON_MCLK_CNTL);
1132 498
@@ -1137,33 +503,39 @@ static int radeon_do_engine_reset(struct drm_device * dev)
1137 RADEON_FORCEON_YCLKB | 503 RADEON_FORCEON_YCLKB |
1138 RADEON_FORCEON_MC | 504 RADEON_FORCEON_MC |
1139 RADEON_FORCEON_AIC)); 505 RADEON_FORCEON_AIC));
506 }
1140 507
1141 rbbm_soft_reset = RADEON_READ(RADEON_RBBM_SOFT_RESET); 508 rbbm_soft_reset = RADEON_READ(RADEON_RBBM_SOFT_RESET);
1142 509
1143 RADEON_WRITE(RADEON_RBBM_SOFT_RESET, (rbbm_soft_reset | 510 RADEON_WRITE(RADEON_RBBM_SOFT_RESET, (rbbm_soft_reset |
1144 RADEON_SOFT_RESET_CP | 511 RADEON_SOFT_RESET_CP |
1145 RADEON_SOFT_RESET_HI | 512 RADEON_SOFT_RESET_HI |
1146 RADEON_SOFT_RESET_SE | 513 RADEON_SOFT_RESET_SE |
1147 RADEON_SOFT_RESET_RE | 514 RADEON_SOFT_RESET_RE |
1148 RADEON_SOFT_RESET_PP | 515 RADEON_SOFT_RESET_PP |
1149 RADEON_SOFT_RESET_E2 | 516 RADEON_SOFT_RESET_E2 |
1150 RADEON_SOFT_RESET_RB)); 517 RADEON_SOFT_RESET_RB));
1151 RADEON_READ(RADEON_RBBM_SOFT_RESET); 518 RADEON_READ(RADEON_RBBM_SOFT_RESET);
1152 RADEON_WRITE(RADEON_RBBM_SOFT_RESET, (rbbm_soft_reset & 519 RADEON_WRITE(RADEON_RBBM_SOFT_RESET, (rbbm_soft_reset &
1153 ~(RADEON_SOFT_RESET_CP | 520 ~(RADEON_SOFT_RESET_CP |
1154 RADEON_SOFT_RESET_HI | 521 RADEON_SOFT_RESET_HI |
1155 RADEON_SOFT_RESET_SE | 522 RADEON_SOFT_RESET_SE |
1156 RADEON_SOFT_RESET_RE | 523 RADEON_SOFT_RESET_RE |
1157 RADEON_SOFT_RESET_PP | 524 RADEON_SOFT_RESET_PP |
1158 RADEON_SOFT_RESET_E2 | 525 RADEON_SOFT_RESET_E2 |
1159 RADEON_SOFT_RESET_RB))); 526 RADEON_SOFT_RESET_RB)));
1160 RADEON_READ(RADEON_RBBM_SOFT_RESET); 527 RADEON_READ(RADEON_RBBM_SOFT_RESET);
1161 528
529 if ((dev_priv->flags & RADEON_FAMILY_MASK) <= CHIP_RV410) {
1162 RADEON_WRITE_PLL(RADEON_MCLK_CNTL, mclk_cntl); 530 RADEON_WRITE_PLL(RADEON_MCLK_CNTL, mclk_cntl);
1163 RADEON_WRITE(RADEON_CLOCK_CNTL_INDEX, clock_cntl_index); 531 RADEON_WRITE(RADEON_CLOCK_CNTL_INDEX, clock_cntl_index);
1164 RADEON_WRITE(RADEON_RBBM_SOFT_RESET, rbbm_soft_reset); 532 RADEON_WRITE(RADEON_RBBM_SOFT_RESET, rbbm_soft_reset);
1165 } 533 }
1166 534
535 /* setup the raster pipes */
536 if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R300)
537 radeon_init_pipes(dev_priv);
538
1167 /* Reset the CP ring */ 539 /* Reset the CP ring */
1168 radeon_do_cp_reset(dev_priv); 540 radeon_do_cp_reset(dev_priv);
1169 541
@@ -1194,7 +566,8 @@ static void radeon_cp_init_ring_buffer(struct drm_device * dev,
1194 566
1195#if __OS_HAS_AGP 567#if __OS_HAS_AGP
1196 if (dev_priv->flags & RADEON_IS_AGP) { 568 if (dev_priv->flags & RADEON_IS_AGP) {
1197 RADEON_WRITE(RADEON_AGP_BASE, (unsigned int)dev->agp->base); 569 radeon_write_agp_base(dev_priv, dev->agp->base);
570
1198 radeon_write_agp_location(dev_priv, 571 radeon_write_agp_location(dev_priv,
1199 (((dev_priv->gart_vm_start - 1 + 572 (((dev_priv->gart_vm_start - 1 +
1200 dev_priv->gart_size) & 0xffff0000) | 573 dev_priv->gart_size) & 0xffff0000) |
@@ -1339,102 +712,70 @@ static void radeon_test_writeback(drm_radeon_private_t * dev_priv)
1339/* Enable or disable IGP GART on the chip */ 712/* Enable or disable IGP GART on the chip */
1340static void radeon_set_igpgart(drm_radeon_private_t * dev_priv, int on) 713static void radeon_set_igpgart(drm_radeon_private_t * dev_priv, int on)
1341{ 714{
1342 u32 temp, tmp;
1343
1344 tmp = RADEON_READ(RADEON_AIC_CNTL);
1345 if (on) {
1346 DRM_DEBUG("programming igpgart %08X %08lX %08X\n",
1347 dev_priv->gart_vm_start,
1348 (long)dev_priv->gart_info.bus_addr,
1349 dev_priv->gart_size);
1350
1351 RADEON_WRITE_IGPGART(RADEON_IGPGART_UNK_18, 0x1000);
1352 RADEON_WRITE_IGPGART(RADEON_IGPGART_ENABLE, 0x1);
1353 RADEON_WRITE_IGPGART(RADEON_IGPGART_CTRL, 0x42040800);
1354 RADEON_WRITE_IGPGART(RADEON_IGPGART_BASE_ADDR,
1355 dev_priv->gart_info.bus_addr);
1356
1357 temp = RADEON_READ_IGPGART(dev_priv, RADEON_IGPGART_UNK_39);
1358 RADEON_WRITE_IGPGART(RADEON_IGPGART_UNK_39, temp);
1359
1360 RADEON_WRITE(RADEON_AGP_BASE, (unsigned int)dev_priv->gart_vm_start);
1361 dev_priv->gart_size = 32*1024*1024;
1362 radeon_write_agp_location(dev_priv,
1363 (((dev_priv->gart_vm_start - 1 +
1364 dev_priv->gart_size) & 0xffff0000) |
1365 (dev_priv->gart_vm_start >> 16)));
1366
1367 temp = RADEON_READ_IGPGART(dev_priv, RADEON_IGPGART_ENABLE);
1368 RADEON_WRITE_IGPGART(RADEON_IGPGART_ENABLE, temp);
1369
1370 RADEON_READ_IGPGART(dev_priv, RADEON_IGPGART_FLUSH);
1371 RADEON_WRITE_IGPGART(RADEON_IGPGART_FLUSH, 0x1);
1372 RADEON_READ_IGPGART(dev_priv, RADEON_IGPGART_FLUSH);
1373 RADEON_WRITE_IGPGART(RADEON_IGPGART_FLUSH, 0x0);
1374 }
1375}
1376
1377/* Enable or disable RS690 GART on the chip */
1378static void radeon_set_rs690gart(drm_radeon_private_t *dev_priv, int on)
1379{
1380 u32 temp; 715 u32 temp;
1381 716
1382 if (on) { 717 if (on) {
1383 DRM_DEBUG("programming rs690 gart %08X %08lX %08X\n", 718 DRM_DEBUG("programming igp gart %08X %08lX %08X\n",
1384 dev_priv->gart_vm_start, 719 dev_priv->gart_vm_start,
1385 (long)dev_priv->gart_info.bus_addr, 720 (long)dev_priv->gart_info.bus_addr,
1386 dev_priv->gart_size); 721 dev_priv->gart_size);
1387 722
1388 temp = RS690_READ_MCIND(dev_priv, RS690_MC_MISC_CNTL); 723 temp = IGP_READ_MCIND(dev_priv, RS480_MC_MISC_CNTL);
1389 RS690_WRITE_MCIND(RS690_MC_MISC_CNTL, 0x5000); 724 if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS690)
725 IGP_WRITE_MCIND(RS480_MC_MISC_CNTL, (RS480_GART_INDEX_REG_EN |
726 RS690_BLOCK_GFX_D3_EN));
727 else
728 IGP_WRITE_MCIND(RS480_MC_MISC_CNTL, RS480_GART_INDEX_REG_EN);
1390 729
1391 RS690_WRITE_MCIND(RS690_MC_AGP_SIZE, 730 IGP_WRITE_MCIND(RS480_AGP_ADDRESS_SPACE_SIZE, (RS480_GART_EN |
1392 RS690_MC_GART_EN | RS690_MC_AGP_SIZE_32MB); 731 RS480_VA_SIZE_32MB));
1393 732
1394 temp = RS690_READ_MCIND(dev_priv, RS690_MC_GART_FEATURE_ID); 733 temp = IGP_READ_MCIND(dev_priv, RS480_GART_FEATURE_ID);
1395 RS690_WRITE_MCIND(RS690_MC_GART_FEATURE_ID, 0x42040800); 734 IGP_WRITE_MCIND(RS480_GART_FEATURE_ID, (RS480_HANG_EN |
735 RS480_TLB_ENABLE |
736 RS480_GTW_LAC_EN |
737 RS480_1LEVEL_GART));
1396 738
1397 RS690_WRITE_MCIND(RS690_MC_GART_BASE, 739 temp = dev_priv->gart_info.bus_addr & 0xfffff000;
1398 dev_priv->gart_info.bus_addr); 740 temp |= (upper_32_bits(dev_priv->gart_info.bus_addr) & 0xff) << 4;
741 IGP_WRITE_MCIND(RS480_GART_BASE, temp);
1399 742
1400 temp = RS690_READ_MCIND(dev_priv, RS690_MC_AGP_MODE_CONTROL); 743 temp = IGP_READ_MCIND(dev_priv, RS480_AGP_MODE_CNTL);
1401 RS690_WRITE_MCIND(RS690_MC_AGP_MODE_CONTROL, 0x01400000); 744 IGP_WRITE_MCIND(RS480_AGP_MODE_CNTL, ((1 << RS480_REQ_TYPE_SNOOP_SHIFT) |
745 RS480_REQ_TYPE_SNOOP_DIS));
1402 746
1403 RS690_WRITE_MCIND(RS690_MC_AGP_BASE, 747 radeon_write_agp_base(dev_priv, dev_priv->gart_vm_start);
1404 (unsigned int)dev_priv->gart_vm_start);
1405 748
1406 dev_priv->gart_size = 32*1024*1024; 749 dev_priv->gart_size = 32*1024*1024;
1407 temp = (((dev_priv->gart_vm_start - 1 + dev_priv->gart_size) & 750 temp = (((dev_priv->gart_vm_start - 1 + dev_priv->gart_size) &
1408 0xffff0000) | (dev_priv->gart_vm_start >> 16)); 751 0xffff0000) | (dev_priv->gart_vm_start >> 16));
1409 752
1410 RS690_WRITE_MCIND(RS690_MC_AGP_LOCATION, temp); 753 radeon_write_agp_location(dev_priv, temp);
1411 754
1412 temp = RS690_READ_MCIND(dev_priv, RS690_MC_AGP_SIZE); 755 temp = IGP_READ_MCIND(dev_priv, RS480_AGP_ADDRESS_SPACE_SIZE);
1413 RS690_WRITE_MCIND(RS690_MC_AGP_SIZE, 756 IGP_WRITE_MCIND(RS480_AGP_ADDRESS_SPACE_SIZE, (RS480_GART_EN |
1414 RS690_MC_GART_EN | RS690_MC_AGP_SIZE_32MB); 757 RS480_VA_SIZE_32MB));
1415 758
1416 do { 759 do {
1417 temp = RS690_READ_MCIND(dev_priv, RS690_MC_GART_CACHE_CNTL); 760 temp = IGP_READ_MCIND(dev_priv, RS480_GART_CACHE_CNTRL);
1418 if ((temp & RS690_MC_GART_CLEAR_STATUS) == 761 if ((temp & RS480_GART_CACHE_INVALIDATE) == 0)
1419 RS690_MC_GART_CLEAR_DONE)
1420 break; 762 break;
1421 DRM_UDELAY(1); 763 DRM_UDELAY(1);
1422 } while (1); 764 } while (1);
1423 765
1424 RS690_WRITE_MCIND(RS690_MC_GART_CACHE_CNTL, 766 IGP_WRITE_MCIND(RS480_GART_CACHE_CNTRL,
1425 RS690_MC_GART_CC_CLEAR); 767 RS480_GART_CACHE_INVALIDATE);
768
1426 do { 769 do {
1427 temp = RS690_READ_MCIND(dev_priv, RS690_MC_GART_CACHE_CNTL); 770 temp = IGP_READ_MCIND(dev_priv, RS480_GART_CACHE_CNTRL);
1428 if ((temp & RS690_MC_GART_CLEAR_STATUS) == 771 if ((temp & RS480_GART_CACHE_INVALIDATE) == 0)
1429 RS690_MC_GART_CLEAR_DONE)
1430 break; 772 break;
1431 DRM_UDELAY(1); 773 DRM_UDELAY(1);
1432 } while (1); 774 } while (1);
1433 775
1434 RS690_WRITE_MCIND(RS690_MC_GART_CACHE_CNTL, 776 IGP_WRITE_MCIND(RS480_GART_CACHE_CNTRL, 0);
1435 RS690_MC_GART_CC_NO_CHANGE);
1436 } else { 777 } else {
1437 RS690_WRITE_MCIND(RS690_MC_AGP_SIZE, RS690_MC_GART_DIS); 778 IGP_WRITE_MCIND(RS480_AGP_ADDRESS_SPACE_SIZE, 0);
1438 } 779 }
1439} 780}
1440 781
@@ -1472,12 +813,8 @@ static void radeon_set_pcigart(drm_radeon_private_t * dev_priv, int on)
1472{ 813{
1473 u32 tmp; 814 u32 tmp;
1474 815
1475 if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS690) { 816 if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS690) ||
1476 radeon_set_rs690gart(dev_priv, on); 817 (dev_priv->flags & RADEON_IS_IGPGART)) {
1477 return;
1478 }
1479
1480 if (dev_priv->flags & RADEON_IS_IGPGART) {
1481 radeon_set_igpgart(dev_priv, on); 818 radeon_set_igpgart(dev_priv, on);
1482 return; 819 return;
1483 } 820 }
@@ -1951,6 +1288,7 @@ static int radeon_do_resume_cp(struct drm_device * dev)
1951 radeon_cp_init_ring_buffer(dev, dev_priv); 1288 radeon_cp_init_ring_buffer(dev, dev_priv);
1952 1289
1953 radeon_do_engine_reset(dev); 1290 radeon_do_engine_reset(dev);
1291 radeon_enable_interrupt(dev);
1954 1292
1955 DRM_DEBUG("radeon_do_resume_cp() complete\n"); 1293 DRM_DEBUG("radeon_do_resume_cp() complete\n");
1956 1294
diff --git a/drivers/char/drm/radeon_drm.h b/drivers/char/drm/radeon_drm.h
index aab82e121e07..73ff51f12311 100644
--- a/drivers/char/drm/radeon_drm.h
+++ b/drivers/char/drm/radeon_drm.h
@@ -240,6 +240,7 @@ typedef union {
240# define R300_NEW_WAIT_2D_2D_CLEAN_3D_3D_CLEAN 0x8 240# define R300_NEW_WAIT_2D_2D_CLEAN_3D_3D_CLEAN 0x8
241 241
242#define R300_CMD_SCRATCH 8 242#define R300_CMD_SCRATCH 8
243#define R300_CMD_R500FP 9
243 244
244typedef union { 245typedef union {
245 unsigned int u; 246 unsigned int u;
@@ -268,6 +269,9 @@ typedef union {
268 struct { 269 struct {
269 unsigned char cmd_type, reg, n_bufs, flags; 270 unsigned char cmd_type, reg, n_bufs, flags;
270 } scratch; 271 } scratch;
272 struct {
273 unsigned char cmd_type, count, adrlo, adrhi_flags;
274 } r500fp;
271} drm_r300_cmd_header_t; 275} drm_r300_cmd_header_t;
272 276
273#define RADEON_FRONT 0x1 277#define RADEON_FRONT 0x1
@@ -278,6 +282,9 @@ typedef union {
278#define RADEON_USE_HIERZ 0x40000000 282#define RADEON_USE_HIERZ 0x40000000
279#define RADEON_USE_COMP_ZBUF 0x20000000 283#define RADEON_USE_COMP_ZBUF 0x20000000
280 284
285#define R500FP_CONSTANT_TYPE (1 << 1)
286#define R500FP_CONSTANT_CLAMP (1 << 2)
287
281/* Primitive types 288/* Primitive types
282 */ 289 */
283#define RADEON_POINTS 0x1 290#define RADEON_POINTS 0x1
@@ -669,6 +676,7 @@ typedef struct drm_radeon_indirect {
669#define RADEON_PARAM_CARD_TYPE 12 676#define RADEON_PARAM_CARD_TYPE 12
670#define RADEON_PARAM_VBLANK_CRTC 13 /* VBLANK CRTC */ 677#define RADEON_PARAM_VBLANK_CRTC 13 /* VBLANK CRTC */
671#define RADEON_PARAM_FB_LOCATION 14 /* FB location */ 678#define RADEON_PARAM_FB_LOCATION 14 /* FB location */
679#define RADEON_PARAM_NUM_GB_PIPES 15 /* num GB pipes */
672 680
673typedef struct drm_radeon_getparam { 681typedef struct drm_radeon_getparam {
674 int param; 682 int param;
diff --git a/drivers/char/drm/radeon_drv.h b/drivers/char/drm/radeon_drv.h
index 173ae620223a..3f0eca957aa7 100644
--- a/drivers/char/drm/radeon_drv.h
+++ b/drivers/char/drm/radeon_drv.h
@@ -38,7 +38,7 @@
38 38
39#define DRIVER_NAME "radeon" 39#define DRIVER_NAME "radeon"
40#define DRIVER_DESC "ATI Radeon" 40#define DRIVER_DESC "ATI Radeon"
41#define DRIVER_DATE "20060524" 41#define DRIVER_DATE "20080528"
42 42
43/* Interface history: 43/* Interface history:
44 * 44 *
@@ -98,9 +98,10 @@
98 * 1.26- Add support for variable size PCI(E) gart aperture 98 * 1.26- Add support for variable size PCI(E) gart aperture
99 * 1.27- Add support for IGP GART 99 * 1.27- Add support for IGP GART
100 * 1.28- Add support for VBL on CRTC2 100 * 1.28- Add support for VBL on CRTC2
101 * 1.29- R500 3D cmd buffer support
101 */ 102 */
102#define DRIVER_MAJOR 1 103#define DRIVER_MAJOR 1
103#define DRIVER_MINOR 28 104#define DRIVER_MINOR 29
104#define DRIVER_PATCHLEVEL 0 105#define DRIVER_PATCHLEVEL 0
105 106
106/* 107/*
@@ -122,7 +123,7 @@ enum radeon_family {
122 CHIP_RV380, 123 CHIP_RV380,
123 CHIP_R420, 124 CHIP_R420,
124 CHIP_RV410, 125 CHIP_RV410,
125 CHIP_RS400, 126 CHIP_RS480,
126 CHIP_RS690, 127 CHIP_RS690,
127 CHIP_RV515, 128 CHIP_RV515,
128 CHIP_R520, 129 CHIP_R520,
@@ -294,6 +295,7 @@ typedef struct drm_radeon_private {
294 int vblank_crtc; 295 int vblank_crtc;
295 uint32_t irq_enable_reg; 296 uint32_t irq_enable_reg;
296 int irq_enabled; 297 int irq_enabled;
298 uint32_t r500_disp_irq_reg;
297 299
298 struct radeon_surface surfaces[RADEON_MAX_SURFACES]; 300 struct radeon_surface surfaces[RADEON_MAX_SURFACES];
299 struct radeon_virt_surface virt_surfaces[2 * RADEON_MAX_SURFACES]; 301 struct radeon_virt_surface virt_surfaces[2 * RADEON_MAX_SURFACES];
@@ -307,6 +309,8 @@ typedef struct drm_radeon_private {
307 /* starting from here on, data is preserved accross an open */ 309 /* starting from here on, data is preserved accross an open */
308 uint32_t flags; /* see radeon_chip_flags */ 310 uint32_t flags; /* see radeon_chip_flags */
309 unsigned long fb_aper_offset; 311 unsigned long fb_aper_offset;
312
313 int num_gb_pipes;
310} drm_radeon_private_t; 314} drm_radeon_private_t;
311 315
312typedef struct drm_radeon_buf_priv { 316typedef struct drm_radeon_buf_priv {
@@ -382,6 +386,7 @@ extern irqreturn_t radeon_driver_irq_handler(DRM_IRQ_ARGS);
382extern void radeon_driver_irq_preinstall(struct drm_device * dev); 386extern void radeon_driver_irq_preinstall(struct drm_device * dev);
383extern void radeon_driver_irq_postinstall(struct drm_device * dev); 387extern void radeon_driver_irq_postinstall(struct drm_device * dev);
384extern void radeon_driver_irq_uninstall(struct drm_device * dev); 388extern void radeon_driver_irq_uninstall(struct drm_device * dev);
389extern void radeon_enable_interrupt(struct drm_device *dev);
385extern int radeon_vblank_crtc_get(struct drm_device *dev); 390extern int radeon_vblank_crtc_get(struct drm_device *dev);
386extern int radeon_vblank_crtc_set(struct drm_device *dev, int64_t value); 391extern int radeon_vblank_crtc_set(struct drm_device *dev, int64_t value);
387 392
@@ -444,13 +449,13 @@ extern int r300_do_cp_cmdbuf(struct drm_device * dev,
444#define RADEON_PCIE_DATA 0x0034 449#define RADEON_PCIE_DATA 0x0034
445#define RADEON_PCIE_TX_GART_CNTL 0x10 450#define RADEON_PCIE_TX_GART_CNTL 0x10
446# define RADEON_PCIE_TX_GART_EN (1 << 0) 451# define RADEON_PCIE_TX_GART_EN (1 << 0)
447# define RADEON_PCIE_TX_GART_UNMAPPED_ACCESS_PASS_THRU (0<<1) 452# define RADEON_PCIE_TX_GART_UNMAPPED_ACCESS_PASS_THRU (0 << 1)
448# define RADEON_PCIE_TX_GART_UNMAPPED_ACCESS_CLAMP_LO (1<<1) 453# define RADEON_PCIE_TX_GART_UNMAPPED_ACCESS_CLAMP_LO (1 << 1)
449# define RADEON_PCIE_TX_GART_UNMAPPED_ACCESS_DISCARD (3<<1) 454# define RADEON_PCIE_TX_GART_UNMAPPED_ACCESS_DISCARD (3 << 1)
450# define RADEON_PCIE_TX_GART_MODE_32_128_CACHE (0<<3) 455# define RADEON_PCIE_TX_GART_MODE_32_128_CACHE (0 << 3)
451# define RADEON_PCIE_TX_GART_MODE_8_4_128_CACHE (1<<3) 456# define RADEON_PCIE_TX_GART_MODE_8_4_128_CACHE (1 << 3)
452# define RADEON_PCIE_TX_GART_CHK_RW_VALID_EN (1<<5) 457# define RADEON_PCIE_TX_GART_CHK_RW_VALID_EN (1 << 5)
453# define RADEON_PCIE_TX_GART_INVALIDATE_TLB (1<<8) 458# define RADEON_PCIE_TX_GART_INVALIDATE_TLB (1 << 8)
454#define RADEON_PCIE_TX_DISCARD_RD_ADDR_LO 0x11 459#define RADEON_PCIE_TX_DISCARD_RD_ADDR_LO 0x11
455#define RADEON_PCIE_TX_DISCARD_RD_ADDR_HI 0x12 460#define RADEON_PCIE_TX_DISCARD_RD_ADDR_HI 0x12
456#define RADEON_PCIE_TX_GART_BASE 0x13 461#define RADEON_PCIE_TX_GART_BASE 0x13
@@ -459,14 +464,9 @@ extern int r300_do_cp_cmdbuf(struct drm_device * dev,
459#define RADEON_PCIE_TX_GART_END_LO 0x16 464#define RADEON_PCIE_TX_GART_END_LO 0x16
460#define RADEON_PCIE_TX_GART_END_HI 0x17 465#define RADEON_PCIE_TX_GART_END_HI 0x17
461 466
462#define RADEON_IGPGART_INDEX 0x168 467#define RS480_NB_MC_INDEX 0x168
463#define RADEON_IGPGART_DATA 0x16c 468# define RS480_NB_MC_IND_WR_EN (1 << 8)
464#define RADEON_IGPGART_UNK_18 0x18 469#define RS480_NB_MC_DATA 0x16c
465#define RADEON_IGPGART_CTRL 0x2b
466#define RADEON_IGPGART_BASE_ADDR 0x2c
467#define RADEON_IGPGART_FLUSH 0x2e
468#define RADEON_IGPGART_ENABLE 0x38
469#define RADEON_IGPGART_UNK_39 0x39
470 470
471#define RS690_MC_INDEX 0x78 471#define RS690_MC_INDEX 0x78
472# define RS690_MC_INDEX_MASK 0x1ff 472# define RS690_MC_INDEX_MASK 0x1ff
@@ -474,45 +474,91 @@ extern int r300_do_cp_cmdbuf(struct drm_device * dev,
474# define RS690_MC_INDEX_WR_ACK 0x7f 474# define RS690_MC_INDEX_WR_ACK 0x7f
475#define RS690_MC_DATA 0x7c 475#define RS690_MC_DATA 0x7c
476 476
477#define RS690_MC_MISC_CNTL 0x18 477/* MC indirect registers */
478#define RS690_MC_GART_FEATURE_ID 0x2b 478#define RS480_MC_MISC_CNTL 0x18
479#define RS690_MC_GART_BASE 0x2c 479# define RS480_DISABLE_GTW (1 << 1)
480#define RS690_MC_GART_CACHE_CNTL 0x2e 480/* switch between MCIND GART and MM GART registers. 0 = mmgart, 1 = mcind gart */
481# define RS690_MC_GART_CC_NO_CHANGE 0x0 481# define RS480_GART_INDEX_REG_EN (1 << 12)
482# define RS690_MC_GART_CC_CLEAR 0x1 482# define RS690_BLOCK_GFX_D3_EN (1 << 14)
483# define RS690_MC_GART_CLEAR_STATUS (1 << 1) 483#define RS480_K8_FB_LOCATION 0x1e
484# define RS690_MC_GART_CLEAR_DONE (0 << 1) 484#define RS480_GART_FEATURE_ID 0x2b
485# define RS690_MC_GART_CLEAR_PENDING (1 << 1) 485# define RS480_HANG_EN (1 << 11)
486#define RS690_MC_AGP_SIZE 0x38 486# define RS480_TLB_ENABLE (1 << 18)
487# define RS690_MC_GART_DIS 0x0 487# define RS480_P2P_ENABLE (1 << 19)
488# define RS690_MC_GART_EN 0x1 488# define RS480_GTW_LAC_EN (1 << 25)
489# define RS690_MC_AGP_SIZE_32MB (0 << 1) 489# define RS480_2LEVEL_GART (0 << 30)
490# define RS690_MC_AGP_SIZE_64MB (1 << 1) 490# define RS480_1LEVEL_GART (1 << 30)
491# define RS690_MC_AGP_SIZE_128MB (2 << 1) 491# define RS480_PDC_EN (1 << 31)
492# define RS690_MC_AGP_SIZE_256MB (3 << 1) 492#define RS480_GART_BASE 0x2c
493# define RS690_MC_AGP_SIZE_512MB (4 << 1) 493#define RS480_GART_CACHE_CNTRL 0x2e
494# define RS690_MC_AGP_SIZE_1GB (5 << 1) 494# define RS480_GART_CACHE_INVALIDATE (1 << 0) /* wait for it to clear */
495# define RS690_MC_AGP_SIZE_2GB (6 << 1) 495#define RS480_AGP_ADDRESS_SPACE_SIZE 0x38
496#define RS690_MC_AGP_MODE_CONTROL 0x39 496# define RS480_GART_EN (1 << 0)
497# define RS480_VA_SIZE_32MB (0 << 1)
498# define RS480_VA_SIZE_64MB (1 << 1)
499# define RS480_VA_SIZE_128MB (2 << 1)
500# define RS480_VA_SIZE_256MB (3 << 1)
501# define RS480_VA_SIZE_512MB (4 << 1)
502# define RS480_VA_SIZE_1GB (5 << 1)
503# define RS480_VA_SIZE_2GB (6 << 1)
504#define RS480_AGP_MODE_CNTL 0x39
505# define RS480_POST_GART_Q_SIZE (1 << 18)
506# define RS480_NONGART_SNOOP (1 << 19)
507# define RS480_AGP_RD_BUF_SIZE (1 << 20)
508# define RS480_REQ_TYPE_SNOOP_SHIFT 22
509# define RS480_REQ_TYPE_SNOOP_MASK 0x3
510# define RS480_REQ_TYPE_SNOOP_DIS (1 << 24)
511#define RS480_MC_MISC_UMA_CNTL 0x5f
512#define RS480_MC_MCLK_CNTL 0x7a
513#define RS480_MC_UMA_DUALCH_CNTL 0x86
514
497#define RS690_MC_FB_LOCATION 0x100 515#define RS690_MC_FB_LOCATION 0x100
498#define RS690_MC_AGP_LOCATION 0x101 516#define RS690_MC_AGP_LOCATION 0x101
499#define RS690_MC_AGP_BASE 0x102 517#define RS690_MC_AGP_BASE 0x102
518#define RS690_MC_AGP_BASE_2 0x103
500 519
501#define R520_MC_IND_INDEX 0x70 520#define R520_MC_IND_INDEX 0x70
502#define R520_MC_IND_WR_EN (1<<24) 521#define R520_MC_IND_WR_EN (1 << 24)
503#define R520_MC_IND_DATA 0x74 522#define R520_MC_IND_DATA 0x74
504 523
505#define RV515_MC_FB_LOCATION 0x01 524#define RV515_MC_FB_LOCATION 0x01
506#define RV515_MC_AGP_LOCATION 0x02 525#define RV515_MC_AGP_LOCATION 0x02
526#define RV515_MC_AGP_BASE 0x03
527#define RV515_MC_AGP_BASE_2 0x04
507 528
508#define R520_MC_FB_LOCATION 0x04 529#define R520_MC_FB_LOCATION 0x04
509#define R520_MC_AGP_LOCATION 0x05 530#define R520_MC_AGP_LOCATION 0x05
531#define R520_MC_AGP_BASE 0x06
532#define R520_MC_AGP_BASE_2 0x07
510 533
511#define RADEON_MPP_TB_CONFIG 0x01c0 534#define RADEON_MPP_TB_CONFIG 0x01c0
512#define RADEON_MEM_CNTL 0x0140 535#define RADEON_MEM_CNTL 0x0140
513#define RADEON_MEM_SDRAM_MODE_REG 0x0158 536#define RADEON_MEM_SDRAM_MODE_REG 0x0158
537#define RADEON_AGP_BASE_2 0x015c /* r200+ only */
538#define RS480_AGP_BASE_2 0x0164
514#define RADEON_AGP_BASE 0x0170 539#define RADEON_AGP_BASE 0x0170
515 540
541/* pipe config regs */
542#define R400_GB_PIPE_SELECT 0x402c
543#define R500_DYN_SCLK_PWMEM_PIPE 0x000d /* PLL */
544#define R500_SU_REG_DEST 0x42c8
545#define R300_GB_TILE_CONFIG 0x4018
546# define R300_ENABLE_TILING (1 << 0)
547# define R300_PIPE_COUNT_RV350 (0 << 1)
548# define R300_PIPE_COUNT_R300 (3 << 1)
549# define R300_PIPE_COUNT_R420_3P (6 << 1)
550# define R300_PIPE_COUNT_R420 (7 << 1)
551# define R300_TILE_SIZE_8 (0 << 4)
552# define R300_TILE_SIZE_16 (1 << 4)
553# define R300_TILE_SIZE_32 (2 << 4)
554# define R300_SUBPIXEL_1_12 (0 << 16)
555# define R300_SUBPIXEL_1_16 (1 << 16)
556#define R300_DST_PIPE_CONFIG 0x170c
557# define R300_PIPE_AUTO_CONFIG (1 << 31)
558#define R300_RB2D_DSTCACHE_MODE 0x3428
559# define R300_DC_AUTOFLUSH_ENABLE (1 << 8)
560# define R300_DC_DC_DISABLE_IGNORE_PE (1 << 17)
561
516#define RADEON_RB3D_COLOROFFSET 0x1c40 562#define RADEON_RB3D_COLOROFFSET 0x1c40
517#define RADEON_RB3D_COLORPITCH 0x1c48 563#define RADEON_RB3D_COLORPITCH 0x1c48
518 564
@@ -616,11 +662,12 @@ extern int r300_do_cp_cmdbuf(struct drm_device * dev,
616#define RADEON_PP_TXFILTER_1 0x1c6c 662#define RADEON_PP_TXFILTER_1 0x1c6c
617#define RADEON_PP_TXFILTER_2 0x1c84 663#define RADEON_PP_TXFILTER_2 0x1c84
618 664
619#define RADEON_RB2D_DSTCACHE_CTLSTAT 0x342c 665#define R300_RB2D_DSTCACHE_CTLSTAT 0x342c /* use R300_DSTCACHE_CTLSTAT */
620# define RADEON_RB2D_DC_FLUSH (3 << 0) 666#define R300_DSTCACHE_CTLSTAT 0x1714
621# define RADEON_RB2D_DC_FREE (3 << 2) 667# define R300_RB2D_DC_FLUSH (3 << 0)
622# define RADEON_RB2D_DC_FLUSH_ALL 0xf 668# define R300_RB2D_DC_FREE (3 << 2)
623# define RADEON_RB2D_DC_BUSY (1 << 31) 669# define R300_RB2D_DC_FLUSH_ALL 0xf
670# define R300_RB2D_DC_BUSY (1 << 31)
624#define RADEON_RB3D_CNTL 0x1c3c 671#define RADEON_RB3D_CNTL 0x1c3c
625# define RADEON_ALPHA_BLEND_ENABLE (1 << 0) 672# define RADEON_ALPHA_BLEND_ENABLE (1 << 0)
626# define RADEON_PLANE_MASK_ENABLE (1 << 1) 673# define RADEON_PLANE_MASK_ENABLE (1 << 1)
@@ -643,11 +690,18 @@ extern int r300_do_cp_cmdbuf(struct drm_device * dev,
643# define RADEON_RB3D_ZC_FREE (1 << 2) 690# define RADEON_RB3D_ZC_FREE (1 << 2)
644# define RADEON_RB3D_ZC_FLUSH_ALL 0x5 691# define RADEON_RB3D_ZC_FLUSH_ALL 0x5
645# define RADEON_RB3D_ZC_BUSY (1 << 31) 692# define RADEON_RB3D_ZC_BUSY (1 << 31)
693#define R300_ZB_ZCACHE_CTLSTAT 0x4f18
694# define R300_ZC_FLUSH (1 << 0)
695# define R300_ZC_FREE (1 << 1)
696# define R300_ZC_FLUSH_ALL 0x3
697# define R300_ZC_BUSY (1 << 31)
646#define RADEON_RB3D_DSTCACHE_CTLSTAT 0x325c 698#define RADEON_RB3D_DSTCACHE_CTLSTAT 0x325c
647# define RADEON_RB3D_DC_FLUSH (3 << 0) 699# define RADEON_RB3D_DC_FLUSH (3 << 0)
648# define RADEON_RB3D_DC_FREE (3 << 2) 700# define RADEON_RB3D_DC_FREE (3 << 2)
649# define RADEON_RB3D_DC_FLUSH_ALL 0xf 701# define RADEON_RB3D_DC_FLUSH_ALL 0xf
650# define RADEON_RB3D_DC_BUSY (1 << 31) 702# define RADEON_RB3D_DC_BUSY (1 << 31)
703#define R300_RB3D_DSTCACHE_CTLSTAT 0x4e4c
704# define R300_RB3D_DC_FINISH (1 << 4)
651#define RADEON_RB3D_ZSTENCILCNTL 0x1c2c 705#define RADEON_RB3D_ZSTENCILCNTL 0x1c2c
652# define RADEON_Z_TEST_MASK (7 << 4) 706# define RADEON_Z_TEST_MASK (7 << 4)
653# define RADEON_Z_TEST_ALWAYS (7 << 4) 707# define RADEON_Z_TEST_ALWAYS (7 << 4)
@@ -1057,6 +1111,31 @@ extern int r300_do_cp_cmdbuf(struct drm_device * dev,
1057 1111
1058#define R200_VAP_PVS_CNTL_1 0x22D0 1112#define R200_VAP_PVS_CNTL_1 0x22D0
1059 1113
1114#define R500_D1CRTC_STATUS 0x609c
1115#define R500_D2CRTC_STATUS 0x689c
1116#define R500_CRTC_V_BLANK (1<<0)
1117
1118#define R500_D1CRTC_FRAME_COUNT 0x60a4
1119#define R500_D2CRTC_FRAME_COUNT 0x68a4
1120
1121#define R500_D1MODE_V_COUNTER 0x6530
1122#define R500_D2MODE_V_COUNTER 0x6d30
1123
1124#define R500_D1MODE_VBLANK_STATUS 0x6534
1125#define R500_D2MODE_VBLANK_STATUS 0x6d34
1126#define R500_VBLANK_OCCURED (1<<0)
1127#define R500_VBLANK_ACK (1<<4)
1128#define R500_VBLANK_STAT (1<<12)
1129#define R500_VBLANK_INT (1<<16)
1130
1131#define R500_DxMODE_INT_MASK 0x6540
1132#define R500_D1MODE_INT_MASK (1<<0)
1133#define R500_D2MODE_INT_MASK (1<<8)
1134
1135#define R500_DISP_INTERRUPT_STATUS 0x7edc
1136#define R500_D1_VBLANK_INTERRUPT (1 << 4)
1137#define R500_D2_VBLANK_INTERRUPT (1 << 5)
1138
1060/* Constants */ 1139/* Constants */
1061#define RADEON_MAX_USEC_TIMEOUT 100000 /* 100 ms */ 1140#define RADEON_MAX_USEC_TIMEOUT 100000 /* 100 ms */
1062 1141
@@ -1078,42 +1157,50 @@ extern int r300_do_cp_cmdbuf(struct drm_device * dev,
1078#define RADEON_READ8(reg) DRM_READ8( dev_priv->mmio, (reg) ) 1157#define RADEON_READ8(reg) DRM_READ8( dev_priv->mmio, (reg) )
1079#define RADEON_WRITE8(reg,val) DRM_WRITE8( dev_priv->mmio, (reg), (val) ) 1158#define RADEON_WRITE8(reg,val) DRM_WRITE8( dev_priv->mmio, (reg), (val) )
1080 1159
1081#define RADEON_WRITE_PLL( addr, val ) \ 1160#define RADEON_WRITE_PLL(addr, val) \
1082do { \ 1161do { \
1083 RADEON_WRITE8( RADEON_CLOCK_CNTL_INDEX, \ 1162 RADEON_WRITE8(RADEON_CLOCK_CNTL_INDEX, \
1084 ((addr) & 0x1f) | RADEON_PLL_WR_EN ); \ 1163 ((addr) & 0x1f) | RADEON_PLL_WR_EN ); \
1085 RADEON_WRITE( RADEON_CLOCK_CNTL_DATA, (val) ); \ 1164 RADEON_WRITE(RADEON_CLOCK_CNTL_DATA, (val)); \
1086} while (0) 1165} while (0)
1087 1166
1088#define RADEON_WRITE_IGPGART( addr, val ) \ 1167#define RADEON_WRITE_PCIE(addr, val) \
1089do { \ 1168do { \
1090 RADEON_WRITE( RADEON_IGPGART_INDEX, \ 1169 RADEON_WRITE8(RADEON_PCIE_INDEX, \
1091 ((addr) & 0x7f) | (1 << 8)); \ 1170 ((addr) & 0xff)); \
1092 RADEON_WRITE( RADEON_IGPGART_DATA, (val) ); \ 1171 RADEON_WRITE(RADEON_PCIE_DATA, (val)); \
1093 RADEON_WRITE( RADEON_IGPGART_INDEX, 0x7f ); \
1094} while (0) 1172} while (0)
1095 1173
1096#define RADEON_WRITE_PCIE( addr, val ) \ 1174#define R500_WRITE_MCIND(addr, val) \
1097do { \ 1175do { \
1098 RADEON_WRITE8( RADEON_PCIE_INDEX, \ 1176 RADEON_WRITE(R520_MC_IND_INDEX, 0xff0000 | ((addr) & 0xff)); \
1099 ((addr) & 0xff)); \ 1177 RADEON_WRITE(R520_MC_IND_DATA, (val)); \
1100 RADEON_WRITE( RADEON_PCIE_DATA, (val) ); \ 1178 RADEON_WRITE(R520_MC_IND_INDEX, 0); \
1101} while (0) 1179} while (0)
1102 1180
1103#define RADEON_WRITE_MCIND( addr, val ) \ 1181#define RS480_WRITE_MCIND(addr, val) \
1104 do { \ 1182do { \
1105 RADEON_WRITE(R520_MC_IND_INDEX, 0xff0000 | ((addr) & 0xff)); \ 1183 RADEON_WRITE(RS480_NB_MC_INDEX, \
1106 RADEON_WRITE(R520_MC_IND_DATA, (val)); \ 1184 ((addr) & 0xff) | RS480_NB_MC_IND_WR_EN); \
1107 RADEON_WRITE(R520_MC_IND_INDEX, 0); \ 1185 RADEON_WRITE(RS480_NB_MC_DATA, (val)); \
1108 } while (0) 1186 RADEON_WRITE(RS480_NB_MC_INDEX, 0xff); \
1187} while (0)
1109 1188
1110#define RS690_WRITE_MCIND( addr, val ) \ 1189#define RS690_WRITE_MCIND(addr, val) \
1111do { \ 1190do { \
1112 RADEON_WRITE(RS690_MC_INDEX, RS690_MC_INDEX_WR_EN | ((addr) & RS690_MC_INDEX_MASK)); \ 1191 RADEON_WRITE(RS690_MC_INDEX, RS690_MC_INDEX_WR_EN | ((addr) & RS690_MC_INDEX_MASK)); \
1113 RADEON_WRITE(RS690_MC_DATA, val); \ 1192 RADEON_WRITE(RS690_MC_DATA, val); \
1114 RADEON_WRITE(RS690_MC_INDEX, RS690_MC_INDEX_WR_ACK); \ 1193 RADEON_WRITE(RS690_MC_INDEX, RS690_MC_INDEX_WR_ACK); \
1115} while (0) 1194} while (0)
1116 1195
1196#define IGP_WRITE_MCIND(addr, val) \
1197do { \
1198 if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS690) \
1199 RS690_WRITE_MCIND(addr, val); \
1200 else \
1201 RS480_WRITE_MCIND(addr, val); \
1202} while (0)
1203
1117#define CP_PACKET0( reg, n ) \ 1204#define CP_PACKET0( reg, n ) \
1118 (RADEON_CP_PACKET0 | ((n) << 16) | ((reg) >> 2)) 1205 (RADEON_CP_PACKET0 | ((n) << 16) | ((reg) >> 2))
1119#define CP_PACKET0_TABLE( reg, n ) \ 1206#define CP_PACKET0_TABLE( reg, n ) \
@@ -1154,23 +1241,43 @@ do { \
1154} while (0) 1241} while (0)
1155 1242
1156#define RADEON_FLUSH_CACHE() do { \ 1243#define RADEON_FLUSH_CACHE() do { \
1157 OUT_RING( CP_PACKET0( RADEON_RB3D_DSTCACHE_CTLSTAT, 0 ) ); \ 1244 if ((dev_priv->flags & RADEON_FAMILY_MASK) <= CHIP_RV280) { \
1158 OUT_RING( RADEON_RB3D_DC_FLUSH ); \ 1245 OUT_RING(CP_PACKET0(RADEON_RB3D_DSTCACHE_CTLSTAT, 0)); \
1246 OUT_RING(RADEON_RB3D_DC_FLUSH); \
1247 } else { \
1248 OUT_RING(CP_PACKET0(R300_RB3D_DSTCACHE_CTLSTAT, 0)); \
1249 OUT_RING(RADEON_RB3D_DC_FLUSH); \
1250 } \
1159} while (0) 1251} while (0)
1160 1252
1161#define RADEON_PURGE_CACHE() do { \ 1253#define RADEON_PURGE_CACHE() do { \
1162 OUT_RING( CP_PACKET0( RADEON_RB3D_DSTCACHE_CTLSTAT, 0 ) ); \ 1254 if ((dev_priv->flags & RADEON_FAMILY_MASK) <= CHIP_RV280) { \
1163 OUT_RING( RADEON_RB3D_DC_FLUSH_ALL ); \ 1255 OUT_RING(CP_PACKET0(RADEON_RB3D_DSTCACHE_CTLSTAT, 0)); \
1256 OUT_RING(RADEON_RB3D_DC_FLUSH_ALL); \
1257 } else { \
1258 OUT_RING(CP_PACKET0(R300_RB3D_DSTCACHE_CTLSTAT, 0)); \
1259 OUT_RING(RADEON_RB3D_DC_FLUSH_ALL); \
1260 } \
1164} while (0) 1261} while (0)
1165 1262
1166#define RADEON_FLUSH_ZCACHE() do { \ 1263#define RADEON_FLUSH_ZCACHE() do { \
1167 OUT_RING( CP_PACKET0( RADEON_RB3D_ZCACHE_CTLSTAT, 0 ) ); \ 1264 if ((dev_priv->flags & RADEON_FAMILY_MASK) <= CHIP_RV280) { \
1168 OUT_RING( RADEON_RB3D_ZC_FLUSH ); \ 1265 OUT_RING(CP_PACKET0(RADEON_RB3D_ZCACHE_CTLSTAT, 0)); \
1266 OUT_RING(RADEON_RB3D_ZC_FLUSH); \
1267 } else { \
1268 OUT_RING(CP_PACKET0(R300_ZB_ZCACHE_CTLSTAT, 0)); \
1269 OUT_RING(R300_ZC_FLUSH); \
1270 } \
1169} while (0) 1271} while (0)
1170 1272
1171#define RADEON_PURGE_ZCACHE() do { \ 1273#define RADEON_PURGE_ZCACHE() do { \
1172 OUT_RING( CP_PACKET0( RADEON_RB3D_ZCACHE_CTLSTAT, 0 ) ); \ 1274 if ((dev_priv->flags & RADEON_FAMILY_MASK) <= CHIP_RV280) { \
1173 OUT_RING( RADEON_RB3D_ZC_FLUSH_ALL ); \ 1275 OUT_RING(CP_PACKET0(RADEON_RB3D_ZCACHE_CTLSTAT, 0)); \
1276 OUT_RING(RADEON_RB3D_ZC_FLUSH_ALL); \
1277 } else { \
1278 OUT_RING(CP_PACKET0(R300_RB3D_DSTCACHE_CTLSTAT, 0)); \
1279 OUT_RING(R300_ZC_FLUSH_ALL); \
1280 } \
1174} while (0) 1281} while (0)
1175 1282
1176/* ================================================================ 1283/* ================================================================
diff --git a/drivers/char/drm/radeon_irq.c b/drivers/char/drm/radeon_irq.c
index 009af3814b6f..ee40d197deb7 100644
--- a/drivers/char/drm/radeon_irq.c
+++ b/drivers/char/drm/radeon_irq.c
@@ -234,7 +234,7 @@ int radeon_irq_wait(struct drm_device *dev, void *data, struct drm_file *file_pr
234 return radeon_wait_irq(dev, irqwait->irq_seq); 234 return radeon_wait_irq(dev, irqwait->irq_seq);
235} 235}
236 236
237static void radeon_enable_interrupt(struct drm_device *dev) 237void radeon_enable_interrupt(struct drm_device *dev)
238{ 238{
239 drm_radeon_private_t *dev_priv = (drm_radeon_private_t *) dev->dev_private; 239 drm_radeon_private_t *dev_priv = (drm_radeon_private_t *) dev->dev_private;
240 240
diff --git a/drivers/char/drm/radeon_microcode.h b/drivers/char/drm/radeon_microcode.h
new file mode 100644
index 000000000000..a348c9e7db1c
--- /dev/null
+++ b/drivers/char/drm/radeon_microcode.h
@@ -0,0 +1,1844 @@
1/*
2 * Copyright 2007 Advanced Micro Devices, Inc.
3 * All Rights Reserved.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice (including the next
13 * paragraph) shall be included in all copies or substantial portions of the
14 * Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
20 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 *
24 */
25
26#ifndef RADEON_MICROCODE_H
27#define RADEON_MICROCODE_H
28
29/* production radeon ucode r1xx-r6xx */
30static const u32 R100_cp_microcode[][2] = {
31 { 0x21007000, 0000000000 },
32 { 0x20007000, 0000000000 },
33 { 0x000000b4, 0x00000004 },
34 { 0x000000b8, 0x00000004 },
35 { 0x6f5b4d4c, 0000000000 },
36 { 0x4c4c427f, 0000000000 },
37 { 0x5b568a92, 0000000000 },
38 { 0x4ca09c6d, 0000000000 },
39 { 0xad4c4c4c, 0000000000 },
40 { 0x4ce1af3d, 0000000000 },
41 { 0xd8afafaf, 0000000000 },
42 { 0xd64c4cdc, 0000000000 },
43 { 0x4cd10d10, 0000000000 },
44 { 0x000f0000, 0x00000016 },
45 { 0x362f242d, 0000000000 },
46 { 0x00000012, 0x00000004 },
47 { 0x000f0000, 0x00000016 },
48 { 0x362f282d, 0000000000 },
49 { 0x000380e7, 0x00000002 },
50 { 0x04002c97, 0x00000002 },
51 { 0x000f0001, 0x00000016 },
52 { 0x333a3730, 0000000000 },
53 { 0x000077ef, 0x00000002 },
54 { 0x00061000, 0x00000002 },
55 { 0x00000021, 0x0000001a },
56 { 0x00004000, 0x0000001e },
57 { 0x00061000, 0x00000002 },
58 { 0x00000021, 0x0000001a },
59 { 0x00004000, 0x0000001e },
60 { 0x00061000, 0x00000002 },
61 { 0x00000021, 0x0000001a },
62 { 0x00004000, 0x0000001e },
63 { 0x00000017, 0x00000004 },
64 { 0x0003802b, 0x00000002 },
65 { 0x040067e0, 0x00000002 },
66 { 0x00000017, 0x00000004 },
67 { 0x000077e0, 0x00000002 },
68 { 0x00065000, 0x00000002 },
69 { 0x000037e1, 0x00000002 },
70 { 0x040067e1, 0x00000006 },
71 { 0x000077e0, 0x00000002 },
72 { 0x000077e1, 0x00000002 },
73 { 0x000077e1, 0x00000006 },
74 { 0xffffffff, 0000000000 },
75 { 0x10000000, 0000000000 },
76 { 0x0003802b, 0x00000002 },
77 { 0x040067e0, 0x00000006 },
78 { 0x00007675, 0x00000002 },
79 { 0x00007676, 0x00000002 },
80 { 0x00007677, 0x00000002 },
81 { 0x00007678, 0x00000006 },
82 { 0x0003802c, 0x00000002 },
83 { 0x04002676, 0x00000002 },
84 { 0x00007677, 0x00000002 },
85 { 0x00007678, 0x00000006 },
86 { 0x0000002f, 0x00000018 },
87 { 0x0000002f, 0x00000018 },
88 { 0000000000, 0x00000006 },
89 { 0x00000030, 0x00000018 },
90 { 0x00000030, 0x00000018 },
91 { 0000000000, 0x00000006 },
92 { 0x01605000, 0x00000002 },
93 { 0x00065000, 0x00000002 },
94 { 0x00098000, 0x00000002 },
95 { 0x00061000, 0x00000002 },
96 { 0x64c0603e, 0x00000004 },
97 { 0x000380e6, 0x00000002 },
98 { 0x040025c5, 0x00000002 },
99 { 0x00080000, 0x00000016 },
100 { 0000000000, 0000000000 },
101 { 0x0400251d, 0x00000002 },
102 { 0x00007580, 0x00000002 },
103 { 0x00067581, 0x00000002 },
104 { 0x04002580, 0x00000002 },
105 { 0x00067581, 0x00000002 },
106 { 0x00000049, 0x00000004 },
107 { 0x00005000, 0000000000 },
108 { 0x000380e6, 0x00000002 },
109 { 0x040025c5, 0x00000002 },
110 { 0x00061000, 0x00000002 },
111 { 0x0000750e, 0x00000002 },
112 { 0x00019000, 0x00000002 },
113 { 0x00011055, 0x00000014 },
114 { 0x00000055, 0x00000012 },
115 { 0x0400250f, 0x00000002 },
116 { 0x0000504f, 0x00000004 },
117 { 0x000380e6, 0x00000002 },
118 { 0x040025c5, 0x00000002 },
119 { 0x00007565, 0x00000002 },
120 { 0x00007566, 0x00000002 },
121 { 0x00000058, 0x00000004 },
122 { 0x000380e6, 0x00000002 },
123 { 0x040025c5, 0x00000002 },
124 { 0x01e655b4, 0x00000002 },
125 { 0x4401b0e4, 0x00000002 },
126 { 0x01c110e4, 0x00000002 },
127 { 0x26667066, 0x00000018 },
128 { 0x040c2565, 0x00000002 },
129 { 0x00000066, 0x00000018 },
130 { 0x04002564, 0x00000002 },
131 { 0x00007566, 0x00000002 },
132 { 0x0000005d, 0x00000004 },
133 { 0x00401069, 0x00000008 },
134 { 0x00101000, 0x00000002 },
135 { 0x000d80ff, 0x00000002 },
136 { 0x0080006c, 0x00000008 },
137 { 0x000f9000, 0x00000002 },
138 { 0x000e00ff, 0x00000002 },
139 { 0000000000, 0x00000006 },
140 { 0x0000008f, 0x00000018 },
141 { 0x0000005b, 0x00000004 },
142 { 0x000380e6, 0x00000002 },
143 { 0x040025c5, 0x00000002 },
144 { 0x00007576, 0x00000002 },
145 { 0x00065000, 0x00000002 },
146 { 0x00009000, 0x00000002 },
147 { 0x00041000, 0x00000002 },
148 { 0x0c00350e, 0x00000002 },
149 { 0x00049000, 0x00000002 },
150 { 0x00051000, 0x00000002 },
151 { 0x01e785f8, 0x00000002 },
152 { 0x00200000, 0x00000002 },
153 { 0x0060007e, 0x0000000c },
154 { 0x00007563, 0x00000002 },
155 { 0x006075f0, 0x00000021 },
156 { 0x20007073, 0x00000004 },
157 { 0x00005073, 0x00000004 },
158 { 0x000380e6, 0x00000002 },
159 { 0x040025c5, 0x00000002 },
160 { 0x00007576, 0x00000002 },
161 { 0x00007577, 0x00000002 },
162 { 0x0000750e, 0x00000002 },
163 { 0x0000750f, 0x00000002 },
164 { 0x00a05000, 0x00000002 },
165 { 0x00600083, 0x0000000c },
166 { 0x006075f0, 0x00000021 },
167 { 0x000075f8, 0x00000002 },
168 { 0x00000083, 0x00000004 },
169 { 0x000a750e, 0x00000002 },
170 { 0x000380e6, 0x00000002 },
171 { 0x040025c5, 0x00000002 },
172 { 0x0020750f, 0x00000002 },
173 { 0x00600086, 0x00000004 },
174 { 0x00007570, 0x00000002 },
175 { 0x00007571, 0x00000002 },
176 { 0x00007572, 0x00000006 },
177 { 0x000380e6, 0x00000002 },
178 { 0x040025c5, 0x00000002 },
179 { 0x00005000, 0x00000002 },
180 { 0x00a05000, 0x00000002 },
181 { 0x00007568, 0x00000002 },
182 { 0x00061000, 0x00000002 },
183 { 0x00000095, 0x0000000c },
184 { 0x00058000, 0x00000002 },
185 { 0x0c607562, 0x00000002 },
186 { 0x00000097, 0x00000004 },
187 { 0x000380e6, 0x00000002 },
188 { 0x040025c5, 0x00000002 },
189 { 0x00600096, 0x00000004 },
190 { 0x400070e5, 0000000000 },
191 { 0x000380e6, 0x00000002 },
192 { 0x040025c5, 0x00000002 },
193 { 0x000380e5, 0x00000002 },
194 { 0x000000a8, 0x0000001c },
195 { 0x000650aa, 0x00000018 },
196 { 0x040025bb, 0x00000002 },
197 { 0x000610ab, 0x00000018 },
198 { 0x040075bc, 0000000000 },
199 { 0x000075bb, 0x00000002 },
200 { 0x000075bc, 0000000000 },
201 { 0x00090000, 0x00000006 },
202 { 0x00090000, 0x00000002 },
203 { 0x000d8002, 0x00000006 },
204 { 0x00007832, 0x00000002 },
205 { 0x00005000, 0x00000002 },
206 { 0x000380e7, 0x00000002 },
207 { 0x04002c97, 0x00000002 },
208 { 0x00007820, 0x00000002 },
209 { 0x00007821, 0x00000002 },
210 { 0x00007800, 0000000000 },
211 { 0x01200000, 0x00000002 },
212 { 0x20077000, 0x00000002 },
213 { 0x01200000, 0x00000002 },
214 { 0x20007000, 0x00000002 },
215 { 0x00061000, 0x00000002 },
216 { 0x0120751b, 0x00000002 },
217 { 0x8040750a, 0x00000002 },
218 { 0x8040750b, 0x00000002 },
219 { 0x00110000, 0x00000002 },
220 { 0x000380e5, 0x00000002 },
221 { 0x000000c6, 0x0000001c },
222 { 0x000610ab, 0x00000018 },
223 { 0x844075bd, 0x00000002 },
224 { 0x000610aa, 0x00000018 },
225 { 0x840075bb, 0x00000002 },
226 { 0x000610ab, 0x00000018 },
227 { 0x844075bc, 0x00000002 },
228 { 0x000000c9, 0x00000004 },
229 { 0x804075bd, 0x00000002 },
230 { 0x800075bb, 0x00000002 },
231 { 0x804075bc, 0x00000002 },
232 { 0x00108000, 0x00000002 },
233 { 0x01400000, 0x00000002 },
234 { 0x006000cd, 0x0000000c },
235 { 0x20c07000, 0x00000020 },
236 { 0x000000cf, 0x00000012 },
237 { 0x00800000, 0x00000006 },
238 { 0x0080751d, 0x00000006 },
239 { 0000000000, 0000000000 },
240 { 0x0000775c, 0x00000002 },
241 { 0x00a05000, 0x00000002 },
242 { 0x00661000, 0x00000002 },
243 { 0x0460275d, 0x00000020 },
244 { 0x00004000, 0000000000 },
245 { 0x01e00830, 0x00000002 },
246 { 0x21007000, 0000000000 },
247 { 0x6464614d, 0000000000 },
248 { 0x69687420, 0000000000 },
249 { 0x00000073, 0000000000 },
250 { 0000000000, 0000000000 },
251 { 0x00005000, 0x00000002 },
252 { 0x000380d0, 0x00000002 },
253 { 0x040025e0, 0x00000002 },
254 { 0x000075e1, 0000000000 },
255 { 0x00000001, 0000000000 },
256 { 0x000380e0, 0x00000002 },
257 { 0x04002394, 0x00000002 },
258 { 0x00005000, 0000000000 },
259 { 0000000000, 0000000000 },
260 { 0000000000, 0000000000 },
261 { 0x00000008, 0000000000 },
262 { 0x00000004, 0000000000 },
263 { 0000000000, 0000000000 },
264 { 0000000000, 0000000000 },
265 { 0000000000, 0000000000 },
266 { 0000000000, 0000000000 },
267 { 0000000000, 0000000000 },
268 { 0000000000, 0000000000 },
269 { 0000000000, 0000000000 },
270 { 0000000000, 0000000000 },
271 { 0000000000, 0000000000 },
272 { 0000000000, 0000000000 },
273 { 0000000000, 0000000000 },
274 { 0000000000, 0000000000 },
275 { 0000000000, 0000000000 },
276 { 0000000000, 0000000000 },
277 { 0000000000, 0000000000 },
278 { 0000000000, 0000000000 },
279 { 0000000000, 0000000000 },
280 { 0000000000, 0000000000 },
281 { 0000000000, 0000000000 },
282 { 0000000000, 0000000000 },
283 { 0000000000, 0000000000 },
284 { 0000000000, 0000000000 },
285 { 0000000000, 0000000000 },
286 { 0000000000, 0000000000 },
287};
288
289static const u32 R200_cp_microcode[][2] = {
290 { 0x21007000, 0000000000 },
291 { 0x20007000, 0000000000 },
292 { 0x000000bf, 0x00000004 },
293 { 0x000000c3, 0x00000004 },
294 { 0x7a685e5d, 0000000000 },
295 { 0x5d5d5588, 0000000000 },
296 { 0x68659197, 0000000000 },
297 { 0x5da19f78, 0000000000 },
298 { 0x5d5d5d5d, 0000000000 },
299 { 0x5dee5d50, 0000000000 },
300 { 0xf2acacac, 0000000000 },
301 { 0xe75df9e9, 0000000000 },
302 { 0xb1dd0e11, 0000000000 },
303 { 0xe2afafaf, 0000000000 },
304 { 0x000f0000, 0x00000016 },
305 { 0x452f232d, 0000000000 },
306 { 0x00000013, 0x00000004 },
307 { 0x000f0000, 0x00000016 },
308 { 0x452f272d, 0000000000 },
309 { 0x000f0001, 0x00000016 },
310 { 0x3e4d4a37, 0000000000 },
311 { 0x000077ef, 0x00000002 },
312 { 0x00061000, 0x00000002 },
313 { 0x00000020, 0x0000001a },
314 { 0x00004000, 0x0000001e },
315 { 0x00061000, 0x00000002 },
316 { 0x00000020, 0x0000001a },
317 { 0x00004000, 0x0000001e },
318 { 0x00061000, 0x00000002 },
319 { 0x00000020, 0x0000001a },
320 { 0x00004000, 0x0000001e },
321 { 0x00000016, 0x00000004 },
322 { 0x0003802a, 0x00000002 },
323 { 0x040067e0, 0x00000002 },
324 { 0x00000016, 0x00000004 },
325 { 0x000077e0, 0x00000002 },
326 { 0x00065000, 0x00000002 },
327 { 0x000037e1, 0x00000002 },
328 { 0x040067e1, 0x00000006 },
329 { 0x000077e0, 0x00000002 },
330 { 0x000077e1, 0x00000002 },
331 { 0x000077e1, 0x00000006 },
332 { 0xffffffff, 0000000000 },
333 { 0x10000000, 0000000000 },
334 { 0x07f007f0, 0000000000 },
335 { 0x0003802a, 0x00000002 },
336 { 0x040067e0, 0x00000006 },
337 { 0x0003802c, 0x00000002 },
338 { 0x04002741, 0x00000002 },
339 { 0x04002741, 0x00000002 },
340 { 0x04002743, 0x00000002 },
341 { 0x00007675, 0x00000002 },
342 { 0x00007676, 0x00000002 },
343 { 0x00007677, 0x00000002 },
344 { 0x00007678, 0x00000006 },
345 { 0x0003802c, 0x00000002 },
346 { 0x04002741, 0x00000002 },
347 { 0x04002741, 0x00000002 },
348 { 0x04002743, 0x00000002 },
349 { 0x00007676, 0x00000002 },
350 { 0x00007677, 0x00000002 },
351 { 0x00007678, 0x00000006 },
352 { 0x0003802b, 0x00000002 },
353 { 0x04002676, 0x00000002 },
354 { 0x00007677, 0x00000002 },
355 { 0x0003802c, 0x00000002 },
356 { 0x04002741, 0x00000002 },
357 { 0x04002743, 0x00000002 },
358 { 0x00007678, 0x00000006 },
359 { 0x0003802c, 0x00000002 },
360 { 0x04002741, 0x00000002 },
361 { 0x04002741, 0x00000002 },
362 { 0x04002743, 0x00000002 },
363 { 0x00007678, 0x00000006 },
364 { 0x0000002f, 0x00000018 },
365 { 0x0000002f, 0x00000018 },
366 { 0000000000, 0x00000006 },
367 { 0x00000037, 0x00000018 },
368 { 0x00000037, 0x00000018 },
369 { 0000000000, 0x00000006 },
370 { 0x01605000, 0x00000002 },
371 { 0x00065000, 0x00000002 },
372 { 0x00098000, 0x00000002 },
373 { 0x00061000, 0x00000002 },
374 { 0x64c06051, 0x00000004 },
375 { 0x00080000, 0x00000016 },
376 { 0000000000, 0000000000 },
377 { 0x0400251d, 0x00000002 },
378 { 0x00007580, 0x00000002 },
379 { 0x00067581, 0x00000002 },
380 { 0x04002580, 0x00000002 },
381 { 0x00067581, 0x00000002 },
382 { 0x0000005a, 0x00000004 },
383 { 0x00005000, 0000000000 },
384 { 0x00061000, 0x00000002 },
385 { 0x0000750e, 0x00000002 },
386 { 0x00019000, 0x00000002 },
387 { 0x00011064, 0x00000014 },
388 { 0x00000064, 0x00000012 },
389 { 0x0400250f, 0x00000002 },
390 { 0x0000505e, 0x00000004 },
391 { 0x00007565, 0x00000002 },
392 { 0x00007566, 0x00000002 },
393 { 0x00000065, 0x00000004 },
394 { 0x01e655b4, 0x00000002 },
395 { 0x4401b0f0, 0x00000002 },
396 { 0x01c110f0, 0x00000002 },
397 { 0x26667071, 0x00000018 },
398 { 0x040c2565, 0x00000002 },
399 { 0x00000071, 0x00000018 },
400 { 0x04002564, 0x00000002 },
401 { 0x00007566, 0x00000002 },
402 { 0x00000068, 0x00000004 },
403 { 0x00401074, 0x00000008 },
404 { 0x00101000, 0x00000002 },
405 { 0x000d80ff, 0x00000002 },
406 { 0x00800077, 0x00000008 },
407 { 0x000f9000, 0x00000002 },
408 { 0x000e00ff, 0x00000002 },
409 { 0000000000, 0x00000006 },
410 { 0x00000094, 0x00000018 },
411 { 0x00000068, 0x00000004 },
412 { 0x00007576, 0x00000002 },
413 { 0x00065000, 0x00000002 },
414 { 0x00009000, 0x00000002 },
415 { 0x00041000, 0x00000002 },
416 { 0x0c00350e, 0x00000002 },
417 { 0x00049000, 0x00000002 },
418 { 0x00051000, 0x00000002 },
419 { 0x01e785f8, 0x00000002 },
420 { 0x00200000, 0x00000002 },
421 { 0x00600087, 0x0000000c },
422 { 0x00007563, 0x00000002 },
423 { 0x006075f0, 0x00000021 },
424 { 0x2000707c, 0x00000004 },
425 { 0x0000507c, 0x00000004 },
426 { 0x00007576, 0x00000002 },
427 { 0x00007577, 0x00000002 },
428 { 0x0000750e, 0x00000002 },
429 { 0x0000750f, 0x00000002 },
430 { 0x00a05000, 0x00000002 },
431 { 0x0060008a, 0x0000000c },
432 { 0x006075f0, 0x00000021 },
433 { 0x000075f8, 0x00000002 },
434 { 0x0000008a, 0x00000004 },
435 { 0x000a750e, 0x00000002 },
436 { 0x0020750f, 0x00000002 },
437 { 0x0060008d, 0x00000004 },
438 { 0x00007570, 0x00000002 },
439 { 0x00007571, 0x00000002 },
440 { 0x00007572, 0x00000006 },
441 { 0x00005000, 0x00000002 },
442 { 0x00a05000, 0x00000002 },
443 { 0x00007568, 0x00000002 },
444 { 0x00061000, 0x00000002 },
445 { 0x00000098, 0x0000000c },
446 { 0x00058000, 0x00000002 },
447 { 0x0c607562, 0x00000002 },
448 { 0x0000009a, 0x00000004 },
449 { 0x00600099, 0x00000004 },
450 { 0x400070f1, 0000000000 },
451 { 0x000380f1, 0x00000002 },
452 { 0x000000a7, 0x0000001c },
453 { 0x000650a9, 0x00000018 },
454 { 0x040025bb, 0x00000002 },
455 { 0x000610aa, 0x00000018 },
456 { 0x040075bc, 0000000000 },
457 { 0x000075bb, 0x00000002 },
458 { 0x000075bc, 0000000000 },
459 { 0x00090000, 0x00000006 },
460 { 0x00090000, 0x00000002 },
461 { 0x000d8002, 0x00000006 },
462 { 0x00005000, 0x00000002 },
463 { 0x00007821, 0x00000002 },
464 { 0x00007800, 0000000000 },
465 { 0x00007821, 0x00000002 },
466 { 0x00007800, 0000000000 },
467 { 0x01665000, 0x00000002 },
468 { 0x000a0000, 0x00000002 },
469 { 0x000671cc, 0x00000002 },
470 { 0x0286f1cd, 0x00000002 },
471 { 0x000000b7, 0x00000010 },
472 { 0x21007000, 0000000000 },
473 { 0x000000be, 0x0000001c },
474 { 0x00065000, 0x00000002 },
475 { 0x000a0000, 0x00000002 },
476 { 0x00061000, 0x00000002 },
477 { 0x000b0000, 0x00000002 },
478 { 0x38067000, 0x00000002 },
479 { 0x000a00ba, 0x00000004 },
480 { 0x20007000, 0000000000 },
481 { 0x01200000, 0x00000002 },
482 { 0x20077000, 0x00000002 },
483 { 0x01200000, 0x00000002 },
484 { 0x20007000, 0000000000 },
485 { 0x00061000, 0x00000002 },
486 { 0x0120751b, 0x00000002 },
487 { 0x8040750a, 0x00000002 },
488 { 0x8040750b, 0x00000002 },
489 { 0x00110000, 0x00000002 },
490 { 0x000380f1, 0x00000002 },
491 { 0x000000d1, 0x0000001c },
492 { 0x000610aa, 0x00000018 },
493 { 0x844075bd, 0x00000002 },
494 { 0x000610a9, 0x00000018 },
495 { 0x840075bb, 0x00000002 },
496 { 0x000610aa, 0x00000018 },
497 { 0x844075bc, 0x00000002 },
498 { 0x000000d4, 0x00000004 },
499 { 0x804075bd, 0x00000002 },
500 { 0x800075bb, 0x00000002 },
501 { 0x804075bc, 0x00000002 },
502 { 0x00108000, 0x00000002 },
503 { 0x01400000, 0x00000002 },
504 { 0x006000d8, 0x0000000c },
505 { 0x20c07000, 0x00000020 },
506 { 0x000000da, 0x00000012 },
507 { 0x00800000, 0x00000006 },
508 { 0x0080751d, 0x00000006 },
509 { 0x000025bb, 0x00000002 },
510 { 0x000040d4, 0x00000004 },
511 { 0x0000775c, 0x00000002 },
512 { 0x00a05000, 0x00000002 },
513 { 0x00661000, 0x00000002 },
514 { 0x0460275d, 0x00000020 },
515 { 0x00004000, 0000000000 },
516 { 0x00007999, 0x00000002 },
517 { 0x00a05000, 0x00000002 },
518 { 0x00661000, 0x00000002 },
519 { 0x0460299b, 0x00000020 },
520 { 0x00004000, 0000000000 },
521 { 0x01e00830, 0x00000002 },
522 { 0x21007000, 0000000000 },
523 { 0x00005000, 0x00000002 },
524 { 0x00038056, 0x00000002 },
525 { 0x040025e0, 0x00000002 },
526 { 0x000075e1, 0000000000 },
527 { 0x00000001, 0000000000 },
528 { 0x000380ed, 0x00000002 },
529 { 0x04007394, 0000000000 },
530 { 0000000000, 0000000000 },
531 { 0000000000, 0000000000 },
532 { 0x000078c4, 0x00000002 },
533 { 0x000078c5, 0x00000002 },
534 { 0x000078c6, 0x00000002 },
535 { 0x00007924, 0x00000002 },
536 { 0x00007925, 0x00000002 },
537 { 0x00007926, 0x00000002 },
538 { 0x000000f2, 0x00000004 },
539 { 0x00007924, 0x00000002 },
540 { 0x00007925, 0x00000002 },
541 { 0x00007926, 0x00000002 },
542 { 0x000000f9, 0x00000004 },
543 { 0000000000, 0000000000 },
544 { 0000000000, 0000000000 },
545 { 0000000000, 0000000000 },
546};
547
548static const u32 R300_cp_microcode[][2] = {
549 { 0x4200e000, 0000000000 },
550 { 0x4000e000, 0000000000 },
551 { 0x000000ae, 0x00000008 },
552 { 0x000000b2, 0x00000008 },
553 { 0x67554b4a, 0000000000 },
554 { 0x4a4a4475, 0000000000 },
555 { 0x55527d83, 0000000000 },
556 { 0x4a8c8b65, 0000000000 },
557 { 0x4aef4af6, 0000000000 },
558 { 0x4ae14a4a, 0000000000 },
559 { 0xe4979797, 0000000000 },
560 { 0xdb4aebdd, 0000000000 },
561 { 0x9ccc4a4a, 0000000000 },
562 { 0xd1989898, 0000000000 },
563 { 0x4a0f9ad6, 0000000000 },
564 { 0x000ca000, 0x00000004 },
565 { 0x000d0012, 0x00000038 },
566 { 0x0000e8b4, 0x00000004 },
567 { 0x000d0014, 0x00000038 },
568 { 0x0000e8b6, 0x00000004 },
569 { 0x000d0016, 0x00000038 },
570 { 0x0000e854, 0x00000004 },
571 { 0x000d0018, 0x00000038 },
572 { 0x0000e855, 0x00000004 },
573 { 0x000d001a, 0x00000038 },
574 { 0x0000e856, 0x00000004 },
575 { 0x000d001c, 0x00000038 },
576 { 0x0000e857, 0x00000004 },
577 { 0x000d001e, 0x00000038 },
578 { 0x0000e824, 0x00000004 },
579 { 0x000d0020, 0x00000038 },
580 { 0x0000e825, 0x00000004 },
581 { 0x000d0022, 0x00000038 },
582 { 0x0000e830, 0x00000004 },
583 { 0x000d0024, 0x00000038 },
584 { 0x0000f0c0, 0x00000004 },
585 { 0x000d0026, 0x00000038 },
586 { 0x0000f0c1, 0x00000004 },
587 { 0x000d0028, 0x00000038 },
588 { 0x0000f041, 0x00000004 },
589 { 0x000d002a, 0x00000038 },
590 { 0x0000f184, 0x00000004 },
591 { 0x000d002c, 0x00000038 },
592 { 0x0000f185, 0x00000004 },
593 { 0x000d002e, 0x00000038 },
594 { 0x0000f186, 0x00000004 },
595 { 0x000d0030, 0x00000038 },
596 { 0x0000f187, 0x00000004 },
597 { 0x000d0032, 0x00000038 },
598 { 0x0000f180, 0x00000004 },
599 { 0x000d0034, 0x00000038 },
600 { 0x0000f393, 0x00000004 },
601 { 0x000d0036, 0x00000038 },
602 { 0x0000f38a, 0x00000004 },
603 { 0x000d0038, 0x00000038 },
604 { 0x0000f38e, 0x00000004 },
605 { 0x0000e821, 0x00000004 },
606 { 0x0140a000, 0x00000004 },
607 { 0x00000043, 0x00000018 },
608 { 0x00cce800, 0x00000004 },
609 { 0x001b0001, 0x00000004 },
610 { 0x08004800, 0x00000004 },
611 { 0x001b0001, 0x00000004 },
612 { 0x08004800, 0x00000004 },
613 { 0x001b0001, 0x00000004 },
614 { 0x08004800, 0x00000004 },
615 { 0x0000003a, 0x00000008 },
616 { 0x0000a000, 0000000000 },
617 { 0x2000451d, 0x00000004 },
618 { 0x0000e580, 0x00000004 },
619 { 0x000ce581, 0x00000004 },
620 { 0x08004580, 0x00000004 },
621 { 0x000ce581, 0x00000004 },
622 { 0x00000047, 0x00000008 },
623 { 0x0000a000, 0000000000 },
624 { 0x000c2000, 0x00000004 },
625 { 0x0000e50e, 0x00000004 },
626 { 0x00032000, 0x00000004 },
627 { 0x00022051, 0x00000028 },
628 { 0x00000051, 0x00000024 },
629 { 0x0800450f, 0x00000004 },
630 { 0x0000a04b, 0x00000008 },
631 { 0x0000e565, 0x00000004 },
632 { 0x0000e566, 0x00000004 },
633 { 0x00000052, 0x00000008 },
634 { 0x03cca5b4, 0x00000004 },
635 { 0x05432000, 0x00000004 },
636 { 0x00022000, 0x00000004 },
637 { 0x4ccce05e, 0x00000030 },
638 { 0x08274565, 0x00000004 },
639 { 0x0000005e, 0x00000030 },
640 { 0x08004564, 0x00000004 },
641 { 0x0000e566, 0x00000004 },
642 { 0x00000055, 0x00000008 },
643 { 0x00802061, 0x00000010 },
644 { 0x00202000, 0x00000004 },
645 { 0x001b00ff, 0x00000004 },
646 { 0x01000064, 0x00000010 },
647 { 0x001f2000, 0x00000004 },
648 { 0x001c00ff, 0x00000004 },
649 { 0000000000, 0x0000000c },
650 { 0x00000080, 0x00000030 },
651 { 0x00000055, 0x00000008 },
652 { 0x0000e576, 0x00000004 },
653 { 0x000ca000, 0x00000004 },
654 { 0x00012000, 0x00000004 },
655 { 0x00082000, 0x00000004 },
656 { 0x1800650e, 0x00000004 },
657 { 0x00092000, 0x00000004 },
658 { 0x000a2000, 0x00000004 },
659 { 0x000f0000, 0x00000004 },
660 { 0x00400000, 0x00000004 },
661 { 0x00000074, 0x00000018 },
662 { 0x0000e563, 0x00000004 },
663 { 0x00c0e5f9, 0x000000c2 },
664 { 0x00000069, 0x00000008 },
665 { 0x0000a069, 0x00000008 },
666 { 0x0000e576, 0x00000004 },
667 { 0x0000e577, 0x00000004 },
668 { 0x0000e50e, 0x00000004 },
669 { 0x0000e50f, 0x00000004 },
670 { 0x0140a000, 0x00000004 },
671 { 0x00000077, 0x00000018 },
672 { 0x00c0e5f9, 0x000000c2 },
673 { 0x00000077, 0x00000008 },
674 { 0x0014e50e, 0x00000004 },
675 { 0x0040e50f, 0x00000004 },
676 { 0x00c0007a, 0x00000008 },
677 { 0x0000e570, 0x00000004 },
678 { 0x0000e571, 0x00000004 },
679 { 0x0000e572, 0x0000000c },
680 { 0x0000a000, 0x00000004 },
681 { 0x0140a000, 0x00000004 },
682 { 0x0000e568, 0x00000004 },
683 { 0x000c2000, 0x00000004 },
684 { 0x00000084, 0x00000018 },
685 { 0x000b0000, 0x00000004 },
686 { 0x18c0e562, 0x00000004 },
687 { 0x00000086, 0x00000008 },
688 { 0x00c00085, 0x00000008 },
689 { 0x000700e3, 0x00000004 },
690 { 0x00000092, 0x00000038 },
691 { 0x000ca094, 0x00000030 },
692 { 0x080045bb, 0x00000004 },
693 { 0x000c2095, 0x00000030 },
694 { 0x0800e5bc, 0000000000 },
695 { 0x0000e5bb, 0x00000004 },
696 { 0x0000e5bc, 0000000000 },
697 { 0x00120000, 0x0000000c },
698 { 0x00120000, 0x00000004 },
699 { 0x001b0002, 0x0000000c },
700 { 0x0000a000, 0x00000004 },
701 { 0x0000e821, 0x00000004 },
702 { 0x0000e800, 0000000000 },
703 { 0x0000e821, 0x00000004 },
704 { 0x0000e82e, 0000000000 },
705 { 0x02cca000, 0x00000004 },
706 { 0x00140000, 0x00000004 },
707 { 0x000ce1cc, 0x00000004 },
708 { 0x050de1cd, 0x00000004 },
709 { 0x00400000, 0x00000004 },
710 { 0x000000a4, 0x00000018 },
711 { 0x00c0a000, 0x00000004 },
712 { 0x000000a1, 0x00000008 },
713 { 0x000000a6, 0x00000020 },
714 { 0x4200e000, 0000000000 },
715 { 0x000000ad, 0x00000038 },
716 { 0x000ca000, 0x00000004 },
717 { 0x00140000, 0x00000004 },
718 { 0x000c2000, 0x00000004 },
719 { 0x00160000, 0x00000004 },
720 { 0x700ce000, 0x00000004 },
721 { 0x001400a9, 0x00000008 },
722 { 0x4000e000, 0000000000 },
723 { 0x02400000, 0x00000004 },
724 { 0x400ee000, 0x00000004 },
725 { 0x02400000, 0x00000004 },
726 { 0x4000e000, 0000000000 },
727 { 0x000c2000, 0x00000004 },
728 { 0x0240e51b, 0x00000004 },
729 { 0x0080e50a, 0x00000005 },
730 { 0x0080e50b, 0x00000005 },
731 { 0x00220000, 0x00000004 },
732 { 0x000700e3, 0x00000004 },
733 { 0x000000c0, 0x00000038 },
734 { 0x000c2095, 0x00000030 },
735 { 0x0880e5bd, 0x00000005 },
736 { 0x000c2094, 0x00000030 },
737 { 0x0800e5bb, 0x00000005 },
738 { 0x000c2095, 0x00000030 },
739 { 0x0880e5bc, 0x00000005 },
740 { 0x000000c3, 0x00000008 },
741 { 0x0080e5bd, 0x00000005 },
742 { 0x0000e5bb, 0x00000005 },
743 { 0x0080e5bc, 0x00000005 },
744 { 0x00210000, 0x00000004 },
745 { 0x02800000, 0x00000004 },
746 { 0x00c000c7, 0x00000018 },
747 { 0x4180e000, 0x00000040 },
748 { 0x000000c9, 0x00000024 },
749 { 0x01000000, 0x0000000c },
750 { 0x0100e51d, 0x0000000c },
751 { 0x000045bb, 0x00000004 },
752 { 0x000080c3, 0x00000008 },
753 { 0x0000f3ce, 0x00000004 },
754 { 0x0140a000, 0x00000004 },
755 { 0x00cc2000, 0x00000004 },
756 { 0x08c053cf, 0x00000040 },
757 { 0x00008000, 0000000000 },
758 { 0x0000f3d2, 0x00000004 },
759 { 0x0140a000, 0x00000004 },
760 { 0x00cc2000, 0x00000004 },
761 { 0x08c053d3, 0x00000040 },
762 { 0x00008000, 0000000000 },
763 { 0x0000f39d, 0x00000004 },
764 { 0x0140a000, 0x00000004 },
765 { 0x00cc2000, 0x00000004 },
766 { 0x08c0539e, 0x00000040 },
767 { 0x00008000, 0000000000 },
768 { 0x03c00830, 0x00000004 },
769 { 0x4200e000, 0000000000 },
770 { 0x0000a000, 0x00000004 },
771 { 0x200045e0, 0x00000004 },
772 { 0x0000e5e1, 0000000000 },
773 { 0x00000001, 0000000000 },
774 { 0x000700e0, 0x00000004 },
775 { 0x0800e394, 0000000000 },
776 { 0000000000, 0000000000 },
777 { 0x0000e8c4, 0x00000004 },
778 { 0x0000e8c5, 0x00000004 },
779 { 0x0000e8c6, 0x00000004 },
780 { 0x0000e928, 0x00000004 },
781 { 0x0000e929, 0x00000004 },
782 { 0x0000e92a, 0x00000004 },
783 { 0x000000e4, 0x00000008 },
784 { 0x0000e928, 0x00000004 },
785 { 0x0000e929, 0x00000004 },
786 { 0x0000e92a, 0x00000004 },
787 { 0x000000eb, 0x00000008 },
788 { 0x02c02000, 0x00000004 },
789 { 0x00060000, 0x00000004 },
790 { 0x000000f3, 0x00000034 },
791 { 0x000000f0, 0x00000008 },
792 { 0x00008000, 0x00000004 },
793 { 0xc000e000, 0000000000 },
794 { 0000000000, 0000000000 },
795 { 0x000c2000, 0x00000004 },
796 { 0x001d0018, 0x00000004 },
797 { 0x001a0001, 0x00000004 },
798 { 0x000000fb, 0x00000034 },
799 { 0x0000004a, 0x00000008 },
800 { 0x0500a04a, 0x00000008 },
801 { 0000000000, 0000000000 },
802 { 0000000000, 0000000000 },
803 { 0000000000, 0000000000 },
804 { 0000000000, 0000000000 },
805};
806
807static const u32 R420_cp_microcode[][2] = {
808 { 0x4200e000, 0000000000 },
809 { 0x4000e000, 0000000000 },
810 { 0x00000099, 0x00000008 },
811 { 0x0000009d, 0x00000008 },
812 { 0x4a554b4a, 0000000000 },
813 { 0x4a4a4467, 0000000000 },
814 { 0x55526f75, 0000000000 },
815 { 0x4a7e7d65, 0000000000 },
816 { 0xd9d3dff6, 0000000000 },
817 { 0x4ac54a4a, 0000000000 },
818 { 0xc8828282, 0000000000 },
819 { 0xbf4acfc1, 0000000000 },
820 { 0x87b04a4a, 0000000000 },
821 { 0xb5838383, 0000000000 },
822 { 0x4a0f85ba, 0000000000 },
823 { 0x000ca000, 0x00000004 },
824 { 0x000d0012, 0x00000038 },
825 { 0x0000e8b4, 0x00000004 },
826 { 0x000d0014, 0x00000038 },
827 { 0x0000e8b6, 0x00000004 },
828 { 0x000d0016, 0x00000038 },
829 { 0x0000e854, 0x00000004 },
830 { 0x000d0018, 0x00000038 },
831 { 0x0000e855, 0x00000004 },
832 { 0x000d001a, 0x00000038 },
833 { 0x0000e856, 0x00000004 },
834 { 0x000d001c, 0x00000038 },
835 { 0x0000e857, 0x00000004 },
836 { 0x000d001e, 0x00000038 },
837 { 0x0000e824, 0x00000004 },
838 { 0x000d0020, 0x00000038 },
839 { 0x0000e825, 0x00000004 },
840 { 0x000d0022, 0x00000038 },
841 { 0x0000e830, 0x00000004 },
842 { 0x000d0024, 0x00000038 },
843 { 0x0000f0c0, 0x00000004 },
844 { 0x000d0026, 0x00000038 },
845 { 0x0000f0c1, 0x00000004 },
846 { 0x000d0028, 0x00000038 },
847 { 0x0000f041, 0x00000004 },
848 { 0x000d002a, 0x00000038 },
849 { 0x0000f184, 0x00000004 },
850 { 0x000d002c, 0x00000038 },
851 { 0x0000f185, 0x00000004 },
852 { 0x000d002e, 0x00000038 },
853 { 0x0000f186, 0x00000004 },
854 { 0x000d0030, 0x00000038 },
855 { 0x0000f187, 0x00000004 },
856 { 0x000d0032, 0x00000038 },
857 { 0x0000f180, 0x00000004 },
858 { 0x000d0034, 0x00000038 },
859 { 0x0000f393, 0x00000004 },
860 { 0x000d0036, 0x00000038 },
861 { 0x0000f38a, 0x00000004 },
862 { 0x000d0038, 0x00000038 },
863 { 0x0000f38e, 0x00000004 },
864 { 0x0000e821, 0x00000004 },
865 { 0x0140a000, 0x00000004 },
866 { 0x00000043, 0x00000018 },
867 { 0x00cce800, 0x00000004 },
868 { 0x001b0001, 0x00000004 },
869 { 0x08004800, 0x00000004 },
870 { 0x001b0001, 0x00000004 },
871 { 0x08004800, 0x00000004 },
872 { 0x001b0001, 0x00000004 },
873 { 0x08004800, 0x00000004 },
874 { 0x0000003a, 0x00000008 },
875 { 0x0000a000, 0000000000 },
876 { 0x2000451d, 0x00000004 },
877 { 0x0000e580, 0x00000004 },
878 { 0x000ce581, 0x00000004 },
879 { 0x08004580, 0x00000004 },
880 { 0x000ce581, 0x00000004 },
881 { 0x00000047, 0x00000008 },
882 { 0x0000a000, 0000000000 },
883 { 0x000c2000, 0x00000004 },
884 { 0x0000e50e, 0x00000004 },
885 { 0x00032000, 0x00000004 },
886 { 0x00022051, 0x00000028 },
887 { 0x00000051, 0x00000024 },
888 { 0x0800450f, 0x00000004 },
889 { 0x0000a04b, 0x00000008 },
890 { 0x0000e565, 0x00000004 },
891 { 0x0000e566, 0x00000004 },
892 { 0x00000052, 0x00000008 },
893 { 0x03cca5b4, 0x00000004 },
894 { 0x05432000, 0x00000004 },
895 { 0x00022000, 0x00000004 },
896 { 0x4ccce05e, 0x00000030 },
897 { 0x08274565, 0x00000004 },
898 { 0x0000005e, 0x00000030 },
899 { 0x08004564, 0x00000004 },
900 { 0x0000e566, 0x00000004 },
901 { 0x00000055, 0x00000008 },
902 { 0x00802061, 0x00000010 },
903 { 0x00202000, 0x00000004 },
904 { 0x001b00ff, 0x00000004 },
905 { 0x01000064, 0x00000010 },
906 { 0x001f2000, 0x00000004 },
907 { 0x001c00ff, 0x00000004 },
908 { 0000000000, 0x0000000c },
909 { 0x00000072, 0x00000030 },
910 { 0x00000055, 0x00000008 },
911 { 0x0000e576, 0x00000004 },
912 { 0x0000e577, 0x00000004 },
913 { 0x0000e50e, 0x00000004 },
914 { 0x0000e50f, 0x00000004 },
915 { 0x0140a000, 0x00000004 },
916 { 0x00000069, 0x00000018 },
917 { 0x00c0e5f9, 0x000000c2 },
918 { 0x00000069, 0x00000008 },
919 { 0x0014e50e, 0x00000004 },
920 { 0x0040e50f, 0x00000004 },
921 { 0x00c0006c, 0x00000008 },
922 { 0x0000e570, 0x00000004 },
923 { 0x0000e571, 0x00000004 },
924 { 0x0000e572, 0x0000000c },
925 { 0x0000a000, 0x00000004 },
926 { 0x0140a000, 0x00000004 },
927 { 0x0000e568, 0x00000004 },
928 { 0x000c2000, 0x00000004 },
929 { 0x00000076, 0x00000018 },
930 { 0x000b0000, 0x00000004 },
931 { 0x18c0e562, 0x00000004 },
932 { 0x00000078, 0x00000008 },
933 { 0x00c00077, 0x00000008 },
934 { 0x000700c7, 0x00000004 },
935 { 0x00000080, 0x00000038 },
936 { 0x0000e5bb, 0x00000004 },
937 { 0x0000e5bc, 0000000000 },
938 { 0x0000a000, 0x00000004 },
939 { 0x0000e821, 0x00000004 },
940 { 0x0000e800, 0000000000 },
941 { 0x0000e821, 0x00000004 },
942 { 0x0000e82e, 0000000000 },
943 { 0x02cca000, 0x00000004 },
944 { 0x00140000, 0x00000004 },
945 { 0x000ce1cc, 0x00000004 },
946 { 0x050de1cd, 0x00000004 },
947 { 0x00400000, 0x00000004 },
948 { 0x0000008f, 0x00000018 },
949 { 0x00c0a000, 0x00000004 },
950 { 0x0000008c, 0x00000008 },
951 { 0x00000091, 0x00000020 },
952 { 0x4200e000, 0000000000 },
953 { 0x00000098, 0x00000038 },
954 { 0x000ca000, 0x00000004 },
955 { 0x00140000, 0x00000004 },
956 { 0x000c2000, 0x00000004 },
957 { 0x00160000, 0x00000004 },
958 { 0x700ce000, 0x00000004 },
959 { 0x00140094, 0x00000008 },
960 { 0x4000e000, 0000000000 },
961 { 0x02400000, 0x00000004 },
962 { 0x400ee000, 0x00000004 },
963 { 0x02400000, 0x00000004 },
964 { 0x4000e000, 0000000000 },
965 { 0x000c2000, 0x00000004 },
966 { 0x0240e51b, 0x00000004 },
967 { 0x0080e50a, 0x00000005 },
968 { 0x0080e50b, 0x00000005 },
969 { 0x00220000, 0x00000004 },
970 { 0x000700c7, 0x00000004 },
971 { 0x000000a4, 0x00000038 },
972 { 0x0080e5bd, 0x00000005 },
973 { 0x0000e5bb, 0x00000005 },
974 { 0x0080e5bc, 0x00000005 },
975 { 0x00210000, 0x00000004 },
976 { 0x02800000, 0x00000004 },
977 { 0x00c000ab, 0x00000018 },
978 { 0x4180e000, 0x00000040 },
979 { 0x000000ad, 0x00000024 },
980 { 0x01000000, 0x0000000c },
981 { 0x0100e51d, 0x0000000c },
982 { 0x000045bb, 0x00000004 },
983 { 0x000080a7, 0x00000008 },
984 { 0x0000f3ce, 0x00000004 },
985 { 0x0140a000, 0x00000004 },
986 { 0x00cc2000, 0x00000004 },
987 { 0x08c053cf, 0x00000040 },
988 { 0x00008000, 0000000000 },
989 { 0x0000f3d2, 0x00000004 },
990 { 0x0140a000, 0x00000004 },
991 { 0x00cc2000, 0x00000004 },
992 { 0x08c053d3, 0x00000040 },
993 { 0x00008000, 0000000000 },
994 { 0x0000f39d, 0x00000004 },
995 { 0x0140a000, 0x00000004 },
996 { 0x00cc2000, 0x00000004 },
997 { 0x08c0539e, 0x00000040 },
998 { 0x00008000, 0000000000 },
999 { 0x03c00830, 0x00000004 },
1000 { 0x4200e000, 0000000000 },
1001 { 0x0000a000, 0x00000004 },
1002 { 0x200045e0, 0x00000004 },
1003 { 0x0000e5e1, 0000000000 },
1004 { 0x00000001, 0000000000 },
1005 { 0x000700c4, 0x00000004 },
1006 { 0x0800e394, 0000000000 },
1007 { 0000000000, 0000000000 },
1008 { 0x0000e8c4, 0x00000004 },
1009 { 0x0000e8c5, 0x00000004 },
1010 { 0x0000e8c6, 0x00000004 },
1011 { 0x0000e928, 0x00000004 },
1012 { 0x0000e929, 0x00000004 },
1013 { 0x0000e92a, 0x00000004 },
1014 { 0x000000c8, 0x00000008 },
1015 { 0x0000e928, 0x00000004 },
1016 { 0x0000e929, 0x00000004 },
1017 { 0x0000e92a, 0x00000004 },
1018 { 0x000000cf, 0x00000008 },
1019 { 0x02c02000, 0x00000004 },
1020 { 0x00060000, 0x00000004 },
1021 { 0x000000d7, 0x00000034 },
1022 { 0x000000d4, 0x00000008 },
1023 { 0x00008000, 0x00000004 },
1024 { 0xc000e000, 0000000000 },
1025 { 0x0000e1cc, 0x00000004 },
1026 { 0x0500e1cd, 0x00000004 },
1027 { 0x000ca000, 0x00000004 },
1028 { 0x000000de, 0x00000034 },
1029 { 0x000000da, 0x00000008 },
1030 { 0x0000a000, 0000000000 },
1031 { 0x0019e1cc, 0x00000004 },
1032 { 0x001b0001, 0x00000004 },
1033 { 0x0500a000, 0x00000004 },
1034 { 0x080041cd, 0x00000004 },
1035 { 0x000ca000, 0x00000004 },
1036 { 0x000000fb, 0x00000034 },
1037 { 0x0000004a, 0x00000008 },
1038 { 0000000000, 0000000000 },
1039 { 0000000000, 0000000000 },
1040 { 0000000000, 0000000000 },
1041 { 0000000000, 0000000000 },
1042 { 0000000000, 0000000000 },
1043 { 0000000000, 0000000000 },
1044 { 0000000000, 0000000000 },
1045 { 0000000000, 0000000000 },
1046 { 0000000000, 0000000000 },
1047 { 0000000000, 0000000000 },
1048 { 0000000000, 0000000000 },
1049 { 0000000000, 0000000000 },
1050 { 0000000000, 0000000000 },
1051 { 0000000000, 0000000000 },
1052 { 0000000000, 0000000000 },
1053 { 0000000000, 0000000000 },
1054 { 0x000c2000, 0x00000004 },
1055 { 0x001d0018, 0x00000004 },
1056 { 0x001a0001, 0x00000004 },
1057 { 0x000000fb, 0x00000034 },
1058 { 0x0000004a, 0x00000008 },
1059 { 0x0500a04a, 0x00000008 },
1060 { 0000000000, 0000000000 },
1061 { 0000000000, 0000000000 },
1062 { 0000000000, 0000000000 },
1063 { 0000000000, 0000000000 },
1064};
1065
1066static const u32 RS600_cp_microcode[][2] = {
1067 { 0x4200e000, 0000000000 },
1068 { 0x4000e000, 0000000000 },
1069 { 0x000000a0, 0x00000008 },
1070 { 0x000000a4, 0x00000008 },
1071 { 0x4a554b4a, 0000000000 },
1072 { 0x4a4a4467, 0000000000 },
1073 { 0x55526f75, 0000000000 },
1074 { 0x4a7e7d65, 0000000000 },
1075 { 0x4ae74af6, 0000000000 },
1076 { 0x4ad34a4a, 0000000000 },
1077 { 0xd6898989, 0000000000 },
1078 { 0xcd4addcf, 0000000000 },
1079 { 0x8ebe4ae2, 0000000000 },
1080 { 0xc38a8a8a, 0000000000 },
1081 { 0x4a0f8cc8, 0000000000 },
1082 { 0x000ca000, 0x00000004 },
1083 { 0x000d0012, 0x00000038 },
1084 { 0x0000e8b4, 0x00000004 },
1085 { 0x000d0014, 0x00000038 },
1086 { 0x0000e8b6, 0x00000004 },
1087 { 0x000d0016, 0x00000038 },
1088 { 0x0000e854, 0x00000004 },
1089 { 0x000d0018, 0x00000038 },
1090 { 0x0000e855, 0x00000004 },
1091 { 0x000d001a, 0x00000038 },
1092 { 0x0000e856, 0x00000004 },
1093 { 0x000d001c, 0x00000038 },
1094 { 0x0000e857, 0x00000004 },
1095 { 0x000d001e, 0x00000038 },
1096 { 0x0000e824, 0x00000004 },
1097 { 0x000d0020, 0x00000038 },
1098 { 0x0000e825, 0x00000004 },
1099 { 0x000d0022, 0x00000038 },
1100 { 0x0000e830, 0x00000004 },
1101 { 0x000d0024, 0x00000038 },
1102 { 0x0000f0c0, 0x00000004 },
1103 { 0x000d0026, 0x00000038 },
1104 { 0x0000f0c1, 0x00000004 },
1105 { 0x000d0028, 0x00000038 },
1106 { 0x0000f041, 0x00000004 },
1107 { 0x000d002a, 0x00000038 },
1108 { 0x0000f184, 0x00000004 },
1109 { 0x000d002c, 0x00000038 },
1110 { 0x0000f185, 0x00000004 },
1111 { 0x000d002e, 0x00000038 },
1112 { 0x0000f186, 0x00000004 },
1113 { 0x000d0030, 0x00000038 },
1114 { 0x0000f187, 0x00000004 },
1115 { 0x000d0032, 0x00000038 },
1116 { 0x0000f180, 0x00000004 },
1117 { 0x000d0034, 0x00000038 },
1118 { 0x0000f393, 0x00000004 },
1119 { 0x000d0036, 0x00000038 },
1120 { 0x0000f38a, 0x00000004 },
1121 { 0x000d0038, 0x00000038 },
1122 { 0x0000f38e, 0x00000004 },
1123 { 0x0000e821, 0x00000004 },
1124 { 0x0140a000, 0x00000004 },
1125 { 0x00000043, 0x00000018 },
1126 { 0x00cce800, 0x00000004 },
1127 { 0x001b0001, 0x00000004 },
1128 { 0x08004800, 0x00000004 },
1129 { 0x001b0001, 0x00000004 },
1130 { 0x08004800, 0x00000004 },
1131 { 0x001b0001, 0x00000004 },
1132 { 0x08004800, 0x00000004 },
1133 { 0x0000003a, 0x00000008 },
1134 { 0x0000a000, 0000000000 },
1135 { 0x2000451d, 0x00000004 },
1136 { 0x0000e580, 0x00000004 },
1137 { 0x000ce581, 0x00000004 },
1138 { 0x08004580, 0x00000004 },
1139 { 0x000ce581, 0x00000004 },
1140 { 0x00000047, 0x00000008 },
1141 { 0x0000a000, 0000000000 },
1142 { 0x000c2000, 0x00000004 },
1143 { 0x0000e50e, 0x00000004 },
1144 { 0x00032000, 0x00000004 },
1145 { 0x00022051, 0x00000028 },
1146 { 0x00000051, 0x00000024 },
1147 { 0x0800450f, 0x00000004 },
1148 { 0x0000a04b, 0x00000008 },
1149 { 0x0000e565, 0x00000004 },
1150 { 0x0000e566, 0x00000004 },
1151 { 0x00000052, 0x00000008 },
1152 { 0x03cca5b4, 0x00000004 },
1153 { 0x05432000, 0x00000004 },
1154 { 0x00022000, 0x00000004 },
1155 { 0x4ccce05e, 0x00000030 },
1156 { 0x08274565, 0x00000004 },
1157 { 0x0000005e, 0x00000030 },
1158 { 0x08004564, 0x00000004 },
1159 { 0x0000e566, 0x00000004 },
1160 { 0x00000055, 0x00000008 },
1161 { 0x00802061, 0x00000010 },
1162 { 0x00202000, 0x00000004 },
1163 { 0x001b00ff, 0x00000004 },
1164 { 0x01000064, 0x00000010 },
1165 { 0x001f2000, 0x00000004 },
1166 { 0x001c00ff, 0x00000004 },
1167 { 0000000000, 0x0000000c },
1168 { 0x00000072, 0x00000030 },
1169 { 0x00000055, 0x00000008 },
1170 { 0x0000e576, 0x00000004 },
1171 { 0x0000e577, 0x00000004 },
1172 { 0x0000e50e, 0x00000004 },
1173 { 0x0000e50f, 0x00000004 },
1174 { 0x0140a000, 0x00000004 },
1175 { 0x00000069, 0x00000018 },
1176 { 0x00c0e5f9, 0x000000c2 },
1177 { 0x00000069, 0x00000008 },
1178 { 0x0014e50e, 0x00000004 },
1179 { 0x0040e50f, 0x00000004 },
1180 { 0x00c0006c, 0x00000008 },
1181 { 0x0000e570, 0x00000004 },
1182 { 0x0000e571, 0x00000004 },
1183 { 0x0000e572, 0x0000000c },
1184 { 0x0000a000, 0x00000004 },
1185 { 0x0140a000, 0x00000004 },
1186 { 0x0000e568, 0x00000004 },
1187 { 0x000c2000, 0x00000004 },
1188 { 0x00000076, 0x00000018 },
1189 { 0x000b0000, 0x00000004 },
1190 { 0x18c0e562, 0x00000004 },
1191 { 0x00000078, 0x00000008 },
1192 { 0x00c00077, 0x00000008 },
1193 { 0x000700d5, 0x00000004 },
1194 { 0x00000084, 0x00000038 },
1195 { 0x000ca086, 0x00000030 },
1196 { 0x080045bb, 0x00000004 },
1197 { 0x000c2087, 0x00000030 },
1198 { 0x0800e5bc, 0000000000 },
1199 { 0x0000e5bb, 0x00000004 },
1200 { 0x0000e5bc, 0000000000 },
1201 { 0x00120000, 0x0000000c },
1202 { 0x00120000, 0x00000004 },
1203 { 0x001b0002, 0x0000000c },
1204 { 0x0000a000, 0x00000004 },
1205 { 0x0000e821, 0x00000004 },
1206 { 0x0000e800, 0000000000 },
1207 { 0x0000e821, 0x00000004 },
1208 { 0x0000e82e, 0000000000 },
1209 { 0x02cca000, 0x00000004 },
1210 { 0x00140000, 0x00000004 },
1211 { 0x000ce1cc, 0x00000004 },
1212 { 0x050de1cd, 0x00000004 },
1213 { 0x00400000, 0x00000004 },
1214 { 0x00000096, 0x00000018 },
1215 { 0x00c0a000, 0x00000004 },
1216 { 0x00000093, 0x00000008 },
1217 { 0x00000098, 0x00000020 },
1218 { 0x4200e000, 0000000000 },
1219 { 0x0000009f, 0x00000038 },
1220 { 0x000ca000, 0x00000004 },
1221 { 0x00140000, 0x00000004 },
1222 { 0x000c2000, 0x00000004 },
1223 { 0x00160000, 0x00000004 },
1224 { 0x700ce000, 0x00000004 },
1225 { 0x0014009b, 0x00000008 },
1226 { 0x4000e000, 0000000000 },
1227 { 0x02400000, 0x00000004 },
1228 { 0x400ee000, 0x00000004 },
1229 { 0x02400000, 0x00000004 },
1230 { 0x4000e000, 0000000000 },
1231 { 0x000c2000, 0x00000004 },
1232 { 0x0240e51b, 0x00000004 },
1233 { 0x0080e50a, 0x00000005 },
1234 { 0x0080e50b, 0x00000005 },
1235 { 0x00220000, 0x00000004 },
1236 { 0x000700d5, 0x00000004 },
1237 { 0x000000b2, 0x00000038 },
1238 { 0x000c2087, 0x00000030 },
1239 { 0x0880e5bd, 0x00000005 },
1240 { 0x000c2086, 0x00000030 },
1241 { 0x0800e5bb, 0x00000005 },
1242 { 0x000c2087, 0x00000030 },
1243 { 0x0880e5bc, 0x00000005 },
1244 { 0x000000b5, 0x00000008 },
1245 { 0x0080e5bd, 0x00000005 },
1246 { 0x0000e5bb, 0x00000005 },
1247 { 0x0080e5bc, 0x00000005 },
1248 { 0x00210000, 0x00000004 },
1249 { 0x02800000, 0x00000004 },
1250 { 0x00c000b9, 0x00000018 },
1251 { 0x4180e000, 0x00000040 },
1252 { 0x000000bb, 0x00000024 },
1253 { 0x01000000, 0x0000000c },
1254 { 0x0100e51d, 0x0000000c },
1255 { 0x000045bb, 0x00000004 },
1256 { 0x000080b5, 0x00000008 },
1257 { 0x0000f3ce, 0x00000004 },
1258 { 0x0140a000, 0x00000004 },
1259 { 0x00cc2000, 0x00000004 },
1260 { 0x08c053cf, 0x00000040 },
1261 { 0x00008000, 0000000000 },
1262 { 0x0000f3d2, 0x00000004 },
1263 { 0x0140a000, 0x00000004 },
1264 { 0x00cc2000, 0x00000004 },
1265 { 0x08c053d3, 0x00000040 },
1266 { 0x00008000, 0000000000 },
1267 { 0x0000f39d, 0x00000004 },
1268 { 0x0140a000, 0x00000004 },
1269 { 0x00cc2000, 0x00000004 },
1270 { 0x08c0539e, 0x00000040 },
1271 { 0x00008000, 0000000000 },
1272 { 0x03c00830, 0x00000004 },
1273 { 0x4200e000, 0000000000 },
1274 { 0x0000a000, 0x00000004 },
1275 { 0x200045e0, 0x00000004 },
1276 { 0x0000e5e1, 0000000000 },
1277 { 0x00000001, 0000000000 },
1278 { 0x000700d2, 0x00000004 },
1279 { 0x0800e394, 0000000000 },
1280 { 0000000000, 0000000000 },
1281 { 0x0000e8c4, 0x00000004 },
1282 { 0x0000e8c5, 0x00000004 },
1283 { 0x0000e8c6, 0x00000004 },
1284 { 0x0000e928, 0x00000004 },
1285 { 0x0000e929, 0x00000004 },
1286 { 0x0000e92a, 0x00000004 },
1287 { 0x000000d6, 0x00000008 },
1288 { 0x0000e928, 0x00000004 },
1289 { 0x0000e929, 0x00000004 },
1290 { 0x0000e92a, 0x00000004 },
1291 { 0x000000dd, 0x00000008 },
1292 { 0x00e00116, 0000000000 },
1293 { 0x000700e1, 0x00000004 },
1294 { 0x0800401c, 0x00000004 },
1295 { 0x200050e7, 0x00000004 },
1296 { 0x0000e01d, 0x00000004 },
1297 { 0x000000e4, 0x00000008 },
1298 { 0x02c02000, 0x00000004 },
1299 { 0x00060000, 0x00000004 },
1300 { 0x000000eb, 0x00000034 },
1301 { 0x000000e8, 0x00000008 },
1302 { 0x00008000, 0x00000004 },
1303 { 0xc000e000, 0000000000 },
1304 { 0000000000, 0000000000 },
1305 { 0000000000, 0000000000 },
1306 { 0000000000, 0000000000 },
1307 { 0000000000, 0000000000 },
1308 { 0000000000, 0000000000 },
1309 { 0000000000, 0000000000 },
1310 { 0000000000, 0000000000 },
1311 { 0000000000, 0000000000 },
1312 { 0000000000, 0000000000 },
1313 { 0x000c2000, 0x00000004 },
1314 { 0x001d0018, 0x00000004 },
1315 { 0x001a0001, 0x00000004 },
1316 { 0x000000fb, 0x00000034 },
1317 { 0x0000004a, 0x00000008 },
1318 { 0x0500a04a, 0x00000008 },
1319 { 0000000000, 0000000000 },
1320 { 0000000000, 0000000000 },
1321 { 0000000000, 0000000000 },
1322 { 0000000000, 0000000000 },
1323};
1324
1325static const u32 RS690_cp_microcode[][2] = {
1326 { 0x000000dd, 0x00000008 },
1327 { 0x000000df, 0x00000008 },
1328 { 0x000000a0, 0x00000008 },
1329 { 0x000000a4, 0x00000008 },
1330 { 0x4a554b4a, 0000000000 },
1331 { 0x4a4a4467, 0000000000 },
1332 { 0x55526f75, 0000000000 },
1333 { 0x4a7e7d65, 0000000000 },
1334 { 0x4ad74af6, 0000000000 },
1335 { 0x4ac94a4a, 0000000000 },
1336 { 0xcc898989, 0000000000 },
1337 { 0xc34ad3c5, 0000000000 },
1338 { 0x8e4a4a4a, 0000000000 },
1339 { 0x4a8a8a8a, 0000000000 },
1340 { 0x4a0f8c4a, 0000000000 },
1341 { 0x000ca000, 0x00000004 },
1342 { 0x000d0012, 0x00000038 },
1343 { 0x0000e8b4, 0x00000004 },
1344 { 0x000d0014, 0x00000038 },
1345 { 0x0000e8b6, 0x00000004 },
1346 { 0x000d0016, 0x00000038 },
1347 { 0x0000e854, 0x00000004 },
1348 { 0x000d0018, 0x00000038 },
1349 { 0x0000e855, 0x00000004 },
1350 { 0x000d001a, 0x00000038 },
1351 { 0x0000e856, 0x00000004 },
1352 { 0x000d001c, 0x00000038 },
1353 { 0x0000e857, 0x00000004 },
1354 { 0x000d001e, 0x00000038 },
1355 { 0x0000e824, 0x00000004 },
1356 { 0x000d0020, 0x00000038 },
1357 { 0x0000e825, 0x00000004 },
1358 { 0x000d0022, 0x00000038 },
1359 { 0x0000e830, 0x00000004 },
1360 { 0x000d0024, 0x00000038 },
1361 { 0x0000f0c0, 0x00000004 },
1362 { 0x000d0026, 0x00000038 },
1363 { 0x0000f0c1, 0x00000004 },
1364 { 0x000d0028, 0x00000038 },
1365 { 0x0000f041, 0x00000004 },
1366 { 0x000d002a, 0x00000038 },
1367 { 0x0000f184, 0x00000004 },
1368 { 0x000d002c, 0x00000038 },
1369 { 0x0000f185, 0x00000004 },
1370 { 0x000d002e, 0x00000038 },
1371 { 0x0000f186, 0x00000004 },
1372 { 0x000d0030, 0x00000038 },
1373 { 0x0000f187, 0x00000004 },
1374 { 0x000d0032, 0x00000038 },
1375 { 0x0000f180, 0x00000004 },
1376 { 0x000d0034, 0x00000038 },
1377 { 0x0000f393, 0x00000004 },
1378 { 0x000d0036, 0x00000038 },
1379 { 0x0000f38a, 0x00000004 },
1380 { 0x000d0038, 0x00000038 },
1381 { 0x0000f38e, 0x00000004 },
1382 { 0x0000e821, 0x00000004 },
1383 { 0x0140a000, 0x00000004 },
1384 { 0x00000043, 0x00000018 },
1385 { 0x00cce800, 0x00000004 },
1386 { 0x001b0001, 0x00000004 },
1387 { 0x08004800, 0x00000004 },
1388 { 0x001b0001, 0x00000004 },
1389 { 0x08004800, 0x00000004 },
1390 { 0x001b0001, 0x00000004 },
1391 { 0x08004800, 0x00000004 },
1392 { 0x0000003a, 0x00000008 },
1393 { 0x0000a000, 0000000000 },
1394 { 0x2000451d, 0x00000004 },
1395 { 0x0000e580, 0x00000004 },
1396 { 0x000ce581, 0x00000004 },
1397 { 0x08004580, 0x00000004 },
1398 { 0x000ce581, 0x00000004 },
1399 { 0x00000047, 0x00000008 },
1400 { 0x0000a000, 0000000000 },
1401 { 0x000c2000, 0x00000004 },
1402 { 0x0000e50e, 0x00000004 },
1403 { 0x00032000, 0x00000004 },
1404 { 0x00022051, 0x00000028 },
1405 { 0x00000051, 0x00000024 },
1406 { 0x0800450f, 0x00000004 },
1407 { 0x0000a04b, 0x00000008 },
1408 { 0x0000e565, 0x00000004 },
1409 { 0x0000e566, 0x00000004 },
1410 { 0x00000052, 0x00000008 },
1411 { 0x03cca5b4, 0x00000004 },
1412 { 0x05432000, 0x00000004 },
1413 { 0x00022000, 0x00000004 },
1414 { 0x4ccce05e, 0x00000030 },
1415 { 0x08274565, 0x00000004 },
1416 { 0x0000005e, 0x00000030 },
1417 { 0x08004564, 0x00000004 },
1418 { 0x0000e566, 0x00000004 },
1419 { 0x00000055, 0x00000008 },
1420 { 0x00802061, 0x00000010 },
1421 { 0x00202000, 0x00000004 },
1422 { 0x001b00ff, 0x00000004 },
1423 { 0x01000064, 0x00000010 },
1424 { 0x001f2000, 0x00000004 },
1425 { 0x001c00ff, 0x00000004 },
1426 { 0000000000, 0x0000000c },
1427 { 0x00000072, 0x00000030 },
1428 { 0x00000055, 0x00000008 },
1429 { 0x0000e576, 0x00000004 },
1430 { 0x0000e577, 0x00000004 },
1431 { 0x0000e50e, 0x00000004 },
1432 { 0x0000e50f, 0x00000004 },
1433 { 0x0140a000, 0x00000004 },
1434 { 0x00000069, 0x00000018 },
1435 { 0x00c0e5f9, 0x000000c2 },
1436 { 0x00000069, 0x00000008 },
1437 { 0x0014e50e, 0x00000004 },
1438 { 0x0040e50f, 0x00000004 },
1439 { 0x00c0006c, 0x00000008 },
1440 { 0x0000e570, 0x00000004 },
1441 { 0x0000e571, 0x00000004 },
1442 { 0x0000e572, 0x0000000c },
1443 { 0x0000a000, 0x00000004 },
1444 { 0x0140a000, 0x00000004 },
1445 { 0x0000e568, 0x00000004 },
1446 { 0x000c2000, 0x00000004 },
1447 { 0x00000076, 0x00000018 },
1448 { 0x000b0000, 0x00000004 },
1449 { 0x18c0e562, 0x00000004 },
1450 { 0x00000078, 0x00000008 },
1451 { 0x00c00077, 0x00000008 },
1452 { 0x000700cb, 0x00000004 },
1453 { 0x00000084, 0x00000038 },
1454 { 0x000ca086, 0x00000030 },
1455 { 0x080045bb, 0x00000004 },
1456 { 0x000c2087, 0x00000030 },
1457 { 0x0800e5bc, 0000000000 },
1458 { 0x0000e5bb, 0x00000004 },
1459 { 0x0000e5bc, 0000000000 },
1460 { 0x00120000, 0x0000000c },
1461 { 0x00120000, 0x00000004 },
1462 { 0x001b0002, 0x0000000c },
1463 { 0x0000a000, 0x00000004 },
1464 { 0x0000e821, 0x00000004 },
1465 { 0x0000e800, 0000000000 },
1466 { 0x0000e821, 0x00000004 },
1467 { 0x0000e82e, 0000000000 },
1468 { 0x02cca000, 0x00000004 },
1469 { 0x00140000, 0x00000004 },
1470 { 0x000ce1cc, 0x00000004 },
1471 { 0x050de1cd, 0x00000004 },
1472 { 0x00400000, 0x00000004 },
1473 { 0x00000096, 0x00000018 },
1474 { 0x00c0a000, 0x00000004 },
1475 { 0x00000093, 0x00000008 },
1476 { 0x00000098, 0x00000020 },
1477 { 0x4200e000, 0000000000 },
1478 { 0x0000009f, 0x00000038 },
1479 { 0x000ca000, 0x00000004 },
1480 { 0x00140000, 0x00000004 },
1481 { 0x000c2000, 0x00000004 },
1482 { 0x00160000, 0x00000004 },
1483 { 0x700ce000, 0x00000004 },
1484 { 0x0014009b, 0x00000008 },
1485 { 0x4000e000, 0000000000 },
1486 { 0x02400000, 0x00000004 },
1487 { 0x400ee000, 0x00000004 },
1488 { 0x02400000, 0x00000004 },
1489 { 0x4000e000, 0000000000 },
1490 { 0x00100000, 0x0000002c },
1491 { 0x00004000, 0000000000 },
1492 { 0x080045c8, 0x00000004 },
1493 { 0x00240005, 0x00000004 },
1494 { 0x08004d0b, 0x00000004 },
1495 { 0x000c2000, 0x00000004 },
1496 { 0x0240e51b, 0x00000004 },
1497 { 0x0080e50a, 0x00000005 },
1498 { 0x0080e50b, 0x00000005 },
1499 { 0x00220000, 0x00000004 },
1500 { 0x000700cb, 0x00000004 },
1501 { 0x000000b7, 0x00000038 },
1502 { 0x000c2087, 0x00000030 },
1503 { 0x0880e5bd, 0x00000005 },
1504 { 0x000c2086, 0x00000030 },
1505 { 0x0800e5bb, 0x00000005 },
1506 { 0x000c2087, 0x00000030 },
1507 { 0x0880e5bc, 0x00000005 },
1508 { 0x000000ba, 0x00000008 },
1509 { 0x0080e5bd, 0x00000005 },
1510 { 0x0000e5bb, 0x00000005 },
1511 { 0x0080e5bc, 0x00000005 },
1512 { 0x00210000, 0x00000004 },
1513 { 0x02800000, 0x00000004 },
1514 { 0x00c000be, 0x00000018 },
1515 { 0x4180e000, 0x00000040 },
1516 { 0x000000c0, 0x00000024 },
1517 { 0x01000000, 0x0000000c },
1518 { 0x0100e51d, 0x0000000c },
1519 { 0x000045bb, 0x00000004 },
1520 { 0x000080ba, 0x00000008 },
1521 { 0x03c00830, 0x00000004 },
1522 { 0x4200e000, 0000000000 },
1523 { 0x0000a000, 0x00000004 },
1524 { 0x200045e0, 0x00000004 },
1525 { 0x0000e5e1, 0000000000 },
1526 { 0x00000001, 0000000000 },
1527 { 0x000700c8, 0x00000004 },
1528 { 0x0800e394, 0000000000 },
1529 { 0000000000, 0000000000 },
1530 { 0x0000e8c4, 0x00000004 },
1531 { 0x0000e8c5, 0x00000004 },
1532 { 0x0000e8c6, 0x00000004 },
1533 { 0x0000e928, 0x00000004 },
1534 { 0x0000e929, 0x00000004 },
1535 { 0x0000e92a, 0x00000004 },
1536 { 0x000000cc, 0x00000008 },
1537 { 0x0000e928, 0x00000004 },
1538 { 0x0000e929, 0x00000004 },
1539 { 0x0000e92a, 0x00000004 },
1540 { 0x000000d3, 0x00000008 },
1541 { 0x02c02000, 0x00000004 },
1542 { 0x00060000, 0x00000004 },
1543 { 0x000000db, 0x00000034 },
1544 { 0x000000d8, 0x00000008 },
1545 { 0x00008000, 0x00000004 },
1546 { 0xc000e000, 0000000000 },
1547 { 0x000000e1, 0x00000030 },
1548 { 0x4200e000, 0000000000 },
1549 { 0x000000e1, 0x00000030 },
1550 { 0x4000e000, 0000000000 },
1551 { 0x0025001b, 0x00000004 },
1552 { 0x00230000, 0x00000004 },
1553 { 0x00250005, 0x00000004 },
1554 { 0x000000e6, 0x00000034 },
1555 { 0000000000, 0x0000000c },
1556 { 0x00244000, 0x00000004 },
1557 { 0x080045c8, 0x00000004 },
1558 { 0x00240005, 0x00000004 },
1559 { 0x08004d0b, 0x0000000c },
1560 { 0000000000, 0000000000 },
1561 { 0000000000, 0000000000 },
1562 { 0000000000, 0000000000 },
1563 { 0000000000, 0000000000 },
1564 { 0000000000, 0000000000 },
1565 { 0000000000, 0000000000 },
1566 { 0000000000, 0000000000 },
1567 { 0000000000, 0000000000 },
1568 { 0000000000, 0000000000 },
1569 { 0000000000, 0000000000 },
1570 { 0000000000, 0000000000 },
1571 { 0000000000, 0000000000 },
1572 { 0x000c2000, 0x00000004 },
1573 { 0x001d0018, 0x00000004 },
1574 { 0x001a0001, 0x00000004 },
1575 { 0x000000fb, 0x00000034 },
1576 { 0x0000004a, 0x00000008 },
1577 { 0x0500a04a, 0x00000008 },
1578 { 0000000000, 0000000000 },
1579 { 0000000000, 0000000000 },
1580 { 0000000000, 0000000000 },
1581 { 0000000000, 0000000000 },
1582};
1583
1584static const u32 R520_cp_microcode[][2] = {
1585 { 0x4200e000, 0000000000 },
1586 { 0x4000e000, 0000000000 },
1587 { 0x00000099, 0x00000008 },
1588 { 0x0000009d, 0x00000008 },
1589 { 0x4a554b4a, 0000000000 },
1590 { 0x4a4a4467, 0000000000 },
1591 { 0x55526f75, 0000000000 },
1592 { 0x4a7e7d65, 0000000000 },
1593 { 0xe0dae6f6, 0000000000 },
1594 { 0x4ac54a4a, 0000000000 },
1595 { 0xc8828282, 0000000000 },
1596 { 0xbf4acfc1, 0000000000 },
1597 { 0x87b04ad5, 0000000000 },
1598 { 0xb5838383, 0000000000 },
1599 { 0x4a0f85ba, 0000000000 },
1600 { 0x000ca000, 0x00000004 },
1601 { 0x000d0012, 0x00000038 },
1602 { 0x0000e8b4, 0x00000004 },
1603 { 0x000d0014, 0x00000038 },
1604 { 0x0000e8b6, 0x00000004 },
1605 { 0x000d0016, 0x00000038 },
1606 { 0x0000e854, 0x00000004 },
1607 { 0x000d0018, 0x00000038 },
1608 { 0x0000e855, 0x00000004 },
1609 { 0x000d001a, 0x00000038 },
1610 { 0x0000e856, 0x00000004 },
1611 { 0x000d001c, 0x00000038 },
1612 { 0x0000e857, 0x00000004 },
1613 { 0x000d001e, 0x00000038 },
1614 { 0x0000e824, 0x00000004 },
1615 { 0x000d0020, 0x00000038 },
1616 { 0x0000e825, 0x00000004 },
1617 { 0x000d0022, 0x00000038 },
1618 { 0x0000e830, 0x00000004 },
1619 { 0x000d0024, 0x00000038 },
1620 { 0x0000f0c0, 0x00000004 },
1621 { 0x000d0026, 0x00000038 },
1622 { 0x0000f0c1, 0x00000004 },
1623 { 0x000d0028, 0x00000038 },
1624 { 0x0000e000, 0x00000004 },
1625 { 0x000d002a, 0x00000038 },
1626 { 0x0000e000, 0x00000004 },
1627 { 0x000d002c, 0x00000038 },
1628 { 0x0000e000, 0x00000004 },
1629 { 0x000d002e, 0x00000038 },
1630 { 0x0000e000, 0x00000004 },
1631 { 0x000d0030, 0x00000038 },
1632 { 0x0000e000, 0x00000004 },
1633 { 0x000d0032, 0x00000038 },
1634 { 0x0000f180, 0x00000004 },
1635 { 0x000d0034, 0x00000038 },
1636 { 0x0000f393, 0x00000004 },
1637 { 0x000d0036, 0x00000038 },
1638 { 0x0000f38a, 0x00000004 },
1639 { 0x000d0038, 0x00000038 },
1640 { 0x0000f38e, 0x00000004 },
1641 { 0x0000e821, 0x00000004 },
1642 { 0x0140a000, 0x00000004 },
1643 { 0x00000043, 0x00000018 },
1644 { 0x00cce800, 0x00000004 },
1645 { 0x001b0001, 0x00000004 },
1646 { 0x08004800, 0x00000004 },
1647 { 0x001b0001, 0x00000004 },
1648 { 0x08004800, 0x00000004 },
1649 { 0x001b0001, 0x00000004 },
1650 { 0x08004800, 0x00000004 },
1651 { 0x0000003a, 0x00000008 },
1652 { 0x0000a000, 0000000000 },
1653 { 0x2000451d, 0x00000004 },
1654 { 0x0000e580, 0x00000004 },
1655 { 0x000ce581, 0x00000004 },
1656 { 0x08004580, 0x00000004 },
1657 { 0x000ce581, 0x00000004 },
1658 { 0x00000047, 0x00000008 },
1659 { 0x0000a000, 0000000000 },
1660 { 0x000c2000, 0x00000004 },
1661 { 0x0000e50e, 0x00000004 },
1662 { 0x00032000, 0x00000004 },
1663 { 0x00022051, 0x00000028 },
1664 { 0x00000051, 0x00000024 },
1665 { 0x0800450f, 0x00000004 },
1666 { 0x0000a04b, 0x00000008 },
1667 { 0x0000e565, 0x00000004 },
1668 { 0x0000e566, 0x00000004 },
1669 { 0x00000052, 0x00000008 },
1670 { 0x03cca5b4, 0x00000004 },
1671 { 0x05432000, 0x00000004 },
1672 { 0x00022000, 0x00000004 },
1673 { 0x4ccce05e, 0x00000030 },
1674 { 0x08274565, 0x00000004 },
1675 { 0x0000005e, 0x00000030 },
1676 { 0x08004564, 0x00000004 },
1677 { 0x0000e566, 0x00000004 },
1678 { 0x00000055, 0x00000008 },
1679 { 0x00802061, 0x00000010 },
1680 { 0x00202000, 0x00000004 },
1681 { 0x001b00ff, 0x00000004 },
1682 { 0x01000064, 0x00000010 },
1683 { 0x001f2000, 0x00000004 },
1684 { 0x001c00ff, 0x00000004 },
1685 { 0000000000, 0x0000000c },
1686 { 0x00000072, 0x00000030 },
1687 { 0x00000055, 0x00000008 },
1688 { 0x0000e576, 0x00000004 },
1689 { 0x0000e577, 0x00000004 },
1690 { 0x0000e50e, 0x00000004 },
1691 { 0x0000e50f, 0x00000004 },
1692 { 0x0140a000, 0x00000004 },
1693 { 0x00000069, 0x00000018 },
1694 { 0x00c0e5f9, 0x000000c2 },
1695 { 0x00000069, 0x00000008 },
1696 { 0x0014e50e, 0x00000004 },
1697 { 0x0040e50f, 0x00000004 },
1698 { 0x00c0006c, 0x00000008 },
1699 { 0x0000e570, 0x00000004 },
1700 { 0x0000e571, 0x00000004 },
1701 { 0x0000e572, 0x0000000c },
1702 { 0x0000a000, 0x00000004 },
1703 { 0x0140a000, 0x00000004 },
1704 { 0x0000e568, 0x00000004 },
1705 { 0x000c2000, 0x00000004 },
1706 { 0x00000076, 0x00000018 },
1707 { 0x000b0000, 0x00000004 },
1708 { 0x18c0e562, 0x00000004 },
1709 { 0x00000078, 0x00000008 },
1710 { 0x00c00077, 0x00000008 },
1711 { 0x000700c7, 0x00000004 },
1712 { 0x00000080, 0x00000038 },
1713 { 0x0000e5bb, 0x00000004 },
1714 { 0x0000e5bc, 0000000000 },
1715 { 0x0000a000, 0x00000004 },
1716 { 0x0000e821, 0x00000004 },
1717 { 0x0000e800, 0000000000 },
1718 { 0x0000e821, 0x00000004 },
1719 { 0x0000e82e, 0000000000 },
1720 { 0x02cca000, 0x00000004 },
1721 { 0x00140000, 0x00000004 },
1722 { 0x000ce1cc, 0x00000004 },
1723 { 0x050de1cd, 0x00000004 },
1724 { 0x00400000, 0x00000004 },
1725 { 0x0000008f, 0x00000018 },
1726 { 0x00c0a000, 0x00000004 },
1727 { 0x0000008c, 0x00000008 },
1728 { 0x00000091, 0x00000020 },
1729 { 0x4200e000, 0000000000 },
1730 { 0x00000098, 0x00000038 },
1731 { 0x000ca000, 0x00000004 },
1732 { 0x00140000, 0x00000004 },
1733 { 0x000c2000, 0x00000004 },
1734 { 0x00160000, 0x00000004 },
1735 { 0x700ce000, 0x00000004 },
1736 { 0x00140094, 0x00000008 },
1737 { 0x4000e000, 0000000000 },
1738 { 0x02400000, 0x00000004 },
1739 { 0x400ee000, 0x00000004 },
1740 { 0x02400000, 0x00000004 },
1741 { 0x4000e000, 0000000000 },
1742 { 0x000c2000, 0x00000004 },
1743 { 0x0240e51b, 0x00000004 },
1744 { 0x0080e50a, 0x00000005 },
1745 { 0x0080e50b, 0x00000005 },
1746 { 0x00220000, 0x00000004 },
1747 { 0x000700c7, 0x00000004 },
1748 { 0x000000a4, 0x00000038 },
1749 { 0x0080e5bd, 0x00000005 },
1750 { 0x0000e5bb, 0x00000005 },
1751 { 0x0080e5bc, 0x00000005 },
1752 { 0x00210000, 0x00000004 },
1753 { 0x02800000, 0x00000004 },
1754 { 0x00c000ab, 0x00000018 },
1755 { 0x4180e000, 0x00000040 },
1756 { 0x000000ad, 0x00000024 },
1757 { 0x01000000, 0x0000000c },
1758 { 0x0100e51d, 0x0000000c },
1759 { 0x000045bb, 0x00000004 },
1760 { 0x000080a7, 0x00000008 },
1761 { 0x0000f3ce, 0x00000004 },
1762 { 0x0140a000, 0x00000004 },
1763 { 0x00cc2000, 0x00000004 },
1764 { 0x08c053cf, 0x00000040 },
1765 { 0x00008000, 0000000000 },
1766 { 0x0000f3d2, 0x00000004 },
1767 { 0x0140a000, 0x00000004 },
1768 { 0x00cc2000, 0x00000004 },
1769 { 0x08c053d3, 0x00000040 },
1770 { 0x00008000, 0000000000 },
1771 { 0x0000f39d, 0x00000004 },
1772 { 0x0140a000, 0x00000004 },
1773 { 0x00cc2000, 0x00000004 },
1774 { 0x08c0539e, 0x00000040 },
1775 { 0x00008000, 0000000000 },
1776 { 0x03c00830, 0x00000004 },
1777 { 0x4200e000, 0000000000 },
1778 { 0x0000a000, 0x00000004 },
1779 { 0x200045e0, 0x00000004 },
1780 { 0x0000e5e1, 0000000000 },
1781 { 0x00000001, 0000000000 },
1782 { 0x000700c4, 0x00000004 },
1783 { 0x0800e394, 0000000000 },
1784 { 0000000000, 0000000000 },
1785 { 0x0000e8c4, 0x00000004 },
1786 { 0x0000e8c5, 0x00000004 },
1787 { 0x0000e8c6, 0x00000004 },
1788 { 0x0000e928, 0x00000004 },
1789 { 0x0000e929, 0x00000004 },
1790 { 0x0000e92a, 0x00000004 },
1791 { 0x000000c8, 0x00000008 },
1792 { 0x0000e928, 0x00000004 },
1793 { 0x0000e929, 0x00000004 },
1794 { 0x0000e92a, 0x00000004 },
1795 { 0x000000cf, 0x00000008 },
1796 { 0xdeadbeef, 0000000000 },
1797 { 0x00000116, 0000000000 },
1798 { 0x000700d3, 0x00000004 },
1799 { 0x080050e7, 0x00000004 },
1800 { 0x000700d4, 0x00000004 },
1801 { 0x0800401c, 0x00000004 },
1802 { 0x0000e01d, 0000000000 },
1803 { 0x02c02000, 0x00000004 },
1804 { 0x00060000, 0x00000004 },
1805 { 0x000000de, 0x00000034 },
1806 { 0x000000db, 0x00000008 },
1807 { 0x00008000, 0x00000004 },
1808 { 0xc000e000, 0000000000 },
1809 { 0x0000e1cc, 0x00000004 },
1810 { 0x0500e1cd, 0x00000004 },
1811 { 0x000ca000, 0x00000004 },
1812 { 0x000000e5, 0x00000034 },
1813 { 0x000000e1, 0x00000008 },
1814 { 0x0000a000, 0000000000 },
1815 { 0x0019e1cc, 0x00000004 },
1816 { 0x001b0001, 0x00000004 },
1817 { 0x0500a000, 0x00000004 },
1818 { 0x080041cd, 0x00000004 },
1819 { 0x000ca000, 0x00000004 },
1820 { 0x000000fb, 0x00000034 },
1821 { 0x0000004a, 0x00000008 },
1822 { 0000000000, 0000000000 },
1823 { 0000000000, 0000000000 },
1824 { 0000000000, 0000000000 },
1825 { 0000000000, 0000000000 },
1826 { 0000000000, 0000000000 },
1827 { 0000000000, 0000000000 },
1828 { 0000000000, 0000000000 },
1829 { 0000000000, 0000000000 },
1830 { 0000000000, 0000000000 },
1831 { 0x000c2000, 0x00000004 },
1832 { 0x001d0018, 0x00000004 },
1833 { 0x001a0001, 0x00000004 },
1834 { 0x000000fb, 0x00000034 },
1835 { 0x0000004a, 0x00000008 },
1836 { 0x0500a04a, 0x00000008 },
1837 { 0000000000, 0000000000 },
1838 { 0000000000, 0000000000 },
1839 { 0000000000, 0000000000 },
1840 { 0000000000, 0000000000 },
1841};
1842
1843
1844#endif
diff --git a/drivers/char/drm/radeon_state.c b/drivers/char/drm/radeon_state.c
index 6f75512f591e..11c146b49211 100644
--- a/drivers/char/drm/radeon_state.c
+++ b/drivers/char/drm/radeon_state.c
@@ -1662,7 +1662,7 @@ static int radeon_cp_dispatch_texture(struct drm_device * dev,
1662 u32 height; 1662 u32 height;
1663 int i; 1663 int i;
1664 u32 texpitch, microtile; 1664 u32 texpitch, microtile;
1665 u32 offset; 1665 u32 offset, byte_offset;
1666 RING_LOCALS; 1666 RING_LOCALS;
1667 1667
1668 if (radeon_check_and_fixup_offset(dev_priv, file_priv, &tex->offset)) { 1668 if (radeon_check_and_fixup_offset(dev_priv, file_priv, &tex->offset)) {
@@ -1727,6 +1727,13 @@ static int radeon_cp_dispatch_texture(struct drm_device * dev,
1727 } else 1727 } else
1728 microtile = 0; 1728 microtile = 0;
1729 1729
1730 /* this might fail for zero-sized uploads - are those illegal? */
1731 if (!radeon_check_offset(dev_priv, tex->offset + image->height *
1732 blit_width - 1)) {
1733 DRM_ERROR("Invalid final destination offset\n");
1734 return -EINVAL;
1735 }
1736
1730 DRM_DEBUG("tex=%dx%d blit=%d\n", tex_width, tex->height, blit_width); 1737 DRM_DEBUG("tex=%dx%d blit=%d\n", tex_width, tex->height, blit_width);
1731 1738
1732 do { 1739 do {
@@ -1840,6 +1847,7 @@ static int radeon_cp_dispatch_texture(struct drm_device * dev,
1840 } 1847 }
1841 1848
1842#undef RADEON_COPY_MT 1849#undef RADEON_COPY_MT
1850 byte_offset = (image->y & ~2047) * blit_width;
1843 buf->file_priv = file_priv; 1851 buf->file_priv = file_priv;
1844 buf->used = size; 1852 buf->used = size;
1845 offset = dev_priv->gart_buffers_offset + buf->offset; 1853 offset = dev_priv->gart_buffers_offset + buf->offset;
@@ -1854,9 +1862,9 @@ static int radeon_cp_dispatch_texture(struct drm_device * dev,
1854 RADEON_DP_SRC_SOURCE_MEMORY | 1862 RADEON_DP_SRC_SOURCE_MEMORY |
1855 RADEON_GMC_CLR_CMP_CNTL_DIS | RADEON_GMC_WR_MSK_DIS); 1863 RADEON_GMC_CLR_CMP_CNTL_DIS | RADEON_GMC_WR_MSK_DIS);
1856 OUT_RING((spitch << 22) | (offset >> 10)); 1864 OUT_RING((spitch << 22) | (offset >> 10));
1857 OUT_RING((texpitch << 22) | (tex->offset >> 10)); 1865 OUT_RING((texpitch << 22) | ((tex->offset >> 10) + (byte_offset >> 10)));
1858 OUT_RING(0); 1866 OUT_RING(0);
1859 OUT_RING((image->x << 16) | image->y); 1867 OUT_RING((image->x << 16) | (image->y % 2048));
1860 OUT_RING((image->width << 16) | height); 1868 OUT_RING((image->width << 16) | height);
1861 RADEON_WAIT_UNTIL_2D_IDLE(); 1869 RADEON_WAIT_UNTIL_2D_IDLE();
1862 ADVANCE_RING(); 1870 ADVANCE_RING();
@@ -3037,6 +3045,9 @@ static int radeon_cp_getparam(struct drm_device *dev, void *data, struct drm_fil
3037 case RADEON_PARAM_FB_LOCATION: 3045 case RADEON_PARAM_FB_LOCATION:
3038 value = radeon_read_fb_location(dev_priv); 3046 value = radeon_read_fb_location(dev_priv);
3039 break; 3047 break;
3048 case RADEON_PARAM_NUM_GB_PIPES:
3049 value = dev_priv->num_gb_pipes;
3050 break;
3040 default: 3051 default:
3041 DRM_DEBUG("Invalid parameter %d\n", param->param); 3052 DRM_DEBUG("Invalid parameter %d\n", param->param);
3042 return -EINVAL; 3053 return -EINVAL;
diff --git a/drivers/char/generic_nvram.c b/drivers/char/generic_nvram.c
index 2398e864c28d..a00869c650d5 100644
--- a/drivers/char/generic_nvram.c
+++ b/drivers/char/generic_nvram.c
@@ -133,7 +133,7 @@ static struct miscdevice nvram_dev = {
133 133
134int __init nvram_init(void) 134int __init nvram_init(void)
135{ 135{
136 printk(KERN_INFO "Macintosh non-volatile memory driver v%s\n", 136 printk(KERN_INFO "Generic non-volatile memory driver v%s\n",
137 NVRAM_VERSION); 137 NVRAM_VERSION);
138 return misc_register(&nvram_dev); 138 return misc_register(&nvram_dev);
139} 139}
diff --git a/drivers/char/hvc_xen.c b/drivers/char/hvc_xen.c
index dd68f8541c2d..db2ae4216279 100644
--- a/drivers/char/hvc_xen.c
+++ b/drivers/char/hvc_xen.c
@@ -39,9 +39,14 @@ static int xencons_irq;
39 39
40/* ------------------------------------------------------------------ */ 40/* ------------------------------------------------------------------ */
41 41
42static unsigned long console_pfn = ~0ul;
43
42static inline struct xencons_interface *xencons_interface(void) 44static inline struct xencons_interface *xencons_interface(void)
43{ 45{
44 return mfn_to_virt(xen_start_info->console.domU.mfn); 46 if (console_pfn == ~0ul)
47 return mfn_to_virt(xen_start_info->console.domU.mfn);
48 else
49 return __va(console_pfn << PAGE_SHIFT);
45} 50}
46 51
47static inline void notify_daemon(void) 52static inline void notify_daemon(void)
@@ -101,20 +106,32 @@ static int __init xen_init(void)
101{ 106{
102 struct hvc_struct *hp; 107 struct hvc_struct *hp;
103 108
104 if (!is_running_on_xen()) 109 if (!is_running_on_xen() ||
105 return 0; 110 is_initial_xendomain() ||
111 !xen_start_info->console.domU.evtchn)
112 return -ENODEV;
106 113
107 xencons_irq = bind_evtchn_to_irq(xen_start_info->console.domU.evtchn); 114 xencons_irq = bind_evtchn_to_irq(xen_start_info->console.domU.evtchn);
108 if (xencons_irq < 0) 115 if (xencons_irq < 0)
109 xencons_irq = 0 /* NO_IRQ */; 116 xencons_irq = 0; /* NO_IRQ */
117
110 hp = hvc_alloc(HVC_COOKIE, xencons_irq, &hvc_ops, 256); 118 hp = hvc_alloc(HVC_COOKIE, xencons_irq, &hvc_ops, 256);
111 if (IS_ERR(hp)) 119 if (IS_ERR(hp))
112 return PTR_ERR(hp); 120 return PTR_ERR(hp);
113 121
114 hvc = hp; 122 hvc = hp;
123
124 console_pfn = mfn_to_pfn(xen_start_info->console.domU.mfn);
125
115 return 0; 126 return 0;
116} 127}
117 128
129void xen_console_resume(void)
130{
131 if (xencons_irq)
132 rebind_evtchn_irq(xen_start_info->console.domU.evtchn, xencons_irq);
133}
134
118static void __exit xen_fini(void) 135static void __exit xen_fini(void)
119{ 136{
120 if (hvc) 137 if (hvc)
@@ -134,12 +151,28 @@ module_init(xen_init);
134module_exit(xen_fini); 151module_exit(xen_fini);
135console_initcall(xen_cons_init); 152console_initcall(xen_cons_init);
136 153
154static void raw_console_write(const char *str, int len)
155{
156 while(len > 0) {
157 int rc = HYPERVISOR_console_io(CONSOLEIO_write, len, (char *)str);
158 if (rc <= 0)
159 break;
160
161 str += rc;
162 len -= rc;
163 }
164}
165
166#ifdef CONFIG_EARLY_PRINTK
137static void xenboot_write_console(struct console *console, const char *string, 167static void xenboot_write_console(struct console *console, const char *string,
138 unsigned len) 168 unsigned len)
139{ 169{
140 unsigned int linelen, off = 0; 170 unsigned int linelen, off = 0;
141 const char *pos; 171 const char *pos;
142 172
173 raw_console_write(string, len);
174
175 write_console(0, "(early) ", 8);
143 while (off < len && NULL != (pos = strchr(string+off, '\n'))) { 176 while (off < len && NULL != (pos = strchr(string+off, '\n'))) {
144 linelen = pos-string+off; 177 linelen = pos-string+off;
145 if (off + linelen > len) 178 if (off + linelen > len)
@@ -155,5 +188,23 @@ static void xenboot_write_console(struct console *console, const char *string,
155struct console xenboot_console = { 188struct console xenboot_console = {
156 .name = "xenboot", 189 .name = "xenboot",
157 .write = xenboot_write_console, 190 .write = xenboot_write_console,
158 .flags = CON_PRINTBUFFER | CON_BOOT, 191 .flags = CON_PRINTBUFFER | CON_BOOT | CON_ANYTIME,
159}; 192};
193#endif /* CONFIG_EARLY_PRINTK */
194
195void xen_raw_console_write(const char *str)
196{
197 raw_console_write(str, strlen(str));
198}
199
200void xen_raw_printk(const char *fmt, ...)
201{
202 static char buf[512];
203 va_list ap;
204
205 va_start(ap, fmt);
206 vsnprintf(buf, sizeof(buf), fmt, ap);
207 va_end(ap);
208
209 xen_raw_console_write(buf);
210}
diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig
index 8d6c2089d2a8..efd0b4db7c8e 100644
--- a/drivers/char/hw_random/Kconfig
+++ b/drivers/char/hw_random/Kconfig
@@ -112,3 +112,12 @@ config HW_RANDOM_PASEMI
112 112
113 If unsure, say Y. 113 If unsure, say Y.
114 114
115config HW_RANDOM_VIRTIO
116 tristate "VirtIO Random Number Generator support"
117 depends on HW_RANDOM && VIRTIO
118 ---help---
119 This driver provides kernel-side support for the virtual Random Number
120 Generator hardware.
121
122 To compile this driver as a module, choose M here: the
123 module will be called virtio-rng. If unsure, say N.
diff --git a/drivers/char/hw_random/Makefile b/drivers/char/hw_random/Makefile
index c8b7300e2fb1..b4940ddbb35f 100644
--- a/drivers/char/hw_random/Makefile
+++ b/drivers/char/hw_random/Makefile
@@ -11,3 +11,4 @@ obj-$(CONFIG_HW_RANDOM_VIA) += via-rng.o
11obj-$(CONFIG_HW_RANDOM_IXP4XX) += ixp4xx-rng.o 11obj-$(CONFIG_HW_RANDOM_IXP4XX) += ixp4xx-rng.o
12obj-$(CONFIG_HW_RANDOM_OMAP) += omap-rng.o 12obj-$(CONFIG_HW_RANDOM_OMAP) += omap-rng.o
13obj-$(CONFIG_HW_RANDOM_PASEMI) += pasemi-rng.o 13obj-$(CONFIG_HW_RANDOM_PASEMI) += pasemi-rng.o
14obj-$(CONFIG_HW_RANDOM_VIRTIO) += virtio-rng.o
diff --git a/drivers/char/hw_random/intel-rng.c b/drivers/char/hw_random/intel-rng.c
index 5cc651ef75eb..27fdc0866496 100644
--- a/drivers/char/hw_random/intel-rng.c
+++ b/drivers/char/hw_random/intel-rng.c
@@ -273,7 +273,7 @@ static int __init intel_rng_hw_init(void *_intel_rng_hw)
273 if (mfc != INTEL_FWH_MANUFACTURER_CODE || 273 if (mfc != INTEL_FWH_MANUFACTURER_CODE ||
274 (dvc != INTEL_FWH_DEVICE_CODE_8M && 274 (dvc != INTEL_FWH_DEVICE_CODE_8M &&
275 dvc != INTEL_FWH_DEVICE_CODE_4M)) { 275 dvc != INTEL_FWH_DEVICE_CODE_4M)) {
276 printk(KERN_ERR PFX "FWH not detected\n"); 276 printk(KERN_NOTICE PFX "FWH not detected\n");
277 return -ENODEV; 277 return -ENODEV;
278 } 278 }
279 279
diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c
new file mode 100644
index 000000000000..d0e563e4fc39
--- /dev/null
+++ b/drivers/char/hw_random/virtio-rng.c
@@ -0,0 +1,155 @@
1/*
2 * Randomness driver for virtio
3 * Copyright (C) 2007, 2008 Rusty Russell IBM Corporation
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19#include <linux/err.h>
20#include <linux/hw_random.h>
21#include <linux/scatterlist.h>
22#include <linux/spinlock.h>
23#include <linux/virtio.h>
24#include <linux/virtio_rng.h>
25
26/* The host will fill any buffer we give it with sweet, sweet randomness. We
27 * give it 64 bytes at a time, and the hwrng framework takes it 4 bytes at a
28 * time. */
29#define RANDOM_DATA_SIZE 64
30
31static struct virtqueue *vq;
32static u32 *random_data;
33static unsigned int data_left;
34static DECLARE_COMPLETION(have_data);
35
36static void random_recv_done(struct virtqueue *vq)
37{
38 int len;
39
40 /* We never get spurious callbacks. */
41 if (!vq->vq_ops->get_buf(vq, &len))
42 BUG();
43
44 data_left = len / sizeof(random_data[0]);
45 complete(&have_data);
46}
47
48static void register_buffer(void)
49{
50 struct scatterlist sg;
51
52 sg_init_one(&sg, random_data, RANDOM_DATA_SIZE);
53 /* There should always be room for one buffer. */
54 if (vq->vq_ops->add_buf(vq, &sg, 0, 1, random_data) != 0)
55 BUG();
56 vq->vq_ops->kick(vq);
57}
58
59/* At least we don't udelay() in a loop like some other drivers. */
60static int virtio_data_present(struct hwrng *rng, int wait)
61{
62 if (data_left)
63 return 1;
64
65 if (!wait)
66 return 0;
67
68 wait_for_completion(&have_data);
69 return 1;
70}
71
72/* virtio_data_present() must have succeeded before this is called. */
73static int virtio_data_read(struct hwrng *rng, u32 *data)
74{
75 BUG_ON(!data_left);
76
77 *data = random_data[--data_left];
78
79 if (!data_left) {
80 init_completion(&have_data);
81 register_buffer();
82 }
83 return sizeof(*data);
84}
85
86static struct hwrng virtio_hwrng = {
87 .name = "virtio",
88 .data_present = virtio_data_present,
89 .data_read = virtio_data_read,
90};
91
92static int virtrng_probe(struct virtio_device *vdev)
93{
94 int err;
95
96 /* We expect a single virtqueue. */
97 vq = vdev->config->find_vq(vdev, 0, random_recv_done);
98 if (IS_ERR(vq))
99 return PTR_ERR(vq);
100
101 err = hwrng_register(&virtio_hwrng);
102 if (err) {
103 vdev->config->del_vq(vq);
104 return err;
105 }
106
107 register_buffer();
108 return 0;
109}
110
111static void virtrng_remove(struct virtio_device *vdev)
112{
113 vdev->config->reset(vdev);
114 hwrng_unregister(&virtio_hwrng);
115 vdev->config->del_vq(vq);
116}
117
118static struct virtio_device_id id_table[] = {
119 { VIRTIO_ID_RNG, VIRTIO_DEV_ANY_ID },
120 { 0 },
121};
122
123static struct virtio_driver virtio_rng = {
124 .driver.name = KBUILD_MODNAME,
125 .driver.owner = THIS_MODULE,
126 .id_table = id_table,
127 .probe = virtrng_probe,
128 .remove = __devexit_p(virtrng_remove),
129};
130
131static int __init init(void)
132{
133 int err;
134
135 random_data = kmalloc(RANDOM_DATA_SIZE, GFP_KERNEL);
136 if (!random_data)
137 return -ENOMEM;
138
139 err = register_virtio_driver(&virtio_rng);
140 if (err)
141 kfree(random_data);
142 return err;
143}
144
145static void __exit fini(void)
146{
147 kfree(random_data);
148 unregister_virtio_driver(&virtio_rng);
149}
150module_init(init);
151module_exit(fini);
152
153MODULE_DEVICE_TABLE(virtio, id_table);
154MODULE_DESCRIPTION("Virtio random number driver");
155MODULE_LICENSE("GPL");
diff --git a/drivers/char/ip2/Makefile b/drivers/char/ip2/Makefile
index 6bfe2543ddc2..939618f62fe1 100644
--- a/drivers/char/ip2/Makefile
+++ b/drivers/char/ip2/Makefile
@@ -2,7 +2,7 @@
2# Makefile for the Computone IntelliPort Plus Driver 2# Makefile for the Computone IntelliPort Plus Driver
3# 3#
4 4
5obj-$(CONFIG_COMPUTONE) += ip2.o ip2main.o 5obj-$(CONFIG_COMPUTONE) += ip2.o
6 6
7ip2-objs := ip2base.o 7ip2-objs := ip2base.o ip2main.o
8 8
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c
index 70957acaa960..c12cf8fc4be0 100644
--- a/drivers/char/ip2/ip2main.c
+++ b/drivers/char/ip2/ip2main.c
@@ -346,27 +346,6 @@ have_requested_irq( char irq )
346} 346}
347 347
348/******************************************************************************/ 348/******************************************************************************/
349/* Function: init_module() */
350/* Parameters: None */
351/* Returns: Success (0) */
352/* */
353/* Description: */
354/* This is a required entry point for an installable module. It simply calls */
355/* the driver initialisation function and returns what it returns. */
356/******************************************************************************/
357#ifdef MODULE
358static int __init
359ip2_init_module(void)
360{
361#ifdef IP2DEBUG_INIT
362 printk (KERN_DEBUG "Loading module ...\n" );
363#endif
364 return 0;
365}
366module_init(ip2_init_module);
367#endif /* MODULE */
368
369/******************************************************************************/
370/* Function: cleanup_module() */ 349/* Function: cleanup_module() */
371/* Parameters: None */ 350/* Parameters: None */
372/* Returns: Nothing */ 351/* Returns: Nothing */
@@ -779,8 +758,6 @@ out:
779 return err; 758 return err;
780} 759}
781 760
782EXPORT_SYMBOL(ip2_loadmain);
783
784/******************************************************************************/ 761/******************************************************************************/
785/* Function: ip2_init_board() */ 762/* Function: ip2_init_board() */
786/* Parameters: Index of board in configuration structure */ 763/* Parameters: Index of board in configuration structure */
diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c
index 7f7e798c1384..d9a0a53c842d 100644
--- a/drivers/char/keyboard.c
+++ b/drivers/char/keyboard.c
@@ -677,12 +677,7 @@ static void k_deadunicode(struct vc_data *vc, unsigned int value, char up_flag)
677 677
678static void k_self(struct vc_data *vc, unsigned char value, char up_flag) 678static void k_self(struct vc_data *vc, unsigned char value, char up_flag)
679{ 679{
680 unsigned int uni; 680 k_unicode(vc, conv_8bit_to_uni(value), up_flag);
681 if (kbd->kbdmode == VC_UNICODE)
682 uni = value;
683 else
684 uni = conv_8bit_to_uni(value);
685 k_unicode(vc, uni, up_flag);
686} 681}
687 682
688static void k_dead2(struct vc_data *vc, unsigned char value, char up_flag) 683static void k_dead2(struct vc_data *vc, unsigned char value, char up_flag)
diff --git a/drivers/char/pcmcia/ipwireless/hardware.c b/drivers/char/pcmcia/ipwireless/hardware.c
index fa9d3c945f31..ba6340ae98af 100644
--- a/drivers/char/pcmcia/ipwireless/hardware.c
+++ b/drivers/char/pcmcia/ipwireless/hardware.c
@@ -251,10 +251,11 @@ struct ipw_hardware {
251 int init_loops; 251 int init_loops;
252 struct timer_list setup_timer; 252 struct timer_list setup_timer;
253 253
254 /* Flag if hw is ready to send next packet */
254 int tx_ready; 255 int tx_ready;
255 struct list_head tx_queue[NL_NUM_OF_PRIORITIES]; 256 /* Count of pending packets to be sent */
256 /* True if any packets are queued for transmission */
257 int tx_queued; 257 int tx_queued;
258 struct list_head tx_queue[NL_NUM_OF_PRIORITIES];
258 259
259 int rx_bytes_queued; 260 int rx_bytes_queued;
260 struct list_head rx_queue; 261 struct list_head rx_queue;
@@ -404,6 +405,8 @@ static int do_send_fragment(struct ipw_hardware *hw, const unsigned char *data,
404 405
405 spin_lock_irqsave(&hw->spinlock, flags); 406 spin_lock_irqsave(&hw->spinlock, flags);
406 407
408 hw->tx_ready = 0;
409
407 if (hw->hw_version == HW_VERSION_1) { 410 if (hw->hw_version == HW_VERSION_1) {
408 outw((unsigned short) length, hw->base_port + IODWR); 411 outw((unsigned short) length, hw->base_port + IODWR);
409 412
@@ -492,6 +495,7 @@ static int do_send_packet(struct ipw_hardware *hw, struct ipw_tx_packet *packet)
492 495
493 spin_lock_irqsave(&hw->spinlock, flags); 496 spin_lock_irqsave(&hw->spinlock, flags);
494 list_add(&packet->queue, &hw->tx_queue[0]); 497 list_add(&packet->queue, &hw->tx_queue[0]);
498 hw->tx_queued++;
495 spin_unlock_irqrestore(&hw->spinlock, flags); 499 spin_unlock_irqrestore(&hw->spinlock, flags);
496 } else { 500 } else {
497 if (packet->packet_callback) 501 if (packet->packet_callback)
@@ -949,12 +953,10 @@ static int send_pending_packet(struct ipw_hardware *hw, int priority_limit)
949 unsigned long flags; 953 unsigned long flags;
950 954
951 spin_lock_irqsave(&hw->spinlock, flags); 955 spin_lock_irqsave(&hw->spinlock, flags);
952 if (hw->tx_queued && hw->tx_ready != 0) { 956 if (hw->tx_queued && hw->tx_ready) {
953 int priority; 957 int priority;
954 struct ipw_tx_packet *packet = NULL; 958 struct ipw_tx_packet *packet = NULL;
955 959
956 hw->tx_ready--;
957
958 /* Pick a packet */ 960 /* Pick a packet */
959 for (priority = 0; priority < priority_limit; priority++) { 961 for (priority = 0; priority < priority_limit; priority++) {
960 if (!list_empty(&hw->tx_queue[priority])) { 962 if (!list_empty(&hw->tx_queue[priority])) {
@@ -963,6 +965,7 @@ static int send_pending_packet(struct ipw_hardware *hw, int priority_limit)
963 struct ipw_tx_packet, 965 struct ipw_tx_packet,
964 queue); 966 queue);
965 967
968 hw->tx_queued--;
966 list_del(&packet->queue); 969 list_del(&packet->queue);
967 970
968 break; 971 break;
@@ -973,6 +976,7 @@ static int send_pending_packet(struct ipw_hardware *hw, int priority_limit)
973 spin_unlock_irqrestore(&hw->spinlock, flags); 976 spin_unlock_irqrestore(&hw->spinlock, flags);
974 return 0; 977 return 0;
975 } 978 }
979
976 spin_unlock_irqrestore(&hw->spinlock, flags); 980 spin_unlock_irqrestore(&hw->spinlock, flags);
977 981
978 /* Send */ 982 /* Send */
@@ -1063,7 +1067,7 @@ static irqreturn_t ipwireless_handle_v1_interrupt(int irq,
1063 if (irqn & IR_TXINTR) { 1067 if (irqn & IR_TXINTR) {
1064 ack |= IR_TXINTR; 1068 ack |= IR_TXINTR;
1065 spin_lock_irqsave(&hw->spinlock, flags); 1069 spin_lock_irqsave(&hw->spinlock, flags);
1066 hw->tx_ready++; 1070 hw->tx_ready = 1;
1067 spin_unlock_irqrestore(&hw->spinlock, flags); 1071 spin_unlock_irqrestore(&hw->spinlock, flags);
1068 } 1072 }
1069 /* Received data */ 1073 /* Received data */
@@ -1170,7 +1174,7 @@ static irqreturn_t ipwireless_handle_v2_v3_interrupt(int irq,
1170 if (memrxdone & MEMRX_RX_DONE) { 1174 if (memrxdone & MEMRX_RX_DONE) {
1171 writew(0, &hw->memory_info_regs->memreg_rx_done); 1175 writew(0, &hw->memory_info_regs->memreg_rx_done);
1172 spin_lock_irqsave(&hw->spinlock, flags); 1176 spin_lock_irqsave(&hw->spinlock, flags);
1173 hw->tx_ready++; 1177 hw->tx_ready = 1;
1174 spin_unlock_irqrestore(&hw->spinlock, flags); 1178 spin_unlock_irqrestore(&hw->spinlock, flags);
1175 tx = 1; 1179 tx = 1;
1176 } 1180 }
@@ -1234,7 +1238,7 @@ static void send_packet(struct ipw_hardware *hw, int priority,
1234 1238
1235 spin_lock_irqsave(&hw->spinlock, flags); 1239 spin_lock_irqsave(&hw->spinlock, flags);
1236 list_add_tail(&packet->queue, &hw->tx_queue[priority]); 1240 list_add_tail(&packet->queue, &hw->tx_queue[priority]);
1237 hw->tx_queued = 1; 1241 hw->tx_queued++;
1238 spin_unlock_irqrestore(&hw->spinlock, flags); 1242 spin_unlock_irqrestore(&hw->spinlock, flags);
1239 1243
1240 flush_packets_to_hw(hw); 1244 flush_packets_to_hw(hw);
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c
index 9e9bad8bdcf4..dbce1263bdff 100644
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@ -402,6 +402,7 @@ static struct sysrq_key_op *sysrq_key_table[36] = {
402 &sysrq_showstate_blocked_op, /* w */ 402 &sysrq_showstate_blocked_op, /* w */
403 /* x: May be registered on ppc/powerpc for xmon */ 403 /* x: May be registered on ppc/powerpc for xmon */
404 NULL, /* x */ 404 NULL, /* x */
405 /* y: May be registered on sparc64 for global register dump */
405 NULL, /* y */ 406 NULL, /* y */
406 NULL /* z */ 407 NULL /* z */
407}; 408};
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index e94bee032314..750131010af0 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -3322,7 +3322,7 @@ static int send_break(struct tty_struct *tty, unsigned int duration)
3322 msleep_interruptible(duration); 3322 msleep_interruptible(duration);
3323 tty->ops->break_ctl(tty, 0); 3323 tty->ops->break_ctl(tty, 0);
3324 tty_write_unlock(tty); 3324 tty_write_unlock(tty);
3325 if (!signal_pending(current)) 3325 if (signal_pending(current))
3326 return -EINTR; 3326 return -EINTR;
3327 return 0; 3327 return 0;
3328} 3328}
diff --git a/drivers/char/tty_ioctl.c b/drivers/char/tty_ioctl.c
index b1a757a5ee27..8f81139d6194 100644
--- a/drivers/char/tty_ioctl.c
+++ b/drivers/char/tty_ioctl.c
@@ -981,16 +981,9 @@ EXPORT_SYMBOL_GPL(tty_perform_flush);
981int n_tty_ioctl(struct tty_struct *tty, struct file *file, 981int n_tty_ioctl(struct tty_struct *tty, struct file *file,
982 unsigned int cmd, unsigned long arg) 982 unsigned int cmd, unsigned long arg)
983{ 983{
984 struct tty_struct *real_tty;
985 unsigned long flags; 984 unsigned long flags;
986 int retval; 985 int retval;
987 986
988 if (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
989 tty->driver->subtype == PTY_TYPE_MASTER)
990 real_tty = tty->link;
991 else
992 real_tty = tty;
993
994 switch (cmd) { 987 switch (cmd) {
995 case TCXONC: 988 case TCXONC:
996 retval = tty_check_change(tty); 989 retval = tty_check_change(tty);
diff --git a/drivers/char/viocons.c b/drivers/char/viocons.c
index 3d3e1c2b310f..65fb848e1cce 100644
--- a/drivers/char/viocons.c
+++ b/drivers/char/viocons.c
@@ -7,7 +7,7 @@
7 * Authors: Dave Boutcher <boutcher@us.ibm.com> 7 * Authors: Dave Boutcher <boutcher@us.ibm.com>
8 * Ryan Arnold <ryanarn@us.ibm.com> 8 * Ryan Arnold <ryanarn@us.ibm.com>
9 * Colin Devilbiss <devilbis@us.ibm.com> 9 * Colin Devilbiss <devilbis@us.ibm.com>
10 * Stephen Rothwell <sfr@au1.ibm.com> 10 * Stephen Rothwell
11 * 11 *
12 * (C) Copyright 2000, 2001, 2002, 2003, 2004 IBM Corporation 12 * (C) Copyright 2000, 2001, 2002, 2003, 2004 IBM Corporation
13 * 13 *
diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c
index 58aad63831f4..c39ddaff5e8f 100644
--- a/drivers/char/viotape.c
+++ b/drivers/char/viotape.c
@@ -6,7 +6,7 @@
6 * Authors: Dave Boutcher <boutcher@us.ibm.com> 6 * Authors: Dave Boutcher <boutcher@us.ibm.com>
7 * Ryan Arnold <ryanarn@us.ibm.com> 7 * Ryan Arnold <ryanarn@us.ibm.com>
8 * Colin Devilbiss <devilbis@us.ibm.com> 8 * Colin Devilbiss <devilbis@us.ibm.com>
9 * Stephen Rothwell <sfr@au1.ibm.com> 9 * Stephen Rothwell
10 * 10 *
11 * (C) Copyright 2000-2004 IBM Corporation 11 * (C) Copyright 2000-2004 IBM Corporation
12 * 12 *
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index fa1ffbf2c621..935f1c207a1f 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -434,7 +434,7 @@ static void update_attr(struct vc_data *vc)
434 vc->vc_blink, vc->vc_underline, 434 vc->vc_blink, vc->vc_underline,
435 vc->vc_reverse ^ vc->vc_decscnm, vc->vc_italic); 435 vc->vc_reverse ^ vc->vc_decscnm, vc->vc_italic);
436 vc->vc_video_erase_char = (build_attr(vc, vc->vc_color, 1, vc->vc_blink, 0, vc->vc_decscnm, 0) << 8) | ' '; 436 vc->vc_video_erase_char = (build_attr(vc, vc->vc_color, 1, vc->vc_blink, 0, vc->vc_decscnm, 0) << 8) | ' ';
437 vc->vc_scrl_erase_char = (build_attr(vc, vc->vc_def_color, 1, false, false, false, false) << 8) | ' '; 437 vc->vc_scrl_erase_char = (build_attr(vc, vc->vc_def_color, 1, false, false, vc->vc_decscnm, false) << 8) | ' ';
438} 438}
439 439
440/* Note: inverting the screen twice should revert to the original state */ 440/* Note: inverting the screen twice should revert to the original state */
@@ -909,7 +909,7 @@ int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int lines)
909 909
910 if (vc->vc_tty) { 910 if (vc->vc_tty) {
911 struct winsize ws, *cws = &vc->vc_tty->winsize; 911 struct winsize ws, *cws = &vc->vc_tty->winsize;
912 unsigned long flags; 912 struct pid *pgrp = NULL;
913 913
914 memset(&ws, 0, sizeof(ws)); 914 memset(&ws, 0, sizeof(ws));
915 ws.ws_row = vc->vc_rows; 915 ws.ws_row = vc->vc_rows;
@@ -917,11 +917,14 @@ int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int lines)
917 ws.ws_ypixel = vc->vc_scan_lines; 917 ws.ws_ypixel = vc->vc_scan_lines;
918 918
919 mutex_lock(&vc->vc_tty->termios_mutex); 919 mutex_lock(&vc->vc_tty->termios_mutex);
920 spin_lock_irqsave(&vc->vc_tty->ctrl_lock, flags); 920 spin_lock_irq(&vc->vc_tty->ctrl_lock);
921 if ((ws.ws_row != cws->ws_row || ws.ws_col != cws->ws_col) && 921 if ((ws.ws_row != cws->ws_row || ws.ws_col != cws->ws_col))
922 vc->vc_tty->pgrp) 922 pgrp = get_pid(vc->vc_tty->pgrp);
923 spin_unlock_irq(&vc->vc_tty->ctrl_lock);
924 if (pgrp) {
923 kill_pgrp(vc->vc_tty->pgrp, SIGWINCH, 1); 925 kill_pgrp(vc->vc_tty->pgrp, SIGWINCH, 1);
924 spin_unlock_irqrestore(&vc->vc_tty->ctrl_lock, flags); 926 put_pid(pgrp);
927 }
925 *cws = ws; 928 *cws = ws;
926 mutex_unlock(&vc->vc_tty->termios_mutex); 929 mutex_unlock(&vc->vc_tty->termios_mutex);
927 } 930 }
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c
index 85e2ba7fcfba..bf4830082a13 100644
--- a/drivers/connector/connector.c
+++ b/drivers/connector/connector.c
@@ -27,6 +27,8 @@
27#include <linux/moduleparam.h> 27#include <linux/moduleparam.h>
28#include <linux/connector.h> 28#include <linux/connector.h>
29#include <linux/mutex.h> 29#include <linux/mutex.h>
30#include <linux/proc_fs.h>
31#include <linux/spinlock.h>
30 32
31#include <net/sock.h> 33#include <net/sock.h>
32 34
@@ -403,6 +405,40 @@ static void cn_callback(void *data)
403 mutex_unlock(&notify_lock); 405 mutex_unlock(&notify_lock);
404} 406}
405 407
408static int cn_proc_show(struct seq_file *m, void *v)
409{
410 struct cn_queue_dev *dev = cdev.cbdev;
411 struct cn_callback_entry *cbq;
412
413 seq_printf(m, "Name ID\n");
414
415 spin_lock_bh(&dev->queue_lock);
416
417 list_for_each_entry(cbq, &dev->queue_list, callback_entry) {
418 seq_printf(m, "%-15s %u:%u\n",
419 cbq->id.name,
420 cbq->id.id.idx,
421 cbq->id.id.val);
422 }
423
424 spin_unlock_bh(&dev->queue_lock);
425
426 return 0;
427}
428
429static int cn_proc_open(struct inode *inode, struct file *file)
430{
431 return single_open(file, cn_proc_show, NULL);
432}
433
434static const struct file_operations cn_file_ops = {
435 .owner = THIS_MODULE,
436 .open = cn_proc_open,
437 .read = seq_read,
438 .llseek = seq_lseek,
439 .release = single_release
440};
441
406static int __devinit cn_init(void) 442static int __devinit cn_init(void)
407{ 443{
408 struct cn_dev *dev = &cdev; 444 struct cn_dev *dev = &cdev;
@@ -434,6 +470,8 @@ static int __devinit cn_init(void)
434 return -EINVAL; 470 return -EINVAL;
435 } 471 }
436 472
473 proc_net_fops_create(&init_net, "connector", S_IRUGO, &cn_file_ops);
474
437 return 0; 475 return 0;
438} 476}
439 477
@@ -443,6 +481,8 @@ static void __devexit cn_fini(void)
443 481
444 cn_already_initialized = 0; 482 cn_already_initialized = 0;
445 483
484 proc_net_remove(&init_net, "connector");
485
446 cn_del_callback(&dev->id); 486 cn_del_callback(&dev->id);
447 cn_queue_free_dev(dev->cbdev); 487 cn_queue_free_dev(dev->cbdev);
448 netlink_kernel_release(dev->nls); 488 netlink_kernel_release(dev->nls);
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 7fce038fa57e..1d41496ed2f8 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -412,7 +412,7 @@ static int cpufreq_parse_governor(char *str_governor, unsigned int *policy,
412 int ret; 412 int ret;
413 413
414 mutex_unlock(&cpufreq_governor_mutex); 414 mutex_unlock(&cpufreq_governor_mutex);
415 ret = request_module(name); 415 ret = request_module("%s", name);
416 mutex_lock(&cpufreq_governor_mutex); 416 mutex_lock(&cpufreq_governor_mutex);
417 417
418 if (ret == 0) 418 if (ret == 0)
@@ -625,7 +625,7 @@ static ssize_t store_scaling_setspeed(struct cpufreq_policy *policy,
625 unsigned int freq = 0; 625 unsigned int freq = 0;
626 unsigned int ret; 626 unsigned int ret;
627 627
628 if (!policy->governor->store_setspeed) 628 if (!policy->governor || !policy->governor->store_setspeed)
629 return -EINVAL; 629 return -EINVAL;
630 630
631 ret = sscanf(buf, "%u", &freq); 631 ret = sscanf(buf, "%u", &freq);
@@ -639,7 +639,7 @@ static ssize_t store_scaling_setspeed(struct cpufreq_policy *policy,
639 639
640static ssize_t show_scaling_setspeed(struct cpufreq_policy *policy, char *buf) 640static ssize_t show_scaling_setspeed(struct cpufreq_policy *policy, char *buf)
641{ 641{
642 if (!policy->governor->show_setspeed) 642 if (!policy->governor || !policy->governor->show_setspeed)
643 return sprintf(buf, "<unsupported>\n"); 643 return sprintf(buf, "<unsupported>\n");
644 644
645 return policy->governor->show_setspeed(policy, buf); 645 return policy->governor->show_setspeed(policy, buf);
@@ -928,13 +928,13 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
928 policy->user_policy.policy = policy->policy; 928 policy->user_policy.policy = policy->policy;
929 policy->user_policy.governor = policy->governor; 929 policy->user_policy.governor = policy->governor;
930 930
931 unlock_policy_rwsem_write(cpu);
932
933 if (ret) { 931 if (ret) {
934 dprintk("setting policy failed\n"); 932 dprintk("setting policy failed\n");
935 goto err_out_unregister; 933 goto err_out_unregister;
936 } 934 }
937 935
936 unlock_policy_rwsem_write(cpu);
937
938 kobject_uevent(&policy->kobj, KOBJ_ADD); 938 kobject_uevent(&policy->kobj, KOBJ_ADD);
939 module_put(cpufreq_driver->owner); 939 module_put(cpufreq_driver->owner);
940 dprintk("initialization complete\n"); 940 dprintk("initialization complete\n");
diff --git a/drivers/cpufreq/freq_table.c b/drivers/cpufreq/freq_table.c
index ae6cd60d5c14..b64c6bc445e3 100644
--- a/drivers/cpufreq/freq_table.c
+++ b/drivers/cpufreq/freq_table.c
@@ -2,6 +2,11 @@
2 * linux/drivers/cpufreq/freq_table.c 2 * linux/drivers/cpufreq/freq_table.c
3 * 3 *
4 * Copyright (C) 2002 - 2003 Dominik Brodowski 4 * Copyright (C) 2002 - 2003 Dominik Brodowski
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 *
5 */ 10 */
6 11
7#include <linux/kernel.h> 12#include <linux/kernel.h>
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index fc555a90bb21..23554b676d6e 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -38,6 +38,8 @@ static void cpuidle_kick_cpus(void)
38static void cpuidle_kick_cpus(void) {} 38static void cpuidle_kick_cpus(void) {}
39#endif 39#endif
40 40
41static int __cpuidle_register_device(struct cpuidle_device *dev);
42
41/** 43/**
42 * cpuidle_idle_call - the main idle loop 44 * cpuidle_idle_call - the main idle loop
43 * 45 *
@@ -138,6 +140,12 @@ int cpuidle_enable_device(struct cpuidle_device *dev)
138 if (!dev->state_count) 140 if (!dev->state_count)
139 return -EINVAL; 141 return -EINVAL;
140 142
143 if (dev->registered == 0) {
144 ret = __cpuidle_register_device(dev);
145 if (ret)
146 return ret;
147 }
148
141 if ((ret = cpuidle_add_state_sysfs(dev))) 149 if ((ret = cpuidle_add_state_sysfs(dev)))
142 return ret; 150 return ret;
143 151
@@ -232,10 +240,13 @@ static void poll_idle_init(struct cpuidle_device *dev) {}
232#endif /* CONFIG_ARCH_HAS_CPU_RELAX */ 240#endif /* CONFIG_ARCH_HAS_CPU_RELAX */
233 241
234/** 242/**
235 * cpuidle_register_device - registers a CPU's idle PM feature 243 * __cpuidle_register_device - internal register function called before register
244 * and enable routines
236 * @dev: the cpu 245 * @dev: the cpu
246 *
247 * cpuidle_lock mutex must be held before this is called
237 */ 248 */
238int cpuidle_register_device(struct cpuidle_device *dev) 249static int __cpuidle_register_device(struct cpuidle_device *dev)
239{ 250{
240 int ret; 251 int ret;
241 struct sys_device *sys_dev = get_cpu_sysdev((unsigned long)dev->cpu); 252 struct sys_device *sys_dev = get_cpu_sysdev((unsigned long)dev->cpu);
@@ -247,18 +258,34 @@ int cpuidle_register_device(struct cpuidle_device *dev)
247 258
248 init_completion(&dev->kobj_unregister); 259 init_completion(&dev->kobj_unregister);
249 260
250 mutex_lock(&cpuidle_lock);
251
252 poll_idle_init(dev); 261 poll_idle_init(dev);
253 262
254 per_cpu(cpuidle_devices, dev->cpu) = dev; 263 per_cpu(cpuidle_devices, dev->cpu) = dev;
255 list_add(&dev->device_list, &cpuidle_detected_devices); 264 list_add(&dev->device_list, &cpuidle_detected_devices);
256 if ((ret = cpuidle_add_sysfs(sys_dev))) { 265 if ((ret = cpuidle_add_sysfs(sys_dev))) {
257 mutex_unlock(&cpuidle_lock);
258 module_put(cpuidle_curr_driver->owner); 266 module_put(cpuidle_curr_driver->owner);
259 return ret; 267 return ret;
260 } 268 }
261 269
270 dev->registered = 1;
271 return 0;
272}
273
274/**
275 * cpuidle_register_device - registers a CPU's idle PM feature
276 * @dev: the cpu
277 */
278int cpuidle_register_device(struct cpuidle_device *dev)
279{
280 int ret;
281
282 mutex_lock(&cpuidle_lock);
283
284 if ((ret = __cpuidle_register_device(dev))) {
285 mutex_unlock(&cpuidle_lock);
286 return ret;
287 }
288
262 cpuidle_enable_device(dev); 289 cpuidle_enable_device(dev);
263 cpuidle_install_idle_handler(); 290 cpuidle_install_idle_handler();
264 291
@@ -278,6 +305,9 @@ void cpuidle_unregister_device(struct cpuidle_device *dev)
278{ 305{
279 struct sys_device *sys_dev = get_cpu_sysdev((unsigned long)dev->cpu); 306 struct sys_device *sys_dev = get_cpu_sysdev((unsigned long)dev->cpu);
280 307
308 if (dev->registered == 0)
309 return;
310
281 cpuidle_pause_and_lock(); 311 cpuidle_pause_and_lock();
282 312
283 cpuidle_disable_device(dev); 313 cpuidle_disable_device(dev);
diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c
index 762b729672e0..0ec0f431e6a1 100644
--- a/drivers/dma/iop-adma.c
+++ b/drivers/dma/iop-adma.c
@@ -821,10 +821,10 @@ static int __devinit iop_adma_memcpy_self_test(struct iop_adma_device *device)
821 821
822 dev_dbg(device->common.dev, "%s\n", __func__); 822 dev_dbg(device->common.dev, "%s\n", __func__);
823 823
824 src = kzalloc(sizeof(u8) * IOP_ADMA_TEST_SIZE, GFP_KERNEL); 824 src = kmalloc(IOP_ADMA_TEST_SIZE, GFP_KERNEL);
825 if (!src) 825 if (!src)
826 return -ENOMEM; 826 return -ENOMEM;
827 dest = kzalloc(sizeof(u8) * IOP_ADMA_TEST_SIZE, GFP_KERNEL); 827 dest = kzalloc(IOP_ADMA_TEST_SIZE, GFP_KERNEL);
828 if (!dest) { 828 if (!dest) {
829 kfree(src); 829 kfree(src);
830 return -ENOMEM; 830 return -ENOMEM;
@@ -834,8 +834,6 @@ static int __devinit iop_adma_memcpy_self_test(struct iop_adma_device *device)
834 for (i = 0; i < IOP_ADMA_TEST_SIZE; i++) 834 for (i = 0; i < IOP_ADMA_TEST_SIZE; i++)
835 ((u8 *) src)[i] = (u8)i; 835 ((u8 *) src)[i] = (u8)i;
836 836
837 memset(dest, 0, IOP_ADMA_TEST_SIZE);
838
839 /* Start copy, using first DMA channel */ 837 /* Start copy, using first DMA channel */
840 dma_chan = container_of(device->common.channels.next, 838 dma_chan = container_of(device->common.channels.next,
841 struct dma_chan, 839 struct dma_chan,
diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c
index 065732ddf40c..d49361bfe670 100644
--- a/drivers/edac/mpc85xx_edac.c
+++ b/drivers/edac/mpc85xx_edac.c
@@ -20,7 +20,6 @@
20 20
21#include <linux/of_platform.h> 21#include <linux/of_platform.h>
22#include <linux/of_device.h> 22#include <linux/of_device.h>
23#include <asm/mpc85xx.h>
24#include "edac_module.h" 23#include "edac_module.h"
25#include "edac_core.h" 24#include "edac_core.h"
26#include "mpc85xx_edac.h" 25#include "mpc85xx_edac.h"
@@ -43,8 +42,6 @@ static u32 orig_pci_err_en;
43static u32 orig_l2_err_disable; 42static u32 orig_l2_err_disable;
44static u32 orig_hid1; 43static u32 orig_hid1;
45 44
46static const char *mpc85xx_ctl_name = "MPC85xx";
47
48/************************ MC SYSFS parts ***********************************/ 45/************************ MC SYSFS parts ***********************************/
49 46
50static ssize_t mpc85xx_mc_inject_data_hi_show(struct mem_ctl_info *mci, 47static ssize_t mpc85xx_mc_inject_data_hi_show(struct mem_ctl_info *mci,
diff --git a/drivers/firewire/Kconfig b/drivers/firewire/Kconfig
index fb4d391810b6..76f26710fc16 100644
--- a/drivers/firewire/Kconfig
+++ b/drivers/firewire/Kconfig
@@ -1,28 +1,26 @@
1comment "An alternative FireWire stack is available with EXPERIMENTAL=y" 1comment "A new alternative FireWire stack is available with EXPERIMENTAL=y"
2 depends on EXPERIMENTAL=n 2 depends on EXPERIMENTAL=n
3 3
4comment "Enable only one of the two stacks, unless you know what you are doing"
5 depends on EXPERIMENTAL
6
4config FIREWIRE 7config FIREWIRE
5 tristate "IEEE 1394 (FireWire) support - alternative stack, EXPERIMENTAL" 8 tristate "New FireWire stack, EXPERIMENTAL"
6 depends on EXPERIMENTAL 9 depends on EXPERIMENTAL
7 select CRC_ITU_T 10 select CRC_ITU_T
8 help 11 help
9 This is the "Juju" FireWire stack, a new alternative implementation 12 This is the "Juju" FireWire stack, a new alternative implementation
10 designed for robustness and simplicity. You can build either this 13 designed for robustness and simplicity. You can build either this
11 stack, or the classic stack (the ieee1394 driver, ohci1394 etc.) 14 stack, or the old stack (the ieee1394 driver, ohci1394 etc.) or both.
12 or both. Please read http://wiki.linux1394.org/JujuMigration before 15 Please read http://wiki.linux1394.org/JujuMigration before you
13 you enable the new stack. 16 enable the new stack.
14 17
15 To compile this driver as a module, say M here: the module will be 18 To compile this driver as a module, say M here: the module will be
16 called firewire-core. It functionally replaces ieee1394, raw1394, 19 called firewire-core. It functionally replaces ieee1394, raw1394,
17 and video1394. 20 and video1394.
18 21
19 NOTE:
20
21 You should only build ONE of the stacks, unless you REALLY know what
22 you are doing.
23
24config FIREWIRE_OHCI 22config FIREWIRE_OHCI
25 tristate "Support for OHCI FireWire host controllers" 23 tristate "OHCI-1394 controllers"
26 depends on PCI && FIREWIRE 24 depends on PCI && FIREWIRE
27 help 25 help
28 Enable this driver if you have a FireWire controller based 26 Enable this driver if you have a FireWire controller based
@@ -33,12 +31,12 @@ config FIREWIRE_OHCI
33 called firewire-ohci. It replaces ohci1394 of the classic IEEE 1394 31 called firewire-ohci. It replaces ohci1394 of the classic IEEE 1394
34 stack. 32 stack.
35 33
36 NOTE: 34 NOTE:
37 35
38 You should only build ohci1394 or firewire-ohci, but not both. 36 You should only build either firewire-ohci or the old ohci1394 driver,
39 If you nevertheless want to install both, you should configure them 37 but not both. If you nevertheless want to install both, you should
40 only as modules and blacklist the driver(s) which you don't want to 38 configure them only as modules and blacklist the driver(s) which you
41 have auto-loaded. Add either 39 don't want to have auto-loaded. Add either
42 40
43 blacklist firewire-ohci 41 blacklist firewire-ohci
44 or 42 or
@@ -60,7 +58,7 @@ config FIREWIRE_OHCI_DEBUG
60 default y 58 default y
61 59
62config FIREWIRE_SBP2 60config FIREWIRE_SBP2
63 tristate "Support for storage devices (SBP-2 protocol driver)" 61 tristate "Storage devices (SBP-2 protocol)"
64 depends on FIREWIRE && SCSI 62 depends on FIREWIRE && SCSI
65 help 63 help
66 This option enables you to use SBP-2 devices connected to a 64 This option enables you to use SBP-2 devices connected to a
diff --git a/drivers/firewire/fw-cdev.c b/drivers/firewire/fw-cdev.c
index 4a541921a14a..c639915fc3cb 100644
--- a/drivers/firewire/fw-cdev.c
+++ b/drivers/firewire/fw-cdev.c
@@ -113,6 +113,11 @@ static int fw_device_op_open(struct inode *inode, struct file *file)
113 if (device == NULL) 113 if (device == NULL)
114 return -ENODEV; 114 return -ENODEV;
115 115
116 if (fw_device_is_shutdown(device)) {
117 fw_device_put(device);
118 return -ENODEV;
119 }
120
116 client = kzalloc(sizeof(*client), GFP_KERNEL); 121 client = kzalloc(sizeof(*client), GFP_KERNEL);
117 if (client == NULL) { 122 if (client == NULL) {
118 fw_device_put(device); 123 fw_device_put(device);
@@ -200,6 +205,7 @@ fw_device_op_read(struct file *file,
200 return dequeue_event(client, buffer, count); 205 return dequeue_event(client, buffer, count);
201} 206}
202 207
208/* caller must hold card->lock so that node pointers can be dereferenced here */
203static void 209static void
204fill_bus_reset_event(struct fw_cdev_event_bus_reset *event, 210fill_bus_reset_event(struct fw_cdev_event_bus_reset *event,
205 struct client *client) 211 struct client *client)
@@ -209,7 +215,6 @@ fill_bus_reset_event(struct fw_cdev_event_bus_reset *event,
209 event->closure = client->bus_reset_closure; 215 event->closure = client->bus_reset_closure;
210 event->type = FW_CDEV_EVENT_BUS_RESET; 216 event->type = FW_CDEV_EVENT_BUS_RESET;
211 event->generation = client->device->generation; 217 event->generation = client->device->generation;
212 smp_rmb(); /* node_id must not be older than generation */
213 event->node_id = client->device->node_id; 218 event->node_id = client->device->node_id;
214 event->local_node_id = card->local_node->node_id; 219 event->local_node_id = card->local_node->node_id;
215 event->bm_node_id = 0; /* FIXME: We don't track the BM. */ 220 event->bm_node_id = 0; /* FIXME: We don't track the BM. */
@@ -269,6 +274,7 @@ static int ioctl_get_info(struct client *client, void *buffer)
269{ 274{
270 struct fw_cdev_get_info *get_info = buffer; 275 struct fw_cdev_get_info *get_info = buffer;
271 struct fw_cdev_event_bus_reset bus_reset; 276 struct fw_cdev_event_bus_reset bus_reset;
277 struct fw_card *card = client->device->card;
272 unsigned long ret = 0; 278 unsigned long ret = 0;
273 279
274 client->version = get_info->version; 280 client->version = get_info->version;
@@ -294,13 +300,17 @@ static int ioctl_get_info(struct client *client, void *buffer)
294 client->bus_reset_closure = get_info->bus_reset_closure; 300 client->bus_reset_closure = get_info->bus_reset_closure;
295 if (get_info->bus_reset != 0) { 301 if (get_info->bus_reset != 0) {
296 void __user *uptr = u64_to_uptr(get_info->bus_reset); 302 void __user *uptr = u64_to_uptr(get_info->bus_reset);
303 unsigned long flags;
297 304
305 spin_lock_irqsave(&card->lock, flags);
298 fill_bus_reset_event(&bus_reset, client); 306 fill_bus_reset_event(&bus_reset, client);
307 spin_unlock_irqrestore(&card->lock, flags);
308
299 if (copy_to_user(uptr, &bus_reset, sizeof(bus_reset))) 309 if (copy_to_user(uptr, &bus_reset, sizeof(bus_reset)))
300 return -EFAULT; 310 return -EFAULT;
301 } 311 }
302 312
303 get_info->card = client->device->card->index; 313 get_info->card = card->index;
304 314
305 return 0; 315 return 0;
306} 316}
@@ -901,6 +911,9 @@ fw_device_op_ioctl(struct file *file,
901{ 911{
902 struct client *client = file->private_data; 912 struct client *client = file->private_data;
903 913
914 if (fw_device_is_shutdown(client->device))
915 return -ENODEV;
916
904 return dispatch_ioctl(client, cmd, (void __user *) arg); 917 return dispatch_ioctl(client, cmd, (void __user *) arg);
905} 918}
906 919
@@ -911,6 +924,9 @@ fw_device_op_compat_ioctl(struct file *file,
911{ 924{
912 struct client *client = file->private_data; 925 struct client *client = file->private_data;
913 926
927 if (fw_device_is_shutdown(client->device))
928 return -ENODEV;
929
914 return dispatch_ioctl(client, cmd, compat_ptr(arg)); 930 return dispatch_ioctl(client, cmd, compat_ptr(arg));
915} 931}
916#endif 932#endif
@@ -922,6 +938,9 @@ static int fw_device_op_mmap(struct file *file, struct vm_area_struct *vma)
922 unsigned long size; 938 unsigned long size;
923 int page_count, retval; 939 int page_count, retval;
924 940
941 if (fw_device_is_shutdown(client->device))
942 return -ENODEV;
943
925 /* FIXME: We could support multiple buffers, but we don't. */ 944 /* FIXME: We could support multiple buffers, but we don't. */
926 if (client->buffer.pages != NULL) 945 if (client->buffer.pages != NULL)
927 return -EBUSY; 946 return -EBUSY;
diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
index 4f02c55f13e1..0b66306af479 100644
--- a/drivers/firewire/fw-ohci.c
+++ b/drivers/firewire/fw-ohci.c
@@ -265,27 +265,25 @@ static void log_irqs(u32 evt)
265 !(evt & OHCI1394_busReset)) 265 !(evt & OHCI1394_busReset))
266 return; 266 return;
267 267
268 printk(KERN_DEBUG KBUILD_MODNAME ": IRQ " 268 fw_notify("IRQ %08x%s%s%s%s%s%s%s%s%s%s%s%s%s\n", evt,
269 "%08x%s%s%s%s%s%s%s%s%s%s%s%s%s\n", 269 evt & OHCI1394_selfIDComplete ? " selfID" : "",
270 evt, 270 evt & OHCI1394_RQPkt ? " AR_req" : "",
271 evt & OHCI1394_selfIDComplete ? " selfID" : "", 271 evt & OHCI1394_RSPkt ? " AR_resp" : "",
272 evt & OHCI1394_RQPkt ? " AR_req" : "", 272 evt & OHCI1394_reqTxComplete ? " AT_req" : "",
273 evt & OHCI1394_RSPkt ? " AR_resp" : "", 273 evt & OHCI1394_respTxComplete ? " AT_resp" : "",
274 evt & OHCI1394_reqTxComplete ? " AT_req" : "", 274 evt & OHCI1394_isochRx ? " IR" : "",
275 evt & OHCI1394_respTxComplete ? " AT_resp" : "", 275 evt & OHCI1394_isochTx ? " IT" : "",
276 evt & OHCI1394_isochRx ? " IR" : "", 276 evt & OHCI1394_postedWriteErr ? " postedWriteErr" : "",
277 evt & OHCI1394_isochTx ? " IT" : "", 277 evt & OHCI1394_cycleTooLong ? " cycleTooLong" : "",
278 evt & OHCI1394_postedWriteErr ? " postedWriteErr" : "", 278 evt & OHCI1394_cycle64Seconds ? " cycle64Seconds" : "",
279 evt & OHCI1394_cycleTooLong ? " cycleTooLong" : "", 279 evt & OHCI1394_regAccessFail ? " regAccessFail" : "",
280 evt & OHCI1394_cycle64Seconds ? " cycle64Seconds" : "", 280 evt & OHCI1394_busReset ? " busReset" : "",
281 evt & OHCI1394_regAccessFail ? " regAccessFail" : "", 281 evt & ~(OHCI1394_selfIDComplete | OHCI1394_RQPkt |
282 evt & OHCI1394_busReset ? " busReset" : "", 282 OHCI1394_RSPkt | OHCI1394_reqTxComplete |
283 evt & ~(OHCI1394_selfIDComplete | OHCI1394_RQPkt | 283 OHCI1394_respTxComplete | OHCI1394_isochRx |
284 OHCI1394_RSPkt | OHCI1394_reqTxComplete | 284 OHCI1394_isochTx | OHCI1394_postedWriteErr |
285 OHCI1394_respTxComplete | OHCI1394_isochRx | 285 OHCI1394_cycleTooLong | OHCI1394_cycle64Seconds |
286 OHCI1394_isochTx | OHCI1394_postedWriteErr | 286 OHCI1394_regAccessFail | OHCI1394_busReset)
287 OHCI1394_cycleTooLong | OHCI1394_cycle64Seconds |
288 OHCI1394_regAccessFail | OHCI1394_busReset)
289 ? " ?" : ""); 287 ? " ?" : "");
290} 288}
291 289
@@ -308,23 +306,22 @@ static void log_selfids(int node_id, int generation, int self_id_count, u32 *s)
308 if (likely(!(param_debug & OHCI_PARAM_DEBUG_SELFIDS))) 306 if (likely(!(param_debug & OHCI_PARAM_DEBUG_SELFIDS)))
309 return; 307 return;
310 308
311 printk(KERN_DEBUG KBUILD_MODNAME ": %d selfIDs, generation %d, " 309 fw_notify("%d selfIDs, generation %d, local node ID %04x\n",
312 "local node ID %04x\n", self_id_count, generation, node_id); 310 self_id_count, generation, node_id);
313 311
314 for (; self_id_count--; ++s) 312 for (; self_id_count--; ++s)
315 if ((*s & 1 << 23) == 0) 313 if ((*s & 1 << 23) == 0)
316 printk(KERN_DEBUG "selfID 0: %08x, phy %d [%c%c%c] " 314 fw_notify("selfID 0: %08x, phy %d [%c%c%c] "
317 "%s gc=%d %s %s%s%s\n", 315 "%s gc=%d %s %s%s%s\n",
318 *s, *s >> 24 & 63, _p(s, 6), _p(s, 4), _p(s, 2), 316 *s, *s >> 24 & 63, _p(s, 6), _p(s, 4), _p(s, 2),
319 speed[*s >> 14 & 3], *s >> 16 & 63, 317 speed[*s >> 14 & 3], *s >> 16 & 63,
320 power[*s >> 8 & 7], *s >> 22 & 1 ? "L" : "", 318 power[*s >> 8 & 7], *s >> 22 & 1 ? "L" : "",
321 *s >> 11 & 1 ? "c" : "", *s & 2 ? "i" : ""); 319 *s >> 11 & 1 ? "c" : "", *s & 2 ? "i" : "");
322 else 320 else
323 printk(KERN_DEBUG "selfID n: %08x, phy %d " 321 fw_notify("selfID n: %08x, phy %d [%c%c%c%c%c%c%c%c]\n",
324 "[%c%c%c%c%c%c%c%c]\n", 322 *s, *s >> 24 & 63,
325 *s, *s >> 24 & 63, 323 _p(s, 16), _p(s, 14), _p(s, 12), _p(s, 10),
326 _p(s, 16), _p(s, 14), _p(s, 12), _p(s, 10), 324 _p(s, 8), _p(s, 6), _p(s, 4), _p(s, 2));
327 _p(s, 8), _p(s, 6), _p(s, 4), _p(s, 2));
328} 325}
329 326
330static const char *evts[] = { 327static const char *evts[] = {
@@ -373,15 +370,14 @@ static void log_ar_at_event(char dir, int speed, u32 *header, int evt)
373 evt = 0x1f; 370 evt = 0x1f;
374 371
375 if (evt == OHCI1394_evt_bus_reset) { 372 if (evt == OHCI1394_evt_bus_reset) {
376 printk(KERN_DEBUG "A%c evt_bus_reset, generation %d\n", 373 fw_notify("A%c evt_bus_reset, generation %d\n",
377 dir, (header[2] >> 16) & 0xff); 374 dir, (header[2] >> 16) & 0xff);
378 return; 375 return;
379 } 376 }
380 377
381 if (header[0] == ~header[1]) { 378 if (header[0] == ~header[1]) {
382 printk(KERN_DEBUG "A%c %s, %s, %08x\n", 379 fw_notify("A%c %s, %s, %08x\n",
383 dir, evts[evt], phys[header[0] >> 30 & 0x3], 380 dir, evts[evt], phys[header[0] >> 30 & 0x3], header[0]);
384 header[0]);
385 return; 381 return;
386 } 382 }
387 383
@@ -400,24 +396,23 @@ static void log_ar_at_event(char dir, int speed, u32 *header, int evt)
400 396
401 switch (tcode) { 397 switch (tcode) {
402 case 0xe: case 0xa: 398 case 0xe: case 0xa:
403 printk(KERN_DEBUG "A%c %s, %s\n", 399 fw_notify("A%c %s, %s\n", dir, evts[evt], tcodes[tcode]);
404 dir, evts[evt], tcodes[tcode]);
405 break; 400 break;
406 case 0x0: case 0x1: case 0x4: case 0x5: case 0x9: 401 case 0x0: case 0x1: case 0x4: case 0x5: case 0x9:
407 printk(KERN_DEBUG "A%c spd %x tl %02x, " 402 fw_notify("A%c spd %x tl %02x, "
408 "%04x -> %04x, %s, " 403 "%04x -> %04x, %s, "
409 "%s, %04x%08x%s\n", 404 "%s, %04x%08x%s\n",
410 dir, speed, header[0] >> 10 & 0x3f, 405 dir, speed, header[0] >> 10 & 0x3f,
411 header[1] >> 16, header[0] >> 16, evts[evt], 406 header[1] >> 16, header[0] >> 16, evts[evt],
412 tcodes[tcode], header[1] & 0xffff, header[2], specific); 407 tcodes[tcode], header[1] & 0xffff, header[2], specific);
413 break; 408 break;
414 default: 409 default:
415 printk(KERN_DEBUG "A%c spd %x tl %02x, " 410 fw_notify("A%c spd %x tl %02x, "
416 "%04x -> %04x, %s, " 411 "%04x -> %04x, %s, "
417 "%s%s\n", 412 "%s%s\n",
418 dir, speed, header[0] >> 10 & 0x3f, 413 dir, speed, header[0] >> 10 & 0x3f,
419 header[1] >> 16, header[0] >> 16, evts[evt], 414 header[1] >> 16, header[0] >> 16, evts[evt],
420 tcodes[tcode], specific); 415 tcodes[tcode], specific);
421 } 416 }
422} 417}
423 418
@@ -548,6 +543,11 @@ static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer)
548 p.header_length = 12; 543 p.header_length = 12;
549 p.payload_length = 0; 544 p.payload_length = 0;
550 break; 545 break;
546
547 default:
548 /* FIXME: Stop context, discard everything, and restart? */
549 p.header_length = 0;
550 p.payload_length = 0;
551 } 551 }
552 552
553 p.payload = (void *) buffer + p.header_length; 553 p.payload = (void *) buffer + p.header_length;
@@ -1468,6 +1468,9 @@ static int ohci_enable(struct fw_card *card, u32 *config_rom, size_t length)
1468 reg_write(ohci, OHCI1394_HCControlClear, 1468 reg_write(ohci, OHCI1394_HCControlClear,
1469 OHCI1394_HCControl_noByteSwapData); 1469 OHCI1394_HCControl_noByteSwapData);
1470 1470
1471 reg_write(ohci, OHCI1394_SelfIDBuffer, ohci->self_id_bus);
1472 reg_write(ohci, OHCI1394_LinkControlClear,
1473 OHCI1394_LinkControl_rcvPhyPkt);
1471 reg_write(ohci, OHCI1394_LinkControlSet, 1474 reg_write(ohci, OHCI1394_LinkControlSet,
1472 OHCI1394_LinkControl_rcvSelfID | 1475 OHCI1394_LinkControl_rcvSelfID |
1473 OHCI1394_LinkControl_cycleTimerEnable | 1476 OHCI1394_LinkControl_cycleTimerEnable |
@@ -1481,7 +1484,6 @@ static int ohci_enable(struct fw_card *card, u32 *config_rom, size_t length)
1481 ar_context_run(&ohci->ar_request_ctx); 1484 ar_context_run(&ohci->ar_request_ctx);
1482 ar_context_run(&ohci->ar_response_ctx); 1485 ar_context_run(&ohci->ar_response_ctx);
1483 1486
1484 reg_write(ohci, OHCI1394_SelfIDBuffer, ohci->self_id_bus);
1485 reg_write(ohci, OHCI1394_PhyUpperBound, 0x00010000); 1487 reg_write(ohci, OHCI1394_PhyUpperBound, 0x00010000);
1486 reg_write(ohci, OHCI1394_IntEventClear, ~0); 1488 reg_write(ohci, OHCI1394_IntEventClear, ~0);
1487 reg_write(ohci, OHCI1394_IntMaskClear, ~0); 1489 reg_write(ohci, OHCI1394_IntMaskClear, ~0);
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
index b2458bb8e9ca..227d2e036cd8 100644
--- a/drivers/firewire/fw-sbp2.c
+++ b/drivers/firewire/fw-sbp2.c
@@ -1051,7 +1051,8 @@ static int sbp2_scan_unit_dir(struct sbp2_target *tgt, u32 *directory,
1051 break; 1051 break;
1052 1052
1053 case SBP2_CSR_LOGICAL_UNIT_DIRECTORY: 1053 case SBP2_CSR_LOGICAL_UNIT_DIRECTORY:
1054 if (sbp2_scan_logical_unit_dir(tgt, ci.p + value) < 0) 1054 /* Adjust for the increment in the iterator */
1055 if (sbp2_scan_logical_unit_dir(tgt, ci.p - 1 + value) < 0)
1055 return -ENOMEM; 1056 return -ENOMEM;
1056 break; 1057 break;
1057 } 1058 }
diff --git a/drivers/firewire/fw-transaction.c b/drivers/firewire/fw-transaction.c
index ccf0e4cf108f..03ae8a77c479 100644
--- a/drivers/firewire/fw-transaction.c
+++ b/drivers/firewire/fw-transaction.c
@@ -20,6 +20,7 @@
20 20
21#include <linux/completion.h> 21#include <linux/completion.h>
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/kref.h>
23#include <linux/module.h> 24#include <linux/module.h>
24#include <linux/init.h> 25#include <linux/init.h>
25#include <linux/interrupt.h> 26#include <linux/interrupt.h>
@@ -297,37 +298,55 @@ EXPORT_SYMBOL(fw_send_request);
297struct fw_phy_packet { 298struct fw_phy_packet {
298 struct fw_packet packet; 299 struct fw_packet packet;
299 struct completion done; 300 struct completion done;
301 struct kref kref;
300}; 302};
301 303
302static void 304static void phy_packet_release(struct kref *kref)
303transmit_phy_packet_callback(struct fw_packet *packet, 305{
304 struct fw_card *card, int status) 306 struct fw_phy_packet *p =
307 container_of(kref, struct fw_phy_packet, kref);
308 kfree(p);
309}
310
311static void transmit_phy_packet_callback(struct fw_packet *packet,
312 struct fw_card *card, int status)
305{ 313{
306 struct fw_phy_packet *p = 314 struct fw_phy_packet *p =
307 container_of(packet, struct fw_phy_packet, packet); 315 container_of(packet, struct fw_phy_packet, packet);
308 316
309 complete(&p->done); 317 complete(&p->done);
318 kref_put(&p->kref, phy_packet_release);
310} 319}
311 320
312void fw_send_phy_config(struct fw_card *card, 321void fw_send_phy_config(struct fw_card *card,
313 int node_id, int generation, int gap_count) 322 int node_id, int generation, int gap_count)
314{ 323{
315 struct fw_phy_packet p; 324 struct fw_phy_packet *p;
325 long timeout = DIV_ROUND_UP(HZ, 10);
316 u32 data = PHY_IDENTIFIER(PHY_PACKET_CONFIG) | 326 u32 data = PHY_IDENTIFIER(PHY_PACKET_CONFIG) |
317 PHY_CONFIG_ROOT_ID(node_id) | 327 PHY_CONFIG_ROOT_ID(node_id) |
318 PHY_CONFIG_GAP_COUNT(gap_count); 328 PHY_CONFIG_GAP_COUNT(gap_count);
319 329
320 p.packet.header[0] = data; 330 p = kmalloc(sizeof(*p), GFP_KERNEL);
321 p.packet.header[1] = ~data; 331 if (p == NULL)
322 p.packet.header_length = 8; 332 return;
323 p.packet.payload_length = 0; 333
324 p.packet.speed = SCODE_100; 334 p->packet.header[0] = data;
325 p.packet.generation = generation; 335 p->packet.header[1] = ~data;
326 p.packet.callback = transmit_phy_packet_callback; 336 p->packet.header_length = 8;
327 init_completion(&p.done); 337 p->packet.payload_length = 0;
328 338 p->packet.speed = SCODE_100;
329 card->driver->send_request(card, &p.packet); 339 p->packet.generation = generation;
330 wait_for_completion(&p.done); 340 p->packet.callback = transmit_phy_packet_callback;
341 init_completion(&p->done);
342 kref_set(&p->kref, 2);
343
344 card->driver->send_request(card, &p->packet);
345 timeout = wait_for_completion_timeout(&p->done, timeout);
346 kref_put(&p->kref, phy_packet_release);
347
348 /* will leak p if the callback is never executed */
349 WARN_ON(timeout == 0);
331} 350}
332 351
333void fw_flush_transactions(struct fw_card *card) 352void fw_flush_transactions(struct fw_card *card)
@@ -572,7 +591,8 @@ allocate_request(struct fw_packet *p)
572 break; 591 break;
573 592
574 default: 593 default:
575 BUG(); 594 fw_error("ERROR - corrupt request received - %08x %08x %08x\n",
595 p->header[0], p->header[1], p->header[2]);
576 return NULL; 596 return NULL;
577 } 597 }
578 598
diff --git a/drivers/firmware/edd.c b/drivers/firmware/edd.c
index 744011989044..9e4f59dc7f1e 100644
--- a/drivers/firmware/edd.c
+++ b/drivers/firmware/edd.c
@@ -753,7 +753,7 @@ edd_init(void)
753 753
754 if (!edd_num_devices()) { 754 if (!edd_num_devices()) {
755 printk(KERN_INFO "EDD information not available.\n"); 755 printk(KERN_INFO "EDD information not available.\n");
756 return 1; 756 return -ENODEV;
757 } 757 }
758 758
759 edd_kset = kset_create_and_add("edd", NULL, firmware_kobj); 759 edd_kset = kset_create_and_add("edd", NULL, firmware_kobj);
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index bbd28342e771..008c38ba774f 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -28,12 +28,18 @@ config DEBUG_GPIO
28comment "I2C GPIO expanders:" 28comment "I2C GPIO expanders:"
29 29
30config GPIO_PCA953X 30config GPIO_PCA953X
31 tristate "PCA953x I/O ports" 31 tristate "PCA953x, PCA955x, and MAX7310 I/O ports"
32 depends on I2C 32 depends on I2C
33 help 33 help
34 Say yes here to support the PCA9534 (8-bit), PCA9535 (16-bit), 34 Say yes here to provide access to several register-oriented
35 PCA9536 (4-bit), PCA9537 (4-bit), PCA9538 (8-bit), and PCA9539 35 SMBus I/O expanders, made mostly by NXP or TI. Compatible
36 (16-bit) I/O ports. These parts are made by NXP and TI. 36 models include:
37
38 4 bits: pca9536, pca9537
39
40 8 bits: max7310, pca9534, pca9538, pca9554, pca9557
41
42 16 bits: pca9535, pca9539, pca9555
37 43
38 This driver can also be built as a module. If so, the module 44 This driver can also be built as a module. If so, the module
39 will be called pca953x. 45 will be called pca953x.
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 7f138c6195ff..beaf6b3a37dc 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -127,7 +127,7 @@ int __init gpiochip_reserve(int start, int ngpio)
127 unsigned long flags; 127 unsigned long flags;
128 int i; 128 int i;
129 129
130 if (!gpio_is_valid(start) || !gpio_is_valid(start + ngpio)) 130 if (!gpio_is_valid(start) || !gpio_is_valid(start + ngpio - 1))
131 return -EINVAL; 131 return -EINVAL;
132 132
133 spin_lock_irqsave(&gpio_lock, flags); 133 spin_lock_irqsave(&gpio_lock, flags);
@@ -170,7 +170,7 @@ int gpiochip_add(struct gpio_chip *chip)
170 unsigned id; 170 unsigned id;
171 int base = chip->base; 171 int base = chip->base;
172 172
173 if ((!gpio_is_valid(base) || !gpio_is_valid(base + chip->ngpio)) 173 if ((!gpio_is_valid(base) || !gpio_is_valid(base + chip->ngpio - 1))
174 && base >= 0) { 174 && base >= 0) {
175 status = -EINVAL; 175 status = -EINVAL;
176 goto fail; 176 goto fail;
@@ -207,7 +207,7 @@ fail:
207 /* failures here can mean systems won't boot... */ 207 /* failures here can mean systems won't boot... */
208 if (status) 208 if (status)
209 pr_err("gpiochip_add: gpios %d..%d (%s) not registered\n", 209 pr_err("gpiochip_add: gpios %d..%d (%s) not registered\n",
210 chip->base, chip->base + chip->ngpio, 210 chip->base, chip->base + chip->ngpio - 1,
211 chip->label ? : "generic"); 211 chip->label ? : "generic");
212 return status; 212 return status;
213} 213}
diff --git a/drivers/gpio/mcp23s08.c b/drivers/gpio/mcp23s08.c
index 7fb5b9d009d4..7f92fdd5f0e2 100644
--- a/drivers/gpio/mcp23s08.c
+++ b/drivers/gpio/mcp23s08.c
@@ -168,7 +168,7 @@ static void mcp23s08_dbg_show(struct seq_file *s, struct gpio_chip *chip)
168{ 168{
169 struct mcp23s08 *mcp; 169 struct mcp23s08 *mcp;
170 char bank; 170 char bank;
171 unsigned t; 171 int t;
172 unsigned mask; 172 unsigned mask;
173 173
174 mcp = container_of(chip, struct mcp23s08, chip); 174 mcp = container_of(chip, struct mcp23s08, chip);
diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c
index 93f916720b13..a380730b61ab 100644
--- a/drivers/gpio/pca953x.c
+++ b/drivers/gpio/pca953x.c
@@ -30,9 +30,10 @@ static const struct i2c_device_id pca953x_id[] = {
30 { "pca9537", 4, }, 30 { "pca9537", 4, },
31 { "pca9538", 8, }, 31 { "pca9538", 8, },
32 { "pca9539", 16, }, 32 { "pca9539", 16, },
33 { "pca9554", 8, },
33 { "pca9555", 16, }, 34 { "pca9555", 16, },
34 { "pca9557", 8, }, 35 { "pca9557", 8, },
35 /* REVISIT several pca955x parts should work here too */ 36 { "max7310", 8, },
36 { } 37 { }
37}; 38};
38MODULE_DEVICE_TABLE(i2c, pca953x_id); 39MODULE_DEVICE_TABLE(i2c, pca953x_id);
diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
index f88714b06000..47ac1a7d66e1 100644
--- a/drivers/hid/hid-debug.c
+++ b/drivers/hid/hid-debug.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * $Id: hid-debug.h,v 1.8 2001/09/25 09:37:57 vojtech Exp $
3 *
4 * (c) 1999 Andreas Gal <gal@cs.uni-magdeburg.de> 2 * (c) 1999 Andreas Gal <gal@cs.uni-magdeburg.de>
5 * (c) 2000-2001 Vojtech Pavlik <vojtech@ucw.cz> 3 * (c) 2000-2001 Vojtech Pavlik <vojtech@ucw.cz>
6 * (c) 2007 Jiri Kosina 4 * (c) 2007 Jiri Kosina
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index c3eb3f13e2ca..5c52a20ad344 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * $Id: hid-input.c,v 1.2 2002/04/23 00:59:25 rdamazio Exp $
3 *
4 * Copyright (c) 2000-2001 Vojtech Pavlik 2 * Copyright (c) 2000-2001 Vojtech Pavlik
5 * Copyright (c) 2006-2007 Jiri Kosina 3 * Copyright (c) 2006-2007 Jiri Kosina
6 * 4 *
@@ -218,8 +216,9 @@ int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
218 } 216 }
219 } 217 }
220 218
221 if (test_bit(usage->code, hid->pb_pressed_numlock) || 219 if (hid->quirks & HID_QUIRK_APPLE_NUMLOCK_EMULATION && (
222 test_bit(LED_NUML, input->led)) { 220 test_bit(usage->code, hid->pb_pressed_numlock) ||
221 test_bit(LED_NUML, input->led))) {
223 trans = find_translation(powerbook_numlock_keys, usage->code); 222 trans = find_translation(powerbook_numlock_keys, usage->code);
224 223
225 if (trans) { 224 if (trans) {
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
index d3f8d9194f30..1df832a8fcbc 100644
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
@@ -325,6 +325,10 @@
325#define USB_DEVICE_ID_MGE_UPS 0xffff 325#define USB_DEVICE_ID_MGE_UPS 0xffff
326#define USB_DEVICE_ID_MGE_UPS1 0x0001 326#define USB_DEVICE_ID_MGE_UPS1 0x0001
327 327
328#define USB_VENDOR_ID_MICROCHIP 0x04d8
329#define USB_DEVICE_ID_PICKIT1 0x0032
330#define USB_DEVICE_ID_PICKIT2 0x0033
331
328#define USB_VENDOR_ID_MICROSOFT 0x045e 332#define USB_VENDOR_ID_MICROSOFT 0x045e
329#define USB_DEVICE_ID_SIDEWINDER_GV 0x003b 333#define USB_DEVICE_ID_SIDEWINDER_GV 0x003b
330#define USB_DEVICE_ID_WIRELESS_OPTICAL_DESKTOP_3_0 0x009d 334#define USB_DEVICE_ID_WIRELESS_OPTICAL_DESKTOP_3_0 0x009d
@@ -371,6 +375,9 @@
371#define USB_VENDOR_ID_SONY 0x054c 375#define USB_VENDOR_ID_SONY 0x054c
372#define USB_DEVICE_ID_SONY_PS3_CONTROLLER 0x0268 376#define USB_DEVICE_ID_SONY_PS3_CONTROLLER 0x0268
373 377
378#define USB_VENDOR_ID_SOUNDGRAPH 0x15c2
379#define USB_DEVICE_ID_SOUNDGRAPH_IMON_LCD 0x0038
380
374#define USB_VENDOR_ID_SUN 0x0430 381#define USB_VENDOR_ID_SUN 0x0430
375#define USB_DEVICE_ID_RARITAN_KVM_DONGLE 0xcdab 382#define USB_DEVICE_ID_RARITAN_KVM_DONGLE 0xcdab
376 383
@@ -567,6 +574,7 @@ static const struct hid_blacklist {
567 { USB_VENDOR_ID_PANJIT, 0x0002, HID_QUIRK_IGNORE }, 574 { USB_VENDOR_ID_PANJIT, 0x0002, HID_QUIRK_IGNORE },
568 { USB_VENDOR_ID_PANJIT, 0x0003, HID_QUIRK_IGNORE }, 575 { USB_VENDOR_ID_PANJIT, 0x0003, HID_QUIRK_IGNORE },
569 { USB_VENDOR_ID_PANJIT, 0x0004, HID_QUIRK_IGNORE }, 576 { USB_VENDOR_ID_PANJIT, 0x0004, HID_QUIRK_IGNORE },
577 { USB_VENDOR_ID_SOUNDGRAPH, USB_DEVICE_ID_SOUNDGRAPH_IMON_LCD, HID_QUIRK_IGNORE },
570 { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_LABPRO, HID_QUIRK_IGNORE }, 578 { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_LABPRO, HID_QUIRK_IGNORE },
571 { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_GOTEMP, HID_QUIRK_IGNORE }, 579 { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_GOTEMP, HID_QUIRK_IGNORE },
572 { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_SKIP, HID_QUIRK_IGNORE }, 580 { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_SKIP, HID_QUIRK_IGNORE },
@@ -580,6 +588,9 @@ static const struct hid_blacklist {
580 { USB_VENDOR_ID_ACECAD, USB_DEVICE_ID_ACECAD_FLAIR, HID_QUIRK_IGNORE }, 588 { USB_VENDOR_ID_ACECAD, USB_DEVICE_ID_ACECAD_FLAIR, HID_QUIRK_IGNORE },
581 { USB_VENDOR_ID_ACECAD, USB_DEVICE_ID_ACECAD_302, HID_QUIRK_IGNORE }, 589 { USB_VENDOR_ID_ACECAD, USB_DEVICE_ID_ACECAD_302, HID_QUIRK_IGNORE },
582 590
591 { USB_VENDOR_ID_MICROCHIP, USB_DEVICE_ID_PICKIT1, HID_QUIRK_IGNORE },
592 { USB_VENDOR_ID_MICROCHIP, USB_DEVICE_ID_PICKIT2, HID_QUIRK_IGNORE },
593
583 { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_ELITE_KBD, HID_QUIRK_LOGITECH_IGNORE_DOUBLED_WHEEL | HID_QUIRK_LOGITECH_EXPANDED_KEYMAP }, 594 { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_ELITE_KBD, HID_QUIRK_LOGITECH_IGNORE_DOUBLED_WHEEL | HID_QUIRK_LOGITECH_EXPANDED_KEYMAP },
584 { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_CORDLESS_DESKTOP_LX500, HID_QUIRK_LOGITECH_IGNORE_DOUBLED_WHEEL | HID_QUIRK_LOGITECH_EXPANDED_KEYMAP }, 595 { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_CORDLESS_DESKTOP_LX500, HID_QUIRK_LOGITECH_IGNORE_DOUBLED_WHEEL | HID_QUIRK_LOGITECH_EXPANDED_KEYMAP },
585 596
@@ -611,28 +622,28 @@ static const struct hid_blacklist {
611 622
612 { USB_VENDOR_ID_WISEGROUP_LTD, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, 623 { USB_VENDOR_ID_WISEGROUP_LTD, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
613 624
614 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, 625 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
615 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ISO, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, 626 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ISO, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
616 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, 627 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
617 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_APPLE_ISO_KEYBOARD}, 628 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_APPLE_ISO_KEYBOARD},
618 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, 629 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
619 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, 630 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
620 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_APPLE_ISO_KEYBOARD}, 631 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_APPLE_ISO_KEYBOARD},
621 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, 632 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
622 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, 633 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
623 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_APPLE_ISO_KEYBOARD}, 634 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_APPLE_ISO_KEYBOARD},
624 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, 635 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
625 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ANSI, HID_QUIRK_APPLE_HAS_FN }, 636 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ANSI, HID_QUIRK_APPLE_HAS_FN },
626 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ISO, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_APPLE_ISO_KEYBOARD }, 637 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ISO, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_APPLE_ISO_KEYBOARD },
627 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_JIS, HID_QUIRK_APPLE_HAS_FN }, 638 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_JIS, HID_QUIRK_APPLE_HAS_FN },
628 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ANSI, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, 639 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ANSI, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
629 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ISO, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, 640 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ISO, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
630 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, 641 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
631 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI, HID_QUIRK_APPLE_HAS_FN }, 642 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN },
632 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_APPLE_ISO_KEYBOARD }, 643 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_APPLE_ISO_KEYBOARD },
633 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS, HID_QUIRK_APPLE_HAS_FN }, 644 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN },
634 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, 645 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
635 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE }, 646 { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
636 647
637 { USB_VENDOR_ID_DELL, USB_DEVICE_ID_DELL_W7658, HID_QUIRK_RESET_LEDS }, 648 { USB_VENDOR_ID_DELL, USB_DEVICE_ID_DELL_W7658, HID_QUIRK_RESET_LEDS },
638 { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_KBD, HID_QUIRK_RESET_LEDS }, 649 { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_KBD, HID_QUIRK_RESET_LEDS },
diff --git a/drivers/hid/usbhid/usbkbd.c b/drivers/hid/usbhid/usbkbd.c
index 5d9dbb47e4a8..3cd46d2e53c1 100644
--- a/drivers/hid/usbhid/usbkbd.c
+++ b/drivers/hid/usbhid/usbkbd.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * $Id: usbkbd.c,v 1.27 2001/12/27 10:37:41 vojtech Exp $
3 *
4 * Copyright (c) 1999-2001 Vojtech Pavlik 2 * Copyright (c) 1999-2001 Vojtech Pavlik
5 * 3 *
6 * USB HIDBP Keyboard support 4 * USB HIDBP Keyboard support
diff --git a/drivers/hid/usbhid/usbmouse.c b/drivers/hid/usbhid/usbmouse.c
index df0d96d989de..703e9d0e8714 100644
--- a/drivers/hid/usbhid/usbmouse.c
+++ b/drivers/hid/usbhid/usbmouse.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * $Id: usbmouse.c,v 1.15 2001/12/27 10:37:41 vojtech Exp $
3 *
4 * Copyright (c) 1999-2001 Vojtech Pavlik 2 * Copyright (c) 1999-2001 Vojtech Pavlik
5 * 3 *
6 * USB HIDBP Mouse support 4 * USB HIDBP Mouse support
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 4dc76bc45c9d..00ff53348491 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -330,6 +330,20 @@ config SENSORS_CORETEMP
330 sensor inside your CPU. Supported all are all known variants 330 sensor inside your CPU. Supported all are all known variants
331 of Intel Core family. 331 of Intel Core family.
332 332
333config SENSORS_IBMAEM
334 tristate "IBM Active Energy Manager temperature/power sensors and control"
335 select IPMI_SI
336 depends on IPMI_HANDLER
337 help
338 If you say yes here you get support for the temperature and
339 power sensors and capping hardware in various IBM System X
340 servers that support Active Energy Manager. This includes
341 the x3350, x3550, x3650, x3655, x3755, x3850 M2, x3950 M2,
342 and certain HS2x/LS2x/QS2x blades.
343
344 This driver can also be built as a module. If so, the module
345 will be called ibmaem.
346
333config SENSORS_IBMPEX 347config SENSORS_IBMPEX
334 tristate "IBM PowerExecutive temperature/power sensors" 348 tristate "IBM PowerExecutive temperature/power sensors"
335 select IPMI_SI 349 select IPMI_SI
diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile
index 3bdb05a5cbd7..d098677e08de 100644
--- a/drivers/hwmon/Makefile
+++ b/drivers/hwmon/Makefile
@@ -41,6 +41,7 @@ obj-$(CONFIG_SENSORS_GL518SM) += gl518sm.o
41obj-$(CONFIG_SENSORS_GL520SM) += gl520sm.o 41obj-$(CONFIG_SENSORS_GL520SM) += gl520sm.o
42obj-$(CONFIG_SENSORS_HDAPS) += hdaps.o 42obj-$(CONFIG_SENSORS_HDAPS) += hdaps.o
43obj-$(CONFIG_SENSORS_I5K_AMB) += i5k_amb.o 43obj-$(CONFIG_SENSORS_I5K_AMB) += i5k_amb.o
44obj-$(CONFIG_SENSORS_IBMAEM) += ibmaem.o
44obj-$(CONFIG_SENSORS_IBMPEX) += ibmpex.o 45obj-$(CONFIG_SENSORS_IBMPEX) += ibmpex.o
45obj-$(CONFIG_SENSORS_IT87) += it87.o 46obj-$(CONFIG_SENSORS_IT87) += it87.o
46obj-$(CONFIG_SENSORS_K8TEMP) += k8temp.o 47obj-$(CONFIG_SENSORS_K8TEMP) += k8temp.o
diff --git a/drivers/hwmon/abituguru3.c b/drivers/hwmon/abituguru3.c
index ed33fddc4dee..f00f497b9ca9 100644
--- a/drivers/hwmon/abituguru3.c
+++ b/drivers/hwmon/abituguru3.c
@@ -30,6 +30,7 @@
30#include <linux/platform_device.h> 30#include <linux/platform_device.h>
31#include <linux/hwmon.h> 31#include <linux/hwmon.h>
32#include <linux/hwmon-sysfs.h> 32#include <linux/hwmon-sysfs.h>
33#include <linux/dmi.h>
33#include <asm/io.h> 34#include <asm/io.h>
34 35
35/* uGuru3 bank addresses */ 36/* uGuru3 bank addresses */
@@ -323,7 +324,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = {
323 { "AUX1 Fan", 36, 2, 60, 1, 0 }, 324 { "AUX1 Fan", 36, 2, 60, 1, 0 },
324 { NULL, 0, 0, 0, 0, 0 } } 325 { NULL, 0, 0, 0, 0, 0 } }
325 }, 326 },
326 { 0x0013, "unknown", { 327 { 0x0013, "Abit AW8D", {
327 { "CPU Core", 0, 0, 10, 1, 0 }, 328 { "CPU Core", 0, 0, 10, 1, 0 },
328 { "DDR", 1, 0, 10, 1, 0 }, 329 { "DDR", 1, 0, 10, 1, 0 },
329 { "DDR VTT", 2, 0, 10, 1, 0 }, 330 { "DDR VTT", 2, 0, 10, 1, 0 },
@@ -349,6 +350,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = {
349 { "AUX2 Fan", 36, 2, 60, 1, 0 }, 350 { "AUX2 Fan", 36, 2, 60, 1, 0 },
350 { "AUX3 Fan", 37, 2, 60, 1, 0 }, 351 { "AUX3 Fan", 37, 2, 60, 1, 0 },
351 { "AUX4 Fan", 38, 2, 60, 1, 0 }, 352 { "AUX4 Fan", 38, 2, 60, 1, 0 },
353 { "AUX5 Fan", 39, 2, 60, 1, 0 },
352 { NULL, 0, 0, 0, 0, 0 } } 354 { NULL, 0, 0, 0, 0, 0 } }
353 }, 355 },
354 { 0x0014, "Abit AB9 Pro", { 356 { 0x0014, "Abit AB9 Pro", {
@@ -1111,11 +1113,12 @@ static int __init abituguru3_detect(void)
1111{ 1113{
1112 /* See if there is an uguru3 there. An idle uGuru3 will hold 0x00 or 1114 /* See if there is an uguru3 there. An idle uGuru3 will hold 0x00 or
1113 0x08 at DATA and 0xAC at CMD. Sometimes the uGuru3 will hold 0x05 1115 0x08 at DATA and 0xAC at CMD. Sometimes the uGuru3 will hold 0x05
1114 at CMD instead, why is unknown. So we test for 0x05 too. */ 1116 or 0x55 at CMD instead, why is unknown. */
1115 u8 data_val = inb_p(ABIT_UGURU3_BASE + ABIT_UGURU3_DATA); 1117 u8 data_val = inb_p(ABIT_UGURU3_BASE + ABIT_UGURU3_DATA);
1116 u8 cmd_val = inb_p(ABIT_UGURU3_BASE + ABIT_UGURU3_CMD); 1118 u8 cmd_val = inb_p(ABIT_UGURU3_BASE + ABIT_UGURU3_CMD);
1117 if (((data_val == 0x00) || (data_val == 0x08)) && 1119 if (((data_val == 0x00) || (data_val == 0x08)) &&
1118 ((cmd_val == 0xAC) || (cmd_val == 0x05))) 1120 ((cmd_val == 0xAC) || (cmd_val == 0x05) ||
1121 (cmd_val == 0x55)))
1119 return ABIT_UGURU3_BASE; 1122 return ABIT_UGURU3_BASE;
1120 1123
1121 ABIT_UGURU3_DEBUG("no Abit uGuru3 found, data = 0x%02X, cmd = " 1124 ABIT_UGURU3_DEBUG("no Abit uGuru3 found, data = 0x%02X, cmd = "
@@ -1138,6 +1141,15 @@ static int __init abituguru3_init(void)
1138 int address, err; 1141 int address, err;
1139 struct resource res = { .flags = IORESOURCE_IO }; 1142 struct resource res = { .flags = IORESOURCE_IO };
1140 1143
1144#ifdef CONFIG_DMI
1145 const char *board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
1146
1147 /* safety check, refuse to load on non Abit motherboards */
1148 if (!force && (!board_vendor ||
1149 strcmp(board_vendor, "http://www.abit.com.tw/")))
1150 return -ENODEV;
1151#endif
1152
1141 address = abituguru3_detect(); 1153 address = abituguru3_detect();
1142 if (address < 0) 1154 if (address < 0)
1143 return address; 1155 return address;
diff --git a/drivers/hwmon/adt7473.c b/drivers/hwmon/adt7473.c
index c1009d6f9796..93dbf5e7ff8a 100644
--- a/drivers/hwmon/adt7473.c
+++ b/drivers/hwmon/adt7473.c
@@ -309,6 +309,9 @@ no_sensor_update:
309 ADT7473_REG_PWM_BHVR(i)); 309 ADT7473_REG_PWM_BHVR(i));
310 } 310 }
311 311
312 i = i2c_smbus_read_byte_data(client, ADT7473_REG_CFG4);
313 data->max_duty_at_overheat = !!(i & ADT7473_CFG4_MAX_DUTY_AT_OVT);
314
312 data->limits_last_updated = local_jiffies; 315 data->limits_last_updated = local_jiffies;
313 data->limits_valid = 1; 316 data->limits_valid = 1;
314 317
diff --git a/drivers/hwmon/hdaps.c b/drivers/hwmon/hdaps.c
index bab5fd2e4dfd..50f22690d611 100644
--- a/drivers/hwmon/hdaps.c
+++ b/drivers/hwmon/hdaps.c
@@ -515,16 +515,24 @@ static struct dmi_system_id __initdata hdaps_whitelist[] = {
515 HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad R50"), 515 HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad R50"),
516 HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad R51"), 516 HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad R51"),
517 HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad R52"), 517 HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad R52"),
518 HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad R61i"),
519 HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad R61"),
518 HDAPS_DMI_MATCH_INVERT("IBM", "ThinkPad T41p"), 520 HDAPS_DMI_MATCH_INVERT("IBM", "ThinkPad T41p"),
519 HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad T41"), 521 HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad T41"),
520 HDAPS_DMI_MATCH_INVERT("IBM", "ThinkPad T42p"), 522 HDAPS_DMI_MATCH_INVERT("IBM", "ThinkPad T42p"),
521 HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad T42"), 523 HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad T42"),
522 HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad T43"), 524 HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad T43"),
523 HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad T60"), 525 HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad T60"),
526 HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad T61p"),
527 HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad T61"),
524 HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad X40"), 528 HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad X40"),
525 HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad X41"), 529 HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad X41"),
526 HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad X60"), 530 HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad X60"),
531 HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad X61s"),
532 HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad X61"),
527 HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad Z60m"), 533 HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad Z60m"),
534 HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad Z61m"),
535 HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad Z61p"),
528 { .ident = NULL } 536 { .ident = NULL }
529}; 537};
530 538
diff --git a/drivers/hwmon/i5k_amb.c b/drivers/hwmon/i5k_amb.c
index 6ac5c6f53585..f9e2ed621f7b 100644
--- a/drivers/hwmon/i5k_amb.c
+++ b/drivers/hwmon/i5k_amb.c
@@ -111,6 +111,7 @@ struct i5k_amb_data {
111 void __iomem *amb_mmio; 111 void __iomem *amb_mmio;
112 struct i5k_device_attribute *attrs; 112 struct i5k_device_attribute *attrs;
113 unsigned int num_attrs; 113 unsigned int num_attrs;
114 unsigned long chipset_id;
114}; 115};
115 116
116static ssize_t show_name(struct device *dev, struct device_attribute *devattr, 117static ssize_t show_name(struct device *dev, struct device_attribute *devattr,
@@ -382,7 +383,8 @@ err:
382 return res; 383 return res;
383} 384}
384 385
385static int __devinit i5k_find_amb_registers(struct i5k_amb_data *data) 386static int __devinit i5k_find_amb_registers(struct i5k_amb_data *data,
387 unsigned long devid)
386{ 388{
387 struct pci_dev *pcidev; 389 struct pci_dev *pcidev;
388 u32 val32; 390 u32 val32;
@@ -390,7 +392,7 @@ static int __devinit i5k_find_amb_registers(struct i5k_amb_data *data)
390 392
391 /* Find AMB register memory space */ 393 /* Find AMB register memory space */
392 pcidev = pci_get_device(PCI_VENDOR_ID_INTEL, 394 pcidev = pci_get_device(PCI_VENDOR_ID_INTEL,
393 PCI_DEVICE_ID_INTEL_5000_ERR, 395 devid,
394 NULL); 396 NULL);
395 if (!pcidev) 397 if (!pcidev)
396 return -ENODEV; 398 return -ENODEV;
@@ -409,6 +411,8 @@ static int __devinit i5k_find_amb_registers(struct i5k_amb_data *data)
409 goto out; 411 goto out;
410 } 412 }
411 413
414 data->chipset_id = devid;
415
412 res = 0; 416 res = 0;
413out: 417out:
414 pci_dev_put(pcidev); 418 pci_dev_put(pcidev);
@@ -441,10 +445,30 @@ out:
441 return res; 445 return res;
442} 446}
443 447
448static unsigned long i5k_channel_pci_id(struct i5k_amb_data *data,
449 unsigned long channel)
450{
451 switch (data->chipset_id) {
452 case PCI_DEVICE_ID_INTEL_5000_ERR:
453 return PCI_DEVICE_ID_INTEL_5000_FBD0 + channel;
454 case PCI_DEVICE_ID_INTEL_5400_ERR:
455 return PCI_DEVICE_ID_INTEL_5400_FBD0 + channel;
456 default:
457 BUG();
458 }
459}
460
461static unsigned long chipset_ids[] = {
462 PCI_DEVICE_ID_INTEL_5000_ERR,
463 PCI_DEVICE_ID_INTEL_5400_ERR,
464 0
465};
466
444static int __devinit i5k_amb_probe(struct platform_device *pdev) 467static int __devinit i5k_amb_probe(struct platform_device *pdev)
445{ 468{
446 struct i5k_amb_data *data; 469 struct i5k_amb_data *data;
447 struct resource *reso; 470 struct resource *reso;
471 int i;
448 int res = -ENODEV; 472 int res = -ENODEV;
449 473
450 data = kzalloc(sizeof(*data), GFP_KERNEL); 474 data = kzalloc(sizeof(*data), GFP_KERNEL);
@@ -452,19 +476,24 @@ static int __devinit i5k_amb_probe(struct platform_device *pdev)
452 return -ENOMEM; 476 return -ENOMEM;
453 477
454 /* Figure out where the AMB registers live */ 478 /* Figure out where the AMB registers live */
455 res = i5k_find_amb_registers(data); 479 i = 0;
480 do {
481 res = i5k_find_amb_registers(data, chipset_ids[i]);
482 i++;
483 } while (res && chipset_ids[i]);
484
456 if (res) 485 if (res)
457 goto err; 486 goto err;
458 487
459 /* Copy the DIMM presence map for the first two channels */ 488 /* Copy the DIMM presence map for the first two channels */
460 res = i5k_channel_probe(&data->amb_present[0], 489 res = i5k_channel_probe(&data->amb_present[0],
461 PCI_DEVICE_ID_INTEL_5000_FBD0); 490 i5k_channel_pci_id(data, 0));
462 if (res) 491 if (res)
463 goto err; 492 goto err;
464 493
465 /* Copy the DIMM presence map for the optional second two channels */ 494 /* Copy the DIMM presence map for the optional second two channels */
466 i5k_channel_probe(&data->amb_present[2], 495 i5k_channel_probe(&data->amb_present[2],
467 PCI_DEVICE_ID_INTEL_5000_FBD1); 496 i5k_channel_pci_id(data, 1));
468 497
469 /* Set up resource regions */ 498 /* Set up resource regions */
470 reso = request_mem_region(data->amb_base, data->amb_len, DRVNAME); 499 reso = request_mem_region(data->amb_base, data->amb_len, DRVNAME);
diff --git a/drivers/hwmon/ibmaem.c b/drivers/hwmon/ibmaem.c
new file mode 100644
index 000000000000..c9416e657487
--- /dev/null
+++ b/drivers/hwmon/ibmaem.c
@@ -0,0 +1,1111 @@
1/*
2 * A hwmon driver for the IBM Active Energy Manager temperature/power sensors
3 * and capping functionality.
4 * Copyright (C) 2008 IBM
5 *
6 * Author: Darrick J. Wong <djwong@us.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 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, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23#include <linux/ipmi.h>
24#include <linux/module.h>
25#include <linux/hwmon.h>
26#include <linux/hwmon-sysfs.h>
27#include <linux/jiffies.h>
28#include <linux/mutex.h>
29#include <linux/kdev_t.h>
30#include <linux/spinlock.h>
31#include <linux/idr.h>
32#include <linux/sched.h>
33#include <linux/platform_device.h>
34#include <linux/math64.h>
35#include <linux/time.h>
36
37#define REFRESH_INTERVAL (HZ)
38#define IPMI_TIMEOUT (30 * HZ)
39#define DRVNAME "aem"
40
41#define AEM_NETFN 0x2E
42
43#define AEM_FIND_FW_CMD 0x80
44#define AEM_ELEMENT_CMD 0x81
45#define AEM_FW_INSTANCE_CMD 0x82
46
47#define AEM_READ_ELEMENT_CFG 0x80
48#define AEM_READ_BUFFER 0x81
49#define AEM_READ_REGISTER 0x82
50#define AEM_WRITE_REGISTER 0x83
51#define AEM_SET_REG_MASK 0x84
52#define AEM_CLEAR_REG_MASK 0x85
53#define AEM_READ_ELEMENT_CFG2 0x86
54
55#define AEM_CONTROL_ELEMENT 0
56#define AEM_ENERGY_ELEMENT 1
57#define AEM_CLOCK_ELEMENT 4
58#define AEM_POWER_CAP_ELEMENT 7
59#define AEM_EXHAUST_ELEMENT 9
60#define AEM_POWER_ELEMENT 10
61
62#define AEM_MODULE_TYPE_ID 0x0001
63
64#define AEM2_NUM_ENERGY_REGS 2
65#define AEM2_NUM_PCAP_REGS 6
66#define AEM2_NUM_TEMP_REGS 2
67#define AEM2_NUM_SENSORS 14
68
69#define AEM1_NUM_ENERGY_REGS 1
70#define AEM1_NUM_SENSORS 3
71
72/* AEM 2.x has more energy registers */
73#define AEM_NUM_ENERGY_REGS AEM2_NUM_ENERGY_REGS
74/* AEM 2.x needs more sensor files */
75#define AEM_NUM_SENSORS AEM2_NUM_SENSORS
76
77#define POWER_CAP 0
78#define POWER_CAP_MAX_HOTPLUG 1
79#define POWER_CAP_MAX 2
80#define POWER_CAP_MIN_WARNING 3
81#define POWER_CAP_MIN 4
82#define POWER_AUX 5
83
84#define AEM_DEFAULT_POWER_INTERVAL 1000
85#define AEM_MIN_POWER_INTERVAL 200
86#define UJ_PER_MJ 1000L
87
88static DEFINE_IDR(aem_idr);
89static DEFINE_SPINLOCK(aem_idr_lock);
90
91static struct device_driver aem_driver = {
92 .name = DRVNAME,
93 .bus = &platform_bus_type,
94};
95
96struct aem_ipmi_data {
97 struct completion read_complete;
98 struct ipmi_addr address;
99 ipmi_user_t user;
100 int interface;
101
102 struct kernel_ipmi_msg tx_message;
103 long tx_msgid;
104
105 void *rx_msg_data;
106 unsigned short rx_msg_len;
107 unsigned char rx_result;
108 int rx_recv_type;
109
110 struct device *bmc_device;
111};
112
113struct aem_ro_sensor_template {
114 char *label;
115 ssize_t (*show)(struct device *dev,
116 struct device_attribute *devattr,
117 char *buf);
118 int index;
119};
120
121struct aem_rw_sensor_template {
122 char *label;
123 ssize_t (*show)(struct device *dev,
124 struct device_attribute *devattr,
125 char *buf);
126 ssize_t (*set)(struct device *dev,
127 struct device_attribute *devattr,
128 const char *buf, size_t count);
129 int index;
130};
131
132struct aem_data {
133 struct list_head list;
134
135 struct device *hwmon_dev;
136 struct platform_device *pdev;
137 struct mutex lock;
138 char valid;
139 unsigned long last_updated; /* In jiffies */
140 u8 ver_major;
141 u8 ver_minor;
142 u8 module_handle;
143 int id;
144 struct aem_ipmi_data ipmi;
145
146 /* Function to update sensors */
147 void (*update)(struct aem_data *data);
148
149 /*
150 * AEM 1.x sensors:
151 * Available sensors:
152 * Energy meter
153 * Power meter
154 *
155 * AEM 2.x sensors:
156 * Two energy meters
157 * Two power meters
158 * Two temperature sensors
159 * Six power cap registers
160 */
161
162 /* sysfs attrs */
163 struct sensor_device_attribute sensors[AEM_NUM_SENSORS];
164
165 /* energy use in mJ */
166 u64 energy[AEM_NUM_ENERGY_REGS];
167
168 /* power sampling interval in ms */
169 unsigned long power_period[AEM_NUM_ENERGY_REGS];
170
171 /* Everything past here is for AEM2 only */
172
173 /* power caps in dW */
174 u16 pcap[AEM2_NUM_PCAP_REGS];
175
176 /* exhaust temperature in C */
177 u8 temp[AEM2_NUM_TEMP_REGS];
178};
179
180/* Data structures returned by the AEM firmware */
181struct aem_iana_id {
182 u8 bytes[3];
183};
184static struct aem_iana_id system_x_id = {
185 .bytes = {0x4D, 0x4F, 0x00}
186};
187
188/* These are used to find AEM1 instances */
189struct aem_find_firmware_req {
190 struct aem_iana_id id;
191 u8 rsvd;
192 __be16 index;
193 __be16 module_type_id;
194} __packed;
195
196struct aem_find_firmware_resp {
197 struct aem_iana_id id;
198 u8 num_instances;
199} __packed;
200
201/* These are used to find AEM2 instances */
202struct aem_find_instance_req {
203 struct aem_iana_id id;
204 u8 instance_number;
205 __be16 module_type_id;
206} __packed;
207
208struct aem_find_instance_resp {
209 struct aem_iana_id id;
210 u8 num_instances;
211 u8 major;
212 u8 minor;
213 u8 module_handle;
214 u16 record_id;
215} __packed;
216
217/* These are used to query sensors */
218struct aem_read_sensor_req {
219 struct aem_iana_id id;
220 u8 module_handle;
221 u8 element;
222 u8 subcommand;
223 u8 reg;
224 u8 rx_buf_size;
225} __packed;
226
227struct aem_read_sensor_resp {
228 struct aem_iana_id id;
229 u8 bytes[0];
230} __packed;
231
232/* Data structures to talk to the IPMI layer */
233struct aem_driver_data {
234 struct list_head aem_devices;
235 struct ipmi_smi_watcher bmc_events;
236 struct ipmi_user_hndl ipmi_hndlrs;
237};
238
239static void aem_register_bmc(int iface, struct device *dev);
240static void aem_bmc_gone(int iface);
241static void aem_msg_handler(struct ipmi_recv_msg *msg, void *user_msg_data);
242
243static void aem_remove_sensors(struct aem_data *data);
244static int aem_init_aem1(struct aem_ipmi_data *probe);
245static int aem_init_aem2(struct aem_ipmi_data *probe);
246static int aem1_find_sensors(struct aem_data *data);
247static int aem2_find_sensors(struct aem_data *data);
248static void update_aem1_sensors(struct aem_data *data);
249static void update_aem2_sensors(struct aem_data *data);
250
251static struct aem_driver_data driver_data = {
252 .aem_devices = LIST_HEAD_INIT(driver_data.aem_devices),
253 .bmc_events = {
254 .owner = THIS_MODULE,
255 .new_smi = aem_register_bmc,
256 .smi_gone = aem_bmc_gone,
257 },
258 .ipmi_hndlrs = {
259 .ipmi_recv_hndl = aem_msg_handler,
260 },
261};
262
263/* Functions to talk to the IPMI layer */
264
265/* Initialize IPMI address, message buffers and user data */
266static int aem_init_ipmi_data(struct aem_ipmi_data *data, int iface,
267 struct device *bmc)
268{
269 int err;
270
271 init_completion(&data->read_complete);
272 data->bmc_device = bmc;
273
274 /* Initialize IPMI address */
275 data->address.addr_type = IPMI_SYSTEM_INTERFACE_ADDR_TYPE;
276 data->address.channel = IPMI_BMC_CHANNEL;
277 data->address.data[0] = 0;
278 data->interface = iface;
279
280 /* Initialize message buffers */
281 data->tx_msgid = 0;
282 data->tx_message.netfn = AEM_NETFN;
283
284 /* Create IPMI messaging interface user */
285 err = ipmi_create_user(data->interface, &driver_data.ipmi_hndlrs,
286 data, &data->user);
287 if (err < 0) {
288 dev_err(bmc, "Unable to register user with IPMI "
289 "interface %d\n", data->interface);
290 return -EACCES;
291 }
292
293 return 0;
294}
295
296/* Send an IPMI command */
297static int aem_send_message(struct aem_ipmi_data *data)
298{
299 int err;
300
301 err = ipmi_validate_addr(&data->address, sizeof(data->address));
302 if (err)
303 goto out;
304
305 data->tx_msgid++;
306 err = ipmi_request_settime(data->user, &data->address, data->tx_msgid,
307 &data->tx_message, data, 0, 0, 0);
308 if (err)
309 goto out1;
310
311 return 0;
312out1:
313 dev_err(data->bmc_device, "request_settime=%x\n", err);
314 return err;
315out:
316 dev_err(data->bmc_device, "validate_addr=%x\n", err);
317 return err;
318}
319
320/* Dispatch IPMI messages to callers */
321static void aem_msg_handler(struct ipmi_recv_msg *msg, void *user_msg_data)
322{
323 unsigned short rx_len;
324 struct aem_ipmi_data *data = user_msg_data;
325
326 if (msg->msgid != data->tx_msgid) {
327 dev_err(data->bmc_device, "Mismatch between received msgid "
328 "(%02x) and transmitted msgid (%02x)!\n",
329 (int)msg->msgid,
330 (int)data->tx_msgid);
331 ipmi_free_recv_msg(msg);
332 return;
333 }
334
335 data->rx_recv_type = msg->recv_type;
336 if (msg->msg.data_len > 0)
337 data->rx_result = msg->msg.data[0];
338 else
339 data->rx_result = IPMI_UNKNOWN_ERR_COMPLETION_CODE;
340
341 if (msg->msg.data_len > 1) {
342 rx_len = msg->msg.data_len - 1;
343 if (data->rx_msg_len < rx_len)
344 rx_len = data->rx_msg_len;
345 data->rx_msg_len = rx_len;
346 memcpy(data->rx_msg_data, msg->msg.data + 1, data->rx_msg_len);
347 } else
348 data->rx_msg_len = 0;
349
350 ipmi_free_recv_msg(msg);
351 complete(&data->read_complete);
352}
353
354/* ID functions */
355
356/* Obtain an id */
357static int aem_idr_get(int *id)
358{
359 int i, err;
360
361again:
362 if (unlikely(!idr_pre_get(&aem_idr, GFP_KERNEL)))
363 return -ENOMEM;
364
365 spin_lock(&aem_idr_lock);
366 err = idr_get_new(&aem_idr, NULL, &i);
367 spin_unlock(&aem_idr_lock);
368
369 if (unlikely(err == -EAGAIN))
370 goto again;
371 else if (unlikely(err))
372 return err;
373
374 *id = i & MAX_ID_MASK;
375 return 0;
376}
377
378/* Release an object ID */
379static void aem_idr_put(int id)
380{
381 spin_lock(&aem_idr_lock);
382 idr_remove(&aem_idr, id);
383 spin_unlock(&aem_idr_lock);
384}
385
386/* Sensor support functions */
387
388/* Read a sensor value */
389static int aem_read_sensor(struct aem_data *data, u8 elt, u8 reg,
390 void *buf, size_t size)
391{
392 int rs_size, res;
393 struct aem_read_sensor_req rs_req;
394 struct aem_read_sensor_resp *rs_resp;
395 struct aem_ipmi_data *ipmi = &data->ipmi;
396
397 /* AEM registers are 1, 2, 4 or 8 bytes */
398 switch (size) {
399 case 1:
400 case 2:
401 case 4:
402 case 8:
403 break;
404 default:
405 return -EINVAL;
406 }
407
408 rs_req.id = system_x_id;
409 rs_req.module_handle = data->module_handle;
410 rs_req.element = elt;
411 rs_req.subcommand = AEM_READ_REGISTER;
412 rs_req.reg = reg;
413 rs_req.rx_buf_size = size;
414
415 ipmi->tx_message.cmd = AEM_ELEMENT_CMD;
416 ipmi->tx_message.data = (char *)&rs_req;
417 ipmi->tx_message.data_len = sizeof(rs_req);
418
419 rs_size = sizeof(*rs_resp) + size;
420 rs_resp = kzalloc(rs_size, GFP_KERNEL);
421 if (!rs_resp)
422 return -ENOMEM;
423
424 ipmi->rx_msg_data = rs_resp;
425 ipmi->rx_msg_len = rs_size;
426
427 aem_send_message(ipmi);
428
429 res = wait_for_completion_timeout(&ipmi->read_complete, IPMI_TIMEOUT);
430 if (!res)
431 return -ETIMEDOUT;
432
433 if (ipmi->rx_result || ipmi->rx_msg_len != rs_size ||
434 memcmp(&rs_resp->id, &system_x_id, sizeof(system_x_id))) {
435 kfree(rs_resp);
436 return -ENOENT;
437 }
438
439 switch (size) {
440 case 1: {
441 u8 *x = buf;
442 *x = rs_resp->bytes[0];
443 break;
444 }
445 case 2: {
446 u16 *x = buf;
447 *x = be16_to_cpup((__be16 *)rs_resp->bytes);
448 break;
449 }
450 case 4: {
451 u32 *x = buf;
452 *x = be32_to_cpup((__be32 *)rs_resp->bytes);
453 break;
454 }
455 case 8: {
456 u64 *x = buf;
457 *x = be64_to_cpup((__be64 *)rs_resp->bytes);
458 break;
459 }
460 }
461
462 return 0;
463}
464
465/* Update AEM energy registers */
466static void update_aem_energy(struct aem_data *data)
467{
468 aem_read_sensor(data, AEM_ENERGY_ELEMENT, 0, &data->energy[0], 8);
469 if (data->ver_major < 2)
470 return;
471 aem_read_sensor(data, AEM_ENERGY_ELEMENT, 1, &data->energy[1], 8);
472}
473
474/* Update all AEM1 sensors */
475static void update_aem1_sensors(struct aem_data *data)
476{
477 mutex_lock(&data->lock);
478 if (time_before(jiffies, data->last_updated + REFRESH_INTERVAL) &&
479 data->valid)
480 goto out;
481
482 update_aem_energy(data);
483out:
484 mutex_unlock(&data->lock);
485}
486
487/* Update all AEM2 sensors */
488static void update_aem2_sensors(struct aem_data *data)
489{
490 int i;
491
492 mutex_lock(&data->lock);
493 if (time_before(jiffies, data->last_updated + REFRESH_INTERVAL) &&
494 data->valid)
495 goto out;
496
497 update_aem_energy(data);
498 aem_read_sensor(data, AEM_EXHAUST_ELEMENT, 0, &data->temp[0], 1);
499 aem_read_sensor(data, AEM_EXHAUST_ELEMENT, 1, &data->temp[1], 1);
500
501 for (i = POWER_CAP; i <= POWER_AUX; i++)
502 aem_read_sensor(data, AEM_POWER_CAP_ELEMENT, i,
503 &data->pcap[i], 2);
504out:
505 mutex_unlock(&data->lock);
506}
507
508/* Delete an AEM instance */
509static void aem_delete(struct aem_data *data)
510{
511 list_del(&data->list);
512 aem_remove_sensors(data);
513 hwmon_device_unregister(data->hwmon_dev);
514 ipmi_destroy_user(data->ipmi.user);
515 dev_set_drvdata(&data->pdev->dev, NULL);
516 platform_device_unregister(data->pdev);
517 aem_idr_put(data->id);
518 kfree(data);
519}
520
521/* Probe functions for AEM1 devices */
522
523/* Retrieve version and module handle for an AEM1 instance */
524static int aem_find_aem1_count(struct aem_ipmi_data *data)
525{
526 int res;
527 struct aem_find_firmware_req ff_req;
528 struct aem_find_firmware_resp ff_resp;
529
530 ff_req.id = system_x_id;
531 ff_req.index = 0;
532 ff_req.module_type_id = cpu_to_be16(AEM_MODULE_TYPE_ID);
533
534 data->tx_message.cmd = AEM_FIND_FW_CMD;
535 data->tx_message.data = (char *)&ff_req;
536 data->tx_message.data_len = sizeof(ff_req);
537
538 data->rx_msg_data = &ff_resp;
539 data->rx_msg_len = sizeof(ff_resp);
540
541 aem_send_message(data);
542
543 res = wait_for_completion_timeout(&data->read_complete, IPMI_TIMEOUT);
544 if (!res)
545 return -ETIMEDOUT;
546
547 if (data->rx_result || data->rx_msg_len != sizeof(ff_resp) ||
548 memcmp(&ff_resp.id, &system_x_id, sizeof(system_x_id)))
549 return -ENOENT;
550
551 return ff_resp.num_instances;
552}
553
554/* Find and initialize one AEM1 instance */
555static int aem_init_aem1_inst(struct aem_ipmi_data *probe, u8 module_handle)
556{
557 struct aem_data *data;
558 int i;
559 int res = -ENOMEM;
560
561 data = kzalloc(sizeof(*data), GFP_KERNEL);
562 if (!data)
563 return res;
564 mutex_init(&data->lock);
565
566 /* Copy instance data */
567 data->ver_major = 1;
568 data->ver_minor = 0;
569 data->module_handle = module_handle;
570 for (i = 0; i < AEM1_NUM_ENERGY_REGS; i++)
571 data->power_period[i] = AEM_DEFAULT_POWER_INTERVAL;
572
573 /* Create sub-device for this fw instance */
574 if (aem_idr_get(&data->id))
575 goto id_err;
576
577 data->pdev = platform_device_alloc(DRVNAME, data->id);
578 if (!data->pdev)
579 goto dev_err;
580 data->pdev->dev.driver = &aem_driver;
581
582 res = platform_device_add(data->pdev);
583 if (res)
584 goto ipmi_err;
585
586 dev_set_drvdata(&data->pdev->dev, data);
587
588 /* Set up IPMI interface */
589 if (aem_init_ipmi_data(&data->ipmi, probe->interface,
590 probe->bmc_device))
591 goto ipmi_err;
592
593 /* Register with hwmon */
594 data->hwmon_dev = hwmon_device_register(&data->pdev->dev);
595
596 if (IS_ERR(data->hwmon_dev)) {
597 dev_err(&data->pdev->dev, "Unable to register hwmon "
598 "device for IPMI interface %d\n",
599 probe->interface);
600 goto hwmon_reg_err;
601 }
602
603 data->update = update_aem1_sensors;
604
605 /* Find sensors */
606 if (aem1_find_sensors(data))
607 goto sensor_err;
608
609 /* Add to our list of AEM devices */
610 list_add_tail(&data->list, &driver_data.aem_devices);
611
612 dev_info(data->ipmi.bmc_device, "Found AEM v%d.%d at 0x%X\n",
613 data->ver_major, data->ver_minor,
614 data->module_handle);
615 return 0;
616
617sensor_err:
618 hwmon_device_unregister(data->hwmon_dev);
619hwmon_reg_err:
620 ipmi_destroy_user(data->ipmi.user);
621ipmi_err:
622 dev_set_drvdata(&data->pdev->dev, NULL);
623 platform_device_unregister(data->pdev);
624dev_err:
625 aem_idr_put(data->id);
626id_err:
627 kfree(data);
628
629 return res;
630}
631
632/* Find and initialize all AEM1 instances */
633static int aem_init_aem1(struct aem_ipmi_data *probe)
634{
635 int num, i, err;
636
637 num = aem_find_aem1_count(probe);
638 for (i = 0; i < num; i++) {
639 err = aem_init_aem1_inst(probe, i);
640 if (err) {
641 dev_err(probe->bmc_device,
642 "Error %d initializing AEM1 0x%X\n",
643 err, i);
644 return err;
645 }
646 }
647
648 return 0;
649}
650
651/* Probe functions for AEM2 devices */
652
653/* Retrieve version and module handle for an AEM2 instance */
654static int aem_find_aem2(struct aem_ipmi_data *data,
655 struct aem_find_instance_resp *fi_resp,
656 int instance_num)
657{
658 int res;
659 struct aem_find_instance_req fi_req;
660
661 fi_req.id = system_x_id;
662 fi_req.instance_number = instance_num;
663 fi_req.module_type_id = cpu_to_be16(AEM_MODULE_TYPE_ID);
664
665 data->tx_message.cmd = AEM_FW_INSTANCE_CMD;
666 data->tx_message.data = (char *)&fi_req;
667 data->tx_message.data_len = sizeof(fi_req);
668
669 data->rx_msg_data = fi_resp;
670 data->rx_msg_len = sizeof(*fi_resp);
671
672 aem_send_message(data);
673
674 res = wait_for_completion_timeout(&data->read_complete, IPMI_TIMEOUT);
675 if (!res)
676 return -ETIMEDOUT;
677
678 if (data->rx_result || data->rx_msg_len != sizeof(*fi_resp) ||
679 memcmp(&fi_resp->id, &system_x_id, sizeof(system_x_id)))
680 return -ENOENT;
681
682 return 0;
683}
684
685/* Find and initialize one AEM2 instance */
686static int aem_init_aem2_inst(struct aem_ipmi_data *probe,
687 struct aem_find_instance_resp *fi_resp)
688{
689 struct aem_data *data;
690 int i;
691 int res = -ENOMEM;
692
693 data = kzalloc(sizeof(*data), GFP_KERNEL);
694 if (!data)
695 return res;
696 mutex_init(&data->lock);
697
698 /* Copy instance data */
699 data->ver_major = fi_resp->major;
700 data->ver_minor = fi_resp->minor;
701 data->module_handle = fi_resp->module_handle;
702 for (i = 0; i < AEM2_NUM_ENERGY_REGS; i++)
703 data->power_period[i] = AEM_DEFAULT_POWER_INTERVAL;
704
705 /* Create sub-device for this fw instance */
706 if (aem_idr_get(&data->id))
707 goto id_err;
708
709 data->pdev = platform_device_alloc(DRVNAME, data->id);
710 if (!data->pdev)
711 goto dev_err;
712 data->pdev->dev.driver = &aem_driver;
713
714 res = platform_device_add(data->pdev);
715 if (res)
716 goto ipmi_err;
717
718 dev_set_drvdata(&data->pdev->dev, data);
719
720 /* Set up IPMI interface */
721 if (aem_init_ipmi_data(&data->ipmi, probe->interface,
722 probe->bmc_device))
723 goto ipmi_err;
724
725 /* Register with hwmon */
726 data->hwmon_dev = hwmon_device_register(&data->pdev->dev);
727
728 if (IS_ERR(data->hwmon_dev)) {
729 dev_err(&data->pdev->dev, "Unable to register hwmon "
730 "device for IPMI interface %d\n",
731 probe->interface);
732 goto hwmon_reg_err;
733 }
734
735 data->update = update_aem2_sensors;
736
737 /* Find sensors */
738 if (aem2_find_sensors(data))
739 goto sensor_err;
740
741 /* Add to our list of AEM devices */
742 list_add_tail(&data->list, &driver_data.aem_devices);
743
744 dev_info(data->ipmi.bmc_device, "Found AEM v%d.%d at 0x%X\n",
745 data->ver_major, data->ver_minor,
746 data->module_handle);
747 return 0;
748
749sensor_err:
750 hwmon_device_unregister(data->hwmon_dev);
751hwmon_reg_err:
752 ipmi_destroy_user(data->ipmi.user);
753ipmi_err:
754 dev_set_drvdata(&data->pdev->dev, NULL);
755 platform_device_unregister(data->pdev);
756dev_err:
757 aem_idr_put(data->id);
758id_err:
759 kfree(data);
760
761 return res;
762}
763
764/* Find and initialize all AEM2 instances */
765static int aem_init_aem2(struct aem_ipmi_data *probe)
766{
767 struct aem_find_instance_resp fi_resp;
768 int err;
769 int i = 0;
770
771 while (!aem_find_aem2(probe, &fi_resp, i)) {
772 if (fi_resp.major != 2) {
773 dev_err(probe->bmc_device, "Unknown AEM v%d; please "
774 "report this to the maintainer.\n",
775 fi_resp.major);
776 i++;
777 continue;
778 }
779 err = aem_init_aem2_inst(probe, &fi_resp);
780 if (err) {
781 dev_err(probe->bmc_device,
782 "Error %d initializing AEM2 0x%X\n",
783 err, fi_resp.module_handle);
784 return err;
785 }
786 i++;
787 }
788
789 return 0;
790}
791
792/* Probe a BMC for AEM firmware instances */
793static void aem_register_bmc(int iface, struct device *dev)
794{
795 struct aem_ipmi_data probe;
796
797 if (aem_init_ipmi_data(&probe, iface, dev))
798 return;
799
800 /* Ignore probe errors; they won't cause problems */
801 aem_init_aem1(&probe);
802 aem_init_aem2(&probe);
803
804 ipmi_destroy_user(probe.user);
805}
806
807/* Handle BMC deletion */
808static void aem_bmc_gone(int iface)
809{
810 struct aem_data *p1, *next1;
811
812 list_for_each_entry_safe(p1, next1, &driver_data.aem_devices, list)
813 if (p1->ipmi.interface == iface)
814 aem_delete(p1);
815}
816
817/* sysfs support functions */
818
819/* AEM device name */
820static ssize_t show_name(struct device *dev, struct device_attribute *devattr,
821 char *buf)
822{
823 struct aem_data *data = dev_get_drvdata(dev);
824
825 return sprintf(buf, "%s%d\n", DRVNAME, data->ver_major);
826}
827static SENSOR_DEVICE_ATTR(name, S_IRUGO, show_name, NULL, 0);
828
829/* AEM device version */
830static ssize_t show_version(struct device *dev,
831 struct device_attribute *devattr,
832 char *buf)
833{
834 struct aem_data *data = dev_get_drvdata(dev);
835
836 return sprintf(buf, "%d.%d\n", data->ver_major, data->ver_minor);
837}
838static SENSOR_DEVICE_ATTR(version, S_IRUGO, show_version, NULL, 0);
839
840/* Display power use */
841static ssize_t aem_show_power(struct device *dev,
842 struct device_attribute *devattr,
843 char *buf)
844{
845 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
846 struct aem_data *data = dev_get_drvdata(dev);
847 u64 before, after, delta, time;
848 signed long leftover;
849 struct timespec b, a;
850
851 mutex_lock(&data->lock);
852 update_aem_energy(data);
853 getnstimeofday(&b);
854 before = data->energy[attr->index];
855
856 leftover = schedule_timeout_interruptible(
857 msecs_to_jiffies(data->power_period[attr->index])
858 );
859 if (leftover) {
860 mutex_unlock(&data->lock);
861 return 0;
862 }
863
864 update_aem_energy(data);
865 getnstimeofday(&a);
866 after = data->energy[attr->index];
867 mutex_unlock(&data->lock);
868
869 time = timespec_to_ns(&a) - timespec_to_ns(&b);
870 delta = (after - before) * UJ_PER_MJ;
871
872 return sprintf(buf, "%llu\n",
873 (unsigned long long)div64_u64(delta * NSEC_PER_SEC, time));
874}
875
876/* Display energy use */
877static ssize_t aem_show_energy(struct device *dev,
878 struct device_attribute *devattr,
879 char *buf)
880{
881 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
882 struct aem_data *a = dev_get_drvdata(dev);
883 a->update(a);
884
885 return sprintf(buf, "%llu\n",
886 (unsigned long long)a->energy[attr->index] * 1000);
887}
888
889/* Display power interval registers */
890static ssize_t aem_show_power_period(struct device *dev,
891 struct device_attribute *devattr,
892 char *buf)
893{
894 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
895 struct aem_data *a = dev_get_drvdata(dev);
896 a->update(a);
897
898 return sprintf(buf, "%lu\n", a->power_period[attr->index]);
899}
900
901/* Set power interval registers */
902static ssize_t aem_set_power_period(struct device *dev,
903 struct device_attribute *devattr,
904 const char *buf, size_t count)
905{
906 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
907 struct aem_data *a = dev_get_drvdata(dev);
908 unsigned long temp;
909 int res;
910
911 res = strict_strtoul(buf, 10, &temp);
912 if (res)
913 return res;
914
915 if (temp < AEM_MIN_POWER_INTERVAL)
916 return -EINVAL;
917
918 mutex_lock(&a->lock);
919 a->power_period[attr->index] = temp;
920 mutex_unlock(&a->lock);
921
922 return count;
923}
924
925/* Discover sensors on an AEM device */
926static int aem_register_sensors(struct aem_data *data,
927 struct aem_ro_sensor_template *ro,
928 struct aem_rw_sensor_template *rw)
929{
930 struct device *dev = &data->pdev->dev;
931 struct sensor_device_attribute *sensors = data->sensors;
932 int err;
933
934 /* Set up read-only sensors */
935 while (ro->label) {
936 sensors->dev_attr.attr.name = ro->label;
937 sensors->dev_attr.attr.mode = S_IRUGO;
938 sensors->dev_attr.show = ro->show;
939 sensors->index = ro->index;
940
941 err = device_create_file(dev, &sensors->dev_attr);
942 if (err) {
943 sensors->dev_attr.attr.name = NULL;
944 goto error;
945 }
946 sensors++;
947 ro++;
948 }
949
950 /* Set up read-write sensors */
951 while (rw->label) {
952 sensors->dev_attr.attr.name = rw->label;
953 sensors->dev_attr.attr.mode = S_IRUGO | S_IWUSR;
954 sensors->dev_attr.show = rw->show;
955 sensors->dev_attr.store = rw->set;
956 sensors->index = rw->index;
957
958 err = device_create_file(dev, &sensors->dev_attr);
959 if (err) {
960 sensors->dev_attr.attr.name = NULL;
961 goto error;
962 }
963 sensors++;
964 rw++;
965 }
966
967 err = device_create_file(dev, &sensor_dev_attr_name.dev_attr);
968 if (err)
969 goto error;
970 err = device_create_file(dev, &sensor_dev_attr_version.dev_attr);
971 return err;
972
973error:
974 aem_remove_sensors(data);
975 return err;
976}
977
978/* sysfs support functions for AEM2 sensors */
979
980/* Display temperature use */
981static ssize_t aem2_show_temp(struct device *dev,
982 struct device_attribute *devattr,
983 char *buf)
984{
985 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
986 struct aem_data *a = dev_get_drvdata(dev);
987 a->update(a);
988
989 return sprintf(buf, "%u\n", a->temp[attr->index] * 1000);
990}
991
992/* Display power-capping registers */
993static ssize_t aem2_show_pcap_value(struct device *dev,
994 struct device_attribute *devattr,
995 char *buf)
996{
997 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
998 struct aem_data *a = dev_get_drvdata(dev);
999 a->update(a);
1000
1001 return sprintf(buf, "%u\n", a->pcap[attr->index] * 100000);
1002}
1003
1004/* Remove sensors attached to an AEM device */
1005static void aem_remove_sensors(struct aem_data *data)
1006{
1007 int i;
1008
1009 for (i = 0; i < AEM_NUM_SENSORS; i++) {
1010 if (!data->sensors[i].dev_attr.attr.name)
1011 continue;
1012 device_remove_file(&data->pdev->dev,
1013 &data->sensors[i].dev_attr);
1014 }
1015
1016 device_remove_file(&data->pdev->dev,
1017 &sensor_dev_attr_name.dev_attr);
1018 device_remove_file(&data->pdev->dev,
1019 &sensor_dev_attr_version.dev_attr);
1020}
1021
1022/* Sensor probe functions */
1023
1024/* Description of AEM1 sensors */
1025static struct aem_ro_sensor_template aem1_ro_sensors[] = {
1026{"energy1_input", aem_show_energy, 0},
1027{"power1_average", aem_show_power, 0},
1028{NULL, NULL, 0},
1029};
1030
1031static struct aem_rw_sensor_template aem1_rw_sensors[] = {
1032{"power1_average_interval", aem_show_power_period, aem_set_power_period, 0},
1033{NULL, NULL, NULL, 0},
1034};
1035
1036/* Description of AEM2 sensors */
1037static struct aem_ro_sensor_template aem2_ro_sensors[] = {
1038{"energy1_input", aem_show_energy, 0},
1039{"energy2_input", aem_show_energy, 1},
1040{"power1_average", aem_show_power, 0},
1041{"power2_average", aem_show_power, 1},
1042{"temp1_input", aem2_show_temp, 0},
1043{"temp2_input", aem2_show_temp, 1},
1044
1045{"power4_average", aem2_show_pcap_value, POWER_CAP_MAX_HOTPLUG},
1046{"power5_average", aem2_show_pcap_value, POWER_CAP_MAX},
1047{"power6_average", aem2_show_pcap_value, POWER_CAP_MIN_WARNING},
1048{"power7_average", aem2_show_pcap_value, POWER_CAP_MIN},
1049
1050{"power3_average", aem2_show_pcap_value, POWER_AUX},
1051{"power_cap", aem2_show_pcap_value, POWER_CAP},
1052{NULL, NULL, 0},
1053};
1054
1055static struct aem_rw_sensor_template aem2_rw_sensors[] = {
1056{"power1_average_interval", aem_show_power_period, aem_set_power_period, 0},
1057{"power2_average_interval", aem_show_power_period, aem_set_power_period, 1},
1058{NULL, NULL, NULL, 0},
1059};
1060
1061/* Set up AEM1 sensor attrs */
1062static int aem1_find_sensors(struct aem_data *data)
1063{
1064 return aem_register_sensors(data, aem1_ro_sensors, aem1_rw_sensors);
1065}
1066
1067/* Set up AEM2 sensor attrs */
1068static int aem2_find_sensors(struct aem_data *data)
1069{
1070 return aem_register_sensors(data, aem2_ro_sensors, aem2_rw_sensors);
1071}
1072
1073/* Module init/exit routines */
1074
1075static int __init aem_init(void)
1076{
1077 int res;
1078
1079 res = driver_register(&aem_driver);
1080 if (res) {
1081 printk(KERN_ERR "Can't register aem driver\n");
1082 return res;
1083 }
1084
1085 res = ipmi_smi_watcher_register(&driver_data.bmc_events);
1086 if (res)
1087 goto ipmi_reg_err;
1088 return 0;
1089
1090ipmi_reg_err:
1091 driver_unregister(&aem_driver);
1092 return res;
1093
1094}
1095
1096static void __exit aem_exit(void)
1097{
1098 struct aem_data *p1, *next1;
1099
1100 ipmi_smi_watcher_unregister(&driver_data.bmc_events);
1101 driver_unregister(&aem_driver);
1102 list_for_each_entry_safe(p1, next1, &driver_data.aem_devices, list)
1103 aem_delete(p1);
1104}
1105
1106MODULE_AUTHOR("Darrick J. Wong <djwong@us.ibm.com>");
1107MODULE_DESCRIPTION("IBM Active Energy Manager power/temp sensor driver");
1108MODULE_LICENSE("GPL");
1109
1110module_init(aem_init);
1111module_exit(aem_exit);
diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
index fa7696905154..de698dc73020 100644
--- a/drivers/hwmon/lm75.c
+++ b/drivers/hwmon/lm75.c
@@ -251,10 +251,13 @@ static int lm75_detach_client(struct i2c_client *client)
251 the SMBus standard. */ 251 the SMBus standard. */
252static int lm75_read_value(struct i2c_client *client, u8 reg) 252static int lm75_read_value(struct i2c_client *client, u8 reg)
253{ 253{
254 int value;
255
254 if (reg == LM75_REG_CONF) 256 if (reg == LM75_REG_CONF)
255 return i2c_smbus_read_byte_data(client, reg); 257 return i2c_smbus_read_byte_data(client, reg);
256 else 258
257 return swab16(i2c_smbus_read_word_data(client, reg)); 259 value = i2c_smbus_read_word_data(client, reg);
260 return (value < 0) ? value : swab16(value);
258} 261}
259 262
260static int lm75_write_value(struct i2c_client *client, u8 reg, u16 value) 263static int lm75_write_value(struct i2c_client *client, u8 reg, u16 value)
@@ -287,9 +290,16 @@ static struct lm75_data *lm75_update_device(struct device *dev)
287 int i; 290 int i;
288 dev_dbg(&client->dev, "Starting lm75 update\n"); 291 dev_dbg(&client->dev, "Starting lm75 update\n");
289 292
290 for (i = 0; i < ARRAY_SIZE(data->temp); i++) 293 for (i = 0; i < ARRAY_SIZE(data->temp); i++) {
291 data->temp[i] = lm75_read_value(client, 294 int status;
292 LM75_REG_TEMP[i]); 295
296 status = lm75_read_value(client, LM75_REG_TEMP[i]);
297 if (status < 0)
298 dev_dbg(&client->dev, "reg %d, err %d\n",
299 LM75_REG_TEMP[i], status);
300 else
301 data->temp[i] = status;
302 }
293 data->last_updated = jiffies; 303 data->last_updated = jiffies;
294 data->valid = 1; 304 data->valid = 1;
295 } 305 }
diff --git a/drivers/hwmon/lm85.c b/drivers/hwmon/lm85.c
index 182fe6a5605f..ee5eca1c1921 100644
--- a/drivers/hwmon/lm85.c
+++ b/drivers/hwmon/lm85.c
@@ -192,23 +192,20 @@ static int RANGE_TO_REG( int range )
192{ 192{
193 int i; 193 int i;
194 194
195 if ( range < lm85_range_map[0] ) { 195 if (range >= lm85_range_map[15])
196 return 0 ;
197 } else if ( range > lm85_range_map[15] ) {
198 return 15 ; 196 return 15 ;
199 } else { /* find closest match */ 197
200 for ( i = 14 ; i >= 0 ; --i ) { 198 /* Find the closest match */
201 if ( range > lm85_range_map[i] ) { /* range bracketed */ 199 for (i = 14; i >= 0; --i) {
202 if ((lm85_range_map[i+1] - range) < 200 if (range >= lm85_range_map[i]) {
203 (range - lm85_range_map[i])) { 201 if ((lm85_range_map[i + 1] - range) <
204 i++; 202 (range - lm85_range_map[i]))
205 break; 203 return i + 1;
206 } 204 return i;
207 break;
208 }
209 } 205 }
210 } 206 }
211 return( i & 0x0f ); 207
208 return 0;
212} 209}
213#define RANGE_FROM_REG(val) (lm85_range_map[(val)&0x0f]) 210#define RANGE_FROM_REG(val) (lm85_range_map[(val)&0x0f])
214 211
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 1305ef190fc1..9e8c875437be 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -290,12 +290,12 @@ static int i2s_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
290 * bus, or started a new i2c message 290 * bus, or started a new i2c message
291 */ 291 */
292 292
293 if (iicstat & S3C2410_IICSTAT_LASTBIT && 293 if (iicstat & S3C2410_IICSTAT_LASTBIT &&
294 !(i2c->msg->flags & I2C_M_IGNORE_NAK)) { 294 !(i2c->msg->flags & I2C_M_IGNORE_NAK)) {
295 /* ack was not received... */ 295 /* ack was not received... */
296 296
297 dev_dbg(i2c->dev, "ack was not received\n"); 297 dev_dbg(i2c->dev, "ack was not received\n");
298 s3c24xx_i2c_stop(i2c, -EREMOTEIO); 298 s3c24xx_i2c_stop(i2c, -ENXIO);
299 goto out_ack; 299 goto out_ack;
300 } 300 }
301 301
@@ -305,7 +305,7 @@ static int i2s_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
305 i2c->state = STATE_WRITE; 305 i2c->state = STATE_WRITE;
306 306
307 /* terminate the transfer if there is nothing to do 307 /* terminate the transfer if there is nothing to do
308 * (used by the i2c probe to find devices */ 308 * as this is used by the i2c probe to find devices. */
309 309
310 if (is_lastmsg(i2c) && i2c->msg->len == 0) { 310 if (is_lastmsg(i2c) && i2c->msg->len == 0) {
311 s3c24xx_i2c_stop(i2c, 0); 311 s3c24xx_i2c_stop(i2c, 0);
@@ -323,7 +323,17 @@ static int i2s_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
323 * end of the message, and if so, work out what to do 323 * end of the message, and if so, work out what to do
324 */ 324 */
325 325
326 if (!(i2c->msg->flags & I2C_M_IGNORE_NAK)) {
327 if (iicstat & S3C2410_IICSTAT_LASTBIT) {
328 dev_dbg(i2c->dev, "WRITE: No Ack\n");
329
330 s3c24xx_i2c_stop(i2c, -ECONNREFUSED);
331 goto out_ack;
332 }
333 }
334
326 retry_write: 335 retry_write:
336
327 if (!is_msgend(i2c)) { 337 if (!is_msgend(i2c)) {
328 byte = i2c->msg->buf[i2c->msg_ptr++]; 338 byte = i2c->msg->buf[i2c->msg_ptr++];
329 writeb(byte, i2c->regs + S3C2410_IICDS); 339 writeb(byte, i2c->regs + S3C2410_IICDS);
@@ -377,17 +387,6 @@ static int i2s_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
377 * going to do any more read/write 387 * going to do any more read/write
378 */ 388 */
379 389
380 if (!(i2c->msg->flags & I2C_M_IGNORE_NAK) &&
381 !(is_msglast(i2c) && is_lastmsg(i2c))) {
382
383 if (iicstat & S3C2410_IICSTAT_LASTBIT) {
384 dev_dbg(i2c->dev, "READ: No Ack\n");
385
386 s3c24xx_i2c_stop(i2c, -ECONNREFUSED);
387 goto out_ack;
388 }
389 }
390
391 byte = readb(i2c->regs + S3C2410_IICDS); 390 byte = readb(i2c->regs + S3C2410_IICDS);
392 i2c->msg->buf[i2c->msg_ptr++] = byte; 391 i2c->msg->buf[i2c->msg_ptr++] = byte;
393 392
@@ -949,3 +948,4 @@ MODULE_DESCRIPTION("S3C24XX I2C Bus driver");
949MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>"); 948MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>");
950MODULE_LICENSE("GPL"); 949MODULE_LICENSE("GPL");
951MODULE_ALIAS("platform:s3c2410-i2c"); 950MODULE_ALIAS("platform:s3c2410-i2c");
951MODULE_ALIAS("platform:s3c2440-i2c");
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig
index b4f3aefa12b6..1607536ff5fb 100644
--- a/drivers/ide/Kconfig
+++ b/drivers/ide/Kconfig
@@ -1028,6 +1028,7 @@ endif
1028 1028
1029config BLK_DEV_HD_ONLY 1029config BLK_DEV_HD_ONLY
1030 bool "Old hard disk (MFM/RLL/IDE) driver" 1030 bool "Old hard disk (MFM/RLL/IDE) driver"
1031 depends on !ARM || ARCH_RPC || ARCH_SHARK || BROKEN
1031 help 1032 help
1032 There are two drivers for MFM/RLL/IDE hard disks. Most people use 1033 There are two drivers for MFM/RLL/IDE hard disks. Most people use
1033 the newer enhanced driver, but this old one is still around for two 1034 the newer enhanced driver, but this old one is still around for two
diff --git a/drivers/ide/arm/bast-ide.c b/drivers/ide/arm/bast-ide.c
index 713cef20622e..8e8c28104b45 100644
--- a/drivers/ide/arm/bast-ide.c
+++ b/drivers/ide/arm/bast-ide.c
@@ -42,6 +42,7 @@ static int __init bastide_register(unsigned int base, unsigned int aux, int irq)
42 42
43 hw.io_ports.ctl_addr = aux + (6 * 0x20); 43 hw.io_ports.ctl_addr = aux + (6 * 0x20);
44 hw.irq = irq; 44 hw.irq = irq;
45 hw.chipset = ide_generic;
45 46
46 hwif = ide_find_port(); 47 hwif = ide_find_port();
47 if (hwif == NULL) 48 if (hwif == NULL)
diff --git a/drivers/ide/arm/ide_arm.c b/drivers/ide/arm/ide_arm.c
index 4263ffd4ab20..2f311da4c963 100644
--- a/drivers/ide/arm/ide_arm.c
+++ b/drivers/ide/arm/ide_arm.c
@@ -49,6 +49,7 @@ static int __init ide_arm_init(void)
49 memset(&hw, 0, sizeof(hw)); 49 memset(&hw, 0, sizeof(hw));
50 ide_std_init_ports(&hw, base, ctl); 50 ide_std_init_ports(&hw, base, ctl);
51 hw.irq = IDE_ARM_IRQ; 51 hw.irq = IDE_ARM_IRQ;
52 hw.chipset = ide_generic;
52 53
53 hwif = ide_find_port(); 54 hwif = ide_find_port();
54 if (hwif) { 55 if (hwif) {
diff --git a/drivers/ide/arm/palm_bk3710.c b/drivers/ide/arm/palm_bk3710.c
index 96378ebfb31f..cc24803fadff 100644
--- a/drivers/ide/arm/palm_bk3710.c
+++ b/drivers/ide/arm/palm_bk3710.c
@@ -353,8 +353,8 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev)
353 struct clk *clkp; 353 struct clk *clkp;
354 struct resource *mem, *irq; 354 struct resource *mem, *irq;
355 ide_hwif_t *hwif; 355 ide_hwif_t *hwif;
356 void __iomem *base; 356 unsigned long base;
357 int pribase, i; 357 int i;
358 hw_regs_t hw; 358 hw_regs_t hw;
359 u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; 359 u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
360 360
@@ -374,22 +374,27 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev)
374 printk(KERN_ERR "failed to get memory region resource\n"); 374 printk(KERN_ERR "failed to get memory region resource\n");
375 return -ENODEV; 375 return -ENODEV;
376 } 376 }
377
377 irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); 378 irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
378 if (irq == NULL) { 379 if (irq == NULL) {
379 printk(KERN_ERR "failed to get IRQ resource\n"); 380 printk(KERN_ERR "failed to get IRQ resource\n");
380 return -ENODEV; 381 return -ENODEV;
381 } 382 }
382 383
383 base = (void *)mem->start; 384 if (request_mem_region(mem->start, mem->end - mem->start + 1,
385 "palm_bk3710") == NULL) {
386 printk(KERN_ERR "failed to request memory region\n");
387 return -EBUSY;
388 }
389
390 base = IO_ADDRESS(mem->start);
384 391
385 /* Configure the Palm Chip controller */ 392 /* Configure the Palm Chip controller */
386 palm_bk3710_chipinit(base); 393 palm_bk3710_chipinit((void __iomem *)base);
387 394
388 pribase = mem->start + IDE_PALM_ATA_PRI_REG_OFFSET;
389 for (i = 0; i < IDE_NR_PORTS - 2; i++) 395 for (i = 0; i < IDE_NR_PORTS - 2; i++)
390 hw.io_ports_array[i] = pribase + i; 396 hw.io_ports_array[i] = base + IDE_PALM_ATA_PRI_REG_OFFSET + i;
391 hw.io_ports.ctl_addr = mem->start + 397 hw.io_ports.ctl_addr = base + IDE_PALM_ATA_PRI_CTL_OFFSET;
392 IDE_PALM_ATA_PRI_CTL_OFFSET;
393 hw.irq = irq->start; 398 hw.irq = irq->start;
394 hw.chipset = ide_palm3710; 399 hw.chipset = ide_palm3710;
395 400
@@ -409,9 +414,6 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev)
409 414
410 ide_device_add(idx, &palm_bk3710_port_info); 415 ide_device_add(idx, &palm_bk3710_port_info);
411 416
412 if (!hwif->present)
413 goto out;
414
415 return 0; 417 return 0;
416out: 418out:
417 printk(KERN_WARNING "Palm Chip BK3710 IDE Register Fail\n"); 419 printk(KERN_WARNING "Palm Chip BK3710 IDE Register Fail\n");
@@ -437,4 +439,3 @@ static int __init palm_bk3710_init(void)
437 439
438module_init(palm_bk3710_init); 440module_init(palm_bk3710_init);
439MODULE_LICENSE("GPL"); 441MODULE_LICENSE("GPL");
440
diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
index a6073e248f45..2d92214096ab 100644
--- a/drivers/ide/ide-generic.c
+++ b/drivers/ide/ide-generic.c
@@ -22,6 +22,10 @@
22 22
23#define DRV_NAME "ide_generic" 23#define DRV_NAME "ide_generic"
24 24
25static int probe_mask = 0x03;
26module_param(probe_mask, int, 0);
27MODULE_PARM_DESC(probe_mask, "probe mask for legacy ISA IDE ports");
28
25static ssize_t store_add(struct class *cls, const char *buf, size_t n) 29static ssize_t store_add(struct class *cls, const char *buf, size_t n)
26{ 30{
27 ide_hwif_t *hwif; 31 ide_hwif_t *hwif;
@@ -89,6 +93,9 @@ static int __init ide_generic_init(void)
89 u8 idx[MAX_HWIFS]; 93 u8 idx[MAX_HWIFS];
90 int i; 94 int i;
91 95
96 printk(KERN_INFO DRV_NAME ": please use \"probe_mask=0x3f\" module "
97 "parameter for probing all legacy ISA IDE ports\n");
98
92 for (i = 0; i < MAX_HWIFS; i++) { 99 for (i = 0; i < MAX_HWIFS; i++) {
93 ide_hwif_t *hwif; 100 ide_hwif_t *hwif;
94 unsigned long io_addr = ide_default_io_base(i); 101 unsigned long io_addr = ide_default_io_base(i);
@@ -96,7 +103,7 @@ static int __init ide_generic_init(void)
96 103
97 idx[i] = 0xff; 104 idx[i] = 0xff;
98 105
99 if (io_addr) { 106 if ((probe_mask & (1 << i)) && io_addr) {
100 if (!request_region(io_addr, 8, DRV_NAME)) { 107 if (!request_region(io_addr, 8, DRV_NAME)) {
101 printk(KERN_ERR "%s: I/O resource 0x%lX-0x%lX " 108 printk(KERN_ERR "%s: I/O resource 0x%lX-0x%lX "
102 "not free.\n", 109 "not free.\n",
@@ -125,6 +132,7 @@ static int __init ide_generic_init(void)
125 memset(&hw, 0, sizeof(hw)); 132 memset(&hw, 0, sizeof(hw));
126 ide_std_init_ports(&hw, io_addr, io_addr + 0x206); 133 ide_std_init_ports(&hw, io_addr, io_addr + 0x206);
127 hw.irq = ide_default_irq(io_addr); 134 hw.irq = ide_default_irq(io_addr);
135 hw.chipset = ide_generic;
128 ide_init_port_hw(hwif, &hw); 136 ide_init_port_hw(hwif, &hw);
129 137
130 idx[i] = i; 138 idx[i] = i;
diff --git a/drivers/ide/ide-pnp.c b/drivers/ide/ide-pnp.c
index 6a8953f68e9f..adbd01784162 100644
--- a/drivers/ide/ide-pnp.c
+++ b/drivers/ide/ide-pnp.c
@@ -55,6 +55,7 @@ static int idepnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
55 memset(&hw, 0, sizeof(hw)); 55 memset(&hw, 0, sizeof(hw));
56 ide_std_init_ports(&hw, base, ctl); 56 ide_std_init_ports(&hw, base, ctl);
57 hw.irq = pnp_irq(dev, 0); 57 hw.irq = pnp_irq(dev, 0);
58 hw.chipset = ide_generic;
58 59
59 hwif = ide_find_port(); 60 hwif = ide_find_port();
60 if (hwif) { 61 if (hwif) {
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 34b0d4f26b58..d27061b39324 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -646,15 +646,12 @@ static int ide_register_port(ide_hwif_t *hwif)
646 goto out; 646 goto out;
647 } 647 }
648 648
649 get_device(&hwif->gendev); 649 hwif->portdev = device_create_drvdata(ide_port_class, &hwif->gendev,
650 650 MKDEV(0, 0), hwif, hwif->name);
651 hwif->portdev = device_create(ide_port_class, &hwif->gendev,
652 MKDEV(0, 0), hwif->name);
653 if (IS_ERR(hwif->portdev)) { 651 if (IS_ERR(hwif->portdev)) {
654 ret = PTR_ERR(hwif->portdev); 652 ret = PTR_ERR(hwif->portdev);
655 device_unregister(&hwif->gendev); 653 device_unregister(&hwif->gendev);
656 } 654 }
657 dev_set_drvdata(hwif->portdev, hwif);
658out: 655out:
659 return ret; 656 return ret;
660} 657}
@@ -1334,8 +1331,7 @@ static void ide_port_init_devices(ide_hwif_t *hwif)
1334static void ide_init_port(ide_hwif_t *hwif, unsigned int port, 1331static void ide_init_port(ide_hwif_t *hwif, unsigned int port,
1335 const struct ide_port_info *d) 1332 const struct ide_port_info *d)
1336{ 1333{
1337 if (d->chipset != ide_etrax100) 1334 hwif->channel = port;
1338 hwif->channel = port;
1339 1335
1340 if (d->chipset) 1336 if (d->chipset)
1341 hwif->chipset = d->chipset; 1337 hwif->chipset = d->chipset;
@@ -1520,7 +1516,7 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d)
1520 continue; 1516 continue;
1521 } 1517 }
1522 1518
1523 if (d->chipset != ide_etrax100 && (i & 1) && mate) { 1519 if ((i & 1) && mate) {
1524 hwif->mate = mate; 1520 hwif->mate = mate;
1525 mate->mate = hwif; 1521 mate->mate = hwif;
1526 } 1522 }
@@ -1666,6 +1662,7 @@ static void ide_legacy_init_one(u8 *idx, hw_regs_t *hw, u8 port_no,
1666 1662
1667 ide_std_init_ports(hw, base, ctl); 1663 ide_std_init_ports(hw, base, ctl);
1668 hw->irq = irq; 1664 hw->irq = irq;
1665 hw->chipset = d->chipset;
1669 1666
1670 hwif = ide_find_port_slot(d); 1667 hwif = ide_find_port_slot(d);
1671 if (hwif) { 1668 if (hwif) {
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c
index 8d6ad812a014..8af88bf0969b 100644
--- a/drivers/ide/ide-proc.c
+++ b/drivers/ide/ide-proc.c
@@ -63,7 +63,6 @@ static int proc_ide_read_imodel
63 case ide_pmac: name = "mac-io"; break; 63 case ide_pmac: name = "mac-io"; break;
64 case ide_au1xxx: name = "au1xxx"; break; 64 case ide_au1xxx: name = "au1xxx"; break;
65 case ide_palm3710: name = "palm3710"; break; 65 case ide_palm3710: name = "palm3710"; break;
66 case ide_etrax100: name = "etrax100"; break;
67 case ide_acorn: name = "acorn"; break; 66 case ide_acorn: name = "acorn"; break;
68 default: name = "(unknown)"; break; 67 default: name = "(unknown)"; break;
69 } 68 }
@@ -77,7 +76,7 @@ static int proc_ide_read_mate
77 ide_hwif_t *hwif = (ide_hwif_t *) data; 76 ide_hwif_t *hwif = (ide_hwif_t *) data;
78 int len; 77 int len;
79 78
80 if (hwif && hwif->mate && hwif->mate->present) 79 if (hwif && hwif->mate)
81 len = sprintf(page, "%s\n", hwif->mate->name); 80 len = sprintf(page, "%s\n", hwif->mate->name);
82 else 81 else
83 len = sprintf(page, "(none)\n"); 82 len = sprintf(page, "(none)\n");
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index 0c908ca3ff79..ab545ffa1549 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -225,10 +225,10 @@ static u8 wait_drive_not_busy(ide_drive_t *drive)
225 u8 stat; 225 u8 stat;
226 226
227 /* 227 /*
228 * Last sector was transfered, wait until drive is ready. 228 * Last sector was transfered, wait until device is ready. This can
229 * This can take up to 10 usec, but we will wait max 1 ms. 229 * take up to 6 ms on some ATAPI devices, so we will wait max 10 ms.
230 */ 230 */
231 for (retries = 0; retries < 100; retries++) { 231 for (retries = 0; retries < 1000; retries++) {
232 stat = ide_read_status(drive); 232 stat = ide_read_status(drive);
233 233
234 if (stat & BUSY_STAT) 234 if (stat & BUSY_STAT)
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index c758dcb13b14..300431d080a9 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -315,13 +315,14 @@ void ide_unregister(ide_hwif_t *hwif)
315 315
316 BUG_ON(in_interrupt()); 316 BUG_ON(in_interrupt());
317 BUG_ON(irqs_disabled()); 317 BUG_ON(irqs_disabled());
318
318 mutex_lock(&ide_cfg_mtx); 319 mutex_lock(&ide_cfg_mtx);
319 spin_lock_irq(&ide_lock);
320 if (!hwif->present)
321 goto abort;
322 __ide_port_unregister_devices(hwif);
323 hwif->present = 0;
324 320
321 spin_lock_irq(&ide_lock);
322 if (hwif->present) {
323 __ide_port_unregister_devices(hwif);
324 hwif->present = 0;
325 }
325 spin_unlock_irq(&ide_lock); 326 spin_unlock_irq(&ide_lock);
326 327
327 ide_proc_unregister_port(hwif); 328 ide_proc_unregister_port(hwif);
@@ -351,16 +352,15 @@ void ide_unregister(ide_hwif_t *hwif)
351 blk_unregister_region(MKDEV(hwif->major, 0), MAX_DRIVES<<PARTN_BITS); 352 blk_unregister_region(MKDEV(hwif->major, 0), MAX_DRIVES<<PARTN_BITS);
352 kfree(hwif->sg_table); 353 kfree(hwif->sg_table);
353 unregister_blkdev(hwif->major, hwif->name); 354 unregister_blkdev(hwif->major, hwif->name);
354 spin_lock_irq(&ide_lock);
355 355
356 if (hwif->dma_base) 356 if (hwif->dma_base)
357 ide_release_dma_engine(hwif); 357 ide_release_dma_engine(hwif);
358 358
359 spin_lock_irq(&ide_lock);
359 /* restore hwif data to pristine status */ 360 /* restore hwif data to pristine status */
360 ide_init_port_data(hwif, hwif->index); 361 ide_init_port_data(hwif, hwif->index);
361
362abort:
363 spin_unlock_irq(&ide_lock); 362 spin_unlock_irq(&ide_lock);
363
364 mutex_unlock(&ide_cfg_mtx); 364 mutex_unlock(&ide_cfg_mtx);
365} 365}
366 366
@@ -1094,13 +1094,6 @@ struct bus_type ide_bus_type = {
1094 1094
1095EXPORT_SYMBOL_GPL(ide_bus_type); 1095EXPORT_SYMBOL_GPL(ide_bus_type);
1096 1096
1097static void ide_port_class_release(struct device *portdev)
1098{
1099 ide_hwif_t *hwif = dev_get_drvdata(portdev);
1100
1101 put_device(&hwif->gendev);
1102}
1103
1104int ide_vlb_clk; 1097int ide_vlb_clk;
1105EXPORT_SYMBOL_GPL(ide_vlb_clk); 1098EXPORT_SYMBOL_GPL(ide_vlb_clk);
1106 1099
@@ -1305,7 +1298,6 @@ static int __init ide_init(void)
1305 ret = PTR_ERR(ide_port_class); 1298 ret = PTR_ERR(ide_port_class);
1306 goto out_port_class; 1299 goto out_port_class;
1307 } 1300 }
1308 ide_port_class->dev_release = ide_port_class_release;
1309 1301
1310 init_ide_data(); 1302 init_ide_data();
1311 1303
diff --git a/drivers/ide/legacy/buddha.c b/drivers/ide/legacy/buddha.c
index 5c730e4dd735..9a1d27ef3f8a 100644
--- a/drivers/ide/legacy/buddha.c
+++ b/drivers/ide/legacy/buddha.c
@@ -138,6 +138,8 @@ static void __init buddha_setup_ports(hw_regs_t *hw, unsigned long base,
138 138
139 hw->irq = IRQ_AMIGA_PORTS; 139 hw->irq = IRQ_AMIGA_PORTS;
140 hw->ack_intr = ack_intr; 140 hw->ack_intr = ack_intr;
141
142 hw->chipset = ide_generic;
141} 143}
142 144
143 /* 145 /*
diff --git a/drivers/ide/legacy/falconide.c b/drivers/ide/legacy/falconide.c
index 9e449a0c623f..af11028b4794 100644
--- a/drivers/ide/legacy/falconide.c
+++ b/drivers/ide/legacy/falconide.c
@@ -81,6 +81,8 @@ static void __init falconide_setup_ports(hw_regs_t *hw)
81 81
82 hw->irq = IRQ_MFP_IDE; 82 hw->irq = IRQ_MFP_IDE;
83 hw->ack_intr = NULL; 83 hw->ack_intr = NULL;
84
85 hw->chipset = ide_generic;
84} 86}
85 87
86 /* 88 /*
diff --git a/drivers/ide/legacy/gayle.c b/drivers/ide/legacy/gayle.c
index a9c2593a898c..fed7d812761c 100644
--- a/drivers/ide/legacy/gayle.c
+++ b/drivers/ide/legacy/gayle.c
@@ -16,6 +16,7 @@
16#include <linux/ide.h> 16#include <linux/ide.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/zorro.h> 18#include <linux/zorro.h>
19#include <linux/module.h>
19 20
20#include <asm/setup.h> 21#include <asm/setup.h>
21#include <asm/amigahw.h> 22#include <asm/amigahw.h>
@@ -62,7 +63,10 @@
62 GAYLE_NUM_HWIFS-1) 63 GAYLE_NUM_HWIFS-1)
63#define GAYLE_HAS_CONTROL_REG (!ide_doubler) 64#define GAYLE_HAS_CONTROL_REG (!ide_doubler)
64#define GAYLE_IDEREG_SIZE (ide_doubler ? 0x1000 : 0x2000) 65#define GAYLE_IDEREG_SIZE (ide_doubler ? 0x1000 : 0x2000)
66
65int ide_doubler = 0; /* support IDE doublers? */ 67int ide_doubler = 0; /* support IDE doublers? */
68EXPORT_SYMBOL_GPL(ide_doubler);
69
66module_param_named(doubler, ide_doubler, bool, 0); 70module_param_named(doubler, ide_doubler, bool, 0);
67MODULE_PARM_DESC(doubler, "enable support for IDE doublers"); 71MODULE_PARM_DESC(doubler, "enable support for IDE doublers");
68#endif /* CONFIG_BLK_DEV_IDEDOUBLER */ 72#endif /* CONFIG_BLK_DEV_IDEDOUBLER */
@@ -112,6 +116,8 @@ static void __init gayle_setup_ports(hw_regs_t *hw, unsigned long base,
112 116
113 hw->irq = IRQ_AMIGA_PORTS; 117 hw->irq = IRQ_AMIGA_PORTS;
114 hw->ack_intr = ack_intr; 118 hw->ack_intr = ack_intr;
119
120 hw->chipset = ide_generic;
115} 121}
116 122
117 /* 123 /*
diff --git a/drivers/ide/legacy/ide-cs.c b/drivers/ide/legacy/ide-cs.c
index aa2ea3deac85..3381424d70a1 100644
--- a/drivers/ide/legacy/ide-cs.c
+++ b/drivers/ide/legacy/ide-cs.c
@@ -135,13 +135,17 @@ static void ide_detach(struct pcmcia_device *link)
135{ 135{
136 ide_info_t *info = link->priv; 136 ide_info_t *info = link->priv;
137 ide_hwif_t *hwif = info->hwif; 137 ide_hwif_t *hwif = info->hwif;
138 unsigned long data_addr, ctl_addr;
138 139
139 DEBUG(0, "ide_detach(0x%p)\n", link); 140 DEBUG(0, "ide_detach(0x%p)\n", link);
140 141
142 data_addr = hwif->io_ports.data_addr;
143 ctl_addr = hwif->io_ports.ctl_addr;
144
141 ide_release(link); 145 ide_release(link);
142 146
143 release_region(hwif->io_ports.ctl_addr, 1); 147 release_region(ctl_addr, 1);
144 release_region(hwif->io_ports.data_addr, 8); 148 release_region(data_addr, 8);
145 149
146 kfree(info); 150 kfree(info);
147} /* ide_detach */ 151} /* ide_detach */
@@ -194,6 +198,16 @@ static ide_hwif_t *idecs_register(unsigned long io, unsigned long ctl,
194 if (hwif->present) 198 if (hwif->present)
195 return hwif; 199 return hwif;
196 200
201 /* retry registration in case device is still spinning up */
202 for (i = 0; i < 10; i++) {
203 msleep(100);
204 ide_port_scan(hwif);
205 if (hwif->present)
206 return hwif;
207 }
208
209 return hwif;
210
197out_release: 211out_release:
198 release_region(ctl, 1); 212 release_region(ctl, 1);
199 release_region(io, 8); 213 release_region(io, 8);
@@ -222,7 +236,7 @@ static int ide_config(struct pcmcia_device *link)
222 cistpl_cftable_entry_t dflt; 236 cistpl_cftable_entry_t dflt;
223 } *stk = NULL; 237 } *stk = NULL;
224 cistpl_cftable_entry_t *cfg; 238 cistpl_cftable_entry_t *cfg;
225 int i, pass, last_ret = 0, last_fn = 0, is_kme = 0; 239 int pass, last_ret = 0, last_fn = 0, is_kme = 0;
226 unsigned long io_base, ctl_base; 240 unsigned long io_base, ctl_base;
227 ide_hwif_t *hwif; 241 ide_hwif_t *hwif;
228 242
@@ -319,30 +333,15 @@ static int ide_config(struct pcmcia_device *link)
319 if (is_kme) 333 if (is_kme)
320 outb(0x81, ctl_base+1); 334 outb(0x81, ctl_base+1);
321 335
322 /* retry registration in case device is still spinning up */ 336 hwif = idecs_register(io_base, ctl_base, link->irq.AssignedIRQ, link);
323 for (i = 0; i < 10; i++) { 337 if (hwif == NULL && link->io.NumPorts1 == 0x20) {
324 hwif = idecs_register(io_base, ctl_base, link->irq.AssignedIRQ, link);
325 if (hwif)
326 break;
327 if (link->io.NumPorts1 == 0x20) {
328 outb(0x02, ctl_base + 0x10); 338 outb(0x02, ctl_base + 0x10);
329 hwif = idecs_register(io_base + 0x10, ctl_base + 0x10, 339 hwif = idecs_register(io_base + 0x10, ctl_base + 0x10,
330 link->irq.AssignedIRQ, link); 340 link->irq.AssignedIRQ, link);
331 if (hwif) {
332 io_base += 0x10;
333 ctl_base += 0x10;
334 break;
335 }
336 }
337 msleep(100);
338 } 341 }
339 342
340 if (hwif == NULL) { 343 if (hwif == NULL)
341 printk(KERN_NOTICE "ide-cs: ide_register() at 0x%3lx & 0x%3lx"
342 ", irq %u failed\n", io_base, ctl_base,
343 link->irq.AssignedIRQ);
344 goto failed; 344 goto failed;
345 }
346 345
347 info->ndev = 1; 346 info->ndev = 1;
348 sprintf(info->node.dev_name, "hd%c", 'a' + hwif->index * 2); 347 sprintf(info->node.dev_name, "hd%c", 'a' + hwif->index * 2);
@@ -411,6 +410,7 @@ static struct pcmcia_device_id ide_ids[] = {
411 PCMCIA_DEVICE_MANF_CARD(0x001c, 0x0001), /* Mitsubishi CFA */ 410 PCMCIA_DEVICE_MANF_CARD(0x001c, 0x0001), /* Mitsubishi CFA */
412 PCMCIA_DEVICE_MANF_CARD(0x0032, 0x0704), 411 PCMCIA_DEVICE_MANF_CARD(0x0032, 0x0704),
413 PCMCIA_DEVICE_MANF_CARD(0x0045, 0x0401), /* SanDisk CFA */ 412 PCMCIA_DEVICE_MANF_CARD(0x0045, 0x0401), /* SanDisk CFA */
413 PCMCIA_DEVICE_MANF_CARD(0x004f, 0x0000), /* Kingston */
414 PCMCIA_DEVICE_MANF_CARD(0x0098, 0x0000), /* Toshiba */ 414 PCMCIA_DEVICE_MANF_CARD(0x0098, 0x0000), /* Toshiba */
415 PCMCIA_DEVICE_MANF_CARD(0x00a4, 0x002d), 415 PCMCIA_DEVICE_MANF_CARD(0x00a4, 0x002d),
416 PCMCIA_DEVICE_MANF_CARD(0x00ce, 0x0000), /* Samsung */ 416 PCMCIA_DEVICE_MANF_CARD(0x00ce, 0x0000), /* Samsung */
@@ -440,6 +440,7 @@ static struct pcmcia_device_id ide_ids[] = {
440 PCMCIA_DEVICE_PROD_ID12("IO DATA", "PCIDE", 0x547e66dc, 0x5c5ab149), 440 PCMCIA_DEVICE_PROD_ID12("IO DATA", "PCIDE", 0x547e66dc, 0x5c5ab149),
441 PCMCIA_DEVICE_PROD_ID12("IO DATA", "PCIDEII", 0x547e66dc, 0xb3662674), 441 PCMCIA_DEVICE_PROD_ID12("IO DATA", "PCIDEII", 0x547e66dc, 0xb3662674),
442 PCMCIA_DEVICE_PROD_ID12("LOOKMEET", "CBIDE2 ", 0xe37be2b5, 0x8671043b), 442 PCMCIA_DEVICE_PROD_ID12("LOOKMEET", "CBIDE2 ", 0xe37be2b5, 0x8671043b),
443 PCMCIA_DEVICE_PROD_ID12("M-Systems", "CF300", 0x7ed2ad87, 0x7e9e78ee),
443 PCMCIA_DEVICE_PROD_ID12("M-Systems", "CF500", 0x7ed2ad87, 0x7a13045c), 444 PCMCIA_DEVICE_PROD_ID12("M-Systems", "CF500", 0x7ed2ad87, 0x7a13045c),
444 PCMCIA_DEVICE_PROD_ID2("NinjaATA-", 0xebe0bd79), 445 PCMCIA_DEVICE_PROD_ID2("NinjaATA-", 0xebe0bd79),
445 PCMCIA_DEVICE_PROD_ID12("PCMCIA", "CD-ROM", 0x281f1c5d, 0x66536591), 446 PCMCIA_DEVICE_PROD_ID12("PCMCIA", "CD-ROM", 0x281f1c5d, 0x66536591),
@@ -450,6 +451,7 @@ static struct pcmcia_device_id ide_ids[] = {
450 PCMCIA_DEVICE_PROD_ID12("SMI VENDOR", "SMI PRODUCT", 0x30896c92, 0x703cc5f6), 451 PCMCIA_DEVICE_PROD_ID12("SMI VENDOR", "SMI PRODUCT", 0x30896c92, 0x703cc5f6),
451 PCMCIA_DEVICE_PROD_ID12("TOSHIBA", "MK2001MPL", 0xb4585a1a, 0x3489e003), 452 PCMCIA_DEVICE_PROD_ID12("TOSHIBA", "MK2001MPL", 0xb4585a1a, 0x3489e003),
452 PCMCIA_DEVICE_PROD_ID1("TRANSCEND 512M ", 0xd0909443), 453 PCMCIA_DEVICE_PROD_ID1("TRANSCEND 512M ", 0xd0909443),
454 PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF45", 0x709b1bf1, 0xf68b6f32),
453 PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF80", 0x709b1bf1, 0x2a54d4b1), 455 PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF80", 0x709b1bf1, 0x2a54d4b1),
454 PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS2GCF120", 0x709b1bf1, 0x969aa4f2), 456 PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS2GCF120", 0x709b1bf1, 0x969aa4f2),
455 PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF120", 0x709b1bf1, 0xf54a91c8), 457 PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF120", 0x709b1bf1, 0xf54a91c8),
diff --git a/drivers/ide/legacy/macide.c b/drivers/ide/legacy/macide.c
index caa2632dd08e..2e84290d0bcc 100644
--- a/drivers/ide/legacy/macide.c
+++ b/drivers/ide/legacy/macide.c
@@ -78,6 +78,8 @@ static void __init macide_setup_ports(hw_regs_t *hw, unsigned long base,
78 78
79 hw->irq = irq; 79 hw->irq = irq;
80 hw->ack_intr = ack_intr; 80 hw->ack_intr = ack_intr;
81
82 hw->chipset = ide_generic;
81} 83}
82 84
83static const char *mac_ide_name[] = 85static const char *mac_ide_name[] =
diff --git a/drivers/ide/legacy/q40ide.c b/drivers/ide/legacy/q40ide.c
index 6f535d00e638..8ff6e2d20834 100644
--- a/drivers/ide/legacy/q40ide.c
+++ b/drivers/ide/legacy/q40ide.c
@@ -70,6 +70,8 @@ static void q40_ide_setup_ports(hw_regs_t *hw, unsigned long base,
70 70
71 hw->irq = irq; 71 hw->irq = irq;
72 hw->ack_intr = ack_intr; 72 hw->ack_intr = ack_intr;
73
74 hw->chipset = ide_generic;
73} 75}
74 76
75static void q40ide_input_data(ide_drive_t *drive, struct request *rq, 77static void q40ide_input_data(ide_drive_t *drive, struct request *rq,
diff --git a/drivers/ide/pci/cmd640.c b/drivers/ide/pci/cmd640.c
index aaf38109eaec..b38a1980dcd5 100644
--- a/drivers/ide/pci/cmd640.c
+++ b/drivers/ide/pci/cmd640.c
@@ -747,9 +747,11 @@ static int __init cmd640x_init(void)
747 747
748 ide_std_init_ports(&hw[0], 0x1f0, 0x3f6); 748 ide_std_init_ports(&hw[0], 0x1f0, 0x3f6);
749 hw[0].irq = 14; 749 hw[0].irq = 14;
750 hw[0].chipset = ide_cmd640;
750 751
751 ide_std_init_ports(&hw[1], 0x170, 0x376); 752 ide_std_init_ports(&hw[1], 0x170, 0x376);
752 hw[1].irq = 15; 753 hw[1].irq = 15;
754 hw[1].chipset = ide_cmd640;
753 755
754 printk(KERN_INFO "cmd640: buggy cmd640%c interface on %s, config=0x%02x" 756 printk(KERN_INFO "cmd640: buggy cmd640%c interface on %s, config=0x%02x"
755 "\n", 'a' + cmd640_chip_version - 1, bus_type, cfr); 757 "\n", 'a' + cmd640_chip_version - 1, bus_type, cfr);
diff --git a/drivers/ide/pci/delkin_cb.c b/drivers/ide/pci/delkin_cb.c
index b9e457996d0e..af0f30051d5a 100644
--- a/drivers/ide/pci/delkin_cb.c
+++ b/drivers/ide/pci/delkin_cb.c
@@ -47,13 +47,18 @@ static const struct ide_port_ops delkin_cb_port_ops = {
47 .quirkproc = ide_undecoded_slave, 47 .quirkproc = ide_undecoded_slave,
48}; 48};
49 49
50static const struct ide_port_info delkin_cb_port_info = {
51 .port_ops = &delkin_cb_port_ops,
52 .host_flags = IDE_HFLAG_IO_32BIT | IDE_HFLAG_UNMASK_IRQS |
53 IDE_HFLAG_NO_DMA,
54};
55
50static int __devinit 56static int __devinit
51delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id) 57delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id)
52{ 58{
53 unsigned long base; 59 unsigned long base;
54 hw_regs_t hw; 60 hw_regs_t hw;
55 ide_hwif_t *hwif = NULL; 61 ide_hwif_t *hwif = NULL;
56 ide_drive_t *drive;
57 int i, rc; 62 int i, rc;
58 u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; 63 u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
59 64
@@ -79,6 +84,7 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id)
79 memset(&hw, 0, sizeof(hw)); 84 memset(&hw, 0, sizeof(hw));
80 ide_std_init_ports(&hw, base + 0x10, base + 0x1e); 85 ide_std_init_ports(&hw, base + 0x10, base + 0x1e);
81 hw.irq = dev->irq; 86 hw.irq = dev->irq;
87 hw.dev = &dev->dev;
82 hw.chipset = ide_pci; /* this enables IRQ sharing */ 88 hw.chipset = ide_pci; /* this enables IRQ sharing */
83 89
84 hwif = ide_find_port(); 90 hwif = ide_find_port();
@@ -89,26 +95,16 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id)
89 95
90 ide_init_port_data(hwif, i); 96 ide_init_port_data(hwif, i);
91 ide_init_port_hw(hwif, &hw); 97 ide_init_port_hw(hwif, &hw);
92 hwif->port_ops = &delkin_cb_port_ops;
93 98
94 idx[0] = i; 99 idx[0] = i;
95 100
96 ide_device_add(idx, NULL); 101 ide_device_add(idx, &delkin_cb_port_info);
97
98 if (!hwif->present)
99 goto out_disable;
100 102
101 pci_set_drvdata(dev, hwif); 103 pci_set_drvdata(dev, hwif);
102 hwif->dev = &dev->dev; 104
103 drive = &hwif->drives[0];
104 if (drive->present) {
105 drive->io_32bit = 1;
106 drive->unmask = 1;
107 }
108 return 0; 105 return 0;
109 106
110out_disable: 107out_disable:
111 printk(KERN_ERR "delkin_cb: no IDE devices found\n");
112 pci_release_regions(dev); 108 pci_release_regions(dev);
113 pci_disable_device(dev); 109 pci_disable_device(dev);
114 return -ENODEV; 110 return -ENODEV;
@@ -139,14 +135,12 @@ static struct pci_driver driver = {
139 .remove = delkin_cb_remove, 135 .remove = delkin_cb_remove,
140}; 136};
141 137
142static int 138static int __init delkin_cb_init(void)
143delkin_cb_init (void)
144{ 139{
145 return pci_register_driver(&driver); 140 return pci_register_driver(&driver);
146} 141}
147 142
148static void 143static void __exit delkin_cb_exit(void)
149delkin_cb_exit (void)
150{ 144{
151 pci_unregister_driver(&driver); 145 pci_unregister_driver(&driver);
152} 146}
diff --git a/drivers/ide/pci/opti621.c b/drivers/ide/pci/opti621.c
index 6e99080497bf..725c80508d90 100644
--- a/drivers/ide/pci/opti621.c
+++ b/drivers/ide/pci/opti621.c
@@ -81,8 +81,6 @@
81 * 0.5 doesn't work. 81 * 0.5 doesn't work.
82 */ 82 */
83 83
84#define OPTI621_DEBUG /* define for debug messages */
85
86#include <linux/types.h> 84#include <linux/types.h>
87#include <linux/module.h> 85#include <linux/module.h>
88#include <linux/kernel.h> 86#include <linux/kernel.h>
@@ -92,28 +90,6 @@
92 90
93#include <asm/io.h> 91#include <asm/io.h>
94 92
95//#define OPTI621_MAX_PIO 3
96/* In fact, I do not have any PIO 4 drive
97 * (address: 25 ns, data: 70 ns, recovery: 35 ns),
98 * but OPTi 82C621 is programmable and it can do (minimal values):
99 * on 40MHz PCI bus (pulse 25 ns):
100 * address: 25 ns, data: 25 ns, recovery: 50 ns;
101 * on 20MHz PCI bus (pulse 50 ns):
102 * address: 50 ns, data: 50 ns, recovery: 100 ns.
103 */
104
105/* #define READ_PREFETCH 0 */
106/* Uncomment for disable read prefetch.
107 * There is some readprefetch capatibility in hdparm,
108 * but when I type hdparm -P 1 /dev/hda, I got errors
109 * and till reset drive is inaccessible.
110 * This (hw) read prefetch is safe on my drive.
111 */
112
113#ifndef READ_PREFETCH
114#define READ_PREFETCH 0x40 /* read prefetch is enabled */
115#endif /* else read prefetch is disabled */
116
117#define READ_REG 0 /* index of Read cycle timing register */ 93#define READ_REG 0 /* index of Read cycle timing register */
118#define WRITE_REG 1 /* index of Write cycle timing register */ 94#define WRITE_REG 1 /* index of Write cycle timing register */
119#define CNTRL_REG 3 /* index of Control register */ 95#define CNTRL_REG 3 /* index of Control register */
@@ -122,51 +98,8 @@
122 98
123static int reg_base; 99static int reg_base;
124 100
125#define PIO_NOT_EXIST 254
126#define PIO_DONT_KNOW 255
127
128static DEFINE_SPINLOCK(opti621_lock); 101static DEFINE_SPINLOCK(opti621_lock);
129 102
130/* there are stored pio numbers from other calls of opti621_set_pio_mode */
131static void compute_pios(ide_drive_t *drive, const u8 pio)
132/* Store values into drive->drive_data
133 * second_contr - 0 for primary controller, 1 for secondary
134 * slave_drive - 0 -> pio is for master, 1 -> pio is for slave
135 * pio - PIO mode for selected drive (for other we don't know)
136 */
137{
138 int d;
139 ide_hwif_t *hwif = HWIF(drive);
140
141 drive->drive_data = pio;
142
143 for (d = 0; d < 2; ++d) {
144 drive = &hwif->drives[d];
145 if (drive->present) {
146 if (drive->drive_data == PIO_DONT_KNOW)
147 drive->drive_data = ide_get_best_pio_mode(drive, 255, 3);
148#ifdef OPTI621_DEBUG
149 printk("%s: Selected PIO mode %d\n",
150 drive->name, drive->drive_data);
151#endif
152 } else {
153 drive->drive_data = PIO_NOT_EXIST;
154 }
155 }
156}
157
158static int cmpt_clk(int time, int bus_speed)
159/* Returns (rounded up) time in clocks for time in ns,
160 * with bus_speed in MHz.
161 * Example: bus_speed = 40 MHz, time = 80 ns
162 * 1000/40 = 25 ns (clk value),
163 * 80/25 = 3.2, rounded up to 4 (I hope ;-)).
164 * Use idebus=xx to select right frequency.
165 */
166{
167 return ((time*bus_speed+999)/1000);
168}
169
170/* Write value to register reg, base of register 103/* Write value to register reg, base of register
171 * is at reg_base (0x1f0 primary, 0x170 secondary, 104 * is at reg_base (0x1f0 primary, 0x170 secondary,
172 * if not changed by PCI configuration). 105 * if not changed by PCI configuration).
@@ -199,83 +132,29 @@ static u8 read_reg(int reg)
199 return ret; 132 return ret;
200} 133}
201 134
202typedef struct pio_clocks_s {
203 int address_time; /* Address setup (clocks) */
204 int data_time; /* Active/data pulse (clocks) */
205 int recovery_time; /* Recovery time (clocks) */
206} pio_clocks_t;
207
208static void compute_clocks(int pio, pio_clocks_t *clks)
209{
210 if (pio != PIO_NOT_EXIST) {
211 int adr_setup, data_pls;
212 int bus_speed = ide_pci_clk ? ide_pci_clk : system_bus_clock();
213
214 adr_setup = ide_pio_timings[pio].setup_time;
215 data_pls = ide_pio_timings[pio].active_time;
216 clks->address_time = cmpt_clk(adr_setup, bus_speed);
217 clks->data_time = cmpt_clk(data_pls, bus_speed);
218 clks->recovery_time = cmpt_clk(ide_pio_timings[pio].cycle_time
219 - adr_setup-data_pls, bus_speed);
220 if (clks->address_time < 1)
221 clks->address_time = 1;
222 if (clks->address_time > 4)
223 clks->address_time = 4;
224 if (clks->data_time < 1)
225 clks->data_time = 1;
226 if (clks->data_time > 16)
227 clks->data_time = 16;
228 if (clks->recovery_time < 2)
229 clks->recovery_time = 2;
230 if (clks->recovery_time > 17)
231 clks->recovery_time = 17;
232 } else {
233 clks->address_time = 1;
234 clks->data_time = 1;
235 clks->recovery_time = 2;
236 /* minimal values */
237 }
238}
239
240static void opti621_set_pio_mode(ide_drive_t *drive, const u8 pio) 135static void opti621_set_pio_mode(ide_drive_t *drive, const u8 pio)
241{ 136{
242 /* primary and secondary drives share some registers, 137 ide_hwif_t *hwif = drive->hwif;
243 * so we have to program both drives 138 ide_drive_t *pair = ide_get_paired_drive(drive);
244 */
245 unsigned long flags; 139 unsigned long flags;
246 u8 pio1 = 0, pio2 = 0; 140 u8 tim, misc, addr_pio = pio, clk;
247 pio_clocks_t first, second; 141
248 int ax, drdy; 142 /* DRDY is default 2 (by OPTi Databook) */
249 u8 cycle1, cycle2, misc; 143 static const u8 addr_timings[2][5] = {
250 ide_hwif_t *hwif = HWIF(drive); 144 { 0x20, 0x10, 0x00, 0x00, 0x00 }, /* 33 MHz */
251 145 { 0x10, 0x10, 0x00, 0x00, 0x00 }, /* 25 MHz */
252 /* sets drive->drive_data for both drives */ 146 };
253 compute_pios(drive, pio); 147 static const u8 data_rec_timings[2][5] = {
254 pio1 = hwif->drives[0].drive_data; 148 { 0x5b, 0x45, 0x32, 0x21, 0x20 }, /* 33 MHz */
255 pio2 = hwif->drives[1].drive_data; 149 { 0x48, 0x34, 0x21, 0x10, 0x10 } /* 25 MHz */
256 150 };
257 compute_clocks(pio1, &first); 151
258 compute_clocks(pio2, &second); 152 drive->drive_data = XFER_PIO_0 + pio;
259 153
260 /* ax = max(a1,a2) */ 154 if (pair->present) {
261 ax = (first.address_time < second.address_time) ? second.address_time : first.address_time; 155 if (pair->drive_data && pair->drive_data < drive->drive_data)
262 156 addr_pio = pair->drive_data - XFER_PIO_0;
263 drdy = 2; /* DRDY is default 2 (by OPTi Databook) */ 157 }
264
265 cycle1 = ((first.data_time-1)<<4) | (first.recovery_time-2);
266 cycle2 = ((second.data_time-1)<<4) | (second.recovery_time-2);
267 misc = READ_PREFETCH | ((ax-1)<<4) | ((drdy-2)<<1);
268
269#ifdef OPTI621_DEBUG
270 printk("%s: master: address: %d, data: %d, "
271 "recovery: %d, drdy: %d [clk]\n",
272 hwif->name, ax, first.data_time,
273 first.recovery_time, drdy);
274 printk("%s: slave: address: %d, data: %d, "
275 "recovery: %d, drdy: %d [clk]\n",
276 hwif->name, ax, second.data_time,
277 second.recovery_time, drdy);
278#endif
279 158
280 spin_lock_irqsave(&opti621_lock, flags); 159 spin_lock_irqsave(&opti621_lock, flags);
281 160
@@ -289,24 +168,21 @@ static void opti621_set_pio_mode(ide_drive_t *drive, const u8 pio)
289 (void)inb(reg_base + CNTRL_REG); 168 (void)inb(reg_base + CNTRL_REG);
290 /* if reads 0xc0, no interface exist? */ 169 /* if reads 0xc0, no interface exist? */
291 read_reg(CNTRL_REG); 170 read_reg(CNTRL_REG);
292 /* read version, probably 0 */
293 read_reg(STRAP_REG);
294 171
295 /* program primary drive */ 172 /* check CLK speed */
296 /* select Index-0 for Register-A */ 173 clk = read_reg(STRAP_REG) & 1;
297 write_reg(0, MISC_REG); 174
298 /* set read cycle timings */ 175 printk(KERN_INFO "%s: CLK = %d MHz\n", hwif->name, clk ? 25 : 33);
299 write_reg(cycle1, READ_REG);
300 /* set write cycle timings */
301 write_reg(cycle1, WRITE_REG);
302 176
303 /* program secondary drive */ 177 tim = data_rec_timings[clk][pio];
304 /* select Index-1 for Register-B */ 178 misc = addr_timings[clk][addr_pio];
305 write_reg(1, MISC_REG); 179
180 /* select Index-0/1 for Register-A/B */
181 write_reg(drive->select.b.unit, MISC_REG);
306 /* set read cycle timings */ 182 /* set read cycle timings */
307 write_reg(cycle2, READ_REG); 183 write_reg(tim, READ_REG);
308 /* set write cycle timings */ 184 /* set write cycle timings */
309 write_reg(cycle2, WRITE_REG); 185 write_reg(tim, WRITE_REG);
310 186
311 /* use Register-A for drive 0 */ 187 /* use Register-A for drive 0 */
312 /* use Register-B for drive 1 */ 188 /* use Register-B for drive 1 */
@@ -319,45 +195,26 @@ static void opti621_set_pio_mode(ide_drive_t *drive, const u8 pio)
319 spin_unlock_irqrestore(&opti621_lock, flags); 195 spin_unlock_irqrestore(&opti621_lock, flags);
320} 196}
321 197
322static void __devinit opti621_port_init_devs(ide_hwif_t *hwif)
323{
324 hwif->drives[0].drive_data = PIO_DONT_KNOW;
325 hwif->drives[1].drive_data = PIO_DONT_KNOW;
326}
327
328static const struct ide_port_ops opti621_port_ops = { 198static const struct ide_port_ops opti621_port_ops = {
329 .port_init_devs = opti621_port_init_devs,
330 .set_pio_mode = opti621_set_pio_mode, 199 .set_pio_mode = opti621_set_pio_mode,
331}; 200};
332 201
333static const struct ide_port_info opti621_chipsets[] __devinitdata = { 202static const struct ide_port_info opti621_chipset __devinitdata = {
334 { /* 0 */ 203 .name = "OPTI621/X",
335 .name = "OPTI621", 204 .enablebits = { {0x45, 0x80, 0x00}, {0x40, 0x08, 0x00} },
336 .enablebits = { {0x45, 0x80, 0x00}, {0x40, 0x08, 0x00} }, 205 .port_ops = &opti621_port_ops,
337 .port_ops = &opti621_port_ops, 206 .host_flags = IDE_HFLAG_NO_DMA,
338 .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, 207 .pio_mask = ATA_PIO4,
339 .pio_mask = ATA_PIO3,
340 .swdma_mask = ATA_SWDMA2,
341 .mwdma_mask = ATA_MWDMA2,
342 }, { /* 1 */
343 .name = "OPTI621X",
344 .enablebits = { {0x45, 0x80, 0x00}, {0x40, 0x08, 0x00} },
345 .port_ops = &opti621_port_ops,
346 .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
347 .pio_mask = ATA_PIO3,
348 .swdma_mask = ATA_SWDMA2,
349 .mwdma_mask = ATA_MWDMA2,
350 }
351}; 208};
352 209
353static int __devinit opti621_init_one(struct pci_dev *dev, const struct pci_device_id *id) 210static int __devinit opti621_init_one(struct pci_dev *dev, const struct pci_device_id *id)
354{ 211{
355 return ide_setup_pci_device(dev, &opti621_chipsets[id->driver_data]); 212 return ide_setup_pci_device(dev, &opti621_chipset);
356} 213}
357 214
358static const struct pci_device_id opti621_pci_tbl[] = { 215static const struct pci_device_id opti621_pci_tbl[] = {
359 { PCI_VDEVICE(OPTI, PCI_DEVICE_ID_OPTI_82C621), 0 }, 216 { PCI_VDEVICE(OPTI, PCI_DEVICE_ID_OPTI_82C621), 0 },
360 { PCI_VDEVICE(OPTI, PCI_DEVICE_ID_OPTI_82C825), 1 }, 217 { PCI_VDEVICE(OPTI, PCI_DEVICE_ID_OPTI_82C825), 0 },
361 { 0, }, 218 { 0, },
362}; 219};
363MODULE_DEVICE_TABLE(pci, opti621_pci_tbl); 220MODULE_DEVICE_TABLE(pci, opti621_pci_tbl);
diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c
index 4b0b85d8faf5..e127eb25ab63 100644
--- a/drivers/ide/pci/sis5513.c
+++ b/drivers/ide/pci/sis5513.c
@@ -569,6 +569,11 @@ static int __devinit sis5513_init_one(struct pci_dev *dev, const struct pci_devi
569{ 569{
570 struct ide_port_info d = sis5513_chipset; 570 struct ide_port_info d = sis5513_chipset;
571 u8 udma_rates[] = { 0x00, 0x00, 0x07, 0x1f, 0x3f, 0x3f, 0x7f, 0x7f }; 571 u8 udma_rates[] = { 0x00, 0x00, 0x07, 0x1f, 0x3f, 0x3f, 0x7f, 0x7f };
572 int rc;
573
574 rc = pci_enable_device(dev);
575 if (rc)
576 return rc;
572 577
573 if (sis_find_family(dev) == 0) 578 if (sis_find_family(dev) == 0)
574 return -ENOTSUPP; 579 return -ENOTSUPP;
diff --git a/drivers/ide/ppc/mpc8xx.c b/drivers/ide/ppc/mpc8xx.c
index f0e638dcc3ab..236f9c38e519 100644
--- a/drivers/ide/ppc/mpc8xx.c
+++ b/drivers/ide/ppc/mpc8xx.c
@@ -303,6 +303,8 @@ static int __init m8xx_ide_init_ports(hw_regs_t *hw, unsigned long data_port)
303 pcmp->pcmc_per = 0x100000 >> (16 * _slot_); 303 pcmp->pcmc_per = 0x100000 >> (16 * _slot_);
304#endif /* CONFIG_IDE_8xx_PCCARD */ 304#endif /* CONFIG_IDE_8xx_PCCARD */
305 305
306 hw->chipset = ide_generic;
307
306 return 0; 308 return 0;
307} 309}
308#endif /* CONFIG_IDE_8xx_PCCARD || CONFIG_IDE_8xx_DIRECT */ 310#endif /* CONFIG_IDE_8xx_PCCARD || CONFIG_IDE_8xx_DIRECT */
@@ -377,6 +379,8 @@ static int __init m8xx_ide_init_ports(hw_regs_t *hw, unsigned long data_port)
377 ((immap_t *) IMAP_ADDR)->im_siu_conf.sc_siel |= 379 ((immap_t *) IMAP_ADDR)->im_siu_conf.sc_siel |=
378 (0x80000000 >> ioport_dsc[data_port].irq); 380 (0x80000000 >> ioport_dsc[data_port].irq);
379 381
382 hw->chipset = ide_generic;
383
380 return 0; 384 return 0;
381} 385}
382#endif /* CONFIG_IDE_8xx_DIRECT */ 386#endif /* CONFIG_IDE_8xx_DIRECT */
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index 48aa019127bc..ba2d58727964 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -59,7 +59,6 @@ typedef struct pmac_ide_hwif {
59 int irq; 59 int irq;
60 int kind; 60 int kind;
61 int aapl_bus_id; 61 int aapl_bus_id;
62 unsigned cable_80 : 1;
63 unsigned mediabay : 1; 62 unsigned mediabay : 1;
64 unsigned broken_dma : 1; 63 unsigned broken_dma : 1;
65 unsigned broken_dma_warn : 1; 64 unsigned broken_dma_warn : 1;
@@ -918,10 +917,40 @@ pmac_ide_do_resume(ide_hwif_t *hwif)
918 return 0; 917 return 0;
919} 918}
920 919
920static u8 pmac_ide_cable_detect(ide_hwif_t *hwif)
921{
922 pmac_ide_hwif_t *pmif = (pmac_ide_hwif_t *)ide_get_hwifdata(hwif);
923 struct device_node *np = pmif->node;
924 const char *cable = of_get_property(np, "cable-type", NULL);
925
926 /* Get cable type from device-tree. */
927 if (cable && !strncmp(cable, "80-", 3))
928 return ATA_CBL_PATA80;
929
930 /*
931 * G5's seem to have incorrect cable type in device-tree.
932 * Let's assume they have a 80 conductor cable, this seem
933 * to be always the case unless the user mucked around.
934 */
935 if (of_device_is_compatible(np, "K2-UATA") ||
936 of_device_is_compatible(np, "shasta-ata"))
937 return ATA_CBL_PATA80;
938
939 return ATA_CBL_PATA40;
940}
941
921static const struct ide_port_ops pmac_ide_ata6_port_ops = { 942static const struct ide_port_ops pmac_ide_ata6_port_ops = {
922 .set_pio_mode = pmac_ide_set_pio_mode, 943 .set_pio_mode = pmac_ide_set_pio_mode,
923 .set_dma_mode = pmac_ide_set_dma_mode, 944 .set_dma_mode = pmac_ide_set_dma_mode,
924 .selectproc = pmac_ide_kauai_selectproc, 945 .selectproc = pmac_ide_kauai_selectproc,
946 .cable_detect = pmac_ide_cable_detect,
947};
948
949static const struct ide_port_ops pmac_ide_ata4_port_ops = {
950 .set_pio_mode = pmac_ide_set_pio_mode,
951 .set_dma_mode = pmac_ide_set_dma_mode,
952 .selectproc = pmac_ide_selectproc,
953 .cable_detect = pmac_ide_cable_detect,
925}; 954};
926 955
927static const struct ide_port_ops pmac_ide_port_ops = { 956static const struct ide_port_ops pmac_ide_port_ops = {
@@ -949,10 +978,7 @@ static const struct ide_port_info pmac_port_info = {
949 978
950/* 979/*
951 * Setup, register & probe an IDE channel driven by this driver, this is 980 * Setup, register & probe an IDE channel driven by this driver, this is
952 * called by one of the 2 probe functions (macio or PCI). Note that a channel 981 * called by one of the 2 probe functions (macio or PCI).
953 * that ends up beeing free of any device is not kept around by this driver
954 * (it is kept in 2.4). This introduce an interface numbering change on some
955 * rare machines unfortunately, but it's better this way.
956 */ 982 */
957static int __devinit 983static int __devinit
958pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif, hw_regs_t *hw) 984pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif, hw_regs_t *hw)
@@ -962,7 +988,6 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif, hw_regs_t *hw)
962 u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; 988 u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
963 struct ide_port_info d = pmac_port_info; 989 struct ide_port_info d = pmac_port_info;
964 990
965 pmif->cable_80 = 0;
966 pmif->broken_dma = pmif->broken_dma_warn = 0; 991 pmif->broken_dma = pmif->broken_dma_warn = 0;
967 if (of_device_is_compatible(np, "shasta-ata")) { 992 if (of_device_is_compatible(np, "shasta-ata")) {
968 pmif->kind = controller_sh_ata6; 993 pmif->kind = controller_sh_ata6;
@@ -979,6 +1004,7 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif, hw_regs_t *hw)
979 } else if (of_device_is_compatible(np, "keylargo-ata")) { 1004 } else if (of_device_is_compatible(np, "keylargo-ata")) {
980 if (strcmp(np->name, "ata-4") == 0) { 1005 if (strcmp(np->name, "ata-4") == 0) {
981 pmif->kind = controller_kl_ata4; 1006 pmif->kind = controller_kl_ata4;
1007 d.port_ops = &pmac_ide_ata4_port_ops;
982 d.udma_mask = ATA_UDMA4; 1008 d.udma_mask = ATA_UDMA4;
983 } else 1009 } else
984 pmif->kind = controller_kl_ata3; 1010 pmif->kind = controller_kl_ata3;
@@ -992,22 +1018,6 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif, hw_regs_t *hw)
992 bidp = of_get_property(np, "AAPL,bus-id", NULL); 1018 bidp = of_get_property(np, "AAPL,bus-id", NULL);
993 pmif->aapl_bus_id = bidp ? *bidp : 0; 1019 pmif->aapl_bus_id = bidp ? *bidp : 0;
994 1020
995 /* Get cable type from device-tree */
996 if (pmif->kind == controller_kl_ata4 || pmif->kind == controller_un_ata6
997 || pmif->kind == controller_k2_ata6
998 || pmif->kind == controller_sh_ata6) {
999 const char* cable = of_get_property(np, "cable-type", NULL);
1000 if (cable && !strncmp(cable, "80-", 3))
1001 pmif->cable_80 = 1;
1002 }
1003 /* G5's seem to have incorrect cable type in device-tree. Let's assume
1004 * they have a 80 conductor cable, this seem to be always the case unless
1005 * the user mucked around
1006 */
1007 if (of_device_is_compatible(np, "K2-UATA") ||
1008 of_device_is_compatible(np, "shasta-ata"))
1009 pmif->cable_80 = 1;
1010
1011 /* On Kauai-type controllers, we make sure the FCR is correct */ 1021 /* On Kauai-type controllers, we make sure the FCR is correct */
1012 if (pmif->kauai_fcr) 1022 if (pmif->kauai_fcr)
1013 writel(KAUAI_FCR_UATA_MAGIC | 1023 writel(KAUAI_FCR_UATA_MAGIC |
@@ -1053,7 +1063,6 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif, hw_regs_t *hw)
1053 1063
1054 hwif->hwif_data = pmif; 1064 hwif->hwif_data = pmif;
1055 ide_init_port_hw(hwif, hw); 1065 ide_init_port_hw(hwif, hw);
1056 hwif->cbl = pmif->cable_80 ? ATA_CBL_PATA80 : ATA_CBL_PATA40;
1057 1066
1058 printk(KERN_INFO "ide%d: Found Apple %s controller, bus ID %d%s, irq %d\n", 1067 printk(KERN_INFO "ide%d: Found Apple %s controller, bus ID %d%s, irq %d\n",
1059 hwif->index, model_name[pmif->kind], pmif->aapl_bus_id, 1068 hwif->index, model_name[pmif->kind], pmif->aapl_bus_id,
@@ -1070,11 +1079,6 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif, hw_regs_t *hw)
1070 } 1079 }
1071 } 1080 }
1072 1081
1073#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
1074 if (pmif->cable_80 == 0)
1075 d.udma_mask &= ATA_UDMA2;
1076#endif
1077
1078 idx[0] = hwif->index; 1082 idx[0] = hwif->index;
1079 1083
1080 ide_device_add(idx, &d); 1084 ide_device_add(idx, &d);
diff --git a/drivers/ieee1394/Kconfig b/drivers/ieee1394/Kconfig
index 545663ef820b..95f45f9b8e5e 100644
--- a/drivers/ieee1394/Kconfig
+++ b/drivers/ieee1394/Kconfig
@@ -4,7 +4,7 @@ menu "IEEE 1394 (FireWire) support"
4source "drivers/firewire/Kconfig" 4source "drivers/firewire/Kconfig"
5 5
6config IEEE1394 6config IEEE1394
7 tristate "IEEE 1394 (FireWire) support" 7 tristate "Stable FireWire stack"
8 depends on PCI || BROKEN 8 depends on PCI || BROKEN
9 help 9 help
10 IEEE 1394 describes a high performance serial bus, which is also 10 IEEE 1394 describes a high performance serial bus, which is also
@@ -19,30 +19,45 @@ config IEEE1394
19 To compile this driver as a module, say M here: the 19 To compile this driver as a module, say M here: the
20 module will be called ieee1394. 20 module will be called ieee1394.
21 21
22comment "Subsystem Options" 22config IEEE1394_OHCI1394
23 depends on IEEE1394 23 tristate "OHCI-1394 controllers"
24 24 depends on PCI && IEEE1394
25config IEEE1394_VERBOSEDEBUG
26 bool "Excessive debugging output"
27 depends on IEEE1394
28 help 25 help
29 If you say Y here, you will get very verbose debugging logs from 26 Enable this driver if you have an IEEE 1394 controller based on the
30 the subsystem which includes a dump of the header of every sent 27 OHCI-1394 specification. The current driver is only tested with OHCI
31 and received packet. This can amount to a high amount of data 28 chipsets made by Texas Instruments and NEC. Most third-party vendors
32 collected in a very short time which is usually also saved to 29 use one of these chipsets. It should work with any OHCI-1394
33 disk by the system logging daemons. 30 compliant card, however.
34 31
35 Say Y if you really want or need the debugging output, everyone 32 To compile this driver as a module, say M here: the
36 else says N. 33 module will be called ohci1394.
37 34
38comment "Controllers" 35 NOTE:
39 depends on IEEE1394
40 36
41comment "Texas Instruments PCILynx requires I2C" 37 You should only build either ohci1394 or the new firewire-ohci driver,
38 but not both. If you nevertheless want to install both, you should
39 configure them only as modules and blacklist the driver(s) which you
40 don't want to have auto-loaded. Add either
41
42 blacklist firewire-ohci
43 or
44 blacklist ohci1394
45 blacklist video1394
46 blacklist dv1394
47
48 to /etc/modprobe.conf or /etc/modprobe.d/* and update modprobe.conf
49 depending on your distribution. The latter two modules should be
50 blacklisted together with ohci1394 because they depend on ohci1394.
51
52 If you have an old modprobe which doesn't implement the blacklist
53 directive, use "install modulename /bin/true" for the modules to be
54 blacklisted.
55
56comment "PCILynx controller requires I2C"
42 depends on IEEE1394 && I2C=n 57 depends on IEEE1394 && I2C=n
43 58
44config IEEE1394_PCILYNX 59config IEEE1394_PCILYNX
45 tristate "Texas Instruments PCILynx support" 60 tristate "PCILynx controller"
46 depends on PCI && IEEE1394 && I2C 61 depends on PCI && IEEE1394 && I2C
47 select I2C_ALGOBIT 62 select I2C_ALGOBIT
48 help 63 help
@@ -57,35 +72,11 @@ config IEEE1394_PCILYNX
57 PowerMacs G3 B&W contain the PCILynx controller. Therefore 72 PowerMacs G3 B&W contain the PCILynx controller. Therefore
58 almost everybody can say N here. 73 almost everybody can say N here.
59 74
60config IEEE1394_OHCI1394
61 tristate "OHCI-1394 support"
62 depends on PCI && IEEE1394
63 help
64 Enable this driver if you have an IEEE 1394 controller based on the
65 OHCI-1394 specification. The current driver is only tested with OHCI
66 chipsets made by Texas Instruments and NEC. Most third-party vendors
67 use one of these chipsets. It should work with any OHCI-1394
68 compliant card, however.
69
70 To compile this driver as a module, say M here: the
71 module will be called ohci1394.
72
73comment "Protocols"
74 depends on IEEE1394
75
76config IEEE1394_VIDEO1394
77 tristate "OHCI-1394 Video support"
78 depends on IEEE1394 && IEEE1394_OHCI1394
79 help
80 This option enables video device usage for OHCI-1394 cards. Enable
81 this option only if you have an IEEE 1394 video device connected to
82 an OHCI-1394 card.
83
84comment "SBP-2 support (for storage devices) requires SCSI" 75comment "SBP-2 support (for storage devices) requires SCSI"
85 depends on IEEE1394 && SCSI=n 76 depends on IEEE1394 && SCSI=n
86 77
87config IEEE1394_SBP2 78config IEEE1394_SBP2
88 tristate "SBP-2 support (Harddisks etc.)" 79 tristate "Storage devices (SBP-2 protocol)"
89 depends on IEEE1394 && SCSI 80 depends on IEEE1394 && SCSI
90 help 81 help
91 This option enables you to use SBP-2 devices connected to an IEEE 82 This option enables you to use SBP-2 devices connected to an IEEE
@@ -127,24 +118,47 @@ config IEEE1394_ETH1394
127 118
128 The module is called eth1394 although it does not emulate Ethernet. 119 The module is called eth1394 although it does not emulate Ethernet.
129 120
121config IEEE1394_RAWIO
122 tristate "raw1394 userspace interface"
123 depends on IEEE1394
124 help
125 This option adds support for the raw1394 device file which enables
126 direct communication of user programs with IEEE 1394 devices
127 (isochronous and asynchronous). Almost all application programs
128 which access FireWire require this option.
129
130 To compile this driver as a module, say M here: the module will be
131 called raw1394.
132
133config IEEE1394_VIDEO1394
134 tristate "video1394 userspace interface"
135 depends on IEEE1394 && IEEE1394_OHCI1394
136 help
137 This option adds support for the video1394 device files which enable
138 isochronous communication of user programs with IEEE 1394 devices,
139 especially video capture or export. This interface is used by all
140 libdc1394 based programs and by several other programs, in addition to
141 the raw1394 interface. It is generally not required for DV capture.
142
143 To compile this driver as a module, say M here: the module will be
144 called video1394.
145
130config IEEE1394_DV1394 146config IEEE1394_DV1394
131 tristate "OHCI-DV I/O support (deprecated)" 147 tristate "dv1394 userspace interface (deprecated)"
132 depends on IEEE1394 && IEEE1394_OHCI1394 148 depends on IEEE1394 && IEEE1394_OHCI1394
133 help 149 help
134 The dv1394 driver is unsupported and may be removed from Linux in a 150 The dv1394 driver is unsupported and may be removed from Linux in a
135 future release. Its functionality is now provided by raw1394 together 151 future release. Its functionality is now provided by raw1394 together
136 with libraries such as libiec61883. 152 with libraries such as libiec61883.
137 153
138config IEEE1394_RAWIO 154config IEEE1394_VERBOSEDEBUG
139 tristate "Raw IEEE1394 I/O support" 155 bool "Excessive debugging output"
140 depends on IEEE1394 156 depends on IEEE1394
141 help 157 help
142 This option adds support for the raw1394 device file which enables 158 If you say Y here, you will get very verbose debugging logs from the
143 direct communication of user programs with the IEEE 1394 bus and thus 159 ieee1394 drivers, including sent and received packet headers. This
144 with the attached peripherals. Almost all application programs which 160 will quickly result in large amounts of data sent to the system log.
145 access FireWire require this option.
146 161
147 To compile this driver as a module, say M here: the module will be 162 Say Y if you really need the debugging output. Everyone else says N.
148 called raw1394.
149 163
150endmenu 164endmenu
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index 16b9d0ad154e..a5ceff287a28 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -1539,15 +1539,13 @@ static void sbp2_prep_command_orb_sg(struct sbp2_command_orb *orb,
1539 1539
1540static void sbp2_create_command_orb(struct sbp2_lu *lu, 1540static void sbp2_create_command_orb(struct sbp2_lu *lu,
1541 struct sbp2_command_info *cmd, 1541 struct sbp2_command_info *cmd,
1542 unchar *scsi_cmd, 1542 struct scsi_cmnd *SCpnt)
1543 unsigned int scsi_use_sg,
1544 unsigned int scsi_request_bufflen,
1545 struct scatterlist *sg,
1546 enum dma_data_direction dma_dir)
1547{ 1543{
1548 struct sbp2_fwhost_info *hi = lu->hi; 1544 struct sbp2_fwhost_info *hi = lu->hi;
1549 struct sbp2_command_orb *orb = &cmd->command_orb; 1545 struct sbp2_command_orb *orb = &cmd->command_orb;
1550 u32 orb_direction; 1546 u32 orb_direction;
1547 unsigned int scsi_request_bufflen = scsi_bufflen(SCpnt);
1548 enum dma_data_direction dma_dir = SCpnt->sc_data_direction;
1551 1549
1552 /* 1550 /*
1553 * Set-up our command ORB. 1551 * Set-up our command ORB.
@@ -1580,13 +1578,14 @@ static void sbp2_create_command_orb(struct sbp2_lu *lu,
1580 orb->data_descriptor_lo = 0x0; 1578 orb->data_descriptor_lo = 0x0;
1581 orb->misc |= ORB_SET_DIRECTION(1); 1579 orb->misc |= ORB_SET_DIRECTION(1);
1582 } else 1580 } else
1583 sbp2_prep_command_orb_sg(orb, hi, cmd, scsi_use_sg, sg, 1581 sbp2_prep_command_orb_sg(orb, hi, cmd, scsi_sg_count(SCpnt),
1582 scsi_sglist(SCpnt),
1584 orb_direction, dma_dir); 1583 orb_direction, dma_dir);
1585 1584
1586 sbp2util_cpu_to_be32_buffer(orb, sizeof(*orb)); 1585 sbp2util_cpu_to_be32_buffer(orb, sizeof(*orb));
1587 1586
1588 memset(orb->cdb, 0, 12); 1587 memset(orb->cdb, 0, sizeof(orb->cdb));
1589 memcpy(orb->cdb, scsi_cmd, COMMAND_SIZE(*scsi_cmd)); 1588 memcpy(orb->cdb, SCpnt->cmnd, SCpnt->cmd_len);
1590} 1589}
1591 1590
1592static void sbp2_link_orb_command(struct sbp2_lu *lu, 1591static void sbp2_link_orb_command(struct sbp2_lu *lu,
@@ -1669,16 +1668,13 @@ static void sbp2_link_orb_command(struct sbp2_lu *lu,
1669static int sbp2_send_command(struct sbp2_lu *lu, struct scsi_cmnd *SCpnt, 1668static int sbp2_send_command(struct sbp2_lu *lu, struct scsi_cmnd *SCpnt,
1670 void (*done)(struct scsi_cmnd *)) 1669 void (*done)(struct scsi_cmnd *))
1671{ 1670{
1672 unchar *scsi_cmd = (unchar *)SCpnt->cmnd;
1673 struct sbp2_command_info *cmd; 1671 struct sbp2_command_info *cmd;
1674 1672
1675 cmd = sbp2util_allocate_command_orb(lu, SCpnt, done); 1673 cmd = sbp2util_allocate_command_orb(lu, SCpnt, done);
1676 if (!cmd) 1674 if (!cmd)
1677 return -EIO; 1675 return -EIO;
1678 1676
1679 sbp2_create_command_orb(lu, cmd, scsi_cmd, scsi_sg_count(SCpnt), 1677 sbp2_create_command_orb(lu, cmd, SCpnt);
1680 scsi_bufflen(SCpnt), scsi_sglist(SCpnt),
1681 SCpnt->sc_data_direction);
1682 sbp2_link_orb_command(lu, cmd); 1678 sbp2_link_orb_command(lu, cmd);
1683 1679
1684 return 0; 1680 return 0;
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
index fbe16d5250a4..1adf2efd3cb3 100644
--- a/drivers/infiniband/core/mad.c
+++ b/drivers/infiniband/core/mad.c
@@ -747,7 +747,9 @@ static int handle_outgoing_dr_smp(struct ib_mad_agent_private *mad_agent_priv,
747 break; 747 break;
748 case IB_MAD_RESULT_SUCCESS | IB_MAD_RESULT_CONSUMED: 748 case IB_MAD_RESULT_SUCCESS | IB_MAD_RESULT_CONSUMED:
749 kmem_cache_free(ib_mad_cache, mad_priv); 749 kmem_cache_free(ib_mad_cache, mad_priv);
750 break; 750 kfree(local);
751 ret = 1;
752 goto out;
751 case IB_MAD_RESULT_SUCCESS: 753 case IB_MAD_RESULT_SUCCESS:
752 /* Treat like an incoming receive MAD */ 754 /* Treat like an incoming receive MAD */
753 port_priv = ib_get_mad_port(mad_agent_priv->agent.device, 755 port_priv = ib_get_mad_port(mad_agent_priv->agent.device,
diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c
index fe78f7d25099..a1768dbb0720 100644
--- a/drivers/infiniband/core/umem.c
+++ b/drivers/infiniband/core/umem.c
@@ -150,7 +150,7 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
150 ret = 0; 150 ret = 0;
151 while (npages) { 151 while (npages) {
152 ret = get_user_pages(current, current->mm, cur_base, 152 ret = get_user_pages(current, current->mm, cur_base,
153 min_t(int, npages, 153 min_t(unsigned long, npages,
154 PAGE_SIZE / sizeof (struct page *)), 154 PAGE_SIZE / sizeof (struct page *)),
155 1, !umem->writable, page_list, vma_list); 155 1, !umem->writable, page_list, vma_list);
156 156
diff --git a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c
index 3aa2db54eae4..840ede9ae965 100644
--- a/drivers/infiniband/core/user_mad.c
+++ b/drivers/infiniband/core/user_mad.c
@@ -1005,8 +1005,9 @@ static int ib_umad_init_port(struct ib_device *device, int port_num,
1005 if (cdev_add(port->cdev, base_dev + port->dev_num, 1)) 1005 if (cdev_add(port->cdev, base_dev + port->dev_num, 1))
1006 goto err_cdev; 1006 goto err_cdev;
1007 1007
1008 port->dev = device_create(umad_class, device->dma_device, 1008 port->dev = device_create_drvdata(umad_class, device->dma_device,
1009 port->cdev->dev, "umad%d", port->dev_num); 1009 port->cdev->dev, port,
1010 "umad%d", port->dev_num);
1010 if (IS_ERR(port->dev)) 1011 if (IS_ERR(port->dev))
1011 goto err_cdev; 1012 goto err_cdev;
1012 1013
@@ -1024,15 +1025,12 @@ static int ib_umad_init_port(struct ib_device *device, int port_num,
1024 if (cdev_add(port->sm_cdev, base_dev + port->dev_num + IB_UMAD_MAX_PORTS, 1)) 1025 if (cdev_add(port->sm_cdev, base_dev + port->dev_num + IB_UMAD_MAX_PORTS, 1))
1025 goto err_sm_cdev; 1026 goto err_sm_cdev;
1026 1027
1027 port->sm_dev = device_create(umad_class, device->dma_device, 1028 port->sm_dev = device_create_drvdata(umad_class, device->dma_device,
1028 port->sm_cdev->dev, 1029 port->sm_cdev->dev, port,
1029 "issm%d", port->dev_num); 1030 "issm%d", port->dev_num);
1030 if (IS_ERR(port->sm_dev)) 1031 if (IS_ERR(port->sm_dev))
1031 goto err_sm_cdev; 1032 goto err_sm_cdev;
1032 1033
1033 dev_set_drvdata(port->dev, port);
1034 dev_set_drvdata(port->sm_dev, port);
1035
1036 if (device_create_file(port->sm_dev, &dev_attr_ibdev)) 1034 if (device_create_file(port->sm_dev, &dev_attr_ibdev))
1037 goto err_sm_dev; 1035 goto err_sm_dev;
1038 if (device_create_file(port->sm_dev, &dev_attr_port)) 1036 if (device_create_file(port->sm_dev, &dev_attr_port))
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c
index cc1afa28c181..caed42bf7ef5 100644
--- a/drivers/infiniband/core/uverbs_main.c
+++ b/drivers/infiniband/core/uverbs_main.c
@@ -423,7 +423,7 @@ static void ib_uverbs_async_handler(struct ib_uverbs_file *file,
423 unsigned long flags; 423 unsigned long flags;
424 424
425 spin_lock_irqsave(&file->async_file->lock, flags); 425 spin_lock_irqsave(&file->async_file->lock, flags);
426 if (!file->async_file->is_closed) { 426 if (file->async_file->is_closed) {
427 spin_unlock_irqrestore(&file->async_file->lock, flags); 427 spin_unlock_irqrestore(&file->async_file->lock, flags);
428 return; 428 return;
429 } 429 }
@@ -755,14 +755,15 @@ static void ib_uverbs_add_one(struct ib_device *device)
755 if (cdev_add(uverbs_dev->cdev, IB_UVERBS_BASE_DEV + uverbs_dev->devnum, 1)) 755 if (cdev_add(uverbs_dev->cdev, IB_UVERBS_BASE_DEV + uverbs_dev->devnum, 1))
756 goto err_cdev; 756 goto err_cdev;
757 757
758 uverbs_dev->dev = device_create(uverbs_class, device->dma_device, 758 uverbs_dev->dev = device_create_drvdata(uverbs_class,
759 uverbs_dev->cdev->dev, 759 device->dma_device,
760 "uverbs%d", uverbs_dev->devnum); 760 uverbs_dev->cdev->dev,
761 uverbs_dev,
762 "uverbs%d",
763 uverbs_dev->devnum);
761 if (IS_ERR(uverbs_dev->dev)) 764 if (IS_ERR(uverbs_dev->dev))
762 goto err_cdev; 765 goto err_cdev;
763 766
764 dev_set_drvdata(uverbs_dev->dev, uverbs_dev);
765
766 if (device_create_file(uverbs_dev->dev, &dev_attr_ibdev)) 767 if (device_create_file(uverbs_dev->dev, &dev_attr_ibdev))
767 goto err_class; 768 goto err_class;
768 if (device_create_file(uverbs_dev->dev, &dev_attr_abi_version)) 769 if (device_create_file(uverbs_dev->dev, &dev_attr_abi_version))
diff --git a/drivers/infiniband/hw/amso1100/c2_rnic.c b/drivers/infiniband/hw/amso1100/c2_rnic.c
index 9a054c6941a4..b1441aeb60c2 100644
--- a/drivers/infiniband/hw/amso1100/c2_rnic.c
+++ b/drivers/infiniband/hw/amso1100/c2_rnic.c
@@ -455,8 +455,7 @@ int __devinit c2_rnic_init(struct c2_dev *c2dev)
455 IB_DEVICE_CURR_QP_STATE_MOD | 455 IB_DEVICE_CURR_QP_STATE_MOD |
456 IB_DEVICE_SYS_IMAGE_GUID | 456 IB_DEVICE_SYS_IMAGE_GUID |
457 IB_DEVICE_ZERO_STAG | 457 IB_DEVICE_ZERO_STAG |
458 IB_DEVICE_MEM_WINDOW | 458 IB_DEVICE_MEM_WINDOW);
459 IB_DEVICE_SEND_W_INV);
460 459
461 /* Allocate the qptr_array */ 460 /* Allocate the qptr_array */
462 c2dev->qptr_array = vmalloc(C2_MAX_CQS * sizeof(void *)); 461 c2dev->qptr_array = vmalloc(C2_MAX_CQS * sizeof(void *));
diff --git a/drivers/infiniband/hw/cxgb3/iwch_qp.c b/drivers/infiniband/hw/cxgb3/iwch_qp.c
index 79dbe5beae52..992613799228 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_qp.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_qp.c
@@ -229,7 +229,7 @@ int iwch_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
229 struct ib_send_wr **bad_wr) 229 struct ib_send_wr **bad_wr)
230{ 230{
231 int err = 0; 231 int err = 0;
232 u8 t3_wr_flit_cnt; 232 u8 uninitialized_var(t3_wr_flit_cnt);
233 enum t3_wr_opcode t3_wr_opcode = 0; 233 enum t3_wr_opcode t3_wr_opcode = 0;
234 enum t3_wr_flags t3_wr_flags; 234 enum t3_wr_flags t3_wr_flags;
235 struct iwch_qp *qhp; 235 struct iwch_qp *qhp;
diff --git a/drivers/infiniband/hw/ehca/ehca_reqs.c b/drivers/infiniband/hw/ehca/ehca_reqs.c
index bbe0436f4f75..f093b0033daf 100644
--- a/drivers/infiniband/hw/ehca/ehca_reqs.c
+++ b/drivers/infiniband/hw/ehca/ehca_reqs.c
@@ -421,8 +421,10 @@ int ehca_post_send(struct ib_qp *qp,
421 int ret = 0; 421 int ret = 0;
422 unsigned long flags; 422 unsigned long flags;
423 423
424 if (unlikely(my_qp->state != IB_QPS_RTS)) { 424 /* Reject WR if QP is in RESET, INIT or RTR state */
425 ehca_err(qp->device, "QP not in RTS state qpn=%x", qp->qp_num); 425 if (unlikely(my_qp->state < IB_QPS_RTS)) {
426 ehca_err(qp->device, "Invalid QP state qp_state=%d qpn=%x",
427 my_qp->state, qp->qp_num);
426 return -EINVAL; 428 return -EINVAL;
427 } 429 }
428 430
diff --git a/drivers/infiniband/hw/ipath/ipath_kernel.h b/drivers/infiniband/hw/ipath/ipath_kernel.h
index 59a8b254b97f..0bd8bcb184a1 100644
--- a/drivers/infiniband/hw/ipath/ipath_kernel.h
+++ b/drivers/infiniband/hw/ipath/ipath_kernel.h
@@ -232,6 +232,11 @@ struct ipath_sdma_desc {
232#define IPATH_SDMA_TXREQ_S_ABORTED 2 232#define IPATH_SDMA_TXREQ_S_ABORTED 2
233#define IPATH_SDMA_TXREQ_S_SHUTDOWN 3 233#define IPATH_SDMA_TXREQ_S_SHUTDOWN 3
234 234
235#define IPATH_SDMA_STATUS_SCORE_BOARD_DRAIN_IN_PROG (1ull << 63)
236#define IPATH_SDMA_STATUS_ABORT_IN_PROG (1ull << 62)
237#define IPATH_SDMA_STATUS_INTERNAL_SDMA_ENABLE (1ull << 61)
238#define IPATH_SDMA_STATUS_SCB_EMPTY (1ull << 30)
239
235/* max dwords in small buffer packet */ 240/* max dwords in small buffer packet */
236#define IPATH_SMALLBUF_DWORDS (dd->ipath_piosize2k >> 2) 241#define IPATH_SMALLBUF_DWORDS (dd->ipath_piosize2k >> 2)
237 242
diff --git a/drivers/infiniband/hw/ipath/ipath_mad.c b/drivers/infiniband/hw/ipath/ipath_mad.c
index 1ff46ae7dd99..5f9315d77a43 100644
--- a/drivers/infiniband/hw/ipath/ipath_mad.c
+++ b/drivers/infiniband/hw/ipath/ipath_mad.c
@@ -1492,6 +1492,10 @@ static int process_subn(struct ib_device *ibdev, int mad_flags,
1492 goto bail; 1492 goto bail;
1493 } 1493 }
1494 1494
1495 case IB_MGMT_METHOD_TRAP:
1496 case IB_MGMT_METHOD_REPORT:
1497 case IB_MGMT_METHOD_REPORT_RESP:
1498 case IB_MGMT_METHOD_TRAP_REPRESS:
1495 case IB_MGMT_METHOD_GET_RESP: 1499 case IB_MGMT_METHOD_GET_RESP:
1496 /* 1500 /*
1497 * The ib_mad module will call us to process responses 1501 * The ib_mad module will call us to process responses
diff --git a/drivers/infiniband/hw/ipath/ipath_sdma.c b/drivers/infiniband/hw/ipath/ipath_sdma.c
index 3697449c1ba4..eaba03273e4f 100644
--- a/drivers/infiniband/hw/ipath/ipath_sdma.c
+++ b/drivers/infiniband/hw/ipath/ipath_sdma.c
@@ -263,14 +263,10 @@ static void sdma_abort_task(unsigned long opaque)
263 hwstatus = ipath_read_kreg64(dd, 263 hwstatus = ipath_read_kreg64(dd,
264 dd->ipath_kregs->kr_senddmastatus); 264 dd->ipath_kregs->kr_senddmastatus);
265 265
266 if (/* ScoreBoardDrainInProg */ 266 if ((hwstatus & (IPATH_SDMA_STATUS_SCORE_BOARD_DRAIN_IN_PROG |
267 test_bit(63, &hwstatus) || 267 IPATH_SDMA_STATUS_ABORT_IN_PROG |
268 /* AbortInProg */ 268 IPATH_SDMA_STATUS_INTERNAL_SDMA_ENABLE)) ||
269 test_bit(62, &hwstatus) || 269 !(hwstatus & IPATH_SDMA_STATUS_SCB_EMPTY)) {
270 /* InternalSDmaEnable */
271 test_bit(61, &hwstatus) ||
272 /* ScbEmpty */
273 !test_bit(30, &hwstatus)) {
274 if (dd->ipath_sdma_reset_wait > 0) { 270 if (dd->ipath_sdma_reset_wait > 0) {
275 /* not done shutting down sdma */ 271 /* not done shutting down sdma */
276 --dd->ipath_sdma_reset_wait; 272 --dd->ipath_sdma_reset_wait;
@@ -345,7 +341,7 @@ resched:
345 * state change 341 * state change
346 */ 342 */
347 if (jiffies > dd->ipath_sdma_abort_jiffies) { 343 if (jiffies > dd->ipath_sdma_abort_jiffies) {
348 ipath_dbg("looping with status 0x%016llx\n", 344 ipath_dbg("looping with status 0x%08lx\n",
349 dd->ipath_sdma_status); 345 dd->ipath_sdma_status);
350 dd->ipath_sdma_abort_jiffies = jiffies + 5 * HZ; 346 dd->ipath_sdma_abort_jiffies = jiffies + 5 * HZ;
351 } 347 }
@@ -615,7 +611,7 @@ void ipath_restart_sdma(struct ipath_devdata *dd)
615 } 611 }
616 spin_unlock_irqrestore(&dd->ipath_sdma_lock, flags); 612 spin_unlock_irqrestore(&dd->ipath_sdma_lock, flags);
617 if (!needed) { 613 if (!needed) {
618 ipath_dbg("invalid attempt to restart SDMA, status 0x%016llx\n", 614 ipath_dbg("invalid attempt to restart SDMA, status 0x%08lx\n",
619 dd->ipath_sdma_status); 615 dd->ipath_sdma_status);
620 goto bail; 616 goto bail;
621 } 617 }
diff --git a/drivers/infiniband/hw/ipath/ipath_uc.c b/drivers/infiniband/hw/ipath/ipath_uc.c
index 7fd18e833907..0596ec16fcbd 100644
--- a/drivers/infiniband/hw/ipath/ipath_uc.c
+++ b/drivers/infiniband/hw/ipath/ipath_uc.c
@@ -407,12 +407,11 @@ void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
407 dev->n_pkt_drops++; 407 dev->n_pkt_drops++;
408 goto done; 408 goto done;
409 } 409 }
410 /* XXX Need to free SGEs */ 410 wc.opcode = IB_WC_RECV;
411 last_imm: 411 last_imm:
412 ipath_copy_sge(&qp->r_sge, data, tlen); 412 ipath_copy_sge(&qp->r_sge, data, tlen);
413 wc.wr_id = qp->r_wr_id; 413 wc.wr_id = qp->r_wr_id;
414 wc.status = IB_WC_SUCCESS; 414 wc.status = IB_WC_SUCCESS;
415 wc.opcode = IB_WC_RECV;
416 wc.qp = &qp->ibqp; 415 wc.qp = &qp->ibqp;
417 wc.src_qp = qp->remote_qpn; 416 wc.src_qp = qp->remote_qpn;
418 wc.slid = qp->remote_ah_attr.dlid; 417 wc.slid = qp->remote_ah_attr.dlid;
@@ -514,6 +513,7 @@ void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
514 goto done; 513 goto done;
515 } 514 }
516 wc.byte_len = qp->r_len; 515 wc.byte_len = qp->r_len;
516 wc.opcode = IB_WC_RECV_RDMA_WITH_IMM;
517 goto last_imm; 517 goto last_imm;
518 518
519 case OP(RDMA_WRITE_LAST): 519 case OP(RDMA_WRITE_LAST):
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c
index e0ec540042bf..7779165b2c2c 100644
--- a/drivers/infiniband/hw/ipath/ipath_verbs.c
+++ b/drivers/infiniband/hw/ipath/ipath_verbs.c
@@ -1494,7 +1494,8 @@ static int ipath_query_device(struct ib_device *ibdev,
1494 1494
1495 props->device_cap_flags = IB_DEVICE_BAD_PKEY_CNTR | 1495 props->device_cap_flags = IB_DEVICE_BAD_PKEY_CNTR |
1496 IB_DEVICE_BAD_QKEY_CNTR | IB_DEVICE_SHUTDOWN_PORT | 1496 IB_DEVICE_BAD_QKEY_CNTR | IB_DEVICE_SHUTDOWN_PORT |
1497 IB_DEVICE_SYS_IMAGE_GUID; 1497 IB_DEVICE_SYS_IMAGE_GUID | IB_DEVICE_RC_RNR_NAK_GEN |
1498 IB_DEVICE_PORT_ACTIVE_EVENT | IB_DEVICE_SRQ_RESIZE;
1498 props->page_size_cap = PAGE_SIZE; 1499 props->page_size_cap = PAGE_SIZE;
1499 props->vendor_id = dev->dd->ipath_vendorid; 1500 props->vendor_id = dev->dd->ipath_vendorid;
1500 props->vendor_part_id = dev->dd->ipath_deviceid; 1501 props->vendor_part_id = dev->dd->ipath_deviceid;
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
index 8e02ecfec188..a80df22deae8 100644
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -333,6 +333,9 @@ static int set_kernel_sq_size(struct mlx4_ib_dev *dev, struct ib_qp_cap *cap,
333 cap->max_inline_data + sizeof (struct mlx4_wqe_inline_seg)) + 333 cap->max_inline_data + sizeof (struct mlx4_wqe_inline_seg)) +
334 send_wqe_overhead(type, qp->flags); 334 send_wqe_overhead(type, qp->flags);
335 335
336 if (s > dev->dev->caps.max_sq_desc_sz)
337 return -EINVAL;
338
336 /* 339 /*
337 * Hermon supports shrinking WQEs, such that a single work 340 * Hermon supports shrinking WQEs, such that a single work
338 * request can include multiple units of 1 << wqe_shift. This 341 * request can include multiple units of 1 << wqe_shift. This
@@ -372,9 +375,6 @@ static int set_kernel_sq_size(struct mlx4_ib_dev *dev, struct ib_qp_cap *cap,
372 qp->sq.wqe_shift = ilog2(roundup_pow_of_two(s)); 375 qp->sq.wqe_shift = ilog2(roundup_pow_of_two(s));
373 376
374 for (;;) { 377 for (;;) {
375 if (1 << qp->sq.wqe_shift > dev->dev->caps.max_sq_desc_sz)
376 return -EINVAL;
377
378 qp->sq_max_wqes_per_wr = DIV_ROUND_UP(s, 1U << qp->sq.wqe_shift); 378 qp->sq_max_wqes_per_wr = DIV_ROUND_UP(s, 1U << qp->sq.wqe_shift);
379 379
380 /* 380 /*
@@ -395,7 +395,8 @@ static int set_kernel_sq_size(struct mlx4_ib_dev *dev, struct ib_qp_cap *cap,
395 ++qp->sq.wqe_shift; 395 ++qp->sq.wqe_shift;
396 } 396 }
397 397
398 qp->sq.max_gs = ((qp->sq_max_wqes_per_wr << qp->sq.wqe_shift) - 398 qp->sq.max_gs = (min(dev->dev->caps.max_sq_desc_sz,
399 (qp->sq_max_wqes_per_wr << qp->sq.wqe_shift)) -
399 send_wqe_overhead(type, qp->flags)) / 400 send_wqe_overhead(type, qp->flags)) /
400 sizeof (struct mlx4_wqe_data_seg); 401 sizeof (struct mlx4_wqe_data_seg);
401 402
@@ -411,7 +412,9 @@ static int set_kernel_sq_size(struct mlx4_ib_dev *dev, struct ib_qp_cap *cap,
411 412
412 cap->max_send_wr = qp->sq.max_post = 413 cap->max_send_wr = qp->sq.max_post =
413 (qp->sq.wqe_cnt - qp->sq_spare_wqes) / qp->sq_max_wqes_per_wr; 414 (qp->sq.wqe_cnt - qp->sq_spare_wqes) / qp->sq_max_wqes_per_wr;
414 cap->max_send_sge = qp->sq.max_gs; 415 cap->max_send_sge = min(qp->sq.max_gs,
416 min(dev->dev->caps.max_sq_sg,
417 dev->dev->caps.max_rq_sg));
415 /* We don't support inline sends for kernel QPs (yet) */ 418 /* We don't support inline sends for kernel QPs (yet) */
416 cap->max_inline_data = 0; 419 cap->max_inline_data = 0;
417 420
@@ -1457,7 +1460,7 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
1457 unsigned ind; 1460 unsigned ind;
1458 int uninitialized_var(stamp); 1461 int uninitialized_var(stamp);
1459 int uninitialized_var(size); 1462 int uninitialized_var(size);
1460 unsigned seglen; 1463 unsigned uninitialized_var(seglen);
1461 int i; 1464 int i;
1462 1465
1463 spin_lock_irqsave(&qp->sq.lock, flags); 1466 spin_lock_irqsave(&qp->sq.lock, flags);
diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c
index 9ebadd6e0cfb..200cf13fc9bb 100644
--- a/drivers/infiniband/hw/mthca/mthca_main.c
+++ b/drivers/infiniband/hw/mthca/mthca_main.c
@@ -45,6 +45,7 @@
45#include "mthca_cmd.h" 45#include "mthca_cmd.h"
46#include "mthca_profile.h" 46#include "mthca_profile.h"
47#include "mthca_memfree.h" 47#include "mthca_memfree.h"
48#include "mthca_wqe.h"
48 49
49MODULE_AUTHOR("Roland Dreier"); 50MODULE_AUTHOR("Roland Dreier");
50MODULE_DESCRIPTION("Mellanox InfiniBand HCA low-level driver"); 51MODULE_DESCRIPTION("Mellanox InfiniBand HCA low-level driver");
@@ -200,7 +201,18 @@ static int mthca_dev_lim(struct mthca_dev *mdev, struct mthca_dev_lim *dev_lim)
200 mdev->limits.gid_table_len = dev_lim->max_gids; 201 mdev->limits.gid_table_len = dev_lim->max_gids;
201 mdev->limits.pkey_table_len = dev_lim->max_pkeys; 202 mdev->limits.pkey_table_len = dev_lim->max_pkeys;
202 mdev->limits.local_ca_ack_delay = dev_lim->local_ca_ack_delay; 203 mdev->limits.local_ca_ack_delay = dev_lim->local_ca_ack_delay;
203 mdev->limits.max_sg = dev_lim->max_sg; 204 /*
205 * Need to allow for worst case send WQE overhead and check
206 * whether max_desc_sz imposes a lower limit than max_sg; UD
207 * send has the biggest overhead.
208 */
209 mdev->limits.max_sg = min_t(int, dev_lim->max_sg,
210 (dev_lim->max_desc_sz -
211 sizeof (struct mthca_next_seg) -
212 (mthca_is_memfree(mdev) ?
213 sizeof (struct mthca_arbel_ud_seg) :
214 sizeof (struct mthca_tavor_ud_seg))) /
215 sizeof (struct mthca_data_seg));
204 mdev->limits.max_wqes = dev_lim->max_qp_sz; 216 mdev->limits.max_wqes = dev_lim->max_qp_sz;
205 mdev->limits.max_qp_init_rdma = dev_lim->max_requester_per_qp; 217 mdev->limits.max_qp_init_rdma = dev_lim->max_requester_per_qp;
206 mdev->limits.reserved_qps = dev_lim->reserved_qps; 218 mdev->limits.reserved_qps = dev_lim->reserved_qps;
diff --git a/drivers/infiniband/hw/mthca/mthca_memfree.c b/drivers/infiniband/hw/mthca/mthca_memfree.c
index b224079d4e1f..d5862e5d99a0 100644
--- a/drivers/infiniband/hw/mthca/mthca_memfree.c
+++ b/drivers/infiniband/hw/mthca/mthca_memfree.c
@@ -109,7 +109,11 @@ static int mthca_alloc_icm_pages(struct scatterlist *mem, int order, gfp_t gfp_m
109{ 109{
110 struct page *page; 110 struct page *page;
111 111
112 page = alloc_pages(gfp_mask, order); 112 /*
113 * Use __GFP_ZERO because buggy firmware assumes ICM pages are
114 * cleared, and subtle failures are seen if they aren't.
115 */
116 page = alloc_pages(gfp_mask | __GFP_ZERO, order);
113 if (!page) 117 if (!page)
114 return -ENOMEM; 118 return -ENOMEM;
115 119
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
index 99b3c4ae86eb..d617da9bd351 100644
--- a/drivers/infiniband/hw/nes/nes_verbs.c
+++ b/drivers/infiniband/hw/nes/nes_verbs.c
@@ -2456,10 +2456,8 @@ static struct ib_mr *nes_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
2456 if ((page_count!=0)&&(page_count<<12)-(region->offset&(4096-1))>=region->length) 2456 if ((page_count!=0)&&(page_count<<12)-(region->offset&(4096-1))>=region->length)
2457 goto enough_pages; 2457 goto enough_pages;
2458 if ((page_count&0x01FF) == 0) { 2458 if ((page_count&0x01FF) == 0) {
2459 if (page_count>(1024*512)) { 2459 if (page_count >= 1024 * 512) {
2460 ib_umem_release(region); 2460 ib_umem_release(region);
2461 pci_free_consistent(nesdev->pcidev, 4096, vpbl.pbl_vbase,
2462 vpbl.pbl_pbase);
2463 nes_free_resource(nesadapter, 2461 nes_free_resource(nesadapter,
2464 nesadapter->allocated_mrs, stag_index); 2462 nesadapter->allocated_mrs, stag_index);
2465 kfree(nesmr); 2463 kfree(nesmr);
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index d00a2c174aee..3f663fb852c1 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -194,7 +194,13 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast,
194 /* Set the cached Q_Key before we attach if it's the broadcast group */ 194 /* Set the cached Q_Key before we attach if it's the broadcast group */
195 if (!memcmp(mcast->mcmember.mgid.raw, priv->dev->broadcast + 4, 195 if (!memcmp(mcast->mcmember.mgid.raw, priv->dev->broadcast + 4,
196 sizeof (union ib_gid))) { 196 sizeof (union ib_gid))) {
197 spin_lock_irq(&priv->lock);
198 if (!priv->broadcast) {
199 spin_unlock_irq(&priv->lock);
200 return -EAGAIN;
201 }
197 priv->qkey = be32_to_cpu(priv->broadcast->mcmember.qkey); 202 priv->qkey = be32_to_cpu(priv->broadcast->mcmember.qkey);
203 spin_unlock_irq(&priv->lock);
198 priv->tx_wr.wr.ud.remote_qkey = priv->qkey; 204 priv->tx_wr.wr.ud.remote_qkey = priv->qkey;
199 } 205 }
200 206
diff --git a/drivers/input/ff-core.c b/drivers/input/ff-core.c
index eebc72465fc9..72c63e5dd630 100644
--- a/drivers/input/ff-core.c
+++ b/drivers/input/ff-core.c
@@ -28,6 +28,7 @@
28#include <linux/input.h> 28#include <linux/input.h>
29#include <linux/module.h> 29#include <linux/module.h>
30#include <linux/mutex.h> 30#include <linux/mutex.h>
31#include <linux/sched.h>
31 32
32/* 33/*
33 * Check that the effect_id is a valid effect and whether the user 34 * Check that the effect_id is a valid effect and whether the user
@@ -166,8 +167,10 @@ int input_ff_upload(struct input_dev *dev, struct ff_effect *effect,
166 if (ret) 167 if (ret)
167 goto out; 168 goto out;
168 169
170 spin_lock_irq(&dev->event_lock);
169 ff->effects[id] = *effect; 171 ff->effects[id] = *effect;
170 ff->effect_owners[id] = file; 172 ff->effect_owners[id] = file;
173 spin_unlock_irq(&dev->event_lock);
171 174
172 out: 175 out:
173 mutex_unlock(&ff->mutex); 176 mutex_unlock(&ff->mutex);
@@ -189,16 +192,22 @@ static int erase_effect(struct input_dev *dev, int effect_id,
189 if (error) 192 if (error)
190 return error; 193 return error;
191 194
195 spin_lock_irq(&dev->event_lock);
192 ff->playback(dev, effect_id, 0); 196 ff->playback(dev, effect_id, 0);
197 ff->effect_owners[effect_id] = NULL;
198 spin_unlock_irq(&dev->event_lock);
193 199
194 if (ff->erase) { 200 if (ff->erase) {
195 error = ff->erase(dev, effect_id); 201 error = ff->erase(dev, effect_id);
196 if (error) 202 if (error) {
203 spin_lock_irq(&dev->event_lock);
204 ff->effect_owners[effect_id] = file;
205 spin_unlock_irq(&dev->event_lock);
206
197 return error; 207 return error;
208 }
198 } 209 }
199 210
200 ff->effect_owners[effect_id] = NULL;
201
202 return 0; 211 return 0;
203} 212}
204 213
@@ -263,8 +272,6 @@ int input_ff_event(struct input_dev *dev, unsigned int type,
263 if (type != EV_FF) 272 if (type != EV_FF)
264 return 0; 273 return 0;
265 274
266 mutex_lock(&ff->mutex);
267
268 switch (code) { 275 switch (code) {
269 case FF_GAIN: 276 case FF_GAIN:
270 if (!test_bit(FF_GAIN, dev->ffbit) || value > 0xffff) 277 if (!test_bit(FF_GAIN, dev->ffbit) || value > 0xffff)
@@ -286,7 +293,6 @@ int input_ff_event(struct input_dev *dev, unsigned int type,
286 break; 293 break;
287 } 294 }
288 295
289 mutex_unlock(&ff->mutex);
290 return 0; 296 return 0;
291} 297}
292EXPORT_SYMBOL_GPL(input_ff_event); 298EXPORT_SYMBOL_GPL(input_ff_event);
diff --git a/drivers/input/keyboard/aaed2000_kbd.c b/drivers/input/keyboard/aaed2000_kbd.c
index a293e8b3f508..8a77bfcd05bc 100644
--- a/drivers/input/keyboard/aaed2000_kbd.c
+++ b/drivers/input/keyboard/aaed2000_kbd.c
@@ -183,4 +183,4 @@ module_exit(aaedkbd_exit);
183 183
184MODULE_AUTHOR("Nicolas Bellido Y Ortega"); 184MODULE_AUTHOR("Nicolas Bellido Y Ortega");
185MODULE_DESCRIPTION("AAED-2000 Keyboard Driver"); 185MODULE_DESCRIPTION("AAED-2000 Keyboard Driver");
186MODULE_LICENSE("GPLv2"); 186MODULE_LICENSE("GPL v2");
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index 4a95adc4cc78..af58a6f1e898 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -807,6 +807,8 @@ static int atkbd_activate(struct atkbd *atkbd)
807static void atkbd_cleanup(struct serio *serio) 807static void atkbd_cleanup(struct serio *serio)
808{ 808{
809 struct atkbd *atkbd = serio_get_drvdata(serio); 809 struct atkbd *atkbd = serio_get_drvdata(serio);
810
811 atkbd_disable(atkbd);
810 ps2_command(&atkbd->ps2dev, NULL, ATKBD_CMD_RESET_BAT); 812 ps2_command(&atkbd->ps2dev, NULL, ATKBD_CMD_RESET_BAT);
811} 813}
812 814
diff --git a/drivers/input/keyboard/corgikbd.c b/drivers/input/keyboard/corgikbd.c
index 29fbec6218b9..1aa46ae12630 100644
--- a/drivers/input/keyboard/corgikbd.c
+++ b/drivers/input/keyboard/corgikbd.c
@@ -412,5 +412,5 @@ module_exit(corgikbd_exit);
412 412
413MODULE_AUTHOR("Richard Purdie <rpurdie@rpsys.net>"); 413MODULE_AUTHOR("Richard Purdie <rpurdie@rpsys.net>");
414MODULE_DESCRIPTION("Corgi Keyboard Driver"); 414MODULE_DESCRIPTION("Corgi Keyboard Driver");
415MODULE_LICENSE("GPLv2"); 415MODULE_LICENSE("GPL v2");
416MODULE_ALIAS("platform:corgi-keyboard"); 416MODULE_ALIAS("platform:corgi-keyboard");
diff --git a/drivers/input/keyboard/jornada680_kbd.c b/drivers/input/keyboard/jornada680_kbd.c
index 9387da343f97..781fc6102860 100644
--- a/drivers/input/keyboard/jornada680_kbd.c
+++ b/drivers/input/keyboard/jornada680_kbd.c
@@ -275,5 +275,5 @@ module_exit(jornada680kbd_exit);
275 275
276MODULE_AUTHOR("Kristoffer Ericson <kristoffer.ericson@gmail.com>"); 276MODULE_AUTHOR("Kristoffer Ericson <kristoffer.ericson@gmail.com>");
277MODULE_DESCRIPTION("HP Jornada 620/660/680/690 Keyboard Driver"); 277MODULE_DESCRIPTION("HP Jornada 620/660/680/690 Keyboard Driver");
278MODULE_LICENSE("GPLv2"); 278MODULE_LICENSE("GPL v2");
279MODULE_ALIAS("platform:jornada680_kbd"); 279MODULE_ALIAS("platform:jornada680_kbd");
diff --git a/drivers/input/keyboard/jornada720_kbd.c b/drivers/input/keyboard/jornada720_kbd.c
index a1164a0c7736..ce650af6d649 100644
--- a/drivers/input/keyboard/jornada720_kbd.c
+++ b/drivers/input/keyboard/jornada720_kbd.c
@@ -29,7 +29,7 @@
29 29
30MODULE_AUTHOR("Kristoffer Ericson <Kristoffer.Ericson@gmail.com>"); 30MODULE_AUTHOR("Kristoffer Ericson <Kristoffer.Ericson@gmail.com>");
31MODULE_DESCRIPTION("HP Jornada 710/720/728 keyboard driver"); 31MODULE_DESCRIPTION("HP Jornada 710/720/728 keyboard driver");
32MODULE_LICENSE("GPLv2"); 32MODULE_LICENSE("GPL v2");
33 33
34static unsigned short jornada_std_keymap[128] = { /* ROW */ 34static unsigned short jornada_std_keymap[128] = { /* ROW */
35 0, KEY_ESC, KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6, KEY_F7, /* #1 */ 35 0, KEY_ESC, KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6, KEY_F7, /* #1 */
diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c
index 3dea0c5077a9..45767e73f071 100644
--- a/drivers/input/keyboard/pxa27x_keypad.c
+++ b/drivers/input/keyboard/pxa27x_keypad.c
@@ -136,6 +136,9 @@ static void pxa27x_keypad_build_keycode(struct pxa27x_keypad *keypad)
136 set_bit(code, input_dev->keybit); 136 set_bit(code, input_dev->keybit);
137 } 137 }
138 138
139 for (i = 0; i < pdata->direct_key_num; i++)
140 set_bit(pdata->direct_key_map[i], input_dev->keybit);
141
139 keypad->rotary_up_key[0] = pdata->rotary0_up_key; 142 keypad->rotary_up_key[0] = pdata->rotary0_up_key;
140 keypad->rotary_up_key[1] = pdata->rotary1_up_key; 143 keypad->rotary_up_key[1] = pdata->rotary1_up_key;
141 keypad->rotary_down_key[0] = pdata->rotary0_down_key; 144 keypad->rotary_down_key[0] = pdata->rotary0_down_key;
@@ -143,17 +146,21 @@ static void pxa27x_keypad_build_keycode(struct pxa27x_keypad *keypad)
143 keypad->rotary_rel_code[0] = pdata->rotary0_rel_code; 146 keypad->rotary_rel_code[0] = pdata->rotary0_rel_code;
144 keypad->rotary_rel_code[1] = pdata->rotary1_rel_code; 147 keypad->rotary_rel_code[1] = pdata->rotary1_rel_code;
145 148
146 if (pdata->rotary0_up_key && pdata->rotary0_down_key) { 149 if (pdata->enable_rotary0) {
147 set_bit(pdata->rotary0_up_key, input_dev->keybit); 150 if (pdata->rotary0_up_key && pdata->rotary0_down_key) {
148 set_bit(pdata->rotary0_down_key, input_dev->keybit); 151 set_bit(pdata->rotary0_up_key, input_dev->keybit);
149 } else 152 set_bit(pdata->rotary0_down_key, input_dev->keybit);
150 set_bit(pdata->rotary0_rel_code, input_dev->relbit); 153 } else
151 154 set_bit(pdata->rotary0_rel_code, input_dev->relbit);
152 if (pdata->rotary1_up_key && pdata->rotary1_down_key) { 155 }
153 set_bit(pdata->rotary1_up_key, input_dev->keybit); 156
154 set_bit(pdata->rotary1_down_key, input_dev->keybit); 157 if (pdata->enable_rotary1) {
155 } else 158 if (pdata->rotary1_up_key && pdata->rotary1_down_key) {
156 set_bit(pdata->rotary1_rel_code, input_dev->relbit); 159 set_bit(pdata->rotary1_up_key, input_dev->keybit);
160 set_bit(pdata->rotary1_down_key, input_dev->keybit);
161 } else
162 set_bit(pdata->rotary1_rel_code, input_dev->relbit);
163 }
157} 164}
158 165
159static inline unsigned int lookup_matrix_keycode( 166static inline unsigned int lookup_matrix_keycode(
@@ -484,8 +491,13 @@ static int __devinit pxa27x_keypad_probe(struct platform_device *pdev)
484 keypad->input_dev = input_dev; 491 keypad->input_dev = input_dev;
485 input_set_drvdata(input_dev, keypad); 492 input_set_drvdata(input_dev, keypad);
486 493
487 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP) | 494 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP);
488 BIT_MASK(EV_REL); 495 if ((keypad->pdata->enable_rotary0 &&
496 keypad->pdata->rotary0_rel_code) ||
497 (keypad->pdata->enable_rotary1 &&
498 keypad->pdata->rotary1_rel_code)) {
499 input_dev->evbit[0] |= BIT_MASK(EV_REL);
500 }
489 501
490 pxa27x_keypad_build_keycode(keypad); 502 pxa27x_keypad_build_keycode(keypad);
491 platform_set_drvdata(pdev, keypad); 503 platform_set_drvdata(pdev, keypad);
diff --git a/drivers/input/keyboard/spitzkbd.c b/drivers/input/keyboard/spitzkbd.c
index 61e401bc9109..1aa37181c40f 100644
--- a/drivers/input/keyboard/spitzkbd.c
+++ b/drivers/input/keyboard/spitzkbd.c
@@ -494,5 +494,5 @@ module_exit(spitzkbd_exit);
494 494
495MODULE_AUTHOR("Richard Purdie <rpurdie@rpsys.net>"); 495MODULE_AUTHOR("Richard Purdie <rpurdie@rpsys.net>");
496MODULE_DESCRIPTION("Spitz Keyboard Driver"); 496MODULE_DESCRIPTION("Spitz Keyboard Driver");
497MODULE_LICENSE("GPLv2"); 497MODULE_LICENSE("GPL v2");
498MODULE_ALIAS("platform:spitz-keyboard"); 498MODULE_ALIAS("platform:spitz-keyboard");
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
index 3ad8bd9f7543..432699d61c58 100644
--- a/drivers/input/misc/Kconfig
+++ b/drivers/input/misc/Kconfig
@@ -15,7 +15,6 @@ if INPUT_MISC
15config INPUT_PCSPKR 15config INPUT_PCSPKR
16 tristate "PC Speaker support" 16 tristate "PC Speaker support"
17 depends on PCSPKR_PLATFORM 17 depends on PCSPKR_PLATFORM
18 depends on SND_PCSP=n
19 help 18 help
20 Say Y here if you want the standard PC Speaker to be used for 19 Say Y here if you want the standard PC Speaker to be used for
21 bells and whistles. 20 bells and whistles.
diff --git a/drivers/input/misc/apanel.c b/drivers/input/misc/apanel.c
index 9531d8c7444f..d82f7f727f7a 100644
--- a/drivers/input/misc/apanel.c
+++ b/drivers/input/misc/apanel.c
@@ -20,7 +20,6 @@
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/ioport.h> 21#include <linux/ioport.h>
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/module.h>
24#include <linux/input-polldev.h> 23#include <linux/input-polldev.h>
25#include <linux/i2c.h> 24#include <linux/i2c.h>
26#include <linux/workqueue.h> 25#include <linux/workqueue.h>
diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
index 8dd3942f3022..ce6fdec19e14 100644
--- a/drivers/input/mouse/appletouch.c
+++ b/drivers/input/mouse/appletouch.c
@@ -589,6 +589,21 @@ static void atp_close(struct input_dev *input)
589 dev->open = 0; 589 dev->open = 0;
590} 590}
591 591
592static int atp_handle_geyser(struct atp *dev)
593{
594 struct usb_device *udev = dev->udev;
595
596 if (!atp_is_fountain(dev)) {
597 /* switch to raw sensor mode */
598 if (atp_geyser_init(udev))
599 return -EIO;
600
601 printk(KERN_INFO "appletouch: Geyser mode initialized.\n");
602 }
603
604 return 0;
605}
606
592static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id) 607static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id)
593{ 608{
594 struct atp *dev; 609 struct atp *dev;
@@ -633,14 +648,6 @@ static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id
633 else 648 else
634 dev->datalen = 81; 649 dev->datalen = 81;
635 650
636 if (!atp_is_fountain(dev)) {
637 /* switch to raw sensor mode */
638 if (atp_geyser_init(udev))
639 goto err_free_devs;
640
641 printk(KERN_INFO "appletouch: Geyser mode initialized.\n");
642 }
643
644 dev->urb = usb_alloc_urb(0, GFP_KERNEL); 651 dev->urb = usb_alloc_urb(0, GFP_KERNEL);
645 if (!dev->urb) 652 if (!dev->urb)
646 goto err_free_devs; 653 goto err_free_devs;
@@ -654,6 +661,10 @@ static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id
654 usb_rcvintpipe(udev, int_in_endpointAddr), 661 usb_rcvintpipe(udev, int_in_endpointAddr),
655 dev->data, dev->datalen, atp_complete, dev, 1); 662 dev->data, dev->datalen, atp_complete, dev, 1);
656 663
664 error = atp_handle_geyser(dev);
665 if (error)
666 goto err_free_buffer;
667
657 usb_make_path(udev, dev->phys, sizeof(dev->phys)); 668 usb_make_path(udev, dev->phys, sizeof(dev->phys));
658 strlcat(dev->phys, "/input0", sizeof(dev->phys)); 669 strlcat(dev->phys, "/input0", sizeof(dev->phys));
659 670
@@ -744,6 +755,20 @@ static void atp_disconnect(struct usb_interface *iface)
744 printk(KERN_INFO "input: appletouch disconnected\n"); 755 printk(KERN_INFO "input: appletouch disconnected\n");
745} 756}
746 757
758static int atp_recover(struct atp *dev)
759{
760 int error;
761
762 error = atp_handle_geyser(dev);
763 if (error)
764 return error;
765
766 if (dev->open && usb_submit_urb(dev->urb, GFP_ATOMIC))
767 return -EIO;
768
769 return 0;
770}
771
747static int atp_suspend(struct usb_interface *iface, pm_message_t message) 772static int atp_suspend(struct usb_interface *iface, pm_message_t message)
748{ 773{
749 struct atp *dev = usb_get_intfdata(iface); 774 struct atp *dev = usb_get_intfdata(iface);
@@ -764,12 +789,20 @@ static int atp_resume(struct usb_interface *iface)
764 return 0; 789 return 0;
765} 790}
766 791
792static int atp_reset_resume(struct usb_interface *iface)
793{
794 struct atp *dev = usb_get_intfdata(iface);
795
796 return atp_recover(dev);
797}
798
767static struct usb_driver atp_driver = { 799static struct usb_driver atp_driver = {
768 .name = "appletouch", 800 .name = "appletouch",
769 .probe = atp_probe, 801 .probe = atp_probe,
770 .disconnect = atp_disconnect, 802 .disconnect = atp_disconnect,
771 .suspend = atp_suspend, 803 .suspend = atp_suspend,
772 .resume = atp_resume, 804 .resume = atp_resume,
805 .reset_resume = atp_reset_resume,
773 .id_table = atp_table, 806 .id_table = atp_table,
774}; 807};
775 808
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
index 5ece9f56babc..78eb7841174c 100644
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -193,6 +193,13 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
193 }, 193 },
194 }, 194 },
195 { 195 {
196 .ident = "Fujitsu-Siemens Amilo Pro 2030",
197 .matches = {
198 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
199 DMI_MATCH(DMI_PRODUCT_NAME, "AMILO PRO V2030"),
200 },
201 },
202 {
196 /* 203 /*
197 * No data is coming from the touchscreen unless KBC 204 * No data is coming from the touchscreen unless KBC
198 * is in legacy mode. 205 * is in legacy mode.
@@ -331,6 +338,13 @@ static struct dmi_system_id __initdata i8042_dmi_dritek_table[] = {
331 }, 338 },
332 }, 339 },
333 { 340 {
341 .ident = "Acer TravelMate 660",
342 .matches = {
343 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
344 DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 660"),
345 },
346 },
347 {
334 .ident = "Acer TravelMate 2490", 348 .ident = "Acer TravelMate 2490",
335 .matches = { 349 .matches = {
336 DMI_MATCH(DMI_SYS_VENDOR, "Acer"), 350 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index 65a74cfc187b..170f71ee5772 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -885,6 +885,20 @@ static long i8042_panic_blink(long count)
885 885
886#undef DELAY 886#undef DELAY
887 887
888#ifdef CONFIG_X86
889static void i8042_dritek_enable(void)
890{
891 char param = 0x90;
892 int error;
893
894 error = i8042_command(&param, 0x1059);
895 if (error)
896 printk(KERN_WARNING
897 "Failed to enable DRITEK extension: %d\n",
898 error);
899}
900#endif
901
888#ifdef CONFIG_PM 902#ifdef CONFIG_PM
889/* 903/*
890 * Here we try to restore the original BIOS settings. We only want to 904 * Here we try to restore the original BIOS settings. We only want to
@@ -938,10 +952,20 @@ static int i8042_resume(struct platform_device *dev)
938 i8042_ctr |= I8042_CTR_AUXDIS | I8042_CTR_KBDDIS; 952 i8042_ctr |= I8042_CTR_AUXDIS | I8042_CTR_KBDDIS;
939 i8042_ctr &= ~(I8042_CTR_AUXINT | I8042_CTR_KBDINT); 953 i8042_ctr &= ~(I8042_CTR_AUXINT | I8042_CTR_KBDINT);
940 if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) { 954 if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
941 printk(KERN_ERR "i8042: Can't write CTR to resume\n"); 955 printk(KERN_WARNING "i8042: Can't write CTR to resume, retrying...\n");
942 return -EIO; 956 msleep(50);
957 if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
958 printk(KERN_ERR "i8042: CTR write retry failed\n");
959 return -EIO;
960 }
943 } 961 }
944 962
963
964#ifdef CONFIG_X86
965 if (i8042_dritek)
966 i8042_dritek_enable();
967#endif
968
945 if (i8042_mux_present) { 969 if (i8042_mux_present) {
946 if (i8042_set_mux_mode(1, NULL) || i8042_enable_mux_ports()) 970 if (i8042_set_mux_mode(1, NULL) || i8042_enable_mux_ports())
947 printk(KERN_WARNING 971 printk(KERN_WARNING
@@ -1160,6 +1184,11 @@ static int __devinit i8042_probe(struct platform_device *dev)
1160 if (error) 1184 if (error)
1161 return error; 1185 return error;
1162 1186
1187#ifdef CONFIG_X86
1188 if (i8042_dritek)
1189 i8042_dritek_enable();
1190#endif
1191
1163 if (!i8042_noaux) { 1192 if (!i8042_noaux) {
1164 error = i8042_setup_aux(); 1193 error = i8042_setup_aux();
1165 if (error && error != -ENODEV && error != -EBUSY) 1194 if (error && error != -ENODEV && error != -EBUSY)
@@ -1171,14 +1200,6 @@ static int __devinit i8042_probe(struct platform_device *dev)
1171 if (error) 1200 if (error)
1172 goto out_fail; 1201 goto out_fail;
1173 } 1202 }
1174#ifdef CONFIG_X86
1175 if (i8042_dritek) {
1176 char param = 0x90;
1177 error = i8042_command(&param, 0x1059);
1178 if (error)
1179 goto out_fail;
1180 }
1181#endif
1182/* 1203/*
1183 * Ok, everything is ready, let's register all serio ports 1204 * Ok, everything is ready, let's register all serio ports
1184 */ 1205 */
diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c
index c5a8661a1baa..1e748e46d12e 100644
--- a/drivers/input/tablet/gtco.c
+++ b/drivers/input/tablet/gtco.c
@@ -830,7 +830,7 @@ static int gtco_probe(struct usb_interface *usbinterface,
830 struct gtco *gtco; 830 struct gtco *gtco;
831 struct input_dev *input_dev; 831 struct input_dev *input_dev;
832 struct hid_descriptor *hid_desc; 832 struct hid_descriptor *hid_desc;
833 char *report = NULL; 833 char *report;
834 int result = 0, retry; 834 int result = 0, retry;
835 int error; 835 int error;
836 struct usb_endpoint_descriptor *endpoint; 836 struct usb_endpoint_descriptor *endpoint;
@@ -916,12 +916,16 @@ static int gtco_probe(struct usb_interface *usbinterface,
916 le16_to_cpu(hid_desc->wDescriptorLength), 916 le16_to_cpu(hid_desc->wDescriptorLength),
917 5000); /* 5 secs */ 917 5000); /* 5 secs */
918 918
919 if (result == le16_to_cpu(hid_desc->wDescriptorLength)) 919 dbg("usb_control_msg result: %d", result);
920 if (result == le16_to_cpu(hid_desc->wDescriptorLength)) {
921 parse_hid_report_descriptor(gtco, report, result);
920 break; 922 break;
923 }
921 } 924 }
922 925
926 kfree(report);
927
923 /* If we didn't get the report, fail */ 928 /* If we didn't get the report, fail */
924 dbg("usb_control_msg result: :%d", result);
925 if (result != le16_to_cpu(hid_desc->wDescriptorLength)) { 929 if (result != le16_to_cpu(hid_desc->wDescriptorLength)) {
926 err("Failed to get HID Report Descriptor of size: %d", 930 err("Failed to get HID Report Descriptor of size: %d",
927 hid_desc->wDescriptorLength); 931 hid_desc->wDescriptorLength);
@@ -929,12 +933,6 @@ static int gtco_probe(struct usb_interface *usbinterface,
929 goto err_free_urb; 933 goto err_free_urb;
930 } 934 }
931 935
932 /* Now we parse the report */
933 parse_hid_report_descriptor(gtco, report, result);
934
935 /* Now we delete it */
936 kfree(report);
937
938 /* Create a device file node */ 936 /* Create a device file node */
939 usb_make_path(gtco->usbdev, gtco->usbpath, sizeof(gtco->usbpath)); 937 usb_make_path(gtco->usbdev, gtco->usbpath, sizeof(gtco->usbpath));
940 strlcat(gtco->usbpath, "/input0", sizeof(gtco->usbpath)); 938 strlcat(gtco->usbpath, "/input0", sizeof(gtco->usbpath));
@@ -988,7 +986,6 @@ static int gtco_probe(struct usb_interface *usbinterface,
988 usb_buffer_free(gtco->usbdev, REPORT_MAX_SIZE, 986 usb_buffer_free(gtco->usbdev, REPORT_MAX_SIZE,
989 gtco->buffer, gtco->buf_dma); 987 gtco->buffer, gtco->buf_dma);
990 err_free_devs: 988 err_free_devs:
991 kfree(report);
992 input_free_device(input_dev); 989 input_free_device(input_dev);
993 kfree(gtco); 990 kfree(gtco);
994 return error; 991 return error;
diff --git a/drivers/input/touchscreen/jornada720_ts.c b/drivers/input/touchscreen/jornada720_ts.c
index 742242111bf1..1aca108b1031 100644
--- a/drivers/input/touchscreen/jornada720_ts.c
+++ b/drivers/input/touchscreen/jornada720_ts.c
@@ -24,7 +24,7 @@
24 24
25MODULE_AUTHOR("Kristoffer Ericson <kristoffer.ericson@gmail.com>"); 25MODULE_AUTHOR("Kristoffer Ericson <kristoffer.ericson@gmail.com>");
26MODULE_DESCRIPTION("HP Jornada 710/720/728 touchscreen driver"); 26MODULE_DESCRIPTION("HP Jornada 710/720/728 touchscreen driver");
27MODULE_LICENSE("GPLv2"); 27MODULE_LICENSE("GPL v2");
28 28
29struct jornada_ts { 29struct jornada_ts {
30 struct input_dev *dev; 30 struct input_dev *dev;
diff --git a/drivers/input/touchscreen/wm9713.c b/drivers/input/touchscreen/wm9713.c
index 01278bd7e65c..838458792ea0 100644
--- a/drivers/input/touchscreen/wm9713.c
+++ b/drivers/input/touchscreen/wm9713.c
@@ -85,6 +85,15 @@ module_param(delay, int, 0);
85MODULE_PARM_DESC(delay, "Set adc sample delay."); 85MODULE_PARM_DESC(delay, "Set adc sample delay.");
86 86
87/* 87/*
88 * Set five_wire = 1 to use a 5 wire touchscreen.
89 *
90 * NOTE: Five wire mode does not allow for readback of pressure.
91 */
92static int five_wire;
93module_param(five_wire, int, 0);
94MODULE_PARM_DESC(five_wire, "Set to '1' to use 5-wire touchscreen.");
95
96/*
88 * Set adc mask function. 97 * Set adc mask function.
89 * 98 *
90 * Sources of glitch noise, such as signals driving an LCD display, may feed 99 * Sources of glitch noise, such as signals driving an LCD display, may feed
@@ -162,6 +171,19 @@ static void wm9713_phy_init(struct wm97xx *wm)
162 64000 / rpu); 171 64000 / rpu);
163 } 172 }
164 173
174 /* Five wire panel? */
175 if (five_wire) {
176 dig3 |= WM9713_45W;
177 dev_info(wm->dev, "setting 5-wire touchscreen mode.");
178
179 if (pil) {
180 dev_warn(wm->dev,
181 "Pressure measurement not supported in 5 "
182 "wire mode, disabling\n");
183 pil = 0;
184 }
185 }
186
165 /* touchpanel pressure */ 187 /* touchpanel pressure */
166 if (pil == 2) { 188 if (pil == 2) {
167 dig3 |= WM9712_PIL; 189 dig3 |= WM9712_PIL;
diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c
index e9c7ea46b6e3..cdc24ad314e0 100644
--- a/drivers/input/touchscreen/wm97xx-core.c
+++ b/drivers/input/touchscreen/wm97xx-core.c
@@ -608,6 +608,17 @@ static int wm97xx_probe(struct device *dev)
608 goto alloc_err; 608 goto alloc_err;
609 } 609 }
610 610
611 /* set up physical characteristics */
612 wm->codec->phy_init(wm);
613
614 /* load gpio cache */
615 wm->gpio[0] = wm97xx_reg_read(wm, AC97_GPIO_CFG);
616 wm->gpio[1] = wm97xx_reg_read(wm, AC97_GPIO_POLARITY);
617 wm->gpio[2] = wm97xx_reg_read(wm, AC97_GPIO_STICKY);
618 wm->gpio[3] = wm97xx_reg_read(wm, AC97_GPIO_WAKEUP);
619 wm->gpio[4] = wm97xx_reg_read(wm, AC97_GPIO_STATUS);
620 wm->gpio[5] = wm97xx_reg_read(wm, AC97_MISC_AFE);
621
611 wm->input_dev = input_allocate_device(); 622 wm->input_dev = input_allocate_device();
612 if (wm->input_dev == NULL) { 623 if (wm->input_dev == NULL) {
613 ret = -ENOMEM; 624 ret = -ENOMEM;
@@ -616,6 +627,7 @@ static int wm97xx_probe(struct device *dev)
616 627
617 /* set up touch configuration */ 628 /* set up touch configuration */
618 wm->input_dev->name = "wm97xx touchscreen"; 629 wm->input_dev->name = "wm97xx touchscreen";
630 wm->input_dev->phys = "wm97xx";
619 wm->input_dev->open = wm97xx_ts_input_open; 631 wm->input_dev->open = wm97xx_ts_input_open;
620 wm->input_dev->close = wm97xx_ts_input_close; 632 wm->input_dev->close = wm97xx_ts_input_close;
621 set_bit(EV_ABS, wm->input_dev->evbit); 633 set_bit(EV_ABS, wm->input_dev->evbit);
@@ -634,17 +646,6 @@ static int wm97xx_probe(struct device *dev)
634 if (ret < 0) 646 if (ret < 0)
635 goto dev_alloc_err; 647 goto dev_alloc_err;
636 648
637 /* set up physical characteristics */
638 wm->codec->phy_init(wm);
639
640 /* load gpio cache */
641 wm->gpio[0] = wm97xx_reg_read(wm, AC97_GPIO_CFG);
642 wm->gpio[1] = wm97xx_reg_read(wm, AC97_GPIO_POLARITY);
643 wm->gpio[2] = wm97xx_reg_read(wm, AC97_GPIO_STICKY);
644 wm->gpio[3] = wm97xx_reg_read(wm, AC97_GPIO_WAKEUP);
645 wm->gpio[4] = wm97xx_reg_read(wm, AC97_GPIO_STATUS);
646 wm->gpio[5] = wm97xx_reg_read(wm, AC97_MISC_AFE);
647
648 /* register our battery device */ 649 /* register our battery device */
649 wm->battery_dev = platform_device_alloc("wm97xx-battery", -1); 650 wm->battery_dev = platform_device_alloc("wm97xx-battery", -1);
650 if (!wm->battery_dev) { 651 if (!wm->battery_dev) {
@@ -801,7 +802,7 @@ void wm97xx_unregister_mach_ops(struct wm97xx *wm)
801EXPORT_SYMBOL_GPL(wm97xx_unregister_mach_ops); 802EXPORT_SYMBOL_GPL(wm97xx_unregister_mach_ops);
802 803
803static struct device_driver wm97xx_driver = { 804static struct device_driver wm97xx_driver = {
804 .name = "ac97", 805 .name = "wm97xx-ts",
805 .bus = &ac97_bus_type, 806 .bus = &ac97_bus_type,
806 .owner = THIS_MODULE, 807 .owner = THIS_MODULE,
807 .probe = wm97xx_probe, 808 .probe = wm97xx_probe,
diff --git a/drivers/input/xen-kbdfront.c b/drivers/input/xen-kbdfront.c
index 0f47f4697cdf..9ce3b3baf3a2 100644
--- a/drivers/input/xen-kbdfront.c
+++ b/drivers/input/xen-kbdfront.c
@@ -66,6 +66,9 @@ static irqreturn_t input_handler(int rq, void *dev_id)
66 case XENKBD_TYPE_MOTION: 66 case XENKBD_TYPE_MOTION:
67 input_report_rel(dev, REL_X, event->motion.rel_x); 67 input_report_rel(dev, REL_X, event->motion.rel_x);
68 input_report_rel(dev, REL_Y, event->motion.rel_y); 68 input_report_rel(dev, REL_Y, event->motion.rel_y);
69 if (event->motion.rel_z)
70 input_report_rel(dev, REL_WHEEL,
71 -event->motion.rel_z);
69 break; 72 break;
70 case XENKBD_TYPE_KEY: 73 case XENKBD_TYPE_KEY:
71 dev = NULL; 74 dev = NULL;
@@ -84,6 +87,9 @@ static irqreturn_t input_handler(int rq, void *dev_id)
84 case XENKBD_TYPE_POS: 87 case XENKBD_TYPE_POS:
85 input_report_abs(dev, ABS_X, event->pos.abs_x); 88 input_report_abs(dev, ABS_X, event->pos.abs_x);
86 input_report_abs(dev, ABS_Y, event->pos.abs_y); 89 input_report_abs(dev, ABS_Y, event->pos.abs_y);
90 if (event->pos.rel_z)
91 input_report_rel(dev, REL_WHEEL,
92 -event->pos.rel_z);
87 break; 93 break;
88 } 94 }
89 if (dev) 95 if (dev)
@@ -152,7 +158,7 @@ static int __devinit xenkbd_probe(struct xenbus_device *dev,
152 ptr->evbit[0] = BIT(EV_KEY) | BIT(EV_REL) | BIT(EV_ABS); 158 ptr->evbit[0] = BIT(EV_KEY) | BIT(EV_REL) | BIT(EV_ABS);
153 for (i = BTN_LEFT; i <= BTN_TASK; i++) 159 for (i = BTN_LEFT; i <= BTN_TASK; i++)
154 set_bit(i, ptr->keybit); 160 set_bit(i, ptr->keybit);
155 ptr->relbit[0] = BIT(REL_X) | BIT(REL_Y); 161 ptr->relbit[0] = BIT(REL_X) | BIT(REL_Y) | BIT(REL_WHEEL);
156 input_set_abs_params(ptr, ABS_X, 0, XENFB_WIDTH, 0, 0); 162 input_set_abs_params(ptr, ABS_X, 0, XENFB_WIDTH, 0, 0);
157 input_set_abs_params(ptr, ABS_Y, 0, XENFB_HEIGHT, 0, 0); 163 input_set_abs_params(ptr, ABS_Y, 0, XENFB_HEIGHT, 0, 0);
158 164
@@ -294,6 +300,16 @@ InitWait:
294 */ 300 */
295 if (dev->state != XenbusStateConnected) 301 if (dev->state != XenbusStateConnected)
296 goto InitWait; /* no InitWait seen yet, fudge it */ 302 goto InitWait; /* no InitWait seen yet, fudge it */
303
304 /* Set input abs params to match backend screen res */
305 if (xenbus_scanf(XBT_NIL, info->xbdev->otherend,
306 "width", "%d", &val) > 0)
307 input_set_abs_params(info->ptr, ABS_X, 0, val, 0, 0);
308
309 if (xenbus_scanf(XBT_NIL, info->xbdev->otherend,
310 "height", "%d", &val) > 0)
311 input_set_abs_params(info->ptr, ABS_Y, 0, val, 0, 0);
312
297 break; 313 break;
298 314
299 case XenbusStateClosing: 315 case XenbusStateClosing:
@@ -337,4 +353,6 @@ static void __exit xenkbd_cleanup(void)
337module_init(xenkbd_init); 353module_init(xenkbd_init);
338module_exit(xenkbd_cleanup); 354module_exit(xenkbd_cleanup);
339 355
356MODULE_DESCRIPTION("Xen virtual keyboard/pointer device frontend");
340MODULE_LICENSE("GPL"); 357MODULE_LICENSE("GPL");
358MODULE_ALIAS("xen:vkbd");
diff --git a/drivers/isdn/capi/capiutil.c b/drivers/isdn/capi/capiutil.c
index ebef4ce1b00c..29419a8d31dc 100644
--- a/drivers/isdn/capi/capiutil.c
+++ b/drivers/isdn/capi/capiutil.c
@@ -948,17 +948,17 @@ int __init cdebug_init(void)
948{ 948{
949 g_cmsg= kmalloc(sizeof(_cmsg), GFP_KERNEL); 949 g_cmsg= kmalloc(sizeof(_cmsg), GFP_KERNEL);
950 if (!g_cmsg) 950 if (!g_cmsg)
951 return ENOMEM; 951 return -ENOMEM;
952 g_debbuf = kmalloc(sizeof(_cdebbuf), GFP_KERNEL); 952 g_debbuf = kmalloc(sizeof(_cdebbuf), GFP_KERNEL);
953 if (!g_debbuf) { 953 if (!g_debbuf) {
954 kfree(g_cmsg); 954 kfree(g_cmsg);
955 return ENOMEM; 955 return -ENOMEM;
956 } 956 }
957 g_debbuf->buf = kmalloc(CDEBUG_GSIZE, GFP_KERNEL); 957 g_debbuf->buf = kmalloc(CDEBUG_GSIZE, GFP_KERNEL);
958 if (!g_debbuf->buf) { 958 if (!g_debbuf->buf) {
959 kfree(g_cmsg); 959 kfree(g_cmsg);
960 kfree(g_debbuf); 960 kfree(g_debbuf);
961 return ENOMEM;; 961 return -ENOMEM;;
962 } 962 }
963 g_debbuf->size = CDEBUG_GSIZE; 963 g_debbuf->size = CDEBUG_GSIZE;
964 g_debbuf->buf[0] = 0; 964 g_debbuf->buf[0] = 0;
diff --git a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c
index 5fcbdccd7a53..16a874bb1561 100644
--- a/drivers/isdn/hardware/eicon/divasmain.c
+++ b/drivers/isdn/hardware/eicon/divasmain.c
@@ -806,7 +806,6 @@ static int DIVA_INIT_FUNCTION divas_init(void)
806 806
807 if (!create_divas_proc()) { 807 if (!create_divas_proc()) {
808#ifdef MODULE 808#ifdef MODULE
809 remove_divas_proc();
810 divas_unregister_chrdev(); 809 divas_unregister_chrdev();
811 divasfunc_exit(); 810 divasfunc_exit();
812#endif 811#endif
diff --git a/drivers/isdn/hardware/eicon/divasproc.c b/drivers/isdn/hardware/eicon/divasproc.c
index fae895828a17..040827288ec9 100644
--- a/drivers/isdn/hardware/eicon/divasproc.c
+++ b/drivers/isdn/hardware/eicon/divasproc.c
@@ -125,8 +125,8 @@ static const struct file_operations divas_fops = {
125 125
126int create_divas_proc(void) 126int create_divas_proc(void)
127{ 127{
128 proc_create(divas_proc_name, S_IFREG | S_IRUGO, proc_net_eicon, 128 divas_proc_entry = proc_create(divas_proc_name, S_IFREG | S_IRUGO,
129 &divas_fops); 129 proc_net_eicon, &divas_fops);
130 if (!divas_proc_entry) 130 if (!divas_proc_entry)
131 return (0); 131 return (0);
132 132
diff --git a/drivers/isdn/hysdn/Kconfig b/drivers/isdn/hysdn/Kconfig
index c6d8a7042988..c9e4231968ef 100644
--- a/drivers/isdn/hysdn/Kconfig
+++ b/drivers/isdn/hysdn/Kconfig
@@ -3,7 +3,7 @@
3# 3#
4config HYSDN 4config HYSDN
5 tristate "Hypercope HYSDN cards (Champ, Ergo, Metro) support (module only)" 5 tristate "Hypercope HYSDN cards (Champ, Ergo, Metro) support (module only)"
6 depends on m && PROC_FS && PCI && BROKEN_ON_SMP 6 depends on m && PROC_FS && PCI
7 help 7 help
8 Say Y here if you have one of Hypercope's active PCI ISDN cards 8 Say Y here if you have one of Hypercope's active PCI ISDN cards
9 Champ, Ergo and Metro. You will then get a module called hysdn. 9 Champ, Ergo and Metro. You will then get a module called hysdn.
diff --git a/drivers/isdn/hysdn/boardergo.c b/drivers/isdn/hysdn/boardergo.c
index 6cdbad3a9926..3eb096f0ae1b 100644
--- a/drivers/isdn/hysdn/boardergo.c
+++ b/drivers/isdn/hysdn/boardergo.c
@@ -64,10 +64,11 @@ ergo_interrupt(int intno, void *dev_id)
64} /* ergo_interrupt */ 64} /* ergo_interrupt */
65 65
66/******************************************************************************/ 66/******************************************************************************/
67/* ergo_irq_bh is the function called by the immediate kernel task list after */ 67/* ergo_irq_bh will be called as part of the kernel clearing its shared work */
68/* being activated with queue_task and no interrupts active. This task is the */ 68/* queue sometime after a call to schedule_work has been made passing our */
69/* only one handling data transfer from or to the card after booting. The task */ 69/* work_struct. This task is the only one handling data transfer from or to */
70/* may be queued from everywhere (interrupts included). */ 70/* the card after booting. The task may be queued from everywhere */
71/* (interrupts included). */
71/******************************************************************************/ 72/******************************************************************************/
72static void 73static void
73ergo_irq_bh(struct work_struct *ugli_api) 74ergo_irq_bh(struct work_struct *ugli_api)
@@ -90,7 +91,6 @@ ergo_irq_bh(struct work_struct *ugli_api)
90 card->hw_lock = 1; /* we now lock the hardware */ 91 card->hw_lock = 1; /* we now lock the hardware */
91 92
92 do { 93 do {
93 sti(); /* reenable other ints */
94 again = 0; /* assume loop not to be repeated */ 94 again = 0; /* assume loop not to be repeated */
95 95
96 if (!dpr->ToHyFlag) { 96 if (!dpr->ToHyFlag) {
@@ -110,7 +110,6 @@ ergo_irq_bh(struct work_struct *ugli_api)
110 again = 1; /* restart loop */ 110 again = 1; /* restart loop */
111 } 111 }
112 } /* a message has arrived for us */ 112 } /* a message has arrived for us */
113 cli(); /* no further ints */
114 if (again) { 113 if (again) {
115 dpr->ToHyInt = 1; 114 dpr->ToHyInt = 1;
116 dpr->ToPcInt = 1; /* interrupt to E1 for all cards */ 115 dpr->ToPcInt = 1; /* interrupt to E1 for all cards */
@@ -242,7 +241,6 @@ ergo_writebootimg(struct HYSDN_CARD *card, unsigned char *buf,
242 byteout(card->iobase + PCI9050_USER_IO, PCI9050_E1_RUN); /* start E1 processor */ 241 byteout(card->iobase + PCI9050_USER_IO, PCI9050_E1_RUN); /* start E1 processor */
243 /* the interrupts are still masked */ 242 /* the interrupts are still masked */
244 243
245 sti();
246 msleep_interruptible(20); /* Timeout 20ms */ 244 msleep_interruptible(20); /* Timeout 20ms */
247 245
248 if (((tDpramBootSpooler *) card->dpram)->Len != DPRAM_SPOOLER_DATA_SIZE) { 246 if (((tDpramBootSpooler *) card->dpram)->Len != DPRAM_SPOOLER_DATA_SIZE) {
@@ -276,7 +274,6 @@ ergo_writebootseq(struct HYSDN_CARD *card, unsigned char *buf, int len)
276 dst = sp->Data; /* point to data in spool structure */ 274 dst = sp->Data; /* point to data in spool structure */
277 buflen = sp->Len; /* maximum len of spooled data */ 275 buflen = sp->Len; /* maximum len of spooled data */
278 wr_mirror = sp->WrPtr; /* only once read */ 276 wr_mirror = sp->WrPtr; /* only once read */
279 sti();
280 277
281 /* try until all bytes written or error */ 278 /* try until all bytes written or error */
282 i = 0x1000; /* timeout value */ 279 i = 0x1000; /* timeout value */
@@ -380,7 +377,6 @@ ergo_waitpofready(struct HYSDN_CARD *card)
380#endif /* CONFIG_HYSDN_CAPI */ 377#endif /* CONFIG_HYSDN_CAPI */
381 return (0); /* success */ 378 return (0); /* success */
382 } /* data has arrived */ 379 } /* data has arrived */
383 sti();
384 msleep_interruptible(50); /* Timeout 50ms */ 380 msleep_interruptible(50); /* Timeout 50ms */
385 } /* wait until timeout */ 381 } /* wait until timeout */
386 382
diff --git a/drivers/isdn/hysdn/hycapi.c b/drivers/isdn/hysdn/hycapi.c
index d3999a8e9f88..53f6ad1235db 100644
--- a/drivers/isdn/hysdn/hycapi.c
+++ b/drivers/isdn/hysdn/hycapi.c
@@ -462,11 +462,11 @@ static int hycapi_read_proc(char *page, char **start, off_t off,
462 default: s = "???"; break; 462 default: s = "???"; break;
463 } 463 }
464 len += sprintf(page+len, "%-16s %s\n", "type", s); 464 len += sprintf(page+len, "%-16s %s\n", "type", s);
465 if ((s = cinfo->version[VER_DRIVER]) != 0) 465 if ((s = cinfo->version[VER_DRIVER]) != NULL)
466 len += sprintf(page+len, "%-16s %s\n", "ver_driver", s); 466 len += sprintf(page+len, "%-16s %s\n", "ver_driver", s);
467 if ((s = cinfo->version[VER_CARDTYPE]) != 0) 467 if ((s = cinfo->version[VER_CARDTYPE]) != NULL)
468 len += sprintf(page+len, "%-16s %s\n", "ver_cardtype", s); 468 len += sprintf(page+len, "%-16s %s\n", "ver_cardtype", s);
469 if ((s = cinfo->version[VER_SERIAL]) != 0) 469 if ((s = cinfo->version[VER_SERIAL]) != NULL)
470 len += sprintf(page+len, "%-16s %s\n", "ver_serial", s); 470 len += sprintf(page+len, "%-16s %s\n", "ver_serial", s);
471 471
472 len += sprintf(page+len, "%-16s %s\n", "cardname", cinfo->cardname); 472 len += sprintf(page+len, "%-16s %s\n", "cardname", cinfo->cardname);
diff --git a/drivers/isdn/hysdn/hysdn_procconf.c b/drivers/isdn/hysdn/hysdn_procconf.c
index 15906d005b05..484299b031f8 100644
--- a/drivers/isdn/hysdn/hysdn_procconf.c
+++ b/drivers/isdn/hysdn/hysdn_procconf.c
@@ -207,30 +207,17 @@ hysdn_conf_write(struct file *file, const char __user *buf, size_t count, loff_t
207/* read conf file -> output card info data */ 207/* read conf file -> output card info data */
208/*******************************************/ 208/*******************************************/
209static ssize_t 209static ssize_t
210hysdn_conf_read(struct file *file, char __user *buf, size_t count, loff_t * off) 210hysdn_conf_read(struct file *file, char __user *buf, size_t count, loff_t *off)
211{ 211{
212 char *cp; 212 char *cp;
213 int i;
214 213
215 if (file->f_mode & FMODE_READ) { 214 if (!(file->f_mode & FMODE_READ))
216 if (!(cp = file->private_data)) 215 return -EPERM; /* no permission to read */
217 return (-EFAULT); /* should never happen */ 216
218 i = strlen(cp); /* get total string length */ 217 if (!(cp = file->private_data))
219 if (*off < i) { 218 return -EFAULT; /* should never happen */
220 /* still bytes to transfer */ 219
221 cp += *off; /* point to desired data offset */ 220 return simple_read_from_buffer(buf, count, off, cp, strlen(cp));
222 i -= *off; /* remaining length */
223 if (i > count)
224 i = count; /* limit length to transfer */
225 if (copy_to_user(buf, cp, i))
226 return (-EFAULT); /* copy error */
227 *off += i; /* adjust offset */
228 } else
229 return (0);
230 } else
231 return (-EPERM); /* no permission to read */
232
233 return (i);
234} /* hysdn_conf_read */ 221} /* hysdn_conf_read */
235 222
236/******************/ 223/******************/
diff --git a/drivers/isdn/sc/ioctl.c b/drivers/isdn/sc/ioctl.c
index 7817d2244921..1081091bbfaf 100644
--- a/drivers/isdn/sc/ioctl.c
+++ b/drivers/isdn/sc/ioctl.c
@@ -226,6 +226,7 @@ int sc_ioctl(int card, scs_ioctl *data)
226 */ 226 */
227 if (copy_from_user(spid, data->dataptr, SCIOC_SPIDSIZE)) { 227 if (copy_from_user(spid, data->dataptr, SCIOC_SPIDSIZE)) {
228 kfree(rcvmsg); 228 kfree(rcvmsg);
229 kfree(spid);
229 return -EFAULT; 230 return -EFAULT;
230 } 231 }
231 232
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index b3c54be74556..559a40861c39 100644
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -103,13 +103,11 @@ int led_classdev_register(struct device *parent, struct led_classdev *led_cdev)
103{ 103{
104 int rc; 104 int rc;
105 105
106 led_cdev->dev = device_create(leds_class, parent, 0, "%s", 106 led_cdev->dev = device_create_drvdata(leds_class, parent, 0, led_cdev,
107 led_cdev->name); 107 "%s", led_cdev->name);
108 if (IS_ERR(led_cdev->dev)) 108 if (IS_ERR(led_cdev->dev))
109 return PTR_ERR(led_cdev->dev); 109 return PTR_ERR(led_cdev->dev);
110 110
111 dev_set_drvdata(led_cdev->dev, led_cdev);
112
113 /* register the attributes */ 111 /* register the attributes */
114 rc = device_create_file(led_cdev->dev, &dev_attr_brightness); 112 rc = device_create_file(led_cdev->dev, &dev_attr_brightness);
115 if (rc) 113 if (rc)
diff --git a/drivers/lguest/lg.h b/drivers/lguest/lg.h
index 005bd045d2eb..5faefeaf6790 100644
--- a/drivers/lguest/lg.h
+++ b/drivers/lguest/lg.h
@@ -136,7 +136,6 @@ int run_guest(struct lg_cpu *cpu, unsigned long __user *user);
136 * first step in the migration to the kernel types. pte_pfn is already defined 136 * first step in the migration to the kernel types. pte_pfn is already defined
137 * in the kernel. */ 137 * in the kernel. */
138#define pgd_flags(x) (pgd_val(x) & ~PAGE_MASK) 138#define pgd_flags(x) (pgd_val(x) & ~PAGE_MASK)
139#define pte_flags(x) (pte_val(x) & ~PAGE_MASK)
140#define pgd_pfn(x) (pgd_val(x) >> PAGE_SHIFT) 139#define pgd_pfn(x) (pgd_val(x) >> PAGE_SHIFT)
141 140
142/* interrupts_and_traps.c: */ 141/* interrupts_and_traps.c: */
diff --git a/drivers/lguest/lguest_device.c b/drivers/lguest/lguest_device.c
index 8080249957af..1a8de57289eb 100644
--- a/drivers/lguest/lguest_device.c
+++ b/drivers/lguest/lguest_device.c
@@ -20,14 +20,11 @@
20/* The pointer to our (page) of device descriptions. */ 20/* The pointer to our (page) of device descriptions. */
21static void *lguest_devices; 21static void *lguest_devices;
22 22
23/* Unique numbering for lguest devices. */
24static unsigned int dev_index;
25
26/* For Guests, device memory can be used as normal memory, so we cast away the 23/* For Guests, device memory can be used as normal memory, so we cast away the
27 * __iomem to quieten sparse. */ 24 * __iomem to quieten sparse. */
28static inline void *lguest_map(unsigned long phys_addr, unsigned long pages) 25static inline void *lguest_map(unsigned long phys_addr, unsigned long pages)
29{ 26{
30 return (__force void *)ioremap(phys_addr, PAGE_SIZE*pages); 27 return (__force void *)ioremap_cache(phys_addr, PAGE_SIZE*pages);
31} 28}
32 29
33static inline void lguest_unmap(void *addr) 30static inline void lguest_unmap(void *addr)
@@ -325,8 +322,10 @@ static struct device lguest_root = {
325 * As Andrew Tridgell says, "Untested code is buggy code". 322 * As Andrew Tridgell says, "Untested code is buggy code".
326 * 323 *
327 * It's worth reading this carefully: we start with a pointer to the new device 324 * It's worth reading this carefully: we start with a pointer to the new device
328 * descriptor in the "lguest_devices" page. */ 325 * descriptor in the "lguest_devices" page, and the offset into the device
329static void add_lguest_device(struct lguest_device_desc *d) 326 * descriptor page so we can uniquely identify it if things go badly wrong. */
327static void add_lguest_device(struct lguest_device_desc *d,
328 unsigned int offset)
330{ 329{
331 struct lguest_device *ldev; 330 struct lguest_device *ldev;
332 331
@@ -334,18 +333,14 @@ static void add_lguest_device(struct lguest_device_desc *d)
334 * it. */ 333 * it. */
335 ldev = kzalloc(sizeof(*ldev), GFP_KERNEL); 334 ldev = kzalloc(sizeof(*ldev), GFP_KERNEL);
336 if (!ldev) { 335 if (!ldev) {
337 printk(KERN_EMERG "Cannot allocate lguest dev %u\n", 336 printk(KERN_EMERG "Cannot allocate lguest dev %u type %u\n",
338 dev_index++); 337 offset, d->type);
339 return; 338 return;
340 } 339 }
341 340
342 /* This devices' parent is the lguest/ dir. */ 341 /* This devices' parent is the lguest/ dir. */
343 ldev->vdev.dev.parent = &lguest_root; 342 ldev->vdev.dev.parent = &lguest_root;
344 /* We have a unique device index thanks to the dev_index counter. */ 343 /* We have a unique device index thanks to the dev_index counter. */
345 ldev->vdev.index = dev_index++;
346 /* The device type comes straight from the descriptor. There's also a
347 * device vendor field in the virtio_device struct, which we leave as
348 * 0. */
349 ldev->vdev.id.device = d->type; 344 ldev->vdev.id.device = d->type;
350 /* We have a simple set of routines for querying the device's 345 /* We have a simple set of routines for querying the device's
351 * configuration information and setting its status. */ 346 * configuration information and setting its status. */
@@ -357,8 +352,8 @@ static void add_lguest_device(struct lguest_device_desc *d)
357 * virtio_device and calls device_register(). This makes the bus 352 * virtio_device and calls device_register(). This makes the bus
358 * infrastructure look for a matching driver. */ 353 * infrastructure look for a matching driver. */
359 if (register_virtio_device(&ldev->vdev) != 0) { 354 if (register_virtio_device(&ldev->vdev) != 0) {
360 printk(KERN_ERR "Failed to register lguest device %u\n", 355 printk(KERN_ERR "Failed to register lguest dev %u type %u\n",
361 ldev->vdev.index); 356 offset, d->type);
362 kfree(ldev); 357 kfree(ldev);
363 } 358 }
364} 359}
@@ -379,7 +374,7 @@ static void scan_devices(void)
379 break; 374 break;
380 375
381 printk("Device at %i has size %u\n", i, desc_size(d)); 376 printk("Device at %i has size %u\n", i, desc_size(d));
382 add_lguest_device(d); 377 add_lguest_device(d, i);
383 } 378 }
384} 379}
385 380
diff --git a/drivers/lguest/x86/core.c b/drivers/lguest/x86/core.c
index 5126d5d9ea0e..2e554a4ab337 100644
--- a/drivers/lguest/x86/core.c
+++ b/drivers/lguest/x86/core.c
@@ -176,7 +176,7 @@ void lguest_arch_run_guest(struct lg_cpu *cpu)
176 * we set it now, so we can trap and pass that trap to the Guest if it 176 * we set it now, so we can trap and pass that trap to the Guest if it
177 * uses the FPU. */ 177 * uses the FPU. */
178 if (cpu->ts) 178 if (cpu->ts)
179 lguest_set_ts(); 179 unlazy_fpu(current);
180 180
181 /* SYSENTER is an optimized way of doing system calls. We can't allow 181 /* SYSENTER is an optimized way of doing system calls. We can't allow
182 * it because it always jumps to privilege level 0. A normal Guest 182 * it because it always jumps to privilege level 0. A normal Guest
@@ -196,6 +196,10 @@ void lguest_arch_run_guest(struct lg_cpu *cpu)
196 * trap made the switcher code come back, and an error code which some 196 * trap made the switcher code come back, and an error code which some
197 * traps set. */ 197 * traps set. */
198 198
199 /* Restore SYSENTER if it's supposed to be on. */
200 if (boot_cpu_has(X86_FEATURE_SEP))
201 wrmsr(MSR_IA32_SYSENTER_CS, __KERNEL_CS, 0);
202
199 /* If the Guest page faulted, then the cr2 register will tell us the 203 /* If the Guest page faulted, then the cr2 register will tell us the
200 * bad virtual address. We have to grab this now, because once we 204 * bad virtual address. We have to grab this now, because once we
201 * re-enable interrupts an interrupt could fault and thus overwrite 205 * re-enable interrupts an interrupt could fault and thus overwrite
@@ -203,13 +207,12 @@ void lguest_arch_run_guest(struct lg_cpu *cpu)
203 if (cpu->regs->trapnum == 14) 207 if (cpu->regs->trapnum == 14)
204 cpu->arch.last_pagefault = read_cr2(); 208 cpu->arch.last_pagefault = read_cr2();
205 /* Similarly, if we took a trap because the Guest used the FPU, 209 /* Similarly, if we took a trap because the Guest used the FPU,
206 * we have to restore the FPU it expects to see. */ 210 * we have to restore the FPU it expects to see.
211 * math_state_restore() may sleep and we may even move off to
212 * a different CPU. So all the critical stuff should be done
213 * before this. */
207 else if (cpu->regs->trapnum == 7) 214 else if (cpu->regs->trapnum == 7)
208 math_state_restore(); 215 math_state_restore();
209
210 /* Restore SYSENTER if it's supposed to be on. */
211 if (boot_cpu_has(X86_FEATURE_SEP))
212 wrmsr(MSR_IA32_SYSENTER_CS, __KERNEL_CS, 0);
213} 216}
214 217
215/*H:130 Now we've examined the hypercall code; our Guest can make requests. 218/*H:130 Now we've examined the hypercall code; our Guest can make requests.
diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c
index 82add26cc665..818aba368541 100644
--- a/drivers/macintosh/mediabay.c
+++ b/drivers/macintosh/mediabay.c
@@ -84,7 +84,7 @@ struct media_bay_info {
84 int cd_irq; 84 int cd_irq;
85 int cd_retry; 85 int cd_retry;
86#endif 86#endif
87#if defined(CONFIG_BLK_DEV_IDE_PMAC) || defined(CONFIG_MAC_FLOPPY) 87#if defined(CONFIG_BLK_DEV_IDE_PMAC)
88 int cd_index; 88 int cd_index;
89#endif 89#endif
90}; 90};
@@ -417,6 +417,7 @@ static void poll_media_bay(struct media_bay_info* bay)
417 } 417 }
418} 418}
419 419
420#ifdef CONFIG_BLK_DEV_IDE_PMAC
420int check_media_bay(struct device_node *which_bay, int what) 421int check_media_bay(struct device_node *which_bay, int what)
421{ 422{
422 int i; 423 int i;
@@ -432,7 +433,6 @@ int check_media_bay(struct device_node *which_bay, int what)
432} 433}
433EXPORT_SYMBOL(check_media_bay); 434EXPORT_SYMBOL(check_media_bay);
434 435
435#ifdef CONFIG_BLK_DEV_IDE_PMAC
436int check_media_bay_by_base(unsigned long base, int what) 436int check_media_bay_by_base(unsigned long base, int what)
437{ 437{
438 int i; 438 int i;
@@ -556,7 +556,8 @@ static void media_bay_step(int i)
556 printk("mediabay %d, registering IDE...\n", i); 556 printk("mediabay %d, registering IDE...\n", i);
557 pmu_suspend(); 557 pmu_suspend();
558 ide_port_scan(bay->cd_port); 558 ide_port_scan(bay->cd_port);
559 bay->cd_index = bay->cd_port->index; 559 if (bay->cd_port->present)
560 bay->cd_index = bay->cd_port->index;
560 pmu_resume(); 561 pmu_resume();
561 } 562 }
562 if (bay->cd_index == -1) { 563 if (bay->cd_index == -1) {
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index 77ad192962c5..d86d57af282a 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -483,12 +483,15 @@ int __init smu_init (void)
483 483
484 if (smu_cmdbuf_abs == 0) { 484 if (smu_cmdbuf_abs == 0) {
485 printk(KERN_ERR "SMU: Command buffer not allocated !\n"); 485 printk(KERN_ERR "SMU: Command buffer not allocated !\n");
486 of_node_put(np);
486 return -EINVAL; 487 return -EINVAL;
487 } 488 }
488 489
489 smu = alloc_bootmem(sizeof(struct smu_device)); 490 smu = alloc_bootmem(sizeof(struct smu_device));
490 if (smu == NULL) 491 if (smu == NULL) {
492 of_node_put(np);
491 return -ENOMEM; 493 return -ENOMEM;
494 }
492 memset(smu, 0, sizeof(*smu)); 495 memset(smu, 0, sizeof(*smu));
493 496
494 spin_lock_init(&smu->lock); 497 spin_lock_init(&smu->lock);
diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c
index 54f4942a2968..5366dc93fb38 100644
--- a/drivers/macintosh/therm_adt746x.c
+++ b/drivers/macintosh/therm_adt746x.c
@@ -562,18 +562,24 @@ thermostat_init(void)
562 therm_type = ADT7460; 562 therm_type = ADT7460;
563 else if (of_device_is_compatible(np, "adt7467")) 563 else if (of_device_is_compatible(np, "adt7467"))
564 therm_type = ADT7467; 564 therm_type = ADT7467;
565 else 565 else {
566 of_node_put(np);
566 return -ENODEV; 567 return -ENODEV;
568 }
567 569
568 prop = of_get_property(np, "hwsensor-params-version", NULL); 570 prop = of_get_property(np, "hwsensor-params-version", NULL);
569 printk(KERN_INFO "adt746x: version %d (%ssupported)\n", *prop, 571 printk(KERN_INFO "adt746x: version %d (%ssupported)\n", *prop,
570 (*prop == 1)?"":"un"); 572 (*prop == 1)?"":"un");
571 if (*prop != 1) 573 if (*prop != 1) {
574 of_node_put(np);
572 return -ENODEV; 575 return -ENODEV;
576 }
573 577
574 prop = of_get_property(np, "reg", NULL); 578 prop = of_get_property(np, "reg", NULL);
575 if (!prop) 579 if (!prop) {
580 of_node_put(np);
576 return -ENODEV; 581 return -ENODEV;
582 }
577 583
578 /* look for bus either by path or using "reg" */ 584 /* look for bus either by path or using "reg" */
579 if (strstr(np->full_name, "/i2c-bus@") != NULL) { 585 if (strstr(np->full_name, "/i2c-bus@") != NULL) {
@@ -610,6 +616,7 @@ thermostat_init(void)
610 616
611 if (of_dev == NULL) { 617 if (of_dev == NULL) {
612 printk(KERN_ERR "Can't register temperatures device !\n"); 618 printk(KERN_ERR "Can't register temperatures device !\n");
619 of_node_put(np);
613 return -ENODEV; 620 return -ENODEV;
614 } 621 }
615 622
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index c14dacdacfac..b26927ce889c 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -203,17 +203,6 @@ static void bitmap_checkfree(struct bitmap *bitmap, unsigned long page)
203 * bitmap file handling - read and write the bitmap file and its superblock 203 * bitmap file handling - read and write the bitmap file and its superblock
204 */ 204 */
205 205
206/* copy the pathname of a file to a buffer */
207char *file_path(struct file *file, char *buf, int count)
208{
209 if (!buf)
210 return NULL;
211
212 buf = d_path(&file->f_path, buf, count);
213
214 return IS_ERR(buf) ? NULL : buf;
215}
216
217/* 206/*
218 * basic page I/O operations 207 * basic page I/O operations
219 */ 208 */
@@ -721,11 +710,13 @@ static void bitmap_file_kick(struct bitmap *bitmap)
721 if (bitmap->file) { 710 if (bitmap->file) {
722 path = kmalloc(PAGE_SIZE, GFP_KERNEL); 711 path = kmalloc(PAGE_SIZE, GFP_KERNEL);
723 if (path) 712 if (path)
724 ptr = file_path(bitmap->file, path, PAGE_SIZE); 713 ptr = d_path(&bitmap->file->f_path, path,
714 PAGE_SIZE);
715
725 716
726 printk(KERN_ALERT 717 printk(KERN_ALERT
727 "%s: kicking failed bitmap file %s from array!\n", 718 "%s: kicking failed bitmap file %s from array!\n",
728 bmname(bitmap), ptr ? ptr : ""); 719 bmname(bitmap), IS_ERR(ptr) ? "" : ptr);
729 720
730 kfree(path); 721 kfree(path);
731 } else 722 } else
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index 835def11419d..ab6a61db63ce 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -432,6 +432,7 @@ static int crypt_convert(struct crypt_config *cc,
432 case 0: 432 case 0:
433 atomic_dec(&ctx->pending); 433 atomic_dec(&ctx->pending);
434 ctx->sector++; 434 ctx->sector++;
435 cond_resched();
435 continue; 436 continue;
436 437
437 /* error */ 438 /* error */
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 83eb78b00137..2580ac1b9b0f 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -74,6 +74,8 @@ static DEFINE_SPINLOCK(pers_lock);
74 74
75static void md_print_devices(void); 75static void md_print_devices(void);
76 76
77static DECLARE_WAIT_QUEUE_HEAD(resync_wait);
78
77#define MD_BUG(x...) { printk("md: bug in file %s, line %d\n", __FILE__, __LINE__); md_print_devices(); } 79#define MD_BUG(x...) { printk("md: bug in file %s, line %d\n", __FILE__, __LINE__); md_print_devices(); }
78 80
79/* 81/*
@@ -274,6 +276,7 @@ static mddev_t * mddev_find(dev_t unit)
274 atomic_set(&new->active, 1); 276 atomic_set(&new->active, 1);
275 spin_lock_init(&new->write_lock); 277 spin_lock_init(&new->write_lock);
276 init_waitqueue_head(&new->sb_wait); 278 init_waitqueue_head(&new->sb_wait);
279 init_waitqueue_head(&new->recovery_wait);
277 new->reshape_position = MaxSector; 280 new->reshape_position = MaxSector;
278 new->resync_max = MaxSector; 281 new->resync_max = MaxSector;
279 new->level = LEVEL_NONE; 282 new->level = LEVEL_NONE;
@@ -3013,6 +3016,36 @@ degraded_show(mddev_t *mddev, char *page)
3013static struct md_sysfs_entry md_degraded = __ATTR_RO(degraded); 3016static struct md_sysfs_entry md_degraded = __ATTR_RO(degraded);
3014 3017
3015static ssize_t 3018static ssize_t
3019sync_force_parallel_show(mddev_t *mddev, char *page)
3020{
3021 return sprintf(page, "%d\n", mddev->parallel_resync);
3022}
3023
3024static ssize_t
3025sync_force_parallel_store(mddev_t *mddev, const char *buf, size_t len)
3026{
3027 long n;
3028
3029 if (strict_strtol(buf, 10, &n))
3030 return -EINVAL;
3031
3032 if (n != 0 && n != 1)
3033 return -EINVAL;
3034
3035 mddev->parallel_resync = n;
3036
3037 if (mddev->sync_thread)
3038 wake_up(&resync_wait);
3039
3040 return len;
3041}
3042
3043/* force parallel resync, even with shared block devices */
3044static struct md_sysfs_entry md_sync_force_parallel =
3045__ATTR(sync_force_parallel, S_IRUGO|S_IWUSR,
3046 sync_force_parallel_show, sync_force_parallel_store);
3047
3048static ssize_t
3016sync_speed_show(mddev_t *mddev, char *page) 3049sync_speed_show(mddev_t *mddev, char *page)
3017{ 3050{
3018 unsigned long resync, dt, db; 3051 unsigned long resync, dt, db;
@@ -3187,6 +3220,7 @@ static struct attribute *md_redundancy_attrs[] = {
3187 &md_sync_min.attr, 3220 &md_sync_min.attr,
3188 &md_sync_max.attr, 3221 &md_sync_max.attr,
3189 &md_sync_speed.attr, 3222 &md_sync_speed.attr,
3223 &md_sync_force_parallel.attr,
3190 &md_sync_completed.attr, 3224 &md_sync_completed.attr,
3191 &md_max_sync.attr, 3225 &md_max_sync.attr,
3192 &md_suspend_lo.attr, 3226 &md_suspend_lo.attr,
@@ -3691,6 +3725,8 @@ static int do_md_stop(mddev_t * mddev, int mode)
3691 3725
3692 module_put(mddev->pers->owner); 3726 module_put(mddev->pers->owner);
3693 mddev->pers = NULL; 3727 mddev->pers = NULL;
3728 /* tell userspace to handle 'inactive' */
3729 sysfs_notify(&mddev->kobj, NULL, "array_state");
3694 3730
3695 set_capacity(disk, 0); 3731 set_capacity(disk, 0);
3696 mddev->changed = 1; 3732 mddev->changed = 1;
@@ -3861,8 +3897,10 @@ static void autorun_devices(int part)
3861 3897
3862 md_probe(dev, NULL, NULL); 3898 md_probe(dev, NULL, NULL);
3863 mddev = mddev_find(dev); 3899 mddev = mddev_find(dev);
3864 if (!mddev) { 3900 if (!mddev || !mddev->gendisk) {
3865 printk(KERN_ERR 3901 if (mddev)
3902 mddev_put(mddev);
3903 printk(KERN_ERR
3866 "md: cannot allocate memory for md drive.\n"); 3904 "md: cannot allocate memory for md drive.\n");
3867 break; 3905 break;
3868 } 3906 }
@@ -3987,8 +4025,8 @@ static int get_bitmap_file(mddev_t * mddev, void __user * arg)
3987 if (!buf) 4025 if (!buf)
3988 goto out; 4026 goto out;
3989 4027
3990 ptr = file_path(mddev->bitmap->file, buf, sizeof(file->pathname)); 4028 ptr = d_path(&mddev->bitmap->file->f_path, buf, sizeof(file->pathname));
3991 if (!ptr) 4029 if (IS_ERR(ptr))
3992 goto out; 4030 goto out;
3993 4031
3994 strcpy(file->pathname, ptr); 4032 strcpy(file->pathname, ptr);
@@ -5399,7 +5437,7 @@ void md_done_sync(mddev_t *mddev, int blocks, int ok)
5399 atomic_sub(blocks, &mddev->recovery_active); 5437 atomic_sub(blocks, &mddev->recovery_active);
5400 wake_up(&mddev->recovery_wait); 5438 wake_up(&mddev->recovery_wait);
5401 if (!ok) { 5439 if (!ok) {
5402 set_bit(MD_RECOVERY_ERR, &mddev->recovery); 5440 set_bit(MD_RECOVERY_INTR, &mddev->recovery);
5403 md_wakeup_thread(mddev->thread); 5441 md_wakeup_thread(mddev->thread);
5404 // stop recovery, signal do_sync .... 5442 // stop recovery, signal do_sync ....
5405 } 5443 }
@@ -5435,8 +5473,11 @@ void md_write_start(mddev_t *mddev, struct bio *bi)
5435 md_wakeup_thread(mddev->thread); 5473 md_wakeup_thread(mddev->thread);
5436 } 5474 }
5437 spin_unlock_irq(&mddev->write_lock); 5475 spin_unlock_irq(&mddev->write_lock);
5476 sysfs_notify(&mddev->kobj, NULL, "array_state");
5438 } 5477 }
5439 wait_event(mddev->sb_wait, mddev->flags==0); 5478 wait_event(mddev->sb_wait,
5479 !test_bit(MD_CHANGE_CLEAN, &mddev->flags) &&
5480 !test_bit(MD_CHANGE_PENDING, &mddev->flags));
5440} 5481}
5441 5482
5442void md_write_end(mddev_t *mddev) 5483void md_write_end(mddev_t *mddev)
@@ -5471,13 +5512,17 @@ void md_allow_write(mddev_t *mddev)
5471 mddev->safemode = 1; 5512 mddev->safemode = 1;
5472 spin_unlock_irq(&mddev->write_lock); 5513 spin_unlock_irq(&mddev->write_lock);
5473 md_update_sb(mddev, 0); 5514 md_update_sb(mddev, 0);
5515
5516 sysfs_notify(&mddev->kobj, NULL, "array_state");
5517 /* wait for the dirty state to be recorded in the metadata */
5518 wait_event(mddev->sb_wait,
5519 !test_bit(MD_CHANGE_CLEAN, &mddev->flags) &&
5520 !test_bit(MD_CHANGE_PENDING, &mddev->flags));
5474 } else 5521 } else
5475 spin_unlock_irq(&mddev->write_lock); 5522 spin_unlock_irq(&mddev->write_lock);
5476} 5523}
5477EXPORT_SYMBOL_GPL(md_allow_write); 5524EXPORT_SYMBOL_GPL(md_allow_write);
5478 5525
5479static DECLARE_WAIT_QUEUE_HEAD(resync_wait);
5480
5481#define SYNC_MARKS 10 5526#define SYNC_MARKS 10
5482#define SYNC_MARK_STEP (3*HZ) 5527#define SYNC_MARK_STEP (3*HZ)
5483void md_do_sync(mddev_t *mddev) 5528void md_do_sync(mddev_t *mddev)
@@ -5541,8 +5586,9 @@ void md_do_sync(mddev_t *mddev)
5541 for_each_mddev(mddev2, tmp) { 5586 for_each_mddev(mddev2, tmp) {
5542 if (mddev2 == mddev) 5587 if (mddev2 == mddev)
5543 continue; 5588 continue;
5544 if (mddev2->curr_resync && 5589 if (!mddev->parallel_resync
5545 match_mddev_units(mddev,mddev2)) { 5590 && mddev2->curr_resync
5591 && match_mddev_units(mddev, mddev2)) {
5546 DEFINE_WAIT(wq); 5592 DEFINE_WAIT(wq);
5547 if (mddev < mddev2 && mddev->curr_resync == 2) { 5593 if (mddev < mddev2 && mddev->curr_resync == 2) {
5548 /* arbitrarily yield */ 5594 /* arbitrarily yield */
@@ -5622,7 +5668,6 @@ void md_do_sync(mddev_t *mddev)
5622 window/2,(unsigned long long) max_sectors/2); 5668 window/2,(unsigned long long) max_sectors/2);
5623 5669
5624 atomic_set(&mddev->recovery_active, 0); 5670 atomic_set(&mddev->recovery_active, 0);
5625 init_waitqueue_head(&mddev->recovery_wait);
5626 last_check = 0; 5671 last_check = 0;
5627 5672
5628 if (j>2) { 5673 if (j>2) {
@@ -5647,7 +5692,7 @@ void md_do_sync(mddev_t *mddev)
5647 sectors = mddev->pers->sync_request(mddev, j, &skipped, 5692 sectors = mddev->pers->sync_request(mddev, j, &skipped,
5648 currspeed < speed_min(mddev)); 5693 currspeed < speed_min(mddev));
5649 if (sectors == 0) { 5694 if (sectors == 0) {
5650 set_bit(MD_RECOVERY_ERR, &mddev->recovery); 5695 set_bit(MD_RECOVERY_INTR, &mddev->recovery);
5651 goto out; 5696 goto out;
5652 } 5697 }
5653 5698
@@ -5670,8 +5715,7 @@ void md_do_sync(mddev_t *mddev)
5670 5715
5671 last_check = io_sectors; 5716 last_check = io_sectors;
5672 5717
5673 if (test_bit(MD_RECOVERY_INTR, &mddev->recovery) || 5718 if (test_bit(MD_RECOVERY_INTR, &mddev->recovery))
5674 test_bit(MD_RECOVERY_ERR, &mddev->recovery))
5675 break; 5719 break;
5676 5720
5677 repeat: 5721 repeat:
@@ -5725,8 +5769,7 @@ void md_do_sync(mddev_t *mddev)
5725 /* tell personality that we are finished */ 5769 /* tell personality that we are finished */
5726 mddev->pers->sync_request(mddev, max_sectors, &skipped, 1); 5770 mddev->pers->sync_request(mddev, max_sectors, &skipped, 1);
5727 5771
5728 if (!test_bit(MD_RECOVERY_ERR, &mddev->recovery) && 5772 if (!test_bit(MD_RECOVERY_CHECK, &mddev->recovery) &&
5729 !test_bit(MD_RECOVERY_CHECK, &mddev->recovery) &&
5730 mddev->curr_resync > 2) { 5773 mddev->curr_resync > 2) {
5731 if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { 5774 if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) {
5732 if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { 5775 if (test_bit(MD_RECOVERY_INTR, &mddev->recovery)) {
@@ -5795,7 +5838,10 @@ static int remove_and_add_spares(mddev_t *mddev)
5795 } 5838 }
5796 5839
5797 if (mddev->degraded) { 5840 if (mddev->degraded) {
5798 rdev_for_each(rdev, rtmp, mddev) 5841 rdev_for_each(rdev, rtmp, mddev) {
5842 if (rdev->raid_disk >= 0 &&
5843 !test_bit(In_sync, &rdev->flags))
5844 spares++;
5799 if (rdev->raid_disk < 0 5845 if (rdev->raid_disk < 0
5800 && !test_bit(Faulty, &rdev->flags)) { 5846 && !test_bit(Faulty, &rdev->flags)) {
5801 rdev->recovery_offset = 0; 5847 rdev->recovery_offset = 0;
@@ -5813,6 +5859,7 @@ static int remove_and_add_spares(mddev_t *mddev)
5813 } else 5859 } else
5814 break; 5860 break;
5815 } 5861 }
5862 }
5816 } 5863 }
5817 return spares; 5864 return spares;
5818} 5865}
@@ -5826,7 +5873,7 @@ static int remove_and_add_spares(mddev_t *mddev)
5826 * to do that as needed. 5873 * to do that as needed.
5827 * When it is determined that resync is needed, we set MD_RECOVERY_RUNNING in 5874 * When it is determined that resync is needed, we set MD_RECOVERY_RUNNING in
5828 * "->recovery" and create a thread at ->sync_thread. 5875 * "->recovery" and create a thread at ->sync_thread.
5829 * When the thread finishes it sets MD_RECOVERY_DONE (and might set MD_RECOVERY_ERR) 5876 * When the thread finishes it sets MD_RECOVERY_DONE
5830 * and wakeups up this thread which will reap the thread and finish up. 5877 * and wakeups up this thread which will reap the thread and finish up.
5831 * This thread also removes any faulty devices (with nr_pending == 0). 5878 * This thread also removes any faulty devices (with nr_pending == 0).
5832 * 5879 *
@@ -5901,8 +5948,7 @@ void md_check_recovery(mddev_t *mddev)
5901 /* resync has finished, collect result */ 5948 /* resync has finished, collect result */
5902 md_unregister_thread(mddev->sync_thread); 5949 md_unregister_thread(mddev->sync_thread);
5903 mddev->sync_thread = NULL; 5950 mddev->sync_thread = NULL;
5904 if (!test_bit(MD_RECOVERY_ERR, &mddev->recovery) && 5951 if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) {
5905 !test_bit(MD_RECOVERY_INTR, &mddev->recovery)) {
5906 /* success...*/ 5952 /* success...*/
5907 /* activate any spares */ 5953 /* activate any spares */
5908 mddev->pers->spare_active(mddev); 5954 mddev->pers->spare_active(mddev);
@@ -5926,7 +5972,6 @@ void md_check_recovery(mddev_t *mddev)
5926 * might be left set 5972 * might be left set
5927 */ 5973 */
5928 clear_bit(MD_RECOVERY_NEEDED, &mddev->recovery); 5974 clear_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
5929 clear_bit(MD_RECOVERY_ERR, &mddev->recovery);
5930 clear_bit(MD_RECOVERY_INTR, &mddev->recovery); 5975 clear_bit(MD_RECOVERY_INTR, &mddev->recovery);
5931 clear_bit(MD_RECOVERY_DONE, &mddev->recovery); 5976 clear_bit(MD_RECOVERY_DONE, &mddev->recovery);
5932 5977
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c
index 4f4d1f383842..e968116e0de9 100644
--- a/drivers/md/multipath.c
+++ b/drivers/md/multipath.c
@@ -327,7 +327,8 @@ static int multipath_remove_disk(mddev_t *mddev, int number)
327 if (rdev) { 327 if (rdev) {
328 if (test_bit(In_sync, &rdev->flags) || 328 if (test_bit(In_sync, &rdev->flags) ||
329 atomic_read(&rdev->nr_pending)) { 329 atomic_read(&rdev->nr_pending)) {
330 printk(KERN_ERR "hot-remove-disk, slot %d is identified" " but is still operational!\n", number); 330 printk(KERN_ERR "hot-remove-disk, slot %d is identified"
331 " but is still operational!\n", number);
331 err = -EBUSY; 332 err = -EBUSY;
332 goto abort; 333 goto abort;
333 } 334 }
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index ac409b7d83f5..c610b947218a 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -773,7 +773,7 @@ static int make_request(struct request_queue *q, struct bio * bio)
773 r1bio_t *r1_bio; 773 r1bio_t *r1_bio;
774 struct bio *read_bio; 774 struct bio *read_bio;
775 int i, targets = 0, disks; 775 int i, targets = 0, disks;
776 struct bitmap *bitmap = mddev->bitmap; 776 struct bitmap *bitmap;
777 unsigned long flags; 777 unsigned long flags;
778 struct bio_list bl; 778 struct bio_list bl;
779 struct page **behind_pages = NULL; 779 struct page **behind_pages = NULL;
@@ -802,6 +802,8 @@ static int make_request(struct request_queue *q, struct bio * bio)
802 802
803 wait_barrier(conf); 803 wait_barrier(conf);
804 804
805 bitmap = mddev->bitmap;
806
805 disk_stat_inc(mddev->gendisk, ios[rw]); 807 disk_stat_inc(mddev->gendisk, ios[rw]);
806 disk_stat_add(mddev->gendisk, sectors[rw], bio_sectors(bio)); 808 disk_stat_add(mddev->gendisk, sectors[rw], bio_sectors(bio));
807 809
@@ -1025,7 +1027,7 @@ static void error(mddev_t *mddev, mdk_rdev_t *rdev)
1025 /* 1027 /*
1026 * if recovery is running, make sure it aborts. 1028 * if recovery is running, make sure it aborts.
1027 */ 1029 */
1028 set_bit(MD_RECOVERY_ERR, &mddev->recovery); 1030 set_bit(MD_RECOVERY_INTR, &mddev->recovery);
1029 } else 1031 } else
1030 set_bit(Faulty, &rdev->flags); 1032 set_bit(Faulty, &rdev->flags);
1031 set_bit(MD_CHANGE_DEVS, &mddev->flags); 1033 set_bit(MD_CHANGE_DEVS, &mddev->flags);
@@ -1146,6 +1148,14 @@ static int raid1_remove_disk(mddev_t *mddev, int number)
1146 err = -EBUSY; 1148 err = -EBUSY;
1147 goto abort; 1149 goto abort;
1148 } 1150 }
1151 /* Only remove non-faulty devices is recovery
1152 * is not possible.
1153 */
1154 if (!test_bit(Faulty, &rdev->flags) &&
1155 mddev->degraded < conf->raid_disks) {
1156 err = -EBUSY;
1157 goto abort;
1158 }
1149 p->rdev = NULL; 1159 p->rdev = NULL;
1150 synchronize_rcu(); 1160 synchronize_rcu();
1151 if (atomic_read(&rdev->nr_pending)) { 1161 if (atomic_read(&rdev->nr_pending)) {
@@ -1282,6 +1292,7 @@ static void sync_request_write(mddev_t *mddev, r1bio_t *r1_bio)
1282 rdev_dec_pending(conf->mirrors[i].rdev, mddev); 1292 rdev_dec_pending(conf->mirrors[i].rdev, mddev);
1283 } else { 1293 } else {
1284 /* fixup the bio for reuse */ 1294 /* fixup the bio for reuse */
1295 int size;
1285 sbio->bi_vcnt = vcnt; 1296 sbio->bi_vcnt = vcnt;
1286 sbio->bi_size = r1_bio->sectors << 9; 1297 sbio->bi_size = r1_bio->sectors << 9;
1287 sbio->bi_idx = 0; 1298 sbio->bi_idx = 0;
@@ -1295,10 +1306,20 @@ static void sync_request_write(mddev_t *mddev, r1bio_t *r1_bio)
1295 sbio->bi_sector = r1_bio->sector + 1306 sbio->bi_sector = r1_bio->sector +
1296 conf->mirrors[i].rdev->data_offset; 1307 conf->mirrors[i].rdev->data_offset;
1297 sbio->bi_bdev = conf->mirrors[i].rdev->bdev; 1308 sbio->bi_bdev = conf->mirrors[i].rdev->bdev;
1298 for (j = 0; j < vcnt ; j++) 1309 size = sbio->bi_size;
1299 memcpy(page_address(sbio->bi_io_vec[j].bv_page), 1310 for (j = 0; j < vcnt ; j++) {
1311 struct bio_vec *bi;
1312 bi = &sbio->bi_io_vec[j];
1313 bi->bv_offset = 0;
1314 if (size > PAGE_SIZE)
1315 bi->bv_len = PAGE_SIZE;
1316 else
1317 bi->bv_len = size;
1318 size -= PAGE_SIZE;
1319 memcpy(page_address(bi->bv_page),
1300 page_address(pbio->bi_io_vec[j].bv_page), 1320 page_address(pbio->bi_io_vec[j].bv_page),
1301 PAGE_SIZE); 1321 PAGE_SIZE);
1322 }
1302 1323
1303 } 1324 }
1304 } 1325 }
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 8536ede1e712..a71277b640ab 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -1020,7 +1020,7 @@ static void error(mddev_t *mddev, mdk_rdev_t *rdev)
1020 /* 1020 /*
1021 * if recovery is running, make sure it aborts. 1021 * if recovery is running, make sure it aborts.
1022 */ 1022 */
1023 set_bit(MD_RECOVERY_ERR, &mddev->recovery); 1023 set_bit(MD_RECOVERY_INTR, &mddev->recovery);
1024 } 1024 }
1025 set_bit(Faulty, &rdev->flags); 1025 set_bit(Faulty, &rdev->flags);
1026 set_bit(MD_CHANGE_DEVS, &mddev->flags); 1026 set_bit(MD_CHANGE_DEVS, &mddev->flags);
@@ -1171,6 +1171,14 @@ static int raid10_remove_disk(mddev_t *mddev, int number)
1171 err = -EBUSY; 1171 err = -EBUSY;
1172 goto abort; 1172 goto abort;
1173 } 1173 }
1174 /* Only remove faulty devices in recovery
1175 * is not possible.
1176 */
1177 if (!test_bit(Faulty, &rdev->flags) &&
1178 enough(conf)) {
1179 err = -EBUSY;
1180 goto abort;
1181 }
1174 p->rdev = NULL; 1182 p->rdev = NULL;
1175 synchronize_rcu(); 1183 synchronize_rcu();
1176 if (atomic_read(&rdev->nr_pending)) { 1184 if (atomic_read(&rdev->nr_pending)) {
@@ -1237,6 +1245,7 @@ static void end_sync_write(struct bio *bio, int error)
1237 1245
1238 if (!uptodate) 1246 if (!uptodate)
1239 md_error(mddev, conf->mirrors[d].rdev); 1247 md_error(mddev, conf->mirrors[d].rdev);
1248
1240 update_head_pos(i, r10_bio); 1249 update_head_pos(i, r10_bio);
1241 1250
1242 while (atomic_dec_and_test(&r10_bio->remaining)) { 1251 while (atomic_dec_and_test(&r10_bio->remaining)) {
@@ -1844,7 +1853,8 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i
1844 if (rb2) 1853 if (rb2)
1845 atomic_dec(&rb2->remaining); 1854 atomic_dec(&rb2->remaining);
1846 r10_bio = rb2; 1855 r10_bio = rb2;
1847 if (!test_and_set_bit(MD_RECOVERY_ERR, &mddev->recovery)) 1856 if (!test_and_set_bit(MD_RECOVERY_INTR,
1857 &mddev->recovery))
1848 printk(KERN_INFO "raid10: %s: insufficient working devices for recovery.\n", 1858 printk(KERN_INFO "raid10: %s: insufficient working devices for recovery.\n",
1849 mdname(mddev)); 1859 mdname(mddev));
1850 break; 1860 break;
@@ -2127,6 +2137,8 @@ static int run(mddev_t *mddev)
2127 !test_bit(In_sync, &disk->rdev->flags)) { 2137 !test_bit(In_sync, &disk->rdev->flags)) {
2128 disk->head_position = 0; 2138 disk->head_position = 0;
2129 mddev->degraded++; 2139 mddev->degraded++;
2140 if (disk->rdev)
2141 conf->fullsync = 1;
2130 } 2142 }
2131 } 2143 }
2132 2144
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 93fde48c0f42..54c8ee28fcc4 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -94,6 +94,8 @@
94#define __inline__ 94#define __inline__
95#endif 95#endif
96 96
97#define printk_rl(args...) ((void) (printk_ratelimit() && printk(args)))
98
97#if !RAID6_USE_EMPTY_ZERO_PAGE 99#if !RAID6_USE_EMPTY_ZERO_PAGE
98/* In .bss so it's zeroed */ 100/* In .bss so it's zeroed */
99const char raid6_empty_zero_page[PAGE_SIZE] __attribute__((aligned(256))); 101const char raid6_empty_zero_page[PAGE_SIZE] __attribute__((aligned(256)));
@@ -1143,10 +1145,12 @@ static void raid5_end_read_request(struct bio * bi, int error)
1143 set_bit(R5_UPTODATE, &sh->dev[i].flags); 1145 set_bit(R5_UPTODATE, &sh->dev[i].flags);
1144 if (test_bit(R5_ReadError, &sh->dev[i].flags)) { 1146 if (test_bit(R5_ReadError, &sh->dev[i].flags)) {
1145 rdev = conf->disks[i].rdev; 1147 rdev = conf->disks[i].rdev;
1146 printk(KERN_INFO "raid5:%s: read error corrected (%lu sectors at %llu on %s)\n", 1148 printk_rl(KERN_INFO "raid5:%s: read error corrected"
1147 mdname(conf->mddev), STRIPE_SECTORS, 1149 " (%lu sectors at %llu on %s)\n",
1148 (unsigned long long)(sh->sector + rdev->data_offset), 1150 mdname(conf->mddev), STRIPE_SECTORS,
1149 bdevname(rdev->bdev, b)); 1151 (unsigned long long)(sh->sector
1152 + rdev->data_offset),
1153 bdevname(rdev->bdev, b));
1150 clear_bit(R5_ReadError, &sh->dev[i].flags); 1154 clear_bit(R5_ReadError, &sh->dev[i].flags);
1151 clear_bit(R5_ReWrite, &sh->dev[i].flags); 1155 clear_bit(R5_ReWrite, &sh->dev[i].flags);
1152 } 1156 }
@@ -1160,16 +1164,22 @@ static void raid5_end_read_request(struct bio * bi, int error)
1160 clear_bit(R5_UPTODATE, &sh->dev[i].flags); 1164 clear_bit(R5_UPTODATE, &sh->dev[i].flags);
1161 atomic_inc(&rdev->read_errors); 1165 atomic_inc(&rdev->read_errors);
1162 if (conf->mddev->degraded) 1166 if (conf->mddev->degraded)
1163 printk(KERN_WARNING "raid5:%s: read error not correctable (sector %llu on %s).\n", 1167 printk_rl(KERN_WARNING
1164 mdname(conf->mddev), 1168 "raid5:%s: read error not correctable "
1165 (unsigned long long)(sh->sector + rdev->data_offset), 1169 "(sector %llu on %s).\n",
1166 bdn); 1170 mdname(conf->mddev),
1171 (unsigned long long)(sh->sector
1172 + rdev->data_offset),
1173 bdn);
1167 else if (test_bit(R5_ReWrite, &sh->dev[i].flags)) 1174 else if (test_bit(R5_ReWrite, &sh->dev[i].flags))
1168 /* Oh, no!!! */ 1175 /* Oh, no!!! */
1169 printk(KERN_WARNING "raid5:%s: read error NOT corrected!! (sector %llu on %s).\n", 1176 printk_rl(KERN_WARNING
1170 mdname(conf->mddev), 1177 "raid5:%s: read error NOT corrected!! "
1171 (unsigned long long)(sh->sector + rdev->data_offset), 1178 "(sector %llu on %s).\n",
1172 bdn); 1179 mdname(conf->mddev),
1180 (unsigned long long)(sh->sector
1181 + rdev->data_offset),
1182 bdn);
1173 else if (atomic_read(&rdev->read_errors) 1183 else if (atomic_read(&rdev->read_errors)
1174 > conf->max_nr_stripes) 1184 > conf->max_nr_stripes)
1175 printk(KERN_WARNING 1185 printk(KERN_WARNING
@@ -1258,7 +1268,7 @@ static void error(mddev_t *mddev, mdk_rdev_t *rdev)
1258 /* 1268 /*
1259 * if recovery was running, make sure it aborts. 1269 * if recovery was running, make sure it aborts.
1260 */ 1270 */
1261 set_bit(MD_RECOVERY_ERR, &mddev->recovery); 1271 set_bit(MD_RECOVERY_INTR, &mddev->recovery);
1262 } 1272 }
1263 set_bit(Faulty, &rdev->flags); 1273 set_bit(Faulty, &rdev->flags);
1264 printk (KERN_ALERT 1274 printk (KERN_ALERT
@@ -1992,6 +2002,7 @@ static int __handle_issuing_new_read_requests5(struct stripe_head *sh,
1992 * have quiesced. 2002 * have quiesced.
1993 */ 2003 */
1994 if ((s->uptodate == disks - 1) && 2004 if ((s->uptodate == disks - 1) &&
2005 (s->failed && disk_idx == s->failed_num) &&
1995 !test_bit(STRIPE_OP_CHECK, &sh->ops.pending)) { 2006 !test_bit(STRIPE_OP_CHECK, &sh->ops.pending)) {
1996 set_bit(STRIPE_OP_COMPUTE_BLK, &sh->ops.pending); 2007 set_bit(STRIPE_OP_COMPUTE_BLK, &sh->ops.pending);
1997 set_bit(R5_Wantcompute, &dev->flags); 2008 set_bit(R5_Wantcompute, &dev->flags);
@@ -2077,7 +2088,9 @@ static void handle_issuing_new_read_requests6(struct stripe_head *sh,
2077 /* we would like to get this block, possibly 2088 /* we would like to get this block, possibly
2078 * by computing it, but we might not be able to 2089 * by computing it, but we might not be able to
2079 */ 2090 */
2080 if (s->uptodate == disks-1) { 2091 if ((s->uptodate == disks - 1) &&
2092 (s->failed && (i == r6s->failed_num[0] ||
2093 i == r6s->failed_num[1]))) {
2081 pr_debug("Computing stripe %llu block %d\n", 2094 pr_debug("Computing stripe %llu block %d\n",
2082 (unsigned long long)sh->sector, i); 2095 (unsigned long long)sh->sector, i);
2083 compute_block_1(sh, i, 0); 2096 compute_block_1(sh, i, 0);
@@ -2635,6 +2648,7 @@ static void handle_stripe5(struct stripe_head *sh)
2635 struct r5dev *dev; 2648 struct r5dev *dev;
2636 unsigned long pending = 0; 2649 unsigned long pending = 0;
2637 mdk_rdev_t *blocked_rdev = NULL; 2650 mdk_rdev_t *blocked_rdev = NULL;
2651 int prexor;
2638 2652
2639 memset(&s, 0, sizeof(s)); 2653 memset(&s, 0, sizeof(s));
2640 pr_debug("handling stripe %llu, state=%#lx cnt=%d, pd_idx=%d " 2654 pr_debug("handling stripe %llu, state=%#lx cnt=%d, pd_idx=%d "
@@ -2764,9 +2778,11 @@ static void handle_stripe5(struct stripe_head *sh)
2764 /* leave prexor set until postxor is done, allows us to distinguish 2778 /* leave prexor set until postxor is done, allows us to distinguish
2765 * a rmw from a rcw during biodrain 2779 * a rmw from a rcw during biodrain
2766 */ 2780 */
2781 prexor = 0;
2767 if (test_bit(STRIPE_OP_PREXOR, &sh->ops.complete) && 2782 if (test_bit(STRIPE_OP_PREXOR, &sh->ops.complete) &&
2768 test_bit(STRIPE_OP_POSTXOR, &sh->ops.complete)) { 2783 test_bit(STRIPE_OP_POSTXOR, &sh->ops.complete)) {
2769 2784
2785 prexor = 1;
2770 clear_bit(STRIPE_OP_PREXOR, &sh->ops.complete); 2786 clear_bit(STRIPE_OP_PREXOR, &sh->ops.complete);
2771 clear_bit(STRIPE_OP_PREXOR, &sh->ops.ack); 2787 clear_bit(STRIPE_OP_PREXOR, &sh->ops.ack);
2772 clear_bit(STRIPE_OP_PREXOR, &sh->ops.pending); 2788 clear_bit(STRIPE_OP_PREXOR, &sh->ops.pending);
@@ -2800,6 +2816,8 @@ static void handle_stripe5(struct stripe_head *sh)
2800 if (!test_and_set_bit( 2816 if (!test_and_set_bit(
2801 STRIPE_OP_IO, &sh->ops.pending)) 2817 STRIPE_OP_IO, &sh->ops.pending))
2802 sh->ops.count++; 2818 sh->ops.count++;
2819 if (prexor)
2820 continue;
2803 if (!test_bit(R5_Insync, &dev->flags) || 2821 if (!test_bit(R5_Insync, &dev->flags) ||
2804 (i == sh->pd_idx && s.failed == 0)) 2822 (i == sh->pd_idx && s.failed == 0))
2805 set_bit(STRIPE_INSYNC, &sh->state); 2823 set_bit(STRIPE_INSYNC, &sh->state);
@@ -2880,6 +2898,8 @@ static void handle_stripe5(struct stripe_head *sh)
2880 2898
2881 for (i = conf->raid_disks; i--; ) { 2899 for (i = conf->raid_disks; i--; ) {
2882 set_bit(R5_Wantwrite, &sh->dev[i].flags); 2900 set_bit(R5_Wantwrite, &sh->dev[i].flags);
2901 set_bit(R5_LOCKED, &dev->flags);
2902 s.locked++;
2883 if (!test_and_set_bit(STRIPE_OP_IO, &sh->ops.pending)) 2903 if (!test_and_set_bit(STRIPE_OP_IO, &sh->ops.pending))
2884 sh->ops.count++; 2904 sh->ops.count++;
2885 } 2905 }
@@ -2893,6 +2913,7 @@ static void handle_stripe5(struct stripe_head *sh)
2893 conf->raid_disks); 2913 conf->raid_disks);
2894 s.locked += handle_write_operations5(sh, 1, 1); 2914 s.locked += handle_write_operations5(sh, 1, 1);
2895 } else if (s.expanded && 2915 } else if (s.expanded &&
2916 s.locked == 0 &&
2896 !test_bit(STRIPE_OP_POSTXOR, &sh->ops.pending)) { 2917 !test_bit(STRIPE_OP_POSTXOR, &sh->ops.pending)) {
2897 clear_bit(STRIPE_EXPAND_READY, &sh->state); 2918 clear_bit(STRIPE_EXPAND_READY, &sh->state);
2898 atomic_dec(&conf->reshape_stripes); 2919 atomic_dec(&conf->reshape_stripes);
@@ -4287,7 +4308,9 @@ static int run(mddev_t *mddev)
4287 " disk %d\n", bdevname(rdev->bdev,b), 4308 " disk %d\n", bdevname(rdev->bdev,b),
4288 raid_disk); 4309 raid_disk);
4289 working_disks++; 4310 working_disks++;
4290 } 4311 } else
4312 /* Cannot rely on bitmap to complete recovery */
4313 conf->fullsync = 1;
4291 } 4314 }
4292 4315
4293 /* 4316 /*
@@ -4564,6 +4587,14 @@ static int raid5_remove_disk(mddev_t *mddev, int number)
4564 err = -EBUSY; 4587 err = -EBUSY;
4565 goto abort; 4588 goto abort;
4566 } 4589 }
4590 /* Only remove non-faulty devices if recovery
4591 * isn't possible.
4592 */
4593 if (!test_bit(Faulty, &rdev->flags) &&
4594 mddev->degraded <= conf->max_degraded) {
4595 err = -EBUSY;
4596 goto abort;
4597 }
4567 p->rdev = NULL; 4598 p->rdev = NULL;
4568 synchronize_rcu(); 4599 synchronize_rcu();
4569 if (atomic_read(&rdev->nr_pending)) { 4600 if (atomic_read(&rdev->nr_pending)) {
diff --git a/drivers/media/Makefile b/drivers/media/Makefile
index cc11c4c0e7e7..09a829d8a7e7 100644
--- a/drivers/media/Makefile
+++ b/drivers/media/Makefile
@@ -2,12 +2,7 @@
2# Makefile for the kernel multimedia device drivers. 2# Makefile for the kernel multimedia device drivers.
3# 3#
4 4
5obj-y := common/ 5obj-y += common/ video/
6
7obj-$(CONFIG_VIDEO_MEDIA) += common/
8
9# Since hybrid devices are here, should be compiled if DVB and/or V4L
10obj-$(CONFIG_VIDEO_MEDIA) += video/
11 6
12obj-$(CONFIG_VIDEO_DEV) += radio/ 7obj-$(CONFIG_VIDEO_DEV) += radio/
13obj-$(CONFIG_DVB_CORE) += dvb/ 8obj-$(CONFIG_DVB_CORE) += dvb/
diff --git a/drivers/media/common/ir-keymaps.c b/drivers/media/common/ir-keymaps.c
index a3485817e46c..8fa91f846d59 100644
--- a/drivers/media/common/ir-keymaps.c
+++ b/drivers/media/common/ir-keymaps.c
@@ -2201,3 +2201,41 @@ IR_KEYTAB_TYPE ir_codes_powercolor_real_angel[IR_KEYTAB_SIZE] = {
2201 [0x25] = KEY_POWER, /* power */ 2201 [0x25] = KEY_POWER, /* power */
2202}; 2202};
2203EXPORT_SYMBOL_GPL(ir_codes_powercolor_real_angel); 2203EXPORT_SYMBOL_GPL(ir_codes_powercolor_real_angel);
2204
2205IR_KEYTAB_TYPE ir_codes_avermedia_a16d[IR_KEYTAB_SIZE] = {
2206 [0x20] = KEY_LIST,
2207 [0x00] = KEY_POWER,
2208 [0x28] = KEY_1,
2209 [0x18] = KEY_2,
2210 [0x38] = KEY_3,
2211 [0x24] = KEY_4,
2212 [0x14] = KEY_5,
2213 [0x34] = KEY_6,
2214 [0x2c] = KEY_7,
2215 [0x1c] = KEY_8,
2216 [0x3c] = KEY_9,
2217 [0x12] = KEY_SUBTITLE,
2218 [0x22] = KEY_0,
2219 [0x32] = KEY_REWIND,
2220 [0x3a] = KEY_SHUFFLE,
2221 [0x02] = KEY_PRINT,
2222 [0x11] = KEY_CHANNELDOWN,
2223 [0x31] = KEY_CHANNELUP,
2224 [0x0c] = KEY_ZOOM,
2225 [0x1e] = KEY_VOLUMEDOWN,
2226 [0x3e] = KEY_VOLUMEUP,
2227 [0x0a] = KEY_MUTE,
2228 [0x04] = KEY_AUDIO,
2229 [0x26] = KEY_RECORD,
2230 [0x06] = KEY_PLAY,
2231 [0x36] = KEY_STOP,
2232 [0x16] = KEY_PAUSE,
2233 [0x2e] = KEY_REWIND,
2234 [0x0e] = KEY_FASTFORWARD,
2235 [0x30] = KEY_TEXT,
2236 [0x21] = KEY_GREEN,
2237 [0x01] = KEY_BLUE,
2238 [0x08] = KEY_EPG,
2239 [0x2a] = KEY_MENU,
2240};
2241EXPORT_SYMBOL_GPL(ir_codes_avermedia_a16d);
diff --git a/drivers/media/common/tuners/Kconfig b/drivers/media/common/tuners/Kconfig
index d6206540476b..85482960d012 100644
--- a/drivers/media/common/tuners/Kconfig
+++ b/drivers/media/common/tuners/Kconfig
@@ -21,6 +21,7 @@ config MEDIA_TUNER
21 tristate 21 tristate
22 default VIDEO_MEDIA && I2C 22 default VIDEO_MEDIA && I2C
23 depends on VIDEO_MEDIA && I2C 23 depends on VIDEO_MEDIA && I2C
24 select FW_LOADER if !MEDIA_TUNER_CUSTOMIZE && HOTPLUG
24 select MEDIA_TUNER_XC2028 if !MEDIA_TUNER_CUSTOMIZE && HOTPLUG 25 select MEDIA_TUNER_XC2028 if !MEDIA_TUNER_CUSTOMIZE && HOTPLUG
25 select MEDIA_TUNER_XC5000 if !MEDIA_TUNER_CUSTOMIZE && HOTPLUG 26 select MEDIA_TUNER_XC5000 if !MEDIA_TUNER_CUSTOMIZE && HOTPLUG
26 select MEDIA_TUNER_MT20XX if !MEDIA_TUNER_CUSTOMIZE 27 select MEDIA_TUNER_MT20XX if !MEDIA_TUNER_CUSTOMIZE
diff --git a/drivers/media/common/tuners/mxl5005s.c b/drivers/media/common/tuners/mxl5005s.c
index 5d05b5390f66..0dc2bef9f6a3 100644
--- a/drivers/media/common/tuners/mxl5005s.c
+++ b/drivers/media/common/tuners/mxl5005s.c
@@ -101,7 +101,7 @@ enum {
101 MXL_QAM, 101 MXL_QAM,
102 MXL_ANALOG_CABLE, 102 MXL_ANALOG_CABLE,
103 MXL_ANALOG_OTA 103 MXL_ANALOG_OTA
104} tuner_modu_type; 104};
105 105
106/* MXL5005 Tuner Register Struct */ 106/* MXL5005 Tuner Register Struct */
107struct TunerReg { 107struct TunerReg {
@@ -194,7 +194,7 @@ enum {
194 RFSYN_DIVM, /* 88 */ 194 RFSYN_DIVM, /* 88 */
195 DN_BYPASS_AGC_I2C /* 89 */ 195 DN_BYPASS_AGC_I2C /* 89 */
196#endif 196#endif
197} MXL5005_ControlName; 197};
198 198
199/* 199/*
200 * The following context is source code provided by MaxLinear. 200 * The following context is source code provided by MaxLinear.
diff --git a/drivers/media/common/tuners/tda18271-common.c b/drivers/media/common/tuners/tda18271-common.c
index 42b5f5d4bfe6..6fb5b4586569 100644
--- a/drivers/media/common/tuners/tda18271-common.c
+++ b/drivers/media/common/tuners/tda18271-common.c
@@ -648,11 +648,19 @@ int tda18271_calc_rf_cal(struct dvb_frontend *fe, u32 *freq)
648 unsigned char *regs = priv->tda18271_regs; 648 unsigned char *regs = priv->tda18271_regs;
649 u8 val; 649 u8 val;
650 650
651 tda18271_lookup_map(fe, RF_CAL, freq, &val); 651 int ret = tda18271_lookup_map(fe, RF_CAL, freq, &val);
652 /* The TDA18271HD/C1 rf_cal map lookup is expected to go out of range
653 * for frequencies above 61.1 MHz. In these cases, the internal RF
654 * tracking filters calibration mechanism is used.
655 *
656 * There is no need to warn the user about this.
657 */
658 if (ret < 0)
659 goto fail;
652 660
653 regs[R_EB14] = val; 661 regs[R_EB14] = val;
654 662fail:
655 return 0; 663 return ret;
656} 664}
657 665
658/* 666/*
diff --git a/drivers/media/common/tuners/tda18271-fe.c b/drivers/media/common/tuners/tda18271-fe.c
index 89c01fb1f859..93063c6fbbf6 100644
--- a/drivers/media/common/tuners/tda18271-fe.c
+++ b/drivers/media/common/tuners/tda18271-fe.c
@@ -45,6 +45,21 @@ static inline int charge_pump_source(struct dvb_frontend *fe, int force)
45 TDA18271_MAIN_PLL, force); 45 TDA18271_MAIN_PLL, force);
46} 46}
47 47
48static inline void tda18271_set_if_notch(struct dvb_frontend *fe)
49{
50 struct tda18271_priv *priv = fe->tuner_priv;
51 unsigned char *regs = priv->tda18271_regs;
52
53 switch (priv->mode) {
54 case TDA18271_ANALOG:
55 regs[R_MPD] &= ~0x80; /* IF notch = 0 */
56 break;
57 case TDA18271_DIGITAL:
58 regs[R_MPD] |= 0x80; /* IF notch = 1 */
59 break;
60 }
61}
62
48static int tda18271_channel_configuration(struct dvb_frontend *fe, 63static int tda18271_channel_configuration(struct dvb_frontend *fe,
49 struct tda18271_std_map_item *map, 64 struct tda18271_std_map_item *map,
50 u32 freq, u32 bw) 65 u32 freq, u32 bw)
@@ -60,25 +75,18 @@ static int tda18271_channel_configuration(struct dvb_frontend *fe,
60 regs[R_EP3] &= ~0x1f; /* clear std bits */ 75 regs[R_EP3] &= ~0x1f; /* clear std bits */
61 regs[R_EP3] |= (map->agc_mode << 3) | map->std; 76 regs[R_EP3] |= (map->agc_mode << 3) | map->std;
62 77
63 /* set rfagc to high speed mode */ 78 if (priv->id == TDA18271HDC2) {
64 regs[R_EP3] &= ~0x04; 79 /* set rfagc to high speed mode */
80 regs[R_EP3] &= ~0x04;
81 }
65 82
66 /* set cal mode to normal */ 83 /* set cal mode to normal */
67 regs[R_EP4] &= ~0x03; 84 regs[R_EP4] &= ~0x03;
68 85
69 /* update IF output level & IF notch frequency */ 86 /* update IF output level */
70 regs[R_EP4] &= ~0x1c; /* clear if level bits */ 87 regs[R_EP4] &= ~0x1c; /* clear if level bits */
71 regs[R_EP4] |= (map->if_lvl << 2); 88 regs[R_EP4] |= (map->if_lvl << 2);
72 89
73 switch (priv->mode) {
74 case TDA18271_ANALOG:
75 regs[R_MPD] &= ~0x80; /* IF notch = 0 */
76 break;
77 case TDA18271_DIGITAL:
78 regs[R_MPD] |= 0x80; /* IF notch = 1 */
79 break;
80 }
81
82 /* update FM_RFn */ 90 /* update FM_RFn */
83 regs[R_EP4] &= ~0x80; 91 regs[R_EP4] &= ~0x80;
84 regs[R_EP4] |= map->fm_rfn << 7; 92 regs[R_EP4] |= map->fm_rfn << 7;
@@ -95,6 +103,9 @@ static int tda18271_channel_configuration(struct dvb_frontend *fe,
95 /* disable Power Level Indicator */ 103 /* disable Power Level Indicator */
96 regs[R_EP1] |= 0x40; 104 regs[R_EP1] |= 0x40;
97 105
106 /* make sure thermometer is off */
107 regs[R_TM] &= ~0x10;
108
98 /* frequency dependent parameters */ 109 /* frequency dependent parameters */
99 110
100 tda18271_calc_ir_measure(fe, &freq); 111 tda18271_calc_ir_measure(fe, &freq);
@@ -135,6 +146,7 @@ static int tda18271_channel_configuration(struct dvb_frontend *fe,
135 switch (priv->role) { 146 switch (priv->role) {
136 case TDA18271_MASTER: 147 case TDA18271_MASTER:
137 tda18271_calc_main_pll(fe, N); 148 tda18271_calc_main_pll(fe, N);
149 tda18271_set_if_notch(fe);
138 tda18271_write_regs(fe, R_MPD, 4); 150 tda18271_write_regs(fe, R_MPD, 4);
139 break; 151 break;
140 case TDA18271_SLAVE: 152 case TDA18271_SLAVE:
@@ -142,6 +154,7 @@ static int tda18271_channel_configuration(struct dvb_frontend *fe,
142 tda18271_write_regs(fe, R_CPD, 4); 154 tda18271_write_regs(fe, R_CPD, 4);
143 155
144 regs[R_MPD] = regs[R_CPD] & 0x7f; 156 regs[R_MPD] = regs[R_CPD] & 0x7f;
157 tda18271_set_if_notch(fe);
145 tda18271_write_regs(fe, R_MPD, 1); 158 tda18271_write_regs(fe, R_MPD, 1);
146 break; 159 break;
147 } 160 }
@@ -160,12 +173,14 @@ static int tda18271_channel_configuration(struct dvb_frontend *fe,
160 173
161 msleep(20); 174 msleep(20);
162 175
163 /* set rfagc to normal speed mode */ 176 if (priv->id == TDA18271HDC2) {
164 if (map->fm_rfn) 177 /* set rfagc to normal speed mode */
165 regs[R_EP3] &= ~0x04; 178 if (map->fm_rfn)
166 else 179 regs[R_EP3] &= ~0x04;
167 regs[R_EP3] |= 0x04; 180 else
168 ret = tda18271_write_regs(fe, R_EP3, 1); 181 regs[R_EP3] |= 0x04;
182 ret = tda18271_write_regs(fe, R_EP3, 1);
183 }
169fail: 184fail:
170 return ret; 185 return ret;
171} 186}
@@ -507,7 +522,7 @@ static int tda18271_powerscan_init(struct dvb_frontend *fe)
507 /* set cal mode to normal */ 522 /* set cal mode to normal */
508 regs[R_EP4] &= ~0x03; 523 regs[R_EP4] &= ~0x03;
509 524
510 /* update IF output level & IF notch frequency */ 525 /* update IF output level */
511 regs[R_EP4] &= ~0x1c; /* clear if level bits */ 526 regs[R_EP4] &= ~0x1c; /* clear if level bits */
512 527
513 ret = tda18271_write_regs(fe, R_EP3, 2); 528 ret = tda18271_write_regs(fe, R_EP3, 2);
diff --git a/drivers/media/common/tuners/tda827x.c b/drivers/media/common/tuners/tda827x.c
index d30d2c9094d9..8555d9cf9051 100644
--- a/drivers/media/common/tuners/tda827x.c
+++ b/drivers/media/common/tuners/tda827x.c
@@ -418,13 +418,13 @@ static void tda827xa_lna_gain(struct dvb_frontend *fe, int high,
418 unsigned char buf[] = {0x22, 0x01}; 418 unsigned char buf[] = {0x22, 0x01};
419 int arg; 419 int arg;
420 int gp_func; 420 int gp_func;
421 struct i2c_msg msg = { .addr = priv->cfg->switch_addr, .flags = 0, 421 struct i2c_msg msg = { .flags = 0, .buf = buf, .len = sizeof(buf) };
422 .buf = buf, .len = sizeof(buf) };
423 422
424 if (NULL == priv->cfg) { 423 if (NULL == priv->cfg) {
425 dprintk("tda827x_config not defined, cannot set LNA gain!\n"); 424 dprintk("tda827x_config not defined, cannot set LNA gain!\n");
426 return; 425 return;
427 } 426 }
427 msg.addr = priv->cfg->switch_addr;
428 if (priv->cfg->config) { 428 if (priv->cfg->config) {
429 if (high) 429 if (high)
430 dprintk("setting LNA to high gain\n"); 430 dprintk("setting LNA to high gain\n");
diff --git a/drivers/media/common/tuners/tea5761.c b/drivers/media/common/tuners/tea5761.c
index b93cdef9ac73..b23dadeecd05 100644
--- a/drivers/media/common/tuners/tea5761.c
+++ b/drivers/media/common/tuners/tea5761.c
@@ -295,7 +295,7 @@ struct dvb_frontend *tea5761_attach(struct dvb_frontend *fe,
295{ 295{
296 struct tea5761_priv *priv = NULL; 296 struct tea5761_priv *priv = NULL;
297 297
298 if (tea5761_autodetection(i2c_adap, i2c_addr) == EINVAL) 298 if (tea5761_autodetection(i2c_adap, i2c_addr) != 0)
299 return NULL; 299 return NULL;
300 300
301 priv = kzalloc(sizeof(struct tea5761_priv), GFP_KERNEL); 301 priv = kzalloc(sizeof(struct tea5761_priv), GFP_KERNEL);
diff --git a/drivers/media/common/tuners/tuner-i2c.h b/drivers/media/common/tuners/tuner-i2c.h
index 3ad6c8e0b04c..cb1c7141f0c6 100644
--- a/drivers/media/common/tuners/tuner-i2c.h
+++ b/drivers/media/common/tuners/tuner-i2c.h
@@ -170,4 +170,12 @@ __fail: \
170 __ret; \ 170 __ret; \
171}) 171})
172 172
173#define hybrid_tuner_report_instance_count(state) \
174({ \
175 int __ret = 0; \
176 if (state) \
177 __ret = state->i2c_props.count; \
178 __ret; \
179})
180
173#endif /* __TUNER_I2C_H__ */ 181#endif /* __TUNER_I2C_H__ */
diff --git a/drivers/media/common/tuners/tuner-simple.c b/drivers/media/common/tuners/tuner-simple.c
index be8d903171b7..266c255cf0d8 100644
--- a/drivers/media/common/tuners/tuner-simple.c
+++ b/drivers/media/common/tuners/tuner-simple.c
@@ -1018,8 +1018,10 @@ struct dvb_frontend *simple_tuner_attach(struct dvb_frontend *fe,
1018 fe->ops.i2c_gate_ctrl(fe, 1); 1018 fe->ops.i2c_gate_ctrl(fe, 1);
1019 1019
1020 if (1 != i2c_transfer(i2c_adap, &msg, 1)) 1020 if (1 != i2c_transfer(i2c_adap, &msg, 1))
1021 tuner_warn("unable to probe %s, proceeding anyway.", 1021 printk(KERN_WARNING "tuner-simple %d-%04x: "
1022 tuners[type].name); 1022 "unable to probe %s, proceeding anyway.",
1023 i2c_adapter_id(i2c_adap), i2c_addr,
1024 tuners[type].name);
1023 1025
1024 if (fe->ops.i2c_gate_ctrl) 1026 if (fe->ops.i2c_gate_ctrl)
1025 fe->ops.i2c_gate_ctrl(fe, 0); 1027 fe->ops.i2c_gate_ctrl(fe, 0);
diff --git a/drivers/media/common/tuners/tuner-xc2028.c b/drivers/media/common/tuners/tuner-xc2028.c
index 9e9003cffc7f..0cbde17bfbb7 100644
--- a/drivers/media/common/tuners/tuner-xc2028.c
+++ b/drivers/media/common/tuners/tuner-xc2028.c
@@ -46,7 +46,7 @@ module_param_string(firmware_name, firmware_name, sizeof(firmware_name), 0);
46MODULE_PARM_DESC(firmware_name, "Firmware file name. Allows overriding the " 46MODULE_PARM_DESC(firmware_name, "Firmware file name. Allows overriding the "
47 "default firmware name\n"); 47 "default firmware name\n");
48 48
49static LIST_HEAD(xc2028_list); 49static LIST_HEAD(hybrid_tuner_instance_list);
50static DEFINE_MUTEX(xc2028_list_mutex); 50static DEFINE_MUTEX(xc2028_list_mutex);
51 51
52/* struct for storing firmware table */ 52/* struct for storing firmware table */
@@ -68,12 +68,11 @@ struct firmware_properties {
68}; 68};
69 69
70struct xc2028_data { 70struct xc2028_data {
71 struct list_head xc2028_list; 71 struct list_head hybrid_tuner_instance_list;
72 struct tuner_i2c_props i2c_props; 72 struct tuner_i2c_props i2c_props;
73 int (*tuner_callback) (void *dev, 73 int (*tuner_callback) (void *dev,
74 int command, int arg); 74 int command, int arg);
75 void *video_dev; 75 void *video_dev;
76 int count;
77 __u32 frequency; 76 __u32 frequency;
78 77
79 struct firmware_description *firm; 78 struct firmware_description *firm;
@@ -1072,20 +1071,19 @@ static int xc2028_dvb_release(struct dvb_frontend *fe)
1072 1071
1073 mutex_lock(&xc2028_list_mutex); 1072 mutex_lock(&xc2028_list_mutex);
1074 1073
1075 priv->count--; 1074 /* only perform final cleanup if this is the last instance */
1076 1075 if (hybrid_tuner_report_instance_count(priv) == 1) {
1077 if (!priv->count) {
1078 list_del(&priv->xc2028_list);
1079
1080 kfree(priv->ctrl.fname); 1076 kfree(priv->ctrl.fname);
1081
1082 free_firmware(priv); 1077 free_firmware(priv);
1083 kfree(priv);
1084 fe->tuner_priv = NULL;
1085 } 1078 }
1086 1079
1080 if (priv)
1081 hybrid_tuner_release_state(priv);
1082
1087 mutex_unlock(&xc2028_list_mutex); 1083 mutex_unlock(&xc2028_list_mutex);
1088 1084
1085 fe->tuner_priv = NULL;
1086
1089 return 0; 1087 return 0;
1090} 1088}
1091 1089
@@ -1150,7 +1148,7 @@ struct dvb_frontend *xc2028_attach(struct dvb_frontend *fe,
1150 struct xc2028_config *cfg) 1148 struct xc2028_config *cfg)
1151{ 1149{
1152 struct xc2028_data *priv; 1150 struct xc2028_data *priv;
1153 void *video_dev; 1151 int instance;
1154 1152
1155 if (debug) 1153 if (debug)
1156 printk(KERN_DEBUG "xc2028: Xcv2028/3028 init called!\n"); 1154 printk(KERN_DEBUG "xc2028: Xcv2028/3028 init called!\n");
@@ -1163,48 +1161,40 @@ struct dvb_frontend *xc2028_attach(struct dvb_frontend *fe,
1163 return NULL; 1161 return NULL;
1164 } 1162 }
1165 1163
1166 video_dev = cfg->i2c_adap->algo_data;
1167
1168 if (debug)
1169 printk(KERN_DEBUG "xc2028: video_dev =%p\n", video_dev);
1170
1171 mutex_lock(&xc2028_list_mutex); 1164 mutex_lock(&xc2028_list_mutex);
1172 1165
1173 list_for_each_entry(priv, &xc2028_list, xc2028_list) { 1166 instance = hybrid_tuner_request_state(struct xc2028_data, priv,
1174 if (&priv->i2c_props.adap->dev == &cfg->i2c_adap->dev) { 1167 hybrid_tuner_instance_list,
1175 video_dev = NULL; 1168 cfg->i2c_adap, cfg->i2c_addr,
1176 if (debug) 1169 "xc2028");
1177 printk(KERN_DEBUG "xc2028: reusing device\n"); 1170 switch (instance) {
1178 1171 case 0:
1179 break; 1172 /* memory allocation failure */
1180 } 1173 goto fail;
1181 } 1174 break;
1182 1175 case 1:
1183 if (video_dev) { 1176 /* new tuner instance */
1184 priv = kzalloc(sizeof(*priv), GFP_KERNEL);
1185 if (priv == NULL) {
1186 mutex_unlock(&xc2028_list_mutex);
1187 return NULL;
1188 }
1189
1190 priv->i2c_props.addr = cfg->i2c_addr;
1191 priv->i2c_props.adap = cfg->i2c_adap;
1192 priv->i2c_props.name = "xc2028";
1193
1194 priv->video_dev = video_dev;
1195 priv->tuner_callback = cfg->callback; 1177 priv->tuner_callback = cfg->callback;
1196 priv->ctrl.max_len = 13; 1178 priv->ctrl.max_len = 13;
1197 1179
1198 mutex_init(&priv->lock); 1180 mutex_init(&priv->lock);
1199 1181
1200 list_add_tail(&priv->xc2028_list, &xc2028_list); 1182 /* analog side (tuner-core) uses i2c_adap->algo_data.
1201 } 1183 * digital side is not guaranteed to have algo_data defined.
1202 1184 *
1203 fe->tuner_priv = priv; 1185 * digital side will always have fe->dvb defined.
1204 priv->count++; 1186 * analog side (tuner-core) doesn't (yet) define fe->dvb.
1187 */
1188 priv->video_dev = ((fe->dvb) && (fe->dvb->priv)) ?
1189 fe->dvb->priv : cfg->i2c_adap->algo_data;
1205 1190
1206 if (debug) 1191 fe->tuner_priv = priv;
1207 printk(KERN_DEBUG "xc2028: usage count is %i\n", priv->count); 1192 break;
1193 case 2:
1194 /* existing tuner instance */
1195 fe->tuner_priv = priv;
1196 break;
1197 }
1208 1198
1209 memcpy(&fe->ops.tuner_ops, &xc2028_dvb_tuner_ops, 1199 memcpy(&fe->ops.tuner_ops, &xc2028_dvb_tuner_ops,
1210 sizeof(xc2028_dvb_tuner_ops)); 1200 sizeof(xc2028_dvb_tuner_ops));
@@ -1217,6 +1207,11 @@ struct dvb_frontend *xc2028_attach(struct dvb_frontend *fe,
1217 mutex_unlock(&xc2028_list_mutex); 1207 mutex_unlock(&xc2028_list_mutex);
1218 1208
1219 return fe; 1209 return fe;
1210fail:
1211 mutex_unlock(&xc2028_list_mutex);
1212
1213 xc2028_dvb_release(fe);
1214 return NULL;
1220} 1215}
1221 1216
1222EXPORT_SYMBOL(xc2028_attach); 1217EXPORT_SYMBOL(xc2028_attach);
diff --git a/drivers/media/common/tuners/xc5000.c b/drivers/media/common/tuners/xc5000.c
index ceae6db901ec..7cf4f5bdb2ec 100644
--- a/drivers/media/common/tuners/xc5000.c
+++ b/drivers/media/common/tuners/xc5000.c
@@ -177,6 +177,7 @@ static XC_TV_STANDARD XC5000_Standard[MAX_TV_STANDARD] = {
177 {"FM Radio-INPUT1", 0x0208, 0x9002} 177 {"FM Radio-INPUT1", 0x0208, 0x9002}
178}; 178};
179 179
180static int xc5000_is_firmware_loaded(struct dvb_frontend *fe);
180static int xc5000_writeregs(struct xc5000_priv *priv, u8 *buf, u8 len); 181static int xc5000_writeregs(struct xc5000_priv *priv, u8 *buf, u8 len);
181static int xc5000_readregs(struct xc5000_priv *priv, u8 *buf, u8 len); 182static int xc5000_readregs(struct xc5000_priv *priv, u8 *buf, u8 len);
182static void xc5000_TunerReset(struct dvb_frontend *fe); 183static void xc5000_TunerReset(struct dvb_frontend *fe);
@@ -352,7 +353,7 @@ static int xc_SetTVStandard(struct xc5000_priv *priv,
352 353
353static int xc_shutdown(struct xc5000_priv *priv) 354static int xc_shutdown(struct xc5000_priv *priv)
354{ 355{
355 return 0; 356 return XC_RESULT_SUCCESS;
356 /* Fixme: cannot bring tuner back alive once shutdown 357 /* Fixme: cannot bring tuner back alive once shutdown
357 * without reloading the driver modules. 358 * without reloading the driver modules.
358 * return xc_write_reg(priv, XREG_POWER_DOWN, 0); 359 * return xc_write_reg(priv, XREG_POWER_DOWN, 0);
@@ -685,6 +686,25 @@ static int xc5000_set_params(struct dvb_frontend *fe,
685 return 0; 686 return 0;
686} 687}
687 688
689static int xc5000_is_firmware_loaded(struct dvb_frontend *fe)
690{
691 struct xc5000_priv *priv = fe->tuner_priv;
692 int ret;
693 u16 id;
694
695 ret = xc5000_readreg(priv, XREG_PRODUCT_ID, &id);
696 if (ret == XC_RESULT_SUCCESS) {
697 if (id == XC_PRODUCT_ID_FW_NOT_LOADED)
698 ret = XC_RESULT_RESET_FAILURE;
699 else
700 ret = XC_RESULT_SUCCESS;
701 }
702
703 dprintk(1, "%s() returns %s id = 0x%x\n", __func__,
704 ret == XC_RESULT_SUCCESS ? "True" : "False", id);
705 return ret;
706}
707
688static int xc_load_fw_and_init_tuner(struct dvb_frontend *fe); 708static int xc_load_fw_and_init_tuner(struct dvb_frontend *fe);
689 709
690static int xc5000_set_analog_params(struct dvb_frontend *fe, 710static int xc5000_set_analog_params(struct dvb_frontend *fe,
@@ -693,7 +713,7 @@ static int xc5000_set_analog_params(struct dvb_frontend *fe,
693 struct xc5000_priv *priv = fe->tuner_priv; 713 struct xc5000_priv *priv = fe->tuner_priv;
694 int ret; 714 int ret;
695 715
696 if(priv->fwloaded == 0) 716 if (xc5000_is_firmware_loaded(fe) != XC_RESULT_SUCCESS)
697 xc_load_fw_and_init_tuner(fe); 717 xc_load_fw_and_init_tuner(fe);
698 718
699 dprintk(1, "%s() frequency=%d (in units of 62.5khz)\n", 719 dprintk(1, "%s() frequency=%d (in units of 62.5khz)\n",
@@ -808,11 +828,10 @@ static int xc_load_fw_and_init_tuner(struct dvb_frontend *fe)
808 struct xc5000_priv *priv = fe->tuner_priv; 828 struct xc5000_priv *priv = fe->tuner_priv;
809 int ret = 0; 829 int ret = 0;
810 830
811 if (priv->fwloaded == 0) { 831 if (xc5000_is_firmware_loaded(fe) != XC_RESULT_SUCCESS) {
812 ret = xc5000_fwupload(fe); 832 ret = xc5000_fwupload(fe);
813 if (ret != XC_RESULT_SUCCESS) 833 if (ret != XC_RESULT_SUCCESS)
814 return ret; 834 return ret;
815 priv->fwloaded = 1;
816 } 835 }
817 836
818 /* Start the tuner self-calibration process */ 837 /* Start the tuner self-calibration process */
@@ -852,7 +871,6 @@ static int xc5000_sleep(struct dvb_frontend *fe)
852 return -EREMOTEIO; 871 return -EREMOTEIO;
853 } 872 }
854 else { 873 else {
855 /* priv->fwloaded = 0; */
856 return XC_RESULT_SUCCESS; 874 return XC_RESULT_SUCCESS;
857 } 875 }
858} 876}
@@ -933,7 +951,6 @@ struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe,
933 cfg->i2c_address); 951 cfg->i2c_address);
934 printk(KERN_INFO 952 printk(KERN_INFO
935 "xc5000: Firmware has been loaded previously\n"); 953 "xc5000: Firmware has been loaded previously\n");
936 priv->fwloaded = 1;
937 break; 954 break;
938 case XC_PRODUCT_ID_FW_NOT_LOADED: 955 case XC_PRODUCT_ID_FW_NOT_LOADED:
939 printk(KERN_INFO 956 printk(KERN_INFO
@@ -941,7 +958,6 @@ struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe,
941 cfg->i2c_address); 958 cfg->i2c_address);
942 printk(KERN_INFO 959 printk(KERN_INFO
943 "xc5000: Firmware has not been loaded previously\n"); 960 "xc5000: Firmware has not been loaded previously\n");
944 priv->fwloaded = 0;
945 break; 961 break;
946 default: 962 default:
947 printk(KERN_ERR 963 printk(KERN_ERR
diff --git a/drivers/media/common/tuners/xc5000_priv.h b/drivers/media/common/tuners/xc5000_priv.h
index ecebfe4745ad..a72a9887fe7f 100644
--- a/drivers/media/common/tuners/xc5000_priv.h
+++ b/drivers/media/common/tuners/xc5000_priv.h
@@ -30,7 +30,6 @@ struct xc5000_priv {
30 u32 bandwidth; 30 u32 bandwidth;
31 u8 video_standard; 31 u8 video_standard;
32 u8 rf_mode; 32 u8 rf_mode;
33 u8 fwloaded;
34 33
35 void *devptr; 34 void *devptr;
36}; 35};
diff --git a/drivers/media/dvb/b2c2/flexcop-usb.c b/drivers/media/dvb/b2c2/flexcop-usb.c
index 449fb5c3d0b1..ae0d76a5d51d 100644
--- a/drivers/media/dvb/b2c2/flexcop-usb.c
+++ b/drivers/media/dvb/b2c2/flexcop-usb.c
@@ -379,7 +379,7 @@ static void flexcop_usb_transfer_exit(struct flexcop_usb *fc_usb)
379 379
380static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb) 380static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb)
381{ 381{
382 u16 frame_size = fc_usb->uintf->cur_altsetting->endpoint[0].desc.wMaxPacketSize; 382 u16 frame_size = le16_to_cpu(fc_usb->uintf->cur_altsetting->endpoint[0].desc.wMaxPacketSize);
383 int bufsize = B2C2_USB_NUM_ISO_URB * B2C2_USB_FRAMES_PER_ISO * frame_size,i,j,ret; 383 int bufsize = B2C2_USB_NUM_ISO_URB * B2C2_USB_FRAMES_PER_ISO * frame_size,i,j,ret;
384 int buffer_offset = 0; 384 int buffer_offset = 0;
385 385
diff --git a/drivers/media/dvb/cinergyT2/cinergyT2.c b/drivers/media/dvb/cinergyT2/cinergyT2.c
index f5010e8671b8..a824f3719f81 100644
--- a/drivers/media/dvb/cinergyT2/cinergyT2.c
+++ b/drivers/media/dvb/cinergyT2/cinergyT2.c
@@ -82,22 +82,22 @@ enum cinergyt2_ep1_cmd {
82 82
83struct dvbt_set_parameters_msg { 83struct dvbt_set_parameters_msg {
84 uint8_t cmd; 84 uint8_t cmd;
85 uint32_t freq; 85 __le32 freq;
86 uint8_t bandwidth; 86 uint8_t bandwidth;
87 uint16_t tps; 87 __le16 tps;
88 uint8_t flags; 88 uint8_t flags;
89} __attribute__((packed)); 89} __attribute__((packed));
90 90
91struct dvbt_get_status_msg { 91struct dvbt_get_status_msg {
92 uint32_t freq; 92 __le32 freq;
93 uint8_t bandwidth; 93 uint8_t bandwidth;
94 uint16_t tps; 94 __le16 tps;
95 uint8_t flags; 95 uint8_t flags;
96 uint16_t gain; 96 __le16 gain;
97 uint8_t snr; 97 uint8_t snr;
98 uint32_t viterbi_error_rate; 98 __le32 viterbi_error_rate;
99 uint32_t rs_error_rate; 99 __le32 rs_error_rate;
100 uint32_t uncorrected_block_count; 100 __le32 uncorrected_block_count;
101 uint8_t lock_bits; 101 uint8_t lock_bits;
102 uint8_t prev_lock_bits; 102 uint8_t prev_lock_bits;
103} __attribute__((packed)); 103} __attribute__((packed));
@@ -136,6 +136,7 @@ struct cinergyt2 {
136 wait_queue_head_t poll_wq; 136 wait_queue_head_t poll_wq;
137 int pending_fe_events; 137 int pending_fe_events;
138 int disconnect_pending; 138 int disconnect_pending;
139 unsigned int uncorrected_block_count;
139 atomic_t inuse; 140 atomic_t inuse;
140 141
141 void *streambuf; 142 void *streambuf;
@@ -147,7 +148,7 @@ struct cinergyt2 {
147 char phys[64]; 148 char phys[64];
148 struct delayed_work rc_query_work; 149 struct delayed_work rc_query_work;
149 int rc_input_event; 150 int rc_input_event;
150 u32 rc_last_code; 151 __le32 rc_last_code;
151 unsigned long last_event_jiffies; 152 unsigned long last_event_jiffies;
152#endif 153#endif
153}; 154};
@@ -160,7 +161,7 @@ enum {
160 161
161struct cinergyt2_rc_event { 162struct cinergyt2_rc_event {
162 char type; 163 char type;
163 uint32_t value; 164 __le32 value;
164} __attribute__((packed)); 165} __attribute__((packed));
165 166
166static const uint32_t rc_keys[] = { 167static const uint32_t rc_keys[] = {
@@ -619,8 +620,11 @@ static int cinergyt2_ioctl (struct inode *inode, struct file *file,
619 { 620 {
620 uint32_t unc_count; 621 uint32_t unc_count;
621 622
622 unc_count = stat->uncorrected_block_count; 623 if (mutex_lock_interruptible(&cinergyt2->sem))
623 stat->uncorrected_block_count = 0; 624 return -ERESTARTSYS;
625 unc_count = cinergyt2->uncorrected_block_count;
626 cinergyt2->uncorrected_block_count = 0;
627 mutex_unlock(&cinergyt2->sem);
624 628
625 /* UNC are already converted to host byte order... */ 629 /* UNC are already converted to host byte order... */
626 return put_user(unc_count,(__u32 __user *) arg); 630 return put_user(unc_count,(__u32 __user *) arg);
@@ -769,7 +773,7 @@ static void cinergyt2_query_rc (struct work_struct *work)
769 input_sync(cinergyt2->rc_input_dev); 773 input_sync(cinergyt2->rc_input_dev);
770 cinergyt2->rc_input_event = KEY_MAX; 774 cinergyt2->rc_input_event = KEY_MAX;
771 } 775 }
772 cinergyt2->rc_last_code = ~0; 776 cinergyt2->rc_last_code = cpu_to_le32(~0);
773 } 777 }
774 goto out; 778 goto out;
775 } 779 }
@@ -780,7 +784,7 @@ static void cinergyt2_query_rc (struct work_struct *work)
780 n, le32_to_cpu(rc_events[n].value), rc_events[n].type); 784 n, le32_to_cpu(rc_events[n].value), rc_events[n].type);
781 785
782 if (rc_events[n].type == CINERGYT2_RC_EVENT_TYPE_NEC && 786 if (rc_events[n].type == CINERGYT2_RC_EVENT_TYPE_NEC &&
783 rc_events[n].value == ~0) { 787 rc_events[n].value == cpu_to_le32(~0)) {
784 /* keyrepeat bit -> just repeat last rc_input_event */ 788 /* keyrepeat bit -> just repeat last rc_input_event */
785 } else { 789 } else {
786 cinergyt2->rc_input_event = KEY_MAX; 790 cinergyt2->rc_input_event = KEY_MAX;
@@ -795,7 +799,7 @@ static void cinergyt2_query_rc (struct work_struct *work)
795 799
796 if (cinergyt2->rc_input_event != KEY_MAX) { 800 if (cinergyt2->rc_input_event != KEY_MAX) {
797 if (rc_events[n].value == cinergyt2->rc_last_code && 801 if (rc_events[n].value == cinergyt2->rc_last_code &&
798 cinergyt2->rc_last_code != ~0) { 802 cinergyt2->rc_last_code != cpu_to_le32(~0)) {
799 /* emit a key-up so the double event is recognized */ 803 /* emit a key-up so the double event is recognized */
800 dprintk(1, "rc_input_event=%d UP\n", cinergyt2->rc_input_event); 804 dprintk(1, "rc_input_event=%d UP\n", cinergyt2->rc_input_event);
801 input_report_key(cinergyt2->rc_input_dev, 805 input_report_key(cinergyt2->rc_input_dev,
@@ -829,7 +833,7 @@ static int cinergyt2_register_rc(struct cinergyt2 *cinergyt2)
829 usb_make_path(cinergyt2->udev, cinergyt2->phys, sizeof(cinergyt2->phys)); 833 usb_make_path(cinergyt2->udev, cinergyt2->phys, sizeof(cinergyt2->phys));
830 strlcat(cinergyt2->phys, "/input0", sizeof(cinergyt2->phys)); 834 strlcat(cinergyt2->phys, "/input0", sizeof(cinergyt2->phys));
831 cinergyt2->rc_input_event = KEY_MAX; 835 cinergyt2->rc_input_event = KEY_MAX;
832 cinergyt2->rc_last_code = ~0; 836 cinergyt2->rc_last_code = cpu_to_le32(~0);
833 INIT_DELAYED_WORK(&cinergyt2->rc_query_work, cinergyt2_query_rc); 837 INIT_DELAYED_WORK(&cinergyt2->rc_query_work, cinergyt2_query_rc);
834 838
835 input_dev->name = DRIVER_NAME " remote control"; 839 input_dev->name = DRIVER_NAME " remote control";
@@ -840,8 +844,8 @@ static int cinergyt2_register_rc(struct cinergyt2 *cinergyt2)
840 input_dev->keycodesize = 0; 844 input_dev->keycodesize = 0;
841 input_dev->keycodemax = 0; 845 input_dev->keycodemax = 0;
842 input_dev->id.bustype = BUS_USB; 846 input_dev->id.bustype = BUS_USB;
843 input_dev->id.vendor = cinergyt2->udev->descriptor.idVendor; 847 input_dev->id.vendor = le16_to_cpu(cinergyt2->udev->descriptor.idVendor);
844 input_dev->id.product = cinergyt2->udev->descriptor.idProduct; 848 input_dev->id.product = le16_to_cpu(cinergyt2->udev->descriptor.idProduct);
845 input_dev->id.version = 1; 849 input_dev->id.version = 1;
846 input_dev->dev.parent = &cinergyt2->udev->dev; 850 input_dev->dev.parent = &cinergyt2->udev->dev;
847 851
@@ -889,18 +893,16 @@ static void cinergyt2_query (struct work_struct *work)
889 char cmd [] = { CINERGYT2_EP1_GET_TUNER_STATUS }; 893 char cmd [] = { CINERGYT2_EP1_GET_TUNER_STATUS };
890 struct dvbt_get_status_msg *s = &cinergyt2->status; 894 struct dvbt_get_status_msg *s = &cinergyt2->status;
891 uint8_t lock_bits; 895 uint8_t lock_bits;
892 uint32_t unc;
893 896
894 if (cinergyt2->disconnect_pending || mutex_lock_interruptible(&cinergyt2->sem)) 897 if (cinergyt2->disconnect_pending || mutex_lock_interruptible(&cinergyt2->sem))
895 return; 898 return;
896 899
897 unc = s->uncorrected_block_count;
898 lock_bits = s->lock_bits; 900 lock_bits = s->lock_bits;
899 901
900 cinergyt2_command(cinergyt2, cmd, sizeof(cmd), (char *) s, sizeof(*s)); 902 cinergyt2_command(cinergyt2, cmd, sizeof(cmd), (char *) s, sizeof(*s));
901 903
902 unc += le32_to_cpu(s->uncorrected_block_count); 904 cinergyt2->uncorrected_block_count +=
903 s->uncorrected_block_count = unc; 905 le32_to_cpu(s->uncorrected_block_count);
904 906
905 if (lock_bits != s->lock_bits) { 907 if (lock_bits != s->lock_bits) {
906 wake_up_interruptible(&cinergyt2->poll_wq); 908 wake_up_interruptible(&cinergyt2->poll_wq);
diff --git a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c
index 56d871cfd7fc..c2334aef4143 100644
--- a/drivers/media/dvb/dvb-core/dvb_net.c
+++ b/drivers/media/dvb/dvb-core/dvb_net.c
@@ -168,7 +168,7 @@ struct dvb_net_priv {
168 * stolen from eth.c out of the linux kernel, hacked for dvb-device 168 * stolen from eth.c out of the linux kernel, hacked for dvb-device
169 * by Michael Holzt <kju@debian.org> 169 * by Michael Holzt <kju@debian.org>
170 */ 170 */
171static unsigned short dvb_net_eth_type_trans(struct sk_buff *skb, 171static __be16 dvb_net_eth_type_trans(struct sk_buff *skb,
172 struct net_device *dev) 172 struct net_device *dev)
173{ 173{
174 struct ethhdr *eth; 174 struct ethhdr *eth;
@@ -277,10 +277,10 @@ static int handle_one_ule_extension( struct dvb_net_priv *p )
277 if(ext_len >= 0) { 277 if(ext_len >= 0) {
278 p->ule_next_hdr += ext_len; 278 p->ule_next_hdr += ext_len;
279 if (!p->ule_bridged) { 279 if (!p->ule_bridged) {
280 p->ule_sndu_type = ntohs(*(unsigned short *)p->ule_next_hdr); 280 p->ule_sndu_type = ntohs(*(__be16 *)p->ule_next_hdr);
281 p->ule_next_hdr += 2; 281 p->ule_next_hdr += 2;
282 } else { 282 } else {
283 p->ule_sndu_type = ntohs(*(unsigned short *)(p->ule_next_hdr + ((p->ule_dbit ? 2 : 3) * ETH_ALEN))); 283 p->ule_sndu_type = ntohs(*(__be16 *)(p->ule_next_hdr + ((p->ule_dbit ? 2 : 3) * ETH_ALEN)));
284 /* This assures the extension handling loop will terminate. */ 284 /* This assures the extension handling loop will terminate. */
285 } 285 }
286 } 286 }
@@ -294,7 +294,7 @@ static int handle_one_ule_extension( struct dvb_net_priv *p )
294 if (ule_optional_ext_handlers[htype]) 294 if (ule_optional_ext_handlers[htype])
295 (void)ule_optional_ext_handlers[htype]( p ); 295 (void)ule_optional_ext_handlers[htype]( p );
296 p->ule_next_hdr += ext_len; 296 p->ule_next_hdr += ext_len;
297 p->ule_sndu_type = ntohs( *(unsigned short *)(p->ule_next_hdr-2) ); 297 p->ule_sndu_type = ntohs( *(__be16 *)(p->ule_next_hdr-2) );
298 /* 298 /*
299 * note: the length of the next header type is included in the 299 * note: the length of the next header type is included in the
300 * length of THIS optional extension header 300 * length of THIS optional extension header
@@ -594,8 +594,8 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len )
594 /* Check for complete payload. */ 594 /* Check for complete payload. */
595 if (priv->ule_sndu_remain <= 0) { 595 if (priv->ule_sndu_remain <= 0) {
596 /* Check CRC32, we've got it in our skb already. */ 596 /* Check CRC32, we've got it in our skb already. */
597 unsigned short ulen = htons(priv->ule_sndu_len); 597 __be16 ulen = htons(priv->ule_sndu_len);
598 unsigned short utype = htons(priv->ule_sndu_type); 598 __be16 utype = htons(priv->ule_sndu_type);
599 const u8 *tail; 599 const u8 *tail;
600 struct kvec iov[3] = { 600 struct kvec iov[3] = {
601 { &ulen, sizeof ulen }, 601 { &ulen, sizeof ulen },
diff --git a/drivers/media/dvb/dvb-usb/Kconfig b/drivers/media/dvb/dvb-usb/Kconfig
index cf4584e48b6d..f00a0eb40420 100644
--- a/drivers/media/dvb/dvb-usb/Kconfig
+++ b/drivers/media/dvb/dvb-usb/Kconfig
@@ -1,6 +1,6 @@
1config DVB_USB 1config DVB_USB
2 tristate "Support for various USB DVB devices" 2 tristate "Support for various USB DVB devices"
3 depends on DVB_CORE && USB && I2C 3 depends on DVB_CORE && USB && I2C && INPUT
4 depends on HOTPLUG # due to FW_LOADER 4 depends on HOTPLUG # due to FW_LOADER
5 select FW_LOADER 5 select FW_LOADER
6 help 6 help
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c
index 346223856f59..c4d40fe01d57 100644
--- a/drivers/media/dvb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c
@@ -111,8 +111,8 @@ static int bristol_tuner_attach(struct dvb_usb_adapter *adap)
111 struct i2c_adapter *tun_i2c = dib3000mc_get_tuner_i2c_master(adap->fe, 1); 111 struct i2c_adapter *tun_i2c = dib3000mc_get_tuner_i2c_master(adap->fe, 1);
112 s8 a; 112 s8 a;
113 int if1=1220; 113 int if1=1220;
114 if (adap->dev->udev->descriptor.idVendor == USB_VID_HAUPPAUGE && 114 if (adap->dev->udev->descriptor.idVendor == cpu_to_le16(USB_VID_HAUPPAUGE) &&
115 adap->dev->udev->descriptor.idProduct == USB_PID_HAUPPAUGE_NOVA_T_500_2) { 115 adap->dev->udev->descriptor.idProduct == cpu_to_le16(USB_PID_HAUPPAUGE_NOVA_T_500_2)) {
116 if (!eeprom_read(prim_i2c,0x59 + adap->id,&a)) if1=1220+a; 116 if (!eeprom_read(prim_i2c,0x59 + adap->id,&a)) if1=1220+a;
117 } 117 }
118 return dvb_attach(mt2060_attach,adap->fe, tun_i2c,&bristol_mt2060_config[adap->id], 118 return dvb_attach(mt2060_attach,adap->fe, tun_i2c,&bristol_mt2060_config[adap->id],
@@ -402,8 +402,8 @@ static int stk7700ph_frontend_attach(struct dvb_usb_adapter *adap)
402{ 402{
403 struct usb_device_descriptor *desc = &adap->dev->udev->descriptor; 403 struct usb_device_descriptor *desc = &adap->dev->udev->descriptor;
404 404
405 if (desc->idVendor == USB_VID_PINNACLE && 405 if (desc->idVendor == cpu_to_le16(USB_VID_PINNACLE) &&
406 desc->idProduct == USB_PID_PINNACLE_EXPRESSCARD_320CX) 406 desc->idProduct == cpu_to_le16(USB_PID_PINNACLE_EXPRESSCARD_320CX))
407 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); 407 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0);
408 else 408 else
409 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); 409 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1);
@@ -845,8 +845,8 @@ static int stk7700p_tuner_attach(struct dvb_usb_adapter *adap)
845 struct i2c_adapter *tun_i2c; 845 struct i2c_adapter *tun_i2c;
846 s8 a; 846 s8 a;
847 int if1=1220; 847 int if1=1220;
848 if (adap->dev->udev->descriptor.idVendor == USB_VID_HAUPPAUGE && 848 if (adap->dev->udev->descriptor.idVendor == cpu_to_le16(USB_VID_HAUPPAUGE) &&
849 adap->dev->udev->descriptor.idProduct == USB_PID_HAUPPAUGE_NOVA_T_STICK) { 849 adap->dev->udev->descriptor.idProduct == cpu_to_le16(USB_PID_HAUPPAUGE_NOVA_T_STICK)) {
850 if (!eeprom_read(prim_i2c,0x58,&a)) if1=1220+a; 850 if (!eeprom_read(prim_i2c,0x58,&a)) if1=1220+a;
851 } 851 }
852 if (st->is_dib7000pc) 852 if (st->is_dib7000pc)
@@ -990,11 +990,12 @@ static struct dib7000p_config dib7070p_dib7000p_config = {
990/* STK7070P */ 990/* STK7070P */
991static int stk7070p_frontend_attach(struct dvb_usb_adapter *adap) 991static int stk7070p_frontend_attach(struct dvb_usb_adapter *adap)
992{ 992{
993 if (adap->dev->udev->descriptor.idVendor == USB_VID_PINNACLE && 993 struct usb_device_descriptor *p = &adap->dev->udev->descriptor;
994 adap->dev->udev->descriptor.idProduct == USB_PID_PINNACLE_PCTV72E) 994 if (p->idVendor == cpu_to_le16(USB_VID_PINNACLE) &&
995 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); 995 p->idProduct == cpu_to_le16(USB_PID_PINNACLE_PCTV72E))
996 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0);
996 else 997 else
997 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); 998 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1);
998 msleep(10); 999 msleep(10);
999 dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); 1000 dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1);
1000 dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); 1001 dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1);
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c b/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c
index e1112e39fb63..733a7ff7b207 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c
@@ -127,7 +127,7 @@ int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx,
127 if ((*pos + hx->len + 4) >= fw->size) 127 if ((*pos + hx->len + 4) >= fw->size)
128 return -EINVAL; 128 return -EINVAL;
129 129
130 hx->addr = le16_to_cpu( *((u16 *) &b[1]) ); 130 hx->addr = b[1] | (b[2] << 8);
131 hx->type = b[3]; 131 hx->type = b[3];
132 132
133 if (hx->type == 0x04) { 133 if (hx->type == 0x04) {
diff --git a/drivers/media/dvb/dvb-usb/gl861.c b/drivers/media/dvb/dvb-usb/gl861.c
index 0a8ac64a4e33..037f7ffb47b2 100644
--- a/drivers/media/dvb/dvb-usb/gl861.c
+++ b/drivers/media/dvb/dvb-usb/gl861.c
@@ -47,6 +47,8 @@ static int gl861_i2c_msg(struct dvb_usb_device *d, u8 addr,
47 return -EINVAL; 47 return -EINVAL;
48 } 48 }
49 49
50 msleep(1); /* avoid I2C errors */
51
50 return usb_control_msg(d->udev, usb_rcvctrlpipe(d->udev, 0), req, type, 52 return usb_control_msg(d->udev, usb_rcvctrlpipe(d->udev, 0), req, type,
51 value, index, rbuf, rlen, 2000); 53 value, index, rbuf, rlen, 2000);
52} 54}
@@ -92,16 +94,6 @@ static struct i2c_algorithm gl861_i2c_algo = {
92}; 94};
93 95
94/* Callbacks for DVB USB */ 96/* Callbacks for DVB USB */
95static int gl861_identify_state(struct usb_device *udev,
96 struct dvb_usb_device_properties *props,
97 struct dvb_usb_device_description **desc,
98 int *cold)
99{
100 *cold = 0;
101
102 return 0;
103}
104
105static struct zl10353_config gl861_zl10353_config = { 97static struct zl10353_config gl861_zl10353_config = {
106 .demod_address = 0x0f, 98 .demod_address = 0x0f,
107 .no_tuner = 1, 99 .no_tuner = 1,
@@ -172,7 +164,6 @@ static struct dvb_usb_device_properties gl861_properties = {
172 164
173 .size_of_priv = 0, 165 .size_of_priv = 0,
174 166
175 .identify_state = gl861_identify_state,
176 .num_adapters = 1, 167 .num_adapters = 1,
177 .adapter = {{ 168 .adapter = {{
178 169
@@ -194,13 +185,15 @@ static struct dvb_usb_device_properties gl861_properties = {
194 185
195 .num_device_descs = 2, 186 .num_device_descs = 2,
196 .devices = { 187 .devices = {
197 { "MSI Mega Sky 55801 DVB-T USB2.0", 188 {
198 { &gl861_table[0], NULL }, 189 .name = "MSI Mega Sky 55801 DVB-T USB2.0",
199 { NULL }, 190 .cold_ids = { NULL },
191 .warm_ids = { &gl861_table[0], NULL },
200 }, 192 },
201 { "A-LINK DTU DVB-T USB2.0", 193 {
202 { &gl861_table[1], NULL }, 194 .name = "A-LINK DTU DVB-T USB2.0",
203 { NULL }, 195 .cold_ids = { NULL },
196 .warm_ids = { &gl861_table[1], NULL },
204 }, 197 },
205 } 198 }
206}; 199};
diff --git a/drivers/media/dvb/dvb-usb/gp8psk.c b/drivers/media/dvb/dvb-usb/gp8psk.c
index 9a942afaf0af..2653120673b7 100644
--- a/drivers/media/dvb/dvb-usb/gp8psk.c
+++ b/drivers/media/dvb/dvb-usb/gp8psk.c
@@ -146,24 +146,24 @@ static int gp8psk_power_ctrl(struct dvb_usb_device *d, int onoff)
146 if (gp_product_id == USB_PID_GENPIX_8PSK_REV_1_WARM) 146 if (gp_product_id == USB_PID_GENPIX_8PSK_REV_1_WARM)
147 if (! (status & bm8pskFW_Loaded)) /* BCM4500 firmware loaded */ 147 if (! (status & bm8pskFW_Loaded)) /* BCM4500 firmware loaded */
148 if(gp8psk_load_bcm4500fw(d)) 148 if(gp8psk_load_bcm4500fw(d))
149 return EINVAL; 149 return -EINVAL;
150 150
151 if (! (status & bmIntersilOn)) /* LNB Power */ 151 if (! (status & bmIntersilOn)) /* LNB Power */
152 if (gp8psk_usb_in_op(d, START_INTERSIL, 1, 0, 152 if (gp8psk_usb_in_op(d, START_INTERSIL, 1, 0,
153 &buf, 1)) 153 &buf, 1))
154 return EINVAL; 154 return -EINVAL;
155 155
156 /* Set DVB mode to 1 */ 156 /* Set DVB mode to 1 */
157 if (gp_product_id == USB_PID_GENPIX_8PSK_REV_1_WARM) 157 if (gp_product_id == USB_PID_GENPIX_8PSK_REV_1_WARM)
158 if (gp8psk_usb_out_op(d, SET_DVB_MODE, 1, 0, NULL, 0)) 158 if (gp8psk_usb_out_op(d, SET_DVB_MODE, 1, 0, NULL, 0))
159 return EINVAL; 159 return -EINVAL;
160 /* Abort possible TS (if previous tune crashed) */ 160 /* Abort possible TS (if previous tune crashed) */
161 if (gp8psk_usb_out_op(d, ARM_TRANSFER, 0, 0, NULL, 0)) 161 if (gp8psk_usb_out_op(d, ARM_TRANSFER, 0, 0, NULL, 0))
162 return EINVAL; 162 return -EINVAL;
163 } else { 163 } else {
164 /* Turn off LNB power */ 164 /* Turn off LNB power */
165 if (gp8psk_usb_in_op(d, START_INTERSIL, 0, 0, &buf, 1)) 165 if (gp8psk_usb_in_op(d, START_INTERSIL, 0, 0, &buf, 1))
166 return EINVAL; 166 return -EINVAL;
167 /* Turn off 8psk power */ 167 /* Turn off 8psk power */
168 if (gp8psk_usb_in_op(d, BOOT_8PSK, 0, 0, &buf, 1)) 168 if (gp8psk_usb_in_op(d, BOOT_8PSK, 0, 0, &buf, 1))
169 return -EINVAL; 169 return -EINVAL;
diff --git a/drivers/media/dvb/dvb-usb/m920x.c b/drivers/media/dvb/dvb-usb/m920x.c
index a12e6f784fda..54626a0dbf68 100644
--- a/drivers/media/dvb/dvb-usb/m920x.c
+++ b/drivers/media/dvb/dvb-usb/m920x.c
@@ -16,6 +16,7 @@
16#include "qt1010.h" 16#include "qt1010.h"
17#include "tda1004x.h" 17#include "tda1004x.h"
18#include "tda827x.h" 18#include "tda827x.h"
19#include <asm/unaligned.h>
19 20
20/* debug */ 21/* debug */
21static int dvb_usb_m920x_debug; 22static int dvb_usb_m920x_debug;
@@ -347,13 +348,13 @@ static int m920x_firmware_download(struct usb_device *udev, const struct firmwar
347 348
348 for (pass = 0; pass < 2; pass++) { 349 for (pass = 0; pass < 2; pass++) {
349 for (i = 0; i + (sizeof(u16) * 3) < fw->size;) { 350 for (i = 0; i + (sizeof(u16) * 3) < fw->size;) {
350 value = le16_to_cpu(*(u16 *)(fw->data + i)); 351 value = get_unaligned_le16(fw->data + i);
351 i += sizeof(u16); 352 i += sizeof(u16);
352 353
353 index = le16_to_cpu(*(u16 *)(fw->data + i)); 354 index = get_unaligned_le16(fw->data + i);
354 i += sizeof(u16); 355 i += sizeof(u16);
355 356
356 size = le16_to_cpu(*(u16 *)(fw->data + i)); 357 size = get_unaligned_le16(fw->data + i);
357 i += sizeof(u16); 358 i += sizeof(u16);
358 359
359 if (pass == 1) { 360 if (pass == 1) {
diff --git a/drivers/media/dvb/dvb-usb/umt-010.c b/drivers/media/dvb/dvb-usb/umt-010.c
index 9e7653bb3b66..118aab1a3e54 100644
--- a/drivers/media/dvb/dvb-usb/umt-010.c
+++ b/drivers/media/dvb/dvb-usb/umt-010.c
@@ -107,7 +107,7 @@ static struct dvb_usb_device_properties umt_properties = {
107 /* parameter for the MPEG2-data transfer */ 107 /* parameter for the MPEG2-data transfer */
108 .stream = { 108 .stream = {
109 .type = USB_BULK, 109 .type = USB_BULK,
110 .count = 20, 110 .count = MAX_NO_URBS_FOR_DATA_STREAM,
111 .endpoint = 0x06, 111 .endpoint = 0x06,
112 .u = { 112 .u = {
113 .bulk = { 113 .bulk = {
diff --git a/drivers/media/dvb/frontends/au8522.c b/drivers/media/dvb/frontends/au8522.c
index 084a280c2d7f..03900d241a76 100644
--- a/drivers/media/dvb/frontends/au8522.c
+++ b/drivers/media/dvb/frontends/au8522.c
@@ -463,10 +463,13 @@ static int au8522_set_frontend(struct dvb_frontend *fe,
463 struct dvb_frontend_parameters *p) 463 struct dvb_frontend_parameters *p)
464{ 464{
465 struct au8522_state *state = fe->demodulator_priv; 465 struct au8522_state *state = fe->demodulator_priv;
466 int ret = -EINVAL;
466 467
467 dprintk("%s(frequency=%d)\n", __func__, p->frequency); 468 dprintk("%s(frequency=%d)\n", __func__, p->frequency);
468 469
469 state->current_frequency = p->frequency; 470 if ((state->current_frequency == p->frequency) &&
471 (state->current_modulation == p->u.vsb.modulation))
472 return 0;
470 473
471 au8522_enable_modulation(fe, p->u.vsb.modulation); 474 au8522_enable_modulation(fe, p->u.vsb.modulation);
472 475
@@ -476,11 +479,16 @@ static int au8522_set_frontend(struct dvb_frontend *fe,
476 if (fe->ops.tuner_ops.set_params) { 479 if (fe->ops.tuner_ops.set_params) {
477 if (fe->ops.i2c_gate_ctrl) 480 if (fe->ops.i2c_gate_ctrl)
478 fe->ops.i2c_gate_ctrl(fe, 1); 481 fe->ops.i2c_gate_ctrl(fe, 1);
479 fe->ops.tuner_ops.set_params(fe, p); 482 ret = fe->ops.tuner_ops.set_params(fe, p);
480 if (fe->ops.i2c_gate_ctrl) 483 if (fe->ops.i2c_gate_ctrl)
481 fe->ops.i2c_gate_ctrl(fe, 0); 484 fe->ops.i2c_gate_ctrl(fe, 0);
482 } 485 }
483 486
487 if (ret < 0)
488 return ret;
489
490 state->current_frequency = p->frequency;
491
484 return 0; 492 return 0;
485} 493}
486 494
@@ -498,6 +506,16 @@ static int au8522_init(struct dvb_frontend *fe)
498 return 0; 506 return 0;
499} 507}
500 508
509static int au8522_sleep(struct dvb_frontend *fe)
510{
511 struct au8522_state *state = fe->demodulator_priv;
512 dprintk("%s()\n", __func__);
513
514 state->current_frequency = 0;
515
516 return 0;
517}
518
501static int au8522_read_status(struct dvb_frontend *fe, fe_status_t *status) 519static int au8522_read_status(struct dvb_frontend *fe, fe_status_t *status)
502{ 520{
503 struct au8522_state *state = fe->demodulator_priv; 521 struct au8522_state *state = fe->demodulator_priv;
@@ -509,10 +527,8 @@ static int au8522_read_status(struct dvb_frontend *fe, fe_status_t *status)
509 if (state->current_modulation == VSB_8) { 527 if (state->current_modulation == VSB_8) {
510 dprintk("%s() Checking VSB_8\n", __func__); 528 dprintk("%s() Checking VSB_8\n", __func__);
511 reg = au8522_readreg(state, 0x4088); 529 reg = au8522_readreg(state, 0x4088);
512 if (reg & 0x01) 530 if ((reg & 0x03) == 0x03)
513 *status |= FE_HAS_VITERBI; 531 *status |= FE_HAS_LOCK | FE_HAS_SYNC | FE_HAS_VITERBI;
514 if (reg & 0x02)
515 *status |= FE_HAS_LOCK | FE_HAS_SYNC;
516 } else { 532 } else {
517 dprintk("%s() Checking QAM\n", __func__); 533 dprintk("%s() Checking QAM\n", __func__);
518 reg = au8522_readreg(state, 0x4541); 534 reg = au8522_readreg(state, 0x4541);
@@ -672,6 +688,7 @@ static struct dvb_frontend_ops au8522_ops = {
672 }, 688 },
673 689
674 .init = au8522_init, 690 .init = au8522_init,
691 .sleep = au8522_sleep,
675 .i2c_gate_ctrl = au8522_i2c_gate_ctrl, 692 .i2c_gate_ctrl = au8522_i2c_gate_ctrl,
676 .set_frontend = au8522_set_frontend, 693 .set_frontend = au8522_set_frontend,
677 .get_frontend = au8522_get_frontend, 694 .get_frontend = au8522_get_frontend,
diff --git a/drivers/media/dvb/frontends/dib0070.h b/drivers/media/dvb/frontends/dib0070.h
index 786e37d33889..3eedfdf505bc 100644
--- a/drivers/media/dvb/frontends/dib0070.h
+++ b/drivers/media/dvb/frontends/dib0070.h
@@ -37,7 +37,20 @@ struct dib0070_config {
37 u8 flip_chip; 37 u8 flip_chip;
38}; 38};
39 39
40extern struct dvb_frontend * dib0070_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct dib0070_config *cfg); 40#if defined(CONFIG_DVB_TUNER_DIB0070) || (defined(CONFIG_DVB_TUNER_DIB0070_MODULE) && defined(MODULE))
41extern struct dvb_frontend *dib0070_attach(struct dvb_frontend *fe,
42 struct i2c_adapter *i2c,
43 struct dib0070_config *cfg);
44#else
45static inline struct dvb_frontend *dib0070_attach(struct dvb_frontend *fe,
46 struct i2c_adapter *i2c,
47 struct dib0070_config *cfg)
48{
49 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
50 return NULL;
51}
52#endif
53
41extern void dib0070_ctrl_agc_filter(struct dvb_frontend *, uint8_t open); 54extern void dib0070_ctrl_agc_filter(struct dvb_frontend *, uint8_t open);
42extern u16 dib0070_wbd_offset(struct dvb_frontend *); 55extern u16 dib0070_wbd_offset(struct dvb_frontend *);
43 56
diff --git a/drivers/media/dvb/frontends/dib7000p.h b/drivers/media/dvb/frontends/dib7000p.h
index 081bd81f3da2..07c4d12ed5b7 100644
--- a/drivers/media/dvb/frontends/dib7000p.h
+++ b/drivers/media/dvb/frontends/dib7000p.h
@@ -37,7 +37,20 @@ struct dib7000p_config {
37 37
38#define DEFAULT_DIB7000P_I2C_ADDRESS 18 38#define DEFAULT_DIB7000P_I2C_ADDRESS 18
39 39
40extern struct dvb_frontend * dib7000p_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, struct dib7000p_config *cfg); 40#if defined(CONFIG_DVB_DIB7000P) || (defined(CONFIG_DVB_DIB7000P_MODULE) && defined(MODULE))
41extern struct dvb_frontend *dib7000p_attach(struct i2c_adapter *i2c_adap,
42 u8 i2c_addr,
43 struct dib7000p_config *cfg);
44#else
45static inline struct dvb_frontend *dib7000p_attach(struct i2c_adapter *i2c_adap,
46 u8 i2c_addr,
47 struct dib7000p_config *cfg)
48{
49 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
50 return NULL;
51}
52#endif
53
41extern int dib7000p_i2c_enumeration(struct i2c_adapter *i2c, int no_of_demods, u8 default_addr, struct dib7000p_config cfg[]); 54extern int dib7000p_i2c_enumeration(struct i2c_adapter *i2c, int no_of_demods, u8 default_addr, struct dib7000p_config cfg[]);
42 55
43extern struct i2c_adapter * dib7000p_get_i2c_master(struct dvb_frontend *, enum dibx000_i2c_interface, int); 56extern struct i2c_adapter * dib7000p_get_i2c_master(struct dvb_frontend *, enum dibx000_i2c_interface, int);
diff --git a/drivers/media/dvb/frontends/or51132.c b/drivers/media/dvb/frontends/or51132.c
index c7b5785f81f2..5ed32544de39 100644
--- a/drivers/media/dvb/frontends/or51132.c
+++ b/drivers/media/dvb/frontends/or51132.c
@@ -126,7 +126,7 @@ static int or51132_readreg(struct or51132_state *state, u8 reg)
126 reg, err); 126 reg, err);
127 return -EREMOTEIO; 127 return -EREMOTEIO;
128 } 128 }
129 return le16_to_cpup((u16*)buf); 129 return buf[0] | (buf[1] << 8);
130} 130}
131 131
132static int or51132_load_firmware (struct dvb_frontend* fe, const struct firmware *fw) 132static int or51132_load_firmware (struct dvb_frontend* fe, const struct firmware *fw)
@@ -140,9 +140,9 @@ static int or51132_load_firmware (struct dvb_frontend* fe, const struct firmware
140 dprintk("Firmware is %Zd bytes\n",fw->size); 140 dprintk("Firmware is %Zd bytes\n",fw->size);
141 141
142 /* Get size of firmware A and B */ 142 /* Get size of firmware A and B */
143 firmwareAsize = le32_to_cpu(*((u32*)fw->data)); 143 firmwareAsize = le32_to_cpu(*((__le32*)fw->data));
144 dprintk("FirmwareA is %i bytes\n",firmwareAsize); 144 dprintk("FirmwareA is %i bytes\n",firmwareAsize);
145 firmwareBsize = le32_to_cpu(*((u32*)(fw->data+4))); 145 firmwareBsize = le32_to_cpu(*((__le32*)(fw->data+4)));
146 dprintk("FirmwareB is %i bytes\n",firmwareBsize); 146 dprintk("FirmwareB is %i bytes\n",firmwareBsize);
147 147
148 /* Upload firmware */ 148 /* Upload firmware */
diff --git a/drivers/media/dvb/frontends/stv0299.c b/drivers/media/dvb/frontends/stv0299.c
index 17556183e871..35435bef8e79 100644
--- a/drivers/media/dvb/frontends/stv0299.c
+++ b/drivers/media/dvb/frontends/stv0299.c
@@ -63,6 +63,7 @@ struct stv0299_state {
63 u32 symbol_rate; 63 u32 symbol_rate;
64 fe_code_rate_t fec_inner; 64 fe_code_rate_t fec_inner;
65 int errmode; 65 int errmode;
66 u32 ucblocks;
66}; 67};
67 68
68#define STATUS_BER 0 69#define STATUS_BER 0
@@ -501,8 +502,10 @@ static int stv0299_read_ber(struct dvb_frontend* fe, u32* ber)
501{ 502{
502 struct stv0299_state* state = fe->demodulator_priv; 503 struct stv0299_state* state = fe->demodulator_priv;
503 504
504 if (state->errmode != STATUS_BER) return 0; 505 if (state->errmode != STATUS_BER)
505 *ber = (stv0299_readreg (state, 0x1d) << 8) | stv0299_readreg (state, 0x1e); 506 return -ENOSYS;
507
508 *ber = stv0299_readreg(state, 0x1e) | (stv0299_readreg(state, 0x1d) << 8);
506 509
507 return 0; 510 return 0;
508} 511}
@@ -540,8 +543,12 @@ static int stv0299_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
540{ 543{
541 struct stv0299_state* state = fe->demodulator_priv; 544 struct stv0299_state* state = fe->demodulator_priv;
542 545
543 if (state->errmode != STATUS_UCBLOCKS) *ucblocks = 0; 546 if (state->errmode != STATUS_UCBLOCKS)
544 else *ucblocks = (stv0299_readreg (state, 0x1d) << 8) | stv0299_readreg (state, 0x1e); 547 return -ENOSYS;
548
549 state->ucblocks += stv0299_readreg(state, 0x1e);
550 state->ucblocks += (stv0299_readreg(state, 0x1d) << 8);
551 *ucblocks = state->ucblocks;
545 552
546 return 0; 553 return 0;
547} 554}
diff --git a/drivers/media/dvb/frontends/tda10023.c b/drivers/media/dvb/frontends/tda10023.c
index 0727b80bc4d2..c6ff5b82ff80 100644
--- a/drivers/media/dvb/frontends/tda10023.c
+++ b/drivers/media/dvb/frontends/tda10023.c
@@ -116,9 +116,12 @@ static u8 tda10023_readreg (struct tda10023_state* state, u8 reg)
116 int ret; 116 int ret;
117 117
118 ret = i2c_transfer (state->i2c, msg, 2); 118 ret = i2c_transfer (state->i2c, msg, 2);
119 if (ret != 2) 119 if (ret != 2) {
120 printk("DVB: TDA10023: %s: readreg error (ret == %i)\n", 120 int num = state->frontend.dvb ? state->frontend.dvb->num : -1;
121 __func__, ret); 121 printk(KERN_ERR "DVB: TDA10023(%d): %s: readreg error "
122 "(reg == 0x%02x, ret == %i)\n",
123 num, __func__, reg, ret);
124 }
122 return b1[0]; 125 return b1[0];
123} 126}
124 127
@@ -129,11 +132,12 @@ static int tda10023_writereg (struct tda10023_state* state, u8 reg, u8 data)
129 int ret; 132 int ret;
130 133
131 ret = i2c_transfer (state->i2c, &msg, 1); 134 ret = i2c_transfer (state->i2c, &msg, 1);
132 if (ret != 1) 135 if (ret != 1) {
133 printk("DVB: TDA10023(%d): %s, writereg error " 136 int num = state->frontend.dvb ? state->frontend.dvb->num : -1;
137 printk(KERN_ERR "DVB: TDA10023(%d): %s, writereg error "
134 "(reg == 0x%02x, val == 0x%02x, ret == %i)\n", 138 "(reg == 0x%02x, val == 0x%02x, ret == %i)\n",
135 state->frontend.dvb->num, __func__, reg, data, ret); 139 num, __func__, reg, data, ret);
136 140 }
137 return (ret != 1) ? -EREMOTEIO : 0; 141 return (ret != 1) ? -EREMOTEIO : 0;
138} 142}
139 143
@@ -464,7 +468,7 @@ struct dvb_frontend* tda10023_attach(const struct tda1002x_config* config,
464 int i; 468 int i;
465 469
466 /* allocate memory for the internal state */ 470 /* allocate memory for the internal state */
467 state = kmalloc(sizeof(struct tda10023_state), GFP_KERNEL); 471 state = kzalloc(sizeof(struct tda10023_state), GFP_KERNEL);
468 if (state == NULL) goto error; 472 if (state == NULL) goto error;
469 473
470 /* setup the state */ 474 /* setup the state */
diff --git a/drivers/media/dvb/frontends/tda1004x.c b/drivers/media/dvb/frontends/tda1004x.c
index 49973846373e..a0d638653567 100644
--- a/drivers/media/dvb/frontends/tda1004x.c
+++ b/drivers/media/dvb/frontends/tda1004x.c
@@ -1248,11 +1248,14 @@ struct dvb_frontend* tda10045_attach(const struct tda1004x_config* config,
1248 struct i2c_adapter* i2c) 1248 struct i2c_adapter* i2c)
1249{ 1249{
1250 struct tda1004x_state *state; 1250 struct tda1004x_state *state;
1251 int id;
1251 1252
1252 /* allocate memory for the internal state */ 1253 /* allocate memory for the internal state */
1253 state = kmalloc(sizeof(struct tda1004x_state), GFP_KERNEL); 1254 state = kmalloc(sizeof(struct tda1004x_state), GFP_KERNEL);
1254 if (!state) 1255 if (!state) {
1256 printk(KERN_ERR "Can't alocate memory for tda10045 state\n");
1255 return NULL; 1257 return NULL;
1258 }
1256 1259
1257 /* setup the state */ 1260 /* setup the state */
1258 state->config = config; 1261 state->config = config;
@@ -1260,7 +1263,15 @@ struct dvb_frontend* tda10045_attach(const struct tda1004x_config* config,
1260 state->demod_type = TDA1004X_DEMOD_TDA10045; 1263 state->demod_type = TDA1004X_DEMOD_TDA10045;
1261 1264
1262 /* check if the demod is there */ 1265 /* check if the demod is there */
1263 if (tda1004x_read_byte(state, TDA1004X_CHIPID) != 0x25) { 1266 id = tda1004x_read_byte(state, TDA1004X_CHIPID);
1267 if (id < 0) {
1268 printk(KERN_ERR "tda10045: chip is not answering. Giving up.\n");
1269 kfree(state);
1270 return NULL;
1271 }
1272
1273 if (id != 0x25) {
1274 printk(KERN_ERR "Invalid tda1004x ID = 0x%02x. Can't proceed\n", id);
1264 kfree(state); 1275 kfree(state);
1265 return NULL; 1276 return NULL;
1266 } 1277 }
@@ -1307,11 +1318,14 @@ struct dvb_frontend* tda10046_attach(const struct tda1004x_config* config,
1307 struct i2c_adapter* i2c) 1318 struct i2c_adapter* i2c)
1308{ 1319{
1309 struct tda1004x_state *state; 1320 struct tda1004x_state *state;
1321 int id;
1310 1322
1311 /* allocate memory for the internal state */ 1323 /* allocate memory for the internal state */
1312 state = kmalloc(sizeof(struct tda1004x_state), GFP_KERNEL); 1324 state = kmalloc(sizeof(struct tda1004x_state), GFP_KERNEL);
1313 if (!state) 1325 if (!state) {
1326 printk(KERN_ERR "Can't alocate memory for tda10046 state\n");
1314 return NULL; 1327 return NULL;
1328 }
1315 1329
1316 /* setup the state */ 1330 /* setup the state */
1317 state->config = config; 1331 state->config = config;
@@ -1319,7 +1333,14 @@ struct dvb_frontend* tda10046_attach(const struct tda1004x_config* config,
1319 state->demod_type = TDA1004X_DEMOD_TDA10046; 1333 state->demod_type = TDA1004X_DEMOD_TDA10046;
1320 1334
1321 /* check if the demod is there */ 1335 /* check if the demod is there */
1322 if (tda1004x_read_byte(state, TDA1004X_CHIPID) != 0x46) { 1336 id = tda1004x_read_byte(state, TDA1004X_CHIPID);
1337 if (id < 0) {
1338 printk(KERN_ERR "tda10046: chip is not answering. Giving up.\n");
1339 kfree(state);
1340 return NULL;
1341 }
1342 if (id != 0x46) {
1343 printk(KERN_ERR "Invalid tda1004x ID = 0x%02x. Can't proceed\n", id);
1323 kfree(state); 1344 kfree(state);
1324 return NULL; 1345 return NULL;
1325 } 1346 }
diff --git a/drivers/media/dvb/ttpci/Kconfig b/drivers/media/dvb/ttpci/Kconfig
index d4339b1b3b68..07643e010093 100644
--- a/drivers/media/dvb/ttpci/Kconfig
+++ b/drivers/media/dvb/ttpci/Kconfig
@@ -101,6 +101,7 @@ config DVB_BUDGET
101config DVB_BUDGET_CI 101config DVB_BUDGET_CI
102 tristate "Budget cards with onboard CI connector" 102 tristate "Budget cards with onboard CI connector"
103 depends on DVB_BUDGET_CORE && I2C 103 depends on DVB_BUDGET_CORE && I2C
104 depends on INPUT # due to IR
104 select DVB_STV0297 if !DVB_FE_CUSTOMISE 105 select DVB_STV0297 if !DVB_FE_CUSTOMISE
105 select DVB_STV0299 if !DVB_FE_CUSTOMISE 106 select DVB_STV0299 if !DVB_FE_CUSTOMISE
106 select DVB_TDA1004X if !DVB_FE_CUSTOMISE 107 select DVB_TDA1004X if !DVB_FE_CUSTOMISE
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c
index 747e7f1a6267..f05d43d8b5cf 100644
--- a/drivers/media/dvb/ttpci/av7110.c
+++ b/drivers/media/dvb/ttpci/av7110.c
@@ -51,6 +51,7 @@
51#include <linux/crc32.h> 51#include <linux/crc32.h>
52#include <linux/i2c.h> 52#include <linux/i2c.h>
53#include <linux/kthread.h> 53#include <linux/kthread.h>
54#include <asm/unaligned.h>
54 55
55#include <asm/system.h> 56#include <asm/system.h>
56 57
@@ -1461,9 +1462,9 @@ static int check_firmware(struct av7110* av7110)
1461 ptr += 4; 1462 ptr += 4;
1462 1463
1463 /* check dpram file */ 1464 /* check dpram file */
1464 crc = ntohl(*(u32*) ptr); 1465 crc = get_unaligned_be32(ptr);
1465 ptr += 4; 1466 ptr += 4;
1466 len = ntohl(*(u32*) ptr); 1467 len = get_unaligned_be32(ptr);
1467 ptr += 4; 1468 ptr += 4;
1468 if (len >= 512) { 1469 if (len >= 512) {
1469 printk("dvb-ttpci: dpram file is way too big.\n"); 1470 printk("dvb-ttpci: dpram file is way too big.\n");
@@ -1478,9 +1479,9 @@ static int check_firmware(struct av7110* av7110)
1478 ptr += len; 1479 ptr += len;
1479 1480
1480 /* check root file */ 1481 /* check root file */
1481 crc = ntohl(*(u32*) ptr); 1482 crc = get_unaligned_be32(ptr);
1482 ptr += 4; 1483 ptr += 4;
1483 len = ntohl(*(u32*) ptr); 1484 len = get_unaligned_be32(ptr);
1484 ptr += 4; 1485 ptr += 4;
1485 1486
1486 if (len <= 200000 || len >= 300000 || 1487 if (len <= 200000 || len >= 300000 ||
diff --git a/drivers/media/dvb/ttpci/av7110_av.c b/drivers/media/dvb/ttpci/av7110_av.c
index 3e6b650fbb81..ec55a968f204 100644
--- a/drivers/media/dvb/ttpci/av7110_av.c
+++ b/drivers/media/dvb/ttpci/av7110_av.c
@@ -965,8 +965,9 @@ static u8 iframe_header[] = { 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x80, 0x00, 0x
965 965
966static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len, int nonblock) 966static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len, int nonblock)
967{ 967{
968 int i, n; 968 unsigned i, n;
969 int progressive = 0; 969 int progressive = 0;
970 int match = 0;
970 971
971 dprintk(2, "av7110:%p, \n", av7110); 972 dprintk(2, "av7110:%p, \n", av7110);
972 973
@@ -975,12 +976,31 @@ static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len
975 return -EBUSY; 976 return -EBUSY;
976 } 977 }
977 978
978 for (i = 0; i < len - 5; i++) { 979 /* search in buf for instances of 00 00 01 b5 1? */
979 /* get progressive flag from picture extension */ 980 for (i = 0; i < len; i++) {
980 if (buf[i] == 0x00 && buf[i+1] == 0x00 && 981 unsigned char c;
981 buf[i+2] == 0x01 && (unsigned char)buf[i+3] == 0xb5 && 982 if (get_user(c, buf + i))
982 (buf[i+4] & 0xf0) == 0x10) 983 return -EFAULT;
983 progressive = buf[i+5] & 0x08; 984 if (match == 5) {
985 progressive = c & 0x08;
986 match = 0;
987 }
988 if (c == 0x00) {
989 match = (match == 1 || match == 2) ? 2 : 1;
990 continue;
991 }
992 switch (match++) {
993 case 2: if (c == 0x01)
994 continue;
995 break;
996 case 3: if (c == 0xb5)
997 continue;
998 break;
999 case 4: if ((c & 0xf0) == 0x10)
1000 continue;
1001 break;
1002 }
1003 match = 0;
984 } 1004 }
985 1005
986 /* setting n always > 1, fixes problems when playing stillframes 1006 /* setting n always > 1, fixes problems when playing stillframes
diff --git a/drivers/media/dvb/ttpci/av7110_hw.c b/drivers/media/dvb/ttpci/av7110_hw.c
index 9d81074b31df..3a3f5279e927 100644
--- a/drivers/media/dvb/ttpci/av7110_hw.c
+++ b/drivers/media/dvb/ttpci/av7110_hw.c
@@ -427,6 +427,7 @@ static int __av7110_send_fw_cmd(struct av7110 *av7110, u16* buf, int length)
427 if (err) { 427 if (err) {
428 printk(KERN_ERR "%s: timeout waiting on busy %s QUEUE\n", 428 printk(KERN_ERR "%s: timeout waiting on busy %s QUEUE\n",
429 __func__, type); 429 __func__, type);
430 av7110->arm_errors++;
430 return -ETIMEDOUT; 431 return -ETIMEDOUT;
431 } 432 }
432 msleep(1); 433 msleep(1);
@@ -853,10 +854,8 @@ static osd_raw_window_t bpp2bit[8] = {
853 854
854static inline int WaitUntilBmpLoaded(struct av7110 *av7110) 855static inline int WaitUntilBmpLoaded(struct av7110 *av7110)
855{ 856{
856 int ret = wait_event_interruptible_timeout(av7110->bmpq, 857 int ret = wait_event_timeout(av7110->bmpq,
857 av7110->bmp_state != BMP_LOADING, 10*HZ); 858 av7110->bmp_state != BMP_LOADING, 10*HZ);
858 if (ret == -ERESTARTSYS)
859 return ret;
860 if (ret == 0) { 859 if (ret == 0) {
861 printk("dvb-ttpci: warning: timeout waiting in LoadBitmap: %d, %d\n", 860 printk("dvb-ttpci: warning: timeout waiting in LoadBitmap: %d, %d\n",
862 ret, av7110->bmp_state); 861 ret, av7110->bmp_state);
diff --git a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
index 732ce4de512e..5d2d81ab2371 100644
--- a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
+++ b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
@@ -552,7 +552,7 @@ static void ttusb_process_muxpack(struct ttusb *ttusb, const u8 * muxpack,
552 u16 csum = 0, cc; 552 u16 csum = 0, cc;
553 int i; 553 int i;
554 for (i = 0; i < len; i += 2) 554 for (i = 0; i < len; i += 2)
555 csum ^= le16_to_cpup((u16 *) (muxpack + i)); 555 csum ^= le16_to_cpup((__le16 *) (muxpack + i));
556 if (csum) { 556 if (csum) {
557 printk("%s: muxpack with incorrect checksum, ignoring\n", 557 printk("%s: muxpack with incorrect checksum, ignoring\n",
558 __func__); 558 __func__);
diff --git a/drivers/media/dvb/ttusb-dec/Kconfig b/drivers/media/dvb/ttusb-dec/Kconfig
index 0712899e39a4..a23cc0aa17d3 100644
--- a/drivers/media/dvb/ttusb-dec/Kconfig
+++ b/drivers/media/dvb/ttusb-dec/Kconfig
@@ -1,6 +1,6 @@
1config DVB_TTUSB_DEC 1config DVB_TTUSB_DEC
2 tristate "Technotrend/Hauppauge USB DEC devices" 2 tristate "Technotrend/Hauppauge USB DEC devices"
3 depends on DVB_CORE && USB 3 depends on DVB_CORE && USB && INPUT
4 depends on HOTPLUG # due to FW_LOADER 4 depends on HOTPLUG # due to FW_LOADER
5 select FW_LOADER 5 select FW_LOADER
6 select CRC32 6 select CRC32
diff --git a/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/drivers/media/dvb/ttusb-dec/ttusb_dec.c
index 42eee04daa5d..fefdc05e84ac 100644
--- a/drivers/media/dvb/ttusb-dec/ttusb_dec.c
+++ b/drivers/media/dvb/ttusb-dec/ttusb_dec.c
@@ -343,7 +343,7 @@ static int ttusb_dec_get_stb_state (struct ttusb_dec *dec, unsigned int *mode,
343 u8 c[COMMAND_PACKET_SIZE]; 343 u8 c[COMMAND_PACKET_SIZE];
344 int c_length; 344 int c_length;
345 int result; 345 int result;
346 unsigned int tmp; 346 __be32 tmp;
347 347
348 dprintk("%s\n", __func__); 348 dprintk("%s\n", __func__);
349 349
@@ -398,9 +398,9 @@ static void ttusb_dec_set_pids(struct ttusb_dec *dec)
398 0x00, 0x00, 0xff, 0xff, 398 0x00, 0x00, 0xff, 0xff,
399 0xff, 0xff, 0xff, 0xff }; 399 0xff, 0xff, 0xff, 0xff };
400 400
401 u16 pcr = htons(dec->pid[DMX_PES_PCR]); 401 __be16 pcr = htons(dec->pid[DMX_PES_PCR]);
402 u16 audio = htons(dec->pid[DMX_PES_AUDIO]); 402 __be16 audio = htons(dec->pid[DMX_PES_AUDIO]);
403 u16 video = htons(dec->pid[DMX_PES_VIDEO]); 403 __be16 video = htons(dec->pid[DMX_PES_VIDEO]);
404 404
405 dprintk("%s\n", __func__); 405 dprintk("%s\n", __func__);
406 406
@@ -435,7 +435,7 @@ static void ttusb_dec_process_pva(struct ttusb_dec *dec, u8 *pva, int length)
435 case 0x01: { /* VideoStream */ 435 case 0x01: { /* VideoStream */
436 int prebytes = pva[5] & 0x03; 436 int prebytes = pva[5] & 0x03;
437 int postbytes = (pva[5] & 0x0c) >> 2; 437 int postbytes = (pva[5] & 0x0c) >> 2;
438 u16 v_pes_payload_length; 438 __be16 v_pes_payload_length;
439 439
440 if (output_pva) { 440 if (output_pva) {
441 dec->video_filter->feed->cb.ts(pva, length, NULL, 0, 441 dec->video_filter->feed->cb.ts(pva, length, NULL, 0,
@@ -1006,7 +1006,7 @@ static int ttusb_dec_start_sec_feed(struct dvb_demux_feed *dvbdmxfeed)
1006 0x00, 0x00, 0x00, 0x00, 1006 0x00, 0x00, 0x00, 0x00,
1007 0x00, 0x00, 0x00, 0x00, 1007 0x00, 0x00, 0x00, 0x00,
1008 0x00 }; 1008 0x00 };
1009 u16 pid; 1009 __be16 pid;
1010 u8 c[COMMAND_PACKET_SIZE]; 1010 u8 c[COMMAND_PACKET_SIZE];
1011 int c_length; 1011 int c_length;
1012 int result; 1012 int result;
@@ -1278,9 +1278,10 @@ static int ttusb_dec_boot_dsp(struct ttusb_dec *dec)
1278 u8 *firmware = NULL; 1278 u8 *firmware = NULL;
1279 size_t firmware_size = 0; 1279 size_t firmware_size = 0;
1280 u16 firmware_csum = 0; 1280 u16 firmware_csum = 0;
1281 u16 firmware_csum_ns; 1281 __be16 firmware_csum_ns;
1282 u32 firmware_size_nl; 1282 __be32 firmware_size_nl;
1283 u32 crc32_csum, crc32_check, tmp; 1283 u32 crc32_csum, crc32_check;
1284 __be32 tmp;
1284 const struct firmware *fw_entry = NULL; 1285 const struct firmware *fw_entry = NULL;
1285 1286
1286 dprintk("%s\n", __func__); 1287 dprintk("%s\n", __func__);
@@ -1306,7 +1307,7 @@ static int ttusb_dec_boot_dsp(struct ttusb_dec *dec)
1306 valid. */ 1307 valid. */
1307 crc32_csum = crc32(~0L, firmware, 56) ^ ~0L; 1308 crc32_csum = crc32(~0L, firmware, 56) ^ ~0L;
1308 memcpy(&tmp, &firmware[56], 4); 1309 memcpy(&tmp, &firmware[56], 4);
1309 crc32_check = htonl(tmp); 1310 crc32_check = ntohl(tmp);
1310 if (crc32_csum != crc32_check) { 1311 if (crc32_csum != crc32_check) {
1311 printk("%s: crc32 check of DSP code failed (calculated " 1312 printk("%s: crc32 check of DSP code failed (calculated "
1312 "0x%08x != 0x%08x in file), file invalid.\n", 1313 "0x%08x != 0x%08x in file), file invalid.\n",
@@ -1627,7 +1628,7 @@ static int ttusb_dec_probe(struct usb_interface *intf,
1627 1628
1628 usb_set_intfdata(intf, (void *)dec); 1629 usb_set_intfdata(intf, (void *)dec);
1629 1630
1630 switch (le16_to_cpu(id->idProduct)) { 1631 switch (id->idProduct) {
1631 case 0x1006: 1632 case 0x1006:
1632 ttusb_dec_set_model(dec, TTUSB_DEC3000S); 1633 ttusb_dec_set_model(dec, TTUSB_DEC3000S);
1633 break; 1634 break;
@@ -1652,7 +1653,7 @@ static int ttusb_dec_probe(struct usb_interface *intf,
1652 ttusb_dec_init_dvb(dec); 1653 ttusb_dec_init_dvb(dec);
1653 1654
1654 dec->adapter.priv = dec; 1655 dec->adapter.priv = dec;
1655 switch (le16_to_cpu(id->idProduct)) { 1656 switch (id->idProduct) {
1656 case 0x1006: 1657 case 0x1006:
1657 dec->fe = ttusbdecfe_dvbs_attach(&fe_config); 1658 dec->fe = ttusbdecfe_dvbs_attach(&fe_config);
1658 break; 1659 break;
diff --git a/drivers/media/dvb/ttusb-dec/ttusbdecfe.c b/drivers/media/dvb/ttusb-dec/ttusbdecfe.c
index eb5eaeccd7c4..443af24097f3 100644
--- a/drivers/media/dvb/ttusb-dec/ttusbdecfe.c
+++ b/drivers/media/dvb/ttusb-dec/ttusbdecfe.c
@@ -86,7 +86,7 @@ static int ttusbdecfe_dvbt_set_frontend(struct dvb_frontend* fe, struct dvb_fron
86 0x00, 0x00, 0x00, 0xff, 86 0x00, 0x00, 0x00, 0xff,
87 0x00, 0x00, 0x00, 0xff }; 87 0x00, 0x00, 0x00, 0xff };
88 88
89 u32 freq = htonl(p->frequency / 1000); 89 __be32 freq = htonl(p->frequency / 1000);
90 memcpy(&b[4], &freq, sizeof (u32)); 90 memcpy(&b[4], &freq, sizeof (u32));
91 state->config->send_command(fe, 0x71, sizeof(b), b, NULL, NULL); 91 state->config->send_command(fe, 0x71, sizeof(b), b, NULL, NULL);
92 92
@@ -117,10 +117,10 @@ static int ttusbdecfe_dvbs_set_frontend(struct dvb_frontend* fe, struct dvb_fron
117 0x00, 0x00, 0x00, 0x00, 117 0x00, 0x00, 0x00, 0x00,
118 0x00, 0x00, 0x00, 0x00, 118 0x00, 0x00, 0x00, 0x00,
119 0x00, 0x00, 0x00, 0x00 }; 119 0x00, 0x00, 0x00, 0x00 };
120 u32 freq; 120 __be32 freq;
121 u32 sym_rate; 121 __be32 sym_rate;
122 u32 band; 122 __be32 band;
123 u32 lnb_voltage; 123 __be32 lnb_voltage;
124 124
125 freq = htonl(p->frequency + 125 freq = htonl(p->frequency +
126 (state->hi_band ? LOF_HI : LOF_LO)); 126 (state->hi_band ? LOF_HI : LOF_LO));
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index 89d8d37838a3..5ccb0aeca8cc 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -793,6 +793,14 @@ menuconfig V4L_USB_DRIVERS
793 793
794if V4L_USB_DRIVERS && USB 794if V4L_USB_DRIVERS && USB
795 795
796config USB_VIDEO_CLASS
797 tristate "USB Video Class (UVC)"
798 ---help---
799 Support for the USB Video Class (UVC). Currently only video
800 input devices, such as webcams, are supported.
801
802 For more information see: <http://linux-uvc.berlios.de/>
803
796source "drivers/media/video/pvrusb2/Kconfig" 804source "drivers/media/video/pvrusb2/Kconfig"
797 805
798source "drivers/media/video/em28xx/Kconfig" 806source "drivers/media/video/em28xx/Kconfig"
@@ -901,7 +909,7 @@ endif # V4L_USB_DRIVERS
901 909
902config SOC_CAMERA 910config SOC_CAMERA
903 tristate "SoC camera support" 911 tristate "SoC camera support"
904 depends on VIDEO_V4L2 912 depends on VIDEO_V4L2 && HAS_DMA
905 select VIDEOBUF_DMA_SG 913 select VIDEOBUF_DMA_SG
906 help 914 help
907 SoC Camera is a common API to several cameras, not connecting 915 SoC Camera is a common API to several cameras, not connecting
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
index dff0d6abe917..ecbbfaab24d5 100644
--- a/drivers/media/video/Makefile
+++ b/drivers/media/video/Makefile
@@ -136,6 +136,8 @@ obj-$(CONFIG_SOC_CAMERA_MT9V022) += mt9v022.o
136 136
137obj-$(CONFIG_VIDEO_AU0828) += au0828/ 137obj-$(CONFIG_VIDEO_AU0828) += au0828/
138 138
139obj-$(CONFIG_USB_VIDEO_CLASS) += uvc/
140
139EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core 141EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
140EXTRA_CFLAGS += -Idrivers/media/dvb/frontends 142EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
141EXTRA_CFLAGS += -Idrivers/media/common/tuners 143EXTRA_CFLAGS += -Idrivers/media/common/tuners
diff --git a/drivers/media/video/au0828/Kconfig b/drivers/media/video/au0828/Kconfig
index def10d086373..52b2491581a8 100644
--- a/drivers/media/video/au0828/Kconfig
+++ b/drivers/media/video/au0828/Kconfig
@@ -1,7 +1,7 @@
1 1
2config VIDEO_AU0828 2config VIDEO_AU0828
3 tristate "Auvitek AU0828 support" 3 tristate "Auvitek AU0828 support"
4 depends on VIDEO_DEV && I2C && INPUT && DVB_CORE && USB 4 depends on I2C && INPUT && DVB_CORE && USB
5 select I2C_ALGOBIT 5 select I2C_ALGOBIT
6 select VIDEO_TVEEPROM 6 select VIDEO_TVEEPROM
7 select DVB_AU8522 if !DVB_FE_CUSTOMIZE 7 select DVB_AU8522 if !DVB_FE_CUSTOMIZE
diff --git a/drivers/media/video/au0828/au0828-cards.c b/drivers/media/video/au0828/au0828-cards.c
index a2a6983444fa..898e12395e7c 100644
--- a/drivers/media/video/au0828/au0828-cards.c
+++ b/drivers/media/video/au0828/au0828-cards.c
@@ -77,8 +77,14 @@ static void hauppauge_eeprom(struct au0828_dev *dev, u8 *eeprom_data)
77 77
78 /* Make sure we support the board model */ 78 /* Make sure we support the board model */
79 switch (tv.model) { 79 switch (tv.model) {
80 case 72000: /* WinTV-HVR950q (Retail, IR, ATSC/QAM */
80 case 72001: /* WinTV-HVR950q (Retail, IR, ATSC/QAM and basic analog video */ 81 case 72001: /* WinTV-HVR950q (Retail, IR, ATSC/QAM and basic analog video */
82 case 72211: /* WinTV-HVR950q (OEM, IR, ATSC/QAM and basic analog video */
83 case 72221: /* WinTV-HVR950q (OEM, IR, ATSC/QAM and basic analog video */
84 case 72231: /* WinTV-HVR950q (OEM, IR, ATSC/QAM and basic analog video */
85 case 72241: /* WinTV-HVR950q (OEM, No IR, ATSC/QAM and basic analog video */
81 case 72301: /* WinTV-HVR850 (Retail, IR, ATSC and basic analog video */ 86 case 72301: /* WinTV-HVR850 (Retail, IR, ATSC and basic analog video */
87 case 72500: /* WinTV-HVR950q (OEM, No IR, ATSC/QAM */
82 break; 88 break;
83 default: 89 default:
84 printk(KERN_WARNING "%s: warning: " 90 printk(KERN_WARNING "%s: warning: "
@@ -175,6 +181,18 @@ struct usb_device_id au0828_usb_id_table [] = {
175 .driver_info = AU0828_BOARD_HAUPPAUGE_HVR850 }, 181 .driver_info = AU0828_BOARD_HAUPPAUGE_HVR850 },
176 { USB_DEVICE(0x0fe9, 0xd620), 182 { USB_DEVICE(0x0fe9, 0xd620),
177 .driver_info = AU0828_BOARD_DVICO_FUSIONHDTV7 }, 183 .driver_info = AU0828_BOARD_DVICO_FUSIONHDTV7 },
184 { USB_DEVICE(0x2040, 0x7210),
185 .driver_info = AU0828_BOARD_HAUPPAUGE_HVR950Q },
186 { USB_DEVICE(0x2040, 0x7217),
187 .driver_info = AU0828_BOARD_HAUPPAUGE_HVR950Q },
188 { USB_DEVICE(0x2040, 0x721b),
189 .driver_info = AU0828_BOARD_HAUPPAUGE_HVR950Q },
190 { USB_DEVICE(0x2040, 0x721f),
191 .driver_info = AU0828_BOARD_HAUPPAUGE_HVR950Q },
192 { USB_DEVICE(0x2040, 0x7280),
193 .driver_info = AU0828_BOARD_HAUPPAUGE_HVR950Q },
194 { USB_DEVICE(0x0fd9, 0x0008),
195 .driver_info = AU0828_BOARD_HAUPPAUGE_HVR950Q },
178 { }, 196 { },
179}; 197};
180 198
diff --git a/drivers/media/video/au0828/au0828-dvb.c b/drivers/media/video/au0828/au0828-dvb.c
index c86a5f17eca8..c6d470590380 100644
--- a/drivers/media/video/au0828/au0828-dvb.c
+++ b/drivers/media/video/au0828/au0828-dvb.c
@@ -353,12 +353,6 @@ int au0828_dvb_register(struct au0828_dev *dev)
353 return -1; 353 return -1;
354 } 354 }
355 355
356 /* Put the analog decoder in standby to keep it quiet */
357 au0828_call_i2c_clients(dev, TUNER_SET_STANDBY, NULL);
358
359 if (dvb->frontend->ops.analog_ops.standby)
360 dvb->frontend->ops.analog_ops.standby(dvb->frontend);
361
362 /* register everything */ 356 /* register everything */
363 ret = dvb_register(dev); 357 ret = dvb_register(dev);
364 if (ret < 0) { 358 if (ret < 0) {
diff --git a/drivers/media/video/bt8xx/bttv-cards.c b/drivers/media/video/bt8xx/bttv-cards.c
index f20a01cfc73e..8ef0424c26c4 100644
--- a/drivers/media/video/bt8xx/bttv-cards.c
+++ b/drivers/media/video/bt8xx/bttv-cards.c
@@ -34,6 +34,7 @@
34#include <linux/firmware.h> 34#include <linux/firmware.h>
35#include <net/checksum.h> 35#include <net/checksum.h>
36 36
37#include <asm/unaligned.h>
37#include <asm/io.h> 38#include <asm/io.h>
38 39
39#include "bttvp.h" 40#include "bttvp.h"
@@ -3858,7 +3859,7 @@ static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256])
3858 ee += i; 3859 ee += i;
3859 3860
3860 /* found a valid descriptor */ 3861 /* found a valid descriptor */
3861 type = be16_to_cpup((u16*)(ee+4)); 3862 type = get_unaligned_be16((__be16 *)(ee+4));
3862 3863
3863 switch(type) { 3864 switch(type) {
3864 /* 848 based */ 3865 /* 848 based */
@@ -3918,7 +3919,7 @@ static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256])
3918 btv->c.nr, type); 3919 btv->c.nr, type);
3919 break; 3920 break;
3920 } 3921 }
3921 serial = be32_to_cpup((u32*)(ee+6)); 3922 serial = get_unaligned_be32((__be32 *)(ee+6));
3922 } 3923 }
3923 3924
3924 printk(KERN_INFO "bttv%d: osprey eeprom: card=%d '%s' serial=%u\n", 3925 printk(KERN_INFO "bttv%d: osprey eeprom: card=%d '%s' serial=%u\n",
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c
index 2ca3e9cfb2bb..0165aac533bf 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -2613,7 +2613,7 @@ static int vidiocgmbuf(struct file *file, void *priv, struct video_mbuf *mbuf)
2613 struct bttv_fh *fh = priv; 2613 struct bttv_fh *fh = priv;
2614 2614
2615 mutex_lock(&fh->cap.vb_lock); 2615 mutex_lock(&fh->cap.vb_lock);
2616 retval = videobuf_mmap_setup(&fh->cap, gbuffers, gbufsize, 2616 retval = __videobuf_mmap_setup(&fh->cap, gbuffers, gbufsize,
2617 V4L2_MEMORY_MMAP); 2617 V4L2_MEMORY_MMAP);
2618 if (retval < 0) { 2618 if (retval < 0) {
2619 mutex_unlock(&fh->cap.vb_lock); 2619 mutex_unlock(&fh->cap.vb_lock);
diff --git a/drivers/media/video/bt8xx/bttv-risc.c b/drivers/media/video/bt8xx/bttv-risc.c
index e5979f77504c..0af586876e72 100644
--- a/drivers/media/video/bt8xx/bttv-risc.c
+++ b/drivers/media/video/bt8xx/bttv-risc.c
@@ -48,7 +48,7 @@ bttv_risc_packed(struct bttv *btv, struct btcx_riscmem *risc,
48{ 48{
49 u32 instructions,line,todo; 49 u32 instructions,line,todo;
50 struct scatterlist *sg; 50 struct scatterlist *sg;
51 u32 *rp; 51 __le32 *rp;
52 int rc; 52 int rc;
53 53
54 /* estimate risc mem: worst case is one write per page border + 54 /* estimate risc mem: worst case is one write per page border +
@@ -128,7 +128,8 @@ bttv_risc_planar(struct bttv *btv, struct btcx_riscmem *risc,
128 unsigned int cpadding) 128 unsigned int cpadding)
129{ 129{
130 unsigned int instructions,line,todo,ylen,chroma; 130 unsigned int instructions,line,todo,ylen,chroma;
131 u32 *rp,ri; 131 __le32 *rp;
132 u32 ri;
132 struct scatterlist *ysg; 133 struct scatterlist *ysg;
133 struct scatterlist *usg; 134 struct scatterlist *usg;
134 struct scatterlist *vsg; 135 struct scatterlist *vsg;
@@ -244,7 +245,8 @@ bttv_risc_overlay(struct bttv *btv, struct btcx_riscmem *risc,
244{ 245{
245 int dwords,rc,line,maxy,start,end,skip,nskips; 246 int dwords,rc,line,maxy,start,end,skip,nskips;
246 struct btcx_skiplist *skips; 247 struct btcx_skiplist *skips;
247 u32 *rp,ri,ra; 248 __le32 *rp;
249 u32 ri,ra;
248 u32 addr; 250 u32 addr;
249 251
250 /* skip list for window clipping */ 252 /* skip list for window clipping */
diff --git a/drivers/media/video/btcx-risc.c b/drivers/media/video/btcx-risc.c
index ce0840ccd594..f42701f82e7f 100644
--- a/drivers/media/video/btcx-risc.c
+++ b/drivers/media/video/btcx-risc.c
@@ -63,7 +63,7 @@ int btcx_riscmem_alloc(struct pci_dev *pci,
63 struct btcx_riscmem *risc, 63 struct btcx_riscmem *risc,
64 unsigned int size) 64 unsigned int size)
65{ 65{
66 u32 *cpu; 66 __le32 *cpu;
67 dma_addr_t dma; 67 dma_addr_t dma;
68 68
69 if (NULL != risc->cpu && risc->size < size) 69 if (NULL != risc->cpu && risc->size < size)
diff --git a/drivers/media/video/btcx-risc.h b/drivers/media/video/btcx-risc.h
index 503e6c6d7b69..861bc8112824 100644
--- a/drivers/media/video/btcx-risc.h
+++ b/drivers/media/video/btcx-risc.h
@@ -2,8 +2,8 @@
2 */ 2 */
3struct btcx_riscmem { 3struct btcx_riscmem {
4 unsigned int size; 4 unsigned int size;
5 u32 *cpu; 5 __le32 *cpu;
6 u32 *jmp; 6 __le32 *jmp;
7 dma_addr_t dma; 7 dma_addr_t dma;
8}; 8};
9 9
diff --git a/drivers/media/video/cx18/Kconfig b/drivers/media/video/cx18/Kconfig
index 5f942690570c..9aefdc5ea79a 100644
--- a/drivers/media/video/cx18/Kconfig
+++ b/drivers/media/video/cx18/Kconfig
@@ -10,8 +10,8 @@ config VIDEO_CX18
10 select VIDEO_TVEEPROM 10 select VIDEO_TVEEPROM
11 select VIDEO_CX2341X 11 select VIDEO_CX2341X
12 select VIDEO_CS5345 12 select VIDEO_CS5345
13 select DVB_S5H1409 13 select DVB_S5H1409 if !DVB_FE_CUSTOMISE
14 select MEDIA_TUNER_MXL5005S 14 select MEDIA_TUNER_MXL5005S if !DVB_FE_CUSTOMISE
15 ---help--- 15 ---help---
16 This is a video4linux driver for Conexant cx23418 based 16 This is a video4linux driver for Conexant cx23418 based
17 PCI combo video recorder devices. 17 PCI combo video recorder devices.
diff --git a/drivers/media/video/cx18/cx18-av-core.c b/drivers/media/video/cx18/cx18-av-core.c
index 66864904c99b..faca43eb940f 100644
--- a/drivers/media/video/cx18/cx18-av-core.c
+++ b/drivers/media/video/cx18/cx18-av-core.c
@@ -69,6 +69,58 @@ int cx18_av_and_or4(struct cx18 *cx, u16 addr, u32 and_mask,
69 or_value); 69 or_value);
70} 70}
71 71
72int cx18_av_write_no_acfg(struct cx18 *cx, u16 addr, u8 value, int no_acfg_mask)
73{
74 int retval;
75 u32 saved_reg[8] = {0};
76
77 if (no_acfg_mask & CXADEC_NO_ACFG_AFE) {
78 saved_reg[0] = cx18_av_read4(cx, CXADEC_CHIP_CTRL);
79 saved_reg[1] = cx18_av_read4(cx, CXADEC_AFE_CTRL);
80 }
81
82 if (no_acfg_mask & CXADEC_NO_ACFG_PLL) {
83 saved_reg[2] = cx18_av_read4(cx, CXADEC_PLL_CTRL1);
84 saved_reg[3] = cx18_av_read4(cx, CXADEC_VID_PLL_FRAC);
85 }
86
87 if (no_acfg_mask & CXADEC_NO_ACFG_VID) {
88 saved_reg[4] = cx18_av_read4(cx, CXADEC_HORIZ_TIM_CTRL);
89 saved_reg[5] = cx18_av_read4(cx, CXADEC_VERT_TIM_CTRL);
90 saved_reg[6] = cx18_av_read4(cx, CXADEC_SRC_COMB_CFG);
91 saved_reg[7] = cx18_av_read4(cx, CXADEC_CHROMA_VBIOFF_CFG);
92 }
93
94 retval = cx18_av_write(cx, addr, value);
95
96 if (no_acfg_mask & CXADEC_NO_ACFG_AFE) {
97 cx18_av_write4(cx, CXADEC_CHIP_CTRL, saved_reg[0]);
98 cx18_av_write4(cx, CXADEC_AFE_CTRL, saved_reg[1]);
99 }
100
101 if (no_acfg_mask & CXADEC_NO_ACFG_PLL) {
102 cx18_av_write4(cx, CXADEC_PLL_CTRL1, saved_reg[2]);
103 cx18_av_write4(cx, CXADEC_VID_PLL_FRAC, saved_reg[3]);
104 }
105
106 if (no_acfg_mask & CXADEC_NO_ACFG_VID) {
107 cx18_av_write4(cx, CXADEC_HORIZ_TIM_CTRL, saved_reg[4]);
108 cx18_av_write4(cx, CXADEC_VERT_TIM_CTRL, saved_reg[5]);
109 cx18_av_write4(cx, CXADEC_SRC_COMB_CFG, saved_reg[6]);
110 cx18_av_write4(cx, CXADEC_CHROMA_VBIOFF_CFG, saved_reg[7]);
111 }
112
113 return retval;
114}
115
116int cx18_av_and_or_no_acfg(struct cx18 *cx, u16 addr, unsigned and_mask,
117 u8 or_value, int no_acfg_mask)
118{
119 return cx18_av_write_no_acfg(cx, addr,
120 (cx18_av_read(cx, addr) & and_mask) |
121 or_value, no_acfg_mask);
122}
123
72/* ----------------------------------------------------------------------- */ 124/* ----------------------------------------------------------------------- */
73 125
74static int set_input(struct cx18 *cx, enum cx18_av_video_input vid_input, 126static int set_input(struct cx18 *cx, enum cx18_av_video_input vid_input,
@@ -170,26 +222,30 @@ static void input_change(struct cx18 *cx)
170 222
171 /* Follow step 8c and 8d of section 3.16 in the cx18_av datasheet */ 223 /* Follow step 8c and 8d of section 3.16 in the cx18_av datasheet */
172 if (std & V4L2_STD_SECAM) 224 if (std & V4L2_STD_SECAM)
173 cx18_av_write(cx, 0x402, 0); 225 cx18_av_write_no_acfg(cx, 0x402, 0, CXADEC_NO_ACFG_ALL);
174 else { 226 else {
175 cx18_av_write(cx, 0x402, 0x04); 227 cx18_av_write_no_acfg(cx, 0x402, 0x04, CXADEC_NO_ACFG_ALL);
176 cx18_av_write(cx, 0x49f, (std & V4L2_STD_NTSC) ? 0x14 : 0x11); 228 cx18_av_write(cx, 0x49f, (std & V4L2_STD_NTSC) ? 0x14 : 0x11);
177 } 229 }
178 cx18_av_and_or(cx, 0x401, ~0x60, 0); 230 cx18_av_and_or_no_acfg(cx, 0x401, ~0x60, 0,
179 cx18_av_and_or(cx, 0x401, ~0x60, 0x60); 231 CXADEC_NO_ACFG_PLL | CXADEC_NO_ACFG_VID);
232 cx18_av_and_or_no_acfg(cx, 0x401, ~0x60, 0x60,
233 CXADEC_NO_ACFG_PLL | CXADEC_NO_ACFG_VID);
180 234
181 if (std & V4L2_STD_525_60) { 235 if (std & V4L2_STD_525_60) {
182 if (std == V4L2_STD_NTSC_M_JP) { 236 if (std == V4L2_STD_NTSC_M_JP) {
183 /* Japan uses EIAJ audio standard */ 237 /* Japan uses EIAJ audio standard */
184 cx18_av_write(cx, 0x808, 0xf7); 238 cx18_av_write(cx, 0x808, 0xf7);
239 cx18_av_write(cx, 0x80b, 0x02);
185 } else if (std == V4L2_STD_NTSC_M_KR) { 240 } else if (std == V4L2_STD_NTSC_M_KR) {
186 /* South Korea uses A2 audio standard */ 241 /* South Korea uses A2 audio standard */
187 cx18_av_write(cx, 0x808, 0xf8); 242 cx18_av_write(cx, 0x808, 0xf8);
243 cx18_av_write(cx, 0x80b, 0x03);
188 } else { 244 } else {
189 /* Others use the BTSC audio standard */ 245 /* Others use the BTSC audio standard */
190 cx18_av_write(cx, 0x808, 0xf6); 246 cx18_av_write(cx, 0x808, 0xf6);
247 cx18_av_write(cx, 0x80b, 0x01);
191 } 248 }
192 cx18_av_write(cx, 0x80b, 0x00);
193 } else if (std & V4L2_STD_PAL) { 249 } else if (std & V4L2_STD_PAL) {
194 /* Follow tuner change procedure for PAL */ 250 /* Follow tuner change procedure for PAL */
195 cx18_av_write(cx, 0x808, 0xff); 251 cx18_av_write(cx, 0x808, 0xff);
@@ -226,7 +282,7 @@ static int set_input(struct cx18 *cx, enum cx18_av_video_input vid_input,
226 282
227 if ((vid_input & ~0xff0) || 283 if ((vid_input & ~0xff0) ||
228 luma < CX18_AV_SVIDEO_LUMA1 || 284 luma < CX18_AV_SVIDEO_LUMA1 ||
229 luma > CX18_AV_SVIDEO_LUMA4 || 285 luma > CX18_AV_SVIDEO_LUMA8 ||
230 chroma < CX18_AV_SVIDEO_CHROMA4 || 286 chroma < CX18_AV_SVIDEO_CHROMA4 ||
231 chroma > CX18_AV_SVIDEO_CHROMA8) { 287 chroma > CX18_AV_SVIDEO_CHROMA8) {
232 CX18_ERR("0x%04x is not a valid video input!\n", 288 CX18_ERR("0x%04x is not a valid video input!\n",
@@ -260,7 +316,8 @@ static int set_input(struct cx18 *cx, enum cx18_av_video_input vid_input,
260 316
261 cx18_av_write(cx, 0x103, reg); 317 cx18_av_write(cx, 0x103, reg);
262 /* Set INPUT_MODE to Composite (0) or S-Video (1) */ 318 /* Set INPUT_MODE to Composite (0) or S-Video (1) */
263 cx18_av_and_or(cx, 0x401, ~0x6, is_composite ? 0 : 0x02); 319 cx18_av_and_or_no_acfg(cx, 0x401, ~0x6, is_composite ? 0 : 0x02,
320 CXADEC_NO_ACFG_PLL | CXADEC_NO_ACFG_VID);
264 /* Set CH_SEL_ADC2 to 1 if input comes from CH3 */ 321 /* Set CH_SEL_ADC2 to 1 if input comes from CH3 */
265 cx18_av_and_or(cx, 0x102, ~0x2, (reg & 0x80) == 0 ? 2 : 0); 322 cx18_av_and_or(cx, 0x102, ~0x2, (reg & 0x80) == 0 ? 2 : 0);
266 /* Set DUAL_MODE_ADC2 to 1 if input comes from both CH2 and CH3 */ 323 /* Set DUAL_MODE_ADC2 to 1 if input comes from both CH2 and CH3 */
@@ -316,12 +373,12 @@ static int set_v4lstd(struct cx18 *cx)
316 This happens for example with the Yuan MPC622. */ 373 This happens for example with the Yuan MPC622. */
317 if (fmt >= 4 && fmt < 8) { 374 if (fmt >= 4 && fmt < 8) {
318 /* Set format to NTSC-M */ 375 /* Set format to NTSC-M */
319 cx18_av_and_or(cx, 0x400, ~0xf, 1); 376 cx18_av_and_or_no_acfg(cx, 0x400, ~0xf, 1, CXADEC_NO_ACFG_AFE);
320 /* Turn off LCOMB */ 377 /* Turn off LCOMB */
321 cx18_av_and_or(cx, 0x47b, ~6, 0); 378 cx18_av_and_or(cx, 0x47b, ~6, 0);
322 } 379 }
323 cx18_av_and_or(cx, 0x400, ~0xf, fmt); 380 cx18_av_and_or_no_acfg(cx, 0x400, ~0xf, fmt, CXADEC_NO_ACFG_AFE);
324 cx18_av_and_or(cx, 0x403, ~0x3, pal_m); 381 cx18_av_and_or_no_acfg(cx, 0x403, ~0x3, pal_m, CXADEC_NO_ACFG_ALL);
325 cx18_av_vbi_setup(cx); 382 cx18_av_vbi_setup(cx);
326 input_change(cx); 383 input_change(cx);
327 return 0; 384 return 0;
@@ -741,8 +798,8 @@ static void log_audio_status(struct cx18 *cx)
741{ 798{
742 struct cx18_av_state *state = &cx->av_state; 799 struct cx18_av_state *state = &cx->av_state;
743 u8 download_ctl = cx18_av_read(cx, 0x803); 800 u8 download_ctl = cx18_av_read(cx, 0x803);
744 u8 mod_det_stat0 = cx18_av_read(cx, 0x805); 801 u8 mod_det_stat0 = cx18_av_read(cx, 0x804);
745 u8 mod_det_stat1 = cx18_av_read(cx, 0x804); 802 u8 mod_det_stat1 = cx18_av_read(cx, 0x805);
746 u8 audio_config = cx18_av_read(cx, 0x808); 803 u8 audio_config = cx18_av_read(cx, 0x808);
747 u8 pref_mode = cx18_av_read(cx, 0x809); 804 u8 pref_mode = cx18_av_read(cx, 0x809);
748 u8 afc0 = cx18_av_read(cx, 0x80b); 805 u8 afc0 = cx18_av_read(cx, 0x80b);
@@ -760,12 +817,12 @@ static void log_audio_status(struct cx18 *cx)
760 case 0x12: p = "dual with SAP"; break; 817 case 0x12: p = "dual with SAP"; break;
761 case 0x14: p = "tri with SAP"; break; 818 case 0x14: p = "tri with SAP"; break;
762 case 0xfe: p = "forced mode"; break; 819 case 0xfe: p = "forced mode"; break;
763 default: p = "not defined"; 820 default: p = "not defined"; break;
764 } 821 }
765 CX18_INFO("Detected audio mode: %s\n", p); 822 CX18_INFO("Detected audio mode: %s\n", p);
766 823
767 switch (mod_det_stat1) { 824 switch (mod_det_stat1) {
768 case 0x00: p = "BTSC"; break; 825 case 0x00: p = "not defined"; break;
769 case 0x01: p = "EIAJ"; break; 826 case 0x01: p = "EIAJ"; break;
770 case 0x02: p = "A2-M"; break; 827 case 0x02: p = "A2-M"; break;
771 case 0x03: p = "A2-BG"; break; 828 case 0x03: p = "A2-BG"; break;
@@ -779,8 +836,13 @@ static void log_audio_status(struct cx18 *cx)
779 case 0x0b: p = "NICAM-I"; break; 836 case 0x0b: p = "NICAM-I"; break;
780 case 0x0c: p = "NICAM-L"; break; 837 case 0x0c: p = "NICAM-L"; break;
781 case 0x0d: p = "BTSC/EIAJ/A2-M Mono (4.5 MHz FMMono)"; break; 838 case 0x0d: p = "BTSC/EIAJ/A2-M Mono (4.5 MHz FMMono)"; break;
839 case 0x0e: p = "IF FM Radio"; break;
840 case 0x0f: p = "BTSC"; break;
841 case 0x10: p = "detected chrominance"; break;
842 case 0xfd: p = "unknown audio standard"; break;
843 case 0xfe: p = "forced audio standard"; break;
782 case 0xff: p = "no detected audio standard"; break; 844 case 0xff: p = "no detected audio standard"; break;
783 default: p = "not defined"; 845 default: p = "not defined"; break;
784 } 846 }
785 CX18_INFO("Detected audio standard: %s\n", p); 847 CX18_INFO("Detected audio standard: %s\n", p);
786 CX18_INFO("Audio muted: %s\n", 848 CX18_INFO("Audio muted: %s\n",
@@ -789,22 +851,23 @@ static void log_audio_status(struct cx18 *cx)
789 (download_ctl & 0x10) ? "running" : "stopped"); 851 (download_ctl & 0x10) ? "running" : "stopped");
790 852
791 switch (audio_config >> 4) { 853 switch (audio_config >> 4) {
792 case 0x00: p = "BTSC"; break; 854 case 0x00: p = "undefined"; break;
793 case 0x01: p = "EIAJ"; break; 855 case 0x01: p = "BTSC"; break;
794 case 0x02: p = "A2-M"; break; 856 case 0x02: p = "EIAJ"; break;
795 case 0x03: p = "A2-BG"; break; 857 case 0x03: p = "A2-M"; break;
796 case 0x04: p = "A2-DK1"; break; 858 case 0x04: p = "A2-BG"; break;
797 case 0x05: p = "A2-DK2"; break; 859 case 0x05: p = "A2-DK1"; break;
798 case 0x06: p = "A2-DK3"; break; 860 case 0x06: p = "A2-DK2"; break;
799 case 0x07: p = "A1 (6.0 MHz FM Mono)"; break; 861 case 0x07: p = "A2-DK3"; break;
800 case 0x08: p = "AM-L"; break; 862 case 0x08: p = "A1 (6.0 MHz FM Mono)"; break;
801 case 0x09: p = "NICAM-BG"; break; 863 case 0x09: p = "AM-L"; break;
802 case 0x0a: p = "NICAM-DK"; break; 864 case 0x0a: p = "NICAM-BG"; break;
803 case 0x0b: p = "NICAM-I"; break; 865 case 0x0b: p = "NICAM-DK"; break;
804 case 0x0c: p = "NICAM-L"; break; 866 case 0x0c: p = "NICAM-I"; break;
805 case 0x0d: p = "FM radio"; break; 867 case 0x0d: p = "NICAM-L"; break;
868 case 0x0e: p = "FM radio"; break;
806 case 0x0f: p = "automatic detection"; break; 869 case 0x0f: p = "automatic detection"; break;
807 default: p = "undefined"; 870 default: p = "undefined"; break;
808 } 871 }
809 CX18_INFO("Configured audio standard: %s\n", p); 872 CX18_INFO("Configured audio standard: %s\n", p);
810 873
@@ -815,12 +878,9 @@ static void log_audio_status(struct cx18 *cx)
815 case 0x02: p = "MONO3 (STEREO forced MONO)"; break; 878 case 0x02: p = "MONO3 (STEREO forced MONO)"; break;
816 case 0x03: p = "MONO4 (NICAM ANALOG-Language C/Analog Fallback)"; break; 879 case 0x03: p = "MONO4 (NICAM ANALOG-Language C/Analog Fallback)"; break;
817 case 0x04: p = "STEREO"; break; 880 case 0x04: p = "STEREO"; break;
818 case 0x05: p = "DUAL1 (AB)"; break; 881 case 0x05: p = "DUAL1 (AC)"; break;
819 case 0x06: p = "DUAL2 (AC) (FM)"; break; 882 case 0x06: p = "DUAL2 (BC)"; break;
820 case 0x07: p = "DUAL3 (BC) (FM)"; break; 883 case 0x07: p = "DUAL3 (AB)"; break;
821 case 0x08: p = "DUAL4 (AC) (AM)"; break;
822 case 0x09: p = "DUAL5 (BC) (AM)"; break;
823 case 0x0a: p = "SAP"; break;
824 default: p = "undefined"; 884 default: p = "undefined";
825 } 885 }
826 CX18_INFO("Configured audio mode: %s\n", p); 886 CX18_INFO("Configured audio mode: %s\n", p);
@@ -835,9 +895,11 @@ static void log_audio_status(struct cx18 *cx)
835 case 0x06: p = "BTSC"; break; 895 case 0x06: p = "BTSC"; break;
836 case 0x07: p = "EIAJ"; break; 896 case 0x07: p = "EIAJ"; break;
837 case 0x08: p = "A2-M"; break; 897 case 0x08: p = "A2-M"; break;
838 case 0x09: p = "FM Radio"; break; 898 case 0x09: p = "FM Radio (4.5 MHz)"; break;
899 case 0x0a: p = "FM Radio (5.5 MHz)"; break;
900 case 0x0b: p = "S-Video"; break;
839 case 0x0f: p = "automatic standard and mode detection"; break; 901 case 0x0f: p = "automatic standard and mode detection"; break;
840 default: p = "undefined"; 902 default: p = "undefined"; break;
841 } 903 }
842 CX18_INFO("Configured audio system: %s\n", p); 904 CX18_INFO("Configured audio system: %s\n", p);
843 } 905 }
@@ -857,22 +919,24 @@ static void log_audio_status(struct cx18 *cx)
857 case 5: p = "language AC"; break; 919 case 5: p = "language AC"; break;
858 case 6: p = "language BC"; break; 920 case 6: p = "language BC"; break;
859 case 7: p = "language AB"; break; 921 case 7: p = "language AB"; break;
860 default: p = "undefined"; 922 default: p = "undefined"; break;
861 } 923 }
862 CX18_INFO("Preferred audio mode: %s\n", p); 924 CX18_INFO("Preferred audio mode: %s\n", p);
863 925
864 if ((audio_config & 0xf) == 0xf) { 926 if ((audio_config & 0xf) == 0xf) {
865 switch ((afc0 >> 2) & 0x1) { 927 switch ((afc0 >> 3) & 0x1) {
866 case 0: p = "system DK"; break; 928 case 0: p = "system DK"; break;
867 case 1: p = "system L"; break; 929 case 1: p = "system L"; break;
868 } 930 }
869 CX18_INFO("Selected 65 MHz format: %s\n", p); 931 CX18_INFO("Selected 65 MHz format: %s\n", p);
870 932
871 switch (afc0 & 0x3) { 933 switch (afc0 & 0x7) {
872 case 0: p = "BTSC"; break; 934 case 0: p = "Chroma"; break;
873 case 1: p = "EIAJ"; break; 935 case 1: p = "BTSC"; break;
874 case 2: p = "A2-M"; break; 936 case 2: p = "EIAJ"; break;
875 default: p = "undefined"; 937 case 3: p = "A2-M"; break;
938 case 4: p = "autodetect"; break;
939 default: p = "undefined"; break;
876 } 940 }
877 CX18_INFO("Selected 45 MHz format: %s\n", p); 941 CX18_INFO("Selected 45 MHz format: %s\n", p);
878 } 942 }
diff --git a/drivers/media/video/cx18/cx18-av-core.h b/drivers/media/video/cx18/cx18-av-core.h
index 786901d72e9a..c172823ce1d8 100644
--- a/drivers/media/video/cx18/cx18-av-core.h
+++ b/drivers/media/video/cx18/cx18-av-core.h
@@ -37,12 +37,16 @@ enum cx18_av_video_input {
37 CX18_AV_COMPOSITE7, 37 CX18_AV_COMPOSITE7,
38 CX18_AV_COMPOSITE8, 38 CX18_AV_COMPOSITE8,
39 39
40 /* S-Video inputs consist of one luma input (In1-In4) ORed with one 40 /* S-Video inputs consist of one luma input (In1-In8) ORed with one
41 chroma input (In5-In8) */ 41 chroma input (In5-In8) */
42 CX18_AV_SVIDEO_LUMA1 = 0x10, 42 CX18_AV_SVIDEO_LUMA1 = 0x10,
43 CX18_AV_SVIDEO_LUMA2 = 0x20, 43 CX18_AV_SVIDEO_LUMA2 = 0x20,
44 CX18_AV_SVIDEO_LUMA3 = 0x30, 44 CX18_AV_SVIDEO_LUMA3 = 0x30,
45 CX18_AV_SVIDEO_LUMA4 = 0x40, 45 CX18_AV_SVIDEO_LUMA4 = 0x40,
46 CX18_AV_SVIDEO_LUMA5 = 0x50,
47 CX18_AV_SVIDEO_LUMA6 = 0x60,
48 CX18_AV_SVIDEO_LUMA7 = 0x70,
49 CX18_AV_SVIDEO_LUMA8 = 0x80,
46 CX18_AV_SVIDEO_CHROMA4 = 0x400, 50 CX18_AV_SVIDEO_CHROMA4 = 0x400,
47 CX18_AV_SVIDEO_CHROMA5 = 0x500, 51 CX18_AV_SVIDEO_CHROMA5 = 0x500,
48 CX18_AV_SVIDEO_CHROMA6 = 0x600, 52 CX18_AV_SVIDEO_CHROMA6 = 0x600,
@@ -291,14 +295,24 @@ struct cx18_av_state {
291#define CXADEC_SELECT_AUDIO_STANDARD_FM 0xF9 /* FM radio */ 295#define CXADEC_SELECT_AUDIO_STANDARD_FM 0xF9 /* FM radio */
292#define CXADEC_SELECT_AUDIO_STANDARD_AUTO 0xFF /* Auto detect */ 296#define CXADEC_SELECT_AUDIO_STANDARD_AUTO 0xFF /* Auto detect */
293 297
298/* Flags on what to preserve on write to 0x400-0x403 with cx18_av_.*_no_acfg()*/
299#define CXADEC_NO_ACFG_AFE 0x01 /* Preserve 0x100-0x107 */
300#define CXADEC_NO_ACFG_PLL 0x02 /* Preserve 0x108-0x10f */
301#define CXADEC_NO_ACFG_VID 0x04 /* Preserve 0x470-0x47f */
302#define CXADEC_NO_ACFG_ALL 0x07
303
294/* ----------------------------------------------------------------------- */ 304/* ----------------------------------------------------------------------- */
295/* cx18_av-core.c */ 305/* cx18_av-core.c */
296int cx18_av_write(struct cx18 *cx, u16 addr, u8 value); 306int cx18_av_write(struct cx18 *cx, u16 addr, u8 value);
297int cx18_av_write4(struct cx18 *cx, u16 addr, u32 value); 307int cx18_av_write4(struct cx18 *cx, u16 addr, u32 value);
308int cx18_av_write_no_acfg(struct cx18 *cx, u16 addr, u8 value,
309 int no_acfg_mask);
298u8 cx18_av_read(struct cx18 *cx, u16 addr); 310u8 cx18_av_read(struct cx18 *cx, u16 addr);
299u32 cx18_av_read4(struct cx18 *cx, u16 addr); 311u32 cx18_av_read4(struct cx18 *cx, u16 addr);
300int cx18_av_and_or(struct cx18 *cx, u16 addr, unsigned mask, u8 value); 312int cx18_av_and_or(struct cx18 *cx, u16 addr, unsigned mask, u8 value);
301int cx18_av_and_or4(struct cx18 *cx, u16 addr, u32 mask, u32 value); 313int cx18_av_and_or4(struct cx18 *cx, u16 addr, u32 mask, u32 value);
314int cx18_av_and_or_no_acfg(struct cx18 *cx, u16 addr, unsigned mask, u8 value,
315 int no_acfg_mask);
302int cx18_av_cmd(struct cx18 *cx, unsigned int cmd, void *arg); 316int cx18_av_cmd(struct cx18 *cx, unsigned int cmd, void *arg);
303 317
304/* ----------------------------------------------------------------------- */ 318/* ----------------------------------------------------------------------- */
diff --git a/drivers/media/video/cx18/cx18-cards.c b/drivers/media/video/cx18/cx18-cards.c
index 553adbf2cd44..c26e0ef5b075 100644
--- a/drivers/media/video/cx18/cx18-cards.c
+++ b/drivers/media/video/cx18/cx18-cards.c
@@ -23,6 +23,7 @@
23 23
24#include "cx18-driver.h" 24#include "cx18-driver.h"
25#include "cx18-cards.h" 25#include "cx18-cards.h"
26#include "cx18-av-core.h"
26#include "cx18-i2c.h" 27#include "cx18-i2c.h"
27#include <media/cs5345.h> 28#include <media/cs5345.h>
28 29
@@ -54,22 +55,22 @@ static const struct cx18_card cx18_card_hvr1600_esmt = {
54 .hw_all = CX18_HW_TVEEPROM | CX18_HW_TUNER | 55 .hw_all = CX18_HW_TVEEPROM | CX18_HW_TUNER |
55 CX18_HW_CS5345 | CX18_HW_DVB, 56 CX18_HW_CS5345 | CX18_HW_DVB,
56 .video_inputs = { 57 .video_inputs = {
57 { CX18_CARD_INPUT_VID_TUNER, 0, CX23418_COMPOSITE7 }, 58 { CX18_CARD_INPUT_VID_TUNER, 0, CX18_AV_COMPOSITE7 },
58 { CX18_CARD_INPUT_SVIDEO1, 1, CX23418_SVIDEO1 }, 59 { CX18_CARD_INPUT_SVIDEO1, 1, CX18_AV_SVIDEO1 },
59 { CX18_CARD_INPUT_COMPOSITE1, 1, CX23418_COMPOSITE3 }, 60 { CX18_CARD_INPUT_COMPOSITE1, 1, CX18_AV_COMPOSITE3 },
60 { CX18_CARD_INPUT_SVIDEO2, 2, CX23418_SVIDEO2 }, 61 { CX18_CARD_INPUT_SVIDEO2, 2, CX18_AV_SVIDEO2 },
61 { CX18_CARD_INPUT_COMPOSITE2, 2, CX23418_COMPOSITE4 }, 62 { CX18_CARD_INPUT_COMPOSITE2, 2, CX18_AV_COMPOSITE4 },
62 }, 63 },
63 .audio_inputs = { 64 .audio_inputs = {
64 { CX18_CARD_INPUT_AUD_TUNER, 65 { CX18_CARD_INPUT_AUD_TUNER,
65 CX23418_AUDIO8, CS5345_IN_1 | CS5345_MCLK_1_5 }, 66 CX18_AV_AUDIO8, CS5345_IN_1 | CS5345_MCLK_1_5 },
66 { CX18_CARD_INPUT_LINE_IN1, 67 { CX18_CARD_INPUT_LINE_IN1,
67 CX23418_AUDIO_SERIAL, CS5345_IN_2 }, 68 CX18_AV_AUDIO_SERIAL, CS5345_IN_2 },
68 { CX18_CARD_INPUT_LINE_IN2, 69 { CX18_CARD_INPUT_LINE_IN2,
69 CX23418_AUDIO_SERIAL, CS5345_IN_2 }, 70 CX18_AV_AUDIO_SERIAL, CS5345_IN_3 },
70 }, 71 },
71 .radio_input = { CX18_CARD_INPUT_AUD_TUNER, 72 .radio_input = { CX18_CARD_INPUT_AUD_TUNER,
72 CX23418_AUDIO_SERIAL, 0 }, 73 CX18_AV_AUDIO_SERIAL, CS5345_IN_4 },
73 .ddr = { 74 .ddr = {
74 /* ESMT M13S128324A-5B memory */ 75 /* ESMT M13S128324A-5B memory */
75 .chip_config = 0x003, 76 .chip_config = 0x003,
@@ -81,6 +82,11 @@ static const struct cx18_card cx18_card_hvr1600_esmt = {
81 }, 82 },
82 .gpio_init.initial_value = 0x3001, 83 .gpio_init.initial_value = 0x3001,
83 .gpio_init.direction = 0x3001, 84 .gpio_init.direction = 0x3001,
85 .gpio_i2c_slave_reset = {
86 .active_lo_mask = 0x3001,
87 .msecs_asserted = 10,
88 .msecs_recovery = 40,
89 },
84 .i2c = &cx18_i2c_std, 90 .i2c = &cx18_i2c_std,
85}; 91};
86 92
@@ -94,22 +100,22 @@ static const struct cx18_card cx18_card_hvr1600_samsung = {
94 .hw_all = CX18_HW_TVEEPROM | CX18_HW_TUNER | 100 .hw_all = CX18_HW_TVEEPROM | CX18_HW_TUNER |
95 CX18_HW_CS5345 | CX18_HW_DVB, 101 CX18_HW_CS5345 | CX18_HW_DVB,
96 .video_inputs = { 102 .video_inputs = {
97 { CX18_CARD_INPUT_VID_TUNER, 0, CX23418_COMPOSITE7 }, 103 { CX18_CARD_INPUT_VID_TUNER, 0, CX18_AV_COMPOSITE7 },
98 { CX18_CARD_INPUT_SVIDEO1, 1, CX23418_SVIDEO1 }, 104 { CX18_CARD_INPUT_SVIDEO1, 1, CX18_AV_SVIDEO1 },
99 { CX18_CARD_INPUT_COMPOSITE1, 1, CX23418_COMPOSITE3 }, 105 { CX18_CARD_INPUT_COMPOSITE1, 1, CX18_AV_COMPOSITE3 },
100 { CX18_CARD_INPUT_SVIDEO2, 2, CX23418_SVIDEO2 }, 106 { CX18_CARD_INPUT_SVIDEO2, 2, CX18_AV_SVIDEO2 },
101 { CX18_CARD_INPUT_COMPOSITE2, 2, CX23418_COMPOSITE4 }, 107 { CX18_CARD_INPUT_COMPOSITE2, 2, CX18_AV_COMPOSITE4 },
102 }, 108 },
103 .audio_inputs = { 109 .audio_inputs = {
104 { CX18_CARD_INPUT_AUD_TUNER, 110 { CX18_CARD_INPUT_AUD_TUNER,
105 CX23418_AUDIO8, CS5345_IN_1 | CS5345_MCLK_1_5 }, 111 CX18_AV_AUDIO8, CS5345_IN_1 | CS5345_MCLK_1_5 },
106 { CX18_CARD_INPUT_LINE_IN1, 112 { CX18_CARD_INPUT_LINE_IN1,
107 CX23418_AUDIO_SERIAL, CS5345_IN_2 }, 113 CX18_AV_AUDIO_SERIAL, CS5345_IN_2 },
108 { CX18_CARD_INPUT_LINE_IN2, 114 { CX18_CARD_INPUT_LINE_IN2,
109 CX23418_AUDIO_SERIAL, CS5345_IN_2 }, 115 CX18_AV_AUDIO_SERIAL, CS5345_IN_3 },
110 }, 116 },
111 .radio_input = { CX18_CARD_INPUT_AUD_TUNER, 117 .radio_input = { CX18_CARD_INPUT_AUD_TUNER,
112 CX23418_AUDIO_SERIAL, 0 }, 118 CX18_AV_AUDIO_SERIAL, CS5345_IN_4 },
113 .ddr = { 119 .ddr = {
114 /* Samsung K4D263238G-VC33 memory */ 120 /* Samsung K4D263238G-VC33 memory */
115 .chip_config = 0x003, 121 .chip_config = 0x003,
@@ -121,12 +127,17 @@ static const struct cx18_card cx18_card_hvr1600_samsung = {
121 }, 127 },
122 .gpio_init.initial_value = 0x3001, 128 .gpio_init.initial_value = 0x3001,
123 .gpio_init.direction = 0x3001, 129 .gpio_init.direction = 0x3001,
130 .gpio_i2c_slave_reset = {
131 .active_lo_mask = 0x3001,
132 .msecs_asserted = 10,
133 .msecs_recovery = 40,
134 },
124 .i2c = &cx18_i2c_std, 135 .i2c = &cx18_i2c_std,
125}; 136};
126 137
127/* ------------------------------------------------------------------------- */ 138/* ------------------------------------------------------------------------- */
128 139
129/* Compro VideoMate H900: not working at the moment! */ 140/* Compro VideoMate H900: note that this card is analog only! */
130 141
131static const struct cx18_card_pci_info cx18_pci_h900[] = { 142static const struct cx18_card_pci_info cx18_pci_h900[] = {
132 { PCI_DEVICE_ID_CX23418, CX18_PCI_ID_COMPRO, 0xe100 }, 143 { PCI_DEVICE_ID_CX23418, CX18_PCI_ID_COMPRO, 0xe100 },
@@ -136,24 +147,24 @@ static const struct cx18_card_pci_info cx18_pci_h900[] = {
136static const struct cx18_card cx18_card_h900 = { 147static const struct cx18_card cx18_card_h900 = {
137 .type = CX18_CARD_COMPRO_H900, 148 .type = CX18_CARD_COMPRO_H900,
138 .name = "Compro VideoMate H900", 149 .name = "Compro VideoMate H900",
139 .comment = "DVB & VBI are not yet supported\n", 150 .comment = "VBI is not yet supported\n",
140 .v4l2_capabilities = CX18_CAP_ENCODER, 151 .v4l2_capabilities = CX18_CAP_ENCODER,
141 .hw_audio_ctrl = CX18_HW_CX23418, 152 .hw_audio_ctrl = CX18_HW_CX23418,
142 .hw_all = CX18_HW_TUNER, 153 .hw_all = CX18_HW_TUNER,
143 .video_inputs = { 154 .video_inputs = {
144 { CX18_CARD_INPUT_VID_TUNER, 0, CX23418_COMPOSITE2 }, 155 { CX18_CARD_INPUT_VID_TUNER, 0, CX18_AV_COMPOSITE2 },
145 { CX18_CARD_INPUT_SVIDEO1, 1, 156 { CX18_CARD_INPUT_SVIDEO1, 1,
146 CX23418_SVIDEO_LUMA3 | CX23418_SVIDEO_CHROMA4 }, 157 CX18_AV_SVIDEO_LUMA3 | CX18_AV_SVIDEO_CHROMA4 },
147 { CX18_CARD_INPUT_COMPOSITE1, 1, CX23418_COMPOSITE1 }, 158 { CX18_CARD_INPUT_COMPOSITE1, 1, CX18_AV_COMPOSITE1 },
148 }, 159 },
149 .audio_inputs = { 160 .audio_inputs = {
150 { CX18_CARD_INPUT_AUD_TUNER, 161 { CX18_CARD_INPUT_AUD_TUNER,
151 CX23418_AUDIO8, 0 }, 162 CX18_AV_AUDIO8, 0 },
152 { CX18_CARD_INPUT_LINE_IN1, 163 { CX18_CARD_INPUT_LINE_IN1,
153 CX23418_AUDIO_SERIAL, 0 }, 164 CX18_AV_AUDIO_SERIAL, 0 },
154 }, 165 },
155 .radio_input = { CX18_CARD_INPUT_AUD_TUNER, 166 .radio_input = { CX18_CARD_INPUT_AUD_TUNER,
156 CX23418_AUDIO_SERIAL, 0 }, 167 CX18_AV_AUDIO_SERIAL, 0 },
157 .tuners = { 168 .tuners = {
158 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 }, 169 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
159 }, 170 },
@@ -183,23 +194,26 @@ static const struct cx18_card_pci_info cx18_pci_mpc718[] = {
183static const struct cx18_card cx18_card_mpc718 = { 194static const struct cx18_card cx18_card_mpc718 = {
184 .type = CX18_CARD_YUAN_MPC718, 195 .type = CX18_CARD_YUAN_MPC718,
185 .name = "Yuan MPC718", 196 .name = "Yuan MPC718",
186 .comment = "Not yet supported!\n", 197 .comment = "Some Composite and S-Video inputs are currently working.\n",
187 .v4l2_capabilities = 0, 198 .v4l2_capabilities = CX18_CAP_ENCODER,
188 .hw_audio_ctrl = CX18_HW_CX23418, 199 .hw_audio_ctrl = CX18_HW_CX23418,
189 .hw_all = CX18_HW_TUNER, 200 .hw_all = CX18_HW_TUNER,
190 .video_inputs = { 201 .video_inputs = {
191 { CX18_CARD_INPUT_VID_TUNER, 0, CX23418_COMPOSITE7 }, 202 { CX18_CARD_INPUT_VID_TUNER, 0, CX18_AV_COMPOSITE2 },
192 { CX18_CARD_INPUT_SVIDEO1, 1, CX23418_SVIDEO1 }, 203 { CX18_CARD_INPUT_SVIDEO1, 1,
193 { CX18_CARD_INPUT_COMPOSITE1, 1, CX23418_COMPOSITE3 }, 204 CX18_AV_SVIDEO_LUMA3 | CX18_AV_SVIDEO_CHROMA4 },
205 { CX18_CARD_INPUT_COMPOSITE1, 1, CX18_AV_COMPOSITE1 },
206 { CX18_CARD_INPUT_SVIDEO2, 2,
207 CX18_AV_SVIDEO_LUMA7 | CX18_AV_SVIDEO_CHROMA8 },
208 { CX18_CARD_INPUT_COMPOSITE2, 2, CX18_AV_COMPOSITE6 },
209 { CX18_CARD_INPUT_COMPOSITE3, 2, CX18_AV_COMPOSITE3 },
194 }, 210 },
195 .audio_inputs = { 211 .audio_inputs = {
196 { CX18_CARD_INPUT_AUD_TUNER, 212 { CX18_CARD_INPUT_AUD_TUNER, CX18_AV_AUDIO5, 0 },
197 CX23418_AUDIO8, 0 }, 213 { CX18_CARD_INPUT_LINE_IN1, CX18_AV_AUDIO_SERIAL, 0 },
198 { CX18_CARD_INPUT_LINE_IN1, 214 { CX18_CARD_INPUT_LINE_IN2, CX18_AV_AUDIO_SERIAL, 0 },
199 CX23418_AUDIO_SERIAL, 0 },
200 }, 215 },
201 .radio_input = { CX18_CARD_INPUT_AUD_TUNER, 216 .radio_input = { CX18_CARD_INPUT_AUD_TUNER, CX18_AV_AUDIO_SERIAL, 0 },
202 CX23418_AUDIO_SERIAL, 0 },
203 .tuners = { 217 .tuners = {
204 /* XC3028 tuner */ 218 /* XC3028 tuner */
205 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 }, 219 { .std = V4L2_STD_ALL, .tuner = TUNER_XC2028 },
diff --git a/drivers/media/video/cx18/cx18-cards.h b/drivers/media/video/cx18/cx18-cards.h
index bccb67f0db16..dc2dd945d4c3 100644
--- a/drivers/media/video/cx18/cx18-cards.h
+++ b/drivers/media/video/cx18/cx18-cards.h
@@ -36,36 +36,6 @@
36#define CX18_CARD_INPUT_COMPOSITE2 5 36#define CX18_CARD_INPUT_COMPOSITE2 5
37#define CX18_CARD_INPUT_COMPOSITE3 6 37#define CX18_CARD_INPUT_COMPOSITE3 6
38 38
39enum cx34180_video_input {
40 /* Composite video inputs In1-In8 */
41 CX23418_COMPOSITE1 = 1,
42 CX23418_COMPOSITE2,
43 CX23418_COMPOSITE3,
44 CX23418_COMPOSITE4,
45 CX23418_COMPOSITE5,
46 CX23418_COMPOSITE6,
47 CX23418_COMPOSITE7,
48 CX23418_COMPOSITE8,
49
50 /* S-Video inputs consist of one luma input (In1-In4) ORed with one
51 chroma input (In5-In8) */
52 CX23418_SVIDEO_LUMA1 = 0x10,
53 CX23418_SVIDEO_LUMA2 = 0x20,
54 CX23418_SVIDEO_LUMA3 = 0x30,
55 CX23418_SVIDEO_LUMA4 = 0x40,
56 CX23418_SVIDEO_CHROMA4 = 0x400,
57 CX23418_SVIDEO_CHROMA5 = 0x500,
58 CX23418_SVIDEO_CHROMA6 = 0x600,
59 CX23418_SVIDEO_CHROMA7 = 0x700,
60 CX23418_SVIDEO_CHROMA8 = 0x800,
61
62 /* S-Video aliases for common luma/chroma combinations */
63 CX23418_SVIDEO1 = 0x510,
64 CX23418_SVIDEO2 = 0x620,
65 CX23418_SVIDEO3 = 0x730,
66 CX23418_SVIDEO4 = 0x840,
67};
68
69/* audio inputs */ 39/* audio inputs */
70#define CX18_CARD_INPUT_AUD_TUNER 1 40#define CX18_CARD_INPUT_AUD_TUNER 1
71#define CX18_CARD_INPUT_LINE_IN1 2 41#define CX18_CARD_INPUT_LINE_IN1 2
@@ -75,16 +45,6 @@ enum cx34180_video_input {
75#define CX18_CARD_MAX_AUDIO_INPUTS 3 45#define CX18_CARD_MAX_AUDIO_INPUTS 3
76#define CX18_CARD_MAX_TUNERS 2 46#define CX18_CARD_MAX_TUNERS 2
77 47
78enum cx23418_audio_input {
79 /* Audio inputs: serial or In4-In8 */
80 CX23418_AUDIO_SERIAL,
81 CX23418_AUDIO4 = 4,
82 CX23418_AUDIO5,
83 CX23418_AUDIO6,
84 CX23418_AUDIO7,
85 CX23418_AUDIO8,
86};
87
88/* V4L2 capability aliases */ 48/* V4L2 capability aliases */
89#define CX18_CAP_ENCODER (V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_TUNER | \ 49#define CX18_CAP_ENCODER (V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_TUNER | \
90 V4L2_CAP_AUDIO | V4L2_CAP_READWRITE) 50 V4L2_CAP_AUDIO | V4L2_CAP_READWRITE)
@@ -118,6 +78,13 @@ struct cx18_gpio_init { /* set initial GPIO DIR and OUT values */
118 u32 initial_value; 78 u32 initial_value;
119}; 79};
120 80
81struct cx18_gpio_i2c_slave_reset {
82 u32 active_lo_mask; /* GPIO outputs that reset i2c chips when low */
83 u32 active_hi_mask; /* GPIO outputs that reset i2c chips when high */
84 int msecs_asserted; /* time period reset must remain asserted */
85 int msecs_recovery; /* time after deassert for chips to be ready */
86};
87
121struct cx18_card_tuner { 88struct cx18_card_tuner {
122 v4l2_std_id std; /* standard for which the tuner is suitable */ 89 v4l2_std_id std; /* standard for which the tuner is suitable */
123 int tuner; /* tuner ID (from tuner.h) */ 90 int tuner; /* tuner ID (from tuner.h) */
@@ -154,7 +121,8 @@ struct cx18_card {
154 121
155 /* GPIO card-specific settings */ 122 /* GPIO card-specific settings */
156 u8 xceive_pin; /* XCeive tuner GPIO reset pin */ 123 u8 xceive_pin; /* XCeive tuner GPIO reset pin */
157 struct cx18_gpio_init gpio_init; 124 struct cx18_gpio_init gpio_init;
125 struct cx18_gpio_i2c_slave_reset gpio_i2c_slave_reset;
158 126
159 struct cx18_card_tuner tuners[CX18_CARD_MAX_TUNERS]; 127 struct cx18_card_tuner tuners[CX18_CARD_MAX_TUNERS];
160 struct cx18_card_tuner_i2c *i2c; 128 struct cx18_card_tuner_i2c *i2c;
diff --git a/drivers/media/video/cx18/cx18-controls.c b/drivers/media/video/cx18/cx18-controls.c
index 2bdac5ebbb0d..87cf41021665 100644
--- a/drivers/media/video/cx18/cx18-controls.c
+++ b/drivers/media/video/cx18/cx18-controls.c
@@ -159,7 +159,7 @@ static int cx18_setup_vbi_fmt(struct cx18 *cx, enum v4l2_mpeg_stream_vbi_fmt fmt
159{ 159{
160 if (!(cx->v4l2_cap & V4L2_CAP_SLICED_VBI_CAPTURE)) 160 if (!(cx->v4l2_cap & V4L2_CAP_SLICED_VBI_CAPTURE))
161 return -EINVAL; 161 return -EINVAL;
162 if (atomic_read(&cx->capturing) > 0) 162 if (atomic_read(&cx->ana_capturing) > 0)
163 return -EBUSY; 163 return -EBUSY;
164 164
165 /* First try to allocate sliced VBI buffers if needed. */ 165 /* First try to allocate sliced VBI buffers if needed. */
@@ -235,7 +235,7 @@ int cx18_control_ioctls(struct cx18 *cx, unsigned int cmd, void *arg)
235 CX18_DEBUG_IOCTL("VIDIOC_S_EXT_CTRLS\n"); 235 CX18_DEBUG_IOCTL("VIDIOC_S_EXT_CTRLS\n");
236 if (c->ctrl_class == V4L2_CTRL_CLASS_MPEG) { 236 if (c->ctrl_class == V4L2_CTRL_CLASS_MPEG) {
237 struct cx2341x_mpeg_params p = cx->params; 237 struct cx2341x_mpeg_params p = cx->params;
238 int err = cx2341x_ext_ctrls(&p, atomic_read(&cx->capturing), arg, cmd); 238 int err = cx2341x_ext_ctrls(&p, atomic_read(&cx->ana_capturing), arg, cmd);
239 239
240 if (err) 240 if (err)
241 return err; 241 return err;
@@ -295,7 +295,7 @@ int cx18_control_ioctls(struct cx18 *cx, unsigned int cmd, void *arg)
295 CX18_DEBUG_IOCTL("VIDIOC_TRY_EXT_CTRLS\n"); 295 CX18_DEBUG_IOCTL("VIDIOC_TRY_EXT_CTRLS\n");
296 if (c->ctrl_class == V4L2_CTRL_CLASS_MPEG) 296 if (c->ctrl_class == V4L2_CTRL_CLASS_MPEG)
297 return cx2341x_ext_ctrls(&cx->params, 297 return cx2341x_ext_ctrls(&cx->params,
298 atomic_read(&cx->capturing), arg, cmd); 298 atomic_read(&cx->ana_capturing), arg, cmd);
299 return -EINVAL; 299 return -EINVAL;
300 } 300 }
301 301
diff --git a/drivers/media/video/cx18/cx18-driver.c b/drivers/media/video/cx18/cx18-driver.c
index 0dd4e0529970..2b810bb2a4c7 100644
--- a/drivers/media/video/cx18/cx18-driver.c
+++ b/drivers/media/video/cx18/cx18-driver.c
@@ -670,7 +670,7 @@ static int __devinit cx18_probe(struct pci_dev *dev,
670 cx18_init_power(cx, 1); 670 cx18_init_power(cx, 1);
671 cx18_init_memory(cx); 671 cx18_init_memory(cx);
672 672
673 cx->scb = (struct cx18_scb *)(cx->enc_mem + SCB_OFFSET); 673 cx->scb = (struct cx18_scb __iomem *)(cx->enc_mem + SCB_OFFSET);
674 cx18_init_scb(cx); 674 cx18_init_scb(cx);
675 675
676 cx18_gpio_init(cx); 676 cx18_gpio_init(cx);
@@ -751,17 +751,6 @@ static int __devinit cx18_probe(struct pci_dev *dev,
751 if (cx->options.radio > 0) 751 if (cx->options.radio > 0)
752 cx->v4l2_cap |= V4L2_CAP_RADIO; 752 cx->v4l2_cap |= V4L2_CAP_RADIO;
753 753
754 retval = cx18_streams_setup(cx);
755 if (retval) {
756 CX18_ERR("Error %d setting up streams\n", retval);
757 goto free_irq;
758 }
759 retval = cx18_streams_register(cx);
760 if (retval) {
761 CX18_ERR("Error %d registering devices\n", retval);
762 goto free_streams;
763 }
764
765 if (cx->options.tuner > -1) { 754 if (cx->options.tuner > -1) {
766 struct tuner_setup setup; 755 struct tuner_setup setup;
767 756
@@ -788,7 +777,16 @@ static int __devinit cx18_probe(struct pci_dev *dev,
788 are not. */ 777 are not. */
789 cx->tuner_std = cx->std; 778 cx->tuner_std = cx->std;
790 779
791 cx18_init_on_first_open(cx); 780 retval = cx18_streams_setup(cx);
781 if (retval) {
782 CX18_ERR("Error %d setting up streams\n", retval);
783 goto free_irq;
784 }
785 retval = cx18_streams_register(cx);
786 if (retval) {
787 CX18_ERR("Error %d registering devices\n", retval);
788 goto free_streams;
789 }
792 790
793 CX18_INFO("Initialized card #%d: %s\n", cx->num, cx->card_name); 791 CX18_INFO("Initialized card #%d: %s\n", cx->num, cx->card_name);
794 792
@@ -889,7 +887,7 @@ static void cx18_remove(struct pci_dev *pci_dev)
889 887
890 /* Stop all captures */ 888 /* Stop all captures */
891 CX18_DEBUG_INFO("Stopping all streams\n"); 889 CX18_DEBUG_INFO("Stopping all streams\n");
892 if (atomic_read(&cx->capturing) > 0) 890 if (atomic_read(&cx->tot_capturing) > 0)
893 cx18_stop_all_captures(cx); 891 cx18_stop_all_captures(cx);
894 892
895 /* Interrupts */ 893 /* Interrupts */
diff --git a/drivers/media/video/cx18/cx18-driver.h b/drivers/media/video/cx18/cx18-driver.h
index a2a6c58d12fe..de14ab59a206 100644
--- a/drivers/media/video/cx18/cx18-driver.h
+++ b/drivers/media/video/cx18/cx18-driver.h
@@ -358,7 +358,7 @@ struct cx18 {
358 u32 v4l2_cap; /* V4L2 capabilities of card */ 358 u32 v4l2_cap; /* V4L2 capabilities of card */
359 u32 hw_flags; /* Hardware description of the board */ 359 u32 hw_flags; /* Hardware description of the board */
360 unsigned mdl_offset; 360 unsigned mdl_offset;
361 struct cx18_scb *scb; /* pointer to SCB */ 361 struct cx18_scb __iomem *scb; /* pointer to SCB */
362 362
363 struct cx18_av_state av_state; 363 struct cx18_av_state av_state;
364 364
@@ -380,7 +380,8 @@ struct cx18 {
380 int stream_buf_size[CX18_MAX_STREAMS]; /* Stream buffer size */ 380 int stream_buf_size[CX18_MAX_STREAMS]; /* Stream buffer size */
381 struct cx18_stream streams[CX18_MAX_STREAMS]; /* Stream data */ 381 struct cx18_stream streams[CX18_MAX_STREAMS]; /* Stream data */
382 unsigned long i_flags; /* global cx18 flags */ 382 unsigned long i_flags; /* global cx18 flags */
383 atomic_t capturing; /* count number of active capture streams */ 383 atomic_t ana_capturing; /* count number of active analog capture streams */
384 atomic_t tot_capturing; /* total count number of active capture streams */
384 spinlock_t lock; /* lock access to this struct */ 385 spinlock_t lock; /* lock access to this struct */
385 int search_pack_header; 386 int search_pack_header;
386 387
@@ -423,6 +424,10 @@ struct cx18 {
423 struct mutex i2c_bus_lock[2]; 424 struct mutex i2c_bus_lock[2];
424 struct i2c_client *i2c_clients[I2C_CLIENTS_MAX]; 425 struct i2c_client *i2c_clients[I2C_CLIENTS_MAX];
425 426
427 /* gpio */
428 u32 gpio_dir;
429 u32 gpio_val;
430
426 /* v4l2 and User settings */ 431 /* v4l2 and User settings */
427 432
428 /* codec settings */ 433 /* codec settings */
diff --git a/drivers/media/video/cx18/cx18-dvb.c b/drivers/media/video/cx18/cx18-dvb.c
index c9744173f969..cae38985b131 100644
--- a/drivers/media/video/cx18/cx18-dvb.c
+++ b/drivers/media/video/cx18/cx18-dvb.c
@@ -69,11 +69,21 @@ static int cx18_dvb_start_feed(struct dvb_demux_feed *feed)
69 struct dvb_demux *demux = feed->demux; 69 struct dvb_demux *demux = feed->demux;
70 struct cx18_stream *stream = (struct cx18_stream *) demux->priv; 70 struct cx18_stream *stream = (struct cx18_stream *) demux->priv;
71 struct cx18 *cx = stream->cx; 71 struct cx18 *cx = stream->cx;
72 int ret = -EINVAL; 72 int ret;
73 u32 v; 73 u32 v;
74 74
75 CX18_DEBUG_INFO("Start feed: pid = 0x%x index = %d\n", 75 CX18_DEBUG_INFO("Start feed: pid = 0x%x index = %d\n",
76 feed->pid, feed->index); 76 feed->pid, feed->index);
77
78 mutex_lock(&cx->serialize_lock);
79 ret = cx18_init_on_first_open(cx);
80 mutex_unlock(&cx->serialize_lock);
81 if (ret) {
82 CX18_ERR("Failed to initialize firmware starting DVB feed\n");
83 return ret;
84 }
85 ret = -EINVAL;
86
77 switch (cx->card->type) { 87 switch (cx->card->type) {
78 case CX18_CARD_HVR_1600_ESMT: 88 case CX18_CARD_HVR_1600_ESMT:
79 case CX18_CARD_HVR_1600_SAMSUNG: 89 case CX18_CARD_HVR_1600_SAMSUNG:
@@ -101,6 +111,11 @@ static int cx18_dvb_start_feed(struct dvb_demux_feed *feed)
101 if (stream->dvb.feeding++ == 0) { 111 if (stream->dvb.feeding++ == 0) {
102 CX18_DEBUG_INFO("Starting Transport DMA\n"); 112 CX18_DEBUG_INFO("Starting Transport DMA\n");
103 ret = cx18_start_v4l2_encode_stream(stream); 113 ret = cx18_start_v4l2_encode_stream(stream);
114 if (ret < 0) {
115 CX18_DEBUG_INFO(
116 "Failed to start Transport DMA\n");
117 stream->dvb.feeding--;
118 }
104 } else 119 } else
105 ret = 0; 120 ret = 0;
106 mutex_unlock(&stream->dvb.feedlock); 121 mutex_unlock(&stream->dvb.feedlock);
diff --git a/drivers/media/video/cx18/cx18-fileops.c b/drivers/media/video/cx18/cx18-fileops.c
index 0b3141db174b..1e537fe04a23 100644
--- a/drivers/media/video/cx18/cx18-fileops.c
+++ b/drivers/media/video/cx18/cx18-fileops.c
@@ -318,7 +318,7 @@ static ssize_t cx18_read(struct cx18_stream *s, char __user *ubuf,
318 size_t tot_written = 0; 318 size_t tot_written = 0;
319 int single_frame = 0; 319 int single_frame = 0;
320 320
321 if (atomic_read(&cx->capturing) == 0 && s->id == -1) { 321 if (atomic_read(&cx->ana_capturing) == 0 && s->id == -1) {
322 /* shouldn't happen */ 322 /* shouldn't happen */
323 CX18_DEBUG_WARN("Stream %s not initialized before read\n", 323 CX18_DEBUG_WARN("Stream %s not initialized before read\n",
324 s->name); 324 s->name);
@@ -361,7 +361,8 @@ static ssize_t cx18_read(struct cx18_stream *s, char __user *ubuf,
361 cx18_enqueue(s, buf, &s->q_free); 361 cx18_enqueue(s, buf, &s->q_free);
362 cx18_vapi(cx, CX18_CPU_DE_SET_MDL, 5, 362 cx18_vapi(cx, CX18_CPU_DE_SET_MDL, 5,
363 s->handle, 363 s->handle,
364 (void *)&cx->scb->cpu_mdl[buf->id] - cx->enc_mem, 364 (void __iomem *)&cx->scb->cpu_mdl[buf->id] -
365 cx->enc_mem,
365 1, buf->id, s->buf_size); 366 1, buf->id, s->buf_size);
366 } else 367 } else
367 cx18_enqueue(s, buf, &s->q_io); 368 cx18_enqueue(s, buf, &s->q_io);
@@ -581,7 +582,7 @@ int cx18_v4l2_close(struct inode *inode, struct file *filp)
581 cx18_call_i2c_clients(cx, VIDIOC_S_STD, &cx->std); 582 cx18_call_i2c_clients(cx, VIDIOC_S_STD, &cx->std);
582 /* Select correct audio input (i.e. TV tuner or Line in) */ 583 /* Select correct audio input (i.e. TV tuner or Line in) */
583 cx18_audio_set_io(cx); 584 cx18_audio_set_io(cx);
584 if (atomic_read(&cx->capturing) > 0) { 585 if (atomic_read(&cx->ana_capturing) > 0) {
585 /* Undo video mute */ 586 /* Undo video mute */
586 cx18_vapi(cx, CX18_CPU_SET_VIDEO_MUTE, 2, s->handle, 587 cx18_vapi(cx, CX18_CPU_SET_VIDEO_MUTE, 2, s->handle,
587 cx->params.video_mute | 588 cx->params.video_mute |
@@ -627,7 +628,7 @@ static int cx18_serialized_open(struct cx18_stream *s, struct file *filp)
627 } 628 }
628 629
629 if (!test_bit(CX18_F_I_RADIO_USER, &cx->i_flags)) { 630 if (!test_bit(CX18_F_I_RADIO_USER, &cx->i_flags)) {
630 if (atomic_read(&cx->capturing) > 0) { 631 if (atomic_read(&cx->ana_capturing) > 0) {
631 /* switching to radio while capture is 632 /* switching to radio while capture is
632 in progress is not polite */ 633 in progress is not polite */
633 cx18_release_stream(s); 634 cx18_release_stream(s);
@@ -694,7 +695,7 @@ int cx18_v4l2_open(struct inode *inode, struct file *filp)
694 695
695void cx18_mute(struct cx18 *cx) 696void cx18_mute(struct cx18 *cx)
696{ 697{
697 if (atomic_read(&cx->capturing)) 698 if (atomic_read(&cx->ana_capturing))
698 cx18_vapi(cx, CX18_CPU_SET_AUDIO_MUTE, 2, 699 cx18_vapi(cx, CX18_CPU_SET_AUDIO_MUTE, 2,
699 cx18_find_handle(cx), 1); 700 cx18_find_handle(cx), 1);
700 CX18_DEBUG_INFO("Mute\n"); 701 CX18_DEBUG_INFO("Mute\n");
@@ -702,7 +703,7 @@ void cx18_mute(struct cx18 *cx)
702 703
703void cx18_unmute(struct cx18 *cx) 704void cx18_unmute(struct cx18 *cx)
704{ 705{
705 if (atomic_read(&cx->capturing)) { 706 if (atomic_read(&cx->ana_capturing)) {
706 cx18_msleep_timeout(100, 0); 707 cx18_msleep_timeout(100, 0);
707 cx18_vapi(cx, CX18_CPU_SET_MISC_PARAMETERS, 2, 708 cx18_vapi(cx, CX18_CPU_SET_MISC_PARAMETERS, 2,
708 cx18_find_handle(cx), 12); 709 cx18_find_handle(cx), 12);
diff --git a/drivers/media/video/cx18/cx18-gpio.c b/drivers/media/video/cx18/cx18-gpio.c
index bb8bc86086d0..b302833f6f9d 100644
--- a/drivers/media/video/cx18/cx18-gpio.c
+++ b/drivers/media/video/cx18/cx18-gpio.c
@@ -35,9 +35,6 @@
35#define CX18_REG_GPIO_OUT2 0xc78104 35#define CX18_REG_GPIO_OUT2 0xc78104
36#define CX18_REG_GPIO_DIR2 0xc7810c 36#define CX18_REG_GPIO_DIR2 0xc7810c
37 37
38static u32 gpio_dir;
39static u32 gpio_val;
40
41/* 38/*
42 * HVR-1600 GPIO pins, courtesy of Hauppauge: 39 * HVR-1600 GPIO pins, courtesy of Hauppauge:
43 * 40 *
@@ -49,24 +46,53 @@ static u32 gpio_val;
49 46
50static void gpio_write(struct cx18 *cx) 47static void gpio_write(struct cx18 *cx)
51{ 48{
52 write_reg((gpio_dir & 0xffff) << 16, CX18_REG_GPIO_DIR1); 49 u32 dir = cx->gpio_dir;
53 write_reg(((gpio_dir & 0xffff) << 16) | (gpio_val & 0xffff), 50 u32 val = cx->gpio_val;
51
52 write_reg((dir & 0xffff) << 16, CX18_REG_GPIO_DIR1);
53 write_reg(((dir & 0xffff) << 16) | (val & 0xffff),
54 CX18_REG_GPIO_OUT1); 54 CX18_REG_GPIO_OUT1);
55 write_reg(gpio_dir & 0xffff0000, CX18_REG_GPIO_DIR2); 55 write_reg(dir & 0xffff0000, CX18_REG_GPIO_DIR2);
56 write_reg((gpio_dir & 0xffff0000) | ((gpio_val & 0xffff0000) >> 16), 56 write_reg_sync((dir & 0xffff0000) | ((val & 0xffff0000) >> 16),
57 CX18_REG_GPIO_OUT2); 57 CX18_REG_GPIO_OUT2);
58} 58}
59 59
60void cx18_gpio_init(struct cx18 *cx) 60void cx18_reset_i2c_slaves_gpio(struct cx18 *cx)
61{ 61{
62 gpio_dir = cx->card->gpio_init.direction; 62 const struct cx18_gpio_i2c_slave_reset *p;
63 gpio_val = cx->card->gpio_init.initial_value; 63
64 p = &cx->card->gpio_i2c_slave_reset;
64 65
65 if (gpio_dir == 0) 66 if ((p->active_lo_mask | p->active_hi_mask) == 0)
66 return; 67 return;
67 68
68 gpio_dir |= 1 << cx->card->xceive_pin; 69 /* Assuming that the masks are a subset of the bits in gpio_dir */
69 gpio_val |= 1 << cx->card->xceive_pin; 70
71 /* Assert */
72 cx->gpio_val =
73 (cx->gpio_val | p->active_hi_mask) & ~(p->active_lo_mask);
74 gpio_write(cx);
75 schedule_timeout_uninterruptible(msecs_to_jiffies(p->msecs_asserted));
76
77 /* Deassert */
78 cx->gpio_val =
79 (cx->gpio_val | p->active_lo_mask) & ~(p->active_hi_mask);
80 gpio_write(cx);
81 schedule_timeout_uninterruptible(msecs_to_jiffies(p->msecs_recovery));
82}
83
84void cx18_gpio_init(struct cx18 *cx)
85{
86 cx->gpio_dir = cx->card->gpio_init.direction;
87 cx->gpio_val = cx->card->gpio_init.initial_value;
88
89 if (cx->card->tuners[0].tuner == TUNER_XC2028) {
90 cx->gpio_dir |= 1 << cx->card->xceive_pin;
91 cx->gpio_val |= 1 << cx->card->xceive_pin;
92 }
93
94 if (cx->gpio_dir == 0)
95 return;
70 96
71 CX18_DEBUG_INFO("GPIO initial dir: %08x/%08x out: %08x/%08x\n", 97 CX18_DEBUG_INFO("GPIO initial dir: %08x/%08x out: %08x/%08x\n",
72 read_reg(CX18_REG_GPIO_DIR1), read_reg(CX18_REG_GPIO_DIR2), 98 read_reg(CX18_REG_GPIO_DIR1), read_reg(CX18_REG_GPIO_DIR2),
@@ -86,13 +112,12 @@ int cx18_reset_tuner_gpio(void *dev, int cmd, int value)
86 return 0; 112 return 0;
87 CX18_DEBUG_INFO("Resetting tuner\n"); 113 CX18_DEBUG_INFO("Resetting tuner\n");
88 114
89 gpio_dir |= 1 << cx->card->xceive_pin; 115 cx->gpio_val &= ~(1 << cx->card->xceive_pin);
90 gpio_val &= ~(1 << cx->card->xceive_pin);
91 116
92 gpio_write(cx); 117 gpio_write(cx);
93 schedule_timeout_interruptible(msecs_to_jiffies(1)); 118 schedule_timeout_interruptible(msecs_to_jiffies(1));
94 119
95 gpio_val |= 1 << cx->card->xceive_pin; 120 cx->gpio_val |= 1 << cx->card->xceive_pin;
96 gpio_write(cx); 121 gpio_write(cx);
97 schedule_timeout_interruptible(msecs_to_jiffies(1)); 122 schedule_timeout_interruptible(msecs_to_jiffies(1));
98 return 0; 123 return 0;
diff --git a/drivers/media/video/cx18/cx18-gpio.h b/drivers/media/video/cx18/cx18-gpio.h
index 41bac8856b50..525c328f748a 100644
--- a/drivers/media/video/cx18/cx18-gpio.h
+++ b/drivers/media/video/cx18/cx18-gpio.h
@@ -21,4 +21,5 @@
21 */ 21 */
22 22
23void cx18_gpio_init(struct cx18 *cx); 23void cx18_gpio_init(struct cx18 *cx);
24void cx18_reset_i2c_slaves_gpio(struct cx18 *cx);
24int cx18_reset_tuner_gpio(void *dev, int cmd, int value); 25int cx18_reset_tuner_gpio(void *dev, int cmd, int value);
diff --git a/drivers/media/video/cx18/cx18-i2c.c b/drivers/media/video/cx18/cx18-i2c.c
index 1d6c51a75313..680bc4e35b79 100644
--- a/drivers/media/video/cx18/cx18-i2c.c
+++ b/drivers/media/video/cx18/cx18-i2c.c
@@ -405,6 +405,8 @@ int init_cx18_i2c(struct cx18 *cx)
405 cx18_setscl(&cx->i2c_algo_cb_data[1], 1); 405 cx18_setscl(&cx->i2c_algo_cb_data[1], 1);
406 cx18_setsda(&cx->i2c_algo_cb_data[1], 1); 406 cx18_setsda(&cx->i2c_algo_cb_data[1], 1);
407 407
408 cx18_reset_i2c_slaves_gpio(cx);
409
408 return i2c_bit_add_bus(&cx->i2c_adap[0]) || 410 return i2c_bit_add_bus(&cx->i2c_adap[0]) ||
409 i2c_bit_add_bus(&cx->i2c_adap[1]); 411 i2c_bit_add_bus(&cx->i2c_adap[1]);
410} 412}
diff --git a/drivers/media/video/cx18/cx18-ioctl.c b/drivers/media/video/cx18/cx18-ioctl.c
index dbdcb86ec5aa..4151f1e5493f 100644
--- a/drivers/media/video/cx18/cx18-ioctl.c
+++ b/drivers/media/video/cx18/cx18-ioctl.c
@@ -247,7 +247,7 @@ static int cx18_try_or_set_fmt(struct cx18 *cx, int streamtype,
247 247
248 if (!set_fmt || (cx->params.width == w && cx->params.height == h)) 248 if (!set_fmt || (cx->params.width == w && cx->params.height == h))
249 return 0; 249 return 0;
250 if (atomic_read(&cx->capturing) > 0) 250 if (atomic_read(&cx->ana_capturing) > 0)
251 return -EBUSY; 251 return -EBUSY;
252 252
253 cx->params.width = w; 253 cx->params.width = w;
@@ -264,7 +264,7 @@ static int cx18_try_or_set_fmt(struct cx18 *cx, int streamtype,
264 if (fmt->type == V4L2_BUF_TYPE_VBI_CAPTURE) { 264 if (fmt->type == V4L2_BUF_TYPE_VBI_CAPTURE) {
265 if (set_fmt && streamtype == CX18_ENC_STREAM_TYPE_VBI && 265 if (set_fmt && streamtype == CX18_ENC_STREAM_TYPE_VBI &&
266 cx->vbi.sliced_in->service_set && 266 cx->vbi.sliced_in->service_set &&
267 atomic_read(&cx->capturing) > 0) 267 atomic_read(&cx->ana_capturing) > 0)
268 return -EBUSY; 268 return -EBUSY;
269 if (set_fmt) { 269 if (set_fmt) {
270 cx->vbi.sliced_in->service_set = 0; 270 cx->vbi.sliced_in->service_set = 0;
@@ -293,7 +293,7 @@ static int cx18_try_or_set_fmt(struct cx18 *cx, int streamtype,
293 return 0; 293 return 0;
294 if (set == 0) 294 if (set == 0)
295 return -EINVAL; 295 return -EINVAL;
296 if (atomic_read(&cx->capturing) > 0 && cx->vbi.sliced_in->service_set == 0) 296 if (atomic_read(&cx->ana_capturing) > 0 && cx->vbi.sliced_in->service_set == 0)
297 return -EBUSY; 297 return -EBUSY;
298 cx18_av_cmd(cx, VIDIOC_S_FMT, fmt); 298 cx18_av_cmd(cx, VIDIOC_S_FMT, fmt);
299 memcpy(cx->vbi.sliced_in, vbifmt, sizeof(*cx->vbi.sliced_in)); 299 memcpy(cx->vbi.sliced_in, vbifmt, sizeof(*cx->vbi.sliced_in));
@@ -581,7 +581,7 @@ int cx18_v4l2_ioctls(struct cx18 *cx, struct file *filp, unsigned cmd, void *arg
581 break; 581 break;
582 582
583 if (test_bit(CX18_F_I_RADIO_USER, &cx->i_flags) || 583 if (test_bit(CX18_F_I_RADIO_USER, &cx->i_flags) ||
584 atomic_read(&cx->capturing) > 0) { 584 atomic_read(&cx->ana_capturing) > 0) {
585 /* Switching standard would turn off the radio or mess 585 /* Switching standard would turn off the radio or mess
586 with already running streams, prevent that by 586 with already running streams, prevent that by
587 returning EBUSY. */ 587 returning EBUSY. */
@@ -677,7 +677,7 @@ int cx18_v4l2_ioctls(struct cx18 *cx, struct file *filp, unsigned cmd, void *arg
677 enc->flags = 0; 677 enc->flags = 0;
678 if (try) 678 if (try)
679 return 0; 679 return 0;
680 if (!atomic_read(&cx->capturing)) 680 if (!atomic_read(&cx->ana_capturing))
681 return -EPERM; 681 return -EPERM;
682 if (test_and_set_bit(CX18_F_I_ENC_PAUSED, &cx->i_flags)) 682 if (test_and_set_bit(CX18_F_I_ENC_PAUSED, &cx->i_flags))
683 return 0; 683 return 0;
@@ -689,7 +689,7 @@ int cx18_v4l2_ioctls(struct cx18 *cx, struct file *filp, unsigned cmd, void *arg
689 enc->flags = 0; 689 enc->flags = 0;
690 if (try) 690 if (try)
691 return 0; 691 return 0;
692 if (!atomic_read(&cx->capturing)) 692 if (!atomic_read(&cx->ana_capturing))
693 return -EPERM; 693 return -EPERM;
694 if (!test_and_clear_bit(CX18_F_I_ENC_PAUSED, &cx->i_flags)) 694 if (!test_and_clear_bit(CX18_F_I_ENC_PAUSED, &cx->i_flags))
695 return 0; 695 return 0;
diff --git a/drivers/media/video/cx18/cx18-irq.c b/drivers/media/video/cx18/cx18-irq.c
index 6e14f8bda559..25114a5cbd57 100644
--- a/drivers/media/video/cx18/cx18-irq.c
+++ b/drivers/media/video/cx18/cx18-irq.c
@@ -75,7 +75,7 @@ static void epu_dma_done(struct cx18 *cx, struct cx18_mailbox *mb)
75 75
76 cx18_buf_sync_for_device(s, buf); 76 cx18_buf_sync_for_device(s, buf);
77 cx18_vapi(cx, CX18_CPU_DE_SET_MDL, 5, s->handle, 77 cx18_vapi(cx, CX18_CPU_DE_SET_MDL, 5, s->handle,
78 (void *)&cx->scb->cpu_mdl[buf->id] - cx->enc_mem, 78 (void __iomem *)&cx->scb->cpu_mdl[buf->id] - cx->enc_mem,
79 1, buf->id, s->buf_size); 79 1, buf->id, s->buf_size);
80 } else 80 } else
81 set_bit(CX18_F_B_NEED_BUF_SWAP, &buf->b_flags); 81 set_bit(CX18_F_B_NEED_BUF_SWAP, &buf->b_flags);
@@ -161,13 +161,15 @@ irqreturn_t cx18_irq_handler(int irq, void *dev_id)
161 */ 161 */
162 162
163 if (sw2) { 163 if (sw2) {
164 if (sw2 & (cx->scb->cpu2hpu_irq_ack | cx->scb->cpu2epu_irq_ack)) 164 if (sw2 & (readl(&cx->scb->cpu2hpu_irq_ack) |
165 readl(&cx->scb->cpu2epu_irq_ack)))
165 wake_up(&cx->mb_cpu_waitq); 166 wake_up(&cx->mb_cpu_waitq);
166 if (sw2 & (cx->scb->apu2hpu_irq_ack | cx->scb->apu2epu_irq_ack)) 167 if (sw2 & (readl(&cx->scb->apu2hpu_irq_ack) |
168 readl(&cx->scb->apu2epu_irq_ack)))
167 wake_up(&cx->mb_apu_waitq); 169 wake_up(&cx->mb_apu_waitq);
168 if (sw2 & cx->scb->epu2hpu_irq_ack) 170 if (sw2 & readl(&cx->scb->epu2hpu_irq_ack))
169 wake_up(&cx->mb_epu_waitq); 171 wake_up(&cx->mb_epu_waitq);
170 if (sw2 & cx->scb->hpu2epu_irq_ack) 172 if (sw2 & readl(&cx->scb->hpu2epu_irq_ack))
171 wake_up(&cx->mb_hpu_waitq); 173 wake_up(&cx->mb_hpu_waitq);
172 } 174 }
173 175
diff --git a/drivers/media/video/cx18/cx18-mailbox.c b/drivers/media/video/cx18/cx18-mailbox.c
index 0c5f328bca54..2a5ccef9185b 100644
--- a/drivers/media/video/cx18/cx18-mailbox.c
+++ b/drivers/media/video/cx18/cx18-mailbox.c
@@ -94,10 +94,10 @@ static const struct cx18_api_info *find_api_info(u32 cmd)
94 return NULL; 94 return NULL;
95} 95}
96 96
97static struct cx18_mailbox *cx18_mb_is_complete(struct cx18 *cx, int rpu, 97static struct cx18_mailbox __iomem *cx18_mb_is_complete(struct cx18 *cx, int rpu,
98 u32 *state, u32 *irq, u32 *req) 98 u32 *state, u32 *irq, u32 *req)
99{ 99{
100 struct cx18_mailbox *mb = NULL; 100 struct cx18_mailbox __iomem *mb = NULL;
101 int wait_count = 0; 101 int wait_count = 0;
102 u32 ack; 102 u32 ack;
103 103
@@ -142,7 +142,7 @@ static struct cx18_mailbox *cx18_mb_is_complete(struct cx18 *cx, int rpu,
142long cx18_mb_ack(struct cx18 *cx, const struct cx18_mailbox *mb) 142long cx18_mb_ack(struct cx18 *cx, const struct cx18_mailbox *mb)
143{ 143{
144 const struct cx18_api_info *info = find_api_info(mb->cmd); 144 const struct cx18_api_info *info = find_api_info(mb->cmd);
145 struct cx18_mailbox *ack_mb; 145 struct cx18_mailbox __iomem *ack_mb;
146 u32 ack_irq; 146 u32 ack_irq;
147 u8 rpu = CPU; 147 u8 rpu = CPU;
148 148
@@ -182,7 +182,7 @@ static int cx18_api_call(struct cx18 *cx, u32 cmd, int args, u32 data[])
182{ 182{
183 const struct cx18_api_info *info = find_api_info(cmd); 183 const struct cx18_api_info *info = find_api_info(cmd);
184 u32 state = 0, irq = 0, req, oldreq, err; 184 u32 state = 0, irq = 0, req, oldreq, err;
185 struct cx18_mailbox *mb; 185 struct cx18_mailbox __iomem *mb;
186 wait_queue_head_t *waitq; 186 wait_queue_head_t *waitq;
187 int timeout = 100; 187 int timeout = 100;
188 int cnt = 0; 188 int cnt = 0;
diff --git a/drivers/media/video/cx18/cx18-streams.c b/drivers/media/video/cx18/cx18-streams.c
index 4ca9d847f1b1..1b921a336092 100644
--- a/drivers/media/video/cx18/cx18-streams.c
+++ b/drivers/media/video/cx18/cx18-streams.c
@@ -36,12 +36,13 @@
36#define CX18_DSP0_INTERRUPT_MASK 0xd0004C 36#define CX18_DSP0_INTERRUPT_MASK 0xd0004C
37 37
38static struct file_operations cx18_v4l2_enc_fops = { 38static struct file_operations cx18_v4l2_enc_fops = {
39 .owner = THIS_MODULE, 39 .owner = THIS_MODULE,
40 .read = cx18_v4l2_read, 40 .read = cx18_v4l2_read,
41 .open = cx18_v4l2_open, 41 .open = cx18_v4l2_open,
42 .ioctl = cx18_v4l2_ioctl, 42 .ioctl = cx18_v4l2_ioctl,
43 .release = cx18_v4l2_close, 43 .compat_ioctl = v4l_compat_ioctl32,
44 .poll = cx18_v4l2_enc_poll, 44 .release = cx18_v4l2_close,
45 .poll = cx18_v4l2_enc_poll,
45}; 46};
46 47
47/* offset from 0 to register ts v4l2 minors on */ 48/* offset from 0 to register ts v4l2 minors on */
@@ -443,7 +444,7 @@ int cx18_start_v4l2_encode_stream(struct cx18_stream *s)
443 s->handle = data[0]; 444 s->handle = data[0];
444 cx18_vapi(cx, CX18_CPU_SET_CHANNEL_TYPE, 2, s->handle, captype); 445 cx18_vapi(cx, CX18_CPU_SET_CHANNEL_TYPE, 2, s->handle, captype);
445 446
446 if (atomic_read(&cx->capturing) == 0 && !ts) { 447 if (atomic_read(&cx->ana_capturing) == 0 && !ts) {
447 /* Stuff from Windows, we don't know what it is */ 448 /* Stuff from Windows, we don't know what it is */
448 cx18_vapi(cx, CX18_CPU_SET_VER_CROP_LINE, 2, s->handle, 0); 449 cx18_vapi(cx, CX18_CPU_SET_VER_CROP_LINE, 2, s->handle, 0);
449 cx18_vapi(cx, CX18_CPU_SET_MISC_PARAMETERS, 3, s->handle, 3, 1); 450 cx18_vapi(cx, CX18_CPU_SET_MISC_PARAMETERS, 3, s->handle, 3, 1);
@@ -466,14 +467,14 @@ int cx18_start_v4l2_encode_stream(struct cx18_stream *s)
466 cx2341x_update(cx, cx18_api_func, NULL, &cx->params); 467 cx2341x_update(cx, cx18_api_func, NULL, &cx->params);
467 } 468 }
468 469
469 if (atomic_read(&cx->capturing) == 0) { 470 if (atomic_read(&cx->tot_capturing) == 0) {
470 clear_bit(CX18_F_I_EOS, &cx->i_flags); 471 clear_bit(CX18_F_I_EOS, &cx->i_flags);
471 write_reg(7, CX18_DSP0_INTERRUPT_MASK); 472 write_reg(7, CX18_DSP0_INTERRUPT_MASK);
472 } 473 }
473 474
474 cx18_vapi(cx, CX18_CPU_DE_SET_MDL_ACK, 3, s->handle, 475 cx18_vapi(cx, CX18_CPU_DE_SET_MDL_ACK, 3, s->handle,
475 (void *)&cx->scb->cpu_mdl_ack[s->type][0] - cx->enc_mem, 476 (void __iomem *)&cx->scb->cpu_mdl_ack[s->type][0] - cx->enc_mem,
476 (void *)&cx->scb->cpu_mdl_ack[s->type][1] - cx->enc_mem); 477 (void __iomem *)&cx->scb->cpu_mdl_ack[s->type][1] - cx->enc_mem);
477 478
478 list_for_each(p, &s->q_free.list) { 479 list_for_each(p, &s->q_free.list) {
479 struct cx18_buffer *buf = list_entry(p, struct cx18_buffer, list); 480 struct cx18_buffer *buf = list_entry(p, struct cx18_buffer, list);
@@ -481,8 +482,8 @@ int cx18_start_v4l2_encode_stream(struct cx18_stream *s)
481 writel(buf->dma_handle, &cx->scb->cpu_mdl[buf->id].paddr); 482 writel(buf->dma_handle, &cx->scb->cpu_mdl[buf->id].paddr);
482 writel(s->buf_size, &cx->scb->cpu_mdl[buf->id].length); 483 writel(s->buf_size, &cx->scb->cpu_mdl[buf->id].length);
483 cx18_vapi(cx, CX18_CPU_DE_SET_MDL, 5, s->handle, 484 cx18_vapi(cx, CX18_CPU_DE_SET_MDL, 5, s->handle,
484 (void *)&cx->scb->cpu_mdl[buf->id] - cx->enc_mem, 1, 485 (void __iomem *)&cx->scb->cpu_mdl[buf->id] - cx->enc_mem,
485 buf->id, s->buf_size); 486 1, buf->id, s->buf_size);
486 } 487 }
487 /* begin_capture */ 488 /* begin_capture */
488 if (cx18_vapi(cx, CX18_CPU_CAPTURE_START, 1, s->handle)) { 489 if (cx18_vapi(cx, CX18_CPU_CAPTURE_START, 1, s->handle)) {
@@ -492,7 +493,9 @@ int cx18_start_v4l2_encode_stream(struct cx18_stream *s)
492 } 493 }
493 494
494 /* you're live! sit back and await interrupts :) */ 495 /* you're live! sit back and await interrupts :) */
495 atomic_inc(&cx->capturing); 496 if (!ts)
497 atomic_inc(&cx->ana_capturing);
498 atomic_inc(&cx->tot_capturing);
496 return 0; 499 return 0;
497} 500}
498 501
@@ -523,7 +526,7 @@ int cx18_stop_v4l2_encode_stream(struct cx18_stream *s, int gop_end)
523 526
524 CX18_DEBUG_INFO("Stop Capture\n"); 527 CX18_DEBUG_INFO("Stop Capture\n");
525 528
526 if (atomic_read(&cx->capturing) == 0) 529 if (atomic_read(&cx->tot_capturing) == 0)
527 return 0; 530 return 0;
528 531
529 if (s->type == CX18_ENC_STREAM_TYPE_MPG) 532 if (s->type == CX18_ENC_STREAM_TYPE_MPG)
@@ -537,7 +540,9 @@ int cx18_stop_v4l2_encode_stream(struct cx18_stream *s, int gop_end)
537 CX18_INFO("ignoring gop_end: not (yet?) supported by the firmware\n"); 540 CX18_INFO("ignoring gop_end: not (yet?) supported by the firmware\n");
538 } 541 }
539 542
540 atomic_dec(&cx->capturing); 543 if (s->type != CX18_ENC_STREAM_TYPE_TS)
544 atomic_dec(&cx->ana_capturing);
545 atomic_dec(&cx->tot_capturing);
541 546
542 /* Clear capture and no-read bits */ 547 /* Clear capture and no-read bits */
543 clear_bit(CX18_F_S_STREAMING, &s->s_flags); 548 clear_bit(CX18_F_S_STREAMING, &s->s_flags);
@@ -545,7 +550,7 @@ int cx18_stop_v4l2_encode_stream(struct cx18_stream *s, int gop_end)
545 cx18_vapi(cx, CX18_DESTROY_TASK, 1, s->handle); 550 cx18_vapi(cx, CX18_DESTROY_TASK, 1, s->handle);
546 s->handle = 0xffffffff; 551 s->handle = 0xffffffff;
547 552
548 if (atomic_read(&cx->capturing) > 0) 553 if (atomic_read(&cx->tot_capturing) > 0)
549 return 0; 554 return 0;
550 555
551 write_reg(5, CX18_DSP0_INTERRUPT_MASK); 556 write_reg(5, CX18_DSP0_INTERRUPT_MASK);
diff --git a/drivers/media/video/cx23885/cx23885-core.c b/drivers/media/video/cx23885/cx23885-core.c
index f24abcd06dea..c4cc2f3b8876 100644
--- a/drivers/media/video/cx23885/cx23885-core.c
+++ b/drivers/media/video/cx23885/cx23885-core.c
@@ -823,7 +823,7 @@ static void cx23885_dev_unregister(struct cx23885_dev *dev)
823 iounmap(dev->lmmio); 823 iounmap(dev->lmmio);
824} 824}
825 825
826static u32* cx23885_risc_field(u32 *rp, struct scatterlist *sglist, 826static __le32* cx23885_risc_field(__le32 *rp, struct scatterlist *sglist,
827 unsigned int offset, u32 sync_line, 827 unsigned int offset, u32 sync_line,
828 unsigned int bpl, unsigned int padding, 828 unsigned int bpl, unsigned int padding,
829 unsigned int lines) 829 unsigned int lines)
@@ -883,7 +883,7 @@ int cx23885_risc_buffer(struct pci_dev *pci, struct btcx_riscmem *risc,
883 unsigned int padding, unsigned int lines) 883 unsigned int padding, unsigned int lines)
884{ 884{
885 u32 instructions, fields; 885 u32 instructions, fields;
886 u32 *rp; 886 __le32 *rp;
887 int rc; 887 int rc;
888 888
889 fields = 0; 889 fields = 0;
@@ -924,7 +924,7 @@ static int cx23885_risc_databuffer(struct pci_dev *pci,
924 unsigned int lines) 924 unsigned int lines)
925{ 925{
926 u32 instructions; 926 u32 instructions;
927 u32 *rp; 927 __le32 *rp;
928 int rc; 928 int rc;
929 929
930 /* estimate risc mem: worst case is one write per page border + 930 /* estimate risc mem: worst case is one write per page border +
@@ -951,7 +951,7 @@ static int cx23885_risc_databuffer(struct pci_dev *pci,
951int cx23885_risc_stopper(struct pci_dev *pci, struct btcx_riscmem *risc, 951int cx23885_risc_stopper(struct pci_dev *pci, struct btcx_riscmem *risc,
952 u32 reg, u32 mask, u32 value) 952 u32 reg, u32 mask, u32 value)
953{ 953{
954 u32 *rp; 954 __le32 *rp;
955 int rc; 955 int rc;
956 956
957 if ((rc = btcx_riscmem_alloc(pci, risc, 4*16)) < 0) 957 if ((rc = btcx_riscmem_alloc(pci, risc, 4*16)) < 0)
diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c
index 607efdcd22f8..1da6f134888d 100644
--- a/drivers/media/video/cx25840/cx25840-core.c
+++ b/drivers/media/video/cx25840/cx25840-core.c
@@ -433,7 +433,7 @@ static int set_input(struct i2c_client *client, enum cx25840_video_input vid_inp
433 int chroma = vid_input & 0xf00; 433 int chroma = vid_input & 0xf00;
434 434
435 if ((vid_input & ~0xff0) || 435 if ((vid_input & ~0xff0) ||
436 luma < CX25840_SVIDEO_LUMA1 || luma > CX25840_SVIDEO_LUMA4 || 436 luma < CX25840_SVIDEO_LUMA1 || luma > CX25840_SVIDEO_LUMA8 ||
437 chroma < CX25840_SVIDEO_CHROMA4 || chroma > CX25840_SVIDEO_CHROMA8) { 437 chroma < CX25840_SVIDEO_CHROMA4 || chroma > CX25840_SVIDEO_CHROMA8) {
438 v4l_err(client, "0x%04x is not a valid video input!\n", 438 v4l_err(client, "0x%04x is not a valid video input!\n",
439 vid_input); 439 vid_input);
diff --git a/drivers/media/video/cx88/cx88-alsa.c b/drivers/media/video/cx88/cx88-alsa.c
index e976fc6bef7c..80c8883e54b5 100644
--- a/drivers/media/video/cx88/cx88-alsa.c
+++ b/drivers/media/video/cx88/cx88-alsa.c
@@ -332,6 +332,12 @@ static int snd_cx88_pcm_open(struct snd_pcm_substream *substream)
332 struct snd_pcm_runtime *runtime = substream->runtime; 332 struct snd_pcm_runtime *runtime = substream->runtime;
333 int err; 333 int err;
334 334
335 if (!chip) {
336 printk(KERN_ERR "BUG: cx88 can't find device struct."
337 " Can't proceed with open\n");
338 return -ENODEV;
339 }
340
335 err = snd_pcm_hw_constraint_pow2(runtime, 0, SNDRV_PCM_HW_PARAM_PERIODS); 341 err = snd_pcm_hw_constraint_pow2(runtime, 0, SNDRV_PCM_HW_PARAM_PERIODS);
336 if (err < 0) 342 if (err < 0)
337 goto _error; 343 goto _error;
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c
index aeba26dc0a37..fa6d398e97b9 100644
--- a/drivers/media/video/cx88/cx88-cards.c
+++ b/drivers/media/video/cx88/cx88-cards.c
@@ -1493,10 +1493,16 @@ static const struct cx88_board cx88_boards[] = {
1493 }, 1493 },
1494 }, 1494 },
1495 [CX88_BOARD_POWERCOLOR_REAL_ANGEL] = { 1495 [CX88_BOARD_POWERCOLOR_REAL_ANGEL] = {
1496 .name = "PowerColor Real Angel 330", 1496 .name = "PowerColor RA330", /* Long names may confuse LIRC. */
1497 .tuner_type = TUNER_XC2028, 1497 .tuner_type = TUNER_XC2028,
1498 .tuner_addr = 0x61, 1498 .tuner_addr = 0x61,
1499 .input = { { 1499 .input = { {
1500 .type = CX88_VMUX_DEBUG,
1501 .vmux = 3, /* Due to the way the cx88 driver is written, */
1502 .gpio0 = 0x00ff, /* there is no way to deactivate audio pass- */
1503 .gpio1 = 0xf39d, /* through without this entry. Furthermore, if */
1504 .gpio3 = 0x0000, /* the TV mux entry is first, you get audio */
1505 }, { /* from the tuner on boot for a little while. */
1500 .type = CX88_VMUX_TELEVISION, 1506 .type = CX88_VMUX_TELEVISION,
1501 .vmux = 0, 1507 .vmux = 0,
1502 .gpio0 = 0x00ff, 1508 .gpio0 = 0x00ff,
@@ -2424,8 +2430,9 @@ void cx88_setup_xc3028(struct cx88_core *core, struct xc2028_ctrl *ctl)
2424 2430
2425 switch (core->boardnr) { 2431 switch (core->boardnr) {
2426 case CX88_BOARD_POWERCOLOR_REAL_ANGEL: 2432 case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
2427 /* Doesn't work with firmware version 2.7 */ 2433 /* Now works with firmware version 2.7 */
2428 ctl->fname = "xc3028-v25.fw"; 2434 if (core->i2c_algo.udelay < 16)
2435 core->i2c_algo.udelay = 16;
2429 break; 2436 break;
2430 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO: 2437 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
2431 ctl->scode_table = XC3028_FE_ZARLINK456; 2438 ctl->scode_table = XC3028_FE_ZARLINK456;
diff --git a/drivers/media/video/cx88/cx88-core.c b/drivers/media/video/cx88/cx88-core.c
index c4d1aff1fdb4..60eeda3057e9 100644
--- a/drivers/media/video/cx88/cx88-core.c
+++ b/drivers/media/video/cx88/cx88-core.c
@@ -70,7 +70,7 @@ static DEFINE_MUTEX(devlist);
70 70
71/* @lpi: lines per IRQ, or 0 to not generate irqs. Note: IRQ to be 71/* @lpi: lines per IRQ, or 0 to not generate irqs. Note: IRQ to be
72 generated _after_ lpi lines are transferred. */ 72 generated _after_ lpi lines are transferred. */
73static u32* cx88_risc_field(u32 *rp, struct scatterlist *sglist, 73static __le32* cx88_risc_field(__le32 *rp, struct scatterlist *sglist,
74 unsigned int offset, u32 sync_line, 74 unsigned int offset, u32 sync_line,
75 unsigned int bpl, unsigned int padding, 75 unsigned int bpl, unsigned int padding,
76 unsigned int lines, unsigned int lpi) 76 unsigned int lines, unsigned int lpi)
@@ -130,7 +130,7 @@ int cx88_risc_buffer(struct pci_dev *pci, struct btcx_riscmem *risc,
130 unsigned int bpl, unsigned int padding, unsigned int lines) 130 unsigned int bpl, unsigned int padding, unsigned int lines)
131{ 131{
132 u32 instructions,fields; 132 u32 instructions,fields;
133 u32 *rp; 133 __le32 *rp;
134 int rc; 134 int rc;
135 135
136 fields = 0; 136 fields = 0;
@@ -168,7 +168,7 @@ int cx88_risc_databuffer(struct pci_dev *pci, struct btcx_riscmem *risc,
168 unsigned int lines, unsigned int lpi) 168 unsigned int lines, unsigned int lpi)
169{ 169{
170 u32 instructions; 170 u32 instructions;
171 u32 *rp; 171 __le32 *rp;
172 int rc; 172 int rc;
173 173
174 /* estimate risc mem: worst case is one write per page border + 174 /* estimate risc mem: worst case is one write per page border +
@@ -193,7 +193,7 @@ int cx88_risc_databuffer(struct pci_dev *pci, struct btcx_riscmem *risc,
193int cx88_risc_stopper(struct pci_dev *pci, struct btcx_riscmem *risc, 193int cx88_risc_stopper(struct pci_dev *pci, struct btcx_riscmem *risc,
194 u32 reg, u32 mask, u32 value) 194 u32 reg, u32 mask, u32 value)
195{ 195{
196 u32 *rp; 196 __le32 *rp;
197 int rc; 197 int rc;
198 198
199 if ((rc = btcx_riscmem_alloc(pci, risc, 4*16)) < 0) 199 if ((rc = btcx_riscmem_alloc(pci, risc, 4*16)) < 0)
diff --git a/drivers/media/video/em28xx/em28xx-audio.c b/drivers/media/video/em28xx/em28xx-audio.c
index 92b2a6db4fdc..3c006103c1eb 100644
--- a/drivers/media/video/em28xx/em28xx-audio.c
+++ b/drivers/media/video/em28xx/em28xx-audio.c
@@ -268,6 +268,12 @@ static int snd_em28xx_capture_open(struct snd_pcm_substream *substream)
268 268
269 dprintk("opening device and trying to acquire exclusive lock\n"); 269 dprintk("opening device and trying to acquire exclusive lock\n");
270 270
271 if (!dev) {
272 printk(KERN_ERR "BUG: em28xx can't find device struct."
273 " Can't proceed with open\n");
274 return -ENODEV;
275 }
276
271 /* Sets volume, mute, etc */ 277 /* Sets volume, mute, etc */
272 278
273 dev->mute = 0; 279 dev->mute = 0;
@@ -415,6 +421,12 @@ static int em28xx_audio_init(struct em28xx *dev)
415 static int devnr; 421 static int devnr;
416 int ret, err; 422 int ret, err;
417 423
424 if (dev->has_audio_class) {
425 /* This device does not support the extension (in this case
426 the device is expecting the snd-usb-audio module */
427 return 0;
428 }
429
418 printk(KERN_INFO "em28xx-audio.c: probing for em28x1 " 430 printk(KERN_INFO "em28xx-audio.c: probing for em28x1 "
419 "non standard usbaudio\n"); 431 "non standard usbaudio\n");
420 printk(KERN_INFO "em28xx-audio.c: Copyright (C) 2006 Markus " 432 printk(KERN_INFO "em28xx-audio.c: Copyright (C) 2006 Markus "
@@ -458,6 +470,12 @@ static int em28xx_audio_fini(struct em28xx *dev)
458 if (dev == NULL) 470 if (dev == NULL)
459 return 0; 471 return 0;
460 472
473 if (dev->has_audio_class) {
474 /* This device does not support the extension (in this case
475 the device is expecting the snd-usb-audio module */
476 return 0;
477 }
478
461 if (dev->adev) { 479 if (dev->adev) {
462 snd_card_free(dev->adev->sndcard); 480 snd_card_free(dev->adev->sndcard);
463 kfree(dev->adev); 481 kfree(dev->adev);
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index 3e4f3c7e92e7..8cbda43727c3 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -157,6 +157,7 @@ struct em28xx_board em28xx_boards[] = {
157 .tda9887_conf = TDA9887_PRESENT, 157 .tda9887_conf = TDA9887_PRESENT,
158 .tuner_type = TUNER_XC2028, 158 .tuner_type = TUNER_XC2028,
159 .mts_firmware = 1, 159 .mts_firmware = 1,
160 .has_dvb = 1,
160 .decoder = EM28XX_TVP5150, 161 .decoder = EM28XX_TVP5150,
161 .input = { { 162 .input = { {
162 .type = EM28XX_VMUX_TELEVISION, 163 .type = EM28XX_VMUX_TELEVISION,
@@ -524,6 +525,9 @@ void em28xx_pre_card_setup(struct em28xx *dev)
524 rc = em28xx_read_reg(dev, EM28XX_R0A_CHIPID); 525 rc = em28xx_read_reg(dev, EM28XX_R0A_CHIPID);
525 if (rc > 0) { 526 if (rc > 0) {
526 switch (rc) { 527 switch (rc) {
528 case CHIP_ID_EM2860:
529 em28xx_info("chip ID is em2860\n");
530 break;
527 case CHIP_ID_EM2883: 531 case CHIP_ID_EM2883:
528 em28xx_info("chip ID is em2882/em2883\n"); 532 em28xx_info("chip ID is em2882/em2883\n");
529 dev->wait_after_write = 0; 533 dev->wait_after_write = 0;
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c
index 8cf4983f0039..0b2333ee07f8 100644
--- a/drivers/media/video/em28xx/em28xx-dvb.c
+++ b/drivers/media/video/em28xx/em28xx-dvb.c
@@ -382,6 +382,11 @@ static int dvb_init(struct em28xx *dev)
382 int result = 0; 382 int result = 0;
383 struct em28xx_dvb *dvb; 383 struct em28xx_dvb *dvb;
384 384
385 if (!dev->has_dvb) {
386 /* This device does not support the extension */
387 return 0;
388 }
389
385 dvb = kzalloc(sizeof(struct em28xx_dvb), GFP_KERNEL); 390 dvb = kzalloc(sizeof(struct em28xx_dvb), GFP_KERNEL);
386 391
387 if (dvb == NULL) { 392 if (dvb == NULL) {
@@ -444,6 +449,11 @@ out_free:
444 449
445static int dvb_fini(struct em28xx *dev) 450static int dvb_fini(struct em28xx *dev)
446{ 451{
452 if (!dev->has_dvb) {
453 /* This device does not support the extension */
454 return 0;
455 }
456
447 if (dev->dvb) { 457 if (dev->dvb) {
448 unregister_dvb(dev->dvb); 458 unregister_dvb(dev->dvb);
449 dev->dvb = NULL; 459 dev->dvb = NULL;
diff --git a/drivers/media/video/em28xx/em28xx-reg.h b/drivers/media/video/em28xx/em28xx-reg.h
index 9058bed07953..fac1ab23f621 100644
--- a/drivers/media/video/em28xx/em28xx-reg.h
+++ b/drivers/media/video/em28xx/em28xx-reg.h
@@ -84,5 +84,6 @@
84 84
85/* FIXME: Need to be populated with the other chip ID's */ 85/* FIXME: Need to be populated with the other chip ID's */
86enum em28xx_chip_id { 86enum em28xx_chip_id {
87 CHIP_ID_EM2860 = 34,
87 CHIP_ID_EM2883 = 36, 88 CHIP_ID_EM2883 = 36,
88}; 89};
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index 8996175cc950..285bc62bbe46 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -1166,13 +1166,13 @@ static int vidioc_g_register(struct file *file, void *priv,
1166 1166
1167 reg->val = ret; 1167 reg->val = ret;
1168 } else { 1168 } else {
1169 u64 val = 0; 1169 __le64 val = 0;
1170 ret = em28xx_read_reg_req_len(dev, USB_REQ_GET_STATUS, 1170 ret = em28xx_read_reg_req_len(dev, USB_REQ_GET_STATUS,
1171 reg->reg, (char *)&val, 2); 1171 reg->reg, (char *)&val, 2);
1172 if (ret < 0) 1172 if (ret < 0)
1173 return ret; 1173 return ret;
1174 1174
1175 reg->val = cpu_to_le64((__u64)val); 1175 reg->val = le64_to_cpu(val);
1176 } 1176 }
1177 1177
1178 return 0; 1178 return 0;
@@ -1183,9 +1183,9 @@ static int vidioc_s_register(struct file *file, void *priv,
1183{ 1183{
1184 struct em28xx_fh *fh = priv; 1184 struct em28xx_fh *fh = priv;
1185 struct em28xx *dev = fh->dev; 1185 struct em28xx *dev = fh->dev;
1186 u64 buf; 1186 __le64 buf;
1187 1187
1188 buf = le64_to_cpu((__u64)reg->val); 1188 buf = cpu_to_le64(reg->val);
1189 1189
1190 return em28xx_write_regs(dev, reg->reg, (char *)&buf, 1190 return em28xx_write_regs(dev, reg->reg, (char *)&buf,
1191 em28xx_reg_len(reg->reg)); 1191 em28xx_reg_len(reg->reg));
@@ -1848,32 +1848,28 @@ static DEFINE_MUTEX(em28xx_extension_devlist_lock);
1848 1848
1849int em28xx_register_extension(struct em28xx_ops *ops) 1849int em28xx_register_extension(struct em28xx_ops *ops)
1850{ 1850{
1851 struct em28xx *h, *dev = NULL; 1851 struct em28xx *dev = NULL;
1852
1853 list_for_each_entry(h, &em28xx_devlist, devlist)
1854 dev = h;
1855 1852
1856 mutex_lock(&em28xx_extension_devlist_lock); 1853 mutex_lock(&em28xx_extension_devlist_lock);
1857 list_add_tail(&ops->next, &em28xx_extension_devlist); 1854 list_add_tail(&ops->next, &em28xx_extension_devlist);
1858 if (dev) 1855 list_for_each_entry(dev, &em28xx_devlist, devlist) {
1859 ops->init(dev); 1856 if (dev)
1860 1857 ops->init(dev);
1858 }
1861 printk(KERN_INFO "Em28xx: Initialized (%s) extension\n", ops->name); 1859 printk(KERN_INFO "Em28xx: Initialized (%s) extension\n", ops->name);
1862 mutex_unlock(&em28xx_extension_devlist_lock); 1860 mutex_unlock(&em28xx_extension_devlist_lock);
1863
1864 return 0; 1861 return 0;
1865} 1862}
1866EXPORT_SYMBOL(em28xx_register_extension); 1863EXPORT_SYMBOL(em28xx_register_extension);
1867 1864
1868void em28xx_unregister_extension(struct em28xx_ops *ops) 1865void em28xx_unregister_extension(struct em28xx_ops *ops)
1869{ 1866{
1870 struct em28xx *h, *dev = NULL; 1867 struct em28xx *dev = NULL;
1871
1872 list_for_each_entry(h, &em28xx_devlist, devlist)
1873 dev = h;
1874 1868
1875 if (dev) 1869 list_for_each_entry(dev, &em28xx_devlist, devlist) {
1876 ops->fini(dev); 1870 if (dev)
1871 ops->fini(dev);
1872 }
1877 1873
1878 mutex_lock(&em28xx_extension_devlist_lock); 1874 mutex_lock(&em28xx_extension_devlist_lock);
1879 printk(KERN_INFO "Em28xx: Removed (%s) extension\n", ops->name); 1875 printk(KERN_INFO "Em28xx: Removed (%s) extension\n", ops->name);
diff --git a/drivers/media/video/ivtv/ivtv-driver.h b/drivers/media/video/ivtv/ivtv-driver.h
index ba06e813c58c..9d23b1efd36d 100644
--- a/drivers/media/video/ivtv/ivtv-driver.h
+++ b/drivers/media/video/ivtv/ivtv-driver.h
@@ -259,6 +259,12 @@ struct ivtv_mailbox_data {
259 259
260/* Scatter-Gather array element, used in DMA transfers */ 260/* Scatter-Gather array element, used in DMA transfers */
261struct ivtv_sg_element { 261struct ivtv_sg_element {
262 __le32 src;
263 __le32 dst;
264 __le32 size;
265};
266
267struct ivtv_sg_host_element {
262 u32 src; 268 u32 src;
263 u32 dst; 269 u32 dst;
264 u32 size; 270 u32 size;
@@ -349,8 +355,8 @@ struct ivtv_stream {
349 u16 dma_xfer_cnt; 355 u16 dma_xfer_cnt;
350 356
351 /* Base Dev SG Array for cx23415/6 */ 357 /* Base Dev SG Array for cx23415/6 */
352 struct ivtv_sg_element *sg_pending; 358 struct ivtv_sg_host_element *sg_pending;
353 struct ivtv_sg_element *sg_processing; 359 struct ivtv_sg_host_element *sg_processing;
354 struct ivtv_sg_element *sg_dma; 360 struct ivtv_sg_element *sg_dma;
355 dma_addr_t sg_handle; 361 dma_addr_t sg_handle;
356 int sg_pending_size; 362 int sg_pending_size;
diff --git a/drivers/media/video/ivtv/ivtv-fileops.c b/drivers/media/video/ivtv/ivtv-fileops.c
index f2fa434b677b..db813e071ce6 100644
--- a/drivers/media/video/ivtv/ivtv-fileops.c
+++ b/drivers/media/video/ivtv/ivtv-fileops.c
@@ -587,7 +587,7 @@ retry:
587 since we may get here before the stream has been fully set-up */ 587 since we may get here before the stream has been fully set-up */
588 if (mode == OUT_YUV && s->q_full.length == 0 && itv->dma_data_req_size) { 588 if (mode == OUT_YUV && s->q_full.length == 0 && itv->dma_data_req_size) {
589 while (count >= itv->dma_data_req_size) { 589 while (count >= itv->dma_data_req_size) {
590 if (!ivtv_yuv_udma_stream_frame (itv, (void *)user_buf)) { 590 if (!ivtv_yuv_udma_stream_frame (itv, (void __user *)user_buf)) {
591 bytes_written += itv->dma_data_req_size; 591 bytes_written += itv->dma_data_req_size;
592 user_buf += itv->dma_data_req_size; 592 user_buf += itv->dma_data_req_size;
593 count -= itv->dma_data_req_size; 593 count -= itv->dma_data_req_size;
diff --git a/drivers/media/video/ivtv/ivtv-irq.c b/drivers/media/video/ivtv/ivtv-irq.c
index d8ba3a4a8761..fba150a6cd23 100644
--- a/drivers/media/video/ivtv/ivtv-irq.c
+++ b/drivers/media/video/ivtv/ivtv-irq.c
@@ -231,14 +231,14 @@ static void dma_post(struct ivtv_stream *s)
231 struct ivtv_buffer *buf = NULL; 231 struct ivtv_buffer *buf = NULL;
232 struct list_head *p; 232 struct list_head *p;
233 u32 offset; 233 u32 offset;
234 u32 *u32buf; 234 __le32 *u32buf;
235 int x = 0; 235 int x = 0;
236 236
237 IVTV_DEBUG_HI_DMA("%s %s completed (%x)\n", ivtv_use_pio(s) ? "PIO" : "DMA", 237 IVTV_DEBUG_HI_DMA("%s %s completed (%x)\n", ivtv_use_pio(s) ? "PIO" : "DMA",
238 s->name, s->dma_offset); 238 s->name, s->dma_offset);
239 list_for_each(p, &s->q_dma.list) { 239 list_for_each(p, &s->q_dma.list) {
240 buf = list_entry(p, struct ivtv_buffer, list); 240 buf = list_entry(p, struct ivtv_buffer, list);
241 u32buf = (u32 *)buf->buf; 241 u32buf = (__le32 *)buf->buf;
242 242
243 /* Sync Buffer */ 243 /* Sync Buffer */
244 ivtv_buf_sync_for_cpu(s, buf); 244 ivtv_buf_sync_for_cpu(s, buf);
@@ -444,7 +444,7 @@ static void ivtv_dma_enc_start(struct ivtv_stream *s)
444 } 444 }
445 445
446 s->dma_xfer_cnt++; 446 s->dma_xfer_cnt++;
447 memcpy(s->sg_processing, s->sg_pending, sizeof(struct ivtv_sg_element) * s->sg_pending_size); 447 memcpy(s->sg_processing, s->sg_pending, sizeof(struct ivtv_sg_host_element) * s->sg_pending_size);
448 s->sg_processing_size = s->sg_pending_size; 448 s->sg_processing_size = s->sg_pending_size;
449 s->sg_pending_size = 0; 449 s->sg_pending_size = 0;
450 s->sg_processed = 0; 450 s->sg_processed = 0;
@@ -473,7 +473,7 @@ static void ivtv_dma_dec_start(struct ivtv_stream *s)
473 if (s->q_predma.bytesused) 473 if (s->q_predma.bytesused)
474 ivtv_queue_move(s, &s->q_predma, NULL, &s->q_dma, s->q_predma.bytesused); 474 ivtv_queue_move(s, &s->q_predma, NULL, &s->q_dma, s->q_predma.bytesused);
475 s->dma_xfer_cnt++; 475 s->dma_xfer_cnt++;
476 memcpy(s->sg_processing, s->sg_pending, sizeof(struct ivtv_sg_element) * s->sg_pending_size); 476 memcpy(s->sg_processing, s->sg_pending, sizeof(struct ivtv_sg_host_element) * s->sg_pending_size);
477 s->sg_processing_size = s->sg_pending_size; 477 s->sg_processing_size = s->sg_pending_size;
478 s->sg_pending_size = 0; 478 s->sg_pending_size = 0;
479 s->sg_processed = 0; 479 s->sg_processed = 0;
diff --git a/drivers/media/video/ivtv/ivtv-queue.c b/drivers/media/video/ivtv/ivtv-queue.c
index fc8b1eaa333b..71bd13e22e2e 100644
--- a/drivers/media/video/ivtv/ivtv-queue.c
+++ b/drivers/media/video/ivtv/ivtv-queue.c
@@ -193,7 +193,7 @@ void ivtv_flush_queues(struct ivtv_stream *s)
193int ivtv_stream_alloc(struct ivtv_stream *s) 193int ivtv_stream_alloc(struct ivtv_stream *s)
194{ 194{
195 struct ivtv *itv = s->itv; 195 struct ivtv *itv = s->itv;
196 int SGsize = sizeof(struct ivtv_sg_element) * s->buffers; 196 int SGsize = sizeof(struct ivtv_sg_host_element) * s->buffers;
197 int i; 197 int i;
198 198
199 if (s->buffers == 0) 199 if (s->buffers == 0)
diff --git a/drivers/media/video/ivtv/ivtv-streams.c b/drivers/media/video/ivtv/ivtv-streams.c
index c47c2b945147..c854285a4371 100644
--- a/drivers/media/video/ivtv/ivtv-streams.c
+++ b/drivers/media/video/ivtv/ivtv-streams.c
@@ -44,23 +44,25 @@
44#include "ivtv-streams.h" 44#include "ivtv-streams.h"
45 45
46static const struct file_operations ivtv_v4l2_enc_fops = { 46static const struct file_operations ivtv_v4l2_enc_fops = {
47 .owner = THIS_MODULE, 47 .owner = THIS_MODULE,
48 .read = ivtv_v4l2_read, 48 .read = ivtv_v4l2_read,
49 .write = ivtv_v4l2_write, 49 .write = ivtv_v4l2_write,
50 .open = ivtv_v4l2_open, 50 .open = ivtv_v4l2_open,
51 .ioctl = ivtv_v4l2_ioctl, 51 .ioctl = ivtv_v4l2_ioctl,
52 .release = ivtv_v4l2_close, 52 .compat_ioctl = v4l_compat_ioctl32,
53 .poll = ivtv_v4l2_enc_poll, 53 .release = ivtv_v4l2_close,
54 .poll = ivtv_v4l2_enc_poll,
54}; 55};
55 56
56static const struct file_operations ivtv_v4l2_dec_fops = { 57static const struct file_operations ivtv_v4l2_dec_fops = {
57 .owner = THIS_MODULE, 58 .owner = THIS_MODULE,
58 .read = ivtv_v4l2_read, 59 .read = ivtv_v4l2_read,
59 .write = ivtv_v4l2_write, 60 .write = ivtv_v4l2_write,
60 .open = ivtv_v4l2_open, 61 .open = ivtv_v4l2_open,
61 .ioctl = ivtv_v4l2_ioctl, 62 .ioctl = ivtv_v4l2_ioctl,
62 .release = ivtv_v4l2_close, 63 .compat_ioctl = v4l_compat_ioctl32,
63 .poll = ivtv_v4l2_dec_poll, 64 .release = ivtv_v4l2_close,
65 .poll = ivtv_v4l2_dec_poll,
64}; 66};
65 67
66#define IVTV_V4L2_DEC_MPG_OFFSET 16 /* offset from 0 to register decoder mpg v4l2 minors on */ 68#define IVTV_V4L2_DEC_MPG_OFFSET 16 /* offset from 0 to register decoder mpg v4l2 minors on */
diff --git a/drivers/media/video/ivtv/ivtv-version.h b/drivers/media/video/ivtv/ivtv-version.h
index 02c5ab071d1b..442f43f11b73 100644
--- a/drivers/media/video/ivtv/ivtv-version.h
+++ b/drivers/media/video/ivtv/ivtv-version.h
@@ -22,8 +22,8 @@
22 22
23#define IVTV_DRIVER_NAME "ivtv" 23#define IVTV_DRIVER_NAME "ivtv"
24#define IVTV_DRIVER_VERSION_MAJOR 1 24#define IVTV_DRIVER_VERSION_MAJOR 1
25#define IVTV_DRIVER_VERSION_MINOR 2 25#define IVTV_DRIVER_VERSION_MINOR 3
26#define IVTV_DRIVER_VERSION_PATCHLEVEL 1 26#define IVTV_DRIVER_VERSION_PATCHLEVEL 0
27 27
28#define IVTV_VERSION __stringify(IVTV_DRIVER_VERSION_MAJOR) "." __stringify(IVTV_DRIVER_VERSION_MINOR) "." __stringify(IVTV_DRIVER_VERSION_PATCHLEVEL) 28#define IVTV_VERSION __stringify(IVTV_DRIVER_VERSION_MAJOR) "." __stringify(IVTV_DRIVER_VERSION_MINOR) "." __stringify(IVTV_DRIVER_VERSION_PATCHLEVEL)
29#define IVTV_DRIVER_VERSION KERNEL_VERSION(IVTV_DRIVER_VERSION_MAJOR,IVTV_DRIVER_VERSION_MINOR,IVTV_DRIVER_VERSION_PATCHLEVEL) 29#define IVTV_DRIVER_VERSION KERNEL_VERSION(IVTV_DRIVER_VERSION_MAJOR,IVTV_DRIVER_VERSION_MINOR,IVTV_DRIVER_VERSION_PATCHLEVEL)
diff --git a/drivers/media/video/ivtv/ivtv-yuv.c b/drivers/media/video/ivtv/ivtv-yuv.c
index a9417f6e4087..3092ff1d00a0 100644
--- a/drivers/media/video/ivtv/ivtv-yuv.c
+++ b/drivers/media/video/ivtv/ivtv-yuv.c
@@ -1116,7 +1116,7 @@ void ivtv_yuv_setup_stream_frame(struct ivtv *itv)
1116} 1116}
1117 1117
1118/* Attempt to dma a frame from a user buffer */ 1118/* Attempt to dma a frame from a user buffer */
1119int ivtv_yuv_udma_stream_frame(struct ivtv *itv, void *src) 1119int ivtv_yuv_udma_stream_frame(struct ivtv *itv, void __user *src)
1120{ 1120{
1121 struct yuv_playback_info *yi = &itv->yuv_info; 1121 struct yuv_playback_info *yi = &itv->yuv_info;
1122 struct ivtv_dma_frame dma_args; 1122 struct ivtv_dma_frame dma_args;
diff --git a/drivers/media/video/ivtv/ivtv-yuv.h b/drivers/media/video/ivtv/ivtv-yuv.h
index 2fe5f1250762..ca5173fbf006 100644
--- a/drivers/media/video/ivtv/ivtv-yuv.h
+++ b/drivers/media/video/ivtv/ivtv-yuv.h
@@ -35,7 +35,7 @@ extern const u32 yuv_offset[IVTV_YUV_BUFFERS];
35 35
36int ivtv_yuv_filter_check(struct ivtv *itv); 36int ivtv_yuv_filter_check(struct ivtv *itv);
37void ivtv_yuv_setup_stream_frame(struct ivtv *itv); 37void ivtv_yuv_setup_stream_frame(struct ivtv *itv);
38int ivtv_yuv_udma_stream_frame(struct ivtv *itv, void *src); 38int ivtv_yuv_udma_stream_frame(struct ivtv *itv, void __user *src);
39void ivtv_yuv_frame_complete(struct ivtv *itv); 39void ivtv_yuv_frame_complete(struct ivtv *itv);
40int ivtv_yuv_prep_frame(struct ivtv *itv, struct ivtv_dma_frame *args); 40int ivtv_yuv_prep_frame(struct ivtv *itv, struct ivtv_dma_frame *args);
41void ivtv_yuv_close(struct ivtv *itv); 41void ivtv_yuv_close(struct ivtv *itv);
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c
index 7cc8e9b19fb7..5ec5bb9a94d2 100644
--- a/drivers/media/video/pxa_camera.c
+++ b/drivers/media/video/pxa_camera.c
@@ -1019,12 +1019,12 @@ static int pxa_camera_probe(struct platform_device *pdev)
1019 struct pxa_camera_dev *pcdev; 1019 struct pxa_camera_dev *pcdev;
1020 struct resource *res; 1020 struct resource *res;
1021 void __iomem *base; 1021 void __iomem *base;
1022 unsigned int irq; 1022 int irq;
1023 int err = 0; 1023 int err = 0;
1024 1024
1025 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1025 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1026 irq = platform_get_irq(pdev, 0); 1026 irq = platform_get_irq(pdev, 0);
1027 if (!res || !irq) { 1027 if (!res || irq < 0) {
1028 err = -ENODEV; 1028 err = -ENODEV;
1029 goto exit; 1029 goto exit;
1030 } 1030 }
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c
index ba3082422a01..f118de6e3672 100644
--- a/drivers/media/video/saa7134/saa7134-alsa.c
+++ b/drivers/media/video/saa7134/saa7134-alsa.c
@@ -613,9 +613,15 @@ static int snd_card_saa7134_capture_open(struct snd_pcm_substream * substream)
613 struct snd_pcm_runtime *runtime = substream->runtime; 613 struct snd_pcm_runtime *runtime = substream->runtime;
614 snd_card_saa7134_pcm_t *pcm; 614 snd_card_saa7134_pcm_t *pcm;
615 snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream); 615 snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream);
616 struct saa7134_dev *dev = saa7134->dev; 616 struct saa7134_dev *dev;
617 int amux, err; 617 int amux, err;
618 618
619 if (!saa7134) {
620 printk(KERN_ERR "BUG: saa7134 can't find device struct."
621 " Can't proceed with open\n");
622 return -ENODEV;
623 }
624 dev = saa7134->dev;
619 mutex_lock(&dev->dmasound.lock); 625 mutex_lock(&dev->dmasound.lock);
620 626
621 dev->dmasound.read_count = 0; 627 dev->dmasound.read_count = 0;
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c
index b111903aa322..2618cfa592e7 100644
--- a/drivers/media/video/saa7134/saa7134-cards.c
+++ b/drivers/media/video/saa7134/saa7134-cards.c
@@ -4114,11 +4114,7 @@ struct saa7134_board saa7134_boards[] = {
4114 .radio_type = UNSET, 4114 .radio_type = UNSET,
4115 .tuner_addr = ADDR_UNSET, 4115 .tuner_addr = ADDR_UNSET,
4116 .radio_addr = ADDR_UNSET, 4116 .radio_addr = ADDR_UNSET,
4117 /*
4118 TODO:
4119 .mpeg = SAA7134_MPEG_DVB, 4117 .mpeg = SAA7134_MPEG_DVB,
4120 */
4121
4122 .inputs = {{ 4118 .inputs = {{
4123 .name = name_tv, 4119 .name = name_tv,
4124 .vmux = 1, 4120 .vmux = 1,
@@ -4157,7 +4153,7 @@ struct saa7134_board saa7134_boards[] = {
4157 } }, 4153 } },
4158 .radio = { 4154 .radio = {
4159 .name = name_radio, 4155 .name = name_radio,
4160 .amux = LINE1, 4156 .amux = TV,
4161 }, 4157 },
4162 }, 4158 },
4163 [SAA7134_BOARD_AVERMEDIA_M115] = { 4159 [SAA7134_BOARD_AVERMEDIA_M115] = {
@@ -4167,6 +4163,7 @@ struct saa7134_board saa7134_boards[] = {
4167 .radio_type = UNSET, 4163 .radio_type = UNSET,
4168 .tuner_addr = ADDR_UNSET, 4164 .tuner_addr = ADDR_UNSET,
4169 .radio_addr = ADDR_UNSET, 4165 .radio_addr = ADDR_UNSET,
4166 .mpeg = SAA7134_MPEG_DVB,
4170 .inputs = {{ 4167 .inputs = {{
4171 .name = name_tv, 4168 .name = name_tv,
4172 .vmux = 1, 4169 .vmux = 1,
@@ -5351,22 +5348,21 @@ static int saa7134_xc2028_callback(struct saa7134_dev *dev,
5351{ 5348{
5352 switch (command) { 5349 switch (command) {
5353 case XC2028_TUNER_RESET: 5350 case XC2028_TUNER_RESET:
5354 saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x06e20000, 0x06e20000); 5351 saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x00008000, 0x00000000);
5355 saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x06a20000, 0x06a20000); 5352 saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x00008000, 0x00008000);
5356 mdelay(250); 5353 switch (dev->board) {
5357 saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x06e20000, 0); 5354 case SAA7134_BOARD_AVERMEDIA_CARDBUS_506:
5358 saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x06a20000, 0); 5355 saa7134_set_gpio(dev, 23, 0);
5359 mdelay(250); 5356 msleep(10);
5360 saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x06e20000, 0x06e20000); 5357 saa7134_set_gpio(dev, 23, 1);
5361 saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x06a20000, 0x06a20000); 5358 break;
5362 mdelay(250); 5359 case SAA7134_BOARD_AVERMEDIA_A16D:
5363 saa_andorl(SAA7133_ANALOG_IO_SELECT >> 2, 0x02, 0x02); 5360 saa7134_set_gpio(dev, 21, 0);
5364 saa_andorl(SAA7134_ANALOG_IN_CTRL1 >> 2, 0x81, 0x81); 5361 msleep(10);
5365 saa_andorl(SAA7134_AUDIO_CLOCK0 >> 2, 0x03187de7, 0x03187de7); 5362 saa7134_set_gpio(dev, 21, 1);
5366 saa_andorl(SAA7134_AUDIO_PLL_CTRL >> 2, 0x03, 0x03); 5363 break;
5367 saa_andorl(SAA7134_AUDIO_CLOCKS_PER_FIELD0 >> 2, 5364 }
5368 0x0001e000, 0x0001e000); 5365 return 0;
5369 return 0;
5370 } 5366 }
5371 return -EINVAL; 5367 return -EINVAL;
5372} 5368}
@@ -5553,9 +5549,7 @@ int saa7134_board_init1(struct saa7134_dev *dev)
5553 saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x08000000, 0x00000000); 5549 saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x08000000, 0x00000000);
5554 break; 5550 break;
5555 case SAA7134_BOARD_AVERMEDIA_CARDBUS: 5551 case SAA7134_BOARD_AVERMEDIA_CARDBUS:
5556 case SAA7134_BOARD_AVERMEDIA_CARDBUS_506:
5557 case SAA7134_BOARD_AVERMEDIA_M115: 5552 case SAA7134_BOARD_AVERMEDIA_M115:
5558 case SAA7134_BOARD_AVERMEDIA_A16D:
5559 /* power-down tuner chip */ 5553 /* power-down tuner chip */
5560 saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0xffffffff, 0); 5554 saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0xffffffff, 0);
5561 saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0xffffffff, 0); 5555 saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0xffffffff, 0);
@@ -5565,6 +5559,18 @@ int saa7134_board_init1(struct saa7134_dev *dev)
5565 saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0xffffffff, 0xffffffff); 5559 saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0xffffffff, 0xffffffff);
5566 msleep(10); 5560 msleep(10);
5567 break; 5561 break;
5562 case SAA7134_BOARD_AVERMEDIA_CARDBUS_506:
5563 saa7134_set_gpio(dev, 23, 0);
5564 msleep(10);
5565 saa7134_set_gpio(dev, 23, 1);
5566 break;
5567 case SAA7134_BOARD_AVERMEDIA_A16D:
5568 saa7134_set_gpio(dev, 21, 0);
5569 msleep(10);
5570 saa7134_set_gpio(dev, 21, 1);
5571 msleep(1);
5572 dev->has_remote = SAA7134_REMOTE_GPIO;
5573 break;
5568 case SAA7134_BOARD_BEHOLD_COLUMBUS_TVFM: 5574 case SAA7134_BOARD_BEHOLD_COLUMBUS_TVFM:
5569 /* power-down tuner chip */ 5575 /* power-down tuner chip */
5570 saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x000A8004, 0x000A8004); 5576 saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x000A8004, 0x000A8004);
@@ -5615,7 +5621,8 @@ int saa7134_board_init1(struct saa7134_dev *dev)
5615 saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x80040100, 0x80040100); 5621 saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x80040100, 0x80040100);
5616 saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x80040100, 0x00040100); 5622 saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x80040100, 0x00040100);
5617 printk("%s: %s: hybrid analog/dvb card\n" 5623 printk("%s: %s: hybrid analog/dvb card\n"
5618 "%s: Sorry, only the analog inputs are supported for now.\n", 5624 "%s: Sorry, only analog s-video and composite input "
5625 "are supported for now.\n",
5619 dev->name, card(dev).name, dev->name); 5626 dev->name, card(dev).name, dev->name);
5620 break; 5627 break;
5621 } 5628 }
@@ -5675,6 +5682,7 @@ static void saa7134_tuner_setup(struct saa7134_dev *dev)
5675 5682
5676 switch (dev->board) { 5683 switch (dev->board) {
5677 case SAA7134_BOARD_AVERMEDIA_A16D: 5684 case SAA7134_BOARD_AVERMEDIA_A16D:
5685 case SAA7134_BOARD_AVERMEDIA_CARDBUS_506:
5678 ctl.demod = XC3028_FE_ZARLINK456; 5686 ctl.demod = XC3028_FE_ZARLINK456;
5679 break; 5687 break;
5680 default: 5688 default:
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c
index 469f93aac008..341b101b0357 100644
--- a/drivers/media/video/saa7134/saa7134-dvb.c
+++ b/drivers/media/video/saa7134/saa7134-dvb.c
@@ -153,12 +153,12 @@ static int mt352_aver777_init(struct dvb_frontend* fe)
153 return 0; 153 return 0;
154} 154}
155 155
156static int mt352_aver_a16d_init(struct dvb_frontend *fe) 156static int mt352_avermedia_xc3028_init(struct dvb_frontend *fe)
157{ 157{
158 static u8 clock_config [] = { CLOCK_CTL, 0x38, 0x2d }; 158 static u8 clock_config [] = { CLOCK_CTL, 0x38, 0x2d };
159 static u8 reset [] = { RESET, 0x80 }; 159 static u8 reset [] = { RESET, 0x80 };
160 static u8 adc_ctl_1_cfg [] = { ADC_CTL_1, 0x40 }; 160 static u8 adc_ctl_1_cfg [] = { ADC_CTL_1, 0x40 };
161 static u8 agc_cfg [] = { AGC_TARGET, 0x28, 0xa0 }; 161 static u8 agc_cfg [] = { AGC_TARGET, 0xe };
162 static u8 capt_range_cfg[] = { CAPT_RANGE, 0x33 }; 162 static u8 capt_range_cfg[] = { CAPT_RANGE, 0x33 };
163 163
164 mt352_write(fe, clock_config, sizeof(clock_config)); 164 mt352_write(fe, clock_config, sizeof(clock_config));
@@ -167,12 +167,9 @@ static int mt352_aver_a16d_init(struct dvb_frontend *fe)
167 mt352_write(fe, adc_ctl_1_cfg, sizeof(adc_ctl_1_cfg)); 167 mt352_write(fe, adc_ctl_1_cfg, sizeof(adc_ctl_1_cfg));
168 mt352_write(fe, agc_cfg, sizeof(agc_cfg)); 168 mt352_write(fe, agc_cfg, sizeof(agc_cfg));
169 mt352_write(fe, capt_range_cfg, sizeof(capt_range_cfg)); 169 mt352_write(fe, capt_range_cfg, sizeof(capt_range_cfg));
170
171 return 0; 170 return 0;
172} 171}
173 172
174
175
176static int mt352_pinnacle_tuner_set_params(struct dvb_frontend* fe, 173static int mt352_pinnacle_tuner_set_params(struct dvb_frontend* fe,
177 struct dvb_frontend_parameters* params) 174 struct dvb_frontend_parameters* params)
178{ 175{
@@ -215,14 +212,10 @@ static struct mt352_config avermedia_777 = {
215 .demod_init = mt352_aver777_init, 212 .demod_init = mt352_aver777_init,
216}; 213};
217 214
218static struct mt352_config avermedia_16d = { 215static struct mt352_config avermedia_xc3028_mt352_dev = {
219 .demod_address = 0xf,
220 .demod_init = mt352_aver_a16d_init,
221};
222
223static struct mt352_config avermedia_e506r_mt352_dev = {
224 .demod_address = (0x1e >> 1), 216 .demod_address = (0x1e >> 1),
225 .no_tuner = 1, 217 .no_tuner = 1,
218 .demod_init = mt352_avermedia_xc3028_init,
226}; 219};
227 220
228/* ================================================================== 221/* ==================================================================
@@ -975,9 +968,10 @@ static int dvb_init(struct saa7134_dev *dev)
975 } 968 }
976 break; 969 break;
977 case SAA7134_BOARD_AVERMEDIA_A16D: 970 case SAA7134_BOARD_AVERMEDIA_A16D:
978 dprintk("avertv A16D dvb setup\n"); 971 dprintk("AverMedia A16D dvb setup\n");
979 dev->dvb.frontend = dvb_attach(mt352_attach, &avermedia_16d, 972 dev->dvb.frontend = dvb_attach(mt352_attach,
980 &dev->i2c_adap); 973 &avermedia_xc3028_mt352_dev,
974 &dev->i2c_adap);
981 attach_xc3028 = 1; 975 attach_xc3028 = 1;
982 break; 976 break;
983 case SAA7134_BOARD_MD7134: 977 case SAA7134_BOARD_MD7134:
@@ -1091,7 +1085,8 @@ static int dvb_init(struct saa7134_dev *dev)
1091 ads_tech_duo_config.tuner_address); 1085 ads_tech_duo_config.tuner_address);
1092 goto dettach_frontend; 1086 goto dettach_frontend;
1093 } 1087 }
1094 } 1088 } else
1089 wprintk("failed to attach tda10046\n");
1095 break; 1090 break;
1096 case SAA7134_BOARD_TEVION_DVBT_220RF: 1091 case SAA7134_BOARD_TEVION_DVBT_220RF:
1097 if (configure_tda827x_fe(dev, &tevion_dvbt220rf_config, 1092 if (configure_tda827x_fe(dev, &tevion_dvbt220rf_config,
@@ -1260,11 +1255,14 @@ static int dvb_init(struct saa7134_dev *dev)
1260 goto dettach_frontend; 1255 goto dettach_frontend;
1261 break; 1256 break;
1262 case SAA7134_BOARD_AVERMEDIA_CARDBUS_506: 1257 case SAA7134_BOARD_AVERMEDIA_CARDBUS_506:
1258 dprintk("AverMedia E506R dvb setup\n");
1259 saa7134_set_gpio(dev, 25, 0);
1260 msleep(10);
1261 saa7134_set_gpio(dev, 25, 1);
1263 dev->dvb.frontend = dvb_attach(mt352_attach, 1262 dev->dvb.frontend = dvb_attach(mt352_attach,
1264 &avermedia_e506r_mt352_dev, 1263 &avermedia_xc3028_mt352_dev,
1265 &dev->i2c_adap); 1264 &dev->i2c_adap);
1266 attach_xc3028 = 1; 1265 attach_xc3028 = 1;
1267 break;
1268 case SAA7134_BOARD_MD7134_BRIDGE_2: 1266 case SAA7134_BOARD_MD7134_BRIDGE_2:
1269 dev->dvb.frontend = dvb_attach(tda10086_attach, 1267 dev->dvb.frontend = dvb_attach(tda10086_attach,
1270 &sd1878_4m, &dev->i2c_adap); 1268 &sd1878_4m, &dev->i2c_adap);
@@ -1338,7 +1336,8 @@ static int dvb_init(struct saa7134_dev *dev)
1338 return ret; 1336 return ret;
1339 1337
1340dettach_frontend: 1338dettach_frontend:
1341 dvb_frontend_detach(dev->dvb.frontend); 1339 if (dev->dvb.frontend)
1340 dvb_frontend_detach(dev->dvb.frontend);
1342 dev->dvb.frontend = NULL; 1341 dev->dvb.frontend = NULL;
1343 1342
1344 return -1; 1343 return -1;
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c
index 1314522a8130..3ae71a340822 100644
--- a/drivers/media/video/saa7134/saa7134-empress.c
+++ b/drivers/media/video/saa7134/saa7134-empress.c
@@ -110,9 +110,10 @@ static int ts_release(struct inode *inode, struct file *file)
110{ 110{
111 struct saa7134_dev *dev = file->private_data; 111 struct saa7134_dev *dev = file->private_data;
112 112
113 mutex_lock(&dev->empress_tsq.vb_lock);
114
113 videobuf_stop(&dev->empress_tsq); 115 videobuf_stop(&dev->empress_tsq);
114 videobuf_mmap_free(&dev->empress_tsq); 116 videobuf_mmap_free(&dev->empress_tsq);
115 dev->empress_users--;
116 117
117 /* stop the encoder */ 118 /* stop the encoder */
118 ts_reset_encoder(dev); 119 ts_reset_encoder(dev);
@@ -121,6 +122,10 @@ static int ts_release(struct inode *inode, struct file *file)
121 saa_writeb(SAA7134_AUDIO_MUTE_CTRL, 122 saa_writeb(SAA7134_AUDIO_MUTE_CTRL,
122 saa_readb(SAA7134_AUDIO_MUTE_CTRL) | (1 << 6)); 123 saa_readb(SAA7134_AUDIO_MUTE_CTRL) | (1 << 6));
123 124
125 dev->empress_users--;
126
127 mutex_unlock(&dev->empress_tsq.vb_lock);
128
124 return 0; 129 return 0;
125} 130}
126 131
@@ -163,8 +168,7 @@ ts_mmap(struct file *file, struct vm_area_struct * vma)
163static int empress_querycap(struct file *file, void *priv, 168static int empress_querycap(struct file *file, void *priv,
164 struct v4l2_capability *cap) 169 struct v4l2_capability *cap)
165{ 170{
166 struct saa7134_fh *fh = priv; 171 struct saa7134_dev *dev = file->private_data;
167 struct saa7134_dev *dev = fh->dev;
168 172
169 strcpy(cap->driver, "saa7134"); 173 strcpy(cap->driver, "saa7134");
170 strlcpy(cap->card, saa7134_boards[dev->board].name, 174 strlcpy(cap->card, saa7134_boards[dev->board].name,
@@ -219,8 +223,7 @@ static int empress_enum_fmt_cap(struct file *file, void *priv,
219static int empress_g_fmt_cap(struct file *file, void *priv, 223static int empress_g_fmt_cap(struct file *file, void *priv,
220 struct v4l2_format *f) 224 struct v4l2_format *f)
221{ 225{
222 struct saa7134_fh *fh = priv; 226 struct saa7134_dev *dev = file->private_data;
223 struct saa7134_dev *dev = fh->dev;
224 227
225 saa7134_i2c_call_clients(dev, VIDIOC_G_FMT, f); 228 saa7134_i2c_call_clients(dev, VIDIOC_G_FMT, f);
226 229
@@ -233,8 +236,7 @@ static int empress_g_fmt_cap(struct file *file, void *priv,
233static int empress_s_fmt_cap(struct file *file, void *priv, 236static int empress_s_fmt_cap(struct file *file, void *priv,
234 struct v4l2_format *f) 237 struct v4l2_format *f)
235{ 238{
236 struct saa7134_fh *fh = priv; 239 struct saa7134_dev *dev = file->private_data;
237 struct saa7134_dev *dev = fh->dev;
238 240
239 saa7134_i2c_call_clients(dev, VIDIOC_S_FMT, f); 241 saa7134_i2c_call_clients(dev, VIDIOC_S_FMT, f);
240 242
@@ -248,8 +250,7 @@ static int empress_s_fmt_cap(struct file *file, void *priv,
248static int empress_reqbufs(struct file *file, void *priv, 250static int empress_reqbufs(struct file *file, void *priv,
249 struct v4l2_requestbuffers *p) 251 struct v4l2_requestbuffers *p)
250{ 252{
251 struct saa7134_fh *fh = priv; 253 struct saa7134_dev *dev = file->private_data;
252 struct saa7134_dev *dev = fh->dev;
253 254
254 return videobuf_reqbufs(&dev->empress_tsq, p); 255 return videobuf_reqbufs(&dev->empress_tsq, p);
255} 256}
@@ -257,24 +258,21 @@ static int empress_reqbufs(struct file *file, void *priv,
257static int empress_querybuf(struct file *file, void *priv, 258static int empress_querybuf(struct file *file, void *priv,
258 struct v4l2_buffer *b) 259 struct v4l2_buffer *b)
259{ 260{
260 struct saa7134_fh *fh = priv; 261 struct saa7134_dev *dev = file->private_data;
261 struct saa7134_dev *dev = fh->dev;
262 262
263 return videobuf_querybuf(&dev->empress_tsq, b); 263 return videobuf_querybuf(&dev->empress_tsq, b);
264} 264}
265 265
266static int empress_qbuf(struct file *file, void *priv, struct v4l2_buffer *b) 266static int empress_qbuf(struct file *file, void *priv, struct v4l2_buffer *b)
267{ 267{
268 struct saa7134_fh *fh = priv; 268 struct saa7134_dev *dev = file->private_data;
269 struct saa7134_dev *dev = fh->dev;
270 269
271 return videobuf_qbuf(&dev->empress_tsq, b); 270 return videobuf_qbuf(&dev->empress_tsq, b);
272} 271}
273 272
274static int empress_dqbuf(struct file *file, void *priv, struct v4l2_buffer *b) 273static int empress_dqbuf(struct file *file, void *priv, struct v4l2_buffer *b)
275{ 274{
276 struct saa7134_fh *fh = priv; 275 struct saa7134_dev *dev = file->private_data;
277 struct saa7134_dev *dev = fh->dev;
278 276
279 return videobuf_dqbuf(&dev->empress_tsq, b, 277 return videobuf_dqbuf(&dev->empress_tsq, b,
280 file->f_flags & O_NONBLOCK); 278 file->f_flags & O_NONBLOCK);
@@ -283,8 +281,7 @@ static int empress_dqbuf(struct file *file, void *priv, struct v4l2_buffer *b)
283static int empress_streamon(struct file *file, void *priv, 281static int empress_streamon(struct file *file, void *priv,
284 enum v4l2_buf_type type) 282 enum v4l2_buf_type type)
285{ 283{
286 struct saa7134_fh *fh = priv; 284 struct saa7134_dev *dev = file->private_data;
287 struct saa7134_dev *dev = fh->dev;
288 285
289 return videobuf_streamon(&dev->empress_tsq); 286 return videobuf_streamon(&dev->empress_tsq);
290} 287}
@@ -292,8 +289,7 @@ static int empress_streamon(struct file *file, void *priv,
292static int empress_streamoff(struct file *file, void *priv, 289static int empress_streamoff(struct file *file, void *priv,
293 enum v4l2_buf_type type) 290 enum v4l2_buf_type type)
294{ 291{
295 struct saa7134_fh *fh = priv; 292 struct saa7134_dev *dev = file->private_data;
296 struct saa7134_dev *dev = fh->dev;
297 293
298 return videobuf_streamoff(&dev->empress_tsq); 294 return videobuf_streamoff(&dev->empress_tsq);
299} 295}
@@ -301,8 +297,7 @@ static int empress_streamoff(struct file *file, void *priv,
301static int empress_s_ext_ctrls(struct file *file, void *priv, 297static int empress_s_ext_ctrls(struct file *file, void *priv,
302 struct v4l2_ext_controls *ctrls) 298 struct v4l2_ext_controls *ctrls)
303{ 299{
304 struct saa7134_fh *fh = priv; 300 struct saa7134_dev *dev = file->private_data;
305 struct saa7134_dev *dev = fh->dev;
306 301
307 /* count == 0 is abused in saa6752hs.c, so that special 302 /* count == 0 is abused in saa6752hs.c, so that special
308 case is handled here explicitly. */ 303 case is handled here explicitly. */
@@ -321,8 +316,7 @@ static int empress_s_ext_ctrls(struct file *file, void *priv,
321static int empress_g_ext_ctrls(struct file *file, void *priv, 316static int empress_g_ext_ctrls(struct file *file, void *priv,
322 struct v4l2_ext_controls *ctrls) 317 struct v4l2_ext_controls *ctrls)
323{ 318{
324 struct saa7134_fh *fh = priv; 319 struct saa7134_dev *dev = file->private_data;
325 struct saa7134_dev *dev = fh->dev;
326 320
327 if (ctrls->ctrl_class != V4L2_CTRL_CLASS_MPEG) 321 if (ctrls->ctrl_class != V4L2_CTRL_CLASS_MPEG)
328 return -EINVAL; 322 return -EINVAL;
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c
index 919632b10aae..76e6501d238d 100644
--- a/drivers/media/video/saa7134/saa7134-input.c
+++ b/drivers/media/video/saa7134/saa7134-input.c
@@ -323,6 +323,15 @@ int saa7134_input_init1(struct saa7134_dev *dev)
323 saa_setb(SAA7134_GPIO_GPMODE1, 0x1); 323 saa_setb(SAA7134_GPIO_GPMODE1, 0x1);
324 saa_setb(SAA7134_GPIO_GPSTATUS1, 0x1); 324 saa_setb(SAA7134_GPIO_GPSTATUS1, 0x1);
325 break; 325 break;
326 case SAA7134_BOARD_AVERMEDIA_A16D:
327 ir_codes = ir_codes_avermedia_a16d;
328 mask_keycode = 0x02F200;
329 mask_keydown = 0x000400;
330 polling = 50; /* ms */
331 /* Without this we won't receive key up events */
332 saa_setb(SAA7134_GPIO_GPMODE1, 0x1);
333 saa_setb(SAA7134_GPIO_GPSTATUS1, 0x1);
334 break;
326 case SAA7134_BOARD_KWORLD_TERMINATOR: 335 case SAA7134_BOARD_KWORLD_TERMINATOR:
327 ir_codes = ir_codes_pixelview; 336 ir_codes = ir_codes_pixelview;
328 mask_keycode = 0x00001f; 337 mask_keycode = 0x00001f;
diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c
index a1b92446c8b4..d015bfe00950 100644
--- a/drivers/media/video/soc_camera.c
+++ b/drivers/media/video/soc_camera.c
@@ -763,15 +763,6 @@ static struct device_driver ic_drv = {
763 .owner = THIS_MODULE, 763 .owner = THIS_MODULE,
764}; 764};
765 765
766/*
767 * Image capture host - this is a host device, not a bus device, so,
768 * no bus reference, no probing.
769 */
770static struct class soc_camera_host_class = {
771 .owner = THIS_MODULE,
772 .name = "camera_host",
773};
774
775static void dummy_release(struct device *dev) 766static void dummy_release(struct device *dev)
776{ 767{
777} 768}
@@ -801,7 +792,6 @@ int soc_camera_host_register(struct soc_camera_host *ici)
801 792
802 /* Number might be equal to the platform device ID */ 793 /* Number might be equal to the platform device ID */
803 sprintf(ici->dev.bus_id, "camera_host%d", ici->nr); 794 sprintf(ici->dev.bus_id, "camera_host%d", ici->nr);
804 ici->dev.class = &soc_camera_host_class;
805 795
806 mutex_lock(&list_lock); 796 mutex_lock(&list_lock);
807 list_for_each_entry(ix, &hosts, list) { 797 list_for_each_entry(ix, &hosts, list) {
@@ -1003,14 +993,9 @@ static int __init soc_camera_init(void)
1003 ret = driver_register(&ic_drv); 993 ret = driver_register(&ic_drv);
1004 if (ret) 994 if (ret)
1005 goto edrvr; 995 goto edrvr;
1006 ret = class_register(&soc_camera_host_class);
1007 if (ret)
1008 goto eclr;
1009 996
1010 return 0; 997 return 0;
1011 998
1012eclr:
1013 driver_unregister(&ic_drv);
1014edrvr: 999edrvr:
1015 bus_unregister(&soc_camera_bus_type); 1000 bus_unregister(&soc_camera_bus_type);
1016 return ret; 1001 return ret;
@@ -1018,7 +1003,6 @@ edrvr:
1018 1003
1019static void __exit soc_camera_exit(void) 1004static void __exit soc_camera_exit(void)
1020{ 1005{
1021 class_unregister(&soc_camera_host_class);
1022 driver_unregister(&ic_drv); 1006 driver_unregister(&ic_drv);
1023 bus_unregister(&soc_camera_bus_type); 1007 bus_unregister(&soc_camera_bus_type);
1024} 1008}
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 198f0afb812e..0d12ace61665 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -92,6 +92,7 @@ struct tuner {
92 unsigned int type; /* chip type id */ 92 unsigned int type; /* chip type id */
93 unsigned int config; 93 unsigned int config;
94 int (*tuner_callback) (void *dev, int command, int arg); 94 int (*tuner_callback) (void *dev, int command, int arg);
95 const char *name;
95}; 96};
96 97
97/* standard i2c insmod options */ 98/* standard i2c insmod options */
@@ -330,13 +331,13 @@ static void tuner_i2c_address_check(struct tuner *t)
330 tuner_warn("Support for tuners in i2c address range 0x64 thru 0x6f\n"); 331 tuner_warn("Support for tuners in i2c address range 0x64 thru 0x6f\n");
331 tuner_warn("will soon be dropped. This message indicates that your\n"); 332 tuner_warn("will soon be dropped. This message indicates that your\n");
332 tuner_warn("hardware has a %s tuner at i2c address 0x%02x.\n", 333 tuner_warn("hardware has a %s tuner at i2c address 0x%02x.\n",
333 t->i2c->name, t->i2c->addr); 334 t->name, t->i2c->addr);
334 tuner_warn("To ensure continued support for your device, please\n"); 335 tuner_warn("To ensure continued support for your device, please\n");
335 tuner_warn("send a copy of this message, along with full dmesg\n"); 336 tuner_warn("send a copy of this message, along with full dmesg\n");
336 tuner_warn("output to v4l-dvb-maintainer@linuxtv.org\n"); 337 tuner_warn("output to v4l-dvb-maintainer@linuxtv.org\n");
337 tuner_warn("Please use subject line: \"obsolete tuner i2c address.\"\n"); 338 tuner_warn("Please use subject line: \"obsolete tuner i2c address.\"\n");
338 tuner_warn("driver: %s, addr: 0x%02x, type: %d (%s)\n", 339 tuner_warn("driver: %s, addr: 0x%02x, type: %d (%s)\n",
339 t->i2c->adapter->name, t->i2c->addr, t->type, t->i2c->name); 340 t->i2c->adapter->name, t->i2c->addr, t->type, t->name);
340 tuner_warn("====================== WARNING! ======================\n"); 341 tuner_warn("====================== WARNING! ======================\n");
341} 342}
342 343
@@ -470,19 +471,17 @@ static void set_type(struct i2c_client *c, unsigned int type,
470 if ((NULL == analog_ops->set_params) && 471 if ((NULL == analog_ops->set_params) &&
471 (fe_tuner_ops->set_analog_params)) { 472 (fe_tuner_ops->set_analog_params)) {
472 473
473 strlcpy(t->i2c->name, fe_tuner_ops->info.name, 474 t->name = fe_tuner_ops->info.name;
474 sizeof(t->i2c->name));
475 475
476 t->fe.analog_demod_priv = t; 476 t->fe.analog_demod_priv = t;
477 memcpy(analog_ops, &tuner_core_ops, 477 memcpy(analog_ops, &tuner_core_ops,
478 sizeof(struct analog_demod_ops)); 478 sizeof(struct analog_demod_ops));
479 479
480 } else { 480 } else {
481 strlcpy(t->i2c->name, analog_ops->info.name, 481 t->name = analog_ops->info.name;
482 sizeof(t->i2c->name));
483 } 482 }
484 483
485 tuner_dbg("type set to %s\n", t->i2c->name); 484 tuner_dbg("type set to %s\n", t->name);
486 485
487 if (t->mode_mask == T_UNINITIALIZED) 486 if (t->mode_mask == T_UNINITIALIZED)
488 t->mode_mask = new_mode_mask; 487 t->mode_mask = new_mode_mask;
@@ -537,7 +536,7 @@ static void set_addr(struct i2c_client *c, struct tuner_setup *tun_setup)
537static inline int check_mode(struct tuner *t, char *cmd) 536static inline int check_mode(struct tuner *t, char *cmd)
538{ 537{
539 if ((1 << t->mode & t->mode_mask) == 0) { 538 if ((1 << t->mode & t->mode_mask) == 0) {
540 return EINVAL; 539 return -EINVAL;
541 } 540 }
542 541
543 switch (t->mode) { 542 switch (t->mode) {
@@ -731,11 +730,11 @@ static inline int set_mode(struct i2c_client *client, struct tuner *t, int mode,
731 730
732 t->mode = mode; 731 t->mode = mode;
733 732
734 if (check_mode(t, cmd) == EINVAL) { 733 if (check_mode(t, cmd) == -EINVAL) {
735 t->mode = T_STANDBY; 734 t->mode = T_STANDBY;
736 if (analog_ops->standby) 735 if (analog_ops->standby)
737 analog_ops->standby(&t->fe); 736 analog_ops->standby(&t->fe);
738 return EINVAL; 737 return -EINVAL;
739 } 738 }
740 return 0; 739 return 0;
741} 740}
@@ -777,13 +776,13 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
777 break; 776 break;
778 case AUDC_SET_RADIO: 777 case AUDC_SET_RADIO:
779 if (set_mode(client, t, V4L2_TUNER_RADIO, "AUDC_SET_RADIO") 778 if (set_mode(client, t, V4L2_TUNER_RADIO, "AUDC_SET_RADIO")
780 == EINVAL) 779 == -EINVAL)
781 return 0; 780 return 0;
782 if (t->radio_freq) 781 if (t->radio_freq)
783 set_freq(client, t->radio_freq); 782 set_freq(client, t->radio_freq);
784 break; 783 break;
785 case TUNER_SET_STANDBY: 784 case TUNER_SET_STANDBY:
786 if (check_mode(t, "TUNER_SET_STANDBY") == EINVAL) 785 if (check_mode(t, "TUNER_SET_STANDBY") == -EINVAL)
787 return 0; 786 return 0;
788 t->mode = T_STANDBY; 787 t->mode = T_STANDBY;
789 if (analog_ops->standby) 788 if (analog_ops->standby)
@@ -791,9 +790,9 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
791 break; 790 break;
792#ifdef CONFIG_VIDEO_ALLOW_V4L1 791#ifdef CONFIG_VIDEO_ALLOW_V4L1
793 case VIDIOCSAUDIO: 792 case VIDIOCSAUDIO:
794 if (check_mode(t, "VIDIOCSAUDIO") == EINVAL) 793 if (check_mode(t, "VIDIOCSAUDIO") == -EINVAL)
795 return 0; 794 return 0;
796 if (check_v4l2(t) == EINVAL) 795 if (check_v4l2(t) == -EINVAL)
797 return 0; 796 return 0;
798 797
799 /* Should be implemented, since bttv calls it */ 798 /* Should be implemented, since bttv calls it */
@@ -811,10 +810,10 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
811 }; 810 };
812 struct video_channel *vc = arg; 811 struct video_channel *vc = arg;
813 812
814 if (check_v4l2(t) == EINVAL) 813 if (check_v4l2(t) == -EINVAL)
815 return 0; 814 return 0;
816 815
817 if (set_mode(client,t,V4L2_TUNER_ANALOG_TV, "VIDIOCSCHAN")==EINVAL) 816 if (set_mode(client,t,V4L2_TUNER_ANALOG_TV, "VIDIOCSCHAN")==-EINVAL)
818 return 0; 817 return 0;
819 818
820 if (vc->norm < ARRAY_SIZE(map)) 819 if (vc->norm < ARRAY_SIZE(map))
@@ -828,9 +827,9 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
828 { 827 {
829 unsigned long *v = arg; 828 unsigned long *v = arg;
830 829
831 if (check_mode(t, "VIDIOCSFREQ") == EINVAL) 830 if (check_mode(t, "VIDIOCSFREQ") == -EINVAL)
832 return 0; 831 return 0;
833 if (check_v4l2(t) == EINVAL) 832 if (check_v4l2(t) == -EINVAL)
834 return 0; 833 return 0;
835 834
836 set_freq(client, *v); 835 set_freq(client, *v);
@@ -840,9 +839,9 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
840 { 839 {
841 struct video_tuner *vt = arg; 840 struct video_tuner *vt = arg;
842 841
843 if (check_mode(t, "VIDIOCGTUNER") == EINVAL) 842 if (check_mode(t, "VIDIOCGTUNER") == -EINVAL)
844 return 0; 843 return 0;
845 if (check_v4l2(t) == EINVAL) 844 if (check_v4l2(t) == -EINVAL)
846 return 0; 845 return 0;
847 846
848 if (V4L2_TUNER_RADIO == t->mode) { 847 if (V4L2_TUNER_RADIO == t->mode) {
@@ -884,9 +883,9 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
884 { 883 {
885 struct video_audio *va = arg; 884 struct video_audio *va = arg;
886 885
887 if (check_mode(t, "VIDIOCGAUDIO") == EINVAL) 886 if (check_mode(t, "VIDIOCGAUDIO") == -EINVAL)
888 return 0; 887 return 0;
889 if (check_v4l2(t) == EINVAL) 888 if (check_v4l2(t) == -EINVAL)
890 return 0; 889 return 0;
891 890
892 if (V4L2_TUNER_RADIO == t->mode) { 891 if (V4L2_TUNER_RADIO == t->mode) {
@@ -926,7 +925,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
926 v4l2_std_id *id = arg; 925 v4l2_std_id *id = arg;
927 926
928 if (set_mode (client, t, V4L2_TUNER_ANALOG_TV, "VIDIOC_S_STD") 927 if (set_mode (client, t, V4L2_TUNER_ANALOG_TV, "VIDIOC_S_STD")
929 == EINVAL) 928 == -EINVAL)
930 return 0; 929 return 0;
931 930
932 switch_v4l2(); 931 switch_v4l2();
@@ -942,7 +941,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
942 struct v4l2_frequency *f = arg; 941 struct v4l2_frequency *f = arg;
943 942
944 if (set_mode (client, t, f->type, "VIDIOC_S_FREQUENCY") 943 if (set_mode (client, t, f->type, "VIDIOC_S_FREQUENCY")
945 == EINVAL) 944 == -EINVAL)
946 return 0; 945 return 0;
947 switch_v4l2(); 946 switch_v4l2();
948 set_freq(client,f->frequency); 947 set_freq(client,f->frequency);
@@ -953,7 +952,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
953 { 952 {
954 struct v4l2_frequency *f = arg; 953 struct v4l2_frequency *f = arg;
955 954
956 if (check_mode(t, "VIDIOC_G_FREQUENCY") == EINVAL) 955 if (check_mode(t, "VIDIOC_G_FREQUENCY") == -EINVAL)
957 return 0; 956 return 0;
958 switch_v4l2(); 957 switch_v4l2();
959 f->type = t->mode; 958 f->type = t->mode;
@@ -974,7 +973,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
974 { 973 {
975 struct v4l2_tuner *tuner = arg; 974 struct v4l2_tuner *tuner = arg;
976 975
977 if (check_mode(t, "VIDIOC_G_TUNER") == EINVAL) 976 if (check_mode(t, "VIDIOC_G_TUNER") == -EINVAL)
978 return 0; 977 return 0;
979 switch_v4l2(); 978 switch_v4l2();
980 979
@@ -1021,7 +1020,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
1021 { 1020 {
1022 struct v4l2_tuner *tuner = arg; 1021 struct v4l2_tuner *tuner = arg;
1023 1022
1024 if (check_mode(t, "VIDIOC_S_TUNER") == EINVAL) 1023 if (check_mode(t, "VIDIOC_S_TUNER") == -EINVAL)
1025 return 0; 1024 return 0;
1026 1025
1027 switch_v4l2(); 1026 switch_v4l2();
@@ -1115,6 +1114,7 @@ static int tuner_probe(struct i2c_client *client,
1115 if (NULL == t) 1114 if (NULL == t)
1116 return -ENOMEM; 1115 return -ENOMEM;
1117 t->i2c = client; 1116 t->i2c = client;
1117 t->name = "(tuner unset)";
1118 i2c_set_clientdata(client, t); 1118 i2c_set_clientdata(client, t);
1119 t->type = UNSET; 1119 t->type = UNSET;
1120 t->audmode = V4L2_TUNER_MODE_STEREO; 1120 t->audmode = V4L2_TUNER_MODE_STEREO;
@@ -1272,12 +1272,6 @@ static int tuner_remove(struct i2c_client *client)
1272 1272
1273 list_del(&t->list); 1273 list_del(&t->list);
1274 kfree(t); 1274 kfree(t);
1275
1276 /* The probing code has overwritten the device name, restore it so
1277 that reloading the driver will work. Ideally the device name
1278 should not be overwritten in the first place, but for now that
1279 will do. */
1280 strlcpy(client->name, "tuner", I2C_NAME_SIZE);
1281 return 0; 1275 return 0;
1282} 1276}
1283 1277
diff --git a/drivers/media/video/usbvideo/quickcam_messenger.c b/drivers/media/video/usbvideo/quickcam_messenger.c
index 32e536edf09d..3d26a30abe1e 100644
--- a/drivers/media/video/usbvideo/quickcam_messenger.c
+++ b/drivers/media/video/usbvideo/quickcam_messenger.c
@@ -210,7 +210,7 @@ static int qcm_stv_setb(struct usb_device *dev, u16 reg, u8 val)
210 return ret; 210 return ret;
211} 211}
212 212
213static int qcm_stv_setw(struct usb_device *dev, u16 reg, u16 val) 213static int qcm_stv_setw(struct usb_device *dev, u16 reg, __le16 val)
214{ 214{
215 int ret; 215 int ret;
216 216
diff --git a/drivers/media/video/uvc/Makefile b/drivers/media/video/uvc/Makefile
new file mode 100644
index 000000000000..968c1994eda0
--- /dev/null
+++ b/drivers/media/video/uvc/Makefile
@@ -0,0 +1,3 @@
1uvcvideo-objs := uvc_driver.o uvc_queue.o uvc_v4l2.o uvc_video.o uvc_ctrl.o \
2 uvc_status.o uvc_isight.o
3obj-$(CONFIG_USB_VIDEO_CLASS) += uvcvideo.o
diff --git a/drivers/media/video/uvc/uvc_ctrl.c b/drivers/media/video/uvc/uvc_ctrl.c
new file mode 100644
index 000000000000..f0ee46d15540
--- /dev/null
+++ b/drivers/media/video/uvc/uvc_ctrl.c
@@ -0,0 +1,1256 @@
1/*
2 * uvc_ctrl.c -- USB Video Class driver - Controls
3 *
4 * Copyright (C) 2005-2008
5 * Laurent Pinchart (laurent.pinchart@skynet.be)
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
14#include <linux/kernel.h>
15#include <linux/version.h>
16#include <linux/list.h>
17#include <linux/module.h>
18#include <linux/uaccess.h>
19#include <linux/usb.h>
20#include <linux/videodev2.h>
21#include <linux/vmalloc.h>
22#include <linux/wait.h>
23#include <asm/atomic.h>
24
25#include "uvcvideo.h"
26
27#define UVC_CTRL_NDATA 2
28#define UVC_CTRL_DATA_CURRENT 0
29#define UVC_CTRL_DATA_BACKUP 1
30
31/* ------------------------------------------------------------------------
32 * Control, formats, ...
33 */
34
35static struct uvc_control_info uvc_ctrls[] = {
36 {
37 .entity = UVC_GUID_UVC_PROCESSING,
38 .selector = PU_BRIGHTNESS_CONTROL,
39 .index = 0,
40 .size = 2,
41 .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE
42 | UVC_CONTROL_RESTORE,
43 },
44 {
45 .entity = UVC_GUID_UVC_PROCESSING,
46 .selector = PU_CONTRAST_CONTROL,
47 .index = 1,
48 .size = 2,
49 .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE
50 | UVC_CONTROL_RESTORE,
51 },
52 {
53 .entity = UVC_GUID_UVC_PROCESSING,
54 .selector = PU_HUE_CONTROL,
55 .index = 2,
56 .size = 2,
57 .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE
58 | UVC_CONTROL_RESTORE | UVC_CONTROL_AUTO_UPDATE,
59 },
60 {
61 .entity = UVC_GUID_UVC_PROCESSING,
62 .selector = PU_SATURATION_CONTROL,
63 .index = 3,
64 .size = 2,
65 .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE
66 | UVC_CONTROL_RESTORE,
67 },
68 {
69 .entity = UVC_GUID_UVC_PROCESSING,
70 .selector = PU_SHARPNESS_CONTROL,
71 .index = 4,
72 .size = 2,
73 .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE
74 | UVC_CONTROL_RESTORE,
75 },
76 {
77 .entity = UVC_GUID_UVC_PROCESSING,
78 .selector = PU_GAMMA_CONTROL,
79 .index = 5,
80 .size = 2,
81 .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE
82 | UVC_CONTROL_RESTORE,
83 },
84 {
85 .entity = UVC_GUID_UVC_PROCESSING,
86 .selector = PU_BACKLIGHT_COMPENSATION_CONTROL,
87 .index = 8,
88 .size = 2,
89 .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE
90 | UVC_CONTROL_RESTORE,
91 },
92 {
93 .entity = UVC_GUID_UVC_PROCESSING,
94 .selector = PU_GAIN_CONTROL,
95 .index = 9,
96 .size = 2,
97 .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE
98 | UVC_CONTROL_RESTORE,
99 },
100 {
101 .entity = UVC_GUID_UVC_PROCESSING,
102 .selector = PU_POWER_LINE_FREQUENCY_CONTROL,
103 .index = 10,
104 .size = 1,
105 .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE
106 | UVC_CONTROL_RESTORE,
107 },
108 {
109 .entity = UVC_GUID_UVC_PROCESSING,
110 .selector = PU_HUE_AUTO_CONTROL,
111 .index = 11,
112 .size = 1,
113 .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_CUR
114 | UVC_CONTROL_GET_DEF | UVC_CONTROL_RESTORE,
115 },
116 {
117 .entity = UVC_GUID_UVC_CAMERA,
118 .selector = CT_AE_MODE_CONTROL,
119 .index = 1,
120 .size = 1,
121 .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_CUR
122 | UVC_CONTROL_GET_DEF | UVC_CONTROL_GET_RES
123 | UVC_CONTROL_RESTORE,
124 },
125 {
126 .entity = UVC_GUID_UVC_CAMERA,
127 .selector = CT_AE_PRIORITY_CONTROL,
128 .index = 2,
129 .size = 1,
130 .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_CUR
131 | UVC_CONTROL_RESTORE,
132 },
133 {
134 .entity = UVC_GUID_UVC_CAMERA,
135 .selector = CT_EXPOSURE_TIME_ABSOLUTE_CONTROL,
136 .index = 3,
137 .size = 4,
138 .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE
139 | UVC_CONTROL_RESTORE,
140 },
141 {
142 .entity = UVC_GUID_UVC_CAMERA,
143 .selector = CT_FOCUS_ABSOLUTE_CONTROL,
144 .index = 5,
145 .size = 2,
146 .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE
147 | UVC_CONTROL_RESTORE | UVC_CONTROL_AUTO_UPDATE,
148 },
149 {
150 .entity = UVC_GUID_UVC_CAMERA,
151 .selector = CT_FOCUS_AUTO_CONTROL,
152 .index = 17,
153 .size = 1,
154 .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_CUR
155 | UVC_CONTROL_GET_DEF | UVC_CONTROL_RESTORE,
156 },
157 {
158 .entity = UVC_GUID_UVC_PROCESSING,
159 .selector = PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL,
160 .index = 12,
161 .size = 1,
162 .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_CUR
163 | UVC_CONTROL_GET_DEF | UVC_CONTROL_RESTORE,
164 },
165 {
166 .entity = UVC_GUID_UVC_PROCESSING,
167 .selector = PU_WHITE_BALANCE_TEMPERATURE_CONTROL,
168 .index = 6,
169 .size = 2,
170 .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE
171 | UVC_CONTROL_RESTORE | UVC_CONTROL_AUTO_UPDATE,
172 },
173 {
174 .entity = UVC_GUID_UVC_PROCESSING,
175 .selector = PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL,
176 .index = 13,
177 .size = 1,
178 .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_CUR
179 | UVC_CONTROL_GET_DEF | UVC_CONTROL_RESTORE,
180 },
181 {
182 .entity = UVC_GUID_UVC_PROCESSING,
183 .selector = PU_WHITE_BALANCE_COMPONENT_CONTROL,
184 .index = 7,
185 .size = 4,
186 .flags = UVC_CONTROL_SET_CUR | UVC_CONTROL_GET_RANGE
187 | UVC_CONTROL_RESTORE | UVC_CONTROL_AUTO_UPDATE,
188 },
189};
190
191static struct uvc_menu_info power_line_frequency_controls[] = {
192 { 0, "Disabled" },
193 { 1, "50 Hz" },
194 { 2, "60 Hz" },
195};
196
197static struct uvc_menu_info exposure_auto_controls[] = {
198 { 1, "Manual Mode" },
199 { 2, "Auto Mode" },
200 { 4, "Shutter Priority Mode" },
201 { 8, "Aperture Priority Mode" },
202};
203
204static struct uvc_control_mapping uvc_ctrl_mappings[] = {
205 {
206 .id = V4L2_CID_BRIGHTNESS,
207 .name = "Brightness",
208 .entity = UVC_GUID_UVC_PROCESSING,
209 .selector = PU_BRIGHTNESS_CONTROL,
210 .size = 16,
211 .offset = 0,
212 .v4l2_type = V4L2_CTRL_TYPE_INTEGER,
213 .data_type = UVC_CTRL_DATA_TYPE_SIGNED,
214 },
215 {
216 .id = V4L2_CID_CONTRAST,
217 .name = "Contrast",
218 .entity = UVC_GUID_UVC_PROCESSING,
219 .selector = PU_CONTRAST_CONTROL,
220 .size = 16,
221 .offset = 0,
222 .v4l2_type = V4L2_CTRL_TYPE_INTEGER,
223 .data_type = UVC_CTRL_DATA_TYPE_UNSIGNED,
224 },
225 {
226 .id = V4L2_CID_HUE,
227 .name = "Hue",
228 .entity = UVC_GUID_UVC_PROCESSING,
229 .selector = PU_HUE_CONTROL,
230 .size = 16,
231 .offset = 0,
232 .v4l2_type = V4L2_CTRL_TYPE_INTEGER,
233 .data_type = UVC_CTRL_DATA_TYPE_SIGNED,
234 },
235 {
236 .id = V4L2_CID_SATURATION,
237 .name = "Saturation",
238 .entity = UVC_GUID_UVC_PROCESSING,
239 .selector = PU_SATURATION_CONTROL,
240 .size = 16,
241 .offset = 0,
242 .v4l2_type = V4L2_CTRL_TYPE_INTEGER,
243 .data_type = UVC_CTRL_DATA_TYPE_UNSIGNED,
244 },
245 {
246 .id = V4L2_CID_SHARPNESS,
247 .name = "Sharpness",
248 .entity = UVC_GUID_UVC_PROCESSING,
249 .selector = PU_SHARPNESS_CONTROL,
250 .size = 16,
251 .offset = 0,
252 .v4l2_type = V4L2_CTRL_TYPE_INTEGER,
253 .data_type = UVC_CTRL_DATA_TYPE_UNSIGNED,
254 },
255 {
256 .id = V4L2_CID_GAMMA,
257 .name = "Gamma",
258 .entity = UVC_GUID_UVC_PROCESSING,
259 .selector = PU_GAMMA_CONTROL,
260 .size = 16,
261 .offset = 0,
262 .v4l2_type = V4L2_CTRL_TYPE_INTEGER,
263 .data_type = UVC_CTRL_DATA_TYPE_UNSIGNED,
264 },
265 {
266 .id = V4L2_CID_BACKLIGHT_COMPENSATION,
267 .name = "Backlight Compensation",
268 .entity = UVC_GUID_UVC_PROCESSING,
269 .selector = PU_BACKLIGHT_COMPENSATION_CONTROL,
270 .size = 16,
271 .offset = 0,
272 .v4l2_type = V4L2_CTRL_TYPE_INTEGER,
273 .data_type = UVC_CTRL_DATA_TYPE_UNSIGNED,
274 },
275 {
276 .id = V4L2_CID_GAIN,
277 .name = "Gain",
278 .entity = UVC_GUID_UVC_PROCESSING,
279 .selector = PU_GAIN_CONTROL,
280 .size = 16,
281 .offset = 0,
282 .v4l2_type = V4L2_CTRL_TYPE_INTEGER,
283 .data_type = UVC_CTRL_DATA_TYPE_UNSIGNED,
284 },
285 {
286 .id = V4L2_CID_POWER_LINE_FREQUENCY,
287 .name = "Power Line Frequency",
288 .entity = UVC_GUID_UVC_PROCESSING,
289 .selector = PU_POWER_LINE_FREQUENCY_CONTROL,
290 .size = 2,
291 .offset = 0,
292 .v4l2_type = V4L2_CTRL_TYPE_MENU,
293 .data_type = UVC_CTRL_DATA_TYPE_ENUM,
294 .menu_info = power_line_frequency_controls,
295 .menu_count = ARRAY_SIZE(power_line_frequency_controls),
296 },
297 {
298 .id = V4L2_CID_HUE_AUTO,
299 .name = "Hue, Auto",
300 .entity = UVC_GUID_UVC_PROCESSING,
301 .selector = PU_HUE_AUTO_CONTROL,
302 .size = 1,
303 .offset = 0,
304 .v4l2_type = V4L2_CTRL_TYPE_BOOLEAN,
305 .data_type = UVC_CTRL_DATA_TYPE_BOOLEAN,
306 },
307 {
308 .id = V4L2_CID_EXPOSURE_AUTO,
309 .name = "Exposure, Auto",
310 .entity = UVC_GUID_UVC_CAMERA,
311 .selector = CT_AE_MODE_CONTROL,
312 .size = 4,
313 .offset = 0,
314 .v4l2_type = V4L2_CTRL_TYPE_MENU,
315 .data_type = UVC_CTRL_DATA_TYPE_BITMASK,
316 .menu_info = exposure_auto_controls,
317 .menu_count = ARRAY_SIZE(exposure_auto_controls),
318 },
319 {
320 .id = V4L2_CID_EXPOSURE_AUTO_PRIORITY,
321 .name = "Exposure, Auto Priority",
322 .entity = UVC_GUID_UVC_CAMERA,
323 .selector = CT_AE_PRIORITY_CONTROL,
324 .size = 1,
325 .offset = 0,
326 .v4l2_type = V4L2_CTRL_TYPE_BOOLEAN,
327 .data_type = UVC_CTRL_DATA_TYPE_BOOLEAN,
328 },
329 {
330 .id = V4L2_CID_EXPOSURE_ABSOLUTE,
331 .name = "Exposure (Absolute)",
332 .entity = UVC_GUID_UVC_CAMERA,
333 .selector = CT_EXPOSURE_TIME_ABSOLUTE_CONTROL,
334 .size = 32,
335 .offset = 0,
336 .v4l2_type = V4L2_CTRL_TYPE_INTEGER,
337 .data_type = UVC_CTRL_DATA_TYPE_UNSIGNED,
338 },
339 {
340 .id = V4L2_CID_AUTO_WHITE_BALANCE,
341 .name = "White Balance Temperature, Auto",
342 .entity = UVC_GUID_UVC_PROCESSING,
343 .selector = PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL,
344 .size = 1,
345 .offset = 0,
346 .v4l2_type = V4L2_CTRL_TYPE_BOOLEAN,
347 .data_type = UVC_CTRL_DATA_TYPE_BOOLEAN,
348 },
349 {
350 .id = V4L2_CID_WHITE_BALANCE_TEMPERATURE,
351 .name = "White Balance Temperature",
352 .entity = UVC_GUID_UVC_PROCESSING,
353 .selector = PU_WHITE_BALANCE_TEMPERATURE_CONTROL,
354 .size = 16,
355 .offset = 0,
356 .v4l2_type = V4L2_CTRL_TYPE_INTEGER,
357 .data_type = UVC_CTRL_DATA_TYPE_UNSIGNED,
358 },
359 {
360 .id = V4L2_CID_AUTO_WHITE_BALANCE,
361 .name = "White Balance Component, Auto",
362 .entity = UVC_GUID_UVC_PROCESSING,
363 .selector = PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL,
364 .size = 1,
365 .offset = 0,
366 .v4l2_type = V4L2_CTRL_TYPE_BOOLEAN,
367 .data_type = UVC_CTRL_DATA_TYPE_BOOLEAN,
368 },
369 {
370 .id = V4L2_CID_BLUE_BALANCE,
371 .name = "White Balance Blue Component",
372 .entity = UVC_GUID_UVC_PROCESSING,
373 .selector = PU_WHITE_BALANCE_COMPONENT_CONTROL,
374 .size = 16,
375 .offset = 0,
376 .v4l2_type = V4L2_CTRL_TYPE_INTEGER,
377 .data_type = UVC_CTRL_DATA_TYPE_SIGNED,
378 },
379 {
380 .id = V4L2_CID_RED_BALANCE,
381 .name = "White Balance Red Component",
382 .entity = UVC_GUID_UVC_PROCESSING,
383 .selector = PU_WHITE_BALANCE_COMPONENT_CONTROL,
384 .size = 16,
385 .offset = 16,
386 .v4l2_type = V4L2_CTRL_TYPE_INTEGER,
387 .data_type = UVC_CTRL_DATA_TYPE_SIGNED,
388 },
389 {
390 .id = V4L2_CID_FOCUS_ABSOLUTE,
391 .name = "Focus (absolute)",
392 .entity = UVC_GUID_UVC_CAMERA,
393 .selector = CT_FOCUS_ABSOLUTE_CONTROL,
394 .size = 16,
395 .offset = 0,
396 .v4l2_type = V4L2_CTRL_TYPE_INTEGER,
397 .data_type = UVC_CTRL_DATA_TYPE_UNSIGNED,
398 },
399 {
400 .id = V4L2_CID_FOCUS_AUTO,
401 .name = "Focus, Auto",
402 .entity = UVC_GUID_UVC_CAMERA,
403 .selector = CT_FOCUS_AUTO_CONTROL,
404 .size = 1,
405 .offset = 0,
406 .v4l2_type = V4L2_CTRL_TYPE_BOOLEAN,
407 .data_type = UVC_CTRL_DATA_TYPE_BOOLEAN,
408 },
409};
410
411/* ------------------------------------------------------------------------
412 * Utility functions
413 */
414
415static inline __u8 *uvc_ctrl_data(struct uvc_control *ctrl, int id)
416{
417 return ctrl->data + id * ctrl->info->size;
418}
419
420static inline int uvc_get_bit(const __u8 *data, int bit)
421{
422 return (data[bit >> 3] >> (bit & 7)) & 1;
423}
424
425/* Extract the bit string specified by mapping->offset and mapping->size
426 * from the little-endian data stored at 'data' and return the result as
427 * a signed 32bit integer. Sign extension will be performed if the mapping
428 * references a signed data type.
429 */
430static __s32 uvc_get_le_value(const __u8 *data,
431 struct uvc_control_mapping *mapping)
432{
433 int bits = mapping->size;
434 int offset = mapping->offset;
435 __s32 value = 0;
436 __u8 mask;
437
438 data += offset / 8;
439 offset &= 7;
440 mask = ((1LL << bits) - 1) << offset;
441
442 for (; bits > 0; data++) {
443 __u8 byte = *data & mask;
444 value |= offset > 0 ? (byte >> offset) : (byte << (-offset));
445 bits -= 8 - (offset > 0 ? offset : 0);
446 offset -= 8;
447 mask = (1 << bits) - 1;
448 }
449
450 /* Sign-extend the value if needed */
451 if (mapping->data_type == UVC_CTRL_DATA_TYPE_SIGNED)
452 value |= -(value & (1 << (mapping->size - 1)));
453
454 return value;
455}
456
457/* Set the bit string specified by mapping->offset and mapping->size
458 * in the little-endian data stored at 'data' to the value 'value'.
459 */
460static void uvc_set_le_value(__s32 value, __u8 *data,
461 struct uvc_control_mapping *mapping)
462{
463 int bits = mapping->size;
464 int offset = mapping->offset;
465 __u8 mask;
466
467 data += offset / 8;
468 offset &= 7;
469
470 for (; bits > 0; data++) {
471 mask = ((1LL << bits) - 1) << offset;
472 *data = (*data & ~mask) | ((value << offset) & mask);
473 value >>= offset ? offset : 8;
474 bits -= 8 - offset;
475 offset = 0;
476 }
477}
478
479/* ------------------------------------------------------------------------
480 * Terminal and unit management
481 */
482
483static const __u8 uvc_processing_guid[16] = UVC_GUID_UVC_PROCESSING;
484static const __u8 uvc_camera_guid[16] = UVC_GUID_UVC_CAMERA;
485static const __u8 uvc_media_transport_input_guid[16] =
486 UVC_GUID_UVC_MEDIA_TRANSPORT_INPUT;
487
488static int uvc_entity_match_guid(struct uvc_entity *entity, __u8 guid[16])
489{
490 switch (UVC_ENTITY_TYPE(entity)) {
491 case ITT_CAMERA:
492 return memcmp(uvc_camera_guid, guid, 16) == 0;
493
494 case ITT_MEDIA_TRANSPORT_INPUT:
495 return memcmp(uvc_media_transport_input_guid, guid, 16) == 0;
496
497 case VC_PROCESSING_UNIT:
498 return memcmp(uvc_processing_guid, guid, 16) == 0;
499
500 case VC_EXTENSION_UNIT:
501 return memcmp(entity->extension.guidExtensionCode,
502 guid, 16) == 0;
503
504 default:
505 return 0;
506 }
507}
508
509/* ------------------------------------------------------------------------
510 * UVC Controls
511 */
512
513static void __uvc_find_control(struct uvc_entity *entity, __u32 v4l2_id,
514 struct uvc_control_mapping **mapping, struct uvc_control **control,
515 int next)
516{
517 struct uvc_control *ctrl;
518 struct uvc_control_mapping *map;
519 unsigned int i;
520
521 if (entity == NULL)
522 return;
523
524 for (i = 0; i < entity->ncontrols; ++i) {
525 ctrl = &entity->controls[i];
526 if (ctrl->info == NULL)
527 continue;
528
529 list_for_each_entry(map, &ctrl->info->mappings, list) {
530 if ((map->id == v4l2_id) && !next) {
531 *control = ctrl;
532 *mapping = map;
533 return;
534 }
535
536 if ((*mapping == NULL || (*mapping)->id > map->id) &&
537 (map->id > v4l2_id) && next) {
538 *control = ctrl;
539 *mapping = map;
540 }
541 }
542 }
543}
544
545struct uvc_control *uvc_find_control(struct uvc_video_device *video,
546 __u32 v4l2_id, struct uvc_control_mapping **mapping)
547{
548 struct uvc_control *ctrl = NULL;
549 struct uvc_entity *entity;
550 int next = v4l2_id & V4L2_CTRL_FLAG_NEXT_CTRL;
551
552 *mapping = NULL;
553
554 /* Mask the query flags. */
555 v4l2_id &= V4L2_CTRL_ID_MASK;
556
557 /* Find the control. */
558 __uvc_find_control(video->processing, v4l2_id, mapping, &ctrl, next);
559 if (ctrl && !next)
560 return ctrl;
561
562 list_for_each_entry(entity, &video->iterms, chain) {
563 __uvc_find_control(entity, v4l2_id, mapping, &ctrl, next);
564 if (ctrl && !next)
565 return ctrl;
566 }
567
568 list_for_each_entry(entity, &video->extensions, chain) {
569 __uvc_find_control(entity, v4l2_id, mapping, &ctrl, next);
570 if (ctrl && !next)
571 return ctrl;
572 }
573
574 if (ctrl == NULL && !next)
575 uvc_trace(UVC_TRACE_CONTROL, "Control 0x%08x not found.\n",
576 v4l2_id);
577
578 return ctrl;
579}
580
581int uvc_query_v4l2_ctrl(struct uvc_video_device *video,
582 struct v4l2_queryctrl *v4l2_ctrl)
583{
584 struct uvc_control *ctrl;
585 struct uvc_control_mapping *mapping;
586 struct uvc_menu_info *menu;
587 unsigned int i;
588 __u8 data[8];
589 int ret;
590
591 ctrl = uvc_find_control(video, v4l2_ctrl->id, &mapping);
592 if (ctrl == NULL)
593 return -EINVAL;
594
595 v4l2_ctrl->id = mapping->id;
596 v4l2_ctrl->type = mapping->v4l2_type;
597 strncpy(v4l2_ctrl->name, mapping->name, sizeof v4l2_ctrl->name);
598 v4l2_ctrl->flags = 0;
599
600 if (!(ctrl->info->flags & UVC_CONTROL_SET_CUR))
601 v4l2_ctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY;
602
603 if (ctrl->info->flags & UVC_CONTROL_GET_DEF) {
604 if ((ret = uvc_query_ctrl(video->dev, GET_DEF, ctrl->entity->id,
605 video->dev->intfnum, ctrl->info->selector,
606 &data, ctrl->info->size)) < 0)
607 return ret;
608 v4l2_ctrl->default_value = uvc_get_le_value(data, mapping);
609 }
610
611 if (mapping->v4l2_type == V4L2_CTRL_TYPE_MENU) {
612 v4l2_ctrl->minimum = 0;
613 v4l2_ctrl->maximum = mapping->menu_count - 1;
614 v4l2_ctrl->step = 1;
615
616 menu = mapping->menu_info;
617 for (i = 0; i < mapping->menu_count; ++i, ++menu) {
618 if (menu->value == v4l2_ctrl->default_value) {
619 v4l2_ctrl->default_value = i;
620 break;
621 }
622 }
623
624 return 0;
625 }
626
627 if (ctrl->info->flags & UVC_CONTROL_GET_MIN) {
628 if ((ret = uvc_query_ctrl(video->dev, GET_MIN, ctrl->entity->id,
629 video->dev->intfnum, ctrl->info->selector,
630 &data, ctrl->info->size)) < 0)
631 return ret;
632 v4l2_ctrl->minimum = uvc_get_le_value(data, mapping);
633 }
634 if (ctrl->info->flags & UVC_CONTROL_GET_MAX) {
635 if ((ret = uvc_query_ctrl(video->dev, GET_MAX, ctrl->entity->id,
636 video->dev->intfnum, ctrl->info->selector,
637 &data, ctrl->info->size)) < 0)
638 return ret;
639 v4l2_ctrl->maximum = uvc_get_le_value(data, mapping);
640 }
641 if (ctrl->info->flags & UVC_CONTROL_GET_RES) {
642 if ((ret = uvc_query_ctrl(video->dev, GET_RES, ctrl->entity->id,
643 video->dev->intfnum, ctrl->info->selector,
644 &data, ctrl->info->size)) < 0)
645 return ret;
646 v4l2_ctrl->step = uvc_get_le_value(data, mapping);
647 }
648
649 return 0;
650}
651
652
653/* --------------------------------------------------------------------------
654 * Control transactions
655 *
656 * To make extended set operations as atomic as the hardware allows, controls
657 * are handled using begin/commit/rollback operations.
658 *
659 * At the beginning of a set request, uvc_ctrl_begin should be called to
660 * initialize the request. This function acquires the control lock.
661 *
662 * When setting a control, the new value is stored in the control data field
663 * at position UVC_CTRL_DATA_CURRENT. The control is then marked as dirty for
664 * later processing. If the UVC and V4L2 control sizes differ, the current
665 * value is loaded from the hardware before storing the new value in the data
666 * field.
667 *
668 * After processing all controls in the transaction, uvc_ctrl_commit or
669 * uvc_ctrl_rollback must be called to apply the pending changes to the
670 * hardware or revert them. When applying changes, all controls marked as
671 * dirty will be modified in the UVC device, and the dirty flag will be
672 * cleared. When reverting controls, the control data field
673 * UVC_CTRL_DATA_CURRENT is reverted to its previous value
674 * (UVC_CTRL_DATA_BACKUP) for all dirty controls. Both functions release the
675 * control lock.
676 */
677int uvc_ctrl_begin(struct uvc_video_device *video)
678{
679 return mutex_lock_interruptible(&video->ctrl_mutex) ? -ERESTARTSYS : 0;
680}
681
682static int uvc_ctrl_commit_entity(struct uvc_device *dev,
683 struct uvc_entity *entity, int rollback)
684{
685 struct uvc_control *ctrl;
686 unsigned int i;
687 int ret;
688
689 if (entity == NULL)
690 return 0;
691
692 for (i = 0; i < entity->ncontrols; ++i) {
693 ctrl = &entity->controls[i];
694 if (ctrl->info == NULL || !ctrl->dirty)
695 continue;
696
697 if (!rollback)
698 ret = uvc_query_ctrl(dev, SET_CUR, ctrl->entity->id,
699 dev->intfnum, ctrl->info->selector,
700 uvc_ctrl_data(ctrl, UVC_CTRL_DATA_CURRENT),
701 ctrl->info->size);
702 else
703 ret = 0;
704
705 if (rollback || ret < 0)
706 memcpy(uvc_ctrl_data(ctrl, UVC_CTRL_DATA_CURRENT),
707 uvc_ctrl_data(ctrl, UVC_CTRL_DATA_BACKUP),
708 ctrl->info->size);
709
710 if ((ctrl->info->flags & UVC_CONTROL_GET_CUR) == 0)
711 ctrl->loaded = 0;
712
713 ctrl->dirty = 0;
714
715 if (ret < 0)
716 return ret;
717 }
718
719 return 0;
720}
721
722int __uvc_ctrl_commit(struct uvc_video_device *video, int rollback)
723{
724 struct uvc_entity *entity;
725 int ret = 0;
726
727 /* Find the control. */
728 ret = uvc_ctrl_commit_entity(video->dev, video->processing, rollback);
729 if (ret < 0)
730 goto done;
731
732 list_for_each_entry(entity, &video->iterms, chain) {
733 ret = uvc_ctrl_commit_entity(video->dev, entity, rollback);
734 if (ret < 0)
735 goto done;
736 }
737
738 list_for_each_entry(entity, &video->extensions, chain) {
739 ret = uvc_ctrl_commit_entity(video->dev, entity, rollback);
740 if (ret < 0)
741 goto done;
742 }
743
744done:
745 mutex_unlock(&video->ctrl_mutex);
746 return ret;
747}
748
749int uvc_ctrl_get(struct uvc_video_device *video,
750 struct v4l2_ext_control *xctrl)
751{
752 struct uvc_control *ctrl;
753 struct uvc_control_mapping *mapping;
754 struct uvc_menu_info *menu;
755 unsigned int i;
756 int ret;
757
758 ctrl = uvc_find_control(video, xctrl->id, &mapping);
759 if (ctrl == NULL || (ctrl->info->flags & UVC_CONTROL_GET_CUR) == 0)
760 return -EINVAL;
761
762 if (!ctrl->loaded) {
763 ret = uvc_query_ctrl(video->dev, GET_CUR, ctrl->entity->id,
764 video->dev->intfnum, ctrl->info->selector,
765 uvc_ctrl_data(ctrl, UVC_CTRL_DATA_CURRENT),
766 ctrl->info->size);
767 if (ret < 0)
768 return ret;
769
770 if ((ctrl->info->flags & UVC_CONTROL_AUTO_UPDATE) == 0)
771 ctrl->loaded = 1;
772 }
773
774 xctrl->value = uvc_get_le_value(
775 uvc_ctrl_data(ctrl, UVC_CTRL_DATA_CURRENT), mapping);
776
777 if (mapping->v4l2_type == V4L2_CTRL_TYPE_MENU) {
778 menu = mapping->menu_info;
779 for (i = 0; i < mapping->menu_count; ++i, ++menu) {
780 if (menu->value == xctrl->value) {
781 xctrl->value = i;
782 break;
783 }
784 }
785 }
786
787 return 0;
788}
789
790int uvc_ctrl_set(struct uvc_video_device *video,
791 struct v4l2_ext_control *xctrl)
792{
793 struct uvc_control *ctrl;
794 struct uvc_control_mapping *mapping;
795 s32 value = xctrl->value;
796 int ret;
797
798 ctrl = uvc_find_control(video, xctrl->id, &mapping);
799 if (ctrl == NULL || (ctrl->info->flags & UVC_CONTROL_SET_CUR) == 0)
800 return -EINVAL;
801
802 if (mapping->v4l2_type == V4L2_CTRL_TYPE_MENU) {
803 if (value < 0 || value >= mapping->menu_count)
804 return -EINVAL;
805 value = mapping->menu_info[value].value;
806 }
807
808 if (!ctrl->loaded && (ctrl->info->size * 8) != mapping->size) {
809 if ((ctrl->info->flags & UVC_CONTROL_GET_CUR) == 0) {
810 memset(uvc_ctrl_data(ctrl, UVC_CTRL_DATA_CURRENT),
811 0, ctrl->info->size);
812 } else {
813 ret = uvc_query_ctrl(video->dev, GET_CUR,
814 ctrl->entity->id, video->dev->intfnum,
815 ctrl->info->selector,
816 uvc_ctrl_data(ctrl, UVC_CTRL_DATA_CURRENT),
817 ctrl->info->size);
818 if (ret < 0)
819 return ret;
820 }
821
822 if ((ctrl->info->flags & UVC_CONTROL_AUTO_UPDATE) == 0)
823 ctrl->loaded = 1;
824 }
825
826 if (!ctrl->dirty) {
827 memcpy(uvc_ctrl_data(ctrl, UVC_CTRL_DATA_BACKUP),
828 uvc_ctrl_data(ctrl, UVC_CTRL_DATA_CURRENT),
829 ctrl->info->size);
830 }
831
832 uvc_set_le_value(value,
833 uvc_ctrl_data(ctrl, UVC_CTRL_DATA_CURRENT), mapping);
834
835 ctrl->dirty = 1;
836 ctrl->modified = 1;
837 return 0;
838}
839
840/* --------------------------------------------------------------------------
841 * Dynamic controls
842 */
843
844int uvc_xu_ctrl_query(struct uvc_video_device *video,
845 struct uvc_xu_control *xctrl, int set)
846{
847 struct uvc_entity *entity;
848 struct uvc_control *ctrl = NULL;
849 unsigned int i, found = 0;
850 __u8 *data;
851 int ret;
852
853 /* Find the extension unit. */
854 list_for_each_entry(entity, &video->extensions, chain) {
855 if (entity->id == xctrl->unit)
856 break;
857 }
858
859 if (entity->id != xctrl->unit) {
860 uvc_trace(UVC_TRACE_CONTROL, "Extension unit %u not found.\n",
861 xctrl->unit);
862 return -EINVAL;
863 }
864
865 /* Find the control. */
866 for (i = 0; i < entity->ncontrols; ++i) {
867 ctrl = &entity->controls[i];
868 if (ctrl->info == NULL)
869 continue;
870
871 if (ctrl->info->selector == xctrl->selector) {
872 found = 1;
873 break;
874 }
875 }
876
877 if (!found) {
878 uvc_trace(UVC_TRACE_CONTROL,
879 "Control " UVC_GUID_FORMAT "/%u not found.\n",
880 UVC_GUID_ARGS(entity->extension.guidExtensionCode),
881 xctrl->selector);
882 return -EINVAL;
883 }
884
885 /* Validate control data size. */
886 if (ctrl->info->size != xctrl->size)
887 return -EINVAL;
888
889 if ((set && !(ctrl->info->flags & UVC_CONTROL_SET_CUR)) ||
890 (!set && !(ctrl->info->flags & UVC_CONTROL_GET_CUR)))
891 return -EINVAL;
892
893 if (mutex_lock_interruptible(&video->ctrl_mutex))
894 return -ERESTARTSYS;
895
896 memcpy(uvc_ctrl_data(ctrl, UVC_CTRL_DATA_BACKUP),
897 uvc_ctrl_data(ctrl, UVC_CTRL_DATA_CURRENT),
898 xctrl->size);
899 data = uvc_ctrl_data(ctrl, UVC_CTRL_DATA_CURRENT);
900
901 if (set && copy_from_user(data, xctrl->data, xctrl->size)) {
902 ret = -EFAULT;
903 goto out;
904 }
905
906 ret = uvc_query_ctrl(video->dev, set ? SET_CUR : GET_CUR, xctrl->unit,
907 video->dev->intfnum, xctrl->selector, data,
908 xctrl->size);
909 if (ret < 0)
910 goto out;
911
912 if (!set && copy_to_user(xctrl->data, data, xctrl->size)) {
913 ret = -EFAULT;
914 goto out;
915 }
916
917out:
918 if (ret)
919 memcpy(uvc_ctrl_data(ctrl, UVC_CTRL_DATA_CURRENT),
920 uvc_ctrl_data(ctrl, UVC_CTRL_DATA_BACKUP),
921 xctrl->size);
922
923 mutex_unlock(&video->ctrl_mutex);
924 return ret;
925}
926
927/* --------------------------------------------------------------------------
928 * Suspend/resume
929 */
930
931/*
932 * Restore control values after resume, skipping controls that haven't been
933 * changed.
934 *
935 * TODO
936 * - Don't restore modified controls that are back to their default value.
937 * - Handle restore order (Auto-Exposure Mode should be restored before
938 * Exposure Time).
939 */
940int uvc_ctrl_resume_device(struct uvc_device *dev)
941{
942 struct uvc_control *ctrl;
943 struct uvc_entity *entity;
944 unsigned int i;
945 int ret;
946
947 /* Walk the entities list and restore controls when possible. */
948 list_for_each_entry(entity, &dev->entities, list) {
949
950 for (i = 0; i < entity->ncontrols; ++i) {
951 ctrl = &entity->controls[i];
952
953 if (ctrl->info == NULL || !ctrl->modified ||
954 (ctrl->info->flags & UVC_CONTROL_RESTORE) == 0)
955 continue;
956
957 printk(KERN_INFO "restoring control " UVC_GUID_FORMAT
958 "/%u/%u\n", UVC_GUID_ARGS(ctrl->info->entity),
959 ctrl->info->index, ctrl->info->selector);
960 ctrl->dirty = 1;
961 }
962
963 ret = uvc_ctrl_commit_entity(dev, entity, 0);
964 if (ret < 0)
965 return ret;
966 }
967
968 return 0;
969}
970
971/* --------------------------------------------------------------------------
972 * Control and mapping handling
973 */
974
975static void uvc_ctrl_add_ctrl(struct uvc_device *dev,
976 struct uvc_control_info *info)
977{
978 struct uvc_entity *entity;
979 struct uvc_control *ctrl = NULL;
980 int ret, found = 0;
981 unsigned int i;
982
983 list_for_each_entry(entity, &dev->entities, list) {
984 if (!uvc_entity_match_guid(entity, info->entity))
985 continue;
986
987 for (i = 0; i < entity->ncontrols; ++i) {
988 ctrl = &entity->controls[i];
989 if (ctrl->index == info->index) {
990 found = 1;
991 break;
992 }
993 }
994
995 if (found)
996 break;
997 }
998
999 if (!found)
1000 return;
1001
1002 if (UVC_ENTITY_TYPE(entity) == VC_EXTENSION_UNIT) {
1003 /* Check if the device control information and length match
1004 * the user supplied information.
1005 */
1006 __u32 flags;
1007 __le16 size;
1008 __u8 inf;
1009
1010 if ((ret = uvc_query_ctrl(dev, GET_LEN, ctrl->entity->id,
1011 dev->intfnum, info->selector, (__u8 *)&size, 2)) < 0) {
1012 uvc_trace(UVC_TRACE_CONTROL, "GET_LEN failed on "
1013 "control " UVC_GUID_FORMAT "/%u (%d).\n",
1014 UVC_GUID_ARGS(info->entity), info->selector,
1015 ret);
1016 return;
1017 }
1018
1019 if (info->size != le16_to_cpu(size)) {
1020 uvc_trace(UVC_TRACE_CONTROL, "Control " UVC_GUID_FORMAT
1021 "/%u size doesn't match user supplied "
1022 "value.\n", UVC_GUID_ARGS(info->entity),
1023 info->selector);
1024 return;
1025 }
1026
1027 if ((ret = uvc_query_ctrl(dev, GET_INFO, ctrl->entity->id,
1028 dev->intfnum, info->selector, &inf, 1)) < 0) {
1029 uvc_trace(UVC_TRACE_CONTROL, "GET_INFO failed on "
1030 "control " UVC_GUID_FORMAT "/%u (%d).\n",
1031 UVC_GUID_ARGS(info->entity), info->selector,
1032 ret);
1033 return;
1034 }
1035
1036 flags = info->flags;
1037 if (((flags & UVC_CONTROL_GET_CUR) && !(inf & (1 << 0))) ||
1038 ((flags & UVC_CONTROL_SET_CUR) && !(inf & (1 << 1)))) {
1039 uvc_trace(UVC_TRACE_CONTROL, "Control "
1040 UVC_GUID_FORMAT "/%u flags don't match "
1041 "supported operations.\n",
1042 UVC_GUID_ARGS(info->entity), info->selector);
1043 return;
1044 }
1045 }
1046
1047 ctrl->info = info;
1048 ctrl->data = kmalloc(ctrl->info->size * UVC_CTRL_NDATA, GFP_KERNEL);
1049 uvc_trace(UVC_TRACE_CONTROL, "Added control " UVC_GUID_FORMAT "/%u "
1050 "to device %s entity %u\n", UVC_GUID_ARGS(ctrl->info->entity),
1051 ctrl->info->selector, dev->udev->devpath, entity->id);
1052}
1053
1054/*
1055 * Add an item to the UVC control information list, and instantiate a control
1056 * structure for each device that supports the control.
1057 */
1058int uvc_ctrl_add_info(struct uvc_control_info *info)
1059{
1060 struct uvc_control_info *ctrl;
1061 struct uvc_device *dev;
1062 int ret = 0;
1063
1064 /* Find matching controls by walking the devices, entities and
1065 * controls list.
1066 */
1067 mutex_lock(&uvc_driver.ctrl_mutex);
1068
1069 /* First check if the list contains a control matching the new one.
1070 * Bail out if it does.
1071 */
1072 list_for_each_entry(ctrl, &uvc_driver.controls, list) {
1073 if (memcmp(ctrl->entity, info->entity, 16))
1074 continue;
1075
1076 if (ctrl->selector == info->selector) {
1077 uvc_trace(UVC_TRACE_CONTROL, "Control "
1078 UVC_GUID_FORMAT "/%u is already defined.\n",
1079 UVC_GUID_ARGS(info->entity), info->selector);
1080 ret = -EEXIST;
1081 goto end;
1082 }
1083 if (ctrl->index == info->index) {
1084 uvc_trace(UVC_TRACE_CONTROL, "Control "
1085 UVC_GUID_FORMAT "/%u would overwrite index "
1086 "%d.\n", UVC_GUID_ARGS(info->entity),
1087 info->selector, info->index);
1088 ret = -EEXIST;
1089 goto end;
1090 }
1091 }
1092
1093 list_for_each_entry(dev, &uvc_driver.devices, list)
1094 uvc_ctrl_add_ctrl(dev, info);
1095
1096 INIT_LIST_HEAD(&info->mappings);
1097 list_add_tail(&info->list, &uvc_driver.controls);
1098end:
1099 mutex_unlock(&uvc_driver.ctrl_mutex);
1100 return ret;
1101}
1102
1103int uvc_ctrl_add_mapping(struct uvc_control_mapping *mapping)
1104{
1105 struct uvc_control_info *info;
1106 struct uvc_control_mapping *map;
1107 int ret = -EINVAL;
1108
1109 if (mapping->id & ~V4L2_CTRL_ID_MASK) {
1110 uvc_trace(UVC_TRACE_CONTROL, "Can't add mapping '%s' with "
1111 "invalid control id 0x%08x\n", mapping->name,
1112 mapping->id);
1113 return -EINVAL;
1114 }
1115
1116 mutex_lock(&uvc_driver.ctrl_mutex);
1117 list_for_each_entry(info, &uvc_driver.controls, list) {
1118 if (memcmp(info->entity, mapping->entity, 16) ||
1119 info->selector != mapping->selector)
1120 continue;
1121
1122 if (info->size * 8 < mapping->size + mapping->offset) {
1123 uvc_trace(UVC_TRACE_CONTROL, "Mapping '%s' would "
1124 "overflow control " UVC_GUID_FORMAT "/%u\n",
1125 mapping->name, UVC_GUID_ARGS(info->entity),
1126 info->selector);
1127 ret = -EOVERFLOW;
1128 goto end;
1129 }
1130
1131 /* Check if the list contains a mapping matching the new one.
1132 * Bail out if it does.
1133 */
1134 list_for_each_entry(map, &info->mappings, list) {
1135 if (map->id == mapping->id) {
1136 uvc_trace(UVC_TRACE_CONTROL, "Mapping '%s' is "
1137 "already defined.\n", mapping->name);
1138 ret = -EEXIST;
1139 goto end;
1140 }
1141 }
1142
1143 mapping->ctrl = info;
1144 list_add_tail(&mapping->list, &info->mappings);
1145 uvc_trace(UVC_TRACE_CONTROL, "Adding mapping %s to control "
1146 UVC_GUID_FORMAT "/%u.\n", mapping->name,
1147 UVC_GUID_ARGS(info->entity), info->selector);
1148
1149 ret = 0;
1150 break;
1151 }
1152end:
1153 mutex_unlock(&uvc_driver.ctrl_mutex);
1154 return ret;
1155}
1156
1157/*
1158 * Initialize device controls.
1159 */
1160int uvc_ctrl_init_device(struct uvc_device *dev)
1161{
1162 struct uvc_control_info *info;
1163 struct uvc_control *ctrl;
1164 struct uvc_entity *entity;
1165 unsigned int i;
1166
1167 /* Walk the entities list and instantiate controls */
1168 list_for_each_entry(entity, &dev->entities, list) {
1169 unsigned int bControlSize = 0, ncontrols = 0;
1170 __u8 *bmControls = NULL;
1171
1172 if (UVC_ENTITY_TYPE(entity) == VC_EXTENSION_UNIT) {
1173 bmControls = entity->extension.bmControls;
1174 bControlSize = entity->extension.bControlSize;
1175 } else if (UVC_ENTITY_TYPE(entity) == VC_PROCESSING_UNIT) {
1176 bmControls = entity->processing.bmControls;
1177 bControlSize = entity->processing.bControlSize;
1178 } else if (UVC_ENTITY_TYPE(entity) == ITT_CAMERA) {
1179 bmControls = entity->camera.bmControls;
1180 bControlSize = entity->camera.bControlSize;
1181 }
1182
1183 for (i = 0; i < bControlSize; ++i)
1184 ncontrols += hweight8(bmControls[i]);
1185
1186 if (ncontrols == 0)
1187 continue;
1188
1189 entity->controls = kzalloc(ncontrols*sizeof *ctrl, GFP_KERNEL);
1190 if (entity->controls == NULL)
1191 return -ENOMEM;
1192
1193 entity->ncontrols = ncontrols;
1194
1195 ctrl = entity->controls;
1196 for (i = 0; i < bControlSize * 8; ++i) {
1197 if (uvc_get_bit(bmControls, i) == 0)
1198 continue;
1199
1200 ctrl->entity = entity;
1201 ctrl->index = i;
1202 ctrl++;
1203 }
1204 }
1205
1206 /* Walk the controls info list and associate them with the device
1207 * controls, then add the device to the global device list. This has
1208 * to be done while holding the controls lock, to make sure
1209 * uvc_ctrl_add_info() will not get called in-between.
1210 */
1211 mutex_lock(&uvc_driver.ctrl_mutex);
1212 list_for_each_entry(info, &uvc_driver.controls, list)
1213 uvc_ctrl_add_ctrl(dev, info);
1214
1215 list_add_tail(&dev->list, &uvc_driver.devices);
1216 mutex_unlock(&uvc_driver.ctrl_mutex);
1217
1218 return 0;
1219}
1220
1221/*
1222 * Cleanup device controls.
1223 */
1224void uvc_ctrl_cleanup_device(struct uvc_device *dev)
1225{
1226 struct uvc_entity *entity;
1227 unsigned int i;
1228
1229 /* Remove the device from the global devices list */
1230 mutex_lock(&uvc_driver.ctrl_mutex);
1231 if (dev->list.next != NULL)
1232 list_del(&dev->list);
1233 mutex_unlock(&uvc_driver.ctrl_mutex);
1234
1235 list_for_each_entry(entity, &dev->entities, list) {
1236 for (i = 0; i < entity->ncontrols; ++i)
1237 kfree(entity->controls[i].data);
1238
1239 kfree(entity->controls);
1240 }
1241}
1242
1243void uvc_ctrl_init(void)
1244{
1245 struct uvc_control_info *ctrl = uvc_ctrls;
1246 struct uvc_control_info *cend = ctrl + ARRAY_SIZE(uvc_ctrls);
1247 struct uvc_control_mapping *mapping = uvc_ctrl_mappings;
1248 struct uvc_control_mapping *mend =
1249 mapping + ARRAY_SIZE(uvc_ctrl_mappings);
1250
1251 for (; ctrl < cend; ++ctrl)
1252 uvc_ctrl_add_info(ctrl);
1253
1254 for (; mapping < mend; ++mapping)
1255 uvc_ctrl_add_mapping(mapping);
1256}
diff --git a/drivers/media/video/uvc/uvc_driver.c b/drivers/media/video/uvc/uvc_driver.c
new file mode 100644
index 000000000000..60ced589f898
--- /dev/null
+++ b/drivers/media/video/uvc/uvc_driver.c
@@ -0,0 +1,1955 @@
1/*
2 * uvc_driver.c -- USB Video Class driver
3 *
4 * Copyright (C) 2005-2008
5 * Laurent Pinchart (laurent.pinchart@skynet.be)
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
14/*
15 * This driver aims to support video input devices compliant with the 'USB
16 * Video Class' specification.
17 *
18 * The driver doesn't support the deprecated v4l1 interface. It implements the
19 * mmap capture method only, and doesn't do any image format conversion in
20 * software. If your user-space application doesn't support YUYV or MJPEG, fix
21 * it :-). Please note that the MJPEG data have been stripped from their
22 * Huffman tables (DHT marker), you will need to add it back if your JPEG
23 * codec can't handle MJPEG data.
24 */
25
26#include <linux/kernel.h>
27#include <linux/version.h>
28#include <linux/list.h>
29#include <linux/module.h>
30#include <linux/usb.h>
31#include <linux/videodev2.h>
32#include <linux/vmalloc.h>
33#include <linux/wait.h>
34#include <asm/atomic.h>
35
36#include <media/v4l2-common.h>
37
38#include "uvcvideo.h"
39
40#define DRIVER_AUTHOR "Laurent Pinchart <laurent.pinchart@skynet.be>"
41#define DRIVER_DESC "USB Video Class driver"
42#ifndef DRIVER_VERSION
43#define DRIVER_VERSION "v0.1.0"
44#endif
45
46static unsigned int uvc_quirks_param;
47unsigned int uvc_trace_param;
48
49/* ------------------------------------------------------------------------
50 * Control, formats, ...
51 */
52
53static struct uvc_format_desc uvc_fmts[] = {
54 {
55 .name = "YUV 4:2:2 (YUYV)",
56 .guid = UVC_GUID_FORMAT_YUY2,
57 .fcc = V4L2_PIX_FMT_YUYV,
58 },
59 {
60 .name = "YUV 4:2:0 (NV12)",
61 .guid = UVC_GUID_FORMAT_NV12,
62 .fcc = V4L2_PIX_FMT_NV12,
63 },
64 {
65 .name = "MJPEG",
66 .guid = UVC_GUID_FORMAT_MJPEG,
67 .fcc = V4L2_PIX_FMT_MJPEG,
68 },
69 {
70 .name = "YVU 4:2:0 (YV12)",
71 .guid = UVC_GUID_FORMAT_YV12,
72 .fcc = V4L2_PIX_FMT_YVU420,
73 },
74 {
75 .name = "YUV 4:2:0 (I420)",
76 .guid = UVC_GUID_FORMAT_I420,
77 .fcc = V4L2_PIX_FMT_YUV420,
78 },
79 {
80 .name = "YUV 4:2:2 (UYVY)",
81 .guid = UVC_GUID_FORMAT_UYVY,
82 .fcc = V4L2_PIX_FMT_UYVY,
83 },
84 {
85 .name = "Greyscale",
86 .guid = UVC_GUID_FORMAT_Y800,
87 .fcc = V4L2_PIX_FMT_GREY,
88 },
89 {
90 .name = "RGB Bayer",
91 .guid = UVC_GUID_FORMAT_BY8,
92 .fcc = V4L2_PIX_FMT_SBGGR8,
93 },
94};
95
96/* ------------------------------------------------------------------------
97 * Utility functions
98 */
99
100struct usb_host_endpoint *uvc_find_endpoint(struct usb_host_interface *alts,
101 __u8 epaddr)
102{
103 struct usb_host_endpoint *ep;
104 unsigned int i;
105
106 for (i = 0; i < alts->desc.bNumEndpoints; ++i) {
107 ep = &alts->endpoint[i];
108 if (ep->desc.bEndpointAddress == epaddr)
109 return ep;
110 }
111
112 return NULL;
113}
114
115static struct uvc_format_desc *uvc_format_by_guid(const __u8 guid[16])
116{
117 unsigned int len = ARRAY_SIZE(uvc_fmts);
118 unsigned int i;
119
120 for (i = 0; i < len; ++i) {
121 if (memcmp(guid, uvc_fmts[i].guid, 16) == 0)
122 return &uvc_fmts[i];
123 }
124
125 return NULL;
126}
127
128static __u32 uvc_colorspace(const __u8 primaries)
129{
130 static const __u8 colorprimaries[] = {
131 0,
132 V4L2_COLORSPACE_SRGB,
133 V4L2_COLORSPACE_470_SYSTEM_M,
134 V4L2_COLORSPACE_470_SYSTEM_BG,
135 V4L2_COLORSPACE_SMPTE170M,
136 V4L2_COLORSPACE_SMPTE240M,
137 };
138
139 if (primaries < ARRAY_SIZE(colorprimaries))
140 return colorprimaries[primaries];
141
142 return 0;
143}
144
145/* Simplify a fraction using a simple continued fraction decomposition. The
146 * idea here is to convert fractions such as 333333/10000000 to 1/30 using
147 * 32 bit arithmetic only. The algorithm is not perfect and relies upon two
148 * arbitrary parameters to remove non-significative terms from the simple
149 * continued fraction decomposition. Using 8 and 333 for n_terms and threshold
150 * respectively seems to give nice results.
151 */
152void uvc_simplify_fraction(uint32_t *numerator, uint32_t *denominator,
153 unsigned int n_terms, unsigned int threshold)
154{
155 uint32_t *an;
156 uint32_t x, y, r;
157 unsigned int i, n;
158
159 an = kmalloc(n_terms * sizeof *an, GFP_KERNEL);
160 if (an == NULL)
161 return;
162
163 /* Convert the fraction to a simple continued fraction. See
164 * http://mathforum.org/dr.math/faq/faq.fractions.html
165 * Stop if the current term is bigger than or equal to the given
166 * threshold.
167 */
168 x = *numerator;
169 y = *denominator;
170
171 for (n = 0; n < n_terms && y != 0; ++n) {
172 an[n] = x / y;
173 if (an[n] >= threshold) {
174 if (n < 2)
175 n++;
176 break;
177 }
178
179 r = x - an[n] * y;
180 x = y;
181 y = r;
182 }
183
184 /* Expand the simple continued fraction back to an integer fraction. */
185 x = 0;
186 y = 1;
187
188 for (i = n; i > 0; --i) {
189 r = y;
190 y = an[i-1] * y + x;
191 x = r;
192 }
193
194 *numerator = y;
195 *denominator = x;
196 kfree(an);
197}
198
199/* Convert a fraction to a frame interval in 100ns multiples. The idea here is
200 * to compute numerator / denominator * 10000000 using 32 bit fixed point
201 * arithmetic only.
202 */
203uint32_t uvc_fraction_to_interval(uint32_t numerator, uint32_t denominator)
204{
205 uint32_t multiplier;
206
207 /* Saturate the result if the operation would overflow. */
208 if (denominator == 0 ||
209 numerator/denominator >= ((uint32_t)-1)/10000000)
210 return (uint32_t)-1;
211
212 /* Divide both the denominator and the multiplier by two until
213 * numerator * multiplier doesn't overflow. If anyone knows a better
214 * algorithm please let me know.
215 */
216 multiplier = 10000000;
217 while (numerator > ((uint32_t)-1)/multiplier) {
218 multiplier /= 2;
219 denominator /= 2;
220 }
221
222 return denominator ? numerator * multiplier / denominator : 0;
223}
224
225/* ------------------------------------------------------------------------
226 * Terminal and unit management
227 */
228
229static struct uvc_entity *uvc_entity_by_id(struct uvc_device *dev, int id)
230{
231 struct uvc_entity *entity;
232
233 list_for_each_entry(entity, &dev->entities, list) {
234 if (entity->id == id)
235 return entity;
236 }
237
238 return NULL;
239}
240
241static struct uvc_entity *uvc_entity_by_reference(struct uvc_device *dev,
242 int id, struct uvc_entity *entity)
243{
244 unsigned int i;
245
246 if (entity == NULL)
247 entity = list_entry(&dev->entities, struct uvc_entity, list);
248
249 list_for_each_entry_continue(entity, &dev->entities, list) {
250 switch (UVC_ENTITY_TYPE(entity)) {
251 case TT_STREAMING:
252 if (entity->output.bSourceID == id)
253 return entity;
254 break;
255
256 case VC_PROCESSING_UNIT:
257 if (entity->processing.bSourceID == id)
258 return entity;
259 break;
260
261 case VC_SELECTOR_UNIT:
262 for (i = 0; i < entity->selector.bNrInPins; ++i)
263 if (entity->selector.baSourceID[i] == id)
264 return entity;
265 break;
266
267 case VC_EXTENSION_UNIT:
268 for (i = 0; i < entity->extension.bNrInPins; ++i)
269 if (entity->extension.baSourceID[i] == id)
270 return entity;
271 break;
272 }
273 }
274
275 return NULL;
276}
277
278/* ------------------------------------------------------------------------
279 * Descriptors handling
280 */
281
282static int uvc_parse_format(struct uvc_device *dev,
283 struct uvc_streaming *streaming, struct uvc_format *format,
284 __u32 **intervals, unsigned char *buffer, int buflen)
285{
286 struct usb_interface *intf = streaming->intf;
287 struct usb_host_interface *alts = intf->cur_altsetting;
288 struct uvc_format_desc *fmtdesc;
289 struct uvc_frame *frame;
290 const unsigned char *start = buffer;
291 unsigned int interval;
292 unsigned int i, n;
293 __u8 ftype;
294
295 format->type = buffer[2];
296 format->index = buffer[3];
297
298 switch (buffer[2]) {
299 case VS_FORMAT_UNCOMPRESSED:
300 case VS_FORMAT_FRAME_BASED:
301 if (buflen < 27) {
302 uvc_trace(UVC_TRACE_DESCR, "device %d videostreaming"
303 "interface %d FORMAT error\n",
304 dev->udev->devnum,
305 alts->desc.bInterfaceNumber);
306 return -EINVAL;
307 }
308
309 /* Find the format descriptor from its GUID. */
310 fmtdesc = uvc_format_by_guid(&buffer[5]);
311
312 if (fmtdesc != NULL) {
313 strncpy(format->name, fmtdesc->name,
314 sizeof format->name);
315 format->fcc = fmtdesc->fcc;
316 } else {
317 uvc_printk(KERN_INFO, "Unknown video format "
318 UVC_GUID_FORMAT "\n",
319 UVC_GUID_ARGS(&buffer[5]));
320 snprintf(format->name, sizeof format->name,
321 UVC_GUID_FORMAT, UVC_GUID_ARGS(&buffer[5]));
322 format->fcc = 0;
323 }
324
325 format->bpp = buffer[21];
326 if (buffer[2] == VS_FORMAT_UNCOMPRESSED) {
327 ftype = VS_FRAME_UNCOMPRESSED;
328 } else {
329 ftype = VS_FRAME_FRAME_BASED;
330 if (buffer[27])
331 format->flags = UVC_FMT_FLAG_COMPRESSED;
332 }
333 break;
334
335 case VS_FORMAT_MJPEG:
336 if (buflen < 11) {
337 uvc_trace(UVC_TRACE_DESCR, "device %d videostreaming"
338 "interface %d FORMAT error\n",
339 dev->udev->devnum,
340 alts->desc.bInterfaceNumber);
341 return -EINVAL;
342 }
343
344 strncpy(format->name, "MJPEG", sizeof format->name);
345 format->fcc = V4L2_PIX_FMT_MJPEG;
346 format->flags = UVC_FMT_FLAG_COMPRESSED;
347 format->bpp = 0;
348 ftype = VS_FRAME_MJPEG;
349 break;
350
351 case VS_FORMAT_DV:
352 if (buflen < 9) {
353 uvc_trace(UVC_TRACE_DESCR, "device %d videostreaming"
354 "interface %d FORMAT error\n",
355 dev->udev->devnum,
356 alts->desc.bInterfaceNumber);
357 return -EINVAL;
358 }
359
360 switch (buffer[8] & 0x7f) {
361 case 0:
362 strncpy(format->name, "SD-DV", sizeof format->name);
363 break;
364 case 1:
365 strncpy(format->name, "SDL-DV", sizeof format->name);
366 break;
367 case 2:
368 strncpy(format->name, "HD-DV", sizeof format->name);
369 break;
370 default:
371 uvc_trace(UVC_TRACE_DESCR, "device %d videostreaming"
372 "interface %d: unknown DV format %u\n",
373 dev->udev->devnum,
374 alts->desc.bInterfaceNumber, buffer[8]);
375 return -EINVAL;
376 }
377
378 strncat(format->name, buffer[8] & (1 << 7) ? " 60Hz" : " 50Hz",
379 sizeof format->name);
380
381 format->fcc = V4L2_PIX_FMT_DV;
382 format->flags = UVC_FMT_FLAG_COMPRESSED | UVC_FMT_FLAG_STREAM;
383 format->bpp = 0;
384 ftype = 0;
385
386 /* Create a dummy frame descriptor. */
387 frame = &format->frame[0];
388 memset(&format->frame[0], 0, sizeof format->frame[0]);
389 frame->bFrameIntervalType = 1;
390 frame->dwDefaultFrameInterval = 1;
391 frame->dwFrameInterval = *intervals;
392 *(*intervals)++ = 1;
393 format->nframes = 1;
394 break;
395
396 case VS_FORMAT_MPEG2TS:
397 case VS_FORMAT_STREAM_BASED:
398 /* Not supported yet. */
399 default:
400 uvc_trace(UVC_TRACE_DESCR, "device %d videostreaming"
401 "interface %d unsupported format %u\n",
402 dev->udev->devnum, alts->desc.bInterfaceNumber,
403 buffer[2]);
404 return -EINVAL;
405 }
406
407 uvc_trace(UVC_TRACE_DESCR, "Found format %s.\n", format->name);
408
409 buflen -= buffer[0];
410 buffer += buffer[0];
411
412 /* Parse the frame descriptors. Only uncompressed, MJPEG and frame
413 * based formats have frame descriptors.
414 */
415 while (buflen > 2 && buffer[2] == ftype) {
416 frame = &format->frame[format->nframes];
417
418 if (ftype != VS_FRAME_FRAME_BASED)
419 n = buflen > 25 ? buffer[25] : 0;
420 else
421 n = buflen > 21 ? buffer[21] : 0;
422
423 n = n ? n : 3;
424
425 if (buflen < 26 + 4*n) {
426 uvc_trace(UVC_TRACE_DESCR, "device %d videostreaming"
427 "interface %d FRAME error\n", dev->udev->devnum,
428 alts->desc.bInterfaceNumber);
429 return -EINVAL;
430 }
431
432 frame->bFrameIndex = buffer[3];
433 frame->bmCapabilities = buffer[4];
434 frame->wWidth = le16_to_cpup((__le16 *)&buffer[5]);
435 frame->wHeight = le16_to_cpup((__le16 *)&buffer[7]);
436 frame->dwMinBitRate = le32_to_cpup((__le32 *)&buffer[9]);
437 frame->dwMaxBitRate = le32_to_cpup((__le32 *)&buffer[13]);
438 if (ftype != VS_FRAME_FRAME_BASED) {
439 frame->dwMaxVideoFrameBufferSize =
440 le32_to_cpup((__le32 *)&buffer[17]);
441 frame->dwDefaultFrameInterval =
442 le32_to_cpup((__le32 *)&buffer[21]);
443 frame->bFrameIntervalType = buffer[25];
444 } else {
445 frame->dwMaxVideoFrameBufferSize = 0;
446 frame->dwDefaultFrameInterval =
447 le32_to_cpup((__le32 *)&buffer[17]);
448 frame->bFrameIntervalType = buffer[21];
449 }
450 frame->dwFrameInterval = *intervals;
451
452 /* Several UVC chipsets screw up dwMaxVideoFrameBufferSize
453 * completely. Observed behaviours range from setting the
454 * value to 1.1x the actual frame size of hardwiring the
455 * 16 low bits to 0. This results in a higher than necessary
456 * memory usage as well as a wrong image size information. For
457 * uncompressed formats this can be fixed by computing the
458 * value from the frame size.
459 */
460 if (!(format->flags & UVC_FMT_FLAG_COMPRESSED))
461 frame->dwMaxVideoFrameBufferSize = format->bpp
462 * frame->wWidth * frame->wHeight / 8;
463
464 /* Some bogus devices report dwMinFrameInterval equal to
465 * dwMaxFrameInterval and have dwFrameIntervalStep set to
466 * zero. Setting all null intervals to 1 fixes the problem and
467 * some other divisions by zero which could happen.
468 */
469 for (i = 0; i < n; ++i) {
470 interval = le32_to_cpup((__le32 *)&buffer[26+4*i]);
471 *(*intervals)++ = interval ? interval : 1;
472 }
473
474 /* Make sure that the default frame interval stays between
475 * the boundaries.
476 */
477 n -= frame->bFrameIntervalType ? 1 : 2;
478 frame->dwDefaultFrameInterval =
479 min(frame->dwFrameInterval[n],
480 max(frame->dwFrameInterval[0],
481 frame->dwDefaultFrameInterval));
482
483 uvc_trace(UVC_TRACE_DESCR, "- %ux%u (%u.%u fps)\n",
484 frame->wWidth, frame->wHeight,
485 10000000/frame->dwDefaultFrameInterval,
486 (100000000/frame->dwDefaultFrameInterval)%10);
487
488 format->nframes++;
489 buflen -= buffer[0];
490 buffer += buffer[0];
491 }
492
493 if (buflen > 2 && buffer[2] == VS_STILL_IMAGE_FRAME) {
494 buflen -= buffer[0];
495 buffer += buffer[0];
496 }
497
498 if (buflen > 2 && buffer[2] == VS_COLORFORMAT) {
499 if (buflen < 6) {
500 uvc_trace(UVC_TRACE_DESCR, "device %d videostreaming"
501 "interface %d COLORFORMAT error\n",
502 dev->udev->devnum,
503 alts->desc.bInterfaceNumber);
504 return -EINVAL;
505 }
506
507 format->colorspace = uvc_colorspace(buffer[3]);
508
509 buflen -= buffer[0];
510 buffer += buffer[0];
511 }
512
513 return buffer - start;
514}
515
516static int uvc_parse_streaming(struct uvc_device *dev,
517 struct usb_interface *intf)
518{
519 struct uvc_streaming *streaming = NULL;
520 struct uvc_format *format;
521 struct uvc_frame *frame;
522 struct usb_host_interface *alts = &intf->altsetting[0];
523 unsigned char *_buffer, *buffer = alts->extra;
524 int _buflen, buflen = alts->extralen;
525 unsigned int nformats = 0, nframes = 0, nintervals = 0;
526 unsigned int size, i, n, p;
527 __u32 *interval;
528 __u16 psize;
529 int ret = -EINVAL;
530
531 if (intf->cur_altsetting->desc.bInterfaceSubClass
532 != SC_VIDEOSTREAMING) {
533 uvc_trace(UVC_TRACE_DESCR, "device %d interface %d isn't a "
534 "video streaming interface\n", dev->udev->devnum,
535 intf->altsetting[0].desc.bInterfaceNumber);
536 return -EINVAL;
537 }
538
539 if (usb_driver_claim_interface(&uvc_driver.driver, intf, dev)) {
540 uvc_trace(UVC_TRACE_DESCR, "device %d interface %d is already "
541 "claimed\n", dev->udev->devnum,
542 intf->altsetting[0].desc.bInterfaceNumber);
543 return -EINVAL;
544 }
545
546 streaming = kzalloc(sizeof *streaming, GFP_KERNEL);
547 if (streaming == NULL) {
548 usb_driver_release_interface(&uvc_driver.driver, intf);
549 return -EINVAL;
550 }
551
552 mutex_init(&streaming->mutex);
553 streaming->intf = usb_get_intf(intf);
554 streaming->intfnum = intf->cur_altsetting->desc.bInterfaceNumber;
555
556 /* The Pico iMage webcam has its class-specific interface descriptors
557 * after the endpoint descriptors.
558 */
559 if (buflen == 0) {
560 for (i = 0; i < alts->desc.bNumEndpoints; ++i) {
561 struct usb_host_endpoint *ep = &alts->endpoint[i];
562
563 if (ep->extralen == 0)
564 continue;
565
566 if (ep->extralen > 2 &&
567 ep->extra[1] == USB_DT_CS_INTERFACE) {
568 uvc_trace(UVC_TRACE_DESCR, "trying extra data "
569 "from endpoint %u.\n", i);
570 buffer = alts->endpoint[i].extra;
571 buflen = alts->endpoint[i].extralen;
572 break;
573 }
574 }
575 }
576
577 /* Skip the standard interface descriptors. */
578 while (buflen > 2 && buffer[1] != USB_DT_CS_INTERFACE) {
579 buflen -= buffer[0];
580 buffer += buffer[0];
581 }
582
583 if (buflen <= 2) {
584 uvc_trace(UVC_TRACE_DESCR, "no class-specific streaming "
585 "interface descriptors found.\n");
586 goto error;
587 }
588
589 /* Parse the header descriptor. */
590 if (buffer[2] == VS_OUTPUT_HEADER) {
591 uvc_trace(UVC_TRACE_DESCR, "device %d videostreaming interface "
592 "%d OUTPUT HEADER descriptor is not supported.\n",
593 dev->udev->devnum, alts->desc.bInterfaceNumber);
594 goto error;
595 } else if (buffer[2] == VS_INPUT_HEADER) {
596 p = buflen >= 5 ? buffer[3] : 0;
597 n = buflen >= 12 ? buffer[12] : 0;
598
599 if (buflen < 13 + p*n || buffer[2] != VS_INPUT_HEADER) {
600 uvc_trace(UVC_TRACE_DESCR, "device %d videostreaming "
601 "interface %d INPUT HEADER descriptor is "
602 "invalid.\n", dev->udev->devnum,
603 alts->desc.bInterfaceNumber);
604 goto error;
605 }
606
607 streaming->header.bNumFormats = p;
608 streaming->header.bEndpointAddress = buffer[6];
609 streaming->header.bmInfo = buffer[7];
610 streaming->header.bTerminalLink = buffer[8];
611 streaming->header.bStillCaptureMethod = buffer[9];
612 streaming->header.bTriggerSupport = buffer[10];
613 streaming->header.bTriggerUsage = buffer[11];
614 streaming->header.bControlSize = n;
615
616 streaming->header.bmaControls = kmalloc(p*n, GFP_KERNEL);
617 if (streaming->header.bmaControls == NULL) {
618 ret = -ENOMEM;
619 goto error;
620 }
621
622 memcpy(streaming->header.bmaControls, &buffer[13], p*n);
623 } else {
624 uvc_trace(UVC_TRACE_DESCR, "device %d videostreaming interface "
625 "%d HEADER descriptor not found.\n", dev->udev->devnum,
626 alts->desc.bInterfaceNumber);
627 goto error;
628 }
629
630 buflen -= buffer[0];
631 buffer += buffer[0];
632
633 _buffer = buffer;
634 _buflen = buflen;
635
636 /* Count the format and frame descriptors. */
637 while (_buflen > 2) {
638 switch (_buffer[2]) {
639 case VS_FORMAT_UNCOMPRESSED:
640 case VS_FORMAT_MJPEG:
641 case VS_FORMAT_FRAME_BASED:
642 nformats++;
643 break;
644
645 case VS_FORMAT_DV:
646 /* DV format has no frame descriptor. We will create a
647 * dummy frame descriptor with a dummy frame interval.
648 */
649 nformats++;
650 nframes++;
651 nintervals++;
652 break;
653
654 case VS_FORMAT_MPEG2TS:
655 case VS_FORMAT_STREAM_BASED:
656 uvc_trace(UVC_TRACE_DESCR, "device %d videostreaming "
657 "interface %d FORMAT %u is not supported.\n",
658 dev->udev->devnum,
659 alts->desc.bInterfaceNumber, _buffer[2]);
660 break;
661
662 case VS_FRAME_UNCOMPRESSED:
663 case VS_FRAME_MJPEG:
664 nframes++;
665 if (_buflen > 25)
666 nintervals += _buffer[25] ? _buffer[25] : 3;
667 break;
668
669 case VS_FRAME_FRAME_BASED:
670 nframes++;
671 if (_buflen > 21)
672 nintervals += _buffer[21] ? _buffer[21] : 3;
673 break;
674 }
675
676 _buflen -= _buffer[0];
677 _buffer += _buffer[0];
678 }
679
680 if (nformats == 0) {
681 uvc_trace(UVC_TRACE_DESCR, "device %d videostreaming interface "
682 "%d has no supported formats defined.\n",
683 dev->udev->devnum, alts->desc.bInterfaceNumber);
684 goto error;
685 }
686
687 size = nformats * sizeof *format + nframes * sizeof *frame
688 + nintervals * sizeof *interval;
689 format = kzalloc(size, GFP_KERNEL);
690 if (format == NULL) {
691 ret = -ENOMEM;
692 goto error;
693 }
694
695 frame = (struct uvc_frame *)&format[nformats];
696 interval = (__u32 *)&frame[nframes];
697
698 streaming->format = format;
699 streaming->nformats = nformats;
700
701 /* Parse the format descriptors. */
702 while (buflen > 2) {
703 switch (buffer[2]) {
704 case VS_FORMAT_UNCOMPRESSED:
705 case VS_FORMAT_MJPEG:
706 case VS_FORMAT_DV:
707 case VS_FORMAT_FRAME_BASED:
708 format->frame = frame;
709 ret = uvc_parse_format(dev, streaming, format,
710 &interval, buffer, buflen);
711 if (ret < 0)
712 goto error;
713
714 frame += format->nframes;
715 format++;
716
717 buflen -= ret;
718 buffer += ret;
719 continue;
720
721 default:
722 break;
723 }
724
725 buflen -= buffer[0];
726 buffer += buffer[0];
727 }
728
729 /* Parse the alternate settings to find the maximum bandwidth. */
730 for (i = 0; i < intf->num_altsetting; ++i) {
731 struct usb_host_endpoint *ep;
732 alts = &intf->altsetting[i];
733 ep = uvc_find_endpoint(alts,
734 streaming->header.bEndpointAddress);
735 if (ep == NULL)
736 continue;
737
738 psize = le16_to_cpu(ep->desc.wMaxPacketSize);
739 psize = (psize & 0x07ff) * (1 + ((psize >> 11) & 3));
740 if (psize > streaming->maxpsize)
741 streaming->maxpsize = psize;
742 }
743
744 list_add_tail(&streaming->list, &dev->streaming);
745 return 0;
746
747error:
748 usb_driver_release_interface(&uvc_driver.driver, intf);
749 usb_put_intf(intf);
750 kfree(streaming->format);
751 kfree(streaming->header.bmaControls);
752 kfree(streaming);
753 return ret;
754}
755
756/* Parse vendor-specific extensions. */
757static int uvc_parse_vendor_control(struct uvc_device *dev,
758 const unsigned char *buffer, int buflen)
759{
760 struct usb_device *udev = dev->udev;
761 struct usb_host_interface *alts = dev->intf->cur_altsetting;
762 struct uvc_entity *unit;
763 unsigned int n, p;
764 int handled = 0;
765
766 switch (le16_to_cpu(dev->udev->descriptor.idVendor)) {
767 case 0x046d: /* Logitech */
768 if (buffer[1] != 0x41 || buffer[2] != 0x01)
769 break;
770
771 /* Logitech implements several vendor specific functions
772 * through vendor specific extension units (LXU).
773 *
774 * The LXU descriptors are similar to XU descriptors
775 * (see "USB Device Video Class for Video Devices", section
776 * 3.7.2.6 "Extension Unit Descriptor") with the following
777 * differences:
778 *
779 * ----------------------------------------------------------
780 * 0 bLength 1 Number
781 * Size of this descriptor, in bytes: 24+p+n*2
782 * ----------------------------------------------------------
783 * 23+p+n bmControlsType N Bitmap
784 * Individual bits in the set are defined:
785 * 0: Absolute
786 * 1: Relative
787 *
788 * This bitset is mapped exactly the same as bmControls.
789 * ----------------------------------------------------------
790 * 23+p+n*2 bReserved 1 Boolean
791 * ----------------------------------------------------------
792 * 24+p+n*2 iExtension 1 Index
793 * Index of a string descriptor that describes this
794 * extension unit.
795 * ----------------------------------------------------------
796 */
797 p = buflen >= 22 ? buffer[21] : 0;
798 n = buflen >= 25 + p ? buffer[22+p] : 0;
799
800 if (buflen < 25 + p + 2*n) {
801 uvc_trace(UVC_TRACE_DESCR, "device %d videocontrol "
802 "interface %d EXTENSION_UNIT error\n",
803 udev->devnum, alts->desc.bInterfaceNumber);
804 break;
805 }
806
807 unit = kzalloc(sizeof *unit + p + 2*n, GFP_KERNEL);
808 if (unit == NULL)
809 return -ENOMEM;
810
811 unit->id = buffer[3];
812 unit->type = VC_EXTENSION_UNIT;
813 memcpy(unit->extension.guidExtensionCode, &buffer[4], 16);
814 unit->extension.bNumControls = buffer[20];
815 unit->extension.bNrInPins =
816 le16_to_cpup((__le16 *)&buffer[21]);
817 unit->extension.baSourceID = (__u8 *)unit + sizeof *unit;
818 memcpy(unit->extension.baSourceID, &buffer[22], p);
819 unit->extension.bControlSize = buffer[22+p];
820 unit->extension.bmControls = (__u8 *)unit + sizeof *unit + p;
821 unit->extension.bmControlsType = (__u8 *)unit + sizeof *unit
822 + p + n;
823 memcpy(unit->extension.bmControls, &buffer[23+p], 2*n);
824
825 if (buffer[24+p+2*n] != 0)
826 usb_string(udev, buffer[24+p+2*n], unit->name,
827 sizeof unit->name);
828 else
829 sprintf(unit->name, "Extension %u", buffer[3]);
830
831 list_add_tail(&unit->list, &dev->entities);
832 handled = 1;
833 break;
834 }
835
836 return handled;
837}
838
839static int uvc_parse_standard_control(struct uvc_device *dev,
840 const unsigned char *buffer, int buflen)
841{
842 struct usb_device *udev = dev->udev;
843 struct uvc_entity *unit, *term;
844 struct usb_interface *intf;
845 struct usb_host_interface *alts = dev->intf->cur_altsetting;
846 unsigned int i, n, p, len;
847 __u16 type;
848
849 switch (buffer[2]) {
850 case VC_HEADER:
851 n = buflen >= 12 ? buffer[11] : 0;
852
853 if (buflen < 12 || buflen < 12 + n) {
854 uvc_trace(UVC_TRACE_DESCR, "device %d videocontrol "
855 "interface %d HEADER error\n", udev->devnum,
856 alts->desc.bInterfaceNumber);
857 return -EINVAL;
858 }
859
860 dev->uvc_version = le16_to_cpup((__le16 *)&buffer[3]);
861 dev->clock_frequency = le32_to_cpup((__le32 *)&buffer[7]);
862
863 /* Parse all USB Video Streaming interfaces. */
864 for (i = 0; i < n; ++i) {
865 intf = usb_ifnum_to_if(udev, buffer[12+i]);
866 if (intf == NULL) {
867 uvc_trace(UVC_TRACE_DESCR, "device %d "
868 "interface %d doesn't exists\n",
869 udev->devnum, i);
870 continue;
871 }
872
873 uvc_parse_streaming(dev, intf);
874 }
875 break;
876
877 case VC_INPUT_TERMINAL:
878 if (buflen < 8) {
879 uvc_trace(UVC_TRACE_DESCR, "device %d videocontrol "
880 "interface %d INPUT_TERMINAL error\n",
881 udev->devnum, alts->desc.bInterfaceNumber);
882 return -EINVAL;
883 }
884
885 /* Make sure the terminal type MSB is not null, otherwise it
886 * could be confused with a unit.
887 */
888 type = le16_to_cpup((__le16 *)&buffer[4]);
889 if ((type & 0xff00) == 0) {
890 uvc_trace(UVC_TRACE_DESCR, "device %d videocontrol "
891 "interface %d INPUT_TERMINAL %d has invalid "
892 "type 0x%04x, skipping\n", udev->devnum,
893 alts->desc.bInterfaceNumber,
894 buffer[3], type);
895 return 0;
896 }
897
898 n = 0;
899 p = 0;
900 len = 8;
901
902 if (type == ITT_CAMERA) {
903 n = buflen >= 15 ? buffer[14] : 0;
904 len = 15;
905
906 } else if (type == ITT_MEDIA_TRANSPORT_INPUT) {
907 n = buflen >= 9 ? buffer[8] : 0;
908 p = buflen >= 10 + n ? buffer[9+n] : 0;
909 len = 10;
910 }
911
912 if (buflen < len + n + p) {
913 uvc_trace(UVC_TRACE_DESCR, "device %d videocontrol "
914 "interface %d INPUT_TERMINAL error\n",
915 udev->devnum, alts->desc.bInterfaceNumber);
916 return -EINVAL;
917 }
918
919 term = kzalloc(sizeof *term + n + p, GFP_KERNEL);
920 if (term == NULL)
921 return -ENOMEM;
922
923 term->id = buffer[3];
924 term->type = type | UVC_TERM_INPUT;
925
926 if (UVC_ENTITY_TYPE(term) == ITT_CAMERA) {
927 term->camera.bControlSize = n;
928 term->camera.bmControls = (__u8 *)term + sizeof *term;
929 term->camera.wObjectiveFocalLengthMin =
930 le16_to_cpup((__le16 *)&buffer[8]);
931 term->camera.wObjectiveFocalLengthMax =
932 le16_to_cpup((__le16 *)&buffer[10]);
933 term->camera.wOcularFocalLength =
934 le16_to_cpup((__le16 *)&buffer[12]);
935 memcpy(term->camera.bmControls, &buffer[15], n);
936 } else if (UVC_ENTITY_TYPE(term) == ITT_MEDIA_TRANSPORT_INPUT) {
937 term->media.bControlSize = n;
938 term->media.bmControls = (__u8 *)term + sizeof *term;
939 term->media.bTransportModeSize = p;
940 term->media.bmTransportModes = (__u8 *)term
941 + sizeof *term + n;
942 memcpy(term->media.bmControls, &buffer[9], n);
943 memcpy(term->media.bmTransportModes, &buffer[10+n], p);
944 }
945
946 if (buffer[7] != 0)
947 usb_string(udev, buffer[7], term->name,
948 sizeof term->name);
949 else if (UVC_ENTITY_TYPE(term) == ITT_CAMERA)
950 sprintf(term->name, "Camera %u", buffer[3]);
951 else if (UVC_ENTITY_TYPE(term) == ITT_MEDIA_TRANSPORT_INPUT)
952 sprintf(term->name, "Media %u", buffer[3]);
953 else
954 sprintf(term->name, "Input %u", buffer[3]);
955
956 list_add_tail(&term->list, &dev->entities);
957 break;
958
959 case VC_OUTPUT_TERMINAL:
960 if (buflen < 9) {
961 uvc_trace(UVC_TRACE_DESCR, "device %d videocontrol "
962 "interface %d OUTPUT_TERMINAL error\n",
963 udev->devnum, alts->desc.bInterfaceNumber);
964 return -EINVAL;
965 }
966
967 /* Make sure the terminal type MSB is not null, otherwise it
968 * could be confused with a unit.
969 */
970 type = le16_to_cpup((__le16 *)&buffer[4]);
971 if ((type & 0xff00) == 0) {
972 uvc_trace(UVC_TRACE_DESCR, "device %d videocontrol "
973 "interface %d OUTPUT_TERMINAL %d has invalid "
974 "type 0x%04x, skipping\n", udev->devnum,
975 alts->desc.bInterfaceNumber, buffer[3], type);
976 return 0;
977 }
978
979 term = kzalloc(sizeof *term, GFP_KERNEL);
980 if (term == NULL)
981 return -ENOMEM;
982
983 term->id = buffer[3];
984 term->type = type | UVC_TERM_OUTPUT;
985 term->output.bSourceID = buffer[7];
986
987 if (buffer[8] != 0)
988 usb_string(udev, buffer[8], term->name,
989 sizeof term->name);
990 else
991 sprintf(term->name, "Output %u", buffer[3]);
992
993 list_add_tail(&term->list, &dev->entities);
994 break;
995
996 case VC_SELECTOR_UNIT:
997 p = buflen >= 5 ? buffer[4] : 0;
998
999 if (buflen < 5 || buflen < 6 + p) {
1000 uvc_trace(UVC_TRACE_DESCR, "device %d videocontrol "
1001 "interface %d SELECTOR_UNIT error\n",
1002 udev->devnum, alts->desc.bInterfaceNumber);
1003 return -EINVAL;
1004 }
1005
1006 unit = kzalloc(sizeof *unit + p, GFP_KERNEL);
1007 if (unit == NULL)
1008 return -ENOMEM;
1009
1010 unit->id = buffer[3];
1011 unit->type = buffer[2];
1012 unit->selector.bNrInPins = buffer[4];
1013 unit->selector.baSourceID = (__u8 *)unit + sizeof *unit;
1014 memcpy(unit->selector.baSourceID, &buffer[5], p);
1015
1016 if (buffer[5+p] != 0)
1017 usb_string(udev, buffer[5+p], unit->name,
1018 sizeof unit->name);
1019 else
1020 sprintf(unit->name, "Selector %u", buffer[3]);
1021
1022 list_add_tail(&unit->list, &dev->entities);
1023 break;
1024
1025 case VC_PROCESSING_UNIT:
1026 n = buflen >= 8 ? buffer[7] : 0;
1027 p = dev->uvc_version >= 0x0110 ? 10 : 9;
1028
1029 if (buflen < p + n) {
1030 uvc_trace(UVC_TRACE_DESCR, "device %d videocontrol "
1031 "interface %d PROCESSING_UNIT error\n",
1032 udev->devnum, alts->desc.bInterfaceNumber);
1033 return -EINVAL;
1034 }
1035
1036 unit = kzalloc(sizeof *unit + n, GFP_KERNEL);
1037 if (unit == NULL)
1038 return -ENOMEM;
1039
1040 unit->id = buffer[3];
1041 unit->type = buffer[2];
1042 unit->processing.bSourceID = buffer[4];
1043 unit->processing.wMaxMultiplier =
1044 le16_to_cpup((__le16 *)&buffer[5]);
1045 unit->processing.bControlSize = buffer[7];
1046 unit->processing.bmControls = (__u8 *)unit + sizeof *unit;
1047 memcpy(unit->processing.bmControls, &buffer[8], n);
1048 if (dev->uvc_version >= 0x0110)
1049 unit->processing.bmVideoStandards = buffer[9+n];
1050
1051 if (buffer[8+n] != 0)
1052 usb_string(udev, buffer[8+n], unit->name,
1053 sizeof unit->name);
1054 else
1055 sprintf(unit->name, "Processing %u", buffer[3]);
1056
1057 list_add_tail(&unit->list, &dev->entities);
1058 break;
1059
1060 case VC_EXTENSION_UNIT:
1061 p = buflen >= 22 ? buffer[21] : 0;
1062 n = buflen >= 24 + p ? buffer[22+p] : 0;
1063
1064 if (buflen < 24 + p + n) {
1065 uvc_trace(UVC_TRACE_DESCR, "device %d videocontrol "
1066 "interface %d EXTENSION_UNIT error\n",
1067 udev->devnum, alts->desc.bInterfaceNumber);
1068 return -EINVAL;
1069 }
1070
1071 unit = kzalloc(sizeof *unit + p + n, GFP_KERNEL);
1072 if (unit == NULL)
1073 return -ENOMEM;
1074
1075 unit->id = buffer[3];
1076 unit->type = buffer[2];
1077 memcpy(unit->extension.guidExtensionCode, &buffer[4], 16);
1078 unit->extension.bNumControls = buffer[20];
1079 unit->extension.bNrInPins =
1080 le16_to_cpup((__le16 *)&buffer[21]);
1081 unit->extension.baSourceID = (__u8 *)unit + sizeof *unit;
1082 memcpy(unit->extension.baSourceID, &buffer[22], p);
1083 unit->extension.bControlSize = buffer[22+p];
1084 unit->extension.bmControls = (__u8 *)unit + sizeof *unit + p;
1085 memcpy(unit->extension.bmControls, &buffer[23+p], n);
1086
1087 if (buffer[23+p+n] != 0)
1088 usb_string(udev, buffer[23+p+n], unit->name,
1089 sizeof unit->name);
1090 else
1091 sprintf(unit->name, "Extension %u", buffer[3]);
1092
1093 list_add_tail(&unit->list, &dev->entities);
1094 break;
1095
1096 default:
1097 uvc_trace(UVC_TRACE_DESCR, "Found an unknown CS_INTERFACE "
1098 "descriptor (%u)\n", buffer[2]);
1099 break;
1100 }
1101
1102 return 0;
1103}
1104
1105static int uvc_parse_control(struct uvc_device *dev)
1106{
1107 struct usb_host_interface *alts = dev->intf->cur_altsetting;
1108 unsigned char *buffer = alts->extra;
1109 int buflen = alts->extralen;
1110 int ret;
1111
1112 /* Parse the default alternate setting only, as the UVC specification
1113 * defines a single alternate setting, the default alternate setting
1114 * zero.
1115 */
1116
1117 while (buflen > 2) {
1118 if (uvc_parse_vendor_control(dev, buffer, buflen) ||
1119 buffer[1] != USB_DT_CS_INTERFACE)
1120 goto next_descriptor;
1121
1122 if ((ret = uvc_parse_standard_control(dev, buffer, buflen)) < 0)
1123 return ret;
1124
1125next_descriptor:
1126 buflen -= buffer[0];
1127 buffer += buffer[0];
1128 }
1129
1130 /* Check if the optional status endpoint is present. */
1131 if (alts->desc.bNumEndpoints == 1) {
1132 struct usb_host_endpoint *ep = &alts->endpoint[0];
1133 struct usb_endpoint_descriptor *desc = &ep->desc;
1134
1135 if (usb_endpoint_is_int_in(desc) &&
1136 le16_to_cpu(desc->wMaxPacketSize) >= 8 &&
1137 desc->bInterval != 0) {
1138 uvc_trace(UVC_TRACE_DESCR, "Found a Status endpoint "
1139 "(addr %02x).\n", desc->bEndpointAddress);
1140 dev->int_ep = ep;
1141 }
1142 }
1143
1144 return 0;
1145}
1146
1147/* ------------------------------------------------------------------------
1148 * USB probe and disconnect
1149 */
1150
1151/*
1152 * Unregister the video devices.
1153 */
1154static void uvc_unregister_video(struct uvc_device *dev)
1155{
1156 if (dev->video.vdev) {
1157 if (dev->video.vdev->minor == -1)
1158 video_device_release(dev->video.vdev);
1159 else
1160 video_unregister_device(dev->video.vdev);
1161 dev->video.vdev = NULL;
1162 }
1163}
1164
1165/*
1166 * Scan the UVC descriptors to locate a chain starting at an Output Terminal
1167 * and containing the following units:
1168 *
1169 * - a USB Streaming Output Terminal
1170 * - zero or one Processing Unit
1171 * - zero, one or mode single-input Selector Units
1172 * - zero or one multiple-input Selector Units, provided all inputs are
1173 * connected to input terminals
1174 * - zero, one or mode single-input Extension Units
1175 * - one Camera Input Terminal, or one or more External terminals.
1176 *
1177 * A side forward scan is made on each detected entity to check for additional
1178 * extension units.
1179 */
1180static int uvc_scan_chain_entity(struct uvc_video_device *video,
1181 struct uvc_entity *entity)
1182{
1183 switch (UVC_ENTITY_TYPE(entity)) {
1184 case VC_EXTENSION_UNIT:
1185 if (uvc_trace_param & UVC_TRACE_PROBE)
1186 printk(" <- XU %d", entity->id);
1187
1188 if (entity->extension.bNrInPins != 1) {
1189 uvc_trace(UVC_TRACE_DESCR, "Extension unit %d has more "
1190 "than 1 input pin.\n", entity->id);
1191 return -1;
1192 }
1193
1194 list_add_tail(&entity->chain, &video->extensions);
1195 break;
1196
1197 case VC_PROCESSING_UNIT:
1198 if (uvc_trace_param & UVC_TRACE_PROBE)
1199 printk(" <- PU %d", entity->id);
1200
1201 if (video->processing != NULL) {
1202 uvc_trace(UVC_TRACE_DESCR, "Found multiple "
1203 "Processing Units in chain.\n");
1204 return -1;
1205 }
1206
1207 video->processing = entity;
1208 break;
1209
1210 case VC_SELECTOR_UNIT:
1211 if (uvc_trace_param & UVC_TRACE_PROBE)
1212 printk(" <- SU %d", entity->id);
1213
1214 /* Single-input selector units are ignored. */
1215 if (entity->selector.bNrInPins == 1)
1216 break;
1217
1218 if (video->selector != NULL) {
1219 uvc_trace(UVC_TRACE_DESCR, "Found multiple Selector "
1220 "Units in chain.\n");
1221 return -1;
1222 }
1223
1224 video->selector = entity;
1225 break;
1226
1227 case ITT_VENDOR_SPECIFIC:
1228 case ITT_CAMERA:
1229 case ITT_MEDIA_TRANSPORT_INPUT:
1230 if (uvc_trace_param & UVC_TRACE_PROBE)
1231 printk(" <- IT %d\n", entity->id);
1232
1233 list_add_tail(&entity->chain, &video->iterms);
1234 break;
1235
1236 default:
1237 uvc_trace(UVC_TRACE_DESCR, "Unsupported entity type "
1238 "0x%04x found in chain.\n", UVC_ENTITY_TYPE(entity));
1239 return -1;
1240 }
1241
1242 return 0;
1243}
1244
1245static int uvc_scan_chain_forward(struct uvc_video_device *video,
1246 struct uvc_entity *entity, struct uvc_entity *prev)
1247{
1248 struct uvc_entity *forward;
1249 int found;
1250
1251 /* Forward scan */
1252 forward = NULL;
1253 found = 0;
1254
1255 while (1) {
1256 forward = uvc_entity_by_reference(video->dev, entity->id,
1257 forward);
1258 if (forward == NULL)
1259 break;
1260
1261 if (UVC_ENTITY_TYPE(forward) != VC_EXTENSION_UNIT ||
1262 forward == prev)
1263 continue;
1264
1265 if (forward->extension.bNrInPins != 1) {
1266 uvc_trace(UVC_TRACE_DESCR, "Extension unit %d has"
1267 "more than 1 input pin.\n", entity->id);
1268 return -1;
1269 }
1270
1271 list_add_tail(&forward->chain, &video->extensions);
1272 if (uvc_trace_param & UVC_TRACE_PROBE) {
1273 if (!found)
1274 printk(" (-> XU");
1275
1276 printk(" %d", forward->id);
1277 found = 1;
1278 }
1279 }
1280 if (found)
1281 printk(")");
1282
1283 return 0;
1284}
1285
1286static int uvc_scan_chain_backward(struct uvc_video_device *video,
1287 struct uvc_entity *entity)
1288{
1289 struct uvc_entity *term;
1290 int id = -1, i;
1291
1292 switch (UVC_ENTITY_TYPE(entity)) {
1293 case VC_EXTENSION_UNIT:
1294 id = entity->extension.baSourceID[0];
1295 break;
1296
1297 case VC_PROCESSING_UNIT:
1298 id = entity->processing.bSourceID;
1299 break;
1300
1301 case VC_SELECTOR_UNIT:
1302 /* Single-input selector units are ignored. */
1303 if (entity->selector.bNrInPins == 1) {
1304 id = entity->selector.baSourceID[0];
1305 break;
1306 }
1307
1308 if (uvc_trace_param & UVC_TRACE_PROBE)
1309 printk(" <- IT");
1310
1311 video->selector = entity;
1312 for (i = 0; i < entity->selector.bNrInPins; ++i) {
1313 id = entity->selector.baSourceID[i];
1314 term = uvc_entity_by_id(video->dev, id);
1315 if (term == NULL || !UVC_ENTITY_IS_ITERM(term)) {
1316 uvc_trace(UVC_TRACE_DESCR, "Selector unit %d "
1317 "input %d isn't connected to an "
1318 "input terminal\n", entity->id, i);
1319 return -1;
1320 }
1321
1322 if (uvc_trace_param & UVC_TRACE_PROBE)
1323 printk(" %d", term->id);
1324
1325 list_add_tail(&term->chain, &video->iterms);
1326 uvc_scan_chain_forward(video, term, entity);
1327 }
1328
1329 if (uvc_trace_param & UVC_TRACE_PROBE)
1330 printk("\n");
1331
1332 id = 0;
1333 break;
1334 }
1335
1336 return id;
1337}
1338
1339static int uvc_scan_chain(struct uvc_video_device *video)
1340{
1341 struct uvc_entity *entity, *prev;
1342 int id;
1343
1344 entity = video->oterm;
1345 uvc_trace(UVC_TRACE_PROBE, "Scanning UVC chain: OT %d", entity->id);
1346 id = entity->output.bSourceID;
1347 while (id != 0) {
1348 prev = entity;
1349 entity = uvc_entity_by_id(video->dev, id);
1350 if (entity == NULL) {
1351 uvc_trace(UVC_TRACE_DESCR, "Found reference to "
1352 "unknown entity %d.\n", id);
1353 return -1;
1354 }
1355
1356 /* Process entity */
1357 if (uvc_scan_chain_entity(video, entity) < 0)
1358 return -1;
1359
1360 /* Forward scan */
1361 if (uvc_scan_chain_forward(video, entity, prev) < 0)
1362 return -1;
1363
1364 /* Stop when a terminal is found. */
1365 if (!UVC_ENTITY_IS_UNIT(entity))
1366 break;
1367
1368 /* Backward scan */
1369 id = uvc_scan_chain_backward(video, entity);
1370 if (id < 0)
1371 return id;
1372 }
1373
1374 /* Initialize the video buffers queue. */
1375 uvc_queue_init(&video->queue);
1376
1377 return 0;
1378}
1379
1380/*
1381 * Register the video devices.
1382 *
1383 * The driver currently supports a single video device per control interface
1384 * only. The terminal and units must match the following structure:
1385 *
1386 * ITT_CAMERA -> VC_PROCESSING_UNIT -> VC_EXTENSION_UNIT{0,n} -> TT_STREAMING
1387 *
1388 * The Extension Units, if present, must have a single input pin. The
1389 * Processing Unit and Extension Units can be in any order. Additional
1390 * Extension Units connected to the main chain as single-unit branches are
1391 * also supported.
1392 */
1393static int uvc_register_video(struct uvc_device *dev)
1394{
1395 struct video_device *vdev;
1396 struct uvc_entity *term;
1397 int found = 0, ret;
1398
1399 /* Check if the control interface matches the structure we expect. */
1400 list_for_each_entry(term, &dev->entities, list) {
1401 struct uvc_streaming *streaming;
1402
1403 if (UVC_ENTITY_TYPE(term) != TT_STREAMING)
1404 continue;
1405
1406 memset(&dev->video, 0, sizeof dev->video);
1407 mutex_init(&dev->video.ctrl_mutex);
1408 INIT_LIST_HEAD(&dev->video.iterms);
1409 INIT_LIST_HEAD(&dev->video.extensions);
1410 dev->video.oterm = term;
1411 dev->video.dev = dev;
1412 if (uvc_scan_chain(&dev->video) < 0)
1413 continue;
1414
1415 list_for_each_entry(streaming, &dev->streaming, list) {
1416 if (streaming->header.bTerminalLink == term->id) {
1417 dev->video.streaming = streaming;
1418 found = 1;
1419 break;
1420 }
1421 }
1422
1423 if (found)
1424 break;
1425 }
1426
1427 if (!found) {
1428 uvc_printk(KERN_INFO, "No valid video chain found.\n");
1429 return -1;
1430 }
1431
1432 if (uvc_trace_param & UVC_TRACE_PROBE) {
1433 uvc_printk(KERN_INFO, "Found a valid video chain (");
1434 list_for_each_entry(term, &dev->video.iterms, chain) {
1435 printk("%d", term->id);
1436 if (term->chain.next != &dev->video.iterms)
1437 printk(",");
1438 }
1439 printk(" -> %d).\n", dev->video.oterm->id);
1440 }
1441
1442 /* Initialize the streaming interface with default streaming
1443 * parameters.
1444 */
1445 if ((ret = uvc_video_init(&dev->video)) < 0) {
1446 uvc_printk(KERN_ERR, "Failed to initialize the device "
1447 "(%d).\n", ret);
1448 return ret;
1449 }
1450
1451 /* Register the device with V4L. */
1452 vdev = video_device_alloc();
1453 if (vdev == NULL)
1454 return -1;
1455
1456 /* We already hold a reference to dev->udev. The video device will be
1457 * unregistered before the reference is released, so we don't need to
1458 * get another one.
1459 */
1460 vdev->dev = &dev->intf->dev;
1461 vdev->type = 0;
1462 vdev->type2 = 0;
1463 vdev->minor = -1;
1464 vdev->fops = &uvc_fops;
1465 vdev->release = video_device_release;
1466 strncpy(vdev->name, dev->name, sizeof vdev->name);
1467
1468 /* Set the driver data before calling video_register_device, otherwise
1469 * uvc_v4l2_open might race us.
1470 *
1471 * FIXME: usb_set_intfdata hasn't been called so far. Is that a
1472 * problem ? Does any function which could be called here get
1473 * a pointer to the usb_interface ?
1474 */
1475 dev->video.vdev = vdev;
1476 video_set_drvdata(vdev, &dev->video);
1477
1478 if (video_register_device(vdev, VFL_TYPE_GRABBER, -1) < 0) {
1479 dev->video.vdev = NULL;
1480 video_device_release(vdev);
1481 return -1;
1482 }
1483
1484 return 0;
1485}
1486
1487/*
1488 * Delete the UVC device.
1489 *
1490 * Called by the kernel when the last reference to the uvc_device structure
1491 * is released.
1492 *
1493 * Unregistering the video devices is done here because every opened instance
1494 * must be closed before the device can be unregistered. An alternative would
1495 * have been to use another reference count for uvc_v4l2_open/uvc_release, and
1496 * unregister the video devices on disconnect when that reference count drops
1497 * to zero.
1498 *
1499 * As this function is called after or during disconnect(), all URBs have
1500 * already been canceled by the USB core. There is no need to kill the
1501 * interrupt URB manually.
1502 */
1503void uvc_delete(struct kref *kref)
1504{
1505 struct uvc_device *dev = container_of(kref, struct uvc_device, kref);
1506 struct list_head *p, *n;
1507
1508 /* Unregister the video device */
1509 uvc_unregister_video(dev);
1510 usb_put_intf(dev->intf);
1511 usb_put_dev(dev->udev);
1512
1513 uvc_status_cleanup(dev);
1514 uvc_ctrl_cleanup_device(dev);
1515
1516 list_for_each_safe(p, n, &dev->entities) {
1517 struct uvc_entity *entity;
1518 entity = list_entry(p, struct uvc_entity, list);
1519 kfree(entity);
1520 }
1521
1522 list_for_each_safe(p, n, &dev->streaming) {
1523 struct uvc_streaming *streaming;
1524 streaming = list_entry(p, struct uvc_streaming, list);
1525 usb_driver_release_interface(&uvc_driver.driver,
1526 streaming->intf);
1527 usb_put_intf(streaming->intf);
1528 kfree(streaming->format);
1529 kfree(streaming->header.bmaControls);
1530 kfree(streaming);
1531 }
1532
1533 kfree(dev);
1534}
1535
1536static int uvc_probe(struct usb_interface *intf,
1537 const struct usb_device_id *id)
1538{
1539 struct usb_device *udev = interface_to_usbdev(intf);
1540 struct uvc_device *dev;
1541 int ret;
1542
1543 if (id->idVendor && id->idProduct)
1544 uvc_trace(UVC_TRACE_PROBE, "Probing known UVC device %s "
1545 "(%04x:%04x)\n", udev->devpath, id->idVendor,
1546 id->idProduct);
1547 else
1548 uvc_trace(UVC_TRACE_PROBE, "Probing generic UVC device %s\n",
1549 udev->devpath);
1550
1551 /* Allocate memory for the device and initialize it */
1552 if ((dev = kzalloc(sizeof *dev, GFP_KERNEL)) == NULL)
1553 return -ENOMEM;
1554
1555 INIT_LIST_HEAD(&dev->entities);
1556 INIT_LIST_HEAD(&dev->streaming);
1557 kref_init(&dev->kref);
1558
1559 dev->udev = usb_get_dev(udev);
1560 dev->intf = usb_get_intf(intf);
1561 dev->intfnum = intf->cur_altsetting->desc.bInterfaceNumber;
1562 dev->quirks = id->driver_info | uvc_quirks_param;
1563
1564 if (udev->product != NULL)
1565 strncpy(dev->name, udev->product, sizeof dev->name);
1566 else
1567 snprintf(dev->name, sizeof dev->name,
1568 "UVC Camera (%04x:%04x)",
1569 le16_to_cpu(udev->descriptor.idVendor),
1570 le16_to_cpu(udev->descriptor.idProduct));
1571
1572 /* Parse the Video Class control descriptor */
1573 if (uvc_parse_control(dev) < 0) {
1574 uvc_trace(UVC_TRACE_PROBE, "Unable to parse UVC "
1575 "descriptors.\n");
1576 goto error;
1577 }
1578
1579 uvc_printk(KERN_INFO, "Found UVC %u.%02u device %s (%04x:%04x)\n",
1580 dev->uvc_version >> 8, dev->uvc_version & 0xff,
1581 udev->product ? udev->product : "<unnamed>",
1582 le16_to_cpu(udev->descriptor.idVendor),
1583 le16_to_cpu(udev->descriptor.idProduct));
1584
1585 if (uvc_quirks_param != 0) {
1586 uvc_printk(KERN_INFO, "Forcing device quirks 0x%x by module "
1587 "parameter for testing purpose.\n", uvc_quirks_param);
1588 uvc_printk(KERN_INFO, "Please report required quirks to the "
1589 "linux-uvc-devel mailing list.\n");
1590 }
1591
1592 /* Initialize controls */
1593 if (uvc_ctrl_init_device(dev) < 0)
1594 goto error;
1595
1596 /* Register the video devices */
1597 if (uvc_register_video(dev) < 0)
1598 goto error;
1599
1600 /* Save our data pointer in the interface data */
1601 usb_set_intfdata(intf, dev);
1602
1603 /* Initialize the interrupt URB */
1604 if ((ret = uvc_status_init(dev)) < 0) {
1605 uvc_printk(KERN_INFO, "Unable to initialize the status "
1606 "endpoint (%d), status interrupt will not be "
1607 "supported.\n", ret);
1608 }
1609
1610 uvc_trace(UVC_TRACE_PROBE, "UVC device initialized.\n");
1611 return 0;
1612
1613error:
1614 kref_put(&dev->kref, uvc_delete);
1615 return -ENODEV;
1616}
1617
1618static void uvc_disconnect(struct usb_interface *intf)
1619{
1620 struct uvc_device *dev = usb_get_intfdata(intf);
1621
1622 /* Set the USB interface data to NULL. This can be done outside the
1623 * lock, as there's no other reader.
1624 */
1625 usb_set_intfdata(intf, NULL);
1626
1627 if (intf->cur_altsetting->desc.bInterfaceSubClass == SC_VIDEOSTREAMING)
1628 return;
1629
1630 /* uvc_v4l2_open() might race uvc_disconnect(). A static driver-wide
1631 * lock is needed to prevent uvc_disconnect from releasing its
1632 * reference to the uvc_device instance after uvc_v4l2_open() received
1633 * the pointer to the device (video_devdata) but before it got the
1634 * chance to increase the reference count (kref_get).
1635 */
1636 mutex_lock(&uvc_driver.open_mutex);
1637
1638 dev->state |= UVC_DEV_DISCONNECTED;
1639 kref_put(&dev->kref, uvc_delete);
1640
1641 mutex_unlock(&uvc_driver.open_mutex);
1642}
1643
1644static int uvc_suspend(struct usb_interface *intf, pm_message_t message)
1645{
1646 struct uvc_device *dev = usb_get_intfdata(intf);
1647
1648 uvc_trace(UVC_TRACE_SUSPEND, "Suspending interface %u\n",
1649 intf->cur_altsetting->desc.bInterfaceNumber);
1650
1651 /* Controls are cached on the fly so they don't need to be saved. */
1652 if (intf->cur_altsetting->desc.bInterfaceSubClass == SC_VIDEOCONTROL)
1653 return uvc_status_suspend(dev);
1654
1655 if (dev->video.streaming->intf != intf) {
1656 uvc_trace(UVC_TRACE_SUSPEND, "Suspend: video streaming USB "
1657 "interface mismatch.\n");
1658 return -EINVAL;
1659 }
1660
1661 return uvc_video_suspend(&dev->video);
1662}
1663
1664static int uvc_resume(struct usb_interface *intf)
1665{
1666 struct uvc_device *dev = usb_get_intfdata(intf);
1667 int ret;
1668
1669 uvc_trace(UVC_TRACE_SUSPEND, "Resuming interface %u\n",
1670 intf->cur_altsetting->desc.bInterfaceNumber);
1671
1672 if (intf->cur_altsetting->desc.bInterfaceSubClass == SC_VIDEOCONTROL) {
1673 if ((ret = uvc_ctrl_resume_device(dev)) < 0)
1674 return ret;
1675
1676 return uvc_status_resume(dev);
1677 }
1678
1679 if (dev->video.streaming->intf != intf) {
1680 uvc_trace(UVC_TRACE_SUSPEND, "Resume: video streaming USB "
1681 "interface mismatch.\n");
1682 return -EINVAL;
1683 }
1684
1685 return uvc_video_resume(&dev->video);
1686}
1687
1688/* ------------------------------------------------------------------------
1689 * Driver initialization and cleanup
1690 */
1691
1692/*
1693 * The Logitech cameras listed below have their interface class set to
1694 * VENDOR_SPEC because they don't announce themselves as UVC devices, even
1695 * though they are compliant.
1696 */
1697static struct usb_device_id uvc_ids[] = {
1698 /* ALi M5606 (Clevo M540SR) */
1699 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
1700 | USB_DEVICE_ID_MATCH_INT_INFO,
1701 .idVendor = 0x0402,
1702 .idProduct = 0x5606,
1703 .bInterfaceClass = USB_CLASS_VIDEO,
1704 .bInterfaceSubClass = 1,
1705 .bInterfaceProtocol = 0,
1706 .driver_info = UVC_QUIRK_PROBE_MINMAX },
1707 /* Creative Live! Optia */
1708 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
1709 | USB_DEVICE_ID_MATCH_INT_INFO,
1710 .idVendor = 0x041e,
1711 .idProduct = 0x4057,
1712 .bInterfaceClass = USB_CLASS_VIDEO,
1713 .bInterfaceSubClass = 1,
1714 .bInterfaceProtocol = 0,
1715 .driver_info = UVC_QUIRK_PROBE_MINMAX },
1716 /* Microsoft Lifecam NX-6000 */
1717 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
1718 | USB_DEVICE_ID_MATCH_INT_INFO,
1719 .idVendor = 0x045e,
1720 .idProduct = 0x00f8,
1721 .bInterfaceClass = USB_CLASS_VIDEO,
1722 .bInterfaceSubClass = 1,
1723 .bInterfaceProtocol = 0,
1724 .driver_info = UVC_QUIRK_PROBE_MINMAX },
1725 /* Microsoft Lifecam VX-7000 */
1726 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
1727 | USB_DEVICE_ID_MATCH_INT_INFO,
1728 .idVendor = 0x045e,
1729 .idProduct = 0x0723,
1730 .bInterfaceClass = USB_CLASS_VIDEO,
1731 .bInterfaceSubClass = 1,
1732 .bInterfaceProtocol = 0,
1733 .driver_info = UVC_QUIRK_PROBE_MINMAX },
1734 /* Logitech Quickcam Fusion */
1735 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
1736 | USB_DEVICE_ID_MATCH_INT_INFO,
1737 .idVendor = 0x046d,
1738 .idProduct = 0x08c1,
1739 .bInterfaceClass = USB_CLASS_VENDOR_SPEC,
1740 .bInterfaceSubClass = 1,
1741 .bInterfaceProtocol = 0 },
1742 /* Logitech Quickcam Orbit MP */
1743 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
1744 | USB_DEVICE_ID_MATCH_INT_INFO,
1745 .idVendor = 0x046d,
1746 .idProduct = 0x08c2,
1747 .bInterfaceClass = USB_CLASS_VENDOR_SPEC,
1748 .bInterfaceSubClass = 1,
1749 .bInterfaceProtocol = 0 },
1750 /* Logitech Quickcam Pro for Notebook */
1751 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
1752 | USB_DEVICE_ID_MATCH_INT_INFO,
1753 .idVendor = 0x046d,
1754 .idProduct = 0x08c3,
1755 .bInterfaceClass = USB_CLASS_VENDOR_SPEC,
1756 .bInterfaceSubClass = 1,
1757 .bInterfaceProtocol = 0 },
1758 /* Logitech Quickcam Pro 5000 */
1759 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
1760 | USB_DEVICE_ID_MATCH_INT_INFO,
1761 .idVendor = 0x046d,
1762 .idProduct = 0x08c5,
1763 .bInterfaceClass = USB_CLASS_VENDOR_SPEC,
1764 .bInterfaceSubClass = 1,
1765 .bInterfaceProtocol = 0 },
1766 /* Logitech Quickcam OEM Dell Notebook */
1767 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
1768 | USB_DEVICE_ID_MATCH_INT_INFO,
1769 .idVendor = 0x046d,
1770 .idProduct = 0x08c6,
1771 .bInterfaceClass = USB_CLASS_VENDOR_SPEC,
1772 .bInterfaceSubClass = 1,
1773 .bInterfaceProtocol = 0 },
1774 /* Logitech Quickcam OEM Cisco VT Camera II */
1775 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
1776 | USB_DEVICE_ID_MATCH_INT_INFO,
1777 .idVendor = 0x046d,
1778 .idProduct = 0x08c7,
1779 .bInterfaceClass = USB_CLASS_VENDOR_SPEC,
1780 .bInterfaceSubClass = 1,
1781 .bInterfaceProtocol = 0 },
1782 /* Apple Built-In iSight */
1783 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
1784 | USB_DEVICE_ID_MATCH_INT_INFO,
1785 .idVendor = 0x05ac,
1786 .idProduct = 0x8501,
1787 .bInterfaceClass = USB_CLASS_VIDEO,
1788 .bInterfaceSubClass = 1,
1789 .bInterfaceProtocol = 0,
1790 .driver_info = UVC_QUIRK_PROBE_MINMAX
1791 | UVC_QUIRK_BUILTIN_ISIGHT },
1792 /* Genesys Logic USB 2.0 PC Camera */
1793 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
1794 | USB_DEVICE_ID_MATCH_INT_INFO,
1795 .idVendor = 0x05e3,
1796 .idProduct = 0x0505,
1797 .bInterfaceClass = USB_CLASS_VIDEO,
1798 .bInterfaceSubClass = 1,
1799 .bInterfaceProtocol = 0,
1800 .driver_info = UVC_QUIRK_STREAM_NO_FID },
1801 /* Silicon Motion SM371 */
1802 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
1803 | USB_DEVICE_ID_MATCH_INT_INFO,
1804 .idVendor = 0x090c,
1805 .idProduct = 0xb371,
1806 .bInterfaceClass = USB_CLASS_VIDEO,
1807 .bInterfaceSubClass = 1,
1808 .bInterfaceProtocol = 0,
1809 .driver_info = UVC_QUIRK_PROBE_MINMAX },
1810 /* MT6227 */
1811 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
1812 | USB_DEVICE_ID_MATCH_INT_INFO,
1813 .idVendor = 0x0e8d,
1814 .idProduct = 0x0004,
1815 .bInterfaceClass = USB_CLASS_VIDEO,
1816 .bInterfaceSubClass = 1,
1817 .bInterfaceProtocol = 0,
1818 .driver_info = UVC_QUIRK_PROBE_MINMAX },
1819 /* Syntek (HP Spartan) */
1820 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
1821 | USB_DEVICE_ID_MATCH_INT_INFO,
1822 .idVendor = 0x174f,
1823 .idProduct = 0x5212,
1824 .bInterfaceClass = USB_CLASS_VIDEO,
1825 .bInterfaceSubClass = 1,
1826 .bInterfaceProtocol = 0,
1827 .driver_info = UVC_QUIRK_STREAM_NO_FID },
1828 /* Syntek (Asus U3S) */
1829 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
1830 | USB_DEVICE_ID_MATCH_INT_INFO,
1831 .idVendor = 0x174f,
1832 .idProduct = 0x8a33,
1833 .bInterfaceClass = USB_CLASS_VIDEO,
1834 .bInterfaceSubClass = 1,
1835 .bInterfaceProtocol = 0,
1836 .driver_info = UVC_QUIRK_STREAM_NO_FID },
1837 /* Ecamm Pico iMage */
1838 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
1839 | USB_DEVICE_ID_MATCH_INT_INFO,
1840 .idVendor = 0x18cd,
1841 .idProduct = 0xcafe,
1842 .bInterfaceClass = USB_CLASS_VIDEO,
1843 .bInterfaceSubClass = 1,
1844 .bInterfaceProtocol = 0,
1845 .driver_info = UVC_QUIRK_PROBE_EXTRAFIELDS },
1846 /* Bodelin ProScopeHR */
1847 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
1848 | USB_DEVICE_ID_MATCH_DEV_HI
1849 | USB_DEVICE_ID_MATCH_INT_INFO,
1850 .idVendor = 0x19ab,
1851 .idProduct = 0x1000,
1852 .bcdDevice_hi = 0x0126,
1853 .bInterfaceClass = USB_CLASS_VIDEO,
1854 .bInterfaceSubClass = 1,
1855 .bInterfaceProtocol = 0,
1856 .driver_info = UVC_QUIRK_STATUS_INTERVAL },
1857 /* SiGma Micro USB Web Camera */
1858 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
1859 | USB_DEVICE_ID_MATCH_INT_INFO,
1860 .idVendor = 0x1c4f,
1861 .idProduct = 0x3000,
1862 .bInterfaceClass = USB_CLASS_VIDEO,
1863 .bInterfaceSubClass = 1,
1864 .bInterfaceProtocol = 0,
1865 .driver_info = UVC_QUIRK_PROBE_MINMAX
1866 | UVC_QUIRK_IGNORE_SELECTOR_UNIT},
1867 /* Acer OEM Webcam - Unknown vendor */
1868 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
1869 | USB_DEVICE_ID_MATCH_INT_INFO,
1870 .idVendor = 0x5986,
1871 .idProduct = 0x0100,
1872 .bInterfaceClass = USB_CLASS_VIDEO,
1873 .bInterfaceSubClass = 1,
1874 .bInterfaceProtocol = 0,
1875 .driver_info = UVC_QUIRK_PROBE_MINMAX },
1876 /* Packard Bell OEM Webcam */
1877 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
1878 | USB_DEVICE_ID_MATCH_INT_INFO,
1879 .idVendor = 0x5986,
1880 .idProduct = 0x0101,
1881 .bInterfaceClass = USB_CLASS_VIDEO,
1882 .bInterfaceSubClass = 1,
1883 .bInterfaceProtocol = 0,
1884 .driver_info = UVC_QUIRK_PROBE_MINMAX },
1885 /* Acer Crystal Eye webcam */
1886 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
1887 | USB_DEVICE_ID_MATCH_INT_INFO,
1888 .idVendor = 0x5986,
1889 .idProduct = 0x0102,
1890 .bInterfaceClass = USB_CLASS_VIDEO,
1891 .bInterfaceSubClass = 1,
1892 .bInterfaceProtocol = 0,
1893 .driver_info = UVC_QUIRK_PROBE_MINMAX },
1894 /* Acer OrbiCam - Unknown vendor */
1895 { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
1896 | USB_DEVICE_ID_MATCH_INT_INFO,
1897 .idVendor = 0x5986,
1898 .idProduct = 0x0200,
1899 .bInterfaceClass = USB_CLASS_VIDEO,
1900 .bInterfaceSubClass = 1,
1901 .bInterfaceProtocol = 0,
1902 .driver_info = UVC_QUIRK_PROBE_MINMAX },
1903 /* Generic USB Video Class */
1904 { USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, 0) },
1905 {}
1906};
1907
1908MODULE_DEVICE_TABLE(usb, uvc_ids);
1909
1910struct uvc_driver uvc_driver = {
1911 .driver = {
1912 .name = "uvcvideo",
1913 .probe = uvc_probe,
1914 .disconnect = uvc_disconnect,
1915 .suspend = uvc_suspend,
1916 .resume = uvc_resume,
1917 .id_table = uvc_ids,
1918 .supports_autosuspend = 1,
1919 },
1920};
1921
1922static int __init uvc_init(void)
1923{
1924 int result;
1925
1926 INIT_LIST_HEAD(&uvc_driver.devices);
1927 INIT_LIST_HEAD(&uvc_driver.controls);
1928 mutex_init(&uvc_driver.open_mutex);
1929 mutex_init(&uvc_driver.ctrl_mutex);
1930
1931 uvc_ctrl_init();
1932
1933 result = usb_register(&uvc_driver.driver);
1934 if (result == 0)
1935 printk(KERN_INFO DRIVER_DESC " (" DRIVER_VERSION ")\n");
1936 return result;
1937}
1938
1939static void __exit uvc_cleanup(void)
1940{
1941 usb_deregister(&uvc_driver.driver);
1942}
1943
1944module_init(uvc_init);
1945module_exit(uvc_cleanup);
1946
1947module_param_named(quirks, uvc_quirks_param, uint, S_IRUGO|S_IWUSR);
1948MODULE_PARM_DESC(quirks, "Forced device quirks");
1949module_param_named(trace, uvc_trace_param, uint, S_IRUGO|S_IWUSR);
1950MODULE_PARM_DESC(trace, "Trace level bitmask");
1951
1952MODULE_AUTHOR(DRIVER_AUTHOR);
1953MODULE_DESCRIPTION(DRIVER_DESC);
1954MODULE_LICENSE("GPL");
1955MODULE_VERSION(DRIVER_VERSION);
diff --git a/drivers/media/video/uvc/uvc_isight.c b/drivers/media/video/uvc/uvc_isight.c
new file mode 100644
index 000000000000..37bdefdbead5
--- /dev/null
+++ b/drivers/media/video/uvc/uvc_isight.c
@@ -0,0 +1,134 @@
1/*
2 * uvc_isight.c -- USB Video Class driver - iSight support
3 *
4 * Copyright (C) 2006-2007
5 * Ivan N. Zlatev <contact@i-nz.net>
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
14#include <linux/usb.h>
15#include <linux/kernel.h>
16#include <linux/mm.h>
17
18#include "uvcvideo.h"
19
20/* Built-in iSight webcams implements most of UVC 1.0 except a
21 * different packet format. Instead of sending a header at the
22 * beginning of each isochronous transfer payload, the webcam sends a
23 * single header per image (on its own in a packet), followed by
24 * packets containing data only.
25 *
26 * Offset Size (bytes) Description
27 * ------------------------------------------------------------------
28 * 0x00 1 Header length
29 * 0x01 1 Flags (UVC-compliant)
30 * 0x02 4 Always equal to '11223344'
31 * 0x06 8 Always equal to 'deadbeefdeadface'
32 * 0x0e 16 Unknown
33 *
34 * The header can be prefixed by an optional, unknown-purpose byte.
35 */
36
37static int isight_decode(struct uvc_video_queue *queue, struct uvc_buffer *buf,
38 const __u8 *data, unsigned int len)
39{
40 static const __u8 hdr[] = {
41 0x11, 0x22, 0x33, 0x44,
42 0xde, 0xad, 0xbe, 0xef,
43 0xde, 0xad, 0xfa, 0xce
44 };
45
46 unsigned int maxlen, nbytes;
47 __u8 *mem;
48 int is_header = 0;
49
50 if (buf == NULL)
51 return 0;
52
53 if ((len >= 14 && memcmp(&data[2], hdr, 12) == 0) ||
54 (len >= 15 && memcmp(&data[3], hdr, 12) == 0)) {
55 uvc_trace(UVC_TRACE_FRAME, "iSight header found\n");
56 is_header = 1;
57 }
58
59 /* Synchronize to the input stream by waiting for a header packet. */
60 if (buf->state != UVC_BUF_STATE_ACTIVE) {
61 if (!is_header) {
62 uvc_trace(UVC_TRACE_FRAME, "Dropping packet (out of "
63 "sync).\n");
64 return 0;
65 }
66
67 buf->state = UVC_BUF_STATE_ACTIVE;
68 }
69
70 /* Mark the buffer as done if we're at the beginning of a new frame.
71 *
72 * Empty buffers (bytesused == 0) don't trigger end of frame detection
73 * as it doesn't make sense to return an empty buffer.
74 */
75 if (is_header && buf->buf.bytesused != 0) {
76 buf->state = UVC_BUF_STATE_DONE;
77 return -EAGAIN;
78 }
79
80 /* Copy the video data to the buffer. Skip header packets, as they
81 * contain no data.
82 */
83 if (!is_header) {
84 maxlen = buf->buf.length - buf->buf.bytesused;
85 mem = queue->mem + buf->buf.m.offset + buf->buf.bytesused;
86 nbytes = min(len, maxlen);
87 memcpy(mem, data, nbytes);
88 buf->buf.bytesused += nbytes;
89
90 if (len > maxlen || buf->buf.bytesused == buf->buf.length) {
91 uvc_trace(UVC_TRACE_FRAME, "Frame complete "
92 "(overflow).\n");
93 buf->state = UVC_BUF_STATE_DONE;
94 }
95 }
96
97 return 0;
98}
99
100void uvc_video_decode_isight(struct urb *urb, struct uvc_video_device *video,
101 struct uvc_buffer *buf)
102{
103 int ret, i;
104
105 for (i = 0; i < urb->number_of_packets; ++i) {
106 if (urb->iso_frame_desc[i].status < 0) {
107 uvc_trace(UVC_TRACE_FRAME, "USB isochronous frame "
108 "lost (%d).\n",
109 urb->iso_frame_desc[i].status);
110 }
111
112 /* Decode the payload packet.
113 * uvc_video_decode is entered twice when a frame transition
114 * has been detected because the end of frame can only be
115 * reliably detected when the first packet of the new frame
116 * is processed. The first pass detects the transition and
117 * closes the previous frame's buffer, the second pass
118 * processes the data of the first payload of the new frame.
119 */
120 do {
121 ret = isight_decode(&video->queue, buf,
122 urb->transfer_buffer +
123 urb->iso_frame_desc[i].offset,
124 urb->iso_frame_desc[i].actual_length);
125
126 if (buf == NULL)
127 break;
128
129 if (buf->state == UVC_BUF_STATE_DONE ||
130 buf->state == UVC_BUF_STATE_ERROR)
131 buf = uvc_queue_next_buffer(&video->queue, buf);
132 } while (ret == -EAGAIN);
133 }
134}
diff --git a/drivers/media/video/uvc/uvc_queue.c b/drivers/media/video/uvc/uvc_queue.c
new file mode 100644
index 000000000000..0923f0e3b3d4
--- /dev/null
+++ b/drivers/media/video/uvc/uvc_queue.c
@@ -0,0 +1,477 @@
1/*
2 * uvc_queue.c -- USB Video Class driver - Buffers management
3 *
4 * Copyright (C) 2005-2008
5 * Laurent Pinchart (laurent.pinchart@skynet.be)
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
14#include <linux/kernel.h>
15#include <linux/version.h>
16#include <linux/list.h>
17#include <linux/module.h>
18#include <linux/usb.h>
19#include <linux/videodev2.h>
20#include <linux/vmalloc.h>
21#include <linux/wait.h>
22#include <asm/atomic.h>
23
24#include "uvcvideo.h"
25
26/* ------------------------------------------------------------------------
27 * Video buffers queue management.
28 *
29 * Video queues is initialized by uvc_queue_init(). The function performs
30 * basic initialization of the uvc_video_queue struct and never fails.
31 *
32 * Video buffer allocation and freeing are performed by uvc_alloc_buffers and
33 * uvc_free_buffers respectively. The former acquires the video queue lock,
34 * while the later must be called with the lock held (so that allocation can
35 * free previously allocated buffers). Trying to free buffers that are mapped
36 * to user space will return -EBUSY.
37 *
38 * Video buffers are managed using two queues. However, unlike most USB video
39 * drivers which use an in queue and an out queue, we use a main queue which
40 * holds all queued buffers (both 'empty' and 'done' buffers), and an irq
41 * queue which holds empty buffers. This design (copied from video-buf)
42 * minimizes locking in interrupt, as only one queue is shared between
43 * interrupt and user contexts.
44 *
45 * Use cases
46 * ---------
47 *
48 * Unless stated otherwise, all operations which modify the irq buffers queue
49 * are protected by the irq spinlock.
50 *
51 * 1. The user queues the buffers, starts streaming and dequeues a buffer.
52 *
53 * The buffers are added to the main and irq queues. Both operations are
54 * protected by the queue lock, and the latert is protected by the irq
55 * spinlock as well.
56 *
57 * The completion handler fetches a buffer from the irq queue and fills it
58 * with video data. If no buffer is available (irq queue empty), the handler
59 * returns immediately.
60 *
61 * When the buffer is full, the completion handler removes it from the irq
62 * queue, marks it as ready (UVC_BUF_STATE_DONE) and wake its wait queue.
63 * At that point, any process waiting on the buffer will be woken up. If a
64 * process tries to dequeue a buffer after it has been marked ready, the
65 * dequeing will succeed immediately.
66 *
67 * 2. Buffers are queued, user is waiting on a buffer and the device gets
68 * disconnected.
69 *
70 * When the device is disconnected, the kernel calls the completion handler
71 * with an appropriate status code. The handler marks all buffers in the
72 * irq queue as being erroneous (UVC_BUF_STATE_ERROR) and wakes them up so
73 * that any process waiting on a buffer gets woken up.
74 *
75 * Waking up up the first buffer on the irq list is not enough, as the
76 * process waiting on the buffer might restart the dequeue operation
77 * immediately.
78 *
79 */
80
81void uvc_queue_init(struct uvc_video_queue *queue)
82{
83 mutex_init(&queue->mutex);
84 spin_lock_init(&queue->irqlock);
85 INIT_LIST_HEAD(&queue->mainqueue);
86 INIT_LIST_HEAD(&queue->irqqueue);
87}
88
89/*
90 * Allocate the video buffers.
91 *
92 * Pages are reserved to make sure they will not be swaped, as they will be
93 * filled in URB completion handler.
94 *
95 * Buffers will be individually mapped, so they must all be page aligned.
96 */
97int uvc_alloc_buffers(struct uvc_video_queue *queue, unsigned int nbuffers,
98 unsigned int buflength)
99{
100 unsigned int bufsize = PAGE_ALIGN(buflength);
101 unsigned int i;
102 void *mem = NULL;
103 int ret;
104
105 if (nbuffers > UVC_MAX_VIDEO_BUFFERS)
106 nbuffers = UVC_MAX_VIDEO_BUFFERS;
107
108 mutex_lock(&queue->mutex);
109
110 if ((ret = uvc_free_buffers(queue)) < 0)
111 goto done;
112
113 /* Bail out if no buffers should be allocated. */
114 if (nbuffers == 0)
115 goto done;
116
117 /* Decrement the number of buffers until allocation succeeds. */
118 for (; nbuffers > 0; --nbuffers) {
119 mem = vmalloc_32(nbuffers * bufsize);
120 if (mem != NULL)
121 break;
122 }
123
124 if (mem == NULL) {
125 ret = -ENOMEM;
126 goto done;
127 }
128
129 for (i = 0; i < nbuffers; ++i) {
130 memset(&queue->buffer[i], 0, sizeof queue->buffer[i]);
131 queue->buffer[i].buf.index = i;
132 queue->buffer[i].buf.m.offset = i * bufsize;
133 queue->buffer[i].buf.length = buflength;
134 queue->buffer[i].buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
135 queue->buffer[i].buf.sequence = 0;
136 queue->buffer[i].buf.field = V4L2_FIELD_NONE;
137 queue->buffer[i].buf.memory = V4L2_MEMORY_MMAP;
138 queue->buffer[i].buf.flags = 0;
139 init_waitqueue_head(&queue->buffer[i].wait);
140 }
141
142 queue->mem = mem;
143 queue->count = nbuffers;
144 queue->buf_size = bufsize;
145 ret = nbuffers;
146
147done:
148 mutex_unlock(&queue->mutex);
149 return ret;
150}
151
152/*
153 * Free the video buffers.
154 *
155 * This function must be called with the queue lock held.
156 */
157int uvc_free_buffers(struct uvc_video_queue *queue)
158{
159 unsigned int i;
160
161 for (i = 0; i < queue->count; ++i) {
162 if (queue->buffer[i].vma_use_count != 0)
163 return -EBUSY;
164 }
165
166 if (queue->count) {
167 vfree(queue->mem);
168 queue->count = 0;
169 }
170
171 return 0;
172}
173
174static void __uvc_query_buffer(struct uvc_buffer *buf,
175 struct v4l2_buffer *v4l2_buf)
176{
177 memcpy(v4l2_buf, &buf->buf, sizeof *v4l2_buf);
178
179 if (buf->vma_use_count)
180 v4l2_buf->flags |= V4L2_BUF_FLAG_MAPPED;
181
182 switch (buf->state) {
183 case UVC_BUF_STATE_ERROR:
184 case UVC_BUF_STATE_DONE:
185 v4l2_buf->flags |= V4L2_BUF_FLAG_DONE;
186 break;
187 case UVC_BUF_STATE_QUEUED:
188 case UVC_BUF_STATE_ACTIVE:
189 v4l2_buf->flags |= V4L2_BUF_FLAG_QUEUED;
190 break;
191 case UVC_BUF_STATE_IDLE:
192 default:
193 break;
194 }
195}
196
197int uvc_query_buffer(struct uvc_video_queue *queue,
198 struct v4l2_buffer *v4l2_buf)
199{
200 int ret = 0;
201
202 mutex_lock(&queue->mutex);
203 if (v4l2_buf->index >= queue->count) {
204 ret = -EINVAL;
205 goto done;
206 }
207
208 __uvc_query_buffer(&queue->buffer[v4l2_buf->index], v4l2_buf);
209
210done:
211 mutex_unlock(&queue->mutex);
212 return ret;
213}
214
215/*
216 * Queue a video buffer. Attempting to queue a buffer that has already been
217 * queued will return -EINVAL.
218 */
219int uvc_queue_buffer(struct uvc_video_queue *queue,
220 struct v4l2_buffer *v4l2_buf)
221{
222 struct uvc_buffer *buf;
223 unsigned long flags;
224 int ret = 0;
225
226 uvc_trace(UVC_TRACE_CAPTURE, "Queuing buffer %u.\n", v4l2_buf->index);
227
228 if (v4l2_buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE ||
229 v4l2_buf->memory != V4L2_MEMORY_MMAP) {
230 uvc_trace(UVC_TRACE_CAPTURE, "[E] Invalid buffer type (%u) "
231 "and/or memory (%u).\n", v4l2_buf->type,
232 v4l2_buf->memory);
233 return -EINVAL;
234 }
235
236 mutex_lock(&queue->mutex);
237 if (v4l2_buf->index >= queue->count) {
238 uvc_trace(UVC_TRACE_CAPTURE, "[E] Out of range index.\n");
239 ret = -EINVAL;
240 goto done;
241 }
242
243 buf = &queue->buffer[v4l2_buf->index];
244 if (buf->state != UVC_BUF_STATE_IDLE) {
245 uvc_trace(UVC_TRACE_CAPTURE, "[E] Invalid buffer state "
246 "(%u).\n", buf->state);
247 ret = -EINVAL;
248 goto done;
249 }
250
251 spin_lock_irqsave(&queue->irqlock, flags);
252 if (queue->flags & UVC_QUEUE_DISCONNECTED) {
253 spin_unlock_irqrestore(&queue->irqlock, flags);
254 ret = -ENODEV;
255 goto done;
256 }
257 buf->state = UVC_BUF_STATE_QUEUED;
258 buf->buf.bytesused = 0;
259 list_add_tail(&buf->stream, &queue->mainqueue);
260 list_add_tail(&buf->queue, &queue->irqqueue);
261 spin_unlock_irqrestore(&queue->irqlock, flags);
262
263done:
264 mutex_unlock(&queue->mutex);
265 return ret;
266}
267
268static int uvc_queue_waiton(struct uvc_buffer *buf, int nonblocking)
269{
270 if (nonblocking) {
271 return (buf->state != UVC_BUF_STATE_QUEUED &&
272 buf->state != UVC_BUF_STATE_ACTIVE)
273 ? 0 : -EAGAIN;
274 }
275
276 return wait_event_interruptible(buf->wait,
277 buf->state != UVC_BUF_STATE_QUEUED &&
278 buf->state != UVC_BUF_STATE_ACTIVE);
279}
280
281/*
282 * Dequeue a video buffer. If nonblocking is false, block until a buffer is
283 * available.
284 */
285int uvc_dequeue_buffer(struct uvc_video_queue *queue,
286 struct v4l2_buffer *v4l2_buf, int nonblocking)
287{
288 struct uvc_buffer *buf;
289 int ret = 0;
290
291 if (v4l2_buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE ||
292 v4l2_buf->memory != V4L2_MEMORY_MMAP) {
293 uvc_trace(UVC_TRACE_CAPTURE, "[E] Invalid buffer type (%u) "
294 "and/or memory (%u).\n", v4l2_buf->type,
295 v4l2_buf->memory);
296 return -EINVAL;
297 }
298
299 mutex_lock(&queue->mutex);
300 if (list_empty(&queue->mainqueue)) {
301 uvc_trace(UVC_TRACE_CAPTURE, "[E] Empty buffer queue.\n");
302 ret = -EINVAL;
303 goto done;
304 }
305
306 buf = list_first_entry(&queue->mainqueue, struct uvc_buffer, stream);
307 if ((ret = uvc_queue_waiton(buf, nonblocking)) < 0)
308 goto done;
309
310 uvc_trace(UVC_TRACE_CAPTURE, "Dequeuing buffer %u (%u, %u bytes).\n",
311 buf->buf.index, buf->state, buf->buf.bytesused);
312
313 switch (buf->state) {
314 case UVC_BUF_STATE_ERROR:
315 uvc_trace(UVC_TRACE_CAPTURE, "[W] Corrupted data "
316 "(transmission error).\n");
317 ret = -EIO;
318 case UVC_BUF_STATE_DONE:
319 buf->state = UVC_BUF_STATE_IDLE;
320 break;
321
322 case UVC_BUF_STATE_IDLE:
323 case UVC_BUF_STATE_QUEUED:
324 case UVC_BUF_STATE_ACTIVE:
325 default:
326 uvc_trace(UVC_TRACE_CAPTURE, "[E] Invalid buffer state %u "
327 "(driver bug?).\n", buf->state);
328 ret = -EINVAL;
329 goto done;
330 }
331
332 list_del(&buf->stream);
333 __uvc_query_buffer(buf, v4l2_buf);
334
335done:
336 mutex_unlock(&queue->mutex);
337 return ret;
338}
339
340/*
341 * Poll the video queue.
342 *
343 * This function implements video queue polling and is intended to be used by
344 * the device poll handler.
345 */
346unsigned int uvc_queue_poll(struct uvc_video_queue *queue, struct file *file,
347 poll_table *wait)
348{
349 struct uvc_buffer *buf;
350 unsigned int mask = 0;
351
352 mutex_lock(&queue->mutex);
353 if (list_empty(&queue->mainqueue)) {
354 mask |= POLLERR;
355 goto done;
356 }
357 buf = list_first_entry(&queue->mainqueue, struct uvc_buffer, stream);
358
359 poll_wait(file, &buf->wait, wait);
360 if (buf->state == UVC_BUF_STATE_DONE ||
361 buf->state == UVC_BUF_STATE_ERROR)
362 mask |= POLLIN | POLLRDNORM;
363
364done:
365 mutex_unlock(&queue->mutex);
366 return mask;
367}
368
369/*
370 * Enable or disable the video buffers queue.
371 *
372 * The queue must be enabled before starting video acquisition and must be
373 * disabled after stopping it. This ensures that the video buffers queue
374 * state can be properly initialized before buffers are accessed from the
375 * interrupt handler.
376 *
377 * Enabling the video queue initializes parameters (such as sequence number,
378 * sync pattern, ...). If the queue is already enabled, return -EBUSY.
379 *
380 * Disabling the video queue cancels the queue and removes all buffers from
381 * the main queue.
382 *
383 * This function can't be called from interrupt context. Use
384 * uvc_queue_cancel() instead.
385 */
386int uvc_queue_enable(struct uvc_video_queue *queue, int enable)
387{
388 unsigned int i;
389 int ret = 0;
390
391 mutex_lock(&queue->mutex);
392 if (enable) {
393 if (uvc_queue_streaming(queue)) {
394 ret = -EBUSY;
395 goto done;
396 }
397 queue->sequence = 0;
398 queue->flags |= UVC_QUEUE_STREAMING;
399 } else {
400 uvc_queue_cancel(queue, 0);
401 INIT_LIST_HEAD(&queue->mainqueue);
402
403 for (i = 0; i < queue->count; ++i)
404 queue->buffer[i].state = UVC_BUF_STATE_IDLE;
405
406 queue->flags &= ~UVC_QUEUE_STREAMING;
407 }
408
409done:
410 mutex_unlock(&queue->mutex);
411 return ret;
412}
413
414/*
415 * Cancel the video buffers queue.
416 *
417 * Cancelling the queue marks all buffers on the irq queue as erroneous,
418 * wakes them up and remove them from the queue.
419 *
420 * If the disconnect parameter is set, further calls to uvc_queue_buffer will
421 * fail with -ENODEV.
422 *
423 * This function acquires the irq spinlock and can be called from interrupt
424 * context.
425 */
426void uvc_queue_cancel(struct uvc_video_queue *queue, int disconnect)
427{
428 struct uvc_buffer *buf;
429 unsigned long flags;
430
431 spin_lock_irqsave(&queue->irqlock, flags);
432 while (!list_empty(&queue->irqqueue)) {
433 buf = list_first_entry(&queue->irqqueue, struct uvc_buffer,
434 queue);
435 list_del(&buf->queue);
436 buf->state = UVC_BUF_STATE_ERROR;
437 wake_up(&buf->wait);
438 }
439 /* This must be protected by the irqlock spinlock to avoid race
440 * conditions between uvc_queue_buffer and the disconnection event that
441 * could result in an interruptible wait in uvc_dequeue_buffer. Do not
442 * blindly replace this logic by checking for the UVC_DEV_DISCONNECTED
443 * state outside the queue code.
444 */
445 if (disconnect)
446 queue->flags |= UVC_QUEUE_DISCONNECTED;
447 spin_unlock_irqrestore(&queue->irqlock, flags);
448}
449
450struct uvc_buffer *uvc_queue_next_buffer(struct uvc_video_queue *queue,
451 struct uvc_buffer *buf)
452{
453 struct uvc_buffer *nextbuf;
454 unsigned long flags;
455
456 if ((queue->flags & UVC_QUEUE_DROP_INCOMPLETE) &&
457 buf->buf.length != buf->buf.bytesused) {
458 buf->state = UVC_BUF_STATE_QUEUED;
459 buf->buf.bytesused = 0;
460 return buf;
461 }
462
463 spin_lock_irqsave(&queue->irqlock, flags);
464 list_del(&buf->queue);
465 if (!list_empty(&queue->irqqueue))
466 nextbuf = list_first_entry(&queue->irqqueue, struct uvc_buffer,
467 queue);
468 else
469 nextbuf = NULL;
470 spin_unlock_irqrestore(&queue->irqlock, flags);
471
472 buf->buf.sequence = queue->sequence++;
473 do_gettimeofday(&buf->buf.timestamp);
474
475 wake_up(&buf->wait);
476 return nextbuf;
477}
diff --git a/drivers/media/video/uvc/uvc_status.c b/drivers/media/video/uvc/uvc_status.c
new file mode 100644
index 000000000000..be9084e5eace
--- /dev/null
+++ b/drivers/media/video/uvc/uvc_status.c
@@ -0,0 +1,207 @@
1/*
2 * uvc_status.c -- USB Video Class driver - Status endpoint
3 *
4 * Copyright (C) 2007-2008
5 * Laurent Pinchart (laurent.pinchart@skynet.be)
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
14#include <linux/kernel.h>
15#include <linux/version.h>
16#include <linux/input.h>
17#include <linux/usb.h>
18#include <linux/usb/input.h>
19
20#include "uvcvideo.h"
21
22/* --------------------------------------------------------------------------
23 * Input device
24 */
25static int uvc_input_init(struct uvc_device *dev)
26{
27 struct usb_device *udev = dev->udev;
28 struct input_dev *input;
29 char *phys = NULL;
30 int ret;
31
32 input = input_allocate_device();
33 if (input == NULL)
34 return -ENOMEM;
35
36 phys = kmalloc(6 + strlen(udev->bus->bus_name) + strlen(udev->devpath),
37 GFP_KERNEL);
38 if (phys == NULL) {
39 ret = -ENOMEM;
40 goto error;
41 }
42 sprintf(phys, "usb-%s-%s", udev->bus->bus_name, udev->devpath);
43
44 input->name = dev->name;
45 input->phys = phys;
46 usb_to_input_id(udev, &input->id);
47 input->dev.parent = &dev->intf->dev;
48
49 set_bit(EV_KEY, input->evbit);
50 set_bit(BTN_0, input->keybit);
51
52 if ((ret = input_register_device(input)) < 0)
53 goto error;
54
55 dev->input = input;
56 return 0;
57
58error:
59 input_free_device(input);
60 kfree(phys);
61 return ret;
62}
63
64static void uvc_input_cleanup(struct uvc_device *dev)
65{
66 if (dev->input)
67 input_unregister_device(dev->input);
68}
69
70/* --------------------------------------------------------------------------
71 * Status interrupt endpoint
72 */
73static void uvc_event_streaming(struct uvc_device *dev, __u8 *data, int len)
74{
75 if (len < 3) {
76 uvc_trace(UVC_TRACE_STATUS, "Invalid streaming status event "
77 "received.\n");
78 return;
79 }
80
81 if (data[2] == 0) {
82 if (len < 4)
83 return;
84 uvc_trace(UVC_TRACE_STATUS, "Button (intf %u) %s len %d\n",
85 data[1], data[3] ? "pressed" : "released", len);
86 if (dev->input)
87 input_report_key(dev->input, BTN_0, data[3]);
88 } else {
89 uvc_trace(UVC_TRACE_STATUS, "Stream %u error event %02x %02x "
90 "len %d.\n", data[1], data[2], data[3], len);
91 }
92}
93
94static void uvc_event_control(struct uvc_device *dev, __u8 *data, int len)
95{
96 char *attrs[3] = { "value", "info", "failure" };
97
98 if (len < 6 || data[2] != 0 || data[4] > 2) {
99 uvc_trace(UVC_TRACE_STATUS, "Invalid control status event "
100 "received.\n");
101 return;
102 }
103
104 uvc_trace(UVC_TRACE_STATUS, "Control %u/%u %s change len %d.\n",
105 data[1], data[3], attrs[data[4]], len);
106}
107
108static void uvc_status_complete(struct urb *urb)
109{
110 struct uvc_device *dev = urb->context;
111 int len, ret;
112
113 switch (urb->status) {
114 case 0:
115 break;
116
117 case -ENOENT: /* usb_kill_urb() called. */
118 case -ECONNRESET: /* usb_unlink_urb() called. */
119 case -ESHUTDOWN: /* The endpoint is being disabled. */
120 case -EPROTO: /* Device is disconnected (reported by some
121 * host controller). */
122 return;
123
124 default:
125 uvc_printk(KERN_WARNING, "Non-zero status (%d) in status "
126 "completion handler.\n", urb->status);
127 return;
128 }
129
130 len = urb->actual_length;
131 if (len > 0) {
132 switch (dev->status[0] & 0x0f) {
133 case UVC_STATUS_TYPE_CONTROL:
134 uvc_event_control(dev, dev->status, len);
135 break;
136
137 case UVC_STATUS_TYPE_STREAMING:
138 uvc_event_streaming(dev, dev->status, len);
139 break;
140
141 default:
142 uvc_printk(KERN_INFO, "unknown event type %u.\n",
143 dev->status[0]);
144 break;
145 }
146 }
147
148 /* Resubmit the URB. */
149 urb->interval = dev->int_ep->desc.bInterval;
150 if ((ret = usb_submit_urb(urb, GFP_ATOMIC)) < 0) {
151 uvc_printk(KERN_ERR, "Failed to resubmit status URB (%d).\n",
152 ret);
153 }
154}
155
156int uvc_status_init(struct uvc_device *dev)
157{
158 struct usb_host_endpoint *ep = dev->int_ep;
159 unsigned int pipe;
160 int interval;
161
162 if (ep == NULL)
163 return 0;
164
165 uvc_input_init(dev);
166
167 dev->int_urb = usb_alloc_urb(0, GFP_KERNEL);
168 if (dev->int_urb == NULL)
169 return -ENOMEM;
170
171 pipe = usb_rcvintpipe(dev->udev, ep->desc.bEndpointAddress);
172
173 /* For high-speed interrupt endpoints, the bInterval value is used as
174 * an exponent of two. Some developers forgot about it.
175 */
176 interval = ep->desc.bInterval;
177 if (interval > 16 && dev->udev->speed == USB_SPEED_HIGH &&
178 (dev->quirks & UVC_QUIRK_STATUS_INTERVAL))
179 interval = fls(interval) - 1;
180
181 usb_fill_int_urb(dev->int_urb, dev->udev, pipe,
182 dev->status, sizeof dev->status, uvc_status_complete,
183 dev, interval);
184
185 return usb_submit_urb(dev->int_urb, GFP_KERNEL);
186}
187
188void uvc_status_cleanup(struct uvc_device *dev)
189{
190 usb_kill_urb(dev->int_urb);
191 usb_free_urb(dev->int_urb);
192 uvc_input_cleanup(dev);
193}
194
195int uvc_status_suspend(struct uvc_device *dev)
196{
197 usb_kill_urb(dev->int_urb);
198 return 0;
199}
200
201int uvc_status_resume(struct uvc_device *dev)
202{
203 if (dev->int_urb == NULL)
204 return 0;
205
206 return usb_submit_urb(dev->int_urb, GFP_KERNEL);
207}
diff --git a/drivers/media/video/uvc/uvc_v4l2.c b/drivers/media/video/uvc/uvc_v4l2.c
new file mode 100644
index 000000000000..2e0a66575bb4
--- /dev/null
+++ b/drivers/media/video/uvc/uvc_v4l2.c
@@ -0,0 +1,1105 @@
1/*
2 * uvc_v4l2.c -- USB Video Class driver - V4L2 API
3 *
4 * Copyright (C) 2005-2008
5 * Laurent Pinchart (laurent.pinchart@skynet.be)
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
14#include <linux/kernel.h>
15#include <linux/version.h>
16#include <linux/list.h>
17#include <linux/module.h>
18#include <linux/usb.h>
19#include <linux/videodev2.h>
20#include <linux/vmalloc.h>
21#include <linux/mm.h>
22#include <linux/wait.h>
23#include <asm/atomic.h>
24
25#include <media/v4l2-common.h>
26
27#include "uvcvideo.h"
28
29/* ------------------------------------------------------------------------
30 * V4L2 interface
31 */
32
33/*
34 * Mapping V4L2 controls to UVC controls can be straighforward if done well.
35 * Most of the UVC controls exist in V4L2, and can be mapped directly. Some
36 * must be grouped (for instance the Red Balance, Blue Balance and Do White
37 * Balance V4L2 controls use the White Balance Component UVC control) or
38 * otherwise translated. The approach we take here is to use a translation
39 * table for the controls which can be mapped directly, and handle the others
40 * manually.
41 */
42static int uvc_v4l2_query_menu(struct uvc_video_device *video,
43 struct v4l2_querymenu *query_menu)
44{
45 struct uvc_menu_info *menu_info;
46 struct uvc_control_mapping *mapping;
47 struct uvc_control *ctrl;
48
49 ctrl = uvc_find_control(video, query_menu->id, &mapping);
50 if (ctrl == NULL || mapping->v4l2_type != V4L2_CTRL_TYPE_MENU)
51 return -EINVAL;
52
53 if (query_menu->index >= mapping->menu_count)
54 return -EINVAL;
55
56 menu_info = &mapping->menu_info[query_menu->index];
57 strncpy(query_menu->name, menu_info->name, 32);
58 return 0;
59}
60
61/*
62 * Find the frame interval closest to the requested frame interval for the
63 * given frame format and size. This should be done by the device as part of
64 * the Video Probe and Commit negotiation, but some hardware don't implement
65 * that feature.
66 */
67static __u32 uvc_try_frame_interval(struct uvc_frame *frame, __u32 interval)
68{
69 unsigned int i;
70
71 if (frame->bFrameIntervalType) {
72 __u32 best = -1, dist;
73
74 for (i = 0; i < frame->bFrameIntervalType; ++i) {
75 dist = interval > frame->dwFrameInterval[i]
76 ? interval - frame->dwFrameInterval[i]
77 : frame->dwFrameInterval[i] - interval;
78
79 if (dist > best)
80 break;
81
82 best = dist;
83 }
84
85 interval = frame->dwFrameInterval[i-1];
86 } else {
87 const __u32 min = frame->dwFrameInterval[0];
88 const __u32 max = frame->dwFrameInterval[1];
89 const __u32 step = frame->dwFrameInterval[2];
90
91 interval = min + (interval - min + step/2) / step * step;
92 if (interval > max)
93 interval = max;
94 }
95
96 return interval;
97}
98
99static int uvc_v4l2_try_format(struct uvc_video_device *video,
100 struct v4l2_format *fmt, struct uvc_streaming_control *probe,
101 struct uvc_format **uvc_format, struct uvc_frame **uvc_frame)
102{
103 struct uvc_format *format = NULL;
104 struct uvc_frame *frame = NULL;
105 __u16 rw, rh;
106 unsigned int d, maxd;
107 unsigned int i;
108 __u32 interval;
109 int ret = 0;
110 __u8 *fcc;
111
112 if (fmt->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
113 return -EINVAL;
114
115 fcc = (__u8 *)&fmt->fmt.pix.pixelformat;
116 uvc_trace(UVC_TRACE_FORMAT, "Trying format 0x%08x (%c%c%c%c): %ux%u.\n",
117 fmt->fmt.pix.pixelformat,
118 fcc[0], fcc[1], fcc[2], fcc[3],
119 fmt->fmt.pix.width, fmt->fmt.pix.height);
120
121 /* Check if the hardware supports the requested format. */
122 for (i = 0; i < video->streaming->nformats; ++i) {
123 format = &video->streaming->format[i];
124 if (format->fcc == fmt->fmt.pix.pixelformat)
125 break;
126 }
127
128 if (format == NULL || format->fcc != fmt->fmt.pix.pixelformat) {
129 uvc_trace(UVC_TRACE_FORMAT, "Unsupported format 0x%08x.\n",
130 fmt->fmt.pix.pixelformat);
131 return -EINVAL;
132 }
133
134 /* Find the closest image size. The distance between image sizes is
135 * the size in pixels of the non-overlapping regions between the
136 * requested size and the frame-specified size.
137 */
138 rw = fmt->fmt.pix.width;
139 rh = fmt->fmt.pix.height;
140 maxd = (unsigned int)-1;
141
142 for (i = 0; i < format->nframes; ++i) {
143 __u16 w = format->frame[i].wWidth;
144 __u16 h = format->frame[i].wHeight;
145
146 d = min(w, rw) * min(h, rh);
147 d = w*h + rw*rh - 2*d;
148 if (d < maxd) {
149 maxd = d;
150 frame = &format->frame[i];
151 }
152
153 if (maxd == 0)
154 break;
155 }
156
157 if (frame == NULL) {
158 uvc_trace(UVC_TRACE_FORMAT, "Unsupported size %ux%u.\n",
159 fmt->fmt.pix.width, fmt->fmt.pix.height);
160 return -EINVAL;
161 }
162
163 /* Use the default frame interval. */
164 interval = frame->dwDefaultFrameInterval;
165 uvc_trace(UVC_TRACE_FORMAT, "Using default frame interval %u.%u us "
166 "(%u.%u fps).\n", interval/10, interval%10, 10000000/interval,
167 (100000000/interval)%10);
168
169 /* Set the format index, frame index and frame interval. */
170 memset(probe, 0, sizeof *probe);
171 probe->bmHint = 1; /* dwFrameInterval */
172 probe->bFormatIndex = format->index;
173 probe->bFrameIndex = frame->bFrameIndex;
174 probe->dwFrameInterval = uvc_try_frame_interval(frame, interval);
175 /* Some webcams stall the probe control set request when the
176 * dwMaxVideoFrameSize field is set to zero. The UVC specification
177 * clearly states that the field is read-only from the host, so this
178 * is a webcam bug. Set dwMaxVideoFrameSize to the value reported by
179 * the webcam to work around the problem.
180 *
181 * The workaround could probably be enabled for all webcams, so the
182 * quirk can be removed if needed. It's currently useful to detect
183 * webcam bugs and fix them before they hit the market (providing
184 * developers test their webcams with the Linux driver as well as with
185 * the Windows driver).
186 */
187 if (video->dev->quirks & UVC_QUIRK_PROBE_EXTRAFIELDS)
188 probe->dwMaxVideoFrameSize =
189 video->streaming->ctrl.dwMaxVideoFrameSize;
190
191 /* Probe the device */
192 if ((ret = uvc_probe_video(video, probe)) < 0)
193 goto done;
194
195 fmt->fmt.pix.width = frame->wWidth;
196 fmt->fmt.pix.height = frame->wHeight;
197 fmt->fmt.pix.field = V4L2_FIELD_NONE;
198 fmt->fmt.pix.bytesperline = format->bpp * frame->wWidth / 8;
199 fmt->fmt.pix.sizeimage = probe->dwMaxVideoFrameSize;
200 fmt->fmt.pix.colorspace = format->colorspace;
201 fmt->fmt.pix.priv = 0;
202
203 if (uvc_format != NULL)
204 *uvc_format = format;
205 if (uvc_frame != NULL)
206 *uvc_frame = frame;
207
208done:
209 return ret;
210}
211
212static int uvc_v4l2_get_format(struct uvc_video_device *video,
213 struct v4l2_format *fmt)
214{
215 struct uvc_format *format = video->streaming->cur_format;
216 struct uvc_frame *frame = video->streaming->cur_frame;
217
218 if (fmt->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
219 return -EINVAL;
220
221 if (format == NULL || frame == NULL)
222 return -EINVAL;
223
224 fmt->fmt.pix.pixelformat = format->fcc;
225 fmt->fmt.pix.width = frame->wWidth;
226 fmt->fmt.pix.height = frame->wHeight;
227 fmt->fmt.pix.field = V4L2_FIELD_NONE;
228 fmt->fmt.pix.bytesperline = format->bpp * frame->wWidth / 8;
229 fmt->fmt.pix.sizeimage = video->streaming->ctrl.dwMaxVideoFrameSize;
230 fmt->fmt.pix.colorspace = format->colorspace;
231 fmt->fmt.pix.priv = 0;
232
233 return 0;
234}
235
236static int uvc_v4l2_set_format(struct uvc_video_device *video,
237 struct v4l2_format *fmt)
238{
239 struct uvc_streaming_control probe;
240 struct uvc_format *format;
241 struct uvc_frame *frame;
242 int ret;
243
244 if (fmt->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
245 return -EINVAL;
246
247 if (uvc_queue_streaming(&video->queue))
248 return -EBUSY;
249
250 ret = uvc_v4l2_try_format(video, fmt, &probe, &format, &frame);
251 if (ret < 0)
252 return ret;
253
254 if ((ret = uvc_set_video_ctrl(video, &probe, 0)) < 0)
255 return ret;
256
257 memcpy(&video->streaming->ctrl, &probe, sizeof probe);
258 video->streaming->cur_format = format;
259 video->streaming->cur_frame = frame;
260
261 return 0;
262}
263
264static int uvc_v4l2_get_streamparm(struct uvc_video_device *video,
265 struct v4l2_streamparm *parm)
266{
267 uint32_t numerator, denominator;
268
269 if (parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
270 return -EINVAL;
271
272 numerator = video->streaming->ctrl.dwFrameInterval;
273 denominator = 10000000;
274 uvc_simplify_fraction(&numerator, &denominator, 8, 333);
275
276 memset(parm, 0, sizeof *parm);
277 parm->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
278 parm->parm.capture.capability = V4L2_CAP_TIMEPERFRAME;
279 parm->parm.capture.capturemode = 0;
280 parm->parm.capture.timeperframe.numerator = numerator;
281 parm->parm.capture.timeperframe.denominator = denominator;
282 parm->parm.capture.extendedmode = 0;
283 parm->parm.capture.readbuffers = 0;
284
285 return 0;
286}
287
288static int uvc_v4l2_set_streamparm(struct uvc_video_device *video,
289 struct v4l2_streamparm *parm)
290{
291 struct uvc_frame *frame = video->streaming->cur_frame;
292 struct uvc_streaming_control probe;
293 uint32_t interval;
294 int ret;
295
296 if (parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
297 return -EINVAL;
298
299 if (uvc_queue_streaming(&video->queue))
300 return -EBUSY;
301
302 memcpy(&probe, &video->streaming->ctrl, sizeof probe);
303 interval = uvc_fraction_to_interval(
304 parm->parm.capture.timeperframe.numerator,
305 parm->parm.capture.timeperframe.denominator);
306
307 uvc_trace(UVC_TRACE_FORMAT, "Setting frame interval to %u/%u (%u).\n",
308 parm->parm.capture.timeperframe.numerator,
309 parm->parm.capture.timeperframe.denominator,
310 interval);
311 probe.dwFrameInterval = uvc_try_frame_interval(frame, interval);
312
313 /* Probe the device with the new settings. */
314 if ((ret = uvc_probe_video(video, &probe)) < 0)
315 return ret;
316
317 /* Commit the new settings. */
318 if ((ret = uvc_set_video_ctrl(video, &probe, 0)) < 0)
319 return ret;
320
321 memcpy(&video->streaming->ctrl, &probe, sizeof probe);
322
323 /* Return the actual frame period. */
324 parm->parm.capture.timeperframe.numerator = probe.dwFrameInterval;
325 parm->parm.capture.timeperframe.denominator = 10000000;
326 uvc_simplify_fraction(&parm->parm.capture.timeperframe.numerator,
327 &parm->parm.capture.timeperframe.denominator,
328 8, 333);
329
330 return 0;
331}
332
333/* ------------------------------------------------------------------------
334 * Privilege management
335 */
336
337/*
338 * Privilege management is the multiple-open implementation basis. The current
339 * implementation is completely transparent for the end-user and doesn't
340 * require explicit use of the VIDIOC_G_PRIORITY and VIDIOC_S_PRIORITY ioctls.
341 * Those ioctls enable finer control on the device (by making possible for a
342 * user to request exclusive access to a device), but are not mature yet.
343 * Switching to the V4L2 priority mechanism might be considered in the future
344 * if this situation changes.
345 *
346 * Each open instance of a UVC device can either be in a privileged or
347 * unprivileged state. Only a single instance can be in a privileged state at
348 * a given time. Trying to perform an operation which requires privileges will
349 * automatically acquire the required privileges if possible, or return -EBUSY
350 * otherwise. Privileges are dismissed when closing the instance.
351 *
352 * Operations which require privileges are:
353 *
354 * - VIDIOC_S_INPUT
355 * - VIDIOC_S_PARM
356 * - VIDIOC_S_FMT
357 * - VIDIOC_TRY_FMT
358 * - VIDIOC_REQBUFS
359 */
360static int uvc_acquire_privileges(struct uvc_fh *handle)
361{
362 int ret = 0;
363
364 /* Always succeed if the handle is already privileged. */
365 if (handle->state == UVC_HANDLE_ACTIVE)
366 return 0;
367
368 /* Check if the device already has a privileged handle. */
369 mutex_lock(&uvc_driver.open_mutex);
370 if (atomic_inc_return(&handle->device->active) != 1) {
371 atomic_dec(&handle->device->active);
372 ret = -EBUSY;
373 goto done;
374 }
375
376 handle->state = UVC_HANDLE_ACTIVE;
377
378done:
379 mutex_unlock(&uvc_driver.open_mutex);
380 return ret;
381}
382
383static void uvc_dismiss_privileges(struct uvc_fh *handle)
384{
385 if (handle->state == UVC_HANDLE_ACTIVE)
386 atomic_dec(&handle->device->active);
387
388 handle->state = UVC_HANDLE_PASSIVE;
389}
390
391static int uvc_has_privileges(struct uvc_fh *handle)
392{
393 return handle->state == UVC_HANDLE_ACTIVE;
394}
395
396/* ------------------------------------------------------------------------
397 * V4L2 file operations
398 */
399
400static int uvc_v4l2_open(struct inode *inode, struct file *file)
401{
402 struct video_device *vdev;
403 struct uvc_video_device *video;
404 struct uvc_fh *handle;
405 int ret = 0;
406
407 uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_open\n");
408 mutex_lock(&uvc_driver.open_mutex);
409 vdev = video_devdata(file);
410 video = video_get_drvdata(vdev);
411
412 if (video->dev->state & UVC_DEV_DISCONNECTED) {
413 ret = -ENODEV;
414 goto done;
415 }
416
417 ret = usb_autopm_get_interface(video->dev->intf);
418 if (ret < 0)
419 goto done;
420
421 /* Create the device handle. */
422 handle = kzalloc(sizeof *handle, GFP_KERNEL);
423 if (handle == NULL) {
424 usb_autopm_put_interface(video->dev->intf);
425 ret = -ENOMEM;
426 goto done;
427 }
428
429 handle->device = video;
430 handle->state = UVC_HANDLE_PASSIVE;
431 file->private_data = handle;
432
433 kref_get(&video->dev->kref);
434
435done:
436 mutex_unlock(&uvc_driver.open_mutex);
437 return ret;
438}
439
440static int uvc_v4l2_release(struct inode *inode, struct file *file)
441{
442 struct video_device *vdev = video_devdata(file);
443 struct uvc_video_device *video = video_get_drvdata(vdev);
444 struct uvc_fh *handle = (struct uvc_fh *)file->private_data;
445
446 uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_release\n");
447
448 /* Only free resources if this is a privileged handle. */
449 if (uvc_has_privileges(handle)) {
450 uvc_video_enable(video, 0);
451
452 mutex_lock(&video->queue.mutex);
453 if (uvc_free_buffers(&video->queue) < 0)
454 uvc_printk(KERN_ERR, "uvc_v4l2_release: Unable to "
455 "free buffers.\n");
456 mutex_unlock(&video->queue.mutex);
457 }
458
459 /* Release the file handle. */
460 uvc_dismiss_privileges(handle);
461 kfree(handle);
462 file->private_data = NULL;
463
464 usb_autopm_put_interface(video->dev->intf);
465 kref_put(&video->dev->kref, uvc_delete);
466 return 0;
467}
468
469static int uvc_v4l2_do_ioctl(struct inode *inode, struct file *file,
470 unsigned int cmd, void *arg)
471{
472 struct video_device *vdev = video_devdata(file);
473 struct uvc_video_device *video = video_get_drvdata(vdev);
474 struct uvc_fh *handle = (struct uvc_fh *)file->private_data;
475 int ret = 0;
476
477 if (uvc_trace_param & UVC_TRACE_IOCTL)
478 v4l_printk_ioctl(cmd);
479
480 switch (cmd) {
481 /* Query capabilities */
482 case VIDIOC_QUERYCAP:
483 {
484 struct v4l2_capability *cap = arg;
485
486 memset(cap, 0, sizeof *cap);
487 strncpy(cap->driver, "uvcvideo", sizeof cap->driver);
488 strncpy(cap->card, vdev->name, 32);
489 strncpy(cap->bus_info, video->dev->udev->bus->bus_name,
490 sizeof cap->bus_info);
491 cap->version = DRIVER_VERSION_NUMBER;
492 cap->capabilities = V4L2_CAP_VIDEO_CAPTURE
493 | V4L2_CAP_STREAMING;
494 break;
495 }
496
497 /* Get, Set & Query control */
498 case VIDIOC_QUERYCTRL:
499 return uvc_query_v4l2_ctrl(video, arg);
500
501 case VIDIOC_G_CTRL:
502 {
503 struct v4l2_control *ctrl = arg;
504 struct v4l2_ext_control xctrl;
505
506 memset(&xctrl, 0, sizeof xctrl);
507 xctrl.id = ctrl->id;
508
509 uvc_ctrl_begin(video);
510 ret = uvc_ctrl_get(video, &xctrl);
511 uvc_ctrl_rollback(video);
512 if (ret >= 0)
513 ctrl->value = xctrl.value;
514 break;
515 }
516
517 case VIDIOC_S_CTRL:
518 {
519 struct v4l2_control *ctrl = arg;
520 struct v4l2_ext_control xctrl;
521
522 memset(&xctrl, 0, sizeof xctrl);
523 xctrl.id = ctrl->id;
524 xctrl.value = ctrl->value;
525
526 uvc_ctrl_begin(video);
527 ret = uvc_ctrl_set(video, &xctrl);
528 if (ret < 0) {
529 uvc_ctrl_rollback(video);
530 return ret;
531 }
532 ret = uvc_ctrl_commit(video);
533 break;
534 }
535
536 case VIDIOC_QUERYMENU:
537 return uvc_v4l2_query_menu(video, arg);
538
539 case VIDIOC_G_EXT_CTRLS:
540 {
541 struct v4l2_ext_controls *ctrls = arg;
542 struct v4l2_ext_control *ctrl = ctrls->controls;
543 unsigned int i;
544
545 uvc_ctrl_begin(video);
546 for (i = 0; i < ctrls->count; ++ctrl, ++i) {
547 ret = uvc_ctrl_get(video, ctrl);
548 if (ret < 0) {
549 uvc_ctrl_rollback(video);
550 ctrls->error_idx = i;
551 return ret;
552 }
553 }
554 ctrls->error_idx = 0;
555 ret = uvc_ctrl_rollback(video);
556 break;
557 }
558
559 case VIDIOC_S_EXT_CTRLS:
560 case VIDIOC_TRY_EXT_CTRLS:
561 {
562 struct v4l2_ext_controls *ctrls = arg;
563 struct v4l2_ext_control *ctrl = ctrls->controls;
564 unsigned int i;
565
566 ret = uvc_ctrl_begin(video);
567 if (ret < 0)
568 return ret;
569
570 for (i = 0; i < ctrls->count; ++ctrl, ++i) {
571 ret = uvc_ctrl_set(video, ctrl);
572 if (ret < 0) {
573 uvc_ctrl_rollback(video);
574 ctrls->error_idx = i;
575 return ret;
576 }
577 }
578
579 ctrls->error_idx = 0;
580
581 if (cmd == VIDIOC_S_EXT_CTRLS)
582 ret = uvc_ctrl_commit(video);
583 else
584 ret = uvc_ctrl_rollback(video);
585 break;
586 }
587
588 /* Get, Set & Enum input */
589 case VIDIOC_ENUMINPUT:
590 {
591 const struct uvc_entity *selector = video->selector;
592 struct v4l2_input *input = arg;
593 struct uvc_entity *iterm = NULL;
594 u32 index = input->index;
595 int pin = 0;
596
597 if (selector == NULL ||
598 (video->dev->quirks & UVC_QUIRK_IGNORE_SELECTOR_UNIT)) {
599 if (index != 0)
600 return -EINVAL;
601 iterm = list_first_entry(&video->iterms,
602 struct uvc_entity, chain);
603 pin = iterm->id;
604 } else if (pin < selector->selector.bNrInPins) {
605 pin = selector->selector.baSourceID[index];
606 list_for_each_entry(iterm, video->iterms.next, chain) {
607 if (iterm->id == pin)
608 break;
609 }
610 }
611
612 if (iterm == NULL || iterm->id != pin)
613 return -EINVAL;
614
615 memset(input, 0, sizeof *input);
616 input->index = index;
617 strncpy(input->name, iterm->name, sizeof input->name);
618 if (UVC_ENTITY_TYPE(iterm) == ITT_CAMERA)
619 input->type = V4L2_INPUT_TYPE_CAMERA;
620 break;
621 }
622
623 case VIDIOC_G_INPUT:
624 {
625 u8 input;
626
627 if (video->selector == NULL ||
628 (video->dev->quirks & UVC_QUIRK_IGNORE_SELECTOR_UNIT)) {
629 *(int *)arg = 0;
630 break;
631 }
632
633 ret = uvc_query_ctrl(video->dev, GET_CUR, video->selector->id,
634 video->dev->intfnum, SU_INPUT_SELECT_CONTROL,
635 &input, 1);
636 if (ret < 0)
637 return ret;
638
639 *(int *)arg = input - 1;
640 break;
641 }
642
643 case VIDIOC_S_INPUT:
644 {
645 u8 input = *(u32 *)arg + 1;
646
647 if ((ret = uvc_acquire_privileges(handle)) < 0)
648 return ret;
649
650 if (video->selector == NULL ||
651 (video->dev->quirks & UVC_QUIRK_IGNORE_SELECTOR_UNIT)) {
652 if (input != 1)
653 return -EINVAL;
654 break;
655 }
656
657 if (input > video->selector->selector.bNrInPins)
658 return -EINVAL;
659
660 return uvc_query_ctrl(video->dev, SET_CUR, video->selector->id,
661 video->dev->intfnum, SU_INPUT_SELECT_CONTROL,
662 &input, 1);
663 }
664
665 /* Try, Get, Set & Enum format */
666 case VIDIOC_ENUM_FMT:
667 {
668 struct v4l2_fmtdesc *fmt = arg;
669 struct uvc_format *format;
670
671 if (fmt->type != V4L2_BUF_TYPE_VIDEO_CAPTURE ||
672 fmt->index >= video->streaming->nformats)
673 return -EINVAL;
674
675 format = &video->streaming->format[fmt->index];
676 fmt->flags = 0;
677 if (format->flags & UVC_FMT_FLAG_COMPRESSED)
678 fmt->flags |= V4L2_FMT_FLAG_COMPRESSED;
679 strncpy(fmt->description, format->name,
680 sizeof fmt->description);
681 fmt->description[sizeof fmt->description - 1] = 0;
682 fmt->pixelformat = format->fcc;
683 break;
684 }
685
686 case VIDIOC_TRY_FMT:
687 {
688 struct uvc_streaming_control probe;
689
690 if ((ret = uvc_acquire_privileges(handle)) < 0)
691 return ret;
692
693 return uvc_v4l2_try_format(video, arg, &probe, NULL, NULL);
694 }
695
696 case VIDIOC_S_FMT:
697 if ((ret = uvc_acquire_privileges(handle)) < 0)
698 return ret;
699
700 return uvc_v4l2_set_format(video, arg);
701
702 case VIDIOC_G_FMT:
703 return uvc_v4l2_get_format(video, arg);
704
705 /* Frame size enumeration */
706 case VIDIOC_ENUM_FRAMESIZES:
707 {
708 struct v4l2_frmsizeenum *fsize = arg;
709 struct uvc_format *format = NULL;
710 struct uvc_frame *frame;
711 int i;
712
713 /* Look for the given pixel format */
714 for (i = 0; i < video->streaming->nformats; i++) {
715 if (video->streaming->format[i].fcc ==
716 fsize->pixel_format) {
717 format = &video->streaming->format[i];
718 break;
719 }
720 }
721 if (format == NULL)
722 return -EINVAL;
723
724 if (fsize->index >= format->nframes)
725 return -EINVAL;
726
727 frame = &format->frame[fsize->index];
728 fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
729 fsize->discrete.width = frame->wWidth;
730 fsize->discrete.height = frame->wHeight;
731 break;
732 }
733
734 /* Frame interval enumeration */
735 case VIDIOC_ENUM_FRAMEINTERVALS:
736 {
737 struct v4l2_frmivalenum *fival = arg;
738 struct uvc_format *format = NULL;
739 struct uvc_frame *frame = NULL;
740 int i;
741
742 /* Look for the given pixel format and frame size */
743 for (i = 0; i < video->streaming->nformats; i++) {
744 if (video->streaming->format[i].fcc ==
745 fival->pixel_format) {
746 format = &video->streaming->format[i];
747 break;
748 }
749 }
750 if (format == NULL)
751 return -EINVAL;
752
753 for (i = 0; i < format->nframes; i++) {
754 if (format->frame[i].wWidth == fival->width &&
755 format->frame[i].wHeight == fival->height) {
756 frame = &format->frame[i];
757 break;
758 }
759 }
760 if (frame == NULL)
761 return -EINVAL;
762
763 if (frame->bFrameIntervalType) {
764 if (fival->index >= frame->bFrameIntervalType)
765 return -EINVAL;
766
767 fival->type = V4L2_FRMIVAL_TYPE_DISCRETE;
768 fival->discrete.numerator =
769 frame->dwFrameInterval[fival->index];
770 fival->discrete.denominator = 10000000;
771 uvc_simplify_fraction(&fival->discrete.numerator,
772 &fival->discrete.denominator, 8, 333);
773 } else {
774 fival->type = V4L2_FRMIVAL_TYPE_STEPWISE;
775 fival->stepwise.min.numerator =
776 frame->dwFrameInterval[0];
777 fival->stepwise.min.denominator = 10000000;
778 fival->stepwise.max.numerator =
779 frame->dwFrameInterval[1];
780 fival->stepwise.max.denominator = 10000000;
781 fival->stepwise.step.numerator =
782 frame->dwFrameInterval[2];
783 fival->stepwise.step.denominator = 10000000;
784 uvc_simplify_fraction(&fival->stepwise.min.numerator,
785 &fival->stepwise.min.denominator, 8, 333);
786 uvc_simplify_fraction(&fival->stepwise.max.numerator,
787 &fival->stepwise.max.denominator, 8, 333);
788 uvc_simplify_fraction(&fival->stepwise.step.numerator,
789 &fival->stepwise.step.denominator, 8, 333);
790 }
791 break;
792 }
793
794 /* Get & Set streaming parameters */
795 case VIDIOC_G_PARM:
796 return uvc_v4l2_get_streamparm(video, arg);
797
798 case VIDIOC_S_PARM:
799 if ((ret = uvc_acquire_privileges(handle)) < 0)
800 return ret;
801
802 return uvc_v4l2_set_streamparm(video, arg);
803
804 /* Cropping and scaling */
805 case VIDIOC_CROPCAP:
806 {
807 struct v4l2_cropcap *ccap = arg;
808 struct uvc_frame *frame = video->streaming->cur_frame;
809
810 if (ccap->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
811 return -EINVAL;
812
813 ccap->bounds.left = 0;
814 ccap->bounds.top = 0;
815 ccap->bounds.width = frame->wWidth;
816 ccap->bounds.height = frame->wHeight;
817
818 ccap->defrect = ccap->bounds;
819
820 ccap->pixelaspect.numerator = 1;
821 ccap->pixelaspect.denominator = 1;
822 break;
823 }
824
825 case VIDIOC_G_CROP:
826 case VIDIOC_S_CROP:
827 return -EINVAL;
828
829 /* Buffers & streaming */
830 case VIDIOC_REQBUFS:
831 {
832 struct v4l2_requestbuffers *rb = arg;
833 unsigned int bufsize =
834 video->streaming->ctrl.dwMaxVideoFrameSize;
835
836 if (rb->type != V4L2_BUF_TYPE_VIDEO_CAPTURE ||
837 rb->memory != V4L2_MEMORY_MMAP)
838 return -EINVAL;
839
840 if ((ret = uvc_acquire_privileges(handle)) < 0)
841 return ret;
842
843 ret = uvc_alloc_buffers(&video->queue, rb->count, bufsize);
844 if (ret < 0)
845 return ret;
846
847 if (!(video->streaming->cur_format->flags &
848 UVC_FMT_FLAG_COMPRESSED))
849 video->queue.flags |= UVC_QUEUE_DROP_INCOMPLETE;
850
851 rb->count = ret;
852 ret = 0;
853 break;
854 }
855
856 case VIDIOC_QUERYBUF:
857 {
858 struct v4l2_buffer *buf = arg;
859
860 if (buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
861 return -EINVAL;
862
863 if (!uvc_has_privileges(handle))
864 return -EBUSY;
865
866 return uvc_query_buffer(&video->queue, buf);
867 }
868
869 case VIDIOC_QBUF:
870 if (!uvc_has_privileges(handle))
871 return -EBUSY;
872
873 return uvc_queue_buffer(&video->queue, arg);
874
875 case VIDIOC_DQBUF:
876 if (!uvc_has_privileges(handle))
877 return -EBUSY;
878
879 return uvc_dequeue_buffer(&video->queue, arg,
880 file->f_flags & O_NONBLOCK);
881
882 case VIDIOC_STREAMON:
883 {
884 int *type = arg;
885
886 if (*type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
887 return -EINVAL;
888
889 if (!uvc_has_privileges(handle))
890 return -EBUSY;
891
892 if ((ret = uvc_video_enable(video, 1)) < 0)
893 return ret;
894 break;
895 }
896
897 case VIDIOC_STREAMOFF:
898 {
899 int *type = arg;
900
901 if (*type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
902 return -EINVAL;
903
904 if (!uvc_has_privileges(handle))
905 return -EBUSY;
906
907 return uvc_video_enable(video, 0);
908 }
909
910 /* Analog video standards make no sense for digital cameras. */
911 case VIDIOC_ENUMSTD:
912 case VIDIOC_QUERYSTD:
913 case VIDIOC_G_STD:
914 case VIDIOC_S_STD:
915
916 case VIDIOC_OVERLAY:
917
918 case VIDIOC_ENUMAUDIO:
919 case VIDIOC_ENUMAUDOUT:
920
921 case VIDIOC_ENUMOUTPUT:
922 uvc_trace(UVC_TRACE_IOCTL, "Unsupported ioctl 0x%08x\n", cmd);
923 return -EINVAL;
924
925 /* Dynamic controls. */
926 case UVCIOC_CTRL_ADD:
927 {
928 struct uvc_xu_control_info *xinfo = arg;
929 struct uvc_control_info *info;
930
931 if (!capable(CAP_SYS_ADMIN))
932 return -EPERM;
933
934 info = kmalloc(sizeof *info, GFP_KERNEL);
935 if (info == NULL)
936 return -ENOMEM;
937
938 memcpy(info->entity, xinfo->entity, sizeof info->entity);
939 info->index = xinfo->index;
940 info->selector = xinfo->selector;
941 info->size = xinfo->size;
942 info->flags = xinfo->flags;
943
944 info->flags |= UVC_CONTROL_GET_MIN | UVC_CONTROL_GET_MAX |
945 UVC_CONTROL_GET_RES | UVC_CONTROL_GET_DEF;
946
947 ret = uvc_ctrl_add_info(info);
948 if (ret < 0)
949 kfree(info);
950 break;
951 }
952
953 case UVCIOC_CTRL_MAP:
954 {
955 struct uvc_xu_control_mapping *xmap = arg;
956 struct uvc_control_mapping *map;
957
958 if (!capable(CAP_SYS_ADMIN))
959 return -EPERM;
960
961 map = kmalloc(sizeof *map, GFP_KERNEL);
962 if (map == NULL)
963 return -ENOMEM;
964
965 map->id = xmap->id;
966 memcpy(map->name, xmap->name, sizeof map->name);
967 memcpy(map->entity, xmap->entity, sizeof map->entity);
968 map->selector = xmap->selector;
969 map->size = xmap->size;
970 map->offset = xmap->offset;
971 map->v4l2_type = xmap->v4l2_type;
972 map->data_type = xmap->data_type;
973
974 ret = uvc_ctrl_add_mapping(map);
975 if (ret < 0)
976 kfree(map);
977 break;
978 }
979
980 case UVCIOC_CTRL_GET:
981 return uvc_xu_ctrl_query(video, arg, 0);
982
983 case UVCIOC_CTRL_SET:
984 return uvc_xu_ctrl_query(video, arg, 1);
985
986 default:
987 if ((ret = v4l_compat_translate_ioctl(inode, file, cmd, arg,
988 uvc_v4l2_do_ioctl)) == -ENOIOCTLCMD)
989 uvc_trace(UVC_TRACE_IOCTL, "Unknown ioctl 0x%08x\n",
990 cmd);
991 return ret;
992 }
993
994 return ret;
995}
996
997static int uvc_v4l2_ioctl(struct inode *inode, struct file *file,
998 unsigned int cmd, unsigned long arg)
999{
1000 uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_ioctl\n");
1001 return video_usercopy(inode, file, cmd, arg, uvc_v4l2_do_ioctl);
1002}
1003
1004static ssize_t uvc_v4l2_read(struct file *file, char __user *data,
1005 size_t count, loff_t *ppos)
1006{
1007 uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_read: not implemented.\n");
1008 return -ENODEV;
1009}
1010
1011/*
1012 * VMA operations.
1013 */
1014static void uvc_vm_open(struct vm_area_struct *vma)
1015{
1016 struct uvc_buffer *buffer = vma->vm_private_data;
1017 buffer->vma_use_count++;
1018}
1019
1020static void uvc_vm_close(struct vm_area_struct *vma)
1021{
1022 struct uvc_buffer *buffer = vma->vm_private_data;
1023 buffer->vma_use_count--;
1024}
1025
1026static struct vm_operations_struct uvc_vm_ops = {
1027 .open = uvc_vm_open,
1028 .close = uvc_vm_close,
1029};
1030
1031static int uvc_v4l2_mmap(struct file *file, struct vm_area_struct *vma)
1032{
1033 struct video_device *vdev = video_devdata(file);
1034 struct uvc_video_device *video = video_get_drvdata(vdev);
1035 struct uvc_buffer *buffer;
1036 struct page *page;
1037 unsigned long addr, start, size;
1038 unsigned int i;
1039 int ret = 0;
1040
1041 uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_mmap\n");
1042
1043 start = vma->vm_start;
1044 size = vma->vm_end - vma->vm_start;
1045
1046 mutex_lock(&video->queue.mutex);
1047
1048 for (i = 0; i < video->queue.count; ++i) {
1049 buffer = &video->queue.buffer[i];
1050 if ((buffer->buf.m.offset >> PAGE_SHIFT) == vma->vm_pgoff)
1051 break;
1052 }
1053
1054 if (i == video->queue.count || size != video->queue.buf_size) {
1055 ret = -EINVAL;
1056 goto done;
1057 }
1058
1059 /*
1060 * VM_IO marks the area as being an mmaped region for I/O to a
1061 * device. It also prevents the region from being core dumped.
1062 */
1063 vma->vm_flags |= VM_IO;
1064
1065 addr = (unsigned long)video->queue.mem + buffer->buf.m.offset;
1066 while (size > 0) {
1067 page = vmalloc_to_page((void *)addr);
1068 if ((ret = vm_insert_page(vma, start, page)) < 0)
1069 goto done;
1070
1071 start += PAGE_SIZE;
1072 addr += PAGE_SIZE;
1073 size -= PAGE_SIZE;
1074 }
1075
1076 vma->vm_ops = &uvc_vm_ops;
1077 vma->vm_private_data = buffer;
1078 uvc_vm_open(vma);
1079
1080done:
1081 mutex_unlock(&video->queue.mutex);
1082 return ret;
1083}
1084
1085static unsigned int uvc_v4l2_poll(struct file *file, poll_table *wait)
1086{
1087 struct video_device *vdev = video_devdata(file);
1088 struct uvc_video_device *video = video_get_drvdata(vdev);
1089
1090 uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_poll\n");
1091
1092 return uvc_queue_poll(&video->queue, file, wait);
1093}
1094
1095struct file_operations uvc_fops = {
1096 .owner = THIS_MODULE,
1097 .open = uvc_v4l2_open,
1098 .release = uvc_v4l2_release,
1099 .ioctl = uvc_v4l2_ioctl,
1100 .compat_ioctl = v4l_compat_ioctl32,
1101 .llseek = no_llseek,
1102 .read = uvc_v4l2_read,
1103 .mmap = uvc_v4l2_mmap,
1104 .poll = uvc_v4l2_poll,
1105};
diff --git a/drivers/media/video/uvc/uvc_video.c b/drivers/media/video/uvc/uvc_video.c
new file mode 100644
index 000000000000..6faf1fb21614
--- /dev/null
+++ b/drivers/media/video/uvc/uvc_video.c
@@ -0,0 +1,934 @@
1/*
2 * uvc_video.c -- USB Video Class driver - Video handling
3 *
4 * Copyright (C) 2005-2008
5 * Laurent Pinchart (laurent.pinchart@skynet.be)
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
14#include <linux/kernel.h>
15#include <linux/version.h>
16#include <linux/list.h>
17#include <linux/module.h>
18#include <linux/usb.h>
19#include <linux/videodev2.h>
20#include <linux/vmalloc.h>
21#include <linux/wait.h>
22#include <asm/atomic.h>
23#include <asm/unaligned.h>
24
25#include <media/v4l2-common.h>
26
27#include "uvcvideo.h"
28
29/* ------------------------------------------------------------------------
30 * UVC Controls
31 */
32
33static int __uvc_query_ctrl(struct uvc_device *dev, __u8 query, __u8 unit,
34 __u8 intfnum, __u8 cs, void *data, __u16 size,
35 int timeout)
36{
37 __u8 type = USB_TYPE_CLASS | USB_RECIP_INTERFACE;
38 unsigned int pipe;
39 int ret;
40
41 pipe = (query & 0x80) ? usb_rcvctrlpipe(dev->udev, 0)
42 : usb_sndctrlpipe(dev->udev, 0);
43 type |= (query & 0x80) ? USB_DIR_IN : USB_DIR_OUT;
44
45 ret = usb_control_msg(dev->udev, pipe, query, type, cs << 8,
46 unit << 8 | intfnum, data, size, timeout);
47
48 if (ret != size) {
49 uvc_printk(KERN_ERR, "Failed to query (%u) UVC control %u "
50 "(unit %u) : %d (exp. %u).\n", query, cs, unit, ret,
51 size);
52 return -EIO;
53 }
54
55 return 0;
56}
57
58int uvc_query_ctrl(struct uvc_device *dev, __u8 query, __u8 unit,
59 __u8 intfnum, __u8 cs, void *data, __u16 size)
60{
61 return __uvc_query_ctrl(dev, query, unit, intfnum, cs, data, size,
62 UVC_CTRL_CONTROL_TIMEOUT);
63}
64
65static void uvc_fixup_buffer_size(struct uvc_video_device *video,
66 struct uvc_streaming_control *ctrl)
67{
68 struct uvc_format *format;
69 struct uvc_frame *frame;
70
71 if (ctrl->bFormatIndex <= 0 ||
72 ctrl->bFormatIndex > video->streaming->nformats)
73 return;
74
75 format = &video->streaming->format[ctrl->bFormatIndex - 1];
76
77 if (ctrl->bFrameIndex <= 0 ||
78 ctrl->bFrameIndex > format->nframes)
79 return;
80
81 frame = &format->frame[ctrl->bFrameIndex - 1];
82
83 if (!(format->flags & UVC_FMT_FLAG_COMPRESSED) ||
84 (ctrl->dwMaxVideoFrameSize == 0 &&
85 video->dev->uvc_version < 0x0110))
86 ctrl->dwMaxVideoFrameSize =
87 frame->dwMaxVideoFrameBufferSize;
88}
89
90static int uvc_get_video_ctrl(struct uvc_video_device *video,
91 struct uvc_streaming_control *ctrl, int probe, __u8 query)
92{
93 __u8 data[34];
94 __u8 size;
95 int ret;
96
97 size = video->dev->uvc_version >= 0x0110 ? 34 : 26;
98 ret = __uvc_query_ctrl(video->dev, query, 0, video->streaming->intfnum,
99 probe ? VS_PROBE_CONTROL : VS_COMMIT_CONTROL, &data, size,
100 UVC_CTRL_STREAMING_TIMEOUT);
101
102 if (ret < 0)
103 return ret;
104
105 ctrl->bmHint = le16_to_cpup((__le16 *)&data[0]);
106 ctrl->bFormatIndex = data[2];
107 ctrl->bFrameIndex = data[3];
108 ctrl->dwFrameInterval = le32_to_cpup((__le32 *)&data[4]);
109 ctrl->wKeyFrameRate = le16_to_cpup((__le16 *)&data[8]);
110 ctrl->wPFrameRate = le16_to_cpup((__le16 *)&data[10]);
111 ctrl->wCompQuality = le16_to_cpup((__le16 *)&data[12]);
112 ctrl->wCompWindowSize = le16_to_cpup((__le16 *)&data[14]);
113 ctrl->wDelay = le16_to_cpup((__le16 *)&data[16]);
114 ctrl->dwMaxVideoFrameSize =
115 le32_to_cpu(get_unaligned((__le32 *)&data[18]));
116 ctrl->dwMaxPayloadTransferSize =
117 le32_to_cpu(get_unaligned((__le32 *)&data[22]));
118
119 if (size == 34) {
120 ctrl->dwClockFrequency =
121 le32_to_cpu(get_unaligned((__le32 *)&data[26]));
122 ctrl->bmFramingInfo = data[30];
123 ctrl->bPreferedVersion = data[31];
124 ctrl->bMinVersion = data[32];
125 ctrl->bMaxVersion = data[33];
126 } else {
127 ctrl->dwClockFrequency = video->dev->clock_frequency;
128 ctrl->bmFramingInfo = 0;
129 ctrl->bPreferedVersion = 0;
130 ctrl->bMinVersion = 0;
131 ctrl->bMaxVersion = 0;
132 }
133
134 /* Some broken devices return a null or wrong dwMaxVideoFrameSize.
135 * Try to get the value from the format and frame descriptor.
136 */
137 uvc_fixup_buffer_size(video, ctrl);
138
139 return 0;
140}
141
142int uvc_set_video_ctrl(struct uvc_video_device *video,
143 struct uvc_streaming_control *ctrl, int probe)
144{
145 __u8 data[34];
146 __u8 size;
147
148 size = video->dev->uvc_version >= 0x0110 ? 34 : 26;
149 memset(data, 0, sizeof data);
150
151 *(__le16 *)&data[0] = cpu_to_le16(ctrl->bmHint);
152 data[2] = ctrl->bFormatIndex;
153 data[3] = ctrl->bFrameIndex;
154 *(__le32 *)&data[4] = cpu_to_le32(ctrl->dwFrameInterval);
155 *(__le16 *)&data[8] = cpu_to_le16(ctrl->wKeyFrameRate);
156 *(__le16 *)&data[10] = cpu_to_le16(ctrl->wPFrameRate);
157 *(__le16 *)&data[12] = cpu_to_le16(ctrl->wCompQuality);
158 *(__le16 *)&data[14] = cpu_to_le16(ctrl->wCompWindowSize);
159 *(__le16 *)&data[16] = cpu_to_le16(ctrl->wDelay);
160 /* Note: Some of the fields below are not required for IN devices (see
161 * UVC spec, 4.3.1.1), but we still copy them in case support for OUT
162 * devices is added in the future. */
163 put_unaligned(cpu_to_le32(ctrl->dwMaxVideoFrameSize),
164 (__le32 *)&data[18]);
165 put_unaligned(cpu_to_le32(ctrl->dwMaxPayloadTransferSize),
166 (__le32 *)&data[22]);
167
168 if (size == 34) {
169 put_unaligned(cpu_to_le32(ctrl->dwClockFrequency),
170 (__le32 *)&data[26]);
171 data[30] = ctrl->bmFramingInfo;
172 data[31] = ctrl->bPreferedVersion;
173 data[32] = ctrl->bMinVersion;
174 data[33] = ctrl->bMaxVersion;
175 }
176
177 return __uvc_query_ctrl(video->dev, SET_CUR, 0,
178 video->streaming->intfnum,
179 probe ? VS_PROBE_CONTROL : VS_COMMIT_CONTROL, &data, size,
180 UVC_CTRL_STREAMING_TIMEOUT);
181}
182
183int uvc_probe_video(struct uvc_video_device *video,
184 struct uvc_streaming_control *probe)
185{
186 struct uvc_streaming_control probe_min, probe_max;
187 __u16 bandwidth;
188 unsigned int i;
189 int ret;
190
191 mutex_lock(&video->streaming->mutex);
192
193 /* Perform probing. The device should adjust the requested values
194 * according to its capabilities. However, some devices, namely the
195 * first generation UVC Logitech webcams, don't implement the Video
196 * Probe control properly, and just return the needed bandwidth. For
197 * that reason, if the needed bandwidth exceeds the maximum available
198 * bandwidth, try to lower the quality.
199 */
200 if ((ret = uvc_set_video_ctrl(video, probe, 1)) < 0)
201 goto done;
202
203 /* Get the minimum and maximum values for compression settings. */
204 if (!(video->dev->quirks & UVC_QUIRK_PROBE_MINMAX)) {
205 ret = uvc_get_video_ctrl(video, &probe_min, 1, GET_MIN);
206 if (ret < 0)
207 goto done;
208 ret = uvc_get_video_ctrl(video, &probe_max, 1, GET_MAX);
209 if (ret < 0)
210 goto done;
211
212 probe->wCompQuality = probe_max.wCompQuality;
213 }
214
215 for (i = 0; i < 2; ++i) {
216 if ((ret = uvc_set_video_ctrl(video, probe, 1)) < 0 ||
217 (ret = uvc_get_video_ctrl(video, probe, 1, GET_CUR)) < 0)
218 goto done;
219
220 if (video->streaming->intf->num_altsetting == 1)
221 break;
222
223 bandwidth = probe->dwMaxPayloadTransferSize;
224 if (bandwidth <= video->streaming->maxpsize)
225 break;
226
227 if (video->dev->quirks & UVC_QUIRK_PROBE_MINMAX) {
228 ret = -ENOSPC;
229 goto done;
230 }
231
232 /* TODO: negotiate compression parameters */
233 probe->wKeyFrameRate = probe_min.wKeyFrameRate;
234 probe->wPFrameRate = probe_min.wPFrameRate;
235 probe->wCompQuality = probe_max.wCompQuality;
236 probe->wCompWindowSize = probe_min.wCompWindowSize;
237 }
238
239done:
240 mutex_unlock(&video->streaming->mutex);
241 return ret;
242}
243
244/* ------------------------------------------------------------------------
245 * Video codecs
246 */
247
248/* Values for bmHeaderInfo (Video and Still Image Payload Headers, 2.4.3.3) */
249#define UVC_STREAM_EOH (1 << 7)
250#define UVC_STREAM_ERR (1 << 6)
251#define UVC_STREAM_STI (1 << 5)
252#define UVC_STREAM_RES (1 << 4)
253#define UVC_STREAM_SCR (1 << 3)
254#define UVC_STREAM_PTS (1 << 2)
255#define UVC_STREAM_EOF (1 << 1)
256#define UVC_STREAM_FID (1 << 0)
257
258/* Video payload decoding is handled by uvc_video_decode_start(),
259 * uvc_video_decode_data() and uvc_video_decode_end().
260 *
261 * uvc_video_decode_start is called with URB data at the start of a bulk or
262 * isochronous payload. It processes header data and returns the header size
263 * in bytes if successful. If an error occurs, it returns a negative error
264 * code. The following error codes have special meanings.
265 *
266 * - EAGAIN informs the caller that the current video buffer should be marked
267 * as done, and that the function should be called again with the same data
268 * and a new video buffer. This is used when end of frame conditions can be
269 * reliably detected at the beginning of the next frame only.
270 *
271 * If an error other than -EAGAIN is returned, the caller will drop the current
272 * payload. No call to uvc_video_decode_data and uvc_video_decode_end will be
273 * made until the next payload. -ENODATA can be used to drop the current
274 * payload if no other error code is appropriate.
275 *
276 * uvc_video_decode_data is called for every URB with URB data. It copies the
277 * data to the video buffer.
278 *
279 * uvc_video_decode_end is called with header data at the end of a bulk or
280 * isochronous payload. It performs any additional header data processing and
281 * returns 0 or a negative error code if an error occured. As header data have
282 * already been processed by uvc_video_decode_start, this functions isn't
283 * required to perform sanity checks a second time.
284 *
285 * For isochronous transfers where a payload is always transfered in a single
286 * URB, the three functions will be called in a row.
287 *
288 * To let the decoder process header data and update its internal state even
289 * when no video buffer is available, uvc_video_decode_start must be prepared
290 * to be called with a NULL buf parameter. uvc_video_decode_data and
291 * uvc_video_decode_end will never be called with a NULL buffer.
292 */
293static int uvc_video_decode_start(struct uvc_video_device *video,
294 struct uvc_buffer *buf, const __u8 *data, int len)
295{
296 __u8 fid;
297
298 /* Sanity checks:
299 * - packet must be at least 2 bytes long
300 * - bHeaderLength value must be at least 2 bytes (see above)
301 * - bHeaderLength value can't be larger than the packet size.
302 */
303 if (len < 2 || data[0] < 2 || data[0] > len)
304 return -EINVAL;
305
306 /* Skip payloads marked with the error bit ("error frames"). */
307 if (data[1] & UVC_STREAM_ERR) {
308 uvc_trace(UVC_TRACE_FRAME, "Dropping payload (error bit "
309 "set).\n");
310 return -ENODATA;
311 }
312
313 fid = data[1] & UVC_STREAM_FID;
314
315 /* Store the payload FID bit and return immediately when the buffer is
316 * NULL.
317 */
318 if (buf == NULL) {
319 video->last_fid = fid;
320 return -ENODATA;
321 }
322
323 /* Synchronize to the input stream by waiting for the FID bit to be
324 * toggled when the the buffer state is not UVC_BUF_STATE_ACTIVE.
325 * queue->last_fid is initialized to -1, so the first isochronous
326 * frame will always be in sync.
327 *
328 * If the device doesn't toggle the FID bit, invert video->last_fid
329 * when the EOF bit is set to force synchronisation on the next packet.
330 */
331 if (buf->state != UVC_BUF_STATE_ACTIVE) {
332 if (fid == video->last_fid) {
333 uvc_trace(UVC_TRACE_FRAME, "Dropping payload (out of "
334 "sync).\n");
335 if ((video->dev->quirks & UVC_QUIRK_STREAM_NO_FID) &&
336 (data[1] & UVC_STREAM_EOF))
337 video->last_fid ^= UVC_STREAM_FID;
338 return -ENODATA;
339 }
340
341 /* TODO: Handle PTS and SCR. */
342 buf->state = UVC_BUF_STATE_ACTIVE;
343 }
344
345 /* Mark the buffer as done if we're at the beginning of a new frame.
346 * End of frame detection is better implemented by checking the EOF
347 * bit (FID bit toggling is delayed by one frame compared to the EOF
348 * bit), but some devices don't set the bit at end of frame (and the
349 * last payload can be lost anyway). We thus must check if the FID has
350 * been toggled.
351 *
352 * queue->last_fid is initialized to -1, so the first isochronous
353 * frame will never trigger an end of frame detection.
354 *
355 * Empty buffers (bytesused == 0) don't trigger end of frame detection
356 * as it doesn't make sense to return an empty buffer. This also
357 * avoids detecting and of frame conditions at FID toggling if the
358 * previous payload had the EOF bit set.
359 */
360 if (fid != video->last_fid && buf->buf.bytesused != 0) {
361 uvc_trace(UVC_TRACE_FRAME, "Frame complete (FID bit "
362 "toggled).\n");
363 buf->state = UVC_BUF_STATE_DONE;
364 return -EAGAIN;
365 }
366
367 video->last_fid = fid;
368
369 return data[0];
370}
371
372static void uvc_video_decode_data(struct uvc_video_device *video,
373 struct uvc_buffer *buf, const __u8 *data, int len)
374{
375 struct uvc_video_queue *queue = &video->queue;
376 unsigned int maxlen, nbytes;
377 void *mem;
378
379 if (len <= 0)
380 return;
381
382 /* Copy the video data to the buffer. */
383 maxlen = buf->buf.length - buf->buf.bytesused;
384 mem = queue->mem + buf->buf.m.offset + buf->buf.bytesused;
385 nbytes = min((unsigned int)len, maxlen);
386 memcpy(mem, data, nbytes);
387 buf->buf.bytesused += nbytes;
388
389 /* Complete the current frame if the buffer size was exceeded. */
390 if (len > maxlen) {
391 uvc_trace(UVC_TRACE_FRAME, "Frame complete (overflow).\n");
392 buf->state = UVC_BUF_STATE_DONE;
393 }
394}
395
396static void uvc_video_decode_end(struct uvc_video_device *video,
397 struct uvc_buffer *buf, const __u8 *data, int len)
398{
399 /* Mark the buffer as done if the EOF marker is set. */
400 if (data[1] & UVC_STREAM_EOF && buf->buf.bytesused != 0) {
401 uvc_trace(UVC_TRACE_FRAME, "Frame complete (EOF found).\n");
402 if (data[0] == len)
403 uvc_trace(UVC_TRACE_FRAME, "EOF in empty payload.\n");
404 buf->state = UVC_BUF_STATE_DONE;
405 if (video->dev->quirks & UVC_QUIRK_STREAM_NO_FID)
406 video->last_fid ^= UVC_STREAM_FID;
407 }
408}
409
410/* ------------------------------------------------------------------------
411 * URB handling
412 */
413
414/*
415 * Completion handler for video URBs.
416 */
417static void uvc_video_decode_isoc(struct urb *urb,
418 struct uvc_video_device *video, struct uvc_buffer *buf)
419{
420 u8 *mem;
421 int ret, i;
422
423 for (i = 0; i < urb->number_of_packets; ++i) {
424 if (urb->iso_frame_desc[i].status < 0) {
425 uvc_trace(UVC_TRACE_FRAME, "USB isochronous frame "
426 "lost (%d).\n", urb->iso_frame_desc[i].status);
427 continue;
428 }
429
430 /* Decode the payload header. */
431 mem = urb->transfer_buffer + urb->iso_frame_desc[i].offset;
432 do {
433 ret = uvc_video_decode_start(video, buf, mem,
434 urb->iso_frame_desc[i].actual_length);
435 if (ret == -EAGAIN)
436 buf = uvc_queue_next_buffer(&video->queue, buf);
437 } while (ret == -EAGAIN);
438
439 if (ret < 0)
440 continue;
441
442 /* Decode the payload data. */
443 uvc_video_decode_data(video, buf, mem + ret,
444 urb->iso_frame_desc[i].actual_length - ret);
445
446 /* Process the header again. */
447 uvc_video_decode_end(video, buf, mem, ret);
448
449 if (buf->state == UVC_BUF_STATE_DONE ||
450 buf->state == UVC_BUF_STATE_ERROR)
451 buf = uvc_queue_next_buffer(&video->queue, buf);
452 }
453}
454
455static void uvc_video_decode_bulk(struct urb *urb,
456 struct uvc_video_device *video, struct uvc_buffer *buf)
457{
458 u8 *mem;
459 int len, ret;
460
461 mem = urb->transfer_buffer;
462 len = urb->actual_length;
463 video->bulk.payload_size += len;
464
465 /* If the URB is the first of its payload, decode and save the
466 * header.
467 */
468 if (video->bulk.header_size == 0) {
469 do {
470 ret = uvc_video_decode_start(video, buf, mem, len);
471 if (ret == -EAGAIN)
472 buf = uvc_queue_next_buffer(&video->queue, buf);
473 } while (ret == -EAGAIN);
474
475 /* If an error occured skip the rest of the payload. */
476 if (ret < 0 || buf == NULL) {
477 video->bulk.skip_payload = 1;
478 return;
479 }
480
481 video->bulk.header_size = ret;
482 memcpy(video->bulk.header, mem, video->bulk.header_size);
483
484 mem += ret;
485 len -= ret;
486 }
487
488 /* The buffer queue might have been cancelled while a bulk transfer
489 * was in progress, so we can reach here with buf equal to NULL. Make
490 * sure buf is never dereferenced if NULL.
491 */
492
493 /* Process video data. */
494 if (!video->bulk.skip_payload && buf != NULL)
495 uvc_video_decode_data(video, buf, mem, len);
496
497 /* Detect the payload end by a URB smaller than the maximum size (or
498 * a payload size equal to the maximum) and process the header again.
499 */
500 if (urb->actual_length < urb->transfer_buffer_length ||
501 video->bulk.payload_size >= video->bulk.max_payload_size) {
502 if (!video->bulk.skip_payload && buf != NULL) {
503 uvc_video_decode_end(video, buf, video->bulk.header,
504 video->bulk.header_size);
505 if (buf->state == UVC_BUF_STATE_DONE ||
506 buf->state == UVC_BUF_STATE_ERROR)
507 buf = uvc_queue_next_buffer(&video->queue, buf);
508 }
509
510 video->bulk.header_size = 0;
511 video->bulk.skip_payload = 0;
512 video->bulk.payload_size = 0;
513 }
514}
515
516static void uvc_video_complete(struct urb *urb)
517{
518 struct uvc_video_device *video = urb->context;
519 struct uvc_video_queue *queue = &video->queue;
520 struct uvc_buffer *buf = NULL;
521 unsigned long flags;
522 int ret;
523
524 switch (urb->status) {
525 case 0:
526 break;
527
528 default:
529 uvc_printk(KERN_WARNING, "Non-zero status (%d) in video "
530 "completion handler.\n", urb->status);
531
532 case -ENOENT: /* usb_kill_urb() called. */
533 if (video->frozen)
534 return;
535
536 case -ECONNRESET: /* usb_unlink_urb() called. */
537 case -ESHUTDOWN: /* The endpoint is being disabled. */
538 uvc_queue_cancel(queue, urb->status == -ESHUTDOWN);
539 return;
540 }
541
542 spin_lock_irqsave(&queue->irqlock, flags);
543 if (!list_empty(&queue->irqqueue))
544 buf = list_first_entry(&queue->irqqueue, struct uvc_buffer,
545 queue);
546 spin_unlock_irqrestore(&queue->irqlock, flags);
547
548 video->decode(urb, video, buf);
549
550 if ((ret = usb_submit_urb(urb, GFP_ATOMIC)) < 0) {
551 uvc_printk(KERN_ERR, "Failed to resubmit video URB (%d).\n",
552 ret);
553 }
554}
555
556/*
557 * Uninitialize isochronous/bulk URBs and free transfer buffers.
558 */
559static void uvc_uninit_video(struct uvc_video_device *video)
560{
561 struct urb *urb;
562 unsigned int i;
563
564 for (i = 0; i < UVC_URBS; ++i) {
565 if ((urb = video->urb[i]) == NULL)
566 continue;
567
568 usb_kill_urb(urb);
569 /* urb->transfer_buffer_length is not touched by USB core, so
570 * we can use it here as the buffer length.
571 */
572 if (video->urb_buffer[i]) {
573 usb_buffer_free(video->dev->udev,
574 urb->transfer_buffer_length,
575 video->urb_buffer[i], urb->transfer_dma);
576 video->urb_buffer[i] = NULL;
577 }
578
579 usb_free_urb(urb);
580 video->urb[i] = NULL;
581 }
582}
583
584/*
585 * Initialize isochronous URBs and allocate transfer buffers. The packet size
586 * is given by the endpoint.
587 */
588static int uvc_init_video_isoc(struct uvc_video_device *video,
589 struct usb_host_endpoint *ep)
590{
591 struct urb *urb;
592 unsigned int npackets, i, j;
593 __u16 psize;
594 __u32 size;
595
596 /* Compute the number of isochronous packets to allocate by dividing
597 * the maximum video frame size by the packet size. Limit the result
598 * to UVC_MAX_ISO_PACKETS.
599 */
600 psize = le16_to_cpu(ep->desc.wMaxPacketSize);
601 psize = (psize & 0x07ff) * (1 + ((psize >> 11) & 3));
602
603 size = video->streaming->ctrl.dwMaxVideoFrameSize;
604 if (size > UVC_MAX_FRAME_SIZE)
605 return -EINVAL;
606
607 npackets = (size + psize - 1) / psize;
608 if (npackets > UVC_MAX_ISO_PACKETS)
609 npackets = UVC_MAX_ISO_PACKETS;
610
611 size = npackets * psize;
612
613 for (i = 0; i < UVC_URBS; ++i) {
614 urb = usb_alloc_urb(npackets, GFP_KERNEL);
615 if (urb == NULL) {
616 uvc_uninit_video(video);
617 return -ENOMEM;
618 }
619
620 video->urb_buffer[i] = usb_buffer_alloc(video->dev->udev,
621 size, GFP_KERNEL, &urb->transfer_dma);
622 if (video->urb_buffer[i] == NULL) {
623 usb_free_urb(urb);
624 uvc_uninit_video(video);
625 return -ENOMEM;
626 }
627
628 urb->dev = video->dev->udev;
629 urb->context = video;
630 urb->pipe = usb_rcvisocpipe(video->dev->udev,
631 ep->desc.bEndpointAddress);
632 urb->transfer_flags = URB_ISO_ASAP | URB_NO_TRANSFER_DMA_MAP;
633 urb->interval = ep->desc.bInterval;
634 urb->transfer_buffer = video->urb_buffer[i];
635 urb->complete = uvc_video_complete;
636 urb->number_of_packets = npackets;
637 urb->transfer_buffer_length = size;
638
639 for (j = 0; j < npackets; ++j) {
640 urb->iso_frame_desc[j].offset = j * psize;
641 urb->iso_frame_desc[j].length = psize;
642 }
643
644 video->urb[i] = urb;
645 }
646
647 return 0;
648}
649
650/*
651 * Initialize bulk URBs and allocate transfer buffers. The packet size is
652 * given by the endpoint.
653 */
654static int uvc_init_video_bulk(struct uvc_video_device *video,
655 struct usb_host_endpoint *ep)
656{
657 struct urb *urb;
658 unsigned int pipe, i;
659 __u16 psize;
660 __u32 size;
661
662 /* Compute the bulk URB size. Some devices set the maximum payload
663 * size to a value too high for memory-constrained devices. We must
664 * then transfer the payload accross multiple URBs. To be consistant
665 * with isochronous mode, allocate maximum UVC_MAX_ISO_PACKETS per bulk
666 * URB.
667 */
668 psize = le16_to_cpu(ep->desc.wMaxPacketSize) & 0x07ff;
669 size = video->streaming->ctrl.dwMaxPayloadTransferSize;
670 video->bulk.max_payload_size = size;
671 if (size > psize * UVC_MAX_ISO_PACKETS)
672 size = psize * UVC_MAX_ISO_PACKETS;
673
674 pipe = usb_rcvbulkpipe(video->dev->udev, ep->desc.bEndpointAddress);
675
676 for (i = 0; i < UVC_URBS; ++i) {
677 urb = usb_alloc_urb(0, GFP_KERNEL);
678 if (urb == NULL) {
679 uvc_uninit_video(video);
680 return -ENOMEM;
681 }
682
683 video->urb_buffer[i] = usb_buffer_alloc(video->dev->udev,
684 size, GFP_KERNEL, &urb->transfer_dma);
685 if (video->urb_buffer[i] == NULL) {
686 usb_free_urb(urb);
687 uvc_uninit_video(video);
688 return -ENOMEM;
689 }
690
691 usb_fill_bulk_urb(urb, video->dev->udev, pipe,
692 video->urb_buffer[i], size, uvc_video_complete,
693 video);
694 urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
695
696 video->urb[i] = urb;
697 }
698
699 return 0;
700}
701
702/*
703 * Initialize isochronous/bulk URBs and allocate transfer buffers.
704 */
705static int uvc_init_video(struct uvc_video_device *video)
706{
707 struct usb_interface *intf = video->streaming->intf;
708 struct usb_host_interface *alts;
709 struct usb_host_endpoint *ep = NULL;
710 int intfnum = video->streaming->intfnum;
711 unsigned int bandwidth, psize, i;
712 int ret;
713
714 video->last_fid = -1;
715 video->bulk.header_size = 0;
716 video->bulk.skip_payload = 0;
717 video->bulk.payload_size = 0;
718
719 if (intf->num_altsetting > 1) {
720 /* Isochronous endpoint, select the alternate setting. */
721 bandwidth = video->streaming->ctrl.dwMaxPayloadTransferSize;
722
723 if (bandwidth == 0) {
724 uvc_printk(KERN_WARNING, "device %s requested null "
725 "bandwidth, defaulting to lowest.\n",
726 video->vdev->name);
727 bandwidth = 1;
728 }
729
730 for (i = 0; i < intf->num_altsetting; ++i) {
731 alts = &intf->altsetting[i];
732 ep = uvc_find_endpoint(alts,
733 video->streaming->header.bEndpointAddress);
734 if (ep == NULL)
735 continue;
736
737 /* Check if the bandwidth is high enough. */
738 psize = le16_to_cpu(ep->desc.wMaxPacketSize);
739 psize = (psize & 0x07ff) * (1 + ((psize >> 11) & 3));
740 if (psize >= bandwidth)
741 break;
742 }
743
744 if (i >= intf->num_altsetting)
745 return -EIO;
746
747 if ((ret = usb_set_interface(video->dev->udev, intfnum, i)) < 0)
748 return ret;
749
750 ret = uvc_init_video_isoc(video, ep);
751 } else {
752 /* Bulk endpoint, proceed to URB initialization. */
753 ep = uvc_find_endpoint(&intf->altsetting[0],
754 video->streaming->header.bEndpointAddress);
755 if (ep == NULL)
756 return -EIO;
757
758 ret = uvc_init_video_bulk(video, ep);
759 }
760
761 if (ret < 0)
762 return ret;
763
764 /* Submit the URBs. */
765 for (i = 0; i < UVC_URBS; ++i) {
766 if ((ret = usb_submit_urb(video->urb[i], GFP_KERNEL)) < 0) {
767 uvc_printk(KERN_ERR, "Failed to submit URB %u "
768 "(%d).\n", i, ret);
769 uvc_uninit_video(video);
770 return ret;
771 }
772 }
773
774 return 0;
775}
776
777/* --------------------------------------------------------------------------
778 * Suspend/resume
779 */
780
781/*
782 * Stop streaming without disabling the video queue.
783 *
784 * To let userspace applications resume without trouble, we must not touch the
785 * video buffers in any way. We mark the device as frozen to make sure the URB
786 * completion handler won't try to cancel the queue when we kill the URBs.
787 */
788int uvc_video_suspend(struct uvc_video_device *video)
789{
790 if (!uvc_queue_streaming(&video->queue))
791 return 0;
792
793 video->frozen = 1;
794 uvc_uninit_video(video);
795 usb_set_interface(video->dev->udev, video->streaming->intfnum, 0);
796 return 0;
797}
798
799/*
800 * Reconfigure the video interface and restart streaming if it was enable
801 * before suspend.
802 *
803 * If an error occurs, disable the video queue. This will wake all pending
804 * buffers, making sure userspace applications are notified of the problem
805 * instead of waiting forever.
806 */
807int uvc_video_resume(struct uvc_video_device *video)
808{
809 int ret;
810
811 video->frozen = 0;
812
813 if ((ret = uvc_set_video_ctrl(video, &video->streaming->ctrl, 0)) < 0) {
814 uvc_queue_enable(&video->queue, 0);
815 return ret;
816 }
817
818 if (!uvc_queue_streaming(&video->queue))
819 return 0;
820
821 if ((ret = uvc_init_video(video)) < 0)
822 uvc_queue_enable(&video->queue, 0);
823
824 return ret;
825}
826
827/* ------------------------------------------------------------------------
828 * Video device
829 */
830
831/*
832 * Initialize the UVC video device by retrieving the default format and
833 * committing it.
834 *
835 * Some cameras (namely the Fuji Finepix) set the format and frame
836 * indexes to zero. The UVC standard doesn't clearly make this a spec
837 * violation, so try to silently fix the values if possible.
838 *
839 * This function is called before registering the device with V4L.
840 */
841int uvc_video_init(struct uvc_video_device *video)
842{
843 struct uvc_streaming_control *probe = &video->streaming->ctrl;
844 struct uvc_format *format = NULL;
845 struct uvc_frame *frame = NULL;
846 unsigned int i;
847 int ret;
848
849 if (video->streaming->nformats == 0) {
850 uvc_printk(KERN_INFO, "No supported video formats found.\n");
851 return -EINVAL;
852 }
853
854 /* Alternate setting 0 should be the default, yet the XBox Live Vision
855 * Cam (and possibly other devices) crash or otherwise misbehave if
856 * they don't receive a SET_INTERFACE request before any other video
857 * control request.
858 */
859 usb_set_interface(video->dev->udev, video->streaming->intfnum, 0);
860
861 /* Some webcams don't suport GET_DEF request on the probe control. We
862 * fall back to GET_CUR if GET_DEF fails.
863 */
864 if ((ret = uvc_get_video_ctrl(video, probe, 1, GET_DEF)) < 0 &&
865 (ret = uvc_get_video_ctrl(video, probe, 1, GET_CUR)) < 0)
866 return ret;
867
868 /* Check if the default format descriptor exists. Use the first
869 * available format otherwise.
870 */
871 for (i = video->streaming->nformats; i > 0; --i) {
872 format = &video->streaming->format[i-1];
873 if (format->index == probe->bFormatIndex)
874 break;
875 }
876
877 if (format->nframes == 0) {
878 uvc_printk(KERN_INFO, "No frame descriptor found for the "
879 "default format.\n");
880 return -EINVAL;
881 }
882
883 /* Zero bFrameIndex might be correct. Stream-based formats (including
884 * MPEG-2 TS and DV) do not support frames but have a dummy frame
885 * descriptor with bFrameIndex set to zero. If the default frame
886 * descriptor is not found, use the first avalable frame.
887 */
888 for (i = format->nframes; i > 0; --i) {
889 frame = &format->frame[i-1];
890 if (frame->bFrameIndex == probe->bFrameIndex)
891 break;
892 }
893
894 /* Commit the default settings. */
895 probe->bFormatIndex = format->index;
896 probe->bFrameIndex = frame->bFrameIndex;
897 if ((ret = uvc_set_video_ctrl(video, probe, 0)) < 0)
898 return ret;
899
900 video->streaming->cur_format = format;
901 video->streaming->cur_frame = frame;
902 atomic_set(&video->active, 0);
903
904 /* Select the video decoding function */
905 if (video->dev->quirks & UVC_QUIRK_BUILTIN_ISIGHT)
906 video->decode = uvc_video_decode_isight;
907 else if (video->streaming->intf->num_altsetting > 1)
908 video->decode = uvc_video_decode_isoc;
909 else
910 video->decode = uvc_video_decode_bulk;
911
912 return 0;
913}
914
915/*
916 * Enable or disable the video stream.
917 */
918int uvc_video_enable(struct uvc_video_device *video, int enable)
919{
920 int ret;
921
922 if (!enable) {
923 uvc_uninit_video(video);
924 usb_set_interface(video->dev->udev,
925 video->streaming->intfnum, 0);
926 uvc_queue_enable(&video->queue, 0);
927 return 0;
928 }
929
930 if ((ret = uvc_queue_enable(&video->queue, 1)) < 0)
931 return ret;
932
933 return uvc_init_video(video);
934}
diff --git a/drivers/media/video/uvc/uvcvideo.h b/drivers/media/video/uvc/uvcvideo.h
new file mode 100644
index 000000000000..a995a780db1c
--- /dev/null
+++ b/drivers/media/video/uvc/uvcvideo.h
@@ -0,0 +1,796 @@
1#ifndef _USB_VIDEO_H_
2#define _USB_VIDEO_H_
3
4#include <linux/kernel.h>
5#include <linux/videodev2.h>
6
7
8/*
9 * Dynamic controls
10 */
11
12/* Data types for UVC control data */
13#define UVC_CTRL_DATA_TYPE_RAW 0
14#define UVC_CTRL_DATA_TYPE_SIGNED 1
15#define UVC_CTRL_DATA_TYPE_UNSIGNED 2
16#define UVC_CTRL_DATA_TYPE_BOOLEAN 3
17#define UVC_CTRL_DATA_TYPE_ENUM 4
18#define UVC_CTRL_DATA_TYPE_BITMASK 5
19
20/* Control flags */
21#define UVC_CONTROL_SET_CUR (1 << 0)
22#define UVC_CONTROL_GET_CUR (1 << 1)
23#define UVC_CONTROL_GET_MIN (1 << 2)
24#define UVC_CONTROL_GET_MAX (1 << 3)
25#define UVC_CONTROL_GET_RES (1 << 4)
26#define UVC_CONTROL_GET_DEF (1 << 5)
27/* Control should be saved at suspend and restored at resume. */
28#define UVC_CONTROL_RESTORE (1 << 6)
29/* Control can be updated by the camera. */
30#define UVC_CONTROL_AUTO_UPDATE (1 << 7)
31
32#define UVC_CONTROL_GET_RANGE (UVC_CONTROL_GET_CUR | UVC_CONTROL_GET_MIN | \
33 UVC_CONTROL_GET_MAX | UVC_CONTROL_GET_RES | \
34 UVC_CONTROL_GET_DEF)
35
36struct uvc_xu_control_info {
37 __u8 entity[16];
38 __u8 index;
39 __u8 selector;
40 __u16 size;
41 __u32 flags;
42};
43
44struct uvc_xu_control_mapping {
45 __u32 id;
46 __u8 name[32];
47 __u8 entity[16];
48 __u8 selector;
49
50 __u8 size;
51 __u8 offset;
52 enum v4l2_ctrl_type v4l2_type;
53 __u32 data_type;
54};
55
56struct uvc_xu_control {
57 __u8 unit;
58 __u8 selector;
59 __u16 size;
60 __u8 __user *data;
61};
62
63#define UVCIOC_CTRL_ADD _IOW('U', 1, struct uvc_xu_control_info)
64#define UVCIOC_CTRL_MAP _IOWR('U', 2, struct uvc_xu_control_mapping)
65#define UVCIOC_CTRL_GET _IOWR('U', 3, struct uvc_xu_control)
66#define UVCIOC_CTRL_SET _IOW('U', 4, struct uvc_xu_control)
67
68#ifdef __KERNEL__
69
70#include <linux/poll.h>
71
72/* --------------------------------------------------------------------------
73 * UVC constants
74 */
75
76#define SC_UNDEFINED 0x00
77#define SC_VIDEOCONTROL 0x01
78#define SC_VIDEOSTREAMING 0x02
79#define SC_VIDEO_INTERFACE_COLLECTION 0x03
80
81#define PC_PROTOCOL_UNDEFINED 0x00
82
83#define CS_UNDEFINED 0x20
84#define CS_DEVICE 0x21
85#define CS_CONFIGURATION 0x22
86#define CS_STRING 0x23
87#define CS_INTERFACE 0x24
88#define CS_ENDPOINT 0x25
89
90/* VideoControl class specific interface descriptor */
91#define VC_DESCRIPTOR_UNDEFINED 0x00
92#define VC_HEADER 0x01
93#define VC_INPUT_TERMINAL 0x02
94#define VC_OUTPUT_TERMINAL 0x03
95#define VC_SELECTOR_UNIT 0x04
96#define VC_PROCESSING_UNIT 0x05
97#define VC_EXTENSION_UNIT 0x06
98
99/* VideoStreaming class specific interface descriptor */
100#define VS_UNDEFINED 0x00
101#define VS_INPUT_HEADER 0x01
102#define VS_OUTPUT_HEADER 0x02
103#define VS_STILL_IMAGE_FRAME 0x03
104#define VS_FORMAT_UNCOMPRESSED 0x04
105#define VS_FRAME_UNCOMPRESSED 0x05
106#define VS_FORMAT_MJPEG 0x06
107#define VS_FRAME_MJPEG 0x07
108#define VS_FORMAT_MPEG2TS 0x0a
109#define VS_FORMAT_DV 0x0c
110#define VS_COLORFORMAT 0x0d
111#define VS_FORMAT_FRAME_BASED 0x10
112#define VS_FRAME_FRAME_BASED 0x11
113#define VS_FORMAT_STREAM_BASED 0x12
114
115/* Endpoint type */
116#define EP_UNDEFINED 0x00
117#define EP_GENERAL 0x01
118#define EP_ENDPOINT 0x02
119#define EP_INTERRUPT 0x03
120
121/* Request codes */
122#define RC_UNDEFINED 0x00
123#define SET_CUR 0x01
124#define GET_CUR 0x81
125#define GET_MIN 0x82
126#define GET_MAX 0x83
127#define GET_RES 0x84
128#define GET_LEN 0x85
129#define GET_INFO 0x86
130#define GET_DEF 0x87
131
132/* VideoControl interface controls */
133#define VC_CONTROL_UNDEFINED 0x00
134#define VC_VIDEO_POWER_MODE_CONTROL 0x01
135#define VC_REQUEST_ERROR_CODE_CONTROL 0x02
136
137/* Terminal controls */
138#define TE_CONTROL_UNDEFINED 0x00
139
140/* Selector Unit controls */
141#define SU_CONTROL_UNDEFINED 0x00
142#define SU_INPUT_SELECT_CONTROL 0x01
143
144/* Camera Terminal controls */
145#define CT_CONTROL_UNDEFINED 0x00
146#define CT_SCANNING_MODE_CONTROL 0x01
147#define CT_AE_MODE_CONTROL 0x02
148#define CT_AE_PRIORITY_CONTROL 0x03
149#define CT_EXPOSURE_TIME_ABSOLUTE_CONTROL 0x04
150#define CT_EXPOSURE_TIME_RELATIVE_CONTROL 0x05
151#define CT_FOCUS_ABSOLUTE_CONTROL 0x06
152#define CT_FOCUS_RELATIVE_CONTROL 0x07
153#define CT_FOCUS_AUTO_CONTROL 0x08
154#define CT_IRIS_ABSOLUTE_CONTROL 0x09
155#define CT_IRIS_RELATIVE_CONTROL 0x0a
156#define CT_ZOOM_ABSOLUTE_CONTROL 0x0b
157#define CT_ZOOM_RELATIVE_CONTROL 0x0c
158#define CT_PANTILT_ABSOLUTE_CONTROL 0x0d
159#define CT_PANTILT_RELATIVE_CONTROL 0x0e
160#define CT_ROLL_ABSOLUTE_CONTROL 0x0f
161#define CT_ROLL_RELATIVE_CONTROL 0x10
162#define CT_PRIVACY_CONTROL 0x11
163
164/* Processing Unit controls */
165#define PU_CONTROL_UNDEFINED 0x00
166#define PU_BACKLIGHT_COMPENSATION_CONTROL 0x01
167#define PU_BRIGHTNESS_CONTROL 0x02
168#define PU_CONTRAST_CONTROL 0x03
169#define PU_GAIN_CONTROL 0x04
170#define PU_POWER_LINE_FREQUENCY_CONTROL 0x05
171#define PU_HUE_CONTROL 0x06
172#define PU_SATURATION_CONTROL 0x07
173#define PU_SHARPNESS_CONTROL 0x08
174#define PU_GAMMA_CONTROL 0x09
175#define PU_WHITE_BALANCE_TEMPERATURE_CONTROL 0x0a
176#define PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL 0x0b
177#define PU_WHITE_BALANCE_COMPONENT_CONTROL 0x0c
178#define PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL 0x0d
179#define PU_DIGITAL_MULTIPLIER_CONTROL 0x0e
180#define PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL 0x0f
181#define PU_HUE_AUTO_CONTROL 0x10
182#define PU_ANALOG_VIDEO_STANDARD_CONTROL 0x11
183#define PU_ANALOG_LOCK_STATUS_CONTROL 0x12
184
185#define LXU_MOTOR_PANTILT_RELATIVE_CONTROL 0x01
186#define LXU_MOTOR_PANTILT_RESET_CONTROL 0x02
187#define LXU_MOTOR_FOCUS_MOTOR_CONTROL 0x03
188
189/* VideoStreaming interface controls */
190#define VS_CONTROL_UNDEFINED 0x00
191#define VS_PROBE_CONTROL 0x01
192#define VS_COMMIT_CONTROL 0x02
193#define VS_STILL_PROBE_CONTROL 0x03
194#define VS_STILL_COMMIT_CONTROL 0x04
195#define VS_STILL_IMAGE_TRIGGER_CONTROL 0x05
196#define VS_STREAM_ERROR_CODE_CONTROL 0x06
197#define VS_GENERATE_KEY_FRAME_CONTROL 0x07
198#define VS_UPDATE_FRAME_SEGMENT_CONTROL 0x08
199#define VS_SYNC_DELAY_CONTROL 0x09
200
201#define TT_VENDOR_SPECIFIC 0x0100
202#define TT_STREAMING 0x0101
203
204/* Input Terminal types */
205#define ITT_VENDOR_SPECIFIC 0x0200
206#define ITT_CAMERA 0x0201
207#define ITT_MEDIA_TRANSPORT_INPUT 0x0202
208
209/* Output Terminal types */
210#define OTT_VENDOR_SPECIFIC 0x0300
211#define OTT_DISPLAY 0x0301
212#define OTT_MEDIA_TRANSPORT_OUTPUT 0x0302
213
214/* External Terminal types */
215#define EXTERNAL_VENDOR_SPECIFIC 0x0400
216#define COMPOSITE_CONNECTOR 0x0401
217#define SVIDEO_CONNECTOR 0x0402
218#define COMPONENT_CONNECTOR 0x0403
219
220#define UVC_TERM_INPUT 0x0000
221#define UVC_TERM_OUTPUT 0x8000
222
223#define UVC_ENTITY_TYPE(entity) ((entity)->type & 0x7fff)
224#define UVC_ENTITY_IS_UNIT(entity) (((entity)->type & 0xff00) == 0)
225#define UVC_ENTITY_IS_TERM(entity) (((entity)->type & 0xff00) != 0)
226#define UVC_ENTITY_IS_ITERM(entity) \
227 (((entity)->type & 0x8000) == UVC_TERM_INPUT)
228#define UVC_ENTITY_IS_OTERM(entity) \
229 (((entity)->type & 0x8000) == UVC_TERM_OUTPUT)
230
231#define UVC_STATUS_TYPE_CONTROL 1
232#define UVC_STATUS_TYPE_STREAMING 2
233
234/* ------------------------------------------------------------------------
235 * GUIDs
236 */
237#define UVC_GUID_UVC_CAMERA \
238 {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
239 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}
240#define UVC_GUID_UVC_OUTPUT \
241 {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
242 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02}
243#define UVC_GUID_UVC_MEDIA_TRANSPORT_INPUT \
244 {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
245 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03}
246#define UVC_GUID_UVC_PROCESSING \
247 {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
248 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01}
249#define UVC_GUID_UVC_SELECTOR \
250 {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
251 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02}
252
253#define UVC_GUID_LOGITECH_DEV_INFO \
254 {0x82, 0x06, 0x61, 0x63, 0x70, 0x50, 0xab, 0x49, \
255 0xb8, 0xcc, 0xb3, 0x85, 0x5e, 0x8d, 0x22, 0x1e}
256#define UVC_GUID_LOGITECH_USER_HW \
257 {0x82, 0x06, 0x61, 0x63, 0x70, 0x50, 0xab, 0x49, \
258 0xb8, 0xcc, 0xb3, 0x85, 0x5e, 0x8d, 0x22, 0x1f}
259#define UVC_GUID_LOGITECH_VIDEO \
260 {0x82, 0x06, 0x61, 0x63, 0x70, 0x50, 0xab, 0x49, \
261 0xb8, 0xcc, 0xb3, 0x85, 0x5e, 0x8d, 0x22, 0x50}
262#define UVC_GUID_LOGITECH_MOTOR \
263 {0x82, 0x06, 0x61, 0x63, 0x70, 0x50, 0xab, 0x49, \
264 0xb8, 0xcc, 0xb3, 0x85, 0x5e, 0x8d, 0x22, 0x56}
265
266#define UVC_GUID_FORMAT_MJPEG \
267 { 'M', 'J', 'P', 'G', 0x00, 0x00, 0x10, 0x00, \
268 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
269#define UVC_GUID_FORMAT_YUY2 \
270 { 'Y', 'U', 'Y', '2', 0x00, 0x00, 0x10, 0x00, \
271 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
272#define UVC_GUID_FORMAT_NV12 \
273 { 'N', 'V', '1', '2', 0x00, 0x00, 0x10, 0x00, \
274 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
275#define UVC_GUID_FORMAT_YV12 \
276 { 'Y', 'V', '1', '2', 0x00, 0x00, 0x10, 0x00, \
277 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
278#define UVC_GUID_FORMAT_I420 \
279 { 'I', '4', '2', '0', 0x00, 0x00, 0x10, 0x00, \
280 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
281#define UVC_GUID_FORMAT_UYVY \
282 { 'U', 'Y', 'V', 'Y', 0x00, 0x00, 0x10, 0x00, \
283 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
284#define UVC_GUID_FORMAT_Y800 \
285 { 'Y', '8', '0', '0', 0x00, 0x00, 0x10, 0x00, \
286 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
287#define UVC_GUID_FORMAT_BY8 \
288 { 'B', 'Y', '8', ' ', 0x00, 0x00, 0x10, 0x00, \
289 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
290
291
292/* ------------------------------------------------------------------------
293 * Driver specific constants.
294 */
295
296#define DRIVER_VERSION_NUMBER KERNEL_VERSION(0, 1, 0)
297
298/* Number of isochronous URBs. */
299#define UVC_URBS 5
300/* Maximum number of packets per isochronous URB. */
301#define UVC_MAX_ISO_PACKETS 40
302/* Maximum frame size in bytes, for sanity checking. */
303#define UVC_MAX_FRAME_SIZE (16*1024*1024)
304/* Maximum number of video buffers. */
305#define UVC_MAX_VIDEO_BUFFERS 32
306
307#define UVC_CTRL_CONTROL_TIMEOUT 300
308#define UVC_CTRL_STREAMING_TIMEOUT 1000
309
310/* Devices quirks */
311#define UVC_QUIRK_STATUS_INTERVAL 0x00000001
312#define UVC_QUIRK_PROBE_MINMAX 0x00000002
313#define UVC_QUIRK_PROBE_EXTRAFIELDS 0x00000004
314#define UVC_QUIRK_BUILTIN_ISIGHT 0x00000008
315#define UVC_QUIRK_STREAM_NO_FID 0x00000010
316#define UVC_QUIRK_IGNORE_SELECTOR_UNIT 0x00000020
317
318/* Format flags */
319#define UVC_FMT_FLAG_COMPRESSED 0x00000001
320#define UVC_FMT_FLAG_STREAM 0x00000002
321
322/* ------------------------------------------------------------------------
323 * Structures.
324 */
325
326struct uvc_device;
327
328/* TODO: Put the most frequently accessed fields at the beginning of
329 * structures to maximize cache efficiency.
330 */
331struct uvc_streaming_control {
332 __u16 bmHint;
333 __u8 bFormatIndex;
334 __u8 bFrameIndex;
335 __u32 dwFrameInterval;
336 __u16 wKeyFrameRate;
337 __u16 wPFrameRate;
338 __u16 wCompQuality;
339 __u16 wCompWindowSize;
340 __u16 wDelay;
341 __u32 dwMaxVideoFrameSize;
342 __u32 dwMaxPayloadTransferSize;
343 __u32 dwClockFrequency;
344 __u8 bmFramingInfo;
345 __u8 bPreferedVersion;
346 __u8 bMinVersion;
347 __u8 bMaxVersion;
348};
349
350struct uvc_menu_info {
351 __u32 value;
352 __u8 name[32];
353};
354
355struct uvc_control_info {
356 struct list_head list;
357 struct list_head mappings;
358
359 __u8 entity[16];
360 __u8 index;
361 __u8 selector;
362
363 __u16 size;
364 __u32 flags;
365};
366
367struct uvc_control_mapping {
368 struct list_head list;
369
370 struct uvc_control_info *ctrl;
371
372 __u32 id;
373 __u8 name[32];
374 __u8 entity[16];
375 __u8 selector;
376
377 __u8 size;
378 __u8 offset;
379 enum v4l2_ctrl_type v4l2_type;
380 __u32 data_type;
381
382 struct uvc_menu_info *menu_info;
383 __u32 menu_count;
384};
385
386struct uvc_control {
387 struct uvc_entity *entity;
388 struct uvc_control_info *info;
389
390 __u8 index; /* Used to match the uvc_control entry with a
391 uvc_control_info. */
392 __u8 dirty : 1,
393 loaded : 1,
394 modified : 1;
395
396 __u8 *data;
397};
398
399struct uvc_format_desc {
400 char *name;
401 __u8 guid[16];
402 __u32 fcc;
403};
404
405/* The term 'entity' refers to both UVC units and UVC terminals.
406 *
407 * The type field is either the terminal type (wTerminalType in the terminal
408 * descriptor), or the unit type (bDescriptorSubtype in the unit descriptor).
409 * As the bDescriptorSubtype field is one byte long, the type value will
410 * always have a null MSB for units. All terminal types defined by the UVC
411 * specification have a non-null MSB, so it is safe to use the MSB to
412 * differentiate between units and terminals as long as the descriptor parsing
413 * code makes sure terminal types have a non-null MSB.
414 *
415 * For terminals, the type's most significant bit stores the terminal
416 * direction (either UVC_TERM_INPUT or UVC_TERM_OUTPUT). The type field should
417 * always be accessed with the UVC_ENTITY_* macros and never directly.
418 */
419
420struct uvc_entity {
421 struct list_head list; /* Entity as part of a UVC device. */
422 struct list_head chain; /* Entity as part of a video device
423 * chain. */
424 __u8 id;
425 __u16 type;
426 char name[64];
427
428 union {
429 struct {
430 __u16 wObjectiveFocalLengthMin;
431 __u16 wObjectiveFocalLengthMax;
432 __u16 wOcularFocalLength;
433 __u8 bControlSize;
434 __u8 *bmControls;
435 } camera;
436
437 struct {
438 __u8 bControlSize;
439 __u8 *bmControls;
440 __u8 bTransportModeSize;
441 __u8 *bmTransportModes;
442 } media;
443
444 struct {
445 __u8 bSourceID;
446 } output;
447
448 struct {
449 __u8 bSourceID;
450 __u16 wMaxMultiplier;
451 __u8 bControlSize;
452 __u8 *bmControls;
453 __u8 bmVideoStandards;
454 } processing;
455
456 struct {
457 __u8 bNrInPins;
458 __u8 *baSourceID;
459 } selector;
460
461 struct {
462 __u8 guidExtensionCode[16];
463 __u8 bNumControls;
464 __u8 bNrInPins;
465 __u8 *baSourceID;
466 __u8 bControlSize;
467 __u8 *bmControls;
468 __u8 *bmControlsType;
469 } extension;
470 };
471
472 unsigned int ncontrols;
473 struct uvc_control *controls;
474};
475
476struct uvc_frame {
477 __u8 bFrameIndex;
478 __u8 bmCapabilities;
479 __u16 wWidth;
480 __u16 wHeight;
481 __u32 dwMinBitRate;
482 __u32 dwMaxBitRate;
483 __u32 dwMaxVideoFrameBufferSize;
484 __u8 bFrameIntervalType;
485 __u32 dwDefaultFrameInterval;
486 __u32 *dwFrameInterval;
487};
488
489struct uvc_format {
490 __u8 type;
491 __u8 index;
492 __u8 bpp;
493 __u8 colorspace;
494 __u32 fcc;
495 __u32 flags;
496
497 char name[32];
498
499 unsigned int nframes;
500 struct uvc_frame *frame;
501};
502
503struct uvc_streaming_header {
504 __u8 bNumFormats;
505 __u8 bEndpointAddress;
506 __u8 bTerminalLink;
507 __u8 bControlSize;
508 __u8 *bmaControls;
509 /* The following fields are used by input headers only. */
510 __u8 bmInfo;
511 __u8 bStillCaptureMethod;
512 __u8 bTriggerSupport;
513 __u8 bTriggerUsage;
514};
515
516struct uvc_streaming {
517 struct list_head list;
518
519 struct usb_interface *intf;
520 int intfnum;
521 __u16 maxpsize;
522
523 struct uvc_streaming_header header;
524
525 unsigned int nformats;
526 struct uvc_format *format;
527
528 struct uvc_streaming_control ctrl;
529 struct uvc_format *cur_format;
530 struct uvc_frame *cur_frame;
531
532 struct mutex mutex;
533};
534
535enum uvc_buffer_state {
536 UVC_BUF_STATE_IDLE = 0,
537 UVC_BUF_STATE_QUEUED = 1,
538 UVC_BUF_STATE_ACTIVE = 2,
539 UVC_BUF_STATE_DONE = 3,
540 UVC_BUF_STATE_ERROR = 4,
541};
542
543struct uvc_buffer {
544 unsigned long vma_use_count;
545 struct list_head stream;
546
547 /* Touched by interrupt handler. */
548 struct v4l2_buffer buf;
549 struct list_head queue;
550 wait_queue_head_t wait;
551 enum uvc_buffer_state state;
552};
553
554#define UVC_QUEUE_STREAMING (1 << 0)
555#define UVC_QUEUE_DISCONNECTED (1 << 1)
556#define UVC_QUEUE_DROP_INCOMPLETE (1 << 2)
557
558struct uvc_video_queue {
559 void *mem;
560 unsigned int flags;
561 __u32 sequence;
562
563 unsigned int count;
564 unsigned int buf_size;
565 struct uvc_buffer buffer[UVC_MAX_VIDEO_BUFFERS];
566 struct mutex mutex; /* protects buffers and mainqueue */
567 spinlock_t irqlock; /* protects irqqueue */
568
569 struct list_head mainqueue;
570 struct list_head irqqueue;
571};
572
573struct uvc_video_device {
574 struct uvc_device *dev;
575 struct video_device *vdev;
576 atomic_t active;
577 unsigned int frozen : 1;
578
579 struct list_head iterms;
580 struct uvc_entity *oterm;
581 struct uvc_entity *processing;
582 struct uvc_entity *selector;
583 struct list_head extensions;
584 struct mutex ctrl_mutex;
585
586 struct uvc_video_queue queue;
587
588 /* Video streaming object, must always be non-NULL. */
589 struct uvc_streaming *streaming;
590
591 void (*decode) (struct urb *urb, struct uvc_video_device *video,
592 struct uvc_buffer *buf);
593
594 /* Context data used by the bulk completion handler. */
595 struct {
596 __u8 header[256];
597 unsigned int header_size;
598 int skip_payload;
599 __u32 payload_size;
600 __u32 max_payload_size;
601 } bulk;
602
603 struct urb *urb[UVC_URBS];
604 char *urb_buffer[UVC_URBS];
605
606 __u8 last_fid;
607};
608
609enum uvc_device_state {
610 UVC_DEV_DISCONNECTED = 1,
611};
612
613struct uvc_device {
614 struct usb_device *udev;
615 struct usb_interface *intf;
616 __u32 quirks;
617 int intfnum;
618 char name[32];
619
620 enum uvc_device_state state;
621 struct kref kref;
622 struct list_head list;
623
624 /* Video control interface */
625 __u16 uvc_version;
626 __u32 clock_frequency;
627
628 struct list_head entities;
629
630 struct uvc_video_device video;
631
632 /* Status Interrupt Endpoint */
633 struct usb_host_endpoint *int_ep;
634 struct urb *int_urb;
635 __u8 status[16];
636 struct input_dev *input;
637
638 /* Video Streaming interfaces */
639 struct list_head streaming;
640};
641
642enum uvc_handle_state {
643 UVC_HANDLE_PASSIVE = 0,
644 UVC_HANDLE_ACTIVE = 1,
645};
646
647struct uvc_fh {
648 struct uvc_video_device *device;
649 enum uvc_handle_state state;
650};
651
652struct uvc_driver {
653 struct usb_driver driver;
654
655 struct mutex open_mutex; /* protects from open/disconnect race */
656
657 struct list_head devices; /* struct uvc_device list */
658 struct list_head controls; /* struct uvc_control_info list */
659 struct mutex ctrl_mutex; /* protects controls and devices
660 lists */
661};
662
663/* ------------------------------------------------------------------------
664 * Debugging, printing and logging
665 */
666
667#define UVC_TRACE_PROBE (1 << 0)
668#define UVC_TRACE_DESCR (1 << 1)
669#define UVC_TRACE_CONTROL (1 << 2)
670#define UVC_TRACE_FORMAT (1 << 3)
671#define UVC_TRACE_CAPTURE (1 << 4)
672#define UVC_TRACE_CALLS (1 << 5)
673#define UVC_TRACE_IOCTL (1 << 6)
674#define UVC_TRACE_FRAME (1 << 7)
675#define UVC_TRACE_SUSPEND (1 << 8)
676#define UVC_TRACE_STATUS (1 << 9)
677
678extern unsigned int uvc_trace_param;
679
680#define uvc_trace(flag, msg...) \
681 do { \
682 if (uvc_trace_param & flag) \
683 printk(KERN_DEBUG "uvcvideo: " msg); \
684 } while (0)
685
686#define uvc_printk(level, msg...) \
687 printk(level "uvcvideo: " msg)
688
689#define UVC_GUID_FORMAT "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-" \
690 "%02x%02x%02x%02x%02x%02x"
691#define UVC_GUID_ARGS(guid) \
692 (guid)[3], (guid)[2], (guid)[1], (guid)[0], \
693 (guid)[5], (guid)[4], \
694 (guid)[7], (guid)[6], \
695 (guid)[8], (guid)[9], \
696 (guid)[10], (guid)[11], (guid)[12], \
697 (guid)[13], (guid)[14], (guid)[15]
698
699/* --------------------------------------------------------------------------
700 * Internal functions.
701 */
702
703/* Core driver */
704extern struct uvc_driver uvc_driver;
705extern void uvc_delete(struct kref *kref);
706
707/* Video buffers queue management. */
708extern void uvc_queue_init(struct uvc_video_queue *queue);
709extern int uvc_alloc_buffers(struct uvc_video_queue *queue,
710 unsigned int nbuffers, unsigned int buflength);
711extern int uvc_free_buffers(struct uvc_video_queue *queue);
712extern int uvc_query_buffer(struct uvc_video_queue *queue,
713 struct v4l2_buffer *v4l2_buf);
714extern int uvc_queue_buffer(struct uvc_video_queue *queue,
715 struct v4l2_buffer *v4l2_buf);
716extern int uvc_dequeue_buffer(struct uvc_video_queue *queue,
717 struct v4l2_buffer *v4l2_buf, int nonblocking);
718extern int uvc_queue_enable(struct uvc_video_queue *queue, int enable);
719extern void uvc_queue_cancel(struct uvc_video_queue *queue, int disconnect);
720extern struct uvc_buffer *uvc_queue_next_buffer(struct uvc_video_queue *queue,
721 struct uvc_buffer *buf);
722extern unsigned int uvc_queue_poll(struct uvc_video_queue *queue,
723 struct file *file, poll_table *wait);
724static inline int uvc_queue_streaming(struct uvc_video_queue *queue)
725{
726 return queue->flags & UVC_QUEUE_STREAMING;
727}
728
729/* V4L2 interface */
730extern struct file_operations uvc_fops;
731
732/* Video */
733extern int uvc_video_init(struct uvc_video_device *video);
734extern int uvc_video_suspend(struct uvc_video_device *video);
735extern int uvc_video_resume(struct uvc_video_device *video);
736extern int uvc_video_enable(struct uvc_video_device *video, int enable);
737extern int uvc_probe_video(struct uvc_video_device *video,
738 struct uvc_streaming_control *probe);
739extern int uvc_query_ctrl(struct uvc_device *dev, __u8 query, __u8 unit,
740 __u8 intfnum, __u8 cs, void *data, __u16 size);
741extern int uvc_set_video_ctrl(struct uvc_video_device *video,
742 struct uvc_streaming_control *ctrl, int probe);
743
744/* Status */
745extern int uvc_status_init(struct uvc_device *dev);
746extern void uvc_status_cleanup(struct uvc_device *dev);
747extern int uvc_status_suspend(struct uvc_device *dev);
748extern int uvc_status_resume(struct uvc_device *dev);
749
750/* Controls */
751extern struct uvc_control *uvc_find_control(struct uvc_video_device *video,
752 __u32 v4l2_id, struct uvc_control_mapping **mapping);
753extern int uvc_query_v4l2_ctrl(struct uvc_video_device *video,
754 struct v4l2_queryctrl *v4l2_ctrl);
755
756extern int uvc_ctrl_add_info(struct uvc_control_info *info);
757extern int uvc_ctrl_add_mapping(struct uvc_control_mapping *mapping);
758extern int uvc_ctrl_init_device(struct uvc_device *dev);
759extern void uvc_ctrl_cleanup_device(struct uvc_device *dev);
760extern int uvc_ctrl_resume_device(struct uvc_device *dev);
761extern void uvc_ctrl_init(void);
762
763extern int uvc_ctrl_begin(struct uvc_video_device *video);
764extern int __uvc_ctrl_commit(struct uvc_video_device *video, int rollback);
765static inline int uvc_ctrl_commit(struct uvc_video_device *video)
766{
767 return __uvc_ctrl_commit(video, 0);
768}
769static inline int uvc_ctrl_rollback(struct uvc_video_device *video)
770{
771 return __uvc_ctrl_commit(video, 1);
772}
773
774extern int uvc_ctrl_get(struct uvc_video_device *video,
775 struct v4l2_ext_control *xctrl);
776extern int uvc_ctrl_set(struct uvc_video_device *video,
777 struct v4l2_ext_control *xctrl);
778
779extern int uvc_xu_ctrl_query(struct uvc_video_device *video,
780 struct uvc_xu_control *ctrl, int set);
781
782/* Utility functions */
783extern void uvc_simplify_fraction(uint32_t *numerator, uint32_t *denominator,
784 unsigned int n_terms, unsigned int threshold);
785extern uint32_t uvc_fraction_to_interval(uint32_t numerator,
786 uint32_t denominator);
787extern struct usb_host_endpoint *uvc_find_endpoint(
788 struct usb_host_interface *alts, __u8 epaddr);
789
790/* Quirks support */
791void uvc_video_decode_isight(struct urb *urb, struct uvc_video_device *video,
792 struct uvc_buffer *buf);
793
794#endif /* __KERNEL__ */
795
796#endif
diff --git a/drivers/media/video/videobuf-core.c b/drivers/media/video/videobuf-core.c
index 982f4463896c..0a88c44ace00 100644
--- a/drivers/media/video/videobuf-core.c
+++ b/drivers/media/video/videobuf-core.c
@@ -331,7 +331,7 @@ int videobuf_mmap_free(struct videobuf_queue *q)
331} 331}
332 332
333/* Locking: Caller holds q->vb_lock */ 333/* Locking: Caller holds q->vb_lock */
334static int __videobuf_mmap_setup(struct videobuf_queue *q, 334int __videobuf_mmap_setup(struct videobuf_queue *q,
335 unsigned int bcount, unsigned int bsize, 335 unsigned int bcount, unsigned int bsize,
336 enum v4l2_memory memory) 336 enum v4l2_memory memory)
337{ 337{
@@ -1129,6 +1129,7 @@ EXPORT_SYMBOL_GPL(videobuf_read_stream);
1129EXPORT_SYMBOL_GPL(videobuf_read_one); 1129EXPORT_SYMBOL_GPL(videobuf_read_one);
1130EXPORT_SYMBOL_GPL(videobuf_poll_stream); 1130EXPORT_SYMBOL_GPL(videobuf_poll_stream);
1131 1131
1132EXPORT_SYMBOL_GPL(__videobuf_mmap_setup);
1132EXPORT_SYMBOL_GPL(videobuf_mmap_setup); 1133EXPORT_SYMBOL_GPL(videobuf_mmap_setup);
1133EXPORT_SYMBOL_GPL(videobuf_mmap_free); 1134EXPORT_SYMBOL_GPL(videobuf_mmap_free);
1134EXPORT_SYMBOL_GPL(videobuf_mmap_mapper); 1135EXPORT_SYMBOL_GPL(videobuf_mmap_mapper);
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c
index 31e8af0ba278..67a661cf5219 100644
--- a/drivers/media/video/videodev.c
+++ b/drivers/media/video/videodev.c
@@ -51,12 +51,51 @@
51#define VIDEO_NUM_DEVICES 256 51#define VIDEO_NUM_DEVICES 256
52#define VIDEO_NAME "video4linux" 52#define VIDEO_NAME "video4linux"
53 53
54struct std_descr {
55 v4l2_std_id std;
56 const char *descr;
57};
58
59static const struct std_descr standards[] = {
60 { V4L2_STD_NTSC, "NTSC" },
61 { V4L2_STD_NTSC_M, "NTSC-M" },
62 { V4L2_STD_NTSC_M_JP, "NTSC-M-JP" },
63 { V4L2_STD_NTSC_M_KR, "NTSC-M-KR" },
64 { V4L2_STD_NTSC_443, "NTSC-443" },
65 { V4L2_STD_PAL, "PAL" },
66 { V4L2_STD_PAL_BG, "PAL-BG" },
67 { V4L2_STD_PAL_B, "PAL-B" },
68 { V4L2_STD_PAL_B1, "PAL-B1" },
69 { V4L2_STD_PAL_G, "PAL-G" },
70 { V4L2_STD_PAL_H, "PAL-H" },
71 { V4L2_STD_PAL_I, "PAL-I" },
72 { V4L2_STD_PAL_DK, "PAL-DK" },
73 { V4L2_STD_PAL_D, "PAL-D" },
74 { V4L2_STD_PAL_D1, "PAL-D1" },
75 { V4L2_STD_PAL_K, "PAL-K" },
76 { V4L2_STD_PAL_M, "PAL-M" },
77 { V4L2_STD_PAL_N, "PAL-N" },
78 { V4L2_STD_PAL_Nc, "PAL-Nc" },
79 { V4L2_STD_PAL_60, "PAL-60" },
80 { V4L2_STD_SECAM, "SECAM" },
81 { V4L2_STD_SECAM_B, "SECAM-B" },
82 { V4L2_STD_SECAM_G, "SECAM-G" },
83 { V4L2_STD_SECAM_H, "SECAM-H" },
84 { V4L2_STD_SECAM_DK, "SECAM-DK" },
85 { V4L2_STD_SECAM_D, "SECAM-D" },
86 { V4L2_STD_SECAM_K, "SECAM-K" },
87 { V4L2_STD_SECAM_K1, "SECAM-K1" },
88 { V4L2_STD_SECAM_L, "SECAM-L" },
89 { V4L2_STD_SECAM_LC, "SECAM-Lc" },
90 { 0, "Unknown" }
91};
92
54/* video4linux standard ID conversion to standard name 93/* video4linux standard ID conversion to standard name
55 */ 94 */
56char *v4l2_norm_to_name(v4l2_std_id id) 95const char *v4l2_norm_to_name(v4l2_std_id id)
57{ 96{
58 char *name;
59 u32 myid = id; 97 u32 myid = id;
98 int i;
60 99
61 /* HACK: ppc32 architecture doesn't have __ucmpdi2 function to handle 100 /* HACK: ppc32 architecture doesn't have __ucmpdi2 function to handle
62 64 bit comparations. So, on that architecture, with some gcc 101 64 bit comparations. So, on that architecture, with some gcc
@@ -64,110 +103,17 @@ char *v4l2_norm_to_name(v4l2_std_id id)
64 */ 103 */
65 BUG_ON(myid != id); 104 BUG_ON(myid != id);
66 105
67 switch (myid) { 106 for (i = 0; standards[i].std; i++)
68 case V4L2_STD_PAL: 107 if (myid == standards[i].std)
69 name = "PAL"; 108 break;
70 break; 109 return standards[i].descr;
71 case V4L2_STD_PAL_BG:
72 name = "PAL-BG";
73 break;
74 case V4L2_STD_PAL_DK:
75 name = "PAL-DK";
76 break;
77 case V4L2_STD_PAL_B:
78 name = "PAL-B";
79 break;
80 case V4L2_STD_PAL_B1:
81 name = "PAL-B1";
82 break;
83 case V4L2_STD_PAL_G:
84 name = "PAL-G";
85 break;
86 case V4L2_STD_PAL_H:
87 name = "PAL-H";
88 break;
89 case V4L2_STD_PAL_I:
90 name = "PAL-I";
91 break;
92 case V4L2_STD_PAL_D:
93 name = "PAL-D";
94 break;
95 case V4L2_STD_PAL_D1:
96 name = "PAL-D1";
97 break;
98 case V4L2_STD_PAL_K:
99 name = "PAL-K";
100 break;
101 case V4L2_STD_PAL_M:
102 name = "PAL-M";
103 break;
104 case V4L2_STD_PAL_N:
105 name = "PAL-N";
106 break;
107 case V4L2_STD_PAL_Nc:
108 name = "PAL-Nc";
109 break;
110 case V4L2_STD_PAL_60:
111 name = "PAL-60";
112 break;
113 case V4L2_STD_NTSC:
114 name = "NTSC";
115 break;
116 case V4L2_STD_NTSC_M:
117 name = "NTSC-M";
118 break;
119 case V4L2_STD_NTSC_M_JP:
120 name = "NTSC-M-JP";
121 break;
122 case V4L2_STD_NTSC_443:
123 name = "NTSC-443";
124 break;
125 case V4L2_STD_NTSC_M_KR:
126 name = "NTSC-M-KR";
127 break;
128 case V4L2_STD_SECAM:
129 name = "SECAM";
130 break;
131 case V4L2_STD_SECAM_DK:
132 name = "SECAM-DK";
133 break;
134 case V4L2_STD_SECAM_B:
135 name = "SECAM-B";
136 break;
137 case V4L2_STD_SECAM_D:
138 name = "SECAM-D";
139 break;
140 case V4L2_STD_SECAM_G:
141 name = "SECAM-G";
142 break;
143 case V4L2_STD_SECAM_H:
144 name = "SECAM-H";
145 break;
146 case V4L2_STD_SECAM_K:
147 name = "SECAM-K";
148 break;
149 case V4L2_STD_SECAM_K1:
150 name = "SECAM-K1";
151 break;
152 case V4L2_STD_SECAM_L:
153 name = "SECAM-L";
154 break;
155 case V4L2_STD_SECAM_LC:
156 name = "SECAM-LC";
157 break;
158 default:
159 name = "Unknown";
160 break;
161 }
162
163 return name;
164} 110}
165EXPORT_SYMBOL(v4l2_norm_to_name); 111EXPORT_SYMBOL(v4l2_norm_to_name);
166 112
167/* Fill in the fields of a v4l2_standard structure according to the 113/* Fill in the fields of a v4l2_standard structure according to the
168 'id' and 'transmission' parameters. Returns negative on error. */ 114 'id' and 'transmission' parameters. Returns negative on error. */
169int v4l2_video_std_construct(struct v4l2_standard *vs, 115int v4l2_video_std_construct(struct v4l2_standard *vs,
170 int id, char *name) 116 int id, const char *name)
171{ 117{
172 u32 index = vs->index; 118 u32 index = vs->index;
173 119
@@ -1218,95 +1164,40 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1218 case VIDIOC_ENUMSTD: 1164 case VIDIOC_ENUMSTD:
1219 { 1165 {
1220 struct v4l2_standard *p = arg; 1166 struct v4l2_standard *p = arg;
1221 v4l2_std_id id = vfd->tvnorms,curr_id=0; 1167 v4l2_std_id id = vfd->tvnorms, curr_id = 0;
1222 unsigned int index = p->index,i; 1168 unsigned int index = p->index, i, j = 0;
1223 1169 const char *descr = "";
1224 if (index<0) { 1170
1225 ret=-EINVAL; 1171 /* Return norm array in a canonical way */
1226 break; 1172 for (i = 0; i <= index && id; i++) {
1227 } 1173 /* last std value in the standards array is 0, so this
1228 1174 while always ends there since (id & 0) == 0. */
1229 /* Return norm array on a canonical way */ 1175 while ((id & standards[j].std) != standards[j].std)
1230 for (i=0;i<= index && id; i++) { 1176 j++;
1231 if ( (id & V4L2_STD_PAL) == V4L2_STD_PAL) { 1177 curr_id = standards[j].std;
1232 curr_id = V4L2_STD_PAL; 1178 descr = standards[j].descr;
1233 } else if ( (id & V4L2_STD_PAL_BG) == V4L2_STD_PAL_BG) { 1179 j++;
1234 curr_id = V4L2_STD_PAL_BG; 1180 if (curr_id == 0)
1235 } else if ( (id & V4L2_STD_PAL_DK) == V4L2_STD_PAL_DK) {
1236 curr_id = V4L2_STD_PAL_DK;
1237 } else if ( (id & V4L2_STD_PAL_B) == V4L2_STD_PAL_B) {
1238 curr_id = V4L2_STD_PAL_B;
1239 } else if ( (id & V4L2_STD_PAL_B1) == V4L2_STD_PAL_B1) {
1240 curr_id = V4L2_STD_PAL_B1;
1241 } else if ( (id & V4L2_STD_PAL_G) == V4L2_STD_PAL_G) {
1242 curr_id = V4L2_STD_PAL_G;
1243 } else if ( (id & V4L2_STD_PAL_H) == V4L2_STD_PAL_H) {
1244 curr_id = V4L2_STD_PAL_H;
1245 } else if ( (id & V4L2_STD_PAL_I) == V4L2_STD_PAL_I) {
1246 curr_id = V4L2_STD_PAL_I;
1247 } else if ( (id & V4L2_STD_PAL_D) == V4L2_STD_PAL_D) {
1248 curr_id = V4L2_STD_PAL_D;
1249 } else if ( (id & V4L2_STD_PAL_D1) == V4L2_STD_PAL_D1) {
1250 curr_id = V4L2_STD_PAL_D1;
1251 } else if ( (id & V4L2_STD_PAL_K) == V4L2_STD_PAL_K) {
1252 curr_id = V4L2_STD_PAL_K;
1253 } else if ( (id & V4L2_STD_PAL_M) == V4L2_STD_PAL_M) {
1254 curr_id = V4L2_STD_PAL_M;
1255 } else if ( (id & V4L2_STD_PAL_N) == V4L2_STD_PAL_N) {
1256 curr_id = V4L2_STD_PAL_N;
1257 } else if ( (id & V4L2_STD_PAL_Nc) == V4L2_STD_PAL_Nc) {
1258 curr_id = V4L2_STD_PAL_Nc;
1259 } else if ( (id & V4L2_STD_PAL_60) == V4L2_STD_PAL_60) {
1260 curr_id = V4L2_STD_PAL_60;
1261 } else if ( (id & V4L2_STD_NTSC) == V4L2_STD_NTSC) {
1262 curr_id = V4L2_STD_NTSC;
1263 } else if ( (id & V4L2_STD_NTSC_M) == V4L2_STD_NTSC_M) {
1264 curr_id = V4L2_STD_NTSC_M;
1265 } else if ( (id & V4L2_STD_NTSC_M_JP) == V4L2_STD_NTSC_M_JP) {
1266 curr_id = V4L2_STD_NTSC_M_JP;
1267 } else if ( (id & V4L2_STD_NTSC_443) == V4L2_STD_NTSC_443) {
1268 curr_id = V4L2_STD_NTSC_443;
1269 } else if ( (id & V4L2_STD_NTSC_M_KR) == V4L2_STD_NTSC_M_KR) {
1270 curr_id = V4L2_STD_NTSC_M_KR;
1271 } else if ( (id & V4L2_STD_SECAM) == V4L2_STD_SECAM) {
1272 curr_id = V4L2_STD_SECAM;
1273 } else if ( (id & V4L2_STD_SECAM_DK) == V4L2_STD_SECAM_DK) {
1274 curr_id = V4L2_STD_SECAM_DK;
1275 } else if ( (id & V4L2_STD_SECAM_B) == V4L2_STD_SECAM_B) {
1276 curr_id = V4L2_STD_SECAM_B;
1277 } else if ( (id & V4L2_STD_SECAM_D) == V4L2_STD_SECAM_D) {
1278 curr_id = V4L2_STD_SECAM_D;
1279 } else if ( (id & V4L2_STD_SECAM_G) == V4L2_STD_SECAM_G) {
1280 curr_id = V4L2_STD_SECAM_G;
1281 } else if ( (id & V4L2_STD_SECAM_H) == V4L2_STD_SECAM_H) {
1282 curr_id = V4L2_STD_SECAM_H;
1283 } else if ( (id & V4L2_STD_SECAM_K) == V4L2_STD_SECAM_K) {
1284 curr_id = V4L2_STD_SECAM_K;
1285 } else if ( (id & V4L2_STD_SECAM_K1) == V4L2_STD_SECAM_K1) {
1286 curr_id = V4L2_STD_SECAM_K1;
1287 } else if ( (id & V4L2_STD_SECAM_L) == V4L2_STD_SECAM_L) {
1288 curr_id = V4L2_STD_SECAM_L;
1289 } else if ( (id & V4L2_STD_SECAM_LC) == V4L2_STD_SECAM_LC) {
1290 curr_id = V4L2_STD_SECAM_LC;
1291 } else {
1292 break; 1181 break;
1293 } 1182 if (curr_id != V4L2_STD_PAL &&
1294 id &= ~curr_id; 1183 curr_id != V4L2_STD_SECAM &&
1184 curr_id != V4L2_STD_NTSC)
1185 id &= ~curr_id;
1295 } 1186 }
1296 if (i<=index) 1187 if (i <= index)
1297 return -EINVAL; 1188 return -EINVAL;
1298 1189
1299 v4l2_video_std_construct(p, curr_id,v4l2_norm_to_name(curr_id)); 1190 v4l2_video_std_construct(p, curr_id, descr);
1300 p->index = index; 1191 p->index = index;
1301 1192
1302 dbgarg (cmd, "index=%d, id=%Ld, name=%s, fps=%d/%d, " 1193 dbgarg(cmd, "index=%d, id=%Ld, name=%s, fps=%d/%d, "
1303 "framelines=%d\n", p->index, 1194 "framelines=%d\n", p->index,
1304 (unsigned long long)p->id, p->name, 1195 (unsigned long long)p->id, p->name,
1305 p->frameperiod.numerator, 1196 p->frameperiod.numerator,
1306 p->frameperiod.denominator, 1197 p->frameperiod.denominator,
1307 p->framelines); 1198 p->framelines);
1308 1199
1309 ret=0; 1200 ret = 0;
1310 break; 1201 break;
1311 } 1202 }
1312 case VIDIOC_G_STD: 1203 case VIDIOC_G_STD:
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c
index 845be1864f68..5ff9a58b6135 100644
--- a/drivers/media/video/vivi.c
+++ b/drivers/media/video/vivi.c
@@ -327,13 +327,14 @@ static void vivi_fillbuff(struct vivi_dev *dev, struct vivi_buffer *buf)
327 int hmax = buf->vb.height; 327 int hmax = buf->vb.height;
328 int wmax = buf->vb.width; 328 int wmax = buf->vb.width;
329 struct timeval ts; 329 struct timeval ts;
330 char *tmpbuf = kmalloc(wmax * 2, GFP_ATOMIC); 330 char *tmpbuf;
331 void *vbuf = videobuf_to_vmalloc(&buf->vb); 331 void *vbuf = videobuf_to_vmalloc(&buf->vb);
332 332
333 if (!tmpbuf) 333 if (!vbuf)
334 return; 334 return;
335 335
336 if (!vbuf) 336 tmpbuf = kmalloc(wmax * 2, GFP_ATOMIC);
337 if (!tmpbuf)
337 return; 338 return;
338 339
339 for (h = 0; h < hmax; h++) { 340 for (h = 0; h < hmax; h++) {
diff --git a/drivers/media/video/zoran.h b/drivers/media/video/zoran.h
index 81cc3b00a079..46b7ad477ceb 100644
--- a/drivers/media/video/zoran.h
+++ b/drivers/media/video/zoran.h
@@ -285,7 +285,7 @@ struct zoran_mapping {
285 285
286struct zoran_jpg_buffer { 286struct zoran_jpg_buffer {
287 struct zoran_mapping *map; 287 struct zoran_mapping *map;
288 u32 *frag_tab; /* addresses of frag table */ 288 __le32 *frag_tab; /* addresses of frag table */
289 u32 frag_tab_bus; /* same value cached to save time in ISR */ 289 u32 frag_tab_bus; /* same value cached to save time in ISR */
290 enum zoran_buffer_state state; /* non-zero if corresponding buffer is in use in grab queue */ 290 enum zoran_buffer_state state; /* non-zero if corresponding buffer is in use in grab queue */
291 struct zoran_sync bs; /* DONE: info to return to application */ 291 struct zoran_sync bs; /* DONE: info to return to application */
@@ -450,7 +450,7 @@ struct zoran {
450 unsigned long jpg_queued_num; /* count of frames queued since grab/play started */ 450 unsigned long jpg_queued_num; /* count of frames queued since grab/play started */
451 451
452 /* zr36057's code buffer table */ 452 /* zr36057's code buffer table */
453 u32 *stat_com; /* stat_com[i] is indexed by dma_head/tail & BUZ_MASK_STAT_COM */ 453 __le32 *stat_com; /* stat_com[i] is indexed by dma_head/tail & BUZ_MASK_STAT_COM */
454 454
455 /* (value & BUZ_MASK_FRAME) corresponds to index in pend[] queue */ 455 /* (value & BUZ_MASK_FRAME) corresponds to index in pend[] queue */
456 int jpg_pend[BUZ_MAX_FRAME]; 456 int jpg_pend[BUZ_MAX_FRAME];
diff --git a/drivers/media/video/zoran_device.c b/drivers/media/video/zoran_device.c
index 37629ffd34c3..88d369708e4c 100644
--- a/drivers/media/video/zoran_device.c
+++ b/drivers/media/video/zoran_device.c
@@ -1320,7 +1320,7 @@ error_handler (struct zoran *zr,
1320 if (i) { 1320 if (i) {
1321 /* Rotate stat_comm entries to make current entry first */ 1321 /* Rotate stat_comm entries to make current entry first */
1322 int j; 1322 int j;
1323 u32 bus_addr[BUZ_NUM_STAT_COM]; 1323 __le32 bus_addr[BUZ_NUM_STAT_COM];
1324 1324
1325 /* Here we are copying the stat_com array, which 1325 /* Here we are copying the stat_com array, which
1326 * is already in little endian format, so 1326 * is already in little endian format, so
diff --git a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c
index 345c77e46837..5394d7a5cfee 100644
--- a/drivers/media/video/zoran_driver.c
+++ b/drivers/media/video/zoran_driver.c
@@ -495,7 +495,7 @@ jpg_fbuffer_alloc (struct file *file)
495 jpg_fbuffer_free(file); 495 jpg_fbuffer_free(file);
496 return -ENOBUFS; 496 return -ENOBUFS;
497 } 497 }
498 fh->jpg_buffers.buffer[i].frag_tab = (u32 *) mem; 498 fh->jpg_buffers.buffer[i].frag_tab = (__le32 *) mem;
499 fh->jpg_buffers.buffer[i].frag_tab_bus = 499 fh->jpg_buffers.buffer[i].frag_tab_bus =
500 virt_to_bus((void *) mem); 500 virt_to_bus((void *) mem);
501 501
@@ -1167,7 +1167,7 @@ zoran_close_end_session (struct file *file)
1167 1167
1168 /* v4l capture */ 1168 /* v4l capture */
1169 if (fh->v4l_buffers.active != ZORAN_FREE) { 1169 if (fh->v4l_buffers.active != ZORAN_FREE) {
1170 long flags; 1170 unsigned long flags;
1171 1171
1172 spin_lock_irqsave(&zr->spinlock, flags); 1172 spin_lock_irqsave(&zr->spinlock, flags);
1173 zr36057_set_memgrab(zr, 0); 1173 zr36057_set_memgrab(zr, 0);
@@ -3436,7 +3436,7 @@ zoran_do_ioctl (struct inode *inode,
3436 3436
3437 /* unload capture */ 3437 /* unload capture */
3438 if (zr->v4l_memgrab_active) { 3438 if (zr->v4l_memgrab_active) {
3439 long flags; 3439 unsigned long flags;
3440 3440
3441 spin_lock_irqsave(&zr->spinlock, flags); 3441 spin_lock_irqsave(&zr->spinlock, flags);
3442 zr36057_set_memgrab(zr, 0); 3442 zr36057_set_memgrab(zr, 0);
@@ -4375,7 +4375,7 @@ zoran_vm_close (struct vm_area_struct *vma)
4375 mutex_lock(&zr->resource_lock); 4375 mutex_lock(&zr->resource_lock);
4376 4376
4377 if (fh->v4l_buffers.active != ZORAN_FREE) { 4377 if (fh->v4l_buffers.active != ZORAN_FREE) {
4378 long flags; 4378 unsigned long flags;
4379 4379
4380 spin_lock_irqsave(&zr->spinlock, flags); 4380 spin_lock_irqsave(&zr->spinlock, flags);
4381 zr36057_set_memgrab(zr, 0); 4381 zr36057_set_memgrab(zr, 0);
@@ -4506,7 +4506,7 @@ zoran_mmap (struct file *file,
4506 if (todo > fraglen) 4506 if (todo > fraglen)
4507 todo = fraglen; 4507 todo = fraglen;
4508 pos = 4508 pos =
4509 le32_to_cpu((unsigned long) fh->jpg_buffers. 4509 le32_to_cpu(fh->jpg_buffers.
4510 buffer[i].frag_tab[2 * j]); 4510 buffer[i].frag_tab[2 * j]);
4511 /* should just be pos on i386 */ 4511 /* should just be pos on i386 */
4512 page = virt_to_phys(bus_to_virt(pos)) 4512 page = virt_to_phys(bus_to_virt(pos))
diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c
index 3cdd4e962115..1e24ab4ac38c 100644
--- a/drivers/message/fusion/mptfc.c
+++ b/drivers/message/fusion/mptfc.c
@@ -1238,8 +1238,6 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1238 sh->max_id = ioc->pfacts->MaxDevices; 1238 sh->max_id = ioc->pfacts->MaxDevices;
1239 sh->max_lun = max_lun; 1239 sh->max_lun = max_lun;
1240 1240
1241 sh->this_id = ioc->pfacts[0].PortSCSIID;
1242
1243 /* Required entry. 1241 /* Required entry.
1244 */ 1242 */
1245 sh->unique_id = ioc->id; 1243 sh->unique_id = ioc->id;
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index 468480771f13..4d492ba232b0 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -3193,8 +3193,6 @@ mptsas_probe(struct pci_dev *pdev, const struct pci_device_id *id)
3193 3193
3194 sh->transportt = mptsas_transport_template; 3194 sh->transportt = mptsas_transport_template;
3195 3195
3196 sh->this_id = ioc->pfacts[0].PortSCSIID;
3197
3198 /* Required entry. 3196 /* Required entry.
3199 */ 3197 */
3200 sh->unique_id = ioc->id; 3198 sh->unique_id = ioc->id;
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index b109bd8a4d19..c68ef00c2f92 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -2451,12 +2451,6 @@ mptscsih_slave_configure(struct scsi_device *sdev)
2451 ioc->name, sdev->sdtr, sdev->wdtr, 2451 ioc->name, sdev->sdtr, sdev->wdtr,
2452 sdev->ppr, sdev->inquiry_len)); 2452 sdev->ppr, sdev->inquiry_len));
2453 2453
2454 if (sdev->id > sh->max_id) {
2455 /* error case, should never happen */
2456 scsi_adjust_queue_depth(sdev, 0, 1);
2457 goto slave_configure_exit;
2458 }
2459
2460 vdevice->configured_lun = 1; 2454 vdevice->configured_lun = 1;
2461 mptscsih_change_queue_depth(sdev, MPT_SCSI_CMD_PER_DEV_HIGH); 2455 mptscsih_change_queue_depth(sdev, MPT_SCSI_CMD_PER_DEV_HIGH);
2462 2456
@@ -2470,8 +2464,6 @@ mptscsih_slave_configure(struct scsi_device *sdev)
2470 ioc->name, vtarget->negoFlags, vtarget->maxOffset, 2464 ioc->name, vtarget->negoFlags, vtarget->maxOffset,
2471 vtarget->minSyncFactor)); 2465 vtarget->minSyncFactor));
2472 2466
2473slave_configure_exit:
2474
2475 dsprintk(ioc, printk(MYIOC_s_DEBUG_FMT 2467 dsprintk(ioc, printk(MYIOC_s_DEBUG_FMT
2476 "tagged %d, simple %d, ordered %d\n", 2468 "tagged %d, simple %d, ordered %d\n",
2477 ioc->name,sdev->tagged_supported, sdev->simple_tags, 2469 ioc->name,sdev->tagged_supported, sdev->simple_tags,
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 2566479937c9..ae96bd6242f2 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -24,7 +24,7 @@ config MFD_ASIC3
24 24
25config HTC_EGPIO 25config HTC_EGPIO
26 bool "HTC EGPIO support" 26 bool "HTC EGPIO support"
27 depends on GENERIC_HARDIRQS && HAVE_GPIO_LIB 27 depends on GENERIC_HARDIRQS && HAVE_GPIO_LIB && ARM
28 help 28 help
29 This driver supports the CPLD egpio chip present on 29 This driver supports the CPLD egpio chip present on
30 several HTC phones. It provides basic support for input 30 several HTC phones. It provides basic support for input
diff --git a/drivers/misc/fujitsu-laptop.c b/drivers/misc/fujitsu-laptop.c
index e2e7c05a147b..6d14e8fe1537 100644
--- a/drivers/misc/fujitsu-laptop.c
+++ b/drivers/misc/fujitsu-laptop.c
@@ -352,3 +352,9 @@ MODULE_AUTHOR("Jonathan Woithe");
352MODULE_DESCRIPTION("Fujitsu laptop extras support"); 352MODULE_DESCRIPTION("Fujitsu laptop extras support");
353MODULE_VERSION(FUJITSU_DRIVER_VERSION); 353MODULE_VERSION(FUJITSU_DRIVER_VERSION);
354MODULE_LICENSE("GPL"); 354MODULE_LICENSE("GPL");
355
356static struct pnp_device_id pnp_ids[] = {
357 { .id = "FUJ02bf" },
358 { .id = "" }
359};
360MODULE_DEVICE_TABLE(pnp, pnp_ids);
diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c
index fa394104339c..e4ff50b95a5e 100644
--- a/drivers/misc/kgdbts.c
+++ b/drivers/misc/kgdbts.c
@@ -102,7 +102,6 @@
102#include <linux/nmi.h> 102#include <linux/nmi.h>
103#include <linux/delay.h> 103#include <linux/delay.h>
104#include <linux/kthread.h> 104#include <linux/kthread.h>
105#include <linux/delay.h>
106 105
107#define v1printk(a...) do { \ 106#define v1printk(a...) do { \
108 if (verbose) \ 107 if (verbose) \
@@ -119,7 +118,6 @@
119 } while (0) 118 } while (0)
120#define MAX_CONFIG_LEN 40 119#define MAX_CONFIG_LEN 40
121 120
122static const char hexchars[] = "0123456789abcdef";
123static struct kgdb_io kgdbts_io_ops; 121static struct kgdb_io kgdbts_io_ops;
124static char get_buf[BUFMAX]; 122static char get_buf[BUFMAX];
125static int get_buf_cnt; 123static int get_buf_cnt;
@@ -131,6 +129,8 @@ static int repeat_test;
131static int test_complete; 129static int test_complete;
132static int send_ack; 130static int send_ack;
133static int final_ack; 131static int final_ack;
132static int force_hwbrks;
133static int hwbreaks_ok;
134static int hw_break_val; 134static int hw_break_val;
135static int hw_break_val2; 135static int hw_break_val2;
136#if defined(CONFIG_ARM) || defined(CONFIG_MIPS) || defined(CONFIG_SPARC) 136#if defined(CONFIG_ARM) || defined(CONFIG_MIPS) || defined(CONFIG_SPARC)
@@ -234,12 +234,12 @@ static void break_helper(char *bp_type, char *arg, unsigned long vaddr)
234 234
235static void sw_break(char *arg) 235static void sw_break(char *arg)
236{ 236{
237 break_helper("Z0", arg, 0); 237 break_helper(force_hwbrks ? "Z1" : "Z0", arg, 0);
238} 238}
239 239
240static void sw_rem_break(char *arg) 240static void sw_rem_break(char *arg)
241{ 241{
242 break_helper("z0", arg, 0); 242 break_helper(force_hwbrks ? "z1" : "z0", arg, 0);
243} 243}
244 244
245static void hw_break(char *arg) 245static void hw_break(char *arg)
@@ -619,8 +619,8 @@ static void fill_get_buf(char *buf)
619 count++; 619 count++;
620 } 620 }
621 strcat(get_buf, "#"); 621 strcat(get_buf, "#");
622 get_buf[count + 2] = hexchars[checksum >> 4]; 622 get_buf[count + 2] = hex_asc_hi(checksum);
623 get_buf[count + 3] = hexchars[checksum & 0xf]; 623 get_buf[count + 3] = hex_asc_lo(checksum);
624 get_buf[count + 4] = '\0'; 624 get_buf[count + 4] = '\0';
625 v2printk("get%i: %s\n", ts.idx, get_buf); 625 v2printk("get%i: %s\n", ts.idx, get_buf);
626} 626}
@@ -781,6 +781,8 @@ static void run_breakpoint_test(int is_hw_breakpoint)
781 return; 781 return;
782 782
783 eprintk("kgdbts: ERROR %s test failed\n", ts.name); 783 eprintk("kgdbts: ERROR %s test failed\n", ts.name);
784 if (is_hw_breakpoint)
785 hwbreaks_ok = 0;
784} 786}
785 787
786static void run_hw_break_test(int is_write_test) 788static void run_hw_break_test(int is_write_test)
@@ -798,9 +800,11 @@ static void run_hw_break_test(int is_write_test)
798 kgdb_breakpoint(); 800 kgdb_breakpoint();
799 hw_break_val_access(); 801 hw_break_val_access();
800 if (is_write_test) { 802 if (is_write_test) {
801 if (test_complete == 2) 803 if (test_complete == 2) {
802 eprintk("kgdbts: ERROR %s broke on access\n", 804 eprintk("kgdbts: ERROR %s broke on access\n",
803 ts.name); 805 ts.name);
806 hwbreaks_ok = 0;
807 }
804 hw_break_val_write(); 808 hw_break_val_write();
805 } 809 }
806 kgdb_breakpoint(); 810 kgdb_breakpoint();
@@ -809,6 +813,7 @@ static void run_hw_break_test(int is_write_test)
809 return; 813 return;
810 814
811 eprintk("kgdbts: ERROR %s test failed\n", ts.name); 815 eprintk("kgdbts: ERROR %s test failed\n", ts.name);
816 hwbreaks_ok = 0;
812} 817}
813 818
814static void run_nmi_sleep_test(int nmi_sleep) 819static void run_nmi_sleep_test(int nmi_sleep)
@@ -912,6 +917,7 @@ static void kgdbts_run_tests(void)
912 917
913 /* All HW break point tests */ 918 /* All HW break point tests */
914 if (arch_kgdb_ops.flags & KGDB_HW_BREAKPOINT) { 919 if (arch_kgdb_ops.flags & KGDB_HW_BREAKPOINT) {
920 hwbreaks_ok = 1;
915 v1printk("kgdbts:RUN hw breakpoint test\n"); 921 v1printk("kgdbts:RUN hw breakpoint test\n");
916 run_breakpoint_test(1); 922 run_breakpoint_test(1);
917 v1printk("kgdbts:RUN hw write breakpoint test\n"); 923 v1printk("kgdbts:RUN hw write breakpoint test\n");
@@ -925,6 +931,19 @@ static void kgdbts_run_tests(void)
925 run_nmi_sleep_test(nmi_sleep); 931 run_nmi_sleep_test(nmi_sleep);
926 } 932 }
927 933
934#ifdef CONFIG_DEBUG_RODATA
935 /* Until there is an api to write to read-only text segments, use
936 * HW breakpoints for the remainder of any tests, else print a
937 * failure message if hw breakpoints do not work.
938 */
939 if (!(arch_kgdb_ops.flags & KGDB_HW_BREAKPOINT && hwbreaks_ok)) {
940 eprintk("kgdbts: HW breakpoints do not work,"
941 "skipping remaining tests\n");
942 return;
943 }
944 force_hwbrks = 1;
945#endif /* CONFIG_DEBUG_RODATA */
946
928 /* If the do_fork test is run it will be the last test that is 947 /* If the do_fork test is run it will be the last test that is
929 * executed because a kernel thread will be spawned at the very 948 * executed because a kernel thread will be spawned at the very
930 * end to unregister the debug hooks. 949 * end to unregister the debug hooks.
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
index 3f28f6eabdbf..b5969298f3d3 100644
--- a/drivers/misc/thinkpad_acpi.c
+++ b/drivers/misc/thinkpad_acpi.c
@@ -1293,7 +1293,7 @@ static void tpacpi_input_send_radiosw(void)
1293 mutex_lock(&tpacpi_inputdev_send_mutex); 1293 mutex_lock(&tpacpi_inputdev_send_mutex);
1294 1294
1295 input_report_switch(tpacpi_inputdev, 1295 input_report_switch(tpacpi_inputdev,
1296 SW_RADIO, !!wlsw); 1296 SW_RFKILL_ALL, !!wlsw);
1297 input_sync(tpacpi_inputdev); 1297 input_sync(tpacpi_inputdev);
1298 1298
1299 mutex_unlock(&tpacpi_inputdev_send_mutex); 1299 mutex_unlock(&tpacpi_inputdev_send_mutex);
@@ -1921,6 +1921,29 @@ static struct attribute *hotkey_mask_attributes[] __initdata = {
1921 &dev_attr_hotkey_wakeup_hotunplug_complete.attr, 1921 &dev_attr_hotkey_wakeup_hotunplug_complete.attr,
1922}; 1922};
1923 1923
1924static void hotkey_exit(void)
1925{
1926#ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL
1927 hotkey_poll_stop_sync();
1928#endif
1929
1930 if (hotkey_dev_attributes)
1931 delete_attr_set(hotkey_dev_attributes, &tpacpi_pdev->dev.kobj);
1932
1933 kfree(hotkey_keycode_map);
1934
1935 if (tp_features.hotkey) {
1936 dbg_printk(TPACPI_DBG_EXIT,
1937 "restoring original hot key mask\n");
1938 /* no short-circuit boolean operator below! */
1939 if ((hotkey_mask_set(hotkey_orig_mask) |
1940 hotkey_status_set(hotkey_orig_status)) != 0)
1941 printk(TPACPI_ERR
1942 "failed to restore hot key mask "
1943 "to BIOS defaults\n");
1944 }
1945}
1946
1924static int __init hotkey_init(struct ibm_init_struct *iibm) 1947static int __init hotkey_init(struct ibm_init_struct *iibm)
1925{ 1948{
1926 /* Requirements for changing the default keymaps: 1949 /* Requirements for changing the default keymaps:
@@ -2060,226 +2083,220 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
2060 vdbg_printk(TPACPI_DBG_INIT, "hotkeys are %s\n", 2083 vdbg_printk(TPACPI_DBG_INIT, "hotkeys are %s\n",
2061 str_supported(tp_features.hotkey)); 2084 str_supported(tp_features.hotkey));
2062 2085
2063 if (tp_features.hotkey) { 2086 if (!tp_features.hotkey)
2064 hotkey_dev_attributes = create_attr_set(13, NULL); 2087 return 1;
2065 if (!hotkey_dev_attributes)
2066 return -ENOMEM;
2067 res = add_many_to_attr_set(hotkey_dev_attributes,
2068 hotkey_attributes,
2069 ARRAY_SIZE(hotkey_attributes));
2070 if (res)
2071 return res;
2072 2088
2073 /* mask not supported on 570, 600e/x, 770e, 770x, A21e, A2xm/p, 2089 hotkey_dev_attributes = create_attr_set(13, NULL);
2074 A30, R30, R31, T20-22, X20-21, X22-24. Detected by checking 2090 if (!hotkey_dev_attributes)
2075 for HKEY interface version 0x100 */ 2091 return -ENOMEM;
2076 if (acpi_evalf(hkey_handle, &hkeyv, "MHKV", "qd")) { 2092 res = add_many_to_attr_set(hotkey_dev_attributes,
2077 if ((hkeyv >> 8) != 1) { 2093 hotkey_attributes,
2078 printk(TPACPI_ERR "unknown version of the " 2094 ARRAY_SIZE(hotkey_attributes));
2079 "HKEY interface: 0x%x\n", hkeyv); 2095 if (res)
2080 printk(TPACPI_ERR "please report this to %s\n", 2096 goto err_exit;
2081 TPACPI_MAIL); 2097
2082 } else { 2098 /* mask not supported on 570, 600e/x, 770e, 770x, A21e, A2xm/p,
2083 /* 2099 A30, R30, R31, T20-22, X20-21, X22-24. Detected by checking
2084 * MHKV 0x100 in A31, R40, R40e, 2100 for HKEY interface version 0x100 */
2085 * T4x, X31, and later 2101 if (acpi_evalf(hkey_handle, &hkeyv, "MHKV", "qd")) {
2086 */ 2102 if ((hkeyv >> 8) != 1) {
2087 tp_features.hotkey_mask = 1; 2103 printk(TPACPI_ERR "unknown version of the "
2088 } 2104 "HKEY interface: 0x%x\n", hkeyv);
2105 printk(TPACPI_ERR "please report this to %s\n",
2106 TPACPI_MAIL);
2107 } else {
2108 /*
2109 * MHKV 0x100 in A31, R40, R40e,
2110 * T4x, X31, and later
2111 */
2112 tp_features.hotkey_mask = 1;
2089 } 2113 }
2114 }
2090 2115
2091 vdbg_printk(TPACPI_DBG_INIT, "hotkey masks are %s\n", 2116 vdbg_printk(TPACPI_DBG_INIT, "hotkey masks are %s\n",
2092 str_supported(tp_features.hotkey_mask)); 2117 str_supported(tp_features.hotkey_mask));
2093 2118
2094 if (tp_features.hotkey_mask) { 2119 if (tp_features.hotkey_mask) {
2095 if (!acpi_evalf(hkey_handle, &hotkey_all_mask, 2120 if (!acpi_evalf(hkey_handle, &hotkey_all_mask,
2096 "MHKA", "qd")) { 2121 "MHKA", "qd")) {
2097 printk(TPACPI_ERR 2122 printk(TPACPI_ERR
2098 "missing MHKA handler, " 2123 "missing MHKA handler, "
2099 "please report this to %s\n", 2124 "please report this to %s\n",
2100 TPACPI_MAIL); 2125 TPACPI_MAIL);
2101 /* FN+F12, FN+F4, FN+F3 */ 2126 /* FN+F12, FN+F4, FN+F3 */
2102 hotkey_all_mask = 0x080cU; 2127 hotkey_all_mask = 0x080cU;
2103 }
2104 } 2128 }
2129 }
2105 2130
2106 /* hotkey_source_mask *must* be zero for 2131 /* hotkey_source_mask *must* be zero for
2107 * the first hotkey_mask_get */ 2132 * the first hotkey_mask_get */
2108 res = hotkey_status_get(&hotkey_orig_status); 2133 res = hotkey_status_get(&hotkey_orig_status);
2109 if (!res && tp_features.hotkey_mask) { 2134 if (res)
2110 res = hotkey_mask_get(); 2135 goto err_exit;
2111 hotkey_orig_mask = hotkey_mask; 2136
2112 if (!res) { 2137 if (tp_features.hotkey_mask) {
2113 res = add_many_to_attr_set( 2138 res = hotkey_mask_get();
2114 hotkey_dev_attributes, 2139 if (res)
2115 hotkey_mask_attributes, 2140 goto err_exit;
2116 ARRAY_SIZE(hotkey_mask_attributes)); 2141
2117 } 2142 hotkey_orig_mask = hotkey_mask;
2118 } 2143 res = add_many_to_attr_set(
2144 hotkey_dev_attributes,
2145 hotkey_mask_attributes,
2146 ARRAY_SIZE(hotkey_mask_attributes));
2147 if (res)
2148 goto err_exit;
2149 }
2119 2150
2120#ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL 2151#ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL
2121 if (tp_features.hotkey_mask) { 2152 if (tp_features.hotkey_mask) {
2122 hotkey_source_mask = TPACPI_HKEY_NVRAM_GOOD_MASK 2153 hotkey_source_mask = TPACPI_HKEY_NVRAM_GOOD_MASK
2123 & ~hotkey_all_mask; 2154 & ~hotkey_all_mask;
2124 } else { 2155 } else {
2125 hotkey_source_mask = TPACPI_HKEY_NVRAM_GOOD_MASK; 2156 hotkey_source_mask = TPACPI_HKEY_NVRAM_GOOD_MASK;
2126 } 2157 }
2127 2158
2128 vdbg_printk(TPACPI_DBG_INIT, 2159 vdbg_printk(TPACPI_DBG_INIT,
2129 "hotkey source mask 0x%08x, polling freq %d\n", 2160 "hotkey source mask 0x%08x, polling freq %d\n",
2130 hotkey_source_mask, hotkey_poll_freq); 2161 hotkey_source_mask, hotkey_poll_freq);
2131#endif 2162#endif
2132 2163
2133 /* Not all thinkpads have a hardware radio switch */ 2164 /* Not all thinkpads have a hardware radio switch */
2134 if (!res && acpi_evalf(hkey_handle, &status, "WLSW", "qd")) { 2165 if (acpi_evalf(hkey_handle, &status, "WLSW", "qd")) {
2135 tp_features.hotkey_wlsw = 1; 2166 tp_features.hotkey_wlsw = 1;
2136 printk(TPACPI_INFO 2167 printk(TPACPI_INFO
2137 "radio switch found; radios are %s\n", 2168 "radio switch found; radios are %s\n",
2138 enabled(status, 0)); 2169 enabled(status, 0));
2139 res = add_to_attr_set(hotkey_dev_attributes, 2170 res = add_to_attr_set(hotkey_dev_attributes,
2140 &dev_attr_hotkey_radio_sw.attr); 2171 &dev_attr_hotkey_radio_sw.attr);
2141 } 2172 }
2142 2173
2143 /* For X41t, X60t, X61t Tablets... */ 2174 /* For X41t, X60t, X61t Tablets... */
2144 if (!res && acpi_evalf(hkey_handle, &status, "MHKG", "qd")) { 2175 if (!res && acpi_evalf(hkey_handle, &status, "MHKG", "qd")) {
2145 tp_features.hotkey_tablet = 1; 2176 tp_features.hotkey_tablet = 1;
2146 printk(TPACPI_INFO 2177 printk(TPACPI_INFO
2147 "possible tablet mode switch found; " 2178 "possible tablet mode switch found; "
2148 "ThinkPad in %s mode\n", 2179 "ThinkPad in %s mode\n",
2149 (status & TP_HOTKEY_TABLET_MASK)? 2180 (status & TP_HOTKEY_TABLET_MASK)?
2150 "tablet" : "laptop"); 2181 "tablet" : "laptop");
2151 res = add_to_attr_set(hotkey_dev_attributes, 2182 res = add_to_attr_set(hotkey_dev_attributes,
2152 &dev_attr_hotkey_tablet_mode.attr); 2183 &dev_attr_hotkey_tablet_mode.attr);
2153 } 2184 }
2154 2185
2155 if (!res) 2186 if (!res)
2156 res = register_attr_set_with_sysfs( 2187 res = register_attr_set_with_sysfs(
2157 hotkey_dev_attributes, 2188 hotkey_dev_attributes,
2158 &tpacpi_pdev->dev.kobj); 2189 &tpacpi_pdev->dev.kobj);
2159 if (res) 2190 if (res)
2160 return res; 2191 goto err_exit;
2161 2192
2162 /* Set up key map */ 2193 /* Set up key map */
2163 2194
2164 hotkey_keycode_map = kmalloc(TPACPI_HOTKEY_MAP_SIZE, 2195 hotkey_keycode_map = kmalloc(TPACPI_HOTKEY_MAP_SIZE,
2165 GFP_KERNEL); 2196 GFP_KERNEL);
2166 if (!hotkey_keycode_map) { 2197 if (!hotkey_keycode_map) {
2167 printk(TPACPI_ERR 2198 printk(TPACPI_ERR
2168 "failed to allocate memory for key map\n"); 2199 "failed to allocate memory for key map\n");
2169 return -ENOMEM; 2200 res = -ENOMEM;
2170 } 2201 goto err_exit;
2202 }
2171 2203
2172 if (thinkpad_id.vendor == PCI_VENDOR_ID_LENOVO) { 2204 if (thinkpad_id.vendor == PCI_VENDOR_ID_LENOVO) {
2173 dbg_printk(TPACPI_DBG_INIT, 2205 dbg_printk(TPACPI_DBG_INIT,
2174 "using Lenovo default hot key map\n"); 2206 "using Lenovo default hot key map\n");
2175 memcpy(hotkey_keycode_map, &lenovo_keycode_map, 2207 memcpy(hotkey_keycode_map, &lenovo_keycode_map,
2176 TPACPI_HOTKEY_MAP_SIZE); 2208 TPACPI_HOTKEY_MAP_SIZE);
2209 } else {
2210 dbg_printk(TPACPI_DBG_INIT,
2211 "using IBM default hot key map\n");
2212 memcpy(hotkey_keycode_map, &ibm_keycode_map,
2213 TPACPI_HOTKEY_MAP_SIZE);
2214 }
2215
2216 set_bit(EV_KEY, tpacpi_inputdev->evbit);
2217 set_bit(EV_MSC, tpacpi_inputdev->evbit);
2218 set_bit(MSC_SCAN, tpacpi_inputdev->mscbit);
2219 tpacpi_inputdev->keycodesize = TPACPI_HOTKEY_MAP_TYPESIZE;
2220 tpacpi_inputdev->keycodemax = TPACPI_HOTKEY_MAP_LEN;
2221 tpacpi_inputdev->keycode = hotkey_keycode_map;
2222 for (i = 0; i < TPACPI_HOTKEY_MAP_LEN; i++) {
2223 if (hotkey_keycode_map[i] != KEY_RESERVED) {
2224 set_bit(hotkey_keycode_map[i],
2225 tpacpi_inputdev->keybit);
2177 } else { 2226 } else {
2178 dbg_printk(TPACPI_DBG_INIT, 2227 if (i < sizeof(hotkey_reserved_mask)*8)
2179 "using IBM default hot key map\n"); 2228 hotkey_reserved_mask |= 1 << i;
2180 memcpy(hotkey_keycode_map, &ibm_keycode_map,
2181 TPACPI_HOTKEY_MAP_SIZE);
2182 }
2183
2184 set_bit(EV_KEY, tpacpi_inputdev->evbit);
2185 set_bit(EV_MSC, tpacpi_inputdev->evbit);
2186 set_bit(MSC_SCAN, tpacpi_inputdev->mscbit);
2187 tpacpi_inputdev->keycodesize = TPACPI_HOTKEY_MAP_TYPESIZE;
2188 tpacpi_inputdev->keycodemax = TPACPI_HOTKEY_MAP_LEN;
2189 tpacpi_inputdev->keycode = hotkey_keycode_map;
2190 for (i = 0; i < TPACPI_HOTKEY_MAP_LEN; i++) {
2191 if (hotkey_keycode_map[i] != KEY_RESERVED) {
2192 set_bit(hotkey_keycode_map[i],
2193 tpacpi_inputdev->keybit);
2194 } else {
2195 if (i < sizeof(hotkey_reserved_mask)*8)
2196 hotkey_reserved_mask |= 1 << i;
2197 }
2198 }
2199
2200 if (tp_features.hotkey_wlsw) {
2201 set_bit(EV_SW, tpacpi_inputdev->evbit);
2202 set_bit(SW_RADIO, tpacpi_inputdev->swbit);
2203 }
2204 if (tp_features.hotkey_tablet) {
2205 set_bit(EV_SW, tpacpi_inputdev->evbit);
2206 set_bit(SW_TABLET_MODE, tpacpi_inputdev->swbit);
2207 } 2229 }
2230 }
2208 2231
2209 /* Do not issue duplicate brightness change events to 2232 if (tp_features.hotkey_wlsw) {
2210 * userspace */ 2233 set_bit(EV_SW, tpacpi_inputdev->evbit);
2211 if (!tp_features.bright_acpimode) 2234 set_bit(SW_RFKILL_ALL, tpacpi_inputdev->swbit);
2212 /* update bright_acpimode... */ 2235 }
2213 tpacpi_check_std_acpi_brightness_support(); 2236 if (tp_features.hotkey_tablet) {
2214 2237 set_bit(EV_SW, tpacpi_inputdev->evbit);
2215 if (tp_features.bright_acpimode) { 2238 set_bit(SW_TABLET_MODE, tpacpi_inputdev->swbit);
2216 printk(TPACPI_INFO 2239 }
2217 "This ThinkPad has standard ACPI backlight "
2218 "brightness control, supported by the ACPI "
2219 "video driver\n");
2220 printk(TPACPI_NOTICE
2221 "Disabling thinkpad-acpi brightness events "
2222 "by default...\n");
2223
2224 /* The hotkey_reserved_mask change below is not
2225 * necessary while the keys are at KEY_RESERVED in the
2226 * default map, but better safe than sorry, leave it
2227 * here as a marker of what we have to do, especially
2228 * when we finally become able to set this at runtime
2229 * on response to X.org requests */
2230 hotkey_reserved_mask |=
2231 (1 << TP_ACPI_HOTKEYSCAN_FNHOME)
2232 | (1 << TP_ACPI_HOTKEYSCAN_FNEND);
2233 }
2234 2240
2235 dbg_printk(TPACPI_DBG_INIT, 2241 /* Do not issue duplicate brightness change events to
2236 "enabling hot key handling\n"); 2242 * userspace */
2237 res = hotkey_status_set(1); 2243 if (!tp_features.bright_acpimode)
2238 if (res) 2244 /* update bright_acpimode... */
2239 return res; 2245 tpacpi_check_std_acpi_brightness_support();
2240 res = hotkey_mask_set(((hotkey_all_mask | hotkey_source_mask)
2241 & ~hotkey_reserved_mask)
2242 | hotkey_orig_mask);
2243 if (res < 0 && res != -ENXIO)
2244 return res;
2245 2246
2246 dbg_printk(TPACPI_DBG_INIT, 2247 if (tp_features.bright_acpimode) {
2247 "legacy hot key reporting over procfs %s\n", 2248 printk(TPACPI_INFO
2248 (hotkey_report_mode < 2) ? 2249 "This ThinkPad has standard ACPI backlight "
2249 "enabled" : "disabled"); 2250 "brightness control, supported by the ACPI "
2251 "video driver\n");
2252 printk(TPACPI_NOTICE
2253 "Disabling thinkpad-acpi brightness events "
2254 "by default...\n");
2255
2256 /* The hotkey_reserved_mask change below is not
2257 * necessary while the keys are at KEY_RESERVED in the
2258 * default map, but better safe than sorry, leave it
2259 * here as a marker of what we have to do, especially
2260 * when we finally become able to set this at runtime
2261 * on response to X.org requests */
2262 hotkey_reserved_mask |=
2263 (1 << TP_ACPI_HOTKEYSCAN_FNHOME)
2264 | (1 << TP_ACPI_HOTKEYSCAN_FNEND);
2265 }
2266
2267 dbg_printk(TPACPI_DBG_INIT, "enabling hot key handling\n");
2268 res = hotkey_status_set(1);
2269 if (res) {
2270 hotkey_exit();
2271 return res;
2272 }
2273 res = hotkey_mask_set(((hotkey_all_mask | hotkey_source_mask)
2274 & ~hotkey_reserved_mask)
2275 | hotkey_orig_mask);
2276 if (res < 0 && res != -ENXIO) {
2277 hotkey_exit();
2278 return res;
2279 }
2250 2280
2251 tpacpi_inputdev->open = &hotkey_inputdev_open; 2281 dbg_printk(TPACPI_DBG_INIT,
2252 tpacpi_inputdev->close = &hotkey_inputdev_close; 2282 "legacy hot key reporting over procfs %s\n",
2283 (hotkey_report_mode < 2) ?
2284 "enabled" : "disabled");
2253 2285
2254 hotkey_poll_setup_safe(1); 2286 tpacpi_inputdev->open = &hotkey_inputdev_open;
2255 tpacpi_input_send_radiosw(); 2287 tpacpi_inputdev->close = &hotkey_inputdev_close;
2256 tpacpi_input_send_tabletsw();
2257 }
2258 2288
2259 return (tp_features.hotkey)? 0 : 1; 2289 hotkey_poll_setup_safe(1);
2260} 2290 tpacpi_input_send_radiosw();
2291 tpacpi_input_send_tabletsw();
2261 2292
2262static void hotkey_exit(void) 2293 return 0;
2263{
2264#ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL
2265 hotkey_poll_stop_sync();
2266#endif
2267 2294
2268 if (tp_features.hotkey) { 2295err_exit:
2269 dbg_printk(TPACPI_DBG_EXIT, 2296 delete_attr_set(hotkey_dev_attributes, &tpacpi_pdev->dev.kobj);
2270 "restoring original hot key mask\n"); 2297 hotkey_dev_attributes = NULL;
2271 /* no short-circuit boolean operator below! */
2272 if ((hotkey_mask_set(hotkey_orig_mask) |
2273 hotkey_status_set(hotkey_orig_status)) != 0)
2274 printk(TPACPI_ERR
2275 "failed to restore hot key mask "
2276 "to BIOS defaults\n");
2277 }
2278 2298
2279 if (hotkey_dev_attributes) { 2299 return (res < 0)? res : 1;
2280 delete_attr_set(hotkey_dev_attributes, &tpacpi_pdev->dev.kobj);
2281 hotkey_dev_attributes = NULL;
2282 }
2283} 2300}
2284 2301
2285static void hotkey_notify(struct ibm_struct *ibm, u32 event) 2302static void hotkey_notify(struct ibm_struct *ibm, u32 event)
@@ -3319,7 +3336,7 @@ static struct tpacpi_led_classdev tpacpi_led_thinklight = {
3319 3336
3320static int __init light_init(struct ibm_init_struct *iibm) 3337static int __init light_init(struct ibm_init_struct *iibm)
3321{ 3338{
3322 int rc = 0; 3339 int rc;
3323 3340
3324 vdbg_printk(TPACPI_DBG_INIT, "initializing light subdriver\n"); 3341 vdbg_printk(TPACPI_DBG_INIT, "initializing light subdriver\n");
3325 3342
@@ -3337,20 +3354,23 @@ static int __init light_init(struct ibm_init_struct *iibm)
3337 tp_features.light_status = 3354 tp_features.light_status =
3338 acpi_evalf(ec_handle, NULL, "KBLT", "qv"); 3355 acpi_evalf(ec_handle, NULL, "KBLT", "qv");
3339 3356
3340 vdbg_printk(TPACPI_DBG_INIT, "light is %s\n", 3357 vdbg_printk(TPACPI_DBG_INIT, "light is %s, light status is %s\n",
3341 str_supported(tp_features.light)); 3358 str_supported(tp_features.light),
3359 str_supported(tp_features.light_status));
3342 3360
3343 if (tp_features.light) { 3361 if (!tp_features.light)
3344 rc = led_classdev_register(&tpacpi_pdev->dev, 3362 return 1;
3345 &tpacpi_led_thinklight.led_classdev); 3363
3346 } 3364 rc = led_classdev_register(&tpacpi_pdev->dev,
3365 &tpacpi_led_thinklight.led_classdev);
3347 3366
3348 if (rc < 0) { 3367 if (rc < 0) {
3349 tp_features.light = 0; 3368 tp_features.light = 0;
3350 tp_features.light_status = 0; 3369 tp_features.light_status = 0;
3351 } else { 3370 } else {
3352 rc = (tp_features.light)? 0 : 1; 3371 rc = 0;
3353 } 3372 }
3373
3354 return rc; 3374 return rc;
3355} 3375}
3356 3376
@@ -3821,7 +3841,7 @@ TPACPI_HANDLE(led, ec, "SLED", /* 570 */
3821#define TPACPI_LED_NUMLEDS 8 3841#define TPACPI_LED_NUMLEDS 8
3822static struct tpacpi_led_classdev *tpacpi_leds; 3842static struct tpacpi_led_classdev *tpacpi_leds;
3823static enum led_status_t tpacpi_led_state_cache[TPACPI_LED_NUMLEDS]; 3843static enum led_status_t tpacpi_led_state_cache[TPACPI_LED_NUMLEDS];
3824static const char const *tpacpi_led_names[TPACPI_LED_NUMLEDS] = { 3844static const char * const tpacpi_led_names[TPACPI_LED_NUMLEDS] = {
3825 /* there's a limit of 19 chars + NULL before 2.6.26 */ 3845 /* there's a limit of 19 chars + NULL before 2.6.26 */
3826 "tpacpi::power", 3846 "tpacpi::power",
3827 "tpacpi:orange:batt", 3847 "tpacpi:orange:batt",
@@ -3833,7 +3853,7 @@ static const char const *tpacpi_led_names[TPACPI_LED_NUMLEDS] = {
3833 "tpacpi::standby", 3853 "tpacpi::standby",
3834}; 3854};
3835 3855
3836static int led_get_status(unsigned int led) 3856static int led_get_status(const unsigned int led)
3837{ 3857{
3838 int status; 3858 int status;
3839 enum led_status_t led_s; 3859 enum led_status_t led_s;
@@ -3857,41 +3877,42 @@ static int led_get_status(unsigned int led)
3857 /* not reached */ 3877 /* not reached */
3858} 3878}
3859 3879
3860static int led_set_status(unsigned int led, enum led_status_t ledstatus) 3880static int led_set_status(const unsigned int led,
3881 const enum led_status_t ledstatus)
3861{ 3882{
3862 /* off, on, blink. Index is led_status_t */ 3883 /* off, on, blink. Index is led_status_t */
3863 static const int const led_sled_arg1[] = { 0, 1, 3 }; 3884 static const unsigned int led_sled_arg1[] = { 0, 1, 3 };
3864 static const int const led_exp_hlbl[] = { 0, 0, 1 }; /* led# * */ 3885 static const unsigned int led_led_arg1[] = { 0, 0x80, 0xc0 };
3865 static const int const led_exp_hlcl[] = { 0, 1, 1 }; /* led# * */
3866 static const int const led_led_arg1[] = { 0, 0x80, 0xc0 };
3867 3886
3868 int rc = 0; 3887 int rc = 0;
3869 3888
3870 switch (led_supported) { 3889 switch (led_supported) {
3871 case TPACPI_LED_570: 3890 case TPACPI_LED_570:
3872 /* 570 */ 3891 /* 570 */
3873 led = 1 << led; 3892 if (led > 7)
3874 if (!acpi_evalf(led_handle, NULL, NULL, "vdd", 3893 return -EINVAL;
3875 led, led_sled_arg1[ledstatus])) 3894 if (!acpi_evalf(led_handle, NULL, NULL, "vdd",
3876 rc = -EIO; 3895 (1 << led), led_sled_arg1[ledstatus]))
3877 break; 3896 rc = -EIO;
3897 break;
3878 case TPACPI_LED_OLD: 3898 case TPACPI_LED_OLD:
3879 /* 600e/x, 770e, 770x, A21e, A2xm/p, T20-22, X20 */ 3899 /* 600e/x, 770e, 770x, A21e, A2xm/p, T20-22, X20 */
3880 led = 1 << led; 3900 if (led > 7)
3881 rc = ec_write(TPACPI_LED_EC_HLMS, led); 3901 return -EINVAL;
3882 if (rc >= 0) 3902 rc = ec_write(TPACPI_LED_EC_HLMS, (1 << led));
3883 rc = ec_write(TPACPI_LED_EC_HLBL, 3903 if (rc >= 0)
3884 led * led_exp_hlbl[ledstatus]); 3904 rc = ec_write(TPACPI_LED_EC_HLBL,
3885 if (rc >= 0) 3905 (ledstatus == TPACPI_LED_BLINK) << led);
3886 rc = ec_write(TPACPI_LED_EC_HLCL, 3906 if (rc >= 0)
3887 led * led_exp_hlcl[ledstatus]); 3907 rc = ec_write(TPACPI_LED_EC_HLCL,
3888 break; 3908 (ledstatus != TPACPI_LED_OFF) << led);
3909 break;
3889 case TPACPI_LED_NEW: 3910 case TPACPI_LED_NEW:
3890 /* all others */ 3911 /* all others */
3891 if (!acpi_evalf(led_handle, NULL, NULL, "vdd", 3912 if (!acpi_evalf(led_handle, NULL, NULL, "vdd",
3892 led, led_led_arg1[ledstatus])) 3913 led, led_led_arg1[ledstatus]))
3893 rc = -EIO; 3914 rc = -EIO;
3894 break; 3915 break;
3895 default: 3916 default:
3896 rc = -ENXIO; 3917 rc = -ENXIO;
3897 } 3918 }
@@ -3978,7 +3999,6 @@ static void led_exit(void)
3978 } 3999 }
3979 4000
3980 kfree(tpacpi_leds); 4001 kfree(tpacpi_leds);
3981 tpacpi_leds = NULL;
3982} 4002}
3983 4003
3984static int __init led_init(struct ibm_init_struct *iibm) 4004static int __init led_init(struct ibm_init_struct *iibm)
@@ -4802,7 +4822,6 @@ static void brightness_exit(void)
4802 vdbg_printk(TPACPI_DBG_EXIT, 4822 vdbg_printk(TPACPI_DBG_EXIT,
4803 "calling backlight_device_unregister()\n"); 4823 "calling backlight_device_unregister()\n");
4804 backlight_device_unregister(ibm_backlight_device); 4824 backlight_device_unregister(ibm_backlight_device);
4805 ibm_backlight_device = NULL;
4806 } 4825 }
4807} 4826}
4808 4827
@@ -5764,11 +5783,16 @@ static int __init fan_init(struct ibm_init_struct *iibm)
5764 fan_control_access_mode != TPACPI_FAN_WR_NONE) { 5783 fan_control_access_mode != TPACPI_FAN_WR_NONE) {
5765 rc = sysfs_create_group(&tpacpi_sensors_pdev->dev.kobj, 5784 rc = sysfs_create_group(&tpacpi_sensors_pdev->dev.kobj,
5766 &fan_attr_group); 5785 &fan_attr_group);
5767 if (!(rc < 0))
5768 rc = driver_create_file(&tpacpi_hwmon_pdriver.driver,
5769 &driver_attr_fan_watchdog);
5770 if (rc < 0) 5786 if (rc < 0)
5771 return rc; 5787 return rc;
5788
5789 rc = driver_create_file(&tpacpi_hwmon_pdriver.driver,
5790 &driver_attr_fan_watchdog);
5791 if (rc < 0) {
5792 sysfs_remove_group(&tpacpi_sensors_pdev->dev.kobj,
5793 &fan_attr_group);
5794 return rc;
5795 }
5772 return 0; 5796 return 0;
5773 } else 5797 } else
5774 return 1; 5798 return 1;
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 91ded3e82401..f9ad960d7c1a 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -46,7 +46,7 @@
46#define MMC_SHIFT 3 46#define MMC_SHIFT 3
47#define MMC_NUM_MINORS (256 >> MMC_SHIFT) 47#define MMC_NUM_MINORS (256 >> MMC_SHIFT)
48 48
49static unsigned long dev_use[MMC_NUM_MINORS/(8*sizeof(unsigned long))]; 49static DECLARE_BITMAP(dev_use, MMC_NUM_MINORS);
50 50
51/* 51/*
52 * There is one mmc_blk_data per slot. 52 * There is one mmc_blk_data per slot.
diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index 3b3cd0e74715..dead61754ad7 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -119,7 +119,7 @@ config MMC_TIFM_SD
119 119
120config MMC_SPI 120config MMC_SPI
121 tristate "MMC/SD over SPI" 121 tristate "MMC/SD over SPI"
122 depends on MMC && SPI_MASTER && !HIGHMEM 122 depends on MMC && SPI_MASTER && !HIGHMEM && HAS_DMA
123 select CRC7 123 select CRC7
124 select CRC_ITU_T 124 select CRC_ITU_T
125 help 125 help
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
index 65210fca37ed..d89475d36988 100644
--- a/drivers/mmc/host/pxamci.c
+++ b/drivers/mmc/host/pxamci.c
@@ -114,6 +114,7 @@ static void pxamci_setup_data(struct pxamci_host *host, struct mmc_data *data)
114 unsigned int nob = data->blocks; 114 unsigned int nob = data->blocks;
115 unsigned long long clks; 115 unsigned long long clks;
116 unsigned int timeout; 116 unsigned int timeout;
117 bool dalgn = 0;
117 u32 dcmd; 118 u32 dcmd;
118 int i; 119 int i;
119 120
@@ -152,6 +153,9 @@ static void pxamci_setup_data(struct pxamci_host *host, struct mmc_data *data)
152 host->sg_cpu[i].dcmd = dcmd | length; 153 host->sg_cpu[i].dcmd = dcmd | length;
153 if (length & 31 && !(data->flags & MMC_DATA_READ)) 154 if (length & 31 && !(data->flags & MMC_DATA_READ))
154 host->sg_cpu[i].dcmd |= DCMD_ENDIRQEN; 155 host->sg_cpu[i].dcmd |= DCMD_ENDIRQEN;
156 /* Not aligned to 8-byte boundary? */
157 if (sg_dma_address(&data->sg[i]) & 0x7)
158 dalgn = 1;
155 if (data->flags & MMC_DATA_READ) { 159 if (data->flags & MMC_DATA_READ) {
156 host->sg_cpu[i].dsadr = host->res->start + MMC_RXFIFO; 160 host->sg_cpu[i].dsadr = host->res->start + MMC_RXFIFO;
157 host->sg_cpu[i].dtadr = sg_dma_address(&data->sg[i]); 161 host->sg_cpu[i].dtadr = sg_dma_address(&data->sg[i]);
@@ -165,6 +169,15 @@ static void pxamci_setup_data(struct pxamci_host *host, struct mmc_data *data)
165 host->sg_cpu[host->dma_len - 1].ddadr = DDADR_STOP; 169 host->sg_cpu[host->dma_len - 1].ddadr = DDADR_STOP;
166 wmb(); 170 wmb();
167 171
172 /*
173 * The PXA27x DMA controller encounters overhead when working with
174 * unaligned (to 8-byte boundaries) data, so switch on byte alignment
175 * mode only if we have unaligned data.
176 */
177 if (dalgn)
178 DALGN |= (1 << host->dma);
179 else
180 DALGN &= (1 << host->dma);
168 DDADR(host->dma) = host->sg_dma; 181 DDADR(host->dma) = host->sg_dma;
169 DCSR(host->dma) = DCSR_RUN; 182 DCSR(host->dma) = DCSR_RUN;
170} 183}
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 07c2048b230b..b413aa6c246b 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -55,6 +55,10 @@ static unsigned int debug_quirks = 0;
55#define SDHCI_QUIRK_32BIT_DMA_SIZE (1<<7) 55#define SDHCI_QUIRK_32BIT_DMA_SIZE (1<<7)
56/* Controller needs to be reset after each request to stay stable */ 56/* Controller needs to be reset after each request to stay stable */
57#define SDHCI_QUIRK_RESET_AFTER_REQUEST (1<<8) 57#define SDHCI_QUIRK_RESET_AFTER_REQUEST (1<<8)
58/* Controller needs voltage and power writes to happen separately */
59#define SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER (1<<9)
60/* Controller has an off-by-one issue with timeout value */
61#define SDHCI_QUIRK_INCR_TIMEOUT_CONTROL (1<<10)
58 62
59static const struct pci_device_id pci_ids[] __devinitdata = { 63static const struct pci_device_id pci_ids[] __devinitdata = {
60 { 64 {
@@ -115,7 +119,8 @@ static const struct pci_device_id pci_ids[] __devinitdata = {
115 .subvendor = PCI_ANY_ID, 119 .subvendor = PCI_ANY_ID,
116 .subdevice = PCI_ANY_ID, 120 .subdevice = PCI_ANY_ID,
117 .driver_data = SDHCI_QUIRK_SINGLE_POWER_WRITE | 121 .driver_data = SDHCI_QUIRK_SINGLE_POWER_WRITE |
118 SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS, 122 SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS |
123 SDHCI_QUIRK_BROKEN_DMA,
119 }, 124 },
120 125
121 { 126 {
@@ -124,7 +129,17 @@ static const struct pci_device_id pci_ids[] __devinitdata = {
124 .subvendor = PCI_ANY_ID, 129 .subvendor = PCI_ANY_ID,
125 .subdevice = PCI_ANY_ID, 130 .subdevice = PCI_ANY_ID,
126 .driver_data = SDHCI_QUIRK_SINGLE_POWER_WRITE | 131 .driver_data = SDHCI_QUIRK_SINGLE_POWER_WRITE |
127 SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS, 132 SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS |
133 SDHCI_QUIRK_BROKEN_DMA,
134 },
135
136 {
137 .vendor = PCI_VENDOR_ID_MARVELL,
138 .device = PCI_DEVICE_ID_MARVELL_CAFE_SD,
139 .subvendor = PCI_ANY_ID,
140 .subdevice = PCI_ANY_ID,
141 .driver_data = SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER |
142 SDHCI_QUIRK_INCR_TIMEOUT_CONTROL,
128 }, 143 },
129 144
130 { 145 {
@@ -469,6 +484,13 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data)
469 break; 484 break;
470 } 485 }
471 486
487 /*
488 * Compensate for an off-by-one error in the CaFe hardware; otherwise,
489 * a too-small count gives us interrupt timeouts.
490 */
491 if ((host->chip->quirks & SDHCI_QUIRK_INCR_TIMEOUT_CONTROL))
492 count++;
493
472 if (count >= 0xF) { 494 if (count >= 0xF) {
473 printk(KERN_WARNING "%s: Too large timeout requested!\n", 495 printk(KERN_WARNING "%s: Too large timeout requested!\n",
474 mmc_hostname(host->mmc)); 496 mmc_hostname(host->mmc));
@@ -774,6 +796,14 @@ static void sdhci_set_power(struct sdhci_host *host, unsigned short power)
774 BUG(); 796 BUG();
775 } 797 }
776 798
799 /*
800 * At least the CaFe chip gets confused if we set the voltage
801 * and set turn on power at the same time, so set the voltage first.
802 */
803 if ((host->chip->quirks & SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER))
804 writeb(pwr & ~SDHCI_POWER_ON,
805 host->ioaddr + SDHCI_POWER_CONTROL);
806
777 writeb(pwr, host->ioaddr + SDHCI_POWER_CONTROL); 807 writeb(pwr, host->ioaddr + SDHCI_POWER_CONTROL);
778 808
779out: 809out:
diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c
index be624a049c67..c303e7f57ab4 100644
--- a/drivers/mmc/host/wbsd.c
+++ b/drivers/mmc/host/wbsd.c
@@ -1457,17 +1457,7 @@ static int __devinit wbsd_request_irq(struct wbsd_host *host, int irq)
1457 int ret; 1457 int ret;
1458 1458
1459 /* 1459 /*
1460 * Allocate interrupt. 1460 * Set up tasklets. Must be done before requesting interrupt.
1461 */
1462
1463 ret = request_irq(irq, wbsd_irq, IRQF_SHARED, DRIVER_NAME, host);
1464 if (ret)
1465 return ret;
1466
1467 host->irq = irq;
1468
1469 /*
1470 * Set up tasklets.
1471 */ 1461 */
1472 tasklet_init(&host->card_tasklet, wbsd_tasklet_card, 1462 tasklet_init(&host->card_tasklet, wbsd_tasklet_card,
1473 (unsigned long)host); 1463 (unsigned long)host);
@@ -1480,6 +1470,15 @@ static int __devinit wbsd_request_irq(struct wbsd_host *host, int irq)
1480 tasklet_init(&host->finish_tasklet, wbsd_tasklet_finish, 1470 tasklet_init(&host->finish_tasklet, wbsd_tasklet_finish,
1481 (unsigned long)host); 1471 (unsigned long)host);
1482 1472
1473 /*
1474 * Allocate interrupt.
1475 */
1476 ret = request_irq(irq, wbsd_irq, IRQF_SHARED, DRIVER_NAME, host);
1477 if (ret)
1478 return ret;
1479
1480 host->irq = irq;
1481
1483 return 0; 1482 return 0;
1484} 1483}
1485 1484
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 25efd331ef28..b402269301f6 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -346,8 +346,10 @@ static int m25p80_write(struct mtd_info *mtd, loff_t to, size_t len,
346 mutex_lock(&flash->lock); 346 mutex_lock(&flash->lock);
347 347
348 /* Wait until finished previous write command. */ 348 /* Wait until finished previous write command. */
349 if (wait_till_ready(flash)) 349 if (wait_till_ready(flash)) {
350 mutex_unlock(&flash->lock);
350 return 1; 351 return 1;
352 }
351 353
352 write_enable(flash); 354 write_enable(flash);
353 355
diff --git a/drivers/mtd/maps/ck804xrom.c b/drivers/mtd/maps/ck804xrom.c
index 59d8fb49270a..effaf7cdefab 100644
--- a/drivers/mtd/maps/ck804xrom.c
+++ b/drivers/mtd/maps/ck804xrom.c
@@ -331,15 +331,15 @@ static void __devexit ck804xrom_remove_one (struct pci_dev *pdev)
331} 331}
332 332
333static struct pci_device_id ck804xrom_pci_tbl[] = { 333static struct pci_device_id ck804xrom_pci_tbl[] = {
334 { PCI_VENDOR_ID_NVIDIA, 0x0051, PCI_ANY_ID, PCI_ANY_ID, DEV_CK804 }, 334 { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x0051), .driver_data = DEV_CK804 },
335 { PCI_VENDOR_ID_NVIDIA, 0x0360, PCI_ANY_ID, PCI_ANY_ID, DEV_MCP55 }, 335 { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x0360), .driver_data = DEV_MCP55 },
336 { PCI_VENDOR_ID_NVIDIA, 0x0361, PCI_ANY_ID, PCI_ANY_ID, DEV_MCP55 }, 336 { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x0361), .driver_data = DEV_MCP55 },
337 { PCI_VENDOR_ID_NVIDIA, 0x0362, PCI_ANY_ID, PCI_ANY_ID, DEV_MCP55 }, 337 { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x0362), .driver_data = DEV_MCP55 },
338 { PCI_VENDOR_ID_NVIDIA, 0x0363, PCI_ANY_ID, PCI_ANY_ID, DEV_MCP55 }, 338 { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x0363), .driver_data = DEV_MCP55 },
339 { PCI_VENDOR_ID_NVIDIA, 0x0364, PCI_ANY_ID, PCI_ANY_ID, DEV_MCP55 }, 339 { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x0364), .driver_data = DEV_MCP55 },
340 { PCI_VENDOR_ID_NVIDIA, 0x0365, PCI_ANY_ID, PCI_ANY_ID, DEV_MCP55 }, 340 { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x0365), .driver_data = DEV_MCP55 },
341 { PCI_VENDOR_ID_NVIDIA, 0x0366, PCI_ANY_ID, PCI_ANY_ID, DEV_MCP55 }, 341 { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x0366), .driver_data = DEV_MCP55 },
342 { PCI_VENDOR_ID_NVIDIA, 0x0367, PCI_ANY_ID, PCI_ANY_ID, DEV_MCP55 }, 342 { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, 0x0367), .driver_data = DEV_MCP55 },
343 { 0, } 343 { 0, }
344}; 344};
345 345
diff --git a/drivers/mtd/maps/omap_nor.c b/drivers/mtd/maps/omap_nor.c
index 240b0e2d095d..c12d8056bebd 100644
--- a/drivers/mtd/maps/omap_nor.c
+++ b/drivers/mtd/maps/omap_nor.c
@@ -110,7 +110,7 @@ static int __init omapflash_probe(struct platform_device *pdev)
110 err = parse_mtd_partitions(info->mtd, part_probes, &info->parts, 0); 110 err = parse_mtd_partitions(info->mtd, part_probes, &info->parts, 0);
111 if (err > 0) 111 if (err > 0)
112 add_mtd_partitions(info->mtd, info->parts, err); 112 add_mtd_partitions(info->mtd, info->parts, err);
113 else if (err < 0 && pdata->parts) 113 else if (err <= 0 && pdata->parts)
114 add_mtd_partitions(info->mtd, pdata->parts, pdata->nr_parts); 114 add_mtd_partitions(info->mtd, pdata->parts, pdata->nr_parts);
115 else 115 else
116#endif 116#endif
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index fceb468ccdec..fe2bc7e42119 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -1216,7 +1216,7 @@ static int pxa3xx_nand_resume(struct platform_device *pdev)
1216 1216
1217 clk_enable(info->clk); 1217 clk_enable(info->clk);
1218 1218
1219 return pxa3xx_nand_config_flash(info); 1219 return pxa3xx_nand_config_flash(info, info->flash_info);
1220} 1220}
1221#else 1221#else
1222#define pxa3xx_nand_suspend NULL 1222#define pxa3xx_nand_suspend NULL
diff --git a/drivers/mtd/onenand/generic.c b/drivers/mtd/onenand/generic.c
index 3d44d040a47d..ad81ab8e95e2 100644
--- a/drivers/mtd/onenand/generic.c
+++ b/drivers/mtd/onenand/generic.c
@@ -76,7 +76,7 @@ static int __devinit generic_onenand_probe(struct device *dev)
76 err = parse_mtd_partitions(&info->mtd, part_probes, &info->parts, 0); 76 err = parse_mtd_partitions(&info->mtd, part_probes, &info->parts, 0);
77 if (err > 0) 77 if (err > 0)
78 add_mtd_partitions(&info->mtd, info->parts, err); 78 add_mtd_partitions(&info->mtd, info->parts, err);
79 else if (err < 0 && pdata->parts) 79 else if (err <= 0 && pdata->parts)
80 add_mtd_partitions(&info->mtd, pdata->parts, pdata->nr_parts); 80 add_mtd_partitions(&info->mtd, pdata->parts, pdata->nr_parts);
81 else 81 else
82#endif 82#endif
diff --git a/drivers/mtd/redboot.c b/drivers/mtd/redboot.c
index 47474903263c..c5030f94f04e 100644
--- a/drivers/mtd/redboot.c
+++ b/drivers/mtd/redboot.c
@@ -295,5 +295,5 @@ module_init(redboot_parser_init);
295module_exit(redboot_parser_exit); 295module_exit(redboot_parser_exit);
296 296
297MODULE_LICENSE("GPL"); 297MODULE_LICENSE("GPL");
298MODULE_AUTHOR("Red Hat, Inc. - David Woodhouse <dwmw2@cambridge.redhat.com>"); 298MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
299MODULE_DESCRIPTION("Parsing code for RedBoot Flash Image System (FIS) tables"); 299MODULE_DESCRIPTION("Parsing code for RedBoot Flash Image System (FIS) tables");
diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c
index e6c545fe5f58..b9d097c9f6bb 100644
--- a/drivers/net/3c509.c
+++ b/drivers/net/3c509.c
@@ -413,7 +413,7 @@ static int __devinit el3_pnp_probe(struct pnp_dev *pdev,
413{ 413{
414 short i; 414 short i;
415 int ioaddr, irq, if_port; 415 int ioaddr, irq, if_port;
416 u16 phys_addr[3]; 416 __be16 phys_addr[3];
417 struct net_device *dev = NULL; 417 struct net_device *dev = NULL;
418 int err; 418 int err;
419 419
@@ -605,7 +605,7 @@ static int __init el3_mca_probe(struct device *device)
605 605
606 short i; 606 short i;
607 int ioaddr, irq, if_port; 607 int ioaddr, irq, if_port;
608 u16 phys_addr[3]; 608 __be16 phys_addr[3];
609 struct net_device *dev = NULL; 609 struct net_device *dev = NULL;
610 u_char pos4, pos5; 610 u_char pos4, pos5;
611 struct mca_device *mdev = to_mca_device(device); 611 struct mca_device *mdev = to_mca_device(device);
@@ -635,14 +635,13 @@ static int __init el3_mca_probe(struct device *device)
635 printk(KERN_DEBUG "3c529: irq %d ioaddr 0x%x ifport %d\n", irq, ioaddr, if_port); 635 printk(KERN_DEBUG "3c529: irq %d ioaddr 0x%x ifport %d\n", irq, ioaddr, if_port);
636 } 636 }
637 EL3WINDOW(0); 637 EL3WINDOW(0);
638 for (i = 0; i < 3; i++) { 638 for (i = 0; i < 3; i++)
639 phys_addr[i] = htons(read_eeprom(ioaddr, i)); 639 phys_addr[i] = htons(read_eeprom(ioaddr, i));
640 }
641 640
642 dev = alloc_etherdev(sizeof (struct el3_private)); 641 dev = alloc_etherdev(sizeof (struct el3_private));
643 if (dev == NULL) { 642 if (dev == NULL) {
644 release_region(ioaddr, EL3_IO_EXTENT); 643 release_region(ioaddr, EL3_IO_EXTENT);
645 return -ENOMEM; 644 return -ENOMEM;
646 } 645 }
647 646
648 netdev_boot_setup_check(dev); 647 netdev_boot_setup_check(dev);
@@ -668,7 +667,7 @@ static int __init el3_eisa_probe (struct device *device)
668{ 667{
669 short i; 668 short i;
670 int ioaddr, irq, if_port; 669 int ioaddr, irq, if_port;
671 u16 phys_addr[3]; 670 __be16 phys_addr[3];
672 struct net_device *dev = NULL; 671 struct net_device *dev = NULL;
673 struct eisa_device *edev; 672 struct eisa_device *edev;
674 int err; 673 int err;
@@ -1063,7 +1062,6 @@ el3_rx(struct net_device *dev)
1063 struct sk_buff *skb; 1062 struct sk_buff *skb;
1064 1063
1065 skb = dev_alloc_skb(pkt_len+5); 1064 skb = dev_alloc_skb(pkt_len+5);
1066 dev->stats.rx_bytes += pkt_len;
1067 if (el3_debug > 4) 1065 if (el3_debug > 4)
1068 printk("Receiving packet size %d status %4.4x.\n", 1066 printk("Receiving packet size %d status %4.4x.\n",
1069 pkt_len, rx_status); 1067 pkt_len, rx_status);
@@ -1078,6 +1076,7 @@ el3_rx(struct net_device *dev)
1078 skb->protocol = eth_type_trans(skb,dev); 1076 skb->protocol = eth_type_trans(skb,dev);
1079 netif_rx(skb); 1077 netif_rx(skb);
1080 dev->last_rx = jiffies; 1078 dev->last_rx = jiffies;
1079 dev->stats.rx_bytes += pkt_len;
1081 dev->stats.rx_packets++; 1080 dev->stats.rx_packets++;
1082 continue; 1081 continue;
1083 } 1082 }
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
index 2edda8cc7f99..aabad8ce7458 100644
--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -1768,9 +1768,10 @@ vortex_timer(unsigned long data)
1768 case XCVR_MII: case XCVR_NWAY: 1768 case XCVR_MII: case XCVR_NWAY:
1769 { 1769 {
1770 ok = 1; 1770 ok = 1;
1771 spin_lock_bh(&vp->lock); 1771 /* Interrupts are already disabled */
1772 spin_lock(&vp->lock);
1772 vortex_check_media(dev, 0); 1773 vortex_check_media(dev, 0);
1773 spin_unlock_bh(&vp->lock); 1774 spin_unlock(&vp->lock);
1774 } 1775 }
1775 break; 1776 break;
1776 default: /* Other media types handled by Tx timeouts. */ 1777 default: /* Other media types handled by Tx timeouts. */
diff --git a/drivers/net/7990.c b/drivers/net/7990.c
index 750a46f4bc58..ad6b8a5b6574 100644
--- a/drivers/net/7990.c
+++ b/drivers/net/7990.c
@@ -506,6 +506,7 @@ int lance_open (struct net_device *dev)
506 506
507 return res; 507 return res;
508} 508}
509EXPORT_SYMBOL_GPL(lance_open);
509 510
510int lance_close (struct net_device *dev) 511int lance_close (struct net_device *dev)
511{ 512{
@@ -521,6 +522,7 @@ int lance_close (struct net_device *dev)
521 522
522 return 0; 523 return 0;
523} 524}
525EXPORT_SYMBOL_GPL(lance_close);
524 526
525void lance_tx_timeout(struct net_device *dev) 527void lance_tx_timeout(struct net_device *dev)
526{ 528{
@@ -529,7 +531,7 @@ void lance_tx_timeout(struct net_device *dev)
529 dev->trans_start = jiffies; 531 dev->trans_start = jiffies;
530 netif_wake_queue (dev); 532 netif_wake_queue (dev);
531} 533}
532 534EXPORT_SYMBOL_GPL(lance_tx_timeout);
533 535
534int lance_start_xmit (struct sk_buff *skb, struct net_device *dev) 536int lance_start_xmit (struct sk_buff *skb, struct net_device *dev)
535{ 537{
@@ -586,6 +588,7 @@ int lance_start_xmit (struct sk_buff *skb, struct net_device *dev)
586 588
587 return 0; 589 return 0;
588} 590}
591EXPORT_SYMBOL_GPL(lance_start_xmit);
589 592
590/* taken from the depca driver via a2065.c */ 593/* taken from the depca driver via a2065.c */
591static void lance_load_multicast (struct net_device *dev) 594static void lance_load_multicast (struct net_device *dev)
@@ -654,6 +657,7 @@ void lance_set_multicast (struct net_device *dev)
654 if (!stopped) 657 if (!stopped)
655 netif_start_queue (dev); 658 netif_start_queue (dev);
656} 659}
660EXPORT_SYMBOL_GPL(lance_set_multicast);
657 661
658#ifdef CONFIG_NET_POLL_CONTROLLER 662#ifdef CONFIG_NET_POLL_CONTROLLER
659void lance_poll(struct net_device *dev) 663void lance_poll(struct net_device *dev)
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 9f6cc8a56073..f4182cfffe9d 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -1353,7 +1353,7 @@ config APRICOT
1353 1353
1354config B44 1354config B44
1355 tristate "Broadcom 440x/47xx ethernet support" 1355 tristate "Broadcom 440x/47xx ethernet support"
1356 depends on SSB_POSSIBLE 1356 depends on SSB_POSSIBLE && HAS_DMA
1357 select SSB 1357 select SSB
1358 select MII 1358 select MII
1359 help 1359 help
@@ -2426,7 +2426,7 @@ config CHELSIO_T3
2426 2426
2427config EHEA 2427config EHEA
2428 tristate "eHEA Ethernet support" 2428 tristate "eHEA Ethernet support"
2429 depends on IBMEBUS && INET && SPARSEMEM && MEMORY_HOTPLUG 2429 depends on IBMEBUS && INET && SPARSEMEM
2430 select INET_LRO 2430 select INET_LRO
2431 ---help--- 2431 ---help---
2432 This driver supports the IBM pSeries eHEA ethernet adapter. 2432 This driver supports the IBM pSeries eHEA ethernet adapter.
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index 9c2394d49428..3c798ae5c343 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -471,7 +471,6 @@ static int atl1_get_permanent_address(struct atl1_hw *hw)
471 memcpy(hw->perm_mac_addr, eth_addr, ETH_ALEN); 471 memcpy(hw->perm_mac_addr, eth_addr, ETH_ALEN);
472 return 0; 472 return 0;
473 } 473 }
474 return 1;
475 } 474 }
476 475
477 /* see if SPI FLAGS exist ? */ 476 /* see if SPI FLAGS exist ? */
@@ -637,22 +636,6 @@ static s32 atl1_phy_leave_power_saving(struct atl1_hw *hw)
637} 636}
638 637
639/* 638/*
640 * Force the PHY into power saving mode using vendor magic.
641 */
642#ifdef CONFIG_PM
643static void atl1_phy_enter_power_saving(struct atl1_hw *hw)
644{
645 atl1_write_phy_reg(hw, MII_DBG_ADDR, 0);
646 atl1_write_phy_reg(hw, MII_DBG_DATA, 0x124E);
647 atl1_write_phy_reg(hw, MII_DBG_ADDR, 2);
648 atl1_write_phy_reg(hw, MII_DBG_DATA, 0x3000);
649 atl1_write_phy_reg(hw, MII_DBG_ADDR, 3);
650 atl1_write_phy_reg(hw, MII_DBG_DATA, 0);
651
652}
653#endif
654
655/*
656 * Resets the PHY and make all config validate 639 * Resets the PHY and make all config validate
657 * hw - Struct containing variables accessed by shared code 640 * hw - Struct containing variables accessed by shared code
658 * 641 *
@@ -2023,6 +2006,7 @@ rrd_ok:
2023 /* Good Receive */ 2006 /* Good Receive */
2024 pci_unmap_page(adapter->pdev, buffer_info->dma, 2007 pci_unmap_page(adapter->pdev, buffer_info->dma,
2025 buffer_info->length, PCI_DMA_FROMDEVICE); 2008 buffer_info->length, PCI_DMA_FROMDEVICE);
2009 buffer_info->dma = 0;
2026 skb = buffer_info->skb; 2010 skb = buffer_info->skb;
2027 length = le16_to_cpu(rrd->xsz.xsum_sz.pkt_size); 2011 length = le16_to_cpu(rrd->xsz.xsum_sz.pkt_size);
2028 2012
@@ -2135,7 +2119,7 @@ static int atl1_tso(struct atl1_adapter *adapter, struct sk_buff *skb,
2135 return -1; 2119 return -1;
2136 } 2120 }
2137 2121
2138 if (skb->protocol == ntohs(ETH_P_IP)) { 2122 if (skb->protocol == htons(ETH_P_IP)) {
2139 struct iphdr *iph = ip_hdr(skb); 2123 struct iphdr *iph = ip_hdr(skb);
2140 2124
2141 real_len = (((unsigned char *)iph - skb->data) + 2125 real_len = (((unsigned char *)iph - skb->data) +
@@ -2859,7 +2843,6 @@ disable_wol:
2859 ctrl |= PCIE_PHYMISC_FORCE_RCV_DET; 2843 ctrl |= PCIE_PHYMISC_FORCE_RCV_DET;
2860 iowrite32(ctrl, hw->hw_addr + REG_PCIE_PHYMISC); 2844 iowrite32(ctrl, hw->hw_addr + REG_PCIE_PHYMISC);
2861 ioread32(hw->hw_addr + REG_PCIE_PHYMISC); 2845 ioread32(hw->hw_addr + REG_PCIE_PHYMISC);
2862 atl1_phy_enter_power_saving(hw);
2863 hw->phy_configured = false; 2846 hw->phy_configured = false;
2864 pci_enable_wake(pdev, pci_choose_state(pdev, state), 0); 2847 pci_enable_wake(pdev, pci_choose_state(pdev, state), 0);
2865exit: 2848exit:
diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c
index 3634b5fd7919..7023d77bf380 100644
--- a/drivers/net/au1000_eth.c
+++ b/drivers/net/au1000_eth.c
@@ -1239,12 +1239,7 @@ static int au1000_rx(struct net_device *dev)
1239 */ 1239 */
1240static irqreturn_t au1000_interrupt(int irq, void *dev_id) 1240static irqreturn_t au1000_interrupt(int irq, void *dev_id)
1241{ 1241{
1242 struct net_device *dev = (struct net_device *) dev_id; 1242 struct net_device *dev = dev_id;
1243
1244 if (dev == NULL) {
1245 printk(KERN_ERR "%s: isr: null dev ptr\n", dev->name);
1246 return IRQ_RETVAL(1);
1247 }
1248 1243
1249 /* Handle RX interrupts first to minimize chance of overrun */ 1244 /* Handle RX interrupts first to minimize chance of overrun */
1250 1245
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index 89c0018132ec..41443435ab1c 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -22,7 +22,6 @@
22#include <linux/crc32.h> 22#include <linux/crc32.h>
23#include <linux/device.h> 23#include <linux/device.h>
24#include <linux/spinlock.h> 24#include <linux/spinlock.h>
25#include <linux/ethtool.h>
26#include <linux/mii.h> 25#include <linux/mii.h>
27#include <linux/phy.h> 26#include <linux/phy.h>
28#include <linux/netdevice.h> 27#include <linux/netdevice.h>
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 4b46e68183e0..367b6d462708 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -5724,14 +5724,12 @@ bnx2_reset_task(struct work_struct *work)
5724 if (!netif_running(bp->dev)) 5724 if (!netif_running(bp->dev))
5725 return; 5725 return;
5726 5726
5727 bp->in_reset_task = 1;
5728 bnx2_netif_stop(bp); 5727 bnx2_netif_stop(bp);
5729 5728
5730 bnx2_init_nic(bp); 5729 bnx2_init_nic(bp);
5731 5730
5732 atomic_set(&bp->intr_sem, 1); 5731 atomic_set(&bp->intr_sem, 1);
5733 bnx2_netif_start(bp); 5732 bnx2_netif_start(bp);
5734 bp->in_reset_task = 0;
5735} 5733}
5736 5734
5737static void 5735static void
@@ -5907,12 +5905,7 @@ bnx2_close(struct net_device *dev)
5907 struct bnx2 *bp = netdev_priv(dev); 5905 struct bnx2 *bp = netdev_priv(dev);
5908 u32 reset_code; 5906 u32 reset_code;
5909 5907
5910 /* Calling flush_scheduled_work() may deadlock because 5908 cancel_work_sync(&bp->reset_task);
5911 * linkwatch_event() may be on the workqueue and it will try to get
5912 * the rtnl_lock which we are holding.
5913 */
5914 while (bp->in_reset_task)
5915 msleep(1);
5916 5909
5917 bnx2_disable_int_sync(bp); 5910 bnx2_disable_int_sync(bp);
5918 bnx2_napi_disable(bp); 5911 bnx2_napi_disable(bp);
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h
index 1eaf5bb3d9c2..2377cc13bf61 100644
--- a/drivers/net/bnx2.h
+++ b/drivers/net/bnx2.h
@@ -6656,7 +6656,6 @@ struct bnx2 {
6656 int current_interval; 6656 int current_interval;
6657 struct timer_list timer; 6657 struct timer_list timer;
6658 struct work_struct reset_task; 6658 struct work_struct reset_task;
6659 int in_reset_task;
6660 6659
6661 /* Used to synchronize phy accesses. */ 6660 /* Used to synchronize phy accesses. */
6662 spinlock_t phy_lock; 6661 spinlock_t phy_lock;
diff --git a/drivers/net/bnx2x.c b/drivers/net/bnx2x.c
index 7bdb5af35951..70cba64732ca 100644
--- a/drivers/net/bnx2x.c
+++ b/drivers/net/bnx2x.c
@@ -6,7 +6,8 @@
6 * it under the terms of the GNU General Public License as published by 6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation. 7 * the Free Software Foundation.
8 * 8 *
9 * Written by: Eliezer Tamir <eliezert@broadcom.com> 9 * Maintained by: Eilon Greenstein <eilong@broadcom.com>
10 * Written by: Eliezer Tamir
10 * Based on code from Michael Chan's bnx2 driver 11 * Based on code from Michael Chan's bnx2 driver
11 * UDP CSUM errata workaround by Arik Gendelman 12 * UDP CSUM errata workaround by Arik Gendelman
12 * Slowpath rework by Vladislav Zolotarov 13 * Slowpath rework by Vladislav Zolotarov
@@ -74,7 +75,7 @@ static char version[] __devinitdata =
74 "Broadcom NetXtreme II 5771X 10Gigabit Ethernet Driver " 75 "Broadcom NetXtreme II 5771X 10Gigabit Ethernet Driver "
75 DRV_MODULE_NAME " " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; 76 DRV_MODULE_NAME " " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
76 77
77MODULE_AUTHOR("Eliezer Tamir <eliezert@broadcom.com>"); 78MODULE_AUTHOR("Eliezer Tamir");
78MODULE_DESCRIPTION("Broadcom NetXtreme II BCM57710 Driver"); 79MODULE_DESCRIPTION("Broadcom NetXtreme II BCM57710 Driver");
79MODULE_LICENSE("GPL"); 80MODULE_LICENSE("GPL");
80MODULE_VERSION(DRV_MODULE_VERSION); 81MODULE_VERSION(DRV_MODULE_VERSION);
diff --git a/drivers/net/bnx2x.h b/drivers/net/bnx2x.h
index 4f0c0d31e7c1..8e68d06510a6 100644
--- a/drivers/net/bnx2x.h
+++ b/drivers/net/bnx2x.h
@@ -6,7 +6,8 @@
6 * it under the terms of the GNU General Public License as published by 6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation. 7 * the Free Software Foundation.
8 * 8 *
9 * Written by: Eliezer Tamir <eliezert@broadcom.com> 9 * Maintained by: Eilon Greenstein <eilong@broadcom.com>
10 * Written by: Eliezer Tamir
10 * Based on code from Michael Chan's bnx2 driver 11 * Based on code from Michael Chan's bnx2 driver
11 */ 12 */
12 13
diff --git a/drivers/net/bnx2x_init.h b/drivers/net/bnx2x_init.h
index dcaecc53bdb1..370686eef97c 100644
--- a/drivers/net/bnx2x_init.h
+++ b/drivers/net/bnx2x_init.h
@@ -6,7 +6,8 @@
6 * it under the terms of the GNU General Public License as published by 6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation. 7 * the Free Software Foundation.
8 * 8 *
9 * Written by: Eliezer Tamir <eliezert@broadcom.com> 9 * Maintained by: Eilon Greenstein <eilong@broadcom.com>
10 * Written by: Eliezer Tamir
10 */ 11 */
11 12
12#ifndef BNX2X_INIT_H 13#ifndef BNX2X_INIT_H
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 68c41a00d93d..08f3d396bcd6 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -1437,8 +1437,16 @@ int bond_create_sysfs(void)
1437 * configure multiple bonding devices. 1437 * configure multiple bonding devices.
1438 */ 1438 */
1439 if (ret == -EEXIST) { 1439 if (ret == -EEXIST) {
1440 netdev_class = NULL; 1440 /* Is someone being kinky and naming a device bonding_master? */
1441 return 0; 1441 if (__dev_get_by_name(&init_net,
1442 class_attr_bonding_masters.attr.name))
1443 printk(KERN_ERR
1444 "network device named %s already exists in sysfs",
1445 class_attr_bonding_masters.attr.name);
1446 else {
1447 netdev_class = NULL;
1448 return 0;
1449 }
1442 } 1450 }
1443 1451
1444 return ret; 1452 return ret;
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c
index 93e13636f8dd..83768df27806 100644
--- a/drivers/net/cassini.c
+++ b/drivers/net/cassini.c
@@ -142,8 +142,8 @@
142 142
143#define DRV_MODULE_NAME "cassini" 143#define DRV_MODULE_NAME "cassini"
144#define PFX DRV_MODULE_NAME ": " 144#define PFX DRV_MODULE_NAME ": "
145#define DRV_MODULE_VERSION "1.5" 145#define DRV_MODULE_VERSION "1.6"
146#define DRV_MODULE_RELDATE "4 Jan 2008" 146#define DRV_MODULE_RELDATE "21 May 2008"
147 147
148#define CAS_DEF_MSG_ENABLE \ 148#define CAS_DEF_MSG_ENABLE \
149 (NETIF_MSG_DRV | \ 149 (NETIF_MSG_DRV | \
@@ -2136,9 +2136,12 @@ end_copy_pkt:
2136 if (addr) 2136 if (addr)
2137 cas_page_unmap(addr); 2137 cas_page_unmap(addr);
2138 } 2138 }
2139 skb->csum = csum_unfold(~csum);
2140 skb->ip_summed = CHECKSUM_COMPLETE;
2141 skb->protocol = eth_type_trans(skb, cp->dev); 2139 skb->protocol = eth_type_trans(skb, cp->dev);
2140 if (skb->protocol == htons(ETH_P_IP)) {
2141 skb->csum = csum_unfold(~csum);
2142 skb->ip_summed = CHECKSUM_COMPLETE;
2143 } else
2144 skb->ip_summed = CHECKSUM_NONE;
2142 return len; 2145 return len;
2143} 2146}
2144 2147
diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c
index 2b5740b3d182..7f3f62e1b113 100644
--- a/drivers/net/cpmac.c
+++ b/drivers/net/cpmac.c
@@ -38,6 +38,7 @@
38#include <linux/platform_device.h> 38#include <linux/platform_device.h>
39#include <linux/dma-mapping.h> 39#include <linux/dma-mapping.h>
40#include <asm/gpio.h> 40#include <asm/gpio.h>
41#include <asm/atomic.h>
41 42
42MODULE_AUTHOR("Eugene Konev <ejka@imfi.kspu.ru>"); 43MODULE_AUTHOR("Eugene Konev <ejka@imfi.kspu.ru>");
43MODULE_DESCRIPTION("TI AR7 ethernet driver (CPMAC)"); 44MODULE_DESCRIPTION("TI AR7 ethernet driver (CPMAC)");
@@ -187,6 +188,7 @@ struct cpmac_desc {
187#define CPMAC_EOQ 0x1000 188#define CPMAC_EOQ 0x1000
188 struct sk_buff *skb; 189 struct sk_buff *skb;
189 struct cpmac_desc *next; 190 struct cpmac_desc *next;
191 struct cpmac_desc *prev;
190 dma_addr_t mapping; 192 dma_addr_t mapping;
191 dma_addr_t data_mapping; 193 dma_addr_t data_mapping;
192}; 194};
@@ -208,6 +210,7 @@ struct cpmac_priv {
208 struct work_struct reset_work; 210 struct work_struct reset_work;
209 struct platform_device *pdev; 211 struct platform_device *pdev;
210 struct napi_struct napi; 212 struct napi_struct napi;
213 atomic_t reset_pending;
211}; 214};
212 215
213static irqreturn_t cpmac_irq(int, void *); 216static irqreturn_t cpmac_irq(int, void *);
@@ -241,6 +244,16 @@ static void cpmac_dump_desc(struct net_device *dev, struct cpmac_desc *desc)
241 printk("\n"); 244 printk("\n");
242} 245}
243 246
247static void cpmac_dump_all_desc(struct net_device *dev)
248{
249 struct cpmac_priv *priv = netdev_priv(dev);
250 struct cpmac_desc *dump = priv->rx_head;
251 do {
252 cpmac_dump_desc(dev, dump);
253 dump = dump->next;
254 } while (dump != priv->rx_head);
255}
256
244static void cpmac_dump_skb(struct net_device *dev, struct sk_buff *skb) 257static void cpmac_dump_skb(struct net_device *dev, struct sk_buff *skb)
245{ 258{
246 int i; 259 int i;
@@ -412,21 +425,42 @@ static struct sk_buff *cpmac_rx_one(struct cpmac_priv *priv,
412static int cpmac_poll(struct napi_struct *napi, int budget) 425static int cpmac_poll(struct napi_struct *napi, int budget)
413{ 426{
414 struct sk_buff *skb; 427 struct sk_buff *skb;
415 struct cpmac_desc *desc; 428 struct cpmac_desc *desc, *restart;
416 int received = 0;
417 struct cpmac_priv *priv = container_of(napi, struct cpmac_priv, napi); 429 struct cpmac_priv *priv = container_of(napi, struct cpmac_priv, napi);
430 int received = 0, processed = 0;
418 431
419 spin_lock(&priv->rx_lock); 432 spin_lock(&priv->rx_lock);
420 if (unlikely(!priv->rx_head)) { 433 if (unlikely(!priv->rx_head)) {
421 if (netif_msg_rx_err(priv) && net_ratelimit()) 434 if (netif_msg_rx_err(priv) && net_ratelimit())
422 printk(KERN_WARNING "%s: rx: polling, but no queue\n", 435 printk(KERN_WARNING "%s: rx: polling, but no queue\n",
423 priv->dev->name); 436 priv->dev->name);
437 spin_unlock(&priv->rx_lock);
424 netif_rx_complete(priv->dev, napi); 438 netif_rx_complete(priv->dev, napi);
425 return 0; 439 return 0;
426 } 440 }
427 441
428 desc = priv->rx_head; 442 desc = priv->rx_head;
443 restart = NULL;
429 while (((desc->dataflags & CPMAC_OWN) == 0) && (received < budget)) { 444 while (((desc->dataflags & CPMAC_OWN) == 0) && (received < budget)) {
445 processed++;
446
447 if ((desc->dataflags & CPMAC_EOQ) != 0) {
448 /* The last update to eoq->hw_next didn't happen
449 * soon enough, and the receiver stopped here.
450 *Remember this descriptor so we can restart
451 * the receiver after freeing some space.
452 */
453 if (unlikely(restart)) {
454 if (netif_msg_rx_err(priv))
455 printk(KERN_ERR "%s: poll found a"
456 " duplicate EOQ: %p and %p\n",
457 priv->dev->name, restart, desc);
458 goto fatal_error;
459 }
460
461 restart = desc->next;
462 }
463
430 skb = cpmac_rx_one(priv, desc); 464 skb = cpmac_rx_one(priv, desc);
431 if (likely(skb)) { 465 if (likely(skb)) {
432 netif_receive_skb(skb); 466 netif_receive_skb(skb);
@@ -435,19 +469,90 @@ static int cpmac_poll(struct napi_struct *napi, int budget)
435 desc = desc->next; 469 desc = desc->next;
436 } 470 }
437 471
472 if (desc != priv->rx_head) {
473 /* We freed some buffers, but not the whole ring,
474 * add what we did free to the rx list */
475 desc->prev->hw_next = (u32)0;
476 priv->rx_head->prev->hw_next = priv->rx_head->mapping;
477 }
478
479 /* Optimization: If we did not actually process an EOQ (perhaps because
480 * of quota limits), check to see if the tail of the queue has EOQ set.
481 * We should immediately restart in that case so that the receiver can
482 * restart and run in parallel with more packet processing.
483 * This lets us handle slightly larger bursts before running
484 * out of ring space (assuming dev->weight < ring_size) */
485
486 if (!restart &&
487 (priv->rx_head->prev->dataflags & (CPMAC_OWN|CPMAC_EOQ))
488 == CPMAC_EOQ &&
489 (priv->rx_head->dataflags & CPMAC_OWN) != 0) {
490 /* reset EOQ so the poll loop (above) doesn't try to
491 * restart this when it eventually gets to this descriptor.
492 */
493 priv->rx_head->prev->dataflags &= ~CPMAC_EOQ;
494 restart = priv->rx_head;
495 }
496
497 if (restart) {
498 priv->dev->stats.rx_errors++;
499 priv->dev->stats.rx_fifo_errors++;
500 if (netif_msg_rx_err(priv) && net_ratelimit())
501 printk(KERN_WARNING "%s: rx dma ring overrun\n",
502 priv->dev->name);
503
504 if (unlikely((restart->dataflags & CPMAC_OWN) == 0)) {
505 if (netif_msg_drv(priv))
506 printk(KERN_ERR "%s: cpmac_poll is trying to "
507 "restart rx from a descriptor that's "
508 "not free: %p\n",
509 priv->dev->name, restart);
510 goto fatal_error;
511 }
512
513 cpmac_write(priv->regs, CPMAC_RX_PTR(0), restart->mapping);
514 }
515
438 priv->rx_head = desc; 516 priv->rx_head = desc;
439 spin_unlock(&priv->rx_lock); 517 spin_unlock(&priv->rx_lock);
440 if (unlikely(netif_msg_rx_status(priv))) 518 if (unlikely(netif_msg_rx_status(priv)))
441 printk(KERN_DEBUG "%s: poll processed %d packets\n", 519 printk(KERN_DEBUG "%s: poll processed %d packets\n",
442 priv->dev->name, received); 520 priv->dev->name, received);
443 if (desc->dataflags & CPMAC_OWN) { 521 if (processed == 0) {
522 /* we ran out of packets to read,
523 * revert to interrupt-driven mode */
444 netif_rx_complete(priv->dev, napi); 524 netif_rx_complete(priv->dev, napi);
445 cpmac_write(priv->regs, CPMAC_RX_PTR(0), (u32)desc->mapping);
446 cpmac_write(priv->regs, CPMAC_RX_INT_ENABLE, 1); 525 cpmac_write(priv->regs, CPMAC_RX_INT_ENABLE, 1);
447 return 0; 526 return 0;
448 } 527 }
449 528
450 return 1; 529 return 1;
530
531fatal_error:
532 /* Something went horribly wrong.
533 * Reset hardware to try to recover rather than wedging. */
534
535 if (netif_msg_drv(priv)) {
536 printk(KERN_ERR "%s: cpmac_poll is confused. "
537 "Resetting hardware\n", priv->dev->name);
538 cpmac_dump_all_desc(priv->dev);
539 printk(KERN_DEBUG "%s: RX_PTR(0)=0x%08x RX_ACK(0)=0x%08x\n",
540 priv->dev->name,
541 cpmac_read(priv->regs, CPMAC_RX_PTR(0)),
542 cpmac_read(priv->regs, CPMAC_RX_ACK(0)));
543 }
544
545 spin_unlock(&priv->rx_lock);
546 netif_rx_complete(priv->dev, napi);
547 netif_stop_queue(priv->dev);
548 napi_disable(&priv->napi);
549
550 atomic_inc(&priv->reset_pending);
551 cpmac_hw_stop(priv->dev);
552 if (!schedule_work(&priv->reset_work))
553 atomic_dec(&priv->reset_pending);
554 return 0;
555
451} 556}
452 557
453static int cpmac_start_xmit(struct sk_buff *skb, struct net_device *dev) 558static int cpmac_start_xmit(struct sk_buff *skb, struct net_device *dev)
@@ -456,6 +561,9 @@ static int cpmac_start_xmit(struct sk_buff *skb, struct net_device *dev)
456 struct cpmac_desc *desc; 561 struct cpmac_desc *desc;
457 struct cpmac_priv *priv = netdev_priv(dev); 562 struct cpmac_priv *priv = netdev_priv(dev);
458 563
564 if (unlikely(atomic_read(&priv->reset_pending)))
565 return NETDEV_TX_BUSY;
566
459 if (unlikely(skb_padto(skb, ETH_ZLEN))) 567 if (unlikely(skb_padto(skb, ETH_ZLEN)))
460 return NETDEV_TX_OK; 568 return NETDEV_TX_OK;
461 569
@@ -621,8 +729,10 @@ static void cpmac_clear_rx(struct net_device *dev)
621 desc->dataflags = CPMAC_OWN; 729 desc->dataflags = CPMAC_OWN;
622 dev->stats.rx_dropped++; 730 dev->stats.rx_dropped++;
623 } 731 }
732 desc->hw_next = desc->next->mapping;
624 desc = desc->next; 733 desc = desc->next;
625 } 734 }
735 priv->rx_head->prev->hw_next = 0;
626} 736}
627 737
628static void cpmac_clear_tx(struct net_device *dev) 738static void cpmac_clear_tx(struct net_device *dev)
@@ -635,14 +745,14 @@ static void cpmac_clear_tx(struct net_device *dev)
635 priv->desc_ring[i].dataflags = 0; 745 priv->desc_ring[i].dataflags = 0;
636 if (priv->desc_ring[i].skb) { 746 if (priv->desc_ring[i].skb) {
637 dev_kfree_skb_any(priv->desc_ring[i].skb); 747 dev_kfree_skb_any(priv->desc_ring[i].skb);
638 if (netif_subqueue_stopped(dev, i)) 748 priv->desc_ring[i].skb = NULL;
639 netif_wake_subqueue(dev, i);
640 } 749 }
641 } 750 }
642} 751}
643 752
644static void cpmac_hw_error(struct work_struct *work) 753static void cpmac_hw_error(struct work_struct *work)
645{ 754{
755 int i;
646 struct cpmac_priv *priv = 756 struct cpmac_priv *priv =
647 container_of(work, struct cpmac_priv, reset_work); 757 container_of(work, struct cpmac_priv, reset_work);
648 758
@@ -651,8 +761,48 @@ static void cpmac_hw_error(struct work_struct *work)
651 spin_unlock(&priv->rx_lock); 761 spin_unlock(&priv->rx_lock);
652 cpmac_clear_tx(priv->dev); 762 cpmac_clear_tx(priv->dev);
653 cpmac_hw_start(priv->dev); 763 cpmac_hw_start(priv->dev);
654 napi_enable(&priv->napi); 764 barrier();
655 netif_start_queue(priv->dev); 765 atomic_dec(&priv->reset_pending);
766
767 for (i = 0; i < CPMAC_QUEUES; i++)
768 netif_wake_subqueue(priv->dev, i);
769 netif_wake_queue(priv->dev);
770 cpmac_write(priv->regs, CPMAC_MAC_INT_ENABLE, 3);
771}
772
773static void cpmac_check_status(struct net_device *dev)
774{
775 struct cpmac_priv *priv = netdev_priv(dev);
776
777 u32 macstatus = cpmac_read(priv->regs, CPMAC_MAC_STATUS);
778 int rx_channel = (macstatus >> 8) & 7;
779 int rx_code = (macstatus >> 12) & 15;
780 int tx_channel = (macstatus >> 16) & 7;
781 int tx_code = (macstatus >> 20) & 15;
782
783 if (rx_code || tx_code) {
784 if (netif_msg_drv(priv) && net_ratelimit()) {
785 /* Can't find any documentation on what these
786 *error codes actually are. So just log them and hope..
787 */
788 if (rx_code)
789 printk(KERN_WARNING "%s: host error %d on rx "
790 "channel %d (macstatus %08x), resetting\n",
791 dev->name, rx_code, rx_channel, macstatus);
792 if (tx_code)
793 printk(KERN_WARNING "%s: host error %d on tx "
794 "channel %d (macstatus %08x), resetting\n",
795 dev->name, tx_code, tx_channel, macstatus);
796 }
797
798 netif_stop_queue(dev);
799 cpmac_hw_stop(dev);
800 if (schedule_work(&priv->reset_work))
801 atomic_inc(&priv->reset_pending);
802 if (unlikely(netif_msg_hw(priv)))
803 cpmac_dump_regs(dev);
804 }
805 cpmac_write(priv->regs, CPMAC_MAC_INT_CLEAR, 0xff);
656} 806}
657 807
658static irqreturn_t cpmac_irq(int irq, void *dev_id) 808static irqreturn_t cpmac_irq(int irq, void *dev_id)
@@ -683,49 +833,32 @@ static irqreturn_t cpmac_irq(int irq, void *dev_id)
683 833
684 cpmac_write(priv->regs, CPMAC_MAC_EOI_VECTOR, 0); 834 cpmac_write(priv->regs, CPMAC_MAC_EOI_VECTOR, 0);
685 835
686 if (unlikely(status & (MAC_INT_HOST | MAC_INT_STATUS))) { 836 if (unlikely(status & (MAC_INT_HOST | MAC_INT_STATUS)))
687 if (netif_msg_drv(priv) && net_ratelimit()) 837 cpmac_check_status(dev);
688 printk(KERN_ERR "%s: hw error, resetting...\n",
689 dev->name);
690 netif_stop_queue(dev);
691 napi_disable(&priv->napi);
692 cpmac_hw_stop(dev);
693 schedule_work(&priv->reset_work);
694 if (unlikely(netif_msg_hw(priv)))
695 cpmac_dump_regs(dev);
696 }
697 838
698 return IRQ_HANDLED; 839 return IRQ_HANDLED;
699} 840}
700 841
701static void cpmac_tx_timeout(struct net_device *dev) 842static void cpmac_tx_timeout(struct net_device *dev)
702{ 843{
703 struct cpmac_priv *priv = netdev_priv(dev);
704 int i; 844 int i;
845 struct cpmac_priv *priv = netdev_priv(dev);
705 846
706 spin_lock(&priv->lock); 847 spin_lock(&priv->lock);
707 dev->stats.tx_errors++; 848 dev->stats.tx_errors++;
708 spin_unlock(&priv->lock); 849 spin_unlock(&priv->lock);
709 if (netif_msg_tx_err(priv) && net_ratelimit()) 850 if (netif_msg_tx_err(priv) && net_ratelimit())
710 printk(KERN_WARNING "%s: transmit timeout\n", dev->name); 851 printk(KERN_WARNING "%s: transmit timeout\n", dev->name);
711 /* 852
712 * FIXME: waking up random queue is not the best thing to 853 atomic_inc(&priv->reset_pending);
713 * do... on the other hand why we got here at all? 854 barrier();
714 */ 855 cpmac_clear_tx(dev);
715#ifdef CONFIG_NETDEVICES_MULTIQUEUE 856 barrier();
857 atomic_dec(&priv->reset_pending);
858
859 netif_wake_queue(priv->dev);
716 for (i = 0; i < CPMAC_QUEUES; i++) 860 for (i = 0; i < CPMAC_QUEUES; i++)
717 if (priv->desc_ring[i].skb) { 861 netif_wake_subqueue(dev, i);
718 priv->desc_ring[i].dataflags = 0;
719 dev_kfree_skb_any(priv->desc_ring[i].skb);
720 netif_wake_subqueue(dev, i);
721 break;
722 }
723#else
724 priv->desc_ring[0].dataflags = 0;
725 if (priv->desc_ring[0].skb)
726 dev_kfree_skb_any(priv->desc_ring[0].skb);
727 netif_wake_queue(dev);
728#endif
729} 862}
730 863
731static int cpmac_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) 864static int cpmac_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
@@ -901,9 +1034,12 @@ static int cpmac_open(struct net_device *dev)
901 desc->buflen = CPMAC_SKB_SIZE; 1034 desc->buflen = CPMAC_SKB_SIZE;
902 desc->dataflags = CPMAC_OWN; 1035 desc->dataflags = CPMAC_OWN;
903 desc->next = &priv->rx_head[(i + 1) % priv->ring_size]; 1036 desc->next = &priv->rx_head[(i + 1) % priv->ring_size];
1037 desc->next->prev = desc;
904 desc->hw_next = (u32)desc->next->mapping; 1038 desc->hw_next = (u32)desc->next->mapping;
905 } 1039 }
906 1040
1041 priv->rx_head->prev->hw_next = (u32)0;
1042
907 if ((res = request_irq(dev->irq, cpmac_irq, IRQF_SHARED, 1043 if ((res = request_irq(dev->irq, cpmac_irq, IRQF_SHARED,
908 dev->name, dev))) { 1044 dev->name, dev))) {
909 if (netif_msg_drv(priv)) 1045 if (netif_msg_drv(priv))
@@ -912,6 +1048,7 @@ static int cpmac_open(struct net_device *dev)
912 goto fail_irq; 1048 goto fail_irq;
913 } 1049 }
914 1050
1051 atomic_set(&priv->reset_pending, 0);
915 INIT_WORK(&priv->reset_work, cpmac_hw_error); 1052 INIT_WORK(&priv->reset_work, cpmac_hw_error);
916 cpmac_hw_start(dev); 1053 cpmac_hw_start(dev);
917 1054
@@ -1007,21 +1144,10 @@ static int __devinit cpmac_probe(struct platform_device *pdev)
1007 1144
1008 if (phy_id == PHY_MAX_ADDR) { 1145 if (phy_id == PHY_MAX_ADDR) {
1009 if (external_switch || dumb_switch) { 1146 if (external_switch || dumb_switch) {
1010 struct fixed_phy_status status = {}; 1147 mdio_bus_id = 0; /* fixed phys bus */
1011 1148 phy_id = pdev->id;
1012 /*
1013 * FIXME: this should be in the platform code!
1014 * Since there is not platform code at all (that is,
1015 * no mainline users of that driver), place it here
1016 * for now.
1017 */
1018 phy_id = 0;
1019 status.link = 1;
1020 status.duplex = 1;
1021 status.speed = 100;
1022 fixed_phy_add(PHY_POLL, phy_id, &status);
1023 } else { 1149 } else {
1024 printk(KERN_ERR "cpmac: no PHY present\n"); 1150 dev_err(&pdev->dev, "no PHY present\n");
1025 return -ENODEV; 1151 return -ENODEV;
1026 } 1152 }
1027 } 1153 }
@@ -1064,10 +1190,8 @@ static int __devinit cpmac_probe(struct platform_device *pdev)
1064 priv->msg_enable = netif_msg_init(debug_level, 0xff); 1190 priv->msg_enable = netif_msg_init(debug_level, 0xff);
1065 memcpy(dev->dev_addr, pdata->dev_addr, sizeof(dev->dev_addr)); 1191 memcpy(dev->dev_addr, pdata->dev_addr, sizeof(dev->dev_addr));
1066 1192
1067 snprintf(priv->phy_name, BUS_ID_SIZE, PHY_ID_FMT, mdio_bus_id, phy_id); 1193 priv->phy = phy_connect(dev, cpmac_mii.phy_map[phy_id]->dev.bus_id,
1068 1194 &cpmac_adjust_link, 0, PHY_INTERFACE_MODE_MII);
1069 priv->phy = phy_connect(dev, priv->phy_name, &cpmac_adjust_link, 0,
1070 PHY_INTERFACE_MODE_MII);
1071 if (IS_ERR(priv->phy)) { 1195 if (IS_ERR(priv->phy)) {
1072 if (netif_msg_drv(priv)) 1196 if (netif_msg_drv(priv))
1073 printk(KERN_ERR "%s: Could not attach to PHY\n", 1197 printk(KERN_ERR "%s: Could not attach to PHY\n",
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c
index 348371fda597..fba87abe78ee 100644
--- a/drivers/net/cs89x0.c
+++ b/drivers/net/cs89x0.c
@@ -1394,7 +1394,11 @@ net_open(struct net_device *dev)
1394#endif 1394#endif
1395 if (!result) { 1395 if (!result) {
1396 printk(KERN_ERR "%s: EEPROM is configured for unavailable media\n", dev->name); 1396 printk(KERN_ERR "%s: EEPROM is configured for unavailable media\n", dev->name);
1397 release_irq: 1397release_dma:
1398#if ALLOW_DMA
1399 free_dma(dev->dma);
1400#endif
1401release_irq:
1398#if ALLOW_DMA 1402#if ALLOW_DMA
1399 release_dma_buff(lp); 1403 release_dma_buff(lp);
1400#endif 1404#endif
@@ -1442,12 +1446,12 @@ net_open(struct net_device *dev)
1442 if ((result = detect_bnc(dev)) != DETECTED_NONE) 1446 if ((result = detect_bnc(dev)) != DETECTED_NONE)
1443 break; 1447 break;
1444 printk(KERN_ERR "%s: no media detected\n", dev->name); 1448 printk(KERN_ERR "%s: no media detected\n", dev->name);
1445 goto release_irq; 1449 goto release_dma;
1446 } 1450 }
1447 switch(result) { 1451 switch(result) {
1448 case DETECTED_NONE: 1452 case DETECTED_NONE:
1449 printk(KERN_ERR "%s: no network cable attached to configured media\n", dev->name); 1453 printk(KERN_ERR "%s: no network cable attached to configured media\n", dev->name);
1450 goto release_irq; 1454 goto release_dma;
1451 case DETECTED_RJ45H: 1455 case DETECTED_RJ45H:
1452 printk(KERN_INFO "%s: using half-duplex 10Base-T (RJ-45)\n", dev->name); 1456 printk(KERN_INFO "%s: using half-duplex 10Base-T (RJ-45)\n", dev->name);
1453 break; 1457 break;
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index d45bcd2660af..864295e081b6 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -903,7 +903,7 @@ dm9000_stop(struct net_device *ndev)
903 if (netif_msg_ifdown(db)) 903 if (netif_msg_ifdown(db))
904 dev_dbg(db->dev, "shutting down %s\n", ndev->name); 904 dev_dbg(db->dev, "shutting down %s\n", ndev->name);
905 905
906 cancel_delayed_work(&db->phy_poll); 906 cancel_delayed_work_sync(&db->phy_poll);
907 907
908 netif_stop_queue(ndev); 908 netif_stop_queue(ndev);
909 netif_carrier_off(ndev); 909 netif_carrier_off(ndev);
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index f3cba5e24ec5..1037b1332312 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -1803,6 +1803,8 @@ static int e100_rx_alloc_skb(struct nic *nic, struct rx *rx)
1803 if (rx->prev->skb) { 1803 if (rx->prev->skb) {
1804 struct rfd *prev_rfd = (struct rfd *)rx->prev->skb->data; 1804 struct rfd *prev_rfd = (struct rfd *)rx->prev->skb->data;
1805 put_unaligned_le32(rx->dma_addr, &prev_rfd->link); 1805 put_unaligned_le32(rx->dma_addr, &prev_rfd->link);
1806 pci_dma_sync_single_for_device(nic->pdev, rx->prev->dma_addr,
1807 sizeof(struct rfd), PCI_DMA_TODEVICE);
1806 } 1808 }
1807 1809
1808 return 0; 1810 return 0;
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index 701531e72e7b..a3f6a9c72ec8 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -347,7 +347,7 @@ e1000_set_tso(struct net_device *netdev, u32 data)
347 else 347 else
348 netdev->features &= ~NETIF_F_TSO; 348 netdev->features &= ~NETIF_F_TSO;
349 349
350 if (data) 350 if (data && (adapter->hw.mac_type > e1000_82547_rev_2))
351 netdev->features |= NETIF_F_TSO6; 351 netdev->features |= NETIF_F_TSO6;
352 else 352 else
353 netdev->features &= ~NETIF_F_TSO6; 353 netdev->features &= ~NETIF_F_TSO6;
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 8cbb40f3a506..648a87bbf467 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -2535,7 +2535,8 @@ void e1000e_down(struct e1000_adapter *adapter)
2535 adapter->link_speed = 0; 2535 adapter->link_speed = 0;
2536 adapter->link_duplex = 0; 2536 adapter->link_duplex = 0;
2537 2537
2538 e1000e_reset(adapter); 2538 if (!pci_channel_offline(adapter->pdev))
2539 e1000e_reset(adapter);
2539 e1000_clean_tx_ring(adapter); 2540 e1000_clean_tx_ring(adapter);
2540 e1000_clean_rx_ring(adapter); 2541 e1000_clean_rx_ring(adapter);
2541 2542
@@ -4201,8 +4202,8 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
4201 struct e1000_adapter *adapter; 4202 struct e1000_adapter *adapter;
4202 struct e1000_hw *hw; 4203 struct e1000_hw *hw;
4203 const struct e1000_info *ei = e1000_info_tbl[ent->driver_data]; 4204 const struct e1000_info *ei = e1000_info_tbl[ent->driver_data];
4204 unsigned long mmio_start, mmio_len; 4205 resource_size_t mmio_start, mmio_len;
4205 unsigned long flash_start, flash_len; 4206 resource_size_t flash_start, flash_len;
4206 4207
4207 static int cards_found; 4208 static int cards_found;
4208 int i, err, pci_using_dac; 4209 int i, err, pci_using_dac;
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index d1b6d4e7495d..075fd547421e 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -1766,16 +1766,20 @@ static int ehea_set_mac_addr(struct net_device *dev, void *sa)
1766 mutex_lock(&ehea_bcmc_regs.lock); 1766 mutex_lock(&ehea_bcmc_regs.lock);
1767 1767
1768 /* Deregister old MAC in pHYP */ 1768 /* Deregister old MAC in pHYP */
1769 ret = ehea_broadcast_reg_helper(port, H_DEREG_BCMC); 1769 if (port->state == EHEA_PORT_UP) {
1770 if (ret) 1770 ret = ehea_broadcast_reg_helper(port, H_DEREG_BCMC);
1771 goto out_upregs; 1771 if (ret)
1772 goto out_upregs;
1773 }
1772 1774
1773 port->mac_addr = cb0->port_mac_addr << 16; 1775 port->mac_addr = cb0->port_mac_addr << 16;
1774 1776
1775 /* Register new MAC in pHYP */ 1777 /* Register new MAC in pHYP */
1776 ret = ehea_broadcast_reg_helper(port, H_REG_BCMC); 1778 if (port->state == EHEA_PORT_UP) {
1777 if (ret) 1779 ret = ehea_broadcast_reg_helper(port, H_REG_BCMC);
1778 goto out_upregs; 1780 if (ret)
1781 goto out_upregs;
1782 }
1779 1783
1780 ret = 0; 1784 ret = 0;
1781 1785
@@ -2213,8 +2217,6 @@ static void ehea_vlan_rx_register(struct net_device *dev,
2213 goto out; 2217 goto out;
2214 } 2218 }
2215 2219
2216 memset(cb1->vlan_filter, 0, sizeof(cb1->vlan_filter));
2217
2218 hret = ehea_h_modify_ehea_port(adapter->handle, port->logical_port_id, 2220 hret = ehea_h_modify_ehea_port(adapter->handle, port->logical_port_id,
2219 H_PORT_CB1, H_PORT_CB1_ALL, cb1); 2221 H_PORT_CB1, H_PORT_CB1_ALL, cb1);
2220 if (hret != H_SUCCESS) 2222 if (hret != H_SUCCESS)
@@ -2603,7 +2605,8 @@ static int ehea_stop(struct net_device *dev)
2603 if (netif_msg_ifdown(port)) 2605 if (netif_msg_ifdown(port))
2604 ehea_info("disabling port %s", dev->name); 2606 ehea_info("disabling port %s", dev->name);
2605 2607
2606 flush_scheduled_work(); 2608 cancel_work_sync(&port->reset_task);
2609
2607 mutex_lock(&port->port_lock); 2610 mutex_lock(&port->port_lock);
2608 netif_stop_queue(dev); 2611 netif_stop_queue(dev);
2609 port_napi_disable(port); 2612 port_napi_disable(port);
@@ -3178,11 +3181,12 @@ out_err:
3178 3181
3179static void ehea_shutdown_single_port(struct ehea_port *port) 3182static void ehea_shutdown_single_port(struct ehea_port *port)
3180{ 3183{
3184 struct ehea_adapter *adapter = port->adapter;
3181 unregister_netdev(port->netdev); 3185 unregister_netdev(port->netdev);
3182 ehea_unregister_port(port); 3186 ehea_unregister_port(port);
3183 kfree(port->mc_list); 3187 kfree(port->mc_list);
3184 free_netdev(port->netdev); 3188 free_netdev(port->netdev);
3185 port->adapter->active_ports--; 3189 adapter->active_ports--;
3186} 3190}
3187 3191
3188static int ehea_setup_ports(struct ehea_adapter *adapter) 3192static int ehea_setup_ports(struct ehea_adapter *adapter)
diff --git a/drivers/net/enc28j60.c b/drivers/net/enc28j60.c
index 46a90e9ec563..c05cb159c772 100644
--- a/drivers/net/enc28j60.c
+++ b/drivers/net/enc28j60.c
@@ -400,26 +400,31 @@ enc28j60_packet_write(struct enc28j60_net *priv, int len, const u8 *data)
400 mutex_unlock(&priv->lock); 400 mutex_unlock(&priv->lock);
401} 401}
402 402
403/* 403static unsigned long msec20_to_jiffies;
404 * Wait until the PHY operation is complete. 404
405 */ 405static int poll_ready(struct enc28j60_net *priv, u8 reg, u8 mask, u8 val)
406static int wait_phy_ready(struct enc28j60_net *priv)
407{ 406{
408 unsigned long timeout = jiffies + 20 * HZ / 1000; 407 unsigned long timeout = jiffies + msec20_to_jiffies;
409 int ret = 1;
410 408
411 /* 20 msec timeout read */ 409 /* 20 msec timeout read */
412 while (nolock_regb_read(priv, MISTAT) & MISTAT_BUSY) { 410 while ((nolock_regb_read(priv, reg) & mask) != val) {
413 if (time_after(jiffies, timeout)) { 411 if (time_after(jiffies, timeout)) {
414 if (netif_msg_drv(priv)) 412 if (netif_msg_drv(priv))
415 printk(KERN_DEBUG DRV_NAME 413 dev_dbg(&priv->spi->dev,
416 ": PHY ready timeout!\n"); 414 "reg %02x ready timeout!\n", reg);
417 ret = 0; 415 return -ETIMEDOUT;
418 break;
419 } 416 }
420 cpu_relax(); 417 cpu_relax();
421 } 418 }
422 return ret; 419 return 0;
420}
421
422/*
423 * Wait until the PHY operation is complete.
424 */
425static int wait_phy_ready(struct enc28j60_net *priv)
426{
427 return poll_ready(priv, MISTAT, MISTAT_BUSY, 0) ? 0 : 1;
423} 428}
424 429
425/* 430/*
@@ -594,6 +599,32 @@ static void nolock_txfifo_init(struct enc28j60_net *priv, u16 start, u16 end)
594 nolock_regw_write(priv, ETXNDL, end); 599 nolock_regw_write(priv, ETXNDL, end);
595} 600}
596 601
602/*
603 * Low power mode shrinks power consumption about 100x, so we'd like
604 * the chip to be in that mode whenever it's inactive. (However, we
605 * can't stay in lowpower mode during suspend with WOL active.)
606 */
607static void enc28j60_lowpower(struct enc28j60_net *priv, bool is_low)
608{
609 if (netif_msg_drv(priv))
610 dev_dbg(&priv->spi->dev, "%s power...\n",
611 is_low ? "low" : "high");
612
613 mutex_lock(&priv->lock);
614 if (is_low) {
615 nolock_reg_bfclr(priv, ECON1, ECON1_RXEN);
616 poll_ready(priv, ESTAT, ESTAT_RXBUSY, 0);
617 poll_ready(priv, ECON1, ECON1_TXRTS, 0);
618 /* ECON2_VRPS was set during initialization */
619 nolock_reg_bfset(priv, ECON2, ECON2_PWRSV);
620 } else {
621 nolock_reg_bfclr(priv, ECON2, ECON2_PWRSV);
622 poll_ready(priv, ESTAT, ESTAT_CLKRDY, ESTAT_CLKRDY);
623 /* caller sets ECON1_RXEN */
624 }
625 mutex_unlock(&priv->lock);
626}
627
597static int enc28j60_hw_init(struct enc28j60_net *priv) 628static int enc28j60_hw_init(struct enc28j60_net *priv)
598{ 629{
599 u8 reg; 630 u8 reg;
@@ -612,8 +643,8 @@ static int enc28j60_hw_init(struct enc28j60_net *priv)
612 priv->tx_retry_count = 0; 643 priv->tx_retry_count = 0;
613 priv->max_pk_counter = 0; 644 priv->max_pk_counter = 0;
614 priv->rxfilter = RXFILTER_NORMAL; 645 priv->rxfilter = RXFILTER_NORMAL;
615 /* enable address auto increment */ 646 /* enable address auto increment and voltage regulator powersave */
616 nolock_regb_write(priv, ECON2, ECON2_AUTOINC); 647 nolock_regb_write(priv, ECON2, ECON2_AUTOINC | ECON2_VRPS);
617 648
618 nolock_rxfifo_init(priv, RXSTART_INIT, RXEND_INIT); 649 nolock_rxfifo_init(priv, RXSTART_INIT, RXEND_INIT);
619 nolock_txfifo_init(priv, TXSTART_INIT, TXEND_INIT); 650 nolock_txfifo_init(priv, TXSTART_INIT, TXEND_INIT);
@@ -690,7 +721,7 @@ static int enc28j60_hw_init(struct enc28j60_net *priv)
690 721
691static void enc28j60_hw_enable(struct enc28j60_net *priv) 722static void enc28j60_hw_enable(struct enc28j60_net *priv)
692{ 723{
693 /* enable interrutps */ 724 /* enable interrupts */
694 if (netif_msg_hw(priv)) 725 if (netif_msg_hw(priv))
695 printk(KERN_DEBUG DRV_NAME ": %s() enabling interrupts.\n", 726 printk(KERN_DEBUG DRV_NAME ": %s() enabling interrupts.\n",
696 __FUNCTION__); 727 __FUNCTION__);
@@ -726,15 +757,12 @@ enc28j60_setlink(struct net_device *ndev, u8 autoneg, u16 speed, u8 duplex)
726 int ret = 0; 757 int ret = 0;
727 758
728 if (!priv->hw_enable) { 759 if (!priv->hw_enable) {
729 if (autoneg == AUTONEG_DISABLE && speed == SPEED_10) { 760 /* link is in low power mode now; duplex setting
761 * will take effect on next enc28j60_hw_init().
762 */
763 if (autoneg == AUTONEG_DISABLE && speed == SPEED_10)
730 priv->full_duplex = (duplex == DUPLEX_FULL); 764 priv->full_duplex = (duplex == DUPLEX_FULL);
731 if (!enc28j60_hw_init(priv)) { 765 else {
732 if (netif_msg_drv(priv))
733 dev_err(&ndev->dev,
734 "hw_reset() failed\n");
735 ret = -EINVAL;
736 }
737 } else {
738 if (netif_msg_link(priv)) 766 if (netif_msg_link(priv))
739 dev_warn(&ndev->dev, 767 dev_warn(&ndev->dev,
740 "unsupported link setting\n"); 768 "unsupported link setting\n");
@@ -1307,7 +1335,8 @@ static int enc28j60_net_open(struct net_device *dev)
1307 } 1335 }
1308 return -EADDRNOTAVAIL; 1336 return -EADDRNOTAVAIL;
1309 } 1337 }
1310 /* Reset the hardware here */ 1338 /* Reset the hardware here (and take it out of low power mode) */
1339 enc28j60_lowpower(priv, false);
1311 enc28j60_hw_disable(priv); 1340 enc28j60_hw_disable(priv);
1312 if (!enc28j60_hw_init(priv)) { 1341 if (!enc28j60_hw_init(priv)) {
1313 if (netif_msg_ifup(priv)) 1342 if (netif_msg_ifup(priv))
@@ -1337,6 +1366,7 @@ static int enc28j60_net_close(struct net_device *dev)
1337 printk(KERN_DEBUG DRV_NAME ": %s() enter\n", __FUNCTION__); 1366 printk(KERN_DEBUG DRV_NAME ": %s() enter\n", __FUNCTION__);
1338 1367
1339 enc28j60_hw_disable(priv); 1368 enc28j60_hw_disable(priv);
1369 enc28j60_lowpower(priv, true);
1340 netif_stop_queue(dev); 1370 netif_stop_queue(dev);
1341 1371
1342 return 0; 1372 return 0;
@@ -1537,6 +1567,8 @@ static int __devinit enc28j60_probe(struct spi_device *spi)
1537 dev->watchdog_timeo = TX_TIMEOUT; 1567 dev->watchdog_timeo = TX_TIMEOUT;
1538 SET_ETHTOOL_OPS(dev, &enc28j60_ethtool_ops); 1568 SET_ETHTOOL_OPS(dev, &enc28j60_ethtool_ops);
1539 1569
1570 enc28j60_lowpower(priv, true);
1571
1540 ret = register_netdev(dev); 1572 ret = register_netdev(dev);
1541 if (ret) { 1573 if (ret) {
1542 if (netif_msg_probe(priv)) 1574 if (netif_msg_probe(priv))
@@ -1556,7 +1588,7 @@ error_alloc:
1556 return ret; 1588 return ret;
1557} 1589}
1558 1590
1559static int enc28j60_remove(struct spi_device *spi) 1591static int __devexit enc28j60_remove(struct spi_device *spi)
1560{ 1592{
1561 struct enc28j60_net *priv = dev_get_drvdata(&spi->dev); 1593 struct enc28j60_net *priv = dev_get_drvdata(&spi->dev);
1562 1594
@@ -1573,15 +1605,16 @@ static int enc28j60_remove(struct spi_device *spi)
1573static struct spi_driver enc28j60_driver = { 1605static struct spi_driver enc28j60_driver = {
1574 .driver = { 1606 .driver = {
1575 .name = DRV_NAME, 1607 .name = DRV_NAME,
1576 .bus = &spi_bus_type,
1577 .owner = THIS_MODULE, 1608 .owner = THIS_MODULE,
1578 }, 1609 },
1579 .probe = enc28j60_probe, 1610 .probe = enc28j60_probe,
1580 .remove = __devexit_p(enc28j60_remove), 1611 .remove = __devexit_p(enc28j60_remove),
1581}; 1612};
1582 1613
1583static int __init enc28j60_init(void) 1614static int __init enc28j60_init(void)
1584{ 1615{
1616 msec20_to_jiffies = msecs_to_jiffies(20);
1617
1585 return spi_register_driver(&enc28j60_driver); 1618 return spi_register_driver(&enc28j60_driver);
1586} 1619}
1587 1620
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c
index 5f9c42e7a7f1..329edd9c08fc 100644
--- a/drivers/net/fec_mpc52xx.c
+++ b/drivers/net/fec_mpc52xx.c
@@ -78,7 +78,7 @@ module_param_array_named(mac, mpc52xx_fec_mac_addr, byte, NULL, 0);
78MODULE_PARM_DESC(mac, "six hex digits, ie. 0x1,0x2,0xc0,0x01,0xba,0xbe"); 78MODULE_PARM_DESC(mac, "six hex digits, ie. 0x1,0x2,0xc0,0x01,0xba,0xbe");
79 79
80#define MPC52xx_MESSAGES_DEFAULT ( NETIF_MSG_DRV | NETIF_MSG_PROBE | \ 80#define MPC52xx_MESSAGES_DEFAULT ( NETIF_MSG_DRV | NETIF_MSG_PROBE | \
81 NETIF_MSG_LINK | NETIF_MSG_IFDOWN | NETIF_MSG_IFDOWN ) 81 NETIF_MSG_LINK | NETIF_MSG_IFDOWN | NETIF_MSG_IFUP)
82static int debug = -1; /* the above default */ 82static int debug = -1; /* the above default */
83module_param(debug, int, 0); 83module_param(debug, int, 0);
84MODULE_PARM_DESC(debug, "debugging messages level"); 84MODULE_PARM_DESC(debug, "debugging messages level");
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 35f66d4a4595..2cb244763292 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -3273,6 +3273,20 @@ static void nv_link_irq(struct net_device *dev)
3273 dprintk(KERN_DEBUG "%s: link change notification done.\n", dev->name); 3273 dprintk(KERN_DEBUG "%s: link change notification done.\n", dev->name);
3274} 3274}
3275 3275
3276static void nv_msi_workaround(struct fe_priv *np)
3277{
3278
3279 /* Need to toggle the msi irq mask within the ethernet device,
3280 * otherwise, future interrupts will not be detected.
3281 */
3282 if (np->msi_flags & NV_MSI_ENABLED) {
3283 u8 __iomem *base = np->base;
3284
3285 writel(0, base + NvRegMSIIrqMask);
3286 writel(NVREG_MSI_VECTOR_0_ENABLED, base + NvRegMSIIrqMask);
3287 }
3288}
3289
3276static irqreturn_t nv_nic_irq(int foo, void *data) 3290static irqreturn_t nv_nic_irq(int foo, void *data)
3277{ 3291{
3278 struct net_device *dev = (struct net_device *) data; 3292 struct net_device *dev = (struct net_device *) data;
@@ -3295,6 +3309,8 @@ static irqreturn_t nv_nic_irq(int foo, void *data)
3295 if (!(events & np->irqmask)) 3309 if (!(events & np->irqmask))
3296 break; 3310 break;
3297 3311
3312 nv_msi_workaround(np);
3313
3298 spin_lock(&np->lock); 3314 spin_lock(&np->lock);
3299 nv_tx_done(dev); 3315 nv_tx_done(dev);
3300 spin_unlock(&np->lock); 3316 spin_unlock(&np->lock);
@@ -3410,6 +3426,8 @@ static irqreturn_t nv_nic_irq_optimized(int foo, void *data)
3410 if (!(events & np->irqmask)) 3426 if (!(events & np->irqmask))
3411 break; 3427 break;
3412 3428
3429 nv_msi_workaround(np);
3430
3413 spin_lock(&np->lock); 3431 spin_lock(&np->lock);
3414 nv_tx_done_optimized(dev, TX_WORK_PER_LOOP); 3432 nv_tx_done_optimized(dev, TX_WORK_PER_LOOP);
3415 spin_unlock(&np->lock); 3433 spin_unlock(&np->lock);
@@ -3750,6 +3768,8 @@ static irqreturn_t nv_nic_irq_test(int foo, void *data)
3750 if (!(events & NVREG_IRQ_TIMER)) 3768 if (!(events & NVREG_IRQ_TIMER))
3751 return IRQ_RETVAL(0); 3769 return IRQ_RETVAL(0);
3752 3770
3771 nv_msi_workaround(np);
3772
3753 spin_lock(&np->lock); 3773 spin_lock(&np->lock);
3754 np->intr_test = 1; 3774 np->intr_test = 1;
3755 spin_unlock(&np->lock); 3775 spin_unlock(&np->lock);
@@ -5823,6 +5843,7 @@ static int nv_resume(struct pci_dev *pdev)
5823 writel(txreg, base + NvRegTransmitPoll); 5843 writel(txreg, base + NvRegTransmitPoll);
5824 5844
5825 rc = nv_open(dev); 5845 rc = nv_open(dev);
5846 nv_set_multicast(dev);
5826out: 5847out:
5827 return rc; 5848 return rc;
5828} 5849}
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c
index 67b4b0728fce..a5baaf59ff66 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -1093,7 +1093,7 @@ err:
1093 if (registered) 1093 if (registered)
1094 unregister_netdev(ndev); 1094 unregister_netdev(ndev);
1095 1095
1096 if (fep != NULL) { 1096 if (fep && fep->ops) {
1097 (*fep->ops->free_bd)(ndev); 1097 (*fep->ops->free_bd)(ndev);
1098 (*fep->ops->cleanup_data)(ndev); 1098 (*fep->ops->cleanup_data)(ndev);
1099 } 1099 }
diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c
index dde9c7e6408a..00bc7fbb6b37 100644
--- a/drivers/net/hamradio/baycom_epp.c
+++ b/drivers/net/hamradio/baycom_epp.c
@@ -959,7 +959,7 @@ static int epp_close(struct net_device *dev)
959 unsigned char tmp[1]; 959 unsigned char tmp[1];
960 960
961 bc->work_running = 0; 961 bc->work_running = 0;
962 flush_scheduled_work(); 962 cancel_delayed_work_sync(&bc->run_work);
963 bc->stat = EPP_DCDBIT; 963 bc->stat = EPP_DCDBIT;
964 tmp[0] = 0; 964 tmp[0] = 0;
965 pp->ops->epp_write_addr(pp, tmp, 1, 0); 965 pp->ops->epp_write_addr(pp, tmp, 1, 0);
diff --git a/drivers/net/hamradio/dmascc.c b/drivers/net/hamradio/dmascc.c
index 0b94833e23f7..e8cfadefa4b6 100644
--- a/drivers/net/hamradio/dmascc.c
+++ b/drivers/net/hamradio/dmascc.c
@@ -1077,8 +1077,6 @@ static inline void rx_off(struct scc_priv *priv)
1077 1077
1078static void start_timer(struct scc_priv *priv, int t, int r15) 1078static void start_timer(struct scc_priv *priv, int t, int r15)
1079{ 1079{
1080 unsigned long flags;
1081
1082 outb(priv->tmr_mode, priv->tmr_ctrl); 1080 outb(priv->tmr_mode, priv->tmr_ctrl);
1083 if (t == 0) { 1081 if (t == 0) {
1084 tm_isr(priv); 1082 tm_isr(priv);
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c
index f90515935833..45ae9d1191d7 100644
--- a/drivers/net/hamradio/scc.c
+++ b/drivers/net/hamradio/scc.c
@@ -1340,9 +1340,10 @@ static unsigned int scc_set_param(struct scc_channel *scc, unsigned int cmd, uns
1340 case PARAM_RTS: 1340 case PARAM_RTS:
1341 if ( !(scc->wreg[R5] & RTS) ) 1341 if ( !(scc->wreg[R5] & RTS) )
1342 { 1342 {
1343 if (arg != TX_OFF) 1343 if (arg != TX_OFF) {
1344 scc_key_trx(scc, TX_ON); 1344 scc_key_trx(scc, TX_ON);
1345 scc_start_tx_timer(scc, t_txdelay, scc->kiss.txdelay); 1345 scc_start_tx_timer(scc, t_txdelay, scc->kiss.txdelay);
1346 }
1346 } else { 1347 } else {
1347 if (arg == TX_OFF) 1348 if (arg == TX_OFF)
1348 { 1349 {
diff --git a/drivers/net/ibm_newemac/Kconfig b/drivers/net/ibm_newemac/Kconfig
index 0d3e7380bad0..70a3272ee998 100644
--- a/drivers/net/ibm_newemac/Kconfig
+++ b/drivers/net/ibm_newemac/Kconfig
@@ -1,6 +1,7 @@
1config IBM_NEW_EMAC 1config IBM_NEW_EMAC
2 tristate "IBM EMAC Ethernet support" 2 tristate "IBM EMAC Ethernet support"
3 depends on PPC_DCR && PPC_MERGE 3 depends on PPC_DCR && PPC_MERGE
4 select CRC32
4 help 5 help
5 This driver supports the IBM EMAC family of Ethernet controllers 6 This driver supports the IBM EMAC family of Ethernet controllers
6 typically found on 4xx embedded PowerPC chips, but also on the 7 typically found on 4xx embedded PowerPC chips, but also on the
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index ae398f04c7b4..e79a26a886c8 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -718,7 +718,8 @@ void igb_down(struct igb_adapter *adapter)
718 adapter->link_speed = 0; 718 adapter->link_speed = 0;
719 adapter->link_duplex = 0; 719 adapter->link_duplex = 0;
720 720
721 igb_reset(adapter); 721 if (!pci_channel_offline(adapter->pdev))
722 igb_reset(adapter);
722 igb_clean_all_tx_rings(adapter); 723 igb_clean_all_tx_rings(adapter);
723 igb_clean_all_rx_rings(adapter); 724 igb_clean_all_rx_rings(adapter);
724} 725}
diff --git a/drivers/net/ipg.c b/drivers/net/ipg.c
index 9b358f61ed7f..2c03f4e2ccc4 100644
--- a/drivers/net/ipg.c
+++ b/drivers/net/ipg.c
@@ -577,12 +577,12 @@ static void ipg_nic_set_multicast_list(struct net_device *dev)
577 /* NIC to be configured in promiscuous mode. */ 577 /* NIC to be configured in promiscuous mode. */
578 receivemode = IPG_RM_RECEIVEALLFRAMES; 578 receivemode = IPG_RM_RECEIVEALLFRAMES;
579 } else if ((dev->flags & IFF_ALLMULTI) || 579 } else if ((dev->flags & IFF_ALLMULTI) ||
580 (dev->flags & IFF_MULTICAST & 580 ((dev->flags & IFF_MULTICAST) &&
581 (dev->mc_count > IPG_MULTICAST_HASHTABLE_SIZE))) { 581 (dev->mc_count > IPG_MULTICAST_HASHTABLE_SIZE))) {
582 /* NIC to be configured to receive all multicast 582 /* NIC to be configured to receive all multicast
583 * frames. */ 583 * frames. */
584 receivemode |= IPG_RM_RECEIVEMULTICAST; 584 receivemode |= IPG_RM_RECEIVEMULTICAST;
585 } else if (dev->flags & IFF_MULTICAST & (dev->mc_count > 0)) { 585 } else if ((dev->flags & IFF_MULTICAST) && (dev->mc_count > 0)) {
586 /* NIC to be configured to receive selected 586 /* NIC to be configured to receive selected
587 * multicast addresses. */ 587 * multicast addresses. */
588 receivemode |= IPG_RM_RECEIVEMULTICASTHASH; 588 receivemode |= IPG_RM_RECEIVEMULTICASTHASH;
@@ -1271,7 +1271,7 @@ static void ipg_nic_rx_with_end(struct net_device *dev,
1271 1271
1272 framelen = le64_to_cpu(rxfd->rfs) & IPG_RFS_RXFRAMELEN; 1272 framelen = le64_to_cpu(rxfd->rfs) & IPG_RFS_RXFRAMELEN;
1273 1273
1274 endframeLen = framelen - jumbo->current_size; 1274 endframelen = framelen - jumbo->current_size;
1275 /* 1275 /*
1276 if (framelen > IPG_RXFRAG_SIZE) 1276 if (framelen > IPG_RXFRAG_SIZE)
1277 framelen=IPG_RXFRAG_SIZE; 1277 framelen=IPG_RXFRAG_SIZE;
@@ -1279,8 +1279,8 @@ static void ipg_nic_rx_with_end(struct net_device *dev,
1279 if (framelen > IPG_RXSUPPORT_SIZE) 1279 if (framelen > IPG_RXSUPPORT_SIZE)
1280 dev_kfree_skb_irq(jumbo->skb); 1280 dev_kfree_skb_irq(jumbo->skb);
1281 else { 1281 else {
1282 memcpy(skb_put(jumbo->skb, endframeLen), 1282 memcpy(skb_put(jumbo->skb, endframelen),
1283 skb->data, endframeLen); 1283 skb->data, endframelen);
1284 1284
1285 jumbo->skb->protocol = 1285 jumbo->skb->protocol =
1286 eth_type_trans(jumbo->skb, dev); 1286 eth_type_trans(jumbo->skb, dev);
@@ -1352,16 +1352,16 @@ static int ipg_nic_rx(struct net_device *dev)
1352 1352
1353 switch (ipg_nic_rx_check_frame_type(dev)) { 1353 switch (ipg_nic_rx_check_frame_type(dev)) {
1354 case FRAME_WITH_START_WITH_END: 1354 case FRAME_WITH_START_WITH_END:
1355 ipg_nic_rx_with_start_and_end(dev, tp, rxfd, entry); 1355 ipg_nic_rx_with_start_and_end(dev, sp, rxfd, entry);
1356 break; 1356 break;
1357 case FRAME_WITH_START: 1357 case FRAME_WITH_START:
1358 ipg_nic_rx_with_start(dev, tp, rxfd, entry); 1358 ipg_nic_rx_with_start(dev, sp, rxfd, entry);
1359 break; 1359 break;
1360 case FRAME_WITH_END: 1360 case FRAME_WITH_END:
1361 ipg_nic_rx_with_end(dev, tp, rxfd, entry); 1361 ipg_nic_rx_with_end(dev, sp, rxfd, entry);
1362 break; 1362 break;
1363 case FRAME_NO_START_NO_END: 1363 case FRAME_NO_START_NO_END:
1364 ipg_nic_rx_no_start_no_end(dev, tp, rxfd, entry); 1364 ipg_nic_rx_no_start_no_end(dev, sp, rxfd, entry);
1365 break; 1365 break;
1366 } 1366 }
1367 } 1367 }
@@ -1808,7 +1808,7 @@ static int ipg_nic_open(struct net_device *dev)
1808 /* initialize JUMBO Frame control variable */ 1808 /* initialize JUMBO Frame control variable */
1809 sp->jumbo.found_start = 0; 1809 sp->jumbo.found_start = 0;
1810 sp->jumbo.current_size = 0; 1810 sp->jumbo.current_size = 0;
1811 sp->jumbo.skb = 0; 1811 sp->jumbo.skb = NULL;
1812 dev->mtu = IPG_TXFRAG_SIZE; 1812 dev->mtu = IPG_TXFRAG_SIZE;
1813#endif 1813#endif
1814 1814
diff --git a/drivers/net/irda/Kconfig b/drivers/net/irda/Kconfig
index ce816ba9c40d..e6317557a531 100644
--- a/drivers/net/irda/Kconfig
+++ b/drivers/net/irda/Kconfig
@@ -329,6 +329,7 @@ config PXA_FICP
329config MCS_FIR 329config MCS_FIR
330 tristate "MosChip MCS7780 IrDA-USB dongle" 330 tristate "MosChip MCS7780 IrDA-USB dongle"
331 depends on IRDA && USB && EXPERIMENTAL 331 depends on IRDA && USB && EXPERIMENTAL
332 select CRC32
332 help 333 help
333 Say Y or M here if you want to build support for the MosChip 334 Say Y or M here if you want to build support for the MosChip
334 MCS7780 IrDA-USB bridge device driver. 335 MCS7780 IrDA-USB bridge device driver.
diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c
index 9081234ab458..6f50ed7b183f 100644
--- a/drivers/net/irda/irda-usb.c
+++ b/drivers/net/irda/irda-usb.c
@@ -1120,7 +1120,7 @@ static int stir421x_patch_device(struct irda_usb_cb *self)
1120 } 1120 }
1121 } 1121 }
1122 1122
1123 if (self->usbdev->descriptor.bcdDevice == fw_version) { 1123 if (self->usbdev->descriptor.bcdDevice == cpu_to_le16(fw_version)) {
1124 /* 1124 /*
1125 * If we're here, we've found a correct patch 1125 * If we're here, we've found a correct patch
1126 * The actual image starts after the "STMP" keyword 1126 * The actual image starts after the "STMP" keyword
diff --git a/drivers/net/irda/irda-usb.h b/drivers/net/irda/irda-usb.h
index e846c38224a3..a0ca9c1fe196 100644
--- a/drivers/net/irda/irda-usb.h
+++ b/drivers/net/irda/irda-usb.h
@@ -117,11 +117,11 @@
117struct irda_class_desc { 117struct irda_class_desc {
118 __u8 bLength; 118 __u8 bLength;
119 __u8 bDescriptorType; 119 __u8 bDescriptorType;
120 __u16 bcdSpecRevision; 120 __le16 bcdSpecRevision;
121 __u8 bmDataSize; 121 __u8 bmDataSize;
122 __u8 bmWindowSize; 122 __u8 bmWindowSize;
123 __u8 bmMinTurnaroundTime; 123 __u8 bmMinTurnaroundTime;
124 __u16 wBaudRate; 124 __le16 wBaudRate;
125 __u8 bmAdditionalBOFs; 125 __u8 bmAdditionalBOFs;
126 __u8 bIrdaRateSniff; 126 __u8 bIrdaRateSniff;
127 __u8 bMaxUnicastList; 127 __u8 bMaxUnicastList;
diff --git a/drivers/net/ixgbe/ixgbe_82598.c b/drivers/net/ixgbe/ixgbe_82598.c
index 6321b059ce13..2f38e847e2cd 100644
--- a/drivers/net/ixgbe/ixgbe_82598.c
+++ b/drivers/net/ixgbe/ixgbe_82598.c
@@ -58,8 +58,8 @@ static s32 ixgbe_reset_hw_82598(struct ixgbe_hw *hw);
58 58
59static s32 ixgbe_get_invariants_82598(struct ixgbe_hw *hw) 59static s32 ixgbe_get_invariants_82598(struct ixgbe_hw *hw)
60{ 60{
61 hw->mac.num_rx_queues = IXGBE_82598_MAX_TX_QUEUES; 61 hw->mac.num_rx_queues = IXGBE_82598_MAX_RX_QUEUES;
62 hw->mac.num_tx_queues = IXGBE_82598_MAX_RX_QUEUES; 62 hw->mac.num_tx_queues = IXGBE_82598_MAX_TX_QUEUES;
63 hw->mac.num_rx_addrs = IXGBE_82598_RAR_ENTRIES; 63 hw->mac.num_rx_addrs = IXGBE_82598_RAR_ENTRIES;
64 64
65 /* PHY ops are filled in by default properly for Fiber only */ 65 /* PHY ops are filled in by default properly for Fiber only */
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 7b859220c255..8f0460901153 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -1969,7 +1969,8 @@ void ixgbe_down(struct ixgbe_adapter *adapter)
1969 netif_carrier_off(netdev); 1969 netif_carrier_off(netdev);
1970 netif_stop_queue(netdev); 1970 netif_stop_queue(netdev);
1971 1971
1972 ixgbe_reset(adapter); 1972 if (!pci_channel_offline(adapter->pdev))
1973 ixgbe_reset(adapter);
1973 ixgbe_clean_all_tx_rings(adapter); 1974 ixgbe_clean_all_tx_rings(adapter);
1974 ixgbe_clean_all_rx_rings(adapter); 1975 ixgbe_clean_all_rx_rings(adapter);
1975 1976
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index c91b12ea26ad..e0d76c75aea0 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -75,7 +75,7 @@
75#include "myri10ge_mcp.h" 75#include "myri10ge_mcp.h"
76#include "myri10ge_mcp_gen_header.h" 76#include "myri10ge_mcp_gen_header.h"
77 77
78#define MYRI10GE_VERSION_STR "1.3.2-1.287" 78#define MYRI10GE_VERSION_STR "1.3.99-1.347"
79 79
80MODULE_DESCRIPTION("Myricom 10G driver (10GbE)"); 80MODULE_DESCRIPTION("Myricom 10G driver (10GbE)");
81MODULE_AUTHOR("Maintainer: help@myri.com"); 81MODULE_AUTHOR("Maintainer: help@myri.com");
@@ -631,7 +631,7 @@ static int myri10ge_adopt_running_firmware(struct myri10ge_priv *mgp)
631 return status; 631 return status;
632} 632}
633 633
634int myri10ge_get_firmware_capabilities(struct myri10ge_priv *mgp) 634static int myri10ge_get_firmware_capabilities(struct myri10ge_priv *mgp)
635{ 635{
636 struct myri10ge_cmd cmd; 636 struct myri10ge_cmd cmd;
637 int status; 637 int status;
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h
index 8cb29f5b1038..da4c4fb97064 100644
--- a/drivers/net/netxen/netxen_nic.h
+++ b/drivers/net/netxen/netxen_nic.h
@@ -776,7 +776,6 @@ struct netxen_hardware_context {
776 776
777 u8 revision_id; 777 u8 revision_id;
778 u16 board_type; 778 u16 board_type;
779 u16 max_ports;
780 struct netxen_board_info boardcfg; 779 struct netxen_board_info boardcfg;
781 u32 xg_linkup; 780 u32 xg_linkup;
782 u32 qg_linksup; 781 u32 qg_linksup;
@@ -863,6 +862,7 @@ struct netxen_adapter {
863 unsigned char mac_addr[ETH_ALEN]; 862 unsigned char mac_addr[ETH_ALEN];
864 int mtu; 863 int mtu;
865 int portnum; 864 int portnum;
865 u8 physical_port;
866 866
867 struct work_struct watchdog_task; 867 struct work_struct watchdog_task;
868 struct timer_list watchdog_timer; 868 struct timer_list watchdog_timer;
@@ -1034,7 +1034,6 @@ int netxen_rom_se(struct netxen_adapter *adapter, int addr);
1034 1034
1035/* Functions from netxen_nic_isr.c */ 1035/* Functions from netxen_nic_isr.c */
1036void netxen_initialize_adapter_sw(struct netxen_adapter *adapter); 1036void netxen_initialize_adapter_sw(struct netxen_adapter *adapter);
1037void netxen_initialize_adapter_hw(struct netxen_adapter *adapter);
1038void *netxen_alloc(struct pci_dev *pdev, size_t sz, dma_addr_t * ptr, 1037void *netxen_alloc(struct pci_dev *pdev, size_t sz, dma_addr_t * ptr,
1039 struct pci_dev **used_dev); 1038 struct pci_dev **used_dev);
1040void netxen_initialize_adapter_ops(struct netxen_adapter *adapter); 1039void netxen_initialize_adapter_ops(struct netxen_adapter *adapter);
@@ -1077,20 +1076,6 @@ static const struct netxen_brdinfo netxen_boards[] = {
1077 1076
1078#define NUM_SUPPORTED_BOARDS ARRAY_SIZE(netxen_boards) 1077#define NUM_SUPPORTED_BOARDS ARRAY_SIZE(netxen_boards)
1079 1078
1080static inline void get_brd_port_by_type(u32 type, int *ports)
1081{
1082 int i, found = 0;
1083 for (i = 0; i < NUM_SUPPORTED_BOARDS; ++i) {
1084 if (netxen_boards[i].brdtype == type) {
1085 *ports = netxen_boards[i].ports;
1086 found = 1;
1087 break;
1088 }
1089 }
1090 if (!found)
1091 *ports = 0;
1092}
1093
1094static inline void get_brd_name_by_type(u32 type, char *name) 1079static inline void get_brd_name_by_type(u32 type, char *name)
1095{ 1080{
1096 int i, found = 0; 1081 int i, found = 0;
@@ -1169,5 +1154,4 @@ extern int netxen_rom_fast_read(struct netxen_adapter *adapter, int addr,
1169 1154
1170extern struct ethtool_ops netxen_nic_ethtool_ops; 1155extern struct ethtool_ops netxen_nic_ethtool_ops;
1171 1156
1172extern int physical_port[]; /* physical port # from virtual port.*/
1173#endif /* __NETXEN_NIC_H_ */ 1157#endif /* __NETXEN_NIC_H_ */
diff --git a/drivers/net/netxen/netxen_nic_ethtool.c b/drivers/net/netxen/netxen_nic_ethtool.c
index 6e98d830eefb..723487bf200c 100644
--- a/drivers/net/netxen/netxen_nic_ethtool.c
+++ b/drivers/net/netxen/netxen_nic_ethtool.c
@@ -369,7 +369,7 @@ netxen_nic_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *p)
369 for (i = 3; niu_registers[mode].reg[i - 3] != -1; i++) { 369 for (i = 3; niu_registers[mode].reg[i - 3] != -1; i++) {
370 /* GB: port specific registers */ 370 /* GB: port specific registers */
371 if (mode == 0 && i >= 19) 371 if (mode == 0 && i >= 19)
372 window = physical_port[adapter->portnum] * 372 window = adapter->physical_port *
373 NETXEN_NIC_PORT_WINDOW; 373 NETXEN_NIC_PORT_WINDOW;
374 374
375 NETXEN_NIC_LOCKED_READ_REG(niu_registers[mode]. 375 NETXEN_NIC_LOCKED_READ_REG(niu_registers[mode].
@@ -527,7 +527,7 @@ netxen_nic_get_pauseparam(struct net_device *dev,
527{ 527{
528 struct netxen_adapter *adapter = netdev_priv(dev); 528 struct netxen_adapter *adapter = netdev_priv(dev);
529 __u32 val; 529 __u32 val;
530 int port = physical_port[adapter->portnum]; 530 int port = adapter->physical_port;
531 531
532 if (adapter->ahw.board_type == NETXEN_NIC_GBE) { 532 if (adapter->ahw.board_type == NETXEN_NIC_GBE) {
533 if ((port < 0) || (port > NETXEN_NIU_MAX_GBE_PORTS)) 533 if ((port < 0) || (port > NETXEN_NIU_MAX_GBE_PORTS))
@@ -573,7 +573,7 @@ netxen_nic_set_pauseparam(struct net_device *dev,
573{ 573{
574 struct netxen_adapter *adapter = netdev_priv(dev); 574 struct netxen_adapter *adapter = netdev_priv(dev);
575 __u32 val; 575 __u32 val;
576 int port = physical_port[adapter->portnum]; 576 int port = adapter->physical_port;
577 /* read mode */ 577 /* read mode */
578 if (adapter->ahw.board_type == NETXEN_NIC_GBE) { 578 if (adapter->ahw.board_type == NETXEN_NIC_GBE) {
579 if ((port < 0) || (port > NETXEN_NIU_MAX_GBE_PORTS)) 579 if ((port < 0) || (port > NETXEN_NIU_MAX_GBE_PORTS))
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c
index af7356468251..c43d06b8de9b 100644
--- a/drivers/net/netxen/netxen_nic_hw.c
+++ b/drivers/net/netxen/netxen_nic_hw.c
@@ -396,11 +396,8 @@ int netxen_nic_hw_resources(struct netxen_adapter *adapter)
396 } 396 }
397 adapter->intr_scheme = readl( 397 adapter->intr_scheme = readl(
398 NETXEN_CRB_NORMALIZE(adapter, CRB_NIC_CAPABILITIES_FW)); 398 NETXEN_CRB_NORMALIZE(adapter, CRB_NIC_CAPABILITIES_FW));
399 printk(KERN_NOTICE "%s: FW capabilities:0x%x\n", netxen_nic_driver_name,
400 adapter->intr_scheme);
401 adapter->msi_mode = readl( 399 adapter->msi_mode = readl(
402 NETXEN_CRB_NORMALIZE(adapter, CRB_NIC_MSI_MODE_FW)); 400 NETXEN_CRB_NORMALIZE(adapter, CRB_NIC_MSI_MODE_FW));
403 DPRINTK(INFO, "Receive Peg ready too. starting stuff\n");
404 401
405 addr = netxen_alloc(adapter->ahw.pdev, 402 addr = netxen_alloc(adapter->ahw.pdev,
406 sizeof(struct netxen_ring_ctx) + 403 sizeof(struct netxen_ring_ctx) +
@@ -408,8 +405,6 @@ int netxen_nic_hw_resources(struct netxen_adapter *adapter)
408 (dma_addr_t *) & adapter->ctx_desc_phys_addr, 405 (dma_addr_t *) & adapter->ctx_desc_phys_addr,
409 &adapter->ctx_desc_pdev); 406 &adapter->ctx_desc_pdev);
410 407
411 printk(KERN_INFO "ctx_desc_phys_addr: 0x%llx\n",
412 (unsigned long long) adapter->ctx_desc_phys_addr);
413 if (addr == NULL) { 408 if (addr == NULL) {
414 DPRINTK(ERR, "bad return from pci_alloc_consistent\n"); 409 DPRINTK(ERR, "bad return from pci_alloc_consistent\n");
415 err = -ENOMEM; 410 err = -ENOMEM;
@@ -429,8 +424,6 @@ int netxen_nic_hw_resources(struct netxen_adapter *adapter)
429 adapter->max_tx_desc_count, 424 adapter->max_tx_desc_count,
430 (dma_addr_t *) & hw->cmd_desc_phys_addr, 425 (dma_addr_t *) & hw->cmd_desc_phys_addr,
431 &adapter->ahw.cmd_desc_pdev); 426 &adapter->ahw.cmd_desc_pdev);
432 printk(KERN_INFO "cmd_desc_phys_addr: 0x%llx\n",
433 (unsigned long long) hw->cmd_desc_phys_addr);
434 427
435 if (addr == NULL) { 428 if (addr == NULL) {
436 DPRINTK(ERR, "bad return from pci_alloc_consistent\n"); 429 DPRINTK(ERR, "bad return from pci_alloc_consistent\n");
@@ -1032,15 +1025,15 @@ int netxen_nic_get_board_info(struct netxen_adapter *adapter)
1032int netxen_nic_set_mtu_gb(struct netxen_adapter *adapter, int new_mtu) 1025int netxen_nic_set_mtu_gb(struct netxen_adapter *adapter, int new_mtu)
1033{ 1026{
1034 netxen_nic_write_w0(adapter, 1027 netxen_nic_write_w0(adapter,
1035 NETXEN_NIU_GB_MAX_FRAME_SIZE( 1028 NETXEN_NIU_GB_MAX_FRAME_SIZE(adapter->physical_port),
1036 physical_port[adapter->portnum]), new_mtu); 1029 new_mtu);
1037 return 0; 1030 return 0;
1038} 1031}
1039 1032
1040int netxen_nic_set_mtu_xgb(struct netxen_adapter *adapter, int new_mtu) 1033int netxen_nic_set_mtu_xgb(struct netxen_adapter *adapter, int new_mtu)
1041{ 1034{
1042 new_mtu += NETXEN_NIU_HDRSIZE + NETXEN_NIU_TLRSIZE; 1035 new_mtu += NETXEN_NIU_HDRSIZE + NETXEN_NIU_TLRSIZE;
1043 if (physical_port[adapter->portnum] == 0) 1036 if (adapter->physical_port == 0)
1044 netxen_nic_write_w0(adapter, NETXEN_NIU_XGE_MAX_FRAME_SIZE, 1037 netxen_nic_write_w0(adapter, NETXEN_NIU_XGE_MAX_FRAME_SIZE,
1045 new_mtu); 1038 new_mtu);
1046 else 1039 else
@@ -1051,7 +1044,7 @@ int netxen_nic_set_mtu_xgb(struct netxen_adapter *adapter, int new_mtu)
1051 1044
1052void netxen_nic_init_niu_gb(struct netxen_adapter *adapter) 1045void netxen_nic_init_niu_gb(struct netxen_adapter *adapter)
1053{ 1046{
1054 netxen_niu_gbe_init_port(adapter, physical_port[adapter->portnum]); 1047 netxen_niu_gbe_init_port(adapter, adapter->physical_port);
1055} 1048}
1056 1049
1057void 1050void
@@ -1127,7 +1120,6 @@ void netxen_nic_set_link_parameters(struct netxen_adapter *adapter)
1127 1120
1128void netxen_nic_flash_print(struct netxen_adapter *adapter) 1121void netxen_nic_flash_print(struct netxen_adapter *adapter)
1129{ 1122{
1130 int valid = 1;
1131 u32 fw_major = 0; 1123 u32 fw_major = 0;
1132 u32 fw_minor = 0; 1124 u32 fw_minor = 0;
1133 u32 fw_build = 0; 1125 u32 fw_build = 0;
@@ -1137,70 +1129,62 @@ void netxen_nic_flash_print(struct netxen_adapter *adapter)
1137 __le32 *ptr32; 1129 __le32 *ptr32;
1138 1130
1139 struct netxen_board_info *board_info = &(adapter->ahw.boardcfg); 1131 struct netxen_board_info *board_info = &(adapter->ahw.boardcfg);
1140 if (board_info->magic != NETXEN_BDINFO_MAGIC) { 1132
1141 printk 1133 adapter->driver_mismatch = 0;
1142 ("NetXen Unknown board config, Read 0x%x expected as 0x%x\n", 1134
1143 board_info->magic, NETXEN_BDINFO_MAGIC); 1135 ptr32 = (u32 *)&serial_num;
1144 valid = 0; 1136 addr = NETXEN_USER_START +
1145 } 1137 offsetof(struct netxen_new_user_info, serial_num);
1146 if (board_info->header_version != NETXEN_BDINFO_VERSION) { 1138 for (i = 0; i < 8; i++) {
1147 printk("NetXen Unknown board config version." 1139 if (netxen_rom_fast_read(adapter, addr, ptr32) == -1) {
1148 " Read %x, expected %x\n", 1140 printk("%s: ERROR reading %s board userarea.\n",
1149 board_info->header_version, NETXEN_BDINFO_VERSION); 1141 netxen_nic_driver_name,
1150 valid = 0; 1142 netxen_nic_driver_name);
1151 } 1143 adapter->driver_mismatch = 1;
1152 if (valid) { 1144 return;
1153 ptr32 = (u32 *)&serial_num;
1154 addr = NETXEN_USER_START +
1155 offsetof(struct netxen_new_user_info, serial_num);
1156 for (i = 0; i < 8; i++) {
1157 if (netxen_rom_fast_read(adapter, addr, ptr32) == -1) {
1158 printk("%s: ERROR reading %s board userarea.\n",
1159 netxen_nic_driver_name,
1160 netxen_nic_driver_name);
1161 return;
1162 }
1163 ptr32++;
1164 addr += sizeof(u32);
1165 } 1145 }
1146 ptr32++;
1147 addr += sizeof(u32);
1148 }
1149
1150 fw_major = readl(NETXEN_CRB_NORMALIZE(adapter,
1151 NETXEN_FW_VERSION_MAJOR));
1152 fw_minor = readl(NETXEN_CRB_NORMALIZE(adapter,
1153 NETXEN_FW_VERSION_MINOR));
1154 fw_build =
1155 readl(NETXEN_CRB_NORMALIZE(adapter, NETXEN_FW_VERSION_SUB));
1166 1156
1157 if (adapter->portnum == 0) {
1167 get_brd_name_by_type(board_info->board_type, brd_name); 1158 get_brd_name_by_type(board_info->board_type, brd_name);
1168 1159
1169 printk("NetXen %s Board S/N %s Chip id 0x%x\n", 1160 printk("NetXen %s Board S/N %s Chip id 0x%x\n",
1170 brd_name, serial_num, board_info->chip_id); 1161 brd_name, serial_num, board_info->chip_id);
1171 1162 printk("NetXen Firmware version %d.%d.%d\n", fw_major,
1172 printk("NetXen %s Board #%d, Chip id 0x%x\n", 1163 fw_minor, fw_build);
1173 board_info->board_type == 0x0b ? "XGB" : "GBE",
1174 board_info->board_num, board_info->chip_id);
1175 fw_major = readl(NETXEN_CRB_NORMALIZE(adapter,
1176 NETXEN_FW_VERSION_MAJOR));
1177 fw_minor = readl(NETXEN_CRB_NORMALIZE(adapter,
1178 NETXEN_FW_VERSION_MINOR));
1179 fw_build =
1180 readl(NETXEN_CRB_NORMALIZE(adapter, NETXEN_FW_VERSION_SUB));
1181
1182 printk("NetXen Firmware version %d.%d.%d\n", fw_major, fw_minor,
1183 fw_build);
1184 } 1164 }
1165
1185 if (fw_major != _NETXEN_NIC_LINUX_MAJOR) { 1166 if (fw_major != _NETXEN_NIC_LINUX_MAJOR) {
1186 printk(KERN_ERR "The mismatch in driver version and firmware "
1187 "version major number\n"
1188 "Driver version major number = %d \t"
1189 "Firmware version major number = %d \n",
1190 _NETXEN_NIC_LINUX_MAJOR, fw_major);
1191 adapter->driver_mismatch = 1; 1167 adapter->driver_mismatch = 1;
1192 } 1168 }
1193 if (fw_minor != _NETXEN_NIC_LINUX_MINOR && 1169 if (fw_minor != _NETXEN_NIC_LINUX_MINOR &&
1194 fw_minor != (_NETXEN_NIC_LINUX_MINOR + 1)) { 1170 fw_minor != (_NETXEN_NIC_LINUX_MINOR + 1)) {
1195 printk(KERN_ERR "The mismatch in driver version and firmware "
1196 "version minor number\n"
1197 "Driver version minor number = %d \t"
1198 "Firmware version minor number = %d \n",
1199 _NETXEN_NIC_LINUX_MINOR, fw_minor);
1200 adapter->driver_mismatch = 1; 1171 adapter->driver_mismatch = 1;
1201 } 1172 }
1202 if (adapter->driver_mismatch) 1173 if (adapter->driver_mismatch) {
1203 printk(KERN_INFO "Use the driver with version no %d.%d.xxx\n", 1174 printk(KERN_ERR "%s: driver and firmware version mismatch\n",
1204 fw_major, fw_minor); 1175 adapter->netdev->name);
1176 return;
1177 }
1178
1179 switch (adapter->ahw.board_type) {
1180 case NETXEN_NIC_GBE:
1181 dev_info(&adapter->pdev->dev, "%s: GbE port initialized\n",
1182 adapter->netdev->name);
1183 break;
1184 case NETXEN_NIC_XGBE:
1185 dev_info(&adapter->pdev->dev, "%s: XGbE port initialized\n",
1186 adapter->netdev->name);
1187 break;
1188 }
1205} 1189}
1206 1190
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index 45fa33e0cb90..70d1b22ced22 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -203,21 +203,6 @@ void netxen_initialize_adapter_sw(struct netxen_adapter *adapter)
203 } 203 }
204} 204}
205 205
206void netxen_initialize_adapter_hw(struct netxen_adapter *adapter)
207{
208 int ports = 0;
209 struct netxen_board_info *board_info = &(adapter->ahw.boardcfg);
210
211 if (netxen_nic_get_board_info(adapter) != 0)
212 printk("%s: Error getting board config info.\n",
213 netxen_nic_driver_name);
214 get_brd_port_by_type(board_info->board_type, &ports);
215 if (ports == 0)
216 printk(KERN_ERR "%s: Unknown board type\n",
217 netxen_nic_driver_name);
218 adapter->ahw.max_ports = ports;
219}
220
221void netxen_initialize_adapter_ops(struct netxen_adapter *adapter) 206void netxen_initialize_adapter_ops(struct netxen_adapter *adapter)
222{ 207{
223 switch (adapter->ahw.board_type) { 208 switch (adapter->ahw.board_type) {
@@ -765,18 +750,13 @@ int netxen_flash_unlock(struct netxen_adapter *adapter)
765 750
766int netxen_pinit_from_rom(struct netxen_adapter *adapter, int verbose) 751int netxen_pinit_from_rom(struct netxen_adapter *adapter, int verbose)
767{ 752{
768 int addr, val, status; 753 int addr, val;
769 int n, i; 754 int n, i;
770 int init_delay = 0; 755 int init_delay = 0;
771 struct crb_addr_pair *buf; 756 struct crb_addr_pair *buf;
772 u32 off; 757 u32 off;
773 758
774 /* resetall */ 759 /* resetall */
775 status = netxen_nic_get_board_info(adapter);
776 if (status)
777 printk("%s: netxen_pinit_from_rom: Error getting board info\n",
778 netxen_nic_driver_name);
779
780 netxen_crb_writelit_adapter(adapter, NETXEN_ROMUSB_GLB_SW_RESET, 760 netxen_crb_writelit_adapter(adapter, NETXEN_ROMUSB_GLB_SW_RESET,
781 NETXEN_ROMBUS_RESET); 761 NETXEN_ROMBUS_RESET);
782 762
@@ -860,10 +840,10 @@ int netxen_pinit_from_rom(struct netxen_adapter *adapter, int verbose)
860 netxen_nic_pci_change_crbwindow(adapter, 1); 840 netxen_nic_pci_change_crbwindow(adapter, 1);
861 } 841 }
862 if (init_delay == 1) { 842 if (init_delay == 1) {
863 msleep(2000); 843 msleep(1000);
864 init_delay = 0; 844 init_delay = 0;
865 } 845 }
866 msleep(20); 846 msleep(1);
867 } 847 }
868 kfree(buf); 848 kfree(buf);
869 849
@@ -938,12 +918,28 @@ int netxen_initialize_adapter_offload(struct netxen_adapter *adapter)
938 918
939void netxen_free_adapter_offload(struct netxen_adapter *adapter) 919void netxen_free_adapter_offload(struct netxen_adapter *adapter)
940{ 920{
921 int i;
922
941 if (adapter->dummy_dma.addr) { 923 if (adapter->dummy_dma.addr) {
942 pci_free_consistent(adapter->ahw.pdev, 924 i = 100;
925 do {
926 if (dma_watchdog_shutdown_request(adapter) == 1)
927 break;
928 msleep(50);
929 if (dma_watchdog_shutdown_poll_result(adapter) == 1)
930 break;
931 } while (--i);
932
933 if (i) {
934 pci_free_consistent(adapter->ahw.pdev,
943 NETXEN_HOST_DUMMY_DMA_SIZE, 935 NETXEN_HOST_DUMMY_DMA_SIZE,
944 adapter->dummy_dma.addr, 936 adapter->dummy_dma.addr,
945 adapter->dummy_dma.phys_addr); 937 adapter->dummy_dma.phys_addr);
946 adapter->dummy_dma.addr = NULL; 938 adapter->dummy_dma.addr = NULL;
939 } else {
940 printk(KERN_ERR "%s: dma_watchdog_shutdown failed\n",
941 adapter->netdev->name);
942 }
947 } 943 }
948} 944}
949 945
diff --git a/drivers/net/netxen/netxen_nic_isr.c b/drivers/net/netxen/netxen_nic_isr.c
index f487615f4063..96cec41f9019 100644
--- a/drivers/net/netxen/netxen_nic_isr.c
+++ b/drivers/net/netxen/netxen_nic_isr.c
@@ -145,7 +145,7 @@ static void netxen_nic_isr_other(struct netxen_adapter *adapter)
145 145
146 /* verify the offset */ 146 /* verify the offset */
147 val = readl(NETXEN_CRB_NORMALIZE(adapter, CRB_XG_STATE)); 147 val = readl(NETXEN_CRB_NORMALIZE(adapter, CRB_XG_STATE));
148 val = val >> physical_port[adapter->portnum]; 148 val = val >> adapter->physical_port;
149 if (val == adapter->ahw.qg_linksup) 149 if (val == adapter->ahw.qg_linksup)
150 return; 150 return;
151 151
@@ -199,7 +199,7 @@ void netxen_nic_xgbe_handle_phy_intr(struct netxen_adapter *adapter)
199 199
200 /* WINDOW = 1 */ 200 /* WINDOW = 1 */
201 val = readl(NETXEN_CRB_NORMALIZE(adapter, CRB_XG_STATE)); 201 val = readl(NETXEN_CRB_NORMALIZE(adapter, CRB_XG_STATE));
202 val >>= (physical_port[adapter->portnum] * 8); 202 val >>= (adapter->physical_port * 8);
203 val &= 0xff; 203 val &= 0xff;
204 204
205 if (adapter->ahw.xg_linkup == 1 && val != XG_LINK_UP) { 205 if (adapter->ahw.xg_linkup == 1 && val != XG_LINK_UP) {
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 7144c255ce54..63cd67b931e7 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -70,17 +70,19 @@ static void netxen_nic_poll_controller(struct net_device *netdev);
70static irqreturn_t netxen_intr(int irq, void *data); 70static irqreturn_t netxen_intr(int irq, void *data);
71static irqreturn_t netxen_msi_intr(int irq, void *data); 71static irqreturn_t netxen_msi_intr(int irq, void *data);
72 72
73int physical_port[] = {0, 1, 2, 3};
74
75/* PCI Device ID Table */ 73/* PCI Device ID Table */
74#define ENTRY(device) \
75 {PCI_DEVICE(0x4040, (device)), \
76 .class = PCI_CLASS_NETWORK_ETHERNET << 8, .class_mask = ~0}
77
76static struct pci_device_id netxen_pci_tbl[] __devinitdata = { 78static struct pci_device_id netxen_pci_tbl[] __devinitdata = {
77 {PCI_DEVICE(0x4040, 0x0001)}, 79 ENTRY(0x0001),
78 {PCI_DEVICE(0x4040, 0x0002)}, 80 ENTRY(0x0002),
79 {PCI_DEVICE(0x4040, 0x0003)}, 81 ENTRY(0x0003),
80 {PCI_DEVICE(0x4040, 0x0004)}, 82 ENTRY(0x0004),
81 {PCI_DEVICE(0x4040, 0x0005)}, 83 ENTRY(0x0005),
82 {PCI_DEVICE(0x4040, 0x0024)}, 84 ENTRY(0x0024),
83 {PCI_DEVICE(0x4040, 0x0025)}, 85 ENTRY(0x0025),
84 {0,} 86 {0,}
85}; 87};
86 88
@@ -288,10 +290,11 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
288 int pci_func_id = PCI_FUNC(pdev->devfn); 290 int pci_func_id = PCI_FUNC(pdev->devfn);
289 DECLARE_MAC_BUF(mac); 291 DECLARE_MAC_BUF(mac);
290 292
291 printk(KERN_INFO "%s \n", netxen_nic_driver_string); 293 if (pci_func_id == 0)
294 printk(KERN_INFO "%s \n", netxen_nic_driver_string);
292 295
293 if (pdev->class != 0x020000) { 296 if (pdev->class != 0x020000) {
294 printk(KERN_ERR"NetXen function %d, class %x will not " 297 printk(KERN_DEBUG "NetXen function %d, class %x will not "
295 "be enabled.\n",pci_func_id, pdev->class); 298 "be enabled.\n",pci_func_id, pdev->class);
296 return -ENODEV; 299 return -ENODEV;
297 } 300 }
@@ -450,8 +453,12 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
450 */ 453 */
451 adapter->curr_window = 255; 454 adapter->curr_window = 255;
452 455
453 /* initialize the adapter */ 456 if (netxen_nic_get_board_info(adapter) != 0) {
454 netxen_initialize_adapter_hw(adapter); 457 printk("%s: Error getting board config info.\n",
458 netxen_nic_driver_name);
459 err = -EIO;
460 goto err_out_iounmap;
461 }
455 462
456 /* 463 /*
457 * Adapter in our case is quad port so initialize it before 464 * Adapter in our case is quad port so initialize it before
@@ -530,17 +537,15 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
530 netxen_initialize_adapter_sw(adapter); /* initialize the buffers in adapter */ 537 netxen_initialize_adapter_sw(adapter); /* initialize the buffers in adapter */
531 538
532 /* Mezz cards have PCI function 0,2,3 enabled */ 539 /* Mezz cards have PCI function 0,2,3 enabled */
533 if ((adapter->ahw.boardcfg.board_type == NETXEN_BRDTYPE_P2_SB31_10G_IMEZ) 540 switch (adapter->ahw.boardcfg.board_type) {
534 && (pci_func_id >= 2)) 541 case NETXEN_BRDTYPE_P2_SB31_10G_IMEZ:
542 case NETXEN_BRDTYPE_P2_SB31_10G_HMEZ:
543 if (pci_func_id >= 2)
535 adapter->portnum = pci_func_id - 2; 544 adapter->portnum = pci_func_id - 2;
536 545 break;
537#ifdef CONFIG_IA64 546 default:
538 if(adapter->portnum == 0) { 547 break;
539 netxen_pinit_from_rom(adapter, 0);
540 udelay(500);
541 netxen_load_firmware(adapter);
542 } 548 }
543#endif
544 549
545 init_timer(&adapter->watchdog_timer); 550 init_timer(&adapter->watchdog_timer);
546 adapter->ahw.xg_linkup = 0; 551 adapter->ahw.xg_linkup = 0;
@@ -613,11 +618,18 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
613 err = -ENODEV; 618 err = -ENODEV;
614 goto err_out_free_dev; 619 goto err_out_free_dev;
615 } 620 }
621 } else {
622 writel(0, NETXEN_CRB_NORMALIZE(adapter,
623 CRB_CMDPEG_STATE));
624 netxen_pinit_from_rom(adapter, 0);
625 msleep(1);
626 netxen_load_firmware(adapter);
627 netxen_phantom_init(adapter, NETXEN_NIC_PEG_TUNE);
616 } 628 }
617 629
618 /* clear the register for future unloads/loads */ 630 /* clear the register for future unloads/loads */
619 writel(0, NETXEN_CRB_NORMALIZE(adapter, NETXEN_CAM_RAM(0x1fc))); 631 writel(0, NETXEN_CRB_NORMALIZE(adapter, NETXEN_CAM_RAM(0x1fc)));
620 printk(KERN_INFO "State: 0x%0x\n", 632 dev_info(&pdev->dev, "cmdpeg state: 0x%0x\n",
621 readl(NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE))); 633 readl(NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE)));
622 634
623 /* 635 /*
@@ -639,9 +651,10 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
639 /* 651 /*
640 * See if the firmware gave us a virtual-physical port mapping. 652 * See if the firmware gave us a virtual-physical port mapping.
641 */ 653 */
654 adapter->physical_port = adapter->portnum;
642 i = readl(NETXEN_CRB_NORMALIZE(adapter, CRB_V2P(adapter->portnum))); 655 i = readl(NETXEN_CRB_NORMALIZE(adapter, CRB_V2P(adapter->portnum)));
643 if (i != 0x55555555) 656 if (i != 0x55555555)
644 physical_port[adapter->portnum] = i; 657 adapter->physical_port = i;
645 658
646 netif_carrier_off(netdev); 659 netif_carrier_off(netdev);
647 netif_stop_queue(netdev); 660 netif_stop_queue(netdev);
@@ -654,22 +667,9 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
654 goto err_out_free_dev; 667 goto err_out_free_dev;
655 } 668 }
656 669
670 netxen_nic_flash_print(adapter);
657 pci_set_drvdata(pdev, adapter); 671 pci_set_drvdata(pdev, adapter);
658 672
659 switch (adapter->ahw.board_type) {
660 case NETXEN_NIC_GBE:
661 printk(KERN_INFO "%s: QUAD GbE board initialized\n",
662 netxen_nic_driver_name);
663 break;
664
665 case NETXEN_NIC_XGBE:
666 printk(KERN_INFO "%s: XGbE board initialized\n",
667 netxen_nic_driver_name);
668 break;
669 }
670
671 adapter->driver_mismatch = 0;
672
673 return 0; 673 return 0;
674 674
675err_out_free_dev: 675err_out_free_dev:
@@ -760,55 +760,8 @@ static void __devexit netxen_nic_remove(struct pci_dev *pdev)
760 760
761 vfree(adapter->cmd_buf_arr); 761 vfree(adapter->cmd_buf_arr);
762 762
763 if (adapter->portnum == 0) { 763 if (adapter->portnum == 0)
764 if (init_firmware_done) { 764 netxen_free_adapter_offload(adapter);
765 i = 100;
766 do {
767 if (dma_watchdog_shutdown_request(adapter) == 1)
768 break;
769 msleep(100);
770 if (dma_watchdog_shutdown_poll_result(adapter) == 1)
771 break;
772 } while (--i);
773
774 if (i == 0)
775 printk(KERN_ERR "%s: dma_watchdog_shutdown failed\n",
776 netdev->name);
777
778 /* clear the register for future unloads/loads */
779 writel(0, NETXEN_CRB_NORMALIZE(adapter, NETXEN_CAM_RAM(0x1fc)));
780 printk(KERN_INFO "State: 0x%0x\n",
781 readl(NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE)));
782
783 /* leave the hw in the same state as reboot */
784 writel(0, NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE));
785 netxen_pinit_from_rom(adapter, 0);
786 msleep(1);
787 netxen_load_firmware(adapter);
788 netxen_phantom_init(adapter, NETXEN_NIC_PEG_TUNE);
789 }
790
791 /* clear the register for future unloads/loads */
792 writel(0, NETXEN_CRB_NORMALIZE(adapter, NETXEN_CAM_RAM(0x1fc)));
793 printk(KERN_INFO "State: 0x%0x\n",
794 readl(NETXEN_CRB_NORMALIZE(adapter, CRB_CMDPEG_STATE)));
795
796 i = 100;
797 do {
798 if (dma_watchdog_shutdown_request(adapter) == 1)
799 break;
800 msleep(100);
801 if (dma_watchdog_shutdown_poll_result(adapter) == 1)
802 break;
803 } while (--i);
804
805 if (i) {
806 netxen_free_adapter_offload(adapter);
807 } else {
808 printk(KERN_ERR "%s: dma_watchdog_shutdown failed\n",
809 netdev->name);
810 }
811 }
812 765
813 if (adapter->irq) 766 if (adapter->irq)
814 free_irq(adapter->irq, adapter); 767 free_irq(adapter->irq, adapter);
@@ -840,13 +793,15 @@ static int netxen_nic_open(struct net_device *netdev)
840 irq_handler_t handler; 793 irq_handler_t handler;
841 unsigned long flags = IRQF_SAMPLE_RANDOM; 794 unsigned long flags = IRQF_SAMPLE_RANDOM;
842 795
796 if (adapter->driver_mismatch)
797 return -EIO;
798
843 if (adapter->is_up != NETXEN_ADAPTER_UP_MAGIC) { 799 if (adapter->is_up != NETXEN_ADAPTER_UP_MAGIC) {
844 err = netxen_init_firmware(adapter); 800 err = netxen_init_firmware(adapter);
845 if (err != 0) { 801 if (err != 0) {
846 printk(KERN_ERR "Failed to init firmware\n"); 802 printk(KERN_ERR "Failed to init firmware\n");
847 return -EIO; 803 return -EIO;
848 } 804 }
849 netxen_nic_flash_print(adapter);
850 805
851 /* setup all the resources for the Phantom... */ 806 /* setup all the resources for the Phantom... */
852 /* this include the descriptors for rcv, tx, and status */ 807 /* this include the descriptors for rcv, tx, and status */
@@ -895,14 +850,12 @@ static int netxen_nic_open(struct net_device *netdev)
895 if (adapter->set_mtu) 850 if (adapter->set_mtu)
896 adapter->set_mtu(adapter, netdev->mtu); 851 adapter->set_mtu(adapter, netdev->mtu);
897 852
898 if (!adapter->driver_mismatch) 853 mod_timer(&adapter->watchdog_timer, jiffies);
899 mod_timer(&adapter->watchdog_timer, jiffies);
900 854
901 napi_enable(&adapter->napi); 855 napi_enable(&adapter->napi);
902 netxen_nic_enable_int(adapter); 856 netxen_nic_enable_int(adapter);
903 857
904 if (!adapter->driver_mismatch) 858 netif_start_queue(netdev);
905 netif_start_queue(netdev);
906 859
907 return 0; 860 return 0;
908} 861}
diff --git a/drivers/net/netxen/netxen_nic_niu.c b/drivers/net/netxen/netxen_nic_niu.c
index 1c852a76c80d..a3bc7cc67a6f 100644
--- a/drivers/net/netxen/netxen_nic_niu.c
+++ b/drivers/net/netxen/netxen_nic_niu.c
@@ -94,7 +94,7 @@ int netxen_niu_gbe_phy_read(struct netxen_adapter *adapter, long reg,
94 long timeout = 0; 94 long timeout = 0;
95 long result = 0; 95 long result = 0;
96 long restore = 0; 96 long restore = 0;
97 long phy = physical_port[adapter->portnum]; 97 long phy = adapter->physical_port;
98 __u32 address; 98 __u32 address;
99 __u32 command; 99 __u32 command;
100 __u32 status; 100 __u32 status;
@@ -190,7 +190,7 @@ int netxen_niu_gbe_phy_write(struct netxen_adapter *adapter, long reg,
190 long timeout = 0; 190 long timeout = 0;
191 long result = 0; 191 long result = 0;
192 long restore = 0; 192 long restore = 0;
193 long phy = physical_port[adapter->portnum]; 193 long phy = adapter->physical_port;
194 __u32 address; 194 __u32 address;
195 __u32 command; 195 __u32 command;
196 __u32 status; 196 __u32 status;
@@ -456,7 +456,7 @@ int netxen_niu_gbe_init_port(struct netxen_adapter *adapter, int port)
456 456
457int netxen_niu_xg_init_port(struct netxen_adapter *adapter, int port) 457int netxen_niu_xg_init_port(struct netxen_adapter *adapter, int port)
458{ 458{
459 u32 portnum = physical_port[adapter->portnum]; 459 u32 portnum = adapter->physical_port;
460 460
461 netxen_crb_writelit_adapter(adapter, 461 netxen_crb_writelit_adapter(adapter,
462 NETXEN_NIU_XGE_CONFIG_1+(0x10000*portnum), 0x1447); 462 NETXEN_NIU_XGE_CONFIG_1+(0x10000*portnum), 0x1447);
@@ -573,7 +573,7 @@ static int netxen_niu_macaddr_get(struct netxen_adapter *adapter,
573{ 573{
574 u32 stationhigh; 574 u32 stationhigh;
575 u32 stationlow; 575 u32 stationlow;
576 int phy = physical_port[adapter->portnum]; 576 int phy = adapter->physical_port;
577 u8 val[8]; 577 u8 val[8];
578 578
579 if (addr == NULL) 579 if (addr == NULL)
@@ -604,7 +604,7 @@ int netxen_niu_macaddr_set(struct netxen_adapter *adapter,
604{ 604{
605 u8 temp[4]; 605 u8 temp[4];
606 u32 val; 606 u32 val;
607 int phy = physical_port[adapter->portnum]; 607 int phy = adapter->physical_port;
608 unsigned char mac_addr[6]; 608 unsigned char mac_addr[6];
609 int i; 609 int i;
610 DECLARE_MAC_BUF(mac); 610 DECLARE_MAC_BUF(mac);
@@ -724,7 +724,7 @@ int netxen_niu_enable_gbe_port(struct netxen_adapter *adapter,
724int netxen_niu_disable_gbe_port(struct netxen_adapter *adapter) 724int netxen_niu_disable_gbe_port(struct netxen_adapter *adapter)
725{ 725{
726 __u32 mac_cfg0; 726 __u32 mac_cfg0;
727 u32 port = physical_port[adapter->portnum]; 727 u32 port = adapter->physical_port;
728 728
729 if (port > NETXEN_NIU_MAX_GBE_PORTS) 729 if (port > NETXEN_NIU_MAX_GBE_PORTS)
730 return -EINVAL; 730 return -EINVAL;
@@ -740,7 +740,7 @@ int netxen_niu_disable_gbe_port(struct netxen_adapter *adapter)
740int netxen_niu_disable_xg_port(struct netxen_adapter *adapter) 740int netxen_niu_disable_xg_port(struct netxen_adapter *adapter)
741{ 741{
742 __u32 mac_cfg; 742 __u32 mac_cfg;
743 u32 port = physical_port[adapter->portnum]; 743 u32 port = adapter->physical_port;
744 744
745 if (port > NETXEN_NIU_MAX_XG_PORTS) 745 if (port > NETXEN_NIU_MAX_XG_PORTS)
746 return -EINVAL; 746 return -EINVAL;
@@ -757,7 +757,7 @@ int netxen_niu_set_promiscuous_mode(struct netxen_adapter *adapter,
757 netxen_niu_prom_mode_t mode) 757 netxen_niu_prom_mode_t mode)
758{ 758{
759 __u32 reg; 759 __u32 reg;
760 u32 port = physical_port[adapter->portnum]; 760 u32 port = adapter->physical_port;
761 761
762 if (port > NETXEN_NIU_MAX_GBE_PORTS) 762 if (port > NETXEN_NIU_MAX_GBE_PORTS)
763 return -EINVAL; 763 return -EINVAL;
@@ -814,7 +814,7 @@ int netxen_niu_set_promiscuous_mode(struct netxen_adapter *adapter,
814int netxen_niu_xg_macaddr_set(struct netxen_adapter *adapter, 814int netxen_niu_xg_macaddr_set(struct netxen_adapter *adapter,
815 netxen_ethernet_macaddr_t addr) 815 netxen_ethernet_macaddr_t addr)
816{ 816{
817 int phy = physical_port[adapter->portnum]; 817 int phy = adapter->physical_port;
818 u8 temp[4]; 818 u8 temp[4];
819 u32 val; 819 u32 val;
820 820
@@ -867,7 +867,7 @@ int netxen_niu_xg_macaddr_set(struct netxen_adapter *adapter,
867int netxen_niu_xg_macaddr_get(struct netxen_adapter *adapter, 867int netxen_niu_xg_macaddr_get(struct netxen_adapter *adapter,
868 netxen_ethernet_macaddr_t * addr) 868 netxen_ethernet_macaddr_t * addr)
869{ 869{
870 int phy = physical_port[adapter->portnum]; 870 int phy = adapter->physical_port;
871 u32 stationhigh; 871 u32 stationhigh;
872 u32 stationlow; 872 u32 stationlow;
873 u8 val[8]; 873 u8 val[8];
@@ -896,7 +896,7 @@ int netxen_niu_xg_set_promiscuous_mode(struct netxen_adapter *adapter,
896 netxen_niu_prom_mode_t mode) 896 netxen_niu_prom_mode_t mode)
897{ 897{
898 __u32 reg; 898 __u32 reg;
899 u32 port = physical_port[adapter->portnum]; 899 u32 port = adapter->physical_port;
900 900
901 if (port > NETXEN_NIU_MAX_XG_PORTS) 901 if (port > NETXEN_NIU_MAX_XG_PORTS)
902 return -EINVAL; 902 return -EINVAL;
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index ce95c5d168fe..70d012e90dcf 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -525,12 +525,14 @@ static int axnet_open(struct net_device *dev)
525 int ret; 525 int ret;
526 axnet_dev_t *info = PRIV(dev); 526 axnet_dev_t *info = PRIV(dev);
527 struct pcmcia_device *link = info->p_dev; 527 struct pcmcia_device *link = info->p_dev;
528 unsigned int nic_base = dev->base_addr;
528 529
529 DEBUG(2, "axnet_open('%s')\n", dev->name); 530 DEBUG(2, "axnet_open('%s')\n", dev->name);
530 531
531 if (!pcmcia_dev_present(link)) 532 if (!pcmcia_dev_present(link))
532 return -ENODEV; 533 return -ENODEV;
533 534
535 outb_p(0xFF, nic_base + EN0_ISR); /* Clear bogus intr. */
534 ret = request_irq(dev->irq, ei_irq_wrapper, IRQF_SHARED, "axnet_cs", dev); 536 ret = request_irq(dev->irq, ei_irq_wrapper, IRQF_SHARED, "axnet_cs", dev);
535 if (ret) 537 if (ret)
536 return ret; 538 return ret;
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c
index 8f328a03847b..a550c9bd126f 100644
--- a/drivers/net/pcmcia/fmvj18x_cs.c
+++ b/drivers/net/pcmcia/fmvj18x_cs.c
@@ -391,7 +391,9 @@ static int fmvj18x_config(struct pcmcia_device *link)
391 cardtype = CONTEC; 391 cardtype = CONTEC;
392 break; 392 break;
393 case MANFID_FUJITSU: 393 case MANFID_FUJITSU:
394 if (link->card_id == PRODID_FUJITSU_MBH10302) 394 if (link->conf.ConfigBase == 0x0fe0)
395 cardtype = MBH10302;
396 else if (link->card_id == PRODID_FUJITSU_MBH10302)
395 /* RATOC REX-5588/9822/4886's PRODID are 0004(=MBH10302), 397 /* RATOC REX-5588/9822/4886's PRODID are 0004(=MBH10302),
396 but these are MBH10304 based card. */ 398 but these are MBH10304 based card. */
397 cardtype = MBH10304; 399 cardtype = MBH10304;
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index fd8158a86f64..2d4c4ad89b8d 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -969,6 +969,7 @@ static int pcnet_open(struct net_device *dev)
969 int ret; 969 int ret;
970 pcnet_dev_t *info = PRIV(dev); 970 pcnet_dev_t *info = PRIV(dev);
971 struct pcmcia_device *link = info->p_dev; 971 struct pcmcia_device *link = info->p_dev;
972 unsigned int nic_base = dev->base_addr;
972 973
973 DEBUG(2, "pcnet_open('%s')\n", dev->name); 974 DEBUG(2, "pcnet_open('%s')\n", dev->name);
974 975
@@ -976,6 +977,8 @@ static int pcnet_open(struct net_device *dev)
976 return -ENODEV; 977 return -ENODEV;
977 978
978 set_misc_reg(dev); 979 set_misc_reg(dev);
980
981 outb_p(0xFF, nic_base + EN0_ISR); /* Clear bogus intr. */
979 ret = request_irq(dev->irq, ei_irq_wrapper, IRQF_SHARED, dev_info, dev); 982 ret = request_irq(dev->irq, ei_irq_wrapper, IRQF_SHARED, dev_info, dev);
980 if (ret) 983 if (ret)
981 return ret; 984 return ret;
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c
index d041f831a18d..f6c4698ce738 100644
--- a/drivers/net/pcmcia/xirc2ps_cs.c
+++ b/drivers/net/pcmcia/xirc2ps_cs.c
@@ -1461,22 +1461,25 @@ static void
1461set_multicast_list(struct net_device *dev) 1461set_multicast_list(struct net_device *dev)
1462{ 1462{
1463 unsigned int ioaddr = dev->base_addr; 1463 unsigned int ioaddr = dev->base_addr;
1464 unsigned value;
1464 1465
1465 SelectPage(0x42); 1466 SelectPage(0x42);
1467 value = GetByte(XIRCREG42_SWC1) & 0xC0;
1468
1466 if (dev->flags & IFF_PROMISC) { /* snoop */ 1469 if (dev->flags & IFF_PROMISC) { /* snoop */
1467 PutByte(XIRCREG42_SWC1, 0x06); /* set MPE and PME */ 1470 PutByte(XIRCREG42_SWC1, value | 0x06); /* set MPE and PME */
1468 } else if (dev->mc_count > 9 || (dev->flags & IFF_ALLMULTI)) { 1471 } else if (dev->mc_count > 9 || (dev->flags & IFF_ALLMULTI)) {
1469 PutByte(XIRCREG42_SWC1, 0x02); /* set MPE */ 1472 PutByte(XIRCREG42_SWC1, value | 0x02); /* set MPE */
1470 } else if (dev->mc_count) { 1473 } else if (dev->mc_count) {
1471 /* the chip can filter 9 addresses perfectly */ 1474 /* the chip can filter 9 addresses perfectly */
1472 PutByte(XIRCREG42_SWC1, 0x01); 1475 PutByte(XIRCREG42_SWC1, value | 0x01);
1473 SelectPage(0x40); 1476 SelectPage(0x40);
1474 PutByte(XIRCREG40_CMD0, Offline); 1477 PutByte(XIRCREG40_CMD0, Offline);
1475 set_addresses(dev); 1478 set_addresses(dev);
1476 SelectPage(0x40); 1479 SelectPage(0x40);
1477 PutByte(XIRCREG40_CMD0, EnableRecv | Online); 1480 PutByte(XIRCREG40_CMD0, EnableRecv | Online);
1478 } else { /* standard usage */ 1481 } else { /* standard usage */
1479 PutByte(XIRCREG42_SWC1, 0x00); 1482 PutByte(XIRCREG42_SWC1, value | 0x00);
1480 } 1483 }
1481 SelectPage(0); 1484 SelectPage(0);
1482} 1485}
@@ -1722,6 +1725,7 @@ do_reset(struct net_device *dev, int full)
1722 1725
1723 /* enable receiver and put the mac online */ 1726 /* enable receiver and put the mac online */
1724 if (full) { 1727 if (full) {
1728 set_multicast_list(dev);
1725 SelectPage(0x40); 1729 SelectPage(0x40);
1726 PutByte(XIRCREG40_CMD0, EnableRecv | Online); 1730 PutByte(XIRCREG40_CMD0, EnableRecv | Online);
1727 } 1731 }
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c
index a1c454dbc164..1c89b97f4e09 100644
--- a/drivers/net/pcnet32.c
+++ b/drivers/net/pcnet32.c
@@ -325,7 +325,7 @@ static int pcnet32_get_regs_len(struct net_device *dev);
325static void pcnet32_get_regs(struct net_device *dev, struct ethtool_regs *regs, 325static void pcnet32_get_regs(struct net_device *dev, struct ethtool_regs *regs,
326 void *ptr); 326 void *ptr);
327static void pcnet32_purge_tx_ring(struct net_device *dev); 327static void pcnet32_purge_tx_ring(struct net_device *dev);
328static int pcnet32_alloc_ring(struct net_device *dev, char *name); 328static int pcnet32_alloc_ring(struct net_device *dev, const char *name);
329static void pcnet32_free_ring(struct net_device *dev); 329static void pcnet32_free_ring(struct net_device *dev);
330static void pcnet32_check_media(struct net_device *dev, int verbose); 330static void pcnet32_check_media(struct net_device *dev, int verbose);
331 331
@@ -1983,7 +1983,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
1983} 1983}
1984 1984
1985/* if any allocation fails, caller must also call pcnet32_free_ring */ 1985/* if any allocation fails, caller must also call pcnet32_free_ring */
1986static int pcnet32_alloc_ring(struct net_device *dev, char *name) 1986static int pcnet32_alloc_ring(struct net_device *dev, const char *name)
1987{ 1987{
1988 struct pcnet32_private *lp = netdev_priv(dev); 1988 struct pcnet32_private *lp = netdev_priv(dev);
1989 1989
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index 6bf9e76b0a00..6eb2d31d1e34 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -5,7 +5,7 @@
5menuconfig PHYLIB 5menuconfig PHYLIB
6 tristate "PHY Device support and infrastructure" 6 tristate "PHY Device support and infrastructure"
7 depends on !S390 7 depends on !S390
8 depends on NET_ETHERNET && (BROKEN || !S390) 8 depends on NET_ETHERNET
9 help 9 help
10 Ethernet controllers are usually attached to PHY 10 Ethernet controllers are usually attached to PHY
11 devices. This option provides infrastructure for 11 devices. This option provides infrastructure for
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index ac3c01d28fdf..16a0e7de5888 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -207,6 +207,7 @@ int get_phy_id(struct mii_bus *bus, int addr, u32 *phy_id)
207 207
208 return 0; 208 return 0;
209} 209}
210EXPORT_SYMBOL(get_phy_id);
210 211
211/** 212/**
212 * get_phy_device - reads the specified PHY device and returns its @phy_device struct 213 * get_phy_device - reads the specified PHY device and returns its @phy_device struct
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c
index 58a26a47af29..fc6f4b8c64b3 100644
--- a/drivers/net/pppoe.c
+++ b/drivers/net/pppoe.c
@@ -341,12 +341,6 @@ static int pppoe_rcv_core(struct sock *sk, struct sk_buff *skb)
341 struct pppox_sock *relay_po; 341 struct pppox_sock *relay_po;
342 342
343 if (sk->sk_state & PPPOX_BOUND) { 343 if (sk->sk_state & PPPOX_BOUND) {
344 struct pppoe_hdr *ph = pppoe_hdr(skb);
345 int len = ntohs(ph->length);
346 skb_pull_rcsum(skb, sizeof(struct pppoe_hdr));
347 if (pskb_trim_rcsum(skb, len))
348 goto abort_kfree;
349
350 ppp_input(&po->chan, skb); 344 ppp_input(&po->chan, skb);
351 } else if (sk->sk_state & PPPOX_RELAY) { 345 } else if (sk->sk_state & PPPOX_RELAY) {
352 relay_po = get_item_by_addr(&po->pppoe_relay); 346 relay_po = get_item_by_addr(&po->pppoe_relay);
@@ -357,7 +351,6 @@ static int pppoe_rcv_core(struct sock *sk, struct sk_buff *skb)
357 if ((sk_pppox(relay_po)->sk_state & PPPOX_CONNECTED) == 0) 351 if ((sk_pppox(relay_po)->sk_state & PPPOX_CONNECTED) == 0)
358 goto abort_put; 352 goto abort_put;
359 353
360 skb_pull(skb, sizeof(struct pppoe_hdr));
361 if (!__pppoe_xmit(sk_pppox(relay_po), skb)) 354 if (!__pppoe_xmit(sk_pppox(relay_po), skb))
362 goto abort_put; 355 goto abort_put;
363 } else { 356 } else {
@@ -388,6 +381,7 @@ static int pppoe_rcv(struct sk_buff *skb,
388{ 381{
389 struct pppoe_hdr *ph; 382 struct pppoe_hdr *ph;
390 struct pppox_sock *po; 383 struct pppox_sock *po;
384 int len;
391 385
392 if (!(skb = skb_share_check(skb, GFP_ATOMIC))) 386 if (!(skb = skb_share_check(skb, GFP_ATOMIC)))
393 goto out; 387 goto out;
@@ -399,10 +393,21 @@ static int pppoe_rcv(struct sk_buff *skb,
399 goto drop; 393 goto drop;
400 394
401 ph = pppoe_hdr(skb); 395 ph = pppoe_hdr(skb);
396 len = ntohs(ph->length);
397
398 skb_pull_rcsum(skb, sizeof(*ph));
399 if (skb->len < len)
400 goto drop;
402 401
403 po = get_item(ph->sid, eth_hdr(skb)->h_source, dev->ifindex); 402 po = get_item(ph->sid, eth_hdr(skb)->h_source, dev->ifindex);
404 if (po != NULL) 403 if (!po)
405 return sk_receive_skb(sk_pppox(po), skb, 0); 404 goto drop;
405
406 if (pskb_trim_rcsum(skb, len))
407 goto drop;
408
409 return sk_receive_skb(sk_pppox(po), skb, 0);
410
406drop: 411drop:
407 kfree_skb(skb); 412 kfree_skb(skb);
408out: 413out:
@@ -427,12 +432,12 @@ static int pppoe_disc_rcv(struct sk_buff *skb,
427 if (dev_net(dev) != &init_net) 432 if (dev_net(dev) != &init_net)
428 goto abort; 433 goto abort;
429 434
430 if (!pskb_may_pull(skb, sizeof(struct pppoe_hdr)))
431 goto abort;
432
433 if (!(skb = skb_share_check(skb, GFP_ATOMIC))) 435 if (!(skb = skb_share_check(skb, GFP_ATOMIC)))
434 goto out; 436 goto out;
435 437
438 if (!pskb_may_pull(skb, sizeof(struct pppoe_hdr)))
439 goto abort;
440
436 ph = pppoe_hdr(skb); 441 ph = pppoe_hdr(skb);
437 if (ph->code != PADT_CODE) 442 if (ph->code != PADT_CODE)
438 goto abort; 443 goto abort;
@@ -937,12 +942,10 @@ static int pppoe_recvmsg(struct kiocb *iocb, struct socket *sock,
937 m->msg_namelen = 0; 942 m->msg_namelen = 0;
938 943
939 if (skb) { 944 if (skb) {
940 struct pppoe_hdr *ph = pppoe_hdr(skb); 945 total_len = min_t(size_t, total_len, skb->len);
941 const int len = ntohs(ph->length); 946 error = skb_copy_datagram_iovec(skb, 0, m->msg_iov, total_len);
942
943 error = memcpy_toiovec(m->msg_iov, (unsigned char *) &ph->tag[0], len);
944 if (error == 0) 947 if (error == 0)
945 error = len; 948 error = total_len;
946 } 949 }
947 950
948 kfree_skb(skb); 951 kfree_skb(skb);
diff --git a/drivers/net/pppol2tp.c b/drivers/net/pppol2tp.c
index 79359919335b..f9298827a76c 100644
--- a/drivers/net/pppol2tp.c
+++ b/drivers/net/pppol2tp.c
@@ -240,12 +240,15 @@ static inline struct pppol2tp_session *pppol2tp_sock_to_session(struct sock *sk)
240 if (sk == NULL) 240 if (sk == NULL)
241 return NULL; 241 return NULL;
242 242
243 sock_hold(sk);
243 session = (struct pppol2tp_session *)(sk->sk_user_data); 244 session = (struct pppol2tp_session *)(sk->sk_user_data);
244 if (session == NULL) 245 if (session == NULL) {
245 return NULL; 246 sock_put(sk);
247 goto out;
248 }
246 249
247 BUG_ON(session->magic != L2TP_SESSION_MAGIC); 250 BUG_ON(session->magic != L2TP_SESSION_MAGIC);
248 251out:
249 return session; 252 return session;
250} 253}
251 254
@@ -256,12 +259,15 @@ static inline struct pppol2tp_tunnel *pppol2tp_sock_to_tunnel(struct sock *sk)
256 if (sk == NULL) 259 if (sk == NULL)
257 return NULL; 260 return NULL;
258 261
262 sock_hold(sk);
259 tunnel = (struct pppol2tp_tunnel *)(sk->sk_user_data); 263 tunnel = (struct pppol2tp_tunnel *)(sk->sk_user_data);
260 if (tunnel == NULL) 264 if (tunnel == NULL) {
261 return NULL; 265 sock_put(sk);
266 goto out;
267 }
262 268
263 BUG_ON(tunnel->magic != L2TP_TUNNEL_MAGIC); 269 BUG_ON(tunnel->magic != L2TP_TUNNEL_MAGIC);
264 270out:
265 return tunnel; 271 return tunnel;
266} 272}
267 273
@@ -716,12 +722,14 @@ discard:
716 session->stats.rx_errors++; 722 session->stats.rx_errors++;
717 kfree_skb(skb); 723 kfree_skb(skb);
718 sock_put(session->sock); 724 sock_put(session->sock);
725 sock_put(sock);
719 726
720 return 0; 727 return 0;
721 728
722error: 729error:
723 /* Put UDP header back */ 730 /* Put UDP header back */
724 __skb_push(skb, sizeof(struct udphdr)); 731 __skb_push(skb, sizeof(struct udphdr));
732 sock_put(sock);
725 733
726no_tunnel: 734no_tunnel:
727 return 1; 735 return 1;
@@ -745,10 +753,13 @@ static int pppol2tp_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
745 "%s: received %d bytes\n", tunnel->name, skb->len); 753 "%s: received %d bytes\n", tunnel->name, skb->len);
746 754
747 if (pppol2tp_recv_core(sk, skb)) 755 if (pppol2tp_recv_core(sk, skb))
748 goto pass_up; 756 goto pass_up_put;
749 757
758 sock_put(sk);
750 return 0; 759 return 0;
751 760
761pass_up_put:
762 sock_put(sk);
752pass_up: 763pass_up:
753 return 1; 764 return 1;
754} 765}
@@ -772,14 +783,18 @@ static int pppol2tp_recvmsg(struct kiocb *iocb, struct socket *sock,
772 err = 0; 783 err = 0;
773 skb = skb_recv_datagram(sk, flags & ~MSG_DONTWAIT, 784 skb = skb_recv_datagram(sk, flags & ~MSG_DONTWAIT,
774 flags & MSG_DONTWAIT, &err); 785 flags & MSG_DONTWAIT, &err);
775 if (skb) { 786 if (!skb)
776 err = memcpy_toiovec(msg->msg_iov, (unsigned char *) skb->data, 787 goto end;
777 skb->len); 788
778 if (err < 0) 789 if (len > skb->len)
779 goto do_skb_free; 790 len = skb->len;
780 err = skb->len; 791 else if (len < skb->len)
781 } 792 msg->msg_flags |= MSG_TRUNC;
782do_skb_free: 793
794 err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, len);
795 if (likely(err == 0))
796 err = len;
797
783 kfree_skb(skb); 798 kfree_skb(skb);
784end: 799end:
785 return err; 800 return err;
@@ -858,7 +873,7 @@ static int pppol2tp_sendmsg(struct kiocb *iocb, struct socket *sock, struct msgh
858 873
859 tunnel = pppol2tp_sock_to_tunnel(session->tunnel_sock); 874 tunnel = pppol2tp_sock_to_tunnel(session->tunnel_sock);
860 if (tunnel == NULL) 875 if (tunnel == NULL)
861 goto error; 876 goto error_put_sess;
862 877
863 /* What header length is configured for this session? */ 878 /* What header length is configured for this session? */
864 hdr_len = pppol2tp_l2tp_header_len(session); 879 hdr_len = pppol2tp_l2tp_header_len(session);
@@ -870,7 +885,7 @@ static int pppol2tp_sendmsg(struct kiocb *iocb, struct socket *sock, struct msgh
870 sizeof(ppph) + total_len, 885 sizeof(ppph) + total_len,
871 0, GFP_KERNEL); 886 0, GFP_KERNEL);
872 if (!skb) 887 if (!skb)
873 goto error; 888 goto error_put_sess_tun;
874 889
875 /* Reserve space for headers. */ 890 /* Reserve space for headers. */
876 skb_reserve(skb, NET_SKB_PAD); 891 skb_reserve(skb, NET_SKB_PAD);
@@ -900,7 +915,7 @@ static int pppol2tp_sendmsg(struct kiocb *iocb, struct socket *sock, struct msgh
900 error = memcpy_fromiovec(skb->data, m->msg_iov, total_len); 915 error = memcpy_fromiovec(skb->data, m->msg_iov, total_len);
901 if (error < 0) { 916 if (error < 0) {
902 kfree_skb(skb); 917 kfree_skb(skb);
903 goto error; 918 goto error_put_sess_tun;
904 } 919 }
905 skb_put(skb, total_len); 920 skb_put(skb, total_len);
906 921
@@ -947,10 +962,33 @@ static int pppol2tp_sendmsg(struct kiocb *iocb, struct socket *sock, struct msgh
947 session->stats.tx_errors++; 962 session->stats.tx_errors++;
948 } 963 }
949 964
965 return error;
966
967error_put_sess_tun:
968 sock_put(session->tunnel_sock);
969error_put_sess:
970 sock_put(sk);
950error: 971error:
951 return error; 972 return error;
952} 973}
953 974
975/* Automatically called when the skb is freed.
976 */
977static void pppol2tp_sock_wfree(struct sk_buff *skb)
978{
979 sock_put(skb->sk);
980}
981
982/* For data skbs that we transmit, we associate with the tunnel socket
983 * but don't do accounting.
984 */
985static inline void pppol2tp_skb_set_owner_w(struct sk_buff *skb, struct sock *sk)
986{
987 sock_hold(sk);
988 skb->sk = sk;
989 skb->destructor = pppol2tp_sock_wfree;
990}
991
954/* Transmit function called by generic PPP driver. Sends PPP frame 992/* Transmit function called by generic PPP driver. Sends PPP frame
955 * over PPPoL2TP socket. 993 * over PPPoL2TP socket.
956 * 994 *
@@ -980,6 +1018,8 @@ static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
980 __wsum csum = 0; 1018 __wsum csum = 0;
981 struct udphdr *uh; 1019 struct udphdr *uh;
982 unsigned int len; 1020 unsigned int len;
1021 int old_headroom;
1022 int new_headroom;
983 1023
984 if (sock_flag(sk, SOCK_DEAD) || !(sk->sk_state & PPPOX_CONNECTED)) 1024 if (sock_flag(sk, SOCK_DEAD) || !(sk->sk_state & PPPOX_CONNECTED))
985 goto abort; 1025 goto abort;
@@ -991,25 +1031,27 @@ static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
991 1031
992 sk_tun = session->tunnel_sock; 1032 sk_tun = session->tunnel_sock;
993 if (sk_tun == NULL) 1033 if (sk_tun == NULL)
994 goto abort; 1034 goto abort_put_sess;
995 tunnel = pppol2tp_sock_to_tunnel(sk_tun); 1035 tunnel = pppol2tp_sock_to_tunnel(sk_tun);
996 if (tunnel == NULL) 1036 if (tunnel == NULL)
997 goto abort; 1037 goto abort_put_sess;
998 1038
999 /* What header length is configured for this session? */ 1039 /* What header length is configured for this session? */
1000 hdr_len = pppol2tp_l2tp_header_len(session); 1040 hdr_len = pppol2tp_l2tp_header_len(session);
1001 1041
1002 /* Check that there's enough headroom in the skb to insert IP, 1042 /* Check that there's enough headroom in the skb to insert IP,
1003 * UDP and L2TP and PPP headers. If not enough, expand it to 1043 * UDP and L2TP and PPP headers. If not enough, expand it to
1004 * make room. Note that a new skb (or a clone) is 1044 * make room. Adjust truesize.
1005 * allocated. If we return an error from this point on, make
1006 * sure we free the new skb but do not free the original skb
1007 * since that is done by the caller for the error case.
1008 */ 1045 */
1009 headroom = NET_SKB_PAD + sizeof(struct iphdr) + 1046 headroom = NET_SKB_PAD + sizeof(struct iphdr) +
1010 sizeof(struct udphdr) + hdr_len + sizeof(ppph); 1047 sizeof(struct udphdr) + hdr_len + sizeof(ppph);
1048 old_headroom = skb_headroom(skb);
1011 if (skb_cow_head(skb, headroom)) 1049 if (skb_cow_head(skb, headroom))
1012 goto abort; 1050 goto abort_put_sess_tun;
1051
1052 new_headroom = skb_headroom(skb);
1053 skb_orphan(skb);
1054 skb->truesize += new_headroom - old_headroom;
1013 1055
1014 /* Setup PPP header */ 1056 /* Setup PPP header */
1015 __skb_push(skb, sizeof(ppph)); 1057 __skb_push(skb, sizeof(ppph));
@@ -1065,8 +1107,7 @@ static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
1065 /* Get routing info from the tunnel socket */ 1107 /* Get routing info from the tunnel socket */
1066 dst_release(skb->dst); 1108 dst_release(skb->dst);
1067 skb->dst = dst_clone(__sk_dst_get(sk_tun)); 1109 skb->dst = dst_clone(__sk_dst_get(sk_tun));
1068 skb_orphan(skb); 1110 pppol2tp_skb_set_owner_w(skb, sk_tun);
1069 skb->sk = sk_tun;
1070 1111
1071 /* Queue the packet to IP for output */ 1112 /* Queue the packet to IP for output */
1072 len = skb->len; 1113 len = skb->len;
@@ -1083,8 +1124,14 @@ static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
1083 session->stats.tx_errors++; 1124 session->stats.tx_errors++;
1084 } 1125 }
1085 1126
1127 sock_put(sk_tun);
1128 sock_put(sk);
1086 return 1; 1129 return 1;
1087 1130
1131abort_put_sess_tun:
1132 sock_put(sk_tun);
1133abort_put_sess:
1134 sock_put(sk);
1088abort: 1135abort:
1089 /* Free the original skb */ 1136 /* Free the original skb */
1090 kfree_skb(skb); 1137 kfree_skb(skb);
@@ -1188,7 +1235,7 @@ static void pppol2tp_tunnel_destruct(struct sock *sk)
1188{ 1235{
1189 struct pppol2tp_tunnel *tunnel; 1236 struct pppol2tp_tunnel *tunnel;
1190 1237
1191 tunnel = pppol2tp_sock_to_tunnel(sk); 1238 tunnel = sk->sk_user_data;
1192 if (tunnel == NULL) 1239 if (tunnel == NULL)
1193 goto end; 1240 goto end;
1194 1241
@@ -1227,10 +1274,12 @@ static void pppol2tp_session_destruct(struct sock *sk)
1227 if (sk->sk_user_data != NULL) { 1274 if (sk->sk_user_data != NULL) {
1228 struct pppol2tp_tunnel *tunnel; 1275 struct pppol2tp_tunnel *tunnel;
1229 1276
1230 session = pppol2tp_sock_to_session(sk); 1277 session = sk->sk_user_data;
1231 if (session == NULL) 1278 if (session == NULL)
1232 goto out; 1279 goto out;
1233 1280
1281 BUG_ON(session->magic != L2TP_SESSION_MAGIC);
1282
1234 /* Don't use pppol2tp_sock_to_tunnel() here to 1283 /* Don't use pppol2tp_sock_to_tunnel() here to
1235 * get the tunnel context because the tunnel 1284 * get the tunnel context because the tunnel
1236 * socket might have already been closed (its 1285 * socket might have already been closed (its
@@ -1276,6 +1325,7 @@ out:
1276static int pppol2tp_release(struct socket *sock) 1325static int pppol2tp_release(struct socket *sock)
1277{ 1326{
1278 struct sock *sk = sock->sk; 1327 struct sock *sk = sock->sk;
1328 struct pppol2tp_session *session;
1279 int error; 1329 int error;
1280 1330
1281 if (!sk) 1331 if (!sk)
@@ -1293,9 +1343,18 @@ static int pppol2tp_release(struct socket *sock)
1293 sock_orphan(sk); 1343 sock_orphan(sk);
1294 sock->sk = NULL; 1344 sock->sk = NULL;
1295 1345
1346 session = pppol2tp_sock_to_session(sk);
1347
1296 /* Purge any queued data */ 1348 /* Purge any queued data */
1297 skb_queue_purge(&sk->sk_receive_queue); 1349 skb_queue_purge(&sk->sk_receive_queue);
1298 skb_queue_purge(&sk->sk_write_queue); 1350 skb_queue_purge(&sk->sk_write_queue);
1351 if (session != NULL) {
1352 struct sk_buff *skb;
1353 while ((skb = skb_dequeue(&session->reorder_q))) {
1354 kfree_skb(skb);
1355 sock_put(sk);
1356 }
1357 }
1299 1358
1300 release_sock(sk); 1359 release_sock(sk);
1301 1360
@@ -1598,7 +1657,7 @@ static int pppol2tp_connect(struct socket *sock, struct sockaddr *uservaddr,
1598 1657
1599 error = ppp_register_channel(&po->chan); 1658 error = ppp_register_channel(&po->chan);
1600 if (error) 1659 if (error)
1601 goto end; 1660 goto end_put_tun;
1602 1661
1603 /* This is how we get the session context from the socket. */ 1662 /* This is how we get the session context from the socket. */
1604 sk->sk_user_data = session; 1663 sk->sk_user_data = session;
@@ -1618,6 +1677,8 @@ out_no_ppp:
1618 PRINTK(session->debug, PPPOL2TP_MSG_CONTROL, KERN_INFO, 1677 PRINTK(session->debug, PPPOL2TP_MSG_CONTROL, KERN_INFO,
1619 "%s: created\n", session->name); 1678 "%s: created\n", session->name);
1620 1679
1680end_put_tun:
1681 sock_put(tunnel_sock);
1621end: 1682end:
1622 release_sock(sk); 1683 release_sock(sk);
1623 1684
@@ -1665,6 +1726,7 @@ static int pppol2tp_getname(struct socket *sock, struct sockaddr *uaddr,
1665 *usockaddr_len = len; 1726 *usockaddr_len = len;
1666 1727
1667 error = 0; 1728 error = 0;
1729 sock_put(sock->sk);
1668 1730
1669end: 1731end:
1670 return error; 1732 return error;
@@ -1903,14 +1965,17 @@ static int pppol2tp_ioctl(struct socket *sock, unsigned int cmd,
1903 err = -EBADF; 1965 err = -EBADF;
1904 tunnel = pppol2tp_sock_to_tunnel(session->tunnel_sock); 1966 tunnel = pppol2tp_sock_to_tunnel(session->tunnel_sock);
1905 if (tunnel == NULL) 1967 if (tunnel == NULL)
1906 goto end; 1968 goto end_put_sess;
1907 1969
1908 err = pppol2tp_tunnel_ioctl(tunnel, cmd, arg); 1970 err = pppol2tp_tunnel_ioctl(tunnel, cmd, arg);
1909 goto end; 1971 sock_put(session->tunnel_sock);
1972 goto end_put_sess;
1910 } 1973 }
1911 1974
1912 err = pppol2tp_session_ioctl(session, cmd, arg); 1975 err = pppol2tp_session_ioctl(session, cmd, arg);
1913 1976
1977end_put_sess:
1978 sock_put(sk);
1914end: 1979end:
1915 return err; 1980 return err;
1916} 1981}
@@ -2056,14 +2121,17 @@ static int pppol2tp_setsockopt(struct socket *sock, int level, int optname,
2056 err = -EBADF; 2121 err = -EBADF;
2057 tunnel = pppol2tp_sock_to_tunnel(session->tunnel_sock); 2122 tunnel = pppol2tp_sock_to_tunnel(session->tunnel_sock);
2058 if (tunnel == NULL) 2123 if (tunnel == NULL)
2059 goto end; 2124 goto end_put_sess;
2060 2125
2061 err = pppol2tp_tunnel_setsockopt(sk, tunnel, optname, val); 2126 err = pppol2tp_tunnel_setsockopt(sk, tunnel, optname, val);
2127 sock_put(session->tunnel_sock);
2062 } else 2128 } else
2063 err = pppol2tp_session_setsockopt(sk, session, optname, val); 2129 err = pppol2tp_session_setsockopt(sk, session, optname, val);
2064 2130
2065 err = 0; 2131 err = 0;
2066 2132
2133end_put_sess:
2134 sock_put(sk);
2067end: 2135end:
2068 return err; 2136 return err;
2069} 2137}
@@ -2178,20 +2246,24 @@ static int pppol2tp_getsockopt(struct socket *sock, int level,
2178 err = -EBADF; 2246 err = -EBADF;
2179 tunnel = pppol2tp_sock_to_tunnel(session->tunnel_sock); 2247 tunnel = pppol2tp_sock_to_tunnel(session->tunnel_sock);
2180 if (tunnel == NULL) 2248 if (tunnel == NULL)
2181 goto end; 2249 goto end_put_sess;
2182 2250
2183 err = pppol2tp_tunnel_getsockopt(sk, tunnel, optname, &val); 2251 err = pppol2tp_tunnel_getsockopt(sk, tunnel, optname, &val);
2252 sock_put(session->tunnel_sock);
2184 } else 2253 } else
2185 err = pppol2tp_session_getsockopt(sk, session, optname, &val); 2254 err = pppol2tp_session_getsockopt(sk, session, optname, &val);
2186 2255
2187 err = -EFAULT; 2256 err = -EFAULT;
2188 if (put_user(len, (int __user *) optlen)) 2257 if (put_user(len, (int __user *) optlen))
2189 goto end; 2258 goto end_put_sess;
2190 2259
2191 if (copy_to_user((void __user *) optval, &val, len)) 2260 if (copy_to_user((void __user *) optval, &val, len))
2192 goto end; 2261 goto end_put_sess;
2193 2262
2194 err = 0; 2263 err = 0;
2264
2265end_put_sess:
2266 sock_put(sk);
2195end: 2267end:
2196 return err; 2268 return err;
2197} 2269}
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c
index b7f7b2227d56..bccee68bd48a 100644
--- a/drivers/net/qla3xxx.c
+++ b/drivers/net/qla3xxx.c
@@ -3701,7 +3701,9 @@ static int ql_cycle_adapter(struct ql3_adapter *qdev, int reset)
3701 printk(KERN_ERR PFX 3701 printk(KERN_ERR PFX
3702 "%s: Driver up/down cycle failed, " 3702 "%s: Driver up/down cycle failed, "
3703 "closing device\n",qdev->ndev->name); 3703 "closing device\n",qdev->ndev->name);
3704 rtnl_lock();
3704 dev_close(qdev->ndev); 3705 dev_close(qdev->ndev);
3706 rtnl_unlock();
3705 return -1; 3707 return -1;
3706 } 3708 }
3707 return 0; 3709 return 0;
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c
index 169edc154928..504a48ff73c8 100644
--- a/drivers/net/r6040.c
+++ b/drivers/net/r6040.c
@@ -273,7 +273,7 @@ static void r6040_init_ring_desc(struct r6040_descriptor *desc_ring,
273 dma_addr_t mapping = desc_dma; 273 dma_addr_t mapping = desc_dma;
274 274
275 while (size-- > 0) { 275 while (size-- > 0) {
276 mapping += sizeof(sizeof(*desc)); 276 mapping += sizeof(*desc);
277 desc->ndesc = cpu_to_le32(mapping); 277 desc->ndesc = cpu_to_le32(mapping);
278 desc->vndescp = desc + 1; 278 desc->vndescp = desc + 1;
279 desc++; 279 desc++;
@@ -733,7 +733,7 @@ static void r6040_timer(unsigned long data)
733 } 733 }
734 734
735 /* Timer active again */ 735 /* Timer active again */
736 mod_timer(&lp->timer, jiffies + round_jiffies(HZ)); 736 mod_timer(&lp->timer, round_jiffies(jiffies + HZ));
737} 737}
738 738
739/* Read/set MAC address routines */ 739/* Read/set MAC address routines */
diff --git a/drivers/net/s2io-regs.h b/drivers/net/s2io-regs.h
index 2109508c047a..f8274f8941ea 100644
--- a/drivers/net/s2io-regs.h
+++ b/drivers/net/s2io-regs.h
@@ -250,7 +250,7 @@ struct XENA_dev_config {
250 u64 tx_mat0_n[0x8]; 250 u64 tx_mat0_n[0x8];
251#define TX_MAT_SET(fifo, msi) vBIT(msi, (8 * fifo), 8) 251#define TX_MAT_SET(fifo, msi) vBIT(msi, (8 * fifo), 8)
252 252
253 u8 unused_1[0x8]; 253 u64 xmsi_mask_reg;
254 u64 stat_byte_cnt; 254 u64 stat_byte_cnt;
255#define STAT_BC(n) vBIT(n,4,12) 255#define STAT_BC(n) vBIT(n,4,12)
256 256
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 523478ebfd69..ae7b697456b4 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -86,7 +86,7 @@
86#include "s2io.h" 86#include "s2io.h"
87#include "s2io-regs.h" 87#include "s2io-regs.h"
88 88
89#define DRV_VERSION "2.0.26.23" 89#define DRV_VERSION "2.0.26.24"
90 90
91/* S2io Driver name & version. */ 91/* S2io Driver name & version. */
92static char s2io_driver_name[] = "Neterion"; 92static char s2io_driver_name[] = "Neterion";
@@ -1113,9 +1113,10 @@ static int s2io_on_nec_bridge(struct pci_dev *s2io_pdev)
1113 struct pci_dev *tdev = NULL; 1113 struct pci_dev *tdev = NULL;
1114 while ((tdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, tdev)) != NULL) { 1114 while ((tdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, tdev)) != NULL) {
1115 if (tdev->vendor == NEC_VENID && tdev->device == NEC_DEVID) { 1115 if (tdev->vendor == NEC_VENID && tdev->device == NEC_DEVID) {
1116 if (tdev->bus == s2io_pdev->bus->parent) 1116 if (tdev->bus == s2io_pdev->bus->parent) {
1117 pci_dev_put(tdev); 1117 pci_dev_put(tdev);
1118 return 1; 1118 return 1;
1119 }
1119 } 1120 }
1120 } 1121 }
1121 return 0; 1122 return 0;
@@ -1219,15 +1220,33 @@ static int init_tti(struct s2io_nic *nic, int link)
1219 TTI_DATA1_MEM_TX_URNG_B(0x10) | 1220 TTI_DATA1_MEM_TX_URNG_B(0x10) |
1220 TTI_DATA1_MEM_TX_URNG_C(0x30) | 1221 TTI_DATA1_MEM_TX_URNG_C(0x30) |
1221 TTI_DATA1_MEM_TX_TIMER_AC_EN; 1222 TTI_DATA1_MEM_TX_TIMER_AC_EN;
1222 1223 if (i == 0)
1223 if (use_continuous_tx_intrs && (link == LINK_UP)) 1224 if (use_continuous_tx_intrs && (link == LINK_UP))
1224 val64 |= TTI_DATA1_MEM_TX_TIMER_CI_EN; 1225 val64 |= TTI_DATA1_MEM_TX_TIMER_CI_EN;
1225 writeq(val64, &bar0->tti_data1_mem); 1226 writeq(val64, &bar0->tti_data1_mem);
1226 1227
1227 val64 = TTI_DATA2_MEM_TX_UFC_A(0x10) | 1228 if (nic->config.intr_type == MSI_X) {
1228 TTI_DATA2_MEM_TX_UFC_B(0x20) | 1229 val64 = TTI_DATA2_MEM_TX_UFC_A(0x10) |
1229 TTI_DATA2_MEM_TX_UFC_C(0x40) | 1230 TTI_DATA2_MEM_TX_UFC_B(0x100) |
1230 TTI_DATA2_MEM_TX_UFC_D(0x80); 1231 TTI_DATA2_MEM_TX_UFC_C(0x200) |
1232 TTI_DATA2_MEM_TX_UFC_D(0x300);
1233 } else {
1234 if ((nic->config.tx_steering_type ==
1235 TX_DEFAULT_STEERING) &&
1236 (config->tx_fifo_num > 1) &&
1237 (i >= nic->udp_fifo_idx) &&
1238 (i < (nic->udp_fifo_idx +
1239 nic->total_udp_fifos)))
1240 val64 = TTI_DATA2_MEM_TX_UFC_A(0x50) |
1241 TTI_DATA2_MEM_TX_UFC_B(0x80) |
1242 TTI_DATA2_MEM_TX_UFC_C(0x100) |
1243 TTI_DATA2_MEM_TX_UFC_D(0x120);
1244 else
1245 val64 = TTI_DATA2_MEM_TX_UFC_A(0x10) |
1246 TTI_DATA2_MEM_TX_UFC_B(0x20) |
1247 TTI_DATA2_MEM_TX_UFC_C(0x40) |
1248 TTI_DATA2_MEM_TX_UFC_D(0x80);
1249 }
1231 1250
1232 writeq(val64, &bar0->tti_data2_mem); 1251 writeq(val64, &bar0->tti_data2_mem);
1233 1252
@@ -2606,9 +2625,7 @@ static int fill_rx_buffers(struct ring_info *ring)
2606 rxdp1->Buffer0_ptr = pci_map_single 2625 rxdp1->Buffer0_ptr = pci_map_single
2607 (ring->pdev, skb->data, size - NET_IP_ALIGN, 2626 (ring->pdev, skb->data, size - NET_IP_ALIGN,
2608 PCI_DMA_FROMDEVICE); 2627 PCI_DMA_FROMDEVICE);
2609 if( (rxdp1->Buffer0_ptr == 0) || 2628 if(pci_dma_mapping_error(rxdp1->Buffer0_ptr))
2610 (rxdp1->Buffer0_ptr ==
2611 DMA_ERROR_CODE))
2612 goto pci_map_failed; 2629 goto pci_map_failed;
2613 2630
2614 rxdp->Control_2 = 2631 rxdp->Control_2 =
@@ -2638,6 +2655,7 @@ static int fill_rx_buffers(struct ring_info *ring)
2638 skb->data = (void *) (unsigned long)tmp; 2655 skb->data = (void *) (unsigned long)tmp;
2639 skb_reset_tail_pointer(skb); 2656 skb_reset_tail_pointer(skb);
2640 2657
2658 /* AK: check is wrong. 0 can be valid dma address */
2641 if (!(rxdp3->Buffer0_ptr)) 2659 if (!(rxdp3->Buffer0_ptr))
2642 rxdp3->Buffer0_ptr = 2660 rxdp3->Buffer0_ptr =
2643 pci_map_single(ring->pdev, ba->ba_0, 2661 pci_map_single(ring->pdev, ba->ba_0,
@@ -2646,8 +2664,7 @@ static int fill_rx_buffers(struct ring_info *ring)
2646 pci_dma_sync_single_for_device(ring->pdev, 2664 pci_dma_sync_single_for_device(ring->pdev,
2647 (dma_addr_t) rxdp3->Buffer0_ptr, 2665 (dma_addr_t) rxdp3->Buffer0_ptr,
2648 BUF0_LEN, PCI_DMA_FROMDEVICE); 2666 BUF0_LEN, PCI_DMA_FROMDEVICE);
2649 if( (rxdp3->Buffer0_ptr == 0) || 2667 if (pci_dma_mapping_error(rxdp3->Buffer0_ptr))
2650 (rxdp3->Buffer0_ptr == DMA_ERROR_CODE))
2651 goto pci_map_failed; 2668 goto pci_map_failed;
2652 2669
2653 rxdp->Control_2 = SET_BUFFER0_SIZE_3(BUF0_LEN); 2670 rxdp->Control_2 = SET_BUFFER0_SIZE_3(BUF0_LEN);
@@ -2662,18 +2679,17 @@ static int fill_rx_buffers(struct ring_info *ring)
2662 (ring->pdev, skb->data, ring->mtu + 4, 2679 (ring->pdev, skb->data, ring->mtu + 4,
2663 PCI_DMA_FROMDEVICE); 2680 PCI_DMA_FROMDEVICE);
2664 2681
2665 if( (rxdp3->Buffer2_ptr == 0) || 2682 if (pci_dma_mapping_error(rxdp3->Buffer2_ptr))
2666 (rxdp3->Buffer2_ptr == DMA_ERROR_CODE))
2667 goto pci_map_failed; 2683 goto pci_map_failed;
2668 2684
2685 /* AK: check is wrong */
2669 if (!rxdp3->Buffer1_ptr) 2686 if (!rxdp3->Buffer1_ptr)
2670 rxdp3->Buffer1_ptr = 2687 rxdp3->Buffer1_ptr =
2671 pci_map_single(ring->pdev, 2688 pci_map_single(ring->pdev,
2672 ba->ba_1, BUF1_LEN, 2689 ba->ba_1, BUF1_LEN,
2673 PCI_DMA_FROMDEVICE); 2690 PCI_DMA_FROMDEVICE);
2674 2691
2675 if( (rxdp3->Buffer1_ptr == 0) || 2692 if (pci_dma_mapping_error(rxdp3->Buffer1_ptr)) {
2676 (rxdp3->Buffer1_ptr == DMA_ERROR_CODE)) {
2677 pci_unmap_single 2693 pci_unmap_single
2678 (ring->pdev, 2694 (ring->pdev,
2679 (dma_addr_t)(unsigned long) 2695 (dma_addr_t)(unsigned long)
@@ -2813,6 +2829,15 @@ static void free_rx_buffers(struct s2io_nic *sp)
2813 } 2829 }
2814} 2830}
2815 2831
2832static int s2io_chk_rx_buffers(struct ring_info *ring)
2833{
2834 if (fill_rx_buffers(ring) == -ENOMEM) {
2835 DBG_PRINT(INFO_DBG, "%s:Out of memory", ring->dev->name);
2836 DBG_PRINT(INFO_DBG, " in Rx Intr!!\n");
2837 }
2838 return 0;
2839}
2840
2816/** 2841/**
2817 * s2io_poll - Rx interrupt handler for NAPI support 2842 * s2io_poll - Rx interrupt handler for NAPI support
2818 * @napi : pointer to the napi structure. 2843 * @napi : pointer to the napi structure.
@@ -2826,57 +2851,73 @@ static void free_rx_buffers(struct s2io_nic *sp)
2826 * 0 on success and 1 if there are No Rx packets to be processed. 2851 * 0 on success and 1 if there are No Rx packets to be processed.
2827 */ 2852 */
2828 2853
2829static int s2io_poll(struct napi_struct *napi, int budget) 2854static int s2io_poll_msix(struct napi_struct *napi, int budget)
2830{ 2855{
2831 struct s2io_nic *nic = container_of(napi, struct s2io_nic, napi); 2856 struct ring_info *ring = container_of(napi, struct ring_info, napi);
2832 struct net_device *dev = nic->dev; 2857 struct net_device *dev = ring->dev;
2833 int pkt_cnt = 0, org_pkts_to_process;
2834 struct mac_info *mac_control;
2835 struct config_param *config; 2858 struct config_param *config;
2859 struct mac_info *mac_control;
2860 int pkts_processed = 0;
2861 u8 __iomem *addr = NULL;
2862 u8 val8 = 0;
2863 struct s2io_nic *nic = dev->priv;
2836 struct XENA_dev_config __iomem *bar0 = nic->bar0; 2864 struct XENA_dev_config __iomem *bar0 = nic->bar0;
2837 int i; 2865 int budget_org = budget;
2838 2866
2839 mac_control = &nic->mac_control;
2840 config = &nic->config; 2867 config = &nic->config;
2868 mac_control = &nic->mac_control;
2841 2869
2842 nic->pkts_to_process = budget; 2870 if (unlikely(!is_s2io_card_up(nic)))
2843 org_pkts_to_process = nic->pkts_to_process; 2871 return 0;
2844 2872
2845 writeq(S2IO_MINUS_ONE, &bar0->rx_traffic_int); 2873 pkts_processed = rx_intr_handler(ring, budget);
2846 readl(&bar0->rx_traffic_int); 2874 s2io_chk_rx_buffers(ring);
2847 2875
2848 for (i = 0; i < config->rx_ring_num; i++) { 2876 if (pkts_processed < budget_org) {
2849 rx_intr_handler(&mac_control->rings[i]); 2877 netif_rx_complete(dev, napi);
2850 pkt_cnt = org_pkts_to_process - nic->pkts_to_process; 2878 /*Re Enable MSI-Rx Vector*/
2851 if (!nic->pkts_to_process) { 2879 addr = (u8 __iomem *)&bar0->xmsi_mask_reg;
2852 /* Quota for the current iteration has been met */ 2880 addr += 7 - ring->ring_no;
2853 goto no_rx; 2881 val8 = (ring->ring_no == 0) ? 0x3f : 0xbf;
2854 } 2882 writeb(val8, addr);
2883 val8 = readb(addr);
2855 } 2884 }
2885 return pkts_processed;
2886}
2887static int s2io_poll_inta(struct napi_struct *napi, int budget)
2888{
2889 struct s2io_nic *nic = container_of(napi, struct s2io_nic, napi);
2890 struct ring_info *ring;
2891 struct net_device *dev = nic->dev;
2892 struct config_param *config;
2893 struct mac_info *mac_control;
2894 int pkts_processed = 0;
2895 int ring_pkts_processed, i;
2896 struct XENA_dev_config __iomem *bar0 = nic->bar0;
2897 int budget_org = budget;
2856 2898
2857 netif_rx_complete(dev, napi); 2899 config = &nic->config;
2900 mac_control = &nic->mac_control;
2858 2901
2859 for (i = 0; i < config->rx_ring_num; i++) { 2902 if (unlikely(!is_s2io_card_up(nic)))
2860 if (fill_rx_buffers(&mac_control->rings[i]) == -ENOMEM) { 2903 return 0;
2861 DBG_PRINT(INFO_DBG, "%s:Out of memory", dev->name);
2862 DBG_PRINT(INFO_DBG, " in Rx Poll!!\n");
2863 break;
2864 }
2865 }
2866 /* Re enable the Rx interrupts. */
2867 writeq(0x0, &bar0->rx_traffic_mask);
2868 readl(&bar0->rx_traffic_mask);
2869 return pkt_cnt;
2870 2904
2871no_rx:
2872 for (i = 0; i < config->rx_ring_num; i++) { 2905 for (i = 0; i < config->rx_ring_num; i++) {
2873 if (fill_rx_buffers(&mac_control->rings[i]) == -ENOMEM) { 2906 ring = &mac_control->rings[i];
2874 DBG_PRINT(INFO_DBG, "%s:Out of memory", dev->name); 2907 ring_pkts_processed = rx_intr_handler(ring, budget);
2875 DBG_PRINT(INFO_DBG, " in Rx Poll!!\n"); 2908 s2io_chk_rx_buffers(ring);
2909 pkts_processed += ring_pkts_processed;
2910 budget -= ring_pkts_processed;
2911 if (budget <= 0)
2876 break; 2912 break;
2877 }
2878 } 2913 }
2879 return pkt_cnt; 2914 if (pkts_processed < budget_org) {
2915 netif_rx_complete(dev, napi);
2916 /* Re enable the Rx interrupts for the ring */
2917 writeq(0, &bar0->rx_traffic_mask);
2918 readl(&bar0->rx_traffic_mask);
2919 }
2920 return pkts_processed;
2880} 2921}
2881 2922
2882#ifdef CONFIG_NET_POLL_CONTROLLER 2923#ifdef CONFIG_NET_POLL_CONTROLLER
@@ -2918,7 +2959,7 @@ static void s2io_netpoll(struct net_device *dev)
2918 2959
2919 /* check for received packet and indicate up to network */ 2960 /* check for received packet and indicate up to network */
2920 for (i = 0; i < config->rx_ring_num; i++) 2961 for (i = 0; i < config->rx_ring_num; i++)
2921 rx_intr_handler(&mac_control->rings[i]); 2962 rx_intr_handler(&mac_control->rings[i], 0);
2922 2963
2923 for (i = 0; i < config->rx_ring_num; i++) { 2964 for (i = 0; i < config->rx_ring_num; i++) {
2924 if (fill_rx_buffers(&mac_control->rings[i]) == -ENOMEM) { 2965 if (fill_rx_buffers(&mac_control->rings[i]) == -ENOMEM) {
@@ -2934,7 +2975,8 @@ static void s2io_netpoll(struct net_device *dev)
2934 2975
2935/** 2976/**
2936 * rx_intr_handler - Rx interrupt handler 2977 * rx_intr_handler - Rx interrupt handler
2937 * @nic: device private variable. 2978 * @ring_info: per ring structure.
2979 * @budget: budget for napi processing.
2938 * Description: 2980 * Description:
2939 * If the interrupt is because of a received frame or if the 2981 * If the interrupt is because of a received frame or if the
2940 * receive ring contains fresh as yet un-processed frames,this function is 2982 * receive ring contains fresh as yet un-processed frames,this function is
@@ -2942,15 +2984,15 @@ static void s2io_netpoll(struct net_device *dev)
2942 * stopped and sends the skb to the OSM's Rx handler and then increments 2984 * stopped and sends the skb to the OSM's Rx handler and then increments
2943 * the offset. 2985 * the offset.
2944 * Return Value: 2986 * Return Value:
2945 * NONE. 2987 * No. of napi packets processed.
2946 */ 2988 */
2947static void rx_intr_handler(struct ring_info *ring_data) 2989static int rx_intr_handler(struct ring_info *ring_data, int budget)
2948{ 2990{
2949 int get_block, put_block; 2991 int get_block, put_block;
2950 struct rx_curr_get_info get_info, put_info; 2992 struct rx_curr_get_info get_info, put_info;
2951 struct RxD_t *rxdp; 2993 struct RxD_t *rxdp;
2952 struct sk_buff *skb; 2994 struct sk_buff *skb;
2953 int pkt_cnt = 0; 2995 int pkt_cnt = 0, napi_pkts = 0;
2954 int i; 2996 int i;
2955 struct RxD1* rxdp1; 2997 struct RxD1* rxdp1;
2956 struct RxD3* rxdp3; 2998 struct RxD3* rxdp3;
@@ -2977,7 +3019,7 @@ static void rx_intr_handler(struct ring_info *ring_data)
2977 DBG_PRINT(ERR_DBG, "%s: The skb is ", 3019 DBG_PRINT(ERR_DBG, "%s: The skb is ",
2978 ring_data->dev->name); 3020 ring_data->dev->name);
2979 DBG_PRINT(ERR_DBG, "Null in Rx Intr\n"); 3021 DBG_PRINT(ERR_DBG, "Null in Rx Intr\n");
2980 return; 3022 return 0;
2981 } 3023 }
2982 if (ring_data->rxd_mode == RXD_MODE_1) { 3024 if (ring_data->rxd_mode == RXD_MODE_1) {
2983 rxdp1 = (struct RxD1*)rxdp; 3025 rxdp1 = (struct RxD1*)rxdp;
@@ -3014,9 +3056,10 @@ static void rx_intr_handler(struct ring_info *ring_data)
3014 rxdp = ring_data->rx_blocks[get_block].block_virt_addr; 3056 rxdp = ring_data->rx_blocks[get_block].block_virt_addr;
3015 } 3057 }
3016 3058
3017 if(ring_data->nic->config.napi){ 3059 if (ring_data->nic->config.napi) {
3018 ring_data->nic->pkts_to_process -= 1; 3060 budget--;
3019 if (!ring_data->nic->pkts_to_process) 3061 napi_pkts++;
3062 if (!budget)
3020 break; 3063 break;
3021 } 3064 }
3022 pkt_cnt++; 3065 pkt_cnt++;
@@ -3034,6 +3077,7 @@ static void rx_intr_handler(struct ring_info *ring_data)
3034 } 3077 }
3035 } 3078 }
3036 } 3079 }
3080 return(napi_pkts);
3037} 3081}
3038 3082
3039/** 3083/**
@@ -3730,14 +3774,19 @@ static void restore_xmsi_data(struct s2io_nic *nic)
3730{ 3774{
3731 struct XENA_dev_config __iomem *bar0 = nic->bar0; 3775 struct XENA_dev_config __iomem *bar0 = nic->bar0;
3732 u64 val64; 3776 u64 val64;
3733 int i; 3777 int i, msix_index;
3778
3779
3780 if (nic->device_type == XFRAME_I_DEVICE)
3781 return;
3734 3782
3735 for (i=0; i < MAX_REQUESTED_MSI_X; i++) { 3783 for (i=0; i < MAX_REQUESTED_MSI_X; i++) {
3784 msix_index = (i) ? ((i-1) * 8 + 1): 0;
3736 writeq(nic->msix_info[i].addr, &bar0->xmsi_address); 3785 writeq(nic->msix_info[i].addr, &bar0->xmsi_address);
3737 writeq(nic->msix_info[i].data, &bar0->xmsi_data); 3786 writeq(nic->msix_info[i].data, &bar0->xmsi_data);
3738 val64 = (s2BIT(7) | s2BIT(15) | vBIT(i, 26, 6)); 3787 val64 = (s2BIT(7) | s2BIT(15) | vBIT(msix_index, 26, 6));
3739 writeq(val64, &bar0->xmsi_access); 3788 writeq(val64, &bar0->xmsi_access);
3740 if (wait_for_msix_trans(nic, i)) { 3789 if (wait_for_msix_trans(nic, msix_index)) {
3741 DBG_PRINT(ERR_DBG, "failed in %s\n", __FUNCTION__); 3790 DBG_PRINT(ERR_DBG, "failed in %s\n", __FUNCTION__);
3742 continue; 3791 continue;
3743 } 3792 }
@@ -3748,13 +3797,17 @@ static void store_xmsi_data(struct s2io_nic *nic)
3748{ 3797{
3749 struct XENA_dev_config __iomem *bar0 = nic->bar0; 3798 struct XENA_dev_config __iomem *bar0 = nic->bar0;
3750 u64 val64, addr, data; 3799 u64 val64, addr, data;
3751 int i; 3800 int i, msix_index;
3801
3802 if (nic->device_type == XFRAME_I_DEVICE)
3803 return;
3752 3804
3753 /* Store and display */ 3805 /* Store and display */
3754 for (i=0; i < MAX_REQUESTED_MSI_X; i++) { 3806 for (i=0; i < MAX_REQUESTED_MSI_X; i++) {
3755 val64 = (s2BIT(15) | vBIT(i, 26, 6)); 3807 msix_index = (i) ? ((i-1) * 8 + 1): 0;
3808 val64 = (s2BIT(15) | vBIT(msix_index, 26, 6));
3756 writeq(val64, &bar0->xmsi_access); 3809 writeq(val64, &bar0->xmsi_access);
3757 if (wait_for_msix_trans(nic, i)) { 3810 if (wait_for_msix_trans(nic, msix_index)) {
3758 DBG_PRINT(ERR_DBG, "failed in %s\n", __FUNCTION__); 3811 DBG_PRINT(ERR_DBG, "failed in %s\n", __FUNCTION__);
3759 continue; 3812 continue;
3760 } 3813 }
@@ -3770,11 +3823,11 @@ static void store_xmsi_data(struct s2io_nic *nic)
3770static int s2io_enable_msi_x(struct s2io_nic *nic) 3823static int s2io_enable_msi_x(struct s2io_nic *nic)
3771{ 3824{
3772 struct XENA_dev_config __iomem *bar0 = nic->bar0; 3825 struct XENA_dev_config __iomem *bar0 = nic->bar0;
3773 u64 tx_mat, rx_mat; 3826 u64 rx_mat;
3774 u16 msi_control; /* Temp variable */ 3827 u16 msi_control; /* Temp variable */
3775 int ret, i, j, msix_indx = 1; 3828 int ret, i, j, msix_indx = 1;
3776 3829
3777 nic->entries = kcalloc(MAX_REQUESTED_MSI_X, sizeof(struct msix_entry), 3830 nic->entries = kmalloc(nic->num_entries * sizeof(struct msix_entry),
3778 GFP_KERNEL); 3831 GFP_KERNEL);
3779 if (!nic->entries) { 3832 if (!nic->entries) {
3780 DBG_PRINT(INFO_DBG, "%s: Memory allocation failed\n", \ 3833 DBG_PRINT(INFO_DBG, "%s: Memory allocation failed\n", \
@@ -3783,10 +3836,12 @@ static int s2io_enable_msi_x(struct s2io_nic *nic)
3783 return -ENOMEM; 3836 return -ENOMEM;
3784 } 3837 }
3785 nic->mac_control.stats_info->sw_stat.mem_allocated 3838 nic->mac_control.stats_info->sw_stat.mem_allocated
3786 += (MAX_REQUESTED_MSI_X * sizeof(struct msix_entry)); 3839 += (nic->num_entries * sizeof(struct msix_entry));
3840
3841 memset(nic->entries, 0, nic->num_entries * sizeof(struct msix_entry));
3787 3842
3788 nic->s2io_entries = 3843 nic->s2io_entries =
3789 kcalloc(MAX_REQUESTED_MSI_X, sizeof(struct s2io_msix_entry), 3844 kmalloc(nic->num_entries * sizeof(struct s2io_msix_entry),
3790 GFP_KERNEL); 3845 GFP_KERNEL);
3791 if (!nic->s2io_entries) { 3846 if (!nic->s2io_entries) {
3792 DBG_PRINT(INFO_DBG, "%s: Memory allocation failed\n", 3847 DBG_PRINT(INFO_DBG, "%s: Memory allocation failed\n",
@@ -3794,60 +3849,52 @@ static int s2io_enable_msi_x(struct s2io_nic *nic)
3794 nic->mac_control.stats_info->sw_stat.mem_alloc_fail_cnt++; 3849 nic->mac_control.stats_info->sw_stat.mem_alloc_fail_cnt++;
3795 kfree(nic->entries); 3850 kfree(nic->entries);
3796 nic->mac_control.stats_info->sw_stat.mem_freed 3851 nic->mac_control.stats_info->sw_stat.mem_freed
3797 += (MAX_REQUESTED_MSI_X * sizeof(struct msix_entry)); 3852 += (nic->num_entries * sizeof(struct msix_entry));
3798 return -ENOMEM; 3853 return -ENOMEM;
3799 } 3854 }
3800 nic->mac_control.stats_info->sw_stat.mem_allocated 3855 nic->mac_control.stats_info->sw_stat.mem_allocated
3801 += (MAX_REQUESTED_MSI_X * sizeof(struct s2io_msix_entry)); 3856 += (nic->num_entries * sizeof(struct s2io_msix_entry));
3802 3857 memset(nic->s2io_entries, 0,
3803 for (i=0; i< MAX_REQUESTED_MSI_X; i++) { 3858 nic->num_entries * sizeof(struct s2io_msix_entry));
3804 nic->entries[i].entry = i; 3859
3805 nic->s2io_entries[i].entry = i; 3860 nic->entries[0].entry = 0;
3861 nic->s2io_entries[0].entry = 0;
3862 nic->s2io_entries[0].in_use = MSIX_FLG;
3863 nic->s2io_entries[0].type = MSIX_ALARM_TYPE;
3864 nic->s2io_entries[0].arg = &nic->mac_control.fifos;
3865
3866 for (i = 1; i < nic->num_entries; i++) {
3867 nic->entries[i].entry = ((i - 1) * 8) + 1;
3868 nic->s2io_entries[i].entry = ((i - 1) * 8) + 1;
3806 nic->s2io_entries[i].arg = NULL; 3869 nic->s2io_entries[i].arg = NULL;
3807 nic->s2io_entries[i].in_use = 0; 3870 nic->s2io_entries[i].in_use = 0;
3808 } 3871 }
3809 3872
3810 tx_mat = readq(&bar0->tx_mat0_n[0]);
3811 for (i=0; i<nic->config.tx_fifo_num; i++, msix_indx++) {
3812 tx_mat |= TX_MAT_SET(i, msix_indx);
3813 nic->s2io_entries[msix_indx].arg = &nic->mac_control.fifos[i];
3814 nic->s2io_entries[msix_indx].type = MSIX_FIFO_TYPE;
3815 nic->s2io_entries[msix_indx].in_use = MSIX_FLG;
3816 }
3817 writeq(tx_mat, &bar0->tx_mat0_n[0]);
3818
3819 rx_mat = readq(&bar0->rx_mat); 3873 rx_mat = readq(&bar0->rx_mat);
3820 for (j = 0; j < nic->config.rx_ring_num; j++, msix_indx++) { 3874 for (j = 0; j < nic->config.rx_ring_num; j++) {
3821 rx_mat |= RX_MAT_SET(j, msix_indx); 3875 rx_mat |= RX_MAT_SET(j, msix_indx);
3822 nic->s2io_entries[msix_indx].arg 3876 nic->s2io_entries[j+1].arg = &nic->mac_control.rings[j];
3823 = &nic->mac_control.rings[j]; 3877 nic->s2io_entries[j+1].type = MSIX_RING_TYPE;
3824 nic->s2io_entries[msix_indx].type = MSIX_RING_TYPE; 3878 nic->s2io_entries[j+1].in_use = MSIX_FLG;
3825 nic->s2io_entries[msix_indx].in_use = MSIX_FLG; 3879 msix_indx += 8;
3826 } 3880 }
3827 writeq(rx_mat, &bar0->rx_mat); 3881 writeq(rx_mat, &bar0->rx_mat);
3882 readq(&bar0->rx_mat);
3828 3883
3829 nic->avail_msix_vectors = 0; 3884 ret = pci_enable_msix(nic->pdev, nic->entries, nic->num_entries);
3830 ret = pci_enable_msix(nic->pdev, nic->entries, MAX_REQUESTED_MSI_X);
3831 /* We fail init if error or we get less vectors than min required */ 3885 /* We fail init if error or we get less vectors than min required */
3832 if (ret >= (nic->config.tx_fifo_num + nic->config.rx_ring_num + 1)) {
3833 nic->avail_msix_vectors = ret;
3834 ret = pci_enable_msix(nic->pdev, nic->entries, ret);
3835 }
3836 if (ret) { 3886 if (ret) {
3837 DBG_PRINT(ERR_DBG, "%s: Enabling MSIX failed\n", nic->dev->name); 3887 DBG_PRINT(ERR_DBG, "%s: Enabling MSIX failed\n", nic->dev->name);
3838 kfree(nic->entries); 3888 kfree(nic->entries);
3839 nic->mac_control.stats_info->sw_stat.mem_freed 3889 nic->mac_control.stats_info->sw_stat.mem_freed
3840 += (MAX_REQUESTED_MSI_X * sizeof(struct msix_entry)); 3890 += (nic->num_entries * sizeof(struct msix_entry));
3841 kfree(nic->s2io_entries); 3891 kfree(nic->s2io_entries);
3842 nic->mac_control.stats_info->sw_stat.mem_freed 3892 nic->mac_control.stats_info->sw_stat.mem_freed
3843 += (MAX_REQUESTED_MSI_X * sizeof(struct s2io_msix_entry)); 3893 += (nic->num_entries * sizeof(struct s2io_msix_entry));
3844 nic->entries = NULL; 3894 nic->entries = NULL;
3845 nic->s2io_entries = NULL; 3895 nic->s2io_entries = NULL;
3846 nic->avail_msix_vectors = 0;
3847 return -ENOMEM; 3896 return -ENOMEM;
3848 } 3897 }
3849 if (!nic->avail_msix_vectors)
3850 nic->avail_msix_vectors = MAX_REQUESTED_MSI_X;
3851 3898
3852 /* 3899 /*
3853 * To enable MSI-X, MSI also needs to be enabled, due to a bug 3900 * To enable MSI-X, MSI also needs to be enabled, due to a bug
@@ -3919,7 +3966,7 @@ static void remove_msix_isr(struct s2io_nic *sp)
3919 int i; 3966 int i;
3920 u16 msi_control; 3967 u16 msi_control;
3921 3968
3922 for (i = 0; i < MAX_REQUESTED_MSI_X; i++) { 3969 for (i = 0; i < sp->num_entries; i++) {
3923 if (sp->s2io_entries[i].in_use == 3970 if (sp->s2io_entries[i].in_use ==
3924 MSIX_REGISTERED_SUCCESS) { 3971 MSIX_REGISTERED_SUCCESS) {
3925 int vector = sp->entries[i].vector; 3972 int vector = sp->entries[i].vector;
@@ -3975,29 +4022,6 @@ static int s2io_open(struct net_device *dev)
3975 netif_carrier_off(dev); 4022 netif_carrier_off(dev);
3976 sp->last_link_state = 0; 4023 sp->last_link_state = 0;
3977 4024
3978 if (sp->config.intr_type == MSI_X) {
3979 int ret = s2io_enable_msi_x(sp);
3980
3981 if (!ret) {
3982 ret = s2io_test_msi(sp);
3983 /* rollback MSI-X, will re-enable during add_isr() */
3984 remove_msix_isr(sp);
3985 }
3986 if (ret) {
3987
3988 DBG_PRINT(ERR_DBG,
3989 "%s: MSI-X requested but failed to enable\n",
3990 dev->name);
3991 sp->config.intr_type = INTA;
3992 }
3993 }
3994
3995 /* NAPI doesn't work well with MSI(X) */
3996 if (sp->config.intr_type != INTA) {
3997 if(sp->config.napi)
3998 sp->config.napi = 0;
3999 }
4000
4001 /* Initialize H/W and enable interrupts */ 4025 /* Initialize H/W and enable interrupts */
4002 err = s2io_card_up(sp); 4026 err = s2io_card_up(sp);
4003 if (err) { 4027 if (err) {
@@ -4020,12 +4044,12 @@ hw_init_failed:
4020 if (sp->entries) { 4044 if (sp->entries) {
4021 kfree(sp->entries); 4045 kfree(sp->entries);
4022 sp->mac_control.stats_info->sw_stat.mem_freed 4046 sp->mac_control.stats_info->sw_stat.mem_freed
4023 += (MAX_REQUESTED_MSI_X * sizeof(struct msix_entry)); 4047 += (sp->num_entries * sizeof(struct msix_entry));
4024 } 4048 }
4025 if (sp->s2io_entries) { 4049 if (sp->s2io_entries) {
4026 kfree(sp->s2io_entries); 4050 kfree(sp->s2io_entries);
4027 sp->mac_control.stats_info->sw_stat.mem_freed 4051 sp->mac_control.stats_info->sw_stat.mem_freed
4028 += (MAX_REQUESTED_MSI_X * sizeof(struct s2io_msix_entry)); 4052 += (sp->num_entries * sizeof(struct s2io_msix_entry));
4029 } 4053 }
4030 } 4054 }
4031 return err; 4055 return err;
@@ -4237,16 +4261,14 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev)
4237 txdp->Buffer_Pointer = pci_map_single(sp->pdev, 4261 txdp->Buffer_Pointer = pci_map_single(sp->pdev,
4238 fifo->ufo_in_band_v, 4262 fifo->ufo_in_band_v,
4239 sizeof(u64), PCI_DMA_TODEVICE); 4263 sizeof(u64), PCI_DMA_TODEVICE);
4240 if((txdp->Buffer_Pointer == 0) || 4264 if (pci_dma_mapping_error(txdp->Buffer_Pointer))
4241 (txdp->Buffer_Pointer == DMA_ERROR_CODE))
4242 goto pci_map_failed; 4265 goto pci_map_failed;
4243 txdp++; 4266 txdp++;
4244 } 4267 }
4245 4268
4246 txdp->Buffer_Pointer = pci_map_single 4269 txdp->Buffer_Pointer = pci_map_single
4247 (sp->pdev, skb->data, frg_len, PCI_DMA_TODEVICE); 4270 (sp->pdev, skb->data, frg_len, PCI_DMA_TODEVICE);
4248 if((txdp->Buffer_Pointer == 0) || 4271 if (pci_dma_mapping_error(txdp->Buffer_Pointer))
4249 (txdp->Buffer_Pointer == DMA_ERROR_CODE))
4250 goto pci_map_failed; 4272 goto pci_map_failed;
4251 4273
4252 txdp->Host_Control = (unsigned long) skb; 4274 txdp->Host_Control = (unsigned long) skb;
@@ -4327,40 +4349,65 @@ s2io_alarm_handle(unsigned long data)
4327 mod_timer(&sp->alarm_timer, jiffies + HZ / 2); 4349 mod_timer(&sp->alarm_timer, jiffies + HZ / 2);
4328} 4350}
4329 4351
4330static int s2io_chk_rx_buffers(struct ring_info *ring)
4331{
4332 if (fill_rx_buffers(ring) == -ENOMEM) {
4333 DBG_PRINT(INFO_DBG, "%s:Out of memory", ring->dev->name);
4334 DBG_PRINT(INFO_DBG, " in Rx Intr!!\n");
4335 }
4336 return 0;
4337}
4338
4339static irqreturn_t s2io_msix_ring_handle(int irq, void *dev_id) 4352static irqreturn_t s2io_msix_ring_handle(int irq, void *dev_id)
4340{ 4353{
4341 struct ring_info *ring = (struct ring_info *)dev_id; 4354 struct ring_info *ring = (struct ring_info *)dev_id;
4342 struct s2io_nic *sp = ring->nic; 4355 struct s2io_nic *sp = ring->nic;
4356 struct XENA_dev_config __iomem *bar0 = sp->bar0;
4357 struct net_device *dev = sp->dev;
4343 4358
4344 if (!is_s2io_card_up(sp)) 4359 if (unlikely(!is_s2io_card_up(sp)))
4345 return IRQ_HANDLED; 4360 return IRQ_HANDLED;
4346 4361
4347 rx_intr_handler(ring); 4362 if (sp->config.napi) {
4348 s2io_chk_rx_buffers(ring); 4363 u8 __iomem *addr = NULL;
4364 u8 val8 = 0;
4365
4366 addr = (u8 __iomem *)&bar0->xmsi_mask_reg;
4367 addr += (7 - ring->ring_no);
4368 val8 = (ring->ring_no == 0) ? 0x7f : 0xff;
4369 writeb(val8, addr);
4370 val8 = readb(addr);
4371 netif_rx_schedule(dev, &ring->napi);
4372 } else {
4373 rx_intr_handler(ring, 0);
4374 s2io_chk_rx_buffers(ring);
4375 }
4349 4376
4350 return IRQ_HANDLED; 4377 return IRQ_HANDLED;
4351} 4378}
4352 4379
4353static irqreturn_t s2io_msix_fifo_handle(int irq, void *dev_id) 4380static irqreturn_t s2io_msix_fifo_handle(int irq, void *dev_id)
4354{ 4381{
4355 struct fifo_info *fifo = (struct fifo_info *)dev_id; 4382 int i;
4356 struct s2io_nic *sp = fifo->nic; 4383 struct fifo_info *fifos = (struct fifo_info *)dev_id;
4384 struct s2io_nic *sp = fifos->nic;
4385 struct XENA_dev_config __iomem *bar0 = sp->bar0;
4386 struct config_param *config = &sp->config;
4387 u64 reason;
4357 4388
4358 if (!is_s2io_card_up(sp)) 4389 if (unlikely(!is_s2io_card_up(sp)))
4390 return IRQ_NONE;
4391
4392 reason = readq(&bar0->general_int_status);
4393 if (unlikely(reason == S2IO_MINUS_ONE))
4394 /* Nothing much can be done. Get out */
4359 return IRQ_HANDLED; 4395 return IRQ_HANDLED;
4360 4396
4361 tx_intr_handler(fifo); 4397 writeq(S2IO_MINUS_ONE, &bar0->general_int_mask);
4398
4399 if (reason & GEN_INTR_TXTRAFFIC)
4400 writeq(S2IO_MINUS_ONE, &bar0->tx_traffic_int);
4401
4402 for (i = 0; i < config->tx_fifo_num; i++)
4403 tx_intr_handler(&fifos[i]);
4404
4405 writeq(sp->general_int_mask, &bar0->general_int_mask);
4406 readl(&bar0->general_int_status);
4407
4362 return IRQ_HANDLED; 4408 return IRQ_HANDLED;
4363} 4409}
4410
4364static void s2io_txpic_intr_handle(struct s2io_nic *sp) 4411static void s2io_txpic_intr_handle(struct s2io_nic *sp)
4365{ 4412{
4366 struct XENA_dev_config __iomem *bar0 = sp->bar0; 4413 struct XENA_dev_config __iomem *bar0 = sp->bar0;
@@ -4762,14 +4809,10 @@ static irqreturn_t s2io_isr(int irq, void *dev_id)
4762 4809
4763 if (config->napi) { 4810 if (config->napi) {
4764 if (reason & GEN_INTR_RXTRAFFIC) { 4811 if (reason & GEN_INTR_RXTRAFFIC) {
4765 if (likely(netif_rx_schedule_prep(dev, 4812 netif_rx_schedule(dev, &sp->napi);
4766 &sp->napi))) { 4813 writeq(S2IO_MINUS_ONE, &bar0->rx_traffic_mask);
4767 __netif_rx_schedule(dev, &sp->napi); 4814 writeq(S2IO_MINUS_ONE, &bar0->rx_traffic_int);
4768 writeq(S2IO_MINUS_ONE, 4815 readl(&bar0->rx_traffic_int);
4769 &bar0->rx_traffic_mask);
4770 } else
4771 writeq(S2IO_MINUS_ONE,
4772 &bar0->rx_traffic_int);
4773 } 4816 }
4774 } else { 4817 } else {
4775 /* 4818 /*
@@ -4781,7 +4824,7 @@ static irqreturn_t s2io_isr(int irq, void *dev_id)
4781 writeq(S2IO_MINUS_ONE, &bar0->rx_traffic_int); 4824 writeq(S2IO_MINUS_ONE, &bar0->rx_traffic_int);
4782 4825
4783 for (i = 0; i < config->rx_ring_num; i++) 4826 for (i = 0; i < config->rx_ring_num; i++)
4784 rx_intr_handler(&mac_control->rings[i]); 4827 rx_intr_handler(&mac_control->rings[i], 0);
4785 } 4828 }
4786 4829
4787 /* 4830 /*
@@ -6836,10 +6879,8 @@ static int set_rxd_buffer_pointer(struct s2io_nic *sp, struct RxD_t *rxdp,
6836 pci_map_single( sp->pdev, (*skb)->data, 6879 pci_map_single( sp->pdev, (*skb)->data,
6837 size - NET_IP_ALIGN, 6880 size - NET_IP_ALIGN,
6838 PCI_DMA_FROMDEVICE); 6881 PCI_DMA_FROMDEVICE);
6839 if( (rxdp1->Buffer0_ptr == 0) || 6882 if (pci_dma_mapping_error(rxdp1->Buffer0_ptr))
6840 (rxdp1->Buffer0_ptr == DMA_ERROR_CODE)) {
6841 goto memalloc_failed; 6883 goto memalloc_failed;
6842 }
6843 rxdp->Host_Control = (unsigned long) (*skb); 6884 rxdp->Host_Control = (unsigned long) (*skb);
6844 } 6885 }
6845 } else if ((sp->rxd_mode == RXD_MODE_3B) && (rxdp->Host_Control == 0)) { 6886 } else if ((sp->rxd_mode == RXD_MODE_3B) && (rxdp->Host_Control == 0)) {
@@ -6865,15 +6906,12 @@ static int set_rxd_buffer_pointer(struct s2io_nic *sp, struct RxD_t *rxdp,
6865 pci_map_single(sp->pdev, (*skb)->data, 6906 pci_map_single(sp->pdev, (*skb)->data,
6866 dev->mtu + 4, 6907 dev->mtu + 4,
6867 PCI_DMA_FROMDEVICE); 6908 PCI_DMA_FROMDEVICE);
6868 if( (rxdp3->Buffer2_ptr == 0) || 6909 if (pci_dma_mapping_error(rxdp3->Buffer2_ptr))
6869 (rxdp3->Buffer2_ptr == DMA_ERROR_CODE)) {
6870 goto memalloc_failed; 6910 goto memalloc_failed;
6871 }
6872 rxdp3->Buffer0_ptr = *temp0 = 6911 rxdp3->Buffer0_ptr = *temp0 =
6873 pci_map_single( sp->pdev, ba->ba_0, BUF0_LEN, 6912 pci_map_single( sp->pdev, ba->ba_0, BUF0_LEN,
6874 PCI_DMA_FROMDEVICE); 6913 PCI_DMA_FROMDEVICE);
6875 if( (rxdp3->Buffer0_ptr == 0) || 6914 if (pci_dma_mapping_error(rxdp3->Buffer0_ptr)) {
6876 (rxdp3->Buffer0_ptr == DMA_ERROR_CODE)) {
6877 pci_unmap_single (sp->pdev, 6915 pci_unmap_single (sp->pdev,
6878 (dma_addr_t)rxdp3->Buffer2_ptr, 6916 (dma_addr_t)rxdp3->Buffer2_ptr,
6879 dev->mtu + 4, PCI_DMA_FROMDEVICE); 6917 dev->mtu + 4, PCI_DMA_FROMDEVICE);
@@ -6885,8 +6923,7 @@ static int set_rxd_buffer_pointer(struct s2io_nic *sp, struct RxD_t *rxdp,
6885 rxdp3->Buffer1_ptr = *temp1 = 6923 rxdp3->Buffer1_ptr = *temp1 =
6886 pci_map_single(sp->pdev, ba->ba_1, BUF1_LEN, 6924 pci_map_single(sp->pdev, ba->ba_1, BUF1_LEN,
6887 PCI_DMA_FROMDEVICE); 6925 PCI_DMA_FROMDEVICE);
6888 if( (rxdp3->Buffer1_ptr == 0) || 6926 if (pci_dma_mapping_error(rxdp3->Buffer1_ptr)) {
6889 (rxdp3->Buffer1_ptr == DMA_ERROR_CODE)) {
6890 pci_unmap_single (sp->pdev, 6927 pci_unmap_single (sp->pdev,
6891 (dma_addr_t)rxdp3->Buffer0_ptr, 6928 (dma_addr_t)rxdp3->Buffer0_ptr,
6892 BUF0_LEN, PCI_DMA_FROMDEVICE); 6929 BUF0_LEN, PCI_DMA_FROMDEVICE);
@@ -6984,62 +7021,62 @@ static int s2io_add_isr(struct s2io_nic * sp)
6984 7021
6985 /* After proper initialization of H/W, register ISR */ 7022 /* After proper initialization of H/W, register ISR */
6986 if (sp->config.intr_type == MSI_X) { 7023 if (sp->config.intr_type == MSI_X) {
6987 int i, msix_tx_cnt=0,msix_rx_cnt=0; 7024 int i, msix_rx_cnt = 0;
6988 7025
6989 for (i=1; (sp->s2io_entries[i].in_use == MSIX_FLG); i++) { 7026 for (i = 0; i < sp->num_entries; i++) {
6990 if (sp->s2io_entries[i].type == MSIX_FIFO_TYPE) { 7027 if (sp->s2io_entries[i].in_use == MSIX_FLG) {
6991 sprintf(sp->desc[i], "%s:MSI-X-%d-TX", 7028 if (sp->s2io_entries[i].type ==
7029 MSIX_RING_TYPE) {
7030 sprintf(sp->desc[i], "%s:MSI-X-%d-RX",
7031 dev->name, i);
7032 err = request_irq(sp->entries[i].vector,
7033 s2io_msix_ring_handle, 0,
7034 sp->desc[i],
7035 sp->s2io_entries[i].arg);
7036 } else if (sp->s2io_entries[i].type ==
7037 MSIX_ALARM_TYPE) {
7038 sprintf(sp->desc[i], "%s:MSI-X-%d-TX",
6992 dev->name, i); 7039 dev->name, i);
6993 err = request_irq(sp->entries[i].vector, 7040 err = request_irq(sp->entries[i].vector,
6994 s2io_msix_fifo_handle, 0, sp->desc[i], 7041 s2io_msix_fifo_handle, 0,
6995 sp->s2io_entries[i].arg); 7042 sp->desc[i],
6996 /* If either data or addr is zero print it */ 7043 sp->s2io_entries[i].arg);
6997 if(!(sp->msix_info[i].addr && 7044
6998 sp->msix_info[i].data)) {
6999 DBG_PRINT(ERR_DBG, "%s @ Addr:0x%llx "
7000 "Data:0x%llx\n",sp->desc[i],
7001 (unsigned long long)
7002 sp->msix_info[i].addr,
7003 (unsigned long long)
7004 sp->msix_info[i].data);
7005 } else {
7006 msix_tx_cnt++;
7007 } 7045 }
7008 } else { 7046 /* if either data or addr is zero print it. */
7009 sprintf(sp->desc[i], "%s:MSI-X-%d-RX", 7047 if (!(sp->msix_info[i].addr &&
7010 dev->name, i);
7011 err = request_irq(sp->entries[i].vector,
7012 s2io_msix_ring_handle, 0, sp->desc[i],
7013 sp->s2io_entries[i].arg);
7014 /* If either data or addr is zero print it */
7015 if(!(sp->msix_info[i].addr &&
7016 sp->msix_info[i].data)) { 7048 sp->msix_info[i].data)) {
7017 DBG_PRINT(ERR_DBG, "%s @ Addr:0x%llx " 7049 DBG_PRINT(ERR_DBG,
7018 "Data:0x%llx\n",sp->desc[i], 7050 "%s @Addr:0x%llx Data:0x%llx\n",
7051 sp->desc[i],
7019 (unsigned long long) 7052 (unsigned long long)
7020 sp->msix_info[i].addr, 7053 sp->msix_info[i].addr,
7021 (unsigned long long) 7054 (unsigned long long)
7022 sp->msix_info[i].data); 7055 ntohl(sp->msix_info[i].data));
7023 } else { 7056 } else
7024 msix_rx_cnt++; 7057 msix_rx_cnt++;
7058 if (err) {
7059 remove_msix_isr(sp);
7060
7061 DBG_PRINT(ERR_DBG,
7062 "%s:MSI-X-%d registration "
7063 "failed\n", dev->name, i);
7064
7065 DBG_PRINT(ERR_DBG,
7066 "%s: Defaulting to INTA\n",
7067 dev->name);
7068 sp->config.intr_type = INTA;
7069 break;
7025 } 7070 }
7071 sp->s2io_entries[i].in_use =
7072 MSIX_REGISTERED_SUCCESS;
7026 } 7073 }
7027 if (err) {
7028 remove_msix_isr(sp);
7029 DBG_PRINT(ERR_DBG,"%s:MSI-X-%d registration "
7030 "failed\n", dev->name, i);
7031 DBG_PRINT(ERR_DBG, "%s: defaulting to INTA\n",
7032 dev->name);
7033 sp->config.intr_type = INTA;
7034 break;
7035 }
7036 sp->s2io_entries[i].in_use = MSIX_REGISTERED_SUCCESS;
7037 } 7074 }
7038 if (!err) { 7075 if (!err) {
7039 printk(KERN_INFO "MSI-X-TX %d entries enabled\n",
7040 msix_tx_cnt);
7041 printk(KERN_INFO "MSI-X-RX %d entries enabled\n", 7076 printk(KERN_INFO "MSI-X-RX %d entries enabled\n",
7042 msix_rx_cnt); 7077 --msix_rx_cnt);
7078 DBG_PRINT(INFO_DBG, "MSI-X-TX entries enabled"
7079 " through alarm vector\n");
7043 } 7080 }
7044 } 7081 }
7045 if (sp->config.intr_type == INTA) { 7082 if (sp->config.intr_type == INTA) {
@@ -7080,8 +7117,15 @@ static void do_s2io_card_down(struct s2io_nic * sp, int do_io)
7080 clear_bit(__S2IO_STATE_CARD_UP, &sp->state); 7117 clear_bit(__S2IO_STATE_CARD_UP, &sp->state);
7081 7118
7082 /* Disable napi */ 7119 /* Disable napi */
7083 if (config->napi) 7120 if (sp->config.napi) {
7084 napi_disable(&sp->napi); 7121 int off = 0;
7122 if (config->intr_type == MSI_X) {
7123 for (; off < sp->config.rx_ring_num; off++)
7124 napi_disable(&sp->mac_control.rings[off].napi);
7125 }
7126 else
7127 napi_disable(&sp->napi);
7128 }
7085 7129
7086 /* disable Tx and Rx traffic on the NIC */ 7130 /* disable Tx and Rx traffic on the NIC */
7087 if (do_io) 7131 if (do_io)
@@ -7173,8 +7217,15 @@ static int s2io_card_up(struct s2io_nic * sp)
7173 } 7217 }
7174 7218
7175 /* Initialise napi */ 7219 /* Initialise napi */
7176 if (config->napi) 7220 if (config->napi) {
7177 napi_enable(&sp->napi); 7221 int i;
7222 if (config->intr_type == MSI_X) {
7223 for (i = 0; i < sp->config.rx_ring_num; i++)
7224 napi_enable(&sp->mac_control.rings[i].napi);
7225 } else {
7226 napi_enable(&sp->napi);
7227 }
7228 }
7178 7229
7179 /* Maintain the state prior to the open */ 7230 /* Maintain the state prior to the open */
7180 if (sp->promisc_flg) 7231 if (sp->promisc_flg)
@@ -7217,7 +7268,7 @@ static int s2io_card_up(struct s2io_nic * sp)
7217 /* Enable select interrupts */ 7268 /* Enable select interrupts */
7218 en_dis_err_alarms(sp, ENA_ALL_INTRS, ENABLE_INTRS); 7269 en_dis_err_alarms(sp, ENA_ALL_INTRS, ENABLE_INTRS);
7219 if (sp->config.intr_type != INTA) 7270 if (sp->config.intr_type != INTA)
7220 en_dis_able_nic_intrs(sp, ENA_ALL_INTRS, DISABLE_INTRS); 7271 en_dis_able_nic_intrs(sp, TX_TRAFFIC_INTR, ENABLE_INTRS);
7221 else { 7272 else {
7222 interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR; 7273 interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR;
7223 interruptible |= TX_PIC_INTR; 7274 interruptible |= TX_PIC_INTR;
@@ -7615,9 +7666,6 @@ static int s2io_verify_parm(struct pci_dev *pdev, u8 *dev_intr_type,
7615 rx_ring_num = MAX_RX_RINGS; 7666 rx_ring_num = MAX_RX_RINGS;
7616 } 7667 }
7617 7668
7618 if (*dev_intr_type != INTA)
7619 napi = 0;
7620
7621 if ((*dev_intr_type != INTA) && (*dev_intr_type != MSI_X)) { 7669 if ((*dev_intr_type != INTA) && (*dev_intr_type != MSI_X)) {
7622 DBG_PRINT(ERR_DBG, "s2io: Wrong intr_type requested. " 7670 DBG_PRINT(ERR_DBG, "s2io: Wrong intr_type requested. "
7623 "Defaulting to INTA\n"); 7671 "Defaulting to INTA\n");
@@ -7918,8 +7966,6 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
7918 * will use eth_mac_addr() for dev->set_mac_address 7966 * will use eth_mac_addr() for dev->set_mac_address
7919 * mac address will be set every time dev->open() is called 7967 * mac address will be set every time dev->open() is called
7920 */ 7968 */
7921 netif_napi_add(dev, &sp->napi, s2io_poll, 32);
7922
7923#ifdef CONFIG_NET_POLL_CONTROLLER 7969#ifdef CONFIG_NET_POLL_CONTROLLER
7924 dev->poll_controller = s2io_netpoll; 7970 dev->poll_controller = s2io_netpoll;
7925#endif 7971#endif
@@ -7963,6 +8009,32 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
7963 } 8009 }
7964 } 8010 }
7965 8011
8012 if (sp->config.intr_type == MSI_X) {
8013 sp->num_entries = config->rx_ring_num + 1;
8014 ret = s2io_enable_msi_x(sp);
8015
8016 if (!ret) {
8017 ret = s2io_test_msi(sp);
8018 /* rollback MSI-X, will re-enable during add_isr() */
8019 remove_msix_isr(sp);
8020 }
8021 if (ret) {
8022
8023 DBG_PRINT(ERR_DBG,
8024 "%s: MSI-X requested but failed to enable\n",
8025 dev->name);
8026 sp->config.intr_type = INTA;
8027 }
8028 }
8029
8030 if (config->intr_type == MSI_X) {
8031 for (i = 0; i < config->rx_ring_num ; i++)
8032 netif_napi_add(dev, &mac_control->rings[i].napi,
8033 s2io_poll_msix, 64);
8034 } else {
8035 netif_napi_add(dev, &sp->napi, s2io_poll_inta, 64);
8036 }
8037
7966 /* Not needed for Herc */ 8038 /* Not needed for Herc */
7967 if (sp->device_type & XFRAME_I_DEVICE) { 8039 if (sp->device_type & XFRAME_I_DEVICE) {
7968 /* 8040 /*
@@ -8013,6 +8085,11 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
8013 /* store mac addresses from CAM to s2io_nic structure */ 8085 /* store mac addresses from CAM to s2io_nic structure */
8014 do_s2io_store_unicast_mc(sp); 8086 do_s2io_store_unicast_mc(sp);
8015 8087
8088 /* Configure MSIX vector for number of rings configured plus one */
8089 if ((sp->device_type == XFRAME_II_DEVICE) &&
8090 (config->intr_type == MSI_X))
8091 sp->num_entries = config->rx_ring_num + 1;
8092
8016 /* Store the values of the MSIX table in the s2io_nic structure */ 8093 /* Store the values of the MSIX table in the s2io_nic structure */
8017 store_xmsi_data(sp); 8094 store_xmsi_data(sp);
8018 /* reset Nic and bring it to known state */ 8095 /* reset Nic and bring it to known state */
@@ -8078,8 +8155,14 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
8078 break; 8155 break;
8079 } 8156 }
8080 8157
8081 if (napi) 8158 switch (sp->config.napi) {
8159 case 0:
8160 DBG_PRINT(ERR_DBG, "%s: NAPI disabled\n", dev->name);
8161 break;
8162 case 1:
8082 DBG_PRINT(ERR_DBG, "%s: NAPI enabled\n", dev->name); 8163 DBG_PRINT(ERR_DBG, "%s: NAPI enabled\n", dev->name);
8164 break;
8165 }
8083 8166
8084 DBG_PRINT(ERR_DBG, "%s: Using %d Tx fifo(s)\n", dev->name, 8167 DBG_PRINT(ERR_DBG, "%s: Using %d Tx fifo(s)\n", dev->name,
8085 sp->config.tx_fifo_num); 8168 sp->config.tx_fifo_num);
diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h
index 0709ebae9139..1827b6686c98 100644
--- a/drivers/net/s2io.h
+++ b/drivers/net/s2io.h
@@ -75,10 +75,6 @@ static int debug_level = ERR_DBG;
75/* DEBUG message print. */ 75/* DEBUG message print. */
76#define DBG_PRINT(dbg_level, args...) if(!(debug_level<dbg_level)) printk(args) 76#define DBG_PRINT(dbg_level, args...) if(!(debug_level<dbg_level)) printk(args)
77 77
78#ifndef DMA_ERROR_CODE
79#define DMA_ERROR_CODE (~(dma_addr_t)0x0)
80#endif
81
82/* Protocol assist features of the NIC */ 78/* Protocol assist features of the NIC */
83#define L3_CKSUM_OK 0xFFFF 79#define L3_CKSUM_OK 0xFFFF
84#define L4_CKSUM_OK 0xFFFF 80#define L4_CKSUM_OK 0xFFFF
@@ -706,7 +702,7 @@ struct ring_info {
706 /* per-ring buffer counter */ 702 /* per-ring buffer counter */
707 u32 rx_bufs_left; 703 u32 rx_bufs_left;
708 704
709 #define MAX_LRO_SESSIONS 32 705#define MAX_LRO_SESSIONS 32
710 struct lro lro0_n[MAX_LRO_SESSIONS]; 706 struct lro lro0_n[MAX_LRO_SESSIONS];
711 u8 lro; 707 u8 lro;
712 708
@@ -725,6 +721,11 @@ struct ring_info {
725 /* copy of sp->pdev pointer */ 721 /* copy of sp->pdev pointer */
726 struct pci_dev *pdev; 722 struct pci_dev *pdev;
727 723
724 /* Per ring napi struct */
725 struct napi_struct napi;
726
727 unsigned long interrupt_count;
728
728 /* 729 /*
729 * Place holders for the virtual and physical addresses of 730 * Place holders for the virtual and physical addresses of
730 * all the Rx Blocks 731 * all the Rx Blocks
@@ -841,7 +842,7 @@ struct usr_addr {
841 * Structure to keep track of the MSI-X vectors and the corresponding 842 * Structure to keep track of the MSI-X vectors and the corresponding
842 * argument registered against each vector 843 * argument registered against each vector
843 */ 844 */
844#define MAX_REQUESTED_MSI_X 17 845#define MAX_REQUESTED_MSI_X 9
845struct s2io_msix_entry 846struct s2io_msix_entry
846{ 847{
847 u16 vector; 848 u16 vector;
@@ -849,8 +850,8 @@ struct s2io_msix_entry
849 void *arg; 850 void *arg;
850 851
851 u8 type; 852 u8 type;
852#define MSIX_FIFO_TYPE 1 853#define MSIX_ALARM_TYPE 1
853#define MSIX_RING_TYPE 2 854#define MSIX_RING_TYPE 2
854 855
855 u8 in_use; 856 u8 in_use;
856#define MSIX_REGISTERED_SUCCESS 0xAA 857#define MSIX_REGISTERED_SUCCESS 0xAA
@@ -877,7 +878,6 @@ struct s2io_nic {
877 */ 878 */
878 int pkts_to_process; 879 int pkts_to_process;
879 struct net_device *dev; 880 struct net_device *dev;
880 struct napi_struct napi;
881 struct mac_info mac_control; 881 struct mac_info mac_control;
882 struct config_param config; 882 struct config_param config;
883 struct pci_dev *pdev; 883 struct pci_dev *pdev;
@@ -948,6 +948,7 @@ struct s2io_nic {
948 */ 948 */
949 u8 other_fifo_idx; 949 u8 other_fifo_idx;
950 950
951 struct napi_struct napi;
951 /* after blink, the adapter must be restored with original 952 /* after blink, the adapter must be restored with original
952 * values. 953 * values.
953 */ 954 */
@@ -962,6 +963,7 @@ struct s2io_nic {
962 unsigned long long start_time; 963 unsigned long long start_time;
963 struct vlan_group *vlgrp; 964 struct vlan_group *vlgrp;
964#define MSIX_FLG 0xA5 965#define MSIX_FLG 0xA5
966 int num_entries;
965 struct msix_entry *entries; 967 struct msix_entry *entries;
966 int msi_detected; 968 int msi_detected;
967 wait_queue_head_t msi_wait; 969 wait_queue_head_t msi_wait;
@@ -982,6 +984,7 @@ struct s2io_nic {
982 u16 lro_max_aggr_per_sess; 984 u16 lro_max_aggr_per_sess;
983 volatile unsigned long state; 985 volatile unsigned long state;
984 u64 general_int_mask; 986 u64 general_int_mask;
987
985#define VPD_STRING_LEN 80 988#define VPD_STRING_LEN 80
986 u8 product_name[VPD_STRING_LEN]; 989 u8 product_name[VPD_STRING_LEN];
987 u8 serial_num[VPD_STRING_LEN]; 990 u8 serial_num[VPD_STRING_LEN];
@@ -1103,7 +1106,7 @@ static void __devexit s2io_rem_nic(struct pci_dev *pdev);
1103static int init_shared_mem(struct s2io_nic *sp); 1106static int init_shared_mem(struct s2io_nic *sp);
1104static void free_shared_mem(struct s2io_nic *sp); 1107static void free_shared_mem(struct s2io_nic *sp);
1105static int init_nic(struct s2io_nic *nic); 1108static int init_nic(struct s2io_nic *nic);
1106static void rx_intr_handler(struct ring_info *ring_data); 1109static int rx_intr_handler(struct ring_info *ring_data, int budget);
1107static void tx_intr_handler(struct fifo_info *fifo_data); 1110static void tx_intr_handler(struct fifo_info *fifo_data);
1108static void s2io_handle_errors(void * dev_id); 1111static void s2io_handle_errors(void * dev_id);
1109 1112
@@ -1114,7 +1117,8 @@ static void s2io_set_multicast(struct net_device *dev);
1114static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp); 1117static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp);
1115static void s2io_link(struct s2io_nic * sp, int link); 1118static void s2io_link(struct s2io_nic * sp, int link);
1116static void s2io_reset(struct s2io_nic * sp); 1119static void s2io_reset(struct s2io_nic * sp);
1117static int s2io_poll(struct napi_struct *napi, int budget); 1120static int s2io_poll_msix(struct napi_struct *napi, int budget);
1121static int s2io_poll_inta(struct napi_struct *napi, int budget);
1118static void s2io_init_pci(struct s2io_nic * sp); 1122static void s2io_init_pci(struct s2io_nic * sp);
1119static int do_s2io_prog_unicast(struct net_device *dev, u8 *addr); 1123static int do_s2io_prog_unicast(struct net_device *dev, u8 *addr);
1120static void s2io_alarm_handle(unsigned long data); 1124static void s2io_alarm_handle(unsigned long data);
diff --git a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c
index 888b7dec9866..33bb18f810fb 100644
--- a/drivers/net/sb1250-mac.c
+++ b/drivers/net/sb1250-mac.c
@@ -179,8 +179,7 @@ enum sbmac_state {
179#define SBMAC_MAX_TXDESCR 256 179#define SBMAC_MAX_TXDESCR 256
180#define SBMAC_MAX_RXDESCR 256 180#define SBMAC_MAX_RXDESCR 256
181 181
182#define ETHER_ALIGN 2 182#define ETHER_ADDR_LEN 6
183#define ETHER_ADDR_LEN 6
184#define ENET_PACKET_SIZE 1518 183#define ENET_PACKET_SIZE 1518
185/*#define ENET_PACKET_SIZE 9216 */ 184/*#define ENET_PACKET_SIZE 9216 */
186 185
@@ -262,8 +261,6 @@ struct sbmac_softc {
262 spinlock_t sbm_lock; /* spin lock */ 261 spinlock_t sbm_lock; /* spin lock */
263 int sbm_devflags; /* current device flags */ 262 int sbm_devflags; /* current device flags */
264 263
265 int sbm_buffersize;
266
267 /* 264 /*
268 * Controller-specific things 265 * Controller-specific things
269 */ 266 */
@@ -305,10 +302,11 @@ struct sbmac_softc {
305static void sbdma_initctx(struct sbmacdma *d, struct sbmac_softc *s, int chan, 302static void sbdma_initctx(struct sbmacdma *d, struct sbmac_softc *s, int chan,
306 int txrx, int maxdescr); 303 int txrx, int maxdescr);
307static void sbdma_channel_start(struct sbmacdma *d, int rxtx); 304static void sbdma_channel_start(struct sbmacdma *d, int rxtx);
308static int sbdma_add_rcvbuffer(struct sbmacdma *d, struct sk_buff *m); 305static int sbdma_add_rcvbuffer(struct sbmac_softc *sc, struct sbmacdma *d,
306 struct sk_buff *m);
309static int sbdma_add_txbuffer(struct sbmacdma *d, struct sk_buff *m); 307static int sbdma_add_txbuffer(struct sbmacdma *d, struct sk_buff *m);
310static void sbdma_emptyring(struct sbmacdma *d); 308static void sbdma_emptyring(struct sbmacdma *d);
311static void sbdma_fillring(struct sbmacdma *d); 309static void sbdma_fillring(struct sbmac_softc *sc, struct sbmacdma *d);
312static int sbdma_rx_process(struct sbmac_softc *sc, struct sbmacdma *d, 310static int sbdma_rx_process(struct sbmac_softc *sc, struct sbmacdma *d,
313 int work_to_do, int poll); 311 int work_to_do, int poll);
314static void sbdma_tx_process(struct sbmac_softc *sc, struct sbmacdma *d, 312static void sbdma_tx_process(struct sbmac_softc *sc, struct sbmacdma *d,
@@ -777,16 +775,13 @@ static void sbdma_channel_stop(struct sbmacdma *d)
777 d->sbdma_remptr = NULL; 775 d->sbdma_remptr = NULL;
778} 776}
779 777
780static void sbdma_align_skb(struct sk_buff *skb,int power2,int offset) 778static inline void sbdma_align_skb(struct sk_buff *skb,
779 unsigned int power2, unsigned int offset)
781{ 780{
782 unsigned long addr; 781 unsigned char *addr = skb->data;
783 unsigned long newaddr; 782 unsigned char *newaddr = PTR_ALIGN(addr, power2);
784
785 addr = (unsigned long) skb->data;
786
787 newaddr = (addr + power2 - 1) & ~(power2 - 1);
788 783
789 skb_reserve(skb,newaddr-addr+offset); 784 skb_reserve(skb, newaddr - addr + offset);
790} 785}
791 786
792 787
@@ -797,7 +792,8 @@ static void sbdma_align_skb(struct sk_buff *skb,int power2,int offset)
797 * this queues a buffer for inbound packets. 792 * this queues a buffer for inbound packets.
798 * 793 *
799 * Input parameters: 794 * Input parameters:
800 * d - DMA channel descriptor 795 * sc - softc structure
796 * d - DMA channel descriptor
801 * sb - sk_buff to add, or NULL if we should allocate one 797 * sb - sk_buff to add, or NULL if we should allocate one
802 * 798 *
803 * Return value: 799 * Return value:
@@ -806,8 +802,10 @@ static void sbdma_align_skb(struct sk_buff *skb,int power2,int offset)
806 ********************************************************************* */ 802 ********************************************************************* */
807 803
808 804
809static int sbdma_add_rcvbuffer(struct sbmacdma *d, struct sk_buff *sb) 805static int sbdma_add_rcvbuffer(struct sbmac_softc *sc, struct sbmacdma *d,
806 struct sk_buff *sb)
810{ 807{
808 struct net_device *dev = sc->sbm_dev;
811 struct sbdmadscr *dsc; 809 struct sbdmadscr *dsc;
812 struct sbdmadscr *nextdsc; 810 struct sbdmadscr *nextdsc;
813 struct sk_buff *sb_new = NULL; 811 struct sk_buff *sb_new = NULL;
@@ -848,14 +846,16 @@ static int sbdma_add_rcvbuffer(struct sbmacdma *d, struct sk_buff *sb)
848 */ 846 */
849 847
850 if (sb == NULL) { 848 if (sb == NULL) {
851 sb_new = dev_alloc_skb(ENET_PACKET_SIZE + SMP_CACHE_BYTES * 2 + ETHER_ALIGN); 849 sb_new = netdev_alloc_skb(dev, ENET_PACKET_SIZE +
850 SMP_CACHE_BYTES * 2 +
851 NET_IP_ALIGN);
852 if (sb_new == NULL) { 852 if (sb_new == NULL) {
853 pr_info("%s: sk_buff allocation failed\n", 853 pr_info("%s: sk_buff allocation failed\n",
854 d->sbdma_eth->sbm_dev->name); 854 d->sbdma_eth->sbm_dev->name);
855 return -ENOBUFS; 855 return -ENOBUFS;
856 } 856 }
857 857
858 sbdma_align_skb(sb_new, SMP_CACHE_BYTES, ETHER_ALIGN); 858 sbdma_align_skb(sb_new, SMP_CACHE_BYTES, NET_IP_ALIGN);
859 } 859 }
860 else { 860 else {
861 sb_new = sb; 861 sb_new = sb;
@@ -874,10 +874,10 @@ static int sbdma_add_rcvbuffer(struct sbmacdma *d, struct sk_buff *sb)
874 * Do not interrupt per DMA transfer. 874 * Do not interrupt per DMA transfer.
875 */ 875 */
876 dsc->dscr_a = virt_to_phys(sb_new->data) | 876 dsc->dscr_a = virt_to_phys(sb_new->data) |
877 V_DMA_DSCRA_A_SIZE(NUMCACHEBLKS(pktsize+ETHER_ALIGN)) | 0; 877 V_DMA_DSCRA_A_SIZE(NUMCACHEBLKS(pktsize + NET_IP_ALIGN)) | 0;
878#else 878#else
879 dsc->dscr_a = virt_to_phys(sb_new->data) | 879 dsc->dscr_a = virt_to_phys(sb_new->data) |
880 V_DMA_DSCRA_A_SIZE(NUMCACHEBLKS(pktsize+ETHER_ALIGN)) | 880 V_DMA_DSCRA_A_SIZE(NUMCACHEBLKS(pktsize + NET_IP_ALIGN)) |
881 M_DMA_DSCRA_INTERRUPT; 881 M_DMA_DSCRA_INTERRUPT;
882#endif 882#endif
883 883
@@ -1032,18 +1032,19 @@ static void sbdma_emptyring(struct sbmacdma *d)
1032 * with sk_buffs 1032 * with sk_buffs
1033 * 1033 *
1034 * Input parameters: 1034 * Input parameters:
1035 * d - DMA channel 1035 * sc - softc structure
1036 * d - DMA channel
1036 * 1037 *
1037 * Return value: 1038 * Return value:
1038 * nothing 1039 * nothing
1039 ********************************************************************* */ 1040 ********************************************************************* */
1040 1041
1041static void sbdma_fillring(struct sbmacdma *d) 1042static void sbdma_fillring(struct sbmac_softc *sc, struct sbmacdma *d)
1042{ 1043{
1043 int idx; 1044 int idx;
1044 1045
1045 for (idx = 0; idx < SBMAC_MAX_RXDESCR-1; idx++) { 1046 for (idx = 0; idx < SBMAC_MAX_RXDESCR - 1; idx++) {
1046 if (sbdma_add_rcvbuffer(d,NULL) != 0) 1047 if (sbdma_add_rcvbuffer(sc, d, NULL) != 0)
1047 break; 1048 break;
1048 } 1049 }
1049} 1050}
@@ -1159,10 +1160,11 @@ again:
1159 * packet and put it right back on the receive ring. 1160 * packet and put it right back on the receive ring.
1160 */ 1161 */
1161 1162
1162 if (unlikely (sbdma_add_rcvbuffer(d,NULL) == 1163 if (unlikely(sbdma_add_rcvbuffer(sc, d, NULL) ==
1163 -ENOBUFS)) { 1164 -ENOBUFS)) {
1164 dev->stats.rx_dropped++; 1165 dev->stats.rx_dropped++;
1165 sbdma_add_rcvbuffer(d,sb); /* re-add old buffer */ 1166 /* Re-add old buffer */
1167 sbdma_add_rcvbuffer(sc, d, sb);
1166 /* No point in continuing at the moment */ 1168 /* No point in continuing at the moment */
1167 printk(KERN_ERR "dropped packet (1)\n"); 1169 printk(KERN_ERR "dropped packet (1)\n");
1168 d->sbdma_remptr = SBDMA_NEXTBUF(d,sbdma_remptr); 1170 d->sbdma_remptr = SBDMA_NEXTBUF(d,sbdma_remptr);
@@ -1212,7 +1214,7 @@ again:
1212 * put it back on the receive ring. 1214 * put it back on the receive ring.
1213 */ 1215 */
1214 dev->stats.rx_errors++; 1216 dev->stats.rx_errors++;
1215 sbdma_add_rcvbuffer(d,sb); 1217 sbdma_add_rcvbuffer(sc, d, sb);
1216 } 1218 }
1217 1219
1218 1220
@@ -1570,7 +1572,7 @@ static void sbmac_channel_start(struct sbmac_softc *s)
1570 * Fill the receive ring 1572 * Fill the receive ring
1571 */ 1573 */
1572 1574
1573 sbdma_fillring(&(s->sbm_rxdma)); 1575 sbdma_fillring(s, &(s->sbm_rxdma));
1574 1576
1575 /* 1577 /*
1576 * Turn on the rest of the bits in the enable register 1578 * Turn on the rest of the bits in the enable register
@@ -2312,13 +2314,6 @@ static int sbmac_init(struct platform_device *pldev, long long base)
2312 dev->dev_addr[i] = eaddr[i]; 2314 dev->dev_addr[i] = eaddr[i];
2313 } 2315 }
2314 2316
2315
2316 /*
2317 * Init packet size
2318 */
2319
2320 sc->sbm_buffersize = ENET_PACKET_SIZE + SMP_CACHE_BYTES * 2 + ETHER_ALIGN;
2321
2322 /* 2317 /*
2323 * Initialize context (get pointers to registers and stuff), then 2318 * Initialize context (get pointers to registers and stuff), then
2324 * allocate the memory for the descriptor tables. 2319 * allocate the memory for the descriptor tables.
diff --git a/drivers/net/sc92031.c b/drivers/net/sc92031.c
index f64a860029b7..61955f8d8011 100644
--- a/drivers/net/sc92031.c
+++ b/drivers/net/sc92031.c
@@ -953,9 +953,6 @@ static int sc92031_start_xmit(struct sk_buff *skb, struct net_device *dev)
953 unsigned entry; 953 unsigned entry;
954 u32 tx_status; 954 u32 tx_status;
955 955
956 if (skb_padto(skb, ETH_ZLEN))
957 return NETDEV_TX_OK;
958
959 if (unlikely(skb->len > TX_BUF_SIZE)) { 956 if (unlikely(skb->len > TX_BUF_SIZE)) {
960 dev->stats.tx_dropped++; 957 dev->stats.tx_dropped++;
961 goto out; 958 goto out;
@@ -975,6 +972,11 @@ static int sc92031_start_xmit(struct sk_buff *skb, struct net_device *dev)
975 skb_copy_and_csum_dev(skb, priv->tx_bufs + entry * TX_BUF_SIZE); 972 skb_copy_and_csum_dev(skb, priv->tx_bufs + entry * TX_BUF_SIZE);
976 973
977 len = skb->len; 974 len = skb->len;
975 if (len < ETH_ZLEN) {
976 memset(priv->tx_bufs + entry * TX_BUF_SIZE + len,
977 0, ETH_ZLEN - len);
978 len = ETH_ZLEN;
979 }
978 980
979 wmb(); 981 wmb();
980 982
diff --git a/drivers/net/sfc/bitfield.h b/drivers/net/sfc/bitfield.h
index 2806201644cc..2c79d27404e0 100644
--- a/drivers/net/sfc/bitfield.h
+++ b/drivers/net/sfc/bitfield.h
@@ -483,7 +483,7 @@ typedef union efx_oword {
483#endif 483#endif
484 484
485#define EFX_SET_OWORD_FIELD_VER(efx, oword, field, value) do { \ 485#define EFX_SET_OWORD_FIELD_VER(efx, oword, field, value) do { \
486 if (FALCON_REV(efx) >= FALCON_REV_B0) { \ 486 if (falcon_rev(efx) >= FALCON_REV_B0) { \
487 EFX_SET_OWORD_FIELD((oword), field##_B0, (value)); \ 487 EFX_SET_OWORD_FIELD((oword), field##_B0, (value)); \
488 } else { \ 488 } else { \
489 EFX_SET_OWORD_FIELD((oword), field##_A1, (value)); \ 489 EFX_SET_OWORD_FIELD((oword), field##_A1, (value)); \
@@ -491,7 +491,7 @@ typedef union efx_oword {
491} while (0) 491} while (0)
492 492
493#define EFX_QWORD_FIELD_VER(efx, qword, field) \ 493#define EFX_QWORD_FIELD_VER(efx, qword, field) \
494 (FALCON_REV(efx) >= FALCON_REV_B0 ? \ 494 (falcon_rev(efx) >= FALCON_REV_B0 ? \
495 EFX_QWORD_FIELD((qword), field##_B0) : \ 495 EFX_QWORD_FIELD((qword), field##_B0) : \
496 EFX_QWORD_FIELD((qword), field##_A1)) 496 EFX_QWORD_FIELD((qword), field##_A1))
497 497
@@ -501,8 +501,5 @@ typedef union efx_oword {
501#define DMA_ADDR_T_WIDTH (8 * sizeof(dma_addr_t)) 501#define DMA_ADDR_T_WIDTH (8 * sizeof(dma_addr_t))
502#define EFX_DMA_TYPE_WIDTH(width) \ 502#define EFX_DMA_TYPE_WIDTH(width) \
503 (((width) < DMA_ADDR_T_WIDTH) ? (width) : DMA_ADDR_T_WIDTH) 503 (((width) < DMA_ADDR_T_WIDTH) ? (width) : DMA_ADDR_T_WIDTH)
504#define EFX_DMA_MAX_MASK ((DMA_ADDR_T_WIDTH == 64) ? \
505 ~((u64) 0) : ~((u32) 0))
506#define EFX_DMA_MASK(mask) ((mask) & EFX_DMA_MAX_MASK)
507 504
508#endif /* EFX_BITFIELD_H */ 505#endif /* EFX_BITFIELD_H */
diff --git a/drivers/net/sfc/boards.c b/drivers/net/sfc/boards.c
index eecaa6d58584..7fc0328dc055 100644
--- a/drivers/net/sfc/boards.c
+++ b/drivers/net/sfc/boards.c
@@ -27,10 +27,8 @@ static void blink_led_timer(unsigned long context)
27 struct efx_blinker *bl = &efx->board_info.blinker; 27 struct efx_blinker *bl = &efx->board_info.blinker;
28 efx->board_info.set_fault_led(efx, bl->state); 28 efx->board_info.set_fault_led(efx, bl->state);
29 bl->state = !bl->state; 29 bl->state = !bl->state;
30 if (bl->resubmit) { 30 if (bl->resubmit)
31 bl->timer.expires = jiffies + BLINK_INTERVAL; 31 mod_timer(&bl->timer, jiffies + BLINK_INTERVAL);
32 add_timer(&bl->timer);
33 }
34} 32}
35 33
36static void board_blink(struct efx_nic *efx, int blink) 34static void board_blink(struct efx_nic *efx, int blink)
@@ -44,8 +42,7 @@ static void board_blink(struct efx_nic *efx, int blink)
44 blinker->state = 0; 42 blinker->state = 0;
45 setup_timer(&blinker->timer, blink_led_timer, 43 setup_timer(&blinker->timer, blink_led_timer,
46 (unsigned long)efx); 44 (unsigned long)efx);
47 blinker->timer.expires = jiffies + BLINK_INTERVAL; 45 mod_timer(&blinker->timer, jiffies + BLINK_INTERVAL);
48 add_timer(&blinker->timer);
49 } else { 46 } else {
50 blinker->resubmit = 0; 47 blinker->resubmit = 0;
51 if (blinker->timer.function) 48 if (blinker->timer.function)
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c
index 418f2e53a95b..449760642e31 100644
--- a/drivers/net/sfc/efx.c
+++ b/drivers/net/sfc/efx.c
@@ -199,11 +199,12 @@ static inline int efx_process_channel(struct efx_channel *channel, int rx_quota)
199 */ 199 */
200static inline void efx_channel_processed(struct efx_channel *channel) 200static inline void efx_channel_processed(struct efx_channel *channel)
201{ 201{
202 /* Write to EVQ_RPTR_REG. If a new event arrived in a race 202 /* The interrupt handler for this channel may set work_pending
203 * with finishing processing, a new interrupt will be raised. 203 * as soon as we acknowledge the events we've seen. Make sure
204 */ 204 * it's cleared before then. */
205 channel->work_pending = 0; 205 channel->work_pending = 0;
206 smp_wmb(); /* Ensure channel updated before any new interrupt. */ 206 smp_wmb();
207
207 falcon_eventq_read_ack(channel); 208 falcon_eventq_read_ack(channel);
208} 209}
209 210
@@ -265,7 +266,7 @@ void efx_process_channel_now(struct efx_channel *channel)
265 napi_disable(&channel->napi_str); 266 napi_disable(&channel->napi_str);
266 267
267 /* Poll the channel */ 268 /* Poll the channel */
268 (void) efx_process_channel(channel, efx->type->evq_size); 269 efx_process_channel(channel, efx->type->evq_size);
269 270
270 /* Ack the eventq. This may cause an interrupt to be generated 271 /* Ack the eventq. This may cause an interrupt to be generated
271 * when they are reenabled */ 272 * when they are reenabled */
@@ -317,26 +318,6 @@ static void efx_remove_eventq(struct efx_channel *channel)
317 * 318 *
318 *************************************************************************/ 319 *************************************************************************/
319 320
320/* Setup per-NIC RX buffer parameters.
321 * Calculate the rx buffer allocation parameters required to support
322 * the current MTU, including padding for header alignment and overruns.
323 */
324static void efx_calc_rx_buffer_params(struct efx_nic *efx)
325{
326 unsigned int order, len;
327
328 len = (max(EFX_PAGE_IP_ALIGN, NET_IP_ALIGN) +
329 EFX_MAX_FRAME_LEN(efx->net_dev->mtu) +
330 efx->type->rx_buffer_padding);
331
332 /* Calculate page-order */
333 for (order = 0; ((1u << order) * PAGE_SIZE) < len; ++order)
334 ;
335
336 efx->rx_buffer_len = len;
337 efx->rx_buffer_order = order;
338}
339
340static int efx_probe_channel(struct efx_channel *channel) 321static int efx_probe_channel(struct efx_channel *channel)
341{ 322{
342 struct efx_tx_queue *tx_queue; 323 struct efx_tx_queue *tx_queue;
@@ -387,7 +368,14 @@ static int efx_init_channels(struct efx_nic *efx)
387 struct efx_channel *channel; 368 struct efx_channel *channel;
388 int rc = 0; 369 int rc = 0;
389 370
390 efx_calc_rx_buffer_params(efx); 371 /* Calculate the rx buffer allocation parameters required to
372 * support the current MTU, including padding for header
373 * alignment and overruns.
374 */
375 efx->rx_buffer_len = (max(EFX_PAGE_IP_ALIGN, NET_IP_ALIGN) +
376 EFX_MAX_FRAME_LEN(efx->net_dev->mtu) +
377 efx->type->rx_buffer_padding);
378 efx->rx_buffer_order = get_order(efx->rx_buffer_len);
391 379
392 /* Initialise the channels */ 380 /* Initialise the channels */
393 efx_for_each_channel(channel, efx) { 381 efx_for_each_channel(channel, efx) {
@@ -440,9 +428,12 @@ static void efx_start_channel(struct efx_channel *channel)
440 netif_napi_add(channel->napi_dev, &channel->napi_str, 428 netif_napi_add(channel->napi_dev, &channel->napi_str,
441 efx_poll, napi_weight); 429 efx_poll, napi_weight);
442 430
431 /* The interrupt handler for this channel may set work_pending
432 * as soon as we enable it. Make sure it's cleared before
433 * then. Similarly, make sure it sees the enabled flag set. */
443 channel->work_pending = 0; 434 channel->work_pending = 0;
444 channel->enabled = 1; 435 channel->enabled = 1;
445 smp_wmb(); /* ensure channel updated before first interrupt */ 436 smp_wmb();
446 437
447 napi_enable(&channel->napi_str); 438 napi_enable(&channel->napi_str);
448 439
@@ -704,7 +695,7 @@ static void efx_stop_port(struct efx_nic *efx)
704 mutex_unlock(&efx->mac_lock); 695 mutex_unlock(&efx->mac_lock);
705 696
706 /* Serialise against efx_set_multicast_list() */ 697 /* Serialise against efx_set_multicast_list() */
707 if (NET_DEV_REGISTERED(efx)) { 698 if (efx_dev_registered(efx)) {
708 netif_tx_lock_bh(efx->net_dev); 699 netif_tx_lock_bh(efx->net_dev);
709 netif_tx_unlock_bh(efx->net_dev); 700 netif_tx_unlock_bh(efx->net_dev);
710 } 701 }
@@ -791,22 +782,23 @@ static int efx_init_io(struct efx_nic *efx)
791 efx->membase = ioremap_nocache(efx->membase_phys, 782 efx->membase = ioremap_nocache(efx->membase_phys,
792 efx->type->mem_map_size); 783 efx->type->mem_map_size);
793 if (!efx->membase) { 784 if (!efx->membase) {
794 EFX_ERR(efx, "could not map memory BAR %d at %lx+%x\n", 785 EFX_ERR(efx, "could not map memory BAR %d at %llx+%x\n",
795 efx->type->mem_bar, efx->membase_phys, 786 efx->type->mem_bar,
787 (unsigned long long)efx->membase_phys,
796 efx->type->mem_map_size); 788 efx->type->mem_map_size);
797 rc = -ENOMEM; 789 rc = -ENOMEM;
798 goto fail4; 790 goto fail4;
799 } 791 }
800 EFX_LOG(efx, "memory BAR %u at %lx+%x (virtual %p)\n", 792 EFX_LOG(efx, "memory BAR %u at %llx+%x (virtual %p)\n",
801 efx->type->mem_bar, efx->membase_phys, efx->type->mem_map_size, 793 efx->type->mem_bar, (unsigned long long)efx->membase_phys,
802 efx->membase); 794 efx->type->mem_map_size, efx->membase);
803 795
804 return 0; 796 return 0;
805 797
806 fail4: 798 fail4:
807 release_mem_region(efx->membase_phys, efx->type->mem_map_size); 799 release_mem_region(efx->membase_phys, efx->type->mem_map_size);
808 fail3: 800 fail3:
809 efx->membase_phys = 0UL; 801 efx->membase_phys = 0;
810 fail2: 802 fail2:
811 pci_disable_device(efx->pci_dev); 803 pci_disable_device(efx->pci_dev);
812 fail1: 804 fail1:
@@ -824,7 +816,7 @@ static void efx_fini_io(struct efx_nic *efx)
824 816
825 if (efx->membase_phys) { 817 if (efx->membase_phys) {
826 pci_release_region(efx->pci_dev, efx->type->mem_bar); 818 pci_release_region(efx->pci_dev, efx->type->mem_bar);
827 efx->membase_phys = 0UL; 819 efx->membase_phys = 0;
828 } 820 }
829 821
830 pci_disable_device(efx->pci_dev); 822 pci_disable_device(efx->pci_dev);
@@ -1043,7 +1035,7 @@ static void efx_start_all(struct efx_nic *efx)
1043 return; 1035 return;
1044 if ((efx->state != STATE_RUNNING) && (efx->state != STATE_INIT)) 1036 if ((efx->state != STATE_RUNNING) && (efx->state != STATE_INIT))
1045 return; 1037 return;
1046 if (NET_DEV_REGISTERED(efx) && !netif_running(efx->net_dev)) 1038 if (efx_dev_registered(efx) && !netif_running(efx->net_dev))
1047 return; 1039 return;
1048 1040
1049 /* Mark the port as enabled so port reconfigurations can start, then 1041 /* Mark the port as enabled so port reconfigurations can start, then
@@ -1073,9 +1065,8 @@ static void efx_flush_all(struct efx_nic *efx)
1073 cancel_delayed_work_sync(&efx->monitor_work); 1065 cancel_delayed_work_sync(&efx->monitor_work);
1074 1066
1075 /* Ensure that all RX slow refills are complete. */ 1067 /* Ensure that all RX slow refills are complete. */
1076 efx_for_each_rx_queue(rx_queue, efx) { 1068 efx_for_each_rx_queue(rx_queue, efx)
1077 cancel_delayed_work_sync(&rx_queue->work); 1069 cancel_delayed_work_sync(&rx_queue->work);
1078 }
1079 1070
1080 /* Stop scheduled port reconfigurations */ 1071 /* Stop scheduled port reconfigurations */
1081 cancel_work_sync(&efx->reconfigure_work); 1072 cancel_work_sync(&efx->reconfigure_work);
@@ -1101,9 +1092,10 @@ static void efx_stop_all(struct efx_nic *efx)
1101 falcon_disable_interrupts(efx); 1092 falcon_disable_interrupts(efx);
1102 if (efx->legacy_irq) 1093 if (efx->legacy_irq)
1103 synchronize_irq(efx->legacy_irq); 1094 synchronize_irq(efx->legacy_irq);
1104 efx_for_each_channel_with_interrupt(channel, efx) 1095 efx_for_each_channel_with_interrupt(channel, efx) {
1105 if (channel->irq) 1096 if (channel->irq)
1106 synchronize_irq(channel->irq); 1097 synchronize_irq(channel->irq);
1098 }
1107 1099
1108 /* Stop all NAPI processing and synchronous rx refills */ 1100 /* Stop all NAPI processing and synchronous rx refills */
1109 efx_for_each_channel(channel, efx) 1101 efx_for_each_channel(channel, efx)
@@ -1125,7 +1117,7 @@ static void efx_stop_all(struct efx_nic *efx)
1125 /* Stop the kernel transmit interface late, so the watchdog 1117 /* Stop the kernel transmit interface late, so the watchdog
1126 * timer isn't ticking over the flush */ 1118 * timer isn't ticking over the flush */
1127 efx_stop_queue(efx); 1119 efx_stop_queue(efx);
1128 if (NET_DEV_REGISTERED(efx)) { 1120 if (efx_dev_registered(efx)) {
1129 netif_tx_lock_bh(efx->net_dev); 1121 netif_tx_lock_bh(efx->net_dev);
1130 netif_tx_unlock_bh(efx->net_dev); 1122 netif_tx_unlock_bh(efx->net_dev);
1131 } 1123 }
@@ -1344,13 +1336,17 @@ static int efx_net_stop(struct net_device *net_dev)
1344 return 0; 1336 return 0;
1345} 1337}
1346 1338
1347/* Context: process, dev_base_lock held, non-blocking. */ 1339/* Context: process, dev_base_lock or RTNL held, non-blocking. */
1348static struct net_device_stats *efx_net_stats(struct net_device *net_dev) 1340static struct net_device_stats *efx_net_stats(struct net_device *net_dev)
1349{ 1341{
1350 struct efx_nic *efx = net_dev->priv; 1342 struct efx_nic *efx = net_dev->priv;
1351 struct efx_mac_stats *mac_stats = &efx->mac_stats; 1343 struct efx_mac_stats *mac_stats = &efx->mac_stats;
1352 struct net_device_stats *stats = &net_dev->stats; 1344 struct net_device_stats *stats = &net_dev->stats;
1353 1345
1346 /* Update stats if possible, but do not wait if another thread
1347 * is updating them (or resetting the NIC); slightly stale
1348 * stats are acceptable.
1349 */
1354 if (!spin_trylock(&efx->stats_lock)) 1350 if (!spin_trylock(&efx->stats_lock))
1355 return stats; 1351 return stats;
1356 if (efx->state == STATE_RUNNING) { 1352 if (efx->state == STATE_RUNNING) {
@@ -1494,7 +1490,7 @@ static void efx_set_multicast_list(struct net_device *net_dev)
1494static int efx_netdev_event(struct notifier_block *this, 1490static int efx_netdev_event(struct notifier_block *this,
1495 unsigned long event, void *ptr) 1491 unsigned long event, void *ptr)
1496{ 1492{
1497 struct net_device *net_dev = (struct net_device *)ptr; 1493 struct net_device *net_dev = ptr;
1498 1494
1499 if (net_dev->open == efx_net_open && event == NETDEV_CHANGENAME) { 1495 if (net_dev->open == efx_net_open && event == NETDEV_CHANGENAME) {
1500 struct efx_nic *efx = net_dev->priv; 1496 struct efx_nic *efx = net_dev->priv;
@@ -1563,7 +1559,7 @@ static void efx_unregister_netdev(struct efx_nic *efx)
1563 efx_for_each_tx_queue(tx_queue, efx) 1559 efx_for_each_tx_queue(tx_queue, efx)
1564 efx_release_tx_buffers(tx_queue); 1560 efx_release_tx_buffers(tx_queue);
1565 1561
1566 if (NET_DEV_REGISTERED(efx)) { 1562 if (efx_dev_registered(efx)) {
1567 strlcpy(efx->name, pci_name(efx->pci_dev), sizeof(efx->name)); 1563 strlcpy(efx->name, pci_name(efx->pci_dev), sizeof(efx->name));
1568 unregister_netdev(efx->net_dev); 1564 unregister_netdev(efx->net_dev);
1569 } 1565 }
@@ -1688,7 +1684,7 @@ static int efx_reset(struct efx_nic *efx)
1688 if (method == RESET_TYPE_DISABLE) { 1684 if (method == RESET_TYPE_DISABLE) {
1689 /* Reinitialise the device anyway so the driver unload sequence 1685 /* Reinitialise the device anyway so the driver unload sequence
1690 * can talk to the external SRAM */ 1686 * can talk to the external SRAM */
1691 (void) falcon_init_nic(efx); 1687 falcon_init_nic(efx);
1692 rc = -EIO; 1688 rc = -EIO;
1693 goto fail4; 1689 goto fail4;
1694 } 1690 }
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c
index b57cc68058c0..790db89db345 100644
--- a/drivers/net/sfc/falcon.c
+++ b/drivers/net/sfc/falcon.c
@@ -116,17 +116,8 @@ MODULE_PARM_DESC(rx_xon_thresh_bytes, "RX fifo XON threshold");
116 ************************************************************************** 116 **************************************************************************
117 */ 117 */
118 118
119/* DMA address mask (up to 46-bit, avoiding compiler warnings) 119/* DMA address mask */
120 * 120#define FALCON_DMA_MASK DMA_BIT_MASK(46)
121 * Note that it is possible to have a platform with 64-bit longs and
122 * 32-bit DMA addresses, or vice versa. EFX_DMA_MASK takes care of the
123 * platform DMA mask.
124 */
125#if BITS_PER_LONG == 64
126#define FALCON_DMA_MASK EFX_DMA_MASK(0x00003fffffffffffUL)
127#else
128#define FALCON_DMA_MASK EFX_DMA_MASK(0x00003fffffffffffULL)
129#endif
130 121
131/* TX DMA length mask (13-bit) */ 122/* TX DMA length mask (13-bit) */
132#define FALCON_TX_DMA_MASK (4096 - 1) 123#define FALCON_TX_DMA_MASK (4096 - 1)
@@ -145,7 +136,7 @@ MODULE_PARM_DESC(rx_xon_thresh_bytes, "RX fifo XON threshold");
145#define PCI_EXP_LNKSTA_LNK_WID_LBN 4 136#define PCI_EXP_LNKSTA_LNK_WID_LBN 4
146 137
147#define FALCON_IS_DUAL_FUNC(efx) \ 138#define FALCON_IS_DUAL_FUNC(efx) \
148 (FALCON_REV(efx) < FALCON_REV_B0) 139 (falcon_rev(efx) < FALCON_REV_B0)
149 140
150/************************************************************************** 141/**************************************************************************
151 * 142 *
@@ -465,7 +456,7 @@ int falcon_init_tx(struct efx_tx_queue *tx_queue)
465 TX_DESCQ_TYPE, 0, 456 TX_DESCQ_TYPE, 0,
466 TX_NON_IP_DROP_DIS_B0, 1); 457 TX_NON_IP_DROP_DIS_B0, 1);
467 458
468 if (FALCON_REV(efx) >= FALCON_REV_B0) { 459 if (falcon_rev(efx) >= FALCON_REV_B0) {
469 int csum = !(efx->net_dev->features & NETIF_F_IP_CSUM); 460 int csum = !(efx->net_dev->features & NETIF_F_IP_CSUM);
470 EFX_SET_OWORD_FIELD(tx_desc_ptr, TX_IP_CHKSM_DIS_B0, csum); 461 EFX_SET_OWORD_FIELD(tx_desc_ptr, TX_IP_CHKSM_DIS_B0, csum);
471 EFX_SET_OWORD_FIELD(tx_desc_ptr, TX_TCP_CHKSM_DIS_B0, csum); 462 EFX_SET_OWORD_FIELD(tx_desc_ptr, TX_TCP_CHKSM_DIS_B0, csum);
@@ -474,7 +465,7 @@ int falcon_init_tx(struct efx_tx_queue *tx_queue)
474 falcon_write_table(efx, &tx_desc_ptr, efx->type->txd_ptr_tbl_base, 465 falcon_write_table(efx, &tx_desc_ptr, efx->type->txd_ptr_tbl_base,
475 tx_queue->queue); 466 tx_queue->queue);
476 467
477 if (FALCON_REV(efx) < FALCON_REV_B0) { 468 if (falcon_rev(efx) < FALCON_REV_B0) {
478 efx_oword_t reg; 469 efx_oword_t reg;
479 470
480 BUG_ON(tx_queue->queue >= 128); /* HW limit */ 471 BUG_ON(tx_queue->queue >= 128); /* HW limit */
@@ -635,7 +626,7 @@ int falcon_init_rx(struct efx_rx_queue *rx_queue)
635 efx_oword_t rx_desc_ptr; 626 efx_oword_t rx_desc_ptr;
636 struct efx_nic *efx = rx_queue->efx; 627 struct efx_nic *efx = rx_queue->efx;
637 int rc; 628 int rc;
638 int is_b0 = FALCON_REV(efx) >= FALCON_REV_B0; 629 int is_b0 = falcon_rev(efx) >= FALCON_REV_B0;
639 int iscsi_digest_en = is_b0; 630 int iscsi_digest_en = is_b0;
640 631
641 EFX_LOG(efx, "RX queue %d ring in special buffers %d-%d\n", 632 EFX_LOG(efx, "RX queue %d ring in special buffers %d-%d\n",
@@ -742,8 +733,10 @@ void falcon_fini_rx(struct efx_rx_queue *rx_queue)
742 continue; 733 continue;
743 break; 734 break;
744 } 735 }
745 if (rc) 736 if (rc) {
746 EFX_ERR(efx, "failed to flush rx queue %d\n", rx_queue->queue); 737 EFX_ERR(efx, "failed to flush rx queue %d\n", rx_queue->queue);
738 efx_schedule_reset(efx, RESET_TYPE_INVISIBLE);
739 }
747 740
748 /* Remove RX descriptor ring from card */ 741 /* Remove RX descriptor ring from card */
749 EFX_ZERO_OWORD(rx_desc_ptr); 742 EFX_ZERO_OWORD(rx_desc_ptr);
@@ -822,10 +815,10 @@ static inline void falcon_handle_tx_event(struct efx_channel *channel,
822 tx_ev_q_label = EFX_QWORD_FIELD(*event, TX_EV_Q_LABEL); 815 tx_ev_q_label = EFX_QWORD_FIELD(*event, TX_EV_Q_LABEL);
823 tx_queue = &efx->tx_queue[tx_ev_q_label]; 816 tx_queue = &efx->tx_queue[tx_ev_q_label];
824 817
825 if (NET_DEV_REGISTERED(efx)) 818 if (efx_dev_registered(efx))
826 netif_tx_lock(efx->net_dev); 819 netif_tx_lock(efx->net_dev);
827 falcon_notify_tx_desc(tx_queue); 820 falcon_notify_tx_desc(tx_queue);
828 if (NET_DEV_REGISTERED(efx)) 821 if (efx_dev_registered(efx))
829 netif_tx_unlock(efx->net_dev); 822 netif_tx_unlock(efx->net_dev);
830 } else if (EFX_QWORD_FIELD(*event, TX_EV_PKT_ERR) && 823 } else if (EFX_QWORD_FIELD(*event, TX_EV_PKT_ERR) &&
831 EFX_WORKAROUND_10727(efx)) { 824 EFX_WORKAROUND_10727(efx)) {
@@ -884,7 +877,7 @@ static void falcon_handle_rx_not_ok(struct efx_rx_queue *rx_queue,
884 RX_EV_TCP_UDP_CHKSUM_ERR); 877 RX_EV_TCP_UDP_CHKSUM_ERR);
885 rx_ev_eth_crc_err = EFX_QWORD_FIELD(*event, RX_EV_ETH_CRC_ERR); 878 rx_ev_eth_crc_err = EFX_QWORD_FIELD(*event, RX_EV_ETH_CRC_ERR);
886 rx_ev_frm_trunc = EFX_QWORD_FIELD(*event, RX_EV_FRM_TRUNC); 879 rx_ev_frm_trunc = EFX_QWORD_FIELD(*event, RX_EV_FRM_TRUNC);
887 rx_ev_drib_nib = ((FALCON_REV(efx) >= FALCON_REV_B0) ? 880 rx_ev_drib_nib = ((falcon_rev(efx) >= FALCON_REV_B0) ?
888 0 : EFX_QWORD_FIELD(*event, RX_EV_DRIB_NIB)); 881 0 : EFX_QWORD_FIELD(*event, RX_EV_DRIB_NIB));
889 rx_ev_pause_frm = EFX_QWORD_FIELD(*event, RX_EV_PAUSE_FRM_ERR); 882 rx_ev_pause_frm = EFX_QWORD_FIELD(*event, RX_EV_PAUSE_FRM_ERR);
890 883
@@ -1065,7 +1058,7 @@ static void falcon_handle_global_event(struct efx_channel *channel,
1065 EFX_QWORD_FIELD(*event, XG_PHY_INTR)) 1058 EFX_QWORD_FIELD(*event, XG_PHY_INTR))
1066 is_phy_event = 1; 1059 is_phy_event = 1;
1067 1060
1068 if ((FALCON_REV(efx) >= FALCON_REV_B0) && 1061 if ((falcon_rev(efx) >= FALCON_REV_B0) &&
1069 EFX_OWORD_FIELD(*event, XG_MNT_INTR_B0)) 1062 EFX_OWORD_FIELD(*event, XG_MNT_INTR_B0))
1070 is_phy_event = 1; 1063 is_phy_event = 1;
1071 1064
@@ -1405,7 +1398,7 @@ static inline void falcon_irq_ack_a1(struct efx_nic *efx)
1405static irqreturn_t falcon_fatal_interrupt(struct efx_nic *efx) 1398static irqreturn_t falcon_fatal_interrupt(struct efx_nic *efx)
1406{ 1399{
1407 struct falcon_nic_data *nic_data = efx->nic_data; 1400 struct falcon_nic_data *nic_data = efx->nic_data;
1408 efx_oword_t *int_ker = (efx_oword_t *) efx->irq_status.addr; 1401 efx_oword_t *int_ker = efx->irq_status.addr;
1409 efx_oword_t fatal_intr; 1402 efx_oword_t fatal_intr;
1410 int error, mem_perr; 1403 int error, mem_perr;
1411 static int n_int_errors; 1404 static int n_int_errors;
@@ -1451,8 +1444,8 @@ out:
1451 */ 1444 */
1452static irqreturn_t falcon_legacy_interrupt_b0(int irq, void *dev_id) 1445static irqreturn_t falcon_legacy_interrupt_b0(int irq, void *dev_id)
1453{ 1446{
1454 struct efx_nic *efx = (struct efx_nic *)dev_id; 1447 struct efx_nic *efx = dev_id;
1455 efx_oword_t *int_ker = (efx_oword_t *) efx->irq_status.addr; 1448 efx_oword_t *int_ker = efx->irq_status.addr;
1456 struct efx_channel *channel; 1449 struct efx_channel *channel;
1457 efx_dword_t reg; 1450 efx_dword_t reg;
1458 u32 queues; 1451 u32 queues;
@@ -1489,8 +1482,8 @@ static irqreturn_t falcon_legacy_interrupt_b0(int irq, void *dev_id)
1489 1482
1490static irqreturn_t falcon_legacy_interrupt_a1(int irq, void *dev_id) 1483static irqreturn_t falcon_legacy_interrupt_a1(int irq, void *dev_id)
1491{ 1484{
1492 struct efx_nic *efx = (struct efx_nic *)dev_id; 1485 struct efx_nic *efx = dev_id;
1493 efx_oword_t *int_ker = (efx_oword_t *) efx->irq_status.addr; 1486 efx_oword_t *int_ker = efx->irq_status.addr;
1494 struct efx_channel *channel; 1487 struct efx_channel *channel;
1495 int syserr; 1488 int syserr;
1496 int queues; 1489 int queues;
@@ -1542,9 +1535,9 @@ static irqreturn_t falcon_legacy_interrupt_a1(int irq, void *dev_id)
1542 */ 1535 */
1543static irqreturn_t falcon_msi_interrupt(int irq, void *dev_id) 1536static irqreturn_t falcon_msi_interrupt(int irq, void *dev_id)
1544{ 1537{
1545 struct efx_channel *channel = (struct efx_channel *)dev_id; 1538 struct efx_channel *channel = dev_id;
1546 struct efx_nic *efx = channel->efx; 1539 struct efx_nic *efx = channel->efx;
1547 efx_oword_t *int_ker = (efx_oword_t *) efx->irq_status.addr; 1540 efx_oword_t *int_ker = efx->irq_status.addr;
1548 int syserr; 1541 int syserr;
1549 1542
1550 efx->last_irq_cpu = raw_smp_processor_id(); 1543 efx->last_irq_cpu = raw_smp_processor_id();
@@ -1572,7 +1565,7 @@ static void falcon_setup_rss_indir_table(struct efx_nic *efx)
1572 unsigned long offset; 1565 unsigned long offset;
1573 efx_dword_t dword; 1566 efx_dword_t dword;
1574 1567
1575 if (FALCON_REV(efx) < FALCON_REV_B0) 1568 if (falcon_rev(efx) < FALCON_REV_B0)
1576 return; 1569 return;
1577 1570
1578 for (offset = RX_RSS_INDIR_TBL_B0; 1571 for (offset = RX_RSS_INDIR_TBL_B0;
@@ -1595,7 +1588,7 @@ int falcon_init_interrupt(struct efx_nic *efx)
1595 1588
1596 if (!EFX_INT_MODE_USE_MSI(efx)) { 1589 if (!EFX_INT_MODE_USE_MSI(efx)) {
1597 irq_handler_t handler; 1590 irq_handler_t handler;
1598 if (FALCON_REV(efx) >= FALCON_REV_B0) 1591 if (falcon_rev(efx) >= FALCON_REV_B0)
1599 handler = falcon_legacy_interrupt_b0; 1592 handler = falcon_legacy_interrupt_b0;
1600 else 1593 else
1601 handler = falcon_legacy_interrupt_a1; 1594 handler = falcon_legacy_interrupt_a1;
@@ -1636,12 +1629,13 @@ void falcon_fini_interrupt(struct efx_nic *efx)
1636 efx_oword_t reg; 1629 efx_oword_t reg;
1637 1630
1638 /* Disable MSI/MSI-X interrupts */ 1631 /* Disable MSI/MSI-X interrupts */
1639 efx_for_each_channel_with_interrupt(channel, efx) 1632 efx_for_each_channel_with_interrupt(channel, efx) {
1640 if (channel->irq) 1633 if (channel->irq)
1641 free_irq(channel->irq, channel); 1634 free_irq(channel->irq, channel);
1635 }
1642 1636
1643 /* ACK legacy interrupt */ 1637 /* ACK legacy interrupt */
1644 if (FALCON_REV(efx) >= FALCON_REV_B0) 1638 if (falcon_rev(efx) >= FALCON_REV_B0)
1645 falcon_read(efx, &reg, INT_ISR0_B0); 1639 falcon_read(efx, &reg, INT_ISR0_B0);
1646 else 1640 else
1647 falcon_irq_ack_a1(efx); 1641 falcon_irq_ack_a1(efx);
@@ -1732,7 +1726,7 @@ void falcon_drain_tx_fifo(struct efx_nic *efx)
1732 efx_oword_t temp; 1726 efx_oword_t temp;
1733 int count; 1727 int count;
1734 1728
1735 if ((FALCON_REV(efx) < FALCON_REV_B0) || 1729 if ((falcon_rev(efx) < FALCON_REV_B0) ||
1736 (efx->loopback_mode != LOOPBACK_NONE)) 1730 (efx->loopback_mode != LOOPBACK_NONE))
1737 return; 1731 return;
1738 1732
@@ -1785,7 +1779,7 @@ void falcon_deconfigure_mac_wrapper(struct efx_nic *efx)
1785{ 1779{
1786 efx_oword_t temp; 1780 efx_oword_t temp;
1787 1781
1788 if (FALCON_REV(efx) < FALCON_REV_B0) 1782 if (falcon_rev(efx) < FALCON_REV_B0)
1789 return; 1783 return;
1790 1784
1791 /* Isolate the MAC -> RX */ 1785 /* Isolate the MAC -> RX */
@@ -1823,7 +1817,7 @@ void falcon_reconfigure_mac_wrapper(struct efx_nic *efx)
1823 MAC_SPEED, link_speed); 1817 MAC_SPEED, link_speed);
1824 /* On B0, MAC backpressure can be disabled and packets get 1818 /* On B0, MAC backpressure can be disabled and packets get
1825 * discarded. */ 1819 * discarded. */
1826 if (FALCON_REV(efx) >= FALCON_REV_B0) { 1820 if (falcon_rev(efx) >= FALCON_REV_B0) {
1827 EFX_SET_OWORD_FIELD(reg, TXFIFO_DRAIN_EN_B0, 1821 EFX_SET_OWORD_FIELD(reg, TXFIFO_DRAIN_EN_B0,
1828 !efx->link_up); 1822 !efx->link_up);
1829 } 1823 }
@@ -1841,7 +1835,7 @@ void falcon_reconfigure_mac_wrapper(struct efx_nic *efx)
1841 EFX_SET_OWORD_FIELD_VER(efx, reg, RX_XOFF_MAC_EN, tx_fc); 1835 EFX_SET_OWORD_FIELD_VER(efx, reg, RX_XOFF_MAC_EN, tx_fc);
1842 1836
1843 /* Unisolate the MAC -> RX */ 1837 /* Unisolate the MAC -> RX */
1844 if (FALCON_REV(efx) >= FALCON_REV_B0) 1838 if (falcon_rev(efx) >= FALCON_REV_B0)
1845 EFX_SET_OWORD_FIELD(reg, RX_INGR_EN_B0, 1); 1839 EFX_SET_OWORD_FIELD(reg, RX_INGR_EN_B0, 1);
1846 falcon_write(efx, &reg, RX_CFG_REG_KER); 1840 falcon_write(efx, &reg, RX_CFG_REG_KER);
1847} 1841}
@@ -1856,7 +1850,7 @@ int falcon_dma_stats(struct efx_nic *efx, unsigned int done_offset)
1856 return 0; 1850 return 0;
1857 1851
1858 /* Statistics fetch will fail if the MAC is in TX drain */ 1852 /* Statistics fetch will fail if the MAC is in TX drain */
1859 if (FALCON_REV(efx) >= FALCON_REV_B0) { 1853 if (falcon_rev(efx) >= FALCON_REV_B0) {
1860 efx_oword_t temp; 1854 efx_oword_t temp;
1861 falcon_read(efx, &temp, MAC0_CTRL_REG_KER); 1855 falcon_read(efx, &temp, MAC0_CTRL_REG_KER);
1862 if (EFX_OWORD_FIELD(temp, TXFIFO_DRAIN_EN_B0)) 1856 if (EFX_OWORD_FIELD(temp, TXFIFO_DRAIN_EN_B0))
@@ -1940,7 +1934,7 @@ static int falcon_gmii_wait(struct efx_nic *efx)
1940static void falcon_mdio_write(struct net_device *net_dev, int phy_id, 1934static void falcon_mdio_write(struct net_device *net_dev, int phy_id,
1941 int addr, int value) 1935 int addr, int value)
1942{ 1936{
1943 struct efx_nic *efx = (struct efx_nic *)net_dev->priv; 1937 struct efx_nic *efx = net_dev->priv;
1944 unsigned int phy_id2 = phy_id & FALCON_PHY_ID_ID_MASK; 1938 unsigned int phy_id2 = phy_id & FALCON_PHY_ID_ID_MASK;
1945 efx_oword_t reg; 1939 efx_oword_t reg;
1946 1940
@@ -2008,7 +2002,7 @@ static void falcon_mdio_write(struct net_device *net_dev, int phy_id,
2008 * could be read, -1 will be returned. */ 2002 * could be read, -1 will be returned. */
2009static int falcon_mdio_read(struct net_device *net_dev, int phy_id, int addr) 2003static int falcon_mdio_read(struct net_device *net_dev, int phy_id, int addr)
2010{ 2004{
2011 struct efx_nic *efx = (struct efx_nic *)net_dev->priv; 2005 struct efx_nic *efx = net_dev->priv;
2012 unsigned int phy_addr = phy_id & FALCON_PHY_ID_ID_MASK; 2006 unsigned int phy_addr = phy_id & FALCON_PHY_ID_ID_MASK;
2013 efx_oword_t reg; 2007 efx_oword_t reg;
2014 int value = -1; 2008 int value = -1;
@@ -2113,7 +2107,7 @@ int falcon_probe_port(struct efx_nic *efx)
2113 falcon_init_mdio(&efx->mii); 2107 falcon_init_mdio(&efx->mii);
2114 2108
2115 /* Hardware flow ctrl. FalconA RX FIFO too small for pause generation */ 2109 /* Hardware flow ctrl. FalconA RX FIFO too small for pause generation */
2116 if (FALCON_REV(efx) >= FALCON_REV_B0) 2110 if (falcon_rev(efx) >= FALCON_REV_B0)
2117 efx->flow_control = EFX_FC_RX | EFX_FC_TX; 2111 efx->flow_control = EFX_FC_RX | EFX_FC_TX;
2118 else 2112 else
2119 efx->flow_control = EFX_FC_RX; 2113 efx->flow_control = EFX_FC_RX;
@@ -2373,7 +2367,7 @@ static int falcon_probe_nic_variant(struct efx_nic *efx)
2373 return -ENODEV; 2367 return -ENODEV;
2374 } 2368 }
2375 2369
2376 switch (FALCON_REV(efx)) { 2370 switch (falcon_rev(efx)) {
2377 case FALCON_REV_A0: 2371 case FALCON_REV_A0:
2378 case 0xff: 2372 case 0xff:
2379 EFX_ERR(efx, "Falcon rev A0 not supported\n"); 2373 EFX_ERR(efx, "Falcon rev A0 not supported\n");
@@ -2399,7 +2393,7 @@ static int falcon_probe_nic_variant(struct efx_nic *efx)
2399 break; 2393 break;
2400 2394
2401 default: 2395 default:
2402 EFX_ERR(efx, "Unknown Falcon rev %d\n", FALCON_REV(efx)); 2396 EFX_ERR(efx, "Unknown Falcon rev %d\n", falcon_rev(efx));
2403 return -ENODEV; 2397 return -ENODEV;
2404 } 2398 }
2405 2399
@@ -2419,7 +2413,7 @@ int falcon_probe_nic(struct efx_nic *efx)
2419 2413
2420 /* Allocate storage for hardware specific data */ 2414 /* Allocate storage for hardware specific data */
2421 nic_data = kzalloc(sizeof(*nic_data), GFP_KERNEL); 2415 nic_data = kzalloc(sizeof(*nic_data), GFP_KERNEL);
2422 efx->nic_data = (void *) nic_data; 2416 efx->nic_data = nic_data;
2423 2417
2424 /* Determine number of ports etc. */ 2418 /* Determine number of ports etc. */
2425 rc = falcon_probe_nic_variant(efx); 2419 rc = falcon_probe_nic_variant(efx);
@@ -2489,13 +2483,10 @@ int falcon_probe_nic(struct efx_nic *efx)
2489 */ 2483 */
2490int falcon_init_nic(struct efx_nic *efx) 2484int falcon_init_nic(struct efx_nic *efx)
2491{ 2485{
2492 struct falcon_nic_data *data;
2493 efx_oword_t temp; 2486 efx_oword_t temp;
2494 unsigned thresh; 2487 unsigned thresh;
2495 int rc; 2488 int rc;
2496 2489
2497 data = (struct falcon_nic_data *)efx->nic_data;
2498
2499 /* Set up the address region register. This is only needed 2490 /* Set up the address region register. This is only needed
2500 * for the B0 FPGA, but since we are just pushing in the 2491 * for the B0 FPGA, but since we are just pushing in the
2501 * reset defaults this may as well be unconditional. */ 2492 * reset defaults this may as well be unconditional. */
@@ -2562,7 +2553,7 @@ int falcon_init_nic(struct efx_nic *efx)
2562 2553
2563 /* Set number of RSS queues for receive path. */ 2554 /* Set number of RSS queues for receive path. */
2564 falcon_read(efx, &temp, RX_FILTER_CTL_REG); 2555 falcon_read(efx, &temp, RX_FILTER_CTL_REG);
2565 if (FALCON_REV(efx) >= FALCON_REV_B0) 2556 if (falcon_rev(efx) >= FALCON_REV_B0)
2566 EFX_SET_OWORD_FIELD(temp, NUM_KER, 0); 2557 EFX_SET_OWORD_FIELD(temp, NUM_KER, 0);
2567 else 2558 else
2568 EFX_SET_OWORD_FIELD(temp, NUM_KER, efx->rss_queues - 1); 2559 EFX_SET_OWORD_FIELD(temp, NUM_KER, efx->rss_queues - 1);
@@ -2600,7 +2591,7 @@ int falcon_init_nic(struct efx_nic *efx)
2600 /* Prefetch threshold 2 => fetch when descriptor cache half empty */ 2591 /* Prefetch threshold 2 => fetch when descriptor cache half empty */
2601 EFX_SET_OWORD_FIELD(temp, TX_PREF_THRESHOLD, 2); 2592 EFX_SET_OWORD_FIELD(temp, TX_PREF_THRESHOLD, 2);
2602 /* Squash TX of packets of 16 bytes or less */ 2593 /* Squash TX of packets of 16 bytes or less */
2603 if (FALCON_REV(efx) >= FALCON_REV_B0 && EFX_WORKAROUND_9141(efx)) 2594 if (falcon_rev(efx) >= FALCON_REV_B0 && EFX_WORKAROUND_9141(efx))
2604 EFX_SET_OWORD_FIELD(temp, TX_FLUSH_MIN_LEN_EN_B0, 1); 2595 EFX_SET_OWORD_FIELD(temp, TX_FLUSH_MIN_LEN_EN_B0, 1);
2605 falcon_write(efx, &temp, TX_CFG2_REG_KER); 2596 falcon_write(efx, &temp, TX_CFG2_REG_KER);
2606 2597
@@ -2617,7 +2608,7 @@ int falcon_init_nic(struct efx_nic *efx)
2617 if (EFX_WORKAROUND_7575(efx)) 2608 if (EFX_WORKAROUND_7575(efx))
2618 EFX_SET_OWORD_FIELD_VER(efx, temp, RX_USR_BUF_SIZE, 2609 EFX_SET_OWORD_FIELD_VER(efx, temp, RX_USR_BUF_SIZE,
2619 (3 * 4096) / 32); 2610 (3 * 4096) / 32);
2620 if (FALCON_REV(efx) >= FALCON_REV_B0) 2611 if (falcon_rev(efx) >= FALCON_REV_B0)
2621 EFX_SET_OWORD_FIELD(temp, RX_INGR_EN_B0, 1); 2612 EFX_SET_OWORD_FIELD(temp, RX_INGR_EN_B0, 1);
2622 2613
2623 /* RX FIFO flow control thresholds */ 2614 /* RX FIFO flow control thresholds */
@@ -2633,7 +2624,7 @@ int falcon_init_nic(struct efx_nic *efx)
2633 falcon_write(efx, &temp, RX_CFG_REG_KER); 2624 falcon_write(efx, &temp, RX_CFG_REG_KER);
2634 2625
2635 /* Set destination of both TX and RX Flush events */ 2626 /* Set destination of both TX and RX Flush events */
2636 if (FALCON_REV(efx) >= FALCON_REV_B0) { 2627 if (falcon_rev(efx) >= FALCON_REV_B0) {
2637 EFX_POPULATE_OWORD_1(temp, FLS_EVQ_ID, 0); 2628 EFX_POPULATE_OWORD_1(temp, FLS_EVQ_ID, 0);
2638 falcon_write(efx, &temp, DP_CTRL_REG); 2629 falcon_write(efx, &temp, DP_CTRL_REG);
2639 } 2630 }
@@ -2647,7 +2638,7 @@ void falcon_remove_nic(struct efx_nic *efx)
2647 2638
2648 falcon_free_buffer(efx, &efx->irq_status); 2639 falcon_free_buffer(efx, &efx->irq_status);
2649 2640
2650 (void) falcon_reset_hw(efx, RESET_TYPE_ALL); 2641 falcon_reset_hw(efx, RESET_TYPE_ALL);
2651 2642
2652 /* Release the second function after the reset */ 2643 /* Release the second function after the reset */
2653 if (nic_data->pci_dev2) { 2644 if (nic_data->pci_dev2) {
diff --git a/drivers/net/sfc/falcon.h b/drivers/net/sfc/falcon.h
index 6117403b0c03..492f9bc28840 100644
--- a/drivers/net/sfc/falcon.h
+++ b/drivers/net/sfc/falcon.h
@@ -23,7 +23,10 @@ enum falcon_revision {
23 FALCON_REV_B0 = 2, 23 FALCON_REV_B0 = 2,
24}; 24};
25 25
26#define FALCON_REV(efx) ((efx)->pci_dev->revision) 26static inline int falcon_rev(struct efx_nic *efx)
27{
28 return efx->pci_dev->revision;
29}
27 30
28extern struct efx_nic_type falcon_a_nic_type; 31extern struct efx_nic_type falcon_a_nic_type;
29extern struct efx_nic_type falcon_b_nic_type; 32extern struct efx_nic_type falcon_b_nic_type;
diff --git a/drivers/net/sfc/falcon_hwdefs.h b/drivers/net/sfc/falcon_hwdefs.h
index 06e2d68fc3d1..6d003114eeab 100644
--- a/drivers/net/sfc/falcon_hwdefs.h
+++ b/drivers/net/sfc/falcon_hwdefs.h
@@ -1125,7 +1125,7 @@ struct falcon_nvconfig_board_v2 {
1125 u8 port1_phy_type; 1125 u8 port1_phy_type;
1126 __le16 asic_sub_revision; 1126 __le16 asic_sub_revision;
1127 __le16 board_revision; 1127 __le16 board_revision;
1128} __attribute__ ((packed)); 1128} __packed;
1129 1129
1130#define NVCONFIG_BASE 0x300 1130#define NVCONFIG_BASE 0x300
1131#define NVCONFIG_BOARD_MAGIC_NUM 0xFA1C 1131#define NVCONFIG_BOARD_MAGIC_NUM 0xFA1C
@@ -1144,6 +1144,6 @@ struct falcon_nvconfig {
1144 __le16 board_struct_ver; 1144 __le16 board_struct_ver;
1145 __le16 board_checksum; 1145 __le16 board_checksum;
1146 struct falcon_nvconfig_board_v2 board_v2; 1146 struct falcon_nvconfig_board_v2 board_v2;
1147} __attribute__ ((packed)); 1147} __packed;
1148 1148
1149#endif /* EFX_FALCON_HWDEFS_H */ 1149#endif /* EFX_FALCON_HWDEFS_H */
diff --git a/drivers/net/sfc/falcon_io.h b/drivers/net/sfc/falcon_io.h
index ea08184ddfa9..6670cdfc41ab 100644
--- a/drivers/net/sfc/falcon_io.h
+++ b/drivers/net/sfc/falcon_io.h
@@ -56,14 +56,27 @@
56#define FALCON_USE_QWORD_IO 1 56#define FALCON_USE_QWORD_IO 1
57#endif 57#endif
58 58
59#define _falcon_writeq(efx, value, reg) \ 59#ifdef FALCON_USE_QWORD_IO
60 __raw_writeq((__force u64) (value), (efx)->membase + (reg)) 60static inline void _falcon_writeq(struct efx_nic *efx, __le64 value,
61#define _falcon_writel(efx, value, reg) \ 61 unsigned int reg)
62 __raw_writel((__force u32) (value), (efx)->membase + (reg)) 62{
63#define _falcon_readq(efx, reg) \ 63 __raw_writeq((__force u64)value, efx->membase + reg);
64 ((__force __le64) __raw_readq((efx)->membase + (reg))) 64}
65#define _falcon_readl(efx, reg) \ 65static inline __le64 _falcon_readq(struct efx_nic *efx, unsigned int reg)
66 ((__force __le32) __raw_readl((efx)->membase + (reg))) 66{
67 return (__force __le64)__raw_readq(efx->membase + reg);
68}
69#endif
70
71static inline void _falcon_writel(struct efx_nic *efx, __le32 value,
72 unsigned int reg)
73{
74 __raw_writel((__force u32)value, efx->membase + reg);
75}
76static inline __le32 _falcon_readl(struct efx_nic *efx, unsigned int reg)
77{
78 return (__force __le32)__raw_readl(efx->membase + reg);
79}
67 80
68/* Writes to a normal 16-byte Falcon register, locking as appropriate. */ 81/* Writes to a normal 16-byte Falcon register, locking as appropriate. */
69static inline void falcon_write(struct efx_nic *efx, efx_oword_t *value, 82static inline void falcon_write(struct efx_nic *efx, efx_oword_t *value,
diff --git a/drivers/net/sfc/falcon_xmac.c b/drivers/net/sfc/falcon_xmac.c
index a74b7931a3c4..55c0d9760be8 100644
--- a/drivers/net/sfc/falcon_xmac.c
+++ b/drivers/net/sfc/falcon_xmac.c
@@ -221,7 +221,7 @@ static int falcon_xgmii_status(struct efx_nic *efx)
221{ 221{
222 efx_dword_t reg; 222 efx_dword_t reg;
223 223
224 if (FALCON_REV(efx) < FALCON_REV_B0) 224 if (falcon_rev(efx) < FALCON_REV_B0)
225 return 1; 225 return 1;
226 226
227 /* The ISR latches, so clear it and re-read */ 227 /* The ISR latches, so clear it and re-read */
@@ -241,7 +241,7 @@ static void falcon_mask_status_intr(struct efx_nic *efx, int enable)
241{ 241{
242 efx_dword_t reg; 242 efx_dword_t reg;
243 243
244 if ((FALCON_REV(efx) < FALCON_REV_B0) || LOOPBACK_INTERNAL(efx)) 244 if ((falcon_rev(efx) < FALCON_REV_B0) || LOOPBACK_INTERNAL(efx))
245 return; 245 return;
246 246
247 /* Flush the ISR */ 247 /* Flush the ISR */
@@ -454,12 +454,12 @@ static int falcon_check_xaui_link_up(struct efx_nic *efx)
454 454
455 EFX_LOG(efx, "%s Clobbering XAUI (%d tries left).\n", 455 EFX_LOG(efx, "%s Clobbering XAUI (%d tries left).\n",
456 __func__, tries); 456 __func__, tries);
457 (void) falcon_reset_xaui(efx); 457 falcon_reset_xaui(efx);
458 udelay(200); 458 udelay(200);
459 tries--; 459 tries--;
460 } 460 }
461 461
462 EFX_ERR(efx, "Failed to bring XAUI link back up in %d tries!\n", 462 EFX_LOG(efx, "Failed to bring XAUI link back up in %d tries!\n",
463 max_tries); 463 max_tries);
464 return 0; 464 return 0;
465} 465}
@@ -572,7 +572,7 @@ int falcon_check_xmac(struct efx_nic *efx)
572 xaui_link_ok = falcon_xaui_link_ok(efx); 572 xaui_link_ok = falcon_xaui_link_ok(efx);
573 573
574 if (EFX_WORKAROUND_5147(efx) && !xaui_link_ok) 574 if (EFX_WORKAROUND_5147(efx) && !xaui_link_ok)
575 (void) falcon_reset_xaui(efx); 575 falcon_reset_xaui(efx);
576 576
577 /* Call the PHY check_hw routine */ 577 /* Call the PHY check_hw routine */
578 rc = efx->phy_op->check_hw(efx); 578 rc = efx->phy_op->check_hw(efx);
@@ -639,7 +639,7 @@ int falcon_xmac_set_pause(struct efx_nic *efx, enum efx_fc_type flow_control)
639 reset = ((flow_control & EFX_FC_TX) && 639 reset = ((flow_control & EFX_FC_TX) &&
640 !(efx->flow_control & EFX_FC_TX)); 640 !(efx->flow_control & EFX_FC_TX));
641 if (EFX_WORKAROUND_11482(efx) && reset) { 641 if (EFX_WORKAROUND_11482(efx) && reset) {
642 if (FALCON_REV(efx) >= FALCON_REV_B0) { 642 if (falcon_rev(efx) >= FALCON_REV_B0) {
643 /* Recover by resetting the EM block */ 643 /* Recover by resetting the EM block */
644 if (efx->link_up) 644 if (efx->link_up)
645 falcon_drain_tx_fifo(efx); 645 falcon_drain_tx_fifo(efx);
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h
index 59f261b4171f..5e20e7551dae 100644
--- a/drivers/net/sfc/net_driver.h
+++ b/drivers/net/sfc/net_driver.h
@@ -42,7 +42,7 @@
42#ifndef EFX_DRIVER_NAME 42#ifndef EFX_DRIVER_NAME
43#define EFX_DRIVER_NAME "sfc" 43#define EFX_DRIVER_NAME "sfc"
44#endif 44#endif
45#define EFX_DRIVER_VERSION "2.2.0136" 45#define EFX_DRIVER_VERSION "2.2"
46 46
47#ifdef EFX_ENABLE_DEBUG 47#ifdef EFX_ENABLE_DEBUG
48#define EFX_BUG_ON_PARANOID(x) BUG_ON(x) 48#define EFX_BUG_ON_PARANOID(x) BUG_ON(x)
@@ -52,28 +52,19 @@
52#define EFX_WARN_ON_PARANOID(x) do {} while (0) 52#define EFX_WARN_ON_PARANOID(x) do {} while (0)
53#endif 53#endif
54 54
55#define NET_DEV_REGISTERED(efx) \
56 ((efx)->net_dev->reg_state == NETREG_REGISTERED)
57
58/* Include net device name in log messages if it has been registered.
59 * Use efx->name not efx->net_dev->name so that races with (un)registration
60 * are harmless.
61 */
62#define NET_DEV_NAME(efx) (NET_DEV_REGISTERED(efx) ? (efx)->name : "")
63
64/* Un-rate-limited logging */ 55/* Un-rate-limited logging */
65#define EFX_ERR(efx, fmt, args...) \ 56#define EFX_ERR(efx, fmt, args...) \
66dev_err(&((efx)->pci_dev->dev), "ERR: %s " fmt, NET_DEV_NAME(efx), ##args) 57dev_err(&((efx)->pci_dev->dev), "ERR: %s " fmt, efx_dev_name(efx), ##args)
67 58
68#define EFX_INFO(efx, fmt, args...) \ 59#define EFX_INFO(efx, fmt, args...) \
69dev_info(&((efx)->pci_dev->dev), "INFO: %s " fmt, NET_DEV_NAME(efx), ##args) 60dev_info(&((efx)->pci_dev->dev), "INFO: %s " fmt, efx_dev_name(efx), ##args)
70 61
71#ifdef EFX_ENABLE_DEBUG 62#ifdef EFX_ENABLE_DEBUG
72#define EFX_LOG(efx, fmt, args...) \ 63#define EFX_LOG(efx, fmt, args...) \
73dev_info(&((efx)->pci_dev->dev), "DBG: %s " fmt, NET_DEV_NAME(efx), ##args) 64dev_info(&((efx)->pci_dev->dev), "DBG: %s " fmt, efx_dev_name(efx), ##args)
74#else 65#else
75#define EFX_LOG(efx, fmt, args...) \ 66#define EFX_LOG(efx, fmt, args...) \
76dev_dbg(&((efx)->pci_dev->dev), "DBG: %s " fmt, NET_DEV_NAME(efx), ##args) 67dev_dbg(&((efx)->pci_dev->dev), "DBG: %s " fmt, efx_dev_name(efx), ##args)
77#endif 68#endif
78 69
79#define EFX_TRACE(efx, fmt, args...) do {} while (0) 70#define EFX_TRACE(efx, fmt, args...) do {} while (0)
@@ -90,11 +81,6 @@ do {if (net_ratelimit()) EFX_INFO(efx, fmt, ##args); } while (0)
90#define EFX_LOG_RL(efx, fmt, args...) \ 81#define EFX_LOG_RL(efx, fmt, args...) \
91do {if (net_ratelimit()) EFX_LOG(efx, fmt, ##args); } while (0) 82do {if (net_ratelimit()) EFX_LOG(efx, fmt, ##args); } while (0)
92 83
93/* Kernel headers may redefine inline anyway */
94#ifndef inline
95#define inline inline __attribute__ ((always_inline))
96#endif
97
98/************************************************************************** 84/**************************************************************************
99 * 85 *
100 * Efx data structures 86 * Efx data structures
@@ -695,7 +681,7 @@ struct efx_nic {
695 struct workqueue_struct *workqueue; 681 struct workqueue_struct *workqueue;
696 struct work_struct reset_work; 682 struct work_struct reset_work;
697 struct delayed_work monitor_work; 683 struct delayed_work monitor_work;
698 unsigned long membase_phys; 684 resource_size_t membase_phys;
699 void __iomem *membase; 685 void __iomem *membase;
700 spinlock_t biu_lock; 686 spinlock_t biu_lock;
701 enum efx_int_mode interrupt_mode; 687 enum efx_int_mode interrupt_mode;
@@ -719,7 +705,7 @@ struct efx_nic {
719 705
720 unsigned n_rx_nodesc_drop_cnt; 706 unsigned n_rx_nodesc_drop_cnt;
721 707
722 void *nic_data; 708 struct falcon_nic_data *nic_data;
723 709
724 struct mutex mac_lock; 710 struct mutex mac_lock;
725 int port_enabled; 711 int port_enabled;
@@ -760,6 +746,20 @@ struct efx_nic {
760 void *loopback_selftest; 746 void *loopback_selftest;
761}; 747};
762 748
749static inline int efx_dev_registered(struct efx_nic *efx)
750{
751 return efx->net_dev->reg_state == NETREG_REGISTERED;
752}
753
754/* Net device name, for inclusion in log messages if it has been registered.
755 * Use efx->name not efx->net_dev->name so that races with (un)registration
756 * are harmless.
757 */
758static inline const char *efx_dev_name(struct efx_nic *efx)
759{
760 return efx_dev_registered(efx) ? efx->name : "";
761}
762
763/** 763/**
764 * struct efx_nic_type - Efx device type definition 764 * struct efx_nic_type - Efx device type definition
765 * @mem_bar: Memory BAR number 765 * @mem_bar: Memory BAR number
@@ -795,7 +795,7 @@ struct efx_nic_type {
795 unsigned int txd_ring_mask; 795 unsigned int txd_ring_mask;
796 unsigned int rxd_ring_mask; 796 unsigned int rxd_ring_mask;
797 unsigned int evq_size; 797 unsigned int evq_size;
798 dma_addr_t max_dma_mask; 798 u64 max_dma_mask;
799 unsigned int tx_dma_mask; 799 unsigned int tx_dma_mask;
800 unsigned bug5391_mask; 800 unsigned bug5391_mask;
801 801
diff --git a/drivers/net/sfc/rx.c b/drivers/net/sfc/rx.c
index 670622373ddf..601b001437c0 100644
--- a/drivers/net/sfc/rx.c
+++ b/drivers/net/sfc/rx.c
@@ -86,14 +86,17 @@ static unsigned int rx_refill_limit = 95;
86 */ 86 */
87#define EFX_RXD_HEAD_ROOM 2 87#define EFX_RXD_HEAD_ROOM 2
88 88
89/* Macros for zero-order pages (potentially) containing multiple RX buffers */ 89static inline unsigned int efx_rx_buf_offset(struct efx_rx_buffer *buf)
90#define RX_DATA_OFFSET(_data) \ 90{
91 (((unsigned long) (_data)) & (PAGE_SIZE-1)) 91 /* Offset is always within one page, so we don't need to consider
92#define RX_BUF_OFFSET(_rx_buf) \ 92 * the page order.
93 RX_DATA_OFFSET((_rx_buf)->data) 93 */
94 94 return (__force unsigned long) buf->data & (PAGE_SIZE - 1);
95#define RX_PAGE_SIZE(_efx) \ 95}
96 (PAGE_SIZE * (1u << (_efx)->rx_buffer_order)) 96static inline unsigned int efx_rx_buf_size(struct efx_nic *efx)
97{
98 return PAGE_SIZE << efx->rx_buffer_order;
99}
97 100
98 101
99/************************************************************************** 102/**************************************************************************
@@ -106,7 +109,7 @@ static unsigned int rx_refill_limit = 95;
106static int efx_lro_get_skb_hdr(struct sk_buff *skb, void **ip_hdr, 109static int efx_lro_get_skb_hdr(struct sk_buff *skb, void **ip_hdr,
107 void **tcpudp_hdr, u64 *hdr_flags, void *priv) 110 void **tcpudp_hdr, u64 *hdr_flags, void *priv)
108{ 111{
109 struct efx_channel *channel = (struct efx_channel *)priv; 112 struct efx_channel *channel = priv;
110 struct iphdr *iph; 113 struct iphdr *iph;
111 struct tcphdr *th; 114 struct tcphdr *th;
112 115
@@ -131,12 +134,12 @@ static int efx_get_frag_hdr(struct skb_frag_struct *frag, void **mac_hdr,
131 void **ip_hdr, void **tcpudp_hdr, u64 *hdr_flags, 134 void **ip_hdr, void **tcpudp_hdr, u64 *hdr_flags,
132 void *priv) 135 void *priv)
133{ 136{
134 struct efx_channel *channel = (struct efx_channel *)priv; 137 struct efx_channel *channel = priv;
135 struct ethhdr *eh; 138 struct ethhdr *eh;
136 struct iphdr *iph; 139 struct iphdr *iph;
137 140
138 /* We support EtherII and VLAN encapsulated IPv4 */ 141 /* We support EtherII and VLAN encapsulated IPv4 */
139 eh = (struct ethhdr *)(page_address(frag->page) + frag->page_offset); 142 eh = page_address(frag->page) + frag->page_offset;
140 *mac_hdr = eh; 143 *mac_hdr = eh;
141 144
142 if (eh->h_proto == htons(ETH_P_IP)) { 145 if (eh->h_proto == htons(ETH_P_IP)) {
@@ -269,7 +272,7 @@ static inline int efx_init_rx_buffer_page(struct efx_rx_queue *rx_queue,
269 return -ENOMEM; 272 return -ENOMEM;
270 273
271 dma_addr = pci_map_page(efx->pci_dev, rx_buf->page, 274 dma_addr = pci_map_page(efx->pci_dev, rx_buf->page,
272 0, RX_PAGE_SIZE(efx), 275 0, efx_rx_buf_size(efx),
273 PCI_DMA_FROMDEVICE); 276 PCI_DMA_FROMDEVICE);
274 277
275 if (unlikely(pci_dma_mapping_error(dma_addr))) { 278 if (unlikely(pci_dma_mapping_error(dma_addr))) {
@@ -280,14 +283,14 @@ static inline int efx_init_rx_buffer_page(struct efx_rx_queue *rx_queue,
280 283
281 rx_queue->buf_page = rx_buf->page; 284 rx_queue->buf_page = rx_buf->page;
282 rx_queue->buf_dma_addr = dma_addr; 285 rx_queue->buf_dma_addr = dma_addr;
283 rx_queue->buf_data = ((char *) page_address(rx_buf->page) + 286 rx_queue->buf_data = (page_address(rx_buf->page) +
284 EFX_PAGE_IP_ALIGN); 287 EFX_PAGE_IP_ALIGN);
285 } 288 }
286 289
287 offset = RX_DATA_OFFSET(rx_queue->buf_data);
288 rx_buf->len = bytes; 290 rx_buf->len = bytes;
289 rx_buf->dma_addr = rx_queue->buf_dma_addr + offset;
290 rx_buf->data = rx_queue->buf_data; 291 rx_buf->data = rx_queue->buf_data;
292 offset = efx_rx_buf_offset(rx_buf);
293 rx_buf->dma_addr = rx_queue->buf_dma_addr + offset;
291 294
292 /* Try to pack multiple buffers per page */ 295 /* Try to pack multiple buffers per page */
293 if (efx->rx_buffer_order == 0) { 296 if (efx->rx_buffer_order == 0) {
@@ -295,7 +298,7 @@ static inline int efx_init_rx_buffer_page(struct efx_rx_queue *rx_queue,
295 rx_queue->buf_data += ((bytes + 0x1ff) & ~0x1ff); 298 rx_queue->buf_data += ((bytes + 0x1ff) & ~0x1ff);
296 offset += ((bytes + 0x1ff) & ~0x1ff); 299 offset += ((bytes + 0x1ff) & ~0x1ff);
297 300
298 space = RX_PAGE_SIZE(efx) - offset; 301 space = efx_rx_buf_size(efx) - offset;
299 if (space >= bytes) { 302 if (space >= bytes) {
300 /* Refs dropped on kernel releasing each skb */ 303 /* Refs dropped on kernel releasing each skb */
301 get_page(rx_queue->buf_page); 304 get_page(rx_queue->buf_page);
@@ -344,7 +347,8 @@ static inline void efx_unmap_rx_buffer(struct efx_nic *efx,
344 EFX_BUG_ON_PARANOID(rx_buf->skb); 347 EFX_BUG_ON_PARANOID(rx_buf->skb);
345 if (rx_buf->unmap_addr) { 348 if (rx_buf->unmap_addr) {
346 pci_unmap_page(efx->pci_dev, rx_buf->unmap_addr, 349 pci_unmap_page(efx->pci_dev, rx_buf->unmap_addr,
347 RX_PAGE_SIZE(efx), PCI_DMA_FROMDEVICE); 350 efx_rx_buf_size(efx),
351 PCI_DMA_FROMDEVICE);
348 rx_buf->unmap_addr = 0; 352 rx_buf->unmap_addr = 0;
349 } 353 }
350 } else if (likely(rx_buf->skb)) { 354 } else if (likely(rx_buf->skb)) {
@@ -400,9 +404,10 @@ static int __efx_fast_push_rx_descriptors(struct efx_rx_queue *rx_queue,
400 return 0; 404 return 0;
401 405
402 /* Record minimum fill level */ 406 /* Record minimum fill level */
403 if (unlikely(fill_level < rx_queue->min_fill)) 407 if (unlikely(fill_level < rx_queue->min_fill)) {
404 if (fill_level) 408 if (fill_level)
405 rx_queue->min_fill = fill_level; 409 rx_queue->min_fill = fill_level;
410 }
406 411
407 /* Acquire RX add lock. If this lock is contended, then a fast 412 /* Acquire RX add lock. If this lock is contended, then a fast
408 * fill must already be in progress (e.g. in the refill 413 * fill must already be in progress (e.g. in the refill
@@ -552,7 +557,7 @@ static inline void efx_rx_packet_lro(struct efx_channel *channel,
552 struct skb_frag_struct frags; 557 struct skb_frag_struct frags;
553 558
554 frags.page = rx_buf->page; 559 frags.page = rx_buf->page;
555 frags.page_offset = RX_BUF_OFFSET(rx_buf); 560 frags.page_offset = efx_rx_buf_offset(rx_buf);
556 frags.size = rx_buf->len; 561 frags.size = rx_buf->len;
557 562
558 lro_receive_frags(lro_mgr, &frags, rx_buf->len, 563 lro_receive_frags(lro_mgr, &frags, rx_buf->len,
@@ -597,7 +602,7 @@ static inline struct sk_buff *efx_rx_mk_skb(struct efx_rx_buffer *rx_buf,
597 if (unlikely(rx_buf->len > hdr_len)) { 602 if (unlikely(rx_buf->len > hdr_len)) {
598 struct skb_frag_struct *frag = skb_shinfo(skb)->frags; 603 struct skb_frag_struct *frag = skb_shinfo(skb)->frags;
599 frag->page = rx_buf->page; 604 frag->page = rx_buf->page;
600 frag->page_offset = RX_BUF_OFFSET(rx_buf) + hdr_len; 605 frag->page_offset = efx_rx_buf_offset(rx_buf) + hdr_len;
601 frag->size = skb->len - hdr_len; 606 frag->size = skb->len - hdr_len;
602 skb_shinfo(skb)->nr_frags = 1; 607 skb_shinfo(skb)->nr_frags = 1;
603 skb->data_len = frag->size; 608 skb->data_len = frag->size;
@@ -851,7 +856,8 @@ void efx_fini_rx_queue(struct efx_rx_queue *rx_queue)
851 /* For a page that is part-way through splitting into RX buffers */ 856 /* For a page that is part-way through splitting into RX buffers */
852 if (rx_queue->buf_page != NULL) { 857 if (rx_queue->buf_page != NULL) {
853 pci_unmap_page(rx_queue->efx->pci_dev, rx_queue->buf_dma_addr, 858 pci_unmap_page(rx_queue->efx->pci_dev, rx_queue->buf_dma_addr,
854 RX_PAGE_SIZE(rx_queue->efx), PCI_DMA_FROMDEVICE); 859 efx_rx_buf_size(rx_queue->efx),
860 PCI_DMA_FROMDEVICE);
855 __free_pages(rx_queue->buf_page, 861 __free_pages(rx_queue->buf_page,
856 rx_queue->efx->rx_buffer_order); 862 rx_queue->efx->rx_buffer_order);
857 rx_queue->buf_page = NULL; 863 rx_queue->buf_page = NULL;
diff --git a/drivers/net/sfc/selftest.c b/drivers/net/sfc/selftest.c
index cbda15946e8f..3b2de9fe7f27 100644
--- a/drivers/net/sfc/selftest.c
+++ b/drivers/net/sfc/selftest.c
@@ -290,7 +290,7 @@ void efx_loopback_rx_packet(struct efx_nic *efx,
290 290
291 payload = &state->payload; 291 payload = &state->payload;
292 292
293 received = (struct efx_loopback_payload *)(char *) buf_ptr; 293 received = (struct efx_loopback_payload *) buf_ptr;
294 received->ip.saddr = payload->ip.saddr; 294 received->ip.saddr = payload->ip.saddr;
295 received->ip.check = payload->ip.check; 295 received->ip.check = payload->ip.check;
296 296
@@ -424,10 +424,10 @@ static int efx_tx_loopback(struct efx_tx_queue *tx_queue)
424 * interrupt handler. */ 424 * interrupt handler. */
425 smp_wmb(); 425 smp_wmb();
426 426
427 if (NET_DEV_REGISTERED(efx)) 427 if (efx_dev_registered(efx))
428 netif_tx_lock_bh(efx->net_dev); 428 netif_tx_lock_bh(efx->net_dev);
429 rc = efx_xmit(efx, tx_queue, skb); 429 rc = efx_xmit(efx, tx_queue, skb);
430 if (NET_DEV_REGISTERED(efx)) 430 if (efx_dev_registered(efx))
431 netif_tx_unlock_bh(efx->net_dev); 431 netif_tx_unlock_bh(efx->net_dev);
432 432
433 if (rc != NETDEV_TX_OK) { 433 if (rc != NETDEV_TX_OK) {
@@ -453,7 +453,7 @@ static int efx_rx_loopback(struct efx_tx_queue *tx_queue,
453 int tx_done = 0, rx_good, rx_bad; 453 int tx_done = 0, rx_good, rx_bad;
454 int i, rc = 0; 454 int i, rc = 0;
455 455
456 if (NET_DEV_REGISTERED(efx)) 456 if (efx_dev_registered(efx))
457 netif_tx_lock_bh(efx->net_dev); 457 netif_tx_lock_bh(efx->net_dev);
458 458
459 /* Count the number of tx completions, and decrement the refcnt. Any 459 /* Count the number of tx completions, and decrement the refcnt. Any
@@ -465,7 +465,7 @@ static int efx_rx_loopback(struct efx_tx_queue *tx_queue,
465 dev_kfree_skb_any(skb); 465 dev_kfree_skb_any(skb);
466 } 466 }
467 467
468 if (NET_DEV_REGISTERED(efx)) 468 if (efx_dev_registered(efx))
469 netif_tx_unlock_bh(efx->net_dev); 469 netif_tx_unlock_bh(efx->net_dev);
470 470
471 /* Check TX completion and received packet counts */ 471 /* Check TX completion and received packet counts */
@@ -517,6 +517,8 @@ efx_test_loopback(struct efx_tx_queue *tx_queue,
517 state->packet_count = min(1 << (i << 2), state->packet_count); 517 state->packet_count = min(1 << (i << 2), state->packet_count);
518 state->skbs = kzalloc(sizeof(state->skbs[0]) * 518 state->skbs = kzalloc(sizeof(state->skbs[0]) *
519 state->packet_count, GFP_KERNEL); 519 state->packet_count, GFP_KERNEL);
520 if (!state->skbs)
521 return -ENOMEM;
520 state->flush = 0; 522 state->flush = 0;
521 523
522 EFX_LOG(efx, "TX queue %d testing %s loopback with %d " 524 EFX_LOG(efx, "TX queue %d testing %s loopback with %d "
@@ -700,7 +702,7 @@ int efx_offline_test(struct efx_nic *efx,
700 * "flushing" so all inflight packets are dropped */ 702 * "flushing" so all inflight packets are dropped */
701 BUG_ON(efx->loopback_selftest); 703 BUG_ON(efx->loopback_selftest);
702 state->flush = 1; 704 state->flush = 1;
703 efx->loopback_selftest = (void *)state; 705 efx->loopback_selftest = state;
704 706
705 rc = efx_test_loopbacks(efx, tests, loopback_modes); 707 rc = efx_test_loopbacks(efx, tests, loopback_modes);
706 708
diff --git a/drivers/net/sfc/sfe4001.c b/drivers/net/sfc/sfe4001.c
index 725d1a539c49..66a0d1442aba 100644
--- a/drivers/net/sfc/sfe4001.c
+++ b/drivers/net/sfc/sfe4001.c
@@ -116,18 +116,18 @@ void sfe4001_poweroff(struct efx_nic *efx)
116 116
117 /* Turn off all power rails */ 117 /* Turn off all power rails */
118 out = 0xff; 118 out = 0xff;
119 (void) efx_i2c_write(i2c, PCA9539, P0_OUT, &out, 1); 119 efx_i2c_write(i2c, PCA9539, P0_OUT, &out, 1);
120 120
121 /* Disable port 1 outputs on IO expander */ 121 /* Disable port 1 outputs on IO expander */
122 cfg = 0xff; 122 cfg = 0xff;
123 (void) efx_i2c_write(i2c, PCA9539, P1_CONFIG, &cfg, 1); 123 efx_i2c_write(i2c, PCA9539, P1_CONFIG, &cfg, 1);
124 124
125 /* Disable port 0 outputs on IO expander */ 125 /* Disable port 0 outputs on IO expander */
126 cfg = 0xff; 126 cfg = 0xff;
127 (void) efx_i2c_write(i2c, PCA9539, P0_CONFIG, &cfg, 1); 127 efx_i2c_write(i2c, PCA9539, P0_CONFIG, &cfg, 1);
128 128
129 /* Clear any over-temperature alert */ 129 /* Clear any over-temperature alert */
130 (void) efx_i2c_read(i2c, MAX6647, RSL, &in, 1); 130 efx_i2c_read(i2c, MAX6647, RSL, &in, 1);
131} 131}
132 132
133/* The P0_EN_3V3X line on SFE4001 boards (from A2 onward) is connected 133/* The P0_EN_3V3X line on SFE4001 boards (from A2 onward) is connected
@@ -253,14 +253,14 @@ done:
253fail3: 253fail3:
254 /* Turn off all power rails */ 254 /* Turn off all power rails */
255 out = 0xff; 255 out = 0xff;
256 (void) efx_i2c_write(i2c, PCA9539, P0_OUT, &out, 1); 256 efx_i2c_write(i2c, PCA9539, P0_OUT, &out, 1);
257 /* Disable port 1 outputs on IO expander */ 257 /* Disable port 1 outputs on IO expander */
258 out = 0xff; 258 out = 0xff;
259 (void) efx_i2c_write(i2c, PCA9539, P1_CONFIG, &out, 1); 259 efx_i2c_write(i2c, PCA9539, P1_CONFIG, &out, 1);
260fail2: 260fail2:
261 /* Disable port 0 outputs on IO expander */ 261 /* Disable port 0 outputs on IO expander */
262 out = 0xff; 262 out = 0xff;
263 (void) efx_i2c_write(i2c, PCA9539, P0_CONFIG, &out, 1); 263 efx_i2c_write(i2c, PCA9539, P0_CONFIG, &out, 1);
264fail1: 264fail1:
265 return rc; 265 return rc;
266} 266}
diff --git a/drivers/net/sfc/tenxpress.c b/drivers/net/sfc/tenxpress.c
index b1cd6deec01f..c0146061c326 100644
--- a/drivers/net/sfc/tenxpress.c
+++ b/drivers/net/sfc/tenxpress.c
@@ -211,6 +211,8 @@ static int tenxpress_phy_init(struct efx_nic *efx)
211 int rc = 0; 211 int rc = 0;
212 212
213 phy_data = kzalloc(sizeof(*phy_data), GFP_KERNEL); 213 phy_data = kzalloc(sizeof(*phy_data), GFP_KERNEL);
214 if (!phy_data)
215 return -ENOMEM;
214 efx->phy_data = phy_data; 216 efx->phy_data = phy_data;
215 217
216 tenxpress_set_state(efx, TENXPRESS_STATUS_NORMAL); 218 tenxpress_set_state(efx, TENXPRESS_STATUS_NORMAL);
@@ -376,7 +378,7 @@ static void tenxpress_phy_reconfigure(struct efx_nic *efx)
376 * perform a special software reset */ 378 * perform a special software reset */
377 if ((phy_data->tx_disabled && !efx->tx_disabled) || 379 if ((phy_data->tx_disabled && !efx->tx_disabled) ||
378 loop_change) { 380 loop_change) {
379 (void) tenxpress_special_reset(efx); 381 tenxpress_special_reset(efx);
380 falcon_reset_xaui(efx); 382 falcon_reset_xaui(efx);
381 } 383 }
382 384
diff --git a/drivers/net/sfc/tx.c b/drivers/net/sfc/tx.c
index 9b436f5b4888..5cdd082ab8f6 100644
--- a/drivers/net/sfc/tx.c
+++ b/drivers/net/sfc/tx.c
@@ -387,7 +387,7 @@ void efx_xmit_done(struct efx_tx_queue *tx_queue, unsigned int index)
387 if (unlikely(tx_queue->stopped)) { 387 if (unlikely(tx_queue->stopped)) {
388 fill_level = tx_queue->insert_count - tx_queue->read_count; 388 fill_level = tx_queue->insert_count - tx_queue->read_count;
389 if (fill_level < EFX_NETDEV_TX_THRESHOLD(tx_queue)) { 389 if (fill_level < EFX_NETDEV_TX_THRESHOLD(tx_queue)) {
390 EFX_BUG_ON_PARANOID(!NET_DEV_REGISTERED(efx)); 390 EFX_BUG_ON_PARANOID(!efx_dev_registered(efx));
391 391
392 /* Do this under netif_tx_lock(), to avoid racing 392 /* Do this under netif_tx_lock(), to avoid racing
393 * with efx_xmit(). */ 393 * with efx_xmit(). */
@@ -639,11 +639,12 @@ static void efx_tsoh_block_free(struct efx_tx_queue *tx_queue,
639 base_dma = tsoh->dma_addr & PAGE_MASK; 639 base_dma = tsoh->dma_addr & PAGE_MASK;
640 640
641 p = &tx_queue->tso_headers_free; 641 p = &tx_queue->tso_headers_free;
642 while (*p != NULL) 642 while (*p != NULL) {
643 if (((unsigned long)*p & PAGE_MASK) == base_kva) 643 if (((unsigned long)*p & PAGE_MASK) == base_kva)
644 *p = (*p)->next; 644 *p = (*p)->next;
645 else 645 else
646 p = &(*p)->next; 646 p = &(*p)->next;
647 }
647 648
648 pci_free_consistent(pci_dev, PAGE_SIZE, (void *)base_kva, base_dma); 649 pci_free_consistent(pci_dev, PAGE_SIZE, (void *)base_kva, base_dma);
649} 650}
@@ -939,9 +940,10 @@ static inline int tso_start_new_packet(struct efx_tx_queue *tx_queue,
939 940
940 /* Allocate a DMA-mapped header buffer. */ 941 /* Allocate a DMA-mapped header buffer. */
941 if (likely(TSOH_SIZE(st->p.header_length) <= TSOH_STD_SIZE)) { 942 if (likely(TSOH_SIZE(st->p.header_length) <= TSOH_STD_SIZE)) {
942 if (tx_queue->tso_headers_free == NULL) 943 if (tx_queue->tso_headers_free == NULL) {
943 if (efx_tsoh_block_alloc(tx_queue)) 944 if (efx_tsoh_block_alloc(tx_queue))
944 return -1; 945 return -1;
946 }
945 EFX_BUG_ON_PARANOID(!tx_queue->tso_headers_free); 947 EFX_BUG_ON_PARANOID(!tx_queue->tso_headers_free);
946 tsoh = tx_queue->tso_headers_free; 948 tsoh = tx_queue->tso_headers_free;
947 tx_queue->tso_headers_free = tsoh->next; 949 tx_queue->tso_headers_free = tsoh->next;
@@ -1106,9 +1108,10 @@ static void efx_fini_tso(struct efx_tx_queue *tx_queue)
1106{ 1108{
1107 unsigned i; 1109 unsigned i;
1108 1110
1109 if (tx_queue->buffer) 1111 if (tx_queue->buffer) {
1110 for (i = 0; i <= tx_queue->efx->type->txd_ring_mask; ++i) 1112 for (i = 0; i <= tx_queue->efx->type->txd_ring_mask; ++i)
1111 efx_tsoh_free(tx_queue, &tx_queue->buffer[i]); 1113 efx_tsoh_free(tx_queue, &tx_queue->buffer[i]);
1114 }
1112 1115
1113 while (tx_queue->tso_headers_free != NULL) 1116 while (tx_queue->tso_headers_free != NULL)
1114 efx_tsoh_block_free(tx_queue, tx_queue->tso_headers_free, 1117 efx_tsoh_block_free(tx_queue, tx_queue->tso_headers_free,
diff --git a/drivers/net/sfc/workarounds.h b/drivers/net/sfc/workarounds.h
index dca62f190198..35ab19c27f8d 100644
--- a/drivers/net/sfc/workarounds.h
+++ b/drivers/net/sfc/workarounds.h
@@ -16,7 +16,7 @@
16 */ 16 */
17 17
18#define EFX_WORKAROUND_ALWAYS(efx) 1 18#define EFX_WORKAROUND_ALWAYS(efx) 1
19#define EFX_WORKAROUND_FALCON_A(efx) (FALCON_REV(efx) <= FALCON_REV_A1) 19#define EFX_WORKAROUND_FALCON_A(efx) (falcon_rev(efx) <= FALCON_REV_A1)
20 20
21/* XAUI resets if link not detected */ 21/* XAUI resets if link not detected */
22#define EFX_WORKAROUND_5147 EFX_WORKAROUND_ALWAYS 22#define EFX_WORKAROUND_5147 EFX_WORKAROUND_ALWAYS
diff --git a/drivers/net/sfc/xfp_phy.c b/drivers/net/sfc/xfp_phy.c
index 3b9f9ddbc372..f3684ad28887 100644
--- a/drivers/net/sfc/xfp_phy.c
+++ b/drivers/net/sfc/xfp_phy.c
@@ -85,7 +85,9 @@ static int xfp_phy_init(struct efx_nic *efx)
85 int rc; 85 int rc;
86 86
87 phy_data = kzalloc(sizeof(struct xfp_phy_data), GFP_KERNEL); 87 phy_data = kzalloc(sizeof(struct xfp_phy_data), GFP_KERNEL);
88 efx->phy_data = (void *) phy_data; 88 if (!phy_data)
89 return -ENOMEM;
90 efx->phy_data = phy_data;
89 91
90 EFX_INFO(efx, "XFP: PHY ID reg %x (OUI %x model %x revision" 92 EFX_INFO(efx, "XFP: PHY ID reg %x (OUI %x model %x revision"
91 " %x)\n", devid, MDIO_ID_OUI(devid), MDIO_ID_MODEL(devid), 93 " %x)\n", devid, MDIO_ID_OUI(devid), MDIO_ID_MODEL(devid),
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index f226bcac7d17..c8a5ef2d75f4 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -118,6 +118,7 @@ static const struct pci_device_id sky2_id_table[] = {
118 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4352) }, /* 88E8038 */ 118 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4352) }, /* 88E8038 */
119 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4353) }, /* 88E8039 */ 119 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4353) }, /* 88E8039 */
120 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4354) }, /* 88E8040 */ 120 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4354) }, /* 88E8040 */
121 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4355) }, /* 88E8040T */
121 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4356) }, /* 88EC033 */ 122 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4356) }, /* 88EC033 */
122 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4357) }, /* 88E8042 */ 123 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4357) }, /* 88E8042 */
123 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x435A) }, /* 88E8048 */ 124 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x435A) }, /* 88E8048 */
@@ -1159,17 +1160,9 @@ static int sky2_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
1159} 1160}
1160 1161
1161#ifdef SKY2_VLAN_TAG_USED 1162#ifdef SKY2_VLAN_TAG_USED
1162static void sky2_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) 1163static void sky2_set_vlan_mode(struct sky2_hw *hw, u16 port, bool onoff)
1163{ 1164{
1164 struct sky2_port *sky2 = netdev_priv(dev); 1165 if (onoff) {
1165 struct sky2_hw *hw = sky2->hw;
1166 u16 port = sky2->port;
1167
1168 netif_tx_lock_bh(dev);
1169 napi_disable(&hw->napi);
1170
1171 sky2->vlgrp = grp;
1172 if (grp) {
1173 sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T), 1166 sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T),
1174 RX_VLAN_STRIP_ON); 1167 RX_VLAN_STRIP_ON);
1175 sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T), 1168 sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T),
@@ -1180,6 +1173,19 @@ static void sky2_vlan_rx_register(struct net_device *dev, struct vlan_group *grp
1180 sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T), 1173 sky2_write32(hw, SK_REG(port, TX_GMF_CTRL_T),
1181 TX_VLAN_TAG_OFF); 1174 TX_VLAN_TAG_OFF);
1182 } 1175 }
1176}
1177
1178static void sky2_vlan_rx_register(struct net_device *dev, struct vlan_group *grp)
1179{
1180 struct sky2_port *sky2 = netdev_priv(dev);
1181 struct sky2_hw *hw = sky2->hw;
1182 u16 port = sky2->port;
1183
1184 netif_tx_lock_bh(dev);
1185 napi_disable(&hw->napi);
1186
1187 sky2->vlgrp = grp;
1188 sky2_set_vlan_mode(hw, port, grp != NULL);
1183 1189
1184 sky2_read32(hw, B0_Y2_SP_LISR); 1190 sky2_read32(hw, B0_Y2_SP_LISR);
1185 napi_enable(&hw->napi); 1191 napi_enable(&hw->napi);
@@ -1418,6 +1424,10 @@ static int sky2_up(struct net_device *dev)
1418 sky2_prefetch_init(hw, txqaddr[port], sky2->tx_le_map, 1424 sky2_prefetch_init(hw, txqaddr[port], sky2->tx_le_map,
1419 TX_RING_SIZE - 1); 1425 TX_RING_SIZE - 1);
1420 1426
1427#ifdef SKY2_VLAN_TAG_USED
1428 sky2_set_vlan_mode(hw, port, sky2->vlgrp != NULL);
1429#endif
1430
1421 err = sky2_rx_start(sky2); 1431 err = sky2_rx_start(sky2);
1422 if (err) 1432 if (err)
1423 goto err_out; 1433 goto err_out;
@@ -4395,7 +4405,9 @@ static int sky2_resume(struct pci_dev *pdev)
4395 if (err) { 4405 if (err) {
4396 printk(KERN_ERR PFX "%s: could not up: %d\n", 4406 printk(KERN_ERR PFX "%s: could not up: %d\n",
4397 dev->name, err); 4407 dev->name, err);
4408 rtnl_lock();
4398 dev_close(dev); 4409 dev_close(dev);
4410 rtnl_unlock();
4399 goto out; 4411 goto out;
4400 } 4412 }
4401 } 4413 }
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index 4e2800205189..e2ee91a6ae7e 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -136,7 +136,6 @@ struct smc911x_local {
136 136
137 /* work queue */ 137 /* work queue */
138 struct work_struct phy_configure; 138 struct work_struct phy_configure;
139 int work_pending;
140 139
141 int tx_throttle; 140 int tx_throttle;
142 spinlock_t lock; 141 spinlock_t lock;
@@ -960,11 +959,11 @@ static void smc911x_phy_configure(struct work_struct *work)
960 * We should not be called if phy_type is zero. 959 * We should not be called if phy_type is zero.
961 */ 960 */
962 if (lp->phy_type == 0) 961 if (lp->phy_type == 0)
963 goto smc911x_phy_configure_exit_nolock; 962 return;
964 963
965 if (smc911x_phy_reset(dev, phyaddr)) { 964 if (smc911x_phy_reset(dev, phyaddr)) {
966 printk("%s: PHY reset timed out\n", dev->name); 965 printk("%s: PHY reset timed out\n", dev->name);
967 goto smc911x_phy_configure_exit_nolock; 966 return;
968 } 967 }
969 spin_lock_irqsave(&lp->lock, flags); 968 spin_lock_irqsave(&lp->lock, flags);
970 969
@@ -1033,8 +1032,6 @@ static void smc911x_phy_configure(struct work_struct *work)
1033 1032
1034smc911x_phy_configure_exit: 1033smc911x_phy_configure_exit:
1035 spin_unlock_irqrestore(&lp->lock, flags); 1034 spin_unlock_irqrestore(&lp->lock, flags);
1036smc911x_phy_configure_exit_nolock:
1037 lp->work_pending = 0;
1038} 1035}
1039 1036
1040/* 1037/*
@@ -1356,11 +1353,8 @@ static void smc911x_timeout(struct net_device *dev)
1356 * smc911x_phy_configure() calls msleep() which calls schedule_timeout() 1353 * smc911x_phy_configure() calls msleep() which calls schedule_timeout()
1357 * which calls schedule(). Hence we use a work queue. 1354 * which calls schedule(). Hence we use a work queue.
1358 */ 1355 */
1359 if (lp->phy_type != 0) { 1356 if (lp->phy_type != 0)
1360 if (schedule_work(&lp->phy_configure)) { 1357 schedule_work(&lp->phy_configure);
1361 lp->work_pending = 1;
1362 }
1363 }
1364 1358
1365 /* We can accept TX packets again */ 1359 /* We can accept TX packets again */
1366 dev->trans_start = jiffies; 1360 dev->trans_start = jiffies;
@@ -1531,16 +1525,8 @@ static int smc911x_close(struct net_device *dev)
1531 if (lp->phy_type != 0) { 1525 if (lp->phy_type != 0) {
1532 /* We need to ensure that no calls to 1526 /* We need to ensure that no calls to
1533 * smc911x_phy_configure are pending. 1527 * smc911x_phy_configure are pending.
1534
1535 * flush_scheduled_work() cannot be called because we
1536 * are running with the netlink semaphore held (from
1537 * devinet_ioctl()) and the pending work queue
1538 * contains linkwatch_event() (scheduled by
1539 * netif_carrier_off() above). linkwatch_event() also
1540 * wants the netlink semaphore.
1541 */ 1528 */
1542 while (lp->work_pending) 1529 cancel_work_sync(&lp->phy_configure);
1543 schedule();
1544 smc911x_phy_powerdown(dev, lp->mii.phy_id); 1530 smc911x_phy_powerdown(dev, lp->mii.phy_id);
1545 } 1531 }
1546 1532
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index a188e33484e6..f2051b209da2 100644
--- a/drivers/net/smc91x.c
+++ b/drivers/net/smc91x.c
@@ -1016,15 +1016,8 @@ static void smc_phy_powerdown(struct net_device *dev)
1016 1016
1017 /* We need to ensure that no calls to smc_phy_configure are 1017 /* We need to ensure that no calls to smc_phy_configure are
1018 pending. 1018 pending.
1019
1020 flush_scheduled_work() cannot be called because we are
1021 running with the netlink semaphore held (from
1022 devinet_ioctl()) and the pending work queue contains
1023 linkwatch_event() (scheduled by netif_carrier_off()
1024 above). linkwatch_event() also wants the netlink semaphore.
1025 */ 1019 */
1026 while(lp->work_pending) 1020 cancel_work_sync(&lp->phy_configure);
1027 yield();
1028 1021
1029 bmcr = smc_phy_read(dev, phy, MII_BMCR); 1022 bmcr = smc_phy_read(dev, phy, MII_BMCR);
1030 smc_phy_write(dev, phy, MII_BMCR, bmcr | BMCR_PDOWN); 1023 smc_phy_write(dev, phy, MII_BMCR, bmcr | BMCR_PDOWN);
@@ -1161,7 +1154,6 @@ static void smc_phy_configure(struct work_struct *work)
1161smc_phy_configure_exit: 1154smc_phy_configure_exit:
1162 SMC_SELECT_BANK(lp, 2); 1155 SMC_SELECT_BANK(lp, 2);
1163 spin_unlock_irq(&lp->lock); 1156 spin_unlock_irq(&lp->lock);
1164 lp->work_pending = 0;
1165} 1157}
1166 1158
1167/* 1159/*
@@ -1389,11 +1381,8 @@ static void smc_timeout(struct net_device *dev)
1389 * smc_phy_configure() calls msleep() which calls schedule_timeout() 1381 * smc_phy_configure() calls msleep() which calls schedule_timeout()
1390 * which calls schedule(). Hence we use a work queue. 1382 * which calls schedule(). Hence we use a work queue.
1391 */ 1383 */
1392 if (lp->phy_type != 0) { 1384 if (lp->phy_type != 0)
1393 if (schedule_work(&lp->phy_configure)) { 1385 schedule_work(&lp->phy_configure);
1394 lp->work_pending = 1;
1395 }
1396 }
1397 1386
1398 /* We can accept TX packets again */ 1387 /* We can accept TX packets again */
1399 dev->trans_start = jiffies; 1388 dev->trans_start = jiffies;
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h
index 69e97a1cb1c4..8606818653f8 100644
--- a/drivers/net/smc91x.h
+++ b/drivers/net/smc91x.h
@@ -93,14 +93,14 @@
93#define SMC_insw(a, r, p, l) insw ((unsigned long *)((a) + (r)), p, l) 93#define SMC_insw(a, r, p, l) insw ((unsigned long *)((a) + (r)), p, l)
94# endif 94# endif
95/* check if the mac in reg is valid */ 95/* check if the mac in reg is valid */
96#define SMC_GET_MAC_ADDR(addr) \ 96#define SMC_GET_MAC_ADDR(lp, addr) \
97 do { \ 97 do { \
98 unsigned int __v; \ 98 unsigned int __v; \
99 __v = SMC_inw(ioaddr, ADDR0_REG); \ 99 __v = SMC_inw(ioaddr, ADDR0_REG(lp)); \
100 addr[0] = __v; addr[1] = __v >> 8; \ 100 addr[0] = __v; addr[1] = __v >> 8; \
101 __v = SMC_inw(ioaddr, ADDR1_REG); \ 101 __v = SMC_inw(ioaddr, ADDR1_REG(lp)); \
102 addr[2] = __v; addr[3] = __v >> 8; \ 102 addr[2] = __v; addr[3] = __v >> 8; \
103 __v = SMC_inw(ioaddr, ADDR2_REG); \ 103 __v = SMC_inw(ioaddr, ADDR2_REG(lp)); \
104 addr[4] = __v; addr[5] = __v >> 8; \ 104 addr[4] = __v; addr[5] = __v >> 8; \
105 if (*(u32 *)(&addr[0]) == 0xFFFFFFFF) { \ 105 if (*(u32 *)(&addr[0]) == 0xFFFFFFFF) { \
106 random_ether_addr(addr); \ 106 random_ether_addr(addr); \
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c
index b4e7f30ea4e8..1aa425be3067 100644
--- a/drivers/net/sunhme.c
+++ b/drivers/net/sunhme.c
@@ -111,7 +111,7 @@ static __inline__ void tx_add_log(struct happy_meal *hp, unsigned int a, unsigne
111 struct hme_tx_logent *tlp; 111 struct hme_tx_logent *tlp;
112 unsigned long flags; 112 unsigned long flags;
113 113
114 save_and_cli(flags); 114 local_irq_save(flags);
115 tlp = &tx_log[txlog_cur_entry]; 115 tlp = &tx_log[txlog_cur_entry];
116 tlp->tstamp = (unsigned int)jiffies; 116 tlp->tstamp = (unsigned int)jiffies;
117 tlp->tx_new = hp->tx_new; 117 tlp->tx_new = hp->tx_new;
@@ -119,7 +119,7 @@ static __inline__ void tx_add_log(struct happy_meal *hp, unsigned int a, unsigne
119 tlp->action = a; 119 tlp->action = a;
120 tlp->status = s; 120 tlp->status = s;
121 txlog_cur_entry = (txlog_cur_entry + 1) & (TX_LOG_LEN - 1); 121 txlog_cur_entry = (txlog_cur_entry + 1) & (TX_LOG_LEN - 1);
122 restore_flags(flags); 122 local_irq_restore(flags);
123} 123}
124static __inline__ void tx_dump_log(void) 124static __inline__ void tx_dump_log(void)
125{ 125{
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c
index 10e4e85da3fc..b07b8cbadeaf 100644
--- a/drivers/net/tc35815.c
+++ b/drivers/net/tc35815.c
@@ -1394,6 +1394,7 @@ tc35815_open(struct net_device *dev)
1394 tc35815_chip_init(dev); 1394 tc35815_chip_init(dev);
1395 spin_unlock_irq(&lp->lock); 1395 spin_unlock_irq(&lp->lock);
1396 1396
1397 netif_carrier_off(dev);
1397 /* schedule a link state check */ 1398 /* schedule a link state check */
1398 phy_start(lp->phy_dev); 1399 phy_start(lp->phy_dev);
1399 1400
@@ -1735,7 +1736,6 @@ tc35815_rx(struct net_device *dev)
1735 skb = lp->rx_skbs[cur_bd].skb; 1736 skb = lp->rx_skbs[cur_bd].skb;
1736 prefetch(skb->data); 1737 prefetch(skb->data);
1737 lp->rx_skbs[cur_bd].skb = NULL; 1738 lp->rx_skbs[cur_bd].skb = NULL;
1738 lp->fbl_count--;
1739 pci_unmap_single(lp->pci_dev, 1739 pci_unmap_single(lp->pci_dev,
1740 lp->rx_skbs[cur_bd].skb_dma, 1740 lp->rx_skbs[cur_bd].skb_dma,
1741 RX_BUF_SIZE, PCI_DMA_FROMDEVICE); 1741 RX_BUF_SIZE, PCI_DMA_FROMDEVICE);
@@ -1791,6 +1791,7 @@ tc35815_rx(struct net_device *dev)
1791#ifdef TC35815_USE_PACKEDBUFFER 1791#ifdef TC35815_USE_PACKEDBUFFER
1792 while (lp->fbl_curid != id) 1792 while (lp->fbl_curid != id)
1793#else 1793#else
1794 lp->fbl_count--;
1794 while (lp->fbl_count < RX_BUF_NUM) 1795 while (lp->fbl_count < RX_BUF_NUM)
1795#endif 1796#endif
1796 { 1797 {
@@ -2453,6 +2454,7 @@ static int tc35815_resume(struct pci_dev *pdev)
2453 return 0; 2454 return 0;
2454 pci_set_power_state(pdev, PCI_D0); 2455 pci_set_power_state(pdev, PCI_D0);
2455 tc35815_restart(dev); 2456 tc35815_restart(dev);
2457 netif_carrier_off(dev);
2456 if (lp->phy_dev) 2458 if (lp->phy_dev)
2457 phy_start(lp->phy_dev); 2459 phy_start(lp->phy_dev);
2458 netif_device_attach(dev); 2460 netif_device_attach(dev);
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 07b3f77e7626..cc4bde852542 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -64,8 +64,8 @@
64 64
65#define DRV_MODULE_NAME "tg3" 65#define DRV_MODULE_NAME "tg3"
66#define PFX DRV_MODULE_NAME ": " 66#define PFX DRV_MODULE_NAME ": "
67#define DRV_MODULE_VERSION "3.92" 67#define DRV_MODULE_VERSION "3.92.1"
68#define DRV_MODULE_RELDATE "May 2, 2008" 68#define DRV_MODULE_RELDATE "June 9, 2008"
69 69
70#define TG3_DEF_MAC_MODE 0 70#define TG3_DEF_MAC_MODE 0
71#define TG3_DEF_RX_MODE 0 71#define TG3_DEF_RX_MODE 0
@@ -1295,6 +1295,21 @@ static void tg3_frob_aux_power(struct tg3 *tp)
1295 GRC_LCLCTRL_GPIO_OUTPUT0 | 1295 GRC_LCLCTRL_GPIO_OUTPUT0 |
1296 GRC_LCLCTRL_GPIO_OUTPUT1), 1296 GRC_LCLCTRL_GPIO_OUTPUT1),
1297 100); 1297 100);
1298 } else if (tp->pdev->device == PCI_DEVICE_ID_TIGON3_5761) {
1299 /* The 5761 non-e device swaps GPIO 0 and GPIO 2. */
1300 u32 grc_local_ctrl = GRC_LCLCTRL_GPIO_OE0 |
1301 GRC_LCLCTRL_GPIO_OE1 |
1302 GRC_LCLCTRL_GPIO_OE2 |
1303 GRC_LCLCTRL_GPIO_OUTPUT0 |
1304 GRC_LCLCTRL_GPIO_OUTPUT1 |
1305 tp->grc_local_ctrl;
1306 tw32_wait_f(GRC_LOCAL_CTRL, grc_local_ctrl, 100);
1307
1308 grc_local_ctrl |= GRC_LCLCTRL_GPIO_OUTPUT2;
1309 tw32_wait_f(GRC_LOCAL_CTRL, grc_local_ctrl, 100);
1310
1311 grc_local_ctrl &= ~GRC_LCLCTRL_GPIO_OUTPUT0;
1312 tw32_wait_f(GRC_LOCAL_CTRL, grc_local_ctrl, 100);
1298 } else { 1313 } else {
1299 u32 no_gpio2; 1314 u32 no_gpio2;
1300 u32 grc_local_ctrl = 0; 1315 u32 grc_local_ctrl = 0;
@@ -3168,8 +3183,7 @@ static int tg3_setup_fiber_mii_phy(struct tg3 *tp, int force_reset)
3168 err |= tg3_readphy(tp, MII_BMCR, &bmcr); 3183 err |= tg3_readphy(tp, MII_BMCR, &bmcr);
3169 3184
3170 if ((tp->link_config.autoneg == AUTONEG_ENABLE) && !force_reset && 3185 if ((tp->link_config.autoneg == AUTONEG_ENABLE) && !force_reset &&
3171 (tp->tg3_flags2 & TG3_FLG2_PARALLEL_DETECT) && 3186 (tp->tg3_flags2 & TG3_FLG2_PARALLEL_DETECT)) {
3172 tp->link_config.flowctrl == tp->link_config.active_flowctrl) {
3173 /* do nothing, just check for link up at the end */ 3187 /* do nothing, just check for link up at the end */
3174 } else if (tp->link_config.autoneg == AUTONEG_ENABLE) { 3188 } else if (tp->link_config.autoneg == AUTONEG_ENABLE) {
3175 u32 adv, new_adv; 3189 u32 adv, new_adv;
@@ -8599,7 +8613,7 @@ static int tg3_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
8599 (cmd->speed == SPEED_1000)) 8613 (cmd->speed == SPEED_1000))
8600 return -EINVAL; 8614 return -EINVAL;
8601 else if ((cmd->speed == SPEED_1000) && 8615 else if ((cmd->speed == SPEED_1000) &&
8602 (tp->tg3_flags2 & TG3_FLAG_10_100_ONLY)) 8616 (tp->tg3_flags & TG3_FLAG_10_100_ONLY))
8603 return -EINVAL; 8617 return -EINVAL;
8604 8618
8605 tg3_full_lock(tp, 0); 8619 tg3_full_lock(tp, 0);
@@ -11768,6 +11782,15 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
11768 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755) 11782 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755)
11769 tp->grc_local_ctrl |= GRC_LCLCTRL_GPIO_UART_SEL; 11783 tp->grc_local_ctrl |= GRC_LCLCTRL_GPIO_UART_SEL;
11770 11784
11785 if (tp->pdev->device == PCI_DEVICE_ID_TIGON3_5761) {
11786 /* Turn off the debug UART. */
11787 tp->grc_local_ctrl |= GRC_LCLCTRL_GPIO_UART_SEL;
11788 if (tp->tg3_flags2 & TG3_FLG2_IS_NIC)
11789 /* Keep VMain power. */
11790 tp->grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE0 |
11791 GRC_LCLCTRL_GPIO_OUTPUT0;
11792 }
11793
11771 /* Force the chip into D0. */ 11794 /* Force the chip into D0. */
11772 err = tg3_set_power_state(tp, PCI_D0); 11795 err = tg3_set_power_state(tp, PCI_D0);
11773 if (err) { 11796 if (err) {
diff --git a/drivers/net/tokenring/3c359.h b/drivers/net/tokenring/3c359.h
index b880cba0f6fd..74cf8e1a181b 100644
--- a/drivers/net/tokenring/3c359.h
+++ b/drivers/net/tokenring/3c359.h
@@ -264,7 +264,7 @@ struct xl_private {
264 u16 asb; 264 u16 asb;
265 265
266 u8 __iomem *xl_mmio; 266 u8 __iomem *xl_mmio;
267 char *xl_card_name; 267 const char *xl_card_name;
268 struct pci_dev *pdev ; 268 struct pci_dev *pdev ;
269 269
270 spinlock_t xl_lock ; 270 spinlock_t xl_lock ;
diff --git a/drivers/net/tokenring/olympic.h b/drivers/net/tokenring/olympic.h
index c91956310fb2..10fbba08978f 100644
--- a/drivers/net/tokenring/olympic.h
+++ b/drivers/net/tokenring/olympic.h
@@ -254,7 +254,7 @@ struct olympic_private {
254 u8 __iomem *olympic_mmio; 254 u8 __iomem *olympic_mmio;
255 u8 __iomem *olympic_lap; 255 u8 __iomem *olympic_lap;
256 struct pci_dev *pdev ; 256 struct pci_dev *pdev ;
257 char *olympic_card_name ; 257 const char *olympic_card_name;
258 258
259 spinlock_t olympic_lock ; 259 spinlock_t olympic_lock ;
260 260
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c
index f9d13fa05d64..af8d2c436efd 100644
--- a/drivers/net/tulip/tulip_core.c
+++ b/drivers/net/tulip/tulip_core.c
@@ -731,7 +731,7 @@ static void tulip_down (struct net_device *dev)
731 void __iomem *ioaddr = tp->base_addr; 731 void __iomem *ioaddr = tp->base_addr;
732 unsigned long flags; 732 unsigned long flags;
733 733
734 flush_scheduled_work(); 734 cancel_work_sync(&tp->media_work);
735 735
736#ifdef CONFIG_TULIP_NAPI 736#ifdef CONFIG_TULIP_NAPI
737 napi_disable(&tp->napi); 737 napi_disable(&tp->napi);
@@ -1729,12 +1729,15 @@ static int tulip_suspend (struct pci_dev *pdev, pm_message_t state)
1729 if (!dev) 1729 if (!dev)
1730 return -EINVAL; 1730 return -EINVAL;
1731 1731
1732 if (netif_running(dev)) 1732 if (!netif_running(dev))
1733 tulip_down(dev); 1733 goto save_state;
1734
1735 tulip_down(dev);
1734 1736
1735 netif_device_detach(dev); 1737 netif_device_detach(dev);
1736 free_irq(dev->irq, dev); 1738 free_irq(dev->irq, dev);
1737 1739
1740save_state:
1738 pci_save_state(pdev); 1741 pci_save_state(pdev);
1739 pci_disable_device(pdev); 1742 pci_disable_device(pdev);
1740 pci_set_power_state(pdev, pci_choose_state(pdev, state)); 1743 pci_set_power_state(pdev, pci_choose_state(pdev, state));
@@ -1754,6 +1757,9 @@ static int tulip_resume(struct pci_dev *pdev)
1754 pci_set_power_state(pdev, PCI_D0); 1757 pci_set_power_state(pdev, PCI_D0);
1755 pci_restore_state(pdev); 1758 pci_restore_state(pdev);
1756 1759
1760 if (!netif_running(dev))
1761 return 0;
1762
1757 if ((retval = pci_enable_device(pdev))) { 1763 if ((retval = pci_enable_device(pdev))) {
1758 printk (KERN_ERR "tulip: pci_enable_device failed in resume\n"); 1764 printk (KERN_ERR "tulip: pci_enable_device failed in resume\n");
1759 return retval; 1765 return retval;
diff --git a/drivers/net/tulip/uli526x.c b/drivers/net/tulip/uli526x.c
index 2511ca7a12aa..e9e628621639 100644
--- a/drivers/net/tulip/uli526x.c
+++ b/drivers/net/tulip/uli526x.c
@@ -225,6 +225,9 @@ static void uli526x_set_filter_mode(struct net_device *);
225static const struct ethtool_ops netdev_ethtool_ops; 225static const struct ethtool_ops netdev_ethtool_ops;
226static u16 read_srom_word(long, int); 226static u16 read_srom_word(long, int);
227static irqreturn_t uli526x_interrupt(int, void *); 227static irqreturn_t uli526x_interrupt(int, void *);
228#ifdef CONFIG_NET_POLL_CONTROLLER
229static void uli526x_poll(struct net_device *dev);
230#endif
228static void uli526x_descriptor_init(struct uli526x_board_info *, unsigned long); 231static void uli526x_descriptor_init(struct uli526x_board_info *, unsigned long);
229static void allocate_rx_buffer(struct uli526x_board_info *); 232static void allocate_rx_buffer(struct uli526x_board_info *);
230static void update_cr6(u32, unsigned long); 233static void update_cr6(u32, unsigned long);
@@ -339,6 +342,9 @@ static int __devinit uli526x_init_one (struct pci_dev *pdev,
339 dev->get_stats = &uli526x_get_stats; 342 dev->get_stats = &uli526x_get_stats;
340 dev->set_multicast_list = &uli526x_set_filter_mode; 343 dev->set_multicast_list = &uli526x_set_filter_mode;
341 dev->ethtool_ops = &netdev_ethtool_ops; 344 dev->ethtool_ops = &netdev_ethtool_ops;
345#ifdef CONFIG_NET_POLL_CONTROLLER
346 dev->poll_controller = &uli526x_poll;
347#endif
342 spin_lock_init(&db->lock); 348 spin_lock_init(&db->lock);
343 349
344 350
@@ -681,8 +687,9 @@ static irqreturn_t uli526x_interrupt(int irq, void *dev_id)
681 db->cr5_data = inl(ioaddr + DCR5); 687 db->cr5_data = inl(ioaddr + DCR5);
682 outl(db->cr5_data, ioaddr + DCR5); 688 outl(db->cr5_data, ioaddr + DCR5);
683 if ( !(db->cr5_data & 0x180c1) ) { 689 if ( !(db->cr5_data & 0x180c1) ) {
684 spin_unlock_irqrestore(&db->lock, flags); 690 /* Restore CR7 to enable interrupt mask */
685 outl(db->cr7_data, ioaddr + DCR7); 691 outl(db->cr7_data, ioaddr + DCR7);
692 spin_unlock_irqrestore(&db->lock, flags);
686 return IRQ_HANDLED; 693 return IRQ_HANDLED;
687 } 694 }
688 695
@@ -715,6 +722,13 @@ static irqreturn_t uli526x_interrupt(int irq, void *dev_id)
715 return IRQ_HANDLED; 722 return IRQ_HANDLED;
716} 723}
717 724
725#ifdef CONFIG_NET_POLL_CONTROLLER
726static void uli526x_poll(struct net_device *dev)
727{
728 /* ISR grabs the irqsave lock, so this should be safe */
729 uli526x_interrupt(dev->irq, dev);
730}
731#endif
718 732
719/* 733/*
720 * Free TX resource after TX complete 734 * Free TX resource after TX complete
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 0ce07a339c7e..7ab94c825b57 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -313,6 +313,21 @@ static __inline__ ssize_t tun_get_user(struct tun_struct *tun, struct iovec *iv,
313 313
314 switch (tun->flags & TUN_TYPE_MASK) { 314 switch (tun->flags & TUN_TYPE_MASK) {
315 case TUN_TUN_DEV: 315 case TUN_TUN_DEV:
316 if (tun->flags & TUN_NO_PI) {
317 switch (skb->data[0] & 0xf0) {
318 case 0x40:
319 pi.proto = htons(ETH_P_IP);
320 break;
321 case 0x60:
322 pi.proto = htons(ETH_P_IPV6);
323 break;
324 default:
325 tun->dev->stats.rx_dropped++;
326 kfree_skb(skb);
327 return -EINVAL;
328 }
329 }
330
316 skb_reset_mac_header(skb); 331 skb_reset_mac_header(skb);
317 skb->protocol = pi.proto; 332 skb->protocol = pi.proto;
318 skb->dev = tun->dev; 333 skb->dev = tun->dev;
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index ca0bdac07a78..fb0b918e5ccb 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -237,7 +237,7 @@ static struct sk_buff *get_new_skb(struct ucc_geth_private *ugeth,
237 skb->dev = ugeth->dev; 237 skb->dev = ugeth->dev;
238 238
239 out_be32(&((struct qe_bd __iomem *)bd)->buf, 239 out_be32(&((struct qe_bd __iomem *)bd)->buf,
240 dma_map_single(NULL, 240 dma_map_single(&ugeth->dev->dev,
241 skb->data, 241 skb->data,
242 ugeth->ug_info->uf_info.max_rx_buf_length + 242 ugeth->ug_info->uf_info.max_rx_buf_length +
243 UCC_GETH_RX_DATA_BUF_ALIGNMENT, 243 UCC_GETH_RX_DATA_BUF_ALIGNMENT,
@@ -2158,7 +2158,7 @@ static void ucc_geth_memclean(struct ucc_geth_private *ugeth)
2158 continue; 2158 continue;
2159 for (j = 0; j < ugeth->ug_info->bdRingLenTx[i]; j++) { 2159 for (j = 0; j < ugeth->ug_info->bdRingLenTx[i]; j++) {
2160 if (ugeth->tx_skbuff[i][j]) { 2160 if (ugeth->tx_skbuff[i][j]) {
2161 dma_unmap_single(NULL, 2161 dma_unmap_single(&ugeth->dev->dev,
2162 in_be32(&((struct qe_bd __iomem *)bd)->buf), 2162 in_be32(&((struct qe_bd __iomem *)bd)->buf),
2163 (in_be32((u32 __iomem *)bd) & 2163 (in_be32((u32 __iomem *)bd) &
2164 BD_LENGTH_MASK), 2164 BD_LENGTH_MASK),
@@ -2186,7 +2186,7 @@ static void ucc_geth_memclean(struct ucc_geth_private *ugeth)
2186 bd = ugeth->p_rx_bd_ring[i]; 2186 bd = ugeth->p_rx_bd_ring[i];
2187 for (j = 0; j < ugeth->ug_info->bdRingLenRx[i]; j++) { 2187 for (j = 0; j < ugeth->ug_info->bdRingLenRx[i]; j++) {
2188 if (ugeth->rx_skbuff[i][j]) { 2188 if (ugeth->rx_skbuff[i][j]) {
2189 dma_unmap_single(NULL, 2189 dma_unmap_single(&ugeth->dev->dev,
2190 in_be32(&((struct qe_bd __iomem *)bd)->buf), 2190 in_be32(&((struct qe_bd __iomem *)bd)->buf),
2191 ugeth->ug_info-> 2191 ugeth->ug_info->
2192 uf_info.max_rx_buf_length + 2192 uf_info.max_rx_buf_length +
@@ -3406,7 +3406,8 @@ static int ucc_geth_start_xmit(struct sk_buff *skb, struct net_device *dev)
3406 3406
3407 /* set up the buffer descriptor */ 3407 /* set up the buffer descriptor */
3408 out_be32(&((struct qe_bd __iomem *)bd)->buf, 3408 out_be32(&((struct qe_bd __iomem *)bd)->buf,
3409 dma_map_single(NULL, skb->data, skb->len, DMA_TO_DEVICE)); 3409 dma_map_single(&ugeth->dev->dev, skb->data,
3410 skb->len, DMA_TO_DEVICE));
3410 3411
3411 /* printk(KERN_DEBUG"skb->data is 0x%x\n",skb->data); */ 3412 /* printk(KERN_DEBUG"skb->data is 0x%x\n",skb->data); */
3412 3413
diff --git a/drivers/net/ucc_geth_ethtool.c b/drivers/net/ucc_geth_ethtool.c
index 299b7f176950..f5839c4a5cbd 100644
--- a/drivers/net/ucc_geth_ethtool.c
+++ b/drivers/net/ucc_geth_ethtool.c
@@ -73,6 +73,7 @@ static char tx_fw_stat_gstrings[][ETH_GSTRING_LEN] = {
73 "tx-frames-ok", 73 "tx-frames-ok",
74 "tx-excessive-differ-frames", 74 "tx-excessive-differ-frames",
75 "tx-256-511-frames", 75 "tx-256-511-frames",
76 "tx-512-1023-frames",
76 "tx-1024-1518-frames", 77 "tx-1024-1518-frames",
77 "tx-jumbo-frames", 78 "tx-jumbo-frames",
78}; 79};
@@ -308,7 +309,7 @@ static void uec_get_strings(struct net_device *netdev, u32 stringset, u8 *buf)
308 buf += UEC_TX_FW_STATS_LEN * ETH_GSTRING_LEN; 309 buf += UEC_TX_FW_STATS_LEN * ETH_GSTRING_LEN;
309 } 310 }
310 if (stats_mode & UCC_GETH_STATISTICS_GATHERING_MODE_FIRMWARE_RX) 311 if (stats_mode & UCC_GETH_STATISTICS_GATHERING_MODE_FIRMWARE_RX)
311 memcpy(buf, tx_fw_stat_gstrings, UEC_RX_FW_STATS_LEN * 312 memcpy(buf, rx_fw_stat_gstrings, UEC_RX_FW_STATS_LEN *
312 ETH_GSTRING_LEN); 313 ETH_GSTRING_LEN);
313} 314}
314 315
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
index dc6f097062df..37ecf845edfe 100644
--- a/drivers/net/usb/asix.c
+++ b/drivers/net/usb/asix.c
@@ -1440,6 +1440,10 @@ static const struct usb_device_id products [] = {
1440 // Belkin F5D5055 1440 // Belkin F5D5055
1441 USB_DEVICE(0x050d, 0x5055), 1441 USB_DEVICE(0x050d, 0x5055),
1442 .driver_info = (unsigned long) &ax88178_info, 1442 .driver_info = (unsigned long) &ax88178_info,
1443}, {
1444 // Apple USB Ethernet Adapter
1445 USB_DEVICE(0x05ac, 0x1402),
1446 .driver_info = (unsigned long) &ax88772_info,
1443}, 1447},
1444 { }, // END 1448 { }, // END
1445}; 1449};
diff --git a/drivers/net/usb/catc.c b/drivers/net/usb/catc.c
index 76752d84a30f..22c17bbacb69 100644
--- a/drivers/net/usb/catc.c
+++ b/drivers/net/usb/catc.c
@@ -423,7 +423,10 @@ static int catc_hard_start_xmit(struct sk_buff *skb, struct net_device *netdev)
423 423
424 catc->tx_ptr = (((catc->tx_ptr - 1) >> 6) + 1) << 6; 424 catc->tx_ptr = (((catc->tx_ptr - 1) >> 6) + 1) << 6;
425 tx_buf = catc->tx_buf[catc->tx_idx] + catc->tx_ptr; 425 tx_buf = catc->tx_buf[catc->tx_idx] + catc->tx_ptr;
426 *((u16*)tx_buf) = (catc->is_f5u011) ? cpu_to_be16((u16)skb->len) : cpu_to_le16((u16)skb->len); 426 if (catc->is_f5u011)
427 *(__be16 *)tx_buf = cpu_to_be16(skb->len);
428 else
429 *(__le16 *)tx_buf = cpu_to_le16(skb->len);
427 skb_copy_from_linear_data(skb, tx_buf + 2, skb->len); 430 skb_copy_from_linear_data(skb, tx_buf + 2, skb->len);
428 catc->tx_ptr += skb->len + 2; 431 catc->tx_ptr += skb->len + 2;
429 432
diff --git a/drivers/net/usb/cdc_subset.c b/drivers/net/usb/cdc_subset.c
index 0ec7936cbe21..c66b9c324f54 100644
--- a/drivers/net/usb/cdc_subset.c
+++ b/drivers/net/usb/cdc_subset.c
@@ -218,7 +218,7 @@ static const struct driver_info blob_info = {
218/*-------------------------------------------------------------------------*/ 218/*-------------------------------------------------------------------------*/
219 219
220#ifndef HAVE_HARDWARE 220#ifndef HAVE_HARDWARE
221#error You need to configure some hardware for this driver 221#warning You need to configure some hardware for this driver
222#endif 222#endif
223 223
224/* 224/*
diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c
index 0dcfc0310264..7c66b052f55a 100644
--- a/drivers/net/usb/kaweth.c
+++ b/drivers/net/usb/kaweth.c
@@ -706,7 +706,7 @@ static void kaweth_kill_urbs(struct kaweth_device *kaweth)
706 usb_kill_urb(kaweth->rx_urb); 706 usb_kill_urb(kaweth->rx_urb);
707 usb_kill_urb(kaweth->tx_urb); 707 usb_kill_urb(kaweth->tx_urb);
708 708
709 flush_scheduled_work(); 709 cancel_delayed_work_sync(&kaweth->lowmem_work);
710 710
711 /* a scheduled work may have resubmitted, 711 /* a scheduled work may have resubmitted,
712 we hit them again */ 712 we hit them again */
diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c
index 21a7785cb8b6..ae467f182c40 100644
--- a/drivers/net/usb/rndis_host.c
+++ b/drivers/net/usb/rndis_host.c
@@ -194,7 +194,7 @@ int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf)
194 dev_dbg(&info->control->dev, 194 dev_dbg(&info->control->dev,
195 "rndis response error, code %d\n", retval); 195 "rndis response error, code %d\n", retval);
196 } 196 }
197 msleep(2); 197 msleep(20);
198 } 198 }
199 dev_dbg(&info->control->dev, "rndis response timeout\n"); 199 dev_dbg(&info->control->dev, "rndis response timeout\n");
200 return -ETIMEDOUT; 200 return -ETIMEDOUT;
@@ -283,8 +283,8 @@ generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags)
283 struct rndis_set_c *set_c; 283 struct rndis_set_c *set_c;
284 struct rndis_halt *halt; 284 struct rndis_halt *halt;
285 } u; 285 } u;
286 u32 tmp, phym_unspec; 286 u32 tmp;
287 __le32 *phym; 287 __le32 phym_unspec, *phym;
288 int reply_len; 288 int reply_len;
289 unsigned char *bp; 289 unsigned char *bp;
290 290
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index f926b5ab3d09..4452306d5328 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -44,9 +44,16 @@ struct virtnet_info
44 /* The skb we couldn't send because buffers were full. */ 44 /* The skb we couldn't send because buffers were full. */
45 struct sk_buff *last_xmit_skb; 45 struct sk_buff *last_xmit_skb;
46 46
47 /* If we need to free in a timer, this is it. */
48 struct timer_list xmit_free_timer;
49
47 /* Number of input buffers, and max we've ever had. */ 50 /* Number of input buffers, and max we've ever had. */
48 unsigned int num, max; 51 unsigned int num, max;
49 52
53 /* For cleaning up after transmission. */
54 struct tasklet_struct tasklet;
55 bool free_in_tasklet;
56
50 /* Receive & send queues. */ 57 /* Receive & send queues. */
51 struct sk_buff_head recv; 58 struct sk_buff_head recv;
52 struct sk_buff_head send; 59 struct sk_buff_head send;
@@ -68,8 +75,13 @@ static void skb_xmit_done(struct virtqueue *svq)
68 75
69 /* Suppress further interrupts. */ 76 /* Suppress further interrupts. */
70 svq->vq_ops->disable_cb(svq); 77 svq->vq_ops->disable_cb(svq);
71 /* We were waiting for more output buffers. */ 78
79 /* We were probably waiting for more output buffers. */
72 netif_wake_queue(vi->dev); 80 netif_wake_queue(vi->dev);
81
82 /* Make sure we re-xmit last_xmit_skb: if there are no more packets
83 * queued, start_xmit won't be called. */
84 tasklet_schedule(&vi->tasklet);
73} 85}
74 86
75static void receive_skb(struct net_device *dev, struct sk_buff *skb, 87static void receive_skb(struct net_device *dev, struct sk_buff *skb,
@@ -86,9 +98,7 @@ static void receive_skb(struct net_device *dev, struct sk_buff *skb,
86 BUG_ON(len > MAX_PACKET_LEN); 98 BUG_ON(len > MAX_PACKET_LEN);
87 99
88 skb_trim(skb, len); 100 skb_trim(skb, len);
89 skb->protocol = eth_type_trans(skb, dev); 101
90 pr_debug("Receiving skb proto 0x%04x len %i type %i\n",
91 ntohs(skb->protocol), skb->len, skb->pkt_type);
92 dev->stats.rx_bytes += skb->len; 102 dev->stats.rx_bytes += skb->len;
93 dev->stats.rx_packets++; 103 dev->stats.rx_packets++;
94 104
@@ -98,6 +108,10 @@ static void receive_skb(struct net_device *dev, struct sk_buff *skb,
98 goto frame_err; 108 goto frame_err;
99 } 109 }
100 110
111 skb->protocol = eth_type_trans(skb, dev);
112 pr_debug("Receiving skb proto 0x%04x len %i type %i\n",
113 ntohs(skb->protocol), skb->len, skb->pkt_type);
114
101 if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) { 115 if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) {
102 pr_debug("GSO!\n"); 116 pr_debug("GSO!\n");
103 switch (hdr->gso_type & ~VIRTIO_NET_HDR_GSO_ECN) { 117 switch (hdr->gso_type & ~VIRTIO_NET_HDR_GSO_ECN) {
@@ -230,9 +244,25 @@ static void free_old_xmit_skbs(struct virtnet_info *vi)
230 } 244 }
231} 245}
232 246
247/* If the virtio transport doesn't always notify us when all in-flight packets
248 * are consumed, we fall back to using this function on a timer to free them. */
249static void xmit_free(unsigned long data)
250{
251 struct virtnet_info *vi = (void *)data;
252
253 netif_tx_lock(vi->dev);
254
255 free_old_xmit_skbs(vi);
256
257 if (!skb_queue_empty(&vi->send))
258 mod_timer(&vi->xmit_free_timer, jiffies + (HZ/10));
259
260 netif_tx_unlock(vi->dev);
261}
262
233static int xmit_skb(struct virtnet_info *vi, struct sk_buff *skb) 263static int xmit_skb(struct virtnet_info *vi, struct sk_buff *skb)
234{ 264{
235 int num; 265 int num, err;
236 struct scatterlist sg[2+MAX_SKB_FRAGS]; 266 struct scatterlist sg[2+MAX_SKB_FRAGS];
237 struct virtio_net_hdr *hdr; 267 struct virtio_net_hdr *hdr;
238 const unsigned char *dest = ((struct ethhdr *)skb->data)->h_dest; 268 const unsigned char *dest = ((struct ethhdr *)skb->data)->h_dest;
@@ -275,7 +305,25 @@ static int xmit_skb(struct virtnet_info *vi, struct sk_buff *skb)
275 vnet_hdr_to_sg(sg, skb); 305 vnet_hdr_to_sg(sg, skb);
276 num = skb_to_sgvec(skb, sg+1, 0, skb->len) + 1; 306 num = skb_to_sgvec(skb, sg+1, 0, skb->len) + 1;
277 307
278 return vi->svq->vq_ops->add_buf(vi->svq, sg, num, 0, skb); 308 err = vi->svq->vq_ops->add_buf(vi->svq, sg, num, 0, skb);
309 if (!err && !vi->free_in_tasklet)
310 mod_timer(&vi->xmit_free_timer, jiffies + (HZ/10));
311
312 return err;
313}
314
315static void xmit_tasklet(unsigned long data)
316{
317 struct virtnet_info *vi = (void *)data;
318
319 netif_tx_lock_bh(vi->dev);
320 if (vi->last_xmit_skb && xmit_skb(vi, vi->last_xmit_skb) == 0) {
321 vi->svq->vq_ops->kick(vi->svq);
322 vi->last_xmit_skb = NULL;
323 }
324 if (vi->free_in_tasklet)
325 free_old_xmit_skbs(vi);
326 netif_tx_unlock_bh(vi->dev);
279} 327}
280 328
281static int start_xmit(struct sk_buff *skb, struct net_device *dev) 329static int start_xmit(struct sk_buff *skb, struct net_device *dev)
@@ -287,21 +335,25 @@ again:
287 free_old_xmit_skbs(vi); 335 free_old_xmit_skbs(vi);
288 336
289 /* If we has a buffer left over from last time, send it now. */ 337 /* If we has a buffer left over from last time, send it now. */
290 if (vi->last_xmit_skb) { 338 if (unlikely(vi->last_xmit_skb)) {
291 if (xmit_skb(vi, vi->last_xmit_skb) != 0) { 339 if (xmit_skb(vi, vi->last_xmit_skb) != 0) {
292 /* Drop this skb: we only queue one. */ 340 /* Drop this skb: we only queue one. */
293 vi->dev->stats.tx_dropped++; 341 vi->dev->stats.tx_dropped++;
294 kfree_skb(skb); 342 kfree_skb(skb);
343 skb = NULL;
295 goto stop_queue; 344 goto stop_queue;
296 } 345 }
297 vi->last_xmit_skb = NULL; 346 vi->last_xmit_skb = NULL;
298 } 347 }
299 348
300 /* Put new one in send queue and do transmit */ 349 /* Put new one in send queue and do transmit */
301 __skb_queue_head(&vi->send, skb); 350 if (likely(skb)) {
302 if (xmit_skb(vi, skb) != 0) { 351 __skb_queue_head(&vi->send, skb);
303 vi->last_xmit_skb = skb; 352 if (xmit_skb(vi, skb) != 0) {
304 goto stop_queue; 353 vi->last_xmit_skb = skb;
354 skb = NULL;
355 goto stop_queue;
356 }
305 } 357 }
306done: 358done:
307 vi->svq->vq_ops->kick(vi->svq); 359 vi->svq->vq_ops->kick(vi->svq);
@@ -411,6 +463,10 @@ static int virtnet_probe(struct virtio_device *vdev)
411 vi->vdev = vdev; 463 vi->vdev = vdev;
412 vdev->priv = vi; 464 vdev->priv = vi;
413 465
466 /* If they give us a callback when all buffers are done, we don't need
467 * the timer. */
468 vi->free_in_tasklet = virtio_has_feature(vdev,VIRTIO_F_NOTIFY_ON_EMPTY);
469
414 /* We expect two virtqueues, receive then send. */ 470 /* We expect two virtqueues, receive then send. */
415 vi->rvq = vdev->config->find_vq(vdev, 0, skb_recv_done); 471 vi->rvq = vdev->config->find_vq(vdev, 0, skb_recv_done);
416 if (IS_ERR(vi->rvq)) { 472 if (IS_ERR(vi->rvq)) {
@@ -428,6 +484,11 @@ static int virtnet_probe(struct virtio_device *vdev)
428 skb_queue_head_init(&vi->recv); 484 skb_queue_head_init(&vi->recv);
429 skb_queue_head_init(&vi->send); 485 skb_queue_head_init(&vi->send);
430 486
487 tasklet_init(&vi->tasklet, xmit_tasklet, (unsigned long)vi);
488
489 if (!vi->free_in_tasklet)
490 setup_timer(&vi->xmit_free_timer, xmit_free, (unsigned long)vi);
491
431 err = register_netdev(dev); 492 err = register_netdev(dev);
432 if (err) { 493 if (err) {
433 pr_debug("virtio_net: registering device failed\n"); 494 pr_debug("virtio_net: registering device failed\n");
@@ -465,13 +526,15 @@ static void virtnet_remove(struct virtio_device *vdev)
465 /* Stop all the virtqueues. */ 526 /* Stop all the virtqueues. */
466 vdev->config->reset(vdev); 527 vdev->config->reset(vdev);
467 528
529 if (!vi->free_in_tasklet)
530 del_timer_sync(&vi->xmit_free_timer);
531
468 /* Free our skbs in send and recv queues, if any. */ 532 /* Free our skbs in send and recv queues, if any. */
469 while ((skb = __skb_dequeue(&vi->recv)) != NULL) { 533 while ((skb = __skb_dequeue(&vi->recv)) != NULL) {
470 kfree_skb(skb); 534 kfree_skb(skb);
471 vi->num--; 535 vi->num--;
472 } 536 }
473 while ((skb = __skb_dequeue(&vi->send)) != NULL) 537 __skb_queue_purge(&vi->send);
474 kfree_skb(skb);
475 538
476 BUG_ON(vi->num != 0); 539 BUG_ON(vi->num != 0);
477 540
@@ -489,7 +552,7 @@ static struct virtio_device_id id_table[] = {
489static unsigned int features[] = { 552static unsigned int features[] = {
490 VIRTIO_NET_F_CSUM, VIRTIO_NET_F_GSO, VIRTIO_NET_F_MAC, 553 VIRTIO_NET_F_CSUM, VIRTIO_NET_F_GSO, VIRTIO_NET_F_MAC,
491 VIRTIO_NET_F_HOST_TSO4, VIRTIO_NET_F_HOST_UFO, VIRTIO_NET_F_HOST_TSO6, 554 VIRTIO_NET_F_HOST_TSO4, VIRTIO_NET_F_HOST_UFO, VIRTIO_NET_F_HOST_TSO6,
492 VIRTIO_NET_F_HOST_ECN, 555 VIRTIO_NET_F_HOST_ECN, VIRTIO_F_NOTIFY_ON_EMPTY,
493}; 556};
494 557
495static struct virtio_driver virtio_net = { 558static struct virtio_driver virtio_net = {
diff --git a/drivers/net/wan/hdlc.c b/drivers/net/wan/hdlc.c
index 9a83c9d5b8cf..7f984895b0d5 100644
--- a/drivers/net/wan/hdlc.c
+++ b/drivers/net/wan/hdlc.c
@@ -43,8 +43,7 @@ static const char* version = "HDLC support module revision 1.22";
43 43
44#undef DEBUG_LINK 44#undef DEBUG_LINK
45 45
46static struct hdlc_proto *first_proto = NULL; 46static struct hdlc_proto *first_proto;
47
48 47
49static int hdlc_change_mtu(struct net_device *dev, int new_mtu) 48static int hdlc_change_mtu(struct net_device *dev, int new_mtu)
50{ 49{
@@ -314,21 +313,25 @@ void detach_hdlc_protocol(struct net_device *dev)
314 313
315void register_hdlc_protocol(struct hdlc_proto *proto) 314void register_hdlc_protocol(struct hdlc_proto *proto)
316{ 315{
316 rtnl_lock();
317 proto->next = first_proto; 317 proto->next = first_proto;
318 first_proto = proto; 318 first_proto = proto;
319 rtnl_unlock();
319} 320}
320 321
321 322
322void unregister_hdlc_protocol(struct hdlc_proto *proto) 323void unregister_hdlc_protocol(struct hdlc_proto *proto)
323{ 324{
324 struct hdlc_proto **p = &first_proto; 325 struct hdlc_proto **p;
325 while (*p) { 326
326 if (*p == proto) { 327 rtnl_lock();
327 *p = proto->next; 328 p = &first_proto;
328 return; 329 while (*p != proto) {
329 } 330 BUG_ON(!*p);
330 p = &((*p)->next); 331 p = &((*p)->next);
331 } 332 }
333 *p = proto->next;
334 rtnl_unlock();
332} 335}
333 336
334 337
diff --git a/drivers/net/wan/hdlc_cisco.c b/drivers/net/wan/hdlc_cisco.c
index 7133c688cf20..762d21c1c703 100644
--- a/drivers/net/wan/hdlc_cisco.c
+++ b/drivers/net/wan/hdlc_cisco.c
@@ -56,6 +56,7 @@ struct cisco_state {
56 cisco_proto settings; 56 cisco_proto settings;
57 57
58 struct timer_list timer; 58 struct timer_list timer;
59 spinlock_t lock;
59 unsigned long last_poll; 60 unsigned long last_poll;
60 int up; 61 int up;
61 int request_sent; 62 int request_sent;
@@ -158,6 +159,7 @@ static int cisco_rx(struct sk_buff *skb)
158{ 159{
159 struct net_device *dev = skb->dev; 160 struct net_device *dev = skb->dev;
160 hdlc_device *hdlc = dev_to_hdlc(dev); 161 hdlc_device *hdlc = dev_to_hdlc(dev);
162 struct cisco_state *st = state(hdlc);
161 struct hdlc_header *data = (struct hdlc_header*)skb->data; 163 struct hdlc_header *data = (struct hdlc_header*)skb->data;
162 struct cisco_packet *cisco_data; 164 struct cisco_packet *cisco_data;
163 struct in_device *in_dev; 165 struct in_device *in_dev;
@@ -220,11 +222,12 @@ static int cisco_rx(struct sk_buff *skb)
220 goto rx_error; 222 goto rx_error;
221 223
222 case CISCO_KEEPALIVE_REQ: 224 case CISCO_KEEPALIVE_REQ:
223 state(hdlc)->rxseq = ntohl(cisco_data->par1); 225 spin_lock(&st->lock);
224 if (state(hdlc)->request_sent && 226 st->rxseq = ntohl(cisco_data->par1);
225 ntohl(cisco_data->par2) == state(hdlc)->txseq) { 227 if (st->request_sent &&
226 state(hdlc)->last_poll = jiffies; 228 ntohl(cisco_data->par2) == st->txseq) {
227 if (!state(hdlc)->up) { 229 st->last_poll = jiffies;
230 if (!st->up) {
228 u32 sec, min, hrs, days; 231 u32 sec, min, hrs, days;
229 sec = ntohl(cisco_data->time) / 1000; 232 sec = ntohl(cisco_data->time) / 1000;
230 min = sec / 60; sec -= min * 60; 233 min = sec / 60; sec -= min * 60;
@@ -232,12 +235,12 @@ static int cisco_rx(struct sk_buff *skb)
232 days = hrs / 24; hrs -= days * 24; 235 days = hrs / 24; hrs -= days * 24;
233 printk(KERN_INFO "%s: Link up (peer " 236 printk(KERN_INFO "%s: Link up (peer "
234 "uptime %ud%uh%um%us)\n", 237 "uptime %ud%uh%um%us)\n",
235 dev->name, days, hrs, 238 dev->name, days, hrs, min, sec);
236 min, sec);
237 netif_dormant_off(dev); 239 netif_dormant_off(dev);
238 state(hdlc)->up = 1; 240 st->up = 1;
239 } 241 }
240 } 242 }
243 spin_unlock(&st->lock);
241 244
242 dev_kfree_skb_any(skb); 245 dev_kfree_skb_any(skb);
243 return NET_RX_SUCCESS; 246 return NET_RX_SUCCESS;
@@ -261,24 +264,25 @@ static void cisco_timer(unsigned long arg)
261{ 264{
262 struct net_device *dev = (struct net_device *)arg; 265 struct net_device *dev = (struct net_device *)arg;
263 hdlc_device *hdlc = dev_to_hdlc(dev); 266 hdlc_device *hdlc = dev_to_hdlc(dev);
267 struct cisco_state *st = state(hdlc);
264 268
265 if (state(hdlc)->up && 269 spin_lock(&st->lock);
266 time_after(jiffies, state(hdlc)->last_poll + 270 if (st->up &&
267 state(hdlc)->settings.timeout * HZ)) { 271 time_after(jiffies, st->last_poll + st->settings.timeout * HZ)) {
268 state(hdlc)->up = 0; 272 st->up = 0;
269 printk(KERN_INFO "%s: Link down\n", dev->name); 273 printk(KERN_INFO "%s: Link down\n", dev->name);
270 netif_dormant_on(dev); 274 netif_dormant_on(dev);
271 } 275 }
272 276
273 cisco_keepalive_send(dev, CISCO_KEEPALIVE_REQ, 277 cisco_keepalive_send(dev, CISCO_KEEPALIVE_REQ, htonl(++st->txseq),
274 htonl(++state(hdlc)->txseq), 278 htonl(st->rxseq));
275 htonl(state(hdlc)->rxseq)); 279 st->request_sent = 1;
276 state(hdlc)->request_sent = 1; 280 spin_unlock(&st->lock);
277 state(hdlc)->timer.expires = jiffies + 281
278 state(hdlc)->settings.interval * HZ; 282 st->timer.expires = jiffies + st->settings.interval * HZ;
279 state(hdlc)->timer.function = cisco_timer; 283 st->timer.function = cisco_timer;
280 state(hdlc)->timer.data = arg; 284 st->timer.data = arg;
281 add_timer(&state(hdlc)->timer); 285 add_timer(&st->timer);
282} 286}
283 287
284 288
@@ -286,15 +290,20 @@ static void cisco_timer(unsigned long arg)
286static void cisco_start(struct net_device *dev) 290static void cisco_start(struct net_device *dev)
287{ 291{
288 hdlc_device *hdlc = dev_to_hdlc(dev); 292 hdlc_device *hdlc = dev_to_hdlc(dev);
289 state(hdlc)->up = 0; 293 struct cisco_state *st = state(hdlc);
290 state(hdlc)->request_sent = 0; 294 unsigned long flags;
291 state(hdlc)->txseq = state(hdlc)->rxseq = 0; 295
292 296 spin_lock_irqsave(&st->lock, flags);
293 init_timer(&state(hdlc)->timer); 297 st->up = 0;
294 state(hdlc)->timer.expires = jiffies + HZ; /*First poll after 1s*/ 298 st->request_sent = 0;
295 state(hdlc)->timer.function = cisco_timer; 299 st->txseq = st->rxseq = 0;
296 state(hdlc)->timer.data = (unsigned long)dev; 300 spin_unlock_irqrestore(&st->lock, flags);
297 add_timer(&state(hdlc)->timer); 301
302 init_timer(&st->timer);
303 st->timer.expires = jiffies + HZ; /* First poll after 1 s */
304 st->timer.function = cisco_timer;
305 st->timer.data = (unsigned long)dev;
306 add_timer(&st->timer);
298} 307}
299 308
300 309
@@ -302,10 +311,16 @@ static void cisco_start(struct net_device *dev)
302static void cisco_stop(struct net_device *dev) 311static void cisco_stop(struct net_device *dev)
303{ 312{
304 hdlc_device *hdlc = dev_to_hdlc(dev); 313 hdlc_device *hdlc = dev_to_hdlc(dev);
305 del_timer_sync(&state(hdlc)->timer); 314 struct cisco_state *st = state(hdlc);
315 unsigned long flags;
316
317 del_timer_sync(&st->timer);
318
319 spin_lock_irqsave(&st->lock, flags);
306 netif_dormant_on(dev); 320 netif_dormant_on(dev);
307 state(hdlc)->up = 0; 321 st->up = 0;
308 state(hdlc)->request_sent = 0; 322 st->request_sent = 0;
323 spin_unlock_irqrestore(&st->lock, flags);
309} 324}
310 325
311 326
@@ -367,6 +382,7 @@ static int cisco_ioctl(struct net_device *dev, struct ifreq *ifr)
367 return result; 382 return result;
368 383
369 memcpy(&state(hdlc)->settings, &new_settings, size); 384 memcpy(&state(hdlc)->settings, &new_settings, size);
385 spin_lock_init(&state(hdlc)->lock);
370 dev->hard_start_xmit = hdlc->xmit; 386 dev->hard_start_xmit = hdlc->xmit;
371 dev->header_ops = &cisco_header_ops; 387 dev->header_ops = &cisco_header_ops;
372 dev->type = ARPHRD_CISCO; 388 dev->type = ARPHRD_CISCO;
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c
index 249e18053d5f..069f8bb0a99f 100644
--- a/drivers/net/wan/x25_asy.c
+++ b/drivers/net/wan/x25_asy.c
@@ -32,6 +32,7 @@
32#include <linux/x25.h> 32#include <linux/x25.h>
33#include <linux/lapb.h> 33#include <linux/lapb.h>
34#include <linux/init.h> 34#include <linux/init.h>
35#include <linux/rtnetlink.h>
35#include "x25_asy.h" 36#include "x25_asy.h"
36 37
37#include <net/x25device.h> 38#include <net/x25device.h>
@@ -601,8 +602,10 @@ static void x25_asy_close_tty(struct tty_struct *tty)
601 if (!sl || sl->magic != X25_ASY_MAGIC) 602 if (!sl || sl->magic != X25_ASY_MAGIC)
602 return; 603 return;
603 604
605 rtnl_lock();
604 if (sl->dev->flags & IFF_UP) 606 if (sl->dev->flags & IFF_UP)
605 dev_close(sl->dev); 607 dev_close(sl->dev);
608 rtnl_unlock();
606 609
607 tty->disc_data = NULL; 610 tty->disc_data = NULL;
608 sl->tty = NULL; 611 sl->tty = NULL;
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 45f47c1c0a35..32019fb878d8 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -2668,6 +2668,7 @@ static struct net_device *init_wifidev(struct airo_info *ai,
2668 dev->irq = ethdev->irq; 2668 dev->irq = ethdev->irq;
2669 dev->base_addr = ethdev->base_addr; 2669 dev->base_addr = ethdev->base_addr;
2670 dev->wireless_data = ethdev->wireless_data; 2670 dev->wireless_data = ethdev->wireless_data;
2671 SET_NETDEV_DEV(dev, ethdev->dev.parent);
2671 memcpy(dev->dev_addr, ethdev->dev_addr, dev->addr_len); 2672 memcpy(dev->dev_addr, ethdev->dev_addr, dev->addr_len);
2672 err = register_netdev(dev); 2673 err = register_netdev(dev);
2673 if (err<0) { 2674 if (err<0) {
@@ -2904,7 +2905,7 @@ EXPORT_SYMBOL(init_airo_card);
2904 2905
2905static int waitbusy (struct airo_info *ai) { 2906static int waitbusy (struct airo_info *ai) {
2906 int delay = 0; 2907 int delay = 0;
2907 while ((IN4500 (ai, COMMAND) & COMMAND_BUSY) & (delay < 10000)) { 2908 while ((IN4500(ai, COMMAND) & COMMAND_BUSY) && (delay < 10000)) {
2908 udelay (10); 2909 udelay (10);
2909 if ((++delay % 20) == 0) 2910 if ((++delay % 20) == 0)
2910 OUT4500(ai, EVACK, EV_CLEARCOMMANDBUSY); 2911 OUT4500(ai, EVACK, EV_CLEARCOMMANDBUSY);
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index 4e5c8fc35200..635b9ac9aaa1 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -1787,6 +1787,8 @@ ath5k_tasklet_rx(unsigned long data)
1787 1787
1788 spin_lock(&sc->rxbuflock); 1788 spin_lock(&sc->rxbuflock);
1789 do { 1789 do {
1790 rxs.flag = 0;
1791
1790 if (unlikely(list_empty(&sc->rxbuf))) { 1792 if (unlikely(list_empty(&sc->rxbuf))) {
1791 ATH5K_WARN(sc, "empty rx buf pool\n"); 1793 ATH5K_WARN(sc, "empty rx buf pool\n");
1792 break; 1794 break;
diff --git a/drivers/net/wireless/ath5k/hw.c b/drivers/net/wireless/ath5k/hw.c
index 5fb1ae6ad3e2..77990b56860b 100644
--- a/drivers/net/wireless/ath5k/hw.c
+++ b/drivers/net/wireless/ath5k/hw.c
@@ -4119,6 +4119,7 @@ static int ath5k_hw_proc_5210_rx_status(struct ath5k_hw *ah,
4119 rs->rs_tstamp = AR5K_REG_MS(rx_status->rx_status_1, 4119 rs->rs_tstamp = AR5K_REG_MS(rx_status->rx_status_1,
4120 AR5K_5210_RX_DESC_STATUS1_RECEIVE_TIMESTAMP); 4120 AR5K_5210_RX_DESC_STATUS1_RECEIVE_TIMESTAMP);
4121 rs->rs_status = 0; 4121 rs->rs_status = 0;
4122 rs->rs_phyerr = 0;
4122 4123
4123 /* 4124 /*
4124 * Key table status 4125 * Key table status
@@ -4145,7 +4146,7 @@ static int ath5k_hw_proc_5210_rx_status(struct ath5k_hw *ah,
4145 if (rx_status->rx_status_1 & 4146 if (rx_status->rx_status_1 &
4146 AR5K_5210_RX_DESC_STATUS1_PHY_ERROR) { 4147 AR5K_5210_RX_DESC_STATUS1_PHY_ERROR) {
4147 rs->rs_status |= AR5K_RXERR_PHY; 4148 rs->rs_status |= AR5K_RXERR_PHY;
4148 rs->rs_phyerr = AR5K_REG_MS(rx_status->rx_status_1, 4149 rs->rs_phyerr |= AR5K_REG_MS(rx_status->rx_status_1,
4149 AR5K_5210_RX_DESC_STATUS1_PHY_ERROR); 4150 AR5K_5210_RX_DESC_STATUS1_PHY_ERROR);
4150 } 4151 }
4151 4152
@@ -4193,6 +4194,7 @@ static int ath5k_hw_proc_5212_rx_status(struct ath5k_hw *ah,
4193 rs->rs_tstamp = AR5K_REG_MS(rx_status->rx_status_1, 4194 rs->rs_tstamp = AR5K_REG_MS(rx_status->rx_status_1,
4194 AR5K_5212_RX_DESC_STATUS1_RECEIVE_TIMESTAMP); 4195 AR5K_5212_RX_DESC_STATUS1_RECEIVE_TIMESTAMP);
4195 rs->rs_status = 0; 4196 rs->rs_status = 0;
4197 rs->rs_phyerr = 0;
4196 4198
4197 /* 4199 /*
4198 * Key table status 4200 * Key table status
@@ -4215,7 +4217,7 @@ static int ath5k_hw_proc_5212_rx_status(struct ath5k_hw *ah,
4215 if (rx_status->rx_status_1 & 4217 if (rx_status->rx_status_1 &
4216 AR5K_5212_RX_DESC_STATUS1_PHY_ERROR) { 4218 AR5K_5212_RX_DESC_STATUS1_PHY_ERROR) {
4217 rs->rs_status |= AR5K_RXERR_PHY; 4219 rs->rs_status |= AR5K_RXERR_PHY;
4218 rs->rs_phyerr = AR5K_REG_MS(rx_err->rx_error_1, 4220 rs->rs_phyerr |= AR5K_REG_MS(rx_err->rx_error_1,
4219 AR5K_RX_DESC_ERROR1_PHY_ERROR_CODE); 4221 AR5K_RX_DESC_ERROR1_PHY_ERROR_CODE);
4220 } 4222 }
4221 4223
diff --git a/drivers/net/wireless/b43/Kconfig b/drivers/net/wireless/b43/Kconfig
index f51b2d9b085b..1fa043d1802c 100644
--- a/drivers/net/wireless/b43/Kconfig
+++ b/drivers/net/wireless/b43/Kconfig
@@ -1,6 +1,6 @@
1config B43 1config B43
2 tristate "Broadcom 43xx wireless support (mac80211 stack)" 2 tristate "Broadcom 43xx wireless support (mac80211 stack)"
3 depends on SSB_POSSIBLE && MAC80211 && WLAN_80211 3 depends on SSB_POSSIBLE && MAC80211 && WLAN_80211 && HAS_DMA
4 select SSB 4 select SSB
5 select FW_LOADER 5 select FW_LOADER
6 select HW_RANDOM 6 select HW_RANDOM
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
index 37783cdd301a..d3db298c05fc 100644
--- a/drivers/net/wireless/b43/b43.h
+++ b/drivers/net/wireless/b43/b43.h
@@ -630,7 +630,6 @@ struct b43_pio {
630 630
631/* Context information for a noise calculation (Link Quality). */ 631/* Context information for a noise calculation (Link Quality). */
632struct b43_noise_calculation { 632struct b43_noise_calculation {
633 u8 channel_at_start;
634 bool calculation_running; 633 bool calculation_running;
635 u8 nr_samples; 634 u8 nr_samples;
636 s8 samples[8][4]; 635 s8 samples[8][4];
@@ -737,6 +736,7 @@ struct b43_wl {
737 struct ieee80211_tx_control beacon_txctl; 736 struct ieee80211_tx_control beacon_txctl;
738 bool beacon0_uploaded; 737 bool beacon0_uploaded;
739 bool beacon1_uploaded; 738 bool beacon1_uploaded;
739 bool beacon_templates_virgin; /* Never wrote the templates? */
740 struct work_struct beacon_update_trigger; 740 struct work_struct beacon_update_trigger;
741 741
742 /* The current QOS parameters for the 4 queues. 742 /* The current QOS parameters for the 4 queues.
diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c
index 6dcbb3c87e72..e23f2f172bd7 100644
--- a/drivers/net/wireless/b43/dma.c
+++ b/drivers/net/wireless/b43/dma.c
@@ -795,24 +795,49 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev,
795{ 795{
796 struct b43_dmaring *ring; 796 struct b43_dmaring *ring;
797 int err; 797 int err;
798 int nr_slots;
799 dma_addr_t dma_test; 798 dma_addr_t dma_test;
800 799
801 ring = kzalloc(sizeof(*ring), GFP_KERNEL); 800 ring = kzalloc(sizeof(*ring), GFP_KERNEL);
802 if (!ring) 801 if (!ring)
803 goto out; 802 goto out;
804 ring->type = type;
805 803
806 nr_slots = B43_RXRING_SLOTS; 804 ring->nr_slots = B43_RXRING_SLOTS;
807 if (for_tx) 805 if (for_tx)
808 nr_slots = B43_TXRING_SLOTS; 806 ring->nr_slots = B43_TXRING_SLOTS;
809 807
810 ring->meta = kcalloc(nr_slots, sizeof(struct b43_dmadesc_meta), 808 ring->meta = kcalloc(ring->nr_slots, sizeof(struct b43_dmadesc_meta),
811 GFP_KERNEL); 809 GFP_KERNEL);
812 if (!ring->meta) 810 if (!ring->meta)
813 goto err_kfree_ring; 811 goto err_kfree_ring;
812
813 ring->type = type;
814 ring->dev = dev;
815 ring->mmio_base = b43_dmacontroller_base(type, controller_index);
816 ring->index = controller_index;
817 if (type == B43_DMA_64BIT)
818 ring->ops = &dma64_ops;
819 else
820 ring->ops = &dma32_ops;
814 if (for_tx) { 821 if (for_tx) {
815 ring->txhdr_cache = kcalloc(nr_slots, 822 ring->tx = 1;
823 ring->current_slot = -1;
824 } else {
825 if (ring->index == 0) {
826 ring->rx_buffersize = B43_DMA0_RX_BUFFERSIZE;
827 ring->frameoffset = B43_DMA0_RX_FRAMEOFFSET;
828 } else if (ring->index == 3) {
829 ring->rx_buffersize = B43_DMA3_RX_BUFFERSIZE;
830 ring->frameoffset = B43_DMA3_RX_FRAMEOFFSET;
831 } else
832 B43_WARN_ON(1);
833 }
834 spin_lock_init(&ring->lock);
835#ifdef CONFIG_B43_DEBUG
836 ring->last_injected_overflow = jiffies;
837#endif
838
839 if (for_tx) {
840 ring->txhdr_cache = kcalloc(ring->nr_slots,
816 b43_txhdr_size(dev), 841 b43_txhdr_size(dev),
817 GFP_KERNEL); 842 GFP_KERNEL);
818 if (!ring->txhdr_cache) 843 if (!ring->txhdr_cache)
@@ -828,7 +853,7 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev,
828 b43_txhdr_size(dev), 1)) { 853 b43_txhdr_size(dev), 1)) {
829 /* ugh realloc */ 854 /* ugh realloc */
830 kfree(ring->txhdr_cache); 855 kfree(ring->txhdr_cache);
831 ring->txhdr_cache = kcalloc(nr_slots, 856 ring->txhdr_cache = kcalloc(ring->nr_slots,
832 b43_txhdr_size(dev), 857 b43_txhdr_size(dev),
833 GFP_KERNEL | GFP_DMA); 858 GFP_KERNEL | GFP_DMA);
834 if (!ring->txhdr_cache) 859 if (!ring->txhdr_cache)
@@ -853,32 +878,6 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev,
853 DMA_TO_DEVICE); 878 DMA_TO_DEVICE);
854 } 879 }
855 880
856 ring->dev = dev;
857 ring->nr_slots = nr_slots;
858 ring->mmio_base = b43_dmacontroller_base(type, controller_index);
859 ring->index = controller_index;
860 if (type == B43_DMA_64BIT)
861 ring->ops = &dma64_ops;
862 else
863 ring->ops = &dma32_ops;
864 if (for_tx) {
865 ring->tx = 1;
866 ring->current_slot = -1;
867 } else {
868 if (ring->index == 0) {
869 ring->rx_buffersize = B43_DMA0_RX_BUFFERSIZE;
870 ring->frameoffset = B43_DMA0_RX_FRAMEOFFSET;
871 } else if (ring->index == 3) {
872 ring->rx_buffersize = B43_DMA3_RX_BUFFERSIZE;
873 ring->frameoffset = B43_DMA3_RX_FRAMEOFFSET;
874 } else
875 B43_WARN_ON(1);
876 }
877 spin_lock_init(&ring->lock);
878#ifdef CONFIG_B43_DEBUG
879 ring->last_injected_overflow = jiffies;
880#endif
881
882 err = alloc_ringmemory(ring); 881 err = alloc_ringmemory(ring);
883 if (err) 882 if (err)
884 goto err_kfree_txhdr_cache; 883 goto err_kfree_txhdr_cache;
diff --git a/drivers/net/wireless/b43/leds.c b/drivers/net/wireless/b43/leds.c
index 36a9c42df835..76f4c7bad8b8 100644
--- a/drivers/net/wireless/b43/leds.c
+++ b/drivers/net/wireless/b43/leds.c
@@ -72,6 +72,9 @@ static void b43_led_brightness_set(struct led_classdev *led_dev,
72 struct b43_wldev *dev = led->dev; 72 struct b43_wldev *dev = led->dev;
73 bool radio_enabled; 73 bool radio_enabled;
74 74
75 if (unlikely(b43_status(dev) < B43_STAT_INITIALIZED))
76 return;
77
75 /* Checking the radio-enabled status here is slightly racy, 78 /* Checking the radio-enabled status here is slightly racy,
76 * but we want to avoid the locking overhead and we don't care 79 * but we want to avoid the locking overhead and we don't care
77 * whether the LED has the wrong state for a second. */ 80 * whether the LED has the wrong state for a second. */
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 8fdba9415c04..a70827793086 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -1145,7 +1145,6 @@ static void b43_generate_noise_sample(struct b43_wldev *dev)
1145 b43_jssi_write(dev, 0x7F7F7F7F); 1145 b43_jssi_write(dev, 0x7F7F7F7F);
1146 b43_write32(dev, B43_MMIO_MACCMD, 1146 b43_write32(dev, B43_MMIO_MACCMD,
1147 b43_read32(dev, B43_MMIO_MACCMD) | B43_MACCMD_BGNOISE); 1147 b43_read32(dev, B43_MMIO_MACCMD) | B43_MACCMD_BGNOISE);
1148 B43_WARN_ON(dev->noisecalc.channel_at_start != dev->phy.channel);
1149} 1148}
1150 1149
1151static void b43_calculate_link_quality(struct b43_wldev *dev) 1150static void b43_calculate_link_quality(struct b43_wldev *dev)
@@ -1154,7 +1153,6 @@ static void b43_calculate_link_quality(struct b43_wldev *dev)
1154 1153
1155 if (dev->noisecalc.calculation_running) 1154 if (dev->noisecalc.calculation_running)
1156 return; 1155 return;
1157 dev->noisecalc.channel_at_start = dev->phy.channel;
1158 dev->noisecalc.calculation_running = 1; 1156 dev->noisecalc.calculation_running = 1;
1159 dev->noisecalc.nr_samples = 0; 1157 dev->noisecalc.nr_samples = 0;
1160 1158
@@ -1171,9 +1169,16 @@ static void handle_irq_noise(struct b43_wldev *dev)
1171 1169
1172 /* Bottom half of Link Quality calculation. */ 1170 /* Bottom half of Link Quality calculation. */
1173 1171
1172 /* Possible race condition: It might be possible that the user
1173 * changed to a different channel in the meantime since we
1174 * started the calculation. We ignore that fact, since it's
1175 * not really that much of a problem. The background noise is
1176 * an estimation only anyway. Slightly wrong results will get damped
1177 * by the averaging of the 8 sample rounds. Additionally the
1178 * value is shortlived. So it will be replaced by the next noise
1179 * calculation round soon. */
1180
1174 B43_WARN_ON(!dev->noisecalc.calculation_running); 1181 B43_WARN_ON(!dev->noisecalc.calculation_running);
1175 if (dev->noisecalc.channel_at_start != phy->channel)
1176 goto drop_calculation;
1177 *((__le32 *)noise) = cpu_to_le32(b43_jssi_read(dev)); 1182 *((__le32 *)noise) = cpu_to_le32(b43_jssi_read(dev));
1178 if (noise[0] == 0x7F || noise[1] == 0x7F || 1183 if (noise[0] == 0x7F || noise[1] == 0x7F ||
1179 noise[2] == 0x7F || noise[3] == 0x7F) 1184 noise[2] == 0x7F || noise[3] == 0x7F)
@@ -1214,11 +1219,10 @@ static void handle_irq_noise(struct b43_wldev *dev)
1214 average -= 48; 1219 average -= 48;
1215 1220
1216 dev->stats.link_noise = average; 1221 dev->stats.link_noise = average;
1217 drop_calculation:
1218 dev->noisecalc.calculation_running = 0; 1222 dev->noisecalc.calculation_running = 0;
1219 return; 1223 return;
1220 } 1224 }
1221 generate_new: 1225generate_new:
1222 b43_generate_noise_sample(dev); 1226 b43_generate_noise_sample(dev);
1223} 1227}
1224 1228
@@ -1544,6 +1548,30 @@ static void b43_write_probe_resp_template(struct b43_wldev *dev,
1544 kfree(probe_resp_data); 1548 kfree(probe_resp_data);
1545} 1549}
1546 1550
1551static void b43_upload_beacon0(struct b43_wldev *dev)
1552{
1553 struct b43_wl *wl = dev->wl;
1554
1555 if (wl->beacon0_uploaded)
1556 return;
1557 b43_write_beacon_template(dev, 0x68, 0x18);
1558 /* FIXME: Probe resp upload doesn't really belong here,
1559 * but we don't use that feature anyway. */
1560 b43_write_probe_resp_template(dev, 0x268, 0x4A,
1561 &__b43_ratetable[3]);
1562 wl->beacon0_uploaded = 1;
1563}
1564
1565static void b43_upload_beacon1(struct b43_wldev *dev)
1566{
1567 struct b43_wl *wl = dev->wl;
1568
1569 if (wl->beacon1_uploaded)
1570 return;
1571 b43_write_beacon_template(dev, 0x468, 0x1A);
1572 wl->beacon1_uploaded = 1;
1573}
1574
1547static void handle_irq_beacon(struct b43_wldev *dev) 1575static void handle_irq_beacon(struct b43_wldev *dev)
1548{ 1576{
1549 struct b43_wl *wl = dev->wl; 1577 struct b43_wl *wl = dev->wl;
@@ -1568,24 +1596,27 @@ static void handle_irq_beacon(struct b43_wldev *dev)
1568 return; 1596 return;
1569 } 1597 }
1570 1598
1571 if (!beacon0_valid) { 1599 if (unlikely(wl->beacon_templates_virgin)) {
1572 if (!wl->beacon0_uploaded) { 1600 /* We never uploaded a beacon before.
1573 b43_write_beacon_template(dev, 0x68, 0x18); 1601 * Upload both templates now, but only mark one valid. */
1574 b43_write_probe_resp_template(dev, 0x268, 0x4A, 1602 wl->beacon_templates_virgin = 0;
1575 &__b43_ratetable[3]); 1603 b43_upload_beacon0(dev);
1576 wl->beacon0_uploaded = 1; 1604 b43_upload_beacon1(dev);
1577 }
1578 cmd = b43_read32(dev, B43_MMIO_MACCMD); 1605 cmd = b43_read32(dev, B43_MMIO_MACCMD);
1579 cmd |= B43_MACCMD_BEACON0_VALID; 1606 cmd |= B43_MACCMD_BEACON0_VALID;
1580 b43_write32(dev, B43_MMIO_MACCMD, cmd); 1607 b43_write32(dev, B43_MMIO_MACCMD, cmd);
1581 } else if (!beacon1_valid) { 1608 } else {
1582 if (!wl->beacon1_uploaded) { 1609 if (!beacon0_valid) {
1583 b43_write_beacon_template(dev, 0x468, 0x1A); 1610 b43_upload_beacon0(dev);
1584 wl->beacon1_uploaded = 1; 1611 cmd = b43_read32(dev, B43_MMIO_MACCMD);
1612 cmd |= B43_MACCMD_BEACON0_VALID;
1613 b43_write32(dev, B43_MMIO_MACCMD, cmd);
1614 } else if (!beacon1_valid) {
1615 b43_upload_beacon1(dev);
1616 cmd = b43_read32(dev, B43_MMIO_MACCMD);
1617 cmd |= B43_MACCMD_BEACON1_VALID;
1618 b43_write32(dev, B43_MMIO_MACCMD, cmd);
1585 } 1619 }
1586 cmd = b43_read32(dev, B43_MMIO_MACCMD);
1587 cmd |= B43_MACCMD_BEACON1_VALID;
1588 b43_write32(dev, B43_MMIO_MACCMD, cmd);
1589 } 1620 }
1590} 1621}
1591 1622
@@ -2852,12 +2883,11 @@ static int b43_op_tx(struct ieee80211_hw *hw,
2852 2883
2853 if (unlikely(skb->len < 2 + 2 + 6)) { 2884 if (unlikely(skb->len < 2 + 2 + 6)) {
2854 /* Too short, this can't be a valid frame. */ 2885 /* Too short, this can't be a valid frame. */
2855 dev_kfree_skb_any(skb); 2886 goto drop_packet;
2856 return NETDEV_TX_OK;
2857 } 2887 }
2858 B43_WARN_ON(skb_shinfo(skb)->nr_frags); 2888 B43_WARN_ON(skb_shinfo(skb)->nr_frags);
2859 if (unlikely(!dev)) 2889 if (unlikely(!dev))
2860 return NETDEV_TX_BUSY; 2890 goto drop_packet;
2861 2891
2862 /* Transmissions on seperate queues can run concurrently. */ 2892 /* Transmissions on seperate queues can run concurrently. */
2863 read_lock_irqsave(&wl->tx_lock, flags); 2893 read_lock_irqsave(&wl->tx_lock, flags);
@@ -2873,7 +2903,12 @@ static int b43_op_tx(struct ieee80211_hw *hw,
2873 read_unlock_irqrestore(&wl->tx_lock, flags); 2903 read_unlock_irqrestore(&wl->tx_lock, flags);
2874 2904
2875 if (unlikely(err)) 2905 if (unlikely(err))
2876 return NETDEV_TX_BUSY; 2906 goto drop_packet;
2907 return NETDEV_TX_OK;
2908
2909drop_packet:
2910 /* We can not transmit this packet. Drop it. */
2911 dev_kfree_skb_any(skb);
2877 return NETDEV_TX_OK; 2912 return NETDEV_TX_OK;
2878} 2913}
2879 2914
@@ -4073,6 +4108,9 @@ static int b43_op_start(struct ieee80211_hw *hw)
4073 wl->filter_flags = 0; 4108 wl->filter_flags = 0;
4074 wl->radiotap_enabled = 0; 4109 wl->radiotap_enabled = 0;
4075 b43_qos_clear(wl); 4110 b43_qos_clear(wl);
4111 wl->beacon0_uploaded = 0;
4112 wl->beacon1_uploaded = 0;
4113 wl->beacon_templates_virgin = 1;
4076 4114
4077 /* First register RFkill. 4115 /* First register RFkill.
4078 * LEDs that are registered later depend on it. */ 4116 * LEDs that are registered later depend on it. */
@@ -4241,7 +4279,9 @@ static void b43_chip_reset(struct work_struct *work)
4241 goto out; 4279 goto out;
4242 } 4280 }
4243 } 4281 }
4244 out: 4282out:
4283 if (err)
4284 wl->current_dev = NULL; /* Failed to init the dev. */
4245 mutex_unlock(&wl->mutex); 4285 mutex_unlock(&wl->mutex);
4246 if (err) 4286 if (err)
4247 b43err(wl, "Controller restart FAILED\n"); 4287 b43err(wl, "Controller restart FAILED\n");
@@ -4382,9 +4422,11 @@ static void b43_one_core_detach(struct ssb_device *dev)
4382 struct b43_wldev *wldev; 4422 struct b43_wldev *wldev;
4383 struct b43_wl *wl; 4423 struct b43_wl *wl;
4384 4424
4425 /* Do not cancel ieee80211-workqueue based work here.
4426 * See comment in b43_remove(). */
4427
4385 wldev = ssb_get_drvdata(dev); 4428 wldev = ssb_get_drvdata(dev);
4386 wl = wldev->wl; 4429 wl = wldev->wl;
4387 cancel_work_sync(&wldev->restart_work);
4388 b43_debugfs_remove_device(wldev); 4430 b43_debugfs_remove_device(wldev);
4389 b43_wireless_core_detach(wldev); 4431 b43_wireless_core_detach(wldev);
4390 list_del(&wldev->list); 4432 list_del(&wldev->list);
@@ -4569,6 +4611,10 @@ static void b43_remove(struct ssb_device *dev)
4569 struct b43_wl *wl = ssb_get_devtypedata(dev); 4611 struct b43_wl *wl = ssb_get_devtypedata(dev);
4570 struct b43_wldev *wldev = ssb_get_drvdata(dev); 4612 struct b43_wldev *wldev = ssb_get_drvdata(dev);
4571 4613
4614 /* We must cancel any work here before unregistering from ieee80211,
4615 * as the ieee80211 unreg will destroy the workqueue. */
4616 cancel_work_sync(&wldev->restart_work);
4617
4572 B43_WARN_ON(!wl); 4618 B43_WARN_ON(!wl);
4573 if (wl->current_dev == wldev) 4619 if (wl->current_dev == wldev)
4574 ieee80211_unregister_hw(wl->hw); 4620 ieee80211_unregister_hw(wl->hw);
diff --git a/drivers/net/wireless/b43legacy/Kconfig b/drivers/net/wireless/b43legacy/Kconfig
index 13c65faf0247..aef2298d37ac 100644
--- a/drivers/net/wireless/b43legacy/Kconfig
+++ b/drivers/net/wireless/b43legacy/Kconfig
@@ -1,6 +1,6 @@
1config B43LEGACY 1config B43LEGACY
2 tristate "Broadcom 43xx-legacy wireless support (mac80211 stack)" 2 tristate "Broadcom 43xx-legacy wireless support (mac80211 stack)"
3 depends on SSB_POSSIBLE && MAC80211 && WLAN_80211 3 depends on SSB_POSSIBLE && MAC80211 && WLAN_80211 && HAS_DMA
4 select SSB 4 select SSB
5 select FW_LOADER 5 select FW_LOADER
6 select HW_RANDOM 6 select HW_RANDOM
diff --git a/drivers/net/wireless/b43legacy/dma.c b/drivers/net/wireless/b43legacy/dma.c
index c990f87b107a..93ddc1cbcc8b 100644
--- a/drivers/net/wireless/b43legacy/dma.c
+++ b/drivers/net/wireless/b43legacy/dma.c
@@ -876,6 +876,7 @@ struct b43legacy_dmaring *b43legacy_setup_dmaring(struct b43legacy_wldev *dev,
876 if (!ring) 876 if (!ring)
877 goto out; 877 goto out;
878 ring->type = type; 878 ring->type = type;
879 ring->dev = dev;
879 880
880 nr_slots = B43legacy_RXRING_SLOTS; 881 nr_slots = B43legacy_RXRING_SLOTS;
881 if (for_tx) 882 if (for_tx)
@@ -922,7 +923,6 @@ struct b43legacy_dmaring *b43legacy_setup_dmaring(struct b43legacy_wldev *dev,
922 DMA_TO_DEVICE); 923 DMA_TO_DEVICE);
923 } 924 }
924 925
925 ring->dev = dev;
926 ring->nr_slots = nr_slots; 926 ring->nr_slots = nr_slots;
927 ring->mmio_base = b43legacy_dmacontroller_base(type, controller_index); 927 ring->mmio_base = b43legacy_dmacontroller_base(type, controller_index);
928 ring->index = controller_index; 928 ring->index = controller_index;
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index 14a5eea2573e..3e612d0a13e8 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -2378,8 +2378,10 @@ static int b43legacy_op_tx(struct ieee80211_hw *hw,
2378 } else 2378 } else
2379 err = b43legacy_dma_tx(dev, skb, ctl); 2379 err = b43legacy_dma_tx(dev, skb, ctl);
2380out: 2380out:
2381 if (unlikely(err)) 2381 if (unlikely(err)) {
2382 return NETDEV_TX_BUSY; 2382 /* Drop the packet. */
2383 dev_kfree_skb_any(skb);
2384 }
2383 return NETDEV_TX_OK; 2385 return NETDEV_TX_OK;
2384} 2386}
2385 2387
@@ -3039,7 +3041,6 @@ static void b43legacy_set_pretbtt(struct b43legacy_wldev *dev)
3039/* Locking: wl->mutex */ 3041/* Locking: wl->mutex */
3040static void b43legacy_wireless_core_exit(struct b43legacy_wldev *dev) 3042static void b43legacy_wireless_core_exit(struct b43legacy_wldev *dev)
3041{ 3043{
3042 struct b43legacy_wl *wl = dev->wl;
3043 struct b43legacy_phy *phy = &dev->phy; 3044 struct b43legacy_phy *phy = &dev->phy;
3044 u32 macctl; 3045 u32 macctl;
3045 3046
@@ -3054,12 +3055,6 @@ static void b43legacy_wireless_core_exit(struct b43legacy_wldev *dev)
3054 macctl |= B43legacy_MACCTL_PSM_JMP0; 3055 macctl |= B43legacy_MACCTL_PSM_JMP0;
3055 b43legacy_write32(dev, B43legacy_MMIO_MACCTL, macctl); 3056 b43legacy_write32(dev, B43legacy_MMIO_MACCTL, macctl);
3056 3057
3057 mutex_unlock(&wl->mutex);
3058 /* Must unlock as it would otherwise deadlock. No races here.
3059 * Cancel possibly pending workqueues. */
3060 cancel_work_sync(&dev->restart_work);
3061 mutex_lock(&wl->mutex);
3062
3063 b43legacy_leds_exit(dev); 3058 b43legacy_leds_exit(dev);
3064 b43legacy_rng_exit(dev->wl); 3059 b43legacy_rng_exit(dev->wl);
3065 b43legacy_pio_free(dev); 3060 b43legacy_pio_free(dev);
@@ -3486,6 +3481,8 @@ static void b43legacy_chip_reset(struct work_struct *work)
3486 } 3481 }
3487 } 3482 }
3488out: 3483out:
3484 if (err)
3485 wl->current_dev = NULL; /* Failed to init the dev. */
3489 mutex_unlock(&wl->mutex); 3486 mutex_unlock(&wl->mutex);
3490 if (err) 3487 if (err)
3491 b43legacyerr(wl, "Controller restart FAILED\n"); 3488 b43legacyerr(wl, "Controller restart FAILED\n");
@@ -3618,9 +3615,11 @@ static void b43legacy_one_core_detach(struct ssb_device *dev)
3618 struct b43legacy_wldev *wldev; 3615 struct b43legacy_wldev *wldev;
3619 struct b43legacy_wl *wl; 3616 struct b43legacy_wl *wl;
3620 3617
3618 /* Do not cancel ieee80211-workqueue based work here.
3619 * See comment in b43legacy_remove(). */
3620
3621 wldev = ssb_get_drvdata(dev); 3621 wldev = ssb_get_drvdata(dev);
3622 wl = wldev->wl; 3622 wl = wldev->wl;
3623 cancel_work_sync(&wldev->restart_work);
3624 b43legacy_debugfs_remove_device(wldev); 3623 b43legacy_debugfs_remove_device(wldev);
3625 b43legacy_wireless_core_detach(wldev); 3624 b43legacy_wireless_core_detach(wldev);
3626 list_del(&wldev->list); 3625 list_del(&wldev->list);
@@ -3789,6 +3788,10 @@ static void b43legacy_remove(struct ssb_device *dev)
3789 struct b43legacy_wl *wl = ssb_get_devtypedata(dev); 3788 struct b43legacy_wl *wl = ssb_get_devtypedata(dev);
3790 struct b43legacy_wldev *wldev = ssb_get_drvdata(dev); 3789 struct b43legacy_wldev *wldev = ssb_get_drvdata(dev);
3791 3790
3791 /* We must cancel any work here before unregistering from ieee80211,
3792 * as the ieee80211 unreg will destroy the workqueue. */
3793 cancel_work_sync(&wldev->restart_work);
3794
3792 B43legacy_WARN_ON(!wl); 3795 B43legacy_WARN_ON(!wl);
3793 if (wl->current_dev == wldev) 3796 if (wl->current_dev == wldev)
3794 ieee80211_unregister_hw(wl->hw); 3797 ieee80211_unregister_hw(wl->hw);
diff --git a/drivers/net/wireless/hostap/hostap_80211_rx.c b/drivers/net/wireless/hostap/hostap_80211_rx.c
index 4fd73809602e..020f450e9dba 100644
--- a/drivers/net/wireless/hostap/hostap_80211_rx.c
+++ b/drivers/net/wireless/hostap/hostap_80211_rx.c
@@ -64,7 +64,7 @@ int prism2_rx_80211(struct net_device *dev, struct sk_buff *skb,
64 int hdrlen, phdrlen, head_need, tail_need; 64 int hdrlen, phdrlen, head_need, tail_need;
65 u16 fc; 65 u16 fc;
66 int prism_header, ret; 66 int prism_header, ret;
67 struct ieee80211_hdr_4addr *hdr; 67 struct ieee80211_hdr_4addr *fhdr;
68 68
69 iface = netdev_priv(dev); 69 iface = netdev_priv(dev);
70 local = iface->local; 70 local = iface->local;
@@ -83,8 +83,8 @@ int prism2_rx_80211(struct net_device *dev, struct sk_buff *skb,
83 phdrlen = 0; 83 phdrlen = 0;
84 } 84 }
85 85
86 hdr = (struct ieee80211_hdr_4addr *) skb->data; 86 fhdr = (struct ieee80211_hdr_4addr *) skb->data;
87 fc = le16_to_cpu(hdr->frame_ctl); 87 fc = le16_to_cpu(fhdr->frame_ctl);
88 88
89 if (type == PRISM2_RX_MGMT && (fc & IEEE80211_FCTL_VERS)) { 89 if (type == PRISM2_RX_MGMT && (fc & IEEE80211_FCTL_VERS)) {
90 printk(KERN_DEBUG "%s: dropped management frame with header " 90 printk(KERN_DEBUG "%s: dropped management frame with header "
@@ -551,7 +551,7 @@ hostap_rx_frame_wds(local_info_t *local, struct ieee80211_hdr_4addr *hdr,
551 hdr->addr1[2] != 0xff || hdr->addr1[3] != 0xff || 551 hdr->addr1[2] != 0xff || hdr->addr1[3] != 0xff ||
552 hdr->addr1[4] != 0xff || hdr->addr1[5] != 0xff)) { 552 hdr->addr1[4] != 0xff || hdr->addr1[5] != 0xff)) {
553 /* RA (or BSSID) is not ours - drop */ 553 /* RA (or BSSID) is not ours - drop */
554 PDEBUG(DEBUG_EXTRA, "%s: received WDS frame with " 554 PDEBUG(DEBUG_EXTRA2, "%s: received WDS frame with "
555 "not own or broadcast %s=%s\n", 555 "not own or broadcast %s=%s\n",
556 local->dev->name, 556 local->dev->name,
557 fc & IEEE80211_FCTL_FROMDS ? "RA" : "BSSID", 557 fc & IEEE80211_FCTL_FROMDS ? "RA" : "BSSID",
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c
index 0acd9589c48c..ab981afd481d 100644
--- a/drivers/net/wireless/hostap/hostap_ap.c
+++ b/drivers/net/wireless/hostap/hostap_ap.c
@@ -1930,7 +1930,7 @@ static void handle_pspoll(local_info_t *local,
1930 PDEBUG(DEBUG_PS, " PSPOLL and AID[15:14] not set\n"); 1930 PDEBUG(DEBUG_PS, " PSPOLL and AID[15:14] not set\n");
1931 return; 1931 return;
1932 } 1932 }
1933 aid &= ~BIT(15) & ~BIT(14); 1933 aid &= ~(BIT(15) | BIT(14));
1934 if (aid == 0 || aid > MAX_AID_TABLE_SIZE) { 1934 if (aid == 0 || aid > MAX_AID_TABLE_SIZE) {
1935 PDEBUG(DEBUG_PS, " invalid aid=%d\n", aid); 1935 PDEBUG(DEBUG_PS, " invalid aid=%d\n", aid);
1936 return; 1936 return;
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
index 437a9bcc9bd3..80039a0ae027 100644
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -533,10 +533,10 @@ static void prism2_detach(struct pcmcia_device *link)
533do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) 533do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
534 534
535#define CFG_CHECK2(fn, retf) \ 535#define CFG_CHECK2(fn, retf) \
536do { int ret = (retf); \ 536do { int _ret = (retf); \
537if (ret != 0) { \ 537if (_ret != 0) { \
538 PDEBUG(DEBUG_EXTRA, "CardServices(" #fn ") returned %d\n", ret); \ 538 PDEBUG(DEBUG_EXTRA, "CardServices(" #fn ") returned %d\n", _ret); \
539 cs_error(link, fn, ret); \ 539 cs_error(link, fn, _ret); \
540 goto next_entry; \ 540 goto next_entry; \
541} \ 541} \
542} while (0) 542} while (0)
@@ -833,6 +833,7 @@ static struct pcmcia_device_id hostap_cs_ids[] = {
833 PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x0001), 833 PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x0001),
834 PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x7300), 834 PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x7300),
835/* PCMCIA_DEVICE_MANF_CARD(0xc00f, 0x0000), conflict with pcnet_cs */ 835/* PCMCIA_DEVICE_MANF_CARD(0xc00f, 0x0000), conflict with pcnet_cs */
836 PCMCIA_DEVICE_MANF_CARD(0xc250, 0x0002),
836 PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0002), 837 PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0002),
837 PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0005), 838 PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0005),
838 PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0010), 839 PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0010),
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c
index 7be68db6f300..936f52e3d95c 100644
--- a/drivers/net/wireless/hostap/hostap_hw.c
+++ b/drivers/net/wireless/hostap/hostap_hw.c
@@ -2835,7 +2835,7 @@ static void hostap_passive_scan(unsigned long data)
2835{ 2835{
2836 local_info_t *local = (local_info_t *) data; 2836 local_info_t *local = (local_info_t *) data;
2837 struct net_device *dev = local->dev; 2837 struct net_device *dev = local->dev;
2838 u16 channel; 2838 u16 chan;
2839 2839
2840 if (local->passive_scan_interval <= 0) 2840 if (local->passive_scan_interval <= 0)
2841 return; 2841 return;
@@ -2872,11 +2872,11 @@ static void hostap_passive_scan(unsigned long data)
2872 2872
2873 printk(KERN_DEBUG "%s: passive scan channel %d\n", 2873 printk(KERN_DEBUG "%s: passive scan channel %d\n",
2874 dev->name, local->passive_scan_channel); 2874 dev->name, local->passive_scan_channel);
2875 channel = local->passive_scan_channel; 2875 chan = local->passive_scan_channel;
2876 local->passive_scan_state = PASSIVE_SCAN_WAIT; 2876 local->passive_scan_state = PASSIVE_SCAN_WAIT;
2877 local->passive_scan_timer.expires = jiffies + HZ / 10; 2877 local->passive_scan_timer.expires = jiffies + HZ / 10;
2878 } else { 2878 } else {
2879 channel = local->channel; 2879 chan = local->channel;
2880 local->passive_scan_state = PASSIVE_SCAN_LISTEN; 2880 local->passive_scan_state = PASSIVE_SCAN_LISTEN;
2881 local->passive_scan_timer.expires = jiffies + 2881 local->passive_scan_timer.expires = jiffies +
2882 local->passive_scan_interval * HZ; 2882 local->passive_scan_interval * HZ;
@@ -2884,9 +2884,9 @@ static void hostap_passive_scan(unsigned long data)
2884 2884
2885 if (hfa384x_cmd_callback(dev, HFA384X_CMDCODE_TEST | 2885 if (hfa384x_cmd_callback(dev, HFA384X_CMDCODE_TEST |
2886 (HFA384X_TEST_CHANGE_CHANNEL << 8), 2886 (HFA384X_TEST_CHANGE_CHANNEL << 8),
2887 channel, NULL, 0)) 2887 chan, NULL, 0))
2888 printk(KERN_ERR "%s: passive scan channel set %d " 2888 printk(KERN_ERR "%s: passive scan channel set %d "
2889 "failed\n", dev->name, channel); 2889 "failed\n", dev->name, chan);
2890 2890
2891 add_timer(&local->passive_scan_timer); 2891 add_timer(&local->passive_scan_timer);
2892} 2892}
@@ -3276,11 +3276,6 @@ while (0)
3276 } 3276 }
3277 printk(KERN_INFO "%s: Registered netdevice %s\n", dev_info, dev->name); 3277 printk(KERN_INFO "%s: Registered netdevice %s\n", dev_info, dev->name);
3278 3278
3279#ifndef PRISM2_NO_PROCFS_DEBUG
3280 create_proc_read_entry("registers", 0, local->proc,
3281 prism2_registers_proc_read, local);
3282#endif /* PRISM2_NO_PROCFS_DEBUG */
3283
3284 hostap_init_data(local); 3279 hostap_init_data(local);
3285 return dev; 3280 return dev;
3286 3281
@@ -3307,6 +3302,10 @@ static int hostap_hw_ready(struct net_device *dev)
3307 netif_carrier_off(local->ddev); 3302 netif_carrier_off(local->ddev);
3308 } 3303 }
3309 hostap_init_proc(local); 3304 hostap_init_proc(local);
3305#ifndef PRISM2_NO_PROCFS_DEBUG
3306 create_proc_read_entry("registers", 0, local->proc,
3307 prism2_registers_proc_read, local);
3308#endif /* PRISM2_NO_PROCFS_DEBUG */
3310 hostap_init_ap_proc(local); 3309 hostap_init_ap_proc(local);
3311 return 0; 3310 return 0;
3312 } 3311 }
diff --git a/drivers/net/wireless/hostap/hostap_main.c b/drivers/net/wireless/hostap/hostap_main.c
index 20d387f6658c..a38e85f334df 100644
--- a/drivers/net/wireless/hostap/hostap_main.c
+++ b/drivers/net/wireless/hostap/hostap_main.c
@@ -594,7 +594,8 @@ void hostap_dump_tx_header(const char *name, const struct hfa384x_tx_frame *tx)
594} 594}
595 595
596 596
597int hostap_80211_header_parse(const struct sk_buff *skb, unsigned char *haddr) 597static int hostap_80211_header_parse(const struct sk_buff *skb,
598 unsigned char *haddr)
598{ 599{
599 struct hostap_interface *iface = netdev_priv(skb->dev); 600 struct hostap_interface *iface = netdev_priv(skb->dev);
600 local_info_t *local = iface->local; 601 local_info_t *local = iface->local;
@@ -682,7 +683,13 @@ static int prism2_close(struct net_device *dev)
682 netif_device_detach(dev); 683 netif_device_detach(dev);
683 } 684 }
684 685
685 flush_scheduled_work(); 686 cancel_work_sync(&local->reset_queue);
687 cancel_work_sync(&local->set_multicast_list_queue);
688 cancel_work_sync(&local->set_tim_queue);
689#ifndef PRISM2_NO_STATION_MODES
690 cancel_work_sync(&local->info_queue);
691#endif
692 cancel_work_sync(&local->comms_qual_update);
686 693
687 module_put(local->hw_module); 694 module_put(local->hw_module);
688 695
@@ -851,7 +858,6 @@ const struct header_ops hostap_80211_ops = {
851 .rebuild = eth_rebuild_header, 858 .rebuild = eth_rebuild_header,
852 .cache = eth_header_cache, 859 .cache = eth_header_cache,
853 .cache_update = eth_header_cache_update, 860 .cache_update = eth_header_cache_update,
854
855 .parse = hostap_80211_header_parse, 861 .parse = hostap_80211_header_parse,
856}; 862};
857EXPORT_SYMBOL(hostap_80211_ops); 863EXPORT_SYMBOL(hostap_80211_ops);
@@ -1144,7 +1150,6 @@ EXPORT_SYMBOL(hostap_set_roaming);
1144EXPORT_SYMBOL(hostap_set_auth_algs); 1150EXPORT_SYMBOL(hostap_set_auth_algs);
1145EXPORT_SYMBOL(hostap_dump_rx_header); 1151EXPORT_SYMBOL(hostap_dump_rx_header);
1146EXPORT_SYMBOL(hostap_dump_tx_header); 1152EXPORT_SYMBOL(hostap_dump_tx_header);
1147EXPORT_SYMBOL(hostap_80211_header_parse);
1148EXPORT_SYMBOL(hostap_80211_get_hdrlen); 1153EXPORT_SYMBOL(hostap_80211_get_hdrlen);
1149EXPORT_SYMBOL(hostap_get_stats); 1154EXPORT_SYMBOL(hostap_get_stats);
1150EXPORT_SYMBOL(hostap_setup_dev); 1155EXPORT_SYMBOL(hostap_setup_dev);
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index fa87c5c2ae0b..6e704608947c 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -1753,6 +1753,8 @@ static int ipw_radio_kill_sw(struct ipw_priv *priv, int disable_radio)
1753 1753
1754 if (priv->workqueue) { 1754 if (priv->workqueue) {
1755 cancel_delayed_work(&priv->request_scan); 1755 cancel_delayed_work(&priv->request_scan);
1756 cancel_delayed_work(&priv->request_direct_scan);
1757 cancel_delayed_work(&priv->request_passive_scan);
1756 cancel_delayed_work(&priv->scan_event); 1758 cancel_delayed_work(&priv->scan_event);
1757 } 1759 }
1758 queue_work(priv->workqueue, &priv->down); 1760 queue_work(priv->workqueue, &priv->down);
@@ -2005,6 +2007,8 @@ static void ipw_irq_tasklet(struct ipw_priv *priv)
2005 wake_up_interruptible(&priv->wait_command_queue); 2007 wake_up_interruptible(&priv->wait_command_queue);
2006 priv->status &= ~(STATUS_ASSOCIATED | STATUS_ASSOCIATING); 2008 priv->status &= ~(STATUS_ASSOCIATED | STATUS_ASSOCIATING);
2007 cancel_delayed_work(&priv->request_scan); 2009 cancel_delayed_work(&priv->request_scan);
2010 cancel_delayed_work(&priv->request_direct_scan);
2011 cancel_delayed_work(&priv->request_passive_scan);
2008 cancel_delayed_work(&priv->scan_event); 2012 cancel_delayed_work(&priv->scan_event);
2009 schedule_work(&priv->link_down); 2013 schedule_work(&priv->link_down);
2010 queue_delayed_work(priv->workqueue, &priv->rf_kill, 2 * HZ); 2014 queue_delayed_work(priv->workqueue, &priv->rf_kill, 2 * HZ);
@@ -4712,6 +4716,12 @@ static void ipw_rx_notification(struct ipw_priv *priv,
4712 priv->status &= ~STATUS_SCAN_FORCED; 4716 priv->status &= ~STATUS_SCAN_FORCED;
4713#endif /* CONFIG_IPW2200_MONITOR */ 4717#endif /* CONFIG_IPW2200_MONITOR */
4714 4718
4719 /* Do queued direct scans first */
4720 if (priv->status & STATUS_DIRECT_SCAN_PENDING) {
4721 queue_delayed_work(priv->workqueue,
4722 &priv->request_direct_scan, 0);
4723 }
4724
4715 if (!(priv->status & (STATUS_ASSOCIATED | 4725 if (!(priv->status & (STATUS_ASSOCIATED |
4716 STATUS_ASSOCIATING | 4726 STATUS_ASSOCIATING |
4717 STATUS_ROAMING | 4727 STATUS_ROAMING |
@@ -6267,7 +6277,7 @@ static void ipw_add_scan_channels(struct ipw_priv *priv,
6267 } 6277 }
6268} 6278}
6269 6279
6270static int ipw_request_scan_helper(struct ipw_priv *priv, int type) 6280static int ipw_request_scan_helper(struct ipw_priv *priv, int type, int direct)
6271{ 6281{
6272 struct ipw_scan_request_ext scan; 6282 struct ipw_scan_request_ext scan;
6273 int err = 0, scan_type; 6283 int err = 0, scan_type;
@@ -6278,22 +6288,31 @@ static int ipw_request_scan_helper(struct ipw_priv *priv, int type)
6278 6288
6279 mutex_lock(&priv->mutex); 6289 mutex_lock(&priv->mutex);
6280 6290
6291 if (direct && (priv->direct_scan_ssid_len == 0)) {
6292 IPW_DEBUG_HC("Direct scan requested but no SSID to scan for\n");
6293 priv->status &= ~STATUS_DIRECT_SCAN_PENDING;
6294 goto done;
6295 }
6296
6281 if (priv->status & STATUS_SCANNING) { 6297 if (priv->status & STATUS_SCANNING) {
6282 IPW_DEBUG_HC("Concurrent scan requested. Ignoring.\n"); 6298 IPW_DEBUG_HC("Concurrent scan requested. Queuing.\n");
6283 priv->status |= STATUS_SCAN_PENDING; 6299 priv->status |= direct ? STATUS_DIRECT_SCAN_PENDING :
6300 STATUS_SCAN_PENDING;
6284 goto done; 6301 goto done;
6285 } 6302 }
6286 6303
6287 if (!(priv->status & STATUS_SCAN_FORCED) && 6304 if (!(priv->status & STATUS_SCAN_FORCED) &&
6288 priv->status & STATUS_SCAN_ABORTING) { 6305 priv->status & STATUS_SCAN_ABORTING) {
6289 IPW_DEBUG_HC("Scan request while abort pending. Queuing.\n"); 6306 IPW_DEBUG_HC("Scan request while abort pending. Queuing.\n");
6290 priv->status |= STATUS_SCAN_PENDING; 6307 priv->status |= direct ? STATUS_DIRECT_SCAN_PENDING :
6308 STATUS_SCAN_PENDING;
6291 goto done; 6309 goto done;
6292 } 6310 }
6293 6311
6294 if (priv->status & STATUS_RF_KILL_MASK) { 6312 if (priv->status & STATUS_RF_KILL_MASK) {
6295 IPW_DEBUG_HC("Aborting scan due to RF Kill activation\n"); 6313 IPW_DEBUG_HC("Queuing scan due to RF Kill activation\n");
6296 priv->status |= STATUS_SCAN_PENDING; 6314 priv->status |= direct ? STATUS_DIRECT_SCAN_PENDING :
6315 STATUS_SCAN_PENDING;
6297 goto done; 6316 goto done;
6298 } 6317 }
6299 6318
@@ -6321,6 +6340,7 @@ static int ipw_request_scan_helper(struct ipw_priv *priv, int type)
6321 cpu_to_le16(20); 6340 cpu_to_le16(20);
6322 6341
6323 scan.dwell_time[IPW_SCAN_PASSIVE_FULL_DWELL_SCAN] = cpu_to_le16(120); 6342 scan.dwell_time[IPW_SCAN_PASSIVE_FULL_DWELL_SCAN] = cpu_to_le16(120);
6343 scan.dwell_time[IPW_SCAN_ACTIVE_DIRECT_SCAN] = cpu_to_le16(20);
6324 6344
6325#ifdef CONFIG_IPW2200_MONITOR 6345#ifdef CONFIG_IPW2200_MONITOR
6326 if (priv->ieee->iw_mode == IW_MODE_MONITOR) { 6346 if (priv->ieee->iw_mode == IW_MODE_MONITOR) {
@@ -6360,13 +6380,23 @@ static int ipw_request_scan_helper(struct ipw_priv *priv, int type)
6360 cpu_to_le16(2000); 6380 cpu_to_le16(2000);
6361 } else { 6381 } else {
6362#endif /* CONFIG_IPW2200_MONITOR */ 6382#endif /* CONFIG_IPW2200_MONITOR */
6363 /* If we are roaming, then make this a directed scan for the 6383 /* Honor direct scans first, otherwise if we are roaming make
6364 * current network. Otherwise, ensure that every other scan 6384 * this a direct scan for the current network. Finally,
6365 * is a fast channel hop scan */ 6385 * ensure that every other scan is a fast channel hop scan */
6366 if ((priv->status & STATUS_ROAMING) 6386 if (direct) {
6367 || (!(priv->status & STATUS_ASSOCIATED) 6387 err = ipw_send_ssid(priv, priv->direct_scan_ssid,
6368 && (priv->config & CFG_STATIC_ESSID) 6388 priv->direct_scan_ssid_len);
6369 && (le32_to_cpu(scan.full_scan_index) % 2))) { 6389 if (err) {
6390 IPW_DEBUG_HC("Attempt to send SSID command "
6391 "failed\n");
6392 goto done;
6393 }
6394
6395 scan_type = IPW_SCAN_ACTIVE_BROADCAST_AND_DIRECT_SCAN;
6396 } else if ((priv->status & STATUS_ROAMING)
6397 || (!(priv->status & STATUS_ASSOCIATED)
6398 && (priv->config & CFG_STATIC_ESSID)
6399 && (le32_to_cpu(scan.full_scan_index) % 2))) {
6370 err = ipw_send_ssid(priv, priv->essid, priv->essid_len); 6400 err = ipw_send_ssid(priv, priv->essid, priv->essid_len);
6371 if (err) { 6401 if (err) {
6372 IPW_DEBUG_HC("Attempt to send SSID command " 6402 IPW_DEBUG_HC("Attempt to send SSID command "
@@ -6391,7 +6421,12 @@ send_request:
6391 } 6421 }
6392 6422
6393 priv->status |= STATUS_SCANNING; 6423 priv->status |= STATUS_SCANNING;
6394 priv->status &= ~STATUS_SCAN_PENDING; 6424 if (direct) {
6425 priv->status &= ~STATUS_DIRECT_SCAN_PENDING;
6426 priv->direct_scan_ssid_len = 0;
6427 } else
6428 priv->status &= ~STATUS_SCAN_PENDING;
6429
6395 queue_delayed_work(priv->workqueue, &priv->scan_check, 6430 queue_delayed_work(priv->workqueue, &priv->scan_check,
6396 IPW_SCAN_CHECK_WATCHDOG); 6431 IPW_SCAN_CHECK_WATCHDOG);
6397done: 6432done:
@@ -6402,15 +6437,22 @@ done:
6402static void ipw_request_passive_scan(struct work_struct *work) 6437static void ipw_request_passive_scan(struct work_struct *work)
6403{ 6438{
6404 struct ipw_priv *priv = 6439 struct ipw_priv *priv =
6405 container_of(work, struct ipw_priv, request_passive_scan); 6440 container_of(work, struct ipw_priv, request_passive_scan.work);
6406 ipw_request_scan_helper(priv, IW_SCAN_TYPE_PASSIVE); 6441 ipw_request_scan_helper(priv, IW_SCAN_TYPE_PASSIVE, 0);
6407} 6442}
6408 6443
6409static void ipw_request_scan(struct work_struct *work) 6444static void ipw_request_scan(struct work_struct *work)
6410{ 6445{
6411 struct ipw_priv *priv = 6446 struct ipw_priv *priv =
6412 container_of(work, struct ipw_priv, request_scan.work); 6447 container_of(work, struct ipw_priv, request_scan.work);
6413 ipw_request_scan_helper(priv, IW_SCAN_TYPE_ACTIVE); 6448 ipw_request_scan_helper(priv, IW_SCAN_TYPE_ACTIVE, 0);
6449}
6450
6451static void ipw_request_direct_scan(struct work_struct *work)
6452{
6453 struct ipw_priv *priv =
6454 container_of(work, struct ipw_priv, request_direct_scan.work);
6455 ipw_request_scan_helper(priv, IW_SCAN_TYPE_ACTIVE, 1);
6414} 6456}
6415 6457
6416static void ipw_bg_abort_scan(struct work_struct *work) 6458static void ipw_bg_abort_scan(struct work_struct *work)
@@ -7558,8 +7600,31 @@ static int ipw_associate(void *data)
7558 priv->ieee->iw_mode == IW_MODE_ADHOC && 7600 priv->ieee->iw_mode == IW_MODE_ADHOC &&
7559 priv->config & CFG_ADHOC_CREATE && 7601 priv->config & CFG_ADHOC_CREATE &&
7560 priv->config & CFG_STATIC_ESSID && 7602 priv->config & CFG_STATIC_ESSID &&
7561 priv->config & CFG_STATIC_CHANNEL && 7603 priv->config & CFG_STATIC_CHANNEL) {
7562 !list_empty(&priv->ieee->network_free_list)) { 7604 /* Use oldest network if the free list is empty */
7605 if (list_empty(&priv->ieee->network_free_list)) {
7606 struct ieee80211_network *oldest = NULL;
7607 struct ieee80211_network *target;
7608 DECLARE_MAC_BUF(mac);
7609
7610 list_for_each_entry(target, &priv->ieee->network_list, list) {
7611 if ((oldest == NULL) ||
7612 (target->last_scanned < oldest->last_scanned))
7613 oldest = target;
7614 }
7615
7616 /* If there are no more slots, expire the oldest */
7617 list_del(&oldest->list);
7618 target = oldest;
7619 IPW_DEBUG_ASSOC("Expired '%s' (%s) from "
7620 "network list.\n",
7621 escape_essid(target->ssid,
7622 target->ssid_len),
7623 print_mac(mac, target->bssid));
7624 list_add_tail(&target->list,
7625 &priv->ieee->network_free_list);
7626 }
7627
7563 element = priv->ieee->network_free_list.next; 7628 element = priv->ieee->network_free_list.next;
7564 network = list_entry(element, struct ieee80211_network, list); 7629 network = list_entry(element, struct ieee80211_network, list);
7565 ipw_adhoc_create(priv, network); 7630 ipw_adhoc_create(priv, network);
@@ -9454,99 +9519,38 @@ static int ipw_wx_get_retry(struct net_device *dev,
9454 return 0; 9519 return 0;
9455} 9520}
9456 9521
9457static int ipw_request_direct_scan(struct ipw_priv *priv, char *essid,
9458 int essid_len)
9459{
9460 struct ipw_scan_request_ext scan;
9461 int err = 0, scan_type;
9462
9463 if (!(priv->status & STATUS_INIT) ||
9464 (priv->status & STATUS_EXIT_PENDING))
9465 return 0;
9466
9467 mutex_lock(&priv->mutex);
9468
9469 if (priv->status & STATUS_RF_KILL_MASK) {
9470 IPW_DEBUG_HC("Aborting scan due to RF kill activation\n");
9471 priv->status |= STATUS_SCAN_PENDING;
9472 goto done;
9473 }
9474
9475 IPW_DEBUG_HC("starting request direct scan!\n");
9476
9477 if (priv->status & (STATUS_SCANNING | STATUS_SCAN_ABORTING)) {
9478 /* We should not sleep here; otherwise we will block most
9479 * of the system (for instance, we hold rtnl_lock when we
9480 * get here).
9481 */
9482 err = -EAGAIN;
9483 goto done;
9484 }
9485 memset(&scan, 0, sizeof(scan));
9486
9487 if (priv->config & CFG_SPEED_SCAN)
9488 scan.dwell_time[IPW_SCAN_ACTIVE_BROADCAST_SCAN] =
9489 cpu_to_le16(30);
9490 else
9491 scan.dwell_time[IPW_SCAN_ACTIVE_BROADCAST_SCAN] =
9492 cpu_to_le16(20);
9493
9494 scan.dwell_time[IPW_SCAN_ACTIVE_BROADCAST_AND_DIRECT_SCAN] =
9495 cpu_to_le16(20);
9496 scan.dwell_time[IPW_SCAN_PASSIVE_FULL_DWELL_SCAN] = cpu_to_le16(120);
9497 scan.dwell_time[IPW_SCAN_ACTIVE_DIRECT_SCAN] = cpu_to_le16(20);
9498
9499 scan.full_scan_index = cpu_to_le32(ieee80211_get_scans(priv->ieee));
9500
9501 err = ipw_send_ssid(priv, essid, essid_len);
9502 if (err) {
9503 IPW_DEBUG_HC("Attempt to send SSID command failed\n");
9504 goto done;
9505 }
9506 scan_type = IPW_SCAN_ACTIVE_BROADCAST_AND_DIRECT_SCAN;
9507
9508 ipw_add_scan_channels(priv, &scan, scan_type);
9509
9510 err = ipw_send_scan_request_ext(priv, &scan);
9511 if (err) {
9512 IPW_DEBUG_HC("Sending scan command failed: %08X\n", err);
9513 goto done;
9514 }
9515
9516 priv->status |= STATUS_SCANNING;
9517
9518 done:
9519 mutex_unlock(&priv->mutex);
9520 return err;
9521}
9522
9523static int ipw_wx_set_scan(struct net_device *dev, 9522static int ipw_wx_set_scan(struct net_device *dev,
9524 struct iw_request_info *info, 9523 struct iw_request_info *info,
9525 union iwreq_data *wrqu, char *extra) 9524 union iwreq_data *wrqu, char *extra)
9526{ 9525{
9527 struct ipw_priv *priv = ieee80211_priv(dev); 9526 struct ipw_priv *priv = ieee80211_priv(dev);
9528 struct iw_scan_req *req = (struct iw_scan_req *)extra; 9527 struct iw_scan_req *req = (struct iw_scan_req *)extra;
9528 struct delayed_work *work = NULL;
9529 9529
9530 mutex_lock(&priv->mutex); 9530 mutex_lock(&priv->mutex);
9531
9531 priv->user_requested_scan = 1; 9532 priv->user_requested_scan = 1;
9532 mutex_unlock(&priv->mutex);
9533 9533
9534 if (wrqu->data.length == sizeof(struct iw_scan_req)) { 9534 if (wrqu->data.length == sizeof(struct iw_scan_req)) {
9535 if (wrqu->data.flags & IW_SCAN_THIS_ESSID) { 9535 if (wrqu->data.flags & IW_SCAN_THIS_ESSID) {
9536 ipw_request_direct_scan(priv, req->essid, 9536 int len = min((int)req->essid_len,
9537 req->essid_len); 9537 (int)sizeof(priv->direct_scan_ssid));
9538 return 0; 9538 memcpy(priv->direct_scan_ssid, req->essid, len);
9539 } 9539 priv->direct_scan_ssid_len = len;
9540 if (req->scan_type == IW_SCAN_TYPE_PASSIVE) { 9540 work = &priv->request_direct_scan;
9541 queue_work(priv->workqueue, 9541 } else if (req->scan_type == IW_SCAN_TYPE_PASSIVE) {
9542 &priv->request_passive_scan); 9542 work = &priv->request_passive_scan;
9543 return 0;
9544 } 9543 }
9544 } else {
9545 /* Normal active broadcast scan */
9546 work = &priv->request_scan;
9545 } 9547 }
9546 9548
9549 mutex_unlock(&priv->mutex);
9550
9547 IPW_DEBUG_WX("Start scan\n"); 9551 IPW_DEBUG_WX("Start scan\n");
9548 9552
9549 queue_delayed_work(priv->workqueue, &priv->request_scan, 0); 9553 queue_delayed_work(priv->workqueue, work, 0);
9550 9554
9551 return 0; 9555 return 0;
9552} 9556}
@@ -10708,6 +10712,8 @@ static void ipw_link_up(struct ipw_priv *priv)
10708 } 10712 }
10709 10713
10710 cancel_delayed_work(&priv->request_scan); 10714 cancel_delayed_work(&priv->request_scan);
10715 cancel_delayed_work(&priv->request_direct_scan);
10716 cancel_delayed_work(&priv->request_passive_scan);
10711 cancel_delayed_work(&priv->scan_event); 10717 cancel_delayed_work(&priv->scan_event);
10712 ipw_reset_stats(priv); 10718 ipw_reset_stats(priv);
10713 /* Ensure the rate is updated immediately */ 10719 /* Ensure the rate is updated immediately */
@@ -10738,6 +10744,8 @@ static void ipw_link_down(struct ipw_priv *priv)
10738 10744
10739 /* Cancel any queued work ... */ 10745 /* Cancel any queued work ... */
10740 cancel_delayed_work(&priv->request_scan); 10746 cancel_delayed_work(&priv->request_scan);
10747 cancel_delayed_work(&priv->request_direct_scan);
10748 cancel_delayed_work(&priv->request_passive_scan);
10741 cancel_delayed_work(&priv->adhoc_check); 10749 cancel_delayed_work(&priv->adhoc_check);
10742 cancel_delayed_work(&priv->gather_stats); 10750 cancel_delayed_work(&priv->gather_stats);
10743 10751
@@ -10777,8 +10785,9 @@ static int __devinit ipw_setup_deferred_work(struct ipw_priv *priv)
10777 INIT_WORK(&priv->up, ipw_bg_up); 10785 INIT_WORK(&priv->up, ipw_bg_up);
10778 INIT_WORK(&priv->down, ipw_bg_down); 10786 INIT_WORK(&priv->down, ipw_bg_down);
10779 INIT_DELAYED_WORK(&priv->request_scan, ipw_request_scan); 10787 INIT_DELAYED_WORK(&priv->request_scan, ipw_request_scan);
10788 INIT_DELAYED_WORK(&priv->request_direct_scan, ipw_request_direct_scan);
10789 INIT_DELAYED_WORK(&priv->request_passive_scan, ipw_request_passive_scan);
10780 INIT_DELAYED_WORK(&priv->scan_event, ipw_scan_event); 10790 INIT_DELAYED_WORK(&priv->scan_event, ipw_scan_event);
10781 INIT_WORK(&priv->request_passive_scan, ipw_request_passive_scan);
10782 INIT_DELAYED_WORK(&priv->gather_stats, ipw_bg_gather_stats); 10791 INIT_DELAYED_WORK(&priv->gather_stats, ipw_bg_gather_stats);
10783 INIT_WORK(&priv->abort_scan, ipw_bg_abort_scan); 10792 INIT_WORK(&priv->abort_scan, ipw_bg_abort_scan);
10784 INIT_WORK(&priv->roam, ipw_bg_roam); 10793 INIT_WORK(&priv->roam, ipw_bg_roam);
@@ -11584,6 +11593,7 @@ static int ipw_prom_alloc(struct ipw_priv *priv)
11584 priv->prom_net_dev->hard_start_xmit = ipw_prom_hard_start_xmit; 11593 priv->prom_net_dev->hard_start_xmit = ipw_prom_hard_start_xmit;
11585 11594
11586 priv->prom_priv->ieee->iw_mode = IW_MODE_MONITOR; 11595 priv->prom_priv->ieee->iw_mode = IW_MODE_MONITOR;
11596 SET_NETDEV_DEV(priv->prom_net_dev, &priv->pci_dev->dev);
11587 11597
11588 rc = register_netdev(priv->prom_net_dev); 11598 rc = register_netdev(priv->prom_net_dev);
11589 if (rc) { 11599 if (rc) {
@@ -11811,6 +11821,8 @@ static void __devexit ipw_pci_remove(struct pci_dev *pdev)
11811 cancel_delayed_work(&priv->adhoc_check); 11821 cancel_delayed_work(&priv->adhoc_check);
11812 cancel_delayed_work(&priv->gather_stats); 11822 cancel_delayed_work(&priv->gather_stats);
11813 cancel_delayed_work(&priv->request_scan); 11823 cancel_delayed_work(&priv->request_scan);
11824 cancel_delayed_work(&priv->request_direct_scan);
11825 cancel_delayed_work(&priv->request_passive_scan);
11814 cancel_delayed_work(&priv->scan_event); 11826 cancel_delayed_work(&priv->scan_event);
11815 cancel_delayed_work(&priv->rf_kill); 11827 cancel_delayed_work(&priv->rf_kill);
11816 cancel_delayed_work(&priv->scan_check); 11828 cancel_delayed_work(&priv->scan_check);
diff --git a/drivers/net/wireless/ipw2200.h b/drivers/net/wireless/ipw2200.h
index cd3295b66dd6..d4ab28b73b32 100644
--- a/drivers/net/wireless/ipw2200.h
+++ b/drivers/net/wireless/ipw2200.h
@@ -1037,6 +1037,7 @@ struct ipw_cmd { /* XXX */
1037#define STATUS_DISASSOC_PENDING (1<<12) 1037#define STATUS_DISASSOC_PENDING (1<<12)
1038#define STATUS_STATE_PENDING (1<<13) 1038#define STATUS_STATE_PENDING (1<<13)
1039 1039
1040#define STATUS_DIRECT_SCAN_PENDING (1<<19)
1040#define STATUS_SCAN_PENDING (1<<20) 1041#define STATUS_SCAN_PENDING (1<<20)
1041#define STATUS_SCANNING (1<<21) 1042#define STATUS_SCANNING (1<<21)
1042#define STATUS_SCAN_ABORTING (1<<22) 1043#define STATUS_SCAN_ABORTING (1<<22)
@@ -1292,6 +1293,8 @@ struct ipw_priv {
1292 struct iw_public_data wireless_data; 1293 struct iw_public_data wireless_data;
1293 1294
1294 int user_requested_scan; 1295 int user_requested_scan;
1296 u8 direct_scan_ssid[IW_ESSID_MAX_SIZE];
1297 u8 direct_scan_ssid_len;
1295 1298
1296 struct workqueue_struct *workqueue; 1299 struct workqueue_struct *workqueue;
1297 1300
@@ -1301,8 +1304,9 @@ struct ipw_priv {
1301 struct work_struct system_config; 1304 struct work_struct system_config;
1302 struct work_struct rx_replenish; 1305 struct work_struct rx_replenish;
1303 struct delayed_work request_scan; 1306 struct delayed_work request_scan;
1307 struct delayed_work request_direct_scan;
1308 struct delayed_work request_passive_scan;
1304 struct delayed_work scan_event; 1309 struct delayed_work scan_event;
1305 struct work_struct request_passive_scan;
1306 struct work_struct adapter_restart; 1310 struct work_struct adapter_restart;
1307 struct delayed_work rf_kill; 1311 struct delayed_work rf_kill;
1308 struct work_struct up; 1312 struct work_struct up;
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-led.c b/drivers/net/wireless/iwlwifi/iwl-3945-led.c
index d200d08fb086..8b1528e52d43 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945-led.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945-led.c
@@ -229,14 +229,15 @@ static int iwl3945_led_register_led(struct iwl3945_priv *priv,
229 led->led_dev.brightness_set = iwl3945_led_brightness_set; 229 led->led_dev.brightness_set = iwl3945_led_brightness_set;
230 led->led_dev.default_trigger = trigger; 230 led->led_dev.default_trigger = trigger;
231 231
232 led->priv = priv;
233 led->type = type;
234
232 ret = led_classdev_register(device, &led->led_dev); 235 ret = led_classdev_register(device, &led->led_dev);
233 if (ret) { 236 if (ret) {
234 IWL_ERROR("Error: failed to register led handler.\n"); 237 IWL_ERROR("Error: failed to register led handler.\n");
235 return ret; 238 return ret;
236 } 239 }
237 240
238 led->priv = priv;
239 led->type = type;
240 led->registered = 1; 241 led->registered = 1;
241 242
242 if (set_led && led->led_on) 243 if (set_led && led->led_on)
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
index c9847b1a67f7..3a7f0cb710ec 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
@@ -1162,7 +1162,6 @@ static s32 rs_get_best_rate(struct iwl_priv *priv,
1162 1162
1163 /* Higher rate not available, use the original */ 1163 /* Higher rate not available, use the original */
1164 } else { 1164 } else {
1165 new_rate = rate;
1166 break; 1165 break;
1167 } 1166 }
1168 } 1167 }
@@ -2009,7 +2008,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
2009 * 2) Not just finishing up a search 2008 * 2) Not just finishing up a search
2010 * 3) Allowing a new search 2009 * 3) Allowing a new search
2011 */ 2010 */
2012 if (!update_lq && !done_search && !lq_sta->stay_in_tbl) { 2011 if (!update_lq && !done_search && !lq_sta->stay_in_tbl && window->counter) {
2013 /* Save current throughput to compare with "search" throughput*/ 2012 /* Save current throughput to compare with "search" throughput*/
2014 lq_sta->last_tpt = current_tpt; 2013 lq_sta->last_tpt = current_tpt;
2015 2014
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 13925b627e3b..b1b3c523185d 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -2227,7 +2227,10 @@ static int iwl3945_scan_initiate(struct iwl3945_priv *priv)
2227 } 2227 }
2228 2228
2229 IWL_DEBUG_INFO("Starting scan...\n"); 2229 IWL_DEBUG_INFO("Starting scan...\n");
2230 priv->scan_bands = 2; 2230 if (priv->cfg->sku & IWL_SKU_G)
2231 priv->scan_bands |= BIT(IEEE80211_BAND_2GHZ);
2232 if (priv->cfg->sku & IWL_SKU_A)
2233 priv->scan_bands |= BIT(IEEE80211_BAND_5GHZ);
2231 set_bit(STATUS_SCANNING, &priv->status); 2234 set_bit(STATUS_SCANNING, &priv->status);
2232 priv->scan_start = jiffies; 2235 priv->scan_start = jiffies;
2233 priv->scan_pass_start = priv->scan_start; 2236 priv->scan_pass_start = priv->scan_start;
@@ -3352,13 +3355,18 @@ static void iwl3945_rx_scan_complete_notif(struct iwl3945_priv *priv,
3352 cancel_delayed_work(&priv->scan_check); 3355 cancel_delayed_work(&priv->scan_check);
3353 3356
3354 IWL_DEBUG_INFO("Scan pass on %sGHz took %dms\n", 3357 IWL_DEBUG_INFO("Scan pass on %sGHz took %dms\n",
3355 (priv->scan_bands == 2) ? "2.4" : "5.2", 3358 (priv->scan_bands & BIT(IEEE80211_BAND_2GHZ)) ?
3359 "2.4" : "5.2",
3356 jiffies_to_msecs(elapsed_jiffies 3360 jiffies_to_msecs(elapsed_jiffies
3357 (priv->scan_pass_start, jiffies))); 3361 (priv->scan_pass_start, jiffies)));
3358 3362
3359 /* Remove this scanned band from the list 3363 /* Remove this scanned band from the list of pending
3360 * of pending bands to scan */ 3364 * bands to scan, band G precedes A in order of scanning
3361 priv->scan_bands--; 3365 * as seen in iwl3945_bg_request_scan */
3366 if (priv->scan_bands & BIT(IEEE80211_BAND_2GHZ))
3367 priv->scan_bands &= ~BIT(IEEE80211_BAND_2GHZ);
3368 else if (priv->scan_bands & BIT(IEEE80211_BAND_5GHZ))
3369 priv->scan_bands &= ~BIT(IEEE80211_BAND_5GHZ);
3362 3370
3363 /* If a request to abort was given, or the scan did not succeed 3371 /* If a request to abort was given, or the scan did not succeed
3364 * then we reset the scan state machine and terminate, 3372 * then we reset the scan state machine and terminate,
@@ -4972,7 +4980,7 @@ static int iwl3945_get_channels_for_scan(struct iwl3945_priv *priv,
4972 4980
4973 ch_info = iwl3945_get_channel_info(priv, band, scan_ch->channel); 4981 ch_info = iwl3945_get_channel_info(priv, band, scan_ch->channel);
4974 if (!is_channel_valid(ch_info)) { 4982 if (!is_channel_valid(ch_info)) {
4975 IWL_DEBUG_SCAN("Channel %d is INVALID for this SKU.\n", 4983 IWL_DEBUG_SCAN("Channel %d is INVALID for this band.\n",
4976 scan_ch->channel); 4984 scan_ch->channel);
4977 continue; 4985 continue;
4978 } 4986 }
@@ -6315,21 +6323,16 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
6315 6323
6316 /* flags + rate selection */ 6324 /* flags + rate selection */
6317 6325
6318 switch (priv->scan_bands) { 6326 if (priv->scan_bands & BIT(IEEE80211_BAND_2GHZ)) {
6319 case 2:
6320 scan->flags = RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK; 6327 scan->flags = RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK;
6321 scan->tx_cmd.rate = IWL_RATE_1M_PLCP; 6328 scan->tx_cmd.rate = IWL_RATE_1M_PLCP;
6322 scan->good_CRC_th = 0; 6329 scan->good_CRC_th = 0;
6323 band = IEEE80211_BAND_2GHZ; 6330 band = IEEE80211_BAND_2GHZ;
6324 break; 6331 } else if (priv->scan_bands & BIT(IEEE80211_BAND_5GHZ)) {
6325
6326 case 1:
6327 scan->tx_cmd.rate = IWL_RATE_6M_PLCP; 6332 scan->tx_cmd.rate = IWL_RATE_6M_PLCP;
6328 scan->good_CRC_th = IWL_GOOD_CRC_TH; 6333 scan->good_CRC_th = IWL_GOOD_CRC_TH;
6329 band = IEEE80211_BAND_5GHZ; 6334 band = IEEE80211_BAND_5GHZ;
6330 break; 6335 } else {
6331
6332 default:
6333 IWL_WARNING("Invalid scan band count\n"); 6336 IWL_WARNING("Invalid scan band count\n");
6334 goto done; 6337 goto done;
6335 } 6338 }
@@ -6770,7 +6773,7 @@ static int iwl3945_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *co
6770 ch_info = iwl3945_get_channel_info(priv, conf->channel->band, 6773 ch_info = iwl3945_get_channel_info(priv, conf->channel->band,
6771 conf->channel->hw_value); 6774 conf->channel->hw_value);
6772 if (!is_channel_valid(ch_info)) { 6775 if (!is_channel_valid(ch_info)) {
6773 IWL_DEBUG_SCAN("Channel %d [%d] is INVALID for this SKU.\n", 6776 IWL_DEBUG_SCAN("Channel %d [%d] is INVALID for this band.\n",
6774 conf->channel->hw_value, conf->channel->band); 6777 conf->channel->hw_value, conf->channel->band);
6775 IWL_DEBUG_MAC80211("leave - invalid channel\n"); 6778 IWL_DEBUG_MAC80211("leave - invalid channel\n");
6776 spin_unlock_irqrestore(&priv->lock, flags); 6779 spin_unlock_irqrestore(&priv->lock, flags);
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index 883b42f7e998..5ed16ce78468 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -1774,7 +1774,10 @@ static int iwl4965_scan_initiate(struct iwl_priv *priv)
1774 } 1774 }
1775 1775
1776 IWL_DEBUG_INFO("Starting scan...\n"); 1776 IWL_DEBUG_INFO("Starting scan...\n");
1777 priv->scan_bands = 2; 1777 if (priv->cfg->sku & IWL_SKU_G)
1778 priv->scan_bands |= BIT(IEEE80211_BAND_2GHZ);
1779 if (priv->cfg->sku & IWL_SKU_A)
1780 priv->scan_bands |= BIT(IEEE80211_BAND_5GHZ);
1778 set_bit(STATUS_SCANNING, &priv->status); 1781 set_bit(STATUS_SCANNING, &priv->status);
1779 priv->scan_start = jiffies; 1782 priv->scan_start = jiffies;
1780 priv->scan_pass_start = priv->scan_start; 1783 priv->scan_pass_start = priv->scan_start;
@@ -3023,8 +3026,9 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
3023 3026
3024 IWL_DEBUG_TX_REPLY("Tx queue reclaim %d\n", index); 3027 IWL_DEBUG_TX_REPLY("Tx queue reclaim %d\n", index);
3025 if (index != -1) { 3028 if (index != -1) {
3026 int freed = iwl4965_tx_queue_reclaim(priv, txq_id, index);
3027#ifdef CONFIG_IWL4965_HT 3029#ifdef CONFIG_IWL4965_HT
3030 int freed = iwl4965_tx_queue_reclaim(priv, txq_id, index);
3031
3028 if (tid != MAX_TID_COUNT) 3032 if (tid != MAX_TID_COUNT)
3029 priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; 3033 priv->stations[sta_id].tid[tid].tfds_in_queue -= freed;
3030 if (iwl4965_queue_space(&txq->q) > txq->q.low_mark && 3034 if (iwl4965_queue_space(&txq->q) > txq->q.low_mark &&
@@ -3276,13 +3280,18 @@ static void iwl4965_rx_scan_complete_notif(struct iwl_priv *priv,
3276 cancel_delayed_work(&priv->scan_check); 3280 cancel_delayed_work(&priv->scan_check);
3277 3281
3278 IWL_DEBUG_INFO("Scan pass on %sGHz took %dms\n", 3282 IWL_DEBUG_INFO("Scan pass on %sGHz took %dms\n",
3279 (priv->scan_bands == 2) ? "2.4" : "5.2", 3283 (priv->scan_bands & BIT(IEEE80211_BAND_2GHZ)) ?
3284 "2.4" : "5.2",
3280 jiffies_to_msecs(elapsed_jiffies 3285 jiffies_to_msecs(elapsed_jiffies
3281 (priv->scan_pass_start, jiffies))); 3286 (priv->scan_pass_start, jiffies)));
3282 3287
3283 /* Remove this scanned band from the list 3288 /* Remove this scanned band from the list of pending
3284 * of pending bands to scan */ 3289 * bands to scan, band G precedes A in order of scanning
3285 priv->scan_bands--; 3290 * as seen in iwl_bg_request_scan */
3291 if (priv->scan_bands & BIT(IEEE80211_BAND_2GHZ))
3292 priv->scan_bands &= ~BIT(IEEE80211_BAND_2GHZ);
3293 else if (priv->scan_bands & BIT(IEEE80211_BAND_5GHZ))
3294 priv->scan_bands &= ~BIT(IEEE80211_BAND_5GHZ);
3286 3295
3287 /* If a request to abort was given, or the scan did not succeed 3296 /* If a request to abort was given, or the scan did not succeed
3288 * then we reset the scan state machine and terminate, 3297 * then we reset the scan state machine and terminate,
@@ -3292,7 +3301,7 @@ static void iwl4965_rx_scan_complete_notif(struct iwl_priv *priv,
3292 clear_bit(STATUS_SCAN_ABORTING, &priv->status); 3301 clear_bit(STATUS_SCAN_ABORTING, &priv->status);
3293 } else { 3302 } else {
3294 /* If there are more bands on this scan pass reschedule */ 3303 /* If there are more bands on this scan pass reschedule */
3295 if (priv->scan_bands > 0) 3304 if (priv->scan_bands)
3296 goto reschedule; 3305 goto reschedule;
3297 } 3306 }
3298 3307
@@ -4635,10 +4644,9 @@ static int iwl4965_get_channels_for_scan(struct iwl_priv *priv,
4635 4644
4636 scan_ch->channel = ieee80211_frequency_to_channel(channels[i].center_freq); 4645 scan_ch->channel = ieee80211_frequency_to_channel(channels[i].center_freq);
4637 4646
4638 ch_info = iwl_get_channel_info(priv, band, 4647 ch_info = iwl_get_channel_info(priv, band, scan_ch->channel);
4639 scan_ch->channel);
4640 if (!is_channel_valid(ch_info)) { 4648 if (!is_channel_valid(ch_info)) {
4641 IWL_DEBUG_SCAN("Channel %d is INVALID for this SKU.\n", 4649 IWL_DEBUG_SCAN("Channel %d is INVALID for this band.\n",
4642 scan_ch->channel); 4650 scan_ch->channel);
4643 continue; 4651 continue;
4644 } 4652 }
@@ -5830,8 +5838,7 @@ static void iwl4965_bg_request_scan(struct work_struct *data)
5830 scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; 5838 scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE;
5831 5839
5832 5840
5833 switch (priv->scan_bands) { 5841 if (priv->scan_bands & BIT(IEEE80211_BAND_2GHZ)) {
5834 case 2:
5835 scan->flags = RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK; 5842 scan->flags = RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK;
5836 scan->tx_cmd.rate_n_flags = 5843 scan->tx_cmd.rate_n_flags =
5837 iwl4965_hw_set_rate_n_flags(IWL_RATE_1M_PLCP, 5844 iwl4965_hw_set_rate_n_flags(IWL_RATE_1M_PLCP,
@@ -5839,17 +5846,13 @@ static void iwl4965_bg_request_scan(struct work_struct *data)
5839 5846
5840 scan->good_CRC_th = 0; 5847 scan->good_CRC_th = 0;
5841 band = IEEE80211_BAND_2GHZ; 5848 band = IEEE80211_BAND_2GHZ;
5842 break; 5849 } else if (priv->scan_bands & BIT(IEEE80211_BAND_5GHZ)) {
5843
5844 case 1:
5845 scan->tx_cmd.rate_n_flags = 5850 scan->tx_cmd.rate_n_flags =
5846 iwl4965_hw_set_rate_n_flags(IWL_RATE_6M_PLCP, 5851 iwl4965_hw_set_rate_n_flags(IWL_RATE_6M_PLCP,
5847 RATE_MCS_ANT_B_MSK); 5852 RATE_MCS_ANT_B_MSK);
5848 scan->good_CRC_th = IWL_GOOD_CRC_TH; 5853 scan->good_CRC_th = IWL_GOOD_CRC_TH;
5849 band = IEEE80211_BAND_5GHZ; 5854 band = IEEE80211_BAND_5GHZ;
5850 break; 5855 } else {
5851
5852 default:
5853 IWL_WARNING("Invalid scan band count\n"); 5856 IWL_WARNING("Invalid scan band count\n");
5854 goto done; 5857 goto done;
5855 } 5858 }
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 6328b9593877..8124fd9b1353 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -1842,6 +1842,9 @@ static void lbs_send_confirmsleep(struct lbs_private *priv)
1842 1842
1843 spin_lock_irqsave(&priv->driver_lock, flags); 1843 spin_lock_irqsave(&priv->driver_lock, flags);
1844 1844
1845 /* We don't get a response on the sleep-confirmation */
1846 priv->dnld_sent = DNLD_RES_RECEIVED;
1847
1845 /* If nothing to do, go back to sleep (?) */ 1848 /* If nothing to do, go back to sleep (?) */
1846 if (!__kfifo_len(priv->event_fifo) && !priv->resp_len[priv->resp_idx]) 1849 if (!__kfifo_len(priv->event_fifo) && !priv->resp_len[priv->resp_idx])
1847 priv->psstate = PS_STATE_SLEEP; 1850 priv->psstate = PS_STATE_SLEEP;
@@ -1904,12 +1907,12 @@ void lbs_ps_confirm_sleep(struct lbs_private *priv)
1904 1907
1905 lbs_deb_enter(LBS_DEB_HOST); 1908 lbs_deb_enter(LBS_DEB_HOST);
1906 1909
1910 spin_lock_irqsave(&priv->driver_lock, flags);
1907 if (priv->dnld_sent) { 1911 if (priv->dnld_sent) {
1908 allowed = 0; 1912 allowed = 0;
1909 lbs_deb_host("dnld_sent was set\n"); 1913 lbs_deb_host("dnld_sent was set\n");
1910 } 1914 }
1911 1915
1912 spin_lock_irqsave(&priv->driver_lock, flags);
1913 /* In-progress command? */ 1916 /* In-progress command? */
1914 if (priv->cur_cmd) { 1917 if (priv->cur_cmd) {
1915 allowed = 0; 1918 allowed = 0;
diff --git a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c
index ad2fabca9116..0aa0ce3b2c42 100644
--- a/drivers/net/wireless/libertas/debugfs.c
+++ b/drivers/net/wireless/libertas/debugfs.c
@@ -312,8 +312,8 @@ static ssize_t lbs_threshold_write(uint16_t tlv_type, uint16_t event_mask,
312 if (tlv_type != TLV_TYPE_BCNMISS) 312 if (tlv_type != TLV_TYPE_BCNMISS)
313 tlv->freq = freq; 313 tlv->freq = freq;
314 314
315 /* The command header, the event mask, and the one TLV */ 315 /* The command header, the action, the event mask, and one TLV */
316 events->hdr.size = cpu_to_le16(sizeof(events->hdr) + 2 + sizeof(*tlv)); 316 events->hdr.size = cpu_to_le16(sizeof(events->hdr) + 4 + sizeof(*tlv));
317 317
318 ret = lbs_cmd_with_response(priv, CMD_802_11_SUBSCRIBE_EVENT, events); 318 ret = lbs_cmd_with_response(priv, CMD_802_11_SUBSCRIBE_EVENT, events);
319 319
diff --git a/drivers/net/wireless/libertas/ethtool.c b/drivers/net/wireless/libertas/ethtool.c
index dcfdb404678b..688d60de55cb 100644
--- a/drivers/net/wireless/libertas/ethtool.c
+++ b/drivers/net/wireless/libertas/ethtool.c
@@ -73,8 +73,8 @@ out:
73 return ret; 73 return ret;
74} 74}
75 75
76static void lbs_ethtool_get_stats(struct net_device * dev, 76static void lbs_ethtool_get_stats(struct net_device *dev,
77 struct ethtool_stats * stats, u64 * data) 77 struct ethtool_stats *stats, uint64_t *data)
78{ 78{
79 struct lbs_private *priv = dev->priv; 79 struct lbs_private *priv = dev->priv;
80 struct cmd_ds_mesh_access mesh_access; 80 struct cmd_ds_mesh_access mesh_access;
@@ -83,12 +83,12 @@ static void lbs_ethtool_get_stats(struct net_device * dev,
83 lbs_deb_enter(LBS_DEB_ETHTOOL); 83 lbs_deb_enter(LBS_DEB_ETHTOOL);
84 84
85 /* Get Mesh Statistics */ 85 /* Get Mesh Statistics */
86 ret = lbs_prepare_and_send_command(priv, 86 ret = lbs_mesh_access(priv, CMD_ACT_MESH_GET_STATS, &mesh_access);
87 CMD_MESH_ACCESS, CMD_ACT_MESH_GET_STATS,
88 CMD_OPTION_WAITFORRSP, 0, &mesh_access);
89 87
90 if (ret) 88 if (ret) {
89 memset(data, 0, MESH_STATS_NUM*(sizeof(uint64_t)));
91 return; 90 return;
91 }
92 92
93 priv->mstats.fwd_drop_rbt = le32_to_cpu(mesh_access.data[0]); 93 priv->mstats.fwd_drop_rbt = le32_to_cpu(mesh_access.data[0]);
94 priv->mstats.fwd_drop_ttl = le32_to_cpu(mesh_access.data[1]); 94 priv->mstats.fwd_drop_ttl = le32_to_cpu(mesh_access.data[1]);
@@ -111,19 +111,18 @@ static void lbs_ethtool_get_stats(struct net_device * dev,
111 lbs_deb_enter(LBS_DEB_ETHTOOL); 111 lbs_deb_enter(LBS_DEB_ETHTOOL);
112} 112}
113 113
114static int lbs_ethtool_get_sset_count(struct net_device * dev, int sset) 114static int lbs_ethtool_get_sset_count(struct net_device *dev, int sset)
115{ 115{
116 switch (sset) { 116 struct lbs_private *priv = dev->priv;
117 case ETH_SS_STATS: 117
118 if (sset == ETH_SS_STATS && dev == priv->mesh_dev)
118 return MESH_STATS_NUM; 119 return MESH_STATS_NUM;
119 default: 120
120 return -EOPNOTSUPP; 121 return -EOPNOTSUPP;
121 }
122} 122}
123 123
124static void lbs_ethtool_get_strings(struct net_device *dev, 124static void lbs_ethtool_get_strings(struct net_device *dev,
125 u32 stringset, 125 uint32_t stringset, uint8_t *s)
126 u8 * s)
127{ 126{
128 int i; 127 int i;
129 128
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index 406f54d40956..acfc4bfcc262 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -732,8 +732,8 @@ static int lbs_thread(void *data)
732 lbs_deb_thread("4: currenttxskb %p, dnld_sent %d\n", 732 lbs_deb_thread("4: currenttxskb %p, dnld_sent %d\n",
733 priv->currenttxskb, priv->dnld_sent); 733 priv->currenttxskb, priv->dnld_sent);
734 734
735 spin_lock_irq(&priv->driver_lock);
736 /* Process any pending command response */ 735 /* Process any pending command response */
736 spin_lock_irq(&priv->driver_lock);
737 resp_idx = priv->resp_idx; 737 resp_idx = priv->resp_idx;
738 if (priv->resp_len[resp_idx]) { 738 if (priv->resp_len[resp_idx]) {
739 spin_unlock_irq(&priv->driver_lock); 739 spin_unlock_irq(&priv->driver_lock);
@@ -756,6 +756,7 @@ static int lbs_thread(void *data)
756 priv->nr_retries = 0; 756 priv->nr_retries = 0;
757 } else { 757 } else {
758 priv->cur_cmd = NULL; 758 priv->cur_cmd = NULL;
759 priv->dnld_sent = DNLD_RES_RECEIVED;
759 lbs_pr_info("requeueing command %x due to timeout (#%d)\n", 760 lbs_pr_info("requeueing command %x due to timeout (#%d)\n",
760 le16_to_cpu(cmdnode->cmdbuf->command), priv->nr_retries); 761 le16_to_cpu(cmdnode->cmdbuf->command), priv->nr_retries);
761 762
@@ -1564,6 +1565,7 @@ static int lbs_add_rtap(struct lbs_private *priv)
1564 rtap_dev->hard_start_xmit = lbs_rtap_hard_start_xmit; 1565 rtap_dev->hard_start_xmit = lbs_rtap_hard_start_xmit;
1565 rtap_dev->set_multicast_list = lbs_set_multicast_list; 1566 rtap_dev->set_multicast_list = lbs_set_multicast_list;
1566 rtap_dev->priv = priv; 1567 rtap_dev->priv = priv;
1568 SET_NETDEV_DEV(rtap_dev, priv->dev->dev.parent);
1567 1569
1568 ret = register_netdev(rtap_dev); 1570 ret = register_netdev(rtap_dev);
1569 if (ret) { 1571 if (ret) {
diff --git a/drivers/net/wireless/orinoco_cs.c b/drivers/net/wireless/orinoco_cs.c
index 8b7f5768a103..1c216e015f64 100644
--- a/drivers/net/wireless/orinoco_cs.c
+++ b/drivers/net/wireless/orinoco_cs.c
@@ -461,6 +461,7 @@ static struct pcmcia_device_id orinoco_cs_ids[] = {
461 PCMCIA_DEVICE_MANF_CARD(0x028a, 0x0673), /* Linksys WCF12 Wireless CompactFlash Card */ 461 PCMCIA_DEVICE_MANF_CARD(0x028a, 0x0673), /* Linksys WCF12 Wireless CompactFlash Card */
462 PCMCIA_DEVICE_MANF_CARD(0x02aa, 0x0002), /* ASUS SpaceLink WL-100 */ 462 PCMCIA_DEVICE_MANF_CARD(0x02aa, 0x0002), /* ASUS SpaceLink WL-100 */
463 PCMCIA_DEVICE_MANF_CARD(0x02ac, 0x0002), /* SpeedStream SS1021 Wireless Adapter */ 463 PCMCIA_DEVICE_MANF_CARD(0x02ac, 0x0002), /* SpeedStream SS1021 Wireless Adapter */
464 PCMCIA_DEVICE_MANF_CARD(0x02ac, 0x3021), /* SpeedStream Wireless Adapter */
464 PCMCIA_DEVICE_MANF_CARD(0x14ea, 0xb001), /* PLANEX RoadLannerWave GW-NS11H */ 465 PCMCIA_DEVICE_MANF_CARD(0x14ea, 0xb001), /* PLANEX RoadLannerWave GW-NS11H */
465 PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x7300), /* Airvast WN-100 */ 466 PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x7300), /* Airvast WN-100 */
466 PCMCIA_DEVICE_MANF_CARD(0x9005, 0x0021), /* Adaptec Ultra Wireless ANW-8030 */ 467 PCMCIA_DEVICE_MANF_CARD(0x9005, 0x0021), /* Adaptec Ultra Wireless ANW-8030 */
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c
index 98ddbb3b3273..1610a7308c1d 100644
--- a/drivers/net/wireless/p54/p54usb.c
+++ b/drivers/net/wireless/p54/p54usb.c
@@ -49,6 +49,7 @@ static struct usb_device_id p54u_table[] __devinitdata = {
49 {USB_DEVICE(0x5041, 0x2235)}, /* Linksys WUSB54G Portable */ 49 {USB_DEVICE(0x5041, 0x2235)}, /* Linksys WUSB54G Portable */
50 50
51 /* Version 2 devices (3887) */ 51 /* Version 2 devices (3887) */
52 {USB_DEVICE(0x0471, 0x1230)}, /* Philips CPWUA054/00 */
52 {USB_DEVICE(0x050d, 0x7050)}, /* Belkin F5D7050 ver 1000 */ 53 {USB_DEVICE(0x050d, 0x7050)}, /* Belkin F5D7050 ver 1000 */
53 {USB_DEVICE(0x0572, 0x2000)}, /* Cohiba Proto board */ 54 {USB_DEVICE(0x0572, 0x2000)}, /* Cohiba Proto board */
54 {USB_DEVICE(0x0572, 0x2002)}, /* Cohiba Proto board */ 55 {USB_DEVICE(0x0572, 0x2002)}, /* Cohiba Proto board */
diff --git a/drivers/net/wireless/prism54/islpci_eth.c b/drivers/net/wireless/prism54/islpci_eth.c
index 762e85bef55d..e43bae97ed8f 100644
--- a/drivers/net/wireless/prism54/islpci_eth.c
+++ b/drivers/net/wireless/prism54/islpci_eth.c
@@ -290,7 +290,7 @@ islpci_monitor_rx(islpci_private *priv, struct sk_buff **skb)
290 290
291 avs->version = cpu_to_be32(P80211CAPTURE_VERSION); 291 avs->version = cpu_to_be32(P80211CAPTURE_VERSION);
292 avs->length = cpu_to_be32(sizeof (struct avs_80211_1_header)); 292 avs->length = cpu_to_be32(sizeof (struct avs_80211_1_header));
293 avs->mactime = cpu_to_be64(le64_to_cpu(clock)); 293 avs->mactime = cpu_to_be64(clock);
294 avs->hosttime = cpu_to_be64(jiffies); 294 avs->hosttime = cpu_to_be64(jiffies);
295 avs->phytype = cpu_to_be32(6); /*OFDM: 6 for (g), 8 for (a) */ 295 avs->phytype = cpu_to_be32(6); /*OFDM: 6 for (g), 8 for (a) */
296 avs->channel = cpu_to_be32(channel_of_freq(freq)); 296 avs->channel = cpu_to_be32(channel_of_freq(freq));
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index d0b1fb15c709..18c9931e3267 100644
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
@@ -116,6 +116,7 @@ MODULE_PARM_DESC(workaround_interval,
116#define OID_802_11_ENCRYPTION_STATUS ccpu2(0x0d01011b) 116#define OID_802_11_ENCRYPTION_STATUS ccpu2(0x0d01011b)
117#define OID_802_11_ADD_KEY ccpu2(0x0d01011d) 117#define OID_802_11_ADD_KEY ccpu2(0x0d01011d)
118#define OID_802_11_REMOVE_KEY ccpu2(0x0d01011e) 118#define OID_802_11_REMOVE_KEY ccpu2(0x0d01011e)
119#define OID_802_11_ASSOCIATION_INFORMATION ccpu2(0x0d01011f)
119#define OID_802_11_PMKID ccpu2(0x0d010123) 120#define OID_802_11_PMKID ccpu2(0x0d010123)
120#define OID_802_11_NETWORK_TYPES_SUPPORTED ccpu2(0x0d010203) 121#define OID_802_11_NETWORK_TYPES_SUPPORTED ccpu2(0x0d010203)
121#define OID_802_11_NETWORK_TYPE_IN_USE ccpu2(0x0d010204) 122#define OID_802_11_NETWORK_TYPE_IN_USE ccpu2(0x0d010204)
@@ -271,6 +272,26 @@ struct ndis_config_param {
271 __le32 value_length; 272 __le32 value_length;
272} __attribute__((packed)); 273} __attribute__((packed));
273 274
275struct ndis_80211_assoc_info {
276 __le32 length;
277 __le16 req_ies;
278 struct req_ie {
279 __le16 capa;
280 __le16 listen_interval;
281 u8 cur_ap_address[6];
282 } req_ie;
283 __le32 req_ie_length;
284 __le32 offset_req_ies;
285 __le16 resp_ies;
286 struct resp_ie {
287 __le16 capa;
288 __le16 status_code;
289 __le16 assoc_id;
290 } resp_ie;
291 __le32 resp_ie_length;
292 __le32 offset_resp_ies;
293} __attribute__((packed));
294
274/* these have to match what is in wpa_supplicant */ 295/* these have to match what is in wpa_supplicant */
275enum wpa_alg { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP }; 296enum wpa_alg { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP };
276enum wpa_cipher { CIPHER_NONE, CIPHER_WEP40, CIPHER_TKIP, CIPHER_CCMP, 297enum wpa_cipher { CIPHER_NONE, CIPHER_WEP40, CIPHER_TKIP, CIPHER_CCMP,
@@ -674,6 +695,12 @@ static int get_bssid(struct usbnet *usbdev, u8 bssid[ETH_ALEN])
674 return ret; 695 return ret;
675} 696}
676 697
698static int get_association_info(struct usbnet *usbdev,
699 struct ndis_80211_assoc_info *info, int len)
700{
701 return rndis_query_oid(usbdev, OID_802_11_ASSOCIATION_INFORMATION,
702 info, &len);
703}
677 704
678static int is_associated(struct usbnet *usbdev) 705static int is_associated(struct usbnet *usbdev)
679{ 706{
@@ -2182,11 +2209,40 @@ static void rndis_wext_worker(struct work_struct *work)
2182 struct usbnet *usbdev = priv->usbdev; 2209 struct usbnet *usbdev = priv->usbdev;
2183 union iwreq_data evt; 2210 union iwreq_data evt;
2184 unsigned char bssid[ETH_ALEN]; 2211 unsigned char bssid[ETH_ALEN];
2185 int ret; 2212 struct ndis_80211_assoc_info *info;
2213 int assoc_size = sizeof(*info) + IW_CUSTOM_MAX + 32;
2214 int ret, offset;
2186 2215
2187 if (test_and_clear_bit(WORK_CONNECTION_EVENT, &priv->work_pending)) { 2216 if (test_and_clear_bit(WORK_CONNECTION_EVENT, &priv->work_pending)) {
2188 ret = get_bssid(usbdev, bssid); 2217 info = kzalloc(assoc_size, GFP_KERNEL);
2218 if (!info)
2219 goto get_bssid;
2220
2221 /* Get association info IEs from device and send them back to
2222 * userspace. */
2223 ret = get_association_info(usbdev, info, assoc_size);
2224 if (!ret) {
2225 evt.data.length = le32_to_cpu(info->req_ie_length);
2226 if (evt.data.length > 0) {
2227 offset = le32_to_cpu(info->offset_req_ies);
2228 wireless_send_event(usbdev->net,
2229 IWEVASSOCREQIE, &evt,
2230 (char *)info + offset);
2231 }
2232
2233 evt.data.length = le32_to_cpu(info->resp_ie_length);
2234 if (evt.data.length > 0) {
2235 offset = le32_to_cpu(info->offset_resp_ies);
2236 wireless_send_event(usbdev->net,
2237 IWEVASSOCRESPIE, &evt,
2238 (char *)info + offset);
2239 }
2240 }
2241
2242 kfree(info);
2189 2243
2244get_bssid:
2245 ret = get_bssid(usbdev, bssid);
2190 if (!ret) { 2246 if (!ret) {
2191 evt.data.flags = 0; 2247 evt.data.flags = 0;
2192 evt.data.length = 0; 2248 evt.data.length = 0;
@@ -2414,6 +2470,11 @@ static int bcm4320_early_init(struct usbnet *dev)
2414 else if (priv->param_power_save > 2) 2470 else if (priv->param_power_save > 2)
2415 priv->param_power_save = 2; 2471 priv->param_power_save = 2;
2416 2472
2473 if (priv->param_power_output < 0)
2474 priv->param_power_output = 0;
2475 else if (priv->param_power_output > 3)
2476 priv->param_power_output = 3;
2477
2417 if (priv->param_roamtrigger < -80) 2478 if (priv->param_roamtrigger < -80)
2418 priv->param_roamtrigger = -80; 2479 priv->param_roamtrigger = -80;
2419 else if (priv->param_roamtrigger > -60) 2480 else if (priv->param_roamtrigger > -60)
diff --git a/drivers/net/wireless/rt2x00/Kconfig b/drivers/net/wireless/rt2x00/Kconfig
index ab1029e79884..2d611876bbe0 100644
--- a/drivers/net/wireless/rt2x00/Kconfig
+++ b/drivers/net/wireless/rt2x00/Kconfig
@@ -32,12 +32,13 @@ config RT2X00_LIB_FIRMWARE
32config RT2X00_LIB_RFKILL 32config RT2X00_LIB_RFKILL
33 boolean 33 boolean
34 depends on RT2X00_LIB 34 depends on RT2X00_LIB
35 depends on INPUT
35 select RFKILL 36 select RFKILL
36 select INPUT_POLLDEV 37 select INPUT_POLLDEV
37 38
38config RT2X00_LIB_LEDS 39config RT2X00_LIB_LEDS
39 boolean 40 boolean
40 depends on RT2X00_LIB 41 depends on RT2X00_LIB && NEW_LEDS
41 42
42config RT2400PCI 43config RT2400PCI
43 tristate "Ralink rt2400 pci/pcmcia support" 44 tristate "Ralink rt2400 pci/pcmcia support"
@@ -51,7 +52,7 @@ config RT2400PCI
51 52
52config RT2400PCI_RFKILL 53config RT2400PCI_RFKILL
53 bool "RT2400 rfkill support" 54 bool "RT2400 rfkill support"
54 depends on RT2400PCI 55 depends on RT2400PCI && INPUT
55 select RT2X00_LIB_RFKILL 56 select RT2X00_LIB_RFKILL
56 ---help--- 57 ---help---
57 This adds support for integrated rt2400 devices that feature a 58 This adds support for integrated rt2400 devices that feature a
@@ -60,7 +61,7 @@ config RT2400PCI_RFKILL
60 61
61config RT2400PCI_LEDS 62config RT2400PCI_LEDS
62 bool "RT2400 leds support" 63 bool "RT2400 leds support"
63 depends on RT2400PCI 64 depends on RT2400PCI && NEW_LEDS
64 select LEDS_CLASS 65 select LEDS_CLASS
65 select RT2X00_LIB_LEDS 66 select RT2X00_LIB_LEDS
66 ---help--- 67 ---help---
@@ -78,7 +79,7 @@ config RT2500PCI
78 79
79config RT2500PCI_RFKILL 80config RT2500PCI_RFKILL
80 bool "RT2500 rfkill support" 81 bool "RT2500 rfkill support"
81 depends on RT2500PCI 82 depends on RT2500PCI && INPUT
82 select RT2X00_LIB_RFKILL 83 select RT2X00_LIB_RFKILL
83 ---help--- 84 ---help---
84 This adds support for integrated rt2500 devices that feature a 85 This adds support for integrated rt2500 devices that feature a
@@ -87,7 +88,7 @@ config RT2500PCI_RFKILL
87 88
88config RT2500PCI_LEDS 89config RT2500PCI_LEDS
89 bool "RT2500 leds support" 90 bool "RT2500 leds support"
90 depends on RT2500PCI 91 depends on RT2500PCI && NEW_LEDS
91 select LEDS_CLASS 92 select LEDS_CLASS
92 select RT2X00_LIB_LEDS 93 select RT2X00_LIB_LEDS
93 ---help--- 94 ---help---
@@ -107,7 +108,7 @@ config RT61PCI
107 108
108config RT61PCI_RFKILL 109config RT61PCI_RFKILL
109 bool "RT61 rfkill support" 110 bool "RT61 rfkill support"
110 depends on RT61PCI 111 depends on RT61PCI && INPUT
111 select RT2X00_LIB_RFKILL 112 select RT2X00_LIB_RFKILL
112 ---help--- 113 ---help---
113 This adds support for integrated rt61 devices that feature a 114 This adds support for integrated rt61 devices that feature a
@@ -116,7 +117,7 @@ config RT61PCI_RFKILL
116 117
117config RT61PCI_LEDS 118config RT61PCI_LEDS
118 bool "RT61 leds support" 119 bool "RT61 leds support"
119 depends on RT61PCI 120 depends on RT61PCI && NEW_LEDS
120 select LEDS_CLASS 121 select LEDS_CLASS
121 select RT2X00_LIB_LEDS 122 select RT2X00_LIB_LEDS
122 ---help--- 123 ---help---
@@ -133,7 +134,7 @@ config RT2500USB
133 134
134config RT2500USB_LEDS 135config RT2500USB_LEDS
135 bool "RT2500 leds support" 136 bool "RT2500 leds support"
136 depends on RT2500USB 137 depends on RT2500USB && NEW_LEDS
137 select LEDS_CLASS 138 select LEDS_CLASS
138 select RT2X00_LIB_LEDS 139 select RT2X00_LIB_LEDS
139 ---help--- 140 ---help---
@@ -152,7 +153,7 @@ config RT73USB
152 153
153config RT73USB_LEDS 154config RT73USB_LEDS
154 bool "RT73 leds support" 155 bool "RT73 leds support"
155 depends on RT73USB 156 depends on RT73USB && NEW_LEDS
156 select LEDS_CLASS 157 select LEDS_CLASS
157 select RT2X00_LIB_LEDS 158 select RT2X00_LIB_LEDS
158 ---help--- 159 ---help---
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index fdbd0ef2be4b..61e59c17a60a 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -138,11 +138,8 @@ static void rt2500usb_bbp_write(struct rt2x00_dev *rt2x00dev,
138 * Wait until the BBP becomes ready. 138 * Wait until the BBP becomes ready.
139 */ 139 */
140 reg = rt2500usb_bbp_check(rt2x00dev); 140 reg = rt2500usb_bbp_check(rt2x00dev);
141 if (rt2x00_get_field16(reg, PHY_CSR8_BUSY)) { 141 if (rt2x00_get_field16(reg, PHY_CSR8_BUSY))
142 ERROR(rt2x00dev, "PHY_CSR8 register busy. Write failed.\n"); 142 goto exit_fail;
143 mutex_unlock(&rt2x00dev->usb_cache_mutex);
144 return;
145 }
146 143
147 /* 144 /*
148 * Write the data into the BBP. 145 * Write the data into the BBP.
@@ -155,6 +152,13 @@ static void rt2500usb_bbp_write(struct rt2x00_dev *rt2x00dev,
155 rt2500usb_register_write_lock(rt2x00dev, PHY_CSR7, reg); 152 rt2500usb_register_write_lock(rt2x00dev, PHY_CSR7, reg);
156 153
157 mutex_unlock(&rt2x00dev->usb_cache_mutex); 154 mutex_unlock(&rt2x00dev->usb_cache_mutex);
155
156 return;
157
158exit_fail:
159 mutex_unlock(&rt2x00dev->usb_cache_mutex);
160
161 ERROR(rt2x00dev, "PHY_CSR8 register busy. Write failed.\n");
158} 162}
159 163
160static void rt2500usb_bbp_read(struct rt2x00_dev *rt2x00dev, 164static void rt2500usb_bbp_read(struct rt2x00_dev *rt2x00dev,
@@ -168,10 +172,8 @@ static void rt2500usb_bbp_read(struct rt2x00_dev *rt2x00dev,
168 * Wait until the BBP becomes ready. 172 * Wait until the BBP becomes ready.
169 */ 173 */
170 reg = rt2500usb_bbp_check(rt2x00dev); 174 reg = rt2500usb_bbp_check(rt2x00dev);
171 if (rt2x00_get_field16(reg, PHY_CSR8_BUSY)) { 175 if (rt2x00_get_field16(reg, PHY_CSR8_BUSY))
172 ERROR(rt2x00dev, "PHY_CSR8 register busy. Read failed.\n"); 176 goto exit_fail;
173 return;
174 }
175 177
176 /* 178 /*
177 * Write the request into the BBP. 179 * Write the request into the BBP.
@@ -186,17 +188,21 @@ static void rt2500usb_bbp_read(struct rt2x00_dev *rt2x00dev,
186 * Wait until the BBP becomes ready. 188 * Wait until the BBP becomes ready.
187 */ 189 */
188 reg = rt2500usb_bbp_check(rt2x00dev); 190 reg = rt2500usb_bbp_check(rt2x00dev);
189 if (rt2x00_get_field16(reg, PHY_CSR8_BUSY)) { 191 if (rt2x00_get_field16(reg, PHY_CSR8_BUSY))
190 ERROR(rt2x00dev, "PHY_CSR8 register busy. Read failed.\n"); 192 goto exit_fail;
191 *value = 0xff;
192 mutex_unlock(&rt2x00dev->usb_cache_mutex);
193 return;
194 }
195 193
196 rt2500usb_register_read_lock(rt2x00dev, PHY_CSR7, &reg); 194 rt2500usb_register_read_lock(rt2x00dev, PHY_CSR7, &reg);
197 *value = rt2x00_get_field16(reg, PHY_CSR7_DATA); 195 *value = rt2x00_get_field16(reg, PHY_CSR7_DATA);
198 196
199 mutex_unlock(&rt2x00dev->usb_cache_mutex); 197 mutex_unlock(&rt2x00dev->usb_cache_mutex);
198
199 return;
200
201exit_fail:
202 mutex_unlock(&rt2x00dev->usb_cache_mutex);
203
204 ERROR(rt2x00dev, "PHY_CSR8 register busy. Read failed.\n");
205 *value = 0xff;
200} 206}
201 207
202static void rt2500usb_rf_write(struct rt2x00_dev *rt2x00dev, 208static void rt2500usb_rf_write(struct rt2x00_dev *rt2x00dev,
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index 57bdc153952f..b4bf1e09cf9a 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -328,6 +328,11 @@ static inline int rt2x00_get_link_ant_rssi(struct link *link)
328 return DEFAULT_RSSI; 328 return DEFAULT_RSSI;
329} 329}
330 330
331static inline void rt2x00_reset_link_ant_rssi(struct link *link)
332{
333 link->ant.rssi_ant = 0;
334}
335
331static inline int rt2x00_get_link_ant_rssi_history(struct link *link, 336static inline int rt2x00_get_link_ant_rssi_history(struct link *link,
332 enum antenna ant) 337 enum antenna ant)
333{ 338{
@@ -816,6 +821,7 @@ struct rt2x00_dev {
816 /* 821 /*
817 * Scheduled work. 822 * Scheduled work.
818 */ 823 */
824 struct workqueue_struct *workqueue;
819 struct work_struct intf_work; 825 struct work_struct intf_work;
820 struct work_struct filter_work; 826 struct work_struct filter_work;
821 827
diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c b/drivers/net/wireless/rt2x00/rt2x00config.c
index a9930a03f450..48608e8cc8b4 100644
--- a/drivers/net/wireless/rt2x00/rt2x00config.c
+++ b/drivers/net/wireless/rt2x00/rt2x00config.c
@@ -129,6 +129,7 @@ void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev,
129 */ 129 */
130 rt2x00dev->ops->lib->config(rt2x00dev, &libconf, CONFIG_UPDATE_ANTENNA); 130 rt2x00dev->ops->lib->config(rt2x00dev, &libconf, CONFIG_UPDATE_ANTENNA);
131 rt2x00lib_reset_link_tuner(rt2x00dev); 131 rt2x00lib_reset_link_tuner(rt2x00dev);
132 rt2x00_reset_link_ant_rssi(&rt2x00dev->link);
132 133
133 rt2x00dev->link.ant.active.rx = libconf.ant.rx; 134 rt2x00dev->link.ant.active.rx = libconf.ant.rx;
134 rt2x00dev->link.ant.active.tx = libconf.ant.tx; 135 rt2x00dev->link.ant.active.tx = libconf.ant.tx;
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index b22c02737185..c997d4f28ab3 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -75,7 +75,7 @@ static void rt2x00lib_start_link_tuner(struct rt2x00_dev *rt2x00dev)
75 75
76 rt2x00lib_reset_link_tuner(rt2x00dev); 76 rt2x00lib_reset_link_tuner(rt2x00dev);
77 77
78 queue_delayed_work(rt2x00dev->hw->workqueue, 78 queue_delayed_work(rt2x00dev->workqueue,
79 &rt2x00dev->link.work, LINK_TUNE_INTERVAL); 79 &rt2x00dev->link.work, LINK_TUNE_INTERVAL);
80} 80}
81 81
@@ -137,14 +137,6 @@ void rt2x00lib_disable_radio(struct rt2x00_dev *rt2x00dev)
137 return; 137 return;
138 138
139 /* 139 /*
140 * Stop all scheduled work.
141 */
142 if (work_pending(&rt2x00dev->intf_work))
143 cancel_work_sync(&rt2x00dev->intf_work);
144 if (work_pending(&rt2x00dev->filter_work))
145 cancel_work_sync(&rt2x00dev->filter_work);
146
147 /*
148 * Stop the TX queues. 140 * Stop the TX queues.
149 */ 141 */
150 ieee80211_stop_queues(rt2x00dev->hw); 142 ieee80211_stop_queues(rt2x00dev->hw);
@@ -398,8 +390,8 @@ static void rt2x00lib_link_tuner(struct work_struct *work)
398 * Increase tuner counter, and reschedule the next link tuner run. 390 * Increase tuner counter, and reschedule the next link tuner run.
399 */ 391 */
400 rt2x00dev->link.count++; 392 rt2x00dev->link.count++;
401 queue_delayed_work(rt2x00dev->hw->workqueue, &rt2x00dev->link.work, 393 queue_delayed_work(rt2x00dev->workqueue,
402 LINK_TUNE_INTERVAL); 394 &rt2x00dev->link.work, LINK_TUNE_INTERVAL);
403} 395}
404 396
405static void rt2x00lib_packetfilter_scheduled(struct work_struct *work) 397static void rt2x00lib_packetfilter_scheduled(struct work_struct *work)
@@ -433,6 +425,15 @@ static void rt2x00lib_intf_scheduled_iter(void *data, u8 *mac,
433 425
434 spin_unlock(&intf->lock); 426 spin_unlock(&intf->lock);
435 427
428 /*
429 * It is possible the radio was disabled while the work had been
430 * scheduled. If that happens we should return here immediately,
431 * note that in the spinlock protected area above the delayed_flags
432 * have been cleared correctly.
433 */
434 if (!test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags))
435 return;
436
436 if (delayed_flags & DELAYED_UPDATE_BEACON) { 437 if (delayed_flags & DELAYED_UPDATE_BEACON) {
437 skb = ieee80211_beacon_get(rt2x00dev->hw, vif, &control); 438 skb = ieee80211_beacon_get(rt2x00dev->hw, vif, &control);
438 if (skb && rt2x00dev->ops->hw->beacon_update(rt2x00dev->hw, 439 if (skb && rt2x00dev->ops->hw->beacon_update(rt2x00dev->hw,
@@ -441,7 +442,7 @@ static void rt2x00lib_intf_scheduled_iter(void *data, u8 *mac,
441 } 442 }
442 443
443 if (delayed_flags & DELAYED_CONFIG_ERP) 444 if (delayed_flags & DELAYED_CONFIG_ERP)
444 rt2x00lib_config_erp(rt2x00dev, intf, &intf->conf); 445 rt2x00lib_config_erp(rt2x00dev, intf, &conf);
445 446
446 if (delayed_flags & DELAYED_LED_ASSOC) 447 if (delayed_flags & DELAYED_LED_ASSOC)
447 rt2x00leds_led_assoc(rt2x00dev, !!rt2x00dev->intf_associated); 448 rt2x00leds_led_assoc(rt2x00dev, !!rt2x00dev->intf_associated);
@@ -483,11 +484,11 @@ void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev)
483 if (!test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags)) 484 if (!test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags))
484 return; 485 return;
485 486
486 ieee80211_iterate_active_interfaces(rt2x00dev->hw, 487 ieee80211_iterate_active_interfaces_atomic(rt2x00dev->hw,
487 rt2x00lib_beacondone_iter, 488 rt2x00lib_beacondone_iter,
488 rt2x00dev); 489 rt2x00dev);
489 490
490 queue_work(rt2x00dev->hw->workqueue, &rt2x00dev->intf_work); 491 queue_work(rt2x00dev->workqueue, &rt2x00dev->intf_work);
491} 492}
492EXPORT_SYMBOL_GPL(rt2x00lib_beacondone); 493EXPORT_SYMBOL_GPL(rt2x00lib_beacondone);
493 494
@@ -507,7 +508,7 @@ void rt2x00lib_txdone(struct queue_entry *entry,
507 * Update TX statistics. 508 * Update TX statistics.
508 */ 509 */
509 rt2x00dev->link.qual.tx_success += success; 510 rt2x00dev->link.qual.tx_success += success;
510 rt2x00dev->link.qual.tx_failed += txdesc->retry + fail; 511 rt2x00dev->link.qual.tx_failed += fail;
511 512
512 /* 513 /*
513 * Initialize TX status 514 * Initialize TX status
@@ -1130,6 +1131,10 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev)
1130 /* 1131 /*
1131 * Initialize configuration work. 1132 * Initialize configuration work.
1132 */ 1133 */
1134 rt2x00dev->workqueue = create_singlethread_workqueue("rt2x00lib");
1135 if (!rt2x00dev->workqueue)
1136 goto exit;
1137
1133 INIT_WORK(&rt2x00dev->intf_work, rt2x00lib_intf_scheduled); 1138 INIT_WORK(&rt2x00dev->intf_work, rt2x00lib_intf_scheduled);
1134 INIT_WORK(&rt2x00dev->filter_work, rt2x00lib_packetfilter_scheduled); 1139 INIT_WORK(&rt2x00dev->filter_work, rt2x00lib_packetfilter_scheduled);
1135 INIT_DELAYED_WORK(&rt2x00dev->link.work, rt2x00lib_link_tuner); 1140 INIT_DELAYED_WORK(&rt2x00dev->link.work, rt2x00lib_link_tuner);
@@ -1190,6 +1195,13 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev)
1190 rt2x00leds_unregister(rt2x00dev); 1195 rt2x00leds_unregister(rt2x00dev);
1191 1196
1192 /* 1197 /*
1198 * Stop all queued work. Note that most tasks will already be halted
1199 * during rt2x00lib_disable_radio() and rt2x00lib_uninitialize().
1200 */
1201 flush_workqueue(rt2x00dev->workqueue);
1202 destroy_workqueue(rt2x00dev->workqueue);
1203
1204 /*
1193 * Free ieee80211_hw memory. 1205 * Free ieee80211_hw memory.
1194 */ 1206 */
1195 rt2x00lib_remove_hw(rt2x00dev); 1207 rt2x00lib_remove_hw(rt2x00dev);
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index c206b5092070..9cb023edd2e9 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -93,6 +93,7 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
93 */ 93 */
94 if (!test_bit(DEVICE_PRESENT, &rt2x00dev->flags)) { 94 if (!test_bit(DEVICE_PRESENT, &rt2x00dev->flags)) {
95 ieee80211_stop_queues(hw); 95 ieee80211_stop_queues(hw);
96 dev_kfree_skb_any(skb);
96 return NETDEV_TX_OK; 97 return NETDEV_TX_OK;
97 } 98 }
98 99
@@ -427,7 +428,7 @@ void rt2x00mac_configure_filter(struct ieee80211_hw *hw,
427 if (!test_bit(DRIVER_REQUIRE_SCHEDULED, &rt2x00dev->flags)) 428 if (!test_bit(DRIVER_REQUIRE_SCHEDULED, &rt2x00dev->flags))
428 rt2x00dev->ops->lib->config_filter(rt2x00dev, *total_flags); 429 rt2x00dev->ops->lib->config_filter(rt2x00dev, *total_flags);
429 else 430 else
430 queue_work(rt2x00dev->hw->workqueue, &rt2x00dev->filter_work); 431 queue_work(rt2x00dev->workqueue, &rt2x00dev->filter_work);
431} 432}
432EXPORT_SYMBOL_GPL(rt2x00mac_configure_filter); 433EXPORT_SYMBOL_GPL(rt2x00mac_configure_filter);
433 434
@@ -508,7 +509,7 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw,
508 memcpy(&intf->conf, bss_conf, sizeof(*bss_conf)); 509 memcpy(&intf->conf, bss_conf, sizeof(*bss_conf));
509 if (delayed) { 510 if (delayed) {
510 intf->delayed_flags |= delayed; 511 intf->delayed_flags |= delayed;
511 queue_work(rt2x00dev->hw->workqueue, &rt2x00dev->intf_work); 512 queue_work(rt2x00dev->workqueue, &rt2x00dev->intf_work);
512 } 513 }
513 spin_unlock(&intf->lock); 514 spin_unlock(&intf->lock);
514} 515}
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c
index 971af2546b59..60893de3bf8f 100644
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
@@ -412,8 +412,7 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)
412 if (pci_set_mwi(pci_dev)) 412 if (pci_set_mwi(pci_dev))
413 ERROR_PROBE("MWI not available.\n"); 413 ERROR_PROBE("MWI not available.\n");
414 414
415 if (pci_set_dma_mask(pci_dev, DMA_64BIT_MASK) && 415 if (pci_set_dma_mask(pci_dev, DMA_32BIT_MASK)) {
416 pci_set_dma_mask(pci_dev, DMA_32BIT_MASK)) {
417 ERROR_PROBE("PCI DMA not supported.\n"); 416 ERROR_PROBE("PCI DMA not supported.\n");
418 retval = -EIO; 417 retval = -EIO;
419 goto exit_disable_device; 418 goto exit_disable_device;
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c
index 5a331674dcb2..e5ceae805b57 100644
--- a/drivers/net/wireless/rt2x00/rt2x00usb.c
+++ b/drivers/net/wireless/rt2x00/rt2x00usb.c
@@ -362,6 +362,12 @@ void rt2x00usb_disable_radio(struct rt2x00_dev *rt2x00dev)
362 } 362 }
363 } 363 }
364 364
365 /*
366 * Kill guardian urb (if required by driver).
367 */
368 if (!test_bit(DRIVER_REQUIRE_BEACON_GUARD, &rt2x00dev->flags))
369 return;
370
365 for (i = 0; i < rt2x00dev->bcn->limit; i++) { 371 for (i = 0; i < rt2x00dev->bcn->limit; i++) {
366 priv_bcn = rt2x00dev->bcn->entries[i].priv_data; 372 priv_bcn = rt2x00dev->bcn->entries[i].priv_data;
367 usb_kill_urb(priv_bcn->urb); 373 usb_kill_urb(priv_bcn->urb);
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index da19a3a91f4d..83cc0147f698 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -134,11 +134,8 @@ static void rt73usb_bbp_write(struct rt2x00_dev *rt2x00dev,
134 * Wait until the BBP becomes ready. 134 * Wait until the BBP becomes ready.
135 */ 135 */
136 reg = rt73usb_bbp_check(rt2x00dev); 136 reg = rt73usb_bbp_check(rt2x00dev);
137 if (rt2x00_get_field32(reg, PHY_CSR3_BUSY)) { 137 if (rt2x00_get_field32(reg, PHY_CSR3_BUSY))
138 ERROR(rt2x00dev, "PHY_CSR3 register busy. Write failed.\n"); 138 goto exit_fail;
139 mutex_unlock(&rt2x00dev->usb_cache_mutex);
140 return;
141 }
142 139
143 /* 140 /*
144 * Write the data into the BBP. 141 * Write the data into the BBP.
@@ -151,6 +148,13 @@ static void rt73usb_bbp_write(struct rt2x00_dev *rt2x00dev,
151 148
152 rt73usb_register_write_lock(rt2x00dev, PHY_CSR3, reg); 149 rt73usb_register_write_lock(rt2x00dev, PHY_CSR3, reg);
153 mutex_unlock(&rt2x00dev->usb_cache_mutex); 150 mutex_unlock(&rt2x00dev->usb_cache_mutex);
151
152 return;
153
154exit_fail:
155 mutex_unlock(&rt2x00dev->usb_cache_mutex);
156
157 ERROR(rt2x00dev, "PHY_CSR3 register busy. Write failed.\n");
154} 158}
155 159
156static void rt73usb_bbp_read(struct rt2x00_dev *rt2x00dev, 160static void rt73usb_bbp_read(struct rt2x00_dev *rt2x00dev,
@@ -164,11 +168,8 @@ static void rt73usb_bbp_read(struct rt2x00_dev *rt2x00dev,
164 * Wait until the BBP becomes ready. 168 * Wait until the BBP becomes ready.
165 */ 169 */
166 reg = rt73usb_bbp_check(rt2x00dev); 170 reg = rt73usb_bbp_check(rt2x00dev);
167 if (rt2x00_get_field32(reg, PHY_CSR3_BUSY)) { 171 if (rt2x00_get_field32(reg, PHY_CSR3_BUSY))
168 ERROR(rt2x00dev, "PHY_CSR3 register busy. Read failed.\n"); 172 goto exit_fail;
169 mutex_unlock(&rt2x00dev->usb_cache_mutex);
170 return;
171 }
172 173
173 /* 174 /*
174 * Write the request into the BBP. 175 * Write the request into the BBP.
@@ -184,14 +185,19 @@ static void rt73usb_bbp_read(struct rt2x00_dev *rt2x00dev,
184 * Wait until the BBP becomes ready. 185 * Wait until the BBP becomes ready.
185 */ 186 */
186 reg = rt73usb_bbp_check(rt2x00dev); 187 reg = rt73usb_bbp_check(rt2x00dev);
187 if (rt2x00_get_field32(reg, PHY_CSR3_BUSY)) { 188 if (rt2x00_get_field32(reg, PHY_CSR3_BUSY))
188 ERROR(rt2x00dev, "PHY_CSR3 register busy. Read failed.\n"); 189 goto exit_fail;
189 *value = 0xff;
190 return;
191 }
192 190
193 *value = rt2x00_get_field32(reg, PHY_CSR3_VALUE); 191 *value = rt2x00_get_field32(reg, PHY_CSR3_VALUE);
194 mutex_unlock(&rt2x00dev->usb_cache_mutex); 192 mutex_unlock(&rt2x00dev->usb_cache_mutex);
193
194 return;
195
196exit_fail:
197 mutex_unlock(&rt2x00dev->usb_cache_mutex);
198
199 ERROR(rt2x00dev, "PHY_CSR3 register busy. Read failed.\n");
200 *value = 0xff;
195} 201}
196 202
197static void rt73usb_rf_write(struct rt2x00_dev *rt2x00dev, 203static void rt73usb_rf_write(struct rt2x00_dev *rt2x00dev,
@@ -2131,6 +2137,7 @@ static struct usb_device_id rt73usb_device_table[] = {
2131 /* D-Link */ 2137 /* D-Link */
2132 { USB_DEVICE(0x07d1, 0x3c03), USB_DEVICE_DATA(&rt73usb_ops) }, 2138 { USB_DEVICE(0x07d1, 0x3c03), USB_DEVICE_DATA(&rt73usb_ops) },
2133 { USB_DEVICE(0x07d1, 0x3c04), USB_DEVICE_DATA(&rt73usb_ops) }, 2139 { USB_DEVICE(0x07d1, 0x3c04), USB_DEVICE_DATA(&rt73usb_ops) },
2140 { USB_DEVICE(0x07d1, 0x3c06), USB_DEVICE_DATA(&rt73usb_ops) },
2134 { USB_DEVICE(0x07d1, 0x3c07), USB_DEVICE_DATA(&rt73usb_ops) }, 2141 { USB_DEVICE(0x07d1, 0x3c07), USB_DEVICE_DATA(&rt73usb_ops) },
2135 /* Gemtek */ 2142 /* Gemtek */
2136 { USB_DEVICE(0x15a9, 0x0004), USB_DEVICE_DATA(&rt73usb_ops) }, 2143 { USB_DEVICE(0x15a9, 0x0004), USB_DEVICE_DATA(&rt73usb_ops) },
diff --git a/drivers/net/wireless/rtl8180_grf5101.c b/drivers/net/wireless/rtl8180_grf5101.c
index 5d47935dbac3..947ee55f18b2 100644
--- a/drivers/net/wireless/rtl8180_grf5101.c
+++ b/drivers/net/wireless/rtl8180_grf5101.c
@@ -88,7 +88,7 @@ static void grf5101_rf_set_channel(struct ieee80211_hw *dev,
88 write_grf5101(dev, 0x0B, chan); 88 write_grf5101(dev, 0x0B, chan);
89 write_grf5101(dev, 0x07, 0x1000); 89 write_grf5101(dev, 0x07, 0x1000);
90 90
91 grf5101_write_phy_antenna(dev, chan); 91 grf5101_write_phy_antenna(dev, channel);
92} 92}
93 93
94static void grf5101_rf_stop(struct ieee80211_hw *dev) 94static void grf5101_rf_stop(struct ieee80211_hw *dev)
diff --git a/drivers/net/wireless/rtl8180_max2820.c b/drivers/net/wireless/rtl8180_max2820.c
index a34dfd382b6d..6c825fd7f3b6 100644
--- a/drivers/net/wireless/rtl8180_max2820.c
+++ b/drivers/net/wireless/rtl8180_max2820.c
@@ -78,7 +78,8 @@ static void max2820_rf_set_channel(struct ieee80211_hw *dev,
78 struct ieee80211_conf *conf) 78 struct ieee80211_conf *conf)
79{ 79{
80 struct rtl8180_priv *priv = dev->priv; 80 struct rtl8180_priv *priv = dev->priv;
81 int channel = ieee80211_frequency_to_channel(conf->channel->center_freq); 81 int channel = conf ?
82 ieee80211_frequency_to_channel(conf->channel->center_freq) : 1;
82 unsigned int chan_idx = channel - 1; 83 unsigned int chan_idx = channel - 1;
83 u32 txpw = priv->channels[chan_idx].hw_value & 0xFF; 84 u32 txpw = priv->channels[chan_idx].hw_value & 0xFF;
84 u32 chan = max2820_chan[chan_idx]; 85 u32 chan = max2820_chan[chan_idx];
@@ -87,7 +88,7 @@ static void max2820_rf_set_channel(struct ieee80211_hw *dev,
87 * sa2400, for MAXIM we do this directly from BB */ 88 * sa2400, for MAXIM we do this directly from BB */
88 rtl8180_write_phy(dev, 3, txpw); 89 rtl8180_write_phy(dev, 3, txpw);
89 90
90 max2820_write_phy_antenna(dev, chan); 91 max2820_write_phy_antenna(dev, channel);
91 write_max2820(dev, 3, chan); 92 write_max2820(dev, 3, chan);
92} 93}
93 94
diff --git a/drivers/net/wireless/rtl8180_sa2400.c b/drivers/net/wireless/rtl8180_sa2400.c
index 0311b4ea124c..cea4e0ccb92d 100644
--- a/drivers/net/wireless/rtl8180_sa2400.c
+++ b/drivers/net/wireless/rtl8180_sa2400.c
@@ -86,7 +86,7 @@ static void sa2400_rf_set_channel(struct ieee80211_hw *dev,
86 86
87 write_sa2400(dev, 7, txpw); 87 write_sa2400(dev, 7, txpw);
88 88
89 sa2400_write_phy_antenna(dev, chan); 89 sa2400_write_phy_antenna(dev, channel);
90 90
91 write_sa2400(dev, 0, chan); 91 write_sa2400(dev, 0, chan);
92 write_sa2400(dev, 1, 0xbb50); 92 write_sa2400(dev, 1, 0xbb50);
diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c
index d5787b37e1fb..9223ada5f00e 100644
--- a/drivers/net/wireless/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl8187_dev.c
@@ -92,6 +92,7 @@ static void rtl8187_iowrite_async(struct rtl8187_priv *priv, __le16 addr,
92 u8 data[4]; 92 u8 data[4];
93 struct usb_ctrlrequest dr; 93 struct usb_ctrlrequest dr;
94 } *buf; 94 } *buf;
95 int rc;
95 96
96 buf = kmalloc(sizeof(*buf), GFP_ATOMIC); 97 buf = kmalloc(sizeof(*buf), GFP_ATOMIC);
97 if (!buf) 98 if (!buf)
@@ -116,7 +117,11 @@ static void rtl8187_iowrite_async(struct rtl8187_priv *priv, __le16 addr,
116 usb_fill_control_urb(urb, priv->udev, usb_sndctrlpipe(priv->udev, 0), 117 usb_fill_control_urb(urb, priv->udev, usb_sndctrlpipe(priv->udev, 0),
117 (unsigned char *)dr, buf, len, 118 (unsigned char *)dr, buf, len,
118 rtl8187_iowrite_async_cb, buf); 119 rtl8187_iowrite_async_cb, buf);
119 usb_submit_urb(urb, GFP_ATOMIC); 120 rc = usb_submit_urb(urb, GFP_ATOMIC);
121 if (rc < 0) {
122 kfree(buf);
123 usb_free_urb(urb);
124 }
120} 125}
121 126
122static inline void rtl818x_iowrite32_async(struct rtl8187_priv *priv, 127static inline void rtl818x_iowrite32_async(struct rtl8187_priv *priv,
@@ -169,6 +174,7 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb,
169 struct urb *urb; 174 struct urb *urb;
170 __le16 rts_dur = 0; 175 __le16 rts_dur = 0;
171 u32 flags; 176 u32 flags;
177 int rc;
172 178
173 urb = usb_alloc_urb(0, GFP_ATOMIC); 179 urb = usb_alloc_urb(0, GFP_ATOMIC);
174 if (!urb) { 180 if (!urb) {
@@ -208,7 +214,11 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb,
208 info->dev = dev; 214 info->dev = dev;
209 usb_fill_bulk_urb(urb, priv->udev, usb_sndbulkpipe(priv->udev, 2), 215 usb_fill_bulk_urb(urb, priv->udev, usb_sndbulkpipe(priv->udev, 2),
210 hdr, skb->len, rtl8187_tx_cb, skb); 216 hdr, skb->len, rtl8187_tx_cb, skb);
211 usb_submit_urb(urb, GFP_ATOMIC); 217 rc = usb_submit_urb(urb, GFP_ATOMIC);
218 if (rc < 0) {
219 usb_free_urb(urb);
220 kfree_skb(skb);
221 }
212 222
213 return 0; 223 return 0;
214} 224}
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
index 69c45ca99051..418606ac1c3b 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -719,7 +719,7 @@ int zd_mac_rx(struct ieee80211_hw *hw, const u8 *buffer, unsigned int length)
719 fc = le16_to_cpu(*((__le16 *) buffer)); 719 fc = le16_to_cpu(*((__le16 *) buffer));
720 720
721 is_qos = ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) && 721 is_qos = ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) &&
722 ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_QOS_DATA); 722 (fc & IEEE80211_STYPE_QOS_DATA);
723 is_4addr = (fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) == 723 is_4addr = (fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) ==
724 (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS); 724 (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS);
725 need_padding = is_qos ^ is_4addr; 725 need_padding = is_qos ^ is_4addr;
@@ -805,7 +805,7 @@ void zd_process_intr(struct work_struct *work)
805 u16 int_status; 805 u16 int_status;
806 struct zd_mac *mac = container_of(work, struct zd_mac, process_intr); 806 struct zd_mac *mac = container_of(work, struct zd_mac, process_intr);
807 807
808 int_status = le16_to_cpu(*(u16 *)(mac->intr_buffer+4)); 808 int_status = le16_to_cpu(*(__le16 *)(mac->intr_buffer+4));
809 if (int_status & INT_CFG_NEXT_BCN) { 809 if (int_status & INT_CFG_NEXT_BCN) {
810 if (net_ratelimit()) 810 if (net_ratelimit())
811 dev_dbg_f(zd_mac_dev(mac), "INT_CFG_NEXT_BCN\n"); 811 dev_dbg_f(zd_mac_dev(mac), "INT_CFG_NEXT_BCN\n");
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c
index 12e24f04dddf..8941f5eb96c2 100644
--- a/drivers/net/wireless/zd1211rw/zd_usb.c
+++ b/drivers/net/wireless/zd1211rw/zd_usb.c
@@ -342,7 +342,7 @@ static inline void handle_regs_int(struct urb *urb)
342 ZD_ASSERT(in_interrupt()); 342 ZD_ASSERT(in_interrupt());
343 spin_lock(&intr->lock); 343 spin_lock(&intr->lock);
344 344
345 int_num = le16_to_cpu(*(u16 *)(urb->transfer_buffer+2)); 345 int_num = le16_to_cpu(*(__le16 *)(urb->transfer_buffer+2));
346 if (int_num == CR_INTERRUPT) { 346 if (int_num == CR_INTERRUPT) {
347 struct zd_mac *mac = zd_hw_mac(zd_usb_to_hw(urb->context)); 347 struct zd_mac *mac = zd_hw_mac(zd_usb_to_hw(urb->context));
348 memcpy(&mac->intr_buffer, urb->transfer_buffer, 348 memcpy(&mac->intr_buffer, urb->transfer_buffer,
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 8bddff150c70..d26f69b0184f 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -946,8 +946,7 @@ err:
946 work_done++; 946 work_done++;
947 } 947 }
948 948
949 while ((skb = __skb_dequeue(&errq))) 949 __skb_queue_purge(&errq);
950 kfree_skb(skb);
951 950
952 work_done -= handle_incoming_queue(dev, &rxq); 951 work_done -= handle_incoming_queue(dev, &rxq);
953 952
@@ -1079,8 +1078,7 @@ static void xennet_release_rx_bufs(struct netfront_info *np)
1079 } 1078 }
1080 } 1079 }
1081 1080
1082 while ((skb = __skb_dequeue(&free_list)) != NULL) 1081 __skb_queue_purge(&free_list);
1083 dev_kfree_skb(skb);
1084 1082
1085 spin_unlock_bh(&np->rx_lock); 1083 spin_unlock_bh(&np->rx_lock);
1086} 1084}
diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c
index 715a44471617..b2ccdcbeb896 100644
--- a/drivers/of/of_i2c.c
+++ b/drivers/of/of_i2c.c
@@ -21,7 +21,6 @@ struct i2c_driver_device {
21}; 21};
22 22
23static struct i2c_driver_device i2c_devices[] = { 23static struct i2c_driver_device i2c_devices[] = {
24 { "dallas,ds1374", "rtc-ds1374" },
25}; 24};
26 25
27static int of_find_i2c_driver(struct device_node *node, 26static int of_find_i2c_driver(struct device_node *node,
diff --git a/drivers/pci/access.c b/drivers/pci/access.c
index ec8f7002b09d..39bb96b413ef 100644
--- a/drivers/pci/access.c
+++ b/drivers/pci/access.c
@@ -178,8 +178,7 @@ static int pci_vpd_pci22_read(struct pci_dev *dev, int pos, int size,
178 int ret; 178 int ret;
179 int begin, end, i; 179 int begin, end, i;
180 180
181 if (pos < 0 || pos > PCI_VPD_PCI22_SIZE || 181 if (pos < 0 || pos > vpd->base.len || size > vpd->base.len - pos)
182 size > PCI_VPD_PCI22_SIZE - pos)
183 return -EINVAL; 182 return -EINVAL;
184 if (size == 0) 183 if (size == 0)
185 return 0; 184 return 0;
@@ -223,8 +222,8 @@ static int pci_vpd_pci22_write(struct pci_dev *dev, int pos, int size,
223 u32 val; 222 u32 val;
224 int ret; 223 int ret;
225 224
226 if (pos < 0 || pos > PCI_VPD_PCI22_SIZE || pos & 3 || 225 if (pos < 0 || pos > vpd->base.len || pos & 3 ||
227 size > PCI_VPD_PCI22_SIZE - pos || size < 4) 226 size > vpd->base.len - pos || size < 4)
228 return -EINVAL; 227 return -EINVAL;
229 228
230 val = (u8) *buf++; 229 val = (u8) *buf++;
@@ -255,11 +254,6 @@ out:
255 return 4; 254 return 4;
256} 255}
257 256
258static int pci_vpd_pci22_get_size(struct pci_dev *dev)
259{
260 return PCI_VPD_PCI22_SIZE;
261}
262
263static void pci_vpd_pci22_release(struct pci_dev *dev) 257static void pci_vpd_pci22_release(struct pci_dev *dev)
264{ 258{
265 kfree(container_of(dev->vpd, struct pci_vpd_pci22, base)); 259 kfree(container_of(dev->vpd, struct pci_vpd_pci22, base));
@@ -268,7 +262,6 @@ static void pci_vpd_pci22_release(struct pci_dev *dev)
268static struct pci_vpd_ops pci_vpd_pci22_ops = { 262static struct pci_vpd_ops pci_vpd_pci22_ops = {
269 .read = pci_vpd_pci22_read, 263 .read = pci_vpd_pci22_read,
270 .write = pci_vpd_pci22_write, 264 .write = pci_vpd_pci22_write,
271 .get_size = pci_vpd_pci22_get_size,
272 .release = pci_vpd_pci22_release, 265 .release = pci_vpd_pci22_release,
273}; 266};
274 267
@@ -284,6 +277,7 @@ int pci_vpd_pci22_init(struct pci_dev *dev)
284 if (!vpd) 277 if (!vpd)
285 return -ENOMEM; 278 return -ENOMEM;
286 279
280 vpd->base.len = PCI_VPD_PCI22_SIZE;
287 vpd->base.ops = &pci_vpd_pci22_ops; 281 vpd->base.ops = &pci_vpd_pci22_ops;
288 spin_lock_init(&vpd->lock); 282 spin_lock_init(&vpd->lock);
289 vpd->cap = cap; 283 vpd->cap = cap;
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index 648596d469f6..91156f85a926 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -700,9 +700,10 @@ cleanup_p2p_bridge(acpi_handle handle, u32 lvl, void *context, void **rv)
700 acpi_walk_namespace(ACPI_TYPE_DEVICE, handle, (u32)1, 700 acpi_walk_namespace(ACPI_TYPE_DEVICE, handle, (u32)1,
701 cleanup_p2p_bridge, NULL, NULL); 701 cleanup_p2p_bridge, NULL, NULL);
702 702
703 if (!(bridge = acpiphp_handle_to_bridge(handle))) 703 bridge = acpiphp_handle_to_bridge(handle);
704 return AE_OK; 704 if (bridge)
705 cleanup_bridge(bridge); 705 cleanup_bridge(bridge);
706
706 return AE_OK; 707 return AE_OK;
707} 708}
708 709
@@ -715,9 +716,19 @@ static void remove_bridge(acpi_handle handle)
715 acpi_walk_namespace(ACPI_TYPE_DEVICE, handle, 716 acpi_walk_namespace(ACPI_TYPE_DEVICE, handle,
716 (u32)1, cleanup_p2p_bridge, NULL, NULL); 717 (u32)1, cleanup_p2p_bridge, NULL, NULL);
717 718
719 /*
720 * On root bridges with hotplug slots directly underneath (ie,
721 * no p2p bridge inbetween), we call cleanup_bridge().
722 *
723 * The else clause cleans up root bridges that either had no
724 * hotplug slots at all, or had a p2p bridge underneath.
725 */
718 bridge = acpiphp_handle_to_bridge(handle); 726 bridge = acpiphp_handle_to_bridge(handle);
719 if (bridge) 727 if (bridge)
720 cleanup_bridge(bridge); 728 cleanup_bridge(bridge);
729 else
730 acpi_remove_notify_handler(handle, ACPI_SYSTEM_NOTIFY,
731 handle_hotplug_event_bridge);
721} 732}
722 733
723static struct pci_dev * get_apic_pci_info(acpi_handle handle) 734static struct pci_dev * get_apic_pci_info(acpi_handle handle)
diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c
index 925ba16355ce..a11021e8ce37 100644
--- a/drivers/pci/hotplug/pci_hotplug_core.c
+++ b/drivers/pci/hotplug/pci_hotplug_core.c
@@ -619,6 +619,7 @@ static struct hotplug_slot *get_slot_from_name (const char *name)
619int pci_hp_register (struct hotplug_slot *slot) 619int pci_hp_register (struct hotplug_slot *slot)
620{ 620{
621 int result; 621 int result;
622 struct hotplug_slot *tmp;
622 623
623 if (slot == NULL) 624 if (slot == NULL)
624 return -ENODEV; 625 return -ENODEV;
@@ -630,7 +631,11 @@ int pci_hp_register (struct hotplug_slot *slot)
630 return -EINVAL; 631 return -EINVAL;
631 } 632 }
632 633
633 /* this can fail if we have already registered a slot with the same name */ 634 /* Check if we have already registered a slot with the same name. */
635 tmp = get_slot_from_name(slot->name);
636 if (tmp)
637 return -EEXIST;
638
634 slot->kobj.kset = pci_hotplug_slots_kset; 639 slot->kobj.kset = pci_hotplug_slots_kset;
635 result = kobject_init_and_add(&slot->kobj, &hotplug_slot_ktype, NULL, 640 result = kobject_init_and_add(&slot->kobj, &hotplug_slot_ktype, NULL,
636 "%s", slot->name); 641 "%s", slot->name);
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h
index 8264a7680435..79c9ddaad3fb 100644
--- a/drivers/pci/hotplug/pciehp.h
+++ b/drivers/pci/hotplug/pciehp.h
@@ -97,6 +97,7 @@ struct controller {
97 u8 cap_base; 97 u8 cap_base;
98 struct timer_list poll_timer; 98 struct timer_list poll_timer;
99 volatile int cmd_busy; 99 volatile int cmd_busy;
100 unsigned int no_cmd_complete:1;
100}; 101};
101 102
102#define INT_BUTTON_IGNORE 0 103#define INT_BUTTON_IGNORE 0
@@ -135,6 +136,7 @@ struct controller {
135#define PWR_LED_PRSN 0x00000010 136#define PWR_LED_PRSN 0x00000010
136#define HP_SUPR_RM_SUP 0x00000020 137#define HP_SUPR_RM_SUP 0x00000020
137#define EMI_PRSN 0x00020000 138#define EMI_PRSN 0x00020000
139#define NO_CMD_CMPL_SUP 0x00040000
138 140
139#define ATTN_BUTTN(ctrl) ((ctrl)->slot_cap & ATTN_BUTTN_PRSN) 141#define ATTN_BUTTN(ctrl) ((ctrl)->slot_cap & ATTN_BUTTN_PRSN)
140#define POWER_CTRL(ctrl) ((ctrl)->slot_cap & PWR_CTRL_PRSN) 142#define POWER_CTRL(ctrl) ((ctrl)->slot_cap & PWR_CTRL_PRSN)
@@ -143,13 +145,14 @@ struct controller {
143#define PWR_LED(ctrl) ((ctrl)->slot_cap & PWR_LED_PRSN) 145#define PWR_LED(ctrl) ((ctrl)->slot_cap & PWR_LED_PRSN)
144#define HP_SUPR_RM(ctrl) ((ctrl)->slot_cap & HP_SUPR_RM_SUP) 146#define HP_SUPR_RM(ctrl) ((ctrl)->slot_cap & HP_SUPR_RM_SUP)
145#define EMI(ctrl) ((ctrl)->slot_cap & EMI_PRSN) 147#define EMI(ctrl) ((ctrl)->slot_cap & EMI_PRSN)
148#define NO_CMD_CMPL(ctrl) ((ctrl)->slot_cap & NO_CMD_CMPL_SUP)
146 149
147extern int pciehp_sysfs_enable_slot(struct slot *slot); 150extern int pciehp_sysfs_enable_slot(struct slot *slot);
148extern int pciehp_sysfs_disable_slot(struct slot *slot); 151extern int pciehp_sysfs_disable_slot(struct slot *slot);
149extern u8 pciehp_handle_attention_button(u8 hp_slot, struct controller *ctrl); 152extern u8 pciehp_handle_attention_button(struct slot *p_slot);
150extern u8 pciehp_handle_switch_change(u8 hp_slot, struct controller *ctrl); 153 extern u8 pciehp_handle_switch_change(struct slot *p_slot);
151extern u8 pciehp_handle_presence_change(u8 hp_slot, struct controller *ctrl); 154extern u8 pciehp_handle_presence_change(struct slot *p_slot);
152extern u8 pciehp_handle_power_fault(u8 hp_slot, struct controller *ctrl); 155extern u8 pciehp_handle_power_fault(struct slot *p_slot);
153extern int pciehp_configure_device(struct slot *p_slot); 156extern int pciehp_configure_device(struct slot *p_slot);
154extern int pciehp_unconfigure_device(struct slot *p_slot); 157extern int pciehp_unconfigure_device(struct slot *p_slot);
155extern void pciehp_queue_pushbutton_work(struct work_struct *work); 158extern void pciehp_queue_pushbutton_work(struct work_struct *work);
diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c
index 43d8ddb2d679..48a2ed378914 100644
--- a/drivers/pci/hotplug/pciehp_core.c
+++ b/drivers/pci/hotplug/pciehp_core.c
@@ -254,7 +254,11 @@ static int init_slots(struct controller *ctrl)
254 slot->hp_slot, slot->number, ctrl->slot_device_offset); 254 slot->hp_slot, slot->number, ctrl->slot_device_offset);
255 retval = pci_hp_register(hotplug_slot); 255 retval = pci_hp_register(hotplug_slot);
256 if (retval) { 256 if (retval) {
257 err ("pci_hp_register failed with error %d\n", retval); 257 err("pci_hp_register failed with error %d\n", retval);
258 if (retval == -EEXIST)
259 err("Failed to register slot because of name "
260 "collision. Try \'pciehp_slot_with_bus\' "
261 "module option.\n");
258 goto error_info; 262 goto error_info;
259 } 263 }
260 /* create additional sysfs entries */ 264 /* create additional sysfs entries */
diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c
index 0a7aa628e955..96a5d55a4983 100644
--- a/drivers/pci/hotplug/pciehp_ctrl.c
+++ b/drivers/pci/hotplug/pciehp_ctrl.c
@@ -55,16 +55,13 @@ static int queue_interrupt_event(struct slot *p_slot, u32 event_type)
55 return 0; 55 return 0;
56} 56}
57 57
58u8 pciehp_handle_attention_button(u8 hp_slot, struct controller *ctrl) 58u8 pciehp_handle_attention_button(struct slot *p_slot)
59{ 59{
60 struct slot *p_slot;
61 u32 event_type; 60 u32 event_type;
62 61
63 /* Attention Button Change */ 62 /* Attention Button Change */
64 dbg("pciehp: Attention button interrupt received.\n"); 63 dbg("pciehp: Attention button interrupt received.\n");
65 64
66 p_slot = pciehp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset);
67
68 /* 65 /*
69 * Button pressed - See if need to TAKE ACTION!!! 66 * Button pressed - See if need to TAKE ACTION!!!
70 */ 67 */
@@ -76,18 +73,15 @@ u8 pciehp_handle_attention_button(u8 hp_slot, struct controller *ctrl)
76 return 0; 73 return 0;
77} 74}
78 75
79u8 pciehp_handle_switch_change(u8 hp_slot, struct controller *ctrl) 76u8 pciehp_handle_switch_change(struct slot *p_slot)
80{ 77{
81 struct slot *p_slot;
82 u8 getstatus; 78 u8 getstatus;
83 u32 event_type; 79 u32 event_type;
84 80
85 /* Switch Change */ 81 /* Switch Change */
86 dbg("pciehp: Switch interrupt received.\n"); 82 dbg("pciehp: Switch interrupt received.\n");
87 83
88 p_slot = pciehp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset);
89 p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); 84 p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
90
91 if (getstatus) { 85 if (getstatus) {
92 /* 86 /*
93 * Switch opened 87 * Switch opened
@@ -107,17 +101,14 @@ u8 pciehp_handle_switch_change(u8 hp_slot, struct controller *ctrl)
107 return 1; 101 return 1;
108} 102}
109 103
110u8 pciehp_handle_presence_change(u8 hp_slot, struct controller *ctrl) 104u8 pciehp_handle_presence_change(struct slot *p_slot)
111{ 105{
112 struct slot *p_slot;
113 u32 event_type; 106 u32 event_type;
114 u8 presence_save; 107 u8 presence_save;
115 108
116 /* Presence Change */ 109 /* Presence Change */
117 dbg("pciehp: Presence/Notify input change.\n"); 110 dbg("pciehp: Presence/Notify input change.\n");
118 111
119 p_slot = pciehp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset);
120
121 /* Switch is open, assume a presence change 112 /* Switch is open, assume a presence change
122 * Save the presence state 113 * Save the presence state
123 */ 114 */
@@ -141,16 +132,13 @@ u8 pciehp_handle_presence_change(u8 hp_slot, struct controller *ctrl)
141 return 1; 132 return 1;
142} 133}
143 134
144u8 pciehp_handle_power_fault(u8 hp_slot, struct controller *ctrl) 135u8 pciehp_handle_power_fault(struct slot *p_slot)
145{ 136{
146 struct slot *p_slot;
147 u32 event_type; 137 u32 event_type;
148 138
149 /* power fault */ 139 /* power fault */
150 dbg("pciehp: Power fault interrupt received.\n"); 140 dbg("pciehp: Power fault interrupt received.\n");
151 141
152 p_slot = pciehp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset);
153
154 if ( !(p_slot->hpc_ops->query_power_fault(p_slot))) { 142 if ( !(p_slot->hpc_ops->query_power_fault(p_slot))) {
155 /* 143 /*
156 * power fault Cleared 144 * power fault Cleared
@@ -163,7 +151,7 @@ u8 pciehp_handle_power_fault(u8 hp_slot, struct controller *ctrl)
163 */ 151 */
164 info("Power fault on Slot(%s)\n", p_slot->name); 152 info("Power fault on Slot(%s)\n", p_slot->name);
165 event_type = INT_POWER_FAULT; 153 event_type = INT_POWER_FAULT;
166 info("power fault bit %x set\n", hp_slot); 154 info("power fault bit %x set\n", 0);
167 } 155 }
168 156
169 queue_interrupt_event(p_slot, event_type); 157 queue_interrupt_event(p_slot, event_type);
@@ -186,6 +174,13 @@ static void set_slot_off(struct controller *ctrl, struct slot * pslot)
186 } 174 }
187 } 175 }
188 176
177 /*
178 * After turning power off, we must wait for at least 1 second
179 * before taking any action that relies on power having been
180 * removed from the slot/adapter.
181 */
182 msleep(1000);
183
189 if (PWR_LED(ctrl)) 184 if (PWR_LED(ctrl))
190 pslot->hpc_ops->green_led_off(pslot); 185 pslot->hpc_ops->green_led_off(pslot);
191 186
@@ -289,6 +284,13 @@ static int remove_board(struct slot *p_slot)
289 } 284 }
290 } 285 }
291 286
287 /*
288 * After turning power off, we must wait for at least 1 second
289 * before taking any action that relies on power having been
290 * removed from the slot/adapter.
291 */
292 msleep(1000);
293
292 if (PWR_LED(ctrl)) 294 if (PWR_LED(ctrl))
293 /* turn off Green LED */ 295 /* turn off Green LED */
294 p_slot->hpc_ops->green_led_off(p_slot); 296 p_slot->hpc_ops->green_led_off(p_slot);
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
index 891f81a0400c..79f104963166 100644
--- a/drivers/pci/hotplug/pciehp_hpc.c
+++ b/drivers/pci/hotplug/pciehp_hpc.c
@@ -247,14 +247,38 @@ static inline void pciehp_free_irq(struct controller *ctrl)
247 free_irq(ctrl->pci_dev->irq, ctrl); 247 free_irq(ctrl->pci_dev->irq, ctrl);
248} 248}
249 249
250static inline int pcie_wait_cmd(struct controller *ctrl) 250static inline int pcie_poll_cmd(struct controller *ctrl)
251{
252 u16 slot_status;
253 int timeout = 1000;
254
255 if (!pciehp_readw(ctrl, SLOTSTATUS, &slot_status))
256 if (slot_status & CMD_COMPLETED)
257 goto completed;
258 for (timeout = 1000; timeout > 0; timeout -= 100) {
259 msleep(100);
260 if (!pciehp_readw(ctrl, SLOTSTATUS, &slot_status))
261 if (slot_status & CMD_COMPLETED)
262 goto completed;
263 }
264 return 0; /* timeout */
265
266completed:
267 pciehp_writew(ctrl, SLOTSTATUS, CMD_COMPLETED);
268 return timeout;
269}
270
271static inline int pcie_wait_cmd(struct controller *ctrl, int poll)
251{ 272{
252 int retval = 0; 273 int retval = 0;
253 unsigned int msecs = pciehp_poll_mode ? 2500 : 1000; 274 unsigned int msecs = pciehp_poll_mode ? 2500 : 1000;
254 unsigned long timeout = msecs_to_jiffies(msecs); 275 unsigned long timeout = msecs_to_jiffies(msecs);
255 int rc; 276 int rc;
256 277
257 rc = wait_event_interruptible_timeout(ctrl->queue, 278 if (poll)
279 rc = pcie_poll_cmd(ctrl);
280 else
281 rc = wait_event_interruptible_timeout(ctrl->queue,
258 !ctrl->cmd_busy, timeout); 282 !ctrl->cmd_busy, timeout);
259 if (!rc) 283 if (!rc)
260 dbg("Command not completed in 1000 msec\n"); 284 dbg("Command not completed in 1000 msec\n");
@@ -286,12 +310,28 @@ static int pcie_write_cmd(struct controller *ctrl, u16 cmd, u16 mask)
286 goto out; 310 goto out;
287 } 311 }
288 312
289 if ((slot_status & CMD_COMPLETED) == CMD_COMPLETED ) { 313 if (slot_status & CMD_COMPLETED) {
290 /* After 1 sec and CMD_COMPLETED still not set, just 314 if (!ctrl->no_cmd_complete) {
291 proceed forward to issue the next command according 315 /*
292 to spec. Just print out the error message */ 316 * After 1 sec and CMD_COMPLETED still not set, just
293 dbg("%s: CMD_COMPLETED not clear after 1 sec.\n", 317 * proceed forward to issue the next command according
294 __func__); 318 * to spec. Just print out the error message.
319 */
320 dbg("%s: CMD_COMPLETED not clear after 1 sec.\n",
321 __func__);
322 } else if (!NO_CMD_CMPL(ctrl)) {
323 /*
324 * This controller semms to notify of command completed
325 * event even though it supports none of power
326 * controller, attention led, power led and EMI.
327 */
328 dbg("%s: Unexpected CMD_COMPLETED. Need to wait for "
329 "command completed event.\n", __func__);
330 ctrl->no_cmd_complete = 0;
331 } else {
332 dbg("%s: Unexpected CMD_COMPLETED. Maybe the "
333 "controller is broken.\n", __func__);
334 }
295 } 335 }
296 336
297 retval = pciehp_readw(ctrl, SLOTCTRL, &slot_ctrl); 337 retval = pciehp_readw(ctrl, SLOTCTRL, &slot_ctrl);
@@ -315,8 +355,18 @@ static int pcie_write_cmd(struct controller *ctrl, u16 cmd, u16 mask)
315 /* 355 /*
316 * Wait for command completion. 356 * Wait for command completion.
317 */ 357 */
318 if (!retval) 358 if (!retval && !ctrl->no_cmd_complete) {
319 retval = pcie_wait_cmd(ctrl); 359 int poll = 0;
360 /*
361 * if hotplug interrupt is not enabled or command
362 * completed interrupt is not enabled, we need to poll
363 * command completed event.
364 */
365 if (!(slot_ctrl & HP_INTR_ENABLE) ||
366 !(slot_ctrl & CMD_CMPL_INTR_ENABLE))
367 poll = 1;
368 retval = pcie_wait_cmd(ctrl, poll);
369 }
320 out: 370 out:
321 mutex_unlock(&ctrl->ctrl_lock); 371 mutex_unlock(&ctrl->ctrl_lock);
322 return retval; 372 return retval;
@@ -704,13 +754,6 @@ static int hpc_power_off_slot(struct slot * slot)
704 } 754 }
705 dbg("%s: SLOTCTRL %x write cmd %x\n", 755 dbg("%s: SLOTCTRL %x write cmd %x\n",
706 __func__, ctrl->cap_base + SLOTCTRL, slot_cmd); 756 __func__, ctrl->cap_base + SLOTCTRL, slot_cmd);
707
708 /*
709 * After turning power off, we must wait for at least 1 second
710 * before taking any action that relies on power having been
711 * removed from the slot/adapter.
712 */
713 msleep(1000);
714 out: 757 out:
715 if (changed) 758 if (changed)
716 pcie_unmask_bad_dllp(ctrl); 759 pcie_unmask_bad_dllp(ctrl);
@@ -722,6 +765,7 @@ static irqreturn_t pcie_isr(int irq, void *dev_id)
722{ 765{
723 struct controller *ctrl = (struct controller *)dev_id; 766 struct controller *ctrl = (struct controller *)dev_id;
724 u16 detected, intr_loc; 767 u16 detected, intr_loc;
768 struct slot *p_slot;
725 769
726 /* 770 /*
727 * In order to guarantee that all interrupt events are 771 * In order to guarantee that all interrupt events are
@@ -756,21 +800,38 @@ static irqreturn_t pcie_isr(int irq, void *dev_id)
756 wake_up_interruptible(&ctrl->queue); 800 wake_up_interruptible(&ctrl->queue);
757 } 801 }
758 802
803 if (!(intr_loc & ~CMD_COMPLETED))
804 return IRQ_HANDLED;
805
806 /*
807 * Return without handling events if this handler routine is
808 * called before controller initialization is done. This may
809 * happen if hotplug event or another interrupt that shares
810 * the IRQ with pciehp arrives before slot initialization is
811 * done after interrupt handler is registered.
812 *
813 * FIXME - Need more structural fixes. We need to be ready to
814 * handle the event before installing interrupt handler.
815 */
816 p_slot = pciehp_find_slot(ctrl, ctrl->slot_device_offset);
817 if (!p_slot || !p_slot->hpc_ops)
818 return IRQ_HANDLED;
819
759 /* Check MRL Sensor Changed */ 820 /* Check MRL Sensor Changed */
760 if (intr_loc & MRL_SENS_CHANGED) 821 if (intr_loc & MRL_SENS_CHANGED)
761 pciehp_handle_switch_change(0, ctrl); 822 pciehp_handle_switch_change(p_slot);
762 823
763 /* Check Attention Button Pressed */ 824 /* Check Attention Button Pressed */
764 if (intr_loc & ATTN_BUTTN_PRESSED) 825 if (intr_loc & ATTN_BUTTN_PRESSED)
765 pciehp_handle_attention_button(0, ctrl); 826 pciehp_handle_attention_button(p_slot);
766 827
767 /* Check Presence Detect Changed */ 828 /* Check Presence Detect Changed */
768 if (intr_loc & PRSN_DETECT_CHANGED) 829 if (intr_loc & PRSN_DETECT_CHANGED)
769 pciehp_handle_presence_change(0, ctrl); 830 pciehp_handle_presence_change(p_slot);
770 831
771 /* Check Power Fault Detected */ 832 /* Check Power Fault Detected */
772 if (intr_loc & PWR_FAULT_DETECTED) 833 if (intr_loc & PWR_FAULT_DETECTED)
773 pciehp_handle_power_fault(0, ctrl); 834 pciehp_handle_power_fault(p_slot);
774 835
775 return IRQ_HANDLED; 836 return IRQ_HANDLED;
776} 837}
@@ -1028,6 +1089,12 @@ static int pciehp_acpi_get_hp_hw_control_from_firmware(struct pci_dev *dev)
1028static int pcie_init_hardware_part1(struct controller *ctrl, 1089static int pcie_init_hardware_part1(struct controller *ctrl,
1029 struct pcie_device *dev) 1090 struct pcie_device *dev)
1030{ 1091{
1092 /* Clear all remaining event bits in Slot Status register */
1093 if (pciehp_writew(ctrl, SLOTSTATUS, 0x1f)) {
1094 err("%s: Cannot write to SLOTSTATUS register\n", __func__);
1095 return -1;
1096 }
1097
1031 /* Mask Hot-plug Interrupt Enable */ 1098 /* Mask Hot-plug Interrupt Enable */
1032 if (pcie_write_cmd(ctrl, 0, HP_INTR_ENABLE | CMD_CMPL_INTR_ENABLE)) { 1099 if (pcie_write_cmd(ctrl, 0, HP_INTR_ENABLE | CMD_CMPL_INTR_ENABLE)) {
1033 err("%s: Cannot mask hotplug interrupt enable\n", __func__); 1100 err("%s: Cannot mask hotplug interrupt enable\n", __func__);
@@ -1040,16 +1107,6 @@ int pcie_init_hardware_part2(struct controller *ctrl, struct pcie_device *dev)
1040{ 1107{
1041 u16 cmd, mask; 1108 u16 cmd, mask;
1042 1109
1043 /*
1044 * We need to clear all events before enabling hotplug interrupt
1045 * notification mechanism in order for hotplug controler to
1046 * generate interrupts.
1047 */
1048 if (pciehp_writew(ctrl, SLOTSTATUS, 0x1f)) {
1049 err("%s: Cannot write to SLOTSTATUS register\n", __FUNCTION__);
1050 return -1;
1051 }
1052
1053 cmd = PRSN_DETECT_ENABLE; 1110 cmd = PRSN_DETECT_ENABLE;
1054 if (ATTN_BUTTN(ctrl)) 1111 if (ATTN_BUTTN(ctrl))
1055 cmd |= ATTN_BUTTN_ENABLE; 1112 cmd |= ATTN_BUTTN_ENABLE;
@@ -1116,6 +1173,7 @@ static inline void dbg_ctrl(struct controller *ctrl)
1116 dbg(" Power Indicator : %3s\n", PWR_LED(ctrl) ? "yes" : "no"); 1173 dbg(" Power Indicator : %3s\n", PWR_LED(ctrl) ? "yes" : "no");
1117 dbg(" Hot-Plug Surprise : %3s\n", HP_SUPR_RM(ctrl) ? "yes" : "no"); 1174 dbg(" Hot-Plug Surprise : %3s\n", HP_SUPR_RM(ctrl) ? "yes" : "no");
1118 dbg(" EMI Present : %3s\n", EMI(ctrl) ? "yes" : "no"); 1175 dbg(" EMI Present : %3s\n", EMI(ctrl) ? "yes" : "no");
1176 dbg(" Comamnd Completed : %3s\n", NO_CMD_CMPL(ctrl)? "no" : "yes");
1119 pciehp_readw(ctrl, SLOTSTATUS, &reg16); 1177 pciehp_readw(ctrl, SLOTSTATUS, &reg16);
1120 dbg("Slot Status : 0x%04x\n", reg16); 1178 dbg("Slot Status : 0x%04x\n", reg16);
1121 pciehp_readw(ctrl, SLOTSTATUS, &reg16); 1179 pciehp_readw(ctrl, SLOTSTATUS, &reg16);
@@ -1147,6 +1205,15 @@ int pcie_init(struct controller *ctrl, struct pcie_device *dev)
1147 mutex_init(&ctrl->ctrl_lock); 1205 mutex_init(&ctrl->ctrl_lock);
1148 init_waitqueue_head(&ctrl->queue); 1206 init_waitqueue_head(&ctrl->queue);
1149 dbg_ctrl(ctrl); 1207 dbg_ctrl(ctrl);
1208 /*
1209 * Controller doesn't notify of command completion if the "No
1210 * Command Completed Support" bit is set in Slot Capability
1211 * register or the controller supports none of power
1212 * controller, attention led, power led and EMI.
1213 */
1214 if (NO_CMD_CMPL(ctrl) ||
1215 !(POWER_CTRL(ctrl) | ATTN_LED(ctrl) | PWR_LED(ctrl) | EMI(ctrl)))
1216 ctrl->no_cmd_complete = 1;
1150 1217
1151 info("HPC vendor_id %x device_id %x ss_vid %x ss_did %x\n", 1218 info("HPC vendor_id %x device_id %x ss_vid %x ss_did %x\n",
1152 pdev->vendor, pdev->device, 1219 pdev->vendor, pdev->device,
diff --git a/drivers/pci/hotplug/rpadlpar_sysfs.c b/drivers/pci/hotplug/rpadlpar_sysfs.c
index e32148a8fa12..779c5db71be4 100644
--- a/drivers/pci/hotplug/rpadlpar_sysfs.c
+++ b/drivers/pci/hotplug/rpadlpar_sysfs.c
@@ -18,8 +18,12 @@
18#include "rpadlpar.h" 18#include "rpadlpar.h"
19 19
20#define DLPAR_KOBJ_NAME "control" 20#define DLPAR_KOBJ_NAME "control"
21#define ADD_SLOT_ATTR_NAME "add_slot" 21
22#define REMOVE_SLOT_ATTR_NAME "remove_slot" 22/* Those two have no quotes because they are passed to __ATTR() which
23 * stringifies the argument (yuck !)
24 */
25#define ADD_SLOT_ATTR_NAME add_slot
26#define REMOVE_SLOT_ATTR_NAME remove_slot
23 27
24#define MAX_DRC_NAME_LEN 64 28#define MAX_DRC_NAME_LEN 64
25 29
diff --git a/drivers/pci/hotplug/shpchp_core.c b/drivers/pci/hotplug/shpchp_core.c
index 1648076600fc..97848654652a 100644
--- a/drivers/pci/hotplug/shpchp_core.c
+++ b/drivers/pci/hotplug/shpchp_core.c
@@ -162,6 +162,10 @@ static int init_slots(struct controller *ctrl)
162 retval = pci_hp_register(slot->hotplug_slot); 162 retval = pci_hp_register(slot->hotplug_slot);
163 if (retval) { 163 if (retval) {
164 err("pci_hp_register failed with error %d\n", retval); 164 err("pci_hp_register failed with error %d\n", retval);
165 if (retval == -EEXIST)
166 err("Failed to register slot because of name "
167 "collision. Try \'shpchp_slot_with_bus\' "
168 "module option.\n");
165 goto error_info; 169 goto error_info;
166 } 170 }
167 171
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 72cf61ed8f96..e1637bd82b8e 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -181,7 +181,7 @@ static int pci_call_probe(struct pci_driver *drv, struct pci_dev *dev,
181 any need to change it. */ 181 any need to change it. */
182 struct mempolicy *oldpol; 182 struct mempolicy *oldpol;
183 cpumask_t oldmask = current->cpus_allowed; 183 cpumask_t oldmask = current->cpus_allowed;
184 int node = pcibus_to_node(dev->bus); 184 int node = dev_to_node(&dev->dev);
185 185
186 if (node >= 0) { 186 if (node >= 0) {
187 node_to_cpumask_ptr(nodecpumask, node); 187 node_to_cpumask_ptr(nodecpumask, node);
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index 271d41cc05ab..9c718583a237 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -489,13 +489,13 @@ pci_mmap_legacy_mem(struct kobject *kobj, struct bin_attribute *attr,
489 * @kobj: kobject for mapping 489 * @kobj: kobject for mapping
490 * @attr: struct bin_attribute for the file being mapped 490 * @attr: struct bin_attribute for the file being mapped
491 * @vma: struct vm_area_struct passed into the mmap 491 * @vma: struct vm_area_struct passed into the mmap
492 * @write_combine: 1 for write_combine mapping
492 * 493 *
493 * Use the regular PCI mapping routines to map a PCI resource into userspace. 494 * Use the regular PCI mapping routines to map a PCI resource into userspace.
494 * FIXME: write combining? maybe automatic for prefetchable regions?
495 */ 495 */
496static int 496static int
497pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr, 497pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr,
498 struct vm_area_struct *vma) 498 struct vm_area_struct *vma, int write_combine)
499{ 499{
500 struct pci_dev *pdev = to_pci_dev(container_of(kobj, 500 struct pci_dev *pdev = to_pci_dev(container_of(kobj,
501 struct device, kobj)); 501 struct device, kobj));
@@ -518,7 +518,21 @@ pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr,
518 vma->vm_pgoff += start >> PAGE_SHIFT; 518 vma->vm_pgoff += start >> PAGE_SHIFT;
519 mmap_type = res->flags & IORESOURCE_MEM ? pci_mmap_mem : pci_mmap_io; 519 mmap_type = res->flags & IORESOURCE_MEM ? pci_mmap_mem : pci_mmap_io;
520 520
521 return pci_mmap_page_range(pdev, vma, mmap_type, 0); 521 return pci_mmap_page_range(pdev, vma, mmap_type, write_combine);
522}
523
524static int
525pci_mmap_resource_uc(struct kobject *kobj, struct bin_attribute *attr,
526 struct vm_area_struct *vma)
527{
528 return pci_mmap_resource(kobj, attr, vma, 0);
529}
530
531static int
532pci_mmap_resource_wc(struct kobject *kobj, struct bin_attribute *attr,
533 struct vm_area_struct *vma)
534{
535 return pci_mmap_resource(kobj, attr, vma, 1);
522} 536}
523 537
524/** 538/**
@@ -541,9 +555,46 @@ pci_remove_resource_files(struct pci_dev *pdev)
541 sysfs_remove_bin_file(&pdev->dev.kobj, res_attr); 555 sysfs_remove_bin_file(&pdev->dev.kobj, res_attr);
542 kfree(res_attr); 556 kfree(res_attr);
543 } 557 }
558
559 res_attr = pdev->res_attr_wc[i];
560 if (res_attr) {
561 sysfs_remove_bin_file(&pdev->dev.kobj, res_attr);
562 kfree(res_attr);
563 }
544 } 564 }
545} 565}
546 566
567static int pci_create_attr(struct pci_dev *pdev, int num, int write_combine)
568{
569 /* allocate attribute structure, piggyback attribute name */
570 int name_len = write_combine ? 13 : 10;
571 struct bin_attribute *res_attr;
572 int retval;
573
574 res_attr = kzalloc(sizeof(*res_attr) + name_len, GFP_ATOMIC);
575 if (res_attr) {
576 char *res_attr_name = (char *)(res_attr + 1);
577
578 if (write_combine) {
579 pdev->res_attr_wc[num] = res_attr;
580 sprintf(res_attr_name, "resource%d_wc", num);
581 res_attr->mmap = pci_mmap_resource_wc;
582 } else {
583 pdev->res_attr[num] = res_attr;
584 sprintf(res_attr_name, "resource%d", num);
585 res_attr->mmap = pci_mmap_resource_uc;
586 }
587 res_attr->attr.name = res_attr_name;
588 res_attr->attr.mode = S_IRUSR | S_IWUSR;
589 res_attr->size = pci_resource_len(pdev, num);
590 res_attr->private = &pdev->resource[num];
591 retval = sysfs_create_bin_file(&pdev->dev.kobj, res_attr);
592 } else
593 retval = -ENOMEM;
594
595 return retval;
596}
597
547/** 598/**
548 * pci_create_resource_files - create resource files in sysfs for @dev 599 * pci_create_resource_files - create resource files in sysfs for @dev
549 * @dev: dev in question 600 * @dev: dev in question
@@ -557,31 +608,19 @@ static int pci_create_resource_files(struct pci_dev *pdev)
557 608
558 /* Expose the PCI resources from this device as files */ 609 /* Expose the PCI resources from this device as files */
559 for (i = 0; i < PCI_ROM_RESOURCE; i++) { 610 for (i = 0; i < PCI_ROM_RESOURCE; i++) {
560 struct bin_attribute *res_attr;
561 611
562 /* skip empty resources */ 612 /* skip empty resources */
563 if (!pci_resource_len(pdev, i)) 613 if (!pci_resource_len(pdev, i))
564 continue; 614 continue;
565 615
566 /* allocate attribute structure, piggyback attribute name */ 616 retval = pci_create_attr(pdev, i, 0);
567 res_attr = kzalloc(sizeof(*res_attr) + 10, GFP_ATOMIC); 617 /* for prefetchable resources, create a WC mappable file */
568 if (res_attr) { 618 if (!retval && pdev->resource[i].flags & IORESOURCE_PREFETCH)
569 char *res_attr_name = (char *)(res_attr + 1); 619 retval = pci_create_attr(pdev, i, 1);
570 620
571 pdev->res_attr[i] = res_attr; 621 if (retval) {
572 sprintf(res_attr_name, "resource%d", i); 622 pci_remove_resource_files(pdev);
573 res_attr->attr.name = res_attr_name; 623 return retval;
574 res_attr->attr.mode = S_IRUSR | S_IWUSR;
575 res_attr->size = pci_resource_len(pdev, i);
576 res_attr->mmap = pci_mmap_resource;
577 res_attr->private = &pdev->resource[i];
578 retval = sysfs_create_bin_file(&pdev->dev.kobj, res_attr);
579 if (retval) {
580 pci_remove_resource_files(pdev);
581 return retval;
582 }
583 } else {
584 return -ENOMEM;
585 } 624 }
586 } 625 }
587 return 0; 626 return 0;
@@ -697,9 +736,9 @@ int __must_check pci_create_sysfs_dev_files (struct pci_dev *pdev)
697 attr = kzalloc(sizeof(*attr), GFP_ATOMIC); 736 attr = kzalloc(sizeof(*attr), GFP_ATOMIC);
698 if (attr) { 737 if (attr) {
699 pdev->vpd->attr = attr; 738 pdev->vpd->attr = attr;
700 attr->size = pdev->vpd->ops->get_size(pdev); 739 attr->size = pdev->vpd->len;
701 attr->attr.name = "vpd"; 740 attr->attr.name = "vpd";
702 attr->attr.mode = S_IRUGO | S_IWUSR; 741 attr->attr.mode = S_IRUSR | S_IWUSR;
703 attr->read = pci_read_vpd; 742 attr->read = pci_read_vpd;
704 attr->write = pci_write_vpd; 743 attr->write = pci_write_vpd;
705 retval = sysfs_create_bin_file(&pdev->dev.kobj, attr); 744 retval = sysfs_create_bin_file(&pdev->dev.kobj, attr);
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index 0a497c1b4227..00408c97e5fc 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -21,11 +21,11 @@ extern int pci_user_write_config_dword(struct pci_dev *dev, int where, u32 val);
21struct pci_vpd_ops { 21struct pci_vpd_ops {
22 int (*read)(struct pci_dev *dev, int pos, int size, char *buf); 22 int (*read)(struct pci_dev *dev, int pos, int size, char *buf);
23 int (*write)(struct pci_dev *dev, int pos, int size, const char *buf); 23 int (*write)(struct pci_dev *dev, int pos, int size, const char *buf);
24 int (*get_size)(struct pci_dev *dev);
25 void (*release)(struct pci_dev *dev); 24 void (*release)(struct pci_dev *dev);
26}; 25};
27 26
28struct pci_vpd { 27struct pci_vpd {
28 unsigned int len;
29 struct pci_vpd_ops *ops; 29 struct pci_vpd_ops *ops;
30 struct bin_attribute *attr; /* descriptor for sysfs VPD entry */ 30 struct bin_attribute *attr; /* descriptor for sysfs VPD entry */
31}; 31};
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
index 61fedb2448b6..f82495583e63 100644
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -506,6 +506,23 @@ static void free_link_state(struct pci_dev *pdev)
506 pdev->link_state = NULL; 506 pdev->link_state = NULL;
507} 507}
508 508
509static int pcie_aspm_sanity_check(struct pci_dev *pdev)
510{
511 struct pci_dev *child_dev;
512 int child_pos;
513
514 /*
515 * Some functions in a slot might not all be PCIE functions, very
516 * strange. Disable ASPM for the whole slot
517 */
518 list_for_each_entry(child_dev, &pdev->subordinate->devices, bus_list) {
519 child_pos = pci_find_capability(child_dev, PCI_CAP_ID_EXP);
520 if (!child_pos)
521 return -EINVAL;
522 }
523 return 0;
524}
525
509/* 526/*
510 * pcie_aspm_init_link_state: Initiate PCI express link state. 527 * pcie_aspm_init_link_state: Initiate PCI express link state.
511 * It is called after the pcie and its children devices are scaned. 528 * It is called after the pcie and its children devices are scaned.
@@ -526,6 +543,9 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev)
526 if (list_empty(&pdev->subordinate->devices)) 543 if (list_empty(&pdev->subordinate->devices))
527 goto out; 544 goto out;
528 545
546 if (pcie_aspm_sanity_check(pdev))
547 goto out;
548
529 mutex_lock(&aspm_lock); 549 mutex_lock(&aspm_lock);
530 550
531 link_state = kzalloc(sizeof(*link_state), GFP_KERNEL); 551 link_state = kzalloc(sizeof(*link_state), GFP_KERNEL);
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index dabb563f51d9..338a3f94b4d4 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1670,6 +1670,48 @@ static void __devinit quirk_via_cx700_pci_parking_caching(struct pci_dev *dev)
1670} 1670}
1671DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_VIA, 0x324e, quirk_via_cx700_pci_parking_caching); 1671DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_VIA, 0x324e, quirk_via_cx700_pci_parking_caching);
1672 1672
1673/*
1674 * For Broadcom 5706, 5708, 5709 rev. A nics, any read beyond the
1675 * VPD end tag will hang the device. This problem was initially
1676 * observed when a vpd entry was created in sysfs
1677 * ('/sys/bus/pci/devices/<id>/vpd'). A read to this sysfs entry
1678 * will dump 32k of data. Reading a full 32k will cause an access
1679 * beyond the VPD end tag causing the device to hang. Once the device
1680 * is hung, the bnx2 driver will not be able to reset the device.
1681 * We believe that it is legal to read beyond the end tag and
1682 * therefore the solution is to limit the read/write length.
1683 */
1684static void __devinit quirk_brcm_570x_limit_vpd(struct pci_dev *dev)
1685{
1686 /* Only disable the VPD capability for 5706, 5708, and 5709 rev. A */
1687 if ((dev->device == PCI_DEVICE_ID_NX2_5706) ||
1688 (dev->device == PCI_DEVICE_ID_NX2_5708) ||
1689 ((dev->device == PCI_DEVICE_ID_NX2_5709) &&
1690 (dev->revision & 0xf0) == 0x0)) {
1691 if (dev->vpd)
1692 dev->vpd->len = 0x80;
1693 }
1694}
1695
1696DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM,
1697 PCI_DEVICE_ID_NX2_5706,
1698 quirk_brcm_570x_limit_vpd);
1699DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM,
1700 PCI_DEVICE_ID_NX2_5706S,
1701 quirk_brcm_570x_limit_vpd);
1702DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM,
1703 PCI_DEVICE_ID_NX2_5708,
1704 quirk_brcm_570x_limit_vpd);
1705DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM,
1706 PCI_DEVICE_ID_NX2_5708S,
1707 quirk_brcm_570x_limit_vpd);
1708DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM,
1709 PCI_DEVICE_ID_NX2_5709,
1710 quirk_brcm_570x_limit_vpd);
1711DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM,
1712 PCI_DEVICE_ID_NX2_5709S,
1713 quirk_brcm_570x_limit_vpd);
1714
1673#ifdef CONFIG_PCI_MSI 1715#ifdef CONFIG_PCI_MSI
1674/* Some chipsets do not support MSI. We cannot easily rely on setting 1716/* Some chipsets do not support MSI. We cannot easily rely on setting
1675 * PCI_BUS_FLAGS_NO_MSI in its bus flags because there are actually 1717 * PCI_BUS_FLAGS_NO_MSI in its bus flags because there are actually
@@ -1685,6 +1727,7 @@ static void __init quirk_disable_all_msi(struct pci_dev *dev)
1685DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_GCNB_LE, quirk_disable_all_msi); 1727DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_GCNB_LE, quirk_disable_all_msi);
1686DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS400_200, quirk_disable_all_msi); 1728DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS400_200, quirk_disable_all_msi);
1687DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS480, quirk_disable_all_msi); 1729DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS480, quirk_disable_all_msi);
1730DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3336, quirk_disable_all_msi);
1688DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3351, quirk_disable_all_msi); 1731DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3351, quirk_disable_all_msi);
1689 1732
1690/* Disable MSI on chipsets that are known to not support it */ 1733/* Disable MSI on chipsets that are known to not support it */
diff --git a/drivers/pcmcia/electra_cf.c b/drivers/pcmcia/electra_cf.c
index 0a6cea1316b4..52d0aa8c2e7a 100644
--- a/drivers/pcmcia/electra_cf.c
+++ b/drivers/pcmcia/electra_cf.c
@@ -352,6 +352,7 @@ static struct of_device_id electra_cf_match[] = {
352 }, 352 },
353 {}, 353 {},
354}; 354};
355MODULE_DEVICE_TABLE(of, electra_cf_match);
355 356
356static struct of_platform_driver electra_cf_driver = { 357static struct of_platform_driver electra_cf_driver = {
357 .name = (char *)driver_name, 358 .name = (char *)driver_name,
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c
index 0201c8adfda7..46c791adb894 100644
--- a/drivers/pnp/pnpacpi/rsparser.c
+++ b/drivers/pnp/pnpacpi/rsparser.c
@@ -50,15 +50,17 @@ static int irq_flags(int triggering, int polarity, int shareable)
50 flags = IORESOURCE_IRQ_HIGHEDGE; 50 flags = IORESOURCE_IRQ_HIGHEDGE;
51 } 51 }
52 52
53 if (shareable) 53 if (shareable == ACPI_SHARED)
54 flags |= IORESOURCE_IRQ_SHAREABLE; 54 flags |= IORESOURCE_IRQ_SHAREABLE;
55 55
56 return flags; 56 return flags;
57} 57}
58 58
59static void decode_irq_flags(int flag, int *triggering, int *polarity) 59static void decode_irq_flags(struct pnp_dev *dev, int flags, int *triggering,
60 int *polarity, int *shareable)
60{ 61{
61 switch (flag) { 62 switch (flags & (IORESOURCE_IRQ_LOWLEVEL | IORESOURCE_IRQ_HIGHLEVEL |
63 IORESOURCE_IRQ_LOWEDGE | IORESOURCE_IRQ_HIGHEDGE)) {
62 case IORESOURCE_IRQ_LOWLEVEL: 64 case IORESOURCE_IRQ_LOWLEVEL:
63 *triggering = ACPI_LEVEL_SENSITIVE; 65 *triggering = ACPI_LEVEL_SENSITIVE;
64 *polarity = ACPI_ACTIVE_LOW; 66 *polarity = ACPI_ACTIVE_LOW;
@@ -75,7 +77,18 @@ static void decode_irq_flags(int flag, int *triggering, int *polarity)
75 *triggering = ACPI_EDGE_SENSITIVE; 77 *triggering = ACPI_EDGE_SENSITIVE;
76 *polarity = ACPI_ACTIVE_HIGH; 78 *polarity = ACPI_ACTIVE_HIGH;
77 break; 79 break;
80 default:
81 dev_err(&dev->dev, "can't encode invalid IRQ mode %#x\n",
82 flags);
83 *triggering = ACPI_EDGE_SENSITIVE;
84 *polarity = ACPI_ACTIVE_HIGH;
85 break;
78 } 86 }
87
88 if (flags & IORESOURCE_IRQ_SHAREABLE)
89 *shareable = ACPI_SHARED;
90 else
91 *shareable = ACPI_EXCLUSIVE;
79} 92}
80 93
81static void pnpacpi_parse_allocated_irqresource(struct pnp_dev *dev, 94static void pnpacpi_parse_allocated_irqresource(struct pnp_dev *dev,
@@ -742,6 +755,9 @@ static acpi_status pnpacpi_type_resources(struct acpi_resource *res, void *data)
742 if (pnpacpi_supported_resource(res)) { 755 if (pnpacpi_supported_resource(res)) {
743 (*resource)->type = res->type; 756 (*resource)->type = res->type;
744 (*resource)->length = sizeof(struct acpi_resource); 757 (*resource)->length = sizeof(struct acpi_resource);
758 if (res->type == ACPI_RESOURCE_TYPE_IRQ)
759 (*resource)->data.irq.descriptor_length =
760 res->data.irq.descriptor_length;
745 (*resource)++; 761 (*resource)++;
746 } 762 }
747 763
@@ -788,22 +804,21 @@ static void pnpacpi_encode_irq(struct pnp_dev *dev,
788 struct resource *p) 804 struct resource *p)
789{ 805{
790 struct acpi_resource_irq *irq = &resource->data.irq; 806 struct acpi_resource_irq *irq = &resource->data.irq;
791 int triggering, polarity; 807 int triggering, polarity, shareable;
792 808
793 decode_irq_flags(p->flags & IORESOURCE_BITS, &triggering, &polarity); 809 decode_irq_flags(dev, p->flags, &triggering, &polarity, &shareable);
794 irq->triggering = triggering; 810 irq->triggering = triggering;
795 irq->polarity = polarity; 811 irq->polarity = polarity;
796 if (triggering == ACPI_EDGE_SENSITIVE) 812 irq->sharable = shareable;
797 irq->sharable = ACPI_EXCLUSIVE;
798 else
799 irq->sharable = ACPI_SHARED;
800 irq->interrupt_count = 1; 813 irq->interrupt_count = 1;
801 irq->interrupts[0] = p->start; 814 irq->interrupts[0] = p->start;
802 815
803 dev_dbg(&dev->dev, " encode irq %d %s %s %s\n", (int) p->start, 816 dev_dbg(&dev->dev, " encode irq %d %s %s %s (%d-byte descriptor)\n",
817 (int) p->start,
804 triggering == ACPI_LEVEL_SENSITIVE ? "level" : "edge", 818 triggering == ACPI_LEVEL_SENSITIVE ? "level" : "edge",
805 polarity == ACPI_ACTIVE_LOW ? "low" : "high", 819 polarity == ACPI_ACTIVE_LOW ? "low" : "high",
806 irq->sharable == ACPI_SHARED ? "shared" : "exclusive"); 820 irq->sharable == ACPI_SHARED ? "shared" : "exclusive",
821 irq->descriptor_length);
807} 822}
808 823
809static void pnpacpi_encode_ext_irq(struct pnp_dev *dev, 824static void pnpacpi_encode_ext_irq(struct pnp_dev *dev,
@@ -811,16 +826,13 @@ static void pnpacpi_encode_ext_irq(struct pnp_dev *dev,
811 struct resource *p) 826 struct resource *p)
812{ 827{
813 struct acpi_resource_extended_irq *extended_irq = &resource->data.extended_irq; 828 struct acpi_resource_extended_irq *extended_irq = &resource->data.extended_irq;
814 int triggering, polarity; 829 int triggering, polarity, shareable;
815 830
816 decode_irq_flags(p->flags & IORESOURCE_BITS, &triggering, &polarity); 831 decode_irq_flags(dev, p->flags, &triggering, &polarity, &shareable);
817 extended_irq->producer_consumer = ACPI_CONSUMER; 832 extended_irq->producer_consumer = ACPI_CONSUMER;
818 extended_irq->triggering = triggering; 833 extended_irq->triggering = triggering;
819 extended_irq->polarity = polarity; 834 extended_irq->polarity = polarity;
820 if (triggering == ACPI_EDGE_SENSITIVE) 835 extended_irq->sharable = shareable;
821 extended_irq->sharable = ACPI_EXCLUSIVE;
822 else
823 extended_irq->sharable = ACPI_SHARED;
824 extended_irq->interrupt_count = 1; 836 extended_irq->interrupt_count = 1;
825 extended_irq->interrupts[0] = p->start; 837 extended_irq->interrupts[0] = p->start;
826 838
diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c
index e2b7de4cb05e..1ff3bb585ab2 100644
--- a/drivers/pnp/quirks.c
+++ b/drivers/pnp/quirks.c
@@ -286,7 +286,7 @@ static void quirk_system_pci_resources(struct pnp_dev *dev)
286 pci_name(pdev), i, 286 pci_name(pdev), i,
287 (unsigned long long) pci_start, 287 (unsigned long long) pci_start,
288 (unsigned long long) pci_end); 288 (unsigned long long) pci_end);
289 res->flags = 0; 289 res->flags |= IORESOURCE_DISABLED;
290 } 290 }
291 } 291 }
292 } 292 }
diff --git a/drivers/pnp/system.c b/drivers/pnp/system.c
index 9c2496dbeee4..cf4e07b01d48 100644
--- a/drivers/pnp/system.c
+++ b/drivers/pnp/system.c
@@ -81,7 +81,7 @@ static void reserve_resources_of_dev(struct pnp_dev *dev)
81 } 81 }
82 82
83 for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_MEM, i)); i++) { 83 for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_MEM, i)); i++) {
84 if (res->flags & IORESOURCE_UNSET) 84 if (res->flags & (IORESOURCE_UNSET | IORESOURCE_DISABLED))
85 continue; 85 continue;
86 86
87 reserve_range(dev, res->start, res->end, 0); 87 reserve_range(dev, res->start, res->end, 0);
diff --git a/drivers/power/power_supply_core.c b/drivers/power/power_supply_core.c
index 138dd76ee347..af1633eb3b70 100644
--- a/drivers/power/power_supply_core.c
+++ b/drivers/power/power_supply_core.c
@@ -91,15 +91,13 @@ int power_supply_register(struct device *parent, struct power_supply *psy)
91{ 91{
92 int rc = 0; 92 int rc = 0;
93 93
94 psy->dev = device_create(power_supply_class, parent, 0, 94 psy->dev = device_create_drvdata(power_supply_class, parent, 0,
95 "%s", psy->name); 95 psy, "%s", psy->name);
96 if (IS_ERR(psy->dev)) { 96 if (IS_ERR(psy->dev)) {
97 rc = PTR_ERR(psy->dev); 97 rc = PTR_ERR(psy->dev);
98 goto dev_create_failed; 98 goto dev_create_failed;
99 } 99 }
100 100
101 dev_set_drvdata(psy->dev, psy);
102
103 INIT_WORK(&psy->changed_work, power_supply_changed_work); 101 INIT_WORK(&psy->changed_work, power_supply_changed_work);
104 102
105 rc = power_supply_create_attrs(psy); 103 rc = power_supply_create_attrs(psy);
diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c
index c444d6b10c58..49215da5249b 100644
--- a/drivers/power/power_supply_sysfs.c
+++ b/drivers/power/power_supply_sysfs.c
@@ -201,7 +201,7 @@ int power_supply_uevent(struct device *dev, struct kobj_uevent_env *env)
201 201
202 dev_dbg(dev, "uevent\n"); 202 dev_dbg(dev, "uevent\n");
203 203
204 if (!psy) { 204 if (!psy || !psy->dev) {
205 dev_dbg(dev, "No power supply yet\n"); 205 dev_dbg(dev, "No power supply yet\n");
206 return ret; 206 return ret;
207 } 207 }
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 6cc2c0330230..4949dc4859be 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -256,6 +256,17 @@ config RTC_DRV_S35390A
256 This driver can also be built as a module. If so the module 256 This driver can also be built as a module. If so the module
257 will be called rtc-s35390a. 257 will be called rtc-s35390a.
258 258
259config RTC_DRV_FM3130
260 tristate "Ramtron FM3130"
261 help
262 If you say Y here you will get support for the
263 Ramtron FM3130 RTC chips.
264 Ramtron FM3130 is a chip with two separate devices inside,
265 RTC clock and FRAM. This driver provides only RTC functionality.
266
267 This driver can also be built as a module. If so the module
268 will be called rtc-fm3130.
269
259endif # I2C 270endif # I2C
260 271
261comment "SPI RTC drivers" 272comment "SPI RTC drivers"
@@ -534,4 +545,12 @@ config RTC_DRV_RS5C313
534 help 545 help
535 If you say yes here you get support for the Ricoh RS5C313 RTC chips. 546 If you say yes here you get support for the Ricoh RS5C313 RTC chips.
536 547
548config RTC_DRV_PPC
549 tristate "PowerPC machine dependent RTC support"
550 depends on PPC_MERGE
551 help
552 The PowerPC kernel has machine-specific functions for accessing
553 the RTC. This exposes that functionality through the generic RTC
554 class.
555
537endif # RTC_CLASS 556endif # RTC_CLASS
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 872f1218ff9f..b6e14d51670b 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -31,6 +31,7 @@ obj-$(CONFIG_RTC_DRV_DS1553) += rtc-ds1553.o
31obj-$(CONFIG_RTC_DRV_DS1672) += rtc-ds1672.o 31obj-$(CONFIG_RTC_DRV_DS1672) += rtc-ds1672.o
32obj-$(CONFIG_RTC_DRV_DS1742) += rtc-ds1742.o 32obj-$(CONFIG_RTC_DRV_DS1742) += rtc-ds1742.o
33obj-$(CONFIG_RTC_DRV_EP93XX) += rtc-ep93xx.o 33obj-$(CONFIG_RTC_DRV_EP93XX) += rtc-ep93xx.o
34obj-$(CONFIG_RTC_DRV_FM3130) += rtc-fm3130.o
34obj-$(CONFIG_RTC_DRV_ISL1208) += rtc-isl1208.o 35obj-$(CONFIG_RTC_DRV_ISL1208) += rtc-isl1208.o
35obj-$(CONFIG_RTC_DRV_M41T80) += rtc-m41t80.o 36obj-$(CONFIG_RTC_DRV_M41T80) += rtc-m41t80.o
36obj-$(CONFIG_RTC_DRV_M48T59) += rtc-m48t59.o 37obj-$(CONFIG_RTC_DRV_M48T59) += rtc-m48t59.o
@@ -41,6 +42,7 @@ obj-$(CONFIG_RTC_DRV_OMAP) += rtc-omap.o
41obj-$(CONFIG_RTC_DRV_PCF8563) += rtc-pcf8563.o 42obj-$(CONFIG_RTC_DRV_PCF8563) += rtc-pcf8563.o
42obj-$(CONFIG_RTC_DRV_PCF8583) += rtc-pcf8583.o 43obj-$(CONFIG_RTC_DRV_PCF8583) += rtc-pcf8583.o
43obj-$(CONFIG_RTC_DRV_PL031) += rtc-pl031.o 44obj-$(CONFIG_RTC_DRV_PL031) += rtc-pl031.o
45obj-$(CONFIG_RTC_DRV_PPC) += rtc-ppc.o
44obj-$(CONFIG_RTC_DRV_R9701) += rtc-r9701.o 46obj-$(CONFIG_RTC_DRV_R9701) += rtc-r9701.o
45obj-$(CONFIG_RTC_DRV_RS5C313) += rtc-rs5c313.o 47obj-$(CONFIG_RTC_DRV_RS5C313) += rtc-rs5c313.o
46obj-$(CONFIG_RTC_DRV_RS5C348) += rtc-rs5c348.o 48obj-$(CONFIG_RTC_DRV_RS5C348) += rtc-rs5c348.o
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
index 7e3ad4f3b343..58b7336640ff 100644
--- a/drivers/rtc/interface.c
+++ b/drivers/rtc/interface.c
@@ -126,12 +126,25 @@ int rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
126 int err; 126 int err;
127 struct rtc_time before, now; 127 struct rtc_time before, now;
128 int first_time = 1; 128 int first_time = 1;
129 unsigned long t_now, t_alm;
130 enum { none, day, month, year } missing = none;
131 unsigned days;
129 132
130 /* The lower level RTC driver may not be capable of filling 133 /* The lower level RTC driver may return -1 in some fields,
131 * in all fields of the rtc_time struct (eg. rtc-cmos), 134 * creating invalid alarm->time values, for reasons like:
132 * and so might instead return -1 in some fields. 135 *
133 * We deal with that here by grabbing a current RTC timestamp 136 * - The hardware may not be capable of filling them in;
134 * and using values from that for any missing (-1) values. 137 * many alarms match only on time-of-day fields, not
138 * day/month/year calendar data.
139 *
140 * - Some hardware uses illegal values as "wildcard" match
141 * values, which non-Linux firmware (like a BIOS) may try
142 * to set up as e.g. "alarm 15 minutes after each hour".
143 * Linux uses only oneshot alarms.
144 *
145 * When we see that here, we deal with it by using values from
146 * a current RTC timestamp for any missing (-1) values. The
147 * RTC driver prevents "periodic alarm" modes.
135 * 148 *
136 * But this can be racey, because some fields of the RTC timestamp 149 * But this can be racey, because some fields of the RTC timestamp
137 * may have wrapped in the interval since we read the RTC alarm, 150 * may have wrapped in the interval since we read the RTC alarm,
@@ -174,6 +187,10 @@ int rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
174 if (!alarm->enabled) 187 if (!alarm->enabled)
175 return 0; 188 return 0;
176 189
190 /* full-function RTCs won't have such missing fields */
191 if (rtc_valid_tm(&alarm->time) == 0)
192 return 0;
193
177 /* get the "after" timestamp, to detect wrapped fields */ 194 /* get the "after" timestamp, to detect wrapped fields */
178 err = rtc_read_time(rtc, &now); 195 err = rtc_read_time(rtc, &now);
179 if (err < 0) 196 if (err < 0)
@@ -183,22 +200,85 @@ int rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
183 } while ( before.tm_min != now.tm_min 200 } while ( before.tm_min != now.tm_min
184 || before.tm_hour != now.tm_hour 201 || before.tm_hour != now.tm_hour
185 || before.tm_mon != now.tm_mon 202 || before.tm_mon != now.tm_mon
186 || before.tm_year != now.tm_year 203 || before.tm_year != now.tm_year);
187 || before.tm_isdst != now.tm_isdst);
188 204
189 /* Fill in any missing alarm fields using the timestamp */ 205 /* Fill in the missing alarm fields using the timestamp; we
206 * know there's at least one since alarm->time is invalid.
207 */
190 if (alarm->time.tm_sec == -1) 208 if (alarm->time.tm_sec == -1)
191 alarm->time.tm_sec = now.tm_sec; 209 alarm->time.tm_sec = now.tm_sec;
192 if (alarm->time.tm_min == -1) 210 if (alarm->time.tm_min == -1)
193 alarm->time.tm_min = now.tm_min; 211 alarm->time.tm_min = now.tm_min;
194 if (alarm->time.tm_hour == -1) 212 if (alarm->time.tm_hour == -1)
195 alarm->time.tm_hour = now.tm_hour; 213 alarm->time.tm_hour = now.tm_hour;
196 if (alarm->time.tm_mday == -1) 214
215 /* For simplicity, only support date rollover for now */
216 if (alarm->time.tm_mday == -1) {
197 alarm->time.tm_mday = now.tm_mday; 217 alarm->time.tm_mday = now.tm_mday;
198 if (alarm->time.tm_mon == -1) 218 missing = day;
219 }
220 if (alarm->time.tm_mon == -1) {
199 alarm->time.tm_mon = now.tm_mon; 221 alarm->time.tm_mon = now.tm_mon;
200 if (alarm->time.tm_year == -1) 222 if (missing == none)
223 missing = month;
224 }
225 if (alarm->time.tm_year == -1) {
201 alarm->time.tm_year = now.tm_year; 226 alarm->time.tm_year = now.tm_year;
227 if (missing == none)
228 missing = year;
229 }
230
231 /* with luck, no rollover is needed */
232 rtc_tm_to_time(&now, &t_now);
233 rtc_tm_to_time(&alarm->time, &t_alm);
234 if (t_now < t_alm)
235 goto done;
236
237 switch (missing) {
238
239 /* 24 hour rollover ... if it's now 10am Monday, an alarm that
240 * that will trigger at 5am will do so at 5am Tuesday, which
241 * could also be in the next month or year. This is a common
242 * case, especially for PCs.
243 */
244 case day:
245 dev_dbg(&rtc->dev, "alarm rollover: %s\n", "day");
246 t_alm += 24 * 60 * 60;
247 rtc_time_to_tm(t_alm, &alarm->time);
248 break;
249
250 /* Month rollover ... if it's the 31th, an alarm on the 3rd will
251 * be next month. An alarm matching on the 30th, 29th, or 28th
252 * may end up in the month after that! Many newer PCs support
253 * this type of alarm.
254 */
255 case month:
256 dev_dbg(&rtc->dev, "alarm rollover: %s\n", "month");
257 do {
258 if (alarm->time.tm_mon < 11)
259 alarm->time.tm_mon++;
260 else {
261 alarm->time.tm_mon = 0;
262 alarm->time.tm_year++;
263 }
264 days = rtc_month_days(alarm->time.tm_mon,
265 alarm->time.tm_year);
266 } while (days < alarm->time.tm_mday);
267 break;
268
269 /* Year rollover ... easy except for leap years! */
270 case year:
271 dev_dbg(&rtc->dev, "alarm rollover: %s\n", "year");
272 do {
273 alarm->time.tm_year++;
274 } while (!rtc_valid_tm(&alarm->time));
275 break;
276
277 default:
278 dev_warn(&rtc->dev, "alarm rollover not handled\n");
279 }
280
281done:
202 return 0; 282 return 0;
203} 283}
204EXPORT_SYMBOL_GPL(rtc_read_alarm); 284EXPORT_SYMBOL_GPL(rtc_read_alarm);
diff --git a/drivers/rtc/rtc-at32ap700x.c b/drivers/rtc/rtc-at32ap700x.c
index 42244f14b41c..2ef8cdfda4a7 100644
--- a/drivers/rtc/rtc-at32ap700x.c
+++ b/drivers/rtc/rtc-at32ap700x.c
@@ -94,8 +94,11 @@ static int at32_rtc_readalarm(struct device *dev, struct rtc_wkalrm *alrm)
94{ 94{
95 struct rtc_at32ap700x *rtc = dev_get_drvdata(dev); 95 struct rtc_at32ap700x *rtc = dev_get_drvdata(dev);
96 96
97 spin_lock_irq(&rtc->lock);
97 rtc_time_to_tm(rtc->alarm_time, &alrm->time); 98 rtc_time_to_tm(rtc->alarm_time, &alrm->time);
98 alrm->pending = rtc_readl(rtc, IMR) & RTC_BIT(IMR_TOPI) ? 1 : 0; 99 alrm->enabled = rtc_readl(rtc, IMR) & RTC_BIT(IMR_TOPI) ? 1 : 0;
100 alrm->pending = rtc_readl(rtc, ISR) & RTC_BIT(ISR_TOPI) ? 1 : 0;
101 spin_unlock_irq(&rtc->lock);
99 102
100 return 0; 103 return 0;
101} 104}
@@ -119,7 +122,7 @@ static int at32_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm)
119 spin_lock_irq(&rtc->lock); 122 spin_lock_irq(&rtc->lock);
120 rtc->alarm_time = alarm_unix_time; 123 rtc->alarm_time = alarm_unix_time;
121 rtc_writel(rtc, TOP, rtc->alarm_time); 124 rtc_writel(rtc, TOP, rtc->alarm_time);
122 if (alrm->pending) 125 if (alrm->enabled)
123 rtc_writel(rtc, CTRL, rtc_readl(rtc, CTRL) 126 rtc_writel(rtc, CTRL, rtc_readl(rtc, CTRL)
124 | RTC_BIT(CTRL_TOPEN)); 127 | RTC_BIT(CTRL_TOPEN));
125 else 128 else
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index d060a06ce05b..d7bb9bac71df 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -905,19 +905,7 @@ static struct pnp_driver cmos_pnp_driver = {
905 .resume = cmos_pnp_resume, 905 .resume = cmos_pnp_resume,
906}; 906};
907 907
908static int __init cmos_init(void) 908#endif /* CONFIG_PNP */
909{
910 return pnp_register_driver(&cmos_pnp_driver);
911}
912module_init(cmos_init);
913
914static void __exit cmos_exit(void)
915{
916 pnp_unregister_driver(&cmos_pnp_driver);
917}
918module_exit(cmos_exit);
919
920#else /* no PNP */
921 909
922/*----------------------------------------------------------------*/ 910/*----------------------------------------------------------------*/
923 911
@@ -958,20 +946,33 @@ static struct platform_driver cmos_platform_driver = {
958 946
959static int __init cmos_init(void) 947static int __init cmos_init(void)
960{ 948{
949#ifdef CONFIG_PNP
950 if (pnp_platform_devices)
951 return pnp_register_driver(&cmos_pnp_driver);
952 else
953 return platform_driver_probe(&cmos_platform_driver,
954 cmos_platform_probe);
955#else
961 return platform_driver_probe(&cmos_platform_driver, 956 return platform_driver_probe(&cmos_platform_driver,
962 cmos_platform_probe); 957 cmos_platform_probe);
958#endif /* CONFIG_PNP */
963} 959}
964module_init(cmos_init); 960module_init(cmos_init);
965 961
966static void __exit cmos_exit(void) 962static void __exit cmos_exit(void)
967{ 963{
964#ifdef CONFIG_PNP
965 if (pnp_platform_devices)
966 pnp_unregister_driver(&cmos_pnp_driver);
967 else
968 platform_driver_unregister(&cmos_platform_driver);
969#else
968 platform_driver_unregister(&cmos_platform_driver); 970 platform_driver_unregister(&cmos_platform_driver);
971#endif /* CONFIG_PNP */
969} 972}
970module_exit(cmos_exit); 973module_exit(cmos_exit);
971 974
972 975
973#endif /* !PNP */
974
975MODULE_AUTHOR("David Brownell"); 976MODULE_AUTHOR("David Brownell");
976MODULE_DESCRIPTION("Driver for PC-style 'CMOS' RTCs"); 977MODULE_DESCRIPTION("Driver for PC-style 'CMOS' RTCs");
977MODULE_LICENSE("GPL"); 978MODULE_LICENSE("GPL");
diff --git a/drivers/rtc/rtc-ds1374.c b/drivers/rtc/rtc-ds1374.c
index fa2d2f8b3f4d..640acd20fdde 100644
--- a/drivers/rtc/rtc-ds1374.c
+++ b/drivers/rtc/rtc-ds1374.c
@@ -42,7 +42,7 @@
42#define DS1374_REG_TCR 0x09 /* Trickle Charge */ 42#define DS1374_REG_TCR 0x09 /* Trickle Charge */
43 43
44static const struct i2c_device_id ds1374_id[] = { 44static const struct i2c_device_id ds1374_id[] = {
45 { "rtc-ds1374", 0 }, 45 { "ds1374", 0 },
46 { } 46 { }
47}; 47};
48MODULE_DEVICE_TABLE(i2c, ds1374_id); 48MODULE_DEVICE_TABLE(i2c, ds1374_id);
diff --git a/drivers/rtc/rtc-fm3130.c b/drivers/rtc/rtc-fm3130.c
new file mode 100644
index 000000000000..11644c8fca82
--- /dev/null
+++ b/drivers/rtc/rtc-fm3130.c
@@ -0,0 +1,501 @@
1/*
2 * rtc-fm3130.c - RTC driver for Ramtron FM3130 I2C chip.
3 *
4 * Copyright (C) 2008 Sergey Lapin
5 * Based on ds1307 driver by James Chapman and David Brownell
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#include <linux/module.h>
13#include <linux/i2c.h>
14#include <linux/rtc.h>
15#include <linux/bcd.h>
16
17#define FM3130_RTC_CONTROL (0x0)
18#define FM3130_CAL_CONTROL (0x1)
19#define FM3130_RTC_SECONDS (0x2)
20#define FM3130_RTC_MINUTES (0x3)
21#define FM3130_RTC_HOURS (0x4)
22#define FM3130_RTC_DAY (0x5)
23#define FM3130_RTC_DATE (0x6)
24#define FM3130_RTC_MONTHS (0x7)
25#define FM3130_RTC_YEARS (0x8)
26
27#define FM3130_ALARM_SECONDS (0x9)
28#define FM3130_ALARM_MINUTES (0xa)
29#define FM3130_ALARM_HOURS (0xb)
30#define FM3130_ALARM_DATE (0xc)
31#define FM3130_ALARM_MONTHS (0xd)
32#define FM3130_ALARM_WP_CONTROL (0xe)
33
34#define FM3130_CAL_CONTROL_BIT_nOSCEN (1 << 7) /* Osciallator enabled */
35#define FM3130_RTC_CONTROL_BIT_LB (1 << 7) /* Low battery */
36#define FM3130_RTC_CONTROL_BIT_AF (1 << 6) /* Alarm flag */
37#define FM3130_RTC_CONTROL_BIT_CF (1 << 5) /* Century overflow */
38#define FM3130_RTC_CONTROL_BIT_POR (1 << 4) /* Power on reset */
39#define FM3130_RTC_CONTROL_BIT_AEN (1 << 3) /* Alarm enable */
40#define FM3130_RTC_CONTROL_BIT_CAL (1 << 2) /* Calibration mode */
41#define FM3130_RTC_CONTROL_BIT_WRITE (1 << 1) /* W=1 -> write mode W=0 normal */
42#define FM3130_RTC_CONTROL_BIT_READ (1 << 0) /* R=1 -> read mode R=0 normal */
43
44#define FM3130_CLOCK_REGS 7
45#define FM3130_ALARM_REGS 5
46
47struct fm3130 {
48 u8 reg_addr_time;
49 u8 reg_addr_alarm;
50 u8 regs[15];
51 struct i2c_msg msg[4];
52 struct i2c_client *client;
53 struct rtc_device *rtc;
54 int data_valid;
55 int alarm;
56};
57static const struct i2c_device_id fm3130_id[] = {
58 { "fm3130-rtc", 0 },
59 { }
60};
61MODULE_DEVICE_TABLE(i2c, fm3130_id);
62
63#define FM3130_MODE_NORMAL 0
64#define FM3130_MODE_WRITE 1
65#define FM3130_MODE_READ 2
66
67static void fm3130_rtc_mode(struct device *dev, int mode)
68{
69 struct fm3130 *fm3130 = dev_get_drvdata(dev);
70
71 fm3130->regs[FM3130_RTC_CONTROL] =
72 i2c_smbus_read_byte_data(fm3130->client, FM3130_RTC_CONTROL);
73 switch (mode) {
74 case FM3130_MODE_NORMAL:
75 fm3130->regs[FM3130_RTC_CONTROL] &=
76 ~(FM3130_RTC_CONTROL_BIT_WRITE |
77 FM3130_RTC_CONTROL_BIT_READ);
78 break;
79 case FM3130_MODE_WRITE:
80 fm3130->regs[FM3130_RTC_CONTROL] |= FM3130_RTC_CONTROL_BIT_WRITE;
81 break;
82 case FM3130_MODE_READ:
83 fm3130->regs[FM3130_RTC_CONTROL] |= FM3130_RTC_CONTROL_BIT_READ;
84 break;
85 default:
86 dev_dbg(dev, "invalid mode %d\n", mode);
87 break;
88 }
89 /* Checking for alarm */
90 if (fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_AF) {
91 fm3130->alarm = 1;
92 fm3130->regs[FM3130_RTC_CONTROL] &= ~FM3130_RTC_CONTROL_BIT_AF;
93 }
94 i2c_smbus_write_byte_data(fm3130->client,
95 FM3130_RTC_CONTROL, fm3130->regs[FM3130_RTC_CONTROL]);
96}
97
98static int fm3130_get_time(struct device *dev, struct rtc_time *t)
99{
100 struct fm3130 *fm3130 = dev_get_drvdata(dev);
101 int tmp;
102
103 if (!fm3130->data_valid) {
104 /* We have invalid data in RTC, probably due
105 to battery faults or other problems. Return EIO
106 for now, it will allow us to set data later insted
107 of error during probing which disables device */
108 return -EIO;
109 }
110 fm3130_rtc_mode(dev, FM3130_MODE_READ);
111
112 /* read the RTC date and time registers all at once */
113 tmp = i2c_transfer(to_i2c_adapter(fm3130->client->dev.parent),
114 fm3130->msg, 2);
115 if (tmp != 2) {
116 dev_err(dev, "%s error %d\n", "read", tmp);
117 return -EIO;
118 }
119
120 fm3130_rtc_mode(dev, FM3130_MODE_NORMAL);
121
122 dev_dbg(dev, "%s: %02x %02x %02x %02x %02x %02x %02x %02x"
123 "%02x %02x %02x %02x %02x %02x %02x\n",
124 "read",
125 fm3130->regs[0], fm3130->regs[1],
126 fm3130->regs[2], fm3130->regs[3],
127 fm3130->regs[4], fm3130->regs[5],
128 fm3130->regs[6], fm3130->regs[7],
129 fm3130->regs[8], fm3130->regs[9],
130 fm3130->regs[0xa], fm3130->regs[0xb],
131 fm3130->regs[0xc], fm3130->regs[0xd],
132 fm3130->regs[0xe]);
133
134 t->tm_sec = BCD2BIN(fm3130->regs[FM3130_RTC_SECONDS] & 0x7f);
135 t->tm_min = BCD2BIN(fm3130->regs[FM3130_RTC_MINUTES] & 0x7f);
136 tmp = fm3130->regs[FM3130_RTC_HOURS] & 0x3f;
137 t->tm_hour = BCD2BIN(tmp);
138 t->tm_wday = BCD2BIN(fm3130->regs[FM3130_RTC_DAY] & 0x07) - 1;
139 t->tm_mday = BCD2BIN(fm3130->regs[FM3130_RTC_DATE] & 0x3f);
140 tmp = fm3130->regs[FM3130_RTC_MONTHS] & 0x1f;
141 t->tm_mon = BCD2BIN(tmp) - 1;
142
143 /* assume 20YY not 19YY, and ignore CF bit */
144 t->tm_year = BCD2BIN(fm3130->regs[FM3130_RTC_YEARS]) + 100;
145
146 dev_dbg(dev, "%s secs=%d, mins=%d, "
147 "hours=%d, mday=%d, mon=%d, year=%d, wday=%d\n",
148 "read", t->tm_sec, t->tm_min,
149 t->tm_hour, t->tm_mday,
150 t->tm_mon, t->tm_year, t->tm_wday);
151
152 /* initial clock setting can be undefined */
153 return rtc_valid_tm(t);
154}
155
156
157static int fm3130_set_time(struct device *dev, struct rtc_time *t)
158{
159 struct fm3130 *fm3130 = dev_get_drvdata(dev);
160 int tmp, i;
161 u8 *buf = fm3130->regs;
162
163 dev_dbg(dev, "%s secs=%d, mins=%d, "
164 "hours=%d, mday=%d, mon=%d, year=%d, wday=%d\n",
165 "write", t->tm_sec, t->tm_min,
166 t->tm_hour, t->tm_mday,
167 t->tm_mon, t->tm_year, t->tm_wday);
168
169 /* first register addr */
170 buf[FM3130_RTC_SECONDS] = BIN2BCD(t->tm_sec);
171 buf[FM3130_RTC_MINUTES] = BIN2BCD(t->tm_min);
172 buf[FM3130_RTC_HOURS] = BIN2BCD(t->tm_hour);
173 buf[FM3130_RTC_DAY] = BIN2BCD(t->tm_wday + 1);
174 buf[FM3130_RTC_DATE] = BIN2BCD(t->tm_mday);
175 buf[FM3130_RTC_MONTHS] = BIN2BCD(t->tm_mon + 1);
176
177 /* assume 20YY not 19YY */
178 tmp = t->tm_year - 100;
179 buf[FM3130_RTC_YEARS] = BIN2BCD(tmp);
180
181 dev_dbg(dev, "%s: %02x %02x %02x %02x %02x %02x %02x"
182 "%02x %02x %02x %02x %02x %02x %02x %02x\n",
183 "write", buf[0], buf[1], buf[2], buf[3],
184 buf[4], buf[5], buf[6], buf[7],
185 buf[8], buf[9], buf[0xa], buf[0xb],
186 buf[0xc], buf[0xd], buf[0xe]);
187
188 fm3130_rtc_mode(dev, FM3130_MODE_WRITE);
189
190 /* Writing time registers, we don't support multibyte transfers */
191 for (i = 0; i < FM3130_CLOCK_REGS; i++) {
192 i2c_smbus_write_byte_data(fm3130->client,
193 FM3130_RTC_SECONDS + i,
194 fm3130->regs[FM3130_RTC_SECONDS + i]);
195 }
196
197 fm3130_rtc_mode(dev, FM3130_MODE_NORMAL);
198
199 /* We assume here that data are valid once written */
200 if (!fm3130->data_valid)
201 fm3130->data_valid = 1;
202 return 0;
203}
204
205static int fm3130_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
206{
207 struct fm3130 *fm3130 = dev_get_drvdata(dev);
208 int tmp;
209 struct rtc_time *tm = &alrm->time;
210 /* read the RTC alarm registers all at once */
211 tmp = i2c_transfer(to_i2c_adapter(fm3130->client->dev.parent),
212 &fm3130->msg[2], 2);
213 if (tmp != 2) {
214 dev_err(dev, "%s error %d\n", "read", tmp);
215 return -EIO;
216 }
217 dev_dbg(dev, "alarm read %02x %02x %02x %02x %02x\n",
218 fm3130->regs[FM3130_ALARM_SECONDS],
219 fm3130->regs[FM3130_ALARM_MINUTES],
220 fm3130->regs[FM3130_ALARM_HOURS],
221 fm3130->regs[FM3130_ALARM_DATE],
222 fm3130->regs[FM3130_ALARM_MONTHS]);
223
224
225 tm->tm_sec = BCD2BIN(fm3130->regs[FM3130_ALARM_SECONDS] & 0x7F);
226 tm->tm_min = BCD2BIN(fm3130->regs[FM3130_ALARM_MINUTES] & 0x7F);
227 tm->tm_hour = BCD2BIN(fm3130->regs[FM3130_ALARM_HOURS] & 0x3F);
228 tm->tm_mday = BCD2BIN(fm3130->regs[FM3130_ALARM_DATE] & 0x3F);
229 tm->tm_mon = BCD2BIN(fm3130->regs[FM3130_ALARM_MONTHS] & 0x1F);
230 if (tm->tm_mon > 0)
231 tm->tm_mon -= 1; /* RTC is 1-12, tm_mon is 0-11 */
232 dev_dbg(dev, "%s secs=%d, mins=%d, "
233 "hours=%d, mday=%d, mon=%d, year=%d, wday=%d\n",
234 "read alarm", tm->tm_sec, tm->tm_min,
235 tm->tm_hour, tm->tm_mday,
236 tm->tm_mon, tm->tm_year, tm->tm_wday);
237
238 return 0;
239}
240
241static int fm3130_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
242{
243 struct fm3130 *fm3130 = dev_get_drvdata(dev);
244 struct rtc_time *tm = &alrm->time;
245 int i;
246
247 dev_dbg(dev, "%s secs=%d, mins=%d, "
248 "hours=%d, mday=%d, mon=%d, year=%d, wday=%d\n",
249 "write alarm", tm->tm_sec, tm->tm_min,
250 tm->tm_hour, tm->tm_mday,
251 tm->tm_mon, tm->tm_year, tm->tm_wday);
252
253 if (tm->tm_sec != -1)
254 fm3130->regs[FM3130_ALARM_SECONDS] =
255 BIN2BCD(tm->tm_sec) | 0x80;
256
257 if (tm->tm_min != -1)
258 fm3130->regs[FM3130_ALARM_MINUTES] =
259 BIN2BCD(tm->tm_min) | 0x80;
260
261 if (tm->tm_hour != -1)
262 fm3130->regs[FM3130_ALARM_HOURS] =
263 BIN2BCD(tm->tm_hour) | 0x80;
264
265 if (tm->tm_mday != -1)
266 fm3130->regs[FM3130_ALARM_DATE] =
267 BIN2BCD(tm->tm_mday) | 0x80;
268
269 if (tm->tm_mon != -1)
270 fm3130->regs[FM3130_ALARM_MONTHS] =
271 BIN2BCD(tm->tm_mon + 1) | 0x80;
272
273 dev_dbg(dev, "alarm write %02x %02x %02x %02x %02x\n",
274 fm3130->regs[FM3130_ALARM_SECONDS],
275 fm3130->regs[FM3130_ALARM_MINUTES],
276 fm3130->regs[FM3130_ALARM_HOURS],
277 fm3130->regs[FM3130_ALARM_DATE],
278 fm3130->regs[FM3130_ALARM_MONTHS]);
279 /* Writing time registers, we don't support multibyte transfers */
280 for (i = 0; i < FM3130_ALARM_REGS; i++) {
281 i2c_smbus_write_byte_data(fm3130->client,
282 FM3130_ALARM_SECONDS + i,
283 fm3130->regs[FM3130_ALARM_SECONDS + i]);
284 }
285 fm3130->regs[FM3130_RTC_CONTROL] =
286 i2c_smbus_read_byte_data(fm3130->client, FM3130_RTC_CONTROL);
287 /* Checking for alarm */
288 if (fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_AF) {
289 fm3130->alarm = 1;
290 fm3130->regs[FM3130_RTC_CONTROL] &= ~FM3130_RTC_CONTROL_BIT_AF;
291 }
292 if (alrm->enabled) {
293 i2c_smbus_write_byte_data(fm3130->client, FM3130_RTC_CONTROL,
294 (fm3130->regs[FM3130_RTC_CONTROL] &
295 ~(FM3130_RTC_CONTROL_BIT_CAL)) |
296 FM3130_RTC_CONTROL_BIT_AEN);
297 } else {
298 i2c_smbus_write_byte_data(fm3130->client, FM3130_RTC_CONTROL,
299 fm3130->regs[FM3130_RTC_CONTROL] &
300 ~(FM3130_RTC_CONTROL_BIT_AEN));
301 }
302 return 0;
303}
304
305static const struct rtc_class_ops fm3130_rtc_ops = {
306 .read_time = fm3130_get_time,
307 .set_time = fm3130_set_time,
308 .read_alarm = fm3130_read_alarm,
309 .set_alarm = fm3130_set_alarm,
310};
311
312static struct i2c_driver fm3130_driver;
313
314static int __devinit fm3130_probe(struct i2c_client *client,
315 const struct i2c_device_id *id)
316{
317 struct fm3130 *fm3130;
318 int err = -ENODEV;
319 int tmp;
320 struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
321
322 if (!i2c_check_functionality(adapter,
323 I2C_FUNC_I2C | I2C_FUNC_SMBUS_WRITE_BYTE_DATA))
324 return -EIO;
325
326 fm3130 = kzalloc(sizeof(struct fm3130), GFP_KERNEL);
327
328 if (!fm3130)
329 return -ENOMEM;
330
331 fm3130->client = client;
332 i2c_set_clientdata(client, fm3130);
333 fm3130->reg_addr_time = FM3130_RTC_SECONDS;
334 fm3130->reg_addr_alarm = FM3130_ALARM_SECONDS;
335
336 /* Messages to read time */
337 fm3130->msg[0].addr = client->addr;
338 fm3130->msg[0].flags = 0;
339 fm3130->msg[0].len = 1;
340 fm3130->msg[0].buf = &fm3130->reg_addr_time;
341
342 fm3130->msg[1].addr = client->addr;
343 fm3130->msg[1].flags = I2C_M_RD;
344 fm3130->msg[1].len = FM3130_CLOCK_REGS;
345 fm3130->msg[1].buf = &fm3130->regs[FM3130_RTC_SECONDS];
346
347 /* Messages to read alarm */
348 fm3130->msg[2].addr = client->addr;
349 fm3130->msg[2].flags = 0;
350 fm3130->msg[2].len = 1;
351 fm3130->msg[2].buf = &fm3130->reg_addr_alarm;
352
353 fm3130->msg[3].addr = client->addr;
354 fm3130->msg[3].flags = I2C_M_RD;
355 fm3130->msg[3].len = FM3130_ALARM_REGS;
356 fm3130->msg[3].buf = &fm3130->regs[FM3130_ALARM_SECONDS];
357
358 fm3130->data_valid = 0;
359
360 tmp = i2c_transfer(adapter, fm3130->msg, 4);
361 if (tmp != 4) {
362 pr_debug("read error %d\n", tmp);
363 err = -EIO;
364 goto exit_free;
365 }
366
367 fm3130->regs[FM3130_RTC_CONTROL] =
368 i2c_smbus_read_byte_data(client, FM3130_RTC_CONTROL);
369 fm3130->regs[FM3130_CAL_CONTROL] =
370 i2c_smbus_read_byte_data(client, FM3130_CAL_CONTROL);
371
372 /* Checking for alarm */
373 if (fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_AF) {
374 fm3130->alarm = 1;
375 fm3130->regs[FM3130_RTC_CONTROL] &= ~FM3130_RTC_CONTROL_BIT_AF;
376 }
377
378 /* Disabling calibration mode */
379 if (fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_CAL)
380 i2c_smbus_write_byte_data(client, FM3130_RTC_CONTROL,
381 fm3130->regs[FM3130_RTC_CONTROL] &
382 ~(FM3130_RTC_CONTROL_BIT_CAL));
383 dev_warn(&client->dev, "Disabling calibration mode!\n");
384
385 /* Disabling read and write modes */
386 if (fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_WRITE ||
387 fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_READ)
388 i2c_smbus_write_byte_data(client, FM3130_RTC_CONTROL,
389 fm3130->regs[FM3130_RTC_CONTROL] &
390 ~(FM3130_RTC_CONTROL_BIT_READ |
391 FM3130_RTC_CONTROL_BIT_WRITE));
392 dev_warn(&client->dev, "Disabling READ or WRITE mode!\n");
393
394 /* oscillator off? turn it on, so clock can tick. */
395 if (fm3130->regs[FM3130_CAL_CONTROL] & FM3130_CAL_CONTROL_BIT_nOSCEN)
396 i2c_smbus_write_byte_data(client, FM3130_CAL_CONTROL,
397 fm3130->regs[FM3130_CAL_CONTROL] &
398 ~(FM3130_CAL_CONTROL_BIT_nOSCEN));
399
400 /* oscillator fault? clear flag, and warn */
401 if (fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_LB)
402 dev_warn(&client->dev, "Low battery!\n");
403
404 /* oscillator fault? clear flag, and warn */
405 if (fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_POR) {
406 i2c_smbus_write_byte_data(client, FM3130_RTC_CONTROL,
407 fm3130->regs[FM3130_RTC_CONTROL] &
408 ~FM3130_RTC_CONTROL_BIT_POR);
409 dev_warn(&client->dev, "SET TIME!\n");
410 }
411 /* ACS is controlled by alarm */
412 i2c_smbus_write_byte_data(client, FM3130_ALARM_WP_CONTROL, 0x80);
413
414 /* TODO */
415 /* TODO need to sanity check alarm */
416 tmp = fm3130->regs[FM3130_RTC_SECONDS];
417 tmp = BCD2BIN(tmp & 0x7f);
418 if (tmp > 60)
419 goto exit_bad;
420 tmp = BCD2BIN(fm3130->regs[FM3130_RTC_MINUTES] & 0x7f);
421 if (tmp > 60)
422 goto exit_bad;
423
424 tmp = BCD2BIN(fm3130->regs[FM3130_RTC_DATE] & 0x3f);
425 if (tmp == 0 || tmp > 31)
426 goto exit_bad;
427
428 tmp = BCD2BIN(fm3130->regs[FM3130_RTC_MONTHS] & 0x1f);
429 if (tmp == 0 || tmp > 12)
430 goto exit_bad;
431
432 tmp = fm3130->regs[FM3130_RTC_HOURS];
433
434 fm3130->data_valid = 1;
435
436exit_bad:
437 if (!fm3130->data_valid)
438 dev_dbg(&client->dev,
439 "%s: %02x %02x %02x %02x %02x %02x %02x %02x"
440 "%02x %02x %02x %02x %02x %02x %02x\n",
441 "bogus registers",
442 fm3130->regs[0], fm3130->regs[1],
443 fm3130->regs[2], fm3130->regs[3],
444 fm3130->regs[4], fm3130->regs[5],
445 fm3130->regs[6], fm3130->regs[7],
446 fm3130->regs[8], fm3130->regs[9],
447 fm3130->regs[0xa], fm3130->regs[0xb],
448 fm3130->regs[0xc], fm3130->regs[0xd],
449 fm3130->regs[0xe]);
450
451 /* We won't bail out here because we just got invalid data.
452 Time setting from u-boot doesn't work anyway */
453 fm3130->rtc = rtc_device_register(client->name, &client->dev,
454 &fm3130_rtc_ops, THIS_MODULE);
455 if (IS_ERR(fm3130->rtc)) {
456 err = PTR_ERR(fm3130->rtc);
457 dev_err(&client->dev,
458 "unable to register the class device\n");
459 goto exit_free;
460 }
461 return 0;
462exit_free:
463 kfree(fm3130);
464 return err;
465}
466
467static int __devexit fm3130_remove(struct i2c_client *client)
468{
469 struct fm3130 *fm3130 = i2c_get_clientdata(client);
470
471 rtc_device_unregister(fm3130->rtc);
472 kfree(fm3130);
473 return 0;
474}
475
476static struct i2c_driver fm3130_driver = {
477 .driver = {
478 .name = "rtc-fm3130",
479 .owner = THIS_MODULE,
480 },
481 .probe = fm3130_probe,
482 .remove = __devexit_p(fm3130_remove),
483 .id_table = fm3130_id,
484};
485
486static int __init fm3130_init(void)
487{
488 return i2c_add_driver(&fm3130_driver);
489}
490module_init(fm3130_init);
491
492static void __exit fm3130_exit(void)
493{
494 i2c_del_driver(&fm3130_driver);
495}
496module_exit(fm3130_exit);
497
498MODULE_DESCRIPTION("RTC driver for FM3130");
499MODULE_AUTHOR("Sergey Lapin <slapin@ossfans.org>");
500MODULE_LICENSE("GPL");
501
diff --git a/drivers/rtc/rtc-ppc.c b/drivers/rtc/rtc-ppc.c
new file mode 100644
index 000000000000..c8e97e25ef7e
--- /dev/null
+++ b/drivers/rtc/rtc-ppc.c
@@ -0,0 +1,69 @@
1/*
2 * RTC driver for ppc_md RTC functions
3 *
4 * © 2007 Red Hat, Inc.
5 *
6 * Author: David Woodhouse <dwmw2@infradead.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 version 2 as
10 * published by the Free Software Foundation.
11 */
12
13
14#include <linux/module.h>
15#include <linux/err.h>
16#include <linux/rtc.h>
17#include <linux/platform_device.h>
18#include <asm/machdep.h>
19
20static int ppc_rtc_read_time(struct device *dev, struct rtc_time *tm)
21{
22 ppc_md.get_rtc_time(tm);
23 return 0;
24}
25
26static int ppc_rtc_set_time(struct device *dev, struct rtc_time *tm)
27{
28 return ppc_md.set_rtc_time(tm);
29}
30
31static const struct rtc_class_ops ppc_rtc_ops = {
32 .set_time = ppc_rtc_set_time,
33 .read_time = ppc_rtc_read_time,
34};
35
36static struct rtc_device *rtc;
37static struct platform_device *ppc_rtc_pdev;
38
39static int __init ppc_rtc_init(void)
40{
41 if (!ppc_md.get_rtc_time || !ppc_md.set_rtc_time)
42 return -ENODEV;
43
44 ppc_rtc_pdev = platform_device_register_simple("ppc-rtc", 0, NULL, 0);
45 if (IS_ERR(ppc_rtc_pdev))
46 return PTR_ERR(ppc_rtc_pdev);
47
48 rtc = rtc_device_register("ppc_md", &ppc_rtc_pdev->dev,
49 &ppc_rtc_ops, THIS_MODULE);
50 if (IS_ERR(rtc)) {
51 platform_device_unregister(ppc_rtc_pdev);
52 return PTR_ERR(rtc);
53 }
54
55 return 0;
56}
57
58static void __exit ppc_rtc_exit(void)
59{
60 rtc_device_unregister(rtc);
61 platform_device_unregister(ppc_rtc_pdev);
62}
63
64module_init(ppc_rtc_init);
65module_exit(ppc_rtc_exit);
66
67MODULE_LICENSE("GPL");
68MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
69MODULE_DESCRIPTION("Generic RTC class driver for PowerPC");
diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c
index 82f62d25f921..67421b0d3a7b 100644
--- a/drivers/rtc/rtc-sa1100.c
+++ b/drivers/rtc/rtc-sa1100.c
@@ -331,14 +331,14 @@ static int sa1100_rtc_probe(struct platform_device *pdev)
331 RCNR = 0; 331 RCNR = 0;
332 } 332 }
333 333
334 device_init_wakeup(&pdev->dev, 1);
335
334 rtc = rtc_device_register(pdev->name, &pdev->dev, &sa1100_rtc_ops, 336 rtc = rtc_device_register(pdev->name, &pdev->dev, &sa1100_rtc_ops,
335 THIS_MODULE); 337 THIS_MODULE);
336 338
337 if (IS_ERR(rtc)) 339 if (IS_ERR(rtc))
338 return PTR_ERR(rtc); 340 return PTR_ERR(rtc);
339 341
340 device_init_wakeup(&pdev->dev, 1);
341
342 platform_set_drvdata(pdev, rtc); 342 platform_set_drvdata(pdev, rtc);
343 343
344 return 0; 344 return 0;
diff --git a/drivers/rtc/rtc-x1205.c b/drivers/rtc/rtc-x1205.c
index eaf55945f21b..7dcfba1bbfe1 100644
--- a/drivers/rtc/rtc-x1205.c
+++ b/drivers/rtc/rtc-x1205.c
@@ -71,6 +71,7 @@
71#define X1205_SR_RTCF 0x01 /* Clock failure */ 71#define X1205_SR_RTCF 0x01 /* Clock failure */
72#define X1205_SR_WEL 0x02 /* Write Enable Latch */ 72#define X1205_SR_WEL 0x02 /* Write Enable Latch */
73#define X1205_SR_RWEL 0x04 /* Register Write Enable */ 73#define X1205_SR_RWEL 0x04 /* Register Write Enable */
74#define X1205_SR_AL0 0x20 /* Alarm 0 match */
74 75
75#define X1205_DTR_DTR0 0x01 76#define X1205_DTR_DTR0 0x01
76#define X1205_DTR_DTR1 0x02 77#define X1205_DTR_DTR1 0x02
@@ -78,6 +79,8 @@
78 79
79#define X1205_HR_MIL 0x80 /* Set in ccr.hour for 24 hr mode */ 80#define X1205_HR_MIL 0x80 /* Set in ccr.hour for 24 hr mode */
80 81
82#define X1205_INT_AL0E 0x20 /* Alarm 0 enable */
83
81static struct i2c_driver x1205_driver; 84static struct i2c_driver x1205_driver;
82 85
83/* 86/*
@@ -89,8 +92,8 @@ static int x1205_get_datetime(struct i2c_client *client, struct rtc_time *tm,
89 unsigned char reg_base) 92 unsigned char reg_base)
90{ 93{
91 unsigned char dt_addr[2] = { 0, reg_base }; 94 unsigned char dt_addr[2] = { 0, reg_base };
92
93 unsigned char buf[8]; 95 unsigned char buf[8];
96 int i;
94 97
95 struct i2c_msg msgs[] = { 98 struct i2c_msg msgs[] = {
96 { client->addr, 0, 2, dt_addr }, /* setup read ptr */ 99 { client->addr, 0, 2, dt_addr }, /* setup read ptr */
@@ -98,7 +101,7 @@ static int x1205_get_datetime(struct i2c_client *client, struct rtc_time *tm,
98 }; 101 };
99 102
100 /* read date registers */ 103 /* read date registers */
101 if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) { 104 if (i2c_transfer(client->adapter, &msgs[0], 2) != 2) {
102 dev_err(&client->dev, "%s: read error\n", __func__); 105 dev_err(&client->dev, "%s: read error\n", __func__);
103 return -EIO; 106 return -EIO;
104 } 107 }
@@ -110,6 +113,11 @@ static int x1205_get_datetime(struct i2c_client *client, struct rtc_time *tm,
110 buf[0], buf[1], buf[2], buf[3], 113 buf[0], buf[1], buf[2], buf[3],
111 buf[4], buf[5], buf[6], buf[7]); 114 buf[4], buf[5], buf[6], buf[7]);
112 115
116 /* Mask out the enable bits if these are alarm registers */
117 if (reg_base < X1205_CCR_BASE)
118 for (i = 0; i <= 4; i++)
119 buf[i] &= 0x7F;
120
113 tm->tm_sec = BCD2BIN(buf[CCR_SEC]); 121 tm->tm_sec = BCD2BIN(buf[CCR_SEC]);
114 tm->tm_min = BCD2BIN(buf[CCR_MIN]); 122 tm->tm_min = BCD2BIN(buf[CCR_MIN]);
115 tm->tm_hour = BCD2BIN(buf[CCR_HOUR] & 0x3F); /* hr is 0-23 */ 123 tm->tm_hour = BCD2BIN(buf[CCR_HOUR] & 0x3F); /* hr is 0-23 */
@@ -138,7 +146,7 @@ static int x1205_get_status(struct i2c_client *client, unsigned char *sr)
138 }; 146 };
139 147
140 /* read status register */ 148 /* read status register */
141 if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) { 149 if (i2c_transfer(client->adapter, &msgs[0], 2) != 2) {
142 dev_err(&client->dev, "%s: read error\n", __func__); 150 dev_err(&client->dev, "%s: read error\n", __func__);
143 return -EIO; 151 return -EIO;
144 } 152 }
@@ -147,10 +155,11 @@ static int x1205_get_status(struct i2c_client *client, unsigned char *sr)
147} 155}
148 156
149static int x1205_set_datetime(struct i2c_client *client, struct rtc_time *tm, 157static int x1205_set_datetime(struct i2c_client *client, struct rtc_time *tm,
150 int datetoo, u8 reg_base) 158 int datetoo, u8 reg_base, unsigned char alm_enable)
151{ 159{
152 int i, xfer; 160 int i, xfer, nbytes;
153 unsigned char buf[8]; 161 unsigned char buf[8];
162 unsigned char rdata[10] = { 0, reg_base };
154 163
155 static const unsigned char wel[3] = { 0, X1205_REG_SR, 164 static const unsigned char wel[3] = { 0, X1205_REG_SR,
156 X1205_SR_WEL }; 165 X1205_SR_WEL };
@@ -189,6 +198,11 @@ static int x1205_set_datetime(struct i2c_client *client, struct rtc_time *tm,
189 buf[CCR_Y2K] = BIN2BCD(tm->tm_year / 100); 198 buf[CCR_Y2K] = BIN2BCD(tm->tm_year / 100);
190 } 199 }
191 200
201 /* If writing alarm registers, set compare bits on registers 0-4 */
202 if (reg_base < X1205_CCR_BASE)
203 for (i = 0; i <= 4; i++)
204 buf[i] |= 0x80;
205
192 /* this sequence is required to unlock the chip */ 206 /* this sequence is required to unlock the chip */
193 if ((xfer = i2c_master_send(client, wel, 3)) != 3) { 207 if ((xfer = i2c_master_send(client, wel, 3)) != 3) {
194 dev_err(&client->dev, "%s: wel - %d\n", __func__, xfer); 208 dev_err(&client->dev, "%s: wel - %d\n", __func__, xfer);
@@ -200,19 +214,57 @@ static int x1205_set_datetime(struct i2c_client *client, struct rtc_time *tm,
200 return -EIO; 214 return -EIO;
201 } 215 }
202 216
217
203 /* write register's data */ 218 /* write register's data */
204 for (i = 0; i < (datetoo ? 8 : 3); i++) { 219 if (datetoo)
205 unsigned char rdata[3] = { 0, reg_base + i, buf[i] }; 220 nbytes = 8;
221 else
222 nbytes = 3;
223 for (i = 0; i < nbytes; i++)
224 rdata[2+i] = buf[i];
225
226 xfer = i2c_master_send(client, rdata, nbytes+2);
227 if (xfer != nbytes+2) {
228 dev_err(&client->dev,
229 "%s: result=%d addr=%02x, data=%02x\n",
230 __func__,
231 xfer, rdata[1], rdata[2]);
232 return -EIO;
233 }
234
235 /* If we wrote to the nonvolatile region, wait 10msec for write cycle*/
236 if (reg_base < X1205_CCR_BASE) {
237 unsigned char al0e[3] = { 0, X1205_REG_INT, 0 };
238
239 msleep(10);
206 240
207 xfer = i2c_master_send(client, rdata, 3); 241 /* ...and set or clear the AL0E bit in the INT register */
242
243 /* Need to set RWEL again as the write has cleared it */
244 xfer = i2c_master_send(client, rwel, 3);
208 if (xfer != 3) { 245 if (xfer != 3) {
209 dev_err(&client->dev, 246 dev_err(&client->dev,
210 "%s: xfer=%d addr=%02x, data=%02x\n", 247 "%s: aloe rwel - %d\n",
211 __func__, 248 __func__,
212 xfer, rdata[1], rdata[2]); 249 xfer);
250 return -EIO;
251 }
252
253 if (alm_enable)
254 al0e[2] = X1205_INT_AL0E;
255
256 xfer = i2c_master_send(client, al0e, 3);
257 if (xfer != 3) {
258 dev_err(&client->dev,
259 "%s: al0e - %d\n",
260 __func__,
261 xfer);
213 return -EIO; 262 return -EIO;
214 } 263 }
215 }; 264
265 /* and wait 10msec again for this write to complete */
266 msleep(10);
267 }
216 268
217 /* disable further writes */ 269 /* disable further writes */
218 if ((xfer = i2c_master_send(client, diswe, 3)) != 3) { 270 if ((xfer = i2c_master_send(client, diswe, 3)) != 3) {
@@ -230,9 +282,9 @@ static int x1205_fix_osc(struct i2c_client *client)
230 282
231 tm.tm_hour = tm.tm_min = tm.tm_sec = 0; 283 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
232 284
233 if ((err = x1205_set_datetime(client, &tm, 0, X1205_CCR_BASE)) < 0) 285 err = x1205_set_datetime(client, &tm, 0, X1205_CCR_BASE, 0);
234 dev_err(&client->dev, 286 if (err < 0)
235 "unable to restart the oscillator\n"); 287 dev_err(&client->dev, "unable to restart the oscillator\n");
236 288
237 return err; 289 return err;
238} 290}
@@ -248,7 +300,7 @@ static int x1205_get_dtrim(struct i2c_client *client, int *trim)
248 }; 300 };
249 301
250 /* read dtr register */ 302 /* read dtr register */
251 if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) { 303 if (i2c_transfer(client->adapter, &msgs[0], 2) != 2) {
252 dev_err(&client->dev, "%s: read error\n", __func__); 304 dev_err(&client->dev, "%s: read error\n", __func__);
253 return -EIO; 305 return -EIO;
254 } 306 }
@@ -280,7 +332,7 @@ static int x1205_get_atrim(struct i2c_client *client, int *trim)
280 }; 332 };
281 333
282 /* read atr register */ 334 /* read atr register */
283 if ((i2c_transfer(client->adapter, &msgs[0], 2)) != 2) { 335 if (i2c_transfer(client->adapter, &msgs[0], 2) != 2) {
284 dev_err(&client->dev, "%s: read error\n", __func__); 336 dev_err(&client->dev, "%s: read error\n", __func__);
285 return -EIO; 337 return -EIO;
286 } 338 }
@@ -403,14 +455,33 @@ static int x1205_validate_client(struct i2c_client *client)
403 455
404static int x1205_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) 456static int x1205_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
405{ 457{
406 return x1205_get_datetime(to_i2c_client(dev), 458 int err;
407 &alrm->time, X1205_ALM0_BASE); 459 unsigned char intreg, status;
460 static unsigned char int_addr[2] = { 0, X1205_REG_INT };
461 struct i2c_client *client = to_i2c_client(dev);
462 struct i2c_msg msgs[] = {
463 { client->addr, 0, 2, int_addr }, /* setup read ptr */
464 { client->addr, I2C_M_RD, 1, &intreg }, /* read INT register */
465 };
466
467 /* read interrupt register and status register */
468 if (i2c_transfer(client->adapter, &msgs[0], 2) != 2) {
469 dev_err(&client->dev, "%s: read error\n", __func__);
470 return -EIO;
471 }
472 err = x1205_get_status(client, &status);
473 if (err == 0) {
474 alrm->pending = (status & X1205_SR_AL0) ? 1 : 0;
475 alrm->enabled = (intreg & X1205_INT_AL0E) ? 1 : 0;
476 err = x1205_get_datetime(client, &alrm->time, X1205_ALM0_BASE);
477 }
478 return err;
408} 479}
409 480
410static int x1205_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) 481static int x1205_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
411{ 482{
412 return x1205_set_datetime(to_i2c_client(dev), 483 return x1205_set_datetime(to_i2c_client(dev),
413 &alrm->time, 1, X1205_ALM0_BASE); 484 &alrm->time, 1, X1205_ALM0_BASE, alrm->enabled);
414} 485}
415 486
416static int x1205_rtc_read_time(struct device *dev, struct rtc_time *tm) 487static int x1205_rtc_read_time(struct device *dev, struct rtc_time *tm)
@@ -422,7 +493,7 @@ static int x1205_rtc_read_time(struct device *dev, struct rtc_time *tm)
422static int x1205_rtc_set_time(struct device *dev, struct rtc_time *tm) 493static int x1205_rtc_set_time(struct device *dev, struct rtc_time *tm)
423{ 494{
424 return x1205_set_datetime(to_i2c_client(dev), 495 return x1205_set_datetime(to_i2c_client(dev),
425 tm, 1, X1205_CCR_BASE); 496 tm, 1, X1205_CCR_BASE, 0);
426} 497}
427 498
428static int x1205_rtc_proc(struct device *dev, struct seq_file *seq) 499static int x1205_rtc_proc(struct device *dev, struct seq_file *seq)
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 8ba3f135da22..1a4025683362 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -63,6 +63,7 @@ static void dasd_return_cqr_cb(struct dasd_ccw_req *, void *);
63 */ 63 */
64static wait_queue_head_t dasd_init_waitq; 64static wait_queue_head_t dasd_init_waitq;
65static wait_queue_head_t dasd_flush_wq; 65static wait_queue_head_t dasd_flush_wq;
66static wait_queue_head_t generic_waitq;
66 67
67/* 68/*
68 * Allocate memory for a new device structure. 69 * Allocate memory for a new device structure.
@@ -1151,11 +1152,15 @@ static void __dasd_device_process_final_queue(struct dasd_device *device,
1151 struct list_head *l, *n; 1152 struct list_head *l, *n;
1152 struct dasd_ccw_req *cqr; 1153 struct dasd_ccw_req *cqr;
1153 struct dasd_block *block; 1154 struct dasd_block *block;
1155 void (*callback)(struct dasd_ccw_req *, void *data);
1156 void *callback_data;
1154 1157
1155 list_for_each_safe(l, n, final_queue) { 1158 list_for_each_safe(l, n, final_queue) {
1156 cqr = list_entry(l, struct dasd_ccw_req, devlist); 1159 cqr = list_entry(l, struct dasd_ccw_req, devlist);
1157 list_del_init(&cqr->devlist); 1160 list_del_init(&cqr->devlist);
1158 block = cqr->block; 1161 block = cqr->block;
1162 callback = cqr->callback;
1163 callback_data = cqr->callback_data;
1159 if (block) 1164 if (block)
1160 spin_lock_bh(&block->queue_lock); 1165 spin_lock_bh(&block->queue_lock);
1161 switch (cqr->status) { 1166 switch (cqr->status) {
@@ -1176,7 +1181,7 @@ static void __dasd_device_process_final_queue(struct dasd_device *device,
1176 BUG(); 1181 BUG();
1177 } 1182 }
1178 if (cqr->callback != NULL) 1183 if (cqr->callback != NULL)
1179 (cqr->callback)(cqr, cqr->callback_data); 1184 (callback)(cqr, callback_data);
1180 if (block) 1185 if (block)
1181 spin_unlock_bh(&block->queue_lock); 1186 spin_unlock_bh(&block->queue_lock);
1182 } 1187 }
@@ -1406,17 +1411,15 @@ static inline int _wait_for_wakeup(struct dasd_ccw_req *cqr)
1406 */ 1411 */
1407int dasd_sleep_on(struct dasd_ccw_req *cqr) 1412int dasd_sleep_on(struct dasd_ccw_req *cqr)
1408{ 1413{
1409 wait_queue_head_t wait_q;
1410 struct dasd_device *device; 1414 struct dasd_device *device;
1411 int rc; 1415 int rc;
1412 1416
1413 device = cqr->startdev; 1417 device = cqr->startdev;
1414 1418
1415 init_waitqueue_head (&wait_q);
1416 cqr->callback = dasd_wakeup_cb; 1419 cqr->callback = dasd_wakeup_cb;
1417 cqr->callback_data = (void *) &wait_q; 1420 cqr->callback_data = (void *) &generic_waitq;
1418 dasd_add_request_tail(cqr); 1421 dasd_add_request_tail(cqr);
1419 wait_event(wait_q, _wait_for_wakeup(cqr)); 1422 wait_event(generic_waitq, _wait_for_wakeup(cqr));
1420 1423
1421 /* Request status is either done or failed. */ 1424 /* Request status is either done or failed. */
1422 rc = (cqr->status == DASD_CQR_DONE) ? 0 : -EIO; 1425 rc = (cqr->status == DASD_CQR_DONE) ? 0 : -EIO;
@@ -1429,20 +1432,18 @@ int dasd_sleep_on(struct dasd_ccw_req *cqr)
1429 */ 1432 */
1430int dasd_sleep_on_interruptible(struct dasd_ccw_req *cqr) 1433int dasd_sleep_on_interruptible(struct dasd_ccw_req *cqr)
1431{ 1434{
1432 wait_queue_head_t wait_q;
1433 struct dasd_device *device; 1435 struct dasd_device *device;
1434 int rc; 1436 int rc;
1435 1437
1436 device = cqr->startdev; 1438 device = cqr->startdev;
1437 init_waitqueue_head (&wait_q);
1438 cqr->callback = dasd_wakeup_cb; 1439 cqr->callback = dasd_wakeup_cb;
1439 cqr->callback_data = (void *) &wait_q; 1440 cqr->callback_data = (void *) &generic_waitq;
1440 dasd_add_request_tail(cqr); 1441 dasd_add_request_tail(cqr);
1441 rc = wait_event_interruptible(wait_q, _wait_for_wakeup(cqr)); 1442 rc = wait_event_interruptible(generic_waitq, _wait_for_wakeup(cqr));
1442 if (rc == -ERESTARTSYS) { 1443 if (rc == -ERESTARTSYS) {
1443 dasd_cancel_req(cqr); 1444 dasd_cancel_req(cqr);
1444 /* wait (non-interruptible) for final status */ 1445 /* wait (non-interruptible) for final status */
1445 wait_event(wait_q, _wait_for_wakeup(cqr)); 1446 wait_event(generic_waitq, _wait_for_wakeup(cqr));
1446 } 1447 }
1447 rc = (cqr->status == DASD_CQR_DONE) ? 0 : -EIO; 1448 rc = (cqr->status == DASD_CQR_DONE) ? 0 : -EIO;
1448 return rc; 1449 return rc;
@@ -1466,7 +1467,6 @@ static inline int _dasd_term_running_cqr(struct dasd_device *device)
1466 1467
1467int dasd_sleep_on_immediatly(struct dasd_ccw_req *cqr) 1468int dasd_sleep_on_immediatly(struct dasd_ccw_req *cqr)
1468{ 1469{
1469 wait_queue_head_t wait_q;
1470 struct dasd_device *device; 1470 struct dasd_device *device;
1471 int rc; 1471 int rc;
1472 1472
@@ -1478,9 +1478,8 @@ int dasd_sleep_on_immediatly(struct dasd_ccw_req *cqr)
1478 return rc; 1478 return rc;
1479 } 1479 }
1480 1480
1481 init_waitqueue_head (&wait_q);
1482 cqr->callback = dasd_wakeup_cb; 1481 cqr->callback = dasd_wakeup_cb;
1483 cqr->callback_data = (void *) &wait_q; 1482 cqr->callback_data = (void *) &generic_waitq;
1484 cqr->status = DASD_CQR_QUEUED; 1483 cqr->status = DASD_CQR_QUEUED;
1485 list_add(&cqr->devlist, &device->ccw_queue); 1484 list_add(&cqr->devlist, &device->ccw_queue);
1486 1485
@@ -1489,7 +1488,7 @@ int dasd_sleep_on_immediatly(struct dasd_ccw_req *cqr)
1489 1488
1490 spin_unlock_irq(get_ccwdev_lock(device->cdev)); 1489 spin_unlock_irq(get_ccwdev_lock(device->cdev));
1491 1490
1492 wait_event(wait_q, _wait_for_wakeup(cqr)); 1491 wait_event(generic_waitq, _wait_for_wakeup(cqr));
1493 1492
1494 /* Request status is either done or failed. */ 1493 /* Request status is either done or failed. */
1495 rc = (cqr->status == DASD_CQR_DONE) ? 0 : -EIO; 1494 rc = (cqr->status == DASD_CQR_DONE) ? 0 : -EIO;
@@ -2430,6 +2429,7 @@ static int __init dasd_init(void)
2430 2429
2431 init_waitqueue_head(&dasd_init_waitq); 2430 init_waitqueue_head(&dasd_init_waitq);
2432 init_waitqueue_head(&dasd_flush_wq); 2431 init_waitqueue_head(&dasd_flush_wq);
2432 init_waitqueue_head(&generic_waitq);
2433 2433
2434 /* register 'common' DASD debug area, used for all DBF_XXX calls */ 2434 /* register 'common' DASD debug area, used for all DBF_XXX calls */
2435 dasd_debug_area = debug_register("dasd", 1, 1, 8 * sizeof(long)); 2435 dasd_debug_area = debug_register("dasd", 1, 1, 8 * sizeof(long));
diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c
index 0d98f1ff2edd..848ef7e8523f 100644
--- a/drivers/s390/char/raw3270.c
+++ b/drivers/s390/char/raw3270.c
@@ -549,7 +549,6 @@ raw3270_start_init(struct raw3270 *rp, struct raw3270_view *view,
549 struct raw3270_request *rq) 549 struct raw3270_request *rq)
550{ 550{
551 unsigned long flags; 551 unsigned long flags;
552 wait_queue_head_t wq;
553 int rc; 552 int rc;
554 553
555#ifdef CONFIG_TN3270_CONSOLE 554#ifdef CONFIG_TN3270_CONSOLE
@@ -566,20 +565,20 @@ raw3270_start_init(struct raw3270 *rp, struct raw3270_view *view,
566 return rq->rc; 565 return rq->rc;
567 } 566 }
568#endif 567#endif
569 init_waitqueue_head(&wq);
570 rq->callback = raw3270_wake_init; 568 rq->callback = raw3270_wake_init;
571 rq->callback_data = &wq; 569 rq->callback_data = &raw3270_wait_queue;
572 spin_lock_irqsave(get_ccwdev_lock(view->dev->cdev), flags); 570 spin_lock_irqsave(get_ccwdev_lock(view->dev->cdev), flags);
573 rc = __raw3270_start(rp, view, rq); 571 rc = __raw3270_start(rp, view, rq);
574 spin_unlock_irqrestore(get_ccwdev_lock(view->dev->cdev), flags); 572 spin_unlock_irqrestore(get_ccwdev_lock(view->dev->cdev), flags);
575 if (rc) 573 if (rc)
576 return rc; 574 return rc;
577 /* Now wait for the completion. */ 575 /* Now wait for the completion. */
578 rc = wait_event_interruptible(wq, raw3270_request_final(rq)); 576 rc = wait_event_interruptible(raw3270_wait_queue,
577 raw3270_request_final(rq));
579 if (rc == -ERESTARTSYS) { /* Interrupted by a signal. */ 578 if (rc == -ERESTARTSYS) { /* Interrupted by a signal. */
580 raw3270_halt_io(view->dev, rq); 579 raw3270_halt_io(view->dev, rq);
581 /* No wait for the halt to complete. */ 580 /* No wait for the halt to complete. */
582 wait_event(wq, raw3270_request_final(rq)); 581 wait_event(raw3270_wait_queue, raw3270_request_final(rq));
583 return -ERESTARTSYS; 582 return -ERESTARTSYS;
584 } 583 }
585 return rq->rc; 584 return rq->rc;
diff --git a/drivers/s390/char/sclp_config.c b/drivers/s390/char/sclp_config.c
index 9e784d5f7f57..ad05a87bc480 100644
--- a/drivers/s390/char/sclp_config.c
+++ b/drivers/s390/char/sclp_config.c
@@ -40,7 +40,7 @@ static void sclp_cpu_capability_notify(struct work_struct *work)
40 put_online_cpus(); 40 put_online_cpus();
41} 41}
42 42
43static void sclp_cpu_change_notify(struct work_struct *work) 43static void __ref sclp_cpu_change_notify(struct work_struct *work)
44{ 44{
45 smp_rescan_cpus(); 45 smp_rescan_cpus();
46} 46}
diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c
index 35707c04e613..3e577f655b18 100644
--- a/drivers/s390/char/sclp_vt220.c
+++ b/drivers/s390/char/sclp_vt220.c
@@ -71,9 +71,6 @@ static struct list_head sclp_vt220_outqueue;
71/* Number of requests in outqueue */ 71/* Number of requests in outqueue */
72static int sclp_vt220_outqueue_count; 72static int sclp_vt220_outqueue_count;
73 73
74/* Wait queue used to delay write requests while we've run out of buffers */
75static wait_queue_head_t sclp_vt220_waitq;
76
77/* Timer used for delaying write requests to merge subsequent messages into 74/* Timer used for delaying write requests to merge subsequent messages into
78 * a single buffer */ 75 * a single buffer */
79static struct timer_list sclp_vt220_timer; 76static struct timer_list sclp_vt220_timer;
@@ -133,7 +130,6 @@ sclp_vt220_process_queue(struct sclp_vt220_request *request)
133 } while (request && __sclp_vt220_emit(request)); 130 } while (request && __sclp_vt220_emit(request));
134 if (request == NULL && sclp_vt220_flush_later) 131 if (request == NULL && sclp_vt220_flush_later)
135 sclp_vt220_emit_current(); 132 sclp_vt220_emit_current();
136 wake_up(&sclp_vt220_waitq);
137 /* Check if the tty needs a wake up call */ 133 /* Check if the tty needs a wake up call */
138 if (sclp_vt220_tty != NULL) { 134 if (sclp_vt220_tty != NULL) {
139 tty_wakeup(sclp_vt220_tty); 135 tty_wakeup(sclp_vt220_tty);
@@ -383,7 +379,7 @@ sclp_vt220_timeout(unsigned long data)
383 */ 379 */
384static int 380static int
385__sclp_vt220_write(const unsigned char *buf, int count, int do_schedule, 381__sclp_vt220_write(const unsigned char *buf, int count, int do_schedule,
386 int convertlf, int may_schedule) 382 int convertlf, int may_fail)
387{ 383{
388 unsigned long flags; 384 unsigned long flags;
389 void *page; 385 void *page;
@@ -395,15 +391,14 @@ __sclp_vt220_write(const unsigned char *buf, int count, int do_schedule,
395 overall_written = 0; 391 overall_written = 0;
396 spin_lock_irqsave(&sclp_vt220_lock, flags); 392 spin_lock_irqsave(&sclp_vt220_lock, flags);
397 do { 393 do {
398 /* Create a sclp output buffer if none exists yet */ 394 /* Create an sclp output buffer if none exists yet */
399 if (sclp_vt220_current_request == NULL) { 395 if (sclp_vt220_current_request == NULL) {
400 while (list_empty(&sclp_vt220_empty)) { 396 while (list_empty(&sclp_vt220_empty)) {
401 spin_unlock_irqrestore(&sclp_vt220_lock, flags); 397 spin_unlock_irqrestore(&sclp_vt220_lock, flags);
402 if (in_interrupt() || !may_schedule) 398 if (may_fail)
403 sclp_sync_wait(); 399 goto out;
404 else 400 else
405 wait_event(sclp_vt220_waitq, 401 sclp_sync_wait();
406 !list_empty(&sclp_vt220_empty));
407 spin_lock_irqsave(&sclp_vt220_lock, flags); 402 spin_lock_irqsave(&sclp_vt220_lock, flags);
408 } 403 }
409 page = (void *) sclp_vt220_empty.next; 404 page = (void *) sclp_vt220_empty.next;
@@ -437,6 +432,7 @@ __sclp_vt220_write(const unsigned char *buf, int count, int do_schedule,
437 add_timer(&sclp_vt220_timer); 432 add_timer(&sclp_vt220_timer);
438 } 433 }
439 spin_unlock_irqrestore(&sclp_vt220_lock, flags); 434 spin_unlock_irqrestore(&sclp_vt220_lock, flags);
435out:
440 return overall_written; 436 return overall_written;
441} 437}
442 438
@@ -520,19 +516,11 @@ sclp_vt220_close(struct tty_struct *tty, struct file *filp)
520 * character to the tty device. If the kernel uses this routine, 516 * character to the tty device. If the kernel uses this routine,
521 * it must call the flush_chars() routine (if defined) when it is 517 * it must call the flush_chars() routine (if defined) when it is
522 * done stuffing characters into the driver. 518 * done stuffing characters into the driver.
523 *
524 * NOTE: include/linux/tty_driver.h specifies that a character should be
525 * ignored if there is no room in the queue. This driver implements a different
526 * semantic in that it will block when there is no more room left.
527 *
528 * FIXME: putchar can currently be called from BH and other non blocking
529 * handlers so this semantic isn't a good idea.
530 */ 519 */
531static int 520static int
532sclp_vt220_put_char(struct tty_struct *tty, unsigned char ch) 521sclp_vt220_put_char(struct tty_struct *tty, unsigned char ch)
533{ 522{
534 __sclp_vt220_write(&ch, 1, 0, 0, 1); 523 return __sclp_vt220_write(&ch, 1, 0, 0, 1);
535 return 1;
536} 524}
537 525
538/* 526/*
@@ -653,7 +641,6 @@ static int __init __sclp_vt220_init(void)
653 spin_lock_init(&sclp_vt220_lock); 641 spin_lock_init(&sclp_vt220_lock);
654 INIT_LIST_HEAD(&sclp_vt220_empty); 642 INIT_LIST_HEAD(&sclp_vt220_empty);
655 INIT_LIST_HEAD(&sclp_vt220_outqueue); 643 INIT_LIST_HEAD(&sclp_vt220_outqueue);
656 init_waitqueue_head(&sclp_vt220_waitq);
657 init_timer(&sclp_vt220_timer); 644 init_timer(&sclp_vt220_timer);
658 sclp_vt220_current_request = NULL; 645 sclp_vt220_current_request = NULL;
659 sclp_vt220_buffered_chars = 0; 646 sclp_vt220_buffered_chars = 0;
@@ -786,6 +773,7 @@ sclp_vt220_con_init(void)
786{ 773{
787 int rc; 774 int rc;
788 775
776 INIT_LIST_HEAD(&sclp_vt220_register.list);
789 if (!CONSOLE_IS_SCLP) 777 if (!CONSOLE_IS_SCLP)
790 return 0; 778 return 0;
791 rc = __sclp_vt220_init(); 779 rc = __sclp_vt220_init();
diff --git a/drivers/s390/char/tape.h b/drivers/s390/char/tape.h
index dddf8d62c153..d0d565a05dfe 100644
--- a/drivers/s390/char/tape.h
+++ b/drivers/s390/char/tape.h
@@ -231,6 +231,9 @@ struct tape_device {
231 /* Request queue. */ 231 /* Request queue. */
232 struct list_head req_queue; 232 struct list_head req_queue;
233 233
234 /* Request wait queue. */
235 wait_queue_head_t wait_queue;
236
234 /* Each tape device has (currently) two minor numbers. */ 237 /* Each tape device has (currently) two minor numbers. */
235 int first_minor; 238 int first_minor;
236 239
diff --git a/drivers/s390/char/tape_3590.c b/drivers/s390/char/tape_3590.c
index 8246ef3ab095..42ce7915fc5d 100644
--- a/drivers/s390/char/tape_3590.c
+++ b/drivers/s390/char/tape_3590.c
@@ -1598,7 +1598,7 @@ tape_3590_setup_device(struct tape_device *device)
1598 rc = tape_3590_read_dev_chars(device, rdc_data); 1598 rc = tape_3590_read_dev_chars(device, rdc_data);
1599 if (rc) { 1599 if (rc) {
1600 DBF_LH(3, "Read device characteristics failed!\n"); 1600 DBF_LH(3, "Read device characteristics failed!\n");
1601 goto fail_kmalloc; 1601 goto fail_rdc_data;
1602 } 1602 }
1603 rc = tape_std_assign(device); 1603 rc = tape_std_assign(device);
1604 if (rc) 1604 if (rc)
diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c
index ddc4a114e7f4..95da72bc17e8 100644
--- a/drivers/s390/char/tape_block.c
+++ b/drivers/s390/char/tape_block.c
@@ -179,11 +179,11 @@ tapeblock_requeue(struct work_struct *work) {
179 tapeblock_end_request(req, -EIO); 179 tapeblock_end_request(req, -EIO);
180 continue; 180 continue;
181 } 181 }
182 blkdev_dequeue_request(req);
183 nr_queued++;
182 spin_unlock_irq(&device->blk_data.request_queue_lock); 184 spin_unlock_irq(&device->blk_data.request_queue_lock);
183 rc = tapeblock_start_request(device, req); 185 rc = tapeblock_start_request(device, req);
184 spin_lock_irq(&device->blk_data.request_queue_lock); 186 spin_lock_irq(&device->blk_data.request_queue_lock);
185 blkdev_dequeue_request(req);
186 nr_queued++;
187 } 187 }
188 spin_unlock_irq(&device->blk_data.request_queue_lock); 188 spin_unlock_irq(&device->blk_data.request_queue_lock);
189 atomic_set(&device->blk_data.requeue_scheduled, 0); 189 atomic_set(&device->blk_data.requeue_scheduled, 0);
diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c
index 76e44eb7c47f..c20e3c548343 100644
--- a/drivers/s390/char/tape_core.c
+++ b/drivers/s390/char/tape_core.c
@@ -449,6 +449,7 @@ tape_alloc_device(void)
449 INIT_LIST_HEAD(&device->req_queue); 449 INIT_LIST_HEAD(&device->req_queue);
450 INIT_LIST_HEAD(&device->node); 450 INIT_LIST_HEAD(&device->node);
451 init_waitqueue_head(&device->state_change_wq); 451 init_waitqueue_head(&device->state_change_wq);
452 init_waitqueue_head(&device->wait_queue);
452 device->tape_state = TS_INIT; 453 device->tape_state = TS_INIT;
453 device->medium_state = MS_UNKNOWN; 454 device->medium_state = MS_UNKNOWN;
454 *device->modeset_byte = 0; 455 *device->modeset_byte = 0;
@@ -954,21 +955,19 @@ __tape_wake_up(struct tape_request *request, void *data)
954int 955int
955tape_do_io(struct tape_device *device, struct tape_request *request) 956tape_do_io(struct tape_device *device, struct tape_request *request)
956{ 957{
957 wait_queue_head_t wq;
958 int rc; 958 int rc;
959 959
960 init_waitqueue_head(&wq);
961 spin_lock_irq(get_ccwdev_lock(device->cdev)); 960 spin_lock_irq(get_ccwdev_lock(device->cdev));
962 /* Setup callback */ 961 /* Setup callback */
963 request->callback = __tape_wake_up; 962 request->callback = __tape_wake_up;
964 request->callback_data = &wq; 963 request->callback_data = &device->wait_queue;
965 /* Add request to request queue and try to start it. */ 964 /* Add request to request queue and try to start it. */
966 rc = __tape_start_request(device, request); 965 rc = __tape_start_request(device, request);
967 spin_unlock_irq(get_ccwdev_lock(device->cdev)); 966 spin_unlock_irq(get_ccwdev_lock(device->cdev));
968 if (rc) 967 if (rc)
969 return rc; 968 return rc;
970 /* Request added to the queue. Wait for its completion. */ 969 /* Request added to the queue. Wait for its completion. */
971 wait_event(wq, (request->callback == NULL)); 970 wait_event(device->wait_queue, (request->callback == NULL));
972 /* Get rc from request */ 971 /* Get rc from request */
973 return request->rc; 972 return request->rc;
974} 973}
@@ -989,20 +988,19 @@ int
989tape_do_io_interruptible(struct tape_device *device, 988tape_do_io_interruptible(struct tape_device *device,
990 struct tape_request *request) 989 struct tape_request *request)
991{ 990{
992 wait_queue_head_t wq;
993 int rc; 991 int rc;
994 992
995 init_waitqueue_head(&wq);
996 spin_lock_irq(get_ccwdev_lock(device->cdev)); 993 spin_lock_irq(get_ccwdev_lock(device->cdev));
997 /* Setup callback */ 994 /* Setup callback */
998 request->callback = __tape_wake_up_interruptible; 995 request->callback = __tape_wake_up_interruptible;
999 request->callback_data = &wq; 996 request->callback_data = &device->wait_queue;
1000 rc = __tape_start_request(device, request); 997 rc = __tape_start_request(device, request);
1001 spin_unlock_irq(get_ccwdev_lock(device->cdev)); 998 spin_unlock_irq(get_ccwdev_lock(device->cdev));
1002 if (rc) 999 if (rc)
1003 return rc; 1000 return rc;
1004 /* Request added to the queue. Wait for its completion. */ 1001 /* Request added to the queue. Wait for its completion. */
1005 rc = wait_event_interruptible(wq, (request->callback == NULL)); 1002 rc = wait_event_interruptible(device->wait_queue,
1003 (request->callback == NULL));
1006 if (rc != -ERESTARTSYS) 1004 if (rc != -ERESTARTSYS)
1007 /* Request finished normally. */ 1005 /* Request finished normally. */
1008 return request->rc; 1006 return request->rc;
@@ -1015,7 +1013,7 @@ tape_do_io_interruptible(struct tape_device *device,
1015 /* Wait for the interrupt that acknowledges the halt. */ 1013 /* Wait for the interrupt that acknowledges the halt. */
1016 do { 1014 do {
1017 rc = wait_event_interruptible( 1015 rc = wait_event_interruptible(
1018 wq, 1016 device->wait_queue,
1019 (request->callback == NULL) 1017 (request->callback == NULL)
1020 ); 1018 );
1021 } while (rc == -ERESTARTSYS); 1019 } while (rc == -ERESTARTSYS);
diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c
index e8487347e4d4..2c2428cc05d8 100644
--- a/drivers/s390/char/vmlogrdr.c
+++ b/drivers/s390/char/vmlogrdr.c
@@ -762,10 +762,10 @@ static int vmlogrdr_register_device(struct vmlogrdr_priv_t *priv)
762 device_unregister(dev); 762 device_unregister(dev);
763 return ret; 763 return ret;
764 } 764 }
765 priv->class_device = device_create(vmlogrdr_class, dev, 765 priv->class_device = device_create_drvdata(vmlogrdr_class, dev,
766 MKDEV(vmlogrdr_major, 766 MKDEV(vmlogrdr_major,
767 priv->minor_num), 767 priv->minor_num),
768 "%s", dev->bus_id); 768 priv, "%s", dev->bus_id);
769 if (IS_ERR(priv->class_device)) { 769 if (IS_ERR(priv->class_device)) {
770 ret = PTR_ERR(priv->class_device); 770 ret = PTR_ERR(priv->class_device);
771 priv->class_device=NULL; 771 priv->class_device=NULL;
@@ -773,7 +773,6 @@ static int vmlogrdr_register_device(struct vmlogrdr_priv_t *priv)
773 device_unregister(dev); 773 device_unregister(dev);
774 return ret; 774 return ret;
775 } 775 }
776 dev->driver_data = priv;
777 priv->device = dev; 776 priv->device = dev;
778 return 0; 777 return 0;
779} 778}
diff --git a/drivers/s390/cio/blacklist.c b/drivers/s390/cio/blacklist.c
index a4a5f2efea48..0bfcbbe375c4 100644
--- a/drivers/s390/cio/blacklist.c
+++ b/drivers/s390/cio/blacklist.c
@@ -97,8 +97,8 @@ static int pure_hex(char **cp, unsigned int *val, int min_digit,
97 return 0; 97 return 0;
98} 98}
99 99
100static int parse_busid(char *str, int *cssid, int *ssid, int *devno, 100static int parse_busid(char *str, unsigned int *cssid, unsigned int *ssid,
101 int msgtrigger) 101 unsigned int *devno, int msgtrigger)
102{ 102{
103 char *str_work; 103 char *str_work;
104 int val, rc, ret; 104 int val, rc, ret;
@@ -148,7 +148,7 @@ out:
148static int blacklist_parse_parameters(char *str, range_action action, 148static int blacklist_parse_parameters(char *str, range_action action,
149 int msgtrigger) 149 int msgtrigger)
150{ 150{
151 int from_cssid, to_cssid, from_ssid, to_ssid, from, to; 151 unsigned int from_cssid, to_cssid, from_ssid, to_ssid, from, to;
152 int rc, totalrc; 152 int rc, totalrc;
153 char *parm; 153 char *parm;
154 range_action ra; 154 range_action ra;
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c
index 82c6a2d45128..b32d7eb3d81a 100644
--- a/drivers/s390/cio/cio.c
+++ b/drivers/s390/cio/cio.c
@@ -576,12 +576,14 @@ cio_validate_subchannel (struct subchannel *sch, struct subchannel_id schid)
576 err = -ENODEV; 576 err = -ENODEV;
577 goto out; 577 goto out;
578 } 578 }
579 if (cio_is_console(sch->schid)) 579 if (cio_is_console(sch->schid)) {
580 sch->opm = 0xff; 580 sch->opm = 0xff;
581 else 581 sch->isc = 1;
582 } else {
582 sch->opm = chp_get_sch_opm(sch); 583 sch->opm = chp_get_sch_opm(sch);
584 sch->isc = 3;
585 }
583 sch->lpm = sch->schib.pmcw.pam & sch->opm; 586 sch->lpm = sch->schib.pmcw.pam & sch->opm;
584 sch->isc = 3;
585 587
586 CIO_MSG_EVENT(6, "Detected device %04x on subchannel 0.%x.%04X " 588 CIO_MSG_EVENT(6, "Detected device %04x on subchannel 0.%x.%04X "
587 "- PIM = %02X, PAM = %02X, POM = %02X\n", 589 "- PIM = %02X, PAM = %02X, POM = %02X\n",
@@ -704,9 +706,9 @@ void wait_cons_dev(void)
704 if (!console_subchannel_in_use) 706 if (!console_subchannel_in_use)
705 return; 707 return;
706 708
707 /* disable all but isc 7 (console device) */ 709 /* disable all but isc 1 (console device) */
708 __ctl_store (save_cr6, 6, 6); 710 __ctl_store (save_cr6, 6, 6);
709 cr6 = 0x01000000; 711 cr6 = 0x40000000;
710 __ctl_load (cr6, 6, 6); 712 __ctl_load (cr6, 6, 6);
711 713
712 do { 714 do {
@@ -788,11 +790,11 @@ cio_probe_console(void)
788 } 790 }
789 791
790 /* 792 /*
791 * enable console I/O-interrupt subclass 7 793 * enable console I/O-interrupt subclass 1
792 */ 794 */
793 ctl_set_bit(6, 24); 795 ctl_set_bit(6, 30);
794 console_subchannel.isc = 7; 796 console_subchannel.isc = 1;
795 console_subchannel.schib.pmcw.isc = 7; 797 console_subchannel.schib.pmcw.isc = 1;
796 console_subchannel.schib.pmcw.intparm = 798 console_subchannel.schib.pmcw.intparm =
797 (u32)(addr_t)&console_subchannel; 799 (u32)(addr_t)&console_subchannel;
798 ret = cio_modify(&console_subchannel); 800 ret = cio_modify(&console_subchannel);
diff --git a/drivers/s390/kvm/kvm_virtio.c b/drivers/s390/kvm/kvm_virtio.c
index 9f55ce6f3c78..5ab34340919b 100644
--- a/drivers/s390/kvm/kvm_virtio.c
+++ b/drivers/s390/kvm/kvm_virtio.c
@@ -31,11 +31,6 @@
31 */ 31 */
32static void *kvm_devices; 32static void *kvm_devices;
33 33
34/*
35 * Unique numbering for kvm devices.
36 */
37static unsigned int dev_index;
38
39struct kvm_device { 34struct kvm_device {
40 struct virtio_device vdev; 35 struct virtio_device vdev;
41 struct kvm_device_desc *desc; 36 struct kvm_device_desc *desc;
@@ -250,26 +245,25 @@ static struct device kvm_root = {
250 * adds a new device and register it with virtio 245 * adds a new device and register it with virtio
251 * appropriate drivers are loaded by the device model 246 * appropriate drivers are loaded by the device model
252 */ 247 */
253static void add_kvm_device(struct kvm_device_desc *d) 248static void add_kvm_device(struct kvm_device_desc *d, unsigned int offset)
254{ 249{
255 struct kvm_device *kdev; 250 struct kvm_device *kdev;
256 251
257 kdev = kzalloc(sizeof(*kdev), GFP_KERNEL); 252 kdev = kzalloc(sizeof(*kdev), GFP_KERNEL);
258 if (!kdev) { 253 if (!kdev) {
259 printk(KERN_EMERG "Cannot allocate kvm dev %u\n", 254 printk(KERN_EMERG "Cannot allocate kvm dev %u type %u\n",
260 dev_index++); 255 offset, d->type);
261 return; 256 return;
262 } 257 }
263 258
264 kdev->vdev.dev.parent = &kvm_root; 259 kdev->vdev.dev.parent = &kvm_root;
265 kdev->vdev.index = dev_index++;
266 kdev->vdev.id.device = d->type; 260 kdev->vdev.id.device = d->type;
267 kdev->vdev.config = &kvm_vq_configspace_ops; 261 kdev->vdev.config = &kvm_vq_configspace_ops;
268 kdev->desc = d; 262 kdev->desc = d;
269 263
270 if (register_virtio_device(&kdev->vdev) != 0) { 264 if (register_virtio_device(&kdev->vdev) != 0) {
271 printk(KERN_ERR "Failed to register kvm device %u\n", 265 printk(KERN_ERR "Failed to register kvm device %u type %u\n",
272 kdev->vdev.index); 266 offset, d->type);
273 kfree(kdev); 267 kfree(kdev);
274 } 268 }
275} 269}
@@ -289,7 +283,7 @@ static void scan_devices(void)
289 if (d->type == 0) 283 if (d->type == 0)
290 break; 284 break;
291 285
292 add_kvm_device(d); 286 add_kvm_device(d, i);
293 } 287 }
294} 288}
295 289
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 436bf1f6d4a6..9a71dae223e8 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -290,9 +290,6 @@ int qeth_set_large_send(struct qeth_card *card,
290 card->dev->features |= NETIF_F_TSO | NETIF_F_SG | 290 card->dev->features |= NETIF_F_TSO | NETIF_F_SG |
291 NETIF_F_HW_CSUM; 291 NETIF_F_HW_CSUM;
292 } else { 292 } else {
293 PRINT_WARN("TSO not supported on %s. "
294 "large_send set to 'no'.\n",
295 card->dev->name);
296 card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG | 293 card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG |
297 NETIF_F_HW_CSUM); 294 NETIF_F_HW_CSUM);
298 card->options.large_send = QETH_LARGE_SEND_NO; 295 card->options.large_send = QETH_LARGE_SEND_NO;
@@ -1407,12 +1404,6 @@ static void qeth_init_func_level(struct qeth_card *card)
1407 } 1404 }
1408} 1405}
1409 1406
1410static inline __u16 qeth_raw_devno_from_bus_id(char *id)
1411{
1412 id += (strlen(id) - 4);
1413 return (__u16) simple_strtoul(id, &id, 16);
1414}
1415
1416static int qeth_idx_activate_get_answer(struct qeth_channel *channel, 1407static int qeth_idx_activate_get_answer(struct qeth_channel *channel,
1417 void (*idx_reply_cb)(struct qeth_channel *, 1408 void (*idx_reply_cb)(struct qeth_channel *,
1418 struct qeth_cmd_buffer *)) 1409 struct qeth_cmd_buffer *))
@@ -1439,7 +1430,7 @@ static int qeth_idx_activate_get_answer(struct qeth_channel *channel,
1439 spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); 1430 spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags);
1440 1431
1441 if (rc) { 1432 if (rc) {
1442 PRINT_ERR("Error2 in activating channel rc=%d\n", rc); 1433 QETH_DBF_MESSAGE(2, "Error2 in activating channel rc=%d\n", rc);
1443 QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc); 1434 QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc);
1444 atomic_set(&channel->irq_pending, 0); 1435 atomic_set(&channel->irq_pending, 0);
1445 wake_up(&card->wait_q); 1436 wake_up(&card->wait_q);
@@ -1468,6 +1459,7 @@ static int qeth_idx_activate_channel(struct qeth_channel *channel,
1468 __u16 temp; 1459 __u16 temp;
1469 __u8 tmp; 1460 __u8 tmp;
1470 int rc; 1461 int rc;
1462 struct ccw_dev_id temp_devid;
1471 1463
1472 card = CARD_FROM_CDEV(channel->ccwdev); 1464 card = CARD_FROM_CDEV(channel->ccwdev);
1473 1465
@@ -1494,8 +1486,8 @@ static int qeth_idx_activate_channel(struct qeth_channel *channel,
1494 &card->token.issuer_rm_w, QETH_MPC_TOKEN_LENGTH); 1486 &card->token.issuer_rm_w, QETH_MPC_TOKEN_LENGTH);
1495 memcpy(QETH_IDX_ACT_FUNC_LEVEL(iob->data), 1487 memcpy(QETH_IDX_ACT_FUNC_LEVEL(iob->data),
1496 &card->info.func_level, sizeof(__u16)); 1488 &card->info.func_level, sizeof(__u16));
1497 temp = qeth_raw_devno_from_bus_id(CARD_DDEV_ID(card)); 1489 ccw_device_get_id(CARD_DDEV(card), &temp_devid);
1498 memcpy(QETH_IDX_ACT_QDIO_DEV_CUA(iob->data), &temp, 2); 1490 memcpy(QETH_IDX_ACT_QDIO_DEV_CUA(iob->data), &temp_devid.devno, 2);
1499 temp = (card->info.cula << 8) + card->info.unit_addr2; 1491 temp = (card->info.cula << 8) + card->info.unit_addr2;
1500 memcpy(QETH_IDX_ACT_QDIO_DEV_REALADDR(iob->data), &temp, 2); 1492 memcpy(QETH_IDX_ACT_QDIO_DEV_REALADDR(iob->data), &temp, 2);
1501 1493
@@ -1508,7 +1500,8 @@ static int qeth_idx_activate_channel(struct qeth_channel *channel,
1508 spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); 1500 spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags);
1509 1501
1510 if (rc) { 1502 if (rc) {
1511 PRINT_ERR("Error1 in activating channel. rc=%d\n", rc); 1503 QETH_DBF_MESSAGE(2, "Error1 in activating channel. rc=%d\n",
1504 rc);
1512 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc); 1505 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
1513 atomic_set(&channel->irq_pending, 0); 1506 atomic_set(&channel->irq_pending, 0);
1514 wake_up(&card->wait_q); 1507 wake_up(&card->wait_q);
@@ -1658,7 +1651,6 @@ int qeth_send_control_data(struct qeth_card *card, int len,
1658 1651
1659 reply = qeth_alloc_reply(card); 1652 reply = qeth_alloc_reply(card);
1660 if (!reply) { 1653 if (!reply) {
1661 PRINT_WARN("Could not alloc qeth_reply!\n");
1662 return -ENOMEM; 1654 return -ENOMEM;
1663 } 1655 }
1664 reply->callback = reply_cb; 1656 reply->callback = reply_cb;
@@ -2612,15 +2604,9 @@ void qeth_queue_input_buffer(struct qeth_card *card, int index)
2612 if (newcount < count) { 2604 if (newcount < count) {
2613 /* we are in memory shortage so we switch back to 2605 /* we are in memory shortage so we switch back to
2614 traditional skb allocation and drop packages */ 2606 traditional skb allocation and drop packages */
2615 if (!atomic_read(&card->force_alloc_skb) &&
2616 net_ratelimit())
2617 PRINT_WARN("Switch to alloc skb\n");
2618 atomic_set(&card->force_alloc_skb, 3); 2607 atomic_set(&card->force_alloc_skb, 3);
2619 count = newcount; 2608 count = newcount;
2620 } else { 2609 } else {
2621 if ((atomic_read(&card->force_alloc_skb) == 1) &&
2622 net_ratelimit())
2623 PRINT_WARN("Switch to sg\n");
2624 atomic_add_unless(&card->force_alloc_skb, -1, 0); 2610 atomic_add_unless(&card->force_alloc_skb, -1, 0);
2625 } 2611 }
2626 2612
@@ -3034,7 +3020,7 @@ int qeth_get_elements_no(struct qeth_card *card, void *hdr,
3034 elements_needed = 1 + (((((unsigned long) hdr) % PAGE_SIZE) 3020 elements_needed = 1 + (((((unsigned long) hdr) % PAGE_SIZE)
3035 + skb->len) >> PAGE_SHIFT); 3021 + skb->len) >> PAGE_SHIFT);
3036 if ((elements_needed + elems) > QETH_MAX_BUFFER_ELEMENTS(card)) { 3022 if ((elements_needed + elems) > QETH_MAX_BUFFER_ELEMENTS(card)) {
3037 PRINT_ERR("Invalid size of IP packet " 3023 QETH_DBF_MESSAGE(2, "Invalid size of IP packet "
3038 "(Number=%d / Length=%d). Discarded.\n", 3024 "(Number=%d / Length=%d). Discarded.\n",
3039 (elements_needed+elems), skb->len); 3025 (elements_needed+elems), skb->len);
3040 return 0; 3026 return 0;
@@ -3247,8 +3233,6 @@ int qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue,
3247 * free buffers) to handle eddp context */ 3233 * free buffers) to handle eddp context */
3248 if (qeth_eddp_check_buffers_for_context(queue, ctx) 3234 if (qeth_eddp_check_buffers_for_context(queue, ctx)
3249 < 0) { 3235 < 0) {
3250 if (net_ratelimit())
3251 PRINT_WARN("eddp tx_dropped 1\n");
3252 rc = -EBUSY; 3236 rc = -EBUSY;
3253 goto out; 3237 goto out;
3254 } 3238 }
@@ -3260,7 +3244,6 @@ int qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue,
3260 tmp = qeth_eddp_fill_buffer(queue, ctx, 3244 tmp = qeth_eddp_fill_buffer(queue, ctx,
3261 queue->next_buf_to_fill); 3245 queue->next_buf_to_fill);
3262 if (tmp < 0) { 3246 if (tmp < 0) {
3263 PRINT_ERR("eddp tx_dropped 2\n");
3264 rc = -EBUSY; 3247 rc = -EBUSY;
3265 goto out; 3248 goto out;
3266 } 3249 }
@@ -3602,8 +3585,6 @@ int qeth_snmp_command(struct qeth_card *card, char __user *udata)
3602 3585
3603 if ((!qeth_adp_supported(card, IPA_SETADP_SET_SNMP_CONTROL)) && 3586 if ((!qeth_adp_supported(card, IPA_SETADP_SET_SNMP_CONTROL)) &&
3604 (!card->options.layer2)) { 3587 (!card->options.layer2)) {
3605 PRINT_WARN("SNMP Query MIBS not supported "
3606 "on %s!\n", QETH_CARD_IFNAME(card));
3607 return -EOPNOTSUPP; 3588 return -EOPNOTSUPP;
3608 } 3589 }
3609 /* skip 4 bytes (data_len struct member) to get req_len */ 3590 /* skip 4 bytes (data_len struct member) to get req_len */
@@ -3634,7 +3615,7 @@ int qeth_snmp_command(struct qeth_card *card, char __user *udata)
3634 rc = qeth_send_ipa_snmp_cmd(card, iob, QETH_SETADP_BASE_LEN + req_len, 3615 rc = qeth_send_ipa_snmp_cmd(card, iob, QETH_SETADP_BASE_LEN + req_len,
3635 qeth_snmp_command_cb, (void *)&qinfo); 3616 qeth_snmp_command_cb, (void *)&qinfo);
3636 if (rc) 3617 if (rc)
3637 PRINT_WARN("SNMP command failed on %s: (0x%x)\n", 3618 QETH_DBF_MESSAGE(2, "SNMP command failed on %s: (0x%x)\n",
3638 QETH_CARD_IFNAME(card), rc); 3619 QETH_CARD_IFNAME(card), rc);
3639 else { 3620 else {
3640 if (copy_to_user(udata, qinfo.udata, qinfo.udata_len)) 3621 if (copy_to_user(udata, qinfo.udata, qinfo.udata_len))
@@ -3807,8 +3788,8 @@ retry:
3807 if (mpno) 3788 if (mpno)
3808 mpno = min(mpno - 1, QETH_MAX_PORTNO); 3789 mpno = min(mpno - 1, QETH_MAX_PORTNO);
3809 if (card->info.portno > mpno) { 3790 if (card->info.portno > mpno) {
3810 PRINT_ERR("Device %s does not offer port number %d \n.", 3791 QETH_DBF_MESSAGE(2, "Device %s does not offer port number %d"
3811 CARD_BUS_ID(card), card->info.portno); 3792 "\n.", CARD_BUS_ID(card), card->info.portno);
3812 rc = -ENODEV; 3793 rc = -ENODEV;
3813 goto out; 3794 goto out;
3814 } 3795 }
@@ -3985,8 +3966,6 @@ struct sk_buff *qeth_core_get_next_skb(struct qeth_card *card,
3985 return skb; 3966 return skb;
3986no_mem: 3967no_mem:
3987 if (net_ratelimit()) { 3968 if (net_ratelimit()) {
3988 PRINT_WARN("No memory for packet received on %s.\n",
3989 QETH_CARD_IFNAME(card));
3990 QETH_DBF_TEXT(TRACE, 2, "noskbmem"); 3969 QETH_DBF_TEXT(TRACE, 2, "noskbmem");
3991 QETH_DBF_TEXT_(TRACE, 2, "%s", CARD_BUS_ID(card)); 3970 QETH_DBF_TEXT_(TRACE, 2, "%s", CARD_BUS_ID(card));
3992 } 3971 }
@@ -4004,15 +3983,17 @@ static void qeth_unregister_dbf_views(void)
4004 } 3983 }
4005} 3984}
4006 3985
4007void qeth_dbf_longtext(enum qeth_dbf_names dbf_nix, int level, char *text, ...) 3986void qeth_dbf_longtext(enum qeth_dbf_names dbf_nix, int level, char *fmt, ...)
4008{ 3987{
4009 char dbf_txt_buf[32]; 3988 char dbf_txt_buf[32];
3989 va_list args;
4010 3990
4011 if (level > (qeth_dbf[dbf_nix].id)->level) 3991 if (level > (qeth_dbf[dbf_nix].id)->level)
4012 return; 3992 return;
4013 snprintf(dbf_txt_buf, sizeof(dbf_txt_buf), text); 3993 va_start(args, fmt);
3994 vsnprintf(dbf_txt_buf, sizeof(dbf_txt_buf), fmt, args);
3995 va_end(args);
4014 debug_text_event(qeth_dbf[dbf_nix].id, level, dbf_txt_buf); 3996 debug_text_event(qeth_dbf[dbf_nix].id, level, dbf_txt_buf);
4015
4016} 3997}
4017EXPORT_SYMBOL_GPL(qeth_dbf_longtext); 3998EXPORT_SYMBOL_GPL(qeth_dbf_longtext);
4018 3999
diff --git a/drivers/s390/net/qeth_core_offl.c b/drivers/s390/net/qeth_core_offl.c
index 822df8362856..452874e89740 100644
--- a/drivers/s390/net/qeth_core_offl.c
+++ b/drivers/s390/net/qeth_core_offl.c
@@ -122,8 +122,8 @@ int qeth_eddp_fill_buffer(struct qeth_qdio_out_q *queue,
122 if (element == 0) 122 if (element == 0)
123 return -EBUSY; 123 return -EBUSY;
124 else { 124 else {
125 PRINT_WARN("could only partially fill eddp " 125 QETH_DBF_MESSAGE(2, "could only partially fill"
126 "buffer!\n"); 126 "eddp buffer!\n");
127 goto out; 127 goto out;
128 } 128 }
129 } 129 }
@@ -143,8 +143,6 @@ int qeth_eddp_fill_buffer(struct qeth_qdio_out_q *queue,
143 if (must_refcnt) { 143 if (must_refcnt) {
144 must_refcnt = 0; 144 must_refcnt = 0;
145 if (qeth_eddp_buf_ref_context(buf, ctx)) { 145 if (qeth_eddp_buf_ref_context(buf, ctx)) {
146 PRINT_WARN("no memory to create eddp context "
147 "reference\n");
148 goto out_check; 146 goto out_check;
149 } 147 }
150 } 148 }
diff --git a/drivers/s390/net/qeth_core_sys.c b/drivers/s390/net/qeth_core_sys.c
index 08a50f057284..c26e842ad905 100644
--- a/drivers/s390/net/qeth_core_sys.c
+++ b/drivers/s390/net/qeth_core_sys.c
@@ -129,7 +129,6 @@ static ssize_t qeth_dev_portno_store(struct device *dev,
129 129
130 portno = simple_strtoul(buf, &tmp, 16); 130 portno = simple_strtoul(buf, &tmp, 16);
131 if (portno > QETH_MAX_PORTNO) { 131 if (portno > QETH_MAX_PORTNO) {
132 PRINT_WARN("portno 0x%X is out of range\n", portno);
133 return -EINVAL; 132 return -EINVAL;
134 } 133 }
135 134
@@ -223,8 +222,6 @@ static ssize_t qeth_dev_prioqing_store(struct device *dev,
223 * if though we have to permit priority queueing 222 * if though we have to permit priority queueing
224 */ 223 */
225 if (card->qdio.no_out_queues == 1) { 224 if (card->qdio.no_out_queues == 1) {
226 PRINT_WARN("Priority queueing disabled due "
227 "to hardware limitations!\n");
228 card->qdio.do_prio_queueing = QETH_PRIOQ_DEFAULT; 225 card->qdio.do_prio_queueing = QETH_PRIOQ_DEFAULT;
229 return -EPERM; 226 return -EPERM;
230 } 227 }
@@ -250,7 +247,6 @@ static ssize_t qeth_dev_prioqing_store(struct device *dev,
250 card->qdio.do_prio_queueing = QETH_NO_PRIO_QUEUEING; 247 card->qdio.do_prio_queueing = QETH_NO_PRIO_QUEUEING;
251 card->qdio.default_out_queue = QETH_DEFAULT_QUEUE; 248 card->qdio.default_out_queue = QETH_DEFAULT_QUEUE;
252 } else { 249 } else {
253 PRINT_WARN("Unknown queueing type '%s'\n", tmp);
254 return -EINVAL; 250 return -EINVAL;
255 } 251 }
256 return count; 252 return count;
@@ -291,9 +287,6 @@ static ssize_t qeth_dev_bufcnt_store(struct device *dev,
291 ((cnt > QETH_IN_BUF_COUNT_MAX) ? QETH_IN_BUF_COUNT_MAX : cnt); 287 ((cnt > QETH_IN_BUF_COUNT_MAX) ? QETH_IN_BUF_COUNT_MAX : cnt);
292 if (old_cnt != cnt) { 288 if (old_cnt != cnt) {
293 rc = qeth_realloc_buffer_pool(card, cnt); 289 rc = qeth_realloc_buffer_pool(card, cnt);
294 if (rc)
295 PRINT_WARN("Error (%d) while setting "
296 "buffer count.\n", rc);
297 } 290 }
298 return count; 291 return count;
299} 292}
@@ -355,7 +348,6 @@ static ssize_t qeth_dev_performance_stats_store(struct device *dev,
355 card->perf_stats.initial_rx_packets = card->stats.rx_packets; 348 card->perf_stats.initial_rx_packets = card->stats.rx_packets;
356 card->perf_stats.initial_tx_packets = card->stats.tx_packets; 349 card->perf_stats.initial_tx_packets = card->stats.tx_packets;
357 } else { 350 } else {
358 PRINT_WARN("performance_stats: write 0 or 1 to this file!\n");
359 return -EINVAL; 351 return -EINVAL;
360 } 352 }
361 return count; 353 return count;
@@ -399,7 +391,6 @@ static ssize_t qeth_dev_layer2_store(struct device *dev,
399 newdis = QETH_DISCIPLINE_LAYER2; 391 newdis = QETH_DISCIPLINE_LAYER2;
400 break; 392 break;
401 default: 393 default:
402 PRINT_WARN("layer2: write 0 or 1 to this file!\n");
403 return -EINVAL; 394 return -EINVAL;
404 } 395 }
405 396
@@ -463,7 +454,6 @@ static ssize_t qeth_dev_large_send_store(struct device *dev,
463 } else if (!strcmp(tmp, "TSO")) { 454 } else if (!strcmp(tmp, "TSO")) {
464 type = QETH_LARGE_SEND_TSO; 455 type = QETH_LARGE_SEND_TSO;
465 } else { 456 } else {
466 PRINT_WARN("large_send: invalid mode %s!\n", tmp);
467 return -EINVAL; 457 return -EINVAL;
468 } 458 }
469 if (card->options.large_send == type) 459 if (card->options.large_send == type)
@@ -503,8 +493,6 @@ static ssize_t qeth_dev_blkt_store(struct qeth_card *card,
503 if (i <= max_value) { 493 if (i <= max_value) {
504 *value = i; 494 *value = i;
505 } else { 495 } else {
506 PRINT_WARN("blkt total time: write values between"
507 " 0 and %d to this file!\n", max_value);
508 return -EINVAL; 496 return -EINVAL;
509 } 497 }
510 return count; 498 return count;
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 86ec50ddae13..f682f7b14480 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -101,19 +101,16 @@ static struct net_device *qeth_l2_netdev_by_devno(unsigned char *read_dev_no)
101{ 101{
102 struct qeth_card *card; 102 struct qeth_card *card;
103 struct net_device *ndev; 103 struct net_device *ndev;
104 unsigned char *readno; 104 __u16 temp_dev_no;
105 __u16 temp_dev_no, card_dev_no;
106 char *endp;
107 unsigned long flags; 105 unsigned long flags;
106 struct ccw_dev_id read_devid;
108 107
109 ndev = NULL; 108 ndev = NULL;
110 memcpy(&temp_dev_no, read_dev_no, 2); 109 memcpy(&temp_dev_no, read_dev_no, 2);
111 read_lock_irqsave(&qeth_core_card_list.rwlock, flags); 110 read_lock_irqsave(&qeth_core_card_list.rwlock, flags);
112 list_for_each_entry(card, &qeth_core_card_list.list, list) { 111 list_for_each_entry(card, &qeth_core_card_list.list, list) {
113 readno = CARD_RDEV_ID(card); 112 ccw_device_get_id(CARD_RDEV(card), &read_devid);
114 readno += (strlen(readno) - 4); 113 if (read_devid.devno == temp_dev_no) {
115 card_dev_no = simple_strtoul(readno, &endp, 16);
116 if (card_dev_no == temp_dev_no) {
117 ndev = card->dev; 114 ndev = card->dev;
118 break; 115 break;
119 } 116 }
@@ -134,14 +131,14 @@ static int qeth_l2_send_setgroupmac_cb(struct qeth_card *card,
134 mac = &cmd->data.setdelmac.mac[0]; 131 mac = &cmd->data.setdelmac.mac[0];
135 /* MAC already registered, needed in couple/uncouple case */ 132 /* MAC already registered, needed in couple/uncouple case */
136 if (cmd->hdr.return_code == 0x2005) { 133 if (cmd->hdr.return_code == 0x2005) {
137 PRINT_WARN("Group MAC %02x:%02x:%02x:%02x:%02x:%02x " \ 134 QETH_DBF_MESSAGE(2, "Group MAC %02x:%02x:%02x:%02x:%02x:%02x "
138 "already existing on %s \n", 135 "already existing on %s \n",
139 mac[0], mac[1], mac[2], mac[3], mac[4], mac[5], 136 mac[0], mac[1], mac[2], mac[3], mac[4], mac[5],
140 QETH_CARD_IFNAME(card)); 137 QETH_CARD_IFNAME(card));
141 cmd->hdr.return_code = 0; 138 cmd->hdr.return_code = 0;
142 } 139 }
143 if (cmd->hdr.return_code) 140 if (cmd->hdr.return_code)
144 PRINT_ERR("Could not set group MAC " \ 141 QETH_DBF_MESSAGE(2, "Could not set group MAC "
145 "%02x:%02x:%02x:%02x:%02x:%02x on %s: %x\n", 142 "%02x:%02x:%02x:%02x:%02x:%02x on %s: %x\n",
146 mac[0], mac[1], mac[2], mac[3], mac[4], mac[5], 143 mac[0], mac[1], mac[2], mac[3], mac[4], mac[5],
147 QETH_CARD_IFNAME(card), cmd->hdr.return_code); 144 QETH_CARD_IFNAME(card), cmd->hdr.return_code);
@@ -166,7 +163,7 @@ static int qeth_l2_send_delgroupmac_cb(struct qeth_card *card,
166 cmd = (struct qeth_ipa_cmd *) data; 163 cmd = (struct qeth_ipa_cmd *) data;
167 mac = &cmd->data.setdelmac.mac[0]; 164 mac = &cmd->data.setdelmac.mac[0];
168 if (cmd->hdr.return_code) 165 if (cmd->hdr.return_code)
169 PRINT_ERR("Could not delete group MAC " \ 166 QETH_DBF_MESSAGE(2, "Could not delete group MAC "
170 "%02x:%02x:%02x:%02x:%02x:%02x on %s: %x\n", 167 "%02x:%02x:%02x:%02x:%02x:%02x on %s: %x\n",
171 mac[0], mac[1], mac[2], mac[3], mac[4], mac[5], 168 mac[0], mac[1], mac[2], mac[3], mac[4], mac[5],
172 QETH_CARD_IFNAME(card), cmd->hdr.return_code); 169 QETH_CARD_IFNAME(card), cmd->hdr.return_code);
@@ -186,10 +183,8 @@ static void qeth_l2_add_mc(struct qeth_card *card, __u8 *mac)
186 183
187 mc = kmalloc(sizeof(struct qeth_mc_mac), GFP_ATOMIC); 184 mc = kmalloc(sizeof(struct qeth_mc_mac), GFP_ATOMIC);
188 185
189 if (!mc) { 186 if (!mc)
190 PRINT_ERR("no mem vor mc mac address\n");
191 return; 187 return;
192 }
193 188
194 memcpy(mc->mc_addr, mac, OSA_ADDR_LEN); 189 memcpy(mc->mc_addr, mac, OSA_ADDR_LEN);
195 mc->mc_addrlen = OSA_ADDR_LEN; 190 mc->mc_addrlen = OSA_ADDR_LEN;
@@ -280,7 +275,7 @@ static int qeth_l2_send_setdelvlan_cb(struct qeth_card *card,
280 QETH_DBF_TEXT(TRACE, 2, "L2sdvcb"); 275 QETH_DBF_TEXT(TRACE, 2, "L2sdvcb");
281 cmd = (struct qeth_ipa_cmd *) data; 276 cmd = (struct qeth_ipa_cmd *) data;
282 if (cmd->hdr.return_code) { 277 if (cmd->hdr.return_code) {
283 PRINT_ERR("Error in processing VLAN %i on %s: 0x%x. " 278 QETH_DBF_MESSAGE(2, "Error in processing VLAN %i on %s: 0x%x. "
284 "Continuing\n", cmd->data.setdelvlan.vlan_id, 279 "Continuing\n", cmd->data.setdelvlan.vlan_id,
285 QETH_CARD_IFNAME(card), cmd->hdr.return_code); 280 QETH_CARD_IFNAME(card), cmd->hdr.return_code);
286 QETH_DBF_TEXT_(TRACE, 2, "L2VL%4x", cmd->hdr.command); 281 QETH_DBF_TEXT_(TRACE, 2, "L2VL%4x", cmd->hdr.command);
@@ -333,8 +328,6 @@ static void qeth_l2_vlan_rx_add_vid(struct net_device *dev, unsigned short vid)
333 spin_lock_bh(&card->vlanlock); 328 spin_lock_bh(&card->vlanlock);
334 list_add_tail(&id->list, &card->vid_list); 329 list_add_tail(&id->list, &card->vid_list);
335 spin_unlock_bh(&card->vlanlock); 330 spin_unlock_bh(&card->vlanlock);
336 } else {
337 PRINT_ERR("no memory for vid\n");
338 } 331 }
339} 332}
340 333
@@ -550,16 +543,15 @@ static int qeth_l2_request_initial_mac(struct qeth_card *card)
550 543
551 rc = qeth_query_setadapterparms(card); 544 rc = qeth_query_setadapterparms(card);
552 if (rc) { 545 if (rc) {
553 PRINT_WARN("could not query adapter parameters on device %s: " 546 QETH_DBF_MESSAGE(2, "could not query adapter parameters on "
554 "x%x\n", CARD_BUS_ID(card), rc); 547 "device %s: x%x\n", CARD_BUS_ID(card), rc);
555 } 548 }
556 549
557 if (card->info.guestlan) { 550 if (card->info.guestlan) {
558 rc = qeth_setadpparms_change_macaddr(card); 551 rc = qeth_setadpparms_change_macaddr(card);
559 if (rc) { 552 if (rc) {
560 PRINT_WARN("couldn't get MAC address on " 553 QETH_DBF_MESSAGE(2, "couldn't get MAC address on "
561 "device %s: x%x\n", 554 "device %s: x%x\n", CARD_BUS_ID(card), rc);
562 CARD_BUS_ID(card), rc);
563 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc); 555 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
564 return rc; 556 return rc;
565 } 557 }
@@ -585,8 +577,6 @@ static int qeth_l2_set_mac_address(struct net_device *dev, void *p)
585 } 577 }
586 578
587 if (card->info.type == QETH_CARD_TYPE_OSN) { 579 if (card->info.type == QETH_CARD_TYPE_OSN) {
588 PRINT_WARN("Setting MAC address on %s is not supported.\n",
589 dev->name);
590 QETH_DBF_TEXT(TRACE, 3, "setmcOSN"); 580 QETH_DBF_TEXT(TRACE, 3, "setmcOSN");
591 return -EOPNOTSUPP; 581 return -EOPNOTSUPP;
592 } 582 }
@@ -666,7 +656,7 @@ static int qeth_l2_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
666 ctx = qeth_eddp_create_context(card, new_skb, hdr, 656 ctx = qeth_eddp_create_context(card, new_skb, hdr,
667 skb->sk->sk_protocol); 657 skb->sk->sk_protocol);
668 if (ctx == NULL) { 658 if (ctx == NULL) {
669 PRINT_WARN("could not create eddp context\n"); 659 QETH_DBF_MESSAGE(2, "could not create eddp context\n");
670 goto tx_drop; 660 goto tx_drop;
671 } 661 }
672 } else { 662 } else {
@@ -731,6 +721,7 @@ tx_drop:
731 if ((new_skb != skb) && new_skb) 721 if ((new_skb != skb) && new_skb)
732 dev_kfree_skb_any(new_skb); 722 dev_kfree_skb_any(new_skb);
733 dev_kfree_skb_any(skb); 723 dev_kfree_skb_any(skb);
724 netif_wake_queue(dev);
734 return NETDEV_TX_OK; 725 return NETDEV_TX_OK;
735} 726}
736 727
@@ -1155,7 +1146,7 @@ static int qeth_osn_send_control_data(struct qeth_card *card, int len,
1155 (addr_t) iob, 0, 0); 1146 (addr_t) iob, 0, 0);
1156 spin_unlock_irqrestore(get_ccwdev_lock(card->write.ccwdev), flags); 1147 spin_unlock_irqrestore(get_ccwdev_lock(card->write.ccwdev), flags);
1157 if (rc) { 1148 if (rc) {
1158 PRINT_WARN("qeth_osn_send_control_data: " 1149 QETH_DBF_MESSAGE(2, "qeth_osn_send_control_data: "
1159 "ccw_device_start rc = %i\n", rc); 1150 "ccw_device_start rc = %i\n", rc);
1160 QETH_DBF_TEXT_(TRACE, 2, " err%d", rc); 1151 QETH_DBF_TEXT_(TRACE, 2, " err%d", rc);
1161 qeth_release_buffer(iob->channel, iob); 1152 qeth_release_buffer(iob->channel, iob);
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index 94a8ead64ed4..999552c83bbe 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -311,7 +311,6 @@ static struct qeth_ipaddr *qeth_l3_get_addr_buffer(
311 311
312 addr = kzalloc(sizeof(struct qeth_ipaddr), GFP_ATOMIC); 312 addr = kzalloc(sizeof(struct qeth_ipaddr), GFP_ATOMIC);
313 if (addr == NULL) { 313 if (addr == NULL) {
314 PRINT_WARN("Not enough memory to add address\n");
315 return NULL; 314 return NULL;
316 } 315 }
317 addr->type = QETH_IP_TYPE_NORMAL; 316 addr->type = QETH_IP_TYPE_NORMAL;
@@ -649,15 +648,6 @@ static void qeth_l3_correct_routing_type(struct qeth_card *card,
649 } 648 }
650 } 649 }
651out_inval: 650out_inval:
652 PRINT_WARN("Routing type '%s' not supported for interface %s.\n"
653 "Router status set to 'no router'.\n",
654 ((*type == PRIMARY_ROUTER)? "primary router" :
655 (*type == SECONDARY_ROUTER)? "secondary router" :
656 (*type == PRIMARY_CONNECTOR)? "primary connector" :
657 (*type == SECONDARY_CONNECTOR)? "secondary connector" :
658 (*type == MULTICAST_ROUTER)? "multicast router" :
659 "unknown"),
660 card->dev->name);
661 *type = NO_ROUTER; 651 *type = NO_ROUTER;
662} 652}
663 653
@@ -674,9 +664,9 @@ int qeth_l3_setrouting_v4(struct qeth_card *card)
674 QETH_PROT_IPV4); 664 QETH_PROT_IPV4);
675 if (rc) { 665 if (rc) {
676 card->options.route4.type = NO_ROUTER; 666 card->options.route4.type = NO_ROUTER;
677 PRINT_WARN("Error (0x%04x) while setting routing type on %s. " 667 QETH_DBF_MESSAGE(2, "Error (0x%04x) while setting routing type"
678 "Type set to 'no router'.\n", 668 " on %s. Type set to 'no router'.\n", rc,
679 rc, QETH_CARD_IFNAME(card)); 669 QETH_CARD_IFNAME(card));
680 } 670 }
681 return rc; 671 return rc;
682} 672}
@@ -697,9 +687,9 @@ int qeth_l3_setrouting_v6(struct qeth_card *card)
697 QETH_PROT_IPV6); 687 QETH_PROT_IPV6);
698 if (rc) { 688 if (rc) {
699 card->options.route6.type = NO_ROUTER; 689 card->options.route6.type = NO_ROUTER;
700 PRINT_WARN("Error (0x%04x) while setting routing type on %s. " 690 QETH_DBF_MESSAGE(2, "Error (0x%04x) while setting routing type"
701 "Type set to 'no router'.\n", 691 " on %s. Type set to 'no router'.\n", rc,
702 rc, QETH_CARD_IFNAME(card)); 692 QETH_CARD_IFNAME(card));
703 } 693 }
704#endif 694#endif
705 return rc; 695 return rc;
@@ -737,7 +727,6 @@ int qeth_l3_add_ipato_entry(struct qeth_card *card,
737 if (!memcmp(ipatoe->addr, new->addr, 727 if (!memcmp(ipatoe->addr, new->addr,
738 (ipatoe->proto == QETH_PROT_IPV4)? 4:16) && 728 (ipatoe->proto == QETH_PROT_IPV4)? 4:16) &&
739 (ipatoe->mask_bits == new->mask_bits)) { 729 (ipatoe->mask_bits == new->mask_bits)) {
740 PRINT_WARN("ipato entry already exists!\n");
741 rc = -EEXIST; 730 rc = -EEXIST;
742 break; 731 break;
743 } 732 }
@@ -802,7 +791,6 @@ int qeth_l3_add_vipa(struct qeth_card *card, enum qeth_prot_versions proto,
802 rc = -EEXIST; 791 rc = -EEXIST;
803 spin_unlock_irqrestore(&card->ip_lock, flags); 792 spin_unlock_irqrestore(&card->ip_lock, flags);
804 if (rc) { 793 if (rc) {
805 PRINT_WARN("Cannot add VIPA. Address already exists!\n");
806 return rc; 794 return rc;
807 } 795 }
808 if (!qeth_l3_add_ip(card, ipaddr)) 796 if (!qeth_l3_add_ip(card, ipaddr))
@@ -867,7 +855,6 @@ int qeth_l3_add_rxip(struct qeth_card *card, enum qeth_prot_versions proto,
867 rc = -EEXIST; 855 rc = -EEXIST;
868 spin_unlock_irqrestore(&card->ip_lock, flags); 856 spin_unlock_irqrestore(&card->ip_lock, flags);
869 if (rc) { 857 if (rc) {
870 PRINT_WARN("Cannot add RXIP. Address already exists!\n");
871 return rc; 858 return rc;
872 } 859 }
873 if (!qeth_l3_add_ip(card, ipaddr)) 860 if (!qeth_l3_add_ip(card, ipaddr))
@@ -1020,23 +1007,23 @@ static int qeth_l3_setadapter_hstr(struct qeth_card *card)
1020 IPA_SETADP_SET_BROADCAST_MODE, 1007 IPA_SETADP_SET_BROADCAST_MODE,
1021 card->options.broadcast_mode); 1008 card->options.broadcast_mode);
1022 if (rc) 1009 if (rc)
1023 PRINT_WARN("couldn't set broadcast mode on " 1010 QETH_DBF_MESSAGE(2, "couldn't set broadcast mode on "
1024 "device %s: x%x\n", 1011 "device %s: x%x\n",
1025 CARD_BUS_ID(card), rc); 1012 CARD_BUS_ID(card), rc);
1026 rc = qeth_l3_send_setadp_mode(card, 1013 rc = qeth_l3_send_setadp_mode(card,
1027 IPA_SETADP_ALTER_MAC_ADDRESS, 1014 IPA_SETADP_ALTER_MAC_ADDRESS,
1028 card->options.macaddr_mode); 1015 card->options.macaddr_mode);
1029 if (rc) 1016 if (rc)
1030 PRINT_WARN("couldn't set macaddr mode on " 1017 QETH_DBF_MESSAGE(2, "couldn't set macaddr mode on "
1031 "device %s: x%x\n", CARD_BUS_ID(card), rc); 1018 "device %s: x%x\n", CARD_BUS_ID(card), rc);
1032 return rc; 1019 return rc;
1033 } 1020 }
1034 if (card->options.broadcast_mode == QETH_TR_BROADCAST_LOCAL) 1021 if (card->options.broadcast_mode == QETH_TR_BROADCAST_LOCAL)
1035 PRINT_WARN("set adapter parameters not available " 1022 QETH_DBF_MESSAGE(2, "set adapter parameters not available "
1036 "to set broadcast mode, using ALLRINGS " 1023 "to set broadcast mode, using ALLRINGS "
1037 "on device %s:\n", CARD_BUS_ID(card)); 1024 "on device %s:\n", CARD_BUS_ID(card));
1038 if (card->options.macaddr_mode == QETH_TR_MACADDR_CANONICAL) 1025 if (card->options.macaddr_mode == QETH_TR_MACADDR_CANONICAL)
1039 PRINT_WARN("set adapter parameters not available " 1026 QETH_DBF_MESSAGE(2, "set adapter parameters not available "
1040 "to set macaddr mode, using NONCANONICAL " 1027 "to set macaddr mode, using NONCANONICAL "
1041 "on device %s:\n", CARD_BUS_ID(card)); 1028 "on device %s:\n", CARD_BUS_ID(card));
1042 return 0; 1029 return 0;
@@ -2070,7 +2057,7 @@ static struct qeth_card *qeth_l3_get_card_from_dev(struct net_device *dev)
2070 card = netdev_priv(dev); 2057 card = netdev_priv(dev);
2071 else if (rc == QETH_VLAN_CARD) 2058 else if (rc == QETH_VLAN_CARD)
2072 card = netdev_priv(vlan_dev_info(dev)->real_dev); 2059 card = netdev_priv(vlan_dev_info(dev)->real_dev);
2073 if (card->options.layer2) 2060 if (card && card->options.layer2)
2074 card = NULL; 2061 card = NULL;
2075 QETH_DBF_TEXT_(TRACE, 4, "%d", rc); 2062 QETH_DBF_TEXT_(TRACE, 4, "%d", rc);
2076 return card ; 2063 return card ;
@@ -2182,8 +2169,6 @@ static int qeth_l3_arp_set_no_entries(struct qeth_card *card, int no_entries)
2182 if (card->info.guestlan) 2169 if (card->info.guestlan)
2183 return -EOPNOTSUPP; 2170 return -EOPNOTSUPP;
2184 if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) { 2171 if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) {
2185 PRINT_WARN("ARP processing not supported "
2186 "on %s!\n", QETH_CARD_IFNAME(card));
2187 return -EOPNOTSUPP; 2172 return -EOPNOTSUPP;
2188 } 2173 }
2189 rc = qeth_l3_send_simple_setassparms(card, IPA_ARP_PROCESSING, 2174 rc = qeth_l3_send_simple_setassparms(card, IPA_ARP_PROCESSING,
@@ -2191,8 +2176,8 @@ static int qeth_l3_arp_set_no_entries(struct qeth_card *card, int no_entries)
2191 no_entries); 2176 no_entries);
2192 if (rc) { 2177 if (rc) {
2193 tmp = rc; 2178 tmp = rc;
2194 PRINT_WARN("Could not set number of ARP entries on %s: " 2179 QETH_DBF_MESSAGE(2, "Could not set number of ARP entries on "
2195 "%s (0x%x/%d)\n", QETH_CARD_IFNAME(card), 2180 "%s: %s (0x%x/%d)\n", QETH_CARD_IFNAME(card),
2196 qeth_l3_arp_get_error_cause(&rc), tmp, tmp); 2181 qeth_l3_arp_get_error_cause(&rc), tmp, tmp);
2197 } 2182 }
2198 return rc; 2183 return rc;
@@ -2260,9 +2245,6 @@ static int qeth_l3_arp_query_cb(struct qeth_card *card,
2260 qdata->no_entries * uentry_size){ 2245 qdata->no_entries * uentry_size){
2261 QETH_DBF_TEXT_(TRACE, 4, "qaer3%i", -ENOMEM); 2246 QETH_DBF_TEXT_(TRACE, 4, "qaer3%i", -ENOMEM);
2262 cmd->hdr.return_code = -ENOMEM; 2247 cmd->hdr.return_code = -ENOMEM;
2263 PRINT_WARN("query ARP user space buffer is too small for "
2264 "the returned number of ARP entries. "
2265 "Aborting query!\n");
2266 goto out_error; 2248 goto out_error;
2267 } 2249 }
2268 QETH_DBF_TEXT_(TRACE, 4, "anore%i", 2250 QETH_DBF_TEXT_(TRACE, 4, "anore%i",
@@ -2324,8 +2306,6 @@ static int qeth_l3_arp_query(struct qeth_card *card, char __user *udata)
2324 2306
2325 if (!qeth_is_supported(card,/*IPA_QUERY_ARP_ADDR_INFO*/ 2307 if (!qeth_is_supported(card,/*IPA_QUERY_ARP_ADDR_INFO*/
2326 IPA_ARP_PROCESSING)) { 2308 IPA_ARP_PROCESSING)) {
2327 PRINT_WARN("ARP processing not supported "
2328 "on %s!\n", QETH_CARD_IFNAME(card));
2329 return -EOPNOTSUPP; 2309 return -EOPNOTSUPP;
2330 } 2310 }
2331 /* get size of userspace buffer and mask_bits -> 6 bytes */ 2311 /* get size of userspace buffer and mask_bits -> 6 bytes */
@@ -2344,7 +2324,7 @@ static int qeth_l3_arp_query(struct qeth_card *card, char __user *udata)
2344 qeth_l3_arp_query_cb, (void *)&qinfo); 2324 qeth_l3_arp_query_cb, (void *)&qinfo);
2345 if (rc) { 2325 if (rc) {
2346 tmp = rc; 2326 tmp = rc;
2347 PRINT_WARN("Error while querying ARP cache on %s: %s " 2327 QETH_DBF_MESSAGE(2, "Error while querying ARP cache on %s: %s "
2348 "(0x%x/%d)\n", QETH_CARD_IFNAME(card), 2328 "(0x%x/%d)\n", QETH_CARD_IFNAME(card),
2349 qeth_l3_arp_get_error_cause(&rc), tmp, tmp); 2329 qeth_l3_arp_get_error_cause(&rc), tmp, tmp);
2350 if (copy_to_user(udata, qinfo.udata, 4)) 2330 if (copy_to_user(udata, qinfo.udata, 4))
@@ -2375,8 +2355,6 @@ static int qeth_l3_arp_add_entry(struct qeth_card *card,
2375 if (card->info.guestlan) 2355 if (card->info.guestlan)
2376 return -EOPNOTSUPP; 2356 return -EOPNOTSUPP;
2377 if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) { 2357 if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) {
2378 PRINT_WARN("ARP processing not supported "
2379 "on %s!\n", QETH_CARD_IFNAME(card));
2380 return -EOPNOTSUPP; 2358 return -EOPNOTSUPP;
2381 } 2359 }
2382 2360
@@ -2391,10 +2369,9 @@ static int qeth_l3_arp_add_entry(struct qeth_card *card,
2391 if (rc) { 2369 if (rc) {
2392 tmp = rc; 2370 tmp = rc;
2393 qeth_l3_ipaddr4_to_string((u8 *)entry->ipaddr, buf); 2371 qeth_l3_ipaddr4_to_string((u8 *)entry->ipaddr, buf);
2394 PRINT_WARN("Could not add ARP entry for address %s on %s: " 2372 QETH_DBF_MESSAGE(2, "Could not add ARP entry for address %s "
2395 "%s (0x%x/%d)\n", 2373 "on %s: %s (0x%x/%d)\n", buf, QETH_CARD_IFNAME(card),
2396 buf, QETH_CARD_IFNAME(card), 2374 qeth_l3_arp_get_error_cause(&rc), tmp, tmp);
2397 qeth_l3_arp_get_error_cause(&rc), tmp, tmp);
2398 } 2375 }
2399 return rc; 2376 return rc;
2400} 2377}
@@ -2417,8 +2394,6 @@ static int qeth_l3_arp_remove_entry(struct qeth_card *card,
2417 if (card->info.guestlan) 2394 if (card->info.guestlan)
2418 return -EOPNOTSUPP; 2395 return -EOPNOTSUPP;
2419 if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) { 2396 if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) {
2420 PRINT_WARN("ARP processing not supported "
2421 "on %s!\n", QETH_CARD_IFNAME(card));
2422 return -EOPNOTSUPP; 2397 return -EOPNOTSUPP;
2423 } 2398 }
2424 memcpy(buf, entry, 12); 2399 memcpy(buf, entry, 12);
@@ -2433,10 +2408,9 @@ static int qeth_l3_arp_remove_entry(struct qeth_card *card,
2433 tmp = rc; 2408 tmp = rc;
2434 memset(buf, 0, 16); 2409 memset(buf, 0, 16);
2435 qeth_l3_ipaddr4_to_string((u8 *)entry->ipaddr, buf); 2410 qeth_l3_ipaddr4_to_string((u8 *)entry->ipaddr, buf);
2436 PRINT_WARN("Could not delete ARP entry for address %s on %s: " 2411 QETH_DBF_MESSAGE(2, "Could not delete ARP entry for address %s"
2437 "%s (0x%x/%d)\n", 2412 " on %s: %s (0x%x/%d)\n", buf, QETH_CARD_IFNAME(card),
2438 buf, QETH_CARD_IFNAME(card), 2413 qeth_l3_arp_get_error_cause(&rc), tmp, tmp);
2439 qeth_l3_arp_get_error_cause(&rc), tmp, tmp);
2440 } 2414 }
2441 return rc; 2415 return rc;
2442} 2416}
@@ -2456,16 +2430,14 @@ static int qeth_l3_arp_flush_cache(struct qeth_card *card)
2456 if (card->info.guestlan || (card->info.type == QETH_CARD_TYPE_IQD)) 2430 if (card->info.guestlan || (card->info.type == QETH_CARD_TYPE_IQD))
2457 return -EOPNOTSUPP; 2431 return -EOPNOTSUPP;
2458 if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) { 2432 if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) {
2459 PRINT_WARN("ARP processing not supported "
2460 "on %s!\n", QETH_CARD_IFNAME(card));
2461 return -EOPNOTSUPP; 2433 return -EOPNOTSUPP;
2462 } 2434 }
2463 rc = qeth_l3_send_simple_setassparms(card, IPA_ARP_PROCESSING, 2435 rc = qeth_l3_send_simple_setassparms(card, IPA_ARP_PROCESSING,
2464 IPA_CMD_ASS_ARP_FLUSH_CACHE, 0); 2436 IPA_CMD_ASS_ARP_FLUSH_CACHE, 0);
2465 if (rc) { 2437 if (rc) {
2466 tmp = rc; 2438 tmp = rc;
2467 PRINT_WARN("Could not flush ARP cache on %s: %s (0x%x/%d)\n", 2439 QETH_DBF_MESSAGE(2, "Could not flush ARP cache on %s: %s "
2468 QETH_CARD_IFNAME(card), 2440 "(0x%x/%d)\n", QETH_CARD_IFNAME(card),
2469 qeth_l3_arp_get_error_cause(&rc), tmp, tmp); 2441 qeth_l3_arp_get_error_cause(&rc), tmp, tmp);
2470 } 2442 }
2471 return rc; 2443 return rc;
@@ -2724,7 +2696,7 @@ static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
2724 ctx = qeth_eddp_create_context(card, new_skb, hdr, 2696 ctx = qeth_eddp_create_context(card, new_skb, hdr,
2725 skb->sk->sk_protocol); 2697 skb->sk->sk_protocol);
2726 if (ctx == NULL) { 2698 if (ctx == NULL) {
2727 PRINT_WARN("could not create eddp context\n"); 2699 QETH_DBF_MESSAGE(2, "could not create eddp context\n");
2728 goto tx_drop; 2700 goto tx_drop;
2729 } 2701 }
2730 } else { 2702 } else {
@@ -2792,6 +2764,7 @@ tx_drop:
2792 if ((new_skb != skb) && new_skb) 2764 if ((new_skb != skb) && new_skb)
2793 dev_kfree_skb_any(new_skb); 2765 dev_kfree_skb_any(new_skb);
2794 dev_kfree_skb_any(skb); 2766 dev_kfree_skb_any(skb);
2767 netif_wake_queue(dev);
2795 return NETDEV_TX_OK; 2768 return NETDEV_TX_OK;
2796} 2769}
2797 2770
diff --git a/drivers/s390/net/qeth_l3_sys.c b/drivers/s390/net/qeth_l3_sys.c
index 08f51fd902c4..ac1993708ae9 100644
--- a/drivers/s390/net/qeth_l3_sys.c
+++ b/drivers/s390/net/qeth_l3_sys.c
@@ -85,7 +85,6 @@ static ssize_t qeth_l3_dev_route_store(struct qeth_card *card,
85 } else if (!strcmp(tmp, "multicast_router")) { 85 } else if (!strcmp(tmp, "multicast_router")) {
86 route->type = MULTICAST_ROUTER; 86 route->type = MULTICAST_ROUTER;
87 } else { 87 } else {
88 PRINT_WARN("Invalid routing type '%s'.\n", tmp);
89 return -EINVAL; 88 return -EINVAL;
90 } 89 }
91 if (((card->state == CARD_STATE_SOFTSETUP) || 90 if (((card->state == CARD_STATE_SOFTSETUP) ||
@@ -137,9 +136,6 @@ static ssize_t qeth_l3_dev_route6_store(struct device *dev,
137 return -EINVAL; 136 return -EINVAL;
138 137
139 if (!qeth_is_supported(card, IPA_IPV6)) { 138 if (!qeth_is_supported(card, IPA_IPV6)) {
140 PRINT_WARN("IPv6 not supported for interface %s.\n"
141 "Routing status no changed.\n",
142 QETH_CARD_IFNAME(card));
143 return -ENOTSUPP; 139 return -ENOTSUPP;
144 } 140 }
145 141
@@ -179,7 +175,6 @@ static ssize_t qeth_l3_dev_fake_broadcast_store(struct device *dev,
179 if ((i == 0) || (i == 1)) 175 if ((i == 0) || (i == 1))
180 card->options.fake_broadcast = i; 176 card->options.fake_broadcast = i;
181 else { 177 else {
182 PRINT_WARN("fake_broadcast: write 0 or 1 to this file!\n");
183 return -EINVAL; 178 return -EINVAL;
184 } 179 }
185 return count; 180 return count;
@@ -220,7 +215,6 @@ static ssize_t qeth_l3_dev_broadcast_mode_store(struct device *dev,
220 215
221 if (!((card->info.link_type == QETH_LINK_TYPE_HSTR) || 216 if (!((card->info.link_type == QETH_LINK_TYPE_HSTR) ||
222 (card->info.link_type == QETH_LINK_TYPE_LANE_TR))) { 217 (card->info.link_type == QETH_LINK_TYPE_LANE_TR))) {
223 PRINT_WARN("Device is not a tokenring device!\n");
224 return -EINVAL; 218 return -EINVAL;
225 } 219 }
226 220
@@ -233,8 +227,6 @@ static ssize_t qeth_l3_dev_broadcast_mode_store(struct device *dev,
233 card->options.broadcast_mode = QETH_TR_BROADCAST_ALLRINGS; 227 card->options.broadcast_mode = QETH_TR_BROADCAST_ALLRINGS;
234 return count; 228 return count;
235 } else { 229 } else {
236 PRINT_WARN("broadcast_mode: invalid mode %s!\n",
237 tmp);
238 return -EINVAL; 230 return -EINVAL;
239 } 231 }
240 return count; 232 return count;
@@ -275,7 +267,6 @@ static ssize_t qeth_l3_dev_canonical_macaddr_store(struct device *dev,
275 267
276 if (!((card->info.link_type == QETH_LINK_TYPE_HSTR) || 268 if (!((card->info.link_type == QETH_LINK_TYPE_HSTR) ||
277 (card->info.link_type == QETH_LINK_TYPE_LANE_TR))) { 269 (card->info.link_type == QETH_LINK_TYPE_LANE_TR))) {
278 PRINT_WARN("Device is not a tokenring device!\n");
279 return -EINVAL; 270 return -EINVAL;
280 } 271 }
281 272
@@ -285,7 +276,6 @@ static ssize_t qeth_l3_dev_canonical_macaddr_store(struct device *dev,
285 QETH_TR_MACADDR_CANONICAL : 276 QETH_TR_MACADDR_CANONICAL :
286 QETH_TR_MACADDR_NONCANONICAL; 277 QETH_TR_MACADDR_NONCANONICAL;
287 else { 278 else {
288 PRINT_WARN("canonical_macaddr: write 0 or 1 to this file!\n");
289 return -EINVAL; 279 return -EINVAL;
290 } 280 }
291 return count; 281 return count;
@@ -327,7 +317,6 @@ static ssize_t qeth_l3_dev_checksum_store(struct device *dev,
327 else if (!strcmp(tmp, "no_checksumming")) 317 else if (!strcmp(tmp, "no_checksumming"))
328 card->options.checksum_type = NO_CHECKSUMMING; 318 card->options.checksum_type = NO_CHECKSUMMING;
329 else { 319 else {
330 PRINT_WARN("Unknown checksumming type '%s'\n", tmp);
331 return -EINVAL; 320 return -EINVAL;
332 } 321 }
333 return count; 322 return count;
@@ -382,8 +371,6 @@ static ssize_t qeth_l3_dev_ipato_enable_store(struct device *dev,
382 } else if (!strcmp(tmp, "0")) { 371 } else if (!strcmp(tmp, "0")) {
383 card->ipato.enabled = 0; 372 card->ipato.enabled = 0;
384 } else { 373 } else {
385 PRINT_WARN("ipato_enable: write 0, 1 or 'toggle' to "
386 "this file\n");
387 return -EINVAL; 374 return -EINVAL;
388 } 375 }
389 return count; 376 return count;
@@ -422,8 +409,6 @@ static ssize_t qeth_l3_dev_ipato_invert4_store(struct device *dev,
422 } else if (!strcmp(tmp, "0")) { 409 } else if (!strcmp(tmp, "0")) {
423 card->ipato.invert4 = 0; 410 card->ipato.invert4 = 0;
424 } else { 411 } else {
425 PRINT_WARN("ipato_invert4: write 0, 1 or 'toggle' to "
426 "this file\n");
427 return -EINVAL; 412 return -EINVAL;
428 } 413 }
429 return count; 414 return count;
@@ -486,13 +471,10 @@ static int qeth_l3_parse_ipatoe(const char *buf, enum qeth_prot_versions proto,
486 /* get address string */ 471 /* get address string */
487 end = strchr(start, '/'); 472 end = strchr(start, '/');
488 if (!end || (end - start >= 40)) { 473 if (!end || (end - start >= 40)) {
489 PRINT_WARN("Invalid format for ipato_addx/delx. "
490 "Use <ip addr>/<mask bits>\n");
491 return -EINVAL; 474 return -EINVAL;
492 } 475 }
493 strncpy(buffer, start, end - start); 476 strncpy(buffer, start, end - start);
494 if (qeth_l3_string_to_ipaddr(buffer, proto, addr)) { 477 if (qeth_l3_string_to_ipaddr(buffer, proto, addr)) {
495 PRINT_WARN("Invalid IP address format!\n");
496 return -EINVAL; 478 return -EINVAL;
497 } 479 }
498 start = end + 1; 480 start = end + 1;
@@ -500,7 +482,6 @@ static int qeth_l3_parse_ipatoe(const char *buf, enum qeth_prot_versions proto,
500 if (!strlen(start) || 482 if (!strlen(start) ||
501 (tmp == start) || 483 (tmp == start) ||
502 (*mask_bits > ((proto == QETH_PROT_IPV4) ? 32 : 128))) { 484 (*mask_bits > ((proto == QETH_PROT_IPV4) ? 32 : 128))) {
503 PRINT_WARN("Invalid mask bits for ipato_addx/delx !\n");
504 return -EINVAL; 485 return -EINVAL;
505 } 486 }
506 return 0; 487 return 0;
@@ -520,7 +501,6 @@ static ssize_t qeth_l3_dev_ipato_add_store(const char *buf, size_t count,
520 501
521 ipatoe = kzalloc(sizeof(struct qeth_ipato_entry), GFP_KERNEL); 502 ipatoe = kzalloc(sizeof(struct qeth_ipato_entry), GFP_KERNEL);
522 if (!ipatoe) { 503 if (!ipatoe) {
523 PRINT_WARN("No memory to allocate ipato entry\n");
524 return -ENOMEM; 504 return -ENOMEM;
525 } 505 }
526 ipatoe->proto = proto; 506 ipatoe->proto = proto;
@@ -609,8 +589,6 @@ static ssize_t qeth_l3_dev_ipato_invert6_store(struct device *dev,
609 } else if (!strcmp(tmp, "0")) { 589 } else if (!strcmp(tmp, "0")) {
610 card->ipato.invert6 = 0; 590 card->ipato.invert6 = 0;
611 } else { 591 } else {
612 PRINT_WARN("ipato_invert6: write 0, 1 or 'toggle' to "
613 "this file\n");
614 return -EINVAL; 592 return -EINVAL;
615 } 593 }
616 return count; 594 return count;
@@ -724,7 +702,6 @@ static int qeth_l3_parse_vipae(const char *buf, enum qeth_prot_versions proto,
724 u8 *addr) 702 u8 *addr)
725{ 703{
726 if (qeth_l3_string_to_ipaddr(buf, proto, addr)) { 704 if (qeth_l3_string_to_ipaddr(buf, proto, addr)) {
727 PRINT_WARN("Invalid IP address format!\n");
728 return -EINVAL; 705 return -EINVAL;
729 } 706 }
730 return 0; 707 return 0;
@@ -891,7 +868,6 @@ static int qeth_l3_parse_rxipe(const char *buf, enum qeth_prot_versions proto,
891 u8 *addr) 868 u8 *addr)
892{ 869{
893 if (qeth_l3_string_to_ipaddr(buf, proto, addr)) { 870 if (qeth_l3_string_to_ipaddr(buf, proto, addr)) {
894 PRINT_WARN("Invalid IP address format!\n");
895 return -EINVAL; 871 return -EINVAL;
896 } 872 }
897 return 0; 873 return 0;
diff --git a/drivers/s390/s390mach.c b/drivers/s390/s390mach.c
index 5080f343ad74..5bfbe7659830 100644
--- a/drivers/s390/s390mach.c
+++ b/drivers/s390/s390mach.c
@@ -207,6 +207,7 @@ s390_handle_mcck(void)
207 do_exit(SIGSEGV); 207 do_exit(SIGSEGV);
208 } 208 }
209} 209}
210EXPORT_SYMBOL_GPL(s390_handle_mcck);
210 211
211/* 212/*
212 * returns 0 if all registers could be validated 213 * returns 0 if all registers could be validated
diff --git a/drivers/sbus/char/bpp.c b/drivers/sbus/char/bpp.c
index b87037ec9805..03c966059471 100644
--- a/drivers/sbus/char/bpp.c
+++ b/drivers/sbus/char/bpp.c
@@ -869,7 +869,7 @@ static void probeLptPort(unsigned idx)
869 instances[idx].mode = COMPATIBILITY; 869 instances[idx].mode = COMPATIBILITY;
870 instances[idx].run_length = 0; 870 instances[idx].run_length = 0;
871 instances[idx].run_flag = 0; 871 instances[idx].run_flag = 0;
872 if (!request_region(lpAddr,3, dev_name)) return; 872 if (!request_region(lpAddr,3, bpp_dev_name)) return;
873 873
874 /* 874 /*
875 * First, make sure the instance exists. Do this by writing to 875 * First, make sure the instance exists. Do this by writing to
@@ -1021,7 +1021,7 @@ static int __init bpp_init(void)
1021 if (rc == 0) 1021 if (rc == 0)
1022 return -ENODEV; 1022 return -ENODEV;
1023 1023
1024 rc = register_chrdev(BPP_MAJOR, dev_name, &bpp_fops); 1024 rc = register_chrdev(BPP_MAJOR, bpp_dev_name, &bpp_fops);
1025 if (rc < 0) 1025 if (rc < 0)
1026 return rc; 1026 return rc;
1027 1027
@@ -1037,7 +1037,7 @@ static void __exit bpp_cleanup(void)
1037{ 1037{
1038 unsigned idx; 1038 unsigned idx;
1039 1039
1040 unregister_chrdev(BPP_MAJOR, dev_name); 1040 unregister_chrdev(BPP_MAJOR, bpp_dev_name);
1041 1041
1042 for (idx = 0; idx < BPP_NO; idx++) { 1042 for (idx = 0; idx < BPP_NO; idx++) {
1043 if (instances[idx].present) 1043 if (instances[idx].present)
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
index b31faeccb9cd..867f6fd5c2c0 100644
--- a/drivers/scsi/3w-9xxx.c
+++ b/drivers/scsi/3w-9xxx.c
@@ -1278,7 +1278,7 @@ static irqreturn_t twa_interrupt(int irq, void *dev_instance)
1278 error = 0; 1278 error = 0;
1279 /* Check for command packet errors */ 1279 /* Check for command packet errors */
1280 if (full_command_packet->command.newcommand.status != 0) { 1280 if (full_command_packet->command.newcommand.status != 0) {
1281 if (tw_dev->srb[request_id] != 0) { 1281 if (tw_dev->srb[request_id] != NULL) {
1282 error = twa_fill_sense(tw_dev, request_id, 1, 1); 1282 error = twa_fill_sense(tw_dev, request_id, 1, 1);
1283 } else { 1283 } else {
1284 /* Skip ioctl error prints */ 1284 /* Skip ioctl error prints */
@@ -1290,7 +1290,7 @@ static irqreturn_t twa_interrupt(int irq, void *dev_instance)
1290 1290
1291 /* Check for correct state */ 1291 /* Check for correct state */
1292 if (tw_dev->state[request_id] != TW_S_POSTED) { 1292 if (tw_dev->state[request_id] != TW_S_POSTED) {
1293 if (tw_dev->srb[request_id] != 0) { 1293 if (tw_dev->srb[request_id] != NULL) {
1294 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1a, "Received a request id that wasn't posted"); 1294 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1a, "Received a request id that wasn't posted");
1295 TW_CLEAR_ALL_INTERRUPTS(tw_dev); 1295 TW_CLEAR_ALL_INTERRUPTS(tw_dev);
1296 goto twa_interrupt_bail; 1296 goto twa_interrupt_bail;
@@ -1298,7 +1298,7 @@ static irqreturn_t twa_interrupt(int irq, void *dev_instance)
1298 } 1298 }
1299 1299
1300 /* Check for internal command completion */ 1300 /* Check for internal command completion */
1301 if (tw_dev->srb[request_id] == 0) { 1301 if (tw_dev->srb[request_id] == NULL) {
1302 if (request_id != tw_dev->chrdev_request_id) { 1302 if (request_id != tw_dev->chrdev_request_id) {
1303 if (twa_aen_complete(tw_dev, request_id)) 1303 if (twa_aen_complete(tw_dev, request_id))
1304 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1b, "Error completing AEN during attention interrupt"); 1304 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1b, "Error completing AEN during attention interrupt");
diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c
index 1dca1775f4b1..0899cb61e3dd 100644
--- a/drivers/scsi/aha152x.c
+++ b/drivers/scsi/aha152x.c
@@ -3582,7 +3582,7 @@ static int checksetup(struct aha152x_setup *setup)
3582 if (i == ARRAY_SIZE(ports)) 3582 if (i == ARRAY_SIZE(ports))
3583 return 0; 3583 return 0;
3584 3584
3585 if ( request_region(setup->io_port, IO_RANGE, "aha152x")==0 ) { 3585 if (!request_region(setup->io_port, IO_RANGE, "aha152x")) {
3586 printk(KERN_ERR "aha152x: io port 0x%x busy.\n", setup->io_port); 3586 printk(KERN_ERR "aha152x: io port 0x%x busy.\n", setup->io_port);
3587 return 0; 3587 return 0;
3588 } 3588 }
@@ -3842,7 +3842,7 @@ static int __init aha152x_init(void)
3842 if ((setup_count == 1) && (setup[0].io_port == ports[i])) 3842 if ((setup_count == 1) && (setup[0].io_port == ports[i]))
3843 continue; 3843 continue;
3844 3844
3845 if ( request_region(ports[i], IO_RANGE, "aha152x")==0 ) { 3845 if (!request_region(ports[i], IO_RANGE, "aha152x")) {
3846 printk(KERN_ERR "aha152x: io port 0x%x busy.\n", ports[i]); 3846 printk(KERN_ERR "aha152x: io port 0x%x busy.\n", ports[i]);
3847 continue; 3847 continue;
3848 } 3848 }
diff --git a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c
index db6de5e6afb3..7d311541c76c 100644
--- a/drivers/scsi/atp870u.c
+++ b/drivers/scsi/atp870u.c
@@ -747,7 +747,7 @@ static void send_s870(struct atp_unit *dev,unsigned char c)
747 dev->quhd[c] = 0; 747 dev->quhd[c] = 0;
748 } 748 }
749 workreq = dev->quereq[c][dev->quhd[c]]; 749 workreq = dev->quereq[c][dev->quhd[c]];
750 if (dev->id[c][scmd_id(workreq)].curr_req == 0) { 750 if (dev->id[c][scmd_id(workreq)].curr_req == NULL) {
751 dev->id[c][scmd_id(workreq)].curr_req = workreq; 751 dev->id[c][scmd_id(workreq)].curr_req = workreq;
752 dev->last_cmd[c] = scmd_id(workreq); 752 dev->last_cmd[c] = scmd_id(workreq);
753 goto cmd_subp; 753 goto cmd_subp;
diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c
index 75c84d7b9ce8..c4b938bc30d3 100644
--- a/drivers/scsi/ch.c
+++ b/drivers/scsi/ch.c
@@ -910,9 +910,9 @@ static int ch_probe(struct device *dev)
910 ch->minor = minor; 910 ch->minor = minor;
911 sprintf(ch->name,"ch%d",ch->minor); 911 sprintf(ch->name,"ch%d",ch->minor);
912 912
913 class_dev = device_create(ch_sysfs_class, dev, 913 class_dev = device_create_drvdata(ch_sysfs_class, dev,
914 MKDEV(SCSI_CHANGER_MAJOR,ch->minor), 914 MKDEV(SCSI_CHANGER_MAJOR, ch->minor),
915 "s%s", ch->name); 915 ch, "s%s", ch->name);
916 if (IS_ERR(class_dev)) { 916 if (IS_ERR(class_dev)) {
917 printk(KERN_WARNING "ch%d: device_create failed\n", 917 printk(KERN_WARNING "ch%d: device_create failed\n",
918 ch->minor); 918 ch->minor);
@@ -926,7 +926,6 @@ static int ch_probe(struct device *dev)
926 if (init) 926 if (init)
927 ch_init_elem(ch); 927 ch_init_elem(ch);
928 928
929 dev_set_drvdata(dev, ch);
930 sdev_printk(KERN_INFO, sd, "Attached scsi changer %s\n", ch->name); 929 sdev_printk(KERN_INFO, sd, "Attached scsi changer %s\n", ch->name);
931 930
932 return 0; 931 return 0;
diff --git a/drivers/scsi/dpt/dptsig.h b/drivers/scsi/dpt/dptsig.h
index 72c8992fdf21..a6644b332b53 100644
--- a/drivers/scsi/dpt/dptsig.h
+++ b/drivers/scsi/dpt/dptsig.h
@@ -85,7 +85,7 @@ typedef unsigned int sigINT;
85/* ------------------------------------------------------------------ */ 85/* ------------------------------------------------------------------ */
86/* What type of processor the file is meant to run on. */ 86/* What type of processor the file is meant to run on. */
87/* This will let us know whether to read sigWORDs as high/low or low/high. */ 87/* This will let us know whether to read sigWORDs as high/low or low/high. */
88#define PROC_INTEL 0x00 /* Intel 80x86 */ 88#define PROC_INTEL 0x00 /* Intel 80x86/ia64 */
89#define PROC_MOTOROLA 0x01 /* Motorola 68K */ 89#define PROC_MOTOROLA 0x01 /* Motorola 68K */
90#define PROC_MIPS4000 0x02 /* MIPS RISC 4000 */ 90#define PROC_MIPS4000 0x02 /* MIPS RISC 4000 */
91#define PROC_ALPHA 0x03 /* DEC Alpha */ 91#define PROC_ALPHA 0x03 /* DEC Alpha */
@@ -104,6 +104,7 @@ typedef unsigned int sigINT;
104#define PROC_486 0x08 /* Intel 80486 */ 104#define PROC_486 0x08 /* Intel 80486 */
105#define PROC_PENTIUM 0x10 /* Intel 586 aka P5 aka Pentium */ 105#define PROC_PENTIUM 0x10 /* Intel 586 aka P5 aka Pentium */
106#define PROC_SEXIUM 0x20 /* Intel 686 aka P6 aka Pentium Pro or MMX */ 106#define PROC_SEXIUM 0x20 /* Intel 686 aka P6 aka Pentium Pro or MMX */
107#define PROC_IA64 0x40 /* Intel IA64 processor */
107 108
108/* PROC_i960: */ 109/* PROC_i960: */
109#define PROC_960RX 0x01 /* Intel 80960RC/RD */ 110#define PROC_960RX 0x01 /* Intel 80960RC/RD */
diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c
index a0b6d414953d..59fbef08d690 100644
--- a/drivers/scsi/esp_scsi.c
+++ b/drivers/scsi/esp_scsi.c
@@ -2359,6 +2359,24 @@ void scsi_esp_unregister(struct esp *esp)
2359} 2359}
2360EXPORT_SYMBOL(scsi_esp_unregister); 2360EXPORT_SYMBOL(scsi_esp_unregister);
2361 2361
2362static int esp_target_alloc(struct scsi_target *starget)
2363{
2364 struct esp *esp = shost_priv(dev_to_shost(&starget->dev));
2365 struct esp_target_data *tp = &esp->target[starget->id];
2366
2367 tp->starget = starget;
2368
2369 return 0;
2370}
2371
2372static void esp_target_destroy(struct scsi_target *starget)
2373{
2374 struct esp *esp = shost_priv(dev_to_shost(&starget->dev));
2375 struct esp_target_data *tp = &esp->target[starget->id];
2376
2377 tp->starget = NULL;
2378}
2379
2362static int esp_slave_alloc(struct scsi_device *dev) 2380static int esp_slave_alloc(struct scsi_device *dev)
2363{ 2381{
2364 struct esp *esp = shost_priv(dev->host); 2382 struct esp *esp = shost_priv(dev->host);
@@ -2370,8 +2388,6 @@ static int esp_slave_alloc(struct scsi_device *dev)
2370 return -ENOMEM; 2388 return -ENOMEM;
2371 dev->hostdata = lp; 2389 dev->hostdata = lp;
2372 2390
2373 tp->starget = dev->sdev_target;
2374
2375 spi_min_period(tp->starget) = esp->min_period; 2391 spi_min_period(tp->starget) = esp->min_period;
2376 spi_max_offset(tp->starget) = 15; 2392 spi_max_offset(tp->starget) = 15;
2377 2393
@@ -2608,6 +2624,8 @@ struct scsi_host_template scsi_esp_template = {
2608 .name = "esp", 2624 .name = "esp",
2609 .info = esp_info, 2625 .info = esp_info,
2610 .queuecommand = esp_queuecommand, 2626 .queuecommand = esp_queuecommand,
2627 .target_alloc = esp_target_alloc,
2628 .target_destroy = esp_target_destroy,
2611 .slave_alloc = esp_slave_alloc, 2629 .slave_alloc = esp_slave_alloc,
2612 .slave_configure = esp_slave_configure, 2630 .slave_configure = esp_slave_configure,
2613 .slave_destroy = esp_slave_destroy, 2631 .slave_destroy = esp_slave_destroy,
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
index 3690360d7a79..c6457bfc8a49 100644
--- a/drivers/scsi/hosts.c
+++ b/drivers/scsi/hosts.c
@@ -456,6 +456,10 @@ static int __scsi_host_match(struct device *dev, void *data)
456 * 456 *
457 * Return value: 457 * Return value:
458 * A pointer to located Scsi_Host or NULL. 458 * A pointer to located Scsi_Host or NULL.
459 *
460 * The caller must do a scsi_host_put() to drop the reference
461 * that scsi_host_get() took. The put_device() below dropped
462 * the reference from class_find_device().
459 **/ 463 **/
460struct Scsi_Host *scsi_host_lookup(unsigned short hostnum) 464struct Scsi_Host *scsi_host_lookup(unsigned short hostnum)
461{ 465{
@@ -463,9 +467,10 @@ struct Scsi_Host *scsi_host_lookup(unsigned short hostnum)
463 struct Scsi_Host *shost = ERR_PTR(-ENXIO); 467 struct Scsi_Host *shost = ERR_PTR(-ENXIO);
464 468
465 cdev = class_find_device(&shost_class, &hostnum, __scsi_host_match); 469 cdev = class_find_device(&shost_class, &hostnum, __scsi_host_match);
466 if (cdev) 470 if (cdev) {
467 shost = scsi_host_get(class_to_shost(cdev)); 471 shost = scsi_host_get(class_to_shost(cdev));
468 472 put_device(cdev);
473 }
469 return shost; 474 return shost;
470} 475}
471EXPORT_SYMBOL(scsi_host_lookup); 476EXPORT_SYMBOL(scsi_host_lookup);
diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c
index aaa48e0c8ed0..da876d3924be 100644
--- a/drivers/scsi/hptiop.c
+++ b/drivers/scsi/hptiop.c
@@ -444,7 +444,7 @@ static void __iomem *hptiop_map_pci_bar(struct hptiop_hba *hba, int index)
444 if (!(pci_resource_flags(pcidev, index) & IORESOURCE_MEM)) { 444 if (!(pci_resource_flags(pcidev, index) & IORESOURCE_MEM)) {
445 printk(KERN_ERR "scsi%d: pci resource invalid\n", 445 printk(KERN_ERR "scsi%d: pci resource invalid\n",
446 hba->host->host_no); 446 hba->host->host_no);
447 return 0; 447 return NULL;
448 } 448 }
449 449
450 mem_base_phy = pci_resource_start(pcidev, index); 450 mem_base_phy = pci_resource_start(pcidev, index);
@@ -454,7 +454,7 @@ static void __iomem *hptiop_map_pci_bar(struct hptiop_hba *hba, int index)
454 if (!mem_base_virt) { 454 if (!mem_base_virt) {
455 printk(KERN_ERR "scsi%d: Fail to ioremap memory space\n", 455 printk(KERN_ERR "scsi%d: Fail to ioremap memory space\n",
456 hba->host->host_no); 456 hba->host->host_no);
457 return 0; 457 return NULL;
458 } 458 }
459 return mem_base_virt; 459 return mem_base_virt;
460} 460}
@@ -476,11 +476,11 @@ static void hptiop_unmap_pci_bar_itl(struct hptiop_hba *hba)
476static int hptiop_map_pci_bar_mv(struct hptiop_hba *hba) 476static int hptiop_map_pci_bar_mv(struct hptiop_hba *hba)
477{ 477{
478 hba->u.mv.regs = hptiop_map_pci_bar(hba, 0); 478 hba->u.mv.regs = hptiop_map_pci_bar(hba, 0);
479 if (hba->u.mv.regs == 0) 479 if (hba->u.mv.regs == NULL)
480 return -1; 480 return -1;
481 481
482 hba->u.mv.mu = hptiop_map_pci_bar(hba, 2); 482 hba->u.mv.mu = hptiop_map_pci_bar(hba, 2);
483 if (hba->u.mv.mu == 0) { 483 if (hba->u.mv.mu == NULL) {
484 iounmap(hba->u.mv.regs); 484 iounmap(hba->u.mv.regs);
485 return -1; 485 return -1;
486 } 486 }
@@ -1210,8 +1210,8 @@ static void hptiop_remove(struct pci_dev *pcidev)
1210 1210
1211static struct hptiop_adapter_ops hptiop_itl_ops = { 1211static struct hptiop_adapter_ops hptiop_itl_ops = {
1212 .iop_wait_ready = iop_wait_ready_itl, 1212 .iop_wait_ready = iop_wait_ready_itl,
1213 .internal_memalloc = 0, 1213 .internal_memalloc = NULL,
1214 .internal_memfree = 0, 1214 .internal_memfree = NULL,
1215 .map_pci_bar = hptiop_map_pci_bar_itl, 1215 .map_pci_bar = hptiop_map_pci_bar_itl,
1216 .unmap_pci_bar = hptiop_unmap_pci_bar_itl, 1216 .unmap_pci_bar = hptiop_unmap_pci_bar_itl,
1217 .enable_intr = hptiop_enable_intr_itl, 1217 .enable_intr = hptiop_enable_intr_itl,
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
index ccfd8aca3765..5d23368a1bce 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -1348,7 +1348,7 @@ void ibmvscsi_handle_crq(struct viosrp_crq *crq,
1348 1348
1349 del_timer(&evt_struct->timer); 1349 del_timer(&evt_struct->timer);
1350 1350
1351 if (crq->status != VIOSRP_OK && evt_struct->cmnd) 1351 if ((crq->status != VIOSRP_OK && crq->status != VIOSRP_OK2) && evt_struct->cmnd)
1352 evt_struct->cmnd->result = DID_ERROR << 16; 1352 evt_struct->cmnd->result = DID_ERROR << 16;
1353 if (evt_struct->done) 1353 if (evt_struct->done)
1354 evt_struct->done(evt_struct); 1354 evt_struct->done(evt_struct);
diff --git a/drivers/scsi/ibmvscsi/viosrp.h b/drivers/scsi/ibmvscsi/viosrp.h
index 4c4aadb3e405..204604501ad8 100644
--- a/drivers/scsi/ibmvscsi/viosrp.h
+++ b/drivers/scsi/ibmvscsi/viosrp.h
@@ -65,7 +65,8 @@ enum viosrp_crq_status {
65 VIOSRP_VIOLATES_MAX_XFER = 0x2, 65 VIOSRP_VIOLATES_MAX_XFER = 0x2,
66 VIOSRP_PARTNER_PANIC = 0x3, 66 VIOSRP_PARTNER_PANIC = 0x3,
67 VIOSRP_DEVICE_BUSY = 0x8, 67 VIOSRP_DEVICE_BUSY = 0x8,
68 VIOSRP_ADAPTER_FAIL = 0x10 68 VIOSRP_ADAPTER_FAIL = 0x10,
69 VIOSRP_OK2 = 0x99,
69}; 70};
70 71
71struct viosrp_crq { 72struct viosrp_crq {
diff --git a/drivers/scsi/mac_esp.c b/drivers/scsi/mac_esp.c
index cd37bd69a115..887682a24e36 100644
--- a/drivers/scsi/mac_esp.c
+++ b/drivers/scsi/mac_esp.c
@@ -650,7 +650,7 @@ static void __exit mac_esp_exit(void)
650 650
651MODULE_DESCRIPTION("Mac ESP SCSI driver"); 651MODULE_DESCRIPTION("Mac ESP SCSI driver");
652MODULE_AUTHOR("Finn Thain <fthain@telegraphics.com.au>"); 652MODULE_AUTHOR("Finn Thain <fthain@telegraphics.com.au>");
653MODULE_LICENSE("GPLv2"); 653MODULE_LICENSE("GPL v2");
654MODULE_VERSION(DRV_VERSION); 654MODULE_VERSION(DRV_VERSION);
655 655
656module_init(mac_esp_init); 656module_init(mac_esp_init);
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c
index 31f7aec44d90..243d8becd30f 100644
--- a/drivers/scsi/osst.c
+++ b/drivers/scsi/osst.c
@@ -5695,13 +5695,12 @@ static int osst_sysfs_add(dev_t dev, struct device *device, struct osst_tape * S
5695 struct device *osst_member; 5695 struct device *osst_member;
5696 int err; 5696 int err;
5697 5697
5698 osst_member = device_create(osst_sysfs_class, device, dev, "%s", name); 5698 osst_member = device_create_drvdata(osst_sysfs_class, device, dev, STp, "%s", name);
5699 if (IS_ERR(osst_member)) { 5699 if (IS_ERR(osst_member)) {
5700 printk(KERN_WARNING "osst :W: Unable to add sysfs class member %s\n", name); 5700 printk(KERN_WARNING "osst :W: Unable to add sysfs class member %s\n", name);
5701 return PTR_ERR(osst_member); 5701 return PTR_ERR(osst_member);
5702 } 5702 }
5703 5703
5704 dev_set_drvdata(osst_member, STp);
5705 err = device_create_file(osst_member, &dev_attr_ADR_rev); 5704 err = device_create_file(osst_member, &dev_attr_ADR_rev);
5706 if (err) 5705 if (err)
5707 goto err_out; 5706 goto err_out;
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
index 51e2f299dbbb..3754ab87f89a 100644
--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -2811,7 +2811,7 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)
2811 2811
2812 /* Check for room in outstanding command list. */ 2812 /* Check for room in outstanding command list. */
2813 for (cnt = 0; cnt < MAX_OUTSTANDING_COMMANDS && 2813 for (cnt = 0; cnt < MAX_OUTSTANDING_COMMANDS &&
2814 ha->outstanding_cmds[cnt] != 0; cnt++); 2814 ha->outstanding_cmds[cnt] != NULL; cnt++);
2815 2815
2816 if (cnt >= MAX_OUTSTANDING_COMMANDS) { 2816 if (cnt >= MAX_OUTSTANDING_COMMANDS) {
2817 status = 1; 2817 status = 1;
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 287690853caf..8dd88fc1244a 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -70,6 +70,9 @@ qla2x00_sysfs_write_fw_dump(struct kobject *kobj,
70 case 2: 70 case 2:
71 qla2x00_alloc_fw_dump(ha); 71 qla2x00_alloc_fw_dump(ha);
72 break; 72 break;
73 case 3:
74 qla2x00_system_error(ha);
75 break;
73 } 76 }
74 return (count); 77 return (count);
75} 78}
@@ -886,9 +889,13 @@ qla2x00_get_host_speed(struct Scsi_Host *shost)
886static void 889static void
887qla2x00_get_host_port_type(struct Scsi_Host *shost) 890qla2x00_get_host_port_type(struct Scsi_Host *shost)
888{ 891{
889 scsi_qla_host_t *ha = to_qla_parent(shost_priv(shost)); 892 scsi_qla_host_t *ha = shost_priv(shost);
890 uint32_t port_type = FC_PORTTYPE_UNKNOWN; 893 uint32_t port_type = FC_PORTTYPE_UNKNOWN;
891 894
895 if (ha->parent) {
896 fc_host_port_type(shost) = FC_PORTTYPE_NPIV;
897 return;
898 }
892 switch (ha->current_topology) { 899 switch (ha->current_topology) {
893 case ISP_CFG_NL: 900 case ISP_CFG_NL:
894 port_type = FC_PORTTYPE_LPORT; 901 port_type = FC_PORTTYPE_LPORT;
@@ -1172,10 +1179,10 @@ qla24xx_vport_delete(struct fc_vport *fc_vport)
1172 qla24xx_disable_vp(vha); 1179 qla24xx_disable_vp(vha);
1173 qla24xx_deallocate_vp_id(vha); 1180 qla24xx_deallocate_vp_id(vha);
1174 1181
1175 down(&ha->vport_sem); 1182 mutex_lock(&ha->vport_lock);
1176 ha->cur_vport_count--; 1183 ha->cur_vport_count--;
1177 clear_bit(vha->vp_idx, ha->vp_idx_map); 1184 clear_bit(vha->vp_idx, ha->vp_idx_map);
1178 up(&ha->vport_sem); 1185 mutex_unlock(&ha->vport_lock);
1179 1186
1180 kfree(vha->node_name); 1187 kfree(vha->node_name);
1181 kfree(vha->port_name); 1188 kfree(vha->port_name);
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index 299eccf6cabd..8dd600013bd1 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -2457,7 +2457,7 @@ typedef struct scsi_qla_host {
2457#define MBX_INTR_WAIT 2 2457#define MBX_INTR_WAIT 2
2458#define MBX_UPDATE_FLASH_ACTIVE 3 2458#define MBX_UPDATE_FLASH_ACTIVE 3
2459 2459
2460 struct semaphore vport_sem; /* Virtual port synchronization */ 2460 struct mutex vport_lock; /* Virtual port synchronization */
2461 struct completion mbx_cmd_comp; /* Serialize mbx access */ 2461 struct completion mbx_cmd_comp; /* Serialize mbx access */
2462 struct completion mbx_intr_comp; /* Used for completion notification */ 2462 struct completion mbx_intr_comp; /* Used for completion notification */
2463 2463
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h
index f8827068d30f..9b4bebee6879 100644
--- a/drivers/scsi/qla2xxx/qla_gbl.h
+++ b/drivers/scsi/qla2xxx/qla_gbl.h
@@ -228,6 +228,9 @@ extern int qla24xx_abort_target(struct fc_port *, unsigned int);
228extern int qla24xx_lun_reset(struct fc_port *, unsigned int); 228extern int qla24xx_lun_reset(struct fc_port *, unsigned int);
229 229
230extern int 230extern int
231qla2x00_system_error(scsi_qla_host_t *);
232
233extern int
231qla2x00_set_serdes_params(scsi_qla_host_t *, uint16_t, uint16_t, uint16_t); 234qla2x00_set_serdes_params(scsi_qla_host_t *, uint16_t, uint16_t, uint16_t);
232 235
233extern int 236extern int
diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h
index e9bae27737d1..92fafbdbbaab 100644
--- a/drivers/scsi/qla2xxx/qla_inline.h
+++ b/drivers/scsi/qla2xxx/qla_inline.h
@@ -34,7 +34,11 @@ qla2x00_debounce_register(volatile uint16_t __iomem *addr)
34static inline void 34static inline void
35qla2x00_poll(scsi_qla_host_t *ha) 35qla2x00_poll(scsi_qla_host_t *ha)
36{ 36{
37 unsigned long flags;
38
39 local_irq_save(flags);
37 ha->isp_ops->intr_handler(0, ha); 40 ha->isp_ops->intr_handler(0, ha);
41 local_irq_restore(flags);
38} 42}
39 43
40static __inline__ scsi_qla_host_t * 44static __inline__ scsi_qla_host_t *
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 5d9a64a7879b..ec63b79f900a 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -272,8 +272,6 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb)
272 uint32_t rscn_entry, host_pid; 272 uint32_t rscn_entry, host_pid;
273 uint8_t rscn_queue_index; 273 uint8_t rscn_queue_index;
274 unsigned long flags; 274 unsigned long flags;
275 scsi_qla_host_t *vha;
276 int i;
277 275
278 /* Setup to process RIO completion. */ 276 /* Setup to process RIO completion. */
279 handle_cnt = 0; 277 handle_cnt = 0;
@@ -544,18 +542,10 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb)
544 break; 542 break;
545 543
546 case MBA_PORT_UPDATE: /* Port database update */ 544 case MBA_PORT_UPDATE: /* Port database update */
547 if ((ha->flags.npiv_supported) && (ha->num_vhosts)) { 545 /* Only handle SCNs for our Vport index. */
548 for_each_mapped_vp_idx(ha, i) { 546 if (ha->parent && ha->vp_idx != (mb[3] & 0xff))
549 list_for_each_entry(vha, &ha->vp_list, 547 break;
550 vp_list) { 548
551 if ((mb[3] & 0xff)
552 == vha->vp_idx) {
553 ha = vha;
554 break;
555 }
556 }
557 }
558 }
559 /* 549 /*
560 * If PORT UPDATE is global (recieved LIP_OCCURED/LIP_RESET 550 * If PORT UPDATE is global (recieved LIP_OCCURED/LIP_RESET
561 * event etc. earlier indicating loop is down) then process 551 * event etc. earlier indicating loop is down) then process
@@ -590,18 +580,12 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb)
590 break; 580 break;
591 581
592 case MBA_RSCN_UPDATE: /* State Change Registration */ 582 case MBA_RSCN_UPDATE: /* State Change Registration */
593 if ((ha->flags.npiv_supported) && (ha->num_vhosts)) { 583 /* Check if the Vport has issued a SCR */
594 for_each_mapped_vp_idx(ha, i) { 584 if (ha->parent && test_bit(VP_SCR_NEEDED, &ha->vp_flags))
595 list_for_each_entry(vha, &ha->vp_list, 585 break;
596 vp_list) { 586 /* Only handle SCNs for our Vport index. */
597 if ((mb[3] & 0xff) 587 if (ha->parent && ha->vp_idx != (mb[3] & 0xff))
598 == vha->vp_idx) { 588 break;
599 ha = vha;
600 break;
601 }
602 }
603 }
604 }
605 589
606 DEBUG2(printk("scsi(%ld): Asynchronous RSCR UPDATE.\n", 590 DEBUG2(printk("scsi(%ld): Asynchronous RSCR UPDATE.\n",
607 ha->host_no)); 591 ha->host_no));
@@ -1132,25 +1116,6 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt)
1132 break; 1116 break;
1133 1117
1134 qla2x00_handle_sense(sp, sense_data, sense_len); 1118 qla2x00_handle_sense(sp, sense_data, sense_len);
1135
1136 /*
1137 * In case of a Underrun condition, set both the lscsi
1138 * status and the completion status to appropriate
1139 * values.
1140 */
1141 if (resid &&
1142 ((unsigned)(scsi_bufflen(cp) - resid) <
1143 cp->underflow)) {
1144 DEBUG2(qla_printk(KERN_INFO, ha,
1145 "scsi(%ld:%d:%d:%d): Mid-layer underflow "
1146 "detected (%x of %x bytes)...returning "
1147 "error status.\n", ha->host_no,
1148 cp->device->channel, cp->device->id,
1149 cp->device->lun, resid,
1150 scsi_bufflen(cp)));
1151
1152 cp->result = DID_ERROR << 16 | lscsi_status;
1153 }
1154 } else { 1119 } else {
1155 /* 1120 /*
1156 * If RISC reports underrun and target does not report 1121 * If RISC reports underrun and target does not report
@@ -1639,12 +1604,12 @@ qla24xx_msix_rsp_q(int irq, void *dev_id)
1639 ha = dev_id; 1604 ha = dev_id;
1640 reg = &ha->iobase->isp24; 1605 reg = &ha->iobase->isp24;
1641 1606
1642 spin_lock(&ha->hardware_lock); 1607 spin_lock_irq(&ha->hardware_lock);
1643 1608
1644 qla24xx_process_response_queue(ha); 1609 qla24xx_process_response_queue(ha);
1645 WRT_REG_DWORD(&reg->hccr, HCCRX_CLR_RISC_INT); 1610 WRT_REG_DWORD(&reg->hccr, HCCRX_CLR_RISC_INT);
1646 1611
1647 spin_unlock(&ha->hardware_lock); 1612 spin_unlock_irq(&ha->hardware_lock);
1648 1613
1649 return IRQ_HANDLED; 1614 return IRQ_HANDLED;
1650} 1615}
@@ -1663,7 +1628,7 @@ qla24xx_msix_default(int irq, void *dev_id)
1663 reg = &ha->iobase->isp24; 1628 reg = &ha->iobase->isp24;
1664 status = 0; 1629 status = 0;
1665 1630
1666 spin_lock(&ha->hardware_lock); 1631 spin_lock_irq(&ha->hardware_lock);
1667 do { 1632 do {
1668 stat = RD_REG_DWORD(&reg->host_status); 1633 stat = RD_REG_DWORD(&reg->host_status);
1669 if (stat & HSRX_RISC_PAUSED) { 1634 if (stat & HSRX_RISC_PAUSED) {
@@ -1716,7 +1681,7 @@ qla24xx_msix_default(int irq, void *dev_id)
1716 } 1681 }
1717 WRT_REG_DWORD(&reg->hccr, HCCRX_CLR_RISC_INT); 1682 WRT_REG_DWORD(&reg->hccr, HCCRX_CLR_RISC_INT);
1718 } while (0); 1683 } while (0);
1719 spin_unlock(&ha->hardware_lock); 1684 spin_unlock_irq(&ha->hardware_lock);
1720 1685
1721 if (test_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags) && 1686 if (test_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags) &&
1722 (status & MBX_INTERRUPT) && ha->flags.mbox_int) { 1687 (status & MBX_INTERRUPT) && ha->flags.mbox_int) {
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index 210060420809..250d2f604397 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -2303,8 +2303,6 @@ qla24xx_lun_reset(struct fc_port *fcport, unsigned int l)
2303 return __qla24xx_issue_tmf("Lun", TCF_LUN_RESET, fcport, l); 2303 return __qla24xx_issue_tmf("Lun", TCF_LUN_RESET, fcport, l);
2304} 2304}
2305 2305
2306#if 0
2307
2308int 2306int
2309qla2x00_system_error(scsi_qla_host_t *ha) 2307qla2x00_system_error(scsi_qla_host_t *ha)
2310{ 2308{
@@ -2312,7 +2310,7 @@ qla2x00_system_error(scsi_qla_host_t *ha)
2312 mbx_cmd_t mc; 2310 mbx_cmd_t mc;
2313 mbx_cmd_t *mcp = &mc; 2311 mbx_cmd_t *mcp = &mc;
2314 2312
2315 if (!IS_FWI2_CAPABLE(ha)) 2313 if (!IS_QLA23XX(ha) && !IS_FWI2_CAPABLE(ha))
2316 return QLA_FUNCTION_FAILED; 2314 return QLA_FUNCTION_FAILED;
2317 2315
2318 DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); 2316 DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no));
@@ -2334,8 +2332,6 @@ qla2x00_system_error(scsi_qla_host_t *ha)
2334 return rval; 2332 return rval;
2335} 2333}
2336 2334
2337#endif /* 0 */
2338
2339/** 2335/**
2340 * qla2x00_set_serdes_params() - 2336 * qla2x00_set_serdes_params() -
2341 * @ha: HA context 2337 * @ha: HA context
@@ -2508,7 +2504,7 @@ qla2x00_enable_fce_trace(scsi_qla_host_t *ha, dma_addr_t fce_dma,
2508 if (mb) 2504 if (mb)
2509 memcpy(mb, mcp->mb, 8 * sizeof(*mb)); 2505 memcpy(mb, mcp->mb, 8 * sizeof(*mb));
2510 if (dwords) 2506 if (dwords)
2511 *dwords = mcp->mb[6]; 2507 *dwords = buffers;
2512 } 2508 }
2513 2509
2514 return rval; 2510 return rval;
@@ -2807,9 +2803,9 @@ qla24xx_control_vp(scsi_qla_host_t *vha, int cmd)
2807 */ 2803 */
2808 map = (vp_index - 1) / 8; 2804 map = (vp_index - 1) / 8;
2809 pos = (vp_index - 1) & 7; 2805 pos = (vp_index - 1) & 7;
2810 down(&ha->vport_sem); 2806 mutex_lock(&ha->vport_lock);
2811 vce->vp_idx_map[map] |= 1 << pos; 2807 vce->vp_idx_map[map] |= 1 << pos;
2812 up(&ha->vport_sem); 2808 mutex_unlock(&ha->vport_lock);
2813 2809
2814 rval = qla2x00_issue_iocb(ha, vce, vce_dma, 0); 2810 rval = qla2x00_issue_iocb(ha, vce, vce_dma, 0);
2815 if (rval != QLA_SUCCESS) { 2811 if (rval != QLA_SUCCESS) {
diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c
index f2b04979e5f0..62a3ad6e8ecb 100644
--- a/drivers/scsi/qla2xxx/qla_mid.c
+++ b/drivers/scsi/qla2xxx/qla_mid.c
@@ -32,12 +32,12 @@ qla24xx_allocate_vp_id(scsi_qla_host_t *vha)
32 scsi_qla_host_t *ha = vha->parent; 32 scsi_qla_host_t *ha = vha->parent;
33 33
34 /* Find an empty slot and assign an vp_id */ 34 /* Find an empty slot and assign an vp_id */
35 down(&ha->vport_sem); 35 mutex_lock(&ha->vport_lock);
36 vp_id = find_first_zero_bit(ha->vp_idx_map, ha->max_npiv_vports + 1); 36 vp_id = find_first_zero_bit(ha->vp_idx_map, ha->max_npiv_vports + 1);
37 if (vp_id > ha->max_npiv_vports) { 37 if (vp_id > ha->max_npiv_vports) {
38 DEBUG15(printk ("vp_id %d is bigger than max-supported %d.\n", 38 DEBUG15(printk ("vp_id %d is bigger than max-supported %d.\n",
39 vp_id, ha->max_npiv_vports)); 39 vp_id, ha->max_npiv_vports));
40 up(&ha->vport_sem); 40 mutex_unlock(&ha->vport_lock);
41 return vp_id; 41 return vp_id;
42 } 42 }
43 43
@@ -45,7 +45,7 @@ qla24xx_allocate_vp_id(scsi_qla_host_t *vha)
45 ha->num_vhosts++; 45 ha->num_vhosts++;
46 vha->vp_idx = vp_id; 46 vha->vp_idx = vp_id;
47 list_add_tail(&vha->vp_list, &ha->vp_list); 47 list_add_tail(&vha->vp_list, &ha->vp_list);
48 up(&ha->vport_sem); 48 mutex_unlock(&ha->vport_lock);
49 return vp_id; 49 return vp_id;
50} 50}
51 51
@@ -55,12 +55,12 @@ qla24xx_deallocate_vp_id(scsi_qla_host_t *vha)
55 uint16_t vp_id; 55 uint16_t vp_id;
56 scsi_qla_host_t *ha = vha->parent; 56 scsi_qla_host_t *ha = vha->parent;
57 57
58 down(&ha->vport_sem); 58 mutex_lock(&ha->vport_lock);
59 vp_id = vha->vp_idx; 59 vp_id = vha->vp_idx;
60 ha->num_vhosts--; 60 ha->num_vhosts--;
61 clear_bit(vp_id, ha->vp_idx_map); 61 clear_bit(vp_id, ha->vp_idx_map);
62 list_del(&vha->vp_list); 62 list_del(&vha->vp_list);
63 up(&ha->vport_sem); 63 mutex_unlock(&ha->vport_lock);
64} 64}
65 65
66static scsi_qla_host_t * 66static scsi_qla_host_t *
@@ -145,9 +145,9 @@ qla24xx_enable_vp(scsi_qla_host_t *vha)
145 } 145 }
146 146
147 /* Initialize the new vport unless it is a persistent port */ 147 /* Initialize the new vport unless it is a persistent port */
148 down(&ha->vport_sem); 148 mutex_lock(&ha->vport_lock);
149 ret = qla24xx_modify_vp_config(vha); 149 ret = qla24xx_modify_vp_config(vha);
150 up(&ha->vport_sem); 150 mutex_unlock(&ha->vport_lock);
151 151
152 if (ret != QLA_SUCCESS) { 152 if (ret != QLA_SUCCESS) {
153 fc_vport_set_state(vha->fc_vport, FC_VPORT_FAILED); 153 fc_vport_set_state(vha->fc_vport, FC_VPORT_FAILED);
@@ -406,6 +406,7 @@ qla24xx_create_vhost(struct fc_vport *fc_vport)
406 INIT_LIST_HEAD(&vha->list); 406 INIT_LIST_HEAD(&vha->list);
407 INIT_LIST_HEAD(&vha->fcports); 407 INIT_LIST_HEAD(&vha->fcports);
408 INIT_LIST_HEAD(&vha->vp_fcports); 408 INIT_LIST_HEAD(&vha->vp_fcports);
409 INIT_LIST_HEAD(&vha->work_list);
409 410
410 vha->dpc_flags = 0L; 411 vha->dpc_flags = 0L;
411 set_bit(REGISTER_FDMI_NEEDED, &vha->dpc_flags); 412 set_bit(REGISTER_FDMI_NEEDED, &vha->dpc_flags);
@@ -437,10 +438,10 @@ qla24xx_create_vhost(struct fc_vport *fc_vport)
437 vha->flags.init_done = 1; 438 vha->flags.init_done = 1;
438 num_hosts++; 439 num_hosts++;
439 440
440 down(&ha->vport_sem); 441 mutex_lock(&ha->vport_lock);
441 set_bit(vha->vp_idx, ha->vp_idx_map); 442 set_bit(vha->vp_idx, ha->vp_idx_map);
442 ha->cur_vport_count++; 443 ha->cur_vport_count++;
443 up(&ha->vport_sem); 444 mutex_unlock(&ha->vport_lock);
444 445
445 return vha; 446 return vha;
446 447
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 3223fd16bcfe..48eaa3bb5433 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -10,6 +10,7 @@
10#include <linux/vmalloc.h> 10#include <linux/vmalloc.h>
11#include <linux/delay.h> 11#include <linux/delay.h>
12#include <linux/kthread.h> 12#include <linux/kthread.h>
13#include <linux/mutex.h>
13 14
14#include <scsi/scsi_tcq.h> 15#include <scsi/scsi_tcq.h>
15#include <scsi/scsicam.h> 16#include <scsi/scsicam.h>
@@ -1631,7 +1632,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
1631 /* load the F/W, read paramaters, and init the H/W */ 1632 /* load the F/W, read paramaters, and init the H/W */
1632 ha->instance = num_hosts; 1633 ha->instance = num_hosts;
1633 1634
1634 init_MUTEX(&ha->vport_sem); 1635 mutex_init(&ha->vport_lock);
1635 init_completion(&ha->mbx_cmd_comp); 1636 init_completion(&ha->mbx_cmd_comp);
1636 complete(&ha->mbx_cmd_comp); 1637 complete(&ha->mbx_cmd_comp);
1637 init_completion(&ha->mbx_intr_comp); 1638 init_completion(&ha->mbx_intr_comp);
@@ -2156,13 +2157,14 @@ static int
2156qla2x00_post_work(struct scsi_qla_host *ha, struct qla_work_evt *e, int locked) 2157qla2x00_post_work(struct scsi_qla_host *ha, struct qla_work_evt *e, int locked)
2157{ 2158{
2158 unsigned long flags; 2159 unsigned long flags;
2160 scsi_qla_host_t *pha = to_qla_parent(ha);
2159 2161
2160 if (!locked) 2162 if (!locked)
2161 spin_lock_irqsave(&ha->hardware_lock, flags); 2163 spin_lock_irqsave(&pha->hardware_lock, flags);
2162 list_add_tail(&e->list, &ha->work_list); 2164 list_add_tail(&e->list, &ha->work_list);
2163 qla2xxx_wake_dpc(ha); 2165 qla2xxx_wake_dpc(ha);
2164 if (!locked) 2166 if (!locked)
2165 spin_unlock_irqrestore(&ha->hardware_lock, flags); 2167 spin_unlock_irqrestore(&pha->hardware_lock, flags);
2166 return QLA_SUCCESS; 2168 return QLA_SUCCESS;
2167} 2169}
2168 2170
@@ -2202,12 +2204,13 @@ static void
2202qla2x00_do_work(struct scsi_qla_host *ha) 2204qla2x00_do_work(struct scsi_qla_host *ha)
2203{ 2205{
2204 struct qla_work_evt *e; 2206 struct qla_work_evt *e;
2207 scsi_qla_host_t *pha = to_qla_parent(ha);
2205 2208
2206 spin_lock_irq(&ha->hardware_lock); 2209 spin_lock_irq(&pha->hardware_lock);
2207 while (!list_empty(&ha->work_list)) { 2210 while (!list_empty(&ha->work_list)) {
2208 e = list_entry(ha->work_list.next, struct qla_work_evt, list); 2211 e = list_entry(ha->work_list.next, struct qla_work_evt, list);
2209 list_del_init(&e->list); 2212 list_del_init(&e->list);
2210 spin_unlock_irq(&ha->hardware_lock); 2213 spin_unlock_irq(&pha->hardware_lock);
2211 2214
2212 switch (e->type) { 2215 switch (e->type) {
2213 case QLA_EVT_AEN: 2216 case QLA_EVT_AEN:
@@ -2221,9 +2224,9 @@ qla2x00_do_work(struct scsi_qla_host *ha)
2221 } 2224 }
2222 if (e->flags & QLA_EVT_FLAG_FREE) 2225 if (e->flags & QLA_EVT_FLAG_FREE)
2223 kfree(e); 2226 kfree(e);
2224 spin_lock_irq(&ha->hardware_lock); 2227 spin_lock_irq(&pha->hardware_lock);
2225 } 2228 }
2226 spin_unlock_irq(&ha->hardware_lock); 2229 spin_unlock_irq(&pha->hardware_lock);
2227} 2230}
2228 2231
2229/************************************************************************** 2232/**************************************************************************
@@ -2634,7 +2637,7 @@ qla2x00_timer(scsi_qla_host_t *ha)
2634#define FW_FILE_ISP24XX "ql2400_fw.bin" 2637#define FW_FILE_ISP24XX "ql2400_fw.bin"
2635#define FW_FILE_ISP25XX "ql2500_fw.bin" 2638#define FW_FILE_ISP25XX "ql2500_fw.bin"
2636 2639
2637static DECLARE_MUTEX(qla_fw_lock); 2640static DEFINE_MUTEX(qla_fw_lock);
2638 2641
2639static struct fw_blob qla_fw_blobs[FW_BLOBS] = { 2642static struct fw_blob qla_fw_blobs[FW_BLOBS] = {
2640 { .name = FW_FILE_ISP21XX, .segs = { 0x1000, 0 }, }, 2643 { .name = FW_FILE_ISP21XX, .segs = { 0x1000, 0 }, },
@@ -2665,7 +2668,7 @@ qla2x00_request_firmware(scsi_qla_host_t *ha)
2665 blob = &qla_fw_blobs[FW_ISP25XX]; 2668 blob = &qla_fw_blobs[FW_ISP25XX];
2666 } 2669 }
2667 2670
2668 down(&qla_fw_lock); 2671 mutex_lock(&qla_fw_lock);
2669 if (blob->fw) 2672 if (blob->fw)
2670 goto out; 2673 goto out;
2671 2674
@@ -2678,7 +2681,7 @@ qla2x00_request_firmware(scsi_qla_host_t *ha)
2678 } 2681 }
2679 2682
2680out: 2683out:
2681 up(&qla_fw_lock); 2684 mutex_unlock(&qla_fw_lock);
2682 return blob; 2685 return blob;
2683} 2686}
2684 2687
@@ -2687,11 +2690,11 @@ qla2x00_release_firmware(void)
2687{ 2690{
2688 int idx; 2691 int idx;
2689 2692
2690 down(&qla_fw_lock); 2693 mutex_lock(&qla_fw_lock);
2691 for (idx = 0; idx < FW_BLOBS; idx++) 2694 for (idx = 0; idx < FW_BLOBS; idx++)
2692 if (qla_fw_blobs[idx].fw) 2695 if (qla_fw_blobs[idx].fw)
2693 release_firmware(qla_fw_blobs[idx].fw); 2696 release_firmware(qla_fw_blobs[idx].fw);
2694 up(&qla_fw_lock); 2697 mutex_unlock(&qla_fw_lock);
2695} 2698}
2696 2699
2697static pci_ers_result_t 2700static pci_ers_result_t
@@ -2864,7 +2867,8 @@ qla2x00_module_init(void)
2864 return -ENODEV; 2867 return -ENODEV;
2865 } 2868 }
2866 2869
2867 printk(KERN_INFO "QLogic Fibre Channel HBA Driver\n"); 2870 printk(KERN_INFO "QLogic Fibre Channel HBA Driver: %s\n",
2871 qla2x00_version_str);
2868 ret = pci_register_driver(&qla2xxx_pci_driver); 2872 ret = pci_register_driver(&qla2xxx_pci_driver);
2869 if (ret) { 2873 if (ret) {
2870 kmem_cache_destroy(srb_cachep); 2874 kmem_cache_destroy(srb_cachep);
diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h
index afeae2bfe7eb..d058c8862b35 100644
--- a/drivers/scsi/qla2xxx/qla_version.h
+++ b/drivers/scsi/qla2xxx/qla_version.h
@@ -7,7 +7,7 @@
7/* 7/*
8 * Driver version 8 * Driver version
9 */ 9 */
10#define QLA2XXX_VERSION "8.02.01-k2" 10#define QLA2XXX_VERSION "8.02.01-k4"
11 11
12#define QLA_DRIVER_MAJOR_VER 8 12#define QLA_DRIVER_MAJOR_VER 8
13#define QLA_DRIVER_MINOR_VER 2 13#define QLA_DRIVER_MINOR_VER 2
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 049103f1d16f..93d2b6714453 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -359,7 +359,12 @@ static int scsi_bus_match(struct device *dev, struct device_driver *gendrv)
359 359
360static int scsi_bus_uevent(struct device *dev, struct kobj_uevent_env *env) 360static int scsi_bus_uevent(struct device *dev, struct kobj_uevent_env *env)
361{ 361{
362 struct scsi_device *sdev = to_scsi_device(dev); 362 struct scsi_device *sdev;
363
364 if (dev->type != &scsi_dev_type)
365 return 0;
366
367 sdev = to_scsi_device(dev);
363 368
364 add_uevent_var(env, "MODALIAS=" SCSI_DEVICE_MODALIAS_FMT, sdev->type); 369 add_uevent_var(env, "MODALIAS=" SCSI_DEVICE_MODALIAS_FMT, sdev->type);
365 return 0; 370 return 0;
diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c
index 45df83b9d847..0fe031f003e7 100644
--- a/drivers/scsi/ses.c
+++ b/drivers/scsi/ses.c
@@ -61,7 +61,7 @@ static int ses_probe(struct device *dev)
61 return err; 61 return err;
62} 62}
63 63
64#define SES_TIMEOUT 30 64#define SES_TIMEOUT (30 * HZ)
65#define SES_RETRIES 3 65#define SES_RETRIES 3
66 66
67static int ses_recv_diag(struct scsi_device *sdev, int page_code, 67static int ses_recv_diag(struct scsi_device *sdev, int page_code,
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index c9d7f721b9e2..ea0edd1b2e76 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -1441,17 +1441,18 @@ sg_add(struct device *cl_dev, struct class_interface *cl_intf)
1441 if (sg_sysfs_valid) { 1441 if (sg_sysfs_valid) {
1442 struct device *sg_class_member; 1442 struct device *sg_class_member;
1443 1443
1444 sg_class_member = device_create(sg_sysfs_class, cl_dev->parent, 1444 sg_class_member = device_create_drvdata(sg_sysfs_class,
1445 MKDEV(SCSI_GENERIC_MAJOR, 1445 cl_dev->parent,
1446 sdp->index), 1446 MKDEV(SCSI_GENERIC_MAJOR,
1447 "%s", disk->disk_name); 1447 sdp->index),
1448 sdp,
1449 "%s", disk->disk_name);
1448 if (IS_ERR(sg_class_member)) { 1450 if (IS_ERR(sg_class_member)) {
1449 printk(KERN_ERR "sg_add: " 1451 printk(KERN_ERR "sg_add: "
1450 "device_create failed\n"); 1452 "device_create failed\n");
1451 error = PTR_ERR(sg_class_member); 1453 error = PTR_ERR(sg_class_member);
1452 goto cdev_add_err; 1454 goto cdev_add_err;
1453 } 1455 }
1454 dev_set_drvdata(sg_class_member, sdp);
1455 error = sysfs_create_link(&scsidp->sdev_gendev.kobj, 1456 error = sysfs_create_link(&scsidp->sdev_gendev.kobj,
1456 &sg_class_member->kobj, "generic"); 1457 &sg_class_member->kobj, "generic");
1457 if (error) 1458 if (error)
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c
index 7ee86d4a7618..c82df8bd4d89 100644
--- a/drivers/scsi/sr.c
+++ b/drivers/scsi/sr.c
@@ -178,6 +178,9 @@ int sr_test_unit_ready(struct scsi_device *sdev, struct scsi_sense_hdr *sshdr)
178 the_result = scsi_execute_req(sdev, cmd, DMA_NONE, NULL, 178 the_result = scsi_execute_req(sdev, cmd, DMA_NONE, NULL,
179 0, sshdr, SR_TIMEOUT, 179 0, sshdr, SR_TIMEOUT,
180 retries--); 180 retries--);
181 if (scsi_sense_valid(sshdr) &&
182 sshdr->sense_key == UNIT_ATTENTION)
183 sdev->changed = 1;
181 184
182 } while (retries > 0 && 185 } while (retries > 0 &&
183 (!scsi_status_is_good(the_result) || 186 (!scsi_status_is_good(the_result) ||
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index e8db66ad0bde..6e5a5bb31311 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -4424,17 +4424,19 @@ static int do_create_class_files(struct scsi_tape *STp, int dev_num, int mode)
4424 snprintf(name, 10, "%s%s%s", rew ? "n" : "", 4424 snprintf(name, 10, "%s%s%s", rew ? "n" : "",
4425 STp->disk->disk_name, st_formats[i]); 4425 STp->disk->disk_name, st_formats[i]);
4426 st_class_member = 4426 st_class_member =
4427 device_create(st_sysfs_class, &STp->device->sdev_gendev, 4427 device_create_drvdata(st_sysfs_class,
4428 MKDEV(SCSI_TAPE_MAJOR, 4428 &STp->device->sdev_gendev,
4429 TAPE_MINOR(dev_num, mode, rew)), 4429 MKDEV(SCSI_TAPE_MAJOR,
4430 "%s", name); 4430 TAPE_MINOR(dev_num,
4431 mode, rew)),
4432 &STp->modes[mode],
4433 "%s", name);
4431 if (IS_ERR(st_class_member)) { 4434 if (IS_ERR(st_class_member)) {
4432 printk(KERN_WARNING "st%d: device_create failed\n", 4435 printk(KERN_WARNING "st%d: device_create failed\n",
4433 dev_num); 4436 dev_num);
4434 error = PTR_ERR(st_class_member); 4437 error = PTR_ERR(st_class_member);
4435 goto out; 4438 goto out;
4436 } 4439 }
4437 dev_set_drvdata(st_class_member, &STp->modes[mode]);
4438 4440
4439 error = device_create_file(st_class_member, 4441 error = device_create_file(st_class_member,
4440 &dev_attr_defined); 4442 &dev_attr_defined);
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 1400ea6a2491..1bc00b721e9d 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -43,7 +43,6 @@
43 43
44#include <asm/io.h> 44#include <asm/io.h>
45#include <asm/irq.h> 45#include <asm/irq.h>
46#include <asm/serial.h>
47 46
48#include "8250.h" 47#include "8250.h"
49 48
@@ -93,6 +92,7 @@ static unsigned int nr_uarts = CONFIG_SERIAL_8250_RUNTIME_UARTS;
93 */ 92 */
94#define CONFIG_HUB6 1 93#define CONFIG_HUB6 1
95 94
95#include <asm/serial.h>
96/* 96/*
97 * SERIAL_PORT_DFNS tells us about built-in ports that have no 97 * SERIAL_PORT_DFNS tells us about built-in ports that have no
98 * standard enumeration mechanism. Platforms that can find all 98 * standard enumeration mechanism. Platforms that can find all
@@ -1547,8 +1547,6 @@ static int serial_link_irq_chain(struct uart_8250_port *up)
1547 i->head = &up->list; 1547 i->head = &up->list;
1548 spin_unlock_irq(&i->lock); 1548 spin_unlock_irq(&i->lock);
1549 1549
1550 irq_flags |= SERIAL_EXTRA_IRQ_FLAGS;
1551
1552 ret = request_irq(up->port.irq, serial8250_interrupt, 1550 ret = request_irq(up->port.irq, serial8250_interrupt,
1553 irq_flags, "serial", i); 1551 irq_flags, "serial", i);
1554 if (ret < 0) 1552 if (ret < 0)
diff --git a/drivers/serial/8250.h b/drivers/serial/8250.h
index a10a40cc0d9e..91bd28f2bb47 100644
--- a/drivers/serial/8250.h
+++ b/drivers/serial/8250.h
@@ -78,8 +78,3 @@ struct serial8250_config {
78#else 78#else
79#define ALPHA_KLUDGE_MCR 0 79#define ALPHA_KLUDGE_MCR 0
80#endif 80#endif
81
82#ifndef SERIAL_EXTRA_IRQ_FLAGS
83#define SERIAL_EXTRA_IRQ_FLAGS 0
84#endif
85
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c
index 53fa19cf2f06..788c3559522d 100644
--- a/drivers/serial/8250_pci.c
+++ b/drivers/serial/8250_pci.c
@@ -2602,7 +2602,12 @@ static struct pci_device_id serial_pci_tbl[] = {
2602 { PCI_VENDOR_ID_INTASHIELD, PCI_DEVICE_ID_INTASHIELD_IS200, 2602 { PCI_VENDOR_ID_INTASHIELD, PCI_DEVICE_ID_INTASHIELD_IS200,
2603 PCI_ANY_ID, PCI_ANY_ID, 0, 0, /* 135a.0811 */ 2603 PCI_ANY_ID, PCI_ANY_ID, 0, 0, /* 135a.0811 */
2604 pbn_b2_2_115200 }, 2604 pbn_b2_2_115200 },
2605 2605 /*
2606 * IntaShield IS-400
2607 */
2608 { PCI_VENDOR_ID_INTASHIELD, PCI_DEVICE_ID_INTASHIELD_IS400,
2609 PCI_ANY_ID, PCI_ANY_ID, 0, 0, /* 135a.0dc0 */
2610 pbn_b2_4_115200 },
2606 /* 2611 /*
2607 * Perle PCI-RAS cards 2612 * Perle PCI-RAS cards
2608 */ 2613 */
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c
index c065a704a93a..42be8b01a40f 100644
--- a/drivers/serial/atmel_serial.c
+++ b/drivers/serial/atmel_serial.c
@@ -1318,7 +1318,7 @@ static void __init atmel_console_get_options(struct uart_port *port, int *baud,
1318 * If the baud rate generator isn't running, the port wasn't 1318 * If the baud rate generator isn't running, the port wasn't
1319 * initialized by the boot loader. 1319 * initialized by the boot loader.
1320 */ 1320 */
1321 quot = UART_GET_BRGR(port); 1321 quot = UART_GET_BRGR(port) & ATMEL_US_CD;
1322 if (!quot) 1322 if (!quot)
1323 return; 1323 return;
1324 1324
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index d6b4ead693b7..fd9bb777df28 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -49,6 +49,7 @@
49#define DMA_RX_YCOUNT (PAGE_SIZE / DMA_RX_XCOUNT) 49#define DMA_RX_YCOUNT (PAGE_SIZE / DMA_RX_XCOUNT)
50 50
51#define DMA_RX_FLUSH_JIFFIES (HZ / 50) 51#define DMA_RX_FLUSH_JIFFIES (HZ / 50)
52#define CTS_CHECK_JIFFIES (HZ / 50)
52 53
53#ifdef CONFIG_SERIAL_BFIN_DMA 54#ifdef CONFIG_SERIAL_BFIN_DMA
54static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart); 55static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart);
@@ -290,11 +291,6 @@ static void bfin_serial_tx_chars(struct bfin_serial_port *uart)
290{ 291{
291 struct circ_buf *xmit = &uart->port.info->xmit; 292 struct circ_buf *xmit = &uart->port.info->xmit;
292 293
293 if (uart->port.x_char) {
294 UART_PUT_CHAR(uart, uart->port.x_char);
295 uart->port.icount.tx++;
296 uart->port.x_char = 0;
297 }
298 /* 294 /*
299 * Check the modem control lines before 295 * Check the modem control lines before
300 * transmitting anything. 296 * transmitting anything.
@@ -306,6 +302,12 @@ static void bfin_serial_tx_chars(struct bfin_serial_port *uart)
306 return; 302 return;
307 } 303 }
308 304
305 if (uart->port.x_char) {
306 UART_PUT_CHAR(uart, uart->port.x_char);
307 uart->port.icount.tx++;
308 uart->port.x_char = 0;
309 }
310
309 while ((UART_GET_LSR(uart) & THRE) && xmit->tail != xmit->head) { 311 while ((UART_GET_LSR(uart) & THRE) && xmit->tail != xmit->head) {
310 UART_PUT_CHAR(uart, xmit->buf[xmit->tail]); 312 UART_PUT_CHAR(uart, xmit->buf[xmit->tail]);
311 xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); 313 xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
@@ -345,15 +347,6 @@ static irqreturn_t bfin_serial_tx_int(int irq, void *dev_id)
345} 347}
346#endif 348#endif
347 349
348#ifdef CONFIG_SERIAL_BFIN_CTSRTS
349static void bfin_serial_do_work(struct work_struct *work)
350{
351 struct bfin_serial_port *uart = container_of(work, struct bfin_serial_port, cts_workqueue);
352
353 bfin_serial_mctrl_check(uart);
354}
355#endif
356
357#ifdef CONFIG_SERIAL_BFIN_DMA 350#ifdef CONFIG_SERIAL_BFIN_DMA
358static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart) 351static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart)
359{ 352{
@@ -361,6 +354,12 @@ static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart)
361 354
362 uart->tx_done = 0; 355 uart->tx_done = 0;
363 356
357 /*
358 * Check the modem control lines before
359 * transmitting anything.
360 */
361 bfin_serial_mctrl_check(uart);
362
364 if (uart_circ_empty(xmit) || uart_tx_stopped(&uart->port)) { 363 if (uart_circ_empty(xmit) || uart_tx_stopped(&uart->port)) {
365 uart->tx_count = 0; 364 uart->tx_count = 0;
366 uart->tx_done = 1; 365 uart->tx_done = 1;
@@ -373,12 +372,6 @@ static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart)
373 uart->port.x_char = 0; 372 uart->port.x_char = 0;
374 } 373 }
375 374
376 /*
377 * Check the modem control lines before
378 * transmitting anything.
379 */
380 bfin_serial_mctrl_check(uart);
381
382 uart->tx_count = CIRC_CNT(xmit->head, xmit->tail, UART_XMIT_SIZE); 375 uart->tx_count = CIRC_CNT(xmit->head, xmit->tail, UART_XMIT_SIZE);
383 if (uart->tx_count > (UART_XMIT_SIZE - xmit->tail)) 376 if (uart->tx_count > (UART_XMIT_SIZE - xmit->tail))
384 uart->tx_count = UART_XMIT_SIZE - xmit->tail; 377 uart->tx_count = UART_XMIT_SIZE - xmit->tail;
@@ -530,11 +523,7 @@ static unsigned int bfin_serial_get_mctrl(struct uart_port *port)
530 if (uart->cts_pin < 0) 523 if (uart->cts_pin < 0)
531 return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR; 524 return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR;
532 525
533# ifdef BF54x 526 if (UART_GET_CTS(uart))
534 if (UART_GET_MSR(uart) & CTS)
535# else
536 if (gpio_get_value(uart->cts_pin))
537# endif
538 return TIOCM_DSR | TIOCM_CAR; 527 return TIOCM_DSR | TIOCM_CAR;
539 else 528 else
540#endif 529#endif
@@ -549,17 +538,9 @@ static void bfin_serial_set_mctrl(struct uart_port *port, unsigned int mctrl)
549 return; 538 return;
550 539
551 if (mctrl & TIOCM_RTS) 540 if (mctrl & TIOCM_RTS)
552# ifdef BF54x 541 UART_CLEAR_RTS(uart);
553 UART_PUT_MCR(uart, UART_GET_MCR(uart) & ~MRTS);
554# else
555 gpio_set_value(uart->rts_pin, 0);
556# endif
557 else 542 else
558# ifdef BF54x 543 UART_SET_RTS(uart);
559 UART_PUT_MCR(uart, UART_GET_MCR(uart) | MRTS);
560# else
561 gpio_set_value(uart->rts_pin, 1);
562# endif
563#endif 544#endif
564} 545}
565 546
@@ -577,7 +558,10 @@ static void bfin_serial_mctrl_check(struct bfin_serial_port *uart)
577 uart_handle_cts_change(&uart->port, status & TIOCM_CTS); 558 uart_handle_cts_change(&uart->port, status & TIOCM_CTS);
578 if (!(status & TIOCM_CTS)) { 559 if (!(status & TIOCM_CTS)) {
579 tty->hw_stopped = 1; 560 tty->hw_stopped = 1;
580 schedule_work(&uart->cts_workqueue); 561 uart->cts_timer.data = (unsigned long)(uart);
562 uart->cts_timer.function = (void *)bfin_serial_mctrl_check;
563 uart->cts_timer.expires = jiffies + CTS_CHECK_JIFFIES;
564 add_timer(&(uart->cts_timer));
581 } else { 565 } else {
582 tty->hw_stopped = 0; 566 tty->hw_stopped = 0;
583 } 567 }
@@ -752,11 +736,7 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios,
752 736
753 /* Disable UART */ 737 /* Disable UART */
754 ier = UART_GET_IER(uart); 738 ier = UART_GET_IER(uart);
755#ifdef CONFIG_BF54x 739 UART_DISABLE_INTS(uart);
756 UART_CLEAR_IER(uart, 0xF);
757#else
758 UART_PUT_IER(uart, 0);
759#endif
760 740
761 /* Set DLAB in LCR to Access DLL and DLH */ 741 /* Set DLAB in LCR to Access DLL and DLH */
762 UART_SET_DLAB(uart); 742 UART_SET_DLAB(uart);
@@ -771,11 +751,7 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios,
771 UART_PUT_LCR(uart, lcr); 751 UART_PUT_LCR(uart, lcr);
772 752
773 /* Enable UART */ 753 /* Enable UART */
774#ifdef CONFIG_BF54x 754 UART_ENABLE_INTS(uart, ier);
775 UART_SET_IER(uart, ier);
776#else
777 UART_PUT_IER(uart, ier);
778#endif
779 755
780 val = UART_GET_GCTL(uart); 756 val = UART_GET_GCTL(uart);
781 val |= UCEN; 757 val |= UCEN;
@@ -833,15 +809,15 @@ bfin_serial_verify_port(struct uart_port *port, struct serial_struct *ser)
833 * Enable the IrDA function if tty->ldisc.num is N_IRDA. 809 * Enable the IrDA function if tty->ldisc.num is N_IRDA.
834 * In other cases, disable IrDA function. 810 * In other cases, disable IrDA function.
835 */ 811 */
836static void bfin_set_ldisc(struct tty_struct *tty) 812static void bfin_serial_set_ldisc(struct uart_port *port)
837{ 813{
838 int line = tty->index; 814 int line = port->line;
839 unsigned short val; 815 unsigned short val;
840 816
841 if (line >= tty->driver->num) 817 if (line >= port->info->tty->driver->num)
842 return; 818 return;
843 819
844 switch (tty->ldisc.num) { 820 switch (port->info->tty->ldisc.num) {
845 case N_IRDA: 821 case N_IRDA:
846 val = UART_GET_GCTL(&bfin_serial_ports[line]); 822 val = UART_GET_GCTL(&bfin_serial_ports[line]);
847 val |= (IREN | RPOLC); 823 val |= (IREN | RPOLC);
@@ -866,6 +842,7 @@ static struct uart_ops bfin_serial_pops = {
866 .startup = bfin_serial_startup, 842 .startup = bfin_serial_startup,
867 .shutdown = bfin_serial_shutdown, 843 .shutdown = bfin_serial_shutdown,
868 .set_termios = bfin_serial_set_termios, 844 .set_termios = bfin_serial_set_termios,
845 .set_ldisc = bfin_serial_set_ldisc,
869 .type = bfin_serial_type, 846 .type = bfin_serial_type,
870 .release_port = bfin_serial_release_port, 847 .release_port = bfin_serial_release_port,
871 .request_port = bfin_serial_request_port, 848 .request_port = bfin_serial_request_port,
@@ -904,7 +881,7 @@ static void __init bfin_serial_init_ports(void)
904 init_timer(&(bfin_serial_ports[i].rx_dma_timer)); 881 init_timer(&(bfin_serial_ports[i].rx_dma_timer));
905#endif 882#endif
906#ifdef CONFIG_SERIAL_BFIN_CTSRTS 883#ifdef CONFIG_SERIAL_BFIN_CTSRTS
907 INIT_WORK(&bfin_serial_ports[i].cts_workqueue, bfin_serial_do_work); 884 init_timer(&(bfin_serial_ports[i].cts_timer));
908 bfin_serial_ports[i].cts_pin = 885 bfin_serial_ports[i].cts_pin =
909 bfin_serial_resource[i].uart_cts_pin; 886 bfin_serial_resource[i].uart_cts_pin;
910 bfin_serial_ports[i].rts_pin = 887 bfin_serial_ports[i].rts_pin =
@@ -1206,7 +1183,6 @@ static int __init bfin_serial_init(void)
1206 1183
1207 ret = uart_register_driver(&bfin_serial_reg); 1184 ret = uart_register_driver(&bfin_serial_reg);
1208 if (ret == 0) { 1185 if (ret == 0) {
1209 bfin_serial_reg.tty_driver->set_ldisc = bfin_set_ldisc;
1210 ret = platform_driver_register(&bfin_serial_driver); 1186 ret = platform_driver_register(&bfin_serial_driver);
1211 if (ret) { 1187 if (ret) {
1212 pr_debug("uart register failed\n"); 1188 pr_debug("uart register failed\n");
diff --git a/drivers/serial/sb1250-duart.c b/drivers/serial/sb1250-duart.c
index 2d6c08b3dbcf..f8e1447a022a 100644
--- a/drivers/serial/sb1250-duart.c
+++ b/drivers/serial/sb1250-duart.c
@@ -924,7 +924,7 @@ console_initcall(sbd_serial_console_init);
924 924
925static struct uart_driver sbd_reg = { 925static struct uart_driver sbd_reg = {
926 .owner = THIS_MODULE, 926 .owner = THIS_MODULE,
927 .driver_name = "serial", 927 .driver_name = "sb1250_duart",
928 .dev_name = "duart", 928 .dev_name = "duart",
929 .major = TTY_MAJOR, 929 .major = TTY_MAJOR,
930 .minor = SB1250_DUART_MINOR_BASE, 930 .minor = SB1250_DUART_MINOR_BASE,
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index eab032733790..42d2e108b679 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -1165,6 +1165,15 @@ out:
1165 return ret; 1165 return ret;
1166} 1166}
1167 1167
1168static void uart_set_ldisc(struct tty_struct *tty)
1169{
1170 struct uart_state *state = tty->driver_data;
1171 struct uart_port *port = state->port;
1172
1173 if (port->ops->set_ldisc)
1174 port->ops->set_ldisc(port);
1175}
1176
1168static void uart_set_termios(struct tty_struct *tty, 1177static void uart_set_termios(struct tty_struct *tty,
1169 struct ktermios *old_termios) 1178 struct ktermios *old_termios)
1170{ 1179{
@@ -1982,7 +1991,9 @@ struct uart_match {
1982static int serial_match_port(struct device *dev, void *data) 1991static int serial_match_port(struct device *dev, void *data)
1983{ 1992{
1984 struct uart_match *match = data; 1993 struct uart_match *match = data;
1985 dev_t devt = MKDEV(match->driver->major, match->driver->minor) + match->port->line; 1994 struct tty_driver *tty_drv = match->driver->tty_driver;
1995 dev_t devt = MKDEV(tty_drv->major, tty_drv->minor_start) +
1996 match->port->line;
1986 1997
1987 return dev->devt == devt; /* Actually, only one tty per port */ 1998 return dev->devt == devt; /* Actually, only one tty per port */
1988} 1999}
@@ -2054,6 +2065,8 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *port)
2054int uart_resume_port(struct uart_driver *drv, struct uart_port *port) 2065int uart_resume_port(struct uart_driver *drv, struct uart_port *port)
2055{ 2066{
2056 struct uart_state *state = drv->state + port->line; 2067 struct uart_state *state = drv->state + port->line;
2068 struct device *tty_dev;
2069 struct uart_match match = {port, drv};
2057 2070
2058 mutex_lock(&state->mutex); 2071 mutex_lock(&state->mutex);
2059 2072
@@ -2063,7 +2076,8 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port)
2063 return 0; 2076 return 0;
2064 } 2077 }
2065 2078
2066 if (!port->suspended) { 2079 tty_dev = device_find_child(port->dev, &match, serial_match_port);
2080 if (!port->suspended && device_may_wakeup(tty_dev)) {
2067 disable_irq_wake(port->irq); 2081 disable_irq_wake(port->irq);
2068 mutex_unlock(&state->mutex); 2082 mutex_unlock(&state->mutex);
2069 return 0; 2083 return 0;
@@ -2285,6 +2299,7 @@ static const struct tty_operations uart_ops = {
2285 .unthrottle = uart_unthrottle, 2299 .unthrottle = uart_unthrottle,
2286 .send_xchar = uart_send_xchar, 2300 .send_xchar = uart_send_xchar,
2287 .set_termios = uart_set_termios, 2301 .set_termios = uart_set_termios,
2302 .set_ldisc = uart_set_ldisc,
2288 .stop = uart_stop, 2303 .stop = uart_stop,
2289 .start = uart_start, 2304 .start = uart_start,
2290 .hangup = uart_hangup, 2305 .hangup = uart_hangup,
diff --git a/drivers/serial/sunhv.c b/drivers/serial/sunhv.c
index 145c0281495d..2847336742d7 100644
--- a/drivers/serial/sunhv.c
+++ b/drivers/serial/sunhv.c
@@ -499,7 +499,6 @@ static void sunhv_console_write_bychar(struct console *con, const char *s, unsig
499 } else 499 } else
500 spin_lock(&port->lock); 500 spin_lock(&port->lock);
501 501
502 spin_lock_irqsave(&port->lock, flags);
503 for (i = 0; i < n; i++) { 502 for (i = 0; i < n; i++) {
504 if (*s == '\n') 503 if (*s == '\n')
505 sunhv_console_putchar(port, '\r'); 504 sunhv_console_putchar(port, '\r');
diff --git a/drivers/serial/ucc_uart.c b/drivers/serial/ucc_uart.c
index 01917c433f17..566a8b42e05a 100644
--- a/drivers/serial/ucc_uart.c
+++ b/drivers/serial/ucc_uart.c
@@ -195,7 +195,7 @@ struct uart_qe_port {
195 195
196static struct uart_driver ucc_uart_driver = { 196static struct uart_driver ucc_uart_driver = {
197 .owner = THIS_MODULE, 197 .owner = THIS_MODULE,
198 .driver_name = "serial", 198 .driver_name = "ucc_uart",
199 .dev_name = "ttyQE", 199 .dev_name = "ttyQE",
200 .major = SERIAL_QE_MAJOR, 200 .major = SERIAL_QE_MAJOR,
201 .minor = SERIAL_QE_MINOR, 201 .minor = SERIAL_QE_MINOR,
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
index b3518ca9f04e..f5b60c70389b 100644
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -25,6 +25,7 @@
25#include <linux/ioctl.h> 25#include <linux/ioctl.h>
26#include <linux/fs.h> 26#include <linux/fs.h>
27#include <linux/device.h> 27#include <linux/device.h>
28#include <linux/err.h>
28#include <linux/list.h> 29#include <linux/list.h>
29#include <linux/errno.h> 30#include <linux/errno.h>
30#include <linux/mutex.h> 31#include <linux/mutex.h>
@@ -67,10 +68,12 @@ static unsigned long minors[N_SPI_MINORS / BITS_PER_LONG];
67 | SPI_LSB_FIRST | SPI_3WIRE | SPI_LOOP) 68 | SPI_LSB_FIRST | SPI_3WIRE | SPI_LOOP)
68 69
69struct spidev_data { 70struct spidev_data {
70 struct device dev; 71 dev_t devt;
72 spinlock_t spi_lock;
71 struct spi_device *spi; 73 struct spi_device *spi;
72 struct list_head device_entry; 74 struct list_head device_entry;
73 75
76 /* buffer is NULL unless this device is open (users > 0) */
74 struct mutex buf_lock; 77 struct mutex buf_lock;
75 unsigned users; 78 unsigned users;
76 u8 *buffer; 79 u8 *buffer;
@@ -85,12 +88,75 @@ MODULE_PARM_DESC(bufsiz, "data bytes in biggest supported SPI message");
85 88
86/*-------------------------------------------------------------------------*/ 89/*-------------------------------------------------------------------------*/
87 90
91/*
92 * We can't use the standard synchronous wrappers for file I/O; we
93 * need to protect against async removal of the underlying spi_device.
94 */
95static void spidev_complete(void *arg)
96{
97 complete(arg);
98}
99
100static ssize_t
101spidev_sync(struct spidev_data *spidev, struct spi_message *message)
102{
103 DECLARE_COMPLETION_ONSTACK(done);
104 int status;
105
106 message->complete = spidev_complete;
107 message->context = &done;
108
109 spin_lock_irq(&spidev->spi_lock);
110 if (spidev->spi == NULL)
111 status = -ESHUTDOWN;
112 else
113 status = spi_async(spidev->spi, message);
114 spin_unlock_irq(&spidev->spi_lock);
115
116 if (status == 0) {
117 wait_for_completion(&done);
118 status = message->status;
119 if (status == 0)
120 status = message->actual_length;
121 }
122 return status;
123}
124
125static inline ssize_t
126spidev_sync_write(struct spidev_data *spidev, size_t len)
127{
128 struct spi_transfer t = {
129 .tx_buf = spidev->buffer,
130 .len = len,
131 };
132 struct spi_message m;
133
134 spi_message_init(&m);
135 spi_message_add_tail(&t, &m);
136 return spidev_sync(spidev, &m);
137}
138
139static inline ssize_t
140spidev_sync_read(struct spidev_data *spidev, size_t len)
141{
142 struct spi_transfer t = {
143 .rx_buf = spidev->buffer,
144 .len = len,
145 };
146 struct spi_message m;
147
148 spi_message_init(&m);
149 spi_message_add_tail(&t, &m);
150 return spidev_sync(spidev, &m);
151}
152
153/*-------------------------------------------------------------------------*/
154
88/* Read-only message with current device setup */ 155/* Read-only message with current device setup */
89static ssize_t 156static ssize_t
90spidev_read(struct file *filp, char __user *buf, size_t count, loff_t *f_pos) 157spidev_read(struct file *filp, char __user *buf, size_t count, loff_t *f_pos)
91{ 158{
92 struct spidev_data *spidev; 159 struct spidev_data *spidev;
93 struct spi_device *spi;
94 ssize_t status = 0; 160 ssize_t status = 0;
95 161
96 /* chipselect only toggles at start or end of operation */ 162 /* chipselect only toggles at start or end of operation */
@@ -98,18 +164,17 @@ spidev_read(struct file *filp, char __user *buf, size_t count, loff_t *f_pos)
98 return -EMSGSIZE; 164 return -EMSGSIZE;
99 165
100 spidev = filp->private_data; 166 spidev = filp->private_data;
101 spi = spidev->spi;
102 167
103 mutex_lock(&spidev->buf_lock); 168 mutex_lock(&spidev->buf_lock);
104 status = spi_read(spi, spidev->buffer, count); 169 status = spidev_sync_read(spidev, count);
105 if (status == 0) { 170 if (status > 0) {
106 unsigned long missing; 171 unsigned long missing;
107 172
108 missing = copy_to_user(buf, spidev->buffer, count); 173 missing = copy_to_user(buf, spidev->buffer, status);
109 if (count && missing == count) 174 if (missing == status)
110 status = -EFAULT; 175 status = -EFAULT;
111 else 176 else
112 status = count - missing; 177 status = status - missing;
113 } 178 }
114 mutex_unlock(&spidev->buf_lock); 179 mutex_unlock(&spidev->buf_lock);
115 180
@@ -122,7 +187,6 @@ spidev_write(struct file *filp, const char __user *buf,
122 size_t count, loff_t *f_pos) 187 size_t count, loff_t *f_pos)
123{ 188{
124 struct spidev_data *spidev; 189 struct spidev_data *spidev;
125 struct spi_device *spi;
126 ssize_t status = 0; 190 ssize_t status = 0;
127 unsigned long missing; 191 unsigned long missing;
128 192
@@ -131,14 +195,11 @@ spidev_write(struct file *filp, const char __user *buf,
131 return -EMSGSIZE; 195 return -EMSGSIZE;
132 196
133 spidev = filp->private_data; 197 spidev = filp->private_data;
134 spi = spidev->spi;
135 198
136 mutex_lock(&spidev->buf_lock); 199 mutex_lock(&spidev->buf_lock);
137 missing = copy_from_user(spidev->buffer, buf, count); 200 missing = copy_from_user(spidev->buffer, buf, count);
138 if (missing == 0) { 201 if (missing == 0) {
139 status = spi_write(spi, spidev->buffer, count); 202 status = spidev_sync_write(spidev, count);
140 if (status == 0)
141 status = count;
142 } else 203 } else
143 status = -EFAULT; 204 status = -EFAULT;
144 mutex_unlock(&spidev->buf_lock); 205 mutex_unlock(&spidev->buf_lock);
@@ -153,7 +214,6 @@ static int spidev_message(struct spidev_data *spidev,
153 struct spi_transfer *k_xfers; 214 struct spi_transfer *k_xfers;
154 struct spi_transfer *k_tmp; 215 struct spi_transfer *k_tmp;
155 struct spi_ioc_transfer *u_tmp; 216 struct spi_ioc_transfer *u_tmp;
156 struct spi_device *spi = spidev->spi;
157 unsigned n, total; 217 unsigned n, total;
158 u8 *buf; 218 u8 *buf;
159 int status = -EFAULT; 219 int status = -EFAULT;
@@ -215,7 +275,7 @@ static int spidev_message(struct spidev_data *spidev,
215 spi_message_add_tail(k_tmp, &msg); 275 spi_message_add_tail(k_tmp, &msg);
216 } 276 }
217 277
218 status = spi_sync(spi, &msg); 278 status = spidev_sync(spidev, &msg);
219 if (status < 0) 279 if (status < 0)
220 goto done; 280 goto done;
221 281
@@ -269,8 +329,16 @@ spidev_ioctl(struct inode *inode, struct file *filp,
269 if (err) 329 if (err)
270 return -EFAULT; 330 return -EFAULT;
271 331
332 /* guard against device removal before, or while,
333 * we issue this ioctl.
334 */
272 spidev = filp->private_data; 335 spidev = filp->private_data;
273 spi = spidev->spi; 336 spin_lock_irq(&spidev->spi_lock);
337 spi = spi_dev_get(spidev->spi);
338 spin_unlock_irq(&spidev->spi_lock);
339
340 if (spi == NULL)
341 return -ESHUTDOWN;
274 342
275 switch (cmd) { 343 switch (cmd) {
276 /* read requests */ 344 /* read requests */
@@ -356,8 +424,10 @@ spidev_ioctl(struct inode *inode, struct file *filp,
356 default: 424 default:
357 /* segmented and/or full-duplex I/O request */ 425 /* segmented and/or full-duplex I/O request */
358 if (_IOC_NR(cmd) != _IOC_NR(SPI_IOC_MESSAGE(0)) 426 if (_IOC_NR(cmd) != _IOC_NR(SPI_IOC_MESSAGE(0))
359 || _IOC_DIR(cmd) != _IOC_WRITE) 427 || _IOC_DIR(cmd) != _IOC_WRITE) {
360 return -ENOTTY; 428 retval = -ENOTTY;
429 break;
430 }
361 431
362 tmp = _IOC_SIZE(cmd); 432 tmp = _IOC_SIZE(cmd);
363 if ((tmp % sizeof(struct spi_ioc_transfer)) != 0) { 433 if ((tmp % sizeof(struct spi_ioc_transfer)) != 0) {
@@ -385,6 +455,7 @@ spidev_ioctl(struct inode *inode, struct file *filp,
385 kfree(ioc); 455 kfree(ioc);
386 break; 456 break;
387 } 457 }
458 spi_dev_put(spi);
388 return retval; 459 return retval;
389} 460}
390 461
@@ -396,7 +467,7 @@ static int spidev_open(struct inode *inode, struct file *filp)
396 mutex_lock(&device_list_lock); 467 mutex_lock(&device_list_lock);
397 468
398 list_for_each_entry(spidev, &device_list, device_entry) { 469 list_for_each_entry(spidev, &device_list, device_entry) {
399 if (spidev->dev.devt == inode->i_rdev) { 470 if (spidev->devt == inode->i_rdev) {
400 status = 0; 471 status = 0;
401 break; 472 break;
402 } 473 }
@@ -429,10 +500,22 @@ static int spidev_release(struct inode *inode, struct file *filp)
429 mutex_lock(&device_list_lock); 500 mutex_lock(&device_list_lock);
430 spidev = filp->private_data; 501 spidev = filp->private_data;
431 filp->private_data = NULL; 502 filp->private_data = NULL;
503
504 /* last close? */
432 spidev->users--; 505 spidev->users--;
433 if (!spidev->users) { 506 if (!spidev->users) {
507 int dofree;
508
434 kfree(spidev->buffer); 509 kfree(spidev->buffer);
435 spidev->buffer = NULL; 510 spidev->buffer = NULL;
511
512 /* ... after we unbound from the underlying device? */
513 spin_lock_irq(&spidev->spi_lock);
514 dofree = (spidev->spi == NULL);
515 spin_unlock_irq(&spidev->spi_lock);
516
517 if (dofree)
518 kfree(spidev);
436 } 519 }
437 mutex_unlock(&device_list_lock); 520 mutex_unlock(&device_list_lock);
438 521
@@ -459,19 +542,7 @@ static struct file_operations spidev_fops = {
459 * It also simplifies memory management. 542 * It also simplifies memory management.
460 */ 543 */
461 544
462static void spidev_classdev_release(struct device *dev) 545static struct class *spidev_class;
463{
464 struct spidev_data *spidev;
465
466 spidev = container_of(dev, struct spidev_data, dev);
467 kfree(spidev);
468}
469
470static struct class spidev_class = {
471 .name = "spidev",
472 .owner = THIS_MODULE,
473 .dev_release = spidev_classdev_release,
474};
475 546
476/*-------------------------------------------------------------------------*/ 547/*-------------------------------------------------------------------------*/
477 548
@@ -488,6 +559,7 @@ static int spidev_probe(struct spi_device *spi)
488 559
489 /* Initialize the driver data */ 560 /* Initialize the driver data */
490 spidev->spi = spi; 561 spidev->spi = spi;
562 spin_lock_init(&spidev->spi_lock);
491 mutex_init(&spidev->buf_lock); 563 mutex_init(&spidev->buf_lock);
492 564
493 INIT_LIST_HEAD(&spidev->device_entry); 565 INIT_LIST_HEAD(&spidev->device_entry);
@@ -498,20 +570,20 @@ static int spidev_probe(struct spi_device *spi)
498 mutex_lock(&device_list_lock); 570 mutex_lock(&device_list_lock);
499 minor = find_first_zero_bit(minors, N_SPI_MINORS); 571 minor = find_first_zero_bit(minors, N_SPI_MINORS);
500 if (minor < N_SPI_MINORS) { 572 if (minor < N_SPI_MINORS) {
501 spidev->dev.parent = &spi->dev; 573 struct device *dev;
502 spidev->dev.class = &spidev_class; 574
503 spidev->dev.devt = MKDEV(SPIDEV_MAJOR, minor); 575 spidev->devt = MKDEV(SPIDEV_MAJOR, minor);
504 snprintf(spidev->dev.bus_id, sizeof spidev->dev.bus_id, 576 dev = device_create(spidev_class, &spi->dev, spidev->devt,
505 "spidev%d.%d", 577 "spidev%d.%d",
506 spi->master->bus_num, spi->chip_select); 578 spi->master->bus_num, spi->chip_select);
507 status = device_register(&spidev->dev); 579 status = IS_ERR(dev) ? PTR_ERR(dev) : 0;
508 } else { 580 } else {
509 dev_dbg(&spi->dev, "no minor number available!\n"); 581 dev_dbg(&spi->dev, "no minor number available!\n");
510 status = -ENODEV; 582 status = -ENODEV;
511 } 583 }
512 if (status == 0) { 584 if (status == 0) {
513 set_bit(minor, minors); 585 set_bit(minor, minors);
514 dev_set_drvdata(&spi->dev, spidev); 586 spi_set_drvdata(spi, spidev);
515 list_add(&spidev->device_entry, &device_list); 587 list_add(&spidev->device_entry, &device_list);
516 } 588 }
517 mutex_unlock(&device_list_lock); 589 mutex_unlock(&device_list_lock);
@@ -524,15 +596,21 @@ static int spidev_probe(struct spi_device *spi)
524 596
525static int spidev_remove(struct spi_device *spi) 597static int spidev_remove(struct spi_device *spi)
526{ 598{
527 struct spidev_data *spidev = dev_get_drvdata(&spi->dev); 599 struct spidev_data *spidev = spi_get_drvdata(spi);
528 600
529 mutex_lock(&device_list_lock); 601 /* make sure ops on existing fds can abort cleanly */
602 spin_lock_irq(&spidev->spi_lock);
603 spidev->spi = NULL;
604 spi_set_drvdata(spi, NULL);
605 spin_unlock_irq(&spidev->spi_lock);
530 606
607 /* prevent new opens */
608 mutex_lock(&device_list_lock);
531 list_del(&spidev->device_entry); 609 list_del(&spidev->device_entry);
532 dev_set_drvdata(&spi->dev, NULL); 610 device_destroy(spidev_class, spidev->devt);
533 clear_bit(MINOR(spidev->dev.devt), minors); 611 clear_bit(MINOR(spidev->devt), minors);
534 device_unregister(&spidev->dev); 612 if (spidev->users == 0)
535 613 kfree(spidev);
536 mutex_unlock(&device_list_lock); 614 mutex_unlock(&device_list_lock);
537 615
538 return 0; 616 return 0;
@@ -568,15 +646,15 @@ static int __init spidev_init(void)
568 if (status < 0) 646 if (status < 0)
569 return status; 647 return status;
570 648
571 status = class_register(&spidev_class); 649 spidev_class = class_create(THIS_MODULE, "spidev");
572 if (status < 0) { 650 if (IS_ERR(spidev_class)) {
573 unregister_chrdev(SPIDEV_MAJOR, spidev_spi.driver.name); 651 unregister_chrdev(SPIDEV_MAJOR, spidev_spi.driver.name);
574 return status; 652 return PTR_ERR(spidev_class);
575 } 653 }
576 654
577 status = spi_register_driver(&spidev_spi); 655 status = spi_register_driver(&spidev_spi);
578 if (status < 0) { 656 if (status < 0) {
579 class_unregister(&spidev_class); 657 class_destroy(spidev_class);
580 unregister_chrdev(SPIDEV_MAJOR, spidev_spi.driver.name); 658 unregister_chrdev(SPIDEV_MAJOR, spidev_spi.driver.name);
581 } 659 }
582 return status; 660 return status;
@@ -586,7 +664,7 @@ module_init(spidev_init);
586static void __exit spidev_exit(void) 664static void __exit spidev_exit(void)
587{ 665{
588 spi_unregister_driver(&spidev_spi); 666 spi_unregister_driver(&spidev_spi);
589 class_unregister(&spidev_class); 667 class_destroy(spidev_class);
590 unregister_chrdev(SPIDEV_MAJOR, spidev_spi.driver.name); 668 unregister_chrdev(SPIDEV_MAJOR, spidev_spi.driver.name);
591} 669}
592module_exit(spidev_exit); 670module_exit(spidev_exit);
diff --git a/drivers/ssb/driver_pcicore.c b/drivers/ssb/driver_pcicore.c
index 75def13e797d..d28c53868093 100644
--- a/drivers/ssb/driver_pcicore.c
+++ b/drivers/ssb/driver_pcicore.c
@@ -537,12 +537,12 @@ int ssb_pcicore_dev_irqvecs_enable(struct ssb_pcicore *pc,
537 int err = 0; 537 int err = 0;
538 u32 tmp; 538 u32 tmp;
539 539
540 might_sleep();
541
542 if (!pdev) 540 if (!pdev)
543 goto out; 541 goto out;
544 bus = pdev->bus; 542 bus = pdev->bus;
545 543
544 might_sleep_if(pdev->id.coreid != SSB_DEV_PCI);
545
546 /* Enable interrupts for this device. */ 546 /* Enable interrupts for this device. */
547 if (bus->host_pci && 547 if (bus->host_pci &&
548 ((pdev->id.revision >= 6) || (pdev->id.coreid == SSB_DEV_PCIE))) { 548 ((pdev->id.revision >= 6) || (pdev->id.coreid == SSB_DEV_PCIE))) {
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
index 7cf8851286b5..d184f2aea78d 100644
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -1168,15 +1168,21 @@ EXPORT_SYMBOL(ssb_dma_translation);
1168int ssb_dma_set_mask(struct ssb_device *ssb_dev, u64 mask) 1168int ssb_dma_set_mask(struct ssb_device *ssb_dev, u64 mask)
1169{ 1169{
1170 struct device *dma_dev = ssb_dev->dma_dev; 1170 struct device *dma_dev = ssb_dev->dma_dev;
1171 int err = 0;
1171 1172
1172#ifdef CONFIG_SSB_PCIHOST 1173#ifdef CONFIG_SSB_PCIHOST
1173 if (ssb_dev->bus->bustype == SSB_BUSTYPE_PCI) 1174 if (ssb_dev->bus->bustype == SSB_BUSTYPE_PCI) {
1174 return dma_set_mask(dma_dev, mask); 1175 err = pci_set_dma_mask(ssb_dev->bus->host_pci, mask);
1176 if (err)
1177 return err;
1178 err = pci_set_consistent_dma_mask(ssb_dev->bus->host_pci, mask);
1179 return err;
1180 }
1175#endif 1181#endif
1176 dma_dev->coherent_dma_mask = mask; 1182 dma_dev->coherent_dma_mask = mask;
1177 dma_dev->dma_mask = &dma_dev->coherent_dma_mask; 1183 dma_dev->dma_mask = &dma_dev->coherent_dma_mask;
1178 1184
1179 return 0; 1185 return err;
1180} 1186}
1181EXPORT_SYMBOL(ssb_dma_set_mask); 1187EXPORT_SYMBOL(ssb_dma_set_mask);
1182 1188
diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
index 4b628526df09..a86e952ed4ca 100644
--- a/drivers/thermal/Kconfig
+++ b/drivers/thermal/Kconfig
@@ -12,3 +12,12 @@ menuconfig THERMAL
12 cooling devices. 12 cooling devices.
13 All platforms with ACPI thermal support can use this driver. 13 All platforms with ACPI thermal support can use this driver.
14 If you want this support, you should say Y or M here. 14 If you want this support, you should say Y or M here.
15
16config THERMAL_HWMON
17 bool "Hardware monitoring support"
18 depends on HWMON=y || HWMON=THERMAL
19 help
20 The generic thermal sysfs driver's hardware monitoring support
21 requires a 2.10.7/3.0.2 or later lm-sensors userspace.
22
23 Say Y if your user-space is new enough.
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 6098787341f3..fe07462d5947 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -295,8 +295,8 @@ thermal_cooling_device_trip_point_show(struct device *dev,
295 295
296/* Device management */ 296/* Device management */
297 297
298#if defined(CONFIG_HWMON) || \ 298#if defined(CONFIG_THERMAL_HWMON)
299 (defined(CONFIG_HWMON_MODULE) && defined(CONFIG_THERMAL_MODULE)) 299
300/* hwmon sys I/F */ 300/* hwmon sys I/F */
301#include <linux/hwmon.h> 301#include <linux/hwmon.h>
302static LIST_HEAD(thermal_hwmon_list); 302static LIST_HEAD(thermal_hwmon_list);
diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c
index 55cc7b80422a..0a12e90ad416 100644
--- a/drivers/uio/uio.c
+++ b/drivers/uio/uio.c
@@ -649,15 +649,14 @@ int __uio_register_device(struct module *owner,
649 if (ret) 649 if (ret)
650 goto err_get_minor; 650 goto err_get_minor;
651 651
652 idev->dev = device_create(uio_class->class, parent, 652 idev->dev = device_create_drvdata(uio_class->class, parent,
653 MKDEV(uio_major, idev->minor), 653 MKDEV(uio_major, idev->minor), idev,
654 "uio%d", idev->minor); 654 "uio%d", idev->minor);
655 if (IS_ERR(idev->dev)) { 655 if (IS_ERR(idev->dev)) {
656 printk(KERN_ERR "UIO: device register failed\n"); 656 printk(KERN_ERR "UIO: device register failed\n");
657 ret = PTR_ERR(idev->dev); 657 ret = PTR_ERR(idev->dev);
658 goto err_device_create; 658 goto err_device_create;
659 } 659 }
660 dev_set_drvdata(idev->dev, idev);
661 660
662 ret = uio_dev_add_attributes(idev); 661 ret = uio_dev_add_attributes(idev);
663 if (ret) 662 if (ret)
diff --git a/drivers/usb/c67x00/c67x00-ll-hpi.c b/drivers/usb/c67x00/c67x00-ll-hpi.c
index 5100fbbf6cb0..a9636f43bca2 100644
--- a/drivers/usb/c67x00/c67x00-ll-hpi.c
+++ b/drivers/usb/c67x00/c67x00-ll-hpi.c
@@ -120,7 +120,7 @@ static void hpi_write_word(struct c67x00_device *dev, u16 reg, u16 value)
120 * Only data is little endian, addr has cpu endianess 120 * Only data is little endian, addr has cpu endianess
121 */ 121 */
122static void hpi_write_words_le16(struct c67x00_device *dev, u16 addr, 122static void hpi_write_words_le16(struct c67x00_device *dev, u16 addr,
123 u16 *data, u16 count) 123 __le16 *data, u16 count)
124{ 124{
125 unsigned long flags; 125 unsigned long flags;
126 int i; 126 int i;
@@ -129,7 +129,7 @@ static void hpi_write_words_le16(struct c67x00_device *dev, u16 addr,
129 129
130 hpi_write_reg(dev, HPI_ADDR, addr); 130 hpi_write_reg(dev, HPI_ADDR, addr);
131 for (i = 0; i < count; i++) 131 for (i = 0; i < count; i++)
132 hpi_write_reg(dev, HPI_DATA, cpu_to_le16(*data++)); 132 hpi_write_reg(dev, HPI_DATA, le16_to_cpu(*data++));
133 133
134 spin_unlock_irqrestore(&dev->hpi.lock, flags); 134 spin_unlock_irqrestore(&dev->hpi.lock, flags);
135} 135}
@@ -138,7 +138,7 @@ static void hpi_write_words_le16(struct c67x00_device *dev, u16 addr,
138 * Only data is little endian, addr has cpu endianess 138 * Only data is little endian, addr has cpu endianess
139 */ 139 */
140static void hpi_read_words_le16(struct c67x00_device *dev, u16 addr, 140static void hpi_read_words_le16(struct c67x00_device *dev, u16 addr,
141 u16 *data, u16 count) 141 __le16 *data, u16 count)
142{ 142{
143 unsigned long flags; 143 unsigned long flags;
144 int i; 144 int i;
@@ -146,7 +146,7 @@ static void hpi_read_words_le16(struct c67x00_device *dev, u16 addr,
146 spin_lock_irqsave(&dev->hpi.lock, flags); 146 spin_lock_irqsave(&dev->hpi.lock, flags);
147 hpi_write_reg(dev, HPI_ADDR, addr); 147 hpi_write_reg(dev, HPI_ADDR, addr);
148 for (i = 0; i < count; i++) 148 for (i = 0; i < count; i++)
149 *data++ = le16_to_cpu(hpi_read_reg(dev, HPI_DATA)); 149 *data++ = cpu_to_le16(hpi_read_reg(dev, HPI_DATA));
150 150
151 spin_unlock_irqrestore(&dev->hpi.lock, flags); 151 spin_unlock_irqrestore(&dev->hpi.lock, flags);
152} 152}
@@ -425,7 +425,7 @@ void c67x00_ll_write_mem_le16(struct c67x00_device *dev, u16 addr,
425 len--; 425 len--;
426 } 426 }
427 427
428 hpi_write_words_le16(dev, addr, (u16 *)buf, len / 2); 428 hpi_write_words_le16(dev, addr, (__le16 *)buf, len / 2);
429 buf += len & ~0x01; 429 buf += len & ~0x01;
430 addr += len & ~0x01; 430 addr += len & ~0x01;
431 len &= 0x01; 431 len &= 0x01;
@@ -456,7 +456,7 @@ void c67x00_ll_read_mem_le16(struct c67x00_device *dev, u16 addr,
456 len--; 456 len--;
457 } 457 }
458 458
459 hpi_read_words_le16(dev, addr, (u16 *)buf, len / 2); 459 hpi_read_words_le16(dev, addr, (__le16 *)buf, len / 2);
460 buf += len & ~0x01; 460 buf += len & ~0x01;
461 addr += len & ~0x01; 461 addr += len & ~0x01;
462 len &= 0x01; 462 len &= 0x01;
diff --git a/drivers/usb/class/Kconfig b/drivers/usb/class/Kconfig
index 3a9102d2591b..66f17ed88cb5 100644
--- a/drivers/usb/class/Kconfig
+++ b/drivers/usb/class/Kconfig
@@ -29,3 +29,14 @@ config USB_PRINTER
29 To compile this driver as a module, choose M here: the 29 To compile this driver as a module, choose M here: the
30 module will be called usblp. 30 module will be called usblp.
31 31
32config USB_WDM
33 tristate "USB Wireless Device Management support"
34 depends on USB
35 ---help---
36 This driver supports the WMC Device Management functionality
37 of cell phones compliant to the CDC WMC specification. You can use
38 AT commands over this device.
39
40 To compile this driver as a module, choose M here: the
41 module will be called cdc-wdm.
42
diff --git a/drivers/usb/class/Makefile b/drivers/usb/class/Makefile
index cc391e6c2af8..535d59a30600 100644
--- a/drivers/usb/class/Makefile
+++ b/drivers/usb/class/Makefile
@@ -5,3 +5,4 @@
5 5
6obj-$(CONFIG_USB_ACM) += cdc-acm.o 6obj-$(CONFIG_USB_ACM) += cdc-acm.o
7obj-$(CONFIG_USB_PRINTER) += usblp.o 7obj-$(CONFIG_USB_PRINTER) += usblp.o
8obj-$(CONFIG_USB_WDM) += cdc-wdm.o
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 63c34043b4d9..c3201affa0b6 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -1125,9 +1125,6 @@ static void stop_data_traffic(struct acm *acm)
1125 for (i = 0; i < acm->rx_buflimit; i++) 1125 for (i = 0; i < acm->rx_buflimit; i++)
1126 usb_kill_urb(acm->ru[i].urb); 1126 usb_kill_urb(acm->ru[i].urb);
1127 1127
1128 INIT_LIST_HEAD(&acm->filled_read_bufs);
1129 INIT_LIST_HEAD(&acm->spare_read_bufs);
1130
1131 tasklet_enable(&acm->urb_task); 1128 tasklet_enable(&acm->urb_task);
1132 1129
1133 cancel_work_sync(&acm->work); 1130 cancel_work_sync(&acm->work);
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
new file mode 100644
index 000000000000..731db051070a
--- /dev/null
+++ b/drivers/usb/class/cdc-wdm.c
@@ -0,0 +1,740 @@
1/*
2 * cdc-wdm.c
3 *
4 * This driver supports USB CDC WCM Device Management.
5 *
6 * Copyright (c) 2007-2008 Oliver Neukum
7 *
8 * Some code taken from cdc-acm.c
9 *
10 * Released under the GPLv2.
11 *
12 * Many thanks to Carl Nordbeck
13 */
14#include <linux/kernel.h>
15#include <linux/errno.h>
16#include <linux/slab.h>
17#include <linux/module.h>
18#include <linux/smp_lock.h>
19#include <linux/mutex.h>
20#include <linux/uaccess.h>
21#include <linux/bitops.h>
22#include <linux/poll.h>
23#include <linux/usb.h>
24#include <linux/usb/cdc.h>
25#include <asm/byteorder.h>
26#include <asm/unaligned.h>
27
28/*
29 * Version Information
30 */
31#define DRIVER_VERSION "v0.02"
32#define DRIVER_AUTHOR "Oliver Neukum"
33
34static struct usb_device_id wdm_ids[] = {
35 {
36 .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS |
37 USB_DEVICE_ID_MATCH_INT_SUBCLASS,
38 .bInterfaceClass = USB_CLASS_COMM,
39 .bInterfaceSubClass = USB_CDC_SUBCLASS_DMM
40 },
41 { }
42};
43
44#define WDM_MINOR_BASE 176
45
46
47#define WDM_IN_USE 1
48#define WDM_DISCONNECTING 2
49#define WDM_RESULT 3
50#define WDM_READ 4
51#define WDM_INT_STALL 5
52#define WDM_POLL_RUNNING 6
53
54
55#define WDM_MAX 16
56
57
58static DEFINE_MUTEX(wdm_mutex);
59
60/* --- method tables --- */
61
62struct wdm_device {
63 u8 *inbuf; /* buffer for response */
64 u8 *outbuf; /* buffer for command */
65 u8 *sbuf; /* buffer for status */
66 u8 *ubuf; /* buffer for copy to user space */
67
68 struct urb *command;
69 struct urb *response;
70 struct urb *validity;
71 struct usb_interface *intf;
72 struct usb_ctrlrequest *orq;
73 struct usb_ctrlrequest *irq;
74 spinlock_t iuspin;
75
76 unsigned long flags;
77 u16 bufsize;
78 u16 wMaxCommand;
79 u16 wMaxPacketSize;
80 u16 bMaxPacketSize0;
81 __le16 inum;
82 int reslength;
83 int length;
84 int read;
85 int count;
86 dma_addr_t shandle;
87 dma_addr_t ihandle;
88 struct mutex wlock;
89 struct mutex rlock;
90 wait_queue_head_t wait;
91 struct work_struct rxwork;
92 int werr;
93 int rerr;
94};
95
96static struct usb_driver wdm_driver;
97
98/* --- callbacks --- */
99static void wdm_out_callback(struct urb *urb)
100{
101 struct wdm_device *desc;
102 desc = urb->context;
103 spin_lock(&desc->iuspin);
104 desc->werr = urb->status;
105 spin_unlock(&desc->iuspin);
106 clear_bit(WDM_IN_USE, &desc->flags);
107 kfree(desc->outbuf);
108 wake_up(&desc->wait);
109}
110
111static void wdm_in_callback(struct urb *urb)
112{
113 struct wdm_device *desc = urb->context;
114 int status = urb->status;
115
116 spin_lock(&desc->iuspin);
117
118 if (status) {
119 switch (status) {
120 case -ENOENT:
121 dev_dbg(&desc->intf->dev,
122 "nonzero urb status received: -ENOENT");
123 break;
124 case -ECONNRESET:
125 dev_dbg(&desc->intf->dev,
126 "nonzero urb status received: -ECONNRESET");
127 break;
128 case -ESHUTDOWN:
129 dev_dbg(&desc->intf->dev,
130 "nonzero urb status received: -ESHUTDOWN");
131 break;
132 case -EPIPE:
133 err("nonzero urb status received: -EPIPE");
134 break;
135 default:
136 err("Unexpected error %d", status);
137 break;
138 }
139 }
140
141 desc->rerr = status;
142 desc->reslength = urb->actual_length;
143 memmove(desc->ubuf + desc->length, desc->inbuf, desc->reslength);
144 desc->length += desc->reslength;
145 wake_up(&desc->wait);
146
147 set_bit(WDM_READ, &desc->flags);
148 spin_unlock(&desc->iuspin);
149}
150
151static void wdm_int_callback(struct urb *urb)
152{
153 int rv = 0;
154 int status = urb->status;
155 struct wdm_device *desc;
156 struct usb_ctrlrequest *req;
157 struct usb_cdc_notification *dr;
158
159 desc = urb->context;
160 req = desc->irq;
161 dr = (struct usb_cdc_notification *)desc->sbuf;
162
163 if (status) {
164 switch (status) {
165 case -ESHUTDOWN:
166 case -ENOENT:
167 case -ECONNRESET:
168 return; /* unplug */
169 case -EPIPE:
170 set_bit(WDM_INT_STALL, &desc->flags);
171 err("Stall on int endpoint");
172 goto sw; /* halt is cleared in work */
173 default:
174 err("nonzero urb status received: %d", status);
175 break;
176 }
177 }
178
179 if (urb->actual_length < sizeof(struct usb_cdc_notification)) {
180 err("wdm_int_callback - %d bytes", urb->actual_length);
181 goto exit;
182 }
183
184 switch (dr->bNotificationType) {
185 case USB_CDC_NOTIFY_RESPONSE_AVAILABLE:
186 dev_dbg(&desc->intf->dev,
187 "NOTIFY_RESPONSE_AVAILABLE received: index %d len %d",
188 dr->wIndex, dr->wLength);
189 break;
190
191 case USB_CDC_NOTIFY_NETWORK_CONNECTION:
192
193 dev_dbg(&desc->intf->dev,
194 "NOTIFY_NETWORK_CONNECTION %s network",
195 dr->wValue ? "connected to" : "disconnected from");
196 goto exit;
197 default:
198 clear_bit(WDM_POLL_RUNNING, &desc->flags);
199 err("unknown notification %d received: index %d len %d",
200 dr->bNotificationType, dr->wIndex, dr->wLength);
201 goto exit;
202 }
203
204 req->bRequestType = (USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE);
205 req->bRequest = USB_CDC_GET_ENCAPSULATED_RESPONSE;
206 req->wValue = 0;
207 req->wIndex = desc->inum;
208 req->wLength = cpu_to_le16(desc->bMaxPacketSize0);
209
210 usb_fill_control_urb(
211 desc->response,
212 interface_to_usbdev(desc->intf),
213 /* using common endpoint 0 */
214 usb_rcvctrlpipe(interface_to_usbdev(desc->intf), 0),
215 (unsigned char *)req,
216 desc->inbuf,
217 desc->bMaxPacketSize0,
218 wdm_in_callback,
219 desc
220 );
221 desc->response->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
222 spin_lock(&desc->iuspin);
223 clear_bit(WDM_READ, &desc->flags);
224 if (!test_bit(WDM_DISCONNECTING, &desc->flags)) {
225 rv = usb_submit_urb(desc->response, GFP_ATOMIC);
226 dev_dbg(&desc->intf->dev, "%s: usb_submit_urb %d",
227 __func__, rv);
228 }
229 spin_unlock(&desc->iuspin);
230 if (rv < 0) {
231 if (rv == -EPERM)
232 return;
233 if (rv == -ENOMEM) {
234sw:
235 rv = schedule_work(&desc->rxwork);
236 if (rv)
237 err("Cannot schedule work");
238 }
239 }
240exit:
241 rv = usb_submit_urb(urb, GFP_ATOMIC);
242 if (rv)
243 err("%s - usb_submit_urb failed with result %d",
244 __func__, rv);
245
246}
247
248static void kill_urbs(struct wdm_device *desc)
249{
250 usb_kill_urb(desc->command);
251 usb_kill_urb(desc->validity);
252 usb_kill_urb(desc->response);
253}
254
255static void free_urbs(struct wdm_device *desc)
256{
257 usb_free_urb(desc->validity);
258 usb_free_urb(desc->response);
259 usb_free_urb(desc->command);
260}
261
262static void cleanup(struct wdm_device *desc)
263{
264 usb_buffer_free(interface_to_usbdev(desc->intf),
265 desc->wMaxPacketSize,
266 desc->sbuf,
267 desc->validity->transfer_dma);
268 usb_buffer_free(interface_to_usbdev(desc->intf),
269 desc->wMaxPacketSize,
270 desc->inbuf,
271 desc->response->transfer_dma);
272 kfree(desc->orq);
273 kfree(desc->irq);
274 kfree(desc->ubuf);
275 free_urbs(desc);
276 kfree(desc);
277}
278
279static ssize_t wdm_write
280(struct file *file, const char __user *buffer, size_t count, loff_t *ppos)
281{
282 u8 *buf;
283 int rv = -EMSGSIZE, r, we;
284 struct wdm_device *desc = file->private_data;
285 struct usb_ctrlrequest *req;
286
287 if (count > desc->wMaxCommand)
288 count = desc->wMaxCommand;
289
290 spin_lock_irq(&desc->iuspin);
291 we = desc->werr;
292 desc->werr = 0;
293 spin_unlock_irq(&desc->iuspin);
294 if (we < 0)
295 return -EIO;
296
297 r = mutex_lock_interruptible(&desc->wlock); /* concurrent writes */
298 rv = -ERESTARTSYS;
299 if (r)
300 goto outnl;
301
302 r = wait_event_interruptible(desc->wait, !test_bit(WDM_IN_USE,
303 &desc->flags));
304 if (r < 0)
305 goto out;
306
307 if (test_bit(WDM_DISCONNECTING, &desc->flags)) {
308 rv = -ENODEV;
309 goto out;
310 }
311
312 desc->outbuf = buf = kmalloc(count, GFP_KERNEL);
313 if (!buf) {
314 rv = -ENOMEM;
315 goto out;
316 }
317
318 r = copy_from_user(buf, buffer, count);
319 if (r > 0) {
320 kfree(buf);
321 rv = -EFAULT;
322 goto out;
323 }
324
325 req = desc->orq;
326 usb_fill_control_urb(
327 desc->command,
328 interface_to_usbdev(desc->intf),
329 /* using common endpoint 0 */
330 usb_sndctrlpipe(interface_to_usbdev(desc->intf), 0),
331 (unsigned char *)req,
332 buf,
333 count,
334 wdm_out_callback,
335 desc
336 );
337
338 req->bRequestType = (USB_DIR_OUT | USB_TYPE_CLASS |
339 USB_RECIP_INTERFACE);
340 req->bRequest = USB_CDC_SEND_ENCAPSULATED_COMMAND;
341 req->wValue = 0;
342 req->wIndex = desc->inum;
343 req->wLength = cpu_to_le16(count);
344 set_bit(WDM_IN_USE, &desc->flags);
345
346 rv = usb_submit_urb(desc->command, GFP_KERNEL);
347 if (rv < 0) {
348 kfree(buf);
349 clear_bit(WDM_IN_USE, &desc->flags);
350 } else {
351 dev_dbg(&desc->intf->dev, "Tx URB has been submitted index=%d",
352 req->wIndex);
353 }
354out:
355 mutex_unlock(&desc->wlock);
356outnl:
357 return rv < 0 ? rv : count;
358}
359
360static ssize_t wdm_read
361(struct file *file, char __user *buffer, size_t count, loff_t *ppos)
362{
363 int rv, cntr;
364 int i = 0;
365 struct wdm_device *desc = file->private_data;
366
367
368 rv = mutex_lock_interruptible(&desc->rlock); /*concurrent reads */
369 if (rv < 0)
370 return -ERESTARTSYS;
371
372 if (desc->length == 0) {
373 desc->read = 0;
374retry:
375 i++;
376 rv = wait_event_interruptible(desc->wait,
377 test_bit(WDM_READ, &desc->flags));
378
379 if (rv < 0) {
380 rv = -ERESTARTSYS;
381 goto err;
382 }
383
384 spin_lock_irq(&desc->iuspin);
385
386 if (desc->rerr) { /* read completed, error happened */
387 int t = desc->rerr;
388 desc->rerr = 0;
389 spin_unlock_irq(&desc->iuspin);
390 err("reading had resulted in %d", t);
391 rv = -EIO;
392 goto err;
393 }
394 /*
395 * recheck whether we've lost the race
396 * against the completion handler
397 */
398 if (!test_bit(WDM_READ, &desc->flags)) { /* lost race */
399 spin_unlock_irq(&desc->iuspin);
400 goto retry;
401 }
402 if (!desc->reslength) { /* zero length read */
403 spin_unlock_irq(&desc->iuspin);
404 goto retry;
405 }
406 clear_bit(WDM_READ, &desc->flags);
407 spin_unlock_irq(&desc->iuspin);
408 }
409
410 cntr = count > desc->length ? desc->length : count;
411 rv = copy_to_user(buffer, desc->ubuf, cntr);
412 if (rv > 0) {
413 rv = -EFAULT;
414 goto err;
415 }
416
417 for (i = 0; i < desc->length - cntr; i++)
418 desc->ubuf[i] = desc->ubuf[i + cntr];
419
420 desc->length -= cntr;
421 rv = cntr;
422
423err:
424 mutex_unlock(&desc->rlock);
425 if (rv < 0)
426 err("wdm_read: exit error");
427 return rv;
428}
429
430static int wdm_flush(struct file *file, fl_owner_t id)
431{
432 struct wdm_device *desc = file->private_data;
433
434 wait_event(desc->wait, !test_bit(WDM_IN_USE, &desc->flags));
435 if (desc->werr < 0)
436 err("Error in flush path: %d", desc->werr);
437
438 return desc->werr;
439}
440
441static unsigned int wdm_poll(struct file *file, struct poll_table_struct *wait)
442{
443 struct wdm_device *desc = file->private_data;
444 unsigned long flags;
445 unsigned int mask = 0;
446
447 spin_lock_irqsave(&desc->iuspin, flags);
448 if (test_bit(WDM_DISCONNECTING, &desc->flags)) {
449 mask = POLLERR;
450 spin_unlock_irqrestore(&desc->iuspin, flags);
451 goto desc_out;
452 }
453 if (test_bit(WDM_READ, &desc->flags))
454 mask = POLLIN | POLLRDNORM;
455 if (desc->rerr || desc->werr)
456 mask |= POLLERR;
457 if (!test_bit(WDM_IN_USE, &desc->flags))
458 mask |= POLLOUT | POLLWRNORM;
459 spin_unlock_irqrestore(&desc->iuspin, flags);
460
461 poll_wait(file, &desc->wait, wait);
462
463desc_out:
464 return mask;
465}
466
467static int wdm_open(struct inode *inode, struct file *file)
468{
469 int minor = iminor(inode);
470 int rv = -ENODEV;
471 struct usb_interface *intf;
472 struct wdm_device *desc;
473
474 mutex_lock(&wdm_mutex);
475 intf = usb_find_interface(&wdm_driver, minor);
476 if (!intf)
477 goto out;
478
479 desc = usb_get_intfdata(intf);
480 if (test_bit(WDM_DISCONNECTING, &desc->flags))
481 goto out;
482
483 desc->count++;
484 file->private_data = desc;
485
486 rv = usb_submit_urb(desc->validity, GFP_KERNEL);
487
488 if (rv < 0) {
489 desc->count--;
490 err("Error submitting int urb - %d", rv);
491 goto out;
492 }
493 rv = 0;
494
495out:
496 mutex_unlock(&wdm_mutex);
497 return rv;
498}
499
500static int wdm_release(struct inode *inode, struct file *file)
501{
502 struct wdm_device *desc = file->private_data;
503
504 mutex_lock(&wdm_mutex);
505 desc->count--;
506 if (!desc->count) {
507 dev_dbg(&desc->intf->dev, "wdm_release: cleanup");
508 kill_urbs(desc);
509 }
510 mutex_unlock(&wdm_mutex);
511 return 0;
512}
513
514static const struct file_operations wdm_fops = {
515 .owner = THIS_MODULE,
516 .read = wdm_read,
517 .write = wdm_write,
518 .open = wdm_open,
519 .flush = wdm_flush,
520 .release = wdm_release,
521 .poll = wdm_poll
522};
523
524static struct usb_class_driver wdm_class = {
525 .name = "cdc-wdm%d",
526 .fops = &wdm_fops,
527 .minor_base = WDM_MINOR_BASE,
528};
529
530/* --- error handling --- */
531static void wdm_rxwork(struct work_struct *work)
532{
533 struct wdm_device *desc = container_of(work, struct wdm_device, rxwork);
534 unsigned long flags;
535 int rv;
536
537 spin_lock_irqsave(&desc->iuspin, flags);
538 if (test_bit(WDM_DISCONNECTING, &desc->flags)) {
539 spin_unlock_irqrestore(&desc->iuspin, flags);
540 } else {
541 spin_unlock_irqrestore(&desc->iuspin, flags);
542 rv = usb_submit_urb(desc->response, GFP_KERNEL);
543 if (rv < 0 && rv != -EPERM) {
544 spin_lock_irqsave(&desc->iuspin, flags);
545 if (!test_bit(WDM_DISCONNECTING, &desc->flags))
546 schedule_work(&desc->rxwork);
547 spin_unlock_irqrestore(&desc->iuspin, flags);
548 }
549 }
550}
551
552/* --- hotplug --- */
553
554static int wdm_probe(struct usb_interface *intf, const struct usb_device_id *id)
555{
556 int rv = -EINVAL;
557 struct usb_device *udev = interface_to_usbdev(intf);
558 struct wdm_device *desc;
559 struct usb_host_interface *iface;
560 struct usb_endpoint_descriptor *ep;
561 struct usb_cdc_dmm_desc *dmhd;
562 u8 *buffer = intf->altsetting->extra;
563 int buflen = intf->altsetting->extralen;
564 u16 maxcom = 0;
565
566 if (!buffer)
567 goto out;
568
569 while (buflen > 0) {
570 if (buffer [1] != USB_DT_CS_INTERFACE) {
571 err("skipping garbage");
572 goto next_desc;
573 }
574
575 switch (buffer [2]) {
576 case USB_CDC_HEADER_TYPE:
577 break;
578 case USB_CDC_DMM_TYPE:
579 dmhd = (struct usb_cdc_dmm_desc *)buffer;
580 maxcom = le16_to_cpu(dmhd->wMaxCommand);
581 dev_dbg(&intf->dev,
582 "Finding maximum buffer length: %d", maxcom);
583 break;
584 default:
585 err("Ignoring extra header, type %d, length %d",
586 buffer[2], buffer[0]);
587 break;
588 }
589next_desc:
590 buflen -= buffer[0];
591 buffer += buffer[0];
592 }
593
594 rv = -ENOMEM;
595 desc = kzalloc(sizeof(struct wdm_device), GFP_KERNEL);
596 if (!desc)
597 goto out;
598 mutex_init(&desc->wlock);
599 mutex_init(&desc->rlock);
600 spin_lock_init(&desc->iuspin);
601 init_waitqueue_head(&desc->wait);
602 desc->wMaxCommand = maxcom;
603 desc->inum = cpu_to_le16((u16)intf->cur_altsetting->desc.bInterfaceNumber);
604 desc->intf = intf;
605 INIT_WORK(&desc->rxwork, wdm_rxwork);
606
607 iface = &intf->altsetting[0];
608 ep = &iface->endpoint[0].desc;
609 if (!usb_endpoint_is_int_in(ep)) {
610 rv = -EINVAL;
611 goto err;
612 }
613
614 desc->wMaxPacketSize = le16_to_cpu(ep->wMaxPacketSize);
615 desc->bMaxPacketSize0 = udev->descriptor.bMaxPacketSize0;
616
617 desc->orq = kmalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL);
618 if (!desc->orq)
619 goto err;
620 desc->irq = kmalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL);
621 if (!desc->irq)
622 goto err;
623
624 desc->validity = usb_alloc_urb(0, GFP_KERNEL);
625 if (!desc->validity)
626 goto err;
627
628 desc->response = usb_alloc_urb(0, GFP_KERNEL);
629 if (!desc->response)
630 goto err;
631
632 desc->command = usb_alloc_urb(0, GFP_KERNEL);
633 if (!desc->command)
634 goto err;
635
636 desc->ubuf = kmalloc(desc->wMaxCommand, GFP_KERNEL);
637 if (!desc->ubuf)
638 goto err;
639
640 desc->sbuf = usb_buffer_alloc(interface_to_usbdev(intf),
641 desc->wMaxPacketSize,
642 GFP_KERNEL,
643 &desc->validity->transfer_dma);
644 if (!desc->sbuf)
645 goto err;
646
647 desc->inbuf = usb_buffer_alloc(interface_to_usbdev(intf),
648 desc->bMaxPacketSize0,
649 GFP_KERNEL,
650 &desc->response->transfer_dma);
651 if (!desc->inbuf)
652 goto err2;
653
654 usb_fill_int_urb(
655 desc->validity,
656 interface_to_usbdev(intf),
657 usb_rcvintpipe(interface_to_usbdev(intf), ep->bEndpointAddress),
658 desc->sbuf,
659 desc->wMaxPacketSize,
660 wdm_int_callback,
661 desc,
662 ep->bInterval
663 );
664 desc->validity->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
665
666 usb_set_intfdata(intf, desc);
667 rv = usb_register_dev(intf, &wdm_class);
668 dev_info(&intf->dev, "cdc-wdm%d: USB WDM device\n",
669 intf->minor - WDM_MINOR_BASE);
670 if (rv < 0)
671 goto err;
672out:
673 return rv;
674err2:
675 usb_buffer_free(interface_to_usbdev(desc->intf),
676 desc->wMaxPacketSize,
677 desc->sbuf,
678 desc->validity->transfer_dma);
679err:
680 free_urbs(desc);
681 kfree(desc->ubuf);
682 kfree(desc->orq);
683 kfree(desc->irq);
684 kfree(desc);
685 return rv;
686}
687
688static void wdm_disconnect(struct usb_interface *intf)
689{
690 struct wdm_device *desc;
691 unsigned long flags;
692
693 usb_deregister_dev(intf, &wdm_class);
694 mutex_lock(&wdm_mutex);
695 desc = usb_get_intfdata(intf);
696
697 /* the spinlock makes sure no new urbs are generated in the callbacks */
698 spin_lock_irqsave(&desc->iuspin, flags);
699 set_bit(WDM_DISCONNECTING, &desc->flags);
700 set_bit(WDM_READ, &desc->flags);
701 clear_bit(WDM_IN_USE, &desc->flags);
702 spin_unlock_irqrestore(&desc->iuspin, flags);
703 cancel_work_sync(&desc->rxwork);
704 kill_urbs(desc);
705 wake_up_all(&desc->wait);
706 if (!desc->count)
707 cleanup(desc);
708 mutex_unlock(&wdm_mutex);
709}
710
711static struct usb_driver wdm_driver = {
712 .name = "cdc_wdm",
713 .probe = wdm_probe,
714 .disconnect = wdm_disconnect,
715 .id_table = wdm_ids,
716};
717
718/* --- low level module stuff --- */
719
720static int __init wdm_init(void)
721{
722 int rv;
723
724 rv = usb_register(&wdm_driver);
725
726 return rv;
727}
728
729static void __exit wdm_exit(void)
730{
731 usb_deregister(&wdm_driver);
732}
733
734module_init(wdm_init);
735module_exit(wdm_exit);
736
737MODULE_AUTHOR(DRIVER_AUTHOR);
738MODULE_DESCRIPTION("USB Abstract Control Model driver for "
739 "USB WCM Device Management");
740MODULE_LICENSE("GPL");
diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c
index c1cb94e9f242..7e912f21fd36 100644
--- a/drivers/usb/core/generic.c
+++ b/drivers/usb/core/generic.c
@@ -155,9 +155,6 @@ static int generic_probe(struct usb_device *udev)
155{ 155{
156 int err, c; 156 int err, c;
157 157
158 /* put device-specific files into sysfs */
159 usb_create_sysfs_dev_files(udev);
160
161 /* Choose and set the configuration. This registers the interfaces 158 /* Choose and set the configuration. This registers the interfaces
162 * with the driver core and lets interface drivers bind to them. 159 * with the driver core and lets interface drivers bind to them.
163 */ 160 */
@@ -189,8 +186,6 @@ static void generic_disconnect(struct usb_device *udev)
189 * unconfigure the device */ 186 * unconfigure the device */
190 if (udev->actconfig) 187 if (udev->actconfig)
191 usb_set_configuration(udev, -1); 188 usb_set_configuration(udev, -1);
192
193 usb_remove_sysfs_dev_files(udev);
194} 189}
195 190
196#ifdef CONFIG_PM 191#ifdef CONFIG_PM
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index bf10e9c4195e..42a436478b78 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -818,12 +818,12 @@ static int usb_register_bus(struct usb_bus *bus)
818 set_bit (busnum, busmap.busmap); 818 set_bit (busnum, busmap.busmap);
819 bus->busnum = busnum; 819 bus->busnum = busnum;
820 820
821 bus->dev = device_create(usb_host_class, bus->controller, MKDEV(0, 0), 821 bus->dev = device_create_drvdata(usb_host_class, bus->controller,
822 "usb_host%d", busnum); 822 MKDEV(0, 0), bus,
823 "usb_host%d", busnum);
823 result = PTR_ERR(bus->dev); 824 result = PTR_ERR(bus->dev);
824 if (IS_ERR(bus->dev)) 825 if (IS_ERR(bus->dev))
825 goto error_create_class_dev; 826 goto error_create_class_dev;
826 dev_set_drvdata(bus->dev, bus);
827 827
828 /* Add it to the local list of buses */ 828 /* Add it to the local list of buses */
829 list_add (&bus->bus_list, &usb_bus_list); 829 list_add (&bus->bus_list, &usb_bus_list);
@@ -924,6 +924,15 @@ static int register_root_hub(struct usb_hcd *hcd)
924 return retval; 924 return retval;
925} 925}
926 926
927void usb_enable_root_hub_irq (struct usb_bus *bus)
928{
929 struct usb_hcd *hcd;
930
931 hcd = container_of (bus, struct usb_hcd, self);
932 if (hcd->driver->hub_irq_enable && hcd->state != HC_STATE_HALT)
933 hcd->driver->hub_irq_enable (hcd);
934}
935
927 936
928/*-------------------------------------------------------------------------*/ 937/*-------------------------------------------------------------------------*/
929 938
@@ -1684,19 +1693,30 @@ EXPORT_SYMBOL_GPL(usb_bus_start_enum);
1684irqreturn_t usb_hcd_irq (int irq, void *__hcd) 1693irqreturn_t usb_hcd_irq (int irq, void *__hcd)
1685{ 1694{
1686 struct usb_hcd *hcd = __hcd; 1695 struct usb_hcd *hcd = __hcd;
1687 int start = hcd->state; 1696 unsigned long flags;
1697 irqreturn_t rc;
1688 1698
1689 if (unlikely(start == HC_STATE_HALT || 1699 /* IRQF_DISABLED doesn't work correctly with shared IRQs
1690 !test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags))) 1700 * when the first handler doesn't use it. So let's just
1691 return IRQ_NONE; 1701 * assume it's never used.
1692 if (hcd->driver->irq (hcd) == IRQ_NONE) 1702 */
1693 return IRQ_NONE; 1703 local_irq_save(flags);
1694 1704
1695 set_bit(HCD_FLAG_SAW_IRQ, &hcd->flags); 1705 if (unlikely(hcd->state == HC_STATE_HALT ||
1706 !test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags))) {
1707 rc = IRQ_NONE;
1708 } else if (hcd->driver->irq(hcd) == IRQ_NONE) {
1709 rc = IRQ_NONE;
1710 } else {
1711 set_bit(HCD_FLAG_SAW_IRQ, &hcd->flags);
1712
1713 if (unlikely(hcd->state == HC_STATE_HALT))
1714 usb_hc_died(hcd);
1715 rc = IRQ_HANDLED;
1716 }
1696 1717
1697 if (unlikely(hcd->state == HC_STATE_HALT)) 1718 local_irq_restore(flags);
1698 usb_hc_died (hcd); 1719 return rc;
1699 return IRQ_HANDLED;
1700} 1720}
1701 1721
1702/*-------------------------------------------------------------------------*/ 1722/*-------------------------------------------------------------------------*/
@@ -1860,6 +1880,13 @@ int usb_add_hcd(struct usb_hcd *hcd,
1860 1880
1861 /* enable irqs just before we start the controller */ 1881 /* enable irqs just before we start the controller */
1862 if (hcd->driver->irq) { 1882 if (hcd->driver->irq) {
1883
1884 /* IRQF_DISABLED doesn't work as advertised when used together
1885 * with IRQF_SHARED. As usb_hcd_irq() will always disable
1886 * interrupts we can remove it here.
1887 */
1888 irqflags &= ~IRQF_DISABLED;
1889
1863 snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d", 1890 snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d",
1864 hcd->driver->description, hcd->self.busnum); 1891 hcd->driver->description, hcd->self.busnum);
1865 if ((retval = request_irq(irqnum, &usb_hcd_irq, irqflags, 1892 if ((retval = request_irq(irqnum, &usb_hcd_irq, irqflags,
diff --git a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h
index 1e4b81e9eb50..b9de1569b39e 100644
--- a/drivers/usb/core/hcd.h
+++ b/drivers/usb/core/hcd.h
@@ -210,9 +210,13 @@ struct hc_driver {
210 int (*bus_suspend)(struct usb_hcd *); 210 int (*bus_suspend)(struct usb_hcd *);
211 int (*bus_resume)(struct usb_hcd *); 211 int (*bus_resume)(struct usb_hcd *);
212 int (*start_port_reset)(struct usb_hcd *, unsigned port_num); 212 int (*start_port_reset)(struct usb_hcd *, unsigned port_num);
213 void (*hub_irq_enable)(struct usb_hcd *);
214 /* Needed only if port-change IRQs are level-triggered */
213 215
214 /* force handover of high-speed port to full-speed companion */ 216 /* force handover of high-speed port to full-speed companion */
215 void (*relinquish_port)(struct usb_hcd *, int); 217 void (*relinquish_port)(struct usb_hcd *, int);
218 /* has a port been handed over to a companion? */
219 int (*port_handed_over)(struct usb_hcd *, int);
216}; 220};
217 221
218extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb); 222extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb);
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index eb57fcc701d7..4cfe32a16c37 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -644,6 +644,48 @@ static void hub_stop(struct usb_hub *hub)
644 644
645#ifdef CONFIG_PM 645#ifdef CONFIG_PM
646 646
647/* Try to identify which devices need USB-PERSIST handling */
648static int persistent_device(struct usb_device *udev)
649{
650 int i;
651 int retval;
652 struct usb_host_config *actconfig;
653
654 /* Explicitly not marked persistent? */
655 if (!udev->persist_enabled)
656 return 0;
657
658 /* No active config? */
659 actconfig = udev->actconfig;
660 if (!actconfig)
661 return 0;
662
663 /* FIXME! We should check whether it's open here or not! */
664
665 /*
666 * Check that all the interface drivers have a
667 * 'reset_resume' entrypoint
668 */
669 retval = 0;
670 for (i = 0; i < actconfig->desc.bNumInterfaces; i++) {
671 struct usb_interface *intf;
672 struct usb_driver *driver;
673
674 intf = actconfig->interface[i];
675 if (!intf->dev.driver)
676 continue;
677 driver = to_usb_driver(intf->dev.driver);
678 if (!driver->reset_resume)
679 return 0;
680 /*
681 * We have at least one driver, and that one
682 * has a reset_resume method.
683 */
684 retval = 1;
685 }
686 return retval;
687}
688
647static void hub_restart(struct usb_hub *hub, int type) 689static void hub_restart(struct usb_hub *hub, int type)
648{ 690{
649 struct usb_device *hdev = hub->hdev; 691 struct usb_device *hdev = hub->hdev;
@@ -671,26 +713,19 @@ static void hub_restart(struct usb_hub *hub, int type)
671 } 713 }
672 714
673 /* Was the power session lost while we were suspended? */ 715 /* Was the power session lost while we were suspended? */
674 switch (type) { 716 status = hub_port_status(hub, port1, &portstatus, &portchange);
675 case HUB_RESET_RESUME:
676 portstatus = 0;
677 portchange = USB_PORT_STAT_C_CONNECTION;
678 break;
679 717
680 case HUB_RESET: 718 /* If the device is gone, khubd will handle it later */
681 case HUB_RESUME: 719 if (status == 0 && !(portstatus & USB_PORT_STAT_CONNECTION))
682 status = hub_port_status(hub, port1, 720 continue;
683 &portstatus, &portchange);
684 break;
685 }
686 721
687 /* For "USB_PERSIST"-enabled children we must 722 /* For "USB_PERSIST"-enabled children we must
688 * mark the child device for reset-resume and 723 * mark the child device for reset-resume and
689 * turn off the various status changes to prevent 724 * turn off the various status changes to prevent
690 * khubd from disconnecting it later. 725 * khubd from disconnecting it later.
691 */ 726 */
692 if (udev->persist_enabled && status == 0 && 727 if (status == 0 && !(portstatus & USB_PORT_STAT_ENABLE) &&
693 !(portstatus & USB_PORT_STAT_ENABLE)) { 728 persistent_device(udev)) {
694 if (portchange & USB_PORT_STAT_C_ENABLE) 729 if (portchange & USB_PORT_STAT_C_ENABLE)
695 clear_port_feature(hub->hdev, port1, 730 clear_port_feature(hub->hdev, port1,
696 USB_PORT_FEAT_C_ENABLE); 731 USB_PORT_FEAT_C_ENABLE);
@@ -1326,6 +1361,12 @@ void usb_disconnect(struct usb_device **pdev)
1326 1361
1327 usb_unlock_device(udev); 1362 usb_unlock_device(udev);
1328 1363
1364 /* Remove the device-specific files from sysfs. This must be
1365 * done with udev unlocked, because some of the attribute
1366 * routines try to acquire the device lock.
1367 */
1368 usb_remove_sysfs_dev_files(udev);
1369
1329 /* Unregister the device. The device driver is responsible 1370 /* Unregister the device. The device driver is responsible
1330 * for removing the device files from usbfs and sysfs and for 1371 * for removing the device files from usbfs and sysfs and for
1331 * de-configuring the device. 1372 * de-configuring the device.
@@ -1541,6 +1582,9 @@ int usb_new_device(struct usb_device *udev)
1541 goto fail; 1582 goto fail;
1542 } 1583 }
1543 1584
1585 /* put device-specific files into sysfs */
1586 usb_create_sysfs_dev_files(udev);
1587
1544 /* Tell the world! */ 1588 /* Tell the world! */
1545 announce_device(udev); 1589 announce_device(udev);
1546 return err; 1590 return err;
@@ -2029,6 +2073,8 @@ int usb_port_resume(struct usb_device *udev)
2029 } 2073 }
2030 2074
2031 clear_bit(port1, hub->busy_bits); 2075 clear_bit(port1, hub->busy_bits);
2076 if (!hub->hdev->parent && !hub->busy_bits[0])
2077 usb_enable_root_hub_irq(hub->hdev->bus);
2032 2078
2033 if (status == 0) 2079 if (status == 0)
2034 status = finish_port_resume(udev); 2080 status = finish_port_resume(udev);
@@ -2744,7 +2790,11 @@ loop:
2744 if ((status == -ENOTCONN) || (status == -ENOTSUPP)) 2790 if ((status == -ENOTCONN) || (status == -ENOTSUPP))
2745 break; 2791 break;
2746 } 2792 }
2747 dev_err(hub_dev, "unable to enumerate USB device on port %d\n", port1); 2793 if (hub->hdev->parent ||
2794 !hcd->driver->port_handed_over ||
2795 !(hcd->driver->port_handed_over)(hcd, port1))
2796 dev_err(hub_dev, "unable to enumerate USB device on port %d\n",
2797 port1);
2748 2798
2749done: 2799done:
2750 hub_port_disable(hub, port1, 1); 2800 hub_port_disable(hub, port1, 1);
@@ -2954,6 +3004,11 @@ static void hub_events(void)
2954 3004
2955 hub->activating = 0; 3005 hub->activating = 0;
2956 3006
3007 /* If this is a root hub, tell the HCD it's okay to
3008 * re-enable port-change interrupts now. */
3009 if (!hdev->parent && !hub->busy_bits[0])
3010 usb_enable_root_hub_irq(hdev->bus);
3011
2957loop_autopm: 3012loop_autopm:
2958 /* Allow autosuspend if we're not going to run again */ 3013 /* Allow autosuspend if we're not going to run again */
2959 if (list_empty(&hub->event_list)) 3014 if (list_empty(&hub->event_list))
@@ -3179,6 +3234,8 @@ int usb_reset_device(struct usb_device *udev)
3179 break; 3234 break;
3180 } 3235 }
3181 clear_bit(port1, parent_hub->busy_bits); 3236 clear_bit(port1, parent_hub->busy_bits);
3237 if (!parent_hdev->parent && !parent_hub->busy_bits[0])
3238 usb_enable_root_hub_irq(parent_hdev->bus);
3182 3239
3183 if (ret < 0) 3240 if (ret < 0)
3184 goto re_enumerate; 3241 goto re_enumerate;
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index 2e2019390290..c070b34b669d 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -47,6 +47,13 @@ static const struct usb_device_id usb_quirk_list[] = {
47 /* Edirol SD-20 */ 47 /* Edirol SD-20 */
48 { USB_DEVICE(0x0582, 0x0027), .driver_info = USB_QUIRK_RESET_RESUME }, 48 { USB_DEVICE(0x0582, 0x0027), .driver_info = USB_QUIRK_RESET_RESUME },
49 49
50 /* appletouch */
51 { USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME },
52
53 /* Avision AV600U */
54 { USB_DEVICE(0x0638, 0x0a13), .driver_info =
55 USB_QUIRK_STRING_FETCH_255 },
56
50 /* M-Systems Flash Disk Pioneers */ 57 /* M-Systems Flash Disk Pioneers */
51 { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME }, 58 { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME },
52 59
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c
index c783cb111847..5e1f5d55bf04 100644
--- a/drivers/usb/core/sysfs.c
+++ b/drivers/usb/core/sysfs.c
@@ -588,35 +588,33 @@ read_descriptors(struct kobject *kobj, struct bin_attribute *attr,
588 container_of(kobj, struct device, kobj)); 588 container_of(kobj, struct device, kobj));
589 size_t nleft = count; 589 size_t nleft = count;
590 size_t srclen, n; 590 size_t srclen, n;
591 int cfgno;
592 void *src;
591 593
592 usb_lock_device(udev); 594 /* The binary attribute begins with the device descriptor.
593 595 * Following that are the raw descriptor entries for all the
594 /* The binary attribute begins with the device descriptor */ 596 * configurations (config plus subsidiary descriptors).
595 srclen = sizeof(struct usb_device_descriptor);
596 if (off < srclen) {
597 n = min_t(size_t, nleft, srclen - off);
598 memcpy(buf, off + (char *) &udev->descriptor, n);
599 nleft -= n;
600 buf += n;
601 off = 0;
602 } else {
603 off -= srclen;
604 }
605
606 /* Then follows the raw descriptor entry for the current
607 * configuration (config plus subsidiary descriptors).
608 */ 597 */
609 if (udev->actconfig) { 598 for (cfgno = -1; cfgno < udev->descriptor.bNumConfigurations &&
610 int cfgno = udev->actconfig - udev->config; 599 nleft > 0; ++cfgno) {
611 600 if (cfgno < 0) {
612 srclen = __le16_to_cpu(udev->actconfig->desc.wTotalLength); 601 src = &udev->descriptor;
602 srclen = sizeof(struct usb_device_descriptor);
603 } else {
604 src = udev->rawdescriptors[cfgno];
605 srclen = __le16_to_cpu(udev->config[cfgno].desc.
606 wTotalLength);
607 }
613 if (off < srclen) { 608 if (off < srclen) {
614 n = min_t(size_t, nleft, srclen - off); 609 n = min(nleft, srclen - (size_t) off);
615 memcpy(buf, off + udev->rawdescriptors[cfgno], n); 610 memcpy(buf, src + off, n);
616 nleft -= n; 611 nleft -= n;
612 buf += n;
613 off = 0;
614 } else {
615 off -= srclen;
617 } 616 }
618 } 617 }
619 usb_unlock_device(udev);
620 return count - nleft; 618 return count - nleft;
621} 619}
622 620
diff --git a/drivers/usb/gadget/fsl_usb2_udc.c b/drivers/usb/gadget/fsl_usb2_udc.c
index 651b82701394..18687543d7fa 100644
--- a/drivers/usb/gadget/fsl_usb2_udc.c
+++ b/drivers/usb/gadget/fsl_usb2_udc.c
@@ -1627,7 +1627,9 @@ static int reset_queues(struct fsl_udc *udc)
1627 udc_reset_ep_queue(udc, pipe); 1627 udc_reset_ep_queue(udc, pipe);
1628 1628
1629 /* report disconnect; the driver is already quiesced */ 1629 /* report disconnect; the driver is already quiesced */
1630 spin_unlock(&udc->lock);
1630 udc->driver->disconnect(&udc->gadget); 1631 udc->driver->disconnect(&udc->gadget);
1632 spin_lock(&udc->lock);
1631 1633
1632 return 0; 1634 return 0;
1633} 1635}
diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c
index 499b7a23f351..e02bfd4df3a6 100644
--- a/drivers/usb/gadget/pxa27x_udc.c
+++ b/drivers/usb/gadget/pxa27x_udc.c
@@ -1526,7 +1526,8 @@ static void udc_disable(struct pxa_udc *udc)
1526 1526
1527 ep0_idle(udc); 1527 ep0_idle(udc);
1528 udc->gadget.speed = USB_SPEED_UNKNOWN; 1528 udc->gadget.speed = USB_SPEED_UNKNOWN;
1529 udc->mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT); 1529 if (udc->mach->udc_command)
1530 udc->mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT);
1530} 1531}
1531 1532
1532/** 1533/**
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 1ef6df395e0c..228797e54f9c 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -300,8 +300,8 @@ config USB_R8A66597_HCD
300 module will be called r8a66597-hcd. 300 module will be called r8a66597-hcd.
301 301
302config SUPERH_ON_CHIP_R8A66597 302config SUPERH_ON_CHIP_R8A66597
303 boolean "Enable SuperH on-chip USB like the R8A66597" 303 boolean "Enable SuperH on-chip R8A66597 USB"
304 depends on USB_R8A66597_HCD && CPU_SUBTYPE_SH7366 304 depends on USB_R8A66597_HCD && (CPU_SUBTYPE_SH7366 || CPU_SUBTYPE_SH7723)
305 help 305 help
306 Renesas SuperH processor has USB like the R8A66597. 306 This driver enables support for the on-chip R8A66597 in the
307 This driver supported processor is SH7366. 307 SH7366 and SH7723 processors.
diff --git a/drivers/usb/host/ehci-au1xxx.c b/drivers/usb/host/ehci-au1xxx.c
index 8b5f991e949c..08a4335401a9 100644
--- a/drivers/usb/host/ehci-au1xxx.c
+++ b/drivers/usb/host/ehci-au1xxx.c
@@ -223,6 +223,7 @@ static const struct hc_driver ehci_au1xxx_hc_driver = {
223 .bus_suspend = ehci_bus_suspend, 223 .bus_suspend = ehci_bus_suspend,
224 .bus_resume = ehci_bus_resume, 224 .bus_resume = ehci_bus_resume,
225 .relinquish_port = ehci_relinquish_port, 225 .relinquish_port = ehci_relinquish_port,
226 .port_handed_over = ehci_port_handed_over,
226}; 227};
227 228
228/*-------------------------------------------------------------------------*/ 229/*-------------------------------------------------------------------------*/
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index 6d9bed6c1f48..7370d6187c64 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -269,7 +269,7 @@ static int ehci_fsl_setup(struct usb_hcd *hcd)
269 if (retval) 269 if (retval)
270 return retval; 270 return retval;
271 271
272 ehci->is_tdi_rh_tt = 1; 272 hcd->has_tt = 1;
273 273
274 ehci->sbrn = 0x20; 274 ehci->sbrn = 0x20;
275 275
@@ -295,10 +295,6 @@ static const struct hc_driver ehci_fsl_hc_driver = {
295 */ 295 */
296 .reset = ehci_fsl_setup, 296 .reset = ehci_fsl_setup,
297 .start = ehci_run, 297 .start = ehci_run,
298#ifdef CONFIG_PM
299 .suspend = ehci_bus_suspend,
300 .resume = ehci_bus_resume,
301#endif
302 .stop = ehci_stop, 298 .stop = ehci_stop,
303 .shutdown = ehci_shutdown, 299 .shutdown = ehci_shutdown,
304 300
@@ -322,6 +318,7 @@ static const struct hc_driver ehci_fsl_hc_driver = {
322 .bus_suspend = ehci_bus_suspend, 318 .bus_suspend = ehci_bus_suspend,
323 .bus_resume = ehci_bus_resume, 319 .bus_resume = ehci_bus_resume,
324 .relinquish_port = ehci_relinquish_port, 320 .relinquish_port = ehci_relinquish_port,
321 .port_handed_over = ehci_port_handed_over,
325}; 322};
326 323
327static int ehci_fsl_drv_probe(struct platform_device *pdev) 324static int ehci_fsl_drv_probe(struct platform_device *pdev)
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
index 382587c4457c..740835bb8575 100644
--- a/drivers/usb/host/ehci-hub.c
+++ b/drivers/usb/host/ehci-hub.c
@@ -609,7 +609,7 @@ static int ehci_hub_control (
609 } 609 }
610 break; 610 break;
611 case USB_PORT_FEAT_C_SUSPEND: 611 case USB_PORT_FEAT_C_SUSPEND:
612 /* we auto-clear this feature */ 612 clear_bit(wIndex, &ehci->port_c_suspend);
613 break; 613 break;
614 case USB_PORT_FEAT_POWER: 614 case USB_PORT_FEAT_POWER:
615 if (HCS_PPC (ehci->hcs_params)) 615 if (HCS_PPC (ehci->hcs_params))
@@ -688,7 +688,7 @@ static int ehci_hub_control (
688 /* resume completed? */ 688 /* resume completed? */
689 else if (time_after_eq(jiffies, 689 else if (time_after_eq(jiffies,
690 ehci->reset_done[wIndex])) { 690 ehci->reset_done[wIndex])) {
691 status |= 1 << USB_PORT_FEAT_C_SUSPEND; 691 set_bit(wIndex, &ehci->port_c_suspend);
692 ehci->reset_done[wIndex] = 0; 692 ehci->reset_done[wIndex] = 0;
693 693
694 /* stop resume signaling */ 694 /* stop resume signaling */
@@ -765,6 +765,8 @@ static int ehci_hub_control (
765 status |= 1 << USB_PORT_FEAT_RESET; 765 status |= 1 << USB_PORT_FEAT_RESET;
766 if (temp & PORT_POWER) 766 if (temp & PORT_POWER)
767 status |= 1 << USB_PORT_FEAT_POWER; 767 status |= 1 << USB_PORT_FEAT_POWER;
768 if (test_bit(wIndex, &ehci->port_c_suspend))
769 status |= 1 << USB_PORT_FEAT_C_SUSPEND;
768 770
769#ifndef VERBOSE_DEBUG 771#ifndef VERBOSE_DEBUG
770 if (status & ~0xffff) /* only if wPortChange is interesting */ 772 if (status & ~0xffff) /* only if wPortChange is interesting */
@@ -875,3 +877,13 @@ static void ehci_relinquish_port(struct usb_hcd *hcd, int portnum)
875 set_owner(ehci, --portnum, PORT_OWNER); 877 set_owner(ehci, --portnum, PORT_OWNER);
876} 878}
877 879
880static int ehci_port_handed_over(struct usb_hcd *hcd, int portnum)
881{
882 struct ehci_hcd *ehci = hcd_to_ehci(hcd);
883 u32 __iomem *reg;
884
885 if (ehci_is_TDI(ehci))
886 return 0;
887 reg = &ehci->regs->port_status[portnum - 1];
888 return ehci_readl(ehci, reg) & PORT_OWNER;
889}
diff --git a/drivers/usb/host/ehci-ixp4xx.c b/drivers/usb/host/ehci-ixp4xx.c
index 601c8795a854..9d042f220097 100644
--- a/drivers/usb/host/ehci-ixp4xx.c
+++ b/drivers/usb/host/ehci-ixp4xx.c
@@ -26,7 +26,7 @@ static int ixp4xx_ehci_init(struct usb_hcd *hcd)
26 + HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase)); 26 + HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase));
27 ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); 27 ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params);
28 28
29 ehci->is_tdi_rh_tt = 1; 29 hcd->has_tt = 1;
30 ehci_reset(ehci); 30 ehci_reset(ehci);
31 31
32 retval = ehci_init(hcd); 32 retval = ehci_init(hcd);
@@ -58,6 +58,8 @@ static const struct hc_driver ixp4xx_ehci_hc_driver = {
58 .bus_suspend = ehci_bus_suspend, 58 .bus_suspend = ehci_bus_suspend,
59 .bus_resume = ehci_bus_resume, 59 .bus_resume = ehci_bus_resume,
60#endif 60#endif
61 .relinquish_port = ehci_relinquish_port,
62 .port_handed_over = ehci_port_handed_over,
61}; 63};
62 64
63static int ixp4xx_ehci_probe(struct platform_device *pdev) 65static int ixp4xx_ehci_probe(struct platform_device *pdev)
diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c
index d187d0313742..ab625f0ba1d9 100644
--- a/drivers/usb/host/ehci-orion.c
+++ b/drivers/usb/host/ehci-orion.c
@@ -115,6 +115,8 @@ static int ehci_orion_setup(struct usb_hcd *hcd)
115 if (retval) 115 if (retval)
116 return retval; 116 return retval;
117 117
118 hcd->has_tt = 1;
119
118 ehci_reset(ehci); 120 ehci_reset(ehci);
119 ehci_port_power(ehci, 0); 121 ehci_port_power(ehci, 0);
120 122
@@ -137,10 +139,6 @@ static const struct hc_driver ehci_orion_hc_driver = {
137 */ 139 */
138 .reset = ehci_orion_setup, 140 .reset = ehci_orion_setup,
139 .start = ehci_run, 141 .start = ehci_run,
140#ifdef CONFIG_PM
141 .suspend = ehci_bus_suspend,
142 .resume = ehci_bus_resume,
143#endif
144 .stop = ehci_stop, 142 .stop = ehci_stop,
145 .shutdown = ehci_shutdown, 143 .shutdown = ehci_shutdown,
146 144
@@ -163,6 +161,8 @@ static const struct hc_driver ehci_orion_hc_driver = {
163 .hub_control = ehci_hub_control, 161 .hub_control = ehci_hub_control,
164 .bus_suspend = ehci_bus_suspend, 162 .bus_suspend = ehci_bus_suspend,
165 .bus_resume = ehci_bus_resume, 163 .bus_resume = ehci_bus_resume,
164 .relinquish_port = ehci_relinquish_port,
165 .port_handed_over = ehci_port_handed_over,
166}; 166};
167 167
168static void __init 168static void __init
@@ -248,7 +248,7 @@ static int __init ehci_orion_drv_probe(struct platform_device *pdev)
248 ehci->regs = hcd->regs + 0x100 + 248 ehci->regs = hcd->regs + 0x100 +
249 HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase)); 249 HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase));
250 ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); 250 ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params);
251 ehci->is_tdi_rh_tt = 1; 251 hcd->has_tt = 1;
252 ehci->sbrn = 0x20; 252 ehci->sbrn = 0x20;
253 253
254 /* 254 /*
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index 5bb7f6bb13f3..c46a58f9181d 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -129,7 +129,6 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
129 switch (pdev->vendor) { 129 switch (pdev->vendor) {
130 case PCI_VENDOR_ID_TDI: 130 case PCI_VENDOR_ID_TDI:
131 if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) { 131 if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) {
132 ehci->is_tdi_rh_tt = 1;
133 hcd->has_tt = 1; 132 hcd->has_tt = 1;
134 tdi_reset(ehci); 133 tdi_reset(ehci);
135 } 134 }
@@ -379,7 +378,8 @@ static const struct hc_driver ehci_pci_hc_driver = {
379 .hub_control = ehci_hub_control, 378 .hub_control = ehci_hub_control,
380 .bus_suspend = ehci_bus_suspend, 379 .bus_suspend = ehci_bus_suspend,
381 .bus_resume = ehci_bus_resume, 380 .bus_resume = ehci_bus_resume,
382 .relinquish_port = ehci_relinquish_port, 381 .relinquish_port = ehci_relinquish_port,
382 .port_handed_over = ehci_port_handed_over,
383}; 383};
384 384
385/*-------------------------------------------------------------------------*/ 385/*-------------------------------------------------------------------------*/
diff --git a/drivers/usb/host/ehci-ppc-of.c b/drivers/usb/host/ehci-ppc-of.c
index ee305b1f99ff..b018deed2e8f 100644
--- a/drivers/usb/host/ehci-ppc-of.c
+++ b/drivers/usb/host/ehci-ppc-of.c
@@ -76,6 +76,8 @@ static const struct hc_driver ehci_ppc_of_hc_driver = {
76 .bus_suspend = ehci_bus_suspend, 76 .bus_suspend = ehci_bus_suspend,
77 .bus_resume = ehci_bus_resume, 77 .bus_resume = ehci_bus_resume,
78#endif 78#endif
79 .relinquish_port = ehci_relinquish_port,
80 .port_handed_over = ehci_port_handed_over,
79}; 81};
80 82
81 83
diff --git a/drivers/usb/host/ehci-ppc-soc.c b/drivers/usb/host/ehci-ppc-soc.c
index 6c76036783a1..529590eb4037 100644
--- a/drivers/usb/host/ehci-ppc-soc.c
+++ b/drivers/usb/host/ehci-ppc-soc.c
@@ -163,6 +163,7 @@ static const struct hc_driver ehci_ppc_soc_hc_driver = {
163 .bus_suspend = ehci_bus_suspend, 163 .bus_suspend = ehci_bus_suspend,
164 .bus_resume = ehci_bus_resume, 164 .bus_resume = ehci_bus_resume,
165 .relinquish_port = ehci_relinquish_port, 165 .relinquish_port = ehci_relinquish_port,
166 .port_handed_over = ehci_port_handed_over,
166}; 167};
167 168
168static int ehci_hcd_ppc_soc_drv_probe(struct platform_device *pdev) 169static int ehci_hcd_ppc_soc_drv_probe(struct platform_device *pdev)
diff --git a/drivers/usb/host/ehci-ps3.c b/drivers/usb/host/ehci-ps3.c
index 69782221bcf3..37e6abeb794c 100644
--- a/drivers/usb/host/ehci-ps3.c
+++ b/drivers/usb/host/ehci-ps3.c
@@ -73,6 +73,7 @@ static const struct hc_driver ps3_ehci_hc_driver = {
73 .bus_resume = ehci_bus_resume, 73 .bus_resume = ehci_bus_resume,
74#endif 74#endif
75 .relinquish_port = ehci_relinquish_port, 75 .relinquish_port = ehci_relinquish_port,
76 .port_handed_over = ehci_port_handed_over,
76}; 77};
77 78
78static int ps3_ehci_probe(struct ps3_system_bus_device *dev) 79static int ps3_ehci_probe(struct ps3_system_bus_device *dev)
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
index be575e46eac3..b7853c8bac0f 100644
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -1349,18 +1349,27 @@ iso_stream_schedule (
1349 /* when's the last uframe this urb could start? */ 1349 /* when's the last uframe this urb could start? */
1350 max = now + mod; 1350 max = now + mod;
1351 1351
1352 /* typical case: reuse current schedule. stream is still active, 1352 /* Typical case: reuse current schedule, stream is still active.
1353 * and no gaps from host falling behind (irq delays etc) 1353 * Hopefully there are no gaps from the host falling behind
1354 * (irq delays etc), but if there are we'll take the next
1355 * slot in the schedule, implicitly assuming URB_ISO_ASAP.
1354 */ 1356 */
1355 if (likely (!list_empty (&stream->td_list))) { 1357 if (likely (!list_empty (&stream->td_list))) {
1356 start = stream->next_uframe; 1358 start = stream->next_uframe;
1357 if (start < now) 1359 if (start < now)
1358 start += mod; 1360 start += mod;
1359 if (likely ((start + sched->span) < max)) 1361
1360 goto ready; 1362 /* Fell behind (by up to twice the slop amount)? */
1361 /* else fell behind; someday, try to reschedule */ 1363 if (start >= max - 2 * 8 * SCHEDULE_SLOP)
1362 status = -EL2NSYNC; 1364 start += stream->interval * DIV_ROUND_UP(
1363 goto fail; 1365 max - start, stream->interval) - mod;
1366
1367 /* Tried to schedule too far into the future? */
1368 if (unlikely((start + sched->span) >= max)) {
1369 status = -EFBIG;
1370 goto fail;
1371 }
1372 goto ready;
1364 } 1373 }
1365 1374
1366 /* need to schedule; when's the next (u)frame we could start? 1375 /* need to schedule; when's the next (u)frame we could start?
@@ -1613,6 +1622,9 @@ itd_complete (
1613 } else if (likely ((t & EHCI_ISOC_ACTIVE) == 0)) { 1622 } else if (likely ((t & EHCI_ISOC_ACTIVE) == 0)) {
1614 desc->status = 0; 1623 desc->status = 0;
1615 desc->actual_length = EHCI_ITD_LENGTH (t); 1624 desc->actual_length = EHCI_ITD_LENGTH (t);
1625 } else {
1626 /* URB was too late */
1627 desc->status = -EXDEV;
1616 } 1628 }
1617 } 1629 }
1618 1630
@@ -2095,7 +2107,7 @@ done:
2095static void 2107static void
2096scan_periodic (struct ehci_hcd *ehci) 2108scan_periodic (struct ehci_hcd *ehci)
2097{ 2109{
2098 unsigned frame, clock, now_uframe, mod; 2110 unsigned now_uframe, frame, clock, clock_frame, mod;
2099 unsigned modified; 2111 unsigned modified;
2100 2112
2101 mod = ehci->periodic_size << 3; 2113 mod = ehci->periodic_size << 3;
@@ -2111,6 +2123,7 @@ scan_periodic (struct ehci_hcd *ehci)
2111 else 2123 else
2112 clock = now_uframe + mod - 1; 2124 clock = now_uframe + mod - 1;
2113 clock %= mod; 2125 clock %= mod;
2126 clock_frame = clock >> 3;
2114 2127
2115 for (;;) { 2128 for (;;) {
2116 union ehci_shadow q, *q_p; 2129 union ehci_shadow q, *q_p;
@@ -2157,22 +2170,26 @@ restart:
2157 case Q_TYPE_ITD: 2170 case Q_TYPE_ITD:
2158 /* If this ITD is still active, leave it for 2171 /* If this ITD is still active, leave it for
2159 * later processing ... check the next entry. 2172 * later processing ... check the next entry.
2173 * No need to check for activity unless the
2174 * frame is current.
2160 */ 2175 */
2161 rmb (); 2176 if (frame == clock_frame && live) {
2162 for (uf = 0; uf < 8 && live; uf++) { 2177 rmb();
2163 if (0 == (q.itd->hw_transaction [uf] 2178 for (uf = 0; uf < 8; uf++) {
2164 & ITD_ACTIVE(ehci))) 2179 if (q.itd->hw_transaction[uf] &
2165 continue; 2180 ITD_ACTIVE(ehci))
2166 incomplete = true; 2181 break;
2167 q_p = &q.itd->itd_next; 2182 }
2168 hw_p = &q.itd->hw_next; 2183 if (uf < 8) {
2169 type = Q_NEXT_TYPE(ehci, 2184 incomplete = true;
2185 q_p = &q.itd->itd_next;
2186 hw_p = &q.itd->hw_next;
2187 type = Q_NEXT_TYPE(ehci,
2170 q.itd->hw_next); 2188 q.itd->hw_next);
2171 q = *q_p; 2189 q = *q_p;
2172 break; 2190 break;
2191 }
2173 } 2192 }
2174 if (uf < 8 && live)
2175 break;
2176 2193
2177 /* Take finished ITDs out of the schedule 2194 /* Take finished ITDs out of the schedule
2178 * and process them: recycle, maybe report 2195 * and process them: recycle, maybe report
@@ -2189,9 +2206,12 @@ restart:
2189 case Q_TYPE_SITD: 2206 case Q_TYPE_SITD:
2190 /* If this SITD is still active, leave it for 2207 /* If this SITD is still active, leave it for
2191 * later processing ... check the next entry. 2208 * later processing ... check the next entry.
2209 * No need to check for activity unless the
2210 * frame is current.
2192 */ 2211 */
2193 if ((q.sitd->hw_results & SITD_ACTIVE(ehci)) 2212 if (frame == clock_frame && live &&
2194 && live) { 2213 (q.sitd->hw_results &
2214 SITD_ACTIVE(ehci))) {
2195 incomplete = true; 2215 incomplete = true;
2196 q_p = &q.sitd->sitd_next; 2216 q_p = &q.sitd->sitd_next;
2197 hw_p = &q.sitd->hw_next; 2217 hw_p = &q.sitd->hw_next;
@@ -2260,6 +2280,7 @@ restart:
2260 2280
2261 /* rescan the rest of this frame, then ... */ 2281 /* rescan the rest of this frame, then ... */
2262 clock = now; 2282 clock = now;
2283 clock_frame = clock >> 3;
2263 } else { 2284 } else {
2264 now_uframe++; 2285 now_uframe++;
2265 now_uframe %= mod; 2286 now_uframe %= mod;
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index bf92d209a1a9..90245fd8bac4 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -97,6 +97,8 @@ struct ehci_hcd { /* one per controller */
97 dedicated to the companion controller */ 97 dedicated to the companion controller */
98 unsigned long owned_ports; /* which ports are 98 unsigned long owned_ports; /* which ports are
99 owned by the companion during a bus suspend */ 99 owned by the companion during a bus suspend */
100 unsigned long port_c_suspend; /* which ports have
101 the change-suspend feature turned on */
100 102
101 /* per-HC memory pools (could be per-bus, but ...) */ 103 /* per-HC memory pools (could be per-bus, but ...) */
102 struct dma_pool *qh_pool; /* qh per active urb */ 104 struct dma_pool *qh_pool; /* qh per active urb */
@@ -112,7 +114,6 @@ struct ehci_hcd { /* one per controller */
112 u32 command; 114 u32 command;
113 115
114 /* SILICON QUIRKS */ 116 /* SILICON QUIRKS */
115 unsigned is_tdi_rh_tt:1; /* TDI roothub with TT */
116 unsigned no_selective_suspend:1; 117 unsigned no_selective_suspend:1;
117 unsigned has_fsl_port_bug:1; /* FreeScale */ 118 unsigned has_fsl_port_bug:1; /* FreeScale */
118 unsigned big_endian_mmio:1; 119 unsigned big_endian_mmio:1;
@@ -176,6 +177,15 @@ timer_action_done (struct ehci_hcd *ehci, enum ehci_timer_action action)
176static inline void 177static inline void
177timer_action (struct ehci_hcd *ehci, enum ehci_timer_action action) 178timer_action (struct ehci_hcd *ehci, enum ehci_timer_action action)
178{ 179{
180 /* Don't override timeouts which shrink or (later) disable
181 * the async ring; just the I/O watchdog. Note that if a
182 * SHRINK were pending, OFF would never be requested.
183 */
184 if (timer_pending(&ehci->watchdog)
185 && ((BIT(TIMER_ASYNC_SHRINK) | BIT(TIMER_ASYNC_OFF))
186 & ehci->actions))
187 return;
188
179 if (!test_and_set_bit (action, &ehci->actions)) { 189 if (!test_and_set_bit (action, &ehci->actions)) {
180 unsigned long t; 190 unsigned long t;
181 191
@@ -191,15 +201,7 @@ timer_action (struct ehci_hcd *ehci, enum ehci_timer_action action)
191 t = EHCI_SHRINK_JIFFIES; 201 t = EHCI_SHRINK_JIFFIES;
192 break; 202 break;
193 } 203 }
194 t += jiffies; 204 mod_timer(&ehci->watchdog, t + jiffies);
195 // all timings except IAA watchdog can be overridden.
196 // async queue SHRINK often precedes IAA. while it's ready
197 // to go OFF neither can matter, and afterwards the IO
198 // watchdog stops unless there's still periodic traffic.
199 if (time_before_eq(t, ehci->watchdog.expires)
200 && timer_pending (&ehci->watchdog))
201 return;
202 mod_timer (&ehci->watchdog, t);
203 } 205 }
204} 206}
205 207
@@ -678,7 +680,7 @@ struct ehci_fstn {
678 * needed (mostly in root hub code). 680 * needed (mostly in root hub code).
679 */ 681 */
680 682
681#define ehci_is_TDI(e) ((e)->is_tdi_rh_tt) 683#define ehci_is_TDI(e) (ehci_to_hcd(e)->has_tt)
682 684
683/* Returns the speed of a device attached to a port on the root hub. */ 685/* Returns the speed of a device attached to a port on the root hub. */
684static inline unsigned int 686static inline unsigned int
diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c
index c9cec8738261..65aa5ecf569a 100644
--- a/drivers/usb/host/isp1760-hcd.c
+++ b/drivers/usb/host/isp1760-hcd.c
@@ -2207,14 +2207,14 @@ struct usb_hcd *isp1760_register(u64 res_start, u64 res_len, int irq,
2207 goto err_put; 2207 goto err_put;
2208 } 2208 }
2209 2209
2210 ret = usb_add_hcd(hcd, irq, irqflags);
2211 if (ret)
2212 goto err_unmap;
2213
2214 hcd->irq = irq; 2210 hcd->irq = irq;
2215 hcd->rsrc_start = res_start; 2211 hcd->rsrc_start = res_start;
2216 hcd->rsrc_len = res_len; 2212 hcd->rsrc_len = res_len;
2217 2213
2214 ret = usb_add_hcd(hcd, irq, irqflags);
2215 if (ret)
2216 goto err_unmap;
2217
2218 return hcd; 2218 return hcd;
2219 2219
2220err_unmap: 2220err_unmap:
diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c
index 440bf94f0d4c..c9db3fe98726 100644
--- a/drivers/usb/host/isp1760-if.c
+++ b/drivers/usb/host/isp1760-if.c
@@ -104,8 +104,8 @@ static u32 nxp_pci_io_base;
104static u32 iolength; 104static u32 iolength;
105static u32 pci_mem_phy0; 105static u32 pci_mem_phy0;
106static u32 length; 106static u32 length;
107static u8 *chip_addr; 107static u8 __iomem *chip_addr;
108static u8 *iobase; 108static u8 __iomem *iobase;
109 109
110static int __devinit isp1761_pci_probe(struct pci_dev *dev, 110static int __devinit isp1761_pci_probe(struct pci_dev *dev,
111 const struct pci_device_id *id) 111 const struct pci_device_id *id)
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index c96db1153dcf..e534f9de0f05 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
@@ -261,6 +261,7 @@ static const struct hc_driver ohci_at91_hc_driver = {
261 */ 261 */
262 .hub_status_data = ohci_hub_status_data, 262 .hub_status_data = ohci_hub_status_data,
263 .hub_control = ohci_hub_control, 263 .hub_control = ohci_hub_control,
264 .hub_irq_enable = ohci_rhsc_enable,
264#ifdef CONFIG_PM 265#ifdef CONFIG_PM
265 .bus_suspend = ohci_bus_suspend, 266 .bus_suspend = ohci_bus_suspend,
266 .bus_resume = ohci_bus_resume, 267 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-au1xxx.c b/drivers/usb/host/ohci-au1xxx.c
index 1b9abdba920b..f90fe0c7373f 100644
--- a/drivers/usb/host/ohci-au1xxx.c
+++ b/drivers/usb/host/ohci-au1xxx.c
@@ -288,6 +288,7 @@ static const struct hc_driver ohci_au1xxx_hc_driver = {
288 */ 288 */
289 .hub_status_data = ohci_hub_status_data, 289 .hub_status_data = ohci_hub_status_data,
290 .hub_control = ohci_hub_control, 290 .hub_control = ohci_hub_control,
291 .hub_irq_enable = ohci_rhsc_enable,
291#ifdef CONFIG_PM 292#ifdef CONFIG_PM
292 .bus_suspend = ohci_bus_suspend, 293 .bus_suspend = ohci_bus_suspend,
293 .bus_resume = ohci_bus_resume, 294 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-ep93xx.c b/drivers/usb/host/ohci-ep93xx.c
index 06aadfb0ec29..5adaf36e47d0 100644
--- a/drivers/usb/host/ohci-ep93xx.c
+++ b/drivers/usb/host/ohci-ep93xx.c
@@ -135,6 +135,7 @@ static struct hc_driver ohci_ep93xx_hc_driver = {
135 .get_frame_number = ohci_get_frame, 135 .get_frame_number = ohci_get_frame,
136 .hub_status_data = ohci_hub_status_data, 136 .hub_status_data = ohci_hub_status_data,
137 .hub_control = ohci_hub_control, 137 .hub_control = ohci_hub_control,
138 .hub_irq_enable = ohci_rhsc_enable,
138#ifdef CONFIG_PM 139#ifdef CONFIG_PM
139 .bus_suspend = ohci_bus_suspend, 140 .bus_suspend = ohci_bus_suspend,
140 .bus_resume = ohci_bus_resume, 141 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 33f1c1c32edf..a8160d65f32b 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -1054,7 +1054,7 @@ MODULE_LICENSE ("GPL");
1054 1054
1055#ifdef CONFIG_MFD_SM501 1055#ifdef CONFIG_MFD_SM501
1056#include "ohci-sm501.c" 1056#include "ohci-sm501.c"
1057#define PLATFORM_DRIVER ohci_hcd_sm501_driver 1057#define SM501_OHCI_DRIVER ohci_hcd_sm501_driver
1058#endif 1058#endif
1059 1059
1060#if !defined(PCI_DRIVER) && \ 1060#if !defined(PCI_DRIVER) && \
@@ -1062,6 +1062,7 @@ MODULE_LICENSE ("GPL");
1062 !defined(OF_PLATFORM_DRIVER) && \ 1062 !defined(OF_PLATFORM_DRIVER) && \
1063 !defined(SA1111_DRIVER) && \ 1063 !defined(SA1111_DRIVER) && \
1064 !defined(PS3_SYSTEM_BUS_DRIVER) && \ 1064 !defined(PS3_SYSTEM_BUS_DRIVER) && \
1065 !defined(SM501_OHCI_DRIVER) && \
1065 !defined(SSB_OHCI_DRIVER) 1066 !defined(SSB_OHCI_DRIVER)
1066#error "missing bus glue for ohci-hcd" 1067#error "missing bus glue for ohci-hcd"
1067#endif 1068#endif
@@ -1121,9 +1122,18 @@ static int __init ohci_hcd_mod_init(void)
1121 goto error_ssb; 1122 goto error_ssb;
1122#endif 1123#endif
1123 1124
1125#ifdef SM501_OHCI_DRIVER
1126 retval = platform_driver_register(&SM501_OHCI_DRIVER);
1127 if (retval < 0)
1128 goto error_sm501;
1129#endif
1130
1124 return retval; 1131 return retval;
1125 1132
1126 /* Error path */ 1133 /* Error path */
1134#ifdef SM501_OHCI_DRIVER
1135 error_sm501:
1136#endif
1127#ifdef SSB_OHCI_DRIVER 1137#ifdef SSB_OHCI_DRIVER
1128 error_ssb: 1138 error_ssb:
1129#endif 1139#endif
@@ -1159,6 +1169,9 @@ module_init(ohci_hcd_mod_init);
1159 1169
1160static void __exit ohci_hcd_mod_exit(void) 1170static void __exit ohci_hcd_mod_exit(void)
1161{ 1171{
1172#ifdef SM501_OHCI_DRIVER
1173 platform_driver_unregister(&SM501_OHCI_DRIVER);
1174#endif
1162#ifdef SSB_OHCI_DRIVER 1175#ifdef SSB_OHCI_DRIVER
1163 ssb_driver_unregister(&SSB_OHCI_DRIVER); 1176 ssb_driver_unregister(&SSB_OHCI_DRIVER);
1164#endif 1177#endif
diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c
index 79a78029f896..b56739221d11 100644
--- a/drivers/usb/host/ohci-hub.c
+++ b/drivers/usb/host/ohci-hub.c
@@ -36,6 +36,18 @@
36 36
37/*-------------------------------------------------------------------------*/ 37/*-------------------------------------------------------------------------*/
38 38
39/* hcd->hub_irq_enable() */
40static void ohci_rhsc_enable (struct usb_hcd *hcd)
41{
42 struct ohci_hcd *ohci = hcd_to_ohci (hcd);
43
44 spin_lock_irq(&ohci->lock);
45 if (!ohci->autostop)
46 del_timer(&hcd->rh_timer); /* Prevent next poll */
47 ohci_writel(ohci, OHCI_INTR_RHSC, &ohci->regs->intrenable);
48 spin_unlock_irq(&ohci->lock);
49}
50
39#define OHCI_SCHED_ENABLES \ 51#define OHCI_SCHED_ENABLES \
40 (OHCI_CTRL_CLE|OHCI_CTRL_BLE|OHCI_CTRL_PLE|OHCI_CTRL_IE) 52 (OHCI_CTRL_CLE|OHCI_CTRL_BLE|OHCI_CTRL_PLE|OHCI_CTRL_IE)
41 53
@@ -362,28 +374,18 @@ static int ohci_root_hub_state_changes(struct ohci_hcd *ohci, int changed,
362 int any_connected) 374 int any_connected)
363{ 375{
364 int poll_rh = 1; 376 int poll_rh = 1;
365 int rhsc;
366 377
367 rhsc = ohci_readl(ohci, &ohci->regs->intrenable) & OHCI_INTR_RHSC;
368 switch (ohci->hc_control & OHCI_CTRL_HCFS) { 378 switch (ohci->hc_control & OHCI_CTRL_HCFS) {
369 379
370 case OHCI_USB_OPER: 380 case OHCI_USB_OPER:
371 /* If no status changes are pending, enable status-change 381 /* keep on polling until we know a device is connected
372 * interrupts. 382 * and RHSC is enabled */
373 */
374 if (!rhsc && !changed) {
375 rhsc = OHCI_INTR_RHSC;
376 ohci_writel(ohci, rhsc, &ohci->regs->intrenable);
377 }
378
379 /* Keep on polling until we know a device is connected
380 * and RHSC is enabled, or until we autostop.
381 */
382 if (!ohci->autostop) { 383 if (!ohci->autostop) {
383 if (any_connected || 384 if (any_connected ||
384 !device_may_wakeup(&ohci_to_hcd(ohci) 385 !device_may_wakeup(&ohci_to_hcd(ohci)
385 ->self.root_hub->dev)) { 386 ->self.root_hub->dev)) {
386 if (rhsc) 387 if (ohci_readl(ohci, &ohci->regs->intrenable) &
388 OHCI_INTR_RHSC)
387 poll_rh = 0; 389 poll_rh = 0;
388 } else { 390 } else {
389 ohci->autostop = 1; 391 ohci->autostop = 1;
@@ -396,13 +398,12 @@ static int ohci_root_hub_state_changes(struct ohci_hcd *ohci, int changed,
396 ohci->autostop = 0; 398 ohci->autostop = 0;
397 ohci->next_statechange = jiffies + 399 ohci->next_statechange = jiffies +
398 STATECHANGE_DELAY; 400 STATECHANGE_DELAY;
399 } else if (rhsc && time_after_eq(jiffies, 401 } else if (time_after_eq(jiffies,
400 ohci->next_statechange) 402 ohci->next_statechange)
401 && !ohci->ed_rm_list 403 && !ohci->ed_rm_list
402 && !(ohci->hc_control & 404 && !(ohci->hc_control &
403 OHCI_SCHED_ENABLES)) { 405 OHCI_SCHED_ENABLES)) {
404 ohci_rh_suspend(ohci, 1); 406 ohci_rh_suspend(ohci, 1);
405 poll_rh = 0;
406 } 407 }
407 } 408 }
408 break; 409 break;
@@ -416,12 +417,6 @@ static int ohci_root_hub_state_changes(struct ohci_hcd *ohci, int changed,
416 else 417 else
417 usb_hcd_resume_root_hub(ohci_to_hcd(ohci)); 418 usb_hcd_resume_root_hub(ohci_to_hcd(ohci));
418 } else { 419 } else {
419 if (!rhsc && (ohci->autostop ||
420 ohci_to_hcd(ohci)->self.root_hub->
421 do_remote_wakeup))
422 ohci_writel(ohci, OHCI_INTR_RHSC,
423 &ohci->regs->intrenable);
424
425 /* everything is idle, no need for polling */ 420 /* everything is idle, no need for polling */
426 poll_rh = 0; 421 poll_rh = 0;
427 } 422 }
@@ -443,16 +438,12 @@ static inline int ohci_rh_resume(struct ohci_hcd *ohci)
443static int ohci_root_hub_state_changes(struct ohci_hcd *ohci, int changed, 438static int ohci_root_hub_state_changes(struct ohci_hcd *ohci, int changed,
444 int any_connected) 439 int any_connected)
445{ 440{
446 /* If RHSC is enabled, don't poll */ 441 int poll_rh = 1;
447 if (ohci_readl(ohci, &ohci->regs->intrenable) & OHCI_INTR_RHSC)
448 return 0;
449 442
450 /* If no status changes are pending, enable status-change interrupts */ 443 /* keep on polling until RHSC is enabled */
451 if (!changed) { 444 if (ohci_readl(ohci, &ohci->regs->intrenable) & OHCI_INTR_RHSC)
452 ohci_writel(ohci, OHCI_INTR_RHSC, &ohci->regs->intrenable); 445 poll_rh = 0;
453 return 0; 446 return poll_rh;
454 }
455 return 1;
456} 447}
457 448
458#endif /* CONFIG_PM */ 449#endif /* CONFIG_PM */
diff --git a/drivers/usb/host/ohci-lh7a404.c b/drivers/usb/host/ohci-lh7a404.c
index 96d14fa1d833..13c12ed22252 100644
--- a/drivers/usb/host/ohci-lh7a404.c
+++ b/drivers/usb/host/ohci-lh7a404.c
@@ -193,6 +193,7 @@ static const struct hc_driver ohci_lh7a404_hc_driver = {
193 */ 193 */
194 .hub_status_data = ohci_hub_status_data, 194 .hub_status_data = ohci_hub_status_data,
195 .hub_control = ohci_hub_control, 195 .hub_control = ohci_hub_control,
196 .hub_irq_enable = ohci_rhsc_enable,
196#ifdef CONFIG_PM 197#ifdef CONFIG_PM
197 .bus_suspend = ohci_bus_suspend, 198 .bus_suspend = ohci_bus_suspend,
198 .bus_resume = ohci_bus_resume, 199 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
index 6859fb5f1d6f..3a7c24c03671 100644
--- a/drivers/usb/host/ohci-omap.c
+++ b/drivers/usb/host/ohci-omap.c
@@ -466,6 +466,7 @@ static const struct hc_driver ohci_omap_hc_driver = {
466 */ 466 */
467 .hub_status_data = ohci_hub_status_data, 467 .hub_status_data = ohci_hub_status_data,
468 .hub_control = ohci_hub_control, 468 .hub_control = ohci_hub_control,
469 .hub_irq_enable = ohci_rhsc_enable,
469#ifdef CONFIG_PM 470#ifdef CONFIG_PM
470 .bus_suspend = ohci_bus_suspend, 471 .bus_suspend = ohci_bus_suspend,
471 .bus_resume = ohci_bus_resume, 472 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c
index 3bf175d95a23..4696cc912e16 100644
--- a/drivers/usb/host/ohci-pci.c
+++ b/drivers/usb/host/ohci-pci.c
@@ -327,6 +327,7 @@ static const struct hc_driver ohci_pci_hc_driver = {
327 */ 327 */
328 .hub_status_data = ohci_hub_status_data, 328 .hub_status_data = ohci_hub_status_data,
329 .hub_control = ohci_hub_control, 329 .hub_control = ohci_hub_control,
330 .hub_irq_enable = ohci_rhsc_enable,
330#ifdef CONFIG_PM 331#ifdef CONFIG_PM
331 .bus_suspend = ohci_bus_suspend, 332 .bus_suspend = ohci_bus_suspend,
332 .bus_resume = ohci_bus_resume, 333 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-pnx4008.c b/drivers/usb/host/ohci-pnx4008.c
index 664f07ee8732..28b458f20cc3 100644
--- a/drivers/usb/host/ohci-pnx4008.c
+++ b/drivers/usb/host/ohci-pnx4008.c
@@ -280,6 +280,7 @@ static const struct hc_driver ohci_pnx4008_hc_driver = {
280 */ 280 */
281 .hub_status_data = ohci_hub_status_data, 281 .hub_status_data = ohci_hub_status_data,
282 .hub_control = ohci_hub_control, 282 .hub_control = ohci_hub_control,
283 .hub_irq_enable = ohci_rhsc_enable,
283#ifdef CONFIG_PM 284#ifdef CONFIG_PM
284 .bus_suspend = ohci_bus_suspend, 285 .bus_suspend = ohci_bus_suspend,
285 .bus_resume = ohci_bus_resume, 286 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-pnx8550.c b/drivers/usb/host/ohci-pnx8550.c
index 28467e288a93..605d59cba28e 100644
--- a/drivers/usb/host/ohci-pnx8550.c
+++ b/drivers/usb/host/ohci-pnx8550.c
@@ -201,6 +201,7 @@ static const struct hc_driver ohci_pnx8550_hc_driver = {
201 */ 201 */
202 .hub_status_data = ohci_hub_status_data, 202 .hub_status_data = ohci_hub_status_data,
203 .hub_control = ohci_hub_control, 203 .hub_control = ohci_hub_control,
204 .hub_irq_enable = ohci_rhsc_enable,
204#ifdef CONFIG_PM 205#ifdef CONFIG_PM
205 .bus_suspend = ohci_bus_suspend, 206 .bus_suspend = ohci_bus_suspend,
206 .bus_resume = ohci_bus_resume, 207 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-ppc-of.c b/drivers/usb/host/ohci-ppc-of.c
index 50e55db13636..a67252791223 100644
--- a/drivers/usb/host/ohci-ppc-of.c
+++ b/drivers/usb/host/ohci-ppc-of.c
@@ -72,6 +72,7 @@ static const struct hc_driver ohci_ppc_of_hc_driver = {
72 */ 72 */
73 .hub_status_data = ohci_hub_status_data, 73 .hub_status_data = ohci_hub_status_data,
74 .hub_control = ohci_hub_control, 74 .hub_control = ohci_hub_control,
75 .hub_irq_enable = ohci_rhsc_enable,
75#ifdef CONFIG_PM 76#ifdef CONFIG_PM
76 .bus_suspend = ohci_bus_suspend, 77 .bus_suspend = ohci_bus_suspend,
77 .bus_resume = ohci_bus_resume, 78 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-ppc-soc.c b/drivers/usb/host/ohci-ppc-soc.c
index cd3398b675b2..523c30125577 100644
--- a/drivers/usb/host/ohci-ppc-soc.c
+++ b/drivers/usb/host/ohci-ppc-soc.c
@@ -172,6 +172,7 @@ static const struct hc_driver ohci_ppc_soc_hc_driver = {
172 */ 172 */
173 .hub_status_data = ohci_hub_status_data, 173 .hub_status_data = ohci_hub_status_data,
174 .hub_control = ohci_hub_control, 174 .hub_control = ohci_hub_control,
175 .hub_irq_enable = ohci_rhsc_enable,
175#ifdef CONFIG_PM 176#ifdef CONFIG_PM
176 .bus_suspend = ohci_bus_suspend, 177 .bus_suspend = ohci_bus_suspend,
177 .bus_resume = ohci_bus_resume, 178 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-ps3.c b/drivers/usb/host/ohci-ps3.c
index bfdeb0d22d05..c1935ae537f8 100644
--- a/drivers/usb/host/ohci-ps3.c
+++ b/drivers/usb/host/ohci-ps3.c
@@ -68,6 +68,7 @@ static const struct hc_driver ps3_ohci_hc_driver = {
68 .get_frame_number = ohci_get_frame, 68 .get_frame_number = ohci_get_frame,
69 .hub_status_data = ohci_hub_status_data, 69 .hub_status_data = ohci_hub_status_data,
70 .hub_control = ohci_hub_control, 70 .hub_control = ohci_hub_control,
71 .hub_irq_enable = ohci_rhsc_enable,
71 .start_port_reset = ohci_start_port_reset, 72 .start_port_reset = ohci_start_port_reset,
72#if defined(CONFIG_PM) 73#if defined(CONFIG_PM)
73 .bus_suspend = ohci_bus_suspend, 74 .bus_suspend = ohci_bus_suspend,
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c
index 70b0d4b459e7..d4ee27d92be8 100644
--- a/drivers/usb/host/ohci-pxa27x.c
+++ b/drivers/usb/host/ohci-pxa27x.c
@@ -298,6 +298,7 @@ static const struct hc_driver ohci_pxa27x_hc_driver = {
298 */ 298 */
299 .hub_status_data = ohci_hub_status_data, 299 .hub_status_data = ohci_hub_status_data,
300 .hub_control = ohci_hub_control, 300 .hub_control = ohci_hub_control,
301 .hub_irq_enable = ohci_rhsc_enable,
301#ifdef CONFIG_PM 302#ifdef CONFIG_PM
302 .bus_suspend = ohci_bus_suspend, 303 .bus_suspend = ohci_bus_suspend,
303 .bus_resume = ohci_bus_resume, 304 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c
index 9c9f3b59186f..9b547407c934 100644
--- a/drivers/usb/host/ohci-q.c
+++ b/drivers/usb/host/ohci-q.c
@@ -952,6 +952,7 @@ rescan_this:
952 struct urb *urb; 952 struct urb *urb;
953 urb_priv_t *urb_priv; 953 urb_priv_t *urb_priv;
954 __hc32 savebits; 954 __hc32 savebits;
955 u32 tdINFO;
955 956
956 td = list_entry (entry, struct td, td_list); 957 td = list_entry (entry, struct td, td_list);
957 urb = td->urb; 958 urb = td->urb;
@@ -966,6 +967,17 @@ rescan_this:
966 savebits = *prev & ~cpu_to_hc32 (ohci, TD_MASK); 967 savebits = *prev & ~cpu_to_hc32 (ohci, TD_MASK);
967 *prev = td->hwNextTD | savebits; 968 *prev = td->hwNextTD | savebits;
968 969
970 /* If this was unlinked, the TD may not have been
971 * retired ... so manually save the data toggle.
972 * The controller ignores the value we save for
973 * control and ISO endpoints.
974 */
975 tdINFO = hc32_to_cpup(ohci, &td->hwINFO);
976 if ((tdINFO & TD_T) == TD_T_DATA0)
977 ed->hwHeadP &= ~cpu_to_hc32(ohci, ED_C);
978 else if ((tdINFO & TD_T) == TD_T_DATA1)
979 ed->hwHeadP |= cpu_to_hc32(ohci, ED_C);
980
969 /* HC may have partly processed this TD */ 981 /* HC may have partly processed this TD */
970 td_done (ohci, urb, td); 982 td_done (ohci, urb, td);
971 urb_priv->td_cnt++; 983 urb_priv->td_cnt++;
diff --git a/drivers/usb/host/ohci-s3c2410.c b/drivers/usb/host/ohci-s3c2410.c
index a73d2ff322e2..ead4772f0f27 100644
--- a/drivers/usb/host/ohci-s3c2410.c
+++ b/drivers/usb/host/ohci-s3c2410.c
@@ -466,6 +466,7 @@ static const struct hc_driver ohci_s3c2410_hc_driver = {
466 */ 466 */
467 .hub_status_data = ohci_s3c2410_hub_status_data, 467 .hub_status_data = ohci_s3c2410_hub_status_data,
468 .hub_control = ohci_s3c2410_hub_control, 468 .hub_control = ohci_s3c2410_hub_control,
469 .hub_irq_enable = ohci_rhsc_enable,
469#ifdef CONFIG_PM 470#ifdef CONFIG_PM
470 .bus_suspend = ohci_bus_suspend, 471 .bus_suspend = ohci_bus_suspend,
471 .bus_resume = ohci_bus_resume, 472 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-sa1111.c b/drivers/usb/host/ohci-sa1111.c
index 99438c65981b..0f48f2d99226 100644
--- a/drivers/usb/host/ohci-sa1111.c
+++ b/drivers/usb/host/ohci-sa1111.c
@@ -231,6 +231,7 @@ static const struct hc_driver ohci_sa1111_hc_driver = {
231 */ 231 */
232 .hub_status_data = ohci_hub_status_data, 232 .hub_status_data = ohci_hub_status_data,
233 .hub_control = ohci_hub_control, 233 .hub_control = ohci_hub_control,
234 .hub_irq_enable = ohci_rhsc_enable,
234#ifdef CONFIG_PM 235#ifdef CONFIG_PM
235 .bus_suspend = ohci_bus_suspend, 236 .bus_suspend = ohci_bus_suspend,
236 .bus_resume = ohci_bus_resume, 237 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-sh.c b/drivers/usb/host/ohci-sh.c
index 60f03cc7ec4f..e7ee607278fe 100644
--- a/drivers/usb/host/ohci-sh.c
+++ b/drivers/usb/host/ohci-sh.c
@@ -68,6 +68,7 @@ static const struct hc_driver ohci_sh_hc_driver = {
68 */ 68 */
69 .hub_status_data = ohci_hub_status_data, 69 .hub_status_data = ohci_hub_status_data,
70 .hub_control = ohci_hub_control, 70 .hub_control = ohci_hub_control,
71 .hub_irq_enable = ohci_rhsc_enable,
71#ifdef CONFIG_PM 72#ifdef CONFIG_PM
72 .bus_suspend = ohci_bus_suspend, 73 .bus_suspend = ohci_bus_suspend,
73 .bus_resume = ohci_bus_resume, 74 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-sm501.c b/drivers/usb/host/ohci-sm501.c
index e899a77dfb83..e610698c6b60 100644
--- a/drivers/usb/host/ohci-sm501.c
+++ b/drivers/usb/host/ohci-sm501.c
@@ -75,6 +75,7 @@ static const struct hc_driver ohci_sm501_hc_driver = {
75 */ 75 */
76 .hub_status_data = ohci_hub_status_data, 76 .hub_status_data = ohci_hub_status_data,
77 .hub_control = ohci_hub_control, 77 .hub_control = ohci_hub_control,
78 .hub_irq_enable = ohci_rhsc_enable,
78#ifdef CONFIG_PM 79#ifdef CONFIG_PM
79 .bus_suspend = ohci_bus_suspend, 80 .bus_suspend = ohci_bus_suspend,
80 .bus_resume = ohci_bus_resume, 81 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/ohci-ssb.c b/drivers/usb/host/ohci-ssb.c
index c4265caec780..7275186db315 100644
--- a/drivers/usb/host/ohci-ssb.c
+++ b/drivers/usb/host/ohci-ssb.c
@@ -81,6 +81,7 @@ static const struct hc_driver ssb_ohci_hc_driver = {
81 81
82 .hub_status_data = ohci_hub_status_data, 82 .hub_status_data = ohci_hub_status_data,
83 .hub_control = ohci_hub_control, 83 .hub_control = ohci_hub_control,
84 .hub_irq_enable = ohci_rhsc_enable,
84#ifdef CONFIG_PM 85#ifdef CONFIG_PM
85 .bus_suspend = ohci_bus_suspend, 86 .bus_suspend = ohci_bus_suspend,
86 .bus_resume = ohci_bus_resume, 87 .bus_resume = ohci_bus_resume,
diff --git a/drivers/usb/host/u132-hcd.c b/drivers/usb/host/u132-hcd.c
index f29307405bb3..9b6323f768b2 100644
--- a/drivers/usb/host/u132-hcd.c
+++ b/drivers/usb/host/u132-hcd.c
@@ -2934,6 +2934,16 @@ static int u132_start_port_reset(struct usb_hcd *hcd, unsigned port_num)
2934 return 0; 2934 return 0;
2935} 2935}
2936 2936
2937static void u132_hub_irq_enable(struct usb_hcd *hcd)
2938{
2939 struct u132 *u132 = hcd_to_u132(hcd);
2940 if (u132->going > 1) {
2941 dev_err(&u132->platform_dev->dev, "device has been removed %d\n"
2942 , u132->going);
2943 } else if (u132->going > 0)
2944 dev_err(&u132->platform_dev->dev, "device is being removed\n");
2945}
2946
2937 2947
2938#ifdef CONFIG_PM 2948#ifdef CONFIG_PM
2939static int u132_bus_suspend(struct usb_hcd *hcd) 2949static int u132_bus_suspend(struct usb_hcd *hcd)
@@ -2985,6 +2995,7 @@ static struct hc_driver u132_hc_driver = {
2985 .bus_suspend = u132_bus_suspend, 2995 .bus_suspend = u132_bus_suspend,
2986 .bus_resume = u132_bus_resume, 2996 .bus_resume = u132_bus_resume,
2987 .start_port_reset = u132_start_port_reset, 2997 .start_port_reset = u132_start_port_reset,
2998 .hub_irq_enable = u132_hub_irq_enable,
2988}; 2999};
2989 3000
2990/* 3001/*
diff --git a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig
index a53db1d4e07a..001789c9a11a 100644
--- a/drivers/usb/misc/Kconfig
+++ b/drivers/usb/misc/Kconfig
@@ -269,3 +269,15 @@ config USB_TEST
269 See <http://www.linux-usb.org/usbtest/> for more information, 269 See <http://www.linux-usb.org/usbtest/> for more information,
270 including sample test device firmware and "how to use it". 270 including sample test device firmware and "how to use it".
271 271
272config USB_ISIGHTFW
273 tristate "iSight firmware loading support"
274 depends on USB
275 select FW_LOADER
276 help
277 This driver loads firmware for USB Apple iSight cameras, allowing
278 them to be driven by the USB video class driver available at
279 http://linux-uvc.berlios.de
280
281 The firmware for this driver must be extracted from the MacOS
282 driver beforehand. Tools for doing so are available at
283 http://bersace03.free.fr
diff --git a/drivers/usb/misc/Makefile b/drivers/usb/misc/Makefile
index b68e6b774f1a..aba091cb5ec0 100644
--- a/drivers/usb/misc/Makefile
+++ b/drivers/usb/misc/Makefile
@@ -14,6 +14,7 @@ obj-$(CONFIG_USB_EMI62) += emi62.o
14obj-$(CONFIG_USB_FTDI_ELAN) += ftdi-elan.o 14obj-$(CONFIG_USB_FTDI_ELAN) += ftdi-elan.o
15obj-$(CONFIG_USB_IDMOUSE) += idmouse.o 15obj-$(CONFIG_USB_IDMOUSE) += idmouse.o
16obj-$(CONFIG_USB_IOWARRIOR) += iowarrior.o 16obj-$(CONFIG_USB_IOWARRIOR) += iowarrior.o
17obj-$(CONFIG_USB_ISIGHTFW) += isight_firmware.o
17obj-$(CONFIG_USB_LCD) += usblcd.o 18obj-$(CONFIG_USB_LCD) += usblcd.o
18obj-$(CONFIG_USB_LD) += ldusb.o 19obj-$(CONFIG_USB_LD) += ldusb.o
19obj-$(CONFIG_USB_LED) += usbled.o 20obj-$(CONFIG_USB_LED) += usbled.o
diff --git a/drivers/usb/misc/isight_firmware.c b/drivers/usb/misc/isight_firmware.c
new file mode 100644
index 000000000000..9f30aa1f8a5d
--- /dev/null
+++ b/drivers/usb/misc/isight_firmware.c
@@ -0,0 +1,140 @@
1/*
2 * Driver for loading USB isight firmware
3 *
4 * Copyright (C) 2008 Matthew Garrett <mjg@redhat.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 Free
8 * Software Foundation, version 2.
9 *
10 * The USB isight cameras in recent Apples are roughly compatible with the USB
11 * video class specification, and can be driven by uvcvideo. However, they
12 * need firmware to be loaded beforehand. After firmware loading, the device
13 * detaches from the USB bus and reattaches with a new device ID. It can then
14 * be claimed by the uvc driver.
15 *
16 * The firmware is non-free and must be extracted by the user. Tools to do this
17 * are available at http://bersace03.free.fr/ift/
18 *
19 * The isight firmware loading was reverse engineered by Johannes Berg
20 * <johannes@sipsolutions.de>, and this driver is based on code by Ronald
21 * Bultje <rbultje@ronald.bitfreak.net>
22 */
23
24#include <linux/usb.h>
25#include <linux/firmware.h>
26#include <linux/errno.h>
27#include <linux/module.h>
28
29static struct usb_device_id id_table[] = {
30 {USB_DEVICE(0x05ac, 0x8300)},
31 {},
32};
33
34MODULE_DEVICE_TABLE(usb, id_table);
35
36static int isight_firmware_load(struct usb_interface *intf,
37 const struct usb_device_id *id)
38{
39 struct usb_device *dev = interface_to_usbdev(intf);
40 int llen, len, req, ret = 0;
41 const struct firmware *firmware;
42 unsigned char *buf = kmalloc(50, GFP_KERNEL);
43 unsigned char data[4];
44 u8 *ptr;
45
46 if (!buf)
47 return -ENOMEM;
48
49 if (request_firmware(&firmware, "isight.fw", &dev->dev) != 0) {
50 printk(KERN_ERR "Unable to load isight firmware\n");
51 return -ENODEV;
52 }
53
54 ptr = firmware->data;
55
56 if (usb_control_msg
57 (dev, usb_sndctrlpipe(dev, 0), 0xa0, 0x40, 0xe600, 0, "\1", 1,
58 300) != 1) {
59 printk(KERN_ERR
60 "Failed to initialise isight firmware loader\n");
61 ret = -ENODEV;
62 goto out;
63 }
64
65 while (ptr+4 <= firmware->data+firmware->size) {
66 memcpy(data, ptr, 4);
67 len = (data[0] << 8 | data[1]);
68 req = (data[2] << 8 | data[3]);
69 ptr += 4;
70
71 if (len == 0x8001)
72 break; /* success */
73 else if (len == 0)
74 continue;
75
76 for (; len > 0; req += 50) {
77 llen = min(len, 50);
78 len -= llen;
79 if (ptr+llen > firmware->data+firmware->size) {
80 printk(KERN_ERR
81 "Malformed isight firmware");
82 ret = -ENODEV;
83 goto out;
84 }
85 memcpy(buf, ptr, llen);
86
87 ptr += llen;
88
89 if (usb_control_msg
90 (dev, usb_sndctrlpipe(dev, 0), 0xa0, 0x40, req, 0,
91 buf, llen, 300) != llen) {
92 printk(KERN_ERR
93 "Failed to load isight firmware\n");
94 kfree(buf);
95 ret = -ENODEV;
96 goto out;
97 }
98
99 }
100 }
101
102 if (usb_control_msg
103 (dev, usb_sndctrlpipe(dev, 0), 0xa0, 0x40, 0xe600, 0, "\0", 1,
104 300) != 1) {
105 printk(KERN_ERR "isight firmware loading completion failed\n");
106 ret = -ENODEV;
107 }
108
109out:
110 kfree(buf);
111 release_firmware(firmware);
112 return ret;
113}
114
115static void isight_firmware_disconnect(struct usb_interface *intf)
116{
117}
118
119static struct usb_driver isight_firmware_driver = {
120 .name = "isight_firmware",
121 .probe = isight_firmware_load,
122 .disconnect = isight_firmware_disconnect,
123 .id_table = id_table,
124};
125
126static int __init isight_firmware_init(void)
127{
128 return usb_register(&isight_firmware_driver);
129}
130
131static void __exit isight_firmware_exit(void)
132{
133 usb_deregister(&isight_firmware_driver);
134}
135
136module_init(isight_firmware_init);
137module_exit(isight_firmware_exit);
138
139MODULE_LICENSE("GPL");
140MODULE_AUTHOR("Matthew Garrett <mjg@redhat.com>");
diff --git a/drivers/usb/misc/phidgetkit.c b/drivers/usb/misc/phidgetkit.c
index 24230c638b8e..4cfa25b0f44e 100644
--- a/drivers/usb/misc/phidgetkit.c
+++ b/drivers/usb/misc/phidgetkit.c
@@ -595,14 +595,14 @@ static int interfacekit_probe(struct usb_interface *intf, const struct usb_devic
595 } while(value); 595 } while(value);
596 kit->dev_no = bit; 596 kit->dev_no = bit;
597 597
598 kit->dev = device_create(phidget_class, &kit->udev->dev, 0, 598 kit->dev = device_create_drvdata(phidget_class, &kit->udev->dev,
599 "interfacekit%d", kit->dev_no); 599 MKDEV(0, 0), kit,
600 "interfacekit%d", kit->dev_no);
600 if (IS_ERR(kit->dev)) { 601 if (IS_ERR(kit->dev)) {
601 rc = PTR_ERR(kit->dev); 602 rc = PTR_ERR(kit->dev);
602 kit->dev = NULL; 603 kit->dev = NULL;
603 goto out; 604 goto out;
604 } 605 }
605 dev_set_drvdata(kit->dev, kit);
606 606
607 if (usb_submit_urb(kit->irq, GFP_KERNEL)) { 607 if (usb_submit_urb(kit->irq, GFP_KERNEL)) {
608 rc = -EIO; 608 rc = -EIO;
diff --git a/drivers/usb/misc/phidgetmotorcontrol.c b/drivers/usb/misc/phidgetmotorcontrol.c
index f0113c17cc5a..9b4696f21b22 100644
--- a/drivers/usb/misc/phidgetmotorcontrol.c
+++ b/drivers/usb/misc/phidgetmotorcontrol.c
@@ -365,16 +365,15 @@ static int motorcontrol_probe(struct usb_interface *intf, const struct usb_devic
365 } while(value); 365 } while(value);
366 mc->dev_no = bit; 366 mc->dev_no = bit;
367 367
368 mc->dev = device_create(phidget_class, &mc->udev->dev, 0, 368 mc->dev = device_create_drvdata(phidget_class, &mc->udev->dev,
369 "motorcontrol%d", mc->dev_no); 369 MKDEV(0, 0), mc,
370 "motorcontrol%d", mc->dev_no);
370 if (IS_ERR(mc->dev)) { 371 if (IS_ERR(mc->dev)) {
371 rc = PTR_ERR(mc->dev); 372 rc = PTR_ERR(mc->dev);
372 mc->dev = NULL; 373 mc->dev = NULL;
373 goto out; 374 goto out;
374 } 375 }
375 376
376 dev_set_drvdata(mc->dev, mc);
377
378 if (usb_submit_urb(mc->irq, GFP_KERNEL)) { 377 if (usb_submit_urb(mc->irq, GFP_KERNEL)) {
379 rc = -EIO; 378 rc = -EIO;
380 goto out; 379 goto out;
diff --git a/drivers/usb/misc/phidgetservo.c b/drivers/usb/misc/phidgetservo.c
index 7d590c09434a..1ca7ddb41d4d 100644
--- a/drivers/usb/misc/phidgetservo.c
+++ b/drivers/usb/misc/phidgetservo.c
@@ -275,14 +275,14 @@ servo_probe(struct usb_interface *interface, const struct usb_device_id *id)
275 } while (value); 275 } while (value);
276 dev->dev_no = bit; 276 dev->dev_no = bit;
277 277
278 dev->dev = device_create(phidget_class, &dev->udev->dev, 0, 278 dev->dev = device_create_drvdata(phidget_class, &dev->udev->dev,
279 "servo%d", dev->dev_no); 279 MKDEV(0, 0), dev,
280 "servo%d", dev->dev_no);
280 if (IS_ERR(dev->dev)) { 281 if (IS_ERR(dev->dev)) {
281 rc = PTR_ERR(dev->dev); 282 rc = PTR_ERR(dev->dev);
282 dev->dev = NULL; 283 dev->dev = NULL;
283 goto out; 284 goto out;
284 } 285 }
285 dev_set_drvdata(dev->dev, dev);
286 286
287 servo_count = dev->type & SERVO_COUNT_QUAD ? 4 : 1; 287 servo_count = dev->type & SERVO_COUNT_QUAD ? 4 : 1;
288 288
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c
index cb7fa0eaf3ae..33182f4c2267 100644
--- a/drivers/usb/misc/sisusbvga/sisusb.c
+++ b/drivers/usb/misc/sisusbvga/sisusb.c
@@ -3264,8 +3264,6 @@ static void sisusb_disconnect(struct usb_interface *intf)
3264 3264
3265 /* decrement our usage count */ 3265 /* decrement our usage count */
3266 kref_put(&sisusb->kref, sisusb_delete); 3266 kref_put(&sisusb->kref, sisusb_delete);
3267
3268 dev_info(&sisusb->sisusb_dev->dev, "Disconnected\n");
3269} 3267}
3270 3268
3271static struct usb_device_id sisusb_table [] = { 3269static struct usb_device_id sisusb_table [] = {
diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c
index ba28fdc9ccd2..1f7c86bd8297 100644
--- a/drivers/usb/serial/ch341.c
+++ b/drivers/usb/serial/ch341.c
@@ -28,6 +28,7 @@ static int debug;
28 28
29static struct usb_device_id id_table [] = { 29static struct usb_device_id id_table [] = {
30 { USB_DEVICE(0x4348, 0x5523) }, 30 { USB_DEVICE(0x4348, 0x5523) },
31 { USB_DEVICE(0x1a86, 0x7523) },
31 { }, 32 { },
32}; 33};
33MODULE_DEVICE_TABLE(usb, id_table); 34MODULE_DEVICE_TABLE(usb, id_table);
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 5b349ece7247..0ff4a3971e45 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -174,8 +174,270 @@ static struct usb_device_id id_table_combined [] = {
174 { USB_DEVICE(FTDI_VID, FTDI_MTXORB_4_PID) }, 174 { USB_DEVICE(FTDI_VID, FTDI_MTXORB_4_PID) },
175 { USB_DEVICE(FTDI_VID, FTDI_MTXORB_5_PID) }, 175 { USB_DEVICE(FTDI_VID, FTDI_MTXORB_5_PID) },
176 { USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) }, 176 { USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) },
177 { USB_DEVICE(MTXORB_VK_VID, MTXORB_VK_PID), 177 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0100_PID) },
178 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0101_PID) },
179 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0102_PID) },
180 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0103_PID) },
181 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0104_PID) },
182 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0105_PID) },
183 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0106_PID) },
184 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0107_PID) },
185 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0108_PID) },
186 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0109_PID) },
187 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_010A_PID) },
188 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_010B_PID) },
189 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_010C_PID) },
190 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_010D_PID) },
191 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_010E_PID) },
192 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_010F_PID) },
193 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0110_PID) },
194 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0111_PID) },
195 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0112_PID) },
196 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0113_PID) },
197 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0114_PID) },
198 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0115_PID) },
199 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0116_PID) },
200 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0117_PID) },
201 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0118_PID) },
202 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0119_PID) },
203 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_011A_PID) },
204 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_011B_PID) },
205 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_011C_PID) },
206 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_011D_PID) },
207 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_011E_PID) },
208 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_011F_PID) },
209 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0120_PID) },
210 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0121_PID) },
211 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0122_PID) },
212 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0123_PID) },
213 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0124_PID) },
214 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0125_PID) },
215 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0126_PID) },
216 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0127_PID),
178 .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, 217 .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk },
218 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0128_PID) },
219 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0129_PID) },
220 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_012A_PID) },
221 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_012B_PID) },
222 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_012C_PID),
223 .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk },
224 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_012D_PID) },
225 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_012E_PID) },
226 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_012F_PID) },
227 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0130_PID) },
228 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0131_PID) },
229 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0132_PID) },
230 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0133_PID) },
231 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0134_PID) },
232 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0135_PID) },
233 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0136_PID) },
234 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0137_PID) },
235 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0138_PID) },
236 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0139_PID) },
237 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_013A_PID) },
238 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_013B_PID) },
239 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_013C_PID) },
240 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_013D_PID) },
241 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_013E_PID) },
242 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_013F_PID) },
243 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0140_PID) },
244 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0141_PID) },
245 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0142_PID) },
246 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0143_PID) },
247 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0144_PID) },
248 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0145_PID) },
249 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0146_PID) },
250 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0147_PID) },
251 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0148_PID) },
252 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0149_PID) },
253 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_014A_PID) },
254 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_014B_PID) },
255 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_014C_PID) },
256 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_014D_PID) },
257 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_014E_PID) },
258 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_014F_PID) },
259 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0150_PID) },
260 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0151_PID) },
261 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0152_PID) },
262 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0153_PID),
263 .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk },
264 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0154_PID),
265 .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk },
266 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0155_PID),
267 .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk },
268 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0156_PID),
269 .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk },
270 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0157_PID),
271 .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk },
272 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0158_PID),
273 .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk },
274 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0159_PID) },
275 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_015A_PID) },
276 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_015B_PID) },
277 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_015C_PID) },
278 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_015D_PID) },
279 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_015E_PID) },
280 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_015F_PID) },
281 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0160_PID) },
282 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0161_PID) },
283 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0162_PID) },
284 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0163_PID) },
285 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0164_PID) },
286 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0165_PID) },
287 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0166_PID) },
288 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0167_PID) },
289 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0168_PID) },
290 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0169_PID) },
291 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_016A_PID) },
292 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_016B_PID) },
293 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_016C_PID) },
294 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_016D_PID) },
295 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_016E_PID) },
296 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_016F_PID) },
297 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0170_PID) },
298 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0171_PID) },
299 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0172_PID) },
300 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0173_PID) },
301 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0174_PID) },
302 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0175_PID) },
303 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0176_PID) },
304 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0177_PID) },
305 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0178_PID) },
306 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0179_PID) },
307 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_017A_PID) },
308 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_017B_PID) },
309 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_017C_PID) },
310 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_017D_PID) },
311 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_017E_PID) },
312 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_017F_PID) },
313 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0180_PID) },
314 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0181_PID) },
315 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0182_PID) },
316 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0183_PID) },
317 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0184_PID) },
318 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0185_PID) },
319 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0186_PID) },
320 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0187_PID) },
321 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0188_PID) },
322 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0189_PID) },
323 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_018A_PID) },
324 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_018B_PID) },
325 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_018C_PID) },
326 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_018D_PID) },
327 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_018E_PID) },
328 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_018F_PID) },
329 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0190_PID) },
330 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0191_PID) },
331 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0192_PID) },
332 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0193_PID) },
333 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0194_PID) },
334 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0195_PID) },
335 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0196_PID) },
336 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0197_PID) },
337 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0198_PID) },
338 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0199_PID) },
339 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_019A_PID) },
340 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_019B_PID) },
341 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_019C_PID) },
342 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_019D_PID) },
343 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_019E_PID) },
344 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_019F_PID) },
345 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A0_PID) },
346 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A1_PID) },
347 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A2_PID) },
348 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A3_PID) },
349 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A4_PID) },
350 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A5_PID) },
351 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A6_PID) },
352 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A7_PID) },
353 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A8_PID) },
354 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A9_PID) },
355 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01AA_PID) },
356 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01AB_PID) },
357 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01AC_PID) },
358 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01AD_PID) },
359 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01AE_PID) },
360 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01AF_PID) },
361 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B0_PID) },
362 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B1_PID) },
363 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B2_PID) },
364 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B3_PID) },
365 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B4_PID) },
366 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B5_PID) },
367 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B6_PID) },
368 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B7_PID) },
369 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B8_PID) },
370 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B9_PID) },
371 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01BA_PID) },
372 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01BB_PID) },
373 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01BC_PID) },
374 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01BD_PID) },
375 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01BE_PID) },
376 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01BF_PID) },
377 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C0_PID) },
378 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C1_PID) },
379 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C2_PID) },
380 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C3_PID) },
381 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C4_PID) },
382 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C5_PID) },
383 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C6_PID) },
384 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C7_PID) },
385 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C8_PID) },
386 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C9_PID) },
387 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01CA_PID) },
388 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01CB_PID) },
389 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01CC_PID) },
390 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01CD_PID) },
391 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01CE_PID) },
392 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01CF_PID) },
393 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D0_PID) },
394 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D1_PID) },
395 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D2_PID) },
396 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D3_PID) },
397 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D4_PID) },
398 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D5_PID) },
399 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D6_PID) },
400 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D7_PID) },
401 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D8_PID) },
402 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D9_PID) },
403 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01DA_PID) },
404 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01DB_PID) },
405 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01DC_PID) },
406 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01DD_PID) },
407 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01DE_PID) },
408 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01DF_PID) },
409 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E0_PID) },
410 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E1_PID) },
411 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E2_PID) },
412 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E3_PID) },
413 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E4_PID) },
414 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E5_PID) },
415 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E6_PID) },
416 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E7_PID) },
417 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E8_PID) },
418 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E9_PID) },
419 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01EA_PID) },
420 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01EB_PID) },
421 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01EC_PID) },
422 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01ED_PID) },
423 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01EE_PID) },
424 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01EF_PID) },
425 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F0_PID) },
426 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F1_PID) },
427 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F2_PID) },
428 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F3_PID) },
429 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F4_PID) },
430 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F5_PID) },
431 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F6_PID) },
432 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F7_PID) },
433 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F8_PID) },
434 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F9_PID) },
435 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01FA_PID) },
436 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01FB_PID) },
437 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01FC_PID) },
438 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01FD_PID) },
439 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01FE_PID) },
440 { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01FF_PID) },
179 { USB_DEVICE(FTDI_VID, FTDI_PERLE_ULTRAPORT_PID) }, 441 { USB_DEVICE(FTDI_VID, FTDI_PERLE_ULTRAPORT_PID) },
180 { USB_DEVICE(FTDI_VID, FTDI_PIEGROUP_PID) }, 442 { USB_DEVICE(FTDI_VID, FTDI_PIEGROUP_PID) },
181 { USB_DEVICE(FTDI_VID, FTDI_TNC_X_PID) }, 443 { USB_DEVICE(FTDI_VID, FTDI_TNC_X_PID) },
@@ -374,6 +636,8 @@ static struct usb_device_id id_table_combined [] = {
374 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, 636 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
375 { USB_DEVICE(FTDI_VID, FTDI_OOCDLINK_PID), 637 { USB_DEVICE(FTDI_VID, FTDI_OOCDLINK_PID),
376 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, 638 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
639 { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID_USB60F) },
640 { USB_DEVICE(FTDI_VID, FTDI_REU_TINY_PID) },
377 { }, /* Optional parameter entry */ 641 { }, /* Optional parameter entry */
378 { } /* Terminating entry */ 642 { } /* Terminating entry */
379}; 643};
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h
index 504edf8c3a3f..8302eca893ea 100644
--- a/drivers/usb/serial/ftdi_sio.h
+++ b/drivers/usb/serial/ftdi_sio.h
@@ -114,11 +114,268 @@
114#define FTDI_OOCDLINK_PID 0xbaf8 /* Amontec JTAGkey */ 114#define FTDI_OOCDLINK_PID 0xbaf8 /* Amontec JTAGkey */
115 115
116/* 116/*
117 * The following are the values for the Matrix Orbital VK204-25-USB 117 * The following are the values for the Matrix Orbital FTDI Range
118 * display, which use the FT232RL. 118 * Anything in this range will use an FT232RL.
119 */ 119 */
120#define MTXORB_VK_VID 0x1b3d 120#define MTXORB_VID 0x1B3D
121#define MTXORB_VK_PID 0x0158 121#define MTXORB_FTDI_RANGE_0100_PID 0x0100
122#define MTXORB_FTDI_RANGE_0101_PID 0x0101
123#define MTXORB_FTDI_RANGE_0102_PID 0x0102
124#define MTXORB_FTDI_RANGE_0103_PID 0x0103
125#define MTXORB_FTDI_RANGE_0104_PID 0x0104
126#define MTXORB_FTDI_RANGE_0105_PID 0x0105
127#define MTXORB_FTDI_RANGE_0106_PID 0x0106
128#define MTXORB_FTDI_RANGE_0107_PID 0x0107
129#define MTXORB_FTDI_RANGE_0108_PID 0x0108
130#define MTXORB_FTDI_RANGE_0109_PID 0x0109
131#define MTXORB_FTDI_RANGE_010A_PID 0x010A
132#define MTXORB_FTDI_RANGE_010B_PID 0x010B
133#define MTXORB_FTDI_RANGE_010C_PID 0x010C
134#define MTXORB_FTDI_RANGE_010D_PID 0x010D
135#define MTXORB_FTDI_RANGE_010E_PID 0x010E
136#define MTXORB_FTDI_RANGE_010F_PID 0x010F
137#define MTXORB_FTDI_RANGE_0110_PID 0x0110
138#define MTXORB_FTDI_RANGE_0111_PID 0x0111
139#define MTXORB_FTDI_RANGE_0112_PID 0x0112
140#define MTXORB_FTDI_RANGE_0113_PID 0x0113
141#define MTXORB_FTDI_RANGE_0114_PID 0x0114
142#define MTXORB_FTDI_RANGE_0115_PID 0x0115
143#define MTXORB_FTDI_RANGE_0116_PID 0x0116
144#define MTXORB_FTDI_RANGE_0117_PID 0x0117
145#define MTXORB_FTDI_RANGE_0118_PID 0x0118
146#define MTXORB_FTDI_RANGE_0119_PID 0x0119
147#define MTXORB_FTDI_RANGE_011A_PID 0x011A
148#define MTXORB_FTDI_RANGE_011B_PID 0x011B
149#define MTXORB_FTDI_RANGE_011C_PID 0x011C
150#define MTXORB_FTDI_RANGE_011D_PID 0x011D
151#define MTXORB_FTDI_RANGE_011E_PID 0x011E
152#define MTXORB_FTDI_RANGE_011F_PID 0x011F
153#define MTXORB_FTDI_RANGE_0120_PID 0x0120
154#define MTXORB_FTDI_RANGE_0121_PID 0x0121
155#define MTXORB_FTDI_RANGE_0122_PID 0x0122
156#define MTXORB_FTDI_RANGE_0123_PID 0x0123
157#define MTXORB_FTDI_RANGE_0124_PID 0x0124
158#define MTXORB_FTDI_RANGE_0125_PID 0x0125
159#define MTXORB_FTDI_RANGE_0126_PID 0x0126
160#define MTXORB_FTDI_RANGE_0127_PID 0x0127
161#define MTXORB_FTDI_RANGE_0128_PID 0x0128
162#define MTXORB_FTDI_RANGE_0129_PID 0x0129
163#define MTXORB_FTDI_RANGE_012A_PID 0x012A
164#define MTXORB_FTDI_RANGE_012B_PID 0x012B
165#define MTXORB_FTDI_RANGE_012C_PID 0x012C
166#define MTXORB_FTDI_RANGE_012D_PID 0x012D
167#define MTXORB_FTDI_RANGE_012E_PID 0x012E
168#define MTXORB_FTDI_RANGE_012F_PID 0x012F
169#define MTXORB_FTDI_RANGE_0130_PID 0x0130
170#define MTXORB_FTDI_RANGE_0131_PID 0x0131
171#define MTXORB_FTDI_RANGE_0132_PID 0x0132
172#define MTXORB_FTDI_RANGE_0133_PID 0x0133
173#define MTXORB_FTDI_RANGE_0134_PID 0x0134
174#define MTXORB_FTDI_RANGE_0135_PID 0x0135
175#define MTXORB_FTDI_RANGE_0136_PID 0x0136
176#define MTXORB_FTDI_RANGE_0137_PID 0x0137
177#define MTXORB_FTDI_RANGE_0138_PID 0x0138
178#define MTXORB_FTDI_RANGE_0139_PID 0x0139
179#define MTXORB_FTDI_RANGE_013A_PID 0x013A
180#define MTXORB_FTDI_RANGE_013B_PID 0x013B
181#define MTXORB_FTDI_RANGE_013C_PID 0x013C
182#define MTXORB_FTDI_RANGE_013D_PID 0x013D
183#define MTXORB_FTDI_RANGE_013E_PID 0x013E
184#define MTXORB_FTDI_RANGE_013F_PID 0x013F
185#define MTXORB_FTDI_RANGE_0140_PID 0x0140
186#define MTXORB_FTDI_RANGE_0141_PID 0x0141
187#define MTXORB_FTDI_RANGE_0142_PID 0x0142
188#define MTXORB_FTDI_RANGE_0143_PID 0x0143
189#define MTXORB_FTDI_RANGE_0144_PID 0x0144
190#define MTXORB_FTDI_RANGE_0145_PID 0x0145
191#define MTXORB_FTDI_RANGE_0146_PID 0x0146
192#define MTXORB_FTDI_RANGE_0147_PID 0x0147
193#define MTXORB_FTDI_RANGE_0148_PID 0x0148
194#define MTXORB_FTDI_RANGE_0149_PID 0x0149
195#define MTXORB_FTDI_RANGE_014A_PID 0x014A
196#define MTXORB_FTDI_RANGE_014B_PID 0x014B
197#define MTXORB_FTDI_RANGE_014C_PID 0x014C
198#define MTXORB_FTDI_RANGE_014D_PID 0x014D
199#define MTXORB_FTDI_RANGE_014E_PID 0x014E
200#define MTXORB_FTDI_RANGE_014F_PID 0x014F
201#define MTXORB_FTDI_RANGE_0150_PID 0x0150
202#define MTXORB_FTDI_RANGE_0151_PID 0x0151
203#define MTXORB_FTDI_RANGE_0152_PID 0x0152
204#define MTXORB_FTDI_RANGE_0153_PID 0x0153
205#define MTXORB_FTDI_RANGE_0154_PID 0x0154
206#define MTXORB_FTDI_RANGE_0155_PID 0x0155
207#define MTXORB_FTDI_RANGE_0156_PID 0x0156
208#define MTXORB_FTDI_RANGE_0157_PID 0x0157
209#define MTXORB_FTDI_RANGE_0158_PID 0x0158
210#define MTXORB_FTDI_RANGE_0159_PID 0x0159
211#define MTXORB_FTDI_RANGE_015A_PID 0x015A
212#define MTXORB_FTDI_RANGE_015B_PID 0x015B
213#define MTXORB_FTDI_RANGE_015C_PID 0x015C
214#define MTXORB_FTDI_RANGE_015D_PID 0x015D
215#define MTXORB_FTDI_RANGE_015E_PID 0x015E
216#define MTXORB_FTDI_RANGE_015F_PID 0x015F
217#define MTXORB_FTDI_RANGE_0160_PID 0x0160
218#define MTXORB_FTDI_RANGE_0161_PID 0x0161
219#define MTXORB_FTDI_RANGE_0162_PID 0x0162
220#define MTXORB_FTDI_RANGE_0163_PID 0x0163
221#define MTXORB_FTDI_RANGE_0164_PID 0x0164
222#define MTXORB_FTDI_RANGE_0165_PID 0x0165
223#define MTXORB_FTDI_RANGE_0166_PID 0x0166
224#define MTXORB_FTDI_RANGE_0167_PID 0x0167
225#define MTXORB_FTDI_RANGE_0168_PID 0x0168
226#define MTXORB_FTDI_RANGE_0169_PID 0x0169
227#define MTXORB_FTDI_RANGE_016A_PID 0x016A
228#define MTXORB_FTDI_RANGE_016B_PID 0x016B
229#define MTXORB_FTDI_RANGE_016C_PID 0x016C
230#define MTXORB_FTDI_RANGE_016D_PID 0x016D
231#define MTXORB_FTDI_RANGE_016E_PID 0x016E
232#define MTXORB_FTDI_RANGE_016F_PID 0x016F
233#define MTXORB_FTDI_RANGE_0170_PID 0x0170
234#define MTXORB_FTDI_RANGE_0171_PID 0x0171
235#define MTXORB_FTDI_RANGE_0172_PID 0x0172
236#define MTXORB_FTDI_RANGE_0173_PID 0x0173
237#define MTXORB_FTDI_RANGE_0174_PID 0x0174
238#define MTXORB_FTDI_RANGE_0175_PID 0x0175
239#define MTXORB_FTDI_RANGE_0176_PID 0x0176
240#define MTXORB_FTDI_RANGE_0177_PID 0x0177
241#define MTXORB_FTDI_RANGE_0178_PID 0x0178
242#define MTXORB_FTDI_RANGE_0179_PID 0x0179
243#define MTXORB_FTDI_RANGE_017A_PID 0x017A
244#define MTXORB_FTDI_RANGE_017B_PID 0x017B
245#define MTXORB_FTDI_RANGE_017C_PID 0x017C
246#define MTXORB_FTDI_RANGE_017D_PID 0x017D
247#define MTXORB_FTDI_RANGE_017E_PID 0x017E
248#define MTXORB_FTDI_RANGE_017F_PID 0x017F
249#define MTXORB_FTDI_RANGE_0180_PID 0x0180
250#define MTXORB_FTDI_RANGE_0181_PID 0x0181
251#define MTXORB_FTDI_RANGE_0182_PID 0x0182
252#define MTXORB_FTDI_RANGE_0183_PID 0x0183
253#define MTXORB_FTDI_RANGE_0184_PID 0x0184
254#define MTXORB_FTDI_RANGE_0185_PID 0x0185
255#define MTXORB_FTDI_RANGE_0186_PID 0x0186
256#define MTXORB_FTDI_RANGE_0187_PID 0x0187
257#define MTXORB_FTDI_RANGE_0188_PID 0x0188
258#define MTXORB_FTDI_RANGE_0189_PID 0x0189
259#define MTXORB_FTDI_RANGE_018A_PID 0x018A
260#define MTXORB_FTDI_RANGE_018B_PID 0x018B
261#define MTXORB_FTDI_RANGE_018C_PID 0x018C
262#define MTXORB_FTDI_RANGE_018D_PID 0x018D
263#define MTXORB_FTDI_RANGE_018E_PID 0x018E
264#define MTXORB_FTDI_RANGE_018F_PID 0x018F
265#define MTXORB_FTDI_RANGE_0190_PID 0x0190
266#define MTXORB_FTDI_RANGE_0191_PID 0x0191
267#define MTXORB_FTDI_RANGE_0192_PID 0x0192
268#define MTXORB_FTDI_RANGE_0193_PID 0x0193
269#define MTXORB_FTDI_RANGE_0194_PID 0x0194
270#define MTXORB_FTDI_RANGE_0195_PID 0x0195
271#define MTXORB_FTDI_RANGE_0196_PID 0x0196
272#define MTXORB_FTDI_RANGE_0197_PID 0x0197
273#define MTXORB_FTDI_RANGE_0198_PID 0x0198
274#define MTXORB_FTDI_RANGE_0199_PID 0x0199
275#define MTXORB_FTDI_RANGE_019A_PID 0x019A
276#define MTXORB_FTDI_RANGE_019B_PID 0x019B
277#define MTXORB_FTDI_RANGE_019C_PID 0x019C
278#define MTXORB_FTDI_RANGE_019D_PID 0x019D
279#define MTXORB_FTDI_RANGE_019E_PID 0x019E
280#define MTXORB_FTDI_RANGE_019F_PID 0x019F
281#define MTXORB_FTDI_RANGE_01A0_PID 0x01A0
282#define MTXORB_FTDI_RANGE_01A1_PID 0x01A1
283#define MTXORB_FTDI_RANGE_01A2_PID 0x01A2
284#define MTXORB_FTDI_RANGE_01A3_PID 0x01A3
285#define MTXORB_FTDI_RANGE_01A4_PID 0x01A4
286#define MTXORB_FTDI_RANGE_01A5_PID 0x01A5
287#define MTXORB_FTDI_RANGE_01A6_PID 0x01A6
288#define MTXORB_FTDI_RANGE_01A7_PID 0x01A7
289#define MTXORB_FTDI_RANGE_01A8_PID 0x01A8
290#define MTXORB_FTDI_RANGE_01A9_PID 0x01A9
291#define MTXORB_FTDI_RANGE_01AA_PID 0x01AA
292#define MTXORB_FTDI_RANGE_01AB_PID 0x01AB
293#define MTXORB_FTDI_RANGE_01AC_PID 0x01AC
294#define MTXORB_FTDI_RANGE_01AD_PID 0x01AD
295#define MTXORB_FTDI_RANGE_01AE_PID 0x01AE
296#define MTXORB_FTDI_RANGE_01AF_PID 0x01AF
297#define MTXORB_FTDI_RANGE_01B0_PID 0x01B0
298#define MTXORB_FTDI_RANGE_01B1_PID 0x01B1
299#define MTXORB_FTDI_RANGE_01B2_PID 0x01B2
300#define MTXORB_FTDI_RANGE_01B3_PID 0x01B3
301#define MTXORB_FTDI_RANGE_01B4_PID 0x01B4
302#define MTXORB_FTDI_RANGE_01B5_PID 0x01B5
303#define MTXORB_FTDI_RANGE_01B6_PID 0x01B6
304#define MTXORB_FTDI_RANGE_01B7_PID 0x01B7
305#define MTXORB_FTDI_RANGE_01B8_PID 0x01B8
306#define MTXORB_FTDI_RANGE_01B9_PID 0x01B9
307#define MTXORB_FTDI_RANGE_01BA_PID 0x01BA
308#define MTXORB_FTDI_RANGE_01BB_PID 0x01BB
309#define MTXORB_FTDI_RANGE_01BC_PID 0x01BC
310#define MTXORB_FTDI_RANGE_01BD_PID 0x01BD
311#define MTXORB_FTDI_RANGE_01BE_PID 0x01BE
312#define MTXORB_FTDI_RANGE_01BF_PID 0x01BF
313#define MTXORB_FTDI_RANGE_01C0_PID 0x01C0
314#define MTXORB_FTDI_RANGE_01C1_PID 0x01C1
315#define MTXORB_FTDI_RANGE_01C2_PID 0x01C2
316#define MTXORB_FTDI_RANGE_01C3_PID 0x01C3
317#define MTXORB_FTDI_RANGE_01C4_PID 0x01C4
318#define MTXORB_FTDI_RANGE_01C5_PID 0x01C5
319#define MTXORB_FTDI_RANGE_01C6_PID 0x01C6
320#define MTXORB_FTDI_RANGE_01C7_PID 0x01C7
321#define MTXORB_FTDI_RANGE_01C8_PID 0x01C8
322#define MTXORB_FTDI_RANGE_01C9_PID 0x01C9
323#define MTXORB_FTDI_RANGE_01CA_PID 0x01CA
324#define MTXORB_FTDI_RANGE_01CB_PID 0x01CB
325#define MTXORB_FTDI_RANGE_01CC_PID 0x01CC
326#define MTXORB_FTDI_RANGE_01CD_PID 0x01CD
327#define MTXORB_FTDI_RANGE_01CE_PID 0x01CE
328#define MTXORB_FTDI_RANGE_01CF_PID 0x01CF
329#define MTXORB_FTDI_RANGE_01D0_PID 0x01D0
330#define MTXORB_FTDI_RANGE_01D1_PID 0x01D1
331#define MTXORB_FTDI_RANGE_01D2_PID 0x01D2
332#define MTXORB_FTDI_RANGE_01D3_PID 0x01D3
333#define MTXORB_FTDI_RANGE_01D4_PID 0x01D4
334#define MTXORB_FTDI_RANGE_01D5_PID 0x01D5
335#define MTXORB_FTDI_RANGE_01D6_PID 0x01D6
336#define MTXORB_FTDI_RANGE_01D7_PID 0x01D7
337#define MTXORB_FTDI_RANGE_01D8_PID 0x01D8
338#define MTXORB_FTDI_RANGE_01D9_PID 0x01D9
339#define MTXORB_FTDI_RANGE_01DA_PID 0x01DA
340#define MTXORB_FTDI_RANGE_01DB_PID 0x01DB
341#define MTXORB_FTDI_RANGE_01DC_PID 0x01DC
342#define MTXORB_FTDI_RANGE_01DD_PID 0x01DD
343#define MTXORB_FTDI_RANGE_01DE_PID 0x01DE
344#define MTXORB_FTDI_RANGE_01DF_PID 0x01DF
345#define MTXORB_FTDI_RANGE_01E0_PID 0x01E0
346#define MTXORB_FTDI_RANGE_01E1_PID 0x01E1
347#define MTXORB_FTDI_RANGE_01E2_PID 0x01E2
348#define MTXORB_FTDI_RANGE_01E3_PID 0x01E3
349#define MTXORB_FTDI_RANGE_01E4_PID 0x01E4
350#define MTXORB_FTDI_RANGE_01E5_PID 0x01E5
351#define MTXORB_FTDI_RANGE_01E6_PID 0x01E6
352#define MTXORB_FTDI_RANGE_01E7_PID 0x01E7
353#define MTXORB_FTDI_RANGE_01E8_PID 0x01E8
354#define MTXORB_FTDI_RANGE_01E9_PID 0x01E9
355#define MTXORB_FTDI_RANGE_01EA_PID 0x01EA
356#define MTXORB_FTDI_RANGE_01EB_PID 0x01EB
357#define MTXORB_FTDI_RANGE_01EC_PID 0x01EC
358#define MTXORB_FTDI_RANGE_01ED_PID 0x01ED
359#define MTXORB_FTDI_RANGE_01EE_PID 0x01EE
360#define MTXORB_FTDI_RANGE_01EF_PID 0x01EF
361#define MTXORB_FTDI_RANGE_01F0_PID 0x01F0
362#define MTXORB_FTDI_RANGE_01F1_PID 0x01F1
363#define MTXORB_FTDI_RANGE_01F2_PID 0x01F2
364#define MTXORB_FTDI_RANGE_01F3_PID 0x01F3
365#define MTXORB_FTDI_RANGE_01F4_PID 0x01F4
366#define MTXORB_FTDI_RANGE_01F5_PID 0x01F5
367#define MTXORB_FTDI_RANGE_01F6_PID 0x01F6
368#define MTXORB_FTDI_RANGE_01F7_PID 0x01F7
369#define MTXORB_FTDI_RANGE_01F8_PID 0x01F8
370#define MTXORB_FTDI_RANGE_01F9_PID 0x01F9
371#define MTXORB_FTDI_RANGE_01FA_PID 0x01FA
372#define MTXORB_FTDI_RANGE_01FB_PID 0x01FB
373#define MTXORB_FTDI_RANGE_01FC_PID 0x01FC
374#define MTXORB_FTDI_RANGE_01FD_PID 0x01FD
375#define MTXORB_FTDI_RANGE_01FE_PID 0x01FE
376#define MTXORB_FTDI_RANGE_01FF_PID 0x01FF
377
378
122 379
123/* Interbiometrics USB I/O Board */ 380/* Interbiometrics USB I/O Board */
124/* Developed for Interbiometrics by Rudolf Gugler */ 381/* Developed for Interbiometrics by Rudolf Gugler */
@@ -571,6 +828,9 @@
571/* Propox devices */ 828/* Propox devices */
572#define FTDI_PROPOX_JTAGCABLEII_PID 0xD738 829#define FTDI_PROPOX_JTAGCABLEII_PID 0xD738
573 830
831/* Rig Expert Ukraine devices */
832#define FTDI_REU_TINY_PID 0xED22 /* RigExpert Tiny */
833
574/* Commands */ 834/* Commands */
575#define FTDI_SIO_RESET 0 /* Reset the port */ 835#define FTDI_SIO_RESET 0 /* Reset the port */
576#define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */ 836#define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */
@@ -592,6 +852,12 @@
592#define FIC_NEO1973_DEBUG_PID 0x5118 852#define FIC_NEO1973_DEBUG_PID 0x5118
593 853
594/* 854/*
855 * RATOC REX-USB60F
856 */
857#define RATOC_VENDOR_ID 0x0584
858#define RATOC_PRODUCT_ID_USB60F 0xb020
859
860/*
595 * BmRequestType: 1100 0000b 861 * BmRequestType: 1100 0000b
596 * bRequest: FTDI_E2_READ 862 * bRequest: FTDI_E2_READ
597 * wValue: 0 863 * wValue: 0
diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c
index ea924dc48496..d9fb3768a2d7 100644
--- a/drivers/usb/serial/ipaq.c
+++ b/drivers/usb/serial/ipaq.c
@@ -570,7 +570,12 @@ static struct usb_serial_driver ipaq_device = {
570 .description = "PocketPC PDA", 570 .description = "PocketPC PDA",
571 .usb_driver = &ipaq_driver, 571 .usb_driver = &ipaq_driver,
572 .id_table = ipaq_id_table, 572 .id_table = ipaq_id_table,
573 .num_ports = 2, 573 /*
574 * some devices have an extra endpoint, which
575 * must be ignored as it would make the core
576 * create a second port which oopses when used
577 */
578 .num_ports = 1,
574 .open = ipaq_open, 579 .open = ipaq_open,
575 .close = ipaq_close, 580 .close = ipaq_close,
576 .attach = ipaq_startup, 581 .attach = ipaq_startup,
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index e7e016e60333..a73420dd052a 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -183,6 +183,7 @@ static int option_send_setup(struct usb_serial_port *port);
183#define AXESSTEL_PRODUCT_MV110H 0x1000 183#define AXESSTEL_PRODUCT_MV110H 0x1000
184 184
185#define ONDA_VENDOR_ID 0x19d2 185#define ONDA_VENDOR_ID 0x19d2
186#define ONDA_PRODUCT_MSA501HS 0x0001
186#define ONDA_PRODUCT_ET502HS 0x0002 187#define ONDA_PRODUCT_ET502HS 0x0002
187 188
188#define BANDRICH_VENDOR_ID 0x1A8D 189#define BANDRICH_VENDOR_ID 0x1A8D
@@ -196,6 +197,9 @@ static int option_send_setup(struct usb_serial_port *port);
196 197
197#define MAXON_VENDOR_ID 0x16d8 198#define MAXON_VENDOR_ID 0x16d8
198 199
200#define TELIT_VENDOR_ID 0x1bc7
201#define TELIT_PRODUCT_UC864E 0x1003
202
199static struct usb_device_id option_ids[] = { 203static struct usb_device_id option_ids[] = {
200 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) }, 204 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
201 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) }, 205 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
@@ -232,25 +236,25 @@ static struct usb_device_id option_ids[] = {
232 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_NETWORK_EX) }, 236 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_NETWORK_EX) },
233 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_MODEM) }, 237 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_MODEM) },
234 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_NETWORK) }, 238 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_NETWORK) },
235 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) }, 239 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600, 0xff, 0xff, 0xff) },
236 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 0xff, 0xff, 0xff) }, 240 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 0xff, 0xff, 0xff) },
237 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) }, 241 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) },
238 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1401) }, 242 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1401, 0xff, 0xff, 0xff) },
239 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1403) }, 243 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1403, 0xff, 0xff, 0xff) },
240 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1405) }, 244 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1405, 0xff, 0xff, 0xff) },
241 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1406) }, 245 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1406, 0xff, 0xff, 0xff) },
242 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1408) }, 246 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1408, 0xff, 0xff, 0xff) },
243 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1409) }, 247 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1409, 0xff, 0xff, 0xff) },
244 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1410) }, 248 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1410, 0xff, 0xff, 0xff) },
245 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1411) }, 249 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1411, 0xff, 0xff, 0xff) },
246 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1412) }, 250 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1412, 0xff, 0xff, 0xff) },
247 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1413) }, 251 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1413, 0xff, 0xff, 0xff) },
248 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1414) }, 252 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1414, 0xff, 0xff, 0xff) },
249 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1415) }, 253 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1415, 0xff, 0xff, 0xff) },
250 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1416) }, 254 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1416, 0xff, 0xff, 0xff) },
251 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1417) }, 255 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1417, 0xff, 0xff, 0xff) },
252 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1418) }, 256 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1418, 0xff, 0xff, 0xff) },
253 { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1419) }, 257 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1419, 0xff, 0xff, 0xff) },
254 { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_9508) }, 258 { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_9508) },
255 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, /* Novatel Merlin V640/XV620 */ 259 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, /* Novatel Merlin V640/XV620 */
256 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) }, /* Novatel Merlin V620/S620 */ 260 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) }, /* Novatel Merlin V620/S620 */
@@ -297,13 +301,15 @@ static struct usb_device_id option_ids[] = {
297 { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, 301 { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) },
298 { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, 302 { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) },
299 { USB_DEVICE(AXESSTEL_VENDOR_ID, AXESSTEL_PRODUCT_MV110H) }, 303 { USB_DEVICE(AXESSTEL_VENDOR_ID, AXESSTEL_PRODUCT_MV110H) },
304 { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_MSA501HS) },
300 { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_ET502HS) }, 305 { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_ET502HS) },
301 { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) }, 306 { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_1) },
302 { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) }, 307 { USB_DEVICE(BANDRICH_VENDOR_ID, BANDRICH_PRODUCT_C100_2) },
303 { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) }, 308 { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) },
309 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6000)}, /* ZTE AC8700 */
304 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ 310 { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */
305 { USB_DEVICE(MAXON_VENDOR_ID, 0x6280) }, /* BP3-USB & BP3-EXT HSDPA */ 311 { USB_DEVICE(MAXON_VENDOR_ID, 0x6280) }, /* BP3-USB & BP3-EXT HSDPA */
306 { USB_DEVICE(0x19d2, 0x0001) }, /* Telstra NextG CDMA */ 312 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) },
307 { } /* Terminating entry */ 313 { } /* Terminating entry */
308}; 314};
309MODULE_DEVICE_TABLE(usb, option_ids); 315MODULE_DEVICE_TABLE(usb, option_ids);
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index c605fb68f807..2a0dd1b50dc4 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -56,6 +56,8 @@ static struct usb_device_id id_table [] = {
56 { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ3) }, 56 { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ3) },
57 { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_PHAROS) }, 57 { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_PHAROS) },
58 { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_ALDIGA) }, 58 { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_ALDIGA) },
59 { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_MMX) },
60 { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_GPRS) },
59 { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) }, 61 { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) },
60 { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) }, 62 { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) },
61 { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) }, 63 { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) },
@@ -66,7 +68,6 @@ static struct usb_device_id id_table [] = {
66 { USB_DEVICE(ITEGNO_VENDOR_ID, ITEGNO_PRODUCT_ID_2080) }, 68 { USB_DEVICE(ITEGNO_VENDOR_ID, ITEGNO_PRODUCT_ID_2080) },
67 { USB_DEVICE(MA620_VENDOR_ID, MA620_PRODUCT_ID) }, 69 { USB_DEVICE(MA620_VENDOR_ID, MA620_PRODUCT_ID) },
68 { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID) }, 70 { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID) },
69 { USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID_USB60F) },
70 { USB_DEVICE(TRIPP_VENDOR_ID, TRIPP_PRODUCT_ID) }, 71 { USB_DEVICE(TRIPP_VENDOR_ID, TRIPP_PRODUCT_ID) },
71 { USB_DEVICE(RADIOSHACK_VENDOR_ID, RADIOSHACK_PRODUCT_ID) }, 72 { USB_DEVICE(RADIOSHACK_VENDOR_ID, RADIOSHACK_PRODUCT_ID) },
72 { USB_DEVICE(DCU10_VENDOR_ID, DCU10_PRODUCT_ID) }, 73 { USB_DEVICE(DCU10_VENDOR_ID, DCU10_PRODUCT_ID) },
diff --git a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h
index 10cf872e5ecb..6ac3bbcf7a22 100644
--- a/drivers/usb/serial/pl2303.h
+++ b/drivers/usb/serial/pl2303.h
@@ -14,6 +14,8 @@
14#define PL2303_PRODUCT_ID_PHAROS 0xaaa0 14#define PL2303_PRODUCT_ID_PHAROS 0xaaa0
15#define PL2303_PRODUCT_ID_RSAQ3 0xaaa2 15#define PL2303_PRODUCT_ID_RSAQ3 0xaaa2
16#define PL2303_PRODUCT_ID_ALDIGA 0x0611 16#define PL2303_PRODUCT_ID_ALDIGA 0x0611
17#define PL2303_PRODUCT_ID_MMX 0x0612
18#define PL2303_PRODUCT_ID_GPRS 0x0609
17 19
18#define ATEN_VENDOR_ID 0x0557 20#define ATEN_VENDOR_ID 0x0557
19#define ATEN_VENDOR_ID2 0x0547 21#define ATEN_VENDOR_ID2 0x0547
@@ -36,7 +38,6 @@
36 38
37#define RATOC_VENDOR_ID 0x0584 39#define RATOC_VENDOR_ID 0x0584
38#define RATOC_PRODUCT_ID 0xb000 40#define RATOC_PRODUCT_ID 0xb000
39#define RATOC_PRODUCT_ID_USB60F 0xb020
40 41
41#define TRIPP_VENDOR_ID 0x2478 42#define TRIPP_VENDOR_ID 0x2478
42#define TRIPP_PRODUCT_ID 0x2008 43#define TRIPP_PRODUCT_ID 0x2008
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index 1b09578cbb10..39a7c11795c4 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -402,10 +402,18 @@ UNUSUAL_DEV( 0x04a5, 0x3010, 0x0100, 0x0100,
402 US_FL_IGNORE_RESIDUE ), 402 US_FL_IGNORE_RESIDUE ),
403 403
404#ifdef CONFIG_USB_STORAGE_CYPRESS_ATACB 404#ifdef CONFIG_USB_STORAGE_CYPRESS_ATACB
405/* CY7C68300 : support atacb */
405UNUSUAL_DEV( 0x04b4, 0x6830, 0x0000, 0x9999, 406UNUSUAL_DEV( 0x04b4, 0x6830, 0x0000, 0x9999,
406 "Cypress", 407 "Cypress",
407 "Cypress AT2LP", 408 "Cypress AT2LP",
408 US_SC_CYP_ATACB, US_PR_BULK, NULL, 409 US_SC_CYP_ATACB, US_PR_DEVICE, NULL,
410 0),
411
412/* CY7C68310 : support atacb and atacb2 */
413UNUSUAL_DEV( 0x04b4, 0x6831, 0x0000, 0x9999,
414 "Cypress",
415 "Cypress ISD-300LP",
416 US_SC_CYP_ATACB, US_PR_DEVICE, NULL,
409 0), 417 0),
410#endif 418#endif
411 419
@@ -1522,7 +1530,7 @@ UNUSUAL_DEV( 0x0fce, 0xe031, 0x0000, 0x0000,
1522 "Sony Ericsson", 1530 "Sony Ericsson",
1523 "M600i", 1531 "M600i",
1524 US_SC_DEVICE, US_PR_DEVICE, NULL, 1532 US_SC_DEVICE, US_PR_DEVICE, NULL,
1525 US_FL_FIX_CAPACITY ), 1533 US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ),
1526 1534
1527/* Reported by Kevin Cernekee <kpc-usbdev@gelato.uiuc.edu> 1535/* Reported by Kevin Cernekee <kpc-usbdev@gelato.uiuc.edu>
1528 * Tested on hardware version 1.10. 1536 * Tested on hardware version 1.10.
@@ -1716,10 +1724,12 @@ UNUSUAL_DEV( 0x22b8, 0x3010, 0x0001, 0x0001,
1716/* 1724/*
1717 * Patch by Pete Zaitcev <zaitcev@redhat.com> 1725 * Patch by Pete Zaitcev <zaitcev@redhat.com>
1718 * Report by Mark Patton. Red Hat bz#208928. 1726 * Report by Mark Patton. Red Hat bz#208928.
1727 * Added support for rev 0x0002 (Motorola ROKR W5)
1728 * by Javier Smaldone <javier@smaldone.com.ar>
1719 */ 1729 */
1720UNUSUAL_DEV( 0x22b8, 0x4810, 0x0001, 0x0001, 1730UNUSUAL_DEV( 0x22b8, 0x4810, 0x0001, 0x0002,
1721 "Motorola", 1731 "Motorola",
1722 "RAZR V3i", 1732 "RAZR V3i/ROKR W5",
1723 US_SC_DEVICE, US_PR_DEVICE, NULL, 1733 US_SC_DEVICE, US_PR_DEVICE, NULL,
1724 US_FL_FIX_CAPACITY), 1734 US_FL_FIX_CAPACITY),
1725 1735
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 002b61b4f0f6..e0c5f96b273d 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -1825,12 +1825,13 @@ config FB_FSL_DIU
1825 1825
1826config FB_W100 1826config FB_W100
1827 tristate "W100 frame buffer support" 1827 tristate "W100 frame buffer support"
1828 depends on FB && PXA_SHARPSL 1828 depends on FB && ARCH_PXA
1829 select FB_CFB_FILLRECT 1829 select FB_CFB_FILLRECT
1830 select FB_CFB_COPYAREA 1830 select FB_CFB_COPYAREA
1831 select FB_CFB_IMAGEBLIT 1831 select FB_CFB_IMAGEBLIT
1832 ---help--- 1832 ---help---
1833 Frame buffer driver for the w100 as found on the Sharp SL-Cxx series. 1833 Frame buffer driver for the w100 as found on the Sharp SL-Cxx series.
1834 It can also drive the w3220 chip found on iPAQ hx4700.
1834 1835
1835 This driver is also available as a module ( = code which can be 1836 This driver is also available as a module ( = code which can be
1836 inserted and removed from the running kernel whenever you want). The 1837 inserted and removed from the running kernel whenever you want). The
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
index e4bcf5376a99..bd4ac0bafecb 100644
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -3356,7 +3356,7 @@ static int __devinit atyfb_setup_generic(struct pci_dev *pdev, struct fb_info *i
3356 3356
3357 info->fix.mmio_start = raddr; 3357 info->fix.mmio_start = raddr;
3358 par->ati_regbase = ioremap(info->fix.mmio_start, 0x1000); 3358 par->ati_regbase = ioremap(info->fix.mmio_start, 0x1000);
3359 if (par->ati_regbase == 0) 3359 if (par->ati_regbase == NULL)
3360 return -ENOMEM; 3360 return -ENOMEM;
3361 3361
3362 info->fix.mmio_start += par->aux_start ? 0x400 : 0xc00; 3362 info->fix.mmio_start += par->aux_start ? 0x400 : 0xc00;
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
index 72cd0d2f14ec..400e9264e456 100644
--- a/drivers/video/aty/radeon_base.c
+++ b/drivers/video/aty/radeon_base.c
@@ -2277,8 +2277,8 @@ static int __devinit radeonfb_pci_register (struct pci_dev *pdev,
2277 do { 2277 do {
2278 rinfo->fb_base = ioremap (rinfo->fb_base_phys, 2278 rinfo->fb_base = ioremap (rinfo->fb_base_phys,
2279 rinfo->mapped_vram); 2279 rinfo->mapped_vram);
2280 } while ( rinfo->fb_base == 0 && 2280 } while (rinfo->fb_base == NULL &&
2281 ((rinfo->mapped_vram /=2) >= MIN_MAPPED_VRAM) ); 2281 ((rinfo->mapped_vram /= 2) >= MIN_MAPPED_VRAM));
2282 2282
2283 if (rinfo->fb_base == NULL) { 2283 if (rinfo->fb_base == NULL) {
2284 printk (KERN_ERR "radeonfb (%s): cannot map FB\n", 2284 printk (KERN_ERR "radeonfb (%s): cannot map FB\n",
diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c
index 35ac9d956b3d..c14b2435d23e 100644
--- a/drivers/video/cirrusfb.c
+++ b/drivers/video/cirrusfb.c
@@ -2432,9 +2432,9 @@ static int cirrusfb_pci_register(struct pci_dev *pdev,
2432 info->screen_size = board_size; 2432 info->screen_size = board_size;
2433 cinfo->unmap = cirrusfb_pci_unmap; 2433 cinfo->unmap = cirrusfb_pci_unmap;
2434 2434
2435 printk(KERN_INFO " RAM (%lu kB) at 0xx%lx, ", 2435 printk(KERN_INFO "RAM (%lu kB) at 0x%lx, Cirrus "
2436 info->screen_size >> 10, board_addr); 2436 "Logic chipset on PCI bus\n",
2437 printk(KERN_INFO "Cirrus Logic chipset on PCI bus\n"); 2437 info->screen_size >> 10, board_addr);
2438 pci_set_drvdata(pdev, info); 2438 pci_set_drvdata(pdev, info);
2439 2439
2440 ret = cirrusfb_register(info); 2440 ret = cirrusfb_register(info);
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 5fa8b76673cb..97aff8db10bf 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -2275,9 +2275,7 @@ static int fbcon_switch(struct vc_data *vc)
2275 * in fb_set_var() 2275 * in fb_set_var()
2276 */ 2276 */
2277 info->var.activate = var.activate; 2277 info->var.activate = var.activate;
2278 var.yoffset = info->var.yoffset; 2278 var.vmode |= info->var.vmode & ~FB_VMODE_MASK;
2279 var.xoffset = info->var.xoffset;
2280 var.vmode = info->var.vmode;
2281 fb_set_var(info, &var); 2279 fb_set_var(info, &var);
2282 ops->var = info->var; 2280 ops->var = info->var;
2283 2281
diff --git a/drivers/video/display/display-sysfs.c b/drivers/video/display/display-sysfs.c
index 35477177bef4..6ef800bdf482 100644
--- a/drivers/video/display/display-sysfs.c
+++ b/drivers/video/display/display-sysfs.c
@@ -26,6 +26,7 @@
26#include <linux/ctype.h> 26#include <linux/ctype.h>
27#include <linux/idr.h> 27#include <linux/idr.h>
28#include <linux/err.h> 28#include <linux/err.h>
29#include <linux/kdev_t.h>
29 30
30static ssize_t display_show_name(struct device *dev, 31static ssize_t display_show_name(struct device *dev,
31 struct device_attribute *attr, char *buf) 32 struct device_attribute *attr, char *buf)
@@ -152,10 +153,13 @@ struct display_device *display_device_register(struct display_driver *driver,
152 mutex_unlock(&allocated_dsp_lock); 153 mutex_unlock(&allocated_dsp_lock);
153 154
154 if (!ret) { 155 if (!ret) {
155 new_dev->dev = device_create(display_class, parent, 0, 156 new_dev->dev = device_create_drvdata(display_class,
156 "display%d", new_dev->idx); 157 parent,
158 MKDEV(0,0),
159 new_dev,
160 "display%d",
161 new_dev->idx);
157 if (!IS_ERR(new_dev->dev)) { 162 if (!IS_ERR(new_dev->dev)) {
158 dev_set_drvdata(new_dev->dev, new_dev);
159 new_dev->parent = parent; 163 new_dev->parent = parent;
160 new_dev->driver = driver; 164 new_dev->driver = driver;
161 mutex_init(&new_dev->lock); 165 mutex_init(&new_dev->lock);
diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
index b50bb03cb5ab..712dabc6269f 100644
--- a/drivers/video/fsl-diu-fb.c
+++ b/drivers/video/fsl-diu-fb.c
@@ -286,7 +286,7 @@ static struct diu_pool pool;
286 * rheap and make the furture large allocation fail. 286 * rheap and make the furture large allocation fail.
287 */ 287 */
288 288
289void *fsl_diu_alloc(unsigned long size, phys_addr_t *phys) 289static void *fsl_diu_alloc(unsigned long size, phys_addr_t *phys)
290{ 290{
291 void *virt; 291 void *virt;
292 292
@@ -311,12 +311,12 @@ void *fsl_diu_alloc(unsigned long size, phys_addr_t *phys)
311 memset(virt, 0, size); 311 memset(virt, 0, size);
312 } 312 }
313 313
314 pr_debug("rh virt=%p phys=%lx\n", virt, *phys); 314 pr_debug("rh virt=%p phys=%llx\n", virt, (unsigned long long)*phys);
315 315
316 return virt; 316 return virt;
317} 317}
318 318
319void fsl_diu_free(void *p, unsigned long size) 319static void fsl_diu_free(void *p, unsigned long size)
320{ 320{
321 pr_debug("p=%p size=%lu\n", p, size); 321 pr_debug("p=%p size=%lu\n", p, size);
322 322
@@ -770,7 +770,7 @@ static int map_video_memory(struct fb_info *info)
770 info->fix.smem_len = info->fix.line_length * info->var.yres_virtual; 770 info->fix.smem_len = info->fix.line_length * info->var.yres_virtual;
771 pr_debug("MAP_VIDEO_MEMORY: smem_len = %d\n", info->fix.smem_len); 771 pr_debug("MAP_VIDEO_MEMORY: smem_len = %d\n", info->fix.smem_len);
772 info->screen_base = fsl_diu_alloc(info->fix.smem_len, &phys); 772 info->screen_base = fsl_diu_alloc(info->fix.smem_len, &phys);
773 if (info->screen_base == 0) { 773 if (info->screen_base == NULL) {
774 printk(KERN_ERR "Unable to allocate fb memory\n"); 774 printk(KERN_ERR "Unable to allocate fb memory\n");
775 return -ENOMEM; 775 return -ENOMEM;
776 } 776 }
@@ -788,7 +788,7 @@ static int map_video_memory(struct fb_info *info)
788static void unmap_video_memory(struct fb_info *info) 788static void unmap_video_memory(struct fb_info *info)
789{ 789{
790 fsl_diu_free(info->screen_base, info->fix.smem_len); 790 fsl_diu_free(info->screen_base, info->fix.smem_len);
791 info->screen_base = 0; 791 info->screen_base = NULL;
792 info->fix.smem_start = 0; 792 info->fix.smem_start = 0;
793 info->fix.smem_len = 0; 793 info->fix.smem_len = 0;
794} 794}
@@ -1158,7 +1158,7 @@ static int init_fbinfo(struct fb_info *info)
1158 return 0; 1158 return 0;
1159} 1159}
1160 1160
1161static int install_fb(struct fb_info *info) 1161static int __devinit install_fb(struct fb_info *info)
1162{ 1162{
1163 int rc; 1163 int rc;
1164 struct mfb_info *mfbi = info->par; 1164 struct mfb_info *mfbi = info->par;
@@ -1233,7 +1233,7 @@ static int install_fb(struct fb_info *info)
1233 return 0; 1233 return 0;
1234} 1234}
1235 1235
1236static void __exit uninstall_fb(struct fb_info *info) 1236static void uninstall_fb(struct fb_info *info)
1237{ 1237{
1238 struct mfb_info *mfbi = info->par; 1238 struct mfb_info *mfbi = info->par;
1239 1239
@@ -1287,7 +1287,7 @@ static int request_irq_local(int irq)
1287 /* Read to clear the status */ 1287 /* Read to clear the status */
1288 status = in_be32(&hw->int_status); 1288 status = in_be32(&hw->int_status);
1289 1289
1290 ret = request_irq(irq, fsl_diu_isr, 0, "diu", 0); 1290 ret = request_irq(irq, fsl_diu_isr, 0, "diu", NULL);
1291 if (ret) 1291 if (ret)
1292 pr_info("Request diu IRQ failed.\n"); 1292 pr_info("Request diu IRQ failed.\n");
1293 else { 1293 else {
@@ -1312,7 +1312,7 @@ static void free_irq_local(int irq)
1312 /* Disable all LCDC interrupt */ 1312 /* Disable all LCDC interrupt */
1313 out_be32(&hw->int_mask, 0x1f); 1313 out_be32(&hw->int_mask, 0x1f);
1314 1314
1315 free_irq(irq, 0); 1315 free_irq(irq, NULL);
1316} 1316}
1317 1317
1318#ifdef CONFIG_PM 1318#ifdef CONFIG_PM
@@ -1320,21 +1320,21 @@ static void free_irq_local(int irq)
1320 * Power management hooks. Note that we won't be called from IRQ context, 1320 * Power management hooks. Note that we won't be called from IRQ context,
1321 * unlike the blank functions above, so we may sleep. 1321 * unlike the blank functions above, so we may sleep.
1322 */ 1322 */
1323static int fsl_diu_suspend(struct of_device *dev, pm_message_t state) 1323static int fsl_diu_suspend(struct of_device *ofdev, pm_message_t state)
1324{ 1324{
1325 struct fsl_diu_data *machine_data; 1325 struct fsl_diu_data *machine_data;
1326 1326
1327 machine_data = dev_get_drvdata(&ofdev->dev); 1327 machine_data = dev_get_drvdata(&dev->dev);
1328 disable_lcdc(machine_data->fsl_diu_info[0]); 1328 disable_lcdc(machine_data->fsl_diu_info[0]);
1329 1329
1330 return 0; 1330 return 0;
1331} 1331}
1332 1332
1333static int fsl_diu_resume(struct of_device *dev) 1333static int fsl_diu_resume(struct of_device *ofdev)
1334{ 1334{
1335 struct fsl_diu_data *machine_data; 1335 struct fsl_diu_data *machine_data;
1336 1336
1337 machine_data = dev_get_drvdata(&ofdev->dev); 1337 machine_data = dev_get_drvdata(&dev->dev);
1338 enable_lcdc(machine_data->fsl_diu_info[0]); 1338 enable_lcdc(machine_data->fsl_diu_info[0]);
1339 1339
1340 return 0; 1340 return 0;
@@ -1353,7 +1353,8 @@ static int allocate_buf(struct diu_addr *buf, u32 size, u32 bytes_align)
1353 dma_addr_t paddr = 0; 1353 dma_addr_t paddr = 0;
1354 1354
1355 ssize = size + bytes_align; 1355 ssize = size + bytes_align;
1356 buf->vaddr = dma_alloc_coherent(0, ssize, &paddr, GFP_DMA | __GFP_ZERO); 1356 buf->vaddr = dma_alloc_coherent(NULL, ssize, &paddr, GFP_DMA |
1357 __GFP_ZERO);
1357 if (!buf->vaddr) 1358 if (!buf->vaddr)
1358 return -ENOMEM; 1359 return -ENOMEM;
1359 1360
@@ -1371,7 +1372,7 @@ static int allocate_buf(struct diu_addr *buf, u32 size, u32 bytes_align)
1371 1372
1372static void free_buf(struct diu_addr *buf, u32 size, u32 bytes_align) 1373static void free_buf(struct diu_addr *buf, u32 size, u32 bytes_align)
1373{ 1374{
1374 dma_free_coherent(0, size + bytes_align, 1375 dma_free_coherent(NULL, size + bytes_align,
1375 buf->vaddr, (buf->paddr - buf->offset)); 1376 buf->vaddr, (buf->paddr - buf->offset));
1376 return; 1377 return;
1377} 1378}
@@ -1411,7 +1412,7 @@ static ssize_t show_monitor(struct device *device,
1411 return diu_ops.show_monitor_port(machine_data->monitor_port, buf); 1412 return diu_ops.show_monitor_port(machine_data->monitor_port, buf);
1412} 1413}
1413 1414
1414static int fsl_diu_probe(struct of_device *ofdev, 1415static int __devinit fsl_diu_probe(struct of_device *ofdev,
1415 const struct of_device_id *match) 1416 const struct of_device_id *match)
1416{ 1417{
1417 struct device_node *np = ofdev->node; 1418 struct device_node *np = ofdev->node;
diff --git a/drivers/video/hgafb.c b/drivers/video/hgafb.c
index fb9e67228543..c18880d9db1f 100644
--- a/drivers/video/hgafb.c
+++ b/drivers/video/hgafb.c
@@ -279,7 +279,7 @@ static void hga_blank(int blank_mode)
279 279
280static int __init hga_card_detect(void) 280static int __init hga_card_detect(void)
281{ 281{
282 int count=0; 282 int count = 0;
283 void __iomem *p, *q; 283 void __iomem *p, *q;
284 unsigned short p_save, q_save; 284 unsigned short p_save, q_save;
285 285
@@ -303,20 +303,18 @@ static int __init hga_card_detect(void)
303 writew(0x55aa, p); if (readw(p) == 0x55aa) count++; 303 writew(0x55aa, p); if (readw(p) == 0x55aa) count++;
304 writew(p_save, p); 304 writew(p_save, p);
305 305
306 if (count != 2) { 306 if (count != 2)
307 return 0; 307 goto error;
308 }
309 308
310 /* Ok, there is definitely a card registering at the correct 309 /* Ok, there is definitely a card registering at the correct
311 * memory location, so now we do an I/O port test. 310 * memory location, so now we do an I/O port test.
312 */ 311 */
313 312
314 if (!test_hga_b(0x66, 0x0f)) { /* cursor low register */ 313 if (!test_hga_b(0x66, 0x0f)) /* cursor low register */
315 return 0; 314 goto error;
316 } 315
317 if (!test_hga_b(0x99, 0x0f)) { /* cursor low register */ 316 if (!test_hga_b(0x99, 0x0f)) /* cursor low register */
318 return 0; 317 goto error;
319 }
320 318
321 /* See if the card is a Hercules, by checking whether the vsync 319 /* See if the card is a Hercules, by checking whether the vsync
322 * bit of the status register is changing. This test lasts for 320 * bit of the status register is changing. This test lasts for
@@ -331,7 +329,7 @@ static int __init hga_card_detect(void)
331 } 329 }
332 330
333 if (p_save == q_save) 331 if (p_save == q_save)
334 return 0; 332 goto error;
335 333
336 switch (inb_p(HGA_STATUS_PORT) & 0x70) { 334 switch (inb_p(HGA_STATUS_PORT) & 0x70) {
337 case 0x10: 335 case 0x10:
@@ -348,6 +346,12 @@ static int __init hga_card_detect(void)
348 break; 346 break;
349 } 347 }
350 return 1; 348 return 1;
349error:
350 if (release_io_ports)
351 release_region(0x3b0, 12);
352 if (release_io_port)
353 release_region(0x3bf, 1);
354 return 0;
351} 355}
352 356
353/** 357/**
diff --git a/drivers/video/leo.c b/drivers/video/leo.c
index 8bc46e930340..13fea61d6ae4 100644
--- a/drivers/video/leo.c
+++ b/drivers/video/leo.c
@@ -17,8 +17,8 @@
17#include <linux/fb.h> 17#include <linux/fb.h>
18#include <linux/mm.h> 18#include <linux/mm.h>
19#include <linux/of_device.h> 19#include <linux/of_device.h>
20#include <linux/io.h>
20 21
21#include <asm/io.h>
22#include <asm/fbio.h> 22#include <asm/fbio.h>
23 23
24#include "sbuslib.h" 24#include "sbuslib.h"
@@ -33,7 +33,6 @@ static int leo_blank(int, struct fb_info *);
33 33
34static int leo_mmap(struct fb_info *, struct vm_area_struct *); 34static int leo_mmap(struct fb_info *, struct vm_area_struct *);
35static int leo_ioctl(struct fb_info *, unsigned int, unsigned long); 35static int leo_ioctl(struct fb_info *, unsigned int, unsigned long);
36static int leo_pan_display(struct fb_var_screeninfo *, struct fb_info *);
37 36
38/* 37/*
39 * Frame buffer operations 38 * Frame buffer operations
@@ -43,7 +42,6 @@ static struct fb_ops leo_ops = {
43 .owner = THIS_MODULE, 42 .owner = THIS_MODULE,
44 .fb_setcolreg = leo_setcolreg, 43 .fb_setcolreg = leo_setcolreg,
45 .fb_blank = leo_blank, 44 .fb_blank = leo_blank,
46 .fb_pan_display = leo_pan_display,
47 .fb_fillrect = cfb_fillrect, 45 .fb_fillrect = cfb_fillrect,
48 .fb_copyarea = cfb_copyarea, 46 .fb_copyarea = cfb_copyarea,
49 .fb_imageblit = cfb_imageblit, 47 .fb_imageblit = cfb_imageblit,
@@ -78,7 +76,7 @@ static struct fb_ops leo_ops = {
78#define LEO_CUR_TYPE_CMAP 0x00000050 76#define LEO_CUR_TYPE_CMAP 0x00000050
79 77
80struct leo_cursor { 78struct leo_cursor {
81 u8 xxx0[16]; 79 u8 xxx0[16];
82 u32 cur_type; 80 u32 cur_type;
83 u32 cur_misc; 81 u32 cur_misc;
84 u32 cur_cursxy; 82 u32 cur_cursxy;
@@ -105,7 +103,7 @@ struct leo_lx_krn {
105 103
106struct leo_lc_ss0_krn { 104struct leo_lc_ss0_krn {
107 u32 misc; 105 u32 misc;
108 u8 xxx0[0x800-4]; 106 u8 xxx0[0x800-4];
109 u32 rev; 107 u32 rev;
110}; 108};
111 109
@@ -116,7 +114,7 @@ struct leo_lc_ss0_usr {
116 u32 fontt; 114 u32 fontt;
117 u32 extent; 115 u32 extent;
118 u32 src; 116 u32 src;
119 u32 dst; 117 u32 dst;
120 u32 copy; 118 u32 copy;
121 u32 fill; 119 u32 fill;
122}; 120};
@@ -129,8 +127,8 @@ struct leo_lc_ss1_usr {
129 u8 unknown; 127 u8 unknown;
130}; 128};
131 129
132struct leo_ld { 130struct leo_ld_ss0 {
133 u8 xxx0[0xe00]; 131 u8 xxx0[0xe00];
134 u32 csr; 132 u32 csr;
135 u32 wid; 133 u32 wid;
136 u32 wmask; 134 u32 wmask;
@@ -144,13 +142,13 @@ struct leo_ld {
144 u32 src; /* Copy/Scroll (SS0 only) */ 142 u32 src; /* Copy/Scroll (SS0 only) */
145 u32 dst; /* Copy/Scroll/Fill (SS0 only) */ 143 u32 dst; /* Copy/Scroll/Fill (SS0 only) */
146 u32 extent; /* Copy/Scroll/Fill size (SS0 only) */ 144 u32 extent; /* Copy/Scroll/Fill size (SS0 only) */
147 u32 xxx1[3]; 145 u32 xxx1[3];
148 u32 setsem; /* SS1 only */ 146 u32 setsem; /* SS1 only */
149 u32 clrsem; /* SS1 only */ 147 u32 clrsem; /* SS1 only */
150 u32 clrpick; /* SS1 only */ 148 u32 clrpick; /* SS1 only */
151 u32 clrdat; /* SS1 only */ 149 u32 clrdat; /* SS1 only */
152 u32 alpha; /* SS1 only */ 150 u32 alpha; /* SS1 only */
153 u8 xxx2[0x2c]; 151 u8 xxx2[0x2c];
154 u32 winbg; 152 u32 winbg;
155 u32 planemask; 153 u32 planemask;
156 u32 rop; 154 u32 rop;
@@ -199,11 +197,12 @@ struct leo_par {
199static void leo_wait(struct leo_lx_krn __iomem *lx_krn) 197static void leo_wait(struct leo_lx_krn __iomem *lx_krn)
200{ 198{
201 int i; 199 int i;
202 200
203 for (i = 0; 201 for (i = 0;
204 (sbus_readl(&lx_krn->krn_csr) & LEO_KRN_CSR_PROGRESS) && i < 300000; 202 (sbus_readl(&lx_krn->krn_csr) & LEO_KRN_CSR_PROGRESS) &&
203 i < 300000;
205 i++) 204 i++)
206 udelay (1); /* Busy wait at most 0.3 sec */ 205 udelay(1); /* Busy wait at most 0.3 sec */
207 return; 206 return;
208} 207}
209 208
@@ -221,7 +220,7 @@ static int leo_setcolreg(unsigned regno,
221 unsigned transp, struct fb_info *info) 220 unsigned transp, struct fb_info *info)
222{ 221{
223 struct leo_par *par = (struct leo_par *) info->par; 222 struct leo_par *par = (struct leo_par *) info->par;
224 struct leo_lx_krn __iomem *lx_krn = par->lx_krn; 223 struct leo_lx_krn __iomem *lx_krn = par->lx_krn;
225 unsigned long flags; 224 unsigned long flags;
226 u32 val; 225 u32 val;
227 int i; 226 int i;
@@ -408,7 +407,7 @@ static void leo_wid_put(struct fb_info *info, struct fb_wid_list *wl)
408 leo_wait(lx_krn); 407 leo_wait(lx_krn);
409 408
410 for (i = 0, wi = wl->wl_list; i < wl->wl_count; i++, wi++) { 409 for (i = 0, wi = wl->wl_list; i < wl->wl_count; i++, wi++) {
411 switch(wi->wi_type) { 410 switch (wi->wi_type) {
412 case FB_WID_DBL_8: 411 case FB_WID_DBL_8:
413 j = (wi->wi_index & 0xf) + 0x40; 412 j = (wi->wi_index & 0xf) + 0x40;
414 break; 413 break;
@@ -453,13 +452,12 @@ static void leo_init_wids(struct fb_info *info)
453 wi.wi_index = 1; 452 wi.wi_index = 1;
454 wi.wi_values [0] = 0x30; 453 wi.wi_values [0] = 0x30;
455 leo_wid_put(info, &wl); 454 leo_wid_put(info, &wl);
456
457} 455}
458 456
459static void leo_switch_from_graph(struct fb_info *info) 457static void leo_switch_from_graph(struct fb_info *info)
460{ 458{
461 struct leo_par *par = (struct leo_par *) info->par; 459 struct leo_par *par = (struct leo_par *) info->par;
462 struct leo_ld __iomem *ss = (struct leo_ld __iomem *) par->ld_ss0; 460 struct leo_ld_ss0 __iomem *ss = par->ld_ss0;
463 unsigned long flags; 461 unsigned long flags;
464 u32 val; 462 u32 val;
465 463
@@ -485,19 +483,13 @@ static void leo_switch_from_graph(struct fb_info *info)
485 val = sbus_readl(&par->lc_ss0_usr->csr); 483 val = sbus_readl(&par->lc_ss0_usr->csr);
486 } while (val & 0x20000000); 484 } while (val & 0x20000000);
487 485
488 spin_unlock_irqrestore(&par->lock, flags); 486 /* setup screen buffer for cfb_* functions */
489} 487 sbus_writel(1, &ss->wid);
490 488 sbus_writel(0x00ffffff, &ss->planemask);
491static int leo_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) 489 sbus_writel(0x310b90, &ss->rop);
492{ 490 sbus_writel(0, &par->lc_ss0_usr->addrspace);
493 /* We just use this to catch switches out of
494 * graphics mode.
495 */
496 leo_switch_from_graph(info);
497 491
498 if (var->xoffset || var->yoffset || var->vmode) 492 spin_unlock_irqrestore(&par->lock, flags);
499 return -EINVAL;
500 return 0;
501} 493}
502 494
503static void leo_init_hw(struct fb_info *info) 495static void leo_init_hw(struct fb_info *info)
@@ -542,7 +534,8 @@ static void leo_unmap_regs(struct of_device *op, struct fb_info *info,
542 of_iounmap(&op->resource[0], info->screen_base, 0x800000); 534 of_iounmap(&op->resource[0], info->screen_base, 0x800000);
543} 535}
544 536
545static int __devinit leo_probe(struct of_device *op, const struct of_device_id *match) 537static int __devinit leo_probe(struct of_device *op,
538 const struct of_device_id *match)
546{ 539{
547 struct device_node *dp = op->node; 540 struct device_node *dp = op->node;
548 struct fb_info *info; 541 struct fb_info *info;
@@ -594,8 +587,9 @@ static int __devinit leo_probe(struct of_device *op, const struct of_device_id *
594 !info->screen_base) 587 !info->screen_base)
595 goto out_unmap_regs; 588 goto out_unmap_regs;
596 589
597 info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN; 590 info->flags = FBINFO_DEFAULT;
598 info->fbops = &leo_ops; 591 info->fbops = &leo_ops;
592 info->pseudo_palette = par->clut_data;
599 593
600 leo_init_wids(info); 594 leo_init_wids(info);
601 leo_init_hw(info); 595 leo_init_hw(info);
@@ -649,7 +643,7 @@ static int __devexit leo_remove(struct of_device *op)
649 643
650static struct of_device_id leo_match[] = { 644static struct of_device_id leo_match[] = {
651 { 645 {
652 .name = "leo", 646 .name = "SUNW,leo",
653 }, 647 },
654 {}, 648 {},
655}; 649};
diff --git a/drivers/video/matrox/matroxfb_base.h b/drivers/video/matrox/matroxfb_base.h
index f3107ad7e545..95883236c0cd 100644
--- a/drivers/video/matrox/matroxfb_base.h
+++ b/drivers/video/matrox/matroxfb_base.h
@@ -200,7 +200,7 @@ static inline int mga_ioremap(unsigned long phys, unsigned long size, int flags,
200 virt->vaddr = ioremap_nocache(phys, size); 200 virt->vaddr = ioremap_nocache(phys, size);
201 else 201 else
202 virt->vaddr = ioremap(phys, size); 202 virt->vaddr = ioremap(phys, size);
203 return (virt->vaddr == 0); /* 0, !0... 0, error_code in future */ 203 return (virt->vaddr == NULL); /* 0, !0... 0, error_code in future */
204} 204}
205 205
206static inline void mga_iounmap(vaddr_t va) { 206static inline void mga_iounmap(vaddr_t va) {
diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c
index 473562191586..d3c3af53a290 100644
--- a/drivers/video/modedb.c
+++ b/drivers/video/modedb.c
@@ -28,6 +28,7 @@
28#endif 28#endif
29 29
30const char *fb_mode_option; 30const char *fb_mode_option;
31EXPORT_SYMBOL_GPL(fb_mode_option);
31 32
32 /* 33 /*
33 * Standard video mode definitions (taken from XFree86) 34 * Standard video mode definitions (taken from XFree86)
@@ -590,6 +591,7 @@ done:
590 "", (margins) ? " with margins" : "", (interlace) ? 591 "", (margins) ? " with margins" : "", (interlace) ?
591 " interlaced" : ""); 592 " interlaced" : "");
592 593
594 memset(&cvt_mode, 0, sizeof(cvt_mode));
593 cvt_mode.xres = xres; 595 cvt_mode.xres = xres;
594 cvt_mode.yres = yres; 596 cvt_mode.yres = yres;
595 cvt_mode.refresh = (refresh) ? refresh : 60; 597 cvt_mode.refresh = (refresh) ? refresh : 60;
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index 3ee314beacc1..fafe7db20d6d 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -573,8 +573,8 @@ static int setup_frame_dma(struct pxafb_info *fbi, int dma, int pal,
573 dma_desc->fdadr = fbi->dma_buff_phys + dma_desc_off; 573 dma_desc->fdadr = fbi->dma_buff_phys + dma_desc_off;
574 fbi->fdadr[dma] = fbi->dma_buff_phys + dma_desc_off; 574 fbi->fdadr[dma] = fbi->dma_buff_phys + dma_desc_off;
575 } else { 575 } else {
576 pal_desc = &fbi->dma_buff->pal_desc[dma]; 576 pal_desc = &fbi->dma_buff->pal_desc[pal];
577 pal_desc_off = offsetof(struct pxafb_dma_buff, dma_desc[pal]); 577 pal_desc_off = offsetof(struct pxafb_dma_buff, pal_desc[pal]);
578 578
579 pal_desc->fsadr = fbi->dma_buff_phys + pal * PALETTE_SIZE; 579 pal_desc->fsadr = fbi->dma_buff_phys + pal * PALETTE_SIZE;
580 pal_desc->fidr = 0; 580 pal_desc->fidr = 0;
@@ -1246,7 +1246,7 @@ static int pxafb_resume(struct platform_device *dev)
1246 * cache. Once this area is remapped, all virtual memory 1246 * cache. Once this area is remapped, all virtual memory
1247 * access to the video memory should occur at the new region. 1247 * access to the video memory should occur at the new region.
1248 */ 1248 */
1249static int __init pxafb_map_video_memory(struct pxafb_info *fbi) 1249static int __devinit pxafb_map_video_memory(struct pxafb_info *fbi)
1250{ 1250{
1251 /* 1251 /*
1252 * We reserve one page for the palette, plus the size 1252 * We reserve one page for the palette, plus the size
@@ -1276,6 +1276,8 @@ static int __init pxafb_map_video_memory(struct pxafb_info *fbi)
1276 fbi->dma_buff_phys = fbi->map_dma; 1276 fbi->dma_buff_phys = fbi->map_dma;
1277 fbi->palette_cpu = (u16 *) fbi->dma_buff->palette; 1277 fbi->palette_cpu = (u16 *) fbi->dma_buff->palette;
1278 1278
1279 pr_debug("pxafb: palette_mem_size = 0x%08lx\n", fbi->palette_size*sizeof(u16));
1280
1279#ifdef CONFIG_FB_PXA_SMARTPANEL 1281#ifdef CONFIG_FB_PXA_SMARTPANEL
1280 fbi->smart_cmds = (uint16_t *) fbi->dma_buff->cmd_buff; 1282 fbi->smart_cmds = (uint16_t *) fbi->dma_buff->cmd_buff;
1281 fbi->n_smart_cmds = 0; 1283 fbi->n_smart_cmds = 0;
@@ -1346,12 +1348,11 @@ decode_mode:
1346 pxafb_decode_mode_info(fbi, inf->modes, inf->num_modes); 1348 pxafb_decode_mode_info(fbi, inf->modes, inf->num_modes);
1347} 1349}
1348 1350
1349static struct pxafb_info * __init pxafb_init_fbinfo(struct device *dev) 1351static struct pxafb_info * __devinit pxafb_init_fbinfo(struct device *dev)
1350{ 1352{
1351 struct pxafb_info *fbi; 1353 struct pxafb_info *fbi;
1352 void *addr; 1354 void *addr;
1353 struct pxafb_mach_info *inf = dev->platform_data; 1355 struct pxafb_mach_info *inf = dev->platform_data;
1354 struct pxafb_mode_info *mode = inf->modes;
1355 1356
1356 /* Alloc the pxafb_info and pseudo_palette in one step */ 1357 /* Alloc the pxafb_info and pseudo_palette in one step */
1357 fbi = kmalloc(sizeof(struct pxafb_info) + sizeof(u32) * 16, GFP_KERNEL); 1358 fbi = kmalloc(sizeof(struct pxafb_info) + sizeof(u32) * 16, GFP_KERNEL);
@@ -1409,7 +1410,7 @@ static struct pxafb_info * __init pxafb_init_fbinfo(struct device *dev)
1409} 1410}
1410 1411
1411#ifdef CONFIG_FB_PXA_PARAMETERS 1412#ifdef CONFIG_FB_PXA_PARAMETERS
1412static int __init parse_opt_mode(struct device *dev, const char *this_opt) 1413static int __devinit parse_opt_mode(struct device *dev, const char *this_opt)
1413{ 1414{
1414 struct pxafb_mach_info *inf = dev->platform_data; 1415 struct pxafb_mach_info *inf = dev->platform_data;
1415 1416
@@ -1468,7 +1469,7 @@ done:
1468 return 0; 1469 return 0;
1469} 1470}
1470 1471
1471static int __init parse_opt(struct device *dev, char *this_opt) 1472static int __devinit parse_opt(struct device *dev, char *this_opt)
1472{ 1473{
1473 struct pxafb_mach_info *inf = dev->platform_data; 1474 struct pxafb_mach_info *inf = dev->platform_data;
1474 struct pxafb_mode_info *mode = &inf->modes[0]; 1475 struct pxafb_mode_info *mode = &inf->modes[0];
@@ -1566,7 +1567,7 @@ static int __init parse_opt(struct device *dev, char *this_opt)
1566 return 0; 1567 return 0;
1567} 1568}
1568 1569
1569static int __init pxafb_parse_options(struct device *dev, char *options) 1570static int __devinit pxafb_parse_options(struct device *dev, char *options)
1570{ 1571{
1571 char *this_opt; 1572 char *this_opt;
1572 int ret; 1573 int ret;
@@ -1587,8 +1588,8 @@ static int __init pxafb_parse_options(struct device *dev, char *options)
1587 1588
1588static char g_options[256] __devinitdata = ""; 1589static char g_options[256] __devinitdata = "";
1589 1590
1590#ifndef CONFIG_MODULES 1591#ifndef MODULE
1591static int __devinit pxafb_setup_options(void) 1592static int __init pxafb_setup_options(void)
1592{ 1593{
1593 char *options = NULL; 1594 char *options = NULL;
1594 1595
@@ -1612,7 +1613,7 @@ MODULE_PARM_DESC(options, "LCD parameters (see Documentation/fb/pxafb.txt)");
1612#define pxafb_setup_options() (0) 1613#define pxafb_setup_options() (0)
1613#endif 1614#endif
1614 1615
1615static int __init pxafb_probe(struct platform_device *dev) 1616static int __devinit pxafb_probe(struct platform_device *dev)
1616{ 1617{
1617 struct pxafb_info *fbi; 1618 struct pxafb_info *fbi;
1618 struct pxafb_mach_info *inf; 1619 struct pxafb_mach_info *inf;
@@ -1684,14 +1685,14 @@ static int __init pxafb_probe(struct platform_device *dev)
1684 if (r == NULL) { 1685 if (r == NULL) {
1685 dev_err(&dev->dev, "no I/O memory resource defined\n"); 1686 dev_err(&dev->dev, "no I/O memory resource defined\n");
1686 ret = -ENODEV; 1687 ret = -ENODEV;
1687 goto failed; 1688 goto failed_fbi;
1688 } 1689 }
1689 1690
1690 r = request_mem_region(r->start, r->end - r->start + 1, dev->name); 1691 r = request_mem_region(r->start, r->end - r->start + 1, dev->name);
1691 if (r == NULL) { 1692 if (r == NULL) {
1692 dev_err(&dev->dev, "failed to request I/O memory\n"); 1693 dev_err(&dev->dev, "failed to request I/O memory\n");
1693 ret = -EBUSY; 1694 ret = -EBUSY;
1694 goto failed; 1695 goto failed_fbi;
1695 } 1696 }
1696 1697
1697 fbi->mmio_base = ioremap(r->start, r->end - r->start + 1); 1698 fbi->mmio_base = ioremap(r->start, r->end - r->start + 1);
@@ -1734,8 +1735,17 @@ static int __init pxafb_probe(struct platform_device *dev)
1734 * This makes sure that our colour bitfield 1735 * This makes sure that our colour bitfield
1735 * descriptors are correctly initialised. 1736 * descriptors are correctly initialised.
1736 */ 1737 */
1737 pxafb_check_var(&fbi->fb.var, &fbi->fb); 1738 ret = pxafb_check_var(&fbi->fb.var, &fbi->fb);
1738 pxafb_set_par(&fbi->fb); 1739 if (ret) {
1740 dev_err(&dev->dev, "failed to get suitable mode\n");
1741 goto failed_free_irq;
1742 }
1743
1744 ret = pxafb_set_par(&fbi->fb);
1745 if (ret) {
1746 dev_err(&dev->dev, "Failed to set parameters\n");
1747 goto failed_free_irq;
1748 }
1739 1749
1740 platform_set_drvdata(dev, fbi); 1750 platform_set_drvdata(dev, fbi);
1741 1751
@@ -1743,7 +1753,7 @@ static int __init pxafb_probe(struct platform_device *dev)
1743 if (ret < 0) { 1753 if (ret < 0) {
1744 dev_err(&dev->dev, 1754 dev_err(&dev->dev,
1745 "Failed to register framebuffer device: %d\n", ret); 1755 "Failed to register framebuffer device: %d\n", ret);
1746 goto failed_free_irq; 1756 goto failed_free_cmap;
1747 } 1757 }
1748 1758
1749#ifdef CONFIG_CPU_FREQ 1759#ifdef CONFIG_CPU_FREQ
@@ -1762,18 +1772,23 @@ static int __init pxafb_probe(struct platform_device *dev)
1762 1772
1763 return 0; 1773 return 0;
1764 1774
1775failed_free_cmap:
1776 if (fbi->fb.cmap.len)
1777 fb_dealloc_cmap(&fbi->fb.cmap);
1765failed_free_irq: 1778failed_free_irq:
1766 free_irq(irq, fbi); 1779 free_irq(irq, fbi);
1767failed_free_res:
1768 release_mem_region(r->start, r->end - r->start + 1);
1769failed_free_io:
1770 iounmap(fbi->mmio_base);
1771failed_free_mem: 1780failed_free_mem:
1772 dma_free_writecombine(&dev->dev, fbi->map_size, 1781 dma_free_writecombine(&dev->dev, fbi->map_size,
1773 fbi->map_cpu, fbi->map_dma); 1782 fbi->map_cpu, fbi->map_dma);
1774failed: 1783failed_free_io:
1784 iounmap(fbi->mmio_base);
1785failed_free_res:
1786 release_mem_region(r->start, r->end - r->start + 1);
1787failed_fbi:
1788 clk_put(fbi->clk);
1775 platform_set_drvdata(dev, NULL); 1789 platform_set_drvdata(dev, NULL);
1776 kfree(fbi); 1790 kfree(fbi);
1791failed:
1777 return ret; 1792 return ret;
1778} 1793}
1779 1794
@@ -1786,7 +1801,7 @@ static struct platform_driver pxafb_driver = {
1786 }, 1801 },
1787}; 1802};
1788 1803
1789static int __devinit pxafb_init(void) 1804static int __init pxafb_init(void)
1790{ 1805{
1791 if (pxafb_setup_options()) 1806 if (pxafb_setup_options())
1792 return -EINVAL; 1807 return -EINVAL;
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c
index 13b38cbbe4cf..f0598961c6b0 100644
--- a/drivers/video/s3c2410fb.c
+++ b/drivers/video/s3c2410fb.c
@@ -1,75 +1,15 @@
1/* 1/* linux/drivers/video/s3c2410fb.c
2 * linux/drivers/video/s3c2410fb.c 2 * Copyright (c) 2004,2005 Arnaud Patard
3 * Copyright (c) Arnaud Patard, Ben Dooks 3 * Copyright (c) 2004-2008 Ben Dooks
4 *
5 * S3C2410 LCD Framebuffer Driver
4 * 6 *
5 * This file is subject to the terms and conditions of the GNU General Public 7 * This file is subject to the terms and conditions of the GNU General Public
6 * License. See the file COPYING in the main directory of this archive for 8 * License. See the file COPYING in the main directory of this archive for
7 * more details. 9 * more details.
8 * 10 *
9 * S3C2410 LCD Controller Frame Buffer Driver 11 * Driver based on skeletonfb.c, sa1100fb.c and others.
10 * based on skeletonfb.c, sa1100fb.c and others 12*/
11 *
12 * ChangeLog
13 * 2005-04-07: Arnaud Patard <arnaud.patard@rtp-net.org>
14 * - u32 state -> pm_message_t state
15 * - S3C2410_{VA,SZ}_LCD -> S3C24XX
16 *
17 * 2005-03-15: Arnaud Patard <arnaud.patard@rtp-net.org>
18 * - Removed the ioctl
19 * - use readl/writel instead of __raw_writel/__raw_readl
20 *
21 * 2004-12-04: Arnaud Patard <arnaud.patard@rtp-net.org>
22 * - Added the possibility to set on or off the
23 * debugging messages
24 * - Replaced 0 and 1 by on or off when reading the
25 * /sys files
26 *
27 * 2005-03-23: Ben Dooks <ben-linux@fluff.org>
28 * - added non 16bpp modes
29 * - updated platform information for range of x/y/bpp
30 * - add code to ensure palette is written correctly
31 * - add pixel clock divisor control
32 *
33 * 2004-11-11: Arnaud Patard <arnaud.patard@rtp-net.org>
34 * - Removed the use of currcon as it no more exists
35 * - Added LCD power sysfs interface
36 *
37 * 2004-11-03: Ben Dooks <ben-linux@fluff.org>
38 * - minor cleanups
39 * - add suspend/resume support
40 * - s3c2410fb_setcolreg() not valid in >8bpp modes
41 * - removed last CONFIG_FB_S3C2410_FIXED
42 * - ensure lcd controller stopped before cleanup
43 * - added sysfs interface for backlight power
44 * - added mask for gpio configuration
45 * - ensured IRQs disabled during GPIO configuration
46 * - disable TPAL before enabling video
47 *
48 * 2004-09-20: Arnaud Patard <arnaud.patard@rtp-net.org>
49 * - Suppress command line options
50 *
51 * 2004-09-15: Arnaud Patard <arnaud.patard@rtp-net.org>
52 * - code cleanup
53 *
54 * 2004-09-07: Arnaud Patard <arnaud.patard@rtp-net.org>
55 * - Renamed from h1940fb.c to s3c2410fb.c
56 * - Add support for different devices
57 * - Backlight support
58 *
59 * 2004-09-05: Herbert Pötzl <herbert@13thfloor.at>
60 * - added clock (de-)allocation code
61 * - added fixem fbmem option
62 *
63 * 2004-07-27: Arnaud Patard <arnaud.patard@rtp-net.org>
64 * - code cleanup
65 * - added a forgotten return in h1940fb_init
66 *
67 * 2004-07-19: Herbert Pötzl <herbert@13thfloor.at>
68 * - code cleanup and extended debugging
69 *
70 * 2004-07-15: Arnaud Patard <arnaud.patard@rtp-net.org>
71 * - First version
72 */
73 13
74#include <linux/module.h> 14#include <linux/module.h>
75#include <linux/kernel.h> 15#include <linux/kernel.h>
@@ -580,6 +520,27 @@ static int s3c2410fb_setcolreg(unsigned regno,
580 return 0; 520 return 0;
581} 521}
582 522
523/* s3c2410fb_lcd_enable
524 *
525 * shutdown the lcd controller
526 */
527static void s3c2410fb_lcd_enable(struct s3c2410fb_info *fbi, int enable)
528{
529 unsigned long flags;
530
531 local_irq_save(flags);
532
533 if (enable)
534 fbi->regs.lcdcon1 |= S3C2410_LCDCON1_ENVID;
535 else
536 fbi->regs.lcdcon1 &= ~S3C2410_LCDCON1_ENVID;
537
538 writel(fbi->regs.lcdcon1, fbi->io + S3C2410_LCDCON1);
539
540 local_irq_restore(flags);
541}
542
543
583/* 544/*
584 * s3c2410fb_blank 545 * s3c2410fb_blank
585 * @blank_mode: the blank mode we want. 546 * @blank_mode: the blank mode we want.
@@ -589,9 +550,6 @@ static int s3c2410fb_setcolreg(unsigned regno,
589 * blanking succeeded, != 0 if un-/blanking failed due to e.g. a 550 * blanking succeeded, != 0 if un-/blanking failed due to e.g. a
590 * video mode which doesn't support it. Implements VESA suspend 551 * video mode which doesn't support it. Implements VESA suspend
591 * and powerdown modes on hardware that supports disabling hsync/vsync: 552 * and powerdown modes on hardware that supports disabling hsync/vsync:
592 * blank_mode == 2: suspend vsync
593 * blank_mode == 3: suspend hsync
594 * blank_mode == 4: powerdown
595 * 553 *
596 * Returns negative errno on error, or zero on success. 554 * Returns negative errno on error, or zero on success.
597 * 555 *
@@ -605,6 +563,12 @@ static int s3c2410fb_blank(int blank_mode, struct fb_info *info)
605 563
606 tpal_reg += is_s3c2412(fbi) ? S3C2412_TPAL : S3C2410_TPAL; 564 tpal_reg += is_s3c2412(fbi) ? S3C2412_TPAL : S3C2410_TPAL;
607 565
566 if (blank_mode == FB_BLANK_POWERDOWN) {
567 s3c2410fb_lcd_enable(fbi, 0);
568 } else {
569 s3c2410fb_lcd_enable(fbi, 1);
570 }
571
608 if (blank_mode == FB_BLANK_UNBLANK) 572 if (blank_mode == FB_BLANK_UNBLANK)
609 writel(0x0, tpal_reg); 573 writel(0x0, tpal_reg);
610 else { 574 else {
@@ -948,7 +912,10 @@ static int __init s3c24xxfb_probe(struct platform_device *pdev,
948 } 912 }
949 913
950 /* create device files */ 914 /* create device files */
951 device_create_file(&pdev->dev, &dev_attr_debug); 915 ret = device_create_file(&pdev->dev, &dev_attr_debug);
916 if (ret) {
917 printk(KERN_ERR "failed to add debug attribute\n");
918 }
952 919
953 printk(KERN_INFO "fb%d: %s frame buffer device\n", 920 printk(KERN_INFO "fb%d: %s frame buffer device\n",
954 fbinfo->node, fbinfo->fix.id); 921 fbinfo->node, fbinfo->fix.id);
@@ -983,21 +950,6 @@ static int __init s3c2412fb_probe(struct platform_device *pdev)
983 return s3c24xxfb_probe(pdev, DRV_S3C2412); 950 return s3c24xxfb_probe(pdev, DRV_S3C2412);
984} 951}
985 952
986/* s3c2410fb_stop_lcd
987 *
988 * shutdown the lcd controller
989 */
990static void s3c2410fb_stop_lcd(struct s3c2410fb_info *fbi)
991{
992 unsigned long flags;
993
994 local_irq_save(flags);
995
996 fbi->regs.lcdcon1 &= ~S3C2410_LCDCON1_ENVID;
997 writel(fbi->regs.lcdcon1, fbi->io + S3C2410_LCDCON1);
998
999 local_irq_restore(flags);
1000}
1001 953
1002/* 954/*
1003 * Cleanup 955 * Cleanup
@@ -1010,7 +962,7 @@ static int s3c2410fb_remove(struct platform_device *pdev)
1010 962
1011 unregister_framebuffer(fbinfo); 963 unregister_framebuffer(fbinfo);
1012 964
1013 s3c2410fb_stop_lcd(info); 965 s3c2410fb_lcd_enable(info, 0);
1014 msleep(1); 966 msleep(1);
1015 967
1016 s3c2410fb_unmap_video_memory(fbinfo); 968 s3c2410fb_unmap_video_memory(fbinfo);
@@ -1043,7 +995,7 @@ static int s3c2410fb_suspend(struct platform_device *dev, pm_message_t state)
1043 struct fb_info *fbinfo = platform_get_drvdata(dev); 995 struct fb_info *fbinfo = platform_get_drvdata(dev);
1044 struct s3c2410fb_info *info = fbinfo->par; 996 struct s3c2410fb_info *info = fbinfo->par;
1045 997
1046 s3c2410fb_stop_lcd(info); 998 s3c2410fb_lcd_enable(info, 0);
1047 999
1048 /* sleep before disabling the clock, we need to ensure 1000 /* sleep before disabling the clock, we need to ensure
1049 * the LCD DMA engine is not going to get back on the bus 1001 * the LCD DMA engine is not going to get back on the bus
@@ -1118,3 +1070,5 @@ MODULE_AUTHOR("Arnaud Patard <arnaud.patard@rtp-net.org>, "
1118 "Ben Dooks <ben-linux@fluff.org>"); 1070 "Ben Dooks <ben-linux@fluff.org>");
1119MODULE_DESCRIPTION("Framebuffer driver for the s3c2410"); 1071MODULE_DESCRIPTION("Framebuffer driver for the s3c2410");
1120MODULE_LICENSE("GPL"); 1072MODULE_LICENSE("GPL");
1073MODULE_ALIAS("platform:s3c2410-lcd");
1074MODULE_ALIAS("platform:s3c2412-lcd");
diff --git a/drivers/video/s3c2410fb.h b/drivers/video/s3c2410fb.h
index dbb73b95e2ef..9a6ba3e9d1b8 100644
--- a/drivers/video/s3c2410fb.h
+++ b/drivers/video/s3c2410fb.h
@@ -1,26 +1,14 @@
1/* 1/*
2 * linux/drivers/video/s3c2410fb.h 2 * linux/drivers/video/s3c2410fb.h
3 * Copyright (c) Arnaud Patard 3 * Copyright (c) 2004 Arnaud Patard
4 *
5 * S3C2410 LCD Framebuffer Driver
4 * 6 *
5 * This file is subject to the terms and conditions of the GNU General Public 7 * This file is subject to the terms and conditions of the GNU General Public
6 * License. See the file COPYING in the main directory of this archive for 8 * License. See the file COPYING in the main directory of this archive for
7 * more details. 9 * more details.
8 * 10 *
9 * S3C2410 LCD Controller Frame Buffer Driver 11*/
10 * based on skeletonfb.c, sa1100fb.h
11 *
12 * ChangeLog
13 *
14 * 2004-12-04: Arnaud Patard <arnaud.patard@rtp-net.org>
15 * - Moved dprintk to s3c2410fb.c
16 *
17 * 2004-09-07: Arnaud Patard <arnaud.patard@rtp-net.org>
18 * - Renamed from h1940fb.h to s3c2410fb.h
19 * - Changed h1940 to s3c2410
20 *
21 * 2004-07-15: Arnaud Patard <arnaud.patard@rtp-net.org>
22 * - First version
23 */
24 12
25#ifndef __S3C2410FB_H 13#ifndef __S3C2410FB_H
26#define __S3C2410FB_H 14#define __S3C2410FB_H
diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c
index 73803624c131..b9343844cd1f 100644
--- a/drivers/video/sis/sis_main.c
+++ b/drivers/video/sis/sis_main.c
@@ -5787,7 +5787,7 @@ sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
5787 } else { 5787 } else {
5788 struct sis_video_info *countvideo = card_list; 5788 struct sis_video_info *countvideo = card_list;
5789 ivideo->cardnumber = 1; 5789 ivideo->cardnumber = 1;
5790 while((countvideo = countvideo->next) != 0) 5790 while((countvideo = countvideo->next) != NULL)
5791 ivideo->cardnumber++; 5791 ivideo->cardnumber++;
5792 } 5792 }
5793 5793
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c
index 742b5c656d66..15d4a768b1f6 100644
--- a/drivers/video/sm501fb.c
+++ b/drivers/video/sm501fb.c
@@ -663,14 +663,14 @@ static void sm501fb_panel_power(struct sm501fb_info *fbi, int to)
663 sm501fb_sync_regs(fbi); 663 sm501fb_sync_regs(fbi);
664 mdelay(10); 664 mdelay(10);
665 665
666 if (pd->flags & SM501FB_FLAG_PANEL_USE_VBIASEN) { 666 if (!(pd->flags & SM501FB_FLAG_PANEL_NO_VBIASEN)) {
667 control |= SM501_DC_PANEL_CONTROL_BIAS; /* VBIASEN */ 667 control |= SM501_DC_PANEL_CONTROL_BIAS; /* VBIASEN */
668 writel(control, ctrl_reg); 668 writel(control, ctrl_reg);
669 sm501fb_sync_regs(fbi); 669 sm501fb_sync_regs(fbi);
670 mdelay(10); 670 mdelay(10);
671 } 671 }
672 672
673 if (pd->flags & SM501FB_FLAG_PANEL_USE_FPEN) { 673 if (!(pd->flags & SM501FB_FLAG_PANEL_NO_FPEN)) {
674 control |= SM501_DC_PANEL_CONTROL_FPEN; 674 control |= SM501_DC_PANEL_CONTROL_FPEN;
675 writel(control, ctrl_reg); 675 writel(control, ctrl_reg);
676 sm501fb_sync_regs(fbi); 676 sm501fb_sync_regs(fbi);
@@ -678,14 +678,14 @@ static void sm501fb_panel_power(struct sm501fb_info *fbi, int to)
678 } 678 }
679 } else if (!to && (control & SM501_DC_PANEL_CONTROL_VDD) != 0) { 679 } else if (!to && (control & SM501_DC_PANEL_CONTROL_VDD) != 0) {
680 /* disable panel power */ 680 /* disable panel power */
681 if (pd->flags & SM501FB_FLAG_PANEL_USE_FPEN) { 681 if (!(pd->flags & SM501FB_FLAG_PANEL_NO_FPEN)) {
682 control &= ~SM501_DC_PANEL_CONTROL_FPEN; 682 control &= ~SM501_DC_PANEL_CONTROL_FPEN;
683 writel(control, ctrl_reg); 683 writel(control, ctrl_reg);
684 sm501fb_sync_regs(fbi); 684 sm501fb_sync_regs(fbi);
685 mdelay(10); 685 mdelay(10);
686 } 686 }
687 687
688 if (pd->flags & SM501FB_FLAG_PANEL_USE_VBIASEN) { 688 if (!(pd->flags & SM501FB_FLAG_PANEL_NO_VBIASEN)) {
689 control &= ~SM501_DC_PANEL_CONTROL_BIAS; 689 control &= ~SM501_DC_PANEL_CONTROL_BIAS;
690 writel(control, ctrl_reg); 690 writel(control, ctrl_reg);
691 sm501fb_sync_regs(fbi); 691 sm501fb_sync_regs(fbi);
diff --git a/drivers/video/w100fb.c b/drivers/video/w100fb.c
index 30469bf906e5..d0674f1e3f10 100644
--- a/drivers/video/w100fb.c
+++ b/drivers/video/w100fb.c
@@ -1003,6 +1003,7 @@ static struct w100_pll_info xtal_14318000[] = {
1003static struct w100_pll_info xtal_16000000[] = { 1003static struct w100_pll_info xtal_16000000[] = {
1004 /*freq M N_int N_fac tfgoal lock_time */ 1004 /*freq M N_int N_fac tfgoal lock_time */
1005 { 72, 1, 8, 0, 0xe0, 48}, /* tfgoal guessed */ 1005 { 72, 1, 8, 0, 0xe0, 48}, /* tfgoal guessed */
1006 { 80, 1, 9, 0, 0xe0, 13}, /* tfgoal guessed */
1006 { 95, 1, 10, 7, 0xe0, 38}, /* tfgoal guessed */ 1007 { 95, 1, 10, 7, 0xe0, 38}, /* tfgoal guessed */
1007 { 96, 1, 11, 0, 0xe0, 36}, /* tfgoal guessed */ 1008 { 96, 1, 11, 0, 0xe0, 36}, /* tfgoal guessed */
1008 { 0, 0, 0, 0, 0, 0}, 1009 { 0, 0, 0, 0, 0, 0},
diff --git a/drivers/video/xen-fbfront.c b/drivers/video/xen-fbfront.c
index 619a6f8d65a2..47ed39b52f9c 100644
--- a/drivers/video/xen-fbfront.c
+++ b/drivers/video/xen-fbfront.c
@@ -18,6 +18,7 @@
18 * frame buffer. 18 * frame buffer.
19 */ 19 */
20 20
21#include <linux/console.h>
21#include <linux/kernel.h> 22#include <linux/kernel.h>
22#include <linux/errno.h> 23#include <linux/errno.h>
23#include <linux/fb.h> 24#include <linux/fb.h>
@@ -42,37 +43,68 @@ struct xenfb_info {
42 struct xenfb_page *page; 43 struct xenfb_page *page;
43 unsigned long *mfns; 44 unsigned long *mfns;
44 int update_wanted; /* XENFB_TYPE_UPDATE wanted */ 45 int update_wanted; /* XENFB_TYPE_UPDATE wanted */
46 int feature_resize; /* XENFB_TYPE_RESIZE ok */
47 struct xenfb_resize resize; /* protected by resize_lock */
48 int resize_dpy; /* ditto */
49 spinlock_t resize_lock;
45 50
46 struct xenbus_device *xbdev; 51 struct xenbus_device *xbdev;
47}; 52};
48 53
49static u32 xenfb_mem_len = XENFB_WIDTH * XENFB_HEIGHT * XENFB_DEPTH / 8; 54#define XENFB_DEFAULT_FB_LEN (XENFB_WIDTH * XENFB_HEIGHT * XENFB_DEPTH / 8)
50 55
56enum { KPARAM_MEM, KPARAM_WIDTH, KPARAM_HEIGHT, KPARAM_CNT };
57static int video[KPARAM_CNT] = { 2, XENFB_WIDTH, XENFB_HEIGHT };
58module_param_array(video, int, NULL, 0);
59MODULE_PARM_DESC(video,
60 "Video memory size in MB, width, height in pixels (default 2,800,600)");
61
62static void xenfb_make_preferred_console(void);
51static int xenfb_remove(struct xenbus_device *); 63static int xenfb_remove(struct xenbus_device *);
52static void xenfb_init_shared_page(struct xenfb_info *); 64static void xenfb_init_shared_page(struct xenfb_info *, struct fb_info *);
53static int xenfb_connect_backend(struct xenbus_device *, struct xenfb_info *); 65static int xenfb_connect_backend(struct xenbus_device *, struct xenfb_info *);
54static void xenfb_disconnect_backend(struct xenfb_info *); 66static void xenfb_disconnect_backend(struct xenfb_info *);
55 67
68static void xenfb_send_event(struct xenfb_info *info,
69 union xenfb_out_event *event)
70{
71 u32 prod;
72
73 prod = info->page->out_prod;
74 /* caller ensures !xenfb_queue_full() */
75 mb(); /* ensure ring space available */
76 XENFB_OUT_RING_REF(info->page, prod) = *event;
77 wmb(); /* ensure ring contents visible */
78 info->page->out_prod = prod + 1;
79
80 notify_remote_via_irq(info->irq);
81}
82
56static void xenfb_do_update(struct xenfb_info *info, 83static void xenfb_do_update(struct xenfb_info *info,
57 int x, int y, int w, int h) 84 int x, int y, int w, int h)
58{ 85{
59 union xenfb_out_event event; 86 union xenfb_out_event event;
60 u32 prod;
61 87
88 memset(&event, 0, sizeof(event));
62 event.type = XENFB_TYPE_UPDATE; 89 event.type = XENFB_TYPE_UPDATE;
63 event.update.x = x; 90 event.update.x = x;
64 event.update.y = y; 91 event.update.y = y;
65 event.update.width = w; 92 event.update.width = w;
66 event.update.height = h; 93 event.update.height = h;
67 94
68 prod = info->page->out_prod;
69 /* caller ensures !xenfb_queue_full() */ 95 /* caller ensures !xenfb_queue_full() */
70 mb(); /* ensure ring space available */ 96 xenfb_send_event(info, &event);
71 XENFB_OUT_RING_REF(info->page, prod) = event; 97}
72 wmb(); /* ensure ring contents visible */
73 info->page->out_prod = prod + 1;
74 98
75 notify_remote_via_irq(info->irq); 99static void xenfb_do_resize(struct xenfb_info *info)
100{
101 union xenfb_out_event event;
102
103 memset(&event, 0, sizeof(event));
104 event.resize = info->resize;
105
106 /* caller ensures !xenfb_queue_full() */
107 xenfb_send_event(info, &event);
76} 108}
77 109
78static int xenfb_queue_full(struct xenfb_info *info) 110static int xenfb_queue_full(struct xenfb_info *info)
@@ -84,12 +116,28 @@ static int xenfb_queue_full(struct xenfb_info *info)
84 return prod - cons == XENFB_OUT_RING_LEN; 116 return prod - cons == XENFB_OUT_RING_LEN;
85} 117}
86 118
119static void xenfb_handle_resize_dpy(struct xenfb_info *info)
120{
121 unsigned long flags;
122
123 spin_lock_irqsave(&info->resize_lock, flags);
124 if (info->resize_dpy) {
125 if (!xenfb_queue_full(info)) {
126 info->resize_dpy = 0;
127 xenfb_do_resize(info);
128 }
129 }
130 spin_unlock_irqrestore(&info->resize_lock, flags);
131}
132
87static void xenfb_refresh(struct xenfb_info *info, 133static void xenfb_refresh(struct xenfb_info *info,
88 int x1, int y1, int w, int h) 134 int x1, int y1, int w, int h)
89{ 135{
90 unsigned long flags; 136 unsigned long flags;
91 int y2 = y1 + h - 1;
92 int x2 = x1 + w - 1; 137 int x2 = x1 + w - 1;
138 int y2 = y1 + h - 1;
139
140 xenfb_handle_resize_dpy(info);
93 141
94 if (!info->update_wanted) 142 if (!info->update_wanted)
95 return; 143 return;
@@ -222,6 +270,57 @@ static ssize_t xenfb_write(struct fb_info *p, const char __user *buf,
222 return res; 270 return res;
223} 271}
224 272
273static int
274xenfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
275{
276 struct xenfb_info *xenfb_info;
277 int required_mem_len;
278
279 xenfb_info = info->par;
280
281 if (!xenfb_info->feature_resize) {
282 if (var->xres == video[KPARAM_WIDTH] &&
283 var->yres == video[KPARAM_HEIGHT] &&
284 var->bits_per_pixel == xenfb_info->page->depth) {
285 return 0;
286 }
287 return -EINVAL;
288 }
289
290 /* Can't resize past initial width and height */
291 if (var->xres > video[KPARAM_WIDTH] || var->yres > video[KPARAM_HEIGHT])
292 return -EINVAL;
293
294 required_mem_len = var->xres * var->yres * xenfb_info->page->depth / 8;
295 if (var->bits_per_pixel == xenfb_info->page->depth &&
296 var->xres <= info->fix.line_length / (XENFB_DEPTH / 8) &&
297 required_mem_len <= info->fix.smem_len) {
298 var->xres_virtual = var->xres;
299 var->yres_virtual = var->yres;
300 return 0;
301 }
302 return -EINVAL;
303}
304
305static int xenfb_set_par(struct fb_info *info)
306{
307 struct xenfb_info *xenfb_info;
308 unsigned long flags;
309
310 xenfb_info = info->par;
311
312 spin_lock_irqsave(&xenfb_info->resize_lock, flags);
313 xenfb_info->resize.type = XENFB_TYPE_RESIZE;
314 xenfb_info->resize.width = info->var.xres;
315 xenfb_info->resize.height = info->var.yres;
316 xenfb_info->resize.stride = info->fix.line_length;
317 xenfb_info->resize.depth = info->var.bits_per_pixel;
318 xenfb_info->resize.offset = 0;
319 xenfb_info->resize_dpy = 1;
320 spin_unlock_irqrestore(&xenfb_info->resize_lock, flags);
321 return 0;
322}
323
225static struct fb_ops xenfb_fb_ops = { 324static struct fb_ops xenfb_fb_ops = {
226 .owner = THIS_MODULE, 325 .owner = THIS_MODULE,
227 .fb_read = fb_sys_read, 326 .fb_read = fb_sys_read,
@@ -230,6 +329,8 @@ static struct fb_ops xenfb_fb_ops = {
230 .fb_fillrect = xenfb_fillrect, 329 .fb_fillrect = xenfb_fillrect,
231 .fb_copyarea = xenfb_copyarea, 330 .fb_copyarea = xenfb_copyarea,
232 .fb_imageblit = xenfb_imageblit, 331 .fb_imageblit = xenfb_imageblit,
332 .fb_check_var = xenfb_check_var,
333 .fb_set_par = xenfb_set_par,
233}; 334};
234 335
235static irqreturn_t xenfb_event_handler(int rq, void *dev_id) 336static irqreturn_t xenfb_event_handler(int rq, void *dev_id)
@@ -258,6 +359,8 @@ static int __devinit xenfb_probe(struct xenbus_device *dev,
258{ 359{
259 struct xenfb_info *info; 360 struct xenfb_info *info;
260 struct fb_info *fb_info; 361 struct fb_info *fb_info;
362 int fb_size;
363 int val;
261 int ret; 364 int ret;
262 365
263 info = kzalloc(sizeof(*info), GFP_KERNEL); 366 info = kzalloc(sizeof(*info), GFP_KERNEL);
@@ -265,18 +368,35 @@ static int __devinit xenfb_probe(struct xenbus_device *dev,
265 xenbus_dev_fatal(dev, -ENOMEM, "allocating info structure"); 368 xenbus_dev_fatal(dev, -ENOMEM, "allocating info structure");
266 return -ENOMEM; 369 return -ENOMEM;
267 } 370 }
371
372 /* Limit kernel param videoram amount to what is in xenstore */
373 if (xenbus_scanf(XBT_NIL, dev->otherend, "videoram", "%d", &val) == 1) {
374 if (val < video[KPARAM_MEM])
375 video[KPARAM_MEM] = val;
376 }
377
378 /* If requested res does not fit in available memory, use default */
379 fb_size = video[KPARAM_MEM] * 1024 * 1024;
380 if (video[KPARAM_WIDTH] * video[KPARAM_HEIGHT] * XENFB_DEPTH / 8
381 > fb_size) {
382 video[KPARAM_WIDTH] = XENFB_WIDTH;
383 video[KPARAM_HEIGHT] = XENFB_HEIGHT;
384 fb_size = XENFB_DEFAULT_FB_LEN;
385 }
386
268 dev->dev.driver_data = info; 387 dev->dev.driver_data = info;
269 info->xbdev = dev; 388 info->xbdev = dev;
270 info->irq = -1; 389 info->irq = -1;
271 info->x1 = info->y1 = INT_MAX; 390 info->x1 = info->y1 = INT_MAX;
272 spin_lock_init(&info->dirty_lock); 391 spin_lock_init(&info->dirty_lock);
392 spin_lock_init(&info->resize_lock);
273 393
274 info->fb = vmalloc(xenfb_mem_len); 394 info->fb = vmalloc(fb_size);
275 if (info->fb == NULL) 395 if (info->fb == NULL)
276 goto error_nomem; 396 goto error_nomem;
277 memset(info->fb, 0, xenfb_mem_len); 397 memset(info->fb, 0, fb_size);
278 398
279 info->nr_pages = (xenfb_mem_len + PAGE_SIZE - 1) >> PAGE_SHIFT; 399 info->nr_pages = (fb_size + PAGE_SIZE - 1) >> PAGE_SHIFT;
280 400
281 info->mfns = vmalloc(sizeof(unsigned long) * info->nr_pages); 401 info->mfns = vmalloc(sizeof(unsigned long) * info->nr_pages);
282 if (!info->mfns) 402 if (!info->mfns)
@@ -287,8 +407,6 @@ static int __devinit xenfb_probe(struct xenbus_device *dev,
287 if (!info->page) 407 if (!info->page)
288 goto error_nomem; 408 goto error_nomem;
289 409
290 xenfb_init_shared_page(info);
291
292 /* abusing framebuffer_alloc() to allocate pseudo_palette */ 410 /* abusing framebuffer_alloc() to allocate pseudo_palette */
293 fb_info = framebuffer_alloc(sizeof(u32) * 256, NULL); 411 fb_info = framebuffer_alloc(sizeof(u32) * 256, NULL);
294 if (fb_info == NULL) 412 if (fb_info == NULL)
@@ -301,9 +419,9 @@ static int __devinit xenfb_probe(struct xenbus_device *dev,
301 fb_info->screen_base = info->fb; 419 fb_info->screen_base = info->fb;
302 420
303 fb_info->fbops = &xenfb_fb_ops; 421 fb_info->fbops = &xenfb_fb_ops;
304 fb_info->var.xres_virtual = fb_info->var.xres = info->page->width; 422 fb_info->var.xres_virtual = fb_info->var.xres = video[KPARAM_WIDTH];
305 fb_info->var.yres_virtual = fb_info->var.yres = info->page->height; 423 fb_info->var.yres_virtual = fb_info->var.yres = video[KPARAM_HEIGHT];
306 fb_info->var.bits_per_pixel = info->page->depth; 424 fb_info->var.bits_per_pixel = XENFB_DEPTH;
307 425
308 fb_info->var.red = (struct fb_bitfield){16, 8, 0}; 426 fb_info->var.red = (struct fb_bitfield){16, 8, 0};
309 fb_info->var.green = (struct fb_bitfield){8, 8, 0}; 427 fb_info->var.green = (struct fb_bitfield){8, 8, 0};
@@ -315,9 +433,9 @@ static int __devinit xenfb_probe(struct xenbus_device *dev,
315 fb_info->var.vmode = FB_VMODE_NONINTERLACED; 433 fb_info->var.vmode = FB_VMODE_NONINTERLACED;
316 434
317 fb_info->fix.visual = FB_VISUAL_TRUECOLOR; 435 fb_info->fix.visual = FB_VISUAL_TRUECOLOR;
318 fb_info->fix.line_length = info->page->line_length; 436 fb_info->fix.line_length = fb_info->var.xres * XENFB_DEPTH / 8;
319 fb_info->fix.smem_start = 0; 437 fb_info->fix.smem_start = 0;
320 fb_info->fix.smem_len = xenfb_mem_len; 438 fb_info->fix.smem_len = fb_size;
321 strcpy(fb_info->fix.id, "xen"); 439 strcpy(fb_info->fix.id, "xen");
322 fb_info->fix.type = FB_TYPE_PACKED_PIXELS; 440 fb_info->fix.type = FB_TYPE_PACKED_PIXELS;
323 fb_info->fix.accel = FB_ACCEL_NONE; 441 fb_info->fix.accel = FB_ACCEL_NONE;
@@ -334,6 +452,8 @@ static int __devinit xenfb_probe(struct xenbus_device *dev,
334 fb_info->fbdefio = &xenfb_defio; 452 fb_info->fbdefio = &xenfb_defio;
335 fb_deferred_io_init(fb_info); 453 fb_deferred_io_init(fb_info);
336 454
455 xenfb_init_shared_page(info, fb_info);
456
337 ret = register_framebuffer(fb_info); 457 ret = register_framebuffer(fb_info);
338 if (ret) { 458 if (ret) {
339 fb_deferred_io_cleanup(fb_info); 459 fb_deferred_io_cleanup(fb_info);
@@ -348,6 +468,7 @@ static int __devinit xenfb_probe(struct xenbus_device *dev,
348 if (ret < 0) 468 if (ret < 0)
349 goto error; 469 goto error;
350 470
471 xenfb_make_preferred_console();
351 return 0; 472 return 0;
352 473
353 error_nomem: 474 error_nomem:
@@ -358,12 +479,34 @@ static int __devinit xenfb_probe(struct xenbus_device *dev,
358 return ret; 479 return ret;
359} 480}
360 481
482static __devinit void
483xenfb_make_preferred_console(void)
484{
485 struct console *c;
486
487 if (console_set_on_cmdline)
488 return;
489
490 acquire_console_sem();
491 for (c = console_drivers; c; c = c->next) {
492 if (!strcmp(c->name, "tty") && c->index == 0)
493 break;
494 }
495 release_console_sem();
496 if (c) {
497 unregister_console(c);
498 c->flags |= CON_CONSDEV;
499 c->flags &= ~CON_PRINTBUFFER; /* don't print again */
500 register_console(c);
501 }
502}
503
361static int xenfb_resume(struct xenbus_device *dev) 504static int xenfb_resume(struct xenbus_device *dev)
362{ 505{
363 struct xenfb_info *info = dev->dev.driver_data; 506 struct xenfb_info *info = dev->dev.driver_data;
364 507
365 xenfb_disconnect_backend(info); 508 xenfb_disconnect_backend(info);
366 xenfb_init_shared_page(info); 509 xenfb_init_shared_page(info, info->fb_info);
367 return xenfb_connect_backend(dev, info); 510 return xenfb_connect_backend(dev, info);
368} 511}
369 512
@@ -391,20 +534,23 @@ static unsigned long vmalloc_to_mfn(void *address)
391 return pfn_to_mfn(vmalloc_to_pfn(address)); 534 return pfn_to_mfn(vmalloc_to_pfn(address));
392} 535}
393 536
394static void xenfb_init_shared_page(struct xenfb_info *info) 537static void xenfb_init_shared_page(struct xenfb_info *info,
538 struct fb_info *fb_info)
395{ 539{
396 int i; 540 int i;
541 int epd = PAGE_SIZE / sizeof(info->mfns[0]);
397 542
398 for (i = 0; i < info->nr_pages; i++) 543 for (i = 0; i < info->nr_pages; i++)
399 info->mfns[i] = vmalloc_to_mfn(info->fb + i * PAGE_SIZE); 544 info->mfns[i] = vmalloc_to_mfn(info->fb + i * PAGE_SIZE);
400 545
401 info->page->pd[0] = vmalloc_to_mfn(info->mfns); 546 for (i = 0; i * epd < info->nr_pages; i++)
402 info->page->pd[1] = 0; 547 info->page->pd[i] = vmalloc_to_mfn(&info->mfns[i * epd]);
403 info->page->width = XENFB_WIDTH; 548
404 info->page->height = XENFB_HEIGHT; 549 info->page->width = fb_info->var.xres;
405 info->page->depth = XENFB_DEPTH; 550 info->page->height = fb_info->var.yres;
406 info->page->line_length = (info->page->depth / 8) * info->page->width; 551 info->page->depth = fb_info->var.bits_per_pixel;
407 info->page->mem_length = xenfb_mem_len; 552 info->page->line_length = fb_info->fix.line_length;
553 info->page->mem_length = fb_info->fix.smem_len;
408 info->page->in_cons = info->page->in_prod = 0; 554 info->page->in_cons = info->page->in_prod = 0;
409 info->page->out_cons = info->page->out_prod = 0; 555 info->page->out_cons = info->page->out_prod = 0;
410} 556}
@@ -504,6 +650,11 @@ InitWait:
504 val = 0; 650 val = 0;
505 if (val) 651 if (val)
506 info->update_wanted = 1; 652 info->update_wanted = 1;
653
654 if (xenbus_scanf(XBT_NIL, dev->otherend,
655 "feature-resize", "%d", &val) < 0)
656 val = 0;
657 info->feature_resize = val;
507 break; 658 break;
508 659
509 case XenbusStateClosing: 660 case XenbusStateClosing:
@@ -547,4 +698,6 @@ static void __exit xenfb_cleanup(void)
547module_init(xenfb_init); 698module_init(xenfb_init);
548module_exit(xenfb_cleanup); 699module_exit(xenfb_cleanup);
549 700
701MODULE_DESCRIPTION("Xen virtual framebuffer device frontend");
550MODULE_LICENSE("GPL"); 702MODULE_LICENSE("GPL");
703MODULE_ALIAS("xen:vfb");
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index 13866789b356..7084e7e146c0 100644
--- a/drivers/virtio/virtio.c
+++ b/drivers/virtio/virtio.c
@@ -2,6 +2,9 @@
2#include <linux/spinlock.h> 2#include <linux/spinlock.h>
3#include <linux/virtio_config.h> 3#include <linux/virtio_config.h>
4 4
5/* Unique numbering for virtio devices. */
6static unsigned int dev_index;
7
5static ssize_t device_show(struct device *_d, 8static ssize_t device_show(struct device *_d,
6 struct device_attribute *attr, char *buf) 9 struct device_attribute *attr, char *buf)
7{ 10{
@@ -121,9 +124,9 @@ static int virtio_dev_probe(struct device *_d)
121 if (err) 124 if (err)
122 add_status(dev, VIRTIO_CONFIG_S_FAILED); 125 add_status(dev, VIRTIO_CONFIG_S_FAILED);
123 else { 126 else {
124 add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK);
125 /* They should never have set feature bits beyond 32 */ 127 /* They should never have set feature bits beyond 32 */
126 dev->config->set_features(dev, dev->features[0]); 128 dev->config->set_features(dev, dev->features[0]);
129 add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK);
127 } 130 }
128 return err; 131 return err;
129} 132}
@@ -166,7 +169,10 @@ int register_virtio_device(struct virtio_device *dev)
166 int err; 169 int err;
167 170
168 dev->dev.bus = &virtio_bus; 171 dev->dev.bus = &virtio_bus;
169 sprintf(dev->dev.bus_id, "%u", dev->index); 172
173 /* Assign a unique device index and hence name. */
174 dev->index = dev_index++;
175 sprintf(dev->dev.bus_id, "virtio%u", dev->index);
170 176
171 /* We always start by resetting the device, in case a previous 177 /* We always start by resetting the device, in case a previous
172 * driver messed it up. This also tests that code path a little. */ 178 * driver messed it up. This also tests that code path a little. */
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 27e9fc9117cd..eae7236310e4 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -78,9 +78,6 @@ static struct device virtio_pci_root = {
78 .bus_id = "virtio-pci", 78 .bus_id = "virtio-pci",
79}; 79};
80 80
81/* Unique numbering for devices under the kvm root */
82static unsigned int dev_index;
83
84/* Convert a generic virtio device to our structure */ 81/* Convert a generic virtio device to our structure */
85static struct virtio_pci_device *to_vp_device(struct virtio_device *vdev) 82static struct virtio_pci_device *to_vp_device(struct virtio_device *vdev)
86{ 83{
@@ -325,10 +322,6 @@ static int __devinit virtio_pci_probe(struct pci_dev *pci_dev,
325 if (vp_dev == NULL) 322 if (vp_dev == NULL)
326 return -ENOMEM; 323 return -ENOMEM;
327 324
328 snprintf(vp_dev->vdev.dev.bus_id, BUS_ID_SIZE, "virtio%d", dev_index);
329 vp_dev->vdev.index = dev_index;
330 dev_index++;
331
332 vp_dev->vdev.dev.parent = &virtio_pci_root; 325 vp_dev->vdev.dev.parent = &virtio_pci_root;
333 vp_dev->vdev.config = &virtio_pci_config_ops; 326 vp_dev->vdev.config = &virtio_pci_config_ops;
334 vp_dev->pci_dev = pci_dev; 327 vp_dev->pci_dev = pci_dev;
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 937a49d6772c..72bf8bc09014 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -227,7 +227,6 @@ static bool vring_enable_cb(struct virtqueue *_vq)
227 struct vring_virtqueue *vq = to_vvq(_vq); 227 struct vring_virtqueue *vq = to_vvq(_vq);
228 228
229 START_USE(vq); 229 START_USE(vq);
230 BUG_ON(!(vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT));
231 230
232 /* We optimistically turn back on interrupts, then check if there was 231 /* We optimistically turn back on interrupts, then check if there was
233 * more to do. */ 232 * more to do. */
@@ -254,13 +253,6 @@ irqreturn_t vring_interrupt(int irq, void *_vq)
254 if (unlikely(vq->broken)) 253 if (unlikely(vq->broken))
255 return IRQ_HANDLED; 254 return IRQ_HANDLED;
256 255
257 /* Other side may have missed us turning off the interrupt,
258 * but we should preserve disable semantic for virtio users. */
259 if (unlikely(vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT)) {
260 pr_debug("virtqueue interrupt after disable for %p\n", vq);
261 return IRQ_HANDLED;
262 }
263
264 pr_debug("virtqueue callback for %p (%p)\n", vq, vq->vq.callback); 256 pr_debug("virtqueue callback for %p (%p)\n", vq, vq->vq.callback);
265 if (vq->vq.callback) 257 if (vq->vq.callback)
266 vq->vq.callback(&vq->vq); 258 vq->vq.callback(&vq->vq);
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 254d115cafab..ccb78f66c2b6 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -295,6 +295,19 @@ config ALIM7101_WDT
295 295
296 Most people will say N. 296 Most people will say N.
297 297
298config GEODE_WDT
299 tristate "AMD Geode CS5535/CS5536 Watchdog"
300 depends on MGEODE_LX
301 help
302 This driver enables a watchdog capability built into the
303 CS5535/CS5536 companion chips for the AMD Geode GX and LX
304 processors. This watchdog watches your kernel to make sure
305 it doesn't freeze, and if it does, it reboots your computer after
306 a certain amount of time.
307
308 You can compile this driver directly into the kernel, or use
309 it as a module. The module will be called geodewdt.
310
298config SC520_WDT 311config SC520_WDT
299 tristate "AMD Elan SC520 processor Watchdog" 312 tristate "AMD Elan SC520 processor Watchdog"
300 depends on X86 313 depends on X86
diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile
index f3fb170fe5c6..25b352b664d9 100644
--- a/drivers/watchdog/Makefile
+++ b/drivers/watchdog/Makefile
@@ -59,6 +59,7 @@ obj-$(CONFIG_ACQUIRE_WDT) += acquirewdt.o
59obj-$(CONFIG_ADVANTECH_WDT) += advantechwdt.o 59obj-$(CONFIG_ADVANTECH_WDT) += advantechwdt.o
60obj-$(CONFIG_ALIM1535_WDT) += alim1535_wdt.o 60obj-$(CONFIG_ALIM1535_WDT) += alim1535_wdt.o
61obj-$(CONFIG_ALIM7101_WDT) += alim7101_wdt.o 61obj-$(CONFIG_ALIM7101_WDT) += alim7101_wdt.o
62obj-$(CONFIG_GEODE_WDT) += geodewdt.o
62obj-$(CONFIG_SC520_WDT) += sc520_wdt.o 63obj-$(CONFIG_SC520_WDT) += sc520_wdt.o
63obj-$(CONFIG_EUROTECH_WDT) += eurotechwdt.o 64obj-$(CONFIG_EUROTECH_WDT) += eurotechwdt.o
64obj-$(CONFIG_IB700_WDT) += ib700wdt.o 65obj-$(CONFIG_IB700_WDT) += ib700wdt.o
diff --git a/drivers/watchdog/bfin_wdt.c b/drivers/watchdog/bfin_wdt.c
index 1237113dc14a..03b3e3d91e7c 100644
--- a/drivers/watchdog/bfin_wdt.c
+++ b/drivers/watchdog/bfin_wdt.c
@@ -29,7 +29,8 @@
29 29
30#define stamp(fmt, args...) pr_debug("%s:%i: " fmt "\n", __func__, __LINE__, ## args) 30#define stamp(fmt, args...) pr_debug("%s:%i: " fmt "\n", __func__, __LINE__, ## args)
31#define stampit() stamp("here i am") 31#define stampit() stamp("here i am")
32#define pr_init(fmt, args...) ({ static const __initdata char __fmt[] = fmt; printk(__fmt, ## args); }) 32#define pr_devinit(fmt, args...) ({ static const __devinitconst char __fmt[] = fmt; printk(__fmt, ## args); })
33#define pr_init(fmt, args...) ({ static const __initconst char __fmt[] = fmt; printk(__fmt, ## args); })
33 34
34#define WATCHDOG_NAME "bfin-wdt" 35#define WATCHDOG_NAME "bfin-wdt"
35#define PFX WATCHDOG_NAME ": " 36#define PFX WATCHDOG_NAME ": "
@@ -377,20 +378,6 @@ static int bfin_wdt_resume(struct platform_device *pdev)
377# define bfin_wdt_resume NULL 378# define bfin_wdt_resume NULL
378#endif 379#endif
379 380
380static struct platform_device bfin_wdt_device = {
381 .name = WATCHDOG_NAME,
382 .id = -1,
383};
384
385static struct platform_driver bfin_wdt_driver = {
386 .driver = {
387 .name = WATCHDOG_NAME,
388 .owner = THIS_MODULE,
389 },
390 .suspend = bfin_wdt_suspend,
391 .resume = bfin_wdt_resume,
392};
393
394static const struct file_operations bfin_wdt_fops = { 381static const struct file_operations bfin_wdt_fops = {
395 .owner = THIS_MODULE, 382 .owner = THIS_MODULE,
396 .llseek = no_llseek, 383 .llseek = no_llseek,
@@ -418,11 +405,67 @@ static struct notifier_block bfin_wdt_notifier = {
418}; 405};
419 406
420/** 407/**
421 * bfin_wdt_init - Initialize module 408 * bfin_wdt_probe - Initialize module
422 * 409 *
423 * Registers the device and notifier handler. Actual device 410 * Registers the misc device and notifier handler. Actual device
424 * initialization is handled by bfin_wdt_open(). 411 * initialization is handled by bfin_wdt_open().
425 */ 412 */
413static int __devinit bfin_wdt_probe(struct platform_device *pdev)
414{
415 int ret;
416
417 ret = register_reboot_notifier(&bfin_wdt_notifier);
418 if (ret) {
419 pr_devinit(KERN_ERR PFX "cannot register reboot notifier (err=%d)\n", ret);
420 return ret;
421 }
422
423 ret = misc_register(&bfin_wdt_miscdev);
424 if (ret) {
425 pr_devinit(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n",
426 WATCHDOG_MINOR, ret);
427 unregister_reboot_notifier(&bfin_wdt_notifier);
428 return ret;
429 }
430
431 pr_devinit(KERN_INFO PFX "initialized: timeout=%d sec (nowayout=%d)\n",
432 timeout, nowayout);
433
434 return 0;
435}
436
437/**
438 * bfin_wdt_remove - Initialize module
439 *
440 * Unregisters the misc device and notifier handler. Actual device
441 * deinitialization is handled by bfin_wdt_close().
442 */
443static int __devexit bfin_wdt_remove(struct platform_device *pdev)
444{
445 misc_deregister(&bfin_wdt_miscdev);
446 unregister_reboot_notifier(&bfin_wdt_notifier);
447 return 0;
448}
449
450static struct platform_device *bfin_wdt_device;
451
452static struct platform_driver bfin_wdt_driver = {
453 .probe = bfin_wdt_probe,
454 .remove = __devexit_p(bfin_wdt_remove),
455 .suspend = bfin_wdt_suspend,
456 .resume = bfin_wdt_resume,
457 .driver = {
458 .name = WATCHDOG_NAME,
459 .owner = THIS_MODULE,
460 },
461};
462
463/**
464 * bfin_wdt_init - Initialize module
465 *
466 * Checks the module params and registers the platform device & driver.
467 * Real work is in the platform probe function.
468 */
426static int __init bfin_wdt_init(void) 469static int __init bfin_wdt_init(void)
427{ 470{
428 int ret; 471 int ret;
@@ -436,44 +479,32 @@ static int __init bfin_wdt_init(void)
436 /* Since this is an on-chip device and needs no board-specific 479 /* Since this is an on-chip device and needs no board-specific
437 * resources, we'll handle all the platform device stuff here. 480 * resources, we'll handle all the platform device stuff here.
438 */ 481 */
439 ret = platform_device_register(&bfin_wdt_device); 482 ret = platform_driver_register(&bfin_wdt_driver);
440 if (ret)
441 return ret;
442
443 ret = platform_driver_probe(&bfin_wdt_driver, NULL);
444 if (ret)
445 return ret;
446
447 ret = register_reboot_notifier(&bfin_wdt_notifier);
448 if (ret) { 483 if (ret) {
449 pr_init(KERN_ERR PFX "cannot register reboot notifier (err=%d)\n", ret); 484 pr_init(KERN_ERR PFX "unable to register driver\n");
450 return ret; 485 return ret;
451 } 486 }
452 487
453 ret = misc_register(&bfin_wdt_miscdev); 488 bfin_wdt_device = platform_device_register_simple(WATCHDOG_NAME, -1, NULL, 0);
454 if (ret) { 489 if (IS_ERR(bfin_wdt_device)) {
455 pr_init(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", 490 pr_init(KERN_ERR PFX "unable to register device\n");
456 WATCHDOG_MINOR, ret); 491 platform_driver_unregister(&bfin_wdt_driver);
457 unregister_reboot_notifier(&bfin_wdt_notifier); 492 return PTR_ERR(bfin_wdt_device);
458 return ret;
459 } 493 }
460 494
461 pr_init(KERN_INFO PFX "initialized: timeout=%d sec (nowayout=%d)\n",
462 timeout, nowayout);
463
464 return 0; 495 return 0;
465} 496}
466 497
467/** 498/**
468 * bfin_wdt_exit - Deinitialize module 499 * bfin_wdt_exit - Deinitialize module
469 * 500 *
470 * Unregisters the device and notifier handler. Actual device 501 * Back out the platform device & driver steps. Real work is in the
471 * deinitialization is handled by bfin_wdt_close(). 502 * platform remove function.
472 */ 503 */
473static void __exit bfin_wdt_exit(void) 504static void __exit bfin_wdt_exit(void)
474{ 505{
475 misc_deregister(&bfin_wdt_miscdev); 506 platform_device_unregister(bfin_wdt_device);
476 unregister_reboot_notifier(&bfin_wdt_notifier); 507 platform_driver_unregister(&bfin_wdt_driver);
477} 508}
478 509
479module_init(bfin_wdt_init); 510module_init(bfin_wdt_init);
diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c
index d362f5bf658a..c1ba0db48501 100644
--- a/drivers/watchdog/booke_wdt.c
+++ b/drivers/watchdog/booke_wdt.c
@@ -1,12 +1,10 @@
1/* 1/*
2 * drivers/char/watchdog/booke_wdt.c
3 *
4 * Watchdog timer for PowerPC Book-E systems 2 * Watchdog timer for PowerPC Book-E systems
5 * 3 *
6 * Author: Matthew McClintock 4 * Author: Matthew McClintock
7 * Maintainer: Kumar Gala <galak@kernel.crashing.org> 5 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
8 * 6 *
9 * Copyright 2005 Freescale Semiconductor Inc. 7 * Copyright 2005, 2008 Freescale Semiconductor Inc.
10 * 8 *
11 * This program is free software; you can redistribute it and/or modify it 9 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the 10 * under the terms of the GNU General Public License as published by the
@@ -16,6 +14,7 @@
16 14
17#include <linux/module.h> 15#include <linux/module.h>
18#include <linux/fs.h> 16#include <linux/fs.h>
17#include <linux/smp.h>
19#include <linux/miscdevice.h> 18#include <linux/miscdevice.h>
20#include <linux/notifier.h> 19#include <linux/notifier.h>
21#include <linux/watchdog.h> 20#include <linux/watchdog.h>
@@ -38,7 +37,7 @@
38#define WDT_PERIOD_DEFAULT 3 /* Refer to the PPC40x and PPC4xx manuals */ 37#define WDT_PERIOD_DEFAULT 3 /* Refer to the PPC40x and PPC4xx manuals */
39#endif /* for timing information */ 38#endif /* for timing information */
40 39
41u32 booke_wdt_enabled = 0; 40u32 booke_wdt_enabled;
42u32 booke_wdt_period = WDT_PERIOD_DEFAULT; 41u32 booke_wdt_period = WDT_PERIOD_DEFAULT;
43 42
44#ifdef CONFIG_FSL_BOOKE 43#ifdef CONFIG_FSL_BOOKE
@@ -47,33 +46,31 @@ u32 booke_wdt_period = WDT_PERIOD_DEFAULT;
47#define WDTP(x) (TCR_WP(x)) 46#define WDTP(x) (TCR_WP(x))
48#endif 47#endif
49 48
50/* 49static DEFINE_SPINLOCK(booke_wdt_lock);
51 * booke_wdt_ping: 50
52 */ 51static void __booke_wdt_ping(void *data)
53static __inline__ void booke_wdt_ping(void)
54{ 52{
55 mtspr(SPRN_TSR, TSR_ENW|TSR_WIS); 53 mtspr(SPRN_TSR, TSR_ENW|TSR_WIS);
56} 54}
57 55
58/* 56static void booke_wdt_ping(void)
59 * booke_wdt_enable: 57{
60 */ 58 on_each_cpu(__booke_wdt_ping, NULL, 0, 0);
61static __inline__ void booke_wdt_enable(void) 59}
60
61static void __booke_wdt_enable(void *data)
62{ 62{
63 u32 val; 63 u32 val;
64 64
65 /* clear status before enabling watchdog */ 65 /* clear status before enabling watchdog */
66 booke_wdt_ping(); 66 __booke_wdt_ping(NULL);
67 val = mfspr(SPRN_TCR); 67 val = mfspr(SPRN_TCR);
68 val |= (TCR_WIE|TCR_WRC(WRC_CHIP)|WDTP(booke_wdt_period)); 68 val |= (TCR_WIE|TCR_WRC(WRC_CHIP)|WDTP(booke_wdt_period));
69 69
70 mtspr(SPRN_TCR, val); 70 mtspr(SPRN_TCR, val);
71} 71}
72 72
73/* 73static ssize_t booke_wdt_write(struct file *file, const char __user *buf,
74 * booke_wdt_write:
75 */
76static ssize_t booke_wdt_write (struct file *file, const char __user *buf,
77 size_t count, loff_t *ppos) 74 size_t count, loff_t *ppos)
78{ 75{
79 booke_wdt_ping(); 76 booke_wdt_ping();
@@ -81,15 +78,11 @@ static ssize_t booke_wdt_write (struct file *file, const char __user *buf,
81} 78}
82 79
83static struct watchdog_info ident = { 80static struct watchdog_info ident = {
84 .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING, 81 .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
85 .firmware_version = 0, 82 .identity = "PowerPC Book-E Watchdog",
86 .identity = "PowerPC Book-E Watchdog",
87}; 83};
88 84
89/* 85static int booke_wdt_ioctl(struct inode *inode, struct file *file,
90 * booke_wdt_ioctl:
91 */
92static int booke_wdt_ioctl (struct inode *inode, struct file *file,
93 unsigned int cmd, unsigned long arg) 86 unsigned int cmd, unsigned long arg)
94{ 87{
95 u32 tmp = 0; 88 u32 tmp = 0;
@@ -97,7 +90,7 @@ static int booke_wdt_ioctl (struct inode *inode, struct file *file,
97 90
98 switch (cmd) { 91 switch (cmd) {
99 case WDIOC_GETSUPPORT: 92 case WDIOC_GETSUPPORT:
100 if (copy_to_user ((struct watchdog_info __user *) arg, &ident, 93 if (copy_to_user((struct watchdog_info __user *)arg, &ident,
101 sizeof(struct watchdog_info))) 94 sizeof(struct watchdog_info)))
102 return -EFAULT; 95 return -EFAULT;
103 case WDIOC_GETSTATUS: 96 case WDIOC_GETSTATUS:
@@ -132,33 +125,33 @@ static int booke_wdt_ioctl (struct inode *inode, struct file *file,
132 125
133 return 0; 126 return 0;
134} 127}
135/* 128
136 * booke_wdt_open: 129static int booke_wdt_open(struct inode *inode, struct file *file)
137 */
138static int booke_wdt_open (struct inode *inode, struct file *file)
139{ 130{
131 spin_lock(&booke_wdt_lock);
140 if (booke_wdt_enabled == 0) { 132 if (booke_wdt_enabled == 0) {
141 booke_wdt_enabled = 1; 133 booke_wdt_enabled = 1;
142 booke_wdt_enable(); 134 on_each_cpu(__booke_wdt_enable, NULL, 0, 0);
143 printk (KERN_INFO "PowerPC Book-E Watchdog Timer Enabled (wdt_period=%d)\n", 135 printk(KERN_INFO "PowerPC Book-E Watchdog Timer Enabled "
144 booke_wdt_period); 136 "(wdt_period=%d)\n", booke_wdt_period);
145 } 137 }
138 spin_unlock(&booke_wdt_lock);
146 139
147 return nonseekable_open(inode, file); 140 return nonseekable_open(inode, file);
148} 141}
149 142
150static const struct file_operations booke_wdt_fops = { 143static const struct file_operations booke_wdt_fops = {
151 .owner = THIS_MODULE, 144 .owner = THIS_MODULE,
152 .llseek = no_llseek, 145 .llseek = no_llseek,
153 .write = booke_wdt_write, 146 .write = booke_wdt_write,
154 .ioctl = booke_wdt_ioctl, 147 .ioctl = booke_wdt_ioctl,
155 .open = booke_wdt_open, 148 .open = booke_wdt_open,
156}; 149};
157 150
158static struct miscdevice booke_wdt_miscdev = { 151static struct miscdevice booke_wdt_miscdev = {
159 .minor = WATCHDOG_MINOR, 152 .minor = WATCHDOG_MINOR,
160 .name = "watchdog", 153 .name = "watchdog",
161 .fops = &booke_wdt_fops, 154 .fops = &booke_wdt_fops,
162}; 155};
163 156
164static void __exit booke_wdt_exit(void) 157static void __exit booke_wdt_exit(void)
@@ -166,28 +159,27 @@ static void __exit booke_wdt_exit(void)
166 misc_deregister(&booke_wdt_miscdev); 159 misc_deregister(&booke_wdt_miscdev);
167} 160}
168 161
169/*
170 * booke_wdt_init:
171 */
172static int __init booke_wdt_init(void) 162static int __init booke_wdt_init(void)
173{ 163{
174 int ret = 0; 164 int ret = 0;
175 165
176 printk (KERN_INFO "PowerPC Book-E Watchdog Timer Loaded\n"); 166 printk(KERN_INFO "PowerPC Book-E Watchdog Timer Loaded\n");
177 ident.firmware_version = cur_cpu_spec->pvr_value; 167 ident.firmware_version = cur_cpu_spec->pvr_value;
178 168
179 ret = misc_register(&booke_wdt_miscdev); 169 ret = misc_register(&booke_wdt_miscdev);
180 if (ret) { 170 if (ret) {
181 printk (KERN_CRIT "Cannot register miscdev on minor=%d (err=%d)\n", 171 printk(KERN_CRIT "Cannot register miscdev on minor=%d: %d\n",
182 WATCHDOG_MINOR, ret); 172 WATCHDOG_MINOR, ret);
183 return ret; 173 return ret;
184 } 174 }
185 175
176 spin_lock(&booke_wdt_lock);
186 if (booke_wdt_enabled == 1) { 177 if (booke_wdt_enabled == 1) {
187 printk (KERN_INFO "PowerPC Book-E Watchdog Timer Enabled (wdt_period=%d)\n", 178 printk(KERN_INFO "PowerPC Book-E Watchdog Timer Enabled "
188 booke_wdt_period); 179 "(wdt_period=%d)\n", booke_wdt_period);
189 booke_wdt_enable(); 180 on_each_cpu(__booke_wdt_enable, NULL, 0, 0);
190 } 181 }
182 spin_unlock(&booke_wdt_lock);
191 183
192 return ret; 184 return ret;
193} 185}
diff --git a/drivers/watchdog/geodewdt.c b/drivers/watchdog/geodewdt.c
new file mode 100644
index 000000000000..30d09cbbad94
--- /dev/null
+++ b/drivers/watchdog/geodewdt.c
@@ -0,0 +1,308 @@
1/* Watchdog timer for the Geode GX/LX with the CS5535/CS5536 companion chip
2 *
3 * Copyright (C) 2006-2007, Advanced Micro Devices, Inc.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version
8 * 2 of the License, or (at your option) any later version.
9 */
10
11
12#include <linux/module.h>
13#include <linux/moduleparam.h>
14#include <linux/types.h>
15#include <linux/miscdevice.h>
16#include <linux/watchdog.h>
17#include <linux/fs.h>
18#include <linux/platform_device.h>
19#include <linux/reboot.h>
20
21#include <asm/uaccess.h>
22#include <asm/geode.h>
23
24#define GEODEWDT_HZ 500
25#define GEODEWDT_SCALE 6
26#define GEODEWDT_MAX_SECONDS 131
27
28#define WDT_FLAGS_OPEN 1
29#define WDT_FLAGS_ORPHAN 2
30
31#define DRV_NAME "geodewdt"
32#define WATCHDOG_NAME "Geode GX/LX WDT"
33#define WATCHDOG_TIMEOUT 60
34
35static int timeout = WATCHDOG_TIMEOUT;
36module_param(timeout, int, 0);
37MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. 1<= timeout <=131, default=" __MODULE_STRING(WATCHDOG_TIMEOUT) ".");
38
39static int nowayout = WATCHDOG_NOWAYOUT;
40module_param(nowayout, int, 0);
41MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
42
43static struct platform_device *geodewdt_platform_device;
44static unsigned long wdt_flags;
45static int wdt_timer;
46static int safe_close;
47
48static void geodewdt_ping(void)
49{
50 /* Stop the counter */
51 geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, 0);
52
53 /* Reset the counter */
54 geode_mfgpt_write(wdt_timer, MFGPT_REG_COUNTER, 0);
55
56 /* Enable the counter */
57 geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, MFGPT_SETUP_CNTEN);
58}
59
60static void geodewdt_disable(void)
61{
62 geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, 0);
63 geode_mfgpt_write(wdt_timer, MFGPT_REG_COUNTER, 0);
64}
65
66static int geodewdt_set_heartbeat(int val)
67{
68 if (val < 1 || val > GEODEWDT_MAX_SECONDS)
69 return -EINVAL;
70
71 geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, 0);
72 geode_mfgpt_write(wdt_timer, MFGPT_REG_CMP2, val * GEODEWDT_HZ);
73 geode_mfgpt_write(wdt_timer, MFGPT_REG_COUNTER, 0);
74 geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, MFGPT_SETUP_CNTEN);
75
76 timeout = val;
77 return 0;
78}
79
80static int
81geodewdt_open(struct inode *inode, struct file *file)
82{
83 if (test_and_set_bit(WDT_FLAGS_OPEN, &wdt_flags))
84 return -EBUSY;
85
86 if (!test_and_clear_bit(WDT_FLAGS_ORPHAN, &wdt_flags))
87 __module_get(THIS_MODULE);
88
89 geodewdt_ping();
90 return nonseekable_open(inode, file);
91}
92
93static int
94geodewdt_release(struct inode *inode, struct file *file)
95{
96 if (safe_close) {
97 geodewdt_disable();
98 module_put(THIS_MODULE);
99 }
100 else {
101 printk(KERN_CRIT "Unexpected close - watchdog is not stopping.\n");
102 geodewdt_ping();
103
104 set_bit(WDT_FLAGS_ORPHAN, &wdt_flags);
105 }
106
107 clear_bit(WDT_FLAGS_OPEN, &wdt_flags);
108 safe_close = 0;
109 return 0;
110}
111
112static ssize_t
113geodewdt_write(struct file *file, const char __user *data, size_t len,
114 loff_t *ppos)
115{
116 if(len) {
117 if (!nowayout) {
118 size_t i;
119 safe_close = 0;
120
121 for (i = 0; i != len; i++) {
122 char c;
123
124 if (get_user(c, data + i))
125 return -EFAULT;
126
127 if (c == 'V')
128 safe_close = 1;
129 }
130 }
131
132 geodewdt_ping();
133 }
134 return len;
135}
136
137static int
138geodewdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
139 unsigned long arg)
140{
141 void __user *argp = (void __user *)arg;
142 int __user *p = argp;
143 int interval;
144
145 static struct watchdog_info ident = {
146 .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING
147 | WDIOF_MAGICCLOSE,
148 .firmware_version = 1,
149 .identity = WATCHDOG_NAME,
150 };
151
152 switch(cmd) {
153 case WDIOC_GETSUPPORT:
154 return copy_to_user(argp, &ident,
155 sizeof(ident)) ? -EFAULT : 0;
156 break;
157
158 case WDIOC_GETSTATUS:
159 case WDIOC_GETBOOTSTATUS:
160 return put_user(0, p);
161
162 case WDIOC_KEEPALIVE:
163 geodewdt_ping();
164 return 0;
165
166 case WDIOC_SETTIMEOUT:
167 if (get_user(interval, p))
168 return -EFAULT;
169
170 if (geodewdt_set_heartbeat(interval))
171 return -EINVAL;
172
173/* Fall through */
174
175 case WDIOC_GETTIMEOUT:
176 return put_user(timeout, p);
177
178 case WDIOC_SETOPTIONS:
179 {
180 int options, ret = -EINVAL;
181
182 if (get_user(options, p))
183 return -EFAULT;
184
185 if (options & WDIOS_DISABLECARD) {
186 geodewdt_disable();
187 ret = 0;
188 }
189
190 if (options & WDIOS_ENABLECARD) {
191 geodewdt_ping();
192 ret = 0;
193 }
194
195 return ret;
196 }
197 default:
198 return -ENOTTY;
199 }
200
201 return 0;
202}
203
204static const struct file_operations geodewdt_fops = {
205 .owner = THIS_MODULE,
206 .llseek = no_llseek,
207 .write = geodewdt_write,
208 .ioctl = geodewdt_ioctl,
209 .open = geodewdt_open,
210 .release = geodewdt_release,
211};
212
213static struct miscdevice geodewdt_miscdev = {
214 .minor = WATCHDOG_MINOR,
215 .name = "watchdog",
216 .fops = &geodewdt_fops
217};
218
219static int __devinit
220geodewdt_probe(struct platform_device *dev)
221{
222 int ret, timer;
223
224 timer = geode_mfgpt_alloc_timer(MFGPT_TIMER_ANY, MFGPT_DOMAIN_WORKING);
225
226 if (timer == -1) {
227 printk(KERN_ERR "geodewdt: No timers were available\n");
228 return -ENODEV;
229 }
230
231 wdt_timer = timer;
232
233 /* Set up the timer */
234
235 geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP,
236 GEODEWDT_SCALE | (3 << 8));
237
238 /* Set up comparator 2 to reset when the event fires */
239 geode_mfgpt_toggle_event(wdt_timer, MFGPT_CMP2, MFGPT_EVENT_RESET, 1);
240
241 /* Set up the initial timeout */
242
243 geode_mfgpt_write(wdt_timer, MFGPT_REG_CMP2,
244 timeout * GEODEWDT_HZ);
245
246 ret = misc_register(&geodewdt_miscdev);
247
248 return ret;
249}
250
251static int __devexit
252geodewdt_remove(struct platform_device *dev)
253{
254 misc_deregister(&geodewdt_miscdev);
255 return 0;
256}
257
258static void
259geodewdt_shutdown(struct platform_device *dev)
260{
261 geodewdt_disable();
262}
263
264static struct platform_driver geodewdt_driver = {
265 .probe = geodewdt_probe,
266 .remove = __devexit_p(geodewdt_remove),
267 .shutdown = geodewdt_shutdown,
268 .driver = {
269 .owner = THIS_MODULE,
270 .name = DRV_NAME,
271 },
272};
273
274static int __init
275geodewdt_init(void)
276{
277 int ret;
278
279 ret = platform_driver_register(&geodewdt_driver);
280 if (ret)
281 return ret;
282
283 geodewdt_platform_device = platform_device_register_simple(DRV_NAME, -1, NULL, 0);
284 if (IS_ERR(geodewdt_platform_device)) {
285 ret = PTR_ERR(geodewdt_platform_device);
286 goto err;
287 }
288
289 return 0;
290err:
291 platform_driver_unregister(&geodewdt_driver);
292 return ret;
293}
294
295static void __exit
296geodewdt_exit(void)
297{
298 platform_device_unregister(geodewdt_platform_device);
299 platform_driver_unregister(&geodewdt_driver);
300}
301
302module_init(geodewdt_init);
303module_exit(geodewdt_exit);
304
305MODULE_AUTHOR("Advanced Micro Devices, Inc");
306MODULE_DESCRIPTION("Geode GX/LX Watchdog Driver");
307MODULE_LICENSE("GPL");
308MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index 6483d1066b95..eaa3f2a79ff5 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -140,49 +140,53 @@ static struct pci_device_id hpwdt_devices[] = {
140}; 140};
141MODULE_DEVICE_TABLE(pci, hpwdt_devices); 141MODULE_DEVICE_TABLE(pci, hpwdt_devices);
142 142
143extern asmlinkage void asminline_call(struct cmn_registers *pi86Regs, unsigned long *pRomEntry);
144
143#ifndef CONFIG_X86_64 145#ifndef CONFIG_X86_64
144/* --32 Bit Bios------------------------------------------------------------ */ 146/* --32 Bit Bios------------------------------------------------------------ */
145 147
146#define HPWDT_ARCH 32 148#define HPWDT_ARCH 32
147 149
148static void asminline_call(struct cmn_registers *pi86Regs, 150asm(".text \n\t"
149 unsigned long *pRomEntry) 151 ".align 4 \n"
150{ 152 "asminline_call: \n\t"
151 asm("pushl %ebp \n\t" 153 "pushl %ebp \n\t"
152 "movl %esp, %ebp \n\t" 154 "movl %esp, %ebp \n\t"
153 "pusha \n\t" 155 "pusha \n\t"
154 "pushf \n\t" 156 "pushf \n\t"
155 "push %es \n\t" 157 "push %es \n\t"
156 "push %ds \n\t" 158 "push %ds \n\t"
157 "pop %es \n\t" 159 "pop %es \n\t"
158 "movl 8(%ebp),%eax \n\t" 160 "movl 8(%ebp),%eax \n\t"
159 "movl 4(%eax),%ebx \n\t" 161 "movl 4(%eax),%ebx \n\t"
160 "movl 8(%eax),%ecx \n\t" 162 "movl 8(%eax),%ecx \n\t"
161 "movl 12(%eax),%edx \n\t" 163 "movl 12(%eax),%edx \n\t"
162 "movl 16(%eax),%esi \n\t" 164 "movl 16(%eax),%esi \n\t"
163 "movl 20(%eax),%edi \n\t" 165 "movl 20(%eax),%edi \n\t"
164 "movl (%eax),%eax \n\t" 166 "movl (%eax),%eax \n\t"
165 "push %cs \n\t" 167 "push %cs \n\t"
166 "call *12(%ebp) \n\t" 168 "call *12(%ebp) \n\t"
167 "pushf \n\t" 169 "pushf \n\t"
168 "pushl %eax \n\t" 170 "pushl %eax \n\t"
169 "movl 8(%ebp),%eax \n\t" 171 "movl 8(%ebp),%eax \n\t"
170 "movl %ebx,4(%eax) \n\t" 172 "movl %ebx,4(%eax) \n\t"
171 "movl %ecx,8(%eax) \n\t" 173 "movl %ecx,8(%eax) \n\t"
172 "movl %edx,12(%eax) \n\t" 174 "movl %edx,12(%eax) \n\t"
173 "movl %esi,16(%eax) \n\t" 175 "movl %esi,16(%eax) \n\t"
174 "movl %edi,20(%eax) \n\t" 176 "movl %edi,20(%eax) \n\t"
175 "movw %ds,24(%eax) \n\t" 177 "movw %ds,24(%eax) \n\t"
176 "movw %es,26(%eax) \n\t" 178 "movw %es,26(%eax) \n\t"
177 "popl %ebx \n\t" 179 "popl %ebx \n\t"
178 "movl %ebx,(%eax) \n\t" 180 "movl %ebx,(%eax) \n\t"
179 "popl %ebx \n\t" 181 "popl %ebx \n\t"
180 "movl %ebx,28(%eax) \n\t" 182 "movl %ebx,28(%eax) \n\t"
181 "pop %es \n\t" 183 "pop %es \n\t"
182 "popf \n\t" 184 "popf \n\t"
183 "popa \n\t" 185 "popa \n\t"
184 "leave \n\t" "ret"); 186 "leave \n\t"
185} 187 "ret \n\t"
188 ".previous");
189
186 190
187/* 191/*
188 * cru_detect 192 * cru_detect
@@ -333,43 +337,44 @@ static int __devinit detect_cru_service(void)
333 337
334#define HPWDT_ARCH 64 338#define HPWDT_ARCH 64
335 339
336static void asminline_call(struct cmn_registers *pi86Regs, 340asm(".text \n\t"
337 unsigned long *pRomEntry) 341 ".align 4 \n"
338{ 342 "asminline_call: \n\t"
339 asm("pushq %rbp \n\t" 343 "pushq %rbp \n\t"
340 "movq %rsp, %rbp \n\t" 344 "movq %rsp, %rbp \n\t"
341 "pushq %rax \n\t" 345 "pushq %rax \n\t"
342 "pushq %rbx \n\t" 346 "pushq %rbx \n\t"
343 "pushq %rdx \n\t" 347 "pushq %rdx \n\t"
344 "pushq %r12 \n\t" 348 "pushq %r12 \n\t"
345 "pushq %r9 \n\t" 349 "pushq %r9 \n\t"
346 "movq %rsi, %r12 \n\t" 350 "movq %rsi, %r12 \n\t"
347 "movq %rdi, %r9 \n\t" 351 "movq %rdi, %r9 \n\t"
348 "movl 4(%r9),%ebx \n\t" 352 "movl 4(%r9),%ebx \n\t"
349 "movl 8(%r9),%ecx \n\t" 353 "movl 8(%r9),%ecx \n\t"
350 "movl 12(%r9),%edx \n\t" 354 "movl 12(%r9),%edx \n\t"
351 "movl 16(%r9),%esi \n\t" 355 "movl 16(%r9),%esi \n\t"
352 "movl 20(%r9),%edi \n\t" 356 "movl 20(%r9),%edi \n\t"
353 "movl (%r9),%eax \n\t" 357 "movl (%r9),%eax \n\t"
354 "call *%r12 \n\t" 358 "call *%r12 \n\t"
355 "pushfq \n\t" 359 "pushfq \n\t"
356 "popq %r12 \n\t" 360 "popq %r12 \n\t"
357 "popfq \n\t" 361 "popfq \n\t"
358 "movl %eax, (%r9) \n\t" 362 "movl %eax, (%r9) \n\t"
359 "movl %ebx, 4(%r9) \n\t" 363 "movl %ebx, 4(%r9) \n\t"
360 "movl %ecx, 8(%r9) \n\t" 364 "movl %ecx, 8(%r9) \n\t"
361 "movl %edx, 12(%r9) \n\t" 365 "movl %edx, 12(%r9) \n\t"
362 "movl %esi, 16(%r9) \n\t" 366 "movl %esi, 16(%r9) \n\t"
363 "movl %edi, 20(%r9) \n\t" 367 "movl %edi, 20(%r9) \n\t"
364 "movq %r12, %rax \n\t" 368 "movq %r12, %rax \n\t"
365 "movl %eax, 28(%r9) \n\t" 369 "movl %eax, 28(%r9) \n\t"
366 "popq %r9 \n\t" 370 "popq %r9 \n\t"
367 "popq %r12 \n\t" 371 "popq %r12 \n\t"
368 "popq %rdx \n\t" 372 "popq %rdx \n\t"
369 "popq %rbx \n\t" 373 "popq %rbx \n\t"
370 "popq %rax \n\t" 374 "popq %rax \n\t"
371 "leave \n\t" "ret"); 375 "leave \n\t"
372} 376 "ret \n\t"
377 ".previous");
373 378
374/* 379/*
375 * dmi_find_cru 380 * dmi_find_cru
diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
index a0e6809e369f..95ba985bd341 100644
--- a/drivers/watchdog/iTCO_wdt.c
+++ b/drivers/watchdog/iTCO_wdt.c
@@ -41,9 +41,10 @@
41 * 82801HH (ICH8DH) : document number 313056-003, 313057-009, 41 * 82801HH (ICH8DH) : document number 313056-003, 313057-009,
42 * 82801HO (ICH8DO) : document number 313056-003, 313057-009, 42 * 82801HO (ICH8DO) : document number 313056-003, 313057-009,
43 * 82801HEM (ICH8M-E) : document number 313056-003, 313057-009, 43 * 82801HEM (ICH8M-E) : document number 313056-003, 313057-009,
44 * 82801IB (ICH9) : document number 316972-001, 316973-001, 44 * 82801IB (ICH9) : document number 316972-001, 316973-006,
45 * 82801IR (ICH9R) : document number 316972-001, 316973-001, 45 * 82801IR (ICH9R) : document number 316972-001, 316973-006,
46 * 82801IH (ICH9DH) : document number 316972-001, 316973-001, 46 * 82801IH (ICH9DH) : document number 316972-001, 316973-006,
47 * 82801IO (ICH9DO) : document number 316972-001, 316973-006,
47 * 6300ESB (6300ESB) : document number 300641-003, 300884-010, 48 * 6300ESB (6300ESB) : document number 300641-003, 300884-010,
48 * 631xESB (631xESB) : document number 313082-001, 313075-005, 49 * 631xESB (631xESB) : document number 313082-001, 313075-005,
49 * 632xESB (632xESB) : document number 313082-001, 313075-005 50 * 632xESB (632xESB) : document number 313082-001, 313075-005
@@ -55,8 +56,8 @@
55 56
56/* Module and version information */ 57/* Module and version information */
57#define DRV_NAME "iTCO_wdt" 58#define DRV_NAME "iTCO_wdt"
58#define DRV_VERSION "1.02" 59#define DRV_VERSION "1.03"
59#define DRV_RELDATE "26-Jul-2007" 60#define DRV_RELDATE "30-Apr-2008"
60#define PFX DRV_NAME ": " 61#define PFX DRV_NAME ": "
61 62
62/* Includes */ 63/* Includes */
@@ -104,6 +105,7 @@ enum iTCO_chipsets {
104 TCO_ICH9, /* ICH9 */ 105 TCO_ICH9, /* ICH9 */
105 TCO_ICH9R, /* ICH9R */ 106 TCO_ICH9R, /* ICH9R */
106 TCO_ICH9DH, /* ICH9DH */ 107 TCO_ICH9DH, /* ICH9DH */
108 TCO_ICH9DO, /* ICH9DO */
107 TCO_631XESB, /* 631xESB/632xESB */ 109 TCO_631XESB, /* 631xESB/632xESB */
108}; 110};
109 111
@@ -136,6 +138,7 @@ static struct {
136 {"ICH9", 2}, 138 {"ICH9", 2},
137 {"ICH9R", 2}, 139 {"ICH9R", 2},
138 {"ICH9DH", 2}, 140 {"ICH9DH", 2},
141 {"ICH9DO", 2},
139 {"631xESB/632xESB", 2}, 142 {"631xESB/632xESB", 2},
140 {NULL,0} 143 {NULL,0}
141}; 144};
@@ -181,6 +184,7 @@ static struct pci_device_id iTCO_wdt_pci_tbl[] = {
181 { ITCO_PCI_DEVICE(0x2918, TCO_ICH9 )}, 184 { ITCO_PCI_DEVICE(0x2918, TCO_ICH9 )},
182 { ITCO_PCI_DEVICE(0x2916, TCO_ICH9R )}, 185 { ITCO_PCI_DEVICE(0x2916, TCO_ICH9R )},
183 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH9_2, TCO_ICH9DH )}, 186 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH9_2, TCO_ICH9DH )},
187 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH9_4, TCO_ICH9DO )},
184 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ESB2_0, TCO_631XESB)}, 188 { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ESB2_0, TCO_631XESB)},
185 { ITCO_PCI_DEVICE(0x2671, TCO_631XESB)}, 189 { ITCO_PCI_DEVICE(0x2671, TCO_631XESB)},
186 { ITCO_PCI_DEVICE(0x2672, TCO_631XESB)}, 190 { ITCO_PCI_DEVICE(0x2672, TCO_631XESB)},
diff --git a/drivers/watchdog/w83697hf_wdt.c b/drivers/watchdog/w83697hf_wdt.c
index c622a0e6c9ae..528b882420b6 100644
--- a/drivers/watchdog/w83697hf_wdt.c
+++ b/drivers/watchdog/w83697hf_wdt.c
@@ -44,6 +44,7 @@
44#define WATCHDOG_NAME "w83697hf/hg WDT" 44#define WATCHDOG_NAME "w83697hf/hg WDT"
45#define PFX WATCHDOG_NAME ": " 45#define PFX WATCHDOG_NAME ": "
46#define WATCHDOG_TIMEOUT 60 /* 60 sec default timeout */ 46#define WATCHDOG_TIMEOUT 60 /* 60 sec default timeout */
47#define WATCHDOG_EARLY_DISABLE 1 /* Disable until userland kicks in */
47 48
48static unsigned long wdt_is_open; 49static unsigned long wdt_is_open;
49static char expect_close; 50static char expect_close;
@@ -56,12 +57,16 @@ MODULE_PARM_DESC(wdt_io, "w83697hf/hg WDT io port (default 0x2e, 0 = autodetect)
56 57
57static int timeout = WATCHDOG_TIMEOUT; /* in seconds */ 58static int timeout = WATCHDOG_TIMEOUT; /* in seconds */
58module_param(timeout, int, 0); 59module_param(timeout, int, 0);
59MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. 1<= timeout <=255, default=" __MODULE_STRING(WATCHDOG_TIMEOUT) "."); 60MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. 1<= timeout <=255 (default=" __MODULE_STRING(WATCHDOG_TIMEOUT) ")");
60 61
61static int nowayout = WATCHDOG_NOWAYOUT; 62static int nowayout = WATCHDOG_NOWAYOUT;
62module_param(nowayout, int, 0); 63module_param(nowayout, int, 0);
63MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); 64MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
64 65
66static int early_disable = WATCHDOG_EARLY_DISABLE;
67module_param(early_disable, int, 0);
68MODULE_PARM_DESC(early_disable, "Watchdog gets disabled at boot time (default=" __MODULE_STRING(WATCHDOG_EARLY_DISABLE) ")");
69
65/* 70/*
66 * Kernel methods. 71 * Kernel methods.
67 */ 72 */
@@ -140,7 +145,7 @@ w83697hf_init(void)
140 w83697hf_deselect_wdt(); 145 w83697hf_deselect_wdt();
141} 146}
142 147
143static int 148static void
144wdt_ping(void) 149wdt_ping(void)
145{ 150{
146 spin_lock(&io_lock); 151 spin_lock(&io_lock);
@@ -150,10 +155,9 @@ wdt_ping(void)
150 155
151 w83697hf_deselect_wdt(); 156 w83697hf_deselect_wdt();
152 spin_unlock(&io_lock); 157 spin_unlock(&io_lock);
153 return 0;
154} 158}
155 159
156static int 160static void
157wdt_enable(void) 161wdt_enable(void)
158{ 162{
159 spin_lock(&io_lock); 163 spin_lock(&io_lock);
@@ -164,10 +168,9 @@ wdt_enable(void)
164 168
165 w83697hf_deselect_wdt(); 169 w83697hf_deselect_wdt();
166 spin_unlock(&io_lock); 170 spin_unlock(&io_lock);
167 return 0;
168} 171}
169 172
170static int 173static void
171wdt_disable(void) 174wdt_disable(void)
172{ 175{
173 spin_lock(&io_lock); 176 spin_lock(&io_lock);
@@ -178,7 +181,22 @@ wdt_disable(void)
178 181
179 w83697hf_deselect_wdt(); 182 w83697hf_deselect_wdt();
180 spin_unlock(&io_lock); 183 spin_unlock(&io_lock);
181 return 0; 184}
185
186static unsigned char
187wdt_running(void)
188{
189 unsigned char t;
190
191 spin_lock(&io_lock);
192 w83697hf_select_wdt();
193
194 t = w83697hf_get_reg(0xF4); /* Read timer */
195
196 w83697hf_deselect_wdt();
197 spin_unlock(&io_lock);
198
199 return t;
182} 200}
183 201
184static int 202static int
@@ -397,7 +415,11 @@ wdt_init(void)
397 } 415 }
398 416
399 w83697hf_init(); 417 w83697hf_init();
400 wdt_disable(); /* Disable watchdog until first use */ 418 if (early_disable) {
419 if (wdt_running())
420 printk (KERN_WARNING PFX "Stopping previously enabled watchdog until userland kicks in\n");
421 wdt_disable();
422 }
401 423
402 if (wdt_set_heartbeat(timeout)) { 424 if (wdt_set_heartbeat(timeout)) {
403 wdt_set_heartbeat(WATCHDOG_TIMEOUT); 425 wdt_set_heartbeat(WATCHDOG_TIMEOUT);
diff --git a/drivers/xen/Makefile b/drivers/xen/Makefile
index 37af04f1ffd9..363286c54290 100644
--- a/drivers/xen/Makefile
+++ b/drivers/xen/Makefile
@@ -1,4 +1,4 @@
1obj-y += grant-table.o features.o events.o 1obj-y += grant-table.o features.o events.o manage.o
2obj-y += xenbus/ 2obj-y += xenbus/
3obj-$(CONFIG_XEN_XENCOMM) += xencomm.o 3obj-$(CONFIG_XEN_XENCOMM) += xencomm.o
4obj-$(CONFIG_XEN_BALLOON) += balloon.o 4obj-$(CONFIG_XEN_BALLOON) += balloon.o
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index ab25ba6cbbb9..591bc29b55f5 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -225,7 +225,7 @@ static int increase_reservation(unsigned long nr_pages)
225 page = balloon_next_page(page); 225 page = balloon_next_page(page);
226 } 226 }
227 227
228 reservation.extent_start = (unsigned long)frame_list; 228 set_xen_guest_handle(reservation.extent_start, frame_list);
229 reservation.nr_extents = nr_pages; 229 reservation.nr_extents = nr_pages;
230 rc = HYPERVISOR_memory_op( 230 rc = HYPERVISOR_memory_op(
231 XENMEM_populate_physmap, &reservation); 231 XENMEM_populate_physmap, &reservation);
@@ -321,7 +321,7 @@ static int decrease_reservation(unsigned long nr_pages)
321 balloon_append(pfn_to_page(pfn)); 321 balloon_append(pfn_to_page(pfn));
322 } 322 }
323 323
324 reservation.extent_start = (unsigned long)frame_list; 324 set_xen_guest_handle(reservation.extent_start, frame_list);
325 reservation.nr_extents = nr_pages; 325 reservation.nr_extents = nr_pages;
326 ret = HYPERVISOR_memory_op(XENMEM_decrease_reservation, &reservation); 326 ret = HYPERVISOR_memory_op(XENMEM_decrease_reservation, &reservation);
327 BUG_ON(ret != nr_pages); 327 BUG_ON(ret != nr_pages);
@@ -368,7 +368,7 @@ static void balloon_process(struct work_struct *work)
368} 368}
369 369
370/* Resets the Xen limit, sets new target, and kicks off processing. */ 370/* Resets the Xen limit, sets new target, and kicks off processing. */
371void balloon_set_new_target(unsigned long target) 371static void balloon_set_new_target(unsigned long target)
372{ 372{
373 /* No need for lock. Not read-modify-write updates. */ 373 /* No need for lock. Not read-modify-write updates. */
374 balloon_stats.hard_limit = ~0UL; 374 balloon_stats.hard_limit = ~0UL;
@@ -483,7 +483,7 @@ static int dealloc_pte_fn(
483 .extent_order = 0, 483 .extent_order = 0,
484 .domid = DOMID_SELF 484 .domid = DOMID_SELF
485 }; 485 };
486 reservation.extent_start = (unsigned long)&mfn; 486 set_xen_guest_handle(reservation.extent_start, &mfn);
487 set_pte_at(&init_mm, addr, pte, __pte_ma(0ull)); 487 set_pte_at(&init_mm, addr, pte, __pte_ma(0ull));
488 set_phys_to_machine(__pa(addr) >> PAGE_SHIFT, INVALID_P2M_ENTRY); 488 set_phys_to_machine(__pa(addr) >> PAGE_SHIFT, INVALID_P2M_ENTRY);
489 ret = HYPERVISOR_memory_op(XENMEM_decrease_reservation, &reservation); 489 ret = HYPERVISOR_memory_op(XENMEM_decrease_reservation, &reservation);
@@ -519,7 +519,7 @@ static struct page **alloc_empty_pages_and_pagevec(int nr_pages)
519 .extent_order = 0, 519 .extent_order = 0,
520 .domid = DOMID_SELF 520 .domid = DOMID_SELF
521 }; 521 };
522 reservation.extent_start = (unsigned long)&gmfn; 522 set_xen_guest_handle(reservation.extent_start, &gmfn);
523 ret = HYPERVISOR_memory_op(XENMEM_decrease_reservation, 523 ret = HYPERVISOR_memory_op(XENMEM_decrease_reservation,
524 &reservation); 524 &reservation);
525 if (ret == 1) 525 if (ret == 1)
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 4f0f22b020ea..332dd63750a0 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -355,7 +355,7 @@ static void unbind_from_irq(unsigned int irq)
355 355
356 spin_lock(&irq_mapping_update_lock); 356 spin_lock(&irq_mapping_update_lock);
357 357
358 if (VALID_EVTCHN(evtchn) && (--irq_bindcount[irq] == 0)) { 358 if ((--irq_bindcount[irq] == 0) && VALID_EVTCHN(evtchn)) {
359 close.port = evtchn; 359 close.port = evtchn;
360 if (HYPERVISOR_event_channel_op(EVTCHNOP_close, &close) != 0) 360 if (HYPERVISOR_event_channel_op(EVTCHNOP_close, &close) != 0)
361 BUG(); 361 BUG();
@@ -375,7 +375,7 @@ static void unbind_from_irq(unsigned int irq)
375 evtchn_to_irq[evtchn] = -1; 375 evtchn_to_irq[evtchn] = -1;
376 irq_info[irq] = IRQ_UNBOUND; 376 irq_info[irq] = IRQ_UNBOUND;
377 377
378 dynamic_irq_init(irq); 378 dynamic_irq_cleanup(irq);
379 } 379 }
380 380
381 spin_unlock(&irq_mapping_update_lock); 381 spin_unlock(&irq_mapping_update_lock);
@@ -529,7 +529,7 @@ void xen_evtchn_do_upcall(struct pt_regs *regs)
529 529
530#ifndef CONFIG_X86 /* No need for a barrier -- XCHG is a barrier on x86. */ 530#ifndef CONFIG_X86 /* No need for a barrier -- XCHG is a barrier on x86. */
531 /* Clear master flag /before/ clearing selector flag. */ 531 /* Clear master flag /before/ clearing selector flag. */
532 rmb(); 532 wmb();
533#endif 533#endif
534 pending_words = xchg(&vcpu_info->evtchn_pending_sel, 0); 534 pending_words = xchg(&vcpu_info->evtchn_pending_sel, 0);
535 while (pending_words != 0) { 535 while (pending_words != 0) {
@@ -557,6 +557,33 @@ out:
557 put_cpu(); 557 put_cpu();
558} 558}
559 559
560/* Rebind a new event channel to an existing irq. */
561void rebind_evtchn_irq(int evtchn, int irq)
562{
563 /* Make sure the irq is masked, since the new event channel
564 will also be masked. */
565 disable_irq(irq);
566
567 spin_lock(&irq_mapping_update_lock);
568
569 /* After resume the irq<->evtchn mappings are all cleared out */
570 BUG_ON(evtchn_to_irq[evtchn] != -1);
571 /* Expect irq to have been bound before,
572 so the bindcount should be non-0 */
573 BUG_ON(irq_bindcount[irq] == 0);
574
575 evtchn_to_irq[evtchn] = irq;
576 irq_info[irq] = mk_irq_info(IRQT_EVTCHN, 0, evtchn);
577
578 spin_unlock(&irq_mapping_update_lock);
579
580 /* new event channels are always bound to cpu 0 */
581 irq_set_affinity(irq, cpumask_of_cpu(0));
582
583 /* Unmask the event channel. */
584 enable_irq(irq);
585}
586
560/* Rebind an evtchn so that it gets delivered to a specific cpu */ 587/* Rebind an evtchn so that it gets delivered to a specific cpu */
561static void rebind_irq_to_cpu(unsigned irq, unsigned tcpu) 588static void rebind_irq_to_cpu(unsigned irq, unsigned tcpu)
562{ 589{
@@ -647,6 +674,89 @@ static int retrigger_dynirq(unsigned int irq)
647 return ret; 674 return ret;
648} 675}
649 676
677static void restore_cpu_virqs(unsigned int cpu)
678{
679 struct evtchn_bind_virq bind_virq;
680 int virq, irq, evtchn;
681
682 for (virq = 0; virq < NR_VIRQS; virq++) {
683 if ((irq = per_cpu(virq_to_irq, cpu)[virq]) == -1)
684 continue;
685
686 BUG_ON(irq_info[irq].type != IRQT_VIRQ);
687 BUG_ON(irq_info[irq].index != virq);
688
689 /* Get a new binding from Xen. */
690 bind_virq.virq = virq;
691 bind_virq.vcpu = cpu;
692 if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_virq,
693 &bind_virq) != 0)
694 BUG();
695 evtchn = bind_virq.port;
696
697 /* Record the new mapping. */
698 evtchn_to_irq[evtchn] = irq;
699 irq_info[irq] = mk_irq_info(IRQT_VIRQ, virq, evtchn);
700 bind_evtchn_to_cpu(evtchn, cpu);
701
702 /* Ready for use. */
703 unmask_evtchn(evtchn);
704 }
705}
706
707static void restore_cpu_ipis(unsigned int cpu)
708{
709 struct evtchn_bind_ipi bind_ipi;
710 int ipi, irq, evtchn;
711
712 for (ipi = 0; ipi < XEN_NR_IPIS; ipi++) {
713 if ((irq = per_cpu(ipi_to_irq, cpu)[ipi]) == -1)
714 continue;
715
716 BUG_ON(irq_info[irq].type != IRQT_IPI);
717 BUG_ON(irq_info[irq].index != ipi);
718
719 /* Get a new binding from Xen. */
720 bind_ipi.vcpu = cpu;
721 if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_ipi,
722 &bind_ipi) != 0)
723 BUG();
724 evtchn = bind_ipi.port;
725
726 /* Record the new mapping. */
727 evtchn_to_irq[evtchn] = irq;
728 irq_info[irq] = mk_irq_info(IRQT_IPI, ipi, evtchn);
729 bind_evtchn_to_cpu(evtchn, cpu);
730
731 /* Ready for use. */
732 unmask_evtchn(evtchn);
733
734 }
735}
736
737void xen_irq_resume(void)
738{
739 unsigned int cpu, irq, evtchn;
740
741 init_evtchn_cpu_bindings();
742
743 /* New event-channel space is not 'live' yet. */
744 for (evtchn = 0; evtchn < NR_EVENT_CHANNELS; evtchn++)
745 mask_evtchn(evtchn);
746
747 /* No IRQ <-> event-channel mappings. */
748 for (irq = 0; irq < NR_IRQS; irq++)
749 irq_info[irq].evtchn = 0; /* zap event-channel binding */
750
751 for (evtchn = 0; evtchn < NR_EVENT_CHANNELS; evtchn++)
752 evtchn_to_irq[evtchn] = -1;
753
754 for_each_possible_cpu(cpu) {
755 restore_cpu_virqs(cpu);
756 restore_cpu_ipis(cpu);
757 }
758}
759
650static struct irq_chip xen_dynamic_chip __read_mostly = { 760static struct irq_chip xen_dynamic_chip __read_mostly = {
651 .name = "xen-dyn", 761 .name = "xen-dyn",
652 .mask = disable_dynirq, 762 .mask = disable_dynirq,
diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c
index 52b6b41b909d..e9e11168616a 100644
--- a/drivers/xen/grant-table.c
+++ b/drivers/xen/grant-table.c
@@ -471,14 +471,14 @@ static int gnttab_map(unsigned int start_idx, unsigned int end_idx)
471 return 0; 471 return 0;
472} 472}
473 473
474static int gnttab_resume(void) 474int gnttab_resume(void)
475{ 475{
476 if (max_nr_grant_frames() < nr_grant_frames) 476 if (max_nr_grant_frames() < nr_grant_frames)
477 return -ENOSYS; 477 return -ENOSYS;
478 return gnttab_map(0, nr_grant_frames - 1); 478 return gnttab_map(0, nr_grant_frames - 1);
479} 479}
480 480
481static int gnttab_suspend(void) 481int gnttab_suspend(void)
482{ 482{
483 arch_gnttab_unmap_shared(shared, nr_grant_frames); 483 arch_gnttab_unmap_shared(shared, nr_grant_frames);
484 return 0; 484 return 0;
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
new file mode 100644
index 000000000000..5b546e365f00
--- /dev/null
+++ b/drivers/xen/manage.c
@@ -0,0 +1,252 @@
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#include <linux/stop_machine.h>
9#include <linux/freezer.h>
10
11#include <xen/xenbus.h>
12#include <xen/grant_table.h>
13#include <xen/events.h>
14#include <xen/hvc-console.h>
15#include <xen/xen-ops.h>
16
17#include <asm/xen/hypercall.h>
18#include <asm/xen/page.h>
19
20enum shutdown_state {
21 SHUTDOWN_INVALID = -1,
22 SHUTDOWN_POWEROFF = 0,
23 SHUTDOWN_SUSPEND = 2,
24 /* Code 3 is SHUTDOWN_CRASH, which we don't use because the domain can only
25 report a crash, not be instructed to crash!
26 HALT is the same as POWEROFF, as far as we're concerned. The tools use
27 the distinction when we return the reason code to them. */
28 SHUTDOWN_HALT = 4,
29};
30
31/* Ignore multiple shutdown requests. */
32static enum shutdown_state shutting_down = SHUTDOWN_INVALID;
33
34#ifdef CONFIG_PM_SLEEP
35static int xen_suspend(void *data)
36{
37 int *cancelled = data;
38 int err;
39
40 BUG_ON(!irqs_disabled());
41
42 load_cr3(swapper_pg_dir);
43
44 err = device_power_down(PMSG_SUSPEND);
45 if (err) {
46 printk(KERN_ERR "xen_suspend: device_power_down failed: %d\n",
47 err);
48 return err;
49 }
50
51 xen_mm_pin_all();
52 gnttab_suspend();
53 xen_pre_suspend();
54
55 /*
56 * This hypercall returns 1 if suspend was cancelled
57 * or the domain was merely checkpointed, and 0 if it
58 * is resuming in a new domain.
59 */
60 *cancelled = HYPERVISOR_suspend(virt_to_mfn(xen_start_info));
61
62 xen_post_suspend(*cancelled);
63 gnttab_resume();
64 xen_mm_unpin_all();
65
66 device_power_up();
67
68 if (!*cancelled) {
69 xen_irq_resume();
70 xen_console_resume();
71 }
72
73 return 0;
74}
75
76static void do_suspend(void)
77{
78 int err;
79 int cancelled = 1;
80
81 shutting_down = SHUTDOWN_SUSPEND;
82
83#ifdef CONFIG_PREEMPT
84 /* If the kernel is preemptible, we need to freeze all the processes
85 to prevent them from being in the middle of a pagetable update
86 during suspend. */
87 err = freeze_processes();
88 if (err) {
89 printk(KERN_ERR "xen suspend: freeze failed %d\n", err);
90 return;
91 }
92#endif
93
94 err = device_suspend(PMSG_SUSPEND);
95 if (err) {
96 printk(KERN_ERR "xen suspend: device_suspend %d\n", err);
97 goto out;
98 }
99
100 printk("suspending xenbus...\n");
101 /* XXX use normal device tree? */
102 xenbus_suspend();
103
104 err = stop_machine_run(xen_suspend, &cancelled, 0);
105 if (err) {
106 printk(KERN_ERR "failed to start xen_suspend: %d\n", err);
107 goto out;
108 }
109
110 if (!cancelled)
111 xenbus_resume();
112 else
113 xenbus_suspend_cancel();
114
115 device_resume();
116
117 /* Make sure timer events get retriggered on all CPUs */
118 clock_was_set();
119out:
120#ifdef CONFIG_PREEMPT
121 thaw_processes();
122#endif
123 shutting_down = SHUTDOWN_INVALID;
124}
125#endif /* CONFIG_PM_SLEEP */
126
127static void shutdown_handler(struct xenbus_watch *watch,
128 const char **vec, unsigned int len)
129{
130 char *str;
131 struct xenbus_transaction xbt;
132 int err;
133
134 if (shutting_down != SHUTDOWN_INVALID)
135 return;
136
137 again:
138 err = xenbus_transaction_start(&xbt);
139 if (err)
140 return;
141
142 str = (char *)xenbus_read(xbt, "control", "shutdown", NULL);
143 /* Ignore read errors and empty reads. */
144 if (XENBUS_IS_ERR_READ(str)) {
145 xenbus_transaction_end(xbt, 1);
146 return;
147 }
148
149 xenbus_write(xbt, "control", "shutdown", "");
150
151 err = xenbus_transaction_end(xbt, 0);
152 if (err == -EAGAIN) {
153 kfree(str);
154 goto again;
155 }
156
157 if (strcmp(str, "poweroff") == 0 ||
158 strcmp(str, "halt") == 0) {
159 shutting_down = SHUTDOWN_POWEROFF;
160 orderly_poweroff(false);
161 } else if (strcmp(str, "reboot") == 0) {
162 shutting_down = SHUTDOWN_POWEROFF; /* ? */
163 ctrl_alt_del();
164#ifdef CONFIG_PM_SLEEP
165 } else if (strcmp(str, "suspend") == 0) {
166 do_suspend();
167#endif
168 } else {
169 printk(KERN_INFO "Ignoring shutdown request: %s\n", str);
170 shutting_down = SHUTDOWN_INVALID;
171 }
172
173 kfree(str);
174}
175
176static void sysrq_handler(struct xenbus_watch *watch, const char **vec,
177 unsigned int len)
178{
179 char sysrq_key = '\0';
180 struct xenbus_transaction xbt;
181 int err;
182
183 again:
184 err = xenbus_transaction_start(&xbt);
185 if (err)
186 return;
187 if (!xenbus_scanf(xbt, "control", "sysrq", "%c", &sysrq_key)) {
188 printk(KERN_ERR "Unable to read sysrq code in "
189 "control/sysrq\n");
190 xenbus_transaction_end(xbt, 1);
191 return;
192 }
193
194 if (sysrq_key != '\0')
195 xenbus_printf(xbt, "control", "sysrq", "%c", '\0');
196
197 err = xenbus_transaction_end(xbt, 0);
198 if (err == -EAGAIN)
199 goto again;
200
201 if (sysrq_key != '\0')
202 handle_sysrq(sysrq_key, NULL);
203}
204
205static struct xenbus_watch shutdown_watch = {
206 .node = "control/shutdown",
207 .callback = shutdown_handler
208};
209
210static struct xenbus_watch sysrq_watch = {
211 .node = "control/sysrq",
212 .callback = sysrq_handler
213};
214
215static int setup_shutdown_watcher(void)
216{
217 int err;
218
219 err = register_xenbus_watch(&shutdown_watch);
220 if (err) {
221 printk(KERN_ERR "Failed to set shutdown watcher\n");
222 return err;
223 }
224
225 err = register_xenbus_watch(&sysrq_watch);
226 if (err) {
227 printk(KERN_ERR "Failed to set sysrq watcher\n");
228 return err;
229 }
230
231 return 0;
232}
233
234static int shutdown_event(struct notifier_block *notifier,
235 unsigned long event,
236 void *data)
237{
238 setup_shutdown_watcher();
239 return NOTIFY_DONE;
240}
241
242static int __init setup_shutdown_event(void)
243{
244 static struct notifier_block xenstore_notifier = {
245 .notifier_call = shutdown_event
246 };
247 register_xenstore_notifier(&xenstore_notifier);
248
249 return 0;
250}
251
252subsys_initcall(setup_shutdown_event);
diff --git a/drivers/xen/xenbus/xenbus_comms.c b/drivers/xen/xenbus/xenbus_comms.c
index 6efbe3f29ca5..090c61ee8fd0 100644
--- a/drivers/xen/xenbus/xenbus_comms.c
+++ b/drivers/xen/xenbus/xenbus_comms.c
@@ -203,7 +203,6 @@ int xb_read(void *data, unsigned len)
203int xb_init_comms(void) 203int xb_init_comms(void)
204{ 204{
205 struct xenstore_domain_interface *intf = xen_store_interface; 205 struct xenstore_domain_interface *intf = xen_store_interface;
206 int err;
207 206
208 if (intf->req_prod != intf->req_cons) 207 if (intf->req_prod != intf->req_cons)
209 printk(KERN_ERR "XENBUS request ring is not quiescent " 208 printk(KERN_ERR "XENBUS request ring is not quiescent "
@@ -216,18 +215,20 @@ int xb_init_comms(void)
216 intf->rsp_cons = intf->rsp_prod; 215 intf->rsp_cons = intf->rsp_prod;
217 } 216 }
218 217
219 if (xenbus_irq) 218 if (xenbus_irq) {
220 unbind_from_irqhandler(xenbus_irq, &xb_waitq); 219 /* Already have an irq; assume we're resuming */
220 rebind_evtchn_irq(xen_store_evtchn, xenbus_irq);
221 } else {
222 int err;
223 err = bind_evtchn_to_irqhandler(xen_store_evtchn, wake_waiting,
224 0, "xenbus", &xb_waitq);
225 if (err <= 0) {
226 printk(KERN_ERR "XENBUS request irq failed %i\n", err);
227 return err;
228 }
221 229
222 err = bind_evtchn_to_irqhandler( 230 xenbus_irq = err;
223 xen_store_evtchn, wake_waiting,
224 0, "xenbus", &xb_waitq);
225 if (err <= 0) {
226 printk(KERN_ERR "XENBUS request irq failed %i\n", err);
227 return err;
228 } 231 }
229 232
230 xenbus_irq = err;
231
232 return 0; 233 return 0;
233} 234}
diff --git a/fs/9p/v9fs_vfs.h b/fs/9p/v9fs_vfs.h
index fd01d90cada5..57997fa14e69 100644
--- a/fs/9p/v9fs_vfs.h
+++ b/fs/9p/v9fs_vfs.h
@@ -51,4 +51,4 @@ int v9fs_dir_release(struct inode *inode, struct file *filp);
51int v9fs_file_open(struct inode *inode, struct file *file); 51int v9fs_file_open(struct inode *inode, struct file *file);
52void v9fs_inode2stat(struct inode *inode, struct p9_stat *stat); 52void v9fs_inode2stat(struct inode *inode, struct p9_stat *stat);
53void v9fs_dentry_release(struct dentry *); 53void v9fs_dentry_release(struct dentry *);
54int v9fs_uflags2omode(int uflags); 54int v9fs_uflags2omode(int uflags, int extended);
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
index 0d55affe37d4..52944d2249a4 100644
--- a/fs/9p/vfs_file.c
+++ b/fs/9p/vfs_file.c
@@ -59,7 +59,7 @@ int v9fs_file_open(struct inode *inode, struct file *file)
59 59
60 P9_DPRINTK(P9_DEBUG_VFS, "inode: %p file: %p \n", inode, file); 60 P9_DPRINTK(P9_DEBUG_VFS, "inode: %p file: %p \n", inode, file);
61 v9ses = v9fs_inode2v9ses(inode); 61 v9ses = v9fs_inode2v9ses(inode);
62 omode = v9fs_uflags2omode(file->f_flags); 62 omode = v9fs_uflags2omode(file->f_flags, v9fs_extended(v9ses));
63 fid = file->private_data; 63 fid = file->private_data;
64 if (!fid) { 64 if (!fid) {
65 fid = v9fs_fid_clone(file->f_path.dentry); 65 fid = v9fs_fid_clone(file->f_path.dentry);
@@ -75,6 +75,8 @@ int v9fs_file_open(struct inode *inode, struct file *file)
75 inode->i_size = 0; 75 inode->i_size = 0;
76 inode->i_blocks = 0; 76 inode->i_blocks = 0;
77 } 77 }
78 if ((file->f_flags & O_APPEND) && (!v9fs_extended(v9ses)))
79 generic_file_llseek(file, 0, SEEK_END);
78 } 80 }
79 81
80 file->private_data = fid; 82 file->private_data = fid;
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 40fa807bd929..c95295c65045 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -132,10 +132,10 @@ static int p9mode2unixmode(struct v9fs_session_info *v9ses, int mode)
132/** 132/**
133 * v9fs_uflags2omode- convert posix open flags to plan 9 mode bits 133 * v9fs_uflags2omode- convert posix open flags to plan 9 mode bits
134 * @uflags: flags to convert 134 * @uflags: flags to convert
135 * 135 * @extended: if .u extensions are active
136 */ 136 */
137 137
138int v9fs_uflags2omode(int uflags) 138int v9fs_uflags2omode(int uflags, int extended)
139{ 139{
140 int ret; 140 int ret;
141 141
@@ -155,14 +155,16 @@ int v9fs_uflags2omode(int uflags)
155 break; 155 break;
156 } 156 }
157 157
158 if (uflags & O_EXCL)
159 ret |= P9_OEXCL;
160
161 if (uflags & O_TRUNC) 158 if (uflags & O_TRUNC)
162 ret |= P9_OTRUNC; 159 ret |= P9_OTRUNC;
163 160
164 if (uflags & O_APPEND) 161 if (extended) {
165 ret |= P9_OAPPEND; 162 if (uflags & O_EXCL)
163 ret |= P9_OEXCL;
164
165 if (uflags & O_APPEND)
166 ret |= P9_OAPPEND;
167 }
166 168
167 return ret; 169 return ret;
168} 170}
@@ -506,7 +508,7 @@ v9fs_vfs_create(struct inode *dir, struct dentry *dentry, int mode,
506 flags = O_RDWR; 508 flags = O_RDWR;
507 509
508 fid = v9fs_create(v9ses, dir, dentry, NULL, perm, 510 fid = v9fs_create(v9ses, dir, dentry, NULL, perm,
509 v9fs_uflags2omode(flags)); 511 v9fs_uflags2omode(flags, v9fs_extended(v9ses)));
510 if (IS_ERR(fid)) { 512 if (IS_ERR(fid)) {
511 err = PTR_ERR(fid); 513 err = PTR_ERR(fid);
512 fid = NULL; 514 fid = NULL;
diff --git a/fs/Kconfig b/fs/Kconfig
index cf12c403b8c7..2694648cbd1b 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -830,7 +830,7 @@ config NTFS_FS
830 from the project web site. 830 from the project web site.
831 831
832 For more information see <file:Documentation/filesystems/ntfs.txt> 832 For more information see <file:Documentation/filesystems/ntfs.txt>
833 and <http://linux-ntfs.sourceforge.net/>. 833 and <http://www.linux-ntfs.org/>.
834 834
835 To compile this file system support as a module, choose M here: the 835 To compile this file system support as a module, choose M here: the
836 module will be called ntfs. 836 module will be called ntfs.
diff --git a/fs/Kconfig.binfmt b/fs/Kconfig.binfmt
index 55e8ee1900a5..3263084eef9e 100644
--- a/fs/Kconfig.binfmt
+++ b/fs/Kconfig.binfmt
@@ -42,7 +42,7 @@ config BINFMT_ELF_FDPIC
42 42
43config BINFMT_FLAT 43config BINFMT_FLAT
44 bool "Kernel support for flat binaries" 44 bool "Kernel support for flat binaries"
45 depends on !MMU 45 depends on !MMU && (!FRV || BROKEN)
46 help 46 help
47 Support uClinux FLAT format binaries. 47 Support uClinux FLAT format binaries.
48 48
diff --git a/fs/afs/callback.c b/fs/afs/callback.c
index a78d5b236bb1..587ef5123cd8 100644
--- a/fs/afs/callback.c
+++ b/fs/afs/callback.c
@@ -8,7 +8,7 @@
8 * along with this program; if not, write to the Free Software 8 * along with this program; if not, write to the Free Software
9 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 9 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
10 * 10 *
11 * Authors: David Woodhouse <dwmw2@cambridge.redhat.com> 11 * Authors: David Woodhouse <dwmw2@infradead.org>
12 * David Howells <dhowells@redhat.com> 12 * David Howells <dhowells@redhat.com>
13 * 13 *
14 */ 14 */
diff --git a/fs/afs/inode.c b/fs/afs/inode.c
index 08db82e1343a..bb47217f6a18 100644
--- a/fs/afs/inode.c
+++ b/fs/afs/inode.c
@@ -8,7 +8,7 @@
8 * along with this program; if not, write to the Free Software 8 * along with this program; if not, write to the Free Software
9 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 9 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
10 * 10 *
11 * Authors: David Woodhouse <dwmw2@cambridge.redhat.com> 11 * Authors: David Woodhouse <dwmw2@infradead.org>
12 * David Howells <dhowells@redhat.com> 12 * David Howells <dhowells@redhat.com>
13 * 13 *
14 */ 14 */
diff --git a/fs/afs/super.c b/fs/afs/super.c
index 4b572b801d8d..7e3faeef6818 100644
--- a/fs/afs/super.c
+++ b/fs/afs/super.c
@@ -10,7 +10,7 @@
10 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 10 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
11 * 11 *
12 * Authors: David Howells <dhowells@redhat.com> 12 * Authors: David Howells <dhowells@redhat.com>
13 * David Woodhouse <dwmw2@redhat.com> 13 * David Woodhouse <dwmw2@infradead.org>
14 * 14 *
15 */ 15 */
16 16
diff --git a/fs/aio.c b/fs/aio.c
index b5253e77eb2f..0fb3117ddd93 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -591,10 +591,6 @@ static void use_mm(struct mm_struct *mm)
591 atomic_inc(&mm->mm_count); 591 atomic_inc(&mm->mm_count);
592 tsk->mm = mm; 592 tsk->mm = mm;
593 tsk->active_mm = mm; 593 tsk->active_mm = mm;
594 /*
595 * Note that on UML this *requires* PF_BORROWED_MM to be set, otherwise
596 * it won't work. Update it accordingly if you change it here
597 */
598 switch_mm(active_mm, mm, tsk); 594 switch_mm(active_mm, mm, tsk);
599 task_unlock(tsk); 595 task_unlock(tsk);
600 596
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 0fa95b198e6e..d48ff5f370f4 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -16,7 +16,6 @@
16#include <linux/time.h> 16#include <linux/time.h>
17#include <linux/mm.h> 17#include <linux/mm.h>
18#include <linux/mman.h> 18#include <linux/mman.h>
19#include <linux/a.out.h>
20#include <linux/errno.h> 19#include <linux/errno.h>
21#include <linux/signal.h> 20#include <linux/signal.h>
22#include <linux/binfmts.h> 21#include <linux/binfmts.h>
@@ -548,7 +547,6 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
548 struct { 547 struct {
549 struct elfhdr elf_ex; 548 struct elfhdr elf_ex;
550 struct elfhdr interp_elf_ex; 549 struct elfhdr interp_elf_ex;
551 struct exec interp_ex;
552 } *loc; 550 } *loc;
553 551
554 loc = kmalloc(sizeof(*loc), GFP_KERNEL); 552 loc = kmalloc(sizeof(*loc), GFP_KERNEL);
@@ -680,7 +678,6 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
680 } 678 }
681 679
682 /* Get the exec headers */ 680 /* Get the exec headers */
683 loc->interp_ex = *((struct exec *)bprm->buf);
684 loc->interp_elf_ex = *((struct elfhdr *)bprm->buf); 681 loc->interp_elf_ex = *((struct elfhdr *)bprm->buf);
685 break; 682 break;
686 } 683 }
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
index ddd35d873391..d051a32e6270 100644
--- a/fs/binfmt_elf_fdpic.c
+++ b/fs/binfmt_elf_fdpic.c
@@ -390,7 +390,7 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm,
390 } 390 }
391 391
392 /* expand the stack mapping to use up the entire allocation granule */ 392 /* expand the stack mapping to use up the entire allocation granule */
393 fullsize = ksize((char *) current->mm->start_brk); 393 fullsize = kobjsize((char *) current->mm->start_brk);
394 if (!IS_ERR_VALUE(do_mremap(current->mm->start_brk, stack_size, 394 if (!IS_ERR_VALUE(do_mremap(current->mm->start_brk, stack_size,
395 fullsize, 0, 0))) 395 fullsize, 0, 0)))
396 stack_size = fullsize; 396 stack_size = fullsize;
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
index 3b40d45a3a16..2cb1acda3a82 100644
--- a/fs/binfmt_flat.c
+++ b/fs/binfmt_flat.c
@@ -548,7 +548,7 @@ static int load_flat_file(struct linux_binprm * bprm,
548 PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, 0); 548 PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, 0);
549 /* Remap to use all availabe slack region space */ 549 /* Remap to use all availabe slack region space */
550 if (realdatastart && (realdatastart < (unsigned long)-4096)) { 550 if (realdatastart && (realdatastart < (unsigned long)-4096)) {
551 reallen = ksize((void *)realdatastart); 551 reallen = kobjsize((void *)realdatastart);
552 if (reallen > len) { 552 if (reallen > len) {
553 realdatastart = do_mremap(realdatastart, len, 553 realdatastart = do_mremap(realdatastart, len,
554 reallen, MREMAP_FIXED, realdatastart); 554 reallen, MREMAP_FIXED, realdatastart);
@@ -600,7 +600,7 @@ static int load_flat_file(struct linux_binprm * bprm,
600 PROT_READ | PROT_EXEC | PROT_WRITE, MAP_PRIVATE, 0); 600 PROT_READ | PROT_EXEC | PROT_WRITE, MAP_PRIVATE, 0);
601 /* Remap to use all availabe slack region space */ 601 /* Remap to use all availabe slack region space */
602 if (textpos && (textpos < (unsigned long) -4096)) { 602 if (textpos && (textpos < (unsigned long) -4096)) {
603 reallen = ksize((void *)textpos); 603 reallen = kobjsize((void *)textpos);
604 if (reallen > len) { 604 if (reallen > len) {
605 textpos = do_mremap(textpos, len, reallen, 605 textpos = do_mremap(textpos, len, reallen,
606 MREMAP_FIXED, textpos); 606 MREMAP_FIXED, textpos);
@@ -683,7 +683,7 @@ static int load_flat_file(struct linux_binprm * bprm,
683 */ 683 */
684 current->mm->start_brk = datapos + data_len + bss_len; 684 current->mm->start_brk = datapos + data_len + bss_len;
685 current->mm->brk = (current->mm->start_brk + 3) & ~3; 685 current->mm->brk = (current->mm->start_brk + 3) & ~3;
686 current->mm->context.end_brk = memp + ksize((void *) memp) - stack_len; 686 current->mm->context.end_brk = memp + kobjsize((void *) memp) - stack_len;
687 } 687 }
688 688
689 if (flags & FLAT_FLAG_KTRACE) 689 if (flags & FLAT_FLAG_KTRACE)
@@ -790,7 +790,7 @@ static int load_flat_file(struct linux_binprm * bprm,
790 790
791 /* zero the BSS, BRK and stack areas */ 791 /* zero the BSS, BRK and stack areas */
792 memset((void*)(datapos + data_len), 0, bss_len + 792 memset((void*)(datapos + data_len), 0, bss_len +
793 (memp + ksize((void *) memp) - stack_len - /* end brk */ 793 (memp + kobjsize((void *) memp) - stack_len - /* end brk */
794 libinfo->lib_list[id].start_brk) + /* start brk */ 794 libinfo->lib_list[id].start_brk) + /* start brk */
795 stack_len); 795 stack_len);
796 796
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 7d822fae7765..10d8a0aa871a 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -12,6 +12,7 @@
12#include <linux/kmod.h> 12#include <linux/kmod.h>
13#include <linux/major.h> 13#include <linux/major.h>
14#include <linux/smp_lock.h> 14#include <linux/smp_lock.h>
15#include <linux/device_cgroup.h>
15#include <linux/highmem.h> 16#include <linux/highmem.h>
16#include <linux/blkdev.h> 17#include <linux/blkdev.h>
17#include <linux/module.h> 18#include <linux/module.h>
@@ -928,9 +929,22 @@ static int do_open(struct block_device *bdev, struct file *file, int for_part)
928{ 929{
929 struct module *owner = NULL; 930 struct module *owner = NULL;
930 struct gendisk *disk; 931 struct gendisk *disk;
931 int ret = -ENXIO; 932 int ret;
932 int part; 933 int part;
934 int perm = 0;
935
936 if (file->f_mode & FMODE_READ)
937 perm |= MAY_READ;
938 if (file->f_mode & FMODE_WRITE)
939 perm |= MAY_WRITE;
940 /*
941 * hooks: /n/, see "layering violations".
942 */
943 ret = devcgroup_inode_permission(bdev->bd_inode, perm);
944 if (ret != 0)
945 return ret;
933 946
947 ret = -ENXIO;
934 file->f_mapping = bdev->bd_inode->i_mapping; 948 file->f_mapping = bdev->bd_inode->i_mapping;
935 lock_kernel(); 949 lock_kernel();
936 disk = get_gendisk(bdev->bd_dev, &part); 950 disk = get_gendisk(bdev->bd_dev, &part);
diff --git a/fs/buffer.c b/fs/buffer.c
index a073f3f4f013..0f51c0f7c266 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -821,7 +821,7 @@ static int fsync_buffers_list(spinlock_t *lock, struct list_head *list)
821 * contents - it is a noop if I/O is still in 821 * contents - it is a noop if I/O is still in
822 * flight on potentially older contents. 822 * flight on potentially older contents.
823 */ 823 */
824 ll_rw_block(SWRITE, 1, &bh); 824 ll_rw_block(SWRITE_SYNC, 1, &bh);
825 brelse(bh); 825 brelse(bh);
826 spin_lock(lock); 826 spin_lock(lock);
827 } 827 }
@@ -2940,16 +2940,19 @@ void ll_rw_block(int rw, int nr, struct buffer_head *bhs[])
2940 for (i = 0; i < nr; i++) { 2940 for (i = 0; i < nr; i++) {
2941 struct buffer_head *bh = bhs[i]; 2941 struct buffer_head *bh = bhs[i];
2942 2942
2943 if (rw == SWRITE) 2943 if (rw == SWRITE || rw == SWRITE_SYNC)
2944 lock_buffer(bh); 2944 lock_buffer(bh);
2945 else if (test_set_buffer_locked(bh)) 2945 else if (test_set_buffer_locked(bh))
2946 continue; 2946 continue;
2947 2947
2948 if (rw == WRITE || rw == SWRITE) { 2948 if (rw == WRITE || rw == SWRITE || rw == SWRITE_SYNC) {
2949 if (test_clear_buffer_dirty(bh)) { 2949 if (test_clear_buffer_dirty(bh)) {
2950 bh->b_end_io = end_buffer_write_sync; 2950 bh->b_end_io = end_buffer_write_sync;
2951 get_bh(bh); 2951 get_bh(bh);
2952 submit_bh(WRITE, bh); 2952 if (rw == SWRITE_SYNC)
2953 submit_bh(WRITE_SYNC, bh);
2954 else
2955 submit_bh(WRITE, bh);
2953 continue; 2956 continue;
2954 } 2957 }
2955 } else { 2958 } else {
@@ -2978,7 +2981,7 @@ int sync_dirty_buffer(struct buffer_head *bh)
2978 if (test_clear_buffer_dirty(bh)) { 2981 if (test_clear_buffer_dirty(bh)) {
2979 get_bh(bh); 2982 get_bh(bh);
2980 bh->b_end_io = end_buffer_write_sync; 2983 bh->b_end_io = end_buffer_write_sync;
2981 ret = submit_bh(WRITE, bh); 2984 ret = submit_bh(WRITE_SYNC, bh);
2982 wait_on_buffer(bh); 2985 wait_on_buffer(bh);
2983 if (buffer_eopnotsupp(bh)) { 2986 if (buffer_eopnotsupp(bh)) {
2984 clear_buffer_eopnotsupp(bh); 2987 clear_buffer_eopnotsupp(bh);
diff --git a/fs/cifs/AUTHORS b/fs/cifs/AUTHORS
index 8848e4dfa026..9c136d7803d9 100644
--- a/fs/cifs/AUTHORS
+++ b/fs/cifs/AUTHORS
@@ -36,6 +36,7 @@ Miklos Szeredi
36Kazeon team for various fixes especially for 2.4 version. 36Kazeon team for various fixes especially for 2.4 version.
37Asser Ferno (Change Notify support) 37Asser Ferno (Change Notify support)
38Shaggy (Dave Kleikamp) for inumerable small fs suggestions and some good cleanup 38Shaggy (Dave Kleikamp) for inumerable small fs suggestions and some good cleanup
39Igor Mammedov (DFS support)
39 40
40Test case and Bug Report contributors 41Test case and Bug Report contributors
41------------------------------------- 42-------------------------------------
diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES
index 8355e918fddf..1f3465201fdf 100644
--- a/fs/cifs/CHANGES
+++ b/fs/cifs/CHANGES
@@ -1,5 +1,12 @@
1Version 1.53 1Version 1.53
2------------ 2------------
3DFS support added (Microsoft Distributed File System client support needed
4for referrals which enable a hierarchical name space among servers).
5Disable temporary caching of mode bits to servers which do not support
6storing of mode (e.g. Windows servers, when client mounts without cifsacl
7mount option) and add new "dynperm" mount option to enable temporary caching
8of mode (enable old behavior). Fix hang on mount caused when server crashes
9tcp session during negotiate protocol.
3 10
4Version 1.52 11Version 1.52
5------------ 12------------
@@ -12,7 +19,8 @@ Add ability to modify cifs acls for handling chmod (when mounted with
12cifsacl flag). Fix prefixpath path separator so we can handle mounts 19cifsacl flag). Fix prefixpath path separator so we can handle mounts
13with prefixpaths longer than one directory (one path component) when 20with prefixpaths longer than one directory (one path component) when
14mounted to Windows servers. Fix slow file open when cifsacl 21mounted to Windows servers. Fix slow file open when cifsacl
15enabled. 22enabled. Fix memory leak in FindNext when the SMB call returns -EBADF.
23
16 24
17Version 1.51 25Version 1.51
18------------ 26------------
diff --git a/fs/cifs/README b/fs/cifs/README
index 621aa1a85971..2bd6fe556f88 100644
--- a/fs/cifs/README
+++ b/fs/cifs/README
@@ -483,6 +483,11 @@ A partial list of the supported mount options follows:
483 sign Must use packet signing (helps avoid unwanted data modification 483 sign Must use packet signing (helps avoid unwanted data modification
484 by intermediate systems in the route). Note that signing 484 by intermediate systems in the route). Note that signing
485 does not work with lanman or plaintext authentication. 485 does not work with lanman or plaintext authentication.
486 seal Must seal (encrypt) all data on this mounted share before
487 sending on the network. Requires support for Unix Extensions.
488 Note that this differs from the sign mount option in that it
489 causes encryption of data sent over this mounted share but other
490 shares mounted to the same server are unaffected.
486 sec Security mode. Allowed values are: 491 sec Security mode. Allowed values are:
487 none attempt to connection as a null user (no name) 492 none attempt to connection as a null user (no name)
488 krb5 Use Kerberos version 5 authentication 493 krb5 Use Kerberos version 5 authentication
diff --git a/fs/cifs/TODO b/fs/cifs/TODO
index 92c9feac440f..5aff46c61e52 100644
--- a/fs/cifs/TODO
+++ b/fs/cifs/TODO
@@ -1,4 +1,4 @@
1Version 1.52 January 3, 2008 1Version 1.53 May 20, 2008
2 2
3A Partial List of Missing Features 3A Partial List of Missing Features
4================================== 4==================================
@@ -20,20 +20,21 @@ d) Cleanup now unneeded SessSetup code in
20fs/cifs/connect.c and add back in NTLMSSP code if any servers 20fs/cifs/connect.c and add back in NTLMSSP code if any servers
21need it 21need it
22 22
23e) ms-dfs and ms-dfs host name resolution cleanup 23e) fix NTLMv2 signing when two mounts with different users to same
24
25f) fix NTLMv2 signing when two mounts with different users to same
26server. 24server.
27 25
28g) Directory entry caching relies on a 1 second timer, rather than 26f) Directory entry caching relies on a 1 second timer, rather than
29using FindNotify or equivalent. - (started) 27using FindNotify or equivalent. - (started)
30 28
31h) quota support (needs minor kernel change since quota calls 29g) quota support (needs minor kernel change since quota calls
32to make it to network filesystems or deviceless filesystems) 30to make it to network filesystems or deviceless filesystems)
33 31
34i) investigate sync behavior (including syncpage) and check 32h) investigate sync behavior (including syncpage) and check
35for proper behavior of intr/nointr 33for proper behavior of intr/nointr
36 34
35i) improve support for very old servers (OS/2 and Win9x for example)
36Including support for changing the time remotely (utimes command).
37
37j) hook lower into the sockets api (as NFS/SunRPC does) to avoid the 38j) hook lower into the sockets api (as NFS/SunRPC does) to avoid the
38extra copy in/out of the socket buffers in some cases. 39extra copy in/out of the socket buffers in some cases.
39 40
diff --git a/fs/cifs/asn1.c b/fs/cifs/asn1.c
index cb52cbbe45ff..f58e41d3ba48 100644
--- a/fs/cifs/asn1.c
+++ b/fs/cifs/asn1.c
@@ -186,6 +186,11 @@ asn1_length_decode(struct asn1_ctx *ctx, unsigned int *def, unsigned int *len)
186 } 186 }
187 } 187 }
188 } 188 }
189
190 /* don't trust len bigger than ctx buffer */
191 if (*len > ctx->end - ctx->pointer)
192 return 0;
193
189 return 1; 194 return 1;
190} 195}
191 196
@@ -203,6 +208,10 @@ asn1_header_decode(struct asn1_ctx *ctx,
203 if (!asn1_length_decode(ctx, &def, &len)) 208 if (!asn1_length_decode(ctx, &def, &len))
204 return 0; 209 return 0;
205 210
211 /* primitive shall be definite, indefinite shall be constructed */
212 if (*con == ASN1_PRI && !def)
213 return 0;
214
206 if (def) 215 if (def)
207 *eoc = ctx->pointer + len; 216 *eoc = ctx->pointer + len;
208 else 217 else
@@ -389,6 +398,11 @@ asn1_oid_decode(struct asn1_ctx *ctx,
389 unsigned long *optr; 398 unsigned long *optr;
390 399
391 size = eoc - ctx->pointer + 1; 400 size = eoc - ctx->pointer + 1;
401
402 /* first subid actually encodes first two subids */
403 if (size < 2 || size > ULONG_MAX/sizeof(unsigned long))
404 return 0;
405
392 *oid = kmalloc(size * sizeof(unsigned long), GFP_ATOMIC); 406 *oid = kmalloc(size * sizeof(unsigned long), GFP_ATOMIC);
393 if (*oid == NULL) 407 if (*oid == NULL)
394 return 0; 408 return 0;
diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/cifs/cifs_dfs_ref.c
index f6fdecf6598c..d82374c9e329 100644
--- a/fs/cifs/cifs_dfs_ref.c
+++ b/fs/cifs/cifs_dfs_ref.c
@@ -219,53 +219,6 @@ static struct vfsmount *cifs_dfs_do_refmount(const struct vfsmount *mnt_parent,
219 219
220} 220}
221 221
222static char *build_full_dfs_path_from_dentry(struct dentry *dentry)
223{
224 char *full_path = NULL;
225 char *search_path;
226 char *tmp_path;
227 size_t l_max_len;
228 struct cifs_sb_info *cifs_sb;
229
230 if (dentry->d_inode == NULL)
231 return NULL;
232
233 cifs_sb = CIFS_SB(dentry->d_inode->i_sb);
234
235 if (cifs_sb->tcon == NULL)
236 return NULL;
237
238 search_path = build_path_from_dentry(dentry);
239 if (search_path == NULL)
240 return NULL;
241
242 if (cifs_sb->tcon->Flags & SMB_SHARE_IS_IN_DFS) {
243 int i;
244 /* we should use full path name for correct working with DFS */
245 l_max_len = strnlen(cifs_sb->tcon->treeName, MAX_TREE_SIZE+1) +
246 strnlen(search_path, MAX_PATHCONF) + 1;
247 tmp_path = kmalloc(l_max_len, GFP_KERNEL);
248 if (tmp_path == NULL) {
249 kfree(search_path);
250 return NULL;
251 }
252 strncpy(tmp_path, cifs_sb->tcon->treeName, l_max_len);
253 tmp_path[l_max_len-1] = 0;
254 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS)
255 for (i = 0; i < l_max_len; i++) {
256 if (tmp_path[i] == '\\')
257 tmp_path[i] = '/';
258 }
259 strncat(tmp_path, search_path, l_max_len - strlen(tmp_path));
260
261 full_path = tmp_path;
262 kfree(search_path);
263 } else {
264 full_path = search_path;
265 }
266 return full_path;
267}
268
269static int add_mount_helper(struct vfsmount *newmnt, struct nameidata *nd, 222static int add_mount_helper(struct vfsmount *newmnt, struct nameidata *nd,
270 struct list_head *mntlist) 223 struct list_head *mntlist)
271{ 224{
@@ -333,7 +286,7 @@ cifs_dfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd)
333 goto out_err; 286 goto out_err;
334 } 287 }
335 288
336 full_path = build_full_dfs_path_from_dentry(dentry); 289 full_path = build_path_from_dentry(dentry);
337 if (full_path == NULL) { 290 if (full_path == NULL) {
338 rc = -ENOMEM; 291 rc = -ENOMEM;
339 goto out_err; 292 goto out_err;
diff --git a/fs/cifs/cifs_fs_sb.h b/fs/cifs/cifs_fs_sb.h
index 8ad2330ba061..877c85409f1f 100644
--- a/fs/cifs/cifs_fs_sb.h
+++ b/fs/cifs/cifs_fs_sb.h
@@ -30,6 +30,7 @@
30#define CIFS_MOUNT_CIFS_ACL 0x200 /* send ACL requests to non-POSIX srv */ 30#define CIFS_MOUNT_CIFS_ACL 0x200 /* send ACL requests to non-POSIX srv */
31#define CIFS_MOUNT_OVERR_UID 0x400 /* override uid returned from server */ 31#define CIFS_MOUNT_OVERR_UID 0x400 /* override uid returned from server */
32#define CIFS_MOUNT_OVERR_GID 0x800 /* override gid returned from server */ 32#define CIFS_MOUNT_OVERR_GID 0x800 /* override gid returned from server */
33#define CIFS_MOUNT_DYNPERM 0x1000 /* allow in-memory only mode setting */
33 34
34struct cifs_sb_info { 35struct cifs_sb_info {
35 struct cifsTconInfo *tcon; /* primary mount */ 36 struct cifsTconInfo *tcon; /* primary mount */
diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c
index 6653e29637a7..7013aaff6aed 100644
--- a/fs/cifs/cifs_spnego.c
+++ b/fs/cifs/cifs_spnego.c
@@ -119,6 +119,9 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo)
119 dp = description + strlen(description); 119 dp = description + strlen(description);
120 sprintf(dp, ";uid=0x%x", sesInfo->linux_uid); 120 sprintf(dp, ";uid=0x%x", sesInfo->linux_uid);
121 121
122 dp = description + strlen(description);
123 sprintf(dp, ";user=%s", sesInfo->userName);
124
122 cFYI(1, ("key description = %s", description)); 125 cFYI(1, ("key description = %s", description));
123 spnego_key = request_key(&cifs_spnego_key_type, description, ""); 126 spnego_key = request_key(&cifs_spnego_key_type, description, "");
124 127
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 427a7c695896..86b4d5f405ae 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * fs/cifs/cifsfs.c 2 * fs/cifs/cifsfs.c
3 * 3 *
4 * Copyright (C) International Business Machines Corp., 2002,2007 4 * Copyright (C) International Business Machines Corp., 2002,2008
5 * Author(s): Steve French (sfrench@us.ibm.com) 5 * Author(s): Steve French (sfrench@us.ibm.com)
6 * 6 *
7 * Common Internet FileSystem (CIFS) client 7 * Common Internet FileSystem (CIFS) client
@@ -97,9 +97,6 @@ cifs_read_super(struct super_block *sb, void *data,
97{ 97{
98 struct inode *inode; 98 struct inode *inode;
99 struct cifs_sb_info *cifs_sb; 99 struct cifs_sb_info *cifs_sb;
100#ifdef CONFIG_CIFS_DFS_UPCALL
101 int len;
102#endif
103 int rc = 0; 100 int rc = 0;
104 101
105 /* BB should we make this contingent on mount parm? */ 102 /* BB should we make this contingent on mount parm? */
@@ -117,15 +114,17 @@ cifs_read_super(struct super_block *sb, void *data,
117 * complex operation (mount), and in case of fail 114 * complex operation (mount), and in case of fail
118 * just exit instead of doing mount and attempting 115 * just exit instead of doing mount and attempting
119 * undo it if this copy fails?*/ 116 * undo it if this copy fails?*/
120 len = strlen(data); 117 if (data) {
121 cifs_sb->mountdata = kzalloc(len + 1, GFP_KERNEL); 118 int len = strlen(data);
122 if (cifs_sb->mountdata == NULL) { 119 cifs_sb->mountdata = kzalloc(len + 1, GFP_KERNEL);
123 kfree(sb->s_fs_info); 120 if (cifs_sb->mountdata == NULL) {
124 sb->s_fs_info = NULL; 121 kfree(sb->s_fs_info);
125 return -ENOMEM; 122 sb->s_fs_info = NULL;
123 return -ENOMEM;
124 }
125 strncpy(cifs_sb->mountdata, data, len + 1);
126 cifs_sb->mountdata[len] = '\0';
126 } 127 }
127 strncpy(cifs_sb->mountdata, data, len + 1);
128 cifs_sb->mountdata[len] = '\0';
129#endif 128#endif
130 129
131 rc = cifs_mount(sb, cifs_sb, data, devname); 130 rc = cifs_mount(sb, cifs_sb, data, devname);
@@ -353,9 +352,41 @@ cifs_show_options(struct seq_file *s, struct vfsmount *m)
353 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_GID) || 352 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_GID) ||
354 !(cifs_sb->tcon->unix_ext)) 353 !(cifs_sb->tcon->unix_ext))
355 seq_printf(s, ",gid=%d", cifs_sb->mnt_gid); 354 seq_printf(s, ",gid=%d", cifs_sb->mnt_gid);
355 if (!cifs_sb->tcon->unix_ext) {
356 seq_printf(s, ",file_mode=0%o,dir_mode=0%o",
357 cifs_sb->mnt_file_mode,
358 cifs_sb->mnt_dir_mode);
359 }
360 if (cifs_sb->tcon->seal)
361 seq_printf(s, ",seal");
362 if (cifs_sb->tcon->nocase)
363 seq_printf(s, ",nocase");
364 if (cifs_sb->tcon->retry)
365 seq_printf(s, ",hard");
356 } 366 }
357 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) 367 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS)
358 seq_printf(s, ",posixpaths"); 368 seq_printf(s, ",posixpaths");
369 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID)
370 seq_printf(s, ",setuids");
371 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM)
372 seq_printf(s, ",serverino");
373 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO)
374 seq_printf(s, ",directio");
375 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
376 seq_printf(s, ",nouser_xattr");
377 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR)
378 seq_printf(s, ",mapchars");
379 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL)
380 seq_printf(s, ",sfu");
381 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_BRL)
382 seq_printf(s, ",nobrl");
383 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL)
384 seq_printf(s, ",cifsacl");
385 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DYNPERM)
386 seq_printf(s, ",dynperm");
387 if (m->mnt_sb->s_flags & MS_POSIXACL)
388 seq_printf(s, ",acl");
389
359 seq_printf(s, ",rsize=%d", cifs_sb->rsize); 390 seq_printf(s, ",rsize=%d", cifs_sb->rsize);
360 seq_printf(s, ",wsize=%d", cifs_sb->wsize); 391 seq_printf(s, ",wsize=%d", cifs_sb->wsize);
361 } 392 }
@@ -657,7 +688,7 @@ const struct file_operations cifs_file_ops = {
657 .splice_read = generic_file_splice_read, 688 .splice_read = generic_file_splice_read,
658 .llseek = cifs_llseek, 689 .llseek = cifs_llseek,
659#ifdef CONFIG_CIFS_POSIX 690#ifdef CONFIG_CIFS_POSIX
660 .ioctl = cifs_ioctl, 691 .unlocked_ioctl = cifs_ioctl,
661#endif /* CONFIG_CIFS_POSIX */ 692#endif /* CONFIG_CIFS_POSIX */
662 693
663#ifdef CONFIG_CIFS_EXPERIMENTAL 694#ifdef CONFIG_CIFS_EXPERIMENTAL
@@ -677,7 +708,7 @@ const struct file_operations cifs_file_direct_ops = {
677 .flush = cifs_flush, 708 .flush = cifs_flush,
678 .splice_read = generic_file_splice_read, 709 .splice_read = generic_file_splice_read,
679#ifdef CONFIG_CIFS_POSIX 710#ifdef CONFIG_CIFS_POSIX
680 .ioctl = cifs_ioctl, 711 .unlocked_ioctl = cifs_ioctl,
681#endif /* CONFIG_CIFS_POSIX */ 712#endif /* CONFIG_CIFS_POSIX */
682 .llseek = cifs_llseek, 713 .llseek = cifs_llseek,
683#ifdef CONFIG_CIFS_EXPERIMENTAL 714#ifdef CONFIG_CIFS_EXPERIMENTAL
@@ -697,7 +728,7 @@ const struct file_operations cifs_file_nobrl_ops = {
697 .splice_read = generic_file_splice_read, 728 .splice_read = generic_file_splice_read,
698 .llseek = cifs_llseek, 729 .llseek = cifs_llseek,
699#ifdef CONFIG_CIFS_POSIX 730#ifdef CONFIG_CIFS_POSIX
700 .ioctl = cifs_ioctl, 731 .unlocked_ioctl = cifs_ioctl,
701#endif /* CONFIG_CIFS_POSIX */ 732#endif /* CONFIG_CIFS_POSIX */
702 733
703#ifdef CONFIG_CIFS_EXPERIMENTAL 734#ifdef CONFIG_CIFS_EXPERIMENTAL
@@ -716,7 +747,7 @@ const struct file_operations cifs_file_direct_nobrl_ops = {
716 .flush = cifs_flush, 747 .flush = cifs_flush,
717 .splice_read = generic_file_splice_read, 748 .splice_read = generic_file_splice_read,
718#ifdef CONFIG_CIFS_POSIX 749#ifdef CONFIG_CIFS_POSIX
719 .ioctl = cifs_ioctl, 750 .unlocked_ioctl = cifs_ioctl,
720#endif /* CONFIG_CIFS_POSIX */ 751#endif /* CONFIG_CIFS_POSIX */
721 .llseek = cifs_llseek, 752 .llseek = cifs_llseek,
722#ifdef CONFIG_CIFS_EXPERIMENTAL 753#ifdef CONFIG_CIFS_EXPERIMENTAL
@@ -731,7 +762,7 @@ const struct file_operations cifs_dir_ops = {
731#ifdef CONFIG_CIFS_EXPERIMENTAL 762#ifdef CONFIG_CIFS_EXPERIMENTAL
732 .dir_notify = cifs_dir_notify, 763 .dir_notify = cifs_dir_notify,
733#endif /* CONFIG_CIFS_EXPERIMENTAL */ 764#endif /* CONFIG_CIFS_EXPERIMENTAL */
734 .ioctl = cifs_ioctl, 765 .unlocked_ioctl = cifs_ioctl,
735}; 766};
736 767
737static void 768static void
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h
index cd1301a09b3b..25a6cbd15529 100644
--- a/fs/cifs/cifsfs.h
+++ b/fs/cifs/cifsfs.h
@@ -95,8 +95,7 @@ extern int cifs_setxattr(struct dentry *, const char *, const void *,
95 size_t, int); 95 size_t, int);
96extern ssize_t cifs_getxattr(struct dentry *, const char *, void *, size_t); 96extern ssize_t cifs_getxattr(struct dentry *, const char *, void *, size_t);
97extern ssize_t cifs_listxattr(struct dentry *, char *, size_t); 97extern ssize_t cifs_listxattr(struct dentry *, char *, size_t);
98extern int cifs_ioctl(struct inode *inode, struct file *filep, 98extern long cifs_ioctl(struct file *filep, unsigned int cmd, unsigned long arg);
99 unsigned int command, unsigned long arg);
100 99
101#ifdef CONFIG_CIFS_EXPERIMENTAL 100#ifdef CONFIG_CIFS_EXPERIMENTAL
102extern const struct export_operations cifs_export_ops; 101extern const struct export_operations cifs_export_ops;
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index b7d9f698e63e..9cfcf326ead3 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -281,6 +281,7 @@ struct cifsTconInfo {
281 bool ipc:1; /* set if connection to IPC$ eg for RPC/PIPES */ 281 bool ipc:1; /* set if connection to IPC$ eg for RPC/PIPES */
282 bool retry:1; 282 bool retry:1;
283 bool nocase:1; 283 bool nocase:1;
284 bool seal:1; /* transport encryption for this mounted share */
284 bool unix_ext:1; /* if false disable Linux extensions to CIFS protocol 285 bool unix_ext:1; /* if false disable Linux extensions to CIFS protocol
285 for this mount even if server would support */ 286 for this mount even if server would support */
286 /* BB add field for back pointer to sb struct(s)? */ 287 /* BB add field for back pointer to sb struct(s)? */
@@ -332,7 +333,6 @@ struct cifsFileInfo {
332 bool messageMode:1; /* for pipes: message vs byte mode */ 333 bool messageMode:1; /* for pipes: message vs byte mode */
333 atomic_t wrtPending; /* handle in use - defer close */ 334 atomic_t wrtPending; /* handle in use - defer close */
334 struct semaphore fh_sem; /* prevents reopen race after dead ses*/ 335 struct semaphore fh_sem; /* prevents reopen race after dead ses*/
335 char *search_resume_name; /* BB removeme BB */
336 struct cifs_search_info srch_inf; 336 struct cifs_search_info srch_inf;
337}; 337};
338 338
@@ -625,7 +625,7 @@ GLOBAL_EXTERN atomic_t tcpSesAllocCount;
625GLOBAL_EXTERN atomic_t tcpSesReconnectCount; 625GLOBAL_EXTERN atomic_t tcpSesReconnectCount;
626GLOBAL_EXTERN atomic_t tconInfoReconnectCount; 626GLOBAL_EXTERN atomic_t tconInfoReconnectCount;
627 627
628/* Various Debug counters to remove someday (BB) */ 628/* Various Debug counters */
629GLOBAL_EXTERN atomic_t bufAllocCount; /* current number allocated */ 629GLOBAL_EXTERN atomic_t bufAllocCount; /* current number allocated */
630#ifdef CONFIG_CIFS_STATS2 630#ifdef CONFIG_CIFS_STATS2
631GLOBAL_EXTERN atomic_t totBufAllocCount; /* total allocated over all time */ 631GLOBAL_EXTERN atomic_t totBufAllocCount; /* total allocated over all time */
diff --git a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h
index c43bf4b7a556..0f327c224da3 100644
--- a/fs/cifs/cifspdu.h
+++ b/fs/cifs/cifspdu.h
@@ -79,6 +79,19 @@
79#define TRANS2_GET_DFS_REFERRAL 0x10 79#define TRANS2_GET_DFS_REFERRAL 0x10
80#define TRANS2_REPORT_DFS_INCOSISTENCY 0x11 80#define TRANS2_REPORT_DFS_INCOSISTENCY 0x11
81 81
82/* SMB Transact (Named Pipe) subcommand codes */
83#define TRANS_SET_NMPIPE_STATE 0x0001
84#define TRANS_RAW_READ_NMPIPE 0x0011
85#define TRANS_QUERY_NMPIPE_STATE 0x0021
86#define TRANS_QUERY_NMPIPE_INFO 0x0022
87#define TRANS_PEEK_NMPIPE 0x0023
88#define TRANS_TRANSACT_NMPIPE 0x0026
89#define TRANS_RAW_WRITE_NMPIPE 0x0031
90#define TRANS_READ_NMPIPE 0x0036
91#define TRANS_WRITE_NMPIPE 0x0037
92#define TRANS_WAIT_NMPIPE 0x0053
93#define TRANS_CALL_NMPIPE 0x0054
94
82/* NT Transact subcommand codes */ 95/* NT Transact subcommand codes */
83#define NT_TRANSACT_CREATE 0x01 96#define NT_TRANSACT_CREATE 0x01
84#define NT_TRANSACT_IOCTL 0x02 97#define NT_TRANSACT_IOCTL 0x02
@@ -328,12 +341,13 @@
328#define CREATE_COMPLETE_IF_OPLK 0x00000100 /* should be zero */ 341#define CREATE_COMPLETE_IF_OPLK 0x00000100 /* should be zero */
329#define CREATE_NO_EA_KNOWLEDGE 0x00000200 342#define CREATE_NO_EA_KNOWLEDGE 0x00000200
330#define CREATE_EIGHT_DOT_THREE 0x00000400 /* doc says this is obsolete 343#define CREATE_EIGHT_DOT_THREE 0x00000400 /* doc says this is obsolete
331 open for recovery flag - should 344 "open for recovery" flag - should
332 be zero */ 345 be zero in any case */
346#define CREATE_OPEN_FOR_RECOVERY 0x00000400
333#define CREATE_RANDOM_ACCESS 0x00000800 347#define CREATE_RANDOM_ACCESS 0x00000800
334#define CREATE_DELETE_ON_CLOSE 0x00001000 348#define CREATE_DELETE_ON_CLOSE 0x00001000
335#define CREATE_OPEN_BY_ID 0x00002000 349#define CREATE_OPEN_BY_ID 0x00002000
336#define CREATE_OPEN_BACKUP_INTN 0x00004000 350#define CREATE_OPEN_BACKUP_INTENT 0x00004000
337#define CREATE_NO_COMPRESSION 0x00008000 351#define CREATE_NO_COMPRESSION 0x00008000
338#define CREATE_RESERVE_OPFILTER 0x00100000 /* should be zero */ 352#define CREATE_RESERVE_OPFILTER 0x00100000 /* should be zero */
339#define OPEN_REPARSE_POINT 0x00200000 353#define OPEN_REPARSE_POINT 0x00200000
@@ -722,7 +736,6 @@ typedef struct smb_com_tconx_rsp_ext {
722#define SMB_CSC_CACHE_AUTO_REINT 0x0004 736#define SMB_CSC_CACHE_AUTO_REINT 0x0004
723#define SMB_CSC_CACHE_VDO 0x0008 737#define SMB_CSC_CACHE_VDO 0x0008
724#define SMB_CSC_NO_CACHING 0x000C 738#define SMB_CSC_NO_CACHING 0x000C
725
726#define SMB_UNIQUE_FILE_NAME 0x0010 739#define SMB_UNIQUE_FILE_NAME 0x0010
727#define SMB_EXTENDED_SIGNATURES 0x0020 740#define SMB_EXTENDED_SIGNATURES 0x0020
728 741
@@ -806,7 +819,7 @@ typedef struct smb_com_findclose_req {
806#define ICOUNT_MASK 0x00FF 819#define ICOUNT_MASK 0x00FF
807#define PIPE_READ_MODE 0x0100 820#define PIPE_READ_MODE 0x0100
808#define NAMED_PIPE_TYPE 0x0400 821#define NAMED_PIPE_TYPE 0x0400
809#define PIPE_END_POINT 0x0800 822#define PIPE_END_POINT 0x4000
810#define BLOCKING_NAMED_PIPE 0x8000 823#define BLOCKING_NAMED_PIPE 0x8000
811 824
812typedef struct smb_com_open_req { /* also handles create */ 825typedef struct smb_com_open_req { /* also handles create */
@@ -1904,19 +1917,26 @@ typedef struct smb_com_transaction2_get_dfs_refer_req {
1904 char RequestFileName[1]; 1917 char RequestFileName[1];
1905} __attribute__((packed)) TRANSACTION2_GET_DFS_REFER_REQ; 1918} __attribute__((packed)) TRANSACTION2_GET_DFS_REFER_REQ;
1906 1919
1920#define DFS_VERSION cpu_to_le16(0x0003)
1921
1922/* DFS server target type */
1923#define DFS_TYPE_LINK 0x0000 /* also for sysvol targets */
1924#define DFS_TYPE_ROOT 0x0001
1925
1926/* Referral Entry Flags */
1927#define DFS_NAME_LIST_REF 0x0200
1928
1907typedef struct dfs_referral_level_3 { 1929typedef struct dfs_referral_level_3 {
1908 __le16 VersionNumber; 1930 __le16 VersionNumber;
1909 __le16 ReferralSize; 1931 __le16 Size;
1910 __le16 ServerType; /* 0x0001 = CIFS server */ 1932 __le16 ServerType; /* 0x0001 = root targets; 0x0000 = link targets */
1911 __le16 ReferralFlags; /* or proximity - not clear which since it is 1933 __le16 ReferralEntryFlags; /* 0x0200 bit set only for domain
1912 always set to zero - SNIA spec says 0x01 1934 or DC referral responce */
1913 means strip off PathConsumed chars before 1935 __le32 TimeToLive;
1914 submitting RequestFileName to remote node */
1915 __le16 TimeToLive;
1916 __le16 Proximity;
1917 __le16 DfsPathOffset; 1936 __le16 DfsPathOffset;
1918 __le16 DfsAlternatePathOffset; 1937 __le16 DfsAlternatePathOffset;
1919 __le16 NetworkAddressOffset; 1938 __le16 NetworkAddressOffset; /* offset of the link target */
1939 __le16 ServiceSiteGuid;
1920} __attribute__((packed)) REFERRAL3; 1940} __attribute__((packed)) REFERRAL3;
1921 1941
1922typedef struct smb_com_transaction_get_dfs_refer_rsp { 1942typedef struct smb_com_transaction_get_dfs_refer_rsp {
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
index d481f6c5a2be..b9f5e935f821 100644
--- a/fs/cifs/cifsproto.h
+++ b/fs/cifs/cifsproto.h
@@ -93,7 +93,7 @@ extern struct timespec cnvrtDosUnixTm(__u16 date, __u16 time);
93 93
94extern int cifs_get_inode_info(struct inode **pinode, 94extern int cifs_get_inode_info(struct inode **pinode,
95 const unsigned char *search_path, 95 const unsigned char *search_path,
96 FILE_ALL_INFO * pfile_info, 96 FILE_ALL_INFO *pfile_info,
97 struct super_block *sb, int xid, const __u16 *pfid); 97 struct super_block *sb, int xid, const __u16 *pfid);
98extern int cifs_get_inode_info_unix(struct inode **pinode, 98extern int cifs_get_inode_info_unix(struct inode **pinode,
99 const unsigned char *search_path, 99 const unsigned char *search_path,
@@ -130,7 +130,7 @@ extern int CIFSFindClose(const int, struct cifsTconInfo *tcon,
130 130
131extern int CIFSSMBQPathInfo(const int xid, struct cifsTconInfo *tcon, 131extern int CIFSSMBQPathInfo(const int xid, struct cifsTconInfo *tcon,
132 const unsigned char *searchName, 132 const unsigned char *searchName,
133 FILE_ALL_INFO * findData, 133 FILE_ALL_INFO *findData,
134 int legacy /* whether to use old info level */, 134 int legacy /* whether to use old info level */,
135 const struct nls_table *nls_codepage, int remap); 135 const struct nls_table *nls_codepage, int remap);
136extern int SMBQueryInformation(const int xid, struct cifsTconInfo *tcon, 136extern int SMBQueryInformation(const int xid, struct cifsTconInfo *tcon,
@@ -141,18 +141,15 @@ extern int SMBQueryInformation(const int xid, struct cifsTconInfo *tcon,
141extern int CIFSSMBUnixQPathInfo(const int xid, 141extern int CIFSSMBUnixQPathInfo(const int xid,
142 struct cifsTconInfo *tcon, 142 struct cifsTconInfo *tcon,
143 const unsigned char *searchName, 143 const unsigned char *searchName,
144 FILE_UNIX_BASIC_INFO * pFindData, 144 FILE_UNIX_BASIC_INFO *pFindData,
145 const struct nls_table *nls_codepage, int remap); 145 const struct nls_table *nls_codepage, int remap);
146 146
147extern int CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses, 147extern int CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses,
148 const unsigned char *searchName, 148 const unsigned char *searchName,
149 unsigned char **targetUNCs, 149 struct dfs_info3_param **target_nodes,
150 unsigned int *number_of_UNC_in_array, 150 unsigned int *number_of_nodes_in_array,
151 const struct nls_table *nls_codepage, int remap); 151 const struct nls_table *nls_codepage, int remap);
152 152
153extern int connect_to_dfs_path(int xid, struct cifsSesInfo *pSesInfo,
154 const char *old_path,
155 const struct nls_table *nls_codepage, int remap);
156extern int get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, 153extern int get_dfs_path(int xid, struct cifsSesInfo *pSesInfo,
157 const char *old_path, 154 const char *old_path,
158 const struct nls_table *nls_codepage, 155 const struct nls_table *nls_codepage,
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 95fbba4ea7d4..4511b708f0f3 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -81,6 +81,40 @@ static struct {
81#endif /* CONFIG_CIFS_WEAK_PW_HASH */ 81#endif /* CONFIG_CIFS_WEAK_PW_HASH */
82#endif /* CIFS_POSIX */ 82#endif /* CIFS_POSIX */
83 83
84/* Allocates buffer into dst and copies smb string from src to it.
85 * caller is responsible for freeing dst if function returned 0.
86 * returns:
87 * on success - 0
88 * on failure - errno
89 */
90static int
91cifs_strncpy_to_host(char **dst, const char *src, const int maxlen,
92 const bool is_unicode, const struct nls_table *nls_codepage)
93{
94 int plen;
95
96 if (is_unicode) {
97 plen = UniStrnlen((wchar_t *)src, maxlen);
98 *dst = kmalloc(plen + 2, GFP_KERNEL);
99 if (!*dst)
100 goto cifs_strncpy_to_host_ErrExit;
101 cifs_strfromUCS_le(*dst, (__le16 *)src, plen, nls_codepage);
102 } else {
103 plen = strnlen(src, maxlen);
104 *dst = kmalloc(plen + 2, GFP_KERNEL);
105 if (!*dst)
106 goto cifs_strncpy_to_host_ErrExit;
107 strncpy(*dst, src, plen);
108 }
109 (*dst)[plen] = 0;
110 (*dst)[plen+1] = 0; /* harmless for ASCII case, needed for Unicode */
111 return 0;
112
113cifs_strncpy_to_host_ErrExit:
114 cERROR(1, ("Failed to allocate buffer for string\n"));
115 return -ENOMEM;
116}
117
84 118
85/* Mark as invalid, all open files on tree connections since they 119/* Mark as invalid, all open files on tree connections since they
86 were closed when session to server was lost */ 120 were closed when session to server was lost */
@@ -1166,6 +1200,20 @@ static __u16 convert_disposition(int disposition)
1166 return ofun; 1200 return ofun;
1167} 1201}
1168 1202
1203static int
1204access_flags_to_smbopen_mode(const int access_flags)
1205{
1206 int masked_flags = access_flags & (GENERIC_READ | GENERIC_WRITE);
1207
1208 if (masked_flags == GENERIC_READ)
1209 return SMBOPEN_READ;
1210 else if (masked_flags == GENERIC_WRITE)
1211 return SMBOPEN_WRITE;
1212
1213 /* just go for read/write */
1214 return SMBOPEN_READWRITE;
1215}
1216
1169int 1217int
1170SMBLegacyOpen(const int xid, struct cifsTconInfo *tcon, 1218SMBLegacyOpen(const int xid, struct cifsTconInfo *tcon,
1171 const char *fileName, const int openDisposition, 1219 const char *fileName, const int openDisposition,
@@ -1207,13 +1255,7 @@ OldOpenRetry:
1207 pSMB->OpenFlags = cpu_to_le16(REQ_BATCHOPLOCK); 1255 pSMB->OpenFlags = cpu_to_le16(REQ_BATCHOPLOCK);
1208 1256
1209 pSMB->OpenFlags |= cpu_to_le16(REQ_MORE_INFO); 1257 pSMB->OpenFlags |= cpu_to_le16(REQ_MORE_INFO);
1210 /* BB fixme add conversion for access_flags to bits 0 - 2 of mode */ 1258 pSMB->Mode = cpu_to_le16(access_flags_to_smbopen_mode(access_flags));
1211 /* 0 = read
1212 1 = write
1213 2 = rw
1214 3 = execute
1215 */
1216 pSMB->Mode = cpu_to_le16(2);
1217 pSMB->Mode |= cpu_to_le16(0x40); /* deny none */ 1259 pSMB->Mode |= cpu_to_le16(0x40); /* deny none */
1218 /* set file as system file if special file such 1260 /* set file as system file if special file such
1219 as fifo and server expecting SFU style and 1261 as fifo and server expecting SFU style and
@@ -1247,7 +1289,7 @@ OldOpenRetry:
1247 } else { 1289 } else {
1248 /* BB verify if wct == 15 */ 1290 /* BB verify if wct == 15 */
1249 1291
1250/* *pOplock = pSMBr->OplockLevel; */ /* BB take from action field BB */ 1292/* *pOplock = pSMBr->OplockLevel; */ /* BB take from action field*/
1251 1293
1252 *netfid = pSMBr->Fid; /* cifs fid stays in le */ 1294 *netfid = pSMBr->Fid; /* cifs fid stays in le */
1253 /* Let caller know file was created so we can set the mode. */ 1295 /* Let caller know file was created so we can set the mode. */
@@ -1686,7 +1728,7 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon,
1686{ 1728{
1687 int rc = 0; 1729 int rc = 0;
1688 LOCK_REQ *pSMB = NULL; 1730 LOCK_REQ *pSMB = NULL;
1689 LOCK_RSP *pSMBr = NULL; 1731/* LOCK_RSP *pSMBr = NULL; */ /* No response data other than rc to parse */
1690 int bytes_returned; 1732 int bytes_returned;
1691 int timeout = 0; 1733 int timeout = 0;
1692 __u16 count; 1734 __u16 count;
@@ -1697,8 +1739,6 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon,
1697 if (rc) 1739 if (rc)
1698 return rc; 1740 return rc;
1699 1741
1700 pSMBr = (LOCK_RSP *)pSMB; /* BB removeme BB */
1701
1702 if (lockType == LOCKING_ANDX_OPLOCK_RELEASE) { 1742 if (lockType == LOCKING_ANDX_OPLOCK_RELEASE) {
1703 timeout = CIFS_ASYNC_OP; /* no response expected */ 1743 timeout = CIFS_ASYNC_OP; /* no response expected */
1704 pSMB->Timeout = 0; 1744 pSMB->Timeout = 0;
@@ -1732,7 +1772,7 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon,
1732 1772
1733 if (waitFlag) { 1773 if (waitFlag) {
1734 rc = SendReceiveBlockingLock(xid, tcon, (struct smb_hdr *) pSMB, 1774 rc = SendReceiveBlockingLock(xid, tcon, (struct smb_hdr *) pSMB,
1735 (struct smb_hdr *) pSMBr, &bytes_returned); 1775 (struct smb_hdr *) pSMB, &bytes_returned);
1736 cifs_small_buf_release(pSMB); 1776 cifs_small_buf_release(pSMB);
1737 } else { 1777 } else {
1738 rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *)pSMB, 1778 rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *)pSMB,
@@ -1767,7 +1807,7 @@ CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon,
1767 cFYI(1, ("Posix Lock")); 1807 cFYI(1, ("Posix Lock"));
1768 1808
1769 if (pLockData == NULL) 1809 if (pLockData == NULL)
1770 return EINVAL; 1810 return -EINVAL;
1771 1811
1772 rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB); 1812 rc = small_smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB);
1773 1813
@@ -1944,7 +1984,7 @@ renameRetry:
1944 /* protocol requires ASCII signature byte on Unicode string */ 1984 /* protocol requires ASCII signature byte on Unicode string */
1945 pSMB->OldFileName[name_len + 1] = 0x00; 1985 pSMB->OldFileName[name_len + 1] = 0x00;
1946 name_len2 = 1986 name_len2 =
1947 cifsConvertToUCS((__le16 *) &pSMB->OldFileName[name_len + 2], 1987 cifsConvertToUCS((__le16 *)&pSMB->OldFileName[name_len + 2],
1948 toName, PATH_MAX, nls_codepage, remap); 1988 toName, PATH_MAX, nls_codepage, remap);
1949 name_len2 += 1 /* trailing null */ + 1 /* Signature word */ ; 1989 name_len2 += 1 /* trailing null */ + 1 /* Signature word */ ;
1950 name_len2 *= 2; /* convert to bytes */ 1990 name_len2 *= 2; /* convert to bytes */
@@ -2117,8 +2157,7 @@ copyRetry:
2117 cFYI(1, ("Send error in copy = %d with %d files copied", 2157 cFYI(1, ("Send error in copy = %d with %d files copied",
2118 rc, le16_to_cpu(pSMBr->CopyCount))); 2158 rc, le16_to_cpu(pSMBr->CopyCount)));
2119 } 2159 }
2120 if (pSMB) 2160 cifs_buf_release(pSMB);
2121 cifs_buf_release(pSMB);
2122 2161
2123 if (rc == -EAGAIN) 2162 if (rc == -EAGAIN)
2124 goto copyRetry; 2163 goto copyRetry;
@@ -2207,8 +2246,7 @@ createSymLinkRetry:
2207 if (rc) 2246 if (rc)
2208 cFYI(1, ("Send error in SetPathInfo create symlink = %d", rc)); 2247 cFYI(1, ("Send error in SetPathInfo create symlink = %d", rc));
2209 2248
2210 if (pSMB) 2249 cifs_buf_release(pSMB);
2211 cifs_buf_release(pSMB);
2212 2250
2213 if (rc == -EAGAIN) 2251 if (rc == -EAGAIN)
2214 goto createSymLinkRetry; 2252 goto createSymLinkRetry;
@@ -2925,7 +2963,8 @@ setAclRetry:
2925 } 2963 }
2926 params = 6 + name_len; 2964 params = 6 + name_len;
2927 pSMB->MaxParameterCount = cpu_to_le16(2); 2965 pSMB->MaxParameterCount = cpu_to_le16(2);
2928 pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find max SMB size from sess */ 2966 /* BB find max SMB size from sess */
2967 pSMB->MaxDataCount = cpu_to_le16(1000);
2929 pSMB->MaxSetupCount = 0; 2968 pSMB->MaxSetupCount = 0;
2930 pSMB->Reserved = 0; 2969 pSMB->Reserved = 0;
2931 pSMB->Flags = 0; 2970 pSMB->Flags = 0;
@@ -3322,7 +3361,8 @@ QPathInfoRetry:
3322 params = 2 /* level */ + 4 /* reserved */ + name_len /* includes NUL */; 3361 params = 2 /* level */ + 4 /* reserved */ + name_len /* includes NUL */;
3323 pSMB->TotalDataCount = 0; 3362 pSMB->TotalDataCount = 0;
3324 pSMB->MaxParameterCount = cpu_to_le16(2); 3363 pSMB->MaxParameterCount = cpu_to_le16(2);
3325 pSMB->MaxDataCount = cpu_to_le16(4000); /* BB find exact max SMB PDU from sess structure BB */ 3364 /* BB find exact max SMB PDU from sess structure BB */
3365 pSMB->MaxDataCount = cpu_to_le16(4000);
3326 pSMB->MaxSetupCount = 0; 3366 pSMB->MaxSetupCount = 0;
3327 pSMB->Reserved = 0; 3367 pSMB->Reserved = 0;
3328 pSMB->Flags = 0; 3368 pSMB->Flags = 0;
@@ -3388,7 +3428,7 @@ QPathInfoRetry:
3388int 3428int
3389CIFSSMBUnixQPathInfo(const int xid, struct cifsTconInfo *tcon, 3429CIFSSMBUnixQPathInfo(const int xid, struct cifsTconInfo *tcon,
3390 const unsigned char *searchName, 3430 const unsigned char *searchName,
3391 FILE_UNIX_BASIC_INFO * pFindData, 3431 FILE_UNIX_BASIC_INFO *pFindData,
3392 const struct nls_table *nls_codepage, int remap) 3432 const struct nls_table *nls_codepage, int remap)
3393{ 3433{
3394/* SMB_QUERY_FILE_UNIX_BASIC */ 3434/* SMB_QUERY_FILE_UNIX_BASIC */
@@ -3679,6 +3719,7 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon,
3679 if (rc) { 3719 if (rc) {
3680 if (rc == -EBADF) { 3720 if (rc == -EBADF) {
3681 psrch_inf->endOfSearch = true; 3721 psrch_inf->endOfSearch = true;
3722 cifs_buf_release(pSMB);
3682 rc = 0; /* search probably was closed at end of search*/ 3723 rc = 0; /* search probably was closed at end of search*/
3683 } else 3724 } else
3684 cFYI(1, ("FindNext returned = %d", rc)); 3725 cFYI(1, ("FindNext returned = %d", rc));
@@ -3856,25 +3897,112 @@ GetInodeNumOut:
3856 return rc; 3897 return rc;
3857} 3898}
3858 3899
3900/* parses DFS refferal V3 structure
3901 * caller is responsible for freeing target_nodes
3902 * returns:
3903 * on success - 0
3904 * on failure - errno
3905 */
3906static int
3907parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
3908 unsigned int *num_of_nodes,
3909 struct dfs_info3_param **target_nodes,
3910 const struct nls_table *nls_codepage)
3911{
3912 int i, rc = 0;
3913 char *data_end;
3914 bool is_unicode;
3915 struct dfs_referral_level_3 *ref;
3916
3917 is_unicode = pSMBr->hdr.Flags2 & SMBFLG2_UNICODE;
3918 *num_of_nodes = le16_to_cpu(pSMBr->NumberOfReferrals);
3919
3920 if (*num_of_nodes < 1) {
3921 cERROR(1, ("num_referrals: must be at least > 0,"
3922 "but we get num_referrals = %d\n", *num_of_nodes));
3923 rc = -EINVAL;
3924 goto parse_DFS_referrals_exit;
3925 }
3926
3927 ref = (struct dfs_referral_level_3 *) &(pSMBr->referrals);
3928 if (ref->VersionNumber != cpu_to_le16(3)) {
3929 cERROR(1, ("Referrals of V%d version are not supported,"
3930 "should be V3", le16_to_cpu(ref->VersionNumber)));
3931 rc = -EINVAL;
3932 goto parse_DFS_referrals_exit;
3933 }
3934
3935 /* get the upper boundary of the resp buffer */
3936 data_end = (char *)(&(pSMBr->PathConsumed)) +
3937 le16_to_cpu(pSMBr->t2.DataCount);
3938
3939 cFYI(1, ("num_referrals: %d dfs flags: 0x%x ... \n",
3940 *num_of_nodes,
3941 le16_to_cpu(pSMBr->DFSFlags)));
3942
3943 *target_nodes = kzalloc(sizeof(struct dfs_info3_param) *
3944 *num_of_nodes, GFP_KERNEL);
3945 if (*target_nodes == NULL) {
3946 cERROR(1, ("Failed to allocate buffer for target_nodes\n"));
3947 rc = -ENOMEM;
3948 goto parse_DFS_referrals_exit;
3949 }
3950
3951 /* collect neccessary data from referrals */
3952 for (i = 0; i < *num_of_nodes; i++) {
3953 char *temp;
3954 int max_len;
3955 struct dfs_info3_param *node = (*target_nodes)+i;
3956
3957 node->flags = le16_to_cpu(pSMBr->DFSFlags);
3958 node->path_consumed = le16_to_cpu(pSMBr->PathConsumed);
3959 node->server_type = le16_to_cpu(ref->ServerType);
3960 node->ref_flag = le16_to_cpu(ref->ReferralEntryFlags);
3961
3962 /* copy DfsPath */
3963 temp = (char *)ref + le16_to_cpu(ref->DfsPathOffset);
3964 max_len = data_end - temp;
3965 rc = cifs_strncpy_to_host(&(node->path_name), temp,
3966 max_len, is_unicode, nls_codepage);
3967 if (rc)
3968 goto parse_DFS_referrals_exit;
3969
3970 /* copy link target UNC */
3971 temp = (char *)ref + le16_to_cpu(ref->NetworkAddressOffset);
3972 max_len = data_end - temp;
3973 rc = cifs_strncpy_to_host(&(node->node_name), temp,
3974 max_len, is_unicode, nls_codepage);
3975 if (rc)
3976 goto parse_DFS_referrals_exit;
3977
3978 ref += le16_to_cpu(ref->Size);
3979 }
3980
3981parse_DFS_referrals_exit:
3982 if (rc) {
3983 free_dfs_info_array(*target_nodes, *num_of_nodes);
3984 *target_nodes = NULL;
3985 *num_of_nodes = 0;
3986 }
3987 return rc;
3988}
3989
3859int 3990int
3860CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses, 3991CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses,
3861 const unsigned char *searchName, 3992 const unsigned char *searchName,
3862 unsigned char **targetUNCs, 3993 struct dfs_info3_param **target_nodes,
3863 unsigned int *number_of_UNC_in_array, 3994 unsigned int *num_of_nodes,
3864 const struct nls_table *nls_codepage, int remap) 3995 const struct nls_table *nls_codepage, int remap)
3865{ 3996{
3866/* TRANS2_GET_DFS_REFERRAL */ 3997/* TRANS2_GET_DFS_REFERRAL */
3867 TRANSACTION2_GET_DFS_REFER_REQ *pSMB = NULL; 3998 TRANSACTION2_GET_DFS_REFER_REQ *pSMB = NULL;
3868 TRANSACTION2_GET_DFS_REFER_RSP *pSMBr = NULL; 3999 TRANSACTION2_GET_DFS_REFER_RSP *pSMBr = NULL;
3869 struct dfs_referral_level_3 *referrals = NULL;
3870 int rc = 0; 4000 int rc = 0;
3871 int bytes_returned; 4001 int bytes_returned;
3872 int name_len; 4002 int name_len;
3873 unsigned int i;
3874 char *temp;
3875 __u16 params, byte_count; 4003 __u16 params, byte_count;
3876 *number_of_UNC_in_array = 0; 4004 *num_of_nodes = 0;
3877 *targetUNCs = NULL; 4005 *target_nodes = NULL;
3878 4006
3879 cFYI(1, ("In GetDFSRefer the path %s", searchName)); 4007 cFYI(1, ("In GetDFSRefer the path %s", searchName));
3880 if (ses == NULL) 4008 if (ses == NULL)
@@ -3921,7 +4049,8 @@ getDFSRetry:
3921 pSMB->DataCount = 0; 4049 pSMB->DataCount = 0;
3922 pSMB->DataOffset = 0; 4050 pSMB->DataOffset = 0;
3923 pSMB->MaxParameterCount = 0; 4051 pSMB->MaxParameterCount = 0;
3924 pSMB->MaxDataCount = cpu_to_le16(4000); /* BB find exact max SMB PDU from sess structure BB */ 4052 /* BB find exact max SMB PDU from sess structure BB */
4053 pSMB->MaxDataCount = cpu_to_le16(4000);
3925 pSMB->MaxSetupCount = 0; 4054 pSMB->MaxSetupCount = 0;
3926 pSMB->Reserved = 0; 4055 pSMB->Reserved = 0;
3927 pSMB->Flags = 0; 4056 pSMB->Flags = 0;
@@ -3943,103 +4072,26 @@ getDFSRetry:
3943 (struct smb_hdr *) pSMBr, &bytes_returned, 0); 4072 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
3944 if (rc) { 4073 if (rc) {
3945 cFYI(1, ("Send error in GetDFSRefer = %d", rc)); 4074 cFYI(1, ("Send error in GetDFSRefer = %d", rc));
3946 } else { /* decode response */ 4075 goto GetDFSRefExit;
3947/* BB Add logic to parse referrals here */ 4076 }
3948 rc = validate_t2((struct smb_t2_rsp *)pSMBr); 4077 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
3949 4078
3950 /* BB Also check if enough total bytes returned? */ 4079 /* BB Also check if enough total bytes returned? */
3951 if (rc || (pSMBr->ByteCount < 17)) 4080 if (rc || (pSMBr->ByteCount < 17)) {
3952 rc = -EIO; /* bad smb */ 4081 rc = -EIO; /* bad smb */
3953 else { 4082 goto GetDFSRefExit;
3954 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset); 4083 }
3955 __u16 data_count = le16_to_cpu(pSMBr->t2.DataCount);
3956 4084
3957 cFYI(1, 4085 cFYI(1, ("Decoding GetDFSRefer response BCC: %d Offset %d",
3958 ("Decoding GetDFSRefer response BCC: %d Offset %d", 4086 pSMBr->ByteCount,
3959 pSMBr->ByteCount, data_offset)); 4087 le16_to_cpu(pSMBr->t2.DataOffset)));
3960 referrals =
3961 (struct dfs_referral_level_3 *)
3962 (8 /* sizeof start of data block */ +
3963 data_offset +
3964 (char *) &pSMBr->hdr.Protocol);
3965 cFYI(1, ("num_referrals: %d dfs flags: 0x%x ... \n"
3966 "for referral one refer size: 0x%x srv "
3967 "type: 0x%x refer flags: 0x%x ttl: 0x%x",
3968 le16_to_cpu(pSMBr->NumberOfReferrals),
3969 le16_to_cpu(pSMBr->DFSFlags),
3970 le16_to_cpu(referrals->ReferralSize),
3971 le16_to_cpu(referrals->ServerType),
3972 le16_to_cpu(referrals->ReferralFlags),
3973 le16_to_cpu(referrals->TimeToLive)));
3974 /* BB This field is actually two bytes in from start of
3975 data block so we could do safety check that DataBlock
3976 begins at address of pSMBr->NumberOfReferrals */
3977 *number_of_UNC_in_array =
3978 le16_to_cpu(pSMBr->NumberOfReferrals);
3979
3980 /* BB Fix below so can return more than one referral */
3981 if (*number_of_UNC_in_array > 1)
3982 *number_of_UNC_in_array = 1;
3983
3984 /* get the length of the strings describing refs */
3985 name_len = 0;
3986 for (i = 0; i < *number_of_UNC_in_array; i++) {
3987 /* make sure that DfsPathOffset not past end */
3988 __u16 offset =
3989 le16_to_cpu(referrals->DfsPathOffset);
3990 if (offset > data_count) {
3991 /* if invalid referral, stop here and do
3992 not try to copy any more */
3993 *number_of_UNC_in_array = i;
3994 break;
3995 }
3996 temp = ((char *)referrals) + offset;
3997 4088
3998 if (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE) { 4089 /* parse returned result into more usable form */
3999 name_len += UniStrnlen((wchar_t *)temp, 4090 rc = parse_DFS_referrals(pSMBr, num_of_nodes,
4000 data_count); 4091 target_nodes, nls_codepage);
4001 } else {
4002 name_len += strnlen(temp, data_count);
4003 }
4004 referrals++;
4005 /* BB add check that referral pointer does
4006 not fall off end PDU */
4007 }
4008 /* BB add check for name_len bigger than bcc */
4009 *targetUNCs =
4010 kmalloc(name_len+1+(*number_of_UNC_in_array),
4011 GFP_KERNEL);
4012 if (*targetUNCs == NULL) {
4013 rc = -ENOMEM;
4014 goto GetDFSRefExit;
4015 }
4016 /* copy the ref strings */
4017 referrals = (struct dfs_referral_level_3 *)
4018 (8 /* sizeof data hdr */ + data_offset +
4019 (char *) &pSMBr->hdr.Protocol);
4020
4021 for (i = 0; i < *number_of_UNC_in_array; i++) {
4022 temp = ((char *)referrals) +
4023 le16_to_cpu(referrals->DfsPathOffset);
4024 if (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE) {
4025 cifs_strfromUCS_le(*targetUNCs,
4026 (__le16 *) temp,
4027 name_len,
4028 nls_codepage);
4029 } else {
4030 strncpy(*targetUNCs, temp, name_len);
4031 }
4032 /* BB update target_uncs pointers */
4033 referrals++;
4034 }
4035 temp = *targetUNCs;
4036 temp[name_len] = 0;
4037 }
4038 4092
4039 }
4040GetDFSRefExit: 4093GetDFSRefExit:
4041 if (pSMB) 4094 cifs_buf_release(pSMB);
4042 cifs_buf_release(pSMB);
4043 4095
4044 if (rc == -EAGAIN) 4096 if (rc == -EAGAIN)
4045 goto getDFSRetry; 4097 goto getDFSRetry;
@@ -4229,7 +4281,8 @@ QFSAttributeRetry:
4229 params = 2; /* level */ 4281 params = 2; /* level */
4230 pSMB->TotalDataCount = 0; 4282 pSMB->TotalDataCount = 0;
4231 pSMB->MaxParameterCount = cpu_to_le16(2); 4283 pSMB->MaxParameterCount = cpu_to_le16(2);
4232 pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find exact max SMB PDU from sess structure BB */ 4284 /* BB find exact max SMB PDU from sess structure BB */
4285 pSMB->MaxDataCount = cpu_to_le16(1000);
4233 pSMB->MaxSetupCount = 0; 4286 pSMB->MaxSetupCount = 0;
4234 pSMB->Reserved = 0; 4287 pSMB->Reserved = 0;
4235 pSMB->Flags = 0; 4288 pSMB->Flags = 0;
@@ -4298,7 +4351,8 @@ QFSDeviceRetry:
4298 params = 2; /* level */ 4351 params = 2; /* level */
4299 pSMB->TotalDataCount = 0; 4352 pSMB->TotalDataCount = 0;
4300 pSMB->MaxParameterCount = cpu_to_le16(2); 4353 pSMB->MaxParameterCount = cpu_to_le16(2);
4301 pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find exact max SMB PDU from sess structure BB */ 4354 /* BB find exact max SMB PDU from sess structure BB */
4355 pSMB->MaxDataCount = cpu_to_le16(1000);
4302 pSMB->MaxSetupCount = 0; 4356 pSMB->MaxSetupCount = 0;
4303 pSMB->Reserved = 0; 4357 pSMB->Reserved = 0;
4304 pSMB->Flags = 0; 4358 pSMB->Flags = 0;
@@ -4369,7 +4423,8 @@ QFSUnixRetry:
4369 pSMB->DataCount = 0; 4423 pSMB->DataCount = 0;
4370 pSMB->DataOffset = 0; 4424 pSMB->DataOffset = 0;
4371 pSMB->MaxParameterCount = cpu_to_le16(2); 4425 pSMB->MaxParameterCount = cpu_to_le16(2);
4372 pSMB->MaxDataCount = cpu_to_le16(100); /* BB find exact max SMB PDU from sess structure BB */ 4426 /* BB find exact max SMB PDU from sess structure BB */
4427 pSMB->MaxDataCount = cpu_to_le16(100);
4373 pSMB->MaxSetupCount = 0; 4428 pSMB->MaxSetupCount = 0;
4374 pSMB->Reserved = 0; 4429 pSMB->Reserved = 0;
4375 pSMB->Flags = 0; 4430 pSMB->Flags = 0;
@@ -4444,7 +4499,8 @@ SETFSUnixRetry:
4444 offset = param_offset + params; 4499 offset = param_offset + params;
4445 4500
4446 pSMB->MaxParameterCount = cpu_to_le16(4); 4501 pSMB->MaxParameterCount = cpu_to_le16(4);
4447 pSMB->MaxDataCount = cpu_to_le16(100); /* BB find exact max SMB PDU from sess structure BB */ 4502 /* BB find exact max SMB PDU from sess structure BB */
4503 pSMB->MaxDataCount = cpu_to_le16(100);
4448 pSMB->SetupCount = 1; 4504 pSMB->SetupCount = 1;
4449 pSMB->Reserved3 = 0; 4505 pSMB->Reserved3 = 0;
4450 pSMB->SubCommand = cpu_to_le16(TRANS2_SET_FS_INFORMATION); 4506 pSMB->SubCommand = cpu_to_le16(TRANS2_SET_FS_INFORMATION);
@@ -4512,7 +4568,8 @@ QFSPosixRetry:
4512 pSMB->DataCount = 0; 4568 pSMB->DataCount = 0;
4513 pSMB->DataOffset = 0; 4569 pSMB->DataOffset = 0;
4514 pSMB->MaxParameterCount = cpu_to_le16(2); 4570 pSMB->MaxParameterCount = cpu_to_le16(2);
4515 pSMB->MaxDataCount = cpu_to_le16(100); /* BB find exact max SMB PDU from sess structure BB */ 4571 /* BB find exact max SMB PDU from sess structure BB */
4572 pSMB->MaxDataCount = cpu_to_le16(100);
4516 pSMB->MaxSetupCount = 0; 4573 pSMB->MaxSetupCount = 0;
4517 pSMB->Reserved = 0; 4574 pSMB->Reserved = 0;
4518 pSMB->Flags = 0; 4575 pSMB->Flags = 0;
@@ -4702,7 +4759,8 @@ CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, __u64 size,
4702 4759
4703 count = sizeof(struct file_end_of_file_info); 4760 count = sizeof(struct file_end_of_file_info);
4704 pSMB->MaxParameterCount = cpu_to_le16(2); 4761 pSMB->MaxParameterCount = cpu_to_le16(2);
4705 pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find max SMB PDU from sess */ 4762 /* BB find exact max SMB PDU from sess structure BB */
4763 pSMB->MaxDataCount = cpu_to_le16(1000);
4706 pSMB->SetupCount = 1; 4764 pSMB->SetupCount = 1;
4707 pSMB->Reserved3 = 0; 4765 pSMB->Reserved3 = 0;
4708 pSMB->SubCommand = cpu_to_le16(TRANS2_SET_FILE_INFORMATION); 4766 pSMB->SubCommand = cpu_to_le16(TRANS2_SET_FILE_INFORMATION);
@@ -4789,7 +4847,8 @@ CIFSSMBSetFileTimes(const int xid, struct cifsTconInfo *tcon,
4789 4847
4790 count = sizeof(FILE_BASIC_INFO); 4848 count = sizeof(FILE_BASIC_INFO);
4791 pSMB->MaxParameterCount = cpu_to_le16(2); 4849 pSMB->MaxParameterCount = cpu_to_le16(2);
4792 pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find max SMB PDU from sess */ 4850 /* BB find max SMB PDU from sess */
4851 pSMB->MaxDataCount = cpu_to_le16(1000);
4793 pSMB->SetupCount = 1; 4852 pSMB->SetupCount = 1;
4794 pSMB->Reserved3 = 0; 4853 pSMB->Reserved3 = 0;
4795 pSMB->SubCommand = cpu_to_le16(TRANS2_SET_FILE_INFORMATION); 4854 pSMB->SubCommand = cpu_to_le16(TRANS2_SET_FILE_INFORMATION);
@@ -4856,7 +4915,8 @@ SetTimesRetry:
4856 params = 6 + name_len; 4915 params = 6 + name_len;
4857 count = sizeof(FILE_BASIC_INFO); 4916 count = sizeof(FILE_BASIC_INFO);
4858 pSMB->MaxParameterCount = cpu_to_le16(2); 4917 pSMB->MaxParameterCount = cpu_to_le16(2);
4859 pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find exact max SMB PDU from sess structure BB */ 4918 /* BB find max SMB PDU from sess structure BB */
4919 pSMB->MaxDataCount = cpu_to_le16(1000);
4860 pSMB->MaxSetupCount = 0; 4920 pSMB->MaxSetupCount = 0;
4861 pSMB->Reserved = 0; 4921 pSMB->Reserved = 0;
4862 pSMB->Flags = 0; 4922 pSMB->Flags = 0;
@@ -4986,7 +5046,8 @@ setPermsRetry:
4986 params = 6 + name_len; 5046 params = 6 + name_len;
4987 count = sizeof(FILE_UNIX_BASIC_INFO); 5047 count = sizeof(FILE_UNIX_BASIC_INFO);
4988 pSMB->MaxParameterCount = cpu_to_le16(2); 5048 pSMB->MaxParameterCount = cpu_to_le16(2);
4989 pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find exact max SMB PDU from sess structure BB */ 5049 /* BB find max SMB PDU from sess structure BB */
5050 pSMB->MaxDataCount = cpu_to_le16(1000);
4990 pSMB->MaxSetupCount = 0; 5051 pSMB->MaxSetupCount = 0;
4991 pSMB->Reserved = 0; 5052 pSMB->Reserved = 0;
4992 pSMB->Flags = 0; 5053 pSMB->Flags = 0;
@@ -5051,8 +5112,7 @@ setPermsRetry:
5051 if (rc) 5112 if (rc)
5052 cFYI(1, ("SetPathInfo (perms) returned %d", rc)); 5113 cFYI(1, ("SetPathInfo (perms) returned %d", rc));
5053 5114
5054 if (pSMB) 5115 cifs_buf_release(pSMB);
5055 cifs_buf_release(pSMB);
5056 if (rc == -EAGAIN) 5116 if (rc == -EAGAIN)
5057 goto setPermsRetry; 5117 goto setPermsRetry;
5058 return rc; 5118 return rc;
@@ -5169,7 +5229,8 @@ QAllEAsRetry:
5169 params = 2 /* level */ + 4 /* reserved */ + name_len /* includes NUL */; 5229 params = 2 /* level */ + 4 /* reserved */ + name_len /* includes NUL */;
5170 pSMB->TotalDataCount = 0; 5230 pSMB->TotalDataCount = 0;
5171 pSMB->MaxParameterCount = cpu_to_le16(2); 5231 pSMB->MaxParameterCount = cpu_to_le16(2);
5172 pSMB->MaxDataCount = cpu_to_le16(4000); /* BB find exact max SMB PDU from sess structure BB */ 5232 /* BB find exact max SMB PDU from sess structure BB */
5233 pSMB->MaxDataCount = cpu_to_le16(4000);
5173 pSMB->MaxSetupCount = 0; 5234 pSMB->MaxSetupCount = 0;
5174 pSMB->Reserved = 0; 5235 pSMB->Reserved = 0;
5175 pSMB->Flags = 0; 5236 pSMB->Flags = 0;
@@ -5273,8 +5334,7 @@ QAllEAsRetry:
5273 } 5334 }
5274 } 5335 }
5275 } 5336 }
5276 if (pSMB) 5337 cifs_buf_release(pSMB);
5277 cifs_buf_release(pSMB);
5278 if (rc == -EAGAIN) 5338 if (rc == -EAGAIN)
5279 goto QAllEAsRetry; 5339 goto QAllEAsRetry;
5280 5340
@@ -5317,7 +5377,8 @@ QEARetry:
5317 params = 2 /* level */ + 4 /* reserved */ + name_len /* includes NUL */; 5377 params = 2 /* level */ + 4 /* reserved */ + name_len /* includes NUL */;
5318 pSMB->TotalDataCount = 0; 5378 pSMB->TotalDataCount = 0;
5319 pSMB->MaxParameterCount = cpu_to_le16(2); 5379 pSMB->MaxParameterCount = cpu_to_le16(2);
5320 pSMB->MaxDataCount = cpu_to_le16(4000); /* BB find exact max SMB PDU from sess structure BB */ 5380 /* BB find exact max SMB PDU from sess structure BB */
5381 pSMB->MaxDataCount = cpu_to_le16(4000);
5321 pSMB->MaxSetupCount = 0; 5382 pSMB->MaxSetupCount = 0;
5322 pSMB->Reserved = 0; 5383 pSMB->Reserved = 0;
5323 pSMB->Flags = 0; 5384 pSMB->Flags = 0;
@@ -5422,8 +5483,7 @@ QEARetry:
5422 } 5483 }
5423 } 5484 }
5424 } 5485 }
5425 if (pSMB) 5486 cifs_buf_release(pSMB);
5426 cifs_buf_release(pSMB);
5427 if (rc == -EAGAIN) 5487 if (rc == -EAGAIN)
5428 goto QEARetry; 5488 goto QEARetry;
5429 5489
@@ -5475,7 +5535,8 @@ SetEARetry:
5475 5535
5476 count = sizeof(*parm_data) + ea_value_len + name_len; 5536 count = sizeof(*parm_data) + ea_value_len + name_len;
5477 pSMB->MaxParameterCount = cpu_to_le16(2); 5537 pSMB->MaxParameterCount = cpu_to_le16(2);
5478 pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find max SMB size from sess */ 5538 /* BB find max SMB PDU from sess */
5539 pSMB->MaxDataCount = cpu_to_le16(1000);
5479 pSMB->MaxSetupCount = 0; 5540 pSMB->MaxSetupCount = 0;
5480 pSMB->Reserved = 0; 5541 pSMB->Reserved = 0;
5481 pSMB->Flags = 0; 5542 pSMB->Flags = 0;
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index f428bf3bf1a9..e8fa46c7cff2 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -60,7 +60,7 @@ struct smb_vol {
60 char *domainname; 60 char *domainname;
61 char *UNC; 61 char *UNC;
62 char *UNCip; 62 char *UNCip;
63 char *in6_addr; /* ipv6 address as human readable form of in6_addr */ 63 char *in6_addr; /* ipv6 address as human readable form of in6_addr */
64 char *iocharset; /* local code page for mapping to and from Unicode */ 64 char *iocharset; /* local code page for mapping to and from Unicode */
65 char source_rfc1001_name[16]; /* netbios name of client */ 65 char source_rfc1001_name[16]; /* netbios name of client */
66 char target_rfc1001_name[16]; /* netbios name of server for Win9x/ME */ 66 char target_rfc1001_name[16]; /* netbios name of server for Win9x/ME */
@@ -75,19 +75,21 @@ struct smb_vol {
75 bool setuids:1; 75 bool setuids:1;
76 bool override_uid:1; 76 bool override_uid:1;
77 bool override_gid:1; 77 bool override_gid:1;
78 bool dynperm:1;
78 bool noperm:1; 79 bool noperm:1;
79 bool no_psx_acl:1; /* set if posix acl support should be disabled */ 80 bool no_psx_acl:1; /* set if posix acl support should be disabled */
80 bool cifs_acl:1; 81 bool cifs_acl:1;
81 bool no_xattr:1; /* set if xattr (EA) support should be disabled*/ 82 bool no_xattr:1; /* set if xattr (EA) support should be disabled*/
82 bool server_ino:1; /* use inode numbers from server ie UniqueId */ 83 bool server_ino:1; /* use inode numbers from server ie UniqueId */
83 bool direct_io:1; 84 bool direct_io:1;
84 bool remap:1; /* set to remap seven reserved chars in filenames */ 85 bool remap:1; /* set to remap seven reserved chars in filenames */
85 bool posix_paths:1; /* unset to not ask for posix pathnames. */ 86 bool posix_paths:1; /* unset to not ask for posix pathnames. */
86 bool no_linux_ext:1; 87 bool no_linux_ext:1;
87 bool sfu_emul:1; 88 bool sfu_emul:1;
88 bool nullauth:1; /* attempt to authenticate with null user */ 89 bool nullauth:1; /* attempt to authenticate with null user */
89 unsigned nocase; /* request case insensitive filenames */ 90 bool nocase:1; /* request case insensitive filenames */
90 unsigned nobrl; /* disable sending byte range locks to srv */ 91 bool nobrl:1; /* disable sending byte range locks to srv */
92 bool seal:1; /* request transport encryption on share */
91 unsigned int rsize; 93 unsigned int rsize;
92 unsigned int wsize; 94 unsigned int wsize;
93 unsigned int sockopt; 95 unsigned int sockopt;
@@ -651,6 +653,7 @@ multi_t2_fnd:
651 spin_lock(&GlobalMid_Lock); 653 spin_lock(&GlobalMid_Lock);
652 server->tcpStatus = CifsExiting; 654 server->tcpStatus = CifsExiting;
653 spin_unlock(&GlobalMid_Lock); 655 spin_unlock(&GlobalMid_Lock);
656 wake_up_all(&server->response_q);
654 657
655 /* don't exit until kthread_stop is called */ 658 /* don't exit until kthread_stop is called */
656 set_current_state(TASK_UNINTERRUPTIBLE); 659 set_current_state(TASK_UNINTERRUPTIBLE);
@@ -1246,6 +1249,10 @@ cifs_parse_mount_options(char *options, const char *devname,
1246 vol->setuids = 1; 1249 vol->setuids = 1;
1247 } else if (strnicmp(data, "nosetuids", 9) == 0) { 1250 } else if (strnicmp(data, "nosetuids", 9) == 0) {
1248 vol->setuids = 0; 1251 vol->setuids = 0;
1252 } else if (strnicmp(data, "dynperm", 7) == 0) {
1253 vol->dynperm = true;
1254 } else if (strnicmp(data, "nodynperm", 9) == 0) {
1255 vol->dynperm = false;
1249 } else if (strnicmp(data, "nohard", 6) == 0) { 1256 } else if (strnicmp(data, "nohard", 6) == 0) {
1250 vol->retry = 0; 1257 vol->retry = 0;
1251 } else if (strnicmp(data, "nosoft", 6) == 0) { 1258 } else if (strnicmp(data, "nosoft", 6) == 0) {
@@ -1268,8 +1275,12 @@ cifs_parse_mount_options(char *options, const char *devname,
1268 vol->no_psx_acl = 1; 1275 vol->no_psx_acl = 1;
1269 } else if (strnicmp(data, "sign", 4) == 0) { 1276 } else if (strnicmp(data, "sign", 4) == 0) {
1270 vol->secFlg |= CIFSSEC_MUST_SIGN; 1277 vol->secFlg |= CIFSSEC_MUST_SIGN;
1271/* } else if (strnicmp(data, "seal",4) == 0) { 1278 } else if (strnicmp(data, "seal", 4) == 0) {
1272 vol->secFlg |= CIFSSEC_MUST_SEAL; */ 1279 /* we do not do the following in secFlags because seal
1280 is a per tree connection (mount) not a per socket
1281 or per-smb connection option in the protocol */
1282 /* vol->secFlg |= CIFSSEC_MUST_SEAL; */
1283 vol->seal = 1;
1273 } else if (strnicmp(data, "direct", 6) == 0) { 1284 } else if (strnicmp(data, "direct", 6) == 0) {
1274 vol->direct_io = 1; 1285 vol->direct_io = 1;
1275 } else if (strnicmp(data, "forcedirectio", 13) == 0) { 1286 } else if (strnicmp(data, "forcedirectio", 13) == 0) {
@@ -1414,34 +1425,12 @@ find_unc(__be32 new_target_ip_addr, char *uncName, char *userName)
1414} 1425}
1415 1426
1416int 1427int
1417connect_to_dfs_path(int xid, struct cifsSesInfo *pSesInfo,
1418 const char *old_path, const struct nls_table *nls_codepage,
1419 int remap)
1420{
1421 struct dfs_info3_param *referrals = NULL;
1422 unsigned int num_referrals;
1423 int rc = 0;
1424
1425 rc = get_dfs_path(xid, pSesInfo, old_path, nls_codepage,
1426 &num_referrals, &referrals, remap);
1427
1428 /* BB Add in code to: if valid refrl, if not ip address contact
1429 the helper that resolves tcp names, mount to it, try to
1430 tcon to it unmount it if fail */
1431
1432 kfree(referrals);
1433
1434 return rc;
1435}
1436
1437int
1438get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, const char *old_path, 1428get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, const char *old_path,
1439 const struct nls_table *nls_codepage, unsigned int *pnum_referrals, 1429 const struct nls_table *nls_codepage, unsigned int *pnum_referrals,
1440 struct dfs_info3_param **preferrals, int remap) 1430 struct dfs_info3_param **preferrals, int remap)
1441{ 1431{
1442 char *temp_unc; 1432 char *temp_unc;
1443 int rc = 0; 1433 int rc = 0;
1444 unsigned char *targetUNCs;
1445 1434
1446 *pnum_referrals = 0; 1435 *pnum_referrals = 0;
1447 *preferrals = NULL; 1436 *preferrals = NULL;
@@ -1464,7 +1453,7 @@ get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, const char *old_path,
1464 kfree(temp_unc); 1453 kfree(temp_unc);
1465 } 1454 }
1466 if (rc == 0) 1455 if (rc == 0)
1467 rc = CIFSGetDFSRefer(xid, pSesInfo, old_path, &targetUNCs, 1456 rc = CIFSGetDFSRefer(xid, pSesInfo, old_path, preferrals,
1468 pnum_referrals, nls_codepage, remap); 1457 pnum_referrals, nls_codepage, remap);
1469 /* BB map targetUNCs to dfs_info3 structures, here or 1458 /* BB map targetUNCs to dfs_info3 structures, here or
1470 in CIFSGetDFSRefer BB */ 1459 in CIFSGetDFSRefer BB */
@@ -1815,7 +1804,7 @@ convert_delimiter(char *path, char delim)
1815 if (path == NULL) 1804 if (path == NULL)
1816 return; 1805 return;
1817 1806
1818 if (delim == '/') 1807 if (delim == '/')
1819 old_delim = '\\'; 1808 old_delim = '\\';
1820 else 1809 else
1821 old_delim = '/'; 1810 old_delim = '/';
@@ -2125,11 +2114,17 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
2125 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_OVERR_UID; 2114 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_OVERR_UID;
2126 if (volume_info.override_gid) 2115 if (volume_info.override_gid)
2127 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_OVERR_GID; 2116 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_OVERR_GID;
2117 if (volume_info.dynperm)
2118 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DYNPERM;
2128 if (volume_info.direct_io) { 2119 if (volume_info.direct_io) {
2129 cFYI(1, ("mounting share using direct i/o")); 2120 cFYI(1, ("mounting share using direct i/o"));
2130 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DIRECT_IO; 2121 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DIRECT_IO;
2131 } 2122 }
2132 2123
2124 if ((volume_info.cifs_acl) && (volume_info.dynperm))
2125 cERROR(1, ("mount option dynperm ignored if cifsacl "
2126 "mount option supported"));
2127
2133 tcon = 2128 tcon =
2134 find_unc(sin_server.sin_addr.s_addr, volume_info.UNC, 2129 find_unc(sin_server.sin_addr.s_addr, volume_info.UNC,
2135 volume_info.username); 2130 volume_info.username);
@@ -2141,6 +2136,9 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
2141 for the retry flag is used */ 2136 for the retry flag is used */
2142 tcon->retry = volume_info.retry; 2137 tcon->retry = volume_info.retry;
2143 tcon->nocase = volume_info.nocase; 2138 tcon->nocase = volume_info.nocase;
2139 if (tcon->seal != volume_info.seal)
2140 cERROR(1, ("transport encryption setting "
2141 "conflicts with existing tid"));
2144 } else { 2142 } else {
2145 tcon = tconInfoAlloc(); 2143 tcon = tconInfoAlloc();
2146 if (tcon == NULL) 2144 if (tcon == NULL)
@@ -2154,10 +2152,11 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
2154 if ((strchr(volume_info.UNC + 3, '\\') == NULL) 2152 if ((strchr(volume_info.UNC + 3, '\\') == NULL)
2155 && (strchr(volume_info.UNC + 3, '/') == 2153 && (strchr(volume_info.UNC + 3, '/') ==
2156 NULL)) { 2154 NULL)) {
2157 rc = connect_to_dfs_path(xid, pSesInfo, 2155/* rc = connect_to_dfs_path(xid, pSesInfo,
2158 "", cifs_sb->local_nls, 2156 "", cifs_sb->local_nls,
2159 cifs_sb->mnt_cifs_flags & 2157 cifs_sb->mnt_cifs_flags &
2160 CIFS_MOUNT_MAP_SPECIAL_CHR); 2158 CIFS_MOUNT_MAP_SPECIAL_CHR);*/
2159 cFYI(1, ("DFS root not supported"));
2161 rc = -ENODEV; 2160 rc = -ENODEV;
2162 goto out; 2161 goto out;
2163 } else { 2162 } else {
@@ -2173,6 +2172,7 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
2173 atomic_inc(&pSesInfo->inUse); 2172 atomic_inc(&pSesInfo->inUse);
2174 tcon->retry = volume_info.retry; 2173 tcon->retry = volume_info.retry;
2175 tcon->nocase = volume_info.nocase; 2174 tcon->nocase = volume_info.nocase;
2175 tcon->seal = volume_info.seal;
2176 } 2176 }
2177 } 2177 }
2178 } 2178 }
@@ -2314,9 +2314,10 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses,
2314 user = ses->userName; 2314 user = ses->userName;
2315 domain = ses->domainName; 2315 domain = ses->domainName;
2316 smb_buffer = cifs_buf_get(); 2316 smb_buffer = cifs_buf_get();
2317 if (smb_buffer == NULL) { 2317
2318 if (smb_buffer == NULL)
2318 return -ENOMEM; 2319 return -ENOMEM;
2319 } 2320
2320 smb_buffer_response = smb_buffer; 2321 smb_buffer_response = smb_buffer;
2321 pSMBr = pSMB = (SESSION_SETUP_ANDX *) smb_buffer; 2322 pSMBr = pSMB = (SESSION_SETUP_ANDX *) smb_buffer;
2322 2323
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index e4e0078a0526..fb69c1fa85c9 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -49,18 +49,25 @@ build_path_from_dentry(struct dentry *direntry)
49 struct dentry *temp; 49 struct dentry *temp;
50 int namelen; 50 int namelen;
51 int pplen; 51 int pplen;
52 int dfsplen;
52 char *full_path; 53 char *full_path;
53 char dirsep; 54 char dirsep;
55 struct cifs_sb_info *cifs_sb;
54 56
55 if (direntry == NULL) 57 if (direntry == NULL)
56 return NULL; /* not much we can do if dentry is freed and 58 return NULL; /* not much we can do if dentry is freed and
57 we need to reopen the file after it was closed implicitly 59 we need to reopen the file after it was closed implicitly
58 when the server crashed */ 60 when the server crashed */
59 61
60 dirsep = CIFS_DIR_SEP(CIFS_SB(direntry->d_sb)); 62 cifs_sb = CIFS_SB(direntry->d_sb);
61 pplen = CIFS_SB(direntry->d_sb)->prepathlen; 63 dirsep = CIFS_DIR_SEP(cifs_sb);
64 pplen = cifs_sb->prepathlen;
65 if (cifs_sb->tcon && (cifs_sb->tcon->Flags & SMB_SHARE_IS_IN_DFS))
66 dfsplen = strnlen(cifs_sb->tcon->treeName, MAX_TREE_SIZE + 1);
67 else
68 dfsplen = 0;
62cifs_bp_rename_retry: 69cifs_bp_rename_retry:
63 namelen = pplen; 70 namelen = pplen + dfsplen;
64 for (temp = direntry; !IS_ROOT(temp);) { 71 for (temp = direntry; !IS_ROOT(temp);) {
65 namelen += (1 + temp->d_name.len); 72 namelen += (1 + temp->d_name.len);
66 temp = temp->d_parent; 73 temp = temp->d_parent;
@@ -91,7 +98,7 @@ cifs_bp_rename_retry:
91 return NULL; 98 return NULL;
92 } 99 }
93 } 100 }
94 if (namelen != pplen) { 101 if (namelen != pplen + dfsplen) {
95 cERROR(1, 102 cERROR(1,
96 ("did not end path lookup where expected namelen is %d", 103 ("did not end path lookup where expected namelen is %d",
97 namelen)); 104 namelen));
@@ -107,7 +114,18 @@ cifs_bp_rename_retry:
107 since the '\' is a valid posix character so we can not switch 114 since the '\' is a valid posix character so we can not switch
108 those safely to '/' if any are found in the middle of the prepath */ 115 those safely to '/' if any are found in the middle of the prepath */
109 /* BB test paths to Windows with '/' in the midst of prepath */ 116 /* BB test paths to Windows with '/' in the midst of prepath */
110 strncpy(full_path, CIFS_SB(direntry->d_sb)->prepath, pplen); 117
118 if (dfsplen) {
119 strncpy(full_path, cifs_sb->tcon->treeName, dfsplen);
120 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) {
121 int i;
122 for (i = 0; i < dfsplen; i++) {
123 if (full_path[i] == '\\')
124 full_path[i] = '/';
125 }
126 }
127 }
128 strncpy(full_path + dfsplen, CIFS_SB(direntry->d_sb)->prepath, pplen);
111 return full_path; 129 return full_path;
112} 130}
113 131
@@ -242,7 +260,9 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
242 buf, inode->i_sb, xid, 260 buf, inode->i_sb, xid,
243 &fileHandle); 261 &fileHandle);
244 if (newinode) { 262 if (newinode) {
245 newinode->i_mode = mode; 263 if (cifs_sb->mnt_cifs_flags &
264 CIFS_MOUNT_DYNPERM)
265 newinode->i_mode = mode;
246 if ((oplock & CIFS_CREATE_ACTION) && 266 if ((oplock & CIFS_CREATE_ACTION) &&
247 (cifs_sb->mnt_cifs_flags & 267 (cifs_sb->mnt_cifs_flags &
248 CIFS_MOUNT_SET_UID)) { 268 CIFS_MOUNT_SET_UID)) {
@@ -590,7 +610,7 @@ static int cifs_ci_compare(struct dentry *dentry, struct qstr *a,
590 * case take precedence. If a is not a negative dentry, this 610 * case take precedence. If a is not a negative dentry, this
591 * should have no side effects 611 * should have no side effects
592 */ 612 */
593 memcpy(a->name, b->name, a->len); 613 memcpy((void *)a->name, b->name, a->len);
594 return 0; 614 return 0;
595 } 615 }
596 return 1; 616 return 1;
diff --git a/fs/cifs/dns_resolve.c b/fs/cifs/dns_resolve.c
index 939e256f8497..f730ef35499e 100644
--- a/fs/cifs/dns_resolve.c
+++ b/fs/cifs/dns_resolve.c
@@ -134,10 +134,6 @@ dns_resolve_server_name_to_ip(const char *unc, char **ip_addr)
134 rkey = request_key(&key_type_dns_resolver, name, ""); 134 rkey = request_key(&key_type_dns_resolver, name, "");
135 if (!IS_ERR(rkey)) { 135 if (!IS_ERR(rkey)) {
136 data = rkey->payload.data; 136 data = rkey->payload.data;
137 cFYI(1, ("%s: resolved: %s to %s", __func__,
138 rkey->description,
139 *ip_addr
140 ));
141 } else { 137 } else {
142 cERROR(1, ("%s: unable to resolve: %s", __func__, name)); 138 cERROR(1, ("%s: unable to resolve: %s", __func__, name));
143 goto out; 139 goto out;
@@ -150,6 +146,11 @@ skip_upcall:
150 if (*ip_addr) { 146 if (*ip_addr) {
151 memcpy(*ip_addr, data, len); 147 memcpy(*ip_addr, data, len);
152 (*ip_addr)[len] = '\0'; 148 (*ip_addr)[len] = '\0';
149 if (!IS_ERR(rkey))
150 cFYI(1, ("%s: resolved: %s to %s", __func__,
151 name,
152 *ip_addr
153 ));
153 rc = 0; 154 rc = 0;
154 } else { 155 } else {
155 rc = -ENOMEM; 156 rc = -ENOMEM;
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 31a0a33b9d95..0aac824371a5 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -75,7 +75,11 @@ static inline int cifs_convert_flags(unsigned int flags)
75 return (GENERIC_READ | GENERIC_WRITE); 75 return (GENERIC_READ | GENERIC_WRITE);
76 } 76 }
77 77
78 return 0x20197; 78 return (READ_CONTROL | FILE_WRITE_ATTRIBUTES | FILE_READ_ATTRIBUTES |
79 FILE_WRITE_EA | FILE_APPEND_DATA | FILE_WRITE_DATA |
80 FILE_READ_DATA);
81
82
79} 83}
80 84
81static inline int cifs_get_disposition(unsigned int flags) 85static inline int cifs_get_disposition(unsigned int flags)
@@ -542,7 +546,6 @@ int cifs_close(struct inode *inode, struct file *file)
542 msleep(timeout); 546 msleep(timeout);
543 timeout *= 8; 547 timeout *= 8;
544 } 548 }
545 kfree(pSMBFile->search_resume_name);
546 kfree(file->private_data); 549 kfree(file->private_data);
547 file->private_data = NULL; 550 file->private_data = NULL;
548 } else 551 } else
@@ -601,12 +604,6 @@ int cifs_closedir(struct inode *inode, struct file *file)
601 else 604 else
602 cifs_buf_release(ptmp); 605 cifs_buf_release(ptmp);
603 } 606 }
604 ptmp = pCFileStruct->search_resume_name;
605 if (ptmp) {
606 cFYI(1, ("closedir free resume name"));
607 pCFileStruct->search_resume_name = NULL;
608 kfree(ptmp);
609 }
610 kfree(file->private_data); 607 kfree(file->private_data);
611 file->private_data = NULL; 608 file->private_data = NULL;
612 } 609 }
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index fcbdbb6ad7bf..722be543ceec 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -161,118 +161,115 @@ static void cifs_unix_info_to_inode(struct inode *inode,
161 spin_unlock(&inode->i_lock); 161 spin_unlock(&inode->i_lock);
162} 162}
163 163
164static const unsigned char *cifs_get_search_path(struct cifs_sb_info *cifs_sb,
165 const char *search_path)
166{
167 int tree_len;
168 int path_len;
169 int i;
170 char *tmp_path;
171 struct cifsTconInfo *pTcon = cifs_sb->tcon;
172
173 if (!(pTcon->Flags & SMB_SHARE_IS_IN_DFS))
174 return search_path;
175
176 /* use full path name for working with DFS */
177 tree_len = strnlen(pTcon->treeName, MAX_TREE_SIZE + 1);
178 path_len = strnlen(search_path, MAX_PATHCONF);
179 164
180 tmp_path = kmalloc(tree_len+path_len+1, GFP_KERNEL); 165/*
181 if (tmp_path == NULL) 166 * Needed to setup inode data for the directory which is the
182 return search_path; 167 * junction to the new submount (ie to setup the fake directory
168 * which represents a DFS referral)
169 */
170static void fill_fake_finddataunix(FILE_UNIX_BASIC_INFO *pfnd_dat,
171 struct super_block *sb)
172{
173 struct inode *pinode = NULL;
174
175 memset(pfnd_dat, 0, sizeof(FILE_UNIX_BASIC_INFO));
176
177/* __le64 pfnd_dat->EndOfFile = cpu_to_le64(0);
178 __le64 pfnd_dat->NumOfBytes = cpu_to_le64(0);
179 __u64 UniqueId = 0; */
180 pfnd_dat->LastStatusChange =
181 cpu_to_le64(cifs_UnixTimeToNT(CURRENT_TIME));
182 pfnd_dat->LastAccessTime =
183 cpu_to_le64(cifs_UnixTimeToNT(CURRENT_TIME));
184 pfnd_dat->LastModificationTime =
185 cpu_to_le64(cifs_UnixTimeToNT(CURRENT_TIME));
186 pfnd_dat->Type = cpu_to_le32(UNIX_DIR);
187 pfnd_dat->Permissions = cpu_to_le64(S_IXUGO | S_IRWXU);
188 pfnd_dat->Nlinks = cpu_to_le64(2);
189 if (sb->s_root)
190 pinode = sb->s_root->d_inode;
191 if (pinode == NULL)
192 return;
183 193
184 strncpy(tmp_path, pTcon->treeName, tree_len); 194 /* fill in default values for the remaining based on root
185 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS) 195 inode since we can not query the server for this inode info */
186 for (i = 0; i < tree_len; i++) { 196 pfnd_dat->DevMajor = cpu_to_le64(MAJOR(pinode->i_rdev));
187 if (tmp_path[i] == '\\') 197 pfnd_dat->DevMinor = cpu_to_le64(MINOR(pinode->i_rdev));
188 tmp_path[i] = '/'; 198 pfnd_dat->Uid = cpu_to_le64(pinode->i_uid);
189 } 199 pfnd_dat->Gid = cpu_to_le64(pinode->i_gid);
190 strncpy(tmp_path+tree_len, search_path, path_len);
191 tmp_path[tree_len+path_len] = 0;
192 return tmp_path;
193} 200}
194 201
195int cifs_get_inode_info_unix(struct inode **pinode, 202int cifs_get_inode_info_unix(struct inode **pinode,
196 const unsigned char *search_path, struct super_block *sb, int xid) 203 const unsigned char *full_path, struct super_block *sb, int xid)
197{ 204{
198 int rc = 0; 205 int rc = 0;
199 FILE_UNIX_BASIC_INFO findData; 206 FILE_UNIX_BASIC_INFO find_data;
200 struct cifsTconInfo *pTcon; 207 struct cifsTconInfo *pTcon;
201 struct inode *inode; 208 struct inode *inode;
202 struct cifs_sb_info *cifs_sb = CIFS_SB(sb); 209 struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
203 const unsigned char *full_path;
204 bool is_dfs_referral = false; 210 bool is_dfs_referral = false;
211 struct cifsInodeInfo *cifsInfo;
212 __u64 num_of_bytes;
213 __u64 end_of_file;
205 214
206 pTcon = cifs_sb->tcon; 215 pTcon = cifs_sb->tcon;
207 cFYI(1, ("Getting info on %s", search_path)); 216 cFYI(1, ("Getting info on %s", full_path));
208
209 full_path = cifs_get_search_path(cifs_sb, search_path);
210 217
211try_again_CIFSSMBUnixQPathInfo:
212 /* could have done a find first instead but this returns more info */ 218 /* could have done a find first instead but this returns more info */
213 rc = CIFSSMBUnixQPathInfo(xid, pTcon, full_path, &findData, 219 rc = CIFSSMBUnixQPathInfo(xid, pTcon, full_path, &find_data,
214 cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & 220 cifs_sb->local_nls, cifs_sb->mnt_cifs_flags &
215 CIFS_MOUNT_MAP_SPECIAL_CHR); 221 CIFS_MOUNT_MAP_SPECIAL_CHR);
216/* dump_mem("\nUnixQPathInfo return data", &findData,
217 sizeof(findData)); */
218 if (rc) { 222 if (rc) {
219 if (rc == -EREMOTE && !is_dfs_referral) { 223 if (rc == -EREMOTE && !is_dfs_referral) {
220 is_dfs_referral = true; 224 is_dfs_referral = true;
221 if (full_path != search_path) { 225 cFYI(DBG2, ("DFS ref"));
222 kfree(full_path); 226 /* for DFS, server does not give us real inode data */
223 full_path = search_path; 227 fill_fake_finddataunix(&find_data, sb);
224 } 228 rc = 0;
225 goto try_again_CIFSSMBUnixQPathInfo;
226 } 229 }
227 goto cgiiu_exit; 230 }
228 } else { 231 num_of_bytes = le64_to_cpu(find_data.NumOfBytes);
229 struct cifsInodeInfo *cifsInfo; 232 end_of_file = le64_to_cpu(find_data.EndOfFile);
230 __u64 num_of_bytes = le64_to_cpu(findData.NumOfBytes);
231 __u64 end_of_file = le64_to_cpu(findData.EndOfFile);
232 233
233 /* get new inode */ 234 /* get new inode */
235 if (*pinode == NULL) {
236 *pinode = new_inode(sb);
234 if (*pinode == NULL) { 237 if (*pinode == NULL) {
235 *pinode = new_inode(sb); 238 rc = -ENOMEM;
236 if (*pinode == NULL) { 239 goto cgiiu_exit;
237 rc = -ENOMEM;
238 goto cgiiu_exit;
239 }
240 /* Is an i_ino of zero legal? */
241 /* Are there sanity checks we can use to ensure that
242 the server is really filling in that field? */
243 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) {
244 (*pinode)->i_ino =
245 (unsigned long)findData.UniqueId;
246 } /* note ino incremented to unique num in new_inode */
247 if (sb->s_flags & MS_NOATIME)
248 (*pinode)->i_flags |= S_NOATIME | S_NOCMTIME;
249
250 insert_inode_hash(*pinode);
251 } 240 }
241 /* Is an i_ino of zero legal? */
242 /* note ino incremented to unique num in new_inode */
243 /* Are there sanity checks we can use to ensure that
244 the server is really filling in that field? */
245 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM)
246 (*pinode)->i_ino = (unsigned long)find_data.UniqueId;
252 247
253 inode = *pinode; 248 if (sb->s_flags & MS_NOATIME)
254 cifsInfo = CIFS_I(inode); 249 (*pinode)->i_flags |= S_NOATIME | S_NOCMTIME;
255 250
256 cFYI(1, ("Old time %ld", cifsInfo->time)); 251 insert_inode_hash(*pinode);
257 cifsInfo->time = jiffies; 252 }
258 cFYI(1, ("New time %ld", cifsInfo->time)); 253
259 /* this is ok to set on every inode revalidate */ 254 inode = *pinode;
260 atomic_set(&cifsInfo->inUse, 1); 255 cifsInfo = CIFS_I(inode);
261 256
262 cifs_unix_info_to_inode(inode, &findData, 0); 257 cFYI(1, ("Old time %ld", cifsInfo->time));
258 cifsInfo->time = jiffies;
259 cFYI(1, ("New time %ld", cifsInfo->time));
260 /* this is ok to set on every inode revalidate */
261 atomic_set(&cifsInfo->inUse, 1);
263 262
263 cifs_unix_info_to_inode(inode, &find_data, 0);
264 264
265 if (num_of_bytes < end_of_file) 265 if (num_of_bytes < end_of_file)
266 cFYI(1, ("allocation size less than end of file")); 266 cFYI(1, ("allocation size less than end of file"));
267 cFYI(1, ("Size %ld and blocks %llu", 267 cFYI(1, ("Size %ld and blocks %llu",
268 (unsigned long) inode->i_size, 268 (unsigned long) inode->i_size,
269 (unsigned long long)inode->i_blocks)); 269 (unsigned long long)inode->i_blocks));
270 270
271 cifs_set_ops(inode, is_dfs_referral); 271 cifs_set_ops(inode, is_dfs_referral);
272 }
273cgiiu_exit: 272cgiiu_exit:
274 if (full_path != search_path)
275 kfree(full_path);
276 return rc; 273 return rc;
277} 274}
278 275
@@ -379,21 +376,52 @@ static int get_sfu_mode(struct inode *inode,
379#endif 376#endif
380} 377}
381 378
379/*
380 * Needed to setup inode data for the directory which is the
381 * junction to the new submount (ie to setup the fake directory
382 * which represents a DFS referral)
383 */
384static void fill_fake_finddata(FILE_ALL_INFO *pfnd_dat,
385 struct super_block *sb)
386{
387 memset(pfnd_dat, 0, sizeof(FILE_ALL_INFO));
388
389/* __le64 pfnd_dat->AllocationSize = cpu_to_le64(0);
390 __le64 pfnd_dat->EndOfFile = cpu_to_le64(0);
391 __u8 pfnd_dat->DeletePending = 0;
392 __u8 pfnd_data->Directory = 0;
393 __le32 pfnd_dat->EASize = 0;
394 __u64 pfnd_dat->IndexNumber = 0;
395 __u64 pfnd_dat->IndexNumber1 = 0; */
396 pfnd_dat->CreationTime =
397 cpu_to_le64(cifs_UnixTimeToNT(CURRENT_TIME));
398 pfnd_dat->LastAccessTime =
399 cpu_to_le64(cifs_UnixTimeToNT(CURRENT_TIME));
400 pfnd_dat->LastWriteTime =
401 cpu_to_le64(cifs_UnixTimeToNT(CURRENT_TIME));
402 pfnd_dat->ChangeTime =
403 cpu_to_le64(cifs_UnixTimeToNT(CURRENT_TIME));
404 pfnd_dat->Attributes = cpu_to_le32(ATTR_DIRECTORY);
405 pfnd_dat->NumberOfLinks = cpu_to_le32(2);
406}
407
382int cifs_get_inode_info(struct inode **pinode, 408int cifs_get_inode_info(struct inode **pinode,
383 const unsigned char *search_path, FILE_ALL_INFO *pfindData, 409 const unsigned char *full_path, FILE_ALL_INFO *pfindData,
384 struct super_block *sb, int xid, const __u16 *pfid) 410 struct super_block *sb, int xid, const __u16 *pfid)
385{ 411{
386 int rc = 0; 412 int rc = 0;
413 __u32 attr;
414 struct cifsInodeInfo *cifsInfo;
387 struct cifsTconInfo *pTcon; 415 struct cifsTconInfo *pTcon;
388 struct inode *inode; 416 struct inode *inode;
389 struct cifs_sb_info *cifs_sb = CIFS_SB(sb); 417 struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
390 const unsigned char *full_path = NULL;
391 char *buf = NULL; 418 char *buf = NULL;
392 bool adjustTZ = false; 419 bool adjustTZ = false;
393 bool is_dfs_referral = false; 420 bool is_dfs_referral = false;
421 umode_t default_mode;
394 422
395 pTcon = cifs_sb->tcon; 423 pTcon = cifs_sb->tcon;
396 cFYI(1, ("Getting info on %s", search_path)); 424 cFYI(1, ("Getting info on %s", full_path));
397 425
398 if ((pfindData == NULL) && (*pinode != NULL)) { 426 if ((pfindData == NULL) && (*pinode != NULL)) {
399 if (CIFS_I(*pinode)->clientCanCacheRead) { 427 if (CIFS_I(*pinode)->clientCanCacheRead) {
@@ -409,9 +437,6 @@ int cifs_get_inode_info(struct inode **pinode,
409 return -ENOMEM; 437 return -ENOMEM;
410 pfindData = (FILE_ALL_INFO *)buf; 438 pfindData = (FILE_ALL_INFO *)buf;
411 439
412 full_path = cifs_get_search_path(cifs_sb, search_path);
413
414try_again_CIFSSMBQPathInfo:
415 /* could do find first instead but this returns more info */ 440 /* could do find first instead but this returns more info */
416 rc = CIFSSMBQPathInfo(xid, pTcon, full_path, pfindData, 441 rc = CIFSSMBQPathInfo(xid, pTcon, full_path, pfindData,
417 0 /* not legacy */, 442 0 /* not legacy */,
@@ -429,178 +454,163 @@ try_again_CIFSSMBQPathInfo:
429 } 454 }
430 } 455 }
431 /* dump_mem("\nQPathInfo return data",&findData, sizeof(findData)); */ 456 /* dump_mem("\nQPathInfo return data",&findData, sizeof(findData)); */
432 if (rc) { 457 if (rc == -EREMOTE) {
433 if (rc == -EREMOTE && !is_dfs_referral) { 458 is_dfs_referral = true;
434 is_dfs_referral = true; 459 fill_fake_finddata(pfindData, sb);
435 if (full_path != search_path) { 460 rc = 0;
436 kfree(full_path); 461 } else if (rc)
437 full_path = search_path;
438 }
439 goto try_again_CIFSSMBQPathInfo;
440 }
441 goto cgii_exit; 462 goto cgii_exit;
442 } else {
443 struct cifsInodeInfo *cifsInfo;
444 __u32 attr = le32_to_cpu(pfindData->Attributes);
445
446 /* get new inode */
447 if (*pinode == NULL) {
448 *pinode = new_inode(sb);
449 if (*pinode == NULL) {
450 rc = -ENOMEM;
451 goto cgii_exit;
452 }
453 /* Is an i_ino of zero legal? Can we use that to check
454 if the server supports returning inode numbers? Are
455 there other sanity checks we can use to ensure that
456 the server is really filling in that field? */
457
458 /* We can not use the IndexNumber field by default from
459 Windows or Samba (in ALL_INFO buf) but we can request
460 it explicitly. It may not be unique presumably if
461 the server has multiple devices mounted under one
462 share */
463 463
464 /* There may be higher info levels that work but are 464 attr = le32_to_cpu(pfindData->Attributes);
465 there Windows server or network appliances for which
466 IndexNumber field is not guaranteed unique? */
467 465
468 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { 466 /* get new inode */
469 int rc1 = 0; 467 if (*pinode == NULL) {
470 __u64 inode_num; 468 *pinode = new_inode(sb);
471 469 if (*pinode == NULL) {
472 rc1 = CIFSGetSrvInodeNumber(xid, pTcon, 470 rc = -ENOMEM;
473 search_path, &inode_num, 471 goto cgii_exit;
472 }
473 /* Is an i_ino of zero legal? Can we use that to check
474 if the server supports returning inode numbers? Are
475 there other sanity checks we can use to ensure that
476 the server is really filling in that field? */
477
478 /* We can not use the IndexNumber field by default from
479 Windows or Samba (in ALL_INFO buf) but we can request
480 it explicitly. It may not be unique presumably if
481 the server has multiple devices mounted under one share */
482
483 /* There may be higher info levels that work but are
484 there Windows server or network appliances for which
485 IndexNumber field is not guaranteed unique? */
486
487 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) {
488 int rc1 = 0;
489 __u64 inode_num;
490
491 rc1 = CIFSGetSrvInodeNumber(xid, pTcon,
492 full_path, &inode_num,
474 cifs_sb->local_nls, 493 cifs_sb->local_nls,
475 cifs_sb->mnt_cifs_flags & 494 cifs_sb->mnt_cifs_flags &
476 CIFS_MOUNT_MAP_SPECIAL_CHR); 495 CIFS_MOUNT_MAP_SPECIAL_CHR);
477 if (rc1) { 496 if (rc1) {
478 cFYI(1, ("GetSrvInodeNum rc %d", rc1)); 497 cFYI(1, ("GetSrvInodeNum rc %d", rc1));
479 /* BB EOPNOSUPP disable SERVER_INUM? */ 498 /* BB EOPNOSUPP disable SERVER_INUM? */
480 } else /* do we need cast or hash to ino? */ 499 } else /* do we need cast or hash to ino? */
481 (*pinode)->i_ino = inode_num; 500 (*pinode)->i_ino = inode_num;
482 } /* else ino incremented to unique num in new_inode*/ 501 } /* else ino incremented to unique num in new_inode*/
483 if (sb->s_flags & MS_NOATIME) 502 if (sb->s_flags & MS_NOATIME)
484 (*pinode)->i_flags |= S_NOATIME | S_NOCMTIME; 503 (*pinode)->i_flags |= S_NOATIME | S_NOCMTIME;
485 insert_inode_hash(*pinode); 504 insert_inode_hash(*pinode);
486 } 505 }
487 inode = *pinode; 506 inode = *pinode;
488 cifsInfo = CIFS_I(inode); 507 cifsInfo = CIFS_I(inode);
489 cifsInfo->cifsAttrs = attr; 508 cifsInfo->cifsAttrs = attr;
490 cFYI(1, ("Old time %ld", cifsInfo->time)); 509 cFYI(1, ("Old time %ld", cifsInfo->time));
491 cifsInfo->time = jiffies; 510 cifsInfo->time = jiffies;
492 cFYI(1, ("New time %ld", cifsInfo->time)); 511 cFYI(1, ("New time %ld", cifsInfo->time));
493 512
494 /* blksize needs to be multiple of two. So safer to default to 513 /* blksize needs to be multiple of two. So safer to default to
495 blksize and blkbits set in superblock so 2**blkbits and blksize 514 blksize and blkbits set in superblock so 2**blkbits and blksize
496 will match rather than setting to: 515 will match rather than setting to:
497 (pTcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE) & 0xFFFFFE00;*/ 516 (pTcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE) & 0xFFFFFE00;*/
498 517
499 /* Linux can not store file creation time so ignore it */ 518 /* Linux can not store file creation time so ignore it */
500 if (pfindData->LastAccessTime) 519 if (pfindData->LastAccessTime)
501 inode->i_atime = cifs_NTtimeToUnix 520 inode->i_atime = cifs_NTtimeToUnix
502 (le64_to_cpu(pfindData->LastAccessTime)); 521 (le64_to_cpu(pfindData->LastAccessTime));
503 else /* do not need to use current_fs_time - time not stored */ 522 else /* do not need to use current_fs_time - time not stored */
504 inode->i_atime = CURRENT_TIME; 523 inode->i_atime = CURRENT_TIME;
505 inode->i_mtime = 524 inode->i_mtime =
506 cifs_NTtimeToUnix(le64_to_cpu(pfindData->LastWriteTime)); 525 cifs_NTtimeToUnix(le64_to_cpu(pfindData->LastWriteTime));
507 inode->i_ctime = 526 inode->i_ctime =
508 cifs_NTtimeToUnix(le64_to_cpu(pfindData->ChangeTime)); 527 cifs_NTtimeToUnix(le64_to_cpu(pfindData->ChangeTime));
509 cFYI(0, ("Attributes came in as 0x%x", attr)); 528 cFYI(DBG2, ("Attributes came in as 0x%x", attr));
510 if (adjustTZ && (pTcon->ses) && (pTcon->ses->server)) { 529 if (adjustTZ && (pTcon->ses) && (pTcon->ses->server)) {
511 inode->i_ctime.tv_sec += pTcon->ses->server->timeAdj; 530 inode->i_ctime.tv_sec += pTcon->ses->server->timeAdj;
512 inode->i_mtime.tv_sec += pTcon->ses->server->timeAdj; 531 inode->i_mtime.tv_sec += pTcon->ses->server->timeAdj;
513 } 532 }
514 533
515 /* set default mode. will override for dirs below */ 534 /* get default inode mode */
516 if (atomic_read(&cifsInfo->inUse) == 0) 535 if (attr & ATTR_DIRECTORY)
517 /* new inode, can safely set these fields */ 536 default_mode = cifs_sb->mnt_dir_mode;
518 inode->i_mode = cifs_sb->mnt_file_mode; 537 else
519 else /* since we set the inode type below we need to mask off 538 default_mode = cifs_sb->mnt_file_mode;
520 to avoid strange results if type changes and both 539
521 get orred in */ 540 /* set permission bits */
541 if (atomic_read(&cifsInfo->inUse) == 0 ||
542 (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DYNPERM) == 0)
543 inode->i_mode = default_mode;
544 else {
545 /* just reenable write bits if !ATTR_READONLY */
546 if ((inode->i_mode & S_IWUGO) == 0 &&
547 (attr & ATTR_READONLY) == 0)
548 inode->i_mode |= (S_IWUGO & default_mode);
522 inode->i_mode &= ~S_IFMT; 549 inode->i_mode &= ~S_IFMT;
523/* if (attr & ATTR_REPARSE) */ 550 }
524 /* We no longer handle these as symlinks because we could not 551 /* clear write bits if ATTR_READONLY is set */
525 follow them due to the absolute path with drive letter */ 552 if (attr & ATTR_READONLY)
526 if (attr & ATTR_DIRECTORY) { 553 inode->i_mode &= ~S_IWUGO;
527 /* override default perms since we do not do byte range locking 554
528 on dirs */ 555 /* set inode type */
529 inode->i_mode = cifs_sb->mnt_dir_mode; 556 if ((attr & ATTR_SYSTEM) &&
530 inode->i_mode |= S_IFDIR; 557 (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL)) {
531 } else if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL) && 558 /* no need to fix endianness on 0 */
532 (cifsInfo->cifsAttrs & ATTR_SYSTEM) && 559 if (pfindData->EndOfFile == 0)
533 /* No need to le64 convert size of zero */
534 (pfindData->EndOfFile == 0)) {
535 inode->i_mode = cifs_sb->mnt_file_mode;
536 inode->i_mode |= S_IFIFO; 560 inode->i_mode |= S_IFIFO;
537/* BB Finish for SFU style symlinks and devices */ 561 else if (decode_sfu_inode(inode,
538 } else if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL) && 562 le64_to_cpu(pfindData->EndOfFile),
539 (cifsInfo->cifsAttrs & ATTR_SYSTEM)) { 563 full_path, cifs_sb, xid))
540 if (decode_sfu_inode(inode, 564 cFYI(1, ("unknown SFU file type\n"));
541 le64_to_cpu(pfindData->EndOfFile), 565 } else {
542 search_path, 566 if (attr & ATTR_DIRECTORY)
543 cifs_sb, xid)) 567 inode->i_mode |= S_IFDIR;
544 cFYI(1, ("Unrecognized sfu inode type")); 568 else
545
546 cFYI(1, ("sfu mode 0%o", inode->i_mode));
547 } else {
548 inode->i_mode |= S_IFREG; 569 inode->i_mode |= S_IFREG;
549 /* treat the dos attribute of read-only as read-only 570 }
550 mode e.g. 555 */
551 if (cifsInfo->cifsAttrs & ATTR_READONLY)
552 inode->i_mode &= ~(S_IWUGO);
553 else if ((inode->i_mode & S_IWUGO) == 0)
554 /* the ATTR_READONLY flag may have been */
555 /* changed on server -- set any w bits */
556 /* allowed by mnt_file_mode */
557 inode->i_mode |= (S_IWUGO &
558 cifs_sb->mnt_file_mode);
559 /* BB add code here -
560 validate if device or weird share or device type? */
561 }
562 571
563 spin_lock(&inode->i_lock); 572 spin_lock(&inode->i_lock);
564 if (is_size_safe_to_change(cifsInfo, 573 if (is_size_safe_to_change(cifsInfo,
565 le64_to_cpu(pfindData->EndOfFile))) { 574 le64_to_cpu(pfindData->EndOfFile))) {
566 /* can not safely shrink the file size here if the 575 /* can not safely shrink the file size here if the
567 client is writing to it due to potential races */ 576 client is writing to it due to potential races */
568 i_size_write(inode, le64_to_cpu(pfindData->EndOfFile)); 577 i_size_write(inode, le64_to_cpu(pfindData->EndOfFile));
569 578
570 /* 512 bytes (2**9) is the fake blocksize that must be 579 /* 512 bytes (2**9) is the fake blocksize that must be
571 used for this calculation */ 580 used for this calculation */
572 inode->i_blocks = (512 - 1 + le64_to_cpu( 581 inode->i_blocks = (512 - 1 + le64_to_cpu(
573 pfindData->AllocationSize)) >> 9; 582 pfindData->AllocationSize)) >> 9;
574 } 583 }
575 spin_unlock(&inode->i_lock); 584 spin_unlock(&inode->i_lock);
576 585
577 inode->i_nlink = le32_to_cpu(pfindData->NumberOfLinks); 586 inode->i_nlink = le32_to_cpu(pfindData->NumberOfLinks);
578 587
579 /* BB fill in uid and gid here? with help from winbind? 588 /* BB fill in uid and gid here? with help from winbind?
580 or retrieve from NTFS stream extended attribute */ 589 or retrieve from NTFS stream extended attribute */
581#ifdef CONFIG_CIFS_EXPERIMENTAL 590#ifdef CONFIG_CIFS_EXPERIMENTAL
582 /* fill in 0777 bits from ACL */ 591 /* fill in 0777 bits from ACL */
583 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) { 592 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) {
584 cFYI(1, ("Getting mode bits from ACL")); 593 cFYI(1, ("Getting mode bits from ACL"));
585 acl_to_uid_mode(inode, search_path, pfid); 594 acl_to_uid_mode(inode, full_path, pfid);
586 } 595 }
587#endif 596#endif
588 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL) { 597 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL) {
589 /* fill in remaining high mode bits e.g. SUID, VTX */ 598 /* fill in remaining high mode bits e.g. SUID, VTX */
590 get_sfu_mode(inode, search_path, cifs_sb, xid); 599 get_sfu_mode(inode, full_path, cifs_sb, xid);
591 } else if (atomic_read(&cifsInfo->inUse) == 0) { 600 } else if (atomic_read(&cifsInfo->inUse) == 0) {
592 inode->i_uid = cifs_sb->mnt_uid; 601 inode->i_uid = cifs_sb->mnt_uid;
593 inode->i_gid = cifs_sb->mnt_gid; 602 inode->i_gid = cifs_sb->mnt_gid;
594 /* set so we do not keep refreshing these fields with 603 /* set so we do not keep refreshing these fields with
595 bad data after user has changed them in memory */ 604 bad data after user has changed them in memory */
596 atomic_set(&cifsInfo->inUse, 1); 605 atomic_set(&cifsInfo->inUse, 1);
597 }
598
599 cifs_set_ops(inode, is_dfs_referral);
600 } 606 }
607
608 cifs_set_ops(inode, is_dfs_referral);
609
610
611
612
601cgii_exit: 613cgii_exit:
602 if (full_path != search_path)
603 kfree(full_path);
604 kfree(buf); 614 kfree(buf);
605 return rc; 615 return rc;
606} 616}
@@ -1005,8 +1015,11 @@ mkdir_get_info:
1005 CIFS_MOUNT_MAP_SPECIAL_CHR); 1015 CIFS_MOUNT_MAP_SPECIAL_CHR);
1006 } 1016 }
1007 if (direntry->d_inode) { 1017 if (direntry->d_inode) {
1008 direntry->d_inode->i_mode = mode; 1018 if (cifs_sb->mnt_cifs_flags &
1009 direntry->d_inode->i_mode |= S_IFDIR; 1019 CIFS_MOUNT_DYNPERM)
1020 direntry->d_inode->i_mode =
1021 (mode | S_IFDIR);
1022
1010 if (cifs_sb->mnt_cifs_flags & 1023 if (cifs_sb->mnt_cifs_flags &
1011 CIFS_MOUNT_SET_UID) { 1024 CIFS_MOUNT_SET_UID) {
1012 direntry->d_inode->i_uid = 1025 direntry->d_inode->i_uid =
@@ -1502,8 +1515,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
1502 int oplock = 0; 1515 int oplock = 0;
1503 1516
1504 rc = SMBLegacyOpen(xid, pTcon, full_path, 1517 rc = SMBLegacyOpen(xid, pTcon, full_path,
1505 FILE_OPEN, 1518 FILE_OPEN, GENERIC_WRITE,
1506 SYNCHRONIZE | FILE_WRITE_ATTRIBUTES,
1507 CREATE_NOT_DIR, &netfid, &oplock, 1519 CREATE_NOT_DIR, &netfid, &oplock,
1508 NULL, cifs_sb->local_nls, 1520 NULL, cifs_sb->local_nls,
1509 cifs_sb->mnt_cifs_flags & 1521 cifs_sb->mnt_cifs_flags &
@@ -1534,13 +1546,26 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
1534 } else 1546 } else
1535 goto cifs_setattr_exit; 1547 goto cifs_setattr_exit;
1536 } 1548 }
1537 if (attrs->ia_valid & ATTR_UID) { 1549
1538 cFYI(1, ("UID changed to %d", attrs->ia_uid)); 1550 /*
1539 uid = attrs->ia_uid; 1551 * Without unix extensions we can't send ownership changes to the
1540 } 1552 * server, so silently ignore them. This is consistent with how
1541 if (attrs->ia_valid & ATTR_GID) { 1553 * local DOS/Windows filesystems behave (VFAT, NTFS, etc). With
1542 cFYI(1, ("GID changed to %d", attrs->ia_gid)); 1554 * CIFSACL support + proper Windows to Unix idmapping, we may be
1543 gid = attrs->ia_gid; 1555 * able to support this in the future.
1556 */
1557 if (!pTcon->unix_ext &&
1558 !(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID)) {
1559 attrs->ia_valid &= ~(ATTR_UID | ATTR_GID);
1560 } else {
1561 if (attrs->ia_valid & ATTR_UID) {
1562 cFYI(1, ("UID changed to %d", attrs->ia_uid));
1563 uid = attrs->ia_uid;
1564 }
1565 if (attrs->ia_valid & ATTR_GID) {
1566 cFYI(1, ("GID changed to %d", attrs->ia_gid));
1567 gid = attrs->ia_gid;
1568 }
1544 } 1569 }
1545 1570
1546 time_buf.Attributes = 0; 1571 time_buf.Attributes = 0;
@@ -1550,7 +1575,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
1550 attrs->ia_valid &= ~ATTR_MODE; 1575 attrs->ia_valid &= ~ATTR_MODE;
1551 1576
1552 if (attrs->ia_valid & ATTR_MODE) { 1577 if (attrs->ia_valid & ATTR_MODE) {
1553 cFYI(1, ("Mode changed to 0x%x", attrs->ia_mode)); 1578 cFYI(1, ("Mode changed to 0%o", attrs->ia_mode));
1554 mode = attrs->ia_mode; 1579 mode = attrs->ia_mode;
1555 } 1580 }
1556 1581
@@ -1565,18 +1590,18 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
1565#ifdef CONFIG_CIFS_EXPERIMENTAL 1590#ifdef CONFIG_CIFS_EXPERIMENTAL
1566 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) 1591 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL)
1567 rc = mode_to_acl(inode, full_path, mode); 1592 rc = mode_to_acl(inode, full_path, mode);
1568 else if ((mode & S_IWUGO) == 0) { 1593 else
1569#else
1570 if ((mode & S_IWUGO) == 0) {
1571#endif 1594#endif
1572 /* not writeable */ 1595 if (((mode & S_IWUGO) == 0) &&
1573 if ((cifsInode->cifsAttrs & ATTR_READONLY) == 0) { 1596 (cifsInode->cifsAttrs & ATTR_READONLY) == 0) {
1574 set_dosattr = true; 1597 set_dosattr = true;
1575 time_buf.Attributes = 1598 time_buf.Attributes = cpu_to_le32(cifsInode->cifsAttrs |
1576 cpu_to_le32(cifsInode->cifsAttrs | 1599 ATTR_READONLY);
1577 ATTR_READONLY); 1600 /* fix up mode if we're not using dynperm */
1578 } 1601 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DYNPERM) == 0)
1579 } else if (cifsInode->cifsAttrs & ATTR_READONLY) { 1602 attrs->ia_mode = inode->i_mode & ~S_IWUGO;
1603 } else if ((mode & S_IWUGO) &&
1604 (cifsInode->cifsAttrs & ATTR_READONLY)) {
1580 /* If file is readonly on server, we would 1605 /* If file is readonly on server, we would
1581 not be able to write to it - so if any write 1606 not be able to write to it - so if any write
1582 bit is enabled for user or group or other we 1607 bit is enabled for user or group or other we
@@ -1587,6 +1612,20 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
1587 /* Windows ignores set to zero */ 1612 /* Windows ignores set to zero */
1588 if (time_buf.Attributes == 0) 1613 if (time_buf.Attributes == 0)
1589 time_buf.Attributes |= cpu_to_le32(ATTR_NORMAL); 1614 time_buf.Attributes |= cpu_to_le32(ATTR_NORMAL);
1615
1616 /* reset local inode permissions to normal */
1617 if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DYNPERM)) {
1618 attrs->ia_mode &= ~(S_IALLUGO);
1619 if (S_ISDIR(inode->i_mode))
1620 attrs->ia_mode |=
1621 cifs_sb->mnt_dir_mode;
1622 else
1623 attrs->ia_mode |=
1624 cifs_sb->mnt_file_mode;
1625 }
1626 } else if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DYNPERM)) {
1627 /* ignore mode change - ATTR_READONLY hasn't changed */
1628 attrs->ia_valid &= ~ATTR_MODE;
1590 } 1629 }
1591 } 1630 }
1592 1631
diff --git a/fs/cifs/ioctl.c b/fs/cifs/ioctl.c
index 5c792df13d62..0088a5b52564 100644
--- a/fs/cifs/ioctl.c
+++ b/fs/cifs/ioctl.c
@@ -30,9 +30,9 @@
30 30
31#define CIFS_IOC_CHECKUMOUNT _IO(0xCF, 2) 31#define CIFS_IOC_CHECKUMOUNT _IO(0xCF, 2)
32 32
33int cifs_ioctl(struct inode *inode, struct file *filep, 33long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
34 unsigned int command, unsigned long arg)
35{ 34{
35 struct inode *inode = filep->f_dentry->d_inode;
36 int rc = -ENOTTY; /* strange error - but the precedent */ 36 int rc = -ENOTTY; /* strange error - but the precedent */
37 int xid; 37 int xid;
38 struct cifs_sb_info *cifs_sb; 38 struct cifs_sb_info *cifs_sb;
diff --git a/fs/cifs/link.c b/fs/cifs/link.c
index 1c2c3ce5020b..63f644000ce5 100644
--- a/fs/cifs/link.c
+++ b/fs/cifs/link.c
@@ -234,7 +234,6 @@ cifs_readlink(struct dentry *direntry, char __user *pBuffer, int buflen)
234 struct cifs_sb_info *cifs_sb; 234 struct cifs_sb_info *cifs_sb;
235 struct cifsTconInfo *pTcon; 235 struct cifsTconInfo *pTcon;
236 char *full_path = NULL; 236 char *full_path = NULL;
237 char *tmp_path = NULL;
238 char *tmpbuffer; 237 char *tmpbuffer;
239 int len; 238 int len;
240 __u16 fid; 239 __u16 fid;
@@ -295,45 +294,9 @@ cifs_readlink(struct dentry *direntry, char __user *pBuffer, int buflen)
295 cFYI(1, ("Error closing junction point " 294 cFYI(1, ("Error closing junction point "
296 "(open for ioctl)")); 295 "(open for ioctl)"));
297 } 296 }
298 /* BB unwind this long, nested function, or remove BB */ 297 /* If it is a DFS junction earlier we would have gotten
299 if (rc == -EIO) { 298 PATH_NOT_COVERED returned from server so we do
300 /* Query if DFS Junction */ 299 not need to request the DFS info here */
301 unsigned int num_referrals = 0;
302 struct dfs_info3_param *refs = NULL;
303 tmp_path =
304 kmalloc(MAX_TREE_SIZE + MAX_PATHCONF + 1,
305 GFP_KERNEL);
306 if (tmp_path) {
307 strncpy(tmp_path, pTcon->treeName,
308 MAX_TREE_SIZE);
309 strncat(tmp_path, full_path,
310 MAX_PATHCONF);
311 rc = get_dfs_path(xid, pTcon->ses,
312 tmp_path,
313 cifs_sb->local_nls,
314 &num_referrals, &refs,
315 cifs_sb->mnt_cifs_flags &
316 CIFS_MOUNT_MAP_SPECIAL_CHR);
317 cFYI(1, ("Get DFS for %s rc = %d ",
318 tmp_path, rc));
319 if ((num_referrals == 0) && (rc == 0))
320 rc = -EACCES;
321 else {
322 cFYI(1, ("num referral: %d",
323 num_referrals));
324 if (refs && refs->path_name) {
325 strncpy(tmpbuffer,
326 refs->path_name,
327 len-1);
328 }
329 }
330 kfree(refs);
331 kfree(tmp_path);
332}
333 /* BB add code like else decode referrals
334 then memcpy to tmpbuffer and free referrals
335 string array BB */
336 }
337 } 300 }
338 } 301 }
339 /* BB Anything else to do to handle recursive links? */ 302 /* BB Anything else to do to handle recursive links? */
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index 1d69b8014e0b..4b17f8fe3157 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -519,8 +519,7 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
519 pnotify = (struct file_notify_information *) 519 pnotify = (struct file_notify_information *)
520 ((char *)&pSMBr->hdr.Protocol + data_offset); 520 ((char *)&pSMBr->hdr.Protocol + data_offset);
521 cFYI(1, ("dnotify on %s Action: 0x%x", 521 cFYI(1, ("dnotify on %s Action: 0x%x",
522 pnotify->FileName, 522 pnotify->FileName, pnotify->Action));
523 pnotify->Action)); /* BB removeme BB */
524 /* cifs_dump_mem("Rcvd notify Data: ",buf, 523 /* cifs_dump_mem("Rcvd notify Data: ",buf,
525 sizeof(struct smb_hdr)+60); */ 524 sizeof(struct smb_hdr)+60); */
526 return true; 525 return true;
diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c
index 00f4cff400b3..8703d68f5b20 100644
--- a/fs/cifs/netmisc.c
+++ b/fs/cifs/netmisc.c
@@ -141,11 +141,11 @@ cifs_inet_pton(const int address_family, const char *cp, void *dst)
141 int ret = 0; 141 int ret = 0;
142 142
143 /* calculate length by finding first slash or NULL */ 143 /* calculate length by finding first slash or NULL */
144 if (address_family == AF_INET) { 144 if (address_family == AF_INET)
145 ret = in4_pton(cp, -1 /* len */, dst, '\\', NULL); 145 ret = in4_pton(cp, -1 /* len */, dst, '\\', NULL);
146 } else if (address_family == AF_INET6) { 146 else if (address_family == AF_INET6)
147 ret = in6_pton(cp, -1 /* len */, dst , '\\', NULL); 147 ret = in6_pton(cp, -1 /* len */, dst , '\\', NULL);
148 } 148
149 cFYI(DBG2, ("address conversion returned %d for %s", ret, cp)); 149 cFYI(DBG2, ("address conversion returned %d for %s", ret, cp));
150 if (ret > 0) 150 if (ret > 0)
151 ret = 1; 151 ret = 1;
diff --git a/fs/cifs/ntlmssp.h b/fs/cifs/ntlmssp.h
index 7170a9b70f1e..c377d8065d99 100644
--- a/fs/cifs/ntlmssp.h
+++ b/fs/cifs/ntlmssp.h
@@ -64,7 +64,7 @@ typedef struct _SECURITY_BUFFER {
64} __attribute__((packed)) SECURITY_BUFFER; 64} __attribute__((packed)) SECURITY_BUFFER;
65 65
66typedef struct _NEGOTIATE_MESSAGE { 66typedef struct _NEGOTIATE_MESSAGE {
67 __u8 Signature[sizeof (NTLMSSP_SIGNATURE)]; 67 __u8 Signature[sizeof(NTLMSSP_SIGNATURE)];
68 __le32 MessageType; /* 1 */ 68 __le32 MessageType; /* 1 */
69 __le32 NegotiateFlags; 69 __le32 NegotiateFlags;
70 SECURITY_BUFFER DomainName; /* RFC 1001 style and ASCII */ 70 SECURITY_BUFFER DomainName; /* RFC 1001 style and ASCII */
@@ -74,7 +74,7 @@ typedef struct _NEGOTIATE_MESSAGE {
74} __attribute__((packed)) NEGOTIATE_MESSAGE, *PNEGOTIATE_MESSAGE; 74} __attribute__((packed)) NEGOTIATE_MESSAGE, *PNEGOTIATE_MESSAGE;
75 75
76typedef struct _CHALLENGE_MESSAGE { 76typedef struct _CHALLENGE_MESSAGE {
77 __u8 Signature[sizeof (NTLMSSP_SIGNATURE)]; 77 __u8 Signature[sizeof(NTLMSSP_SIGNATURE)];
78 __le32 MessageType; /* 2 */ 78 __le32 MessageType; /* 2 */
79 SECURITY_BUFFER TargetName; 79 SECURITY_BUFFER TargetName;
80 __le32 NegotiateFlags; 80 __le32 NegotiateFlags;
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index 34ec32100c72..83f306954883 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -132,6 +132,7 @@ static void fill_in_inode(struct inode *tmp_inode, int new_buf_type,
132 __u32 attr; 132 __u32 attr;
133 __u64 allocation_size; 133 __u64 allocation_size;
134 __u64 end_of_file; 134 __u64 end_of_file;
135 umode_t default_mode;
135 136
136 /* save mtime and size */ 137 /* save mtime and size */
137 local_mtime = tmp_inode->i_mtime; 138 local_mtime = tmp_inode->i_mtime;
@@ -187,48 +188,54 @@ static void fill_in_inode(struct inode *tmp_inode, int new_buf_type,
187 if (atomic_read(&cifsInfo->inUse) == 0) { 188 if (atomic_read(&cifsInfo->inUse) == 0) {
188 tmp_inode->i_uid = cifs_sb->mnt_uid; 189 tmp_inode->i_uid = cifs_sb->mnt_uid;
189 tmp_inode->i_gid = cifs_sb->mnt_gid; 190 tmp_inode->i_gid = cifs_sb->mnt_gid;
190 /* set default mode. will override for dirs below */ 191 }
191 tmp_inode->i_mode = cifs_sb->mnt_file_mode; 192
192 } else { 193 if (attr & ATTR_DIRECTORY)
193 /* mask off the type bits since it gets set 194 default_mode = cifs_sb->mnt_dir_mode;
194 below and we do not want to get two type 195 else
195 bits set */ 196 default_mode = cifs_sb->mnt_file_mode;
197
198 /* set initial permissions */
199 if ((atomic_read(&cifsInfo->inUse) == 0) ||
200 (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DYNPERM) == 0)
201 tmp_inode->i_mode = default_mode;
202 else {
203 /* just reenable write bits if !ATTR_READONLY */
204 if ((tmp_inode->i_mode & S_IWUGO) == 0 &&
205 (attr & ATTR_READONLY) == 0)
206 tmp_inode->i_mode |= (S_IWUGO & default_mode);
207
196 tmp_inode->i_mode &= ~S_IFMT; 208 tmp_inode->i_mode &= ~S_IFMT;
197 } 209 }
198 210
199 if (attr & ATTR_DIRECTORY) { 211 /* clear write bits if ATTR_READONLY is set */
200 *pobject_type = DT_DIR; 212 if (attr & ATTR_READONLY)
201 /* override default perms since we do not lock dirs */ 213 tmp_inode->i_mode &= ~S_IWUGO;
202 if (atomic_read(&cifsInfo->inUse) == 0) 214
203 tmp_inode->i_mode = cifs_sb->mnt_dir_mode; 215 /* set inode type */
204 tmp_inode->i_mode |= S_IFDIR; 216 if ((attr & ATTR_SYSTEM) &&
205 } else if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL) && 217 (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL)) {
206 (attr & ATTR_SYSTEM)) {
207 if (end_of_file == 0) { 218 if (end_of_file == 0) {
208 *pobject_type = DT_FIFO;
209 tmp_inode->i_mode |= S_IFIFO; 219 tmp_inode->i_mode |= S_IFIFO;
220 *pobject_type = DT_FIFO;
210 } else { 221 } else {
211 /* rather than get the type here, we mark the 222 /*
212 inode as needing revalidate and get the real type 223 * trying to get the type can be slow, so just call
213 (blk vs chr vs. symlink) later ie in lookup */ 224 * this a regular file for now, and mark for reval
214 *pobject_type = DT_REG; 225 */
215 tmp_inode->i_mode |= S_IFREG; 226 tmp_inode->i_mode |= S_IFREG;
227 *pobject_type = DT_REG;
216 cifsInfo->time = 0; 228 cifsInfo->time = 0;
217 } 229 }
218/* we no longer mark these because we could not follow them */
219/* } else if (attr & ATTR_REPARSE) {
220 *pobject_type = DT_LNK;
221 tmp_inode->i_mode |= S_IFLNK; */
222 } else { 230 } else {
223 *pobject_type = DT_REG; 231 if (attr & ATTR_DIRECTORY) {
224 tmp_inode->i_mode |= S_IFREG; 232 tmp_inode->i_mode |= S_IFDIR;
225 if (attr & ATTR_READONLY) 233 *pobject_type = DT_DIR;
226 tmp_inode->i_mode &= ~(S_IWUGO); 234 } else {
227 else if ((tmp_inode->i_mode & S_IWUGO) == 0) 235 tmp_inode->i_mode |= S_IFREG;
228 /* the ATTR_READONLY flag may have been changed on */ 236 *pobject_type = DT_REG;
229 /* server -- set any w bits allowed by mnt_file_mode */ 237 }
230 tmp_inode->i_mode |= (S_IWUGO & cifs_sb->mnt_file_mode); 238 }
231 } /* could add code here - to validate if device or weird share type? */
232 239
233 /* can not fill in nlink here as in qpathinfo version and Unx search */ 240 /* can not fill in nlink here as in qpathinfo version and Unx search */
234 if (atomic_read(&cifsInfo->inUse) == 0) 241 if (atomic_read(&cifsInfo->inUse) == 0)
@@ -670,10 +677,11 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon,
670 (index_to_find < first_entry_in_buffer)) { 677 (index_to_find < first_entry_in_buffer)) {
671 /* close and restart search */ 678 /* close and restart search */
672 cFYI(1, ("search backing up - close and restart search")); 679 cFYI(1, ("search backing up - close and restart search"));
673 cifsFile->invalidHandle = true; 680 if (!cifsFile->srch_inf.endOfSearch &&
674 CIFSFindClose(xid, pTcon, cifsFile->netfid); 681 !cifsFile->invalidHandle) {
675 kfree(cifsFile->search_resume_name); 682 cifsFile->invalidHandle = true;
676 cifsFile->search_resume_name = NULL; 683 CIFSFindClose(xid, pTcon, cifsFile->netfid);
684 }
677 if (cifsFile->srch_inf.ntwrk_buf_start) { 685 if (cifsFile->srch_inf.ntwrk_buf_start) {
678 cFYI(1, ("freeing SMB ff cache buf on search rewind")); 686 cFYI(1, ("freeing SMB ff cache buf on search rewind"));
679 if (cifsFile->srch_inf.smallBuf) 687 if (cifsFile->srch_inf.smallBuf)
@@ -1040,9 +1048,7 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
1040 } /* else { 1048 } /* else {
1041 cifsFile->invalidHandle = true; 1049 cifsFile->invalidHandle = true;
1042 CIFSFindClose(xid, pTcon, cifsFile->netfid); 1050 CIFSFindClose(xid, pTcon, cifsFile->netfid);
1043 } 1051 } */
1044 kfree(cifsFile->search_resume_name);
1045 cifsFile->search_resume_name = NULL; */
1046 1052
1047 rc = find_cifs_entry(xid, pTcon, file, 1053 rc = find_cifs_entry(xid, pTcon, file,
1048 &current_entry, &num_to_fill); 1054 &current_entry, &num_to_fill);
diff --git a/fs/dcache.c b/fs/dcache.c
index 3ee588d5f585..6068c25b393c 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -17,6 +17,7 @@
17#include <linux/syscalls.h> 17#include <linux/syscalls.h>
18#include <linux/string.h> 18#include <linux/string.h>
19#include <linux/mm.h> 19#include <linux/mm.h>
20#include <linux/fdtable.h>
20#include <linux/fs.h> 21#include <linux/fs.h>
21#include <linux/fsnotify.h> 22#include <linux/fsnotify.h>
22#include <linux/slab.h> 23#include <linux/slab.h>
@@ -106,9 +107,10 @@ static void dentry_lru_remove(struct dentry *dentry)
106/* 107/*
107 * Release the dentry's inode, using the filesystem 108 * Release the dentry's inode, using the filesystem
108 * d_iput() operation if defined. 109 * d_iput() operation if defined.
109 * Called with dcache_lock and per dentry lock held, drops both.
110 */ 110 */
111static void dentry_iput(struct dentry * dentry) 111static void dentry_iput(struct dentry * dentry)
112 __releases(dentry->d_lock)
113 __releases(dcache_lock)
112{ 114{
113 struct inode *inode = dentry->d_inode; 115 struct inode *inode = dentry->d_inode;
114 if (inode) { 116 if (inode) {
@@ -132,12 +134,13 @@ static void dentry_iput(struct dentry * dentry)
132 * d_kill - kill dentry and return parent 134 * d_kill - kill dentry and return parent
133 * @dentry: dentry to kill 135 * @dentry: dentry to kill
134 * 136 *
135 * Called with dcache_lock and d_lock, releases both. The dentry must 137 * The dentry must already be unhashed and removed from the LRU.
136 * already be unhashed and removed from the LRU.
137 * 138 *
138 * If this is the root of the dentry tree, return NULL. 139 * If this is the root of the dentry tree, return NULL.
139 */ 140 */
140static struct dentry *d_kill(struct dentry *dentry) 141static struct dentry *d_kill(struct dentry *dentry)
142 __releases(dentry->d_lock)
143 __releases(dcache_lock)
141{ 144{
142 struct dentry *parent; 145 struct dentry *parent;
143 146
@@ -383,11 +386,11 @@ restart:
383 * Try to prune ancestors as well. This is necessary to prevent 386 * Try to prune ancestors as well. This is necessary to prevent
384 * quadratic behavior of shrink_dcache_parent(), but is also expected 387 * quadratic behavior of shrink_dcache_parent(), but is also expected
385 * to be beneficial in reducing dentry cache fragmentation. 388 * to be beneficial in reducing dentry cache fragmentation.
386 *
387 * Called with dcache_lock, drops it and then regains.
388 * Called with dentry->d_lock held, drops it.
389 */ 389 */
390static void prune_one_dentry(struct dentry * dentry) 390static void prune_one_dentry(struct dentry * dentry)
391 __releases(dentry->d_lock)
392 __releases(dcache_lock)
393 __acquires(dcache_lock)
391{ 394{
392 __d_drop(dentry); 395 __d_drop(dentry);
393 dentry = d_kill(dentry); 396 dentry = d_kill(dentry);
@@ -1604,10 +1607,9 @@ static int d_isparent(struct dentry *p1, struct dentry *p2)
1604 * 1607 *
1605 * Note: If ever the locking in lock_rename() changes, then please 1608 * Note: If ever the locking in lock_rename() changes, then please
1606 * remember to update this too... 1609 * remember to update this too...
1607 *
1608 * On return, dcache_lock will have been unlocked.
1609 */ 1610 */
1610static struct dentry *__d_unalias(struct dentry *dentry, struct dentry *alias) 1611static struct dentry *__d_unalias(struct dentry *dentry, struct dentry *alias)
1612 __releases(dcache_lock)
1611{ 1613{
1612 struct mutex *m1 = NULL, *m2 = NULL; 1614 struct mutex *m1 = NULL, *m2 = NULL;
1613 struct dentry *ret; 1615 struct dentry *ret;
@@ -1743,11 +1745,9 @@ out_nolock:
1743shouldnt_be_hashed: 1745shouldnt_be_hashed:
1744 spin_unlock(&dcache_lock); 1746 spin_unlock(&dcache_lock);
1745 BUG(); 1747 BUG();
1746 goto shouldnt_be_hashed;
1747} 1748}
1748 1749
1749static int prepend(char **buffer, int *buflen, const char *str, 1750static int prepend(char **buffer, int *buflen, const char *str, int namelen)
1750 int namelen)
1751{ 1751{
1752 *buflen -= namelen; 1752 *buflen -= namelen;
1753 if (*buflen < 0) 1753 if (*buflen < 0)
@@ -1757,8 +1757,13 @@ static int prepend(char **buffer, int *buflen, const char *str,
1757 return 0; 1757 return 0;
1758} 1758}
1759 1759
1760static int prepend_name(char **buffer, int *buflen, struct qstr *name)
1761{
1762 return prepend(buffer, buflen, name->name, name->len);
1763}
1764
1760/** 1765/**
1761 * d_path - return the path of a dentry 1766 * __d_path - return the path of a dentry
1762 * @path: the dentry/vfsmount to report 1767 * @path: the dentry/vfsmount to report
1763 * @root: root vfsmnt/dentry (may be modified by this function) 1768 * @root: root vfsmnt/dentry (may be modified by this function)
1764 * @buffer: buffer to return value in 1769 * @buffer: buffer to return value in
@@ -1779,9 +1784,10 @@ char *__d_path(const struct path *path, struct path *root,
1779{ 1784{
1780 struct dentry *dentry = path->dentry; 1785 struct dentry *dentry = path->dentry;
1781 struct vfsmount *vfsmnt = path->mnt; 1786 struct vfsmount *vfsmnt = path->mnt;
1782 char * end = buffer+buflen; 1787 char *end = buffer + buflen;
1783 char * retval; 1788 char *retval;
1784 1789
1790 spin_lock(&vfsmount_lock);
1785 prepend(&end, &buflen, "\0", 1); 1791 prepend(&end, &buflen, "\0", 1);
1786 if (!IS_ROOT(dentry) && d_unhashed(dentry) && 1792 if (!IS_ROOT(dentry) && d_unhashed(dentry) &&
1787 (prepend(&end, &buflen, " (deleted)", 10) != 0)) 1793 (prepend(&end, &buflen, " (deleted)", 10) != 0))
@@ -1800,38 +1806,37 @@ char *__d_path(const struct path *path, struct path *root,
1800 break; 1806 break;
1801 if (dentry == vfsmnt->mnt_root || IS_ROOT(dentry)) { 1807 if (dentry == vfsmnt->mnt_root || IS_ROOT(dentry)) {
1802 /* Global root? */ 1808 /* Global root? */
1803 spin_lock(&vfsmount_lock);
1804 if (vfsmnt->mnt_parent == vfsmnt) { 1809 if (vfsmnt->mnt_parent == vfsmnt) {
1805 spin_unlock(&vfsmount_lock);
1806 goto global_root; 1810 goto global_root;
1807 } 1811 }
1808 dentry = vfsmnt->mnt_mountpoint; 1812 dentry = vfsmnt->mnt_mountpoint;
1809 vfsmnt = vfsmnt->mnt_parent; 1813 vfsmnt = vfsmnt->mnt_parent;
1810 spin_unlock(&vfsmount_lock);
1811 continue; 1814 continue;
1812 } 1815 }
1813 parent = dentry->d_parent; 1816 parent = dentry->d_parent;
1814 prefetch(parent); 1817 prefetch(parent);
1815 if ((prepend(&end, &buflen, dentry->d_name.name, 1818 if ((prepend_name(&end, &buflen, &dentry->d_name) != 0) ||
1816 dentry->d_name.len) != 0) ||
1817 (prepend(&end, &buflen, "/", 1) != 0)) 1819 (prepend(&end, &buflen, "/", 1) != 0))
1818 goto Elong; 1820 goto Elong;
1819 retval = end; 1821 retval = end;
1820 dentry = parent; 1822 dentry = parent;
1821 } 1823 }
1822 1824
1825out:
1826 spin_unlock(&vfsmount_lock);
1823 return retval; 1827 return retval;
1824 1828
1825global_root: 1829global_root:
1826 retval += 1; /* hit the slash */ 1830 retval += 1; /* hit the slash */
1827 if (prepend(&retval, &buflen, dentry->d_name.name, 1831 if (prepend_name(&retval, &buflen, &dentry->d_name) != 0)
1828 dentry->d_name.len) != 0)
1829 goto Elong; 1832 goto Elong;
1830 root->mnt = vfsmnt; 1833 root->mnt = vfsmnt;
1831 root->dentry = dentry; 1834 root->dentry = dentry;
1832 return retval; 1835 goto out;
1836
1833Elong: 1837Elong:
1834 return ERR_PTR(-ENAMETOOLONG); 1838 retval = ERR_PTR(-ENAMETOOLONG);
1839 goto out;
1835} 1840}
1836 1841
1837/** 1842/**
@@ -1845,9 +1850,9 @@ Elong:
1845 * 1850 *
1846 * Returns the buffer or an error code if the path was too long. 1851 * Returns the buffer or an error code if the path was too long.
1847 * 1852 *
1848 * "buflen" should be positive. Caller holds the dcache_lock. 1853 * "buflen" should be positive.
1849 */ 1854 */
1850char *d_path(struct path *path, char *buf, int buflen) 1855char *d_path(const struct path *path, char *buf, int buflen)
1851{ 1856{
1852 char *res; 1857 char *res;
1853 struct path root; 1858 struct path root;
@@ -1915,16 +1920,11 @@ char *dentry_path(struct dentry *dentry, char *buf, int buflen)
1915 retval = end-1; 1920 retval = end-1;
1916 *retval = '/'; 1921 *retval = '/';
1917 1922
1918 for (;;) { 1923 while (!IS_ROOT(dentry)) {
1919 struct dentry *parent; 1924 struct dentry *parent = dentry->d_parent;
1920 if (IS_ROOT(dentry))
1921 break;
1922 1925
1923 parent = dentry->d_parent;
1924 prefetch(parent); 1926 prefetch(parent);
1925 1927 if ((prepend_name(&end, &buflen, &dentry->d_name) != 0) ||
1926 if ((prepend(&end, &buflen, dentry->d_name.name,
1927 dentry->d_name.len) != 0) ||
1928 (prepend(&end, &buflen, "/", 1) != 0)) 1928 (prepend(&end, &buflen, "/", 1) != 0))
1929 goto Elong; 1929 goto Elong;
1930 1930
@@ -1975,7 +1975,7 @@ asmlinkage long sys_getcwd(char __user *buf, unsigned long size)
1975 error = -ENOENT; 1975 error = -ENOENT;
1976 /* Has the current directory has been unlinked? */ 1976 /* Has the current directory has been unlinked? */
1977 spin_lock(&dcache_lock); 1977 spin_lock(&dcache_lock);
1978 if (pwd.dentry->d_parent == pwd.dentry || !d_unhashed(pwd.dentry)) { 1978 if (IS_ROOT(pwd.dentry) || !d_unhashed(pwd.dentry)) {
1979 unsigned long len; 1979 unsigned long len;
1980 struct path tmp = root; 1980 struct path tmp = root;
1981 char * cwd; 1981 char * cwd;
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c
index cd62d75b2cc0..e2832bc7869a 100644
--- a/fs/ecryptfs/crypto.c
+++ b/fs/ecryptfs/crypto.c
@@ -1906,9 +1906,9 @@ int ecryptfs_get_tfm_and_mutex_for_cipher_name(struct crypto_blkcipher **tfm,
1906 goto out; 1906 goto out;
1907 } 1907 }
1908 } 1908 }
1909 mutex_unlock(&key_tfm_list_mutex);
1910 (*tfm) = key_tfm->key_tfm; 1909 (*tfm) = key_tfm->key_tfm;
1911 (*tfm_mutex) = &key_tfm->key_tfm_mutex; 1910 (*tfm_mutex) = &key_tfm->key_tfm_mutex;
1912out: 1911out:
1912 mutex_unlock(&key_tfm_list_mutex);
1913 return rc; 1913 return rc;
1914} 1914}
diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h
index 951ee33a022d..c15c25745e05 100644
--- a/fs/ecryptfs/ecryptfs_kernel.h
+++ b/fs/ecryptfs/ecryptfs_kernel.h
@@ -660,8 +660,6 @@ int ecryptfs_get_tfm_and_mutex_for_cipher_name(struct crypto_blkcipher **tfm,
660int ecryptfs_keyring_auth_tok_for_sig(struct key **auth_tok_key, 660int ecryptfs_keyring_auth_tok_for_sig(struct key **auth_tok_key,
661 struct ecryptfs_auth_tok **auth_tok, 661 struct ecryptfs_auth_tok **auth_tok,
662 char *sig); 662 char *sig);
663int ecryptfs_write_zeros(struct file *file, pgoff_t index, int start,
664 int num_zeros);
665int ecryptfs_write_lower(struct inode *ecryptfs_inode, char *data, 663int ecryptfs_write_lower(struct inode *ecryptfs_inode, char *data,
666 loff_t offset, size_t size); 664 loff_t offset, size_t size);
667int ecryptfs_write_lower_page_segment(struct inode *ecryptfs_inode, 665int ecryptfs_write_lower_page_segment(struct inode *ecryptfs_inode,
diff --git a/fs/ecryptfs/miscdev.c b/fs/ecryptfs/miscdev.c
index 6560da1a58ce..09a4522f65e6 100644
--- a/fs/ecryptfs/miscdev.c
+++ b/fs/ecryptfs/miscdev.c
@@ -243,7 +243,6 @@ ecryptfs_miscdev_read(struct file *file, char __user *buf, size_t count,
243 struct ecryptfs_daemon *daemon; 243 struct ecryptfs_daemon *daemon;
244 struct ecryptfs_msg_ctx *msg_ctx; 244 struct ecryptfs_msg_ctx *msg_ctx;
245 size_t packet_length_size; 245 size_t packet_length_size;
246 u32 counter_nbo;
247 char packet_length[3]; 246 char packet_length[3];
248 size_t i; 247 size_t i;
249 size_t total_length; 248 size_t total_length;
@@ -328,20 +327,18 @@ check_list:
328 "pending message\n", __func__, count, total_length); 327 "pending message\n", __func__, count, total_length);
329 goto out_unlock_msg_ctx; 328 goto out_unlock_msg_ctx;
330 } 329 }
331 i = 0; 330 rc = -EFAULT;
332 buf[i++] = msg_ctx->type; 331 if (put_user(msg_ctx->type, buf))
333 counter_nbo = cpu_to_be32(msg_ctx->counter); 332 goto out_unlock_msg_ctx;
334 memcpy(&buf[i], (char *)&counter_nbo, 4); 333 if (put_user(cpu_to_be32(msg_ctx->counter), (__be32 __user *)(buf + 1)))
335 i += 4; 334 goto out_unlock_msg_ctx;
335 i = 5;
336 if (msg_ctx->msg) { 336 if (msg_ctx->msg) {
337 memcpy(&buf[i], packet_length, packet_length_size); 337 if (copy_to_user(&buf[i], packet_length, packet_length_size))
338 goto out_unlock_msg_ctx;
338 i += packet_length_size; 339 i += packet_length_size;
339 rc = copy_to_user(&buf[i], msg_ctx->msg, msg_ctx->msg_size); 340 if (copy_to_user(&buf[i], msg_ctx->msg, msg_ctx->msg_size))
340 if (rc) {
341 printk(KERN_ERR "%s: copy_to_user returned error "
342 "[%d]\n", __func__, rc);
343 goto out_unlock_msg_ctx; 341 goto out_unlock_msg_ctx;
344 }
345 i += msg_ctx->msg_size; 342 i += msg_ctx->msg_size;
346 } 343 }
347 rc = i; 344 rc = i;
@@ -452,7 +449,8 @@ static ssize_t
452ecryptfs_miscdev_write(struct file *file, const char __user *buf, 449ecryptfs_miscdev_write(struct file *file, const char __user *buf,
453 size_t count, loff_t *ppos) 450 size_t count, loff_t *ppos)
454{ 451{
455 u32 counter_nbo, seq; 452 __be32 counter_nbo;
453 u32 seq;
456 size_t packet_size, packet_size_length, i; 454 size_t packet_size, packet_size_length, i;
457 ssize_t sz = 0; 455 ssize_t sz = 0;
458 char *data; 456 char *data;
@@ -485,7 +483,7 @@ ecryptfs_miscdev_write(struct file *file, const char __user *buf,
485 count); 483 count);
486 goto out_free; 484 goto out_free;
487 } 485 }
488 memcpy((char *)&counter_nbo, &data[i], 4); 486 memcpy(&counter_nbo, &data[i], 4);
489 seq = be32_to_cpu(counter_nbo); 487 seq = be32_to_cpu(counter_nbo);
490 i += 4; 488 i += 4;
491 rc = ecryptfs_parse_packet_length(&data[i], &packet_size, 489 rc = ecryptfs_parse_packet_length(&data[i], &packet_size,
@@ -577,13 +575,11 @@ int ecryptfs_init_ecryptfs_miscdev(void)
577 int rc; 575 int rc;
578 576
579 atomic_set(&ecryptfs_num_miscdev_opens, 0); 577 atomic_set(&ecryptfs_num_miscdev_opens, 0);
580 mutex_lock(&ecryptfs_daemon_hash_mux);
581 rc = misc_register(&ecryptfs_miscdev); 578 rc = misc_register(&ecryptfs_miscdev);
582 if (rc) 579 if (rc)
583 printk(KERN_ERR "%s: Failed to register miscellaneous device " 580 printk(KERN_ERR "%s: Failed to register miscellaneous device "
584 "for communications with userspace daemons; rc = [%d]\n", 581 "for communications with userspace daemons; rc = [%d]\n",
585 __func__, rc); 582 __func__, rc);
586 mutex_unlock(&ecryptfs_daemon_hash_mux);
587 return rc; 583 return rc;
588} 584}
589 585
diff --git a/fs/ecryptfs/read_write.c b/fs/ecryptfs/read_write.c
index ebf55150be56..75c2ea9fee35 100644
--- a/fs/ecryptfs/read_write.c
+++ b/fs/ecryptfs/read_write.c
@@ -157,20 +157,6 @@ int ecryptfs_write(struct file *ecryptfs_file, char *data, loff_t offset,
157 ecryptfs_page_idx, rc); 157 ecryptfs_page_idx, rc);
158 goto out; 158 goto out;
159 } 159 }
160 if (start_offset_in_page) {
161 /* Read in the page from the lower
162 * into the eCryptfs inode page cache,
163 * decrypting */
164 rc = ecryptfs_decrypt_page(ecryptfs_page);
165 if (rc) {
166 printk(KERN_ERR "%s: Error decrypting "
167 "page; rc = [%d]\n",
168 __func__, rc);
169 ClearPageUptodate(ecryptfs_page);
170 page_cache_release(ecryptfs_page);
171 goto out;
172 }
173 }
174 ecryptfs_page_virt = kmap_atomic(ecryptfs_page, KM_USER0); 160 ecryptfs_page_virt = kmap_atomic(ecryptfs_page, KM_USER0);
175 161
176 /* 162 /*
@@ -349,14 +335,6 @@ int ecryptfs_read(char *data, loff_t offset, size_t size,
349 ecryptfs_page_idx, rc); 335 ecryptfs_page_idx, rc);
350 goto out; 336 goto out;
351 } 337 }
352 rc = ecryptfs_decrypt_page(ecryptfs_page);
353 if (rc) {
354 printk(KERN_ERR "%s: Error decrypting "
355 "page; rc = [%d]\n", __func__, rc);
356 ClearPageUptodate(ecryptfs_page);
357 page_cache_release(ecryptfs_page);
358 goto out;
359 }
360 ecryptfs_page_virt = kmap_atomic(ecryptfs_page, KM_USER0); 338 ecryptfs_page_virt = kmap_atomic(ecryptfs_page, KM_USER0);
361 memcpy((data + data_offset), 339 memcpy((data + data_offset),
362 ((char *)ecryptfs_page_virt + start_offset_in_page), 340 ((char *)ecryptfs_page_virt + start_offset_in_page),
diff --git a/fs/exec.c b/fs/exec.c
index 3c2ba7ce11d4..da94a6f05df3 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -26,7 +26,6 @@
26#include <linux/file.h> 26#include <linux/file.h>
27#include <linux/fdtable.h> 27#include <linux/fdtable.h>
28#include <linux/mman.h> 28#include <linux/mman.h>
29#include <linux/a.out.h>
30#include <linux/stat.h> 29#include <linux/stat.h>
31#include <linux/fcntl.h> 30#include <linux/fcntl.h>
32#include <linux/smp_lock.h> 31#include <linux/smp_lock.h>
@@ -61,6 +60,11 @@
61#include <linux/kmod.h> 60#include <linux/kmod.h>
62#endif 61#endif
63 62
63#ifdef __alpha__
64/* for /sbin/loader handling in search_binary_handler() */
65#include <linux/a.out.h>
66#endif
67
64int core_uses_pid; 68int core_uses_pid;
65char core_pattern[CORENAME_MAX_SIZE] = "core"; 69char core_pattern[CORENAME_MAX_SIZE] = "core";
66int suid_dumpable = 0; 70int suid_dumpable = 0;
@@ -860,6 +864,7 @@ static int de_thread(struct task_struct *tsk)
860 864
861no_thread_group: 865no_thread_group:
862 exit_itimers(sig); 866 exit_itimers(sig);
867 flush_itimer_signals();
863 if (leader) 868 if (leader)
864 release_task(leader); 869 release_task(leader);
865 870
@@ -1154,7 +1159,7 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs)
1154{ 1159{
1155 int try,retval; 1160 int try,retval;
1156 struct linux_binfmt *fmt; 1161 struct linux_binfmt *fmt;
1157#if defined(__alpha__) && defined(CONFIG_ARCH_SUPPORTS_AOUT) 1162#ifdef __alpha__
1158 /* handle /sbin/loader.. */ 1163 /* handle /sbin/loader.. */
1159 { 1164 {
1160 struct exec * eh = (struct exec *) bprm->buf; 1165 struct exec * eh = (struct exec *) bprm->buf;
diff --git a/fs/ext3/resize.c b/fs/ext3/resize.c
index 28cfd0b40527..77278e947e94 100644
--- a/fs/ext3/resize.c
+++ b/fs/ext3/resize.c
@@ -580,7 +580,8 @@ static int reserve_backup_gdb(handle_t *handle, struct inode *inode,
580 } 580 }
581 581
582 blk = EXT3_SB(sb)->s_sbh->b_blocknr + 1 + EXT3_SB(sb)->s_gdb_count; 582 blk = EXT3_SB(sb)->s_sbh->b_blocknr + 1 + EXT3_SB(sb)->s_gdb_count;
583 data = (__le32 *)dind->b_data + EXT3_SB(sb)->s_gdb_count; 583 data = (__le32 *)dind->b_data + (EXT3_SB(sb)->s_gdb_count %
584 EXT3_ADDR_PER_BLOCK(sb));
584 end = (__le32 *)dind->b_data + EXT3_ADDR_PER_BLOCK(sb); 585 end = (__le32 *)dind->b_data + EXT3_ADDR_PER_BLOCK(sb);
585 586
586 /* Get each reserved primary GDT block and verify it holds backups */ 587 /* Get each reserved primary GDT block and verify it holds backups */
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index fe3119a71ada..2845425077e8 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -2875,8 +2875,10 @@ static ssize_t ext3_quota_write(struct super_block *sb, int type,
2875 blk++; 2875 blk++;
2876 } 2876 }
2877out: 2877out:
2878 if (len == towrite) 2878 if (len == towrite) {
2879 mutex_unlock(&inode->i_mutex);
2879 return err; 2880 return err;
2881 }
2880 if (inode->i_size < off+len-towrite) { 2882 if (inode->i_size < off+len-towrite) {
2881 i_size_write(inode, off+len-towrite); 2883 i_size_write(inode, off+len-towrite);
2882 EXT3_I(inode)->i_disksize = inode->i_size; 2884 EXT3_I(inode)->i_disksize = inode->i_size;
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
index 30494c5da843..9cc80b9cc8d8 100644
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@ -43,6 +43,46 @@ void ext4_get_group_no_and_offset(struct super_block *sb, ext4_fsblk_t blocknr,
43 43
44} 44}
45 45
46static int ext4_block_in_group(struct super_block *sb, ext4_fsblk_t block,
47 ext4_group_t block_group)
48{
49 ext4_group_t actual_group;
50 ext4_get_group_no_and_offset(sb, block, &actual_group, 0);
51 if (actual_group == block_group)
52 return 1;
53 return 0;
54}
55
56static int ext4_group_used_meta_blocks(struct super_block *sb,
57 ext4_group_t block_group)
58{
59 ext4_fsblk_t tmp;
60 struct ext4_sb_info *sbi = EXT4_SB(sb);
61 /* block bitmap, inode bitmap, and inode table blocks */
62 int used_blocks = sbi->s_itb_per_group + 2;
63
64 if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_FLEX_BG)) {
65 struct ext4_group_desc *gdp;
66 struct buffer_head *bh;
67
68 gdp = ext4_get_group_desc(sb, block_group, &bh);
69 if (!ext4_block_in_group(sb, ext4_block_bitmap(sb, gdp),
70 block_group))
71 used_blocks--;
72
73 if (!ext4_block_in_group(sb, ext4_inode_bitmap(sb, gdp),
74 block_group))
75 used_blocks--;
76
77 tmp = ext4_inode_table(sb, gdp);
78 for (; tmp < ext4_inode_table(sb, gdp) +
79 sbi->s_itb_per_group; tmp++) {
80 if (!ext4_block_in_group(sb, tmp, block_group))
81 used_blocks -= 1;
82 }
83 }
84 return used_blocks;
85}
46/* Initializes an uninitialized block bitmap if given, and returns the 86/* Initializes an uninitialized block bitmap if given, and returns the
47 * number of blocks free in the group. */ 87 * number of blocks free in the group. */
48unsigned ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh, 88unsigned ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh,
@@ -105,20 +145,34 @@ unsigned ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh,
105 free_blocks = group_blocks - bit_max; 145 free_blocks = group_blocks - bit_max;
106 146
107 if (bh) { 147 if (bh) {
108 ext4_fsblk_t start; 148 ext4_fsblk_t start, tmp;
149 int flex_bg = 0;
109 150
110 for (bit = 0; bit < bit_max; bit++) 151 for (bit = 0; bit < bit_max; bit++)
111 ext4_set_bit(bit, bh->b_data); 152 ext4_set_bit(bit, bh->b_data);
112 153
113 start = ext4_group_first_block_no(sb, block_group); 154 start = ext4_group_first_block_no(sb, block_group);
114 155
115 /* Set bits for block and inode bitmaps, and inode table */ 156 if (EXT4_HAS_INCOMPAT_FEATURE(sb,
116 ext4_set_bit(ext4_block_bitmap(sb, gdp) - start, bh->b_data); 157 EXT4_FEATURE_INCOMPAT_FLEX_BG))
117 ext4_set_bit(ext4_inode_bitmap(sb, gdp) - start, bh->b_data); 158 flex_bg = 1;
118 for (bit = (ext4_inode_table(sb, gdp) - start),
119 bit_max = bit + sbi->s_itb_per_group; bit < bit_max; bit++)
120 ext4_set_bit(bit, bh->b_data);
121 159
160 /* Set bits for block and inode bitmaps, and inode table */
161 tmp = ext4_block_bitmap(sb, gdp);
162 if (!flex_bg || ext4_block_in_group(sb, tmp, block_group))
163 ext4_set_bit(tmp - start, bh->b_data);
164
165 tmp = ext4_inode_bitmap(sb, gdp);
166 if (!flex_bg || ext4_block_in_group(sb, tmp, block_group))
167 ext4_set_bit(tmp - start, bh->b_data);
168
169 tmp = ext4_inode_table(sb, gdp);
170 for (; tmp < ext4_inode_table(sb, gdp) +
171 sbi->s_itb_per_group; tmp++) {
172 if (!flex_bg ||
173 ext4_block_in_group(sb, tmp, block_group))
174 ext4_set_bit(tmp - start, bh->b_data);
175 }
122 /* 176 /*
123 * Also if the number of blocks within the group is 177 * Also if the number of blocks within the group is
124 * less than the blocksize * 8 ( which is the size 178 * less than the blocksize * 8 ( which is the size
@@ -126,8 +180,7 @@ unsigned ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh,
126 */ 180 */
127 mark_bitmap_end(group_blocks, sb->s_blocksize * 8, bh->b_data); 181 mark_bitmap_end(group_blocks, sb->s_blocksize * 8, bh->b_data);
128 } 182 }
129 183 return free_blocks - ext4_group_used_meta_blocks(sb, block_group);
130 return free_blocks - sbi->s_itb_per_group - 2;
131} 184}
132 185
133 186
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 873ad9b3418c..c9900aade150 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2745,8 +2745,6 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac,
2745 sbi = EXT4_SB(sb); 2745 sbi = EXT4_SB(sb);
2746 es = sbi->s_es; 2746 es = sbi->s_es;
2747 2747
2748 ext4_debug("using block group %lu(%d)\n", ac->ac_b_ex.fe_group,
2749 gdp->bg_free_blocks_count);
2750 2748
2751 err = -EIO; 2749 err = -EIO;
2752 bitmap_bh = read_block_bitmap(sb, ac->ac_b_ex.fe_group); 2750 bitmap_bh = read_block_bitmap(sb, ac->ac_b_ex.fe_group);
@@ -2762,6 +2760,9 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac,
2762 if (!gdp) 2760 if (!gdp)
2763 goto out_err; 2761 goto out_err;
2764 2762
2763 ext4_debug("using block group %lu(%d)\n", ac->ac_b_ex.fe_group,
2764 gdp->bg_free_blocks_count);
2765
2765 err = ext4_journal_get_write_access(handle, gdp_bh); 2766 err = ext4_journal_get_write_access(handle, gdp_bh);
2766 if (err) 2767 if (err)
2767 goto out_err; 2768 goto out_err;
@@ -3094,8 +3095,7 @@ static void ext4_mb_use_inode_pa(struct ext4_allocation_context *ac,
3094static void ext4_mb_use_group_pa(struct ext4_allocation_context *ac, 3095static void ext4_mb_use_group_pa(struct ext4_allocation_context *ac,
3095 struct ext4_prealloc_space *pa) 3096 struct ext4_prealloc_space *pa)
3096{ 3097{
3097 unsigned len = ac->ac_o_ex.fe_len; 3098 unsigned int len = ac->ac_o_ex.fe_len;
3098
3099 ext4_get_group_no_and_offset(ac->ac_sb, pa->pa_pstart, 3099 ext4_get_group_no_and_offset(ac->ac_sb, pa->pa_pstart,
3100 &ac->ac_b_ex.fe_group, 3100 &ac->ac_b_ex.fe_group,
3101 &ac->ac_b_ex.fe_start); 3101 &ac->ac_b_ex.fe_start);
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 9f086a6a472b..9ff7b1c04239 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -563,7 +563,8 @@ static int reserve_backup_gdb(handle_t *handle, struct inode *inode,
563 } 563 }
564 564
565 blk = EXT4_SB(sb)->s_sbh->b_blocknr + 1 + EXT4_SB(sb)->s_gdb_count; 565 blk = EXT4_SB(sb)->s_sbh->b_blocknr + 1 + EXT4_SB(sb)->s_gdb_count;
566 data = (__le32 *)dind->b_data + EXT4_SB(sb)->s_gdb_count; 566 data = (__le32 *)dind->b_data + (EXT4_SB(sb)->s_gdb_count %
567 EXT4_ADDR_PER_BLOCK(sb));
567 end = (__le32 *)dind->b_data + EXT4_ADDR_PER_BLOCK(sb); 568 end = (__le32 *)dind->b_data + EXT4_ADDR_PER_BLOCK(sb);
568 569
569 /* Get each reserved primary GDT block and verify it holds backups */ 570 /* Get each reserved primary GDT block and verify it holds backups */
@@ -854,7 +855,8 @@ int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input)
854 */ 855 */
855 856
856 /* Update group descriptor block for new group */ 857 /* Update group descriptor block for new group */
857 gdp = (struct ext4_group_desc *)primary->b_data + gdb_off; 858 gdp = (struct ext4_group_desc *)((char *)primary->b_data +
859 gdb_off * EXT4_DESC_SIZE(sb));
858 860
859 ext4_block_bitmap_set(sb, gdp, input->block_bitmap); /* LV FIXME */ 861 ext4_block_bitmap_set(sb, gdp, input->block_bitmap); /* LV FIXME */
860 ext4_inode_bitmap_set(sb, gdp, input->inode_bitmap); /* LV FIXME */ 862 ext4_inode_bitmap_set(sb, gdp, input->inode_bitmap); /* LV FIXME */
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 09d9359c8055..02bf24343979 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -671,6 +671,7 @@ static int ext4_show_options(struct seq_file *seq, struct vfsmount *vfs)
671 unsigned long def_mount_opts; 671 unsigned long def_mount_opts;
672 struct super_block *sb = vfs->mnt_sb; 672 struct super_block *sb = vfs->mnt_sb;
673 struct ext4_sb_info *sbi = EXT4_SB(sb); 673 struct ext4_sb_info *sbi = EXT4_SB(sb);
674 journal_t *journal = sbi->s_journal;
674 struct ext4_super_block *es = sbi->s_es; 675 struct ext4_super_block *es = sbi->s_es;
675 676
676 def_mount_opts = le32_to_cpu(es->s_default_mount_opts); 677 def_mount_opts = le32_to_cpu(es->s_default_mount_opts);
@@ -729,8 +730,15 @@ static int ext4_show_options(struct seq_file *seq, struct vfsmount *vfs)
729 seq_printf(seq, ",commit=%u", 730 seq_printf(seq, ",commit=%u",
730 (unsigned) (sbi->s_commit_interval / HZ)); 731 (unsigned) (sbi->s_commit_interval / HZ));
731 } 732 }
732 if (test_opt(sb, BARRIER)) 733 /*
733 seq_puts(seq, ",barrier=1"); 734 * We're changing the default of barrier mount option, so
735 * let's always display its mount state so it's clear what its
736 * status is.
737 */
738 seq_puts(seq, ",barrier=");
739 seq_puts(seq, test_opt(sb, BARRIER) ? "1" : "0");
740 if (test_opt(sb, JOURNAL_ASYNC_COMMIT))
741 seq_puts(seq, ",journal_async_commit");
734 if (test_opt(sb, NOBH)) 742 if (test_opt(sb, NOBH))
735 seq_puts(seq, ",nobh"); 743 seq_puts(seq, ",nobh");
736 if (!test_opt(sb, EXTENTS)) 744 if (!test_opt(sb, EXTENTS))
@@ -1907,6 +1915,7 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent)
1907 sbi->s_resgid = le16_to_cpu(es->s_def_resgid); 1915 sbi->s_resgid = le16_to_cpu(es->s_def_resgid);
1908 1916
1909 set_opt(sbi->s_mount_opt, RESERVATION); 1917 set_opt(sbi->s_mount_opt, RESERVATION);
1918 set_opt(sbi->s_mount_opt, BARRIER);
1910 1919
1911 /* 1920 /*
1912 * turn on extents feature by default in ext4 filesystem 1921 * turn on extents feature by default in ext4 filesystem
@@ -2189,6 +2198,29 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent)
2189 EXT4_HAS_COMPAT_FEATURE(sb, EXT4_FEATURE_COMPAT_HAS_JOURNAL)) { 2198 EXT4_HAS_COMPAT_FEATURE(sb, EXT4_FEATURE_COMPAT_HAS_JOURNAL)) {
2190 if (ext4_load_journal(sb, es, journal_devnum)) 2199 if (ext4_load_journal(sb, es, journal_devnum))
2191 goto failed_mount3; 2200 goto failed_mount3;
2201 if (!(sb->s_flags & MS_RDONLY) &&
2202 EXT4_SB(sb)->s_journal->j_failed_commit) {
2203 printk(KERN_CRIT "EXT4-fs error (device %s): "
2204 "ext4_fill_super: Journal transaction "
2205 "%u is corrupt\n", sb->s_id,
2206 EXT4_SB(sb)->s_journal->j_failed_commit);
2207 if (test_opt (sb, ERRORS_RO)) {
2208 printk (KERN_CRIT
2209 "Mounting filesystem read-only\n");
2210 sb->s_flags |= MS_RDONLY;
2211 EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS;
2212 es->s_state |= cpu_to_le16(EXT4_ERROR_FS);
2213 }
2214 if (test_opt(sb, ERRORS_PANIC)) {
2215 EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS;
2216 es->s_state |= cpu_to_le16(EXT4_ERROR_FS);
2217 ext4_commit_super(sb, es, 1);
2218 printk(KERN_CRIT
2219 "EXT4-fs (device %s): mount failed\n",
2220 sb->s_id);
2221 goto failed_mount4;
2222 }
2223 }
2192 } else if (journal_inum) { 2224 } else if (journal_inum) {
2193 if (ext4_create_journal(sb, es, journal_inum)) 2225 if (ext4_create_journal(sb, es, journal_inum))
2194 goto failed_mount3; 2226 goto failed_mount3;
@@ -3305,8 +3337,10 @@ static ssize_t ext4_quota_write(struct super_block *sb, int type,
3305 blk++; 3337 blk++;
3306 } 3338 }
3307out: 3339out:
3308 if (len == towrite) 3340 if (len == towrite) {
3341 mutex_unlock(&inode->i_mutex);
3309 return err; 3342 return err;
3343 }
3310 if (inode->i_size < off+len-towrite) { 3344 if (inode->i_size < off+len-towrite) {
3311 i_size_write(inode, off+len-towrite); 3345 i_size_write(inode, off+len-towrite);
3312 EXT4_I(inode)->i_disksize = inode->i_size; 3346 EXT4_I(inode)->i_disksize = inode->i_size;
diff --git a/fs/fat/file.c b/fs/fat/file.c
index 27cc1164ec36..771326b8047e 100644
--- a/fs/fat/file.c
+++ b/fs/fat/file.c
@@ -257,26 +257,34 @@ int fat_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
257} 257}
258EXPORT_SYMBOL_GPL(fat_getattr); 258EXPORT_SYMBOL_GPL(fat_getattr);
259 259
260static int fat_check_mode(const struct msdos_sb_info *sbi, struct inode *inode, 260static int fat_sanitize_mode(const struct msdos_sb_info *sbi,
261 mode_t mode) 261 struct inode *inode, umode_t *mode_ptr)
262{ 262{
263 mode_t mask, req = mode & ~S_IFMT; 263 mode_t mask, perm;
264 264
265 if (S_ISREG(mode)) 265 /*
266 * Note, the basic check is already done by a caller of
267 * (attr->ia_mode & ~MSDOS_VALID_MODE)
268 */
269
270 if (S_ISREG(inode->i_mode))
266 mask = sbi->options.fs_fmask; 271 mask = sbi->options.fs_fmask;
267 else 272 else
268 mask = sbi->options.fs_dmask; 273 mask = sbi->options.fs_dmask;
269 274
275 perm = *mode_ptr & ~(S_IFMT | mask);
276
270 /* 277 /*
271 * Of the r and x bits, all (subject to umask) must be present. Of the 278 * Of the r and x bits, all (subject to umask) must be present. Of the
272 * w bits, either all (subject to umask) or none must be present. 279 * w bits, either all (subject to umask) or none must be present.
273 */ 280 */
274 req &= ~mask; 281 if ((perm & (S_IRUGO | S_IXUGO)) != (inode->i_mode & (S_IRUGO|S_IXUGO)))
275 if ((req & (S_IRUGO | S_IXUGO)) != (inode->i_mode & (S_IRUGO|S_IXUGO)))
276 return -EPERM; 282 return -EPERM;
277 if ((req & S_IWUGO) && ((req & S_IWUGO) != (S_IWUGO & ~mask))) 283 if ((perm & S_IWUGO) && ((perm & S_IWUGO) != (S_IWUGO & ~mask)))
278 return -EPERM; 284 return -EPERM;
279 285
286 *mode_ptr &= S_IFMT | perm;
287
280 return 0; 288 return 0;
281} 289}
282 290
@@ -299,7 +307,7 @@ int fat_setattr(struct dentry *dentry, struct iattr *attr)
299{ 307{
300 struct msdos_sb_info *sbi = MSDOS_SB(dentry->d_sb); 308 struct msdos_sb_info *sbi = MSDOS_SB(dentry->d_sb);
301 struct inode *inode = dentry->d_inode; 309 struct inode *inode = dentry->d_inode;
302 int mask, error = 0; 310 int error = 0;
303 unsigned int ia_valid; 311 unsigned int ia_valid;
304 312
305 lock_kernel(); 313 lock_kernel();
@@ -332,12 +340,13 @@ int fat_setattr(struct dentry *dentry, struct iattr *attr)
332 error = 0; 340 error = 0;
333 goto out; 341 goto out;
334 } 342 }
343
335 if (((attr->ia_valid & ATTR_UID) && 344 if (((attr->ia_valid & ATTR_UID) &&
336 (attr->ia_uid != sbi->options.fs_uid)) || 345 (attr->ia_uid != sbi->options.fs_uid)) ||
337 ((attr->ia_valid & ATTR_GID) && 346 ((attr->ia_valid & ATTR_GID) &&
338 (attr->ia_gid != sbi->options.fs_gid)) || 347 (attr->ia_gid != sbi->options.fs_gid)) ||
339 ((attr->ia_valid & ATTR_MODE) && 348 ((attr->ia_valid & ATTR_MODE) &&
340 fat_check_mode(sbi, inode, attr->ia_mode) < 0)) 349 (attr->ia_mode & ~MSDOS_VALID_MODE)))
341 error = -EPERM; 350 error = -EPERM;
342 351
343 if (error) { 352 if (error) {
@@ -346,15 +355,16 @@ int fat_setattr(struct dentry *dentry, struct iattr *attr)
346 goto out; 355 goto out;
347 } 356 }
348 357
349 error = inode_setattr(inode, attr); 358 /*
350 if (error) 359 * We don't return -EPERM here. Yes, strange, but this is too
351 goto out; 360 * old behavior.
361 */
362 if (attr->ia_valid & ATTR_MODE) {
363 if (fat_sanitize_mode(sbi, inode, &attr->ia_mode) < 0)
364 attr->ia_valid &= ~ATTR_MODE;
365 }
352 366
353 if (S_ISDIR(inode->i_mode)) 367 error = inode_setattr(inode, attr);
354 mask = sbi->options.fs_dmask;
355 else
356 mask = sbi->options.fs_fmask;
357 inode->i_mode &= S_IFMT | (S_IRWXUGO & ~mask);
358out: 368out:
359 unlock_kernel(); 369 unlock_kernel();
360 return error; 370 return error;
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index fb77e0962132..3141690558c8 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -488,7 +488,12 @@ static struct fuse_conn *new_conn(struct super_block *sb)
488 err = bdi_init(&fc->bdi); 488 err = bdi_init(&fc->bdi);
489 if (err) 489 if (err)
490 goto error_kfree; 490 goto error_kfree;
491 err = bdi_register_dev(&fc->bdi, fc->dev); 491 if (sb->s_bdev) {
492 err = bdi_register(&fc->bdi, NULL, "%u:%u-fuseblk",
493 MAJOR(fc->dev), MINOR(fc->dev));
494 } else {
495 err = bdi_register_dev(&fc->bdi, fc->dev);
496 }
492 if (err) 497 if (err)
493 goto error_bdi_destroy; 498 goto error_bdi_destroy;
494 /* 499 /*
@@ -586,7 +591,7 @@ static void process_init_reply(struct fuse_conn *fc, struct fuse_req *req)
586 fc->bdi.ra_pages = min(fc->bdi.ra_pages, ra_pages); 591 fc->bdi.ra_pages = min(fc->bdi.ra_pages, ra_pages);
587 fc->minor = arg->minor; 592 fc->minor = arg->minor;
588 fc->max_write = arg->minor < 5 ? 4096 : arg->max_write; 593 fc->max_write = arg->minor < 5 ? 4096 : arg->max_write;
589 fc->max_write = min_t(unsigned, 4096, fc->max_write); 594 fc->max_write = max_t(unsigned, 4096, fc->max_write);
590 fc->conn_init = 1; 595 fc->conn_init = 1;
591 } 596 }
592 fuse_put_request(fc, req); 597 fuse_put_request(fc, req);
@@ -662,7 +667,7 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
662 fc->flags = d.flags; 667 fc->flags = d.flags;
663 fc->user_id = d.user_id; 668 fc->user_id = d.user_id;
664 fc->group_id = d.group_id; 669 fc->group_id = d.group_id;
665 fc->max_read = min_t(unsigned, 4096, d.max_read); 670 fc->max_read = max_t(unsigned, 4096, d.max_read);
666 671
667 /* Used by get_root_inode() */ 672 /* Used by get_root_inode() */
668 sb->s_fs_info = fc; 673 sb->s_fs_info = fc;
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index c19184f2e70e..bec76b1c2bb0 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -246,15 +246,11 @@ static void find_metapath(const struct gfs2_sbd *sdp, u64 block,
246 246
247} 247}
248 248
249static inline unsigned int zero_metapath_length(const struct metapath *mp, 249static inline unsigned int metapath_branch_start(const struct metapath *mp)
250 unsigned height)
251{ 250{
252 unsigned int i; 251 if (mp->mp_list[0] == 0)
253 for (i = 0; i < height - 1; i++) { 252 return 2;
254 if (mp->mp_list[i] != 0) 253 return 1;
255 return i;
256 }
257 return height;
258} 254}
259 255
260/** 256/**
@@ -436,7 +432,7 @@ static int gfs2_bmap_alloc(struct inode *inode, const sector_t lblock,
436 struct gfs2_sbd *sdp = GFS2_SB(inode); 432 struct gfs2_sbd *sdp = GFS2_SB(inode);
437 struct buffer_head *dibh = mp->mp_bh[0]; 433 struct buffer_head *dibh = mp->mp_bh[0];
438 u64 bn, dblock = 0; 434 u64 bn, dblock = 0;
439 unsigned n, i, blks, alloced = 0, iblks = 0, zmpl = 0; 435 unsigned n, i, blks, alloced = 0, iblks = 0, branch_start = 0;
440 unsigned dblks = 0; 436 unsigned dblks = 0;
441 unsigned ptrs_per_blk; 437 unsigned ptrs_per_blk;
442 const unsigned end_of_metadata = height - 1; 438 const unsigned end_of_metadata = height - 1;
@@ -471,9 +467,8 @@ static int gfs2_bmap_alloc(struct inode *inode, const sector_t lblock,
471 /* Building up tree height */ 467 /* Building up tree height */
472 state = ALLOC_GROW_HEIGHT; 468 state = ALLOC_GROW_HEIGHT;
473 iblks = height - ip->i_height; 469 iblks = height - ip->i_height;
474 zmpl = zero_metapath_length(mp, height); 470 branch_start = metapath_branch_start(mp);
475 iblks -= zmpl; 471 iblks += (height - branch_start);
476 iblks += height;
477 } 472 }
478 } 473 }
479 474
@@ -509,13 +504,13 @@ static int gfs2_bmap_alloc(struct inode *inode, const sector_t lblock,
509 sizeof(struct gfs2_meta_header)); 504 sizeof(struct gfs2_meta_header));
510 *ptr = zero_bn; 505 *ptr = zero_bn;
511 state = ALLOC_GROW_DEPTH; 506 state = ALLOC_GROW_DEPTH;
512 for(i = zmpl; i < height; i++) { 507 for(i = branch_start; i < height; i++) {
513 if (mp->mp_bh[i] == NULL) 508 if (mp->mp_bh[i] == NULL)
514 break; 509 break;
515 brelse(mp->mp_bh[i]); 510 brelse(mp->mp_bh[i]);
516 mp->mp_bh[i] = NULL; 511 mp->mp_bh[i] = NULL;
517 } 512 }
518 i = zmpl; 513 i = branch_start;
519 } 514 }
520 if (n == 0) 515 if (n == 0)
521 break; 516 break;
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
index d31badadef8f..07d84d16cda4 100644
--- a/fs/gfs2/glops.c
+++ b/fs/gfs2/glops.c
@@ -249,7 +249,7 @@ static int inode_go_lock(struct gfs2_holder *gh)
249 struct gfs2_inode *ip = gl->gl_object; 249 struct gfs2_inode *ip = gl->gl_object;
250 int error = 0; 250 int error = 0;
251 251
252 if (!ip) 252 if (!ip || (gh->gh_flags & GL_SKIP))
253 return 0; 253 return 0;
254 254
255 if (test_bit(GIF_INVALID, &ip->i_flags)) { 255 if (test_bit(GIF_INVALID, &ip->i_flags)) {
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index 9c2c0b90b22a..eabe5eac41da 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -236,6 +236,7 @@ enum {
236 GIF_INVALID = 0, 236 GIF_INVALID = 0,
237 GIF_QD_LOCKED = 1, 237 GIF_QD_LOCKED = 1,
238 GIF_SW_PAGED = 3, 238 GIF_SW_PAGED = 3,
239 GIF_USER = 4, /* user inode, not metadata addr space */
239}; 240};
240 241
241struct gfs2_dinode_host { 242struct gfs2_dinode_host {
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index 3a9ef526c308..09453d057e41 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -47,8 +47,7 @@ static int iget_test(struct inode *inode, void *opaque)
47 struct gfs2_inode *ip = GFS2_I(inode); 47 struct gfs2_inode *ip = GFS2_I(inode);
48 u64 *no_addr = opaque; 48 u64 *no_addr = opaque;
49 49
50 if (ip->i_no_addr == *no_addr && 50 if (ip->i_no_addr == *no_addr && test_bit(GIF_USER, &ip->i_flags))
51 inode->i_private != NULL)
52 return 1; 51 return 1;
53 52
54 return 0; 53 return 0;
@@ -61,6 +60,7 @@ static int iget_set(struct inode *inode, void *opaque)
61 60
62 inode->i_ino = (unsigned long)*no_addr; 61 inode->i_ino = (unsigned long)*no_addr;
63 ip->i_no_addr = *no_addr; 62 ip->i_no_addr = *no_addr;
63 set_bit(GIF_USER, &ip->i_flags);
64 return 0; 64 return 0;
65} 65}
66 66
@@ -86,7 +86,7 @@ static int iget_skip_test(struct inode *inode, void *opaque)
86 struct gfs2_inode *ip = GFS2_I(inode); 86 struct gfs2_inode *ip = GFS2_I(inode);
87 struct gfs2_skip_data *data = opaque; 87 struct gfs2_skip_data *data = opaque;
88 88
89 if (ip->i_no_addr == data->no_addr && inode->i_private != NULL){ 89 if (ip->i_no_addr == data->no_addr && test_bit(GIF_USER, &ip->i_flags)){
90 if (inode->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE)){ 90 if (inode->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE)){
91 data->skipped = 1; 91 data->skipped = 1;
92 return 0; 92 return 0;
@@ -105,6 +105,7 @@ static int iget_skip_set(struct inode *inode, void *opaque)
105 return 1; 105 return 1;
106 inode->i_ino = (unsigned long)(data->no_addr); 106 inode->i_ino = (unsigned long)(data->no_addr);
107 ip->i_no_addr = data->no_addr; 107 ip->i_no_addr = data->no_addr;
108 set_bit(GIF_USER, &ip->i_flags);
108 return 0; 109 return 0;
109} 110}
110 111
@@ -166,7 +167,7 @@ void gfs2_set_iop(struct inode *inode)
166 * Returns: A VFS inode, or an error 167 * Returns: A VFS inode, or an error
167 */ 168 */
168 169
169struct inode *gfs2_inode_lookup(struct super_block *sb, 170struct inode *gfs2_inode_lookup(struct super_block *sb,
170 unsigned int type, 171 unsigned int type,
171 u64 no_addr, 172 u64 no_addr,
172 u64 no_formal_ino, int skip_freeing) 173 u64 no_formal_ino, int skip_freeing)
@@ -187,7 +188,6 @@ struct inode *gfs2_inode_lookup(struct super_block *sb,
187 188
188 if (inode->i_state & I_NEW) { 189 if (inode->i_state & I_NEW) {
189 struct gfs2_sbd *sdp = GFS2_SB(inode); 190 struct gfs2_sbd *sdp = GFS2_SB(inode);
190 inode->i_private = ip;
191 ip->i_no_formal_ino = no_formal_ino; 191 ip->i_no_formal_ino = no_formal_ino;
192 192
193 error = gfs2_glock_get(sdp, no_addr, &gfs2_inode_glops, CREATE, &ip->i_gl); 193 error = gfs2_glock_get(sdp, no_addr, &gfs2_inode_glops, CREATE, &ip->i_gl);
diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c
index 85aea27b4a86..78d75f892f82 100644
--- a/fs/gfs2/meta_io.c
+++ b/fs/gfs2/meta_io.c
@@ -1,6 +1,6 @@
1/* 1/*
2 * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. 2 * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
3 * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. 3 * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
4 * 4 *
5 * This copyrighted material is made available to anyone wishing to use, 5 * This copyrighted material is made available to anyone wishing to use,
6 * modify, copy, or redistribute it subject to the terms and conditions 6 * modify, copy, or redistribute it subject to the terms and conditions
@@ -69,13 +69,15 @@ static const struct address_space_operations aspace_aops = {
69struct inode *gfs2_aspace_get(struct gfs2_sbd *sdp) 69struct inode *gfs2_aspace_get(struct gfs2_sbd *sdp)
70{ 70{
71 struct inode *aspace; 71 struct inode *aspace;
72 struct gfs2_inode *ip;
72 73
73 aspace = new_inode(sdp->sd_vfs); 74 aspace = new_inode(sdp->sd_vfs);
74 if (aspace) { 75 if (aspace) {
75 mapping_set_gfp_mask(aspace->i_mapping, GFP_NOFS); 76 mapping_set_gfp_mask(aspace->i_mapping, GFP_NOFS);
76 aspace->i_mapping->a_ops = &aspace_aops; 77 aspace->i_mapping->a_ops = &aspace_aops;
77 aspace->i_size = ~0ULL; 78 aspace->i_size = ~0ULL;
78 aspace->i_private = NULL; 79 ip = GFS2_I(aspace);
80 clear_bit(GIF_USER, &ip->i_flags);
79 insert_inode_hash(aspace); 81 insert_inode_hash(aspace);
80 } 82 }
81 return aspace; 83 return aspace;
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index ef9c6c4f80f6..b2028c82e8d1 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -142,8 +142,8 @@ static int init_names(struct gfs2_sbd *sdp, int silent)
142 if (!table[0]) 142 if (!table[0])
143 table = sdp->sd_vfs->s_id; 143 table = sdp->sd_vfs->s_id;
144 144
145 snprintf(sdp->sd_proto_name, GFS2_FSNAME_LEN, "%s", proto); 145 strlcpy(sdp->sd_proto_name, proto, GFS2_FSNAME_LEN);
146 snprintf(sdp->sd_table_name, GFS2_FSNAME_LEN, "%s", table); 146 strlcpy(sdp->sd_table_name, table, GFS2_FSNAME_LEN);
147 147
148 table = sdp->sd_table_name; 148 table = sdp->sd_table_name;
149 while ((table = strchr(table, '/'))) 149 while ((table = strchr(table, '/')))
diff --git a/fs/gfs2/ops_super.c b/fs/gfs2/ops_super.c
index 2278c68b7e35..0b7cc920eb89 100644
--- a/fs/gfs2/ops_super.c
+++ b/fs/gfs2/ops_super.c
@@ -1,6 +1,6 @@
1/* 1/*
2 * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. 2 * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
3 * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. 3 * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
4 * 4 *
5 * This copyrighted material is made available to anyone wishing to use, 5 * This copyrighted material is made available to anyone wishing to use,
6 * modify, copy, or redistribute it subject to the terms and conditions 6 * modify, copy, or redistribute it subject to the terms and conditions
@@ -52,7 +52,7 @@ static int gfs2_write_inode(struct inode *inode, int sync)
52 struct gfs2_inode *ip = GFS2_I(inode); 52 struct gfs2_inode *ip = GFS2_I(inode);
53 53
54 /* Check this is a "normal" inode */ 54 /* Check this is a "normal" inode */
55 if (inode->i_private) { 55 if (test_bit(GIF_USER, &ip->i_flags)) {
56 if (current->flags & PF_MEMALLOC) 56 if (current->flags & PF_MEMALLOC)
57 return 0; 57 return 0;
58 if (sync) 58 if (sync)
@@ -297,8 +297,9 @@ static int gfs2_remount_fs(struct super_block *sb, int *flags, char *data)
297 */ 297 */
298static void gfs2_drop_inode(struct inode *inode) 298static void gfs2_drop_inode(struct inode *inode)
299{ 299{
300 if (inode->i_private && inode->i_nlink) { 300 struct gfs2_inode *ip = GFS2_I(inode);
301 struct gfs2_inode *ip = GFS2_I(inode); 301
302 if (test_bit(GIF_USER, &ip->i_flags) && inode->i_nlink) {
302 struct gfs2_glock *gl = ip->i_iopen_gh.gh_gl; 303 struct gfs2_glock *gl = ip->i_iopen_gh.gh_gl;
303 if (gl && test_bit(GLF_DEMOTE, &gl->gl_flags)) 304 if (gl && test_bit(GLF_DEMOTE, &gl->gl_flags))
304 clear_nlink(inode); 305 clear_nlink(inode);
@@ -314,12 +315,13 @@ static void gfs2_drop_inode(struct inode *inode)
314 315
315static void gfs2_clear_inode(struct inode *inode) 316static void gfs2_clear_inode(struct inode *inode)
316{ 317{
318 struct gfs2_inode *ip = GFS2_I(inode);
319
317 /* This tells us its a "real" inode and not one which only 320 /* This tells us its a "real" inode and not one which only
318 * serves to contain an address space (see rgrp.c, meta_io.c) 321 * serves to contain an address space (see rgrp.c, meta_io.c)
319 * which therefore doesn't have its own glocks. 322 * which therefore doesn't have its own glocks.
320 */ 323 */
321 if (inode->i_private) { 324 if (test_bit(GIF_USER, &ip->i_flags)) {
322 struct gfs2_inode *ip = GFS2_I(inode);
323 ip->i_gl->gl_object = NULL; 325 ip->i_gl->gl_object = NULL;
324 gfs2_glock_schedule_for_reclaim(ip->i_gl); 326 gfs2_glock_schedule_for_reclaim(ip->i_gl);
325 gfs2_glock_put(ip->i_gl); 327 gfs2_glock_put(ip->i_gl);
@@ -419,7 +421,7 @@ static void gfs2_delete_inode(struct inode *inode)
419 struct gfs2_holder gh; 421 struct gfs2_holder gh;
420 int error; 422 int error;
421 423
422 if (!inode->i_private) 424 if (!test_bit(GIF_USER, &ip->i_flags))
423 goto out; 425 goto out;
424 426
425 error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh); 427 error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh);
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 7e8f0b1d6c6e..3401628d742b 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -195,7 +195,7 @@ ulong_aligned:
195 depending on architecture. I've experimented with several ways 195 depending on architecture. I've experimented with several ways
196 of writing this section such as using an else before the goto 196 of writing this section such as using an else before the goto
197 but this one seems to be the fastest. */ 197 but this one seems to be the fastest. */
198 while ((unsigned char *)plong < end - 1) { 198 while ((unsigned char *)plong < end - sizeof(unsigned long)) {
199 prefetch(plong + 1); 199 prefetch(plong + 1);
200 if (((*plong) & LBITMASK) != lskipval) 200 if (((*plong) & LBITMASK) != lskipval)
201 break; 201 break;
@@ -1495,7 +1495,7 @@ u64 gfs2_alloc_block(struct gfs2_inode *ip, unsigned int *n)
1495 1495
1496 al->al_alloced += *n; 1496 al->al_alloced += *n;
1497 1497
1498 gfs2_statfs_change(sdp, 0, -*n, 0); 1498 gfs2_statfs_change(sdp, 0, -(s64)*n, 0);
1499 gfs2_quota_change(ip, *n, ip->i_inode.i_uid, ip->i_inode.i_gid); 1499 gfs2_quota_change(ip, *n, ip->i_inode.i_uid, ip->i_inode.i_gid);
1500 1500
1501 spin_lock(&sdp->sd_rindex_spin); 1501 spin_lock(&sdp->sd_rindex_spin);
diff --git a/fs/hppfs/Makefile b/fs/hppfs/Makefile
index 8a1f50344368..3a982bd975d2 100644
--- a/fs/hppfs/Makefile
+++ b/fs/hppfs/Makefile
@@ -3,7 +3,4 @@
3# Licensed under the GPL 3# Licensed under the GPL
4# 4#
5 5
6hppfs-objs := hppfs.o 6obj-$(CONFIG_HPPFS) += hppfs.o
7
8obj-y =
9obj-$(CONFIG_HPPFS) += $(hppfs-objs)
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
index 4d99685fdce4..a2ed72f7ceee 100644
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -168,6 +168,7 @@ static int journal_submit_commit_record(journal_t *journal,
168 spin_unlock(&journal->j_state_lock); 168 spin_unlock(&journal->j_state_lock);
169 169
170 /* And try again, without the barrier */ 170 /* And try again, without the barrier */
171 lock_buffer(bh);
171 set_buffer_uptodate(bh); 172 set_buffer_uptodate(bh);
172 set_buffer_dirty(bh); 173 set_buffer_dirty(bh);
173 ret = submit_bh(WRITE, bh); 174 ret = submit_bh(WRITE, bh);
diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c
index 5d0405a9e7ca..058f50f65b76 100644
--- a/fs/jbd2/recovery.c
+++ b/fs/jbd2/recovery.c
@@ -344,6 +344,7 @@ static int calc_chksums(journal_t *journal, struct buffer_head *bh,
344 *crc32_sum = crc32_be(*crc32_sum, (void *)obh->b_data, 344 *crc32_sum = crc32_be(*crc32_sum, (void *)obh->b_data,
345 obh->b_size); 345 obh->b_size);
346 } 346 }
347 put_bh(obh);
347 } 348 }
348 return 0; 349 return 0;
349} 350}
@@ -610,9 +611,8 @@ static int do_one_pass(journal_t *journal,
610 chksum_err = chksum_seen = 0; 611 chksum_err = chksum_seen = 0;
611 612
612 if (info->end_transaction) { 613 if (info->end_transaction) {
613 printk(KERN_ERR "JBD: Transaction %u " 614 journal->j_failed_commit =
614 "found to be corrupt.\n", 615 info->end_transaction;
615 next_commit_ID - 1);
616 brelse(bh); 616 brelse(bh);
617 break; 617 break;
618 } 618 }
@@ -643,10 +643,8 @@ static int do_one_pass(journal_t *journal,
643 643
644 if (!JBD2_HAS_INCOMPAT_FEATURE(journal, 644 if (!JBD2_HAS_INCOMPAT_FEATURE(journal,
645 JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT)){ 645 JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT)){
646 printk(KERN_ERR 646 journal->j_failed_commit =
647 "JBD: Transaction %u " 647 next_commit_ID;
648 "found to be corrupt.\n",
649 next_commit_ID);
650 brelse(bh); 648 brelse(bh);
651 break; 649 break;
652 } 650 }
diff --git a/fs/libfs.c b/fs/libfs.c
index b004dfadd891..baeb71ee1cde 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -512,6 +512,20 @@ void simple_release_fs(struct vfsmount **mount, int *count)
512 mntput(mnt); 512 mntput(mnt);
513} 513}
514 514
515/**
516 * simple_read_from_buffer - copy data from the buffer to user space
517 * @to: the user space buffer to read to
518 * @count: the maximum number of bytes to read
519 * @ppos: the current position in the buffer
520 * @from: the buffer to read from
521 * @available: the size of the buffer
522 *
523 * The simple_read_from_buffer() function reads up to @count bytes from the
524 * buffer @from at offset @ppos into the user space address starting at @to.
525 *
526 * On success, the number of bytes read is returned and the offset @ppos is
527 * advanced by this number, or negative value is returned on error.
528 **/
515ssize_t simple_read_from_buffer(void __user *to, size_t count, loff_t *ppos, 529ssize_t simple_read_from_buffer(void __user *to, size_t count, loff_t *ppos,
516 const void *from, size_t available) 530 const void *from, size_t available)
517{ 531{
@@ -528,6 +542,37 @@ ssize_t simple_read_from_buffer(void __user *to, size_t count, loff_t *ppos,
528 return count; 542 return count;
529} 543}
530 544
545/**
546 * memory_read_from_buffer - copy data from the buffer
547 * @to: the kernel space buffer to read to
548 * @count: the maximum number of bytes to read
549 * @ppos: the current position in the buffer
550 * @from: the buffer to read from
551 * @available: the size of the buffer
552 *
553 * The memory_read_from_buffer() function reads up to @count bytes from the
554 * buffer @from at offset @ppos into the kernel space address starting at @to.
555 *
556 * On success, the number of bytes read is returned and the offset @ppos is
557 * advanced by this number, or negative value is returned on error.
558 **/
559ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos,
560 const void *from, size_t available)
561{
562 loff_t pos = *ppos;
563
564 if (pos < 0)
565 return -EINVAL;
566 if (pos >= available)
567 return 0;
568 if (count > available - pos)
569 count = available - pos;
570 memcpy(to, from + pos, count);
571 *ppos = pos + count;
572
573 return count;
574}
575
531/* 576/*
532 * Transaction based IO. 577 * Transaction based IO.
533 * The file expects a single write which triggers the transaction, and then 578 * The file expects a single write which triggers the transaction, and then
@@ -800,6 +845,7 @@ EXPORT_SYMBOL(simple_statfs);
800EXPORT_SYMBOL(simple_sync_file); 845EXPORT_SYMBOL(simple_sync_file);
801EXPORT_SYMBOL(simple_unlink); 846EXPORT_SYMBOL(simple_unlink);
802EXPORT_SYMBOL(simple_read_from_buffer); 847EXPORT_SYMBOL(simple_read_from_buffer);
848EXPORT_SYMBOL(memory_read_from_buffer);
803EXPORT_SYMBOL(simple_transaction_get); 849EXPORT_SYMBOL(simple_transaction_get);
804EXPORT_SYMBOL(simple_transaction_read); 850EXPORT_SYMBOL(simple_transaction_read);
805EXPORT_SYMBOL(simple_transaction_release); 851EXPORT_SYMBOL(simple_transaction_release);
diff --git a/fs/locks.c b/fs/locks.c
index 11dbf08651b7..dce8c747371c 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -561,9 +561,6 @@ static void locks_insert_lock(struct file_lock **pos, struct file_lock *fl)
561 /* insert into file's list */ 561 /* insert into file's list */
562 fl->fl_next = *pos; 562 fl->fl_next = *pos;
563 *pos = fl; 563 *pos = fl;
564
565 if (fl->fl_ops && fl->fl_ops->fl_insert)
566 fl->fl_ops->fl_insert(fl);
567} 564}
568 565
569/* 566/*
@@ -586,9 +583,6 @@ static void locks_delete_lock(struct file_lock **thisfl_p)
586 fl->fl_fasync = NULL; 583 fl->fl_fasync = NULL;
587 } 584 }
588 585
589 if (fl->fl_ops && fl->fl_ops->fl_remove)
590 fl->fl_ops->fl_remove(fl);
591
592 if (fl->fl_nspid) { 586 if (fl->fl_nspid) {
593 put_pid(fl->fl_nspid); 587 put_pid(fl->fl_nspid);
594 fl->fl_nspid = NULL; 588 fl->fl_nspid = NULL;
diff --git a/fs/namei.c b/fs/namei.c
index c7e43536c49a..01e67dddcc3d 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -581,15 +581,13 @@ static __always_inline int link_path_walk(const char *name, struct nameidata *nd
581 int result; 581 int result;
582 582
583 /* make sure the stuff we saved doesn't go away */ 583 /* make sure the stuff we saved doesn't go away */
584 dget(save.dentry); 584 path_get(&save);
585 mntget(save.mnt);
586 585
587 result = __link_path_walk(name, nd); 586 result = __link_path_walk(name, nd);
588 if (result == -ESTALE) { 587 if (result == -ESTALE) {
589 /* nd->path had been dropped */ 588 /* nd->path had been dropped */
590 nd->path = save; 589 nd->path = save;
591 dget(nd->path.dentry); 590 path_get(&nd->path);
592 mntget(nd->path.mnt);
593 nd->flags |= LOOKUP_REVAL; 591 nd->flags |= LOOKUP_REVAL;
594 result = __link_path_walk(name, nd); 592 result = __link_path_walk(name, nd);
595 } 593 }
@@ -1216,8 +1214,9 @@ int vfs_path_lookup(struct dentry *dentry, struct vfsmount *mnt,
1216 nd->flags = flags; 1214 nd->flags = flags;
1217 nd->depth = 0; 1215 nd->depth = 0;
1218 1216
1219 nd->path.mnt = mntget(mnt); 1217 nd->path.dentry = dentry;
1220 nd->path.dentry = dget(dentry); 1218 nd->path.mnt = mnt;
1219 path_get(&nd->path);
1221 1220
1222 retval = path_walk(name, nd); 1221 retval = path_walk(name, nd);
1223 if (unlikely(!retval && !audit_dummy_context() && nd->path.dentry && 1222 if (unlikely(!retval && !audit_dummy_context() && nd->path.dentry &&
@@ -2857,16 +2856,17 @@ int generic_readlink(struct dentry *dentry, char __user *buffer, int buflen)
2857{ 2856{
2858 struct nameidata nd; 2857 struct nameidata nd;
2859 void *cookie; 2858 void *cookie;
2859 int res;
2860 2860
2861 nd.depth = 0; 2861 nd.depth = 0;
2862 cookie = dentry->d_inode->i_op->follow_link(dentry, &nd); 2862 cookie = dentry->d_inode->i_op->follow_link(dentry, &nd);
2863 if (!IS_ERR(cookie)) { 2863 if (IS_ERR(cookie))
2864 int res = vfs_readlink(dentry, buffer, buflen, nd_get_link(&nd)); 2864 return PTR_ERR(cookie);
2865 if (dentry->d_inode->i_op->put_link) 2865
2866 dentry->d_inode->i_op->put_link(dentry, &nd, cookie); 2866 res = vfs_readlink(dentry, buffer, buflen, nd_get_link(&nd));
2867 cookie = ERR_PTR(res); 2867 if (dentry->d_inode->i_op->put_link)
2868 } 2868 dentry->d_inode->i_op->put_link(dentry, &nd, cookie);
2869 return PTR_ERR(cookie); 2869 return res;
2870} 2870}
2871 2871
2872int vfs_follow_link(struct nameidata *nd, const char *link) 2872int vfs_follow_link(struct nameidata *nd, const char *link)
diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c
index 49c7cd0502cc..779d2eb649c5 100644
--- a/fs/nfs/mount_clnt.c
+++ b/fs/nfs/mount_clnt.c
@@ -130,10 +130,11 @@ static int xdr_decode_fhstatus3(struct rpc_rqst *req, __be32 *p,
130 struct mnt_fhstatus *res) 130 struct mnt_fhstatus *res)
131{ 131{
132 struct nfs_fh *fh = res->fh; 132 struct nfs_fh *fh = res->fh;
133 unsigned size;
133 134
134 if ((res->status = ntohl(*p++)) == 0) { 135 if ((res->status = ntohl(*p++)) == 0) {
135 int size = ntohl(*p++); 136 size = ntohl(*p++);
136 if (size <= NFS3_FHSIZE) { 137 if (size <= NFS3_FHSIZE && size != 0) {
137 fh->size = size; 138 fh->size = size;
138 memcpy(fh->data, p, size); 139 memcpy(fh->data, p, size);
139 } else 140 } else
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 2a4a024a4e7b..614efeed5437 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1216,8 +1216,6 @@ static int nfs_validate_mount_data(void *options,
1216{ 1216{
1217 struct nfs_mount_data *data = (struct nfs_mount_data *)options; 1217 struct nfs_mount_data *data = (struct nfs_mount_data *)options;
1218 1218
1219 memset(args, 0, sizeof(*args));
1220
1221 if (data == NULL) 1219 if (data == NULL)
1222 goto out_no_data; 1220 goto out_no_data;
1223 1221
@@ -1251,13 +1249,13 @@ static int nfs_validate_mount_data(void *options,
1251 case 5: 1249 case 5:
1252 memset(data->context, 0, sizeof(data->context)); 1250 memset(data->context, 0, sizeof(data->context));
1253 case 6: 1251 case 6:
1254 if (data->flags & NFS_MOUNT_VER3) 1252 if (data->flags & NFS_MOUNT_VER3) {
1253 if (data->root.size > NFS3_FHSIZE || data->root.size == 0)
1254 goto out_invalid_fh;
1255 mntfh->size = data->root.size; 1255 mntfh->size = data->root.size;
1256 else 1256 } else
1257 mntfh->size = NFS2_FHSIZE; 1257 mntfh->size = NFS2_FHSIZE;
1258 1258
1259 if (mntfh->size > sizeof(mntfh->data))
1260 goto out_invalid_fh;
1261 1259
1262 memcpy(mntfh->data, data->root.data, mntfh->size); 1260 memcpy(mntfh->data, data->root.data, mntfh->size);
1263 if (mntfh->size < sizeof(mntfh->data)) 1261 if (mntfh->size < sizeof(mntfh->data))
@@ -1585,24 +1583,29 @@ static int nfs_get_sb(struct file_system_type *fs_type,
1585{ 1583{
1586 struct nfs_server *server = NULL; 1584 struct nfs_server *server = NULL;
1587 struct super_block *s; 1585 struct super_block *s;
1588 struct nfs_fh mntfh; 1586 struct nfs_parsed_mount_data *data;
1589 struct nfs_parsed_mount_data data; 1587 struct nfs_fh *mntfh;
1590 struct dentry *mntroot; 1588 struct dentry *mntroot;
1591 int (*compare_super)(struct super_block *, void *) = nfs_compare_super; 1589 int (*compare_super)(struct super_block *, void *) = nfs_compare_super;
1592 struct nfs_sb_mountdata sb_mntdata = { 1590 struct nfs_sb_mountdata sb_mntdata = {
1593 .mntflags = flags, 1591 .mntflags = flags,
1594 }; 1592 };
1595 int error; 1593 int error = -ENOMEM;
1594
1595 data = kzalloc(sizeof(*data), GFP_KERNEL);
1596 mntfh = kzalloc(sizeof(*mntfh), GFP_KERNEL);
1597 if (data == NULL || mntfh == NULL)
1598 goto out_free_fh;
1596 1599
1597 security_init_mnt_opts(&data.lsm_opts); 1600 security_init_mnt_opts(&data->lsm_opts);
1598 1601
1599 /* Validate the mount data */ 1602 /* Validate the mount data */
1600 error = nfs_validate_mount_data(raw_data, &data, &mntfh, dev_name); 1603 error = nfs_validate_mount_data(raw_data, data, mntfh, dev_name);
1601 if (error < 0) 1604 if (error < 0)
1602 goto out; 1605 goto out;
1603 1606
1604 /* Get a volume representation */ 1607 /* Get a volume representation */
1605 server = nfs_create_server(&data, &mntfh); 1608 server = nfs_create_server(data, mntfh);
1606 if (IS_ERR(server)) { 1609 if (IS_ERR(server)) {
1607 error = PTR_ERR(server); 1610 error = PTR_ERR(server);
1608 goto out; 1611 goto out;
@@ -1630,16 +1633,16 @@ static int nfs_get_sb(struct file_system_type *fs_type,
1630 1633
1631 if (!s->s_root) { 1634 if (!s->s_root) {
1632 /* initial superblock/root creation */ 1635 /* initial superblock/root creation */
1633 nfs_fill_super(s, &data); 1636 nfs_fill_super(s, data);
1634 } 1637 }
1635 1638
1636 mntroot = nfs_get_root(s, &mntfh); 1639 mntroot = nfs_get_root(s, mntfh);
1637 if (IS_ERR(mntroot)) { 1640 if (IS_ERR(mntroot)) {
1638 error = PTR_ERR(mntroot); 1641 error = PTR_ERR(mntroot);
1639 goto error_splat_super; 1642 goto error_splat_super;
1640 } 1643 }
1641 1644
1642 error = security_sb_set_mnt_opts(s, &data.lsm_opts); 1645 error = security_sb_set_mnt_opts(s, &data->lsm_opts);
1643 if (error) 1646 if (error)
1644 goto error_splat_root; 1647 goto error_splat_root;
1645 1648
@@ -1649,9 +1652,12 @@ static int nfs_get_sb(struct file_system_type *fs_type,
1649 error = 0; 1652 error = 0;
1650 1653
1651out: 1654out:
1652 kfree(data.nfs_server.hostname); 1655 kfree(data->nfs_server.hostname);
1653 kfree(data.mount_server.hostname); 1656 kfree(data->mount_server.hostname);
1654 security_free_mnt_opts(&data.lsm_opts); 1657 security_free_mnt_opts(&data->lsm_opts);
1658out_free_fh:
1659 kfree(mntfh);
1660 kfree(data);
1655 return error; 1661 return error;
1656 1662
1657out_err_nosb: 1663out_err_nosb:
@@ -1800,8 +1806,6 @@ static int nfs4_validate_mount_data(void *options,
1800 struct nfs4_mount_data *data = (struct nfs4_mount_data *)options; 1806 struct nfs4_mount_data *data = (struct nfs4_mount_data *)options;
1801 char *c; 1807 char *c;
1802 1808
1803 memset(args, 0, sizeof(*args));
1804
1805 if (data == NULL) 1809 if (data == NULL)
1806 goto out_no_data; 1810 goto out_no_data;
1807 1811
@@ -1959,26 +1963,31 @@ out_no_client_address:
1959static int nfs4_get_sb(struct file_system_type *fs_type, 1963static int nfs4_get_sb(struct file_system_type *fs_type,
1960 int flags, const char *dev_name, void *raw_data, struct vfsmount *mnt) 1964 int flags, const char *dev_name, void *raw_data, struct vfsmount *mnt)
1961{ 1965{
1962 struct nfs_parsed_mount_data data; 1966 struct nfs_parsed_mount_data *data;
1963 struct super_block *s; 1967 struct super_block *s;
1964 struct nfs_server *server; 1968 struct nfs_server *server;
1965 struct nfs_fh mntfh; 1969 struct nfs_fh *mntfh;
1966 struct dentry *mntroot; 1970 struct dentry *mntroot;
1967 int (*compare_super)(struct super_block *, void *) = nfs_compare_super; 1971 int (*compare_super)(struct super_block *, void *) = nfs_compare_super;
1968 struct nfs_sb_mountdata sb_mntdata = { 1972 struct nfs_sb_mountdata sb_mntdata = {
1969 .mntflags = flags, 1973 .mntflags = flags,
1970 }; 1974 };
1971 int error; 1975 int error = -ENOMEM;
1972 1976
1973 security_init_mnt_opts(&data.lsm_opts); 1977 data = kzalloc(sizeof(*data), GFP_KERNEL);
1978 mntfh = kzalloc(sizeof(*mntfh), GFP_KERNEL);
1979 if (data == NULL || mntfh == NULL)
1980 goto out_free_fh;
1981
1982 security_init_mnt_opts(&data->lsm_opts);
1974 1983
1975 /* Validate the mount data */ 1984 /* Validate the mount data */
1976 error = nfs4_validate_mount_data(raw_data, &data, dev_name); 1985 error = nfs4_validate_mount_data(raw_data, data, dev_name);
1977 if (error < 0) 1986 if (error < 0)
1978 goto out; 1987 goto out;
1979 1988
1980 /* Get a volume representation */ 1989 /* Get a volume representation */
1981 server = nfs4_create_server(&data, &mntfh); 1990 server = nfs4_create_server(data, mntfh);
1982 if (IS_ERR(server)) { 1991 if (IS_ERR(server)) {
1983 error = PTR_ERR(server); 1992 error = PTR_ERR(server);
1984 goto out; 1993 goto out;
@@ -2009,13 +2018,13 @@ static int nfs4_get_sb(struct file_system_type *fs_type,
2009 nfs4_fill_super(s); 2018 nfs4_fill_super(s);
2010 } 2019 }
2011 2020
2012 mntroot = nfs4_get_root(s, &mntfh); 2021 mntroot = nfs4_get_root(s, mntfh);
2013 if (IS_ERR(mntroot)) { 2022 if (IS_ERR(mntroot)) {
2014 error = PTR_ERR(mntroot); 2023 error = PTR_ERR(mntroot);
2015 goto error_splat_super; 2024 goto error_splat_super;
2016 } 2025 }
2017 2026
2018 error = security_sb_set_mnt_opts(s, &data.lsm_opts); 2027 error = security_sb_set_mnt_opts(s, &data->lsm_opts);
2019 if (error) 2028 if (error)
2020 goto error_splat_root; 2029 goto error_splat_root;
2021 2030
@@ -2025,10 +2034,13 @@ static int nfs4_get_sb(struct file_system_type *fs_type,
2025 error = 0; 2034 error = 0;
2026 2035
2027out: 2036out:
2028 kfree(data.client_address); 2037 kfree(data->client_address);
2029 kfree(data.nfs_server.export_path); 2038 kfree(data->nfs_server.export_path);
2030 kfree(data.nfs_server.hostname); 2039 kfree(data->nfs_server.hostname);
2031 security_free_mnt_opts(&data.lsm_opts); 2040 security_free_mnt_opts(&data->lsm_opts);
2041out_free_fh:
2042 kfree(mntfh);
2043 kfree(data);
2032 return error; 2044 return error;
2033 2045
2034out_free: 2046out_free:
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 6d8ace3e3259..f333848fd3be 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -739,12 +739,13 @@ int nfs_updatepage(struct file *file, struct page *page,
739 } 739 }
740 740
741 status = nfs_writepage_setup(ctx, page, offset, count); 741 status = nfs_writepage_setup(ctx, page, offset, count);
742 __set_page_dirty_nobuffers(page); 742 if (status < 0)
743 nfs_set_pageerror(page);
744 else
745 __set_page_dirty_nobuffers(page);
743 746
744 dprintk("NFS: nfs_updatepage returns %d (isize %Ld)\n", 747 dprintk("NFS: nfs_updatepage returns %d (isize %Ld)\n",
745 status, (long long)i_size_read(inode)); 748 status, (long long)i_size_read(inode));
746 if (status < 0)
747 nfs_set_pageerror(page);
748 return status; 749 return status;
749} 750}
750 751
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index 0b3ffa9840c2..4d4760e687c3 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -419,9 +419,9 @@ static int do_probe_callback(void *data)
419out_release_client: 419out_release_client:
420 rpc_shutdown_client(client); 420 rpc_shutdown_client(client);
421out_err: 421out_err:
422 put_nfs4_client(clp);
423 dprintk("NFSD: warning: no callback path to client %.*s\n", 422 dprintk("NFSD: warning: no callback path to client %.*s\n",
424 (int)clp->cl_name.len, clp->cl_name.data); 423 (int)clp->cl_name.len, clp->cl_name.data);
424 put_nfs4_client(clp);
425 return status; 425 return status;
426} 426}
427 427
diff --git a/fs/ntfs/upcase.c b/fs/ntfs/upcase.c
index 9101807dc81a..e2f72ca98037 100644
--- a/fs/ntfs/upcase.c
+++ b/fs/ntfs/upcase.c
@@ -77,11 +77,10 @@ ntfschar *generate_default_upcase(void)
77 uc[i] = cpu_to_le16(i); 77 uc[i] = cpu_to_le16(i);
78 for (r = 0; uc_run_table[r][0]; r++) 78 for (r = 0; uc_run_table[r][0]; r++)
79 for (i = uc_run_table[r][0]; i < uc_run_table[r][1]; i++) 79 for (i = uc_run_table[r][0]; i < uc_run_table[r][1]; i++)
80 uc[i] = cpu_to_le16(le16_to_cpu(uc[i]) + 80 le16_add_cpu(&uc[i], uc_run_table[r][2]);
81 uc_run_table[r][2]);
82 for (r = 0; uc_dup_table[r][0]; r++) 81 for (r = 0; uc_dup_table[r][0]; r++)
83 for (i = uc_dup_table[r][0]; i < uc_dup_table[r][1]; i += 2) 82 for (i = uc_dup_table[r][0]; i < uc_dup_table[r][1]; i += 2)
84 uc[i + 1] = cpu_to_le16(le16_to_cpu(uc[i + 1]) - 1); 83 le16_add_cpu(&uc[i + 1], -1);
85 for (r = 0; uc_word_table[r][0]; r++) 84 for (r = 0; uc_word_table[r][0]; r++)
86 uc[uc_word_table[r][0]] = cpu_to_le16(uc_word_table[r][1]); 85 uc[uc_word_table[r][0]] = cpu_to_le16(uc_word_table[r][1]);
87 return uc; 86 return uc;
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
index 41f84c92094f..10bfb466e068 100644
--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c
@@ -2788,7 +2788,7 @@ static int ocfs2_merge_rec_right(struct inode *inode,
2788 BUG_ON(index >= le16_to_cpu(el->l_next_free_rec)); 2788 BUG_ON(index >= le16_to_cpu(el->l_next_free_rec));
2789 left_rec = &el->l_recs[index]; 2789 left_rec = &el->l_recs[index];
2790 2790
2791 if (index == le16_to_cpu(el->l_next_free_rec - 1) && 2791 if (index == le16_to_cpu(el->l_next_free_rec) - 1 &&
2792 le16_to_cpu(el->l_next_free_rec) == le16_to_cpu(el->l_count)) { 2792 le16_to_cpu(el->l_next_free_rec) == le16_to_cpu(el->l_count)) {
2793 /* we meet with a cross extent block merge. */ 2793 /* we meet with a cross extent block merge. */
2794 ret = ocfs2_get_right_path(inode, left_path, &right_path); 2794 ret = ocfs2_get_right_path(inode, left_path, &right_path);
@@ -2802,7 +2802,7 @@ static int ocfs2_merge_rec_right(struct inode *inode,
2802 BUG_ON(next_free <= 0); 2802 BUG_ON(next_free <= 0);
2803 right_rec = &right_el->l_recs[0]; 2803 right_rec = &right_el->l_recs[0];
2804 if (ocfs2_is_empty_extent(right_rec)) { 2804 if (ocfs2_is_empty_extent(right_rec)) {
2805 BUG_ON(le16_to_cpu(next_free) <= 1); 2805 BUG_ON(next_free <= 1);
2806 right_rec = &right_el->l_recs[1]; 2806 right_rec = &right_el->l_recs[1];
2807 } 2807 }
2808 2808
diff --git a/fs/ocfs2/cluster/nodemanager.c b/fs/ocfs2/cluster/nodemanager.c
index cf9401e8cd0b..cfdb08b484ed 100644
--- a/fs/ocfs2/cluster/nodemanager.c
+++ b/fs/ocfs2/cluster/nodemanager.c
@@ -21,7 +21,6 @@
21 21
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/sysctl.h>
25#include <linux/configfs.h> 24#include <linux/configfs.h>
26 25
27#include "tcp.h" 26#include "tcp.h"
@@ -36,65 +35,6 @@
36 * cluster references throughout where nodes are looked up */ 35 * cluster references throughout where nodes are looked up */
37struct o2nm_cluster *o2nm_single_cluster = NULL; 36struct o2nm_cluster *o2nm_single_cluster = NULL;
38 37
39#define OCFS2_MAX_HB_CTL_PATH 256
40static char ocfs2_hb_ctl_path[OCFS2_MAX_HB_CTL_PATH] = "/sbin/ocfs2_hb_ctl";
41
42static ctl_table ocfs2_nm_table[] = {
43 {
44 .ctl_name = 1,
45 .procname = "hb_ctl_path",
46 .data = ocfs2_hb_ctl_path,
47 .maxlen = OCFS2_MAX_HB_CTL_PATH,
48 .mode = 0644,
49 .proc_handler = &proc_dostring,
50 .strategy = &sysctl_string,
51 },
52 { .ctl_name = 0 }
53};
54
55static ctl_table ocfs2_mod_table[] = {
56 {
57 .ctl_name = FS_OCFS2_NM,
58 .procname = "nm",
59 .data = NULL,
60 .maxlen = 0,
61 .mode = 0555,
62 .child = ocfs2_nm_table
63 },
64 { .ctl_name = 0}
65};
66
67static ctl_table ocfs2_kern_table[] = {
68 {
69 .ctl_name = FS_OCFS2,
70 .procname = "ocfs2",
71 .data = NULL,
72 .maxlen = 0,
73 .mode = 0555,
74 .child = ocfs2_mod_table
75 },
76 { .ctl_name = 0}
77};
78
79static ctl_table ocfs2_root_table[] = {
80 {
81 .ctl_name = CTL_FS,
82 .procname = "fs",
83 .data = NULL,
84 .maxlen = 0,
85 .mode = 0555,
86 .child = ocfs2_kern_table
87 },
88 { .ctl_name = 0 }
89};
90
91static struct ctl_table_header *ocfs2_table_header = NULL;
92
93const char *o2nm_get_hb_ctl_path(void)
94{
95 return ocfs2_hb_ctl_path;
96}
97EXPORT_SYMBOL_GPL(o2nm_get_hb_ctl_path);
98 38
99struct o2nm_node *o2nm_get_node_by_num(u8 node_num) 39struct o2nm_node *o2nm_get_node_by_num(u8 node_num)
100{ 40{
@@ -941,9 +881,6 @@ void o2nm_undepend_this_node(void)
941 881
942static void __exit exit_o2nm(void) 882static void __exit exit_o2nm(void)
943{ 883{
944 if (ocfs2_table_header)
945 unregister_sysctl_table(ocfs2_table_header);
946
947 /* XXX sync with hb callbacks and shut down hb? */ 884 /* XXX sync with hb callbacks and shut down hb? */
948 o2net_unregister_hb_callbacks(); 885 o2net_unregister_hb_callbacks();
949 configfs_unregister_subsystem(&o2nm_cluster_group.cs_subsys); 886 configfs_unregister_subsystem(&o2nm_cluster_group.cs_subsys);
@@ -964,16 +901,9 @@ static int __init init_o2nm(void)
964 if (ret) 901 if (ret)
965 goto out; 902 goto out;
966 903
967 ocfs2_table_header = register_sysctl_table(ocfs2_root_table);
968 if (!ocfs2_table_header) {
969 printk(KERN_ERR "nodemanager: unable to register sysctl\n");
970 ret = -ENOMEM; /* or something. */
971 goto out_o2net;
972 }
973
974 ret = o2net_register_hb_callbacks(); 904 ret = o2net_register_hb_callbacks();
975 if (ret) 905 if (ret)
976 goto out_sysctl; 906 goto out_o2net;
977 907
978 config_group_init(&o2nm_cluster_group.cs_subsys.su_group); 908 config_group_init(&o2nm_cluster_group.cs_subsys.su_group);
979 mutex_init(&o2nm_cluster_group.cs_subsys.su_mutex); 909 mutex_init(&o2nm_cluster_group.cs_subsys.su_mutex);
@@ -990,8 +920,6 @@ static int __init init_o2nm(void)
990 configfs_unregister_subsystem(&o2nm_cluster_group.cs_subsys); 920 configfs_unregister_subsystem(&o2nm_cluster_group.cs_subsys);
991out_callbacks: 921out_callbacks:
992 o2net_unregister_hb_callbacks(); 922 o2net_unregister_hb_callbacks();
993out_sysctl:
994 unregister_sysctl_table(ocfs2_table_header);
995out_o2net: 923out_o2net:
996 o2net_exit(); 924 o2net_exit();
997out: 925out:
diff --git a/fs/ocfs2/cluster/nodemanager.h b/fs/ocfs2/cluster/nodemanager.h
index 7c860361b8dd..c992ea0da4ad 100644
--- a/fs/ocfs2/cluster/nodemanager.h
+++ b/fs/ocfs2/cluster/nodemanager.h
@@ -33,10 +33,6 @@
33#include <linux/configfs.h> 33#include <linux/configfs.h>
34#include <linux/rbtree.h> 34#include <linux/rbtree.h>
35 35
36#define FS_OCFS2_NM 1
37
38const char *o2nm_get_hb_ctl_path(void);
39
40struct o2nm_node { 36struct o2nm_node {
41 spinlock_t nd_lock; 37 spinlock_t nd_lock;
42 struct config_item nd_item; 38 struct config_item nd_item;
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c
index 1e44ad14881a..a27d61581bd6 100644
--- a/fs/ocfs2/cluster/tcp.c
+++ b/fs/ocfs2/cluster/tcp.c
@@ -142,53 +142,43 @@ static void o2net_idle_timer(unsigned long data);
142static void o2net_sc_postpone_idle(struct o2net_sock_container *sc); 142static void o2net_sc_postpone_idle(struct o2net_sock_container *sc);
143static void o2net_sc_reset_idle_timer(struct o2net_sock_container *sc); 143static void o2net_sc_reset_idle_timer(struct o2net_sock_container *sc);
144 144
145static void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype,
146 u32 msgkey, struct task_struct *task, u8 node)
147{
148#ifdef CONFIG_DEBUG_FS 145#ifdef CONFIG_DEBUG_FS
146void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype,
147 u32 msgkey, struct task_struct *task, u8 node)
148{
149 INIT_LIST_HEAD(&nst->st_net_debug_item); 149 INIT_LIST_HEAD(&nst->st_net_debug_item);
150 nst->st_task = task; 150 nst->st_task = task;
151 nst->st_msg_type = msgtype; 151 nst->st_msg_type = msgtype;
152 nst->st_msg_key = msgkey; 152 nst->st_msg_key = msgkey;
153 nst->st_node = node; 153 nst->st_node = node;
154#endif
155} 154}
156 155
157static void o2net_set_nst_sock_time(struct o2net_send_tracking *nst) 156void o2net_set_nst_sock_time(struct o2net_send_tracking *nst)
158{ 157{
159#ifdef CONFIG_DEBUG_FS
160 do_gettimeofday(&nst->st_sock_time); 158 do_gettimeofday(&nst->st_sock_time);
161#endif
162} 159}
163 160
164static void o2net_set_nst_send_time(struct o2net_send_tracking *nst) 161void o2net_set_nst_send_time(struct o2net_send_tracking *nst)
165{ 162{
166#ifdef CONFIG_DEBUG_FS
167 do_gettimeofday(&nst->st_send_time); 163 do_gettimeofday(&nst->st_send_time);
168#endif
169} 164}
170 165
171static void o2net_set_nst_status_time(struct o2net_send_tracking *nst) 166void o2net_set_nst_status_time(struct o2net_send_tracking *nst)
172{ 167{
173#ifdef CONFIG_DEBUG_FS
174 do_gettimeofday(&nst->st_status_time); 168 do_gettimeofday(&nst->st_status_time);
175#endif
176} 169}
177 170
178static void o2net_set_nst_sock_container(struct o2net_send_tracking *nst, 171void o2net_set_nst_sock_container(struct o2net_send_tracking *nst,
179 struct o2net_sock_container *sc) 172 struct o2net_sock_container *sc)
180{ 173{
181#ifdef CONFIG_DEBUG_FS
182 nst->st_sc = sc; 174 nst->st_sc = sc;
183#endif
184} 175}
185 176
186static void o2net_set_nst_msg_id(struct o2net_send_tracking *nst, u32 msg_id) 177void o2net_set_nst_msg_id(struct o2net_send_tracking *nst, u32 msg_id)
187{ 178{
188#ifdef CONFIG_DEBUG_FS
189 nst->st_id = msg_id; 179 nst->st_id = msg_id;
190#endif
191} 180}
181#endif /* CONFIG_DEBUG_FS */
192 182
193static inline int o2net_reconnect_delay(void) 183static inline int o2net_reconnect_delay(void)
194{ 184{
diff --git a/fs/ocfs2/cluster/tcp.h b/fs/ocfs2/cluster/tcp.h
index a705d5d19036..fd6179eb26d4 100644
--- a/fs/ocfs2/cluster/tcp.h
+++ b/fs/ocfs2/cluster/tcp.h
@@ -128,23 +128,23 @@ void o2net_debug_del_nst(struct o2net_send_tracking *nst);
128void o2net_debug_add_sc(struct o2net_sock_container *sc); 128void o2net_debug_add_sc(struct o2net_sock_container *sc);
129void o2net_debug_del_sc(struct o2net_sock_container *sc); 129void o2net_debug_del_sc(struct o2net_sock_container *sc);
130#else 130#else
131static int o2net_debugfs_init(void) 131static inline int o2net_debugfs_init(void)
132{ 132{
133 return 0; 133 return 0;
134} 134}
135static void o2net_debugfs_exit(void) 135static inline void o2net_debugfs_exit(void)
136{ 136{
137} 137}
138static void o2net_debug_add_nst(struct o2net_send_tracking *nst) 138static inline void o2net_debug_add_nst(struct o2net_send_tracking *nst)
139{ 139{
140} 140}
141static void o2net_debug_del_nst(struct o2net_send_tracking *nst) 141static inline void o2net_debug_del_nst(struct o2net_send_tracking *nst)
142{ 142{
143} 143}
144static void o2net_debug_add_sc(struct o2net_sock_container *sc) 144static inline void o2net_debug_add_sc(struct o2net_sock_container *sc)
145{ 145{
146} 146}
147static void o2net_debug_del_sc(struct o2net_sock_container *sc) 147static inline void o2net_debug_del_sc(struct o2net_sock_container *sc)
148{ 148{
149} 149}
150#endif /* CONFIG_DEBUG_FS */ 150#endif /* CONFIG_DEBUG_FS */
diff --git a/fs/ocfs2/cluster/tcp_internal.h b/fs/ocfs2/cluster/tcp_internal.h
index 8d58cfe410b1..18307ff81b77 100644
--- a/fs/ocfs2/cluster/tcp_internal.h
+++ b/fs/ocfs2/cluster/tcp_internal.h
@@ -224,10 +224,42 @@ struct o2net_send_tracking {
224 struct timeval st_send_time; 224 struct timeval st_send_time;
225 struct timeval st_status_time; 225 struct timeval st_status_time;
226}; 226};
227
228void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype,
229 u32 msgkey, struct task_struct *task, u8 node);
230void o2net_set_nst_sock_time(struct o2net_send_tracking *nst);
231void o2net_set_nst_send_time(struct o2net_send_tracking *nst);
232void o2net_set_nst_status_time(struct o2net_send_tracking *nst);
233void o2net_set_nst_sock_container(struct o2net_send_tracking *nst,
234 struct o2net_sock_container *sc);
235void o2net_set_nst_msg_id(struct o2net_send_tracking *nst, u32 msg_id);
236
227#else 237#else
228struct o2net_send_tracking { 238struct o2net_send_tracking {
229 u32 dummy; 239 u32 dummy;
230}; 240};
241
242static inline void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype,
243 u32 msgkey, struct task_struct *task, u8 node)
244{
245}
246static inline void o2net_set_nst_sock_time(struct o2net_send_tracking *nst)
247{
248}
249static inline void o2net_set_nst_send_time(struct o2net_send_tracking *nst)
250{
251}
252static inline void o2net_set_nst_status_time(struct o2net_send_tracking *nst)
253{
254}
255static inline void o2net_set_nst_sock_container(struct o2net_send_tracking *nst,
256 struct o2net_sock_container *sc)
257{
258}
259static inline void o2net_set_nst_msg_id(struct o2net_send_tracking *nst,
260 u32 msg_id)
261{
262}
231#endif /* CONFIG_DEBUG_FS */ 263#endif /* CONFIG_DEBUG_FS */
232 264
233#endif /* O2CLUSTER_TCP_INTERNAL_H */ 265#endif /* O2CLUSTER_TCP_INTERNAL_H */
diff --git a/fs/ocfs2/dlm/dlmdebug.h b/fs/ocfs2/dlm/dlmdebug.h
index d34a62a3a625..8c686d22f9c7 100644
--- a/fs/ocfs2/dlm/dlmdebug.h
+++ b/fs/ocfs2/dlm/dlmdebug.h
@@ -60,25 +60,25 @@ void dlm_destroy_debugfs_root(void);
60 60
61#else 61#else
62 62
63static int dlm_debug_init(struct dlm_ctxt *dlm) 63static inline int dlm_debug_init(struct dlm_ctxt *dlm)
64{ 64{
65 return 0; 65 return 0;
66} 66}
67static void dlm_debug_shutdown(struct dlm_ctxt *dlm) 67static inline void dlm_debug_shutdown(struct dlm_ctxt *dlm)
68{ 68{
69} 69}
70static int dlm_create_debugfs_subroot(struct dlm_ctxt *dlm) 70static inline int dlm_create_debugfs_subroot(struct dlm_ctxt *dlm)
71{ 71{
72 return 0; 72 return 0;
73} 73}
74static void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm) 74static inline void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm)
75{ 75{
76} 76}
77static int dlm_create_debugfs_root(void) 77static inline int dlm_create_debugfs_root(void)
78{ 78{
79 return 0; 79 return 0;
80} 80}
81static void dlm_destroy_debugfs_root(void) 81static inline void dlm_destroy_debugfs_root(void)
82{ 82{
83} 83}
84 84
diff --git a/fs/ocfs2/stack_o2cb.c b/fs/ocfs2/stack_o2cb.c
index bbd1667aa7d3..fcd120f1493a 100644
--- a/fs/ocfs2/stack_o2cb.c
+++ b/fs/ocfs2/stack_o2cb.c
@@ -317,8 +317,7 @@ out:
317 return rc; 317 return rc;
318} 318}
319 319
320static int o2cb_cluster_disconnect(struct ocfs2_cluster_connection *conn, 320static int o2cb_cluster_disconnect(struct ocfs2_cluster_connection *conn)
321 int hangup_pending)
322{ 321{
323 struct dlm_ctxt *dlm = conn->cc_lockspace; 322 struct dlm_ctxt *dlm = conn->cc_lockspace;
324 struct o2dlm_private *priv = conn->cc_private; 323 struct o2dlm_private *priv = conn->cc_private;
@@ -333,43 +332,6 @@ static int o2cb_cluster_disconnect(struct ocfs2_cluster_connection *conn,
333 return 0; 332 return 0;
334} 333}
335 334
336static void o2hb_stop(const char *group)
337{
338 int ret;
339 char *argv[5], *envp[3];
340
341 argv[0] = (char *)o2nm_get_hb_ctl_path();
342 argv[1] = "-K";
343 argv[2] = "-u";
344 argv[3] = (char *)group;
345 argv[4] = NULL;
346
347 mlog(0, "Run: %s %s %s %s\n", argv[0], argv[1], argv[2], argv[3]);
348
349 /* minimal command environment taken from cpu_run_sbin_hotplug */
350 envp[0] = "HOME=/";
351 envp[1] = "PATH=/sbin:/bin:/usr/sbin:/usr/bin";
352 envp[2] = NULL;
353
354 ret = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC);
355 if (ret < 0)
356 mlog_errno(ret);
357}
358
359/*
360 * Hangup is a hack for tools compatibility. Older ocfs2-tools software
361 * expects the filesystem to call "ocfs2_hb_ctl" during unmount. This
362 * happens regardless of whether the DLM got started, so we can't do it
363 * in ocfs2_cluster_disconnect(). We bring the o2hb_stop() function into
364 * the glue and provide a "hangup" API for super.c to call.
365 *
366 * Other stacks will eventually provide a NULL ->hangup() pointer.
367 */
368static void o2cb_cluster_hangup(const char *group, int grouplen)
369{
370 o2hb_stop(group);
371}
372
373static int o2cb_cluster_this_node(unsigned int *node) 335static int o2cb_cluster_this_node(unsigned int *node)
374{ 336{
375 int node_num; 337 int node_num;
@@ -388,7 +350,6 @@ static int o2cb_cluster_this_node(unsigned int *node)
388static struct ocfs2_stack_operations o2cb_stack_ops = { 350static struct ocfs2_stack_operations o2cb_stack_ops = {
389 .connect = o2cb_cluster_connect, 351 .connect = o2cb_cluster_connect,
390 .disconnect = o2cb_cluster_disconnect, 352 .disconnect = o2cb_cluster_disconnect,
391 .hangup = o2cb_cluster_hangup,
392 .this_node = o2cb_cluster_this_node, 353 .this_node = o2cb_cluster_this_node,
393 .dlm_lock = o2cb_dlm_lock, 354 .dlm_lock = o2cb_dlm_lock,
394 .dlm_unlock = o2cb_dlm_unlock, 355 .dlm_unlock = o2cb_dlm_unlock,
diff --git a/fs/ocfs2/stack_user.c b/fs/ocfs2/stack_user.c
index b503772cd0ec..c021280dd462 100644
--- a/fs/ocfs2/stack_user.c
+++ b/fs/ocfs2/stack_user.c
@@ -61,7 +61,7 @@
61 * negotiated by the client. The client negotiates based on the maximum 61 * negotiated by the client. The client negotiates based on the maximum
62 * version advertised in /sys/fs/ocfs2/max_locking_protocol. The major 62 * version advertised in /sys/fs/ocfs2/max_locking_protocol. The major
63 * number from the "SETV" message must match 63 * number from the "SETV" message must match
64 * user_stack.sp_proto->lp_max_version.pv_major, and the minor number 64 * ocfs2_user_plugin.sp_proto->lp_max_version.pv_major, and the minor number
65 * must be less than or equal to ...->lp_max_version.pv_minor. 65 * must be less than or equal to ...->lp_max_version.pv_minor.
66 * 66 *
67 * Once this information has been set, mounts will be allowed. From this 67 * Once this information has been set, mounts will be allowed. From this
@@ -153,7 +153,7 @@ union ocfs2_control_message {
153 struct ocfs2_control_message_down u_down; 153 struct ocfs2_control_message_down u_down;
154}; 154};
155 155
156static struct ocfs2_stack_plugin user_stack; 156static struct ocfs2_stack_plugin ocfs2_user_plugin;
157 157
158static atomic_t ocfs2_control_opened; 158static atomic_t ocfs2_control_opened;
159static int ocfs2_control_this_node = -1; 159static int ocfs2_control_this_node = -1;
@@ -399,7 +399,7 @@ static int ocfs2_control_do_setversion_msg(struct file *file,
399 char *ptr = NULL; 399 char *ptr = NULL;
400 struct ocfs2_control_private *p = file->private_data; 400 struct ocfs2_control_private *p = file->private_data;
401 struct ocfs2_protocol_version *max = 401 struct ocfs2_protocol_version *max =
402 &user_stack.sp_proto->lp_max_version; 402 &ocfs2_user_plugin.sp_proto->lp_max_version;
403 403
404 if (ocfs2_control_get_handshake_state(file) != 404 if (ocfs2_control_get_handshake_state(file) !=
405 OCFS2_CONTROL_HANDSHAKE_PROTOCOL) 405 OCFS2_CONTROL_HANDSHAKE_PROTOCOL)
@@ -680,7 +680,7 @@ static void fsdlm_lock_ast_wrapper(void *astarg)
680 struct dlm_lksb *lksb = fsdlm_astarg_to_lksb(astarg); 680 struct dlm_lksb *lksb = fsdlm_astarg_to_lksb(astarg);
681 int status = lksb->sb_status; 681 int status = lksb->sb_status;
682 682
683 BUG_ON(user_stack.sp_proto == NULL); 683 BUG_ON(ocfs2_user_plugin.sp_proto == NULL);
684 684
685 /* 685 /*
686 * For now we're punting on the issue of other non-standard errors 686 * For now we're punting on the issue of other non-standard errors
@@ -693,16 +693,16 @@ static void fsdlm_lock_ast_wrapper(void *astarg)
693 */ 693 */
694 694
695 if (status == -DLM_EUNLOCK || status == -DLM_ECANCEL) 695 if (status == -DLM_EUNLOCK || status == -DLM_ECANCEL)
696 user_stack.sp_proto->lp_unlock_ast(astarg, 0); 696 ocfs2_user_plugin.sp_proto->lp_unlock_ast(astarg, 0);
697 else 697 else
698 user_stack.sp_proto->lp_lock_ast(astarg); 698 ocfs2_user_plugin.sp_proto->lp_lock_ast(astarg);
699} 699}
700 700
701static void fsdlm_blocking_ast_wrapper(void *astarg, int level) 701static void fsdlm_blocking_ast_wrapper(void *astarg, int level)
702{ 702{
703 BUG_ON(user_stack.sp_proto == NULL); 703 BUG_ON(ocfs2_user_plugin.sp_proto == NULL);
704 704
705 user_stack.sp_proto->lp_blocking_ast(astarg, level); 705 ocfs2_user_plugin.sp_proto->lp_blocking_ast(astarg, level);
706} 706}
707 707
708static int user_dlm_lock(struct ocfs2_cluster_connection *conn, 708static int user_dlm_lock(struct ocfs2_cluster_connection *conn,
@@ -816,8 +816,7 @@ out:
816 return rc; 816 return rc;
817} 817}
818 818
819static int user_cluster_disconnect(struct ocfs2_cluster_connection *conn, 819static int user_cluster_disconnect(struct ocfs2_cluster_connection *conn)
820 int hangup_pending)
821{ 820{
822 dlm_release_lockspace(conn->cc_lockspace, 2); 821 dlm_release_lockspace(conn->cc_lockspace, 2);
823 conn->cc_lockspace = NULL; 822 conn->cc_lockspace = NULL;
@@ -838,7 +837,7 @@ static int user_cluster_this_node(unsigned int *this_node)
838 return 0; 837 return 0;
839} 838}
840 839
841static struct ocfs2_stack_operations user_stack_ops = { 840static struct ocfs2_stack_operations ocfs2_user_plugin_ops = {
842 .connect = user_cluster_connect, 841 .connect = user_cluster_connect,
843 .disconnect = user_cluster_disconnect, 842 .disconnect = user_cluster_disconnect,
844 .this_node = user_cluster_this_node, 843 .this_node = user_cluster_this_node,
@@ -849,20 +848,20 @@ static struct ocfs2_stack_operations user_stack_ops = {
849 .dump_lksb = user_dlm_dump_lksb, 848 .dump_lksb = user_dlm_dump_lksb,
850}; 849};
851 850
852static struct ocfs2_stack_plugin user_stack = { 851static struct ocfs2_stack_plugin ocfs2_user_plugin = {
853 .sp_name = "user", 852 .sp_name = "user",
854 .sp_ops = &user_stack_ops, 853 .sp_ops = &ocfs2_user_plugin_ops,
855 .sp_owner = THIS_MODULE, 854 .sp_owner = THIS_MODULE,
856}; 855};
857 856
858 857
859static int __init user_stack_init(void) 858static int __init ocfs2_user_plugin_init(void)
860{ 859{
861 int rc; 860 int rc;
862 861
863 rc = ocfs2_control_init(); 862 rc = ocfs2_control_init();
864 if (!rc) { 863 if (!rc) {
865 rc = ocfs2_stack_glue_register(&user_stack); 864 rc = ocfs2_stack_glue_register(&ocfs2_user_plugin);
866 if (rc) 865 if (rc)
867 ocfs2_control_exit(); 866 ocfs2_control_exit();
868 } 867 }
@@ -870,14 +869,14 @@ static int __init user_stack_init(void)
870 return rc; 869 return rc;
871} 870}
872 871
873static void __exit user_stack_exit(void) 872static void __exit ocfs2_user_plugin_exit(void)
874{ 873{
875 ocfs2_stack_glue_unregister(&user_stack); 874 ocfs2_stack_glue_unregister(&ocfs2_user_plugin);
876 ocfs2_control_exit(); 875 ocfs2_control_exit();
877} 876}
878 877
879MODULE_AUTHOR("Oracle"); 878MODULE_AUTHOR("Oracle");
880MODULE_DESCRIPTION("ocfs2 driver for userspace cluster stacks"); 879MODULE_DESCRIPTION("ocfs2 driver for userspace cluster stacks");
881MODULE_LICENSE("GPL"); 880MODULE_LICENSE("GPL");
882module_init(user_stack_init); 881module_init(ocfs2_user_plugin_init);
883module_exit(user_stack_exit); 882module_exit(ocfs2_user_plugin_exit);
diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c
index 119f60cea9cc..10e149ae5e3a 100644
--- a/fs/ocfs2/stackglue.c
+++ b/fs/ocfs2/stackglue.c
@@ -26,6 +26,7 @@
26#include <linux/fs.h> 26#include <linux/fs.h>
27#include <linux/kobject.h> 27#include <linux/kobject.h>
28#include <linux/sysfs.h> 28#include <linux/sysfs.h>
29#include <linux/sysctl.h>
29 30
30#include "ocfs2_fs.h" 31#include "ocfs2_fs.h"
31 32
@@ -33,11 +34,13 @@
33 34
34#define OCFS2_STACK_PLUGIN_O2CB "o2cb" 35#define OCFS2_STACK_PLUGIN_O2CB "o2cb"
35#define OCFS2_STACK_PLUGIN_USER "user" 36#define OCFS2_STACK_PLUGIN_USER "user"
37#define OCFS2_MAX_HB_CTL_PATH 256
36 38
37static struct ocfs2_locking_protocol *lproto; 39static struct ocfs2_locking_protocol *lproto;
38static DEFINE_SPINLOCK(ocfs2_stack_lock); 40static DEFINE_SPINLOCK(ocfs2_stack_lock);
39static LIST_HEAD(ocfs2_stack_list); 41static LIST_HEAD(ocfs2_stack_list);
40static char cluster_stack_name[OCFS2_STACK_LABEL_LEN + 1]; 42static char cluster_stack_name[OCFS2_STACK_LABEL_LEN + 1];
43static char ocfs2_hb_ctl_path[OCFS2_MAX_HB_CTL_PATH] = "/sbin/ocfs2_hb_ctl";
41 44
42/* 45/*
43 * The stack currently in use. If not null, active_stack->sp_count > 0, 46 * The stack currently in use. If not null, active_stack->sp_count > 0,
@@ -349,7 +352,7 @@ int ocfs2_cluster_disconnect(struct ocfs2_cluster_connection *conn,
349 352
350 BUG_ON(conn == NULL); 353 BUG_ON(conn == NULL);
351 354
352 ret = active_stack->sp_ops->disconnect(conn, hangup_pending); 355 ret = active_stack->sp_ops->disconnect(conn);
353 356
354 /* XXX Should we free it anyway? */ 357 /* XXX Should we free it anyway? */
355 if (!ret) { 358 if (!ret) {
@@ -362,13 +365,48 @@ int ocfs2_cluster_disconnect(struct ocfs2_cluster_connection *conn,
362} 365}
363EXPORT_SYMBOL_GPL(ocfs2_cluster_disconnect); 366EXPORT_SYMBOL_GPL(ocfs2_cluster_disconnect);
364 367
368/*
369 * Leave the group for this filesystem. This is executed by a userspace
370 * program (stored in ocfs2_hb_ctl_path).
371 */
372static void ocfs2_leave_group(const char *group)
373{
374 int ret;
375 char *argv[5], *envp[3];
376
377 argv[0] = ocfs2_hb_ctl_path;
378 argv[1] = "-K";
379 argv[2] = "-u";
380 argv[3] = (char *)group;
381 argv[4] = NULL;
382
383 /* minimal command environment taken from cpu_run_sbin_hotplug */
384 envp[0] = "HOME=/";
385 envp[1] = "PATH=/sbin:/bin:/usr/sbin:/usr/bin";
386 envp[2] = NULL;
387
388 ret = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC);
389 if (ret < 0) {
390 printk(KERN_ERR
391 "ocfs2: Error %d running user helper "
392 "\"%s %s %s %s\"\n",
393 ret, argv[0], argv[1], argv[2], argv[3]);
394 }
395}
396
397/*
398 * Hangup is a required post-umount. ocfs2-tools software expects the
399 * filesystem to call "ocfs2_hb_ctl" during unmount. This happens
400 * regardless of whether the DLM got started, so we can't do it
401 * in ocfs2_cluster_disconnect(). The ocfs2_leave_group() function does
402 * the actual work.
403 */
365void ocfs2_cluster_hangup(const char *group, int grouplen) 404void ocfs2_cluster_hangup(const char *group, int grouplen)
366{ 405{
367 BUG_ON(group == NULL); 406 BUG_ON(group == NULL);
368 BUG_ON(group[grouplen] != '\0'); 407 BUG_ON(group[grouplen] != '\0');
369 408
370 if (active_stack->sp_ops->hangup) 409 ocfs2_leave_group(group);
371 active_stack->sp_ops->hangup(group, grouplen);
372 410
373 /* cluster_disconnect() was called with hangup_pending==1 */ 411 /* cluster_disconnect() was called with hangup_pending==1 */
374 ocfs2_stack_driver_put(); 412 ocfs2_stack_driver_put();
@@ -548,10 +586,83 @@ error:
548 return ret; 586 return ret;
549} 587}
550 588
589/*
590 * Sysctl bits
591 *
592 * The sysctl lives at /proc/sys/fs/ocfs2/nm/hb_ctl_path. The 'nm' doesn't
593 * make as much sense in a multiple cluster stack world, but it's safer
594 * and easier to preserve the name.
595 */
596
597#define FS_OCFS2_NM 1
598
599static ctl_table ocfs2_nm_table[] = {
600 {
601 .ctl_name = 1,
602 .procname = "hb_ctl_path",
603 .data = ocfs2_hb_ctl_path,
604 .maxlen = OCFS2_MAX_HB_CTL_PATH,
605 .mode = 0644,
606 .proc_handler = &proc_dostring,
607 .strategy = &sysctl_string,
608 },
609 { .ctl_name = 0 }
610};
611
612static ctl_table ocfs2_mod_table[] = {
613 {
614 .ctl_name = FS_OCFS2_NM,
615 .procname = "nm",
616 .data = NULL,
617 .maxlen = 0,
618 .mode = 0555,
619 .child = ocfs2_nm_table
620 },
621 { .ctl_name = 0}
622};
623
624static ctl_table ocfs2_kern_table[] = {
625 {
626 .ctl_name = FS_OCFS2,
627 .procname = "ocfs2",
628 .data = NULL,
629 .maxlen = 0,
630 .mode = 0555,
631 .child = ocfs2_mod_table
632 },
633 { .ctl_name = 0}
634};
635
636static ctl_table ocfs2_root_table[] = {
637 {
638 .ctl_name = CTL_FS,
639 .procname = "fs",
640 .data = NULL,
641 .maxlen = 0,
642 .mode = 0555,
643 .child = ocfs2_kern_table
644 },
645 { .ctl_name = 0 }
646};
647
648static struct ctl_table_header *ocfs2_table_header = NULL;
649
650
651/*
652 * Initialization
653 */
654
551static int __init ocfs2_stack_glue_init(void) 655static int __init ocfs2_stack_glue_init(void)
552{ 656{
553 strcpy(cluster_stack_name, OCFS2_STACK_PLUGIN_O2CB); 657 strcpy(cluster_stack_name, OCFS2_STACK_PLUGIN_O2CB);
554 658
659 ocfs2_table_header = register_sysctl_table(ocfs2_root_table);
660 if (!ocfs2_table_header) {
661 printk(KERN_ERR
662 "ocfs2 stack glue: unable to register sysctl\n");
663 return -ENOMEM; /* or something. */
664 }
665
555 return ocfs2_sysfs_init(); 666 return ocfs2_sysfs_init();
556} 667}
557 668
@@ -559,6 +670,8 @@ static void __exit ocfs2_stack_glue_exit(void)
559{ 670{
560 lproto = NULL; 671 lproto = NULL;
561 ocfs2_sysfs_exit(); 672 ocfs2_sysfs_exit();
673 if (ocfs2_table_header)
674 unregister_sysctl_table(ocfs2_table_header);
562} 675}
563 676
564MODULE_AUTHOR("Oracle"); 677MODULE_AUTHOR("Oracle");
diff --git a/fs/ocfs2/stackglue.h b/fs/ocfs2/stackglue.h
index 005e4f170e0f..db56281dd1be 100644
--- a/fs/ocfs2/stackglue.h
+++ b/fs/ocfs2/stackglue.h
@@ -134,22 +134,10 @@ struct ocfs2_stack_operations {
134 * be freed. Thus, a stack must not return from ->disconnect() 134 * be freed. Thus, a stack must not return from ->disconnect()
135 * until it will no longer reference the conn pointer. 135 * until it will no longer reference the conn pointer.
136 * 136 *
137 * If hangup_pending is zero, ocfs2_cluster_disconnect() will also 137 * Once this call returns, the stack glue will be dropping this
138 * be dropping the reference on the module. 138 * connection's reference on the module.
139 */ 139 */
140 int (*disconnect)(struct ocfs2_cluster_connection *conn, 140 int (*disconnect)(struct ocfs2_cluster_connection *conn);
141 int hangup_pending);
142
143 /*
144 * ocfs2_cluster_hangup() exists for compatibility with older
145 * ocfs2 tools. Only the classic stack really needs it. As such
146 * ->hangup() is not required of all stacks. See the comment by
147 * ocfs2_cluster_hangup() for more details.
148 *
149 * Note that ocfs2_cluster_hangup() can only be called if
150 * hangup_pending was passed to ocfs2_cluster_disconnect().
151 */
152 void (*hangup)(const char *group, int grouplen);
153 141
154 /* 142 /*
155 * ->this_node() returns the cluster's unique identifier for the 143 * ->this_node() returns the cluster's unique identifier for the
@@ -258,4 +246,5 @@ void ocfs2_stack_glue_set_locking_protocol(struct ocfs2_locking_protocol *proto)
258/* Used by stack plugins */ 246/* Used by stack plugins */
259int ocfs2_stack_glue_register(struct ocfs2_stack_plugin *plugin); 247int ocfs2_stack_glue_register(struct ocfs2_stack_plugin *plugin);
260void ocfs2_stack_glue_unregister(struct ocfs2_stack_plugin *plugin); 248void ocfs2_stack_glue_unregister(struct ocfs2_stack_plugin *plugin);
249
261#endif /* STACKGLUE_H */ 250#endif /* STACKGLUE_H */
diff --git a/fs/open.c b/fs/open.c
index a1450086e92f..a99ad09c3197 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -16,6 +16,7 @@
16#include <linux/namei.h> 16#include <linux/namei.h>
17#include <linux/backing-dev.h> 17#include <linux/backing-dev.h>
18#include <linux/capability.h> 18#include <linux/capability.h>
19#include <linux/securebits.h>
19#include <linux/security.h> 20#include <linux/security.h>
20#include <linux/mount.h> 21#include <linux/mount.h>
21#include <linux/vfs.h> 22#include <linux/vfs.h>
@@ -425,7 +426,7 @@ asmlinkage long sys_faccessat(int dfd, const char __user *filename, int mode)
425{ 426{
426 struct nameidata nd; 427 struct nameidata nd;
427 int old_fsuid, old_fsgid; 428 int old_fsuid, old_fsgid;
428 kernel_cap_t old_cap; 429 kernel_cap_t uninitialized_var(old_cap); /* !SECURE_NO_SETUID_FIXUP */
429 int res; 430 int res;
430 431
431 if (mode & ~S_IRWXO) /* where's F_OK, X_OK, W_OK, R_OK? */ 432 if (mode & ~S_IRWXO) /* where's F_OK, X_OK, W_OK, R_OK? */
@@ -433,23 +434,27 @@ asmlinkage long sys_faccessat(int dfd, const char __user *filename, int mode)
433 434
434 old_fsuid = current->fsuid; 435 old_fsuid = current->fsuid;
435 old_fsgid = current->fsgid; 436 old_fsgid = current->fsgid;
436 old_cap = current->cap_effective;
437 437
438 current->fsuid = current->uid; 438 current->fsuid = current->uid;
439 current->fsgid = current->gid; 439 current->fsgid = current->gid;
440 440
441 /* 441 if (!issecure(SECURE_NO_SETUID_FIXUP)) {
442 * Clear the capabilities if we switch to a non-root user 442 /*
443 * 443 * Clear the capabilities if we switch to a non-root user
444 * FIXME: There is a race here against sys_capset. The 444 */
445 * capabilities can change yet we will restore the old 445#ifndef CONFIG_SECURITY_FILE_CAPABILITIES
446 * value below. We should hold task_capabilities_lock, 446 /*
447 * but we cannot because user_path_walk can sleep. 447 * FIXME: There is a race here against sys_capset. The
448 */ 448 * capabilities can change yet we will restore the old
449 if (current->uid) 449 * value below. We should hold task_capabilities_lock,
450 cap_clear(current->cap_effective); 450 * but we cannot because user_path_walk can sleep.
451 else 451 */
452 current->cap_effective = current->cap_permitted; 452#endif /* ndef CONFIG_SECURITY_FILE_CAPABILITIES */
453 if (current->uid)
454 old_cap = cap_set_effective(__cap_empty_set);
455 else
456 old_cap = cap_set_effective(current->cap_permitted);
457 }
453 458
454 res = __user_walk_fd(dfd, filename, LOOKUP_FOLLOW|LOOKUP_ACCESS, &nd); 459 res = __user_walk_fd(dfd, filename, LOOKUP_FOLLOW|LOOKUP_ACCESS, &nd);
455 if (res) 460 if (res)
@@ -478,7 +483,9 @@ out_path_release:
478out: 483out:
479 current->fsuid = old_fsuid; 484 current->fsuid = old_fsuid;
480 current->fsgid = old_fsgid; 485 current->fsgid = old_fsgid;
481 current->cap_effective = old_cap; 486
487 if (!issecure(SECURE_NO_SETUID_FIXUP))
488 cap_set_effective(old_cap);
482 489
483 return res; 490 return res;
484} 491}
diff --git a/fs/pipe.c b/fs/pipe.c
index ec228bc9f882..700f4e0d9572 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -1003,8 +1003,7 @@ struct file *create_write_pipe(void)
1003void free_write_pipe(struct file *f) 1003void free_write_pipe(struct file *f)
1004{ 1004{
1005 free_pipe_info(f->f_dentry->d_inode); 1005 free_pipe_info(f->f_dentry->d_inode);
1006 dput(f->f_path.dentry); 1006 path_put(&f->f_path);
1007 mntput(f->f_path.mnt);
1008 put_filp(f); 1007 put_filp(f);
1009} 1008}
1010 1009
@@ -1015,8 +1014,8 @@ struct file *create_read_pipe(struct file *wrf)
1015 return ERR_PTR(-ENFILE); 1014 return ERR_PTR(-ENFILE);
1016 1015
1017 /* Grab pipe from the writer */ 1016 /* Grab pipe from the writer */
1018 f->f_path.mnt = mntget(wrf->f_path.mnt); 1017 f->f_path = wrf->f_path;
1019 f->f_path.dentry = dget(wrf->f_path.dentry); 1018 path_get(&wrf->f_path);
1020 f->f_mapping = wrf->f_path.dentry->d_inode->i_mapping; 1019 f->f_mapping = wrf->f_path.dentry->d_inode->i_mapping;
1021 1020
1022 f->f_pos = 0; 1021 f->f_pos = 0;
@@ -1068,8 +1067,7 @@ int do_pipe(int *fd)
1068 err_fdr: 1067 err_fdr:
1069 put_unused_fd(fdr); 1068 put_unused_fd(fdr);
1070 err_read_pipe: 1069 err_read_pipe:
1071 dput(fr->f_dentry); 1070 path_put(&fr->f_path);
1072 mntput(fr->f_vfsmnt);
1073 put_filp(fr); 1071 put_filp(fr);
1074 err_write_pipe: 1072 err_write_pipe:
1075 free_write_pipe(fw); 1073 free_write_pipe(fw);
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 9e3b8c33c24b..797d775e0354 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -288,7 +288,7 @@ static void render_cap_t(struct seq_file *m, const char *header,
288 seq_printf(m, "%s", header); 288 seq_printf(m, "%s", header);
289 CAP_FOR_EACH_U32(__capi) { 289 CAP_FOR_EACH_U32(__capi) {
290 seq_printf(m, "%08x", 290 seq_printf(m, "%08x",
291 a->cap[(_LINUX_CAPABILITY_U32S-1) - __capi]); 291 a->cap[(_KERNEL_CAPABILITY_U32S-1) - __capi]);
292 } 292 }
293 seq_printf(m, "\n"); 293 seq_printf(m, "\n");
294} 294}
diff --git a/fs/proc/base.c b/fs/proc/base.c
index c447e0743a3c..3b455371e7ff 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -127,6 +127,25 @@ struct pid_entry {
127 NULL, &proc_single_file_operations, \ 127 NULL, &proc_single_file_operations, \
128 { .proc_show = &proc_##OTYPE } ) 128 { .proc_show = &proc_##OTYPE } )
129 129
130/*
131 * Count the number of hardlinks for the pid_entry table, excluding the .
132 * and .. links.
133 */
134static unsigned int pid_entry_count_dirs(const struct pid_entry *entries,
135 unsigned int n)
136{
137 unsigned int i;
138 unsigned int count;
139
140 count = 0;
141 for (i = 0; i < n; ++i) {
142 if (S_ISDIR(entries[i].mode))
143 ++count;
144 }
145
146 return count;
147}
148
130int maps_protect; 149int maps_protect;
131EXPORT_SYMBOL(maps_protect); 150EXPORT_SYMBOL(maps_protect);
132 151
@@ -2585,10 +2604,9 @@ static struct dentry *proc_pid_instantiate(struct inode *dir,
2585 inode->i_op = &proc_tgid_base_inode_operations; 2604 inode->i_op = &proc_tgid_base_inode_operations;
2586 inode->i_fop = &proc_tgid_base_operations; 2605 inode->i_fop = &proc_tgid_base_operations;
2587 inode->i_flags|=S_IMMUTABLE; 2606 inode->i_flags|=S_IMMUTABLE;
2588 inode->i_nlink = 5; 2607
2589#ifdef CONFIG_SECURITY 2608 inode->i_nlink = 2 + pid_entry_count_dirs(tgid_base_stuff,
2590 inode->i_nlink += 1; 2609 ARRAY_SIZE(tgid_base_stuff));
2591#endif
2592 2610
2593 dentry->d_op = &pid_dentry_operations; 2611 dentry->d_op = &pid_dentry_operations;
2594 2612
@@ -2816,10 +2834,9 @@ static struct dentry *proc_task_instantiate(struct inode *dir,
2816 inode->i_op = &proc_tid_base_inode_operations; 2834 inode->i_op = &proc_tid_base_inode_operations;
2817 inode->i_fop = &proc_tid_base_operations; 2835 inode->i_fop = &proc_tid_base_operations;
2818 inode->i_flags|=S_IMMUTABLE; 2836 inode->i_flags|=S_IMMUTABLE;
2819 inode->i_nlink = 4; 2837
2820#ifdef CONFIG_SECURITY 2838 inode->i_nlink = 2 + pid_entry_count_dirs(tid_base_stuff,
2821 inode->i_nlink += 1; 2839 ARRAY_SIZE(tid_base_stuff));
2822#endif
2823 2840
2824 dentry->d_op = &pid_dentry_operations; 2841 dentry->d_op = &pid_dentry_operations;
2825 2842
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 6f4e8dc97da1..b08d10017911 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -425,7 +425,8 @@ struct inode *proc_get_inode(struct super_block *sb, unsigned int ino,
425 } 425 }
426 } 426 }
427 unlock_new_inode(inode); 427 unlock_new_inode(inode);
428 } 428 } else
429 module_put(de->owner);
429 return inode; 430 return inode;
430 431
431out_ino: 432out_ino:
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index 74a323d2b850..c652d469dc08 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -123,6 +123,11 @@ static int uptime_read_proc(char *page, char **start, off_t off,
123 return proc_calc_metrics(page, start, off, count, eof, len); 123 return proc_calc_metrics(page, start, off, count, eof, len);
124} 124}
125 125
126int __attribute__((weak)) arch_report_meminfo(char *page)
127{
128 return 0;
129}
130
126static int meminfo_read_proc(char *page, char **start, off_t off, 131static int meminfo_read_proc(char *page, char **start, off_t off,
127 int count, int *eof, void *data) 132 int count, int *eof, void *data)
128{ 133{
@@ -139,7 +144,7 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
139#define K(x) ((x) << (PAGE_SHIFT - 10)) 144#define K(x) ((x) << (PAGE_SHIFT - 10))
140 si_meminfo(&i); 145 si_meminfo(&i);
141 si_swapinfo(&i); 146 si_swapinfo(&i);
142 committed = atomic_read(&vm_committed_space); 147 committed = atomic_long_read(&vm_committed_space);
143 allowed = ((totalram_pages - hugetlb_total_pages()) 148 allowed = ((totalram_pages - hugetlb_total_pages())
144 * sysctl_overcommit_ratio / 100) + total_swap_pages; 149 * sysctl_overcommit_ratio / 100) + total_swap_pages;
145 150
@@ -221,6 +226,8 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
221 226
222 len += hugetlb_report_meminfo(page + len); 227 len += hugetlb_report_meminfo(page + len);
223 228
229 len += arch_report_meminfo(page + len);
230
224 return proc_calc_metrics(page, start, off, count, eof, len); 231 return proc_calc_metrics(page, start, off, count, eof, len);
225#undef K 232#undef K
226} 233}
@@ -472,6 +479,13 @@ static const struct file_operations proc_vmalloc_operations = {
472}; 479};
473#endif 480#endif
474 481
482#ifndef arch_irq_stat_cpu
483#define arch_irq_stat_cpu(cpu) 0
484#endif
485#ifndef arch_irq_stat
486#define arch_irq_stat() 0
487#endif
488
475static int show_stat(struct seq_file *p, void *v) 489static int show_stat(struct seq_file *p, void *v)
476{ 490{
477 int i; 491 int i;
@@ -509,7 +523,9 @@ static int show_stat(struct seq_file *p, void *v)
509 sum += temp; 523 sum += temp;
510 per_irq_sum[j] += temp; 524 per_irq_sum[j] += temp;
511 } 525 }
526 sum += arch_irq_stat_cpu(i);
512 } 527 }
528 sum += arch_irq_stat();
513 529
514 seq_printf(p, "cpu %llu %llu %llu %llu %llu %llu %llu %llu %llu\n", 530 seq_printf(p, "cpu %llu %llu %llu %llu %llu %llu %llu %llu %llu\n",
515 (unsigned long long)cputime64_to_clock_t(user), 531 (unsigned long long)cputime64_to_clock_t(user),
@@ -716,7 +732,7 @@ static ssize_t kpagecount_read(struct file *file, char __user *buf,
716 pfn = src / KPMSIZE; 732 pfn = src / KPMSIZE;
717 count = min_t(size_t, count, (max_pfn * KPMSIZE) - src); 733 count = min_t(size_t, count, (max_pfn * KPMSIZE) - src);
718 if (src & KPMMASK || count & KPMMASK) 734 if (src & KPMMASK || count & KPMMASK)
719 return -EIO; 735 return -EINVAL;
720 736
721 while (count > 0) { 737 while (count > 0) {
722 ppage = NULL; 738 ppage = NULL;
@@ -726,7 +742,7 @@ static ssize_t kpagecount_read(struct file *file, char __user *buf,
726 if (!ppage) 742 if (!ppage)
727 pcount = 0; 743 pcount = 0;
728 else 744 else
729 pcount = atomic_read(&ppage->_count); 745 pcount = page_mapcount(ppage);
730 746
731 if (put_user(pcount, out++)) { 747 if (put_user(pcount, out++)) {
732 ret = -EFAULT; 748 ret = -EFAULT;
@@ -782,7 +798,7 @@ static ssize_t kpageflags_read(struct file *file, char __user *buf,
782 pfn = src / KPMSIZE; 798 pfn = src / KPMSIZE;
783 count = min_t(unsigned long, count, (max_pfn * KPMSIZE) - src); 799 count = min_t(unsigned long, count, (max_pfn * KPMSIZE) - src);
784 if (src & KPMMASK || count & KPMMASK) 800 if (src & KPMMASK || count & KPMMASK)
785 return -EIO; 801 return -EINVAL;
786 802
787 while (count > 0) { 803 while (count > 0) {
788 ppage = NULL; 804 ppage = NULL;
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 88717c0f941b..c492449f3b45 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -315,9 +315,9 @@ struct mem_size_stats {
315}; 315};
316 316
317static int smaps_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, 317static int smaps_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
318 void *private) 318 struct mm_walk *walk)
319{ 319{
320 struct mem_size_stats *mss = private; 320 struct mem_size_stats *mss = walk->private;
321 struct vm_area_struct *vma = mss->vma; 321 struct vm_area_struct *vma = mss->vma;
322 pte_t *pte, ptent; 322 pte_t *pte, ptent;
323 spinlock_t *ptl; 323 spinlock_t *ptl;
@@ -365,19 +365,21 @@ static int smaps_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
365 return 0; 365 return 0;
366} 366}
367 367
368static struct mm_walk smaps_walk = { .pmd_entry = smaps_pte_range };
369
370static int show_smap(struct seq_file *m, void *v) 368static int show_smap(struct seq_file *m, void *v)
371{ 369{
372 struct vm_area_struct *vma = v; 370 struct vm_area_struct *vma = v;
373 struct mem_size_stats mss; 371 struct mem_size_stats mss;
374 int ret; 372 int ret;
373 struct mm_walk smaps_walk = {
374 .pmd_entry = smaps_pte_range,
375 .mm = vma->vm_mm,
376 .private = &mss,
377 };
375 378
376 memset(&mss, 0, sizeof mss); 379 memset(&mss, 0, sizeof mss);
377 mss.vma = vma; 380 mss.vma = vma;
378 if (vma->vm_mm && !is_vm_hugetlb_page(vma)) 381 if (vma->vm_mm && !is_vm_hugetlb_page(vma))
379 walk_page_range(vma->vm_mm, vma->vm_start, vma->vm_end, 382 walk_page_range(vma->vm_start, vma->vm_end, &smaps_walk);
380 &smaps_walk, &mss);
381 383
382 ret = show_map(m, v); 384 ret = show_map(m, v);
383 if (ret) 385 if (ret)
@@ -426,9 +428,9 @@ const struct file_operations proc_smaps_operations = {
426}; 428};
427 429
428static int clear_refs_pte_range(pmd_t *pmd, unsigned long addr, 430static int clear_refs_pte_range(pmd_t *pmd, unsigned long addr,
429 unsigned long end, void *private) 431 unsigned long end, struct mm_walk *walk)
430{ 432{
431 struct vm_area_struct *vma = private; 433 struct vm_area_struct *vma = walk->private;
432 pte_t *pte, ptent; 434 pte_t *pte, ptent;
433 spinlock_t *ptl; 435 spinlock_t *ptl;
434 struct page *page; 436 struct page *page;
@@ -452,8 +454,6 @@ static int clear_refs_pte_range(pmd_t *pmd, unsigned long addr,
452 return 0; 454 return 0;
453} 455}
454 456
455static struct mm_walk clear_refs_walk = { .pmd_entry = clear_refs_pte_range };
456
457static ssize_t clear_refs_write(struct file *file, const char __user *buf, 457static ssize_t clear_refs_write(struct file *file, const char __user *buf,
458 size_t count, loff_t *ppos) 458 size_t count, loff_t *ppos)
459{ 459{
@@ -476,11 +476,17 @@ static ssize_t clear_refs_write(struct file *file, const char __user *buf,
476 return -ESRCH; 476 return -ESRCH;
477 mm = get_task_mm(task); 477 mm = get_task_mm(task);
478 if (mm) { 478 if (mm) {
479 struct mm_walk clear_refs_walk = {
480 .pmd_entry = clear_refs_pte_range,
481 .mm = mm,
482 };
479 down_read(&mm->mmap_sem); 483 down_read(&mm->mmap_sem);
480 for (vma = mm->mmap; vma; vma = vma->vm_next) 484 for (vma = mm->mmap; vma; vma = vma->vm_next) {
485 clear_refs_walk.private = vma;
481 if (!is_vm_hugetlb_page(vma)) 486 if (!is_vm_hugetlb_page(vma))
482 walk_page_range(mm, vma->vm_start, vma->vm_end, 487 walk_page_range(vma->vm_start, vma->vm_end,
483 &clear_refs_walk, vma); 488 &clear_refs_walk);
489 }
484 flush_tlb_mm(mm); 490 flush_tlb_mm(mm);
485 up_read(&mm->mmap_sem); 491 up_read(&mm->mmap_sem);
486 mmput(mm); 492 mmput(mm);
@@ -496,7 +502,7 @@ const struct file_operations proc_clear_refs_operations = {
496}; 502};
497 503
498struct pagemapread { 504struct pagemapread {
499 char __user *out, *end; 505 u64 __user *out, *end;
500}; 506};
501 507
502#define PM_ENTRY_BYTES sizeof(u64) 508#define PM_ENTRY_BYTES sizeof(u64)
@@ -519,28 +525,18 @@ struct pagemapread {
519static int add_to_pagemap(unsigned long addr, u64 pfn, 525static int add_to_pagemap(unsigned long addr, u64 pfn,
520 struct pagemapread *pm) 526 struct pagemapread *pm)
521{ 527{
522 /*
523 * Make sure there's room in the buffer for an
524 * entire entry. Otherwise, only copy part of
525 * the pfn.
526 */
527 if (pm->out + PM_ENTRY_BYTES >= pm->end) {
528 if (copy_to_user(pm->out, &pfn, pm->end - pm->out))
529 return -EFAULT;
530 pm->out = pm->end;
531 return PM_END_OF_BUFFER;
532 }
533
534 if (put_user(pfn, pm->out)) 528 if (put_user(pfn, pm->out))
535 return -EFAULT; 529 return -EFAULT;
536 pm->out += PM_ENTRY_BYTES; 530 pm->out++;
531 if (pm->out >= pm->end)
532 return PM_END_OF_BUFFER;
537 return 0; 533 return 0;
538} 534}
539 535
540static int pagemap_pte_hole(unsigned long start, unsigned long end, 536static int pagemap_pte_hole(unsigned long start, unsigned long end,
541 void *private) 537 struct mm_walk *walk)
542{ 538{
543 struct pagemapread *pm = private; 539 struct pagemapread *pm = walk->private;
544 unsigned long addr; 540 unsigned long addr;
545 int err = 0; 541 int err = 0;
546 for (addr = start; addr < end; addr += PAGE_SIZE) { 542 for (addr = start; addr < end; addr += PAGE_SIZE) {
@@ -557,24 +553,45 @@ static u64 swap_pte_to_pagemap_entry(pte_t pte)
557 return swp_type(e) | (swp_offset(e) << MAX_SWAPFILES_SHIFT); 553 return swp_type(e) | (swp_offset(e) << MAX_SWAPFILES_SHIFT);
558} 554}
559 555
556static unsigned long pte_to_pagemap_entry(pte_t pte)
557{
558 unsigned long pme = 0;
559 if (is_swap_pte(pte))
560 pme = PM_PFRAME(swap_pte_to_pagemap_entry(pte))
561 | PM_PSHIFT(PAGE_SHIFT) | PM_SWAP;
562 else if (pte_present(pte))
563 pme = PM_PFRAME(pte_pfn(pte))
564 | PM_PSHIFT(PAGE_SHIFT) | PM_PRESENT;
565 return pme;
566}
567
560static int pagemap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, 568static int pagemap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
561 void *private) 569 struct mm_walk *walk)
562{ 570{
563 struct pagemapread *pm = private; 571 struct vm_area_struct *vma;
572 struct pagemapread *pm = walk->private;
564 pte_t *pte; 573 pte_t *pte;
565 int err = 0; 574 int err = 0;
566 575
576 /* find the first VMA at or above 'addr' */
577 vma = find_vma(walk->mm, addr);
567 for (; addr != end; addr += PAGE_SIZE) { 578 for (; addr != end; addr += PAGE_SIZE) {
568 u64 pfn = PM_NOT_PRESENT; 579 u64 pfn = PM_NOT_PRESENT;
569 pte = pte_offset_map(pmd, addr); 580
570 if (is_swap_pte(*pte)) 581 /* check to see if we've left 'vma' behind
571 pfn = PM_PFRAME(swap_pte_to_pagemap_entry(*pte)) 582 * and need a new, higher one */
572 | PM_PSHIFT(PAGE_SHIFT) | PM_SWAP; 583 if (vma && (addr >= vma->vm_end))
573 else if (pte_present(*pte)) 584 vma = find_vma(walk->mm, addr);
574 pfn = PM_PFRAME(pte_pfn(*pte)) 585
575 | PM_PSHIFT(PAGE_SHIFT) | PM_PRESENT; 586 /* check that 'vma' actually covers this address,
576 /* unmap so we're not in atomic when we copy to userspace */ 587 * and that it isn't a huge page vma */
577 pte_unmap(pte); 588 if (vma && (vma->vm_start <= addr) &&
589 !is_vm_hugetlb_page(vma)) {
590 pte = pte_offset_map(pmd, addr);
591 pfn = pte_to_pagemap_entry(*pte);
592 /* unmap before userspace copy */
593 pte_unmap(pte);
594 }
578 err = add_to_pagemap(addr, pfn, pm); 595 err = add_to_pagemap(addr, pfn, pm);
579 if (err) 596 if (err)
580 return err; 597 return err;
@@ -585,11 +602,6 @@ static int pagemap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
585 return err; 602 return err;
586} 603}
587 604
588static struct mm_walk pagemap_walk = {
589 .pmd_entry = pagemap_pte_range,
590 .pte_hole = pagemap_pte_hole
591};
592
593/* 605/*
594 * /proc/pid/pagemap - an array mapping virtual pages to pfns 606 * /proc/pid/pagemap - an array mapping virtual pages to pfns
595 * 607 *
@@ -624,6 +636,11 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,
624 struct pagemapread pm; 636 struct pagemapread pm;
625 int pagecount; 637 int pagecount;
626 int ret = -ESRCH; 638 int ret = -ESRCH;
639 struct mm_walk pagemap_walk;
640 unsigned long src;
641 unsigned long svpfn;
642 unsigned long start_vaddr;
643 unsigned long end_vaddr;
627 644
628 if (!task) 645 if (!task)
629 goto out; 646 goto out;
@@ -634,7 +651,7 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,
634 651
635 ret = -EINVAL; 652 ret = -EINVAL;
636 /* file position must be aligned */ 653 /* file position must be aligned */
637 if (*ppos % PM_ENTRY_BYTES) 654 if ((*ppos % PM_ENTRY_BYTES) || (count % PM_ENTRY_BYTES))
638 goto out_task; 655 goto out_task;
639 656
640 ret = 0; 657 ret = 0;
@@ -642,11 +659,15 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,
642 if (!mm) 659 if (!mm)
643 goto out_task; 660 goto out_task;
644 661
645 ret = -ENOMEM; 662
646 uaddr = (unsigned long)buf & PAGE_MASK; 663 uaddr = (unsigned long)buf & PAGE_MASK;
647 uend = (unsigned long)(buf + count); 664 uend = (unsigned long)(buf + count);
648 pagecount = (PAGE_ALIGN(uend) - uaddr) / PAGE_SIZE; 665 pagecount = (PAGE_ALIGN(uend) - uaddr) / PAGE_SIZE;
649 pages = kmalloc(pagecount * sizeof(struct page *), GFP_KERNEL); 666 ret = 0;
667 if (pagecount == 0)
668 goto out_mm;
669 pages = kcalloc(pagecount, sizeof(struct page *), GFP_KERNEL);
670 ret = -ENOMEM;
650 if (!pages) 671 if (!pages)
651 goto out_mm; 672 goto out_mm;
652 673
@@ -664,36 +685,36 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,
664 goto out_pages; 685 goto out_pages;
665 } 686 }
666 687
667 pm.out = buf; 688 pm.out = (u64 *)buf;
668 pm.end = buf + count; 689 pm.end = (u64 *)(buf + count);
669 690
670 if (!ptrace_may_attach(task)) { 691 pagemap_walk.pmd_entry = pagemap_pte_range;
671 ret = -EIO; 692 pagemap_walk.pte_hole = pagemap_pte_hole;
672 } else { 693 pagemap_walk.mm = mm;
673 unsigned long src = *ppos; 694 pagemap_walk.private = &pm;
674 unsigned long svpfn = src / PM_ENTRY_BYTES; 695
675 unsigned long start_vaddr = svpfn << PAGE_SHIFT; 696 src = *ppos;
676 unsigned long end_vaddr = TASK_SIZE_OF(task); 697 svpfn = src / PM_ENTRY_BYTES;
677 698 start_vaddr = svpfn << PAGE_SHIFT;
678 /* watch out for wraparound */ 699 end_vaddr = TASK_SIZE_OF(task);
679 if (svpfn > TASK_SIZE_OF(task) >> PAGE_SHIFT) 700
680 start_vaddr = end_vaddr; 701 /* watch out for wraparound */
681 702 if (svpfn > TASK_SIZE_OF(task) >> PAGE_SHIFT)
682 /* 703 start_vaddr = end_vaddr;
683 * The odds are that this will stop walking way 704
684 * before end_vaddr, because the length of the 705 /*
685 * user buffer is tracked in "pm", and the walk 706 * The odds are that this will stop walking way
686 * will stop when we hit the end of the buffer. 707 * before end_vaddr, because the length of the
687 */ 708 * user buffer is tracked in "pm", and the walk
688 ret = walk_page_range(mm, start_vaddr, end_vaddr, 709 * will stop when we hit the end of the buffer.
689 &pagemap_walk, &pm); 710 */
690 if (ret == PM_END_OF_BUFFER) 711 ret = walk_page_range(start_vaddr, end_vaddr, &pagemap_walk);
691 ret = 0; 712 if (ret == PM_END_OF_BUFFER)
692 /* don't need mmap_sem for these, but this looks cleaner */ 713 ret = 0;
693 *ppos += pm.out - buf; 714 /* don't need mmap_sem for these, but this looks cleaner */
694 if (!ret) 715 *ppos += (char *)pm.out - buf;
695 ret = pm.out - buf; 716 if (!ret)
696 } 717 ret = (char *)pm.out - buf;
697 718
698out_pages: 719out_pages:
699 for (; pagecount; pagecount--) { 720 for (; pagecount; pagecount--) {
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index ed424d708e69..1d40f2bd1970 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -2165,8 +2165,10 @@ static ssize_t reiserfs_quota_write(struct super_block *sb, int type,
2165 blk++; 2165 blk++;
2166 } 2166 }
2167out: 2167out:
2168 if (len == towrite) 2168 if (len == towrite) {
2169 mutex_unlock(&inode->i_mutex);
2169 return err; 2170 return err;
2171 }
2170 if (inode->i_size < off + len - towrite) 2172 if (inode->i_size < off + len - towrite)
2171 i_size_write(inode, off + len - towrite); 2173 i_size_write(inode, off + len - towrite);
2172 inode->i_version++; 2174 inode->i_version++;
diff --git a/fs/select.c b/fs/select.c
index 8dda969614a9..da0e88201c3a 100644
--- a/fs/select.c
+++ b/fs/select.c
@@ -249,7 +249,6 @@ int do_select(int n, fd_set_bits *fds, s64 *timeout)
249 retval++; 249 retval++;
250 } 250 }
251 } 251 }
252 cond_resched();
253 } 252 }
254 if (res_in) 253 if (res_in)
255 *rinp = res_in; 254 *rinp = res_in;
@@ -257,6 +256,7 @@ int do_select(int n, fd_set_bits *fds, s64 *timeout)
257 *routp = res_out; 256 *routp = res_out;
258 if (res_ex) 257 if (res_ex)
259 *rexp = res_ex; 258 *rexp = res_ex;
259 cond_resched();
260 } 260 }
261 wait = NULL; 261 wait = NULL;
262 if (retval || !*timeout || signal_pending(current)) 262 if (retval || !*timeout || signal_pending(current))
diff --git a/fs/splice.c b/fs/splice.c
index 78150038b584..aa5f6f60b305 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -58,8 +58,8 @@ static int page_cache_pipe_buf_steal(struct pipe_inode_info *pipe,
58 */ 58 */
59 wait_on_page_writeback(page); 59 wait_on_page_writeback(page);
60 60
61 if (PagePrivate(page)) 61 if (PagePrivate(page) && !try_to_release_page(page, GFP_KERNEL))
62 try_to_release_page(page, GFP_KERNEL); 62 goto out_unlock;
63 63
64 /* 64 /*
65 * If we succeeded in removing the mapping, set LRU flag 65 * If we succeeded in removing the mapping, set LRU flag
@@ -75,6 +75,7 @@ static int page_cache_pipe_buf_steal(struct pipe_inode_info *pipe,
75 * Raced with truncate or failed to remove page from current 75 * Raced with truncate or failed to remove page from current
76 * address space, unlock and return failure. 76 * address space, unlock and return failure.
77 */ 77 */
78out_unlock:
78 unlock_page(page); 79 unlock_page(page);
79 return 1; 80 return 1;
80} 81}
@@ -983,7 +984,7 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
983 984
984 while (len) { 985 while (len) {
985 size_t read_len; 986 size_t read_len;
986 loff_t pos = sd->pos; 987 loff_t pos = sd->pos, prev_pos = pos;
987 988
988 ret = do_splice_to(in, &pos, pipe, len, flags); 989 ret = do_splice_to(in, &pos, pipe, len, flags);
989 if (unlikely(ret <= 0)) 990 if (unlikely(ret <= 0))
@@ -998,15 +999,19 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
998 * could get stuck data in the internal pipe: 999 * could get stuck data in the internal pipe:
999 */ 1000 */
1000 ret = actor(pipe, sd); 1001 ret = actor(pipe, sd);
1001 if (unlikely(ret <= 0)) 1002 if (unlikely(ret <= 0)) {
1003 sd->pos = prev_pos;
1002 goto out_release; 1004 goto out_release;
1005 }
1003 1006
1004 bytes += ret; 1007 bytes += ret;
1005 len -= ret; 1008 len -= ret;
1006 sd->pos = pos; 1009 sd->pos = pos;
1007 1010
1008 if (ret < read_len) 1011 if (ret < read_len) {
1012 sd->pos = prev_pos + ret;
1009 goto out_release; 1013 goto out_release;
1014 }
1010 } 1015 }
1011 1016
1012done: 1017done:
@@ -1072,7 +1077,7 @@ long do_splice_direct(struct file *in, loff_t *ppos, struct file *out,
1072 1077
1073 ret = splice_direct_to_actor(in, &sd, direct_splice_actor); 1078 ret = splice_direct_to_actor(in, &sd, direct_splice_actor);
1074 if (ret > 0) 1079 if (ret > 0)
1075 *ppos += ret; 1080 *ppos = sd.pos;
1076 1081
1077 return ret; 1082 return ret;
1078} 1083}
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index a1c3a1fab7f0..8c0e4b92574f 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -419,12 +419,8 @@ void sysfs_addrm_start(struct sysfs_addrm_cxt *acxt,
419 */ 419 */
420int sysfs_add_one(struct sysfs_addrm_cxt *acxt, struct sysfs_dirent *sd) 420int sysfs_add_one(struct sysfs_addrm_cxt *acxt, struct sysfs_dirent *sd)
421{ 421{
422 if (sysfs_find_dirent(acxt->parent_sd, sd->s_name)) { 422 if (sysfs_find_dirent(acxt->parent_sd, sd->s_name))
423 printk(KERN_WARNING "sysfs: duplicate filename '%s' "
424 "can not be created\n", sd->s_name);
425 WARN_ON(1);
426 return -EEXIST; 423 return -EEXIST;
427 }
428 424
429 sd->s_parent = sysfs_get(acxt->parent_sd); 425 sd->s_parent = sysfs_get(acxt->parent_sd);
430 426
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 7a5f69be6ac2..44cc702f96cc 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -682,38 +682,26 @@ static int udf_vrs(struct super_block *sb, int silent)
682/* 682/*
683 * Check whether there is an anchor block in the given block 683 * Check whether there is an anchor block in the given block
684 */ 684 */
685static int udf_check_anchor_block(struct super_block *sb, sector_t block, 685static int udf_check_anchor_block(struct super_block *sb, sector_t block)
686 bool varconv)
687{ 686{
688 struct buffer_head *bh = NULL; 687 struct buffer_head *bh;
689 tag *t;
690 uint16_t ident; 688 uint16_t ident;
691 uint32_t location;
692 689
693 if (varconv) { 690 if (UDF_QUERY_FLAG(sb, UDF_FLAG_VARCONV) &&
694 if (udf_fixed_to_variable(block) >= 691 udf_fixed_to_variable(block) >=
695 sb->s_bdev->bd_inode->i_size >> sb->s_blocksize_bits) 692 sb->s_bdev->bd_inode->i_size >> sb->s_blocksize_bits)
696 return 0; 693 return 0;
697 bh = sb_bread(sb, udf_fixed_to_variable(block));
698 }
699 else
700 bh = sb_bread(sb, block);
701 694
695 bh = udf_read_tagged(sb, block, block, &ident);
702 if (!bh) 696 if (!bh)
703 return 0; 697 return 0;
704
705 t = (tag *)bh->b_data;
706 ident = le16_to_cpu(t->tagIdent);
707 location = le32_to_cpu(t->tagLocation);
708 brelse(bh); 698 brelse(bh);
709 if (ident != TAG_IDENT_AVDP) 699
710 return 0; 700 return ident == TAG_IDENT_AVDP;
711 return location == block;
712} 701}
713 702
714/* Search for an anchor volume descriptor pointer */ 703/* Search for an anchor volume descriptor pointer */
715static sector_t udf_scan_anchors(struct super_block *sb, bool varconv, 704static sector_t udf_scan_anchors(struct super_block *sb, sector_t lastblock)
716 sector_t lastblock)
717{ 705{
718 sector_t last[6]; 706 sector_t last[6];
719 int i; 707 int i;
@@ -739,7 +727,7 @@ static sector_t udf_scan_anchors(struct super_block *sb, bool varconv,
739 sb->s_blocksize_bits) 727 sb->s_blocksize_bits)
740 continue; 728 continue;
741 729
742 if (udf_check_anchor_block(sb, last[i], varconv)) { 730 if (udf_check_anchor_block(sb, last[i])) {
743 sbi->s_anchor[0] = last[i]; 731 sbi->s_anchor[0] = last[i];
744 sbi->s_anchor[1] = last[i] - 256; 732 sbi->s_anchor[1] = last[i] - 256;
745 return last[i]; 733 return last[i];
@@ -748,17 +736,17 @@ static sector_t udf_scan_anchors(struct super_block *sb, bool varconv,
748 if (last[i] < 256) 736 if (last[i] < 256)
749 continue; 737 continue;
750 738
751 if (udf_check_anchor_block(sb, last[i] - 256, varconv)) { 739 if (udf_check_anchor_block(sb, last[i] - 256)) {
752 sbi->s_anchor[1] = last[i] - 256; 740 sbi->s_anchor[1] = last[i] - 256;
753 return last[i]; 741 return last[i];
754 } 742 }
755 } 743 }
756 744
757 if (udf_check_anchor_block(sb, sbi->s_session + 256, varconv)) { 745 if (udf_check_anchor_block(sb, sbi->s_session + 256)) {
758 sbi->s_anchor[0] = sbi->s_session + 256; 746 sbi->s_anchor[0] = sbi->s_session + 256;
759 return last[0]; 747 return last[0];
760 } 748 }
761 if (udf_check_anchor_block(sb, sbi->s_session + 512, varconv)) { 749 if (udf_check_anchor_block(sb, sbi->s_session + 512)) {
762 sbi->s_anchor[0] = sbi->s_session + 512; 750 sbi->s_anchor[0] = sbi->s_session + 512;
763 return last[0]; 751 return last[0];
764 } 752 }
@@ -780,23 +768,24 @@ static void udf_find_anchor(struct super_block *sb)
780 int i; 768 int i;
781 struct udf_sb_info *sbi = UDF_SB(sb); 769 struct udf_sb_info *sbi = UDF_SB(sb);
782 770
783 lastblock = udf_scan_anchors(sb, 0, sbi->s_last_block); 771 lastblock = udf_scan_anchors(sb, sbi->s_last_block);
784 if (lastblock) 772 if (lastblock)
785 goto check_anchor; 773 goto check_anchor;
786 774
787 /* No anchor found? Try VARCONV conversion of block numbers */ 775 /* No anchor found? Try VARCONV conversion of block numbers */
776 UDF_SET_FLAG(sb, UDF_FLAG_VARCONV);
788 /* Firstly, we try to not convert number of the last block */ 777 /* Firstly, we try to not convert number of the last block */
789 lastblock = udf_scan_anchors(sb, 1, 778 lastblock = udf_scan_anchors(sb,
790 udf_variable_to_fixed(sbi->s_last_block)); 779 udf_variable_to_fixed(sbi->s_last_block));
791 if (lastblock) { 780 if (lastblock)
792 UDF_SET_FLAG(sb, UDF_FLAG_VARCONV);
793 goto check_anchor; 781 goto check_anchor;
794 }
795 782
796 /* Secondly, we try with converted number of the last block */ 783 /* Secondly, we try with converted number of the last block */
797 lastblock = udf_scan_anchors(sb, 1, sbi->s_last_block); 784 lastblock = udf_scan_anchors(sb, sbi->s_last_block);
798 if (lastblock) 785 if (!lastblock) {
799 UDF_SET_FLAG(sb, UDF_FLAG_VARCONV); 786 /* VARCONV didn't help. Clear it. */
787 UDF_CLEAR_FLAG(sb, UDF_FLAG_VARCONV);
788 }
800 789
801check_anchor: 790check_anchor:
802 /* 791 /*
diff --git a/fs/udf/udfdecl.h b/fs/udf/udfdecl.h
index 8fa9c2d70911..8ec865de5f13 100644
--- a/fs/udf/udfdecl.h
+++ b/fs/udf/udfdecl.h
@@ -16,7 +16,7 @@
16#define UDF_PREALLOCATE 16#define UDF_PREALLOCATE
17#define UDF_DEFAULT_PREALLOC_BLOCKS 8 17#define UDF_DEFAULT_PREALLOC_BLOCKS 8
18 18
19#define UDFFS_DEBUG 19#undef UDFFS_DEBUG
20 20
21#ifdef UDFFS_DEBUG 21#ifdef UDFFS_DEBUG
22#define udf_debug(f, a...) \ 22#define udf_debug(f, a...) \
diff --git a/fs/utimes.c b/fs/utimes.c
index af059d5cb485..b6b664e7145e 100644
--- a/fs/utimes.c
+++ b/fs/utimes.c
@@ -40,14 +40,9 @@ asmlinkage long sys_utime(char __user *filename, struct utimbuf __user *times)
40 40
41#endif 41#endif
42 42
43static bool nsec_special(long nsec)
44{
45 return nsec == UTIME_OMIT || nsec == UTIME_NOW;
46}
47
48static bool nsec_valid(long nsec) 43static bool nsec_valid(long nsec)
49{ 44{
50 if (nsec_special(nsec)) 45 if (nsec == UTIME_OMIT || nsec == UTIME_NOW)
51 return true; 46 return true;
52 47
53 return nsec >= 0 && nsec <= 999999999; 48 return nsec >= 0 && nsec <= 999999999;
@@ -102,7 +97,11 @@ long do_utimes(int dfd, char __user *filename, struct timespec *times, int flags
102 if (error) 97 if (error)
103 goto dput_and_out; 98 goto dput_and_out;
104 99
105 /* Don't worry, the checks are done in inode_change_ok() */ 100 if (times && times[0].tv_nsec == UTIME_NOW &&
101 times[1].tv_nsec == UTIME_NOW)
102 times = NULL;
103
104 /* In most cases, the checks are done in inode_change_ok() */
106 newattrs.ia_valid = ATTR_CTIME | ATTR_MTIME | ATTR_ATIME; 105 newattrs.ia_valid = ATTR_CTIME | ATTR_MTIME | ATTR_ATIME;
107 if (times) { 106 if (times) {
108 error = -EPERM; 107 error = -EPERM;
@@ -124,28 +123,34 @@ long do_utimes(int dfd, char __user *filename, struct timespec *times, int flags
124 newattrs.ia_mtime.tv_nsec = times[1].tv_nsec; 123 newattrs.ia_mtime.tv_nsec = times[1].tv_nsec;
125 newattrs.ia_valid |= ATTR_MTIME_SET; 124 newattrs.ia_valid |= ATTR_MTIME_SET;
126 } 125 }
127 }
128 126
129 /* 127 /*
130 * If times is NULL or both times are either UTIME_OMIT or 128 * For the UTIME_OMIT/UTIME_NOW and UTIME_NOW/UTIME_OMIT
131 * UTIME_NOW, then need to check permissions, because 129 * cases, we need to make an extra check that is not done by
132 * inode_change_ok() won't do it. 130 * inode_change_ok().
133 */ 131 */
134 if (!times || (nsec_special(times[0].tv_nsec) && 132 if (((times[0].tv_nsec == UTIME_NOW &&
135 nsec_special(times[1].tv_nsec))) { 133 times[1].tv_nsec == UTIME_OMIT)
134 ||
135 (times[0].tv_nsec == UTIME_OMIT &&
136 times[1].tv_nsec == UTIME_NOW))
137 && !is_owner_or_cap(inode))
138 goto mnt_drop_write_and_out;
139 } else {
140
141 /*
142 * If times is NULL (or both times are UTIME_NOW),
143 * then we need to check permissions, because
144 * inode_change_ok() won't do it.
145 */
136 error = -EACCES; 146 error = -EACCES;
137 if (IS_IMMUTABLE(inode)) 147 if (IS_IMMUTABLE(inode))
138 goto mnt_drop_write_and_out; 148 goto mnt_drop_write_and_out;
139 149
140 if (!is_owner_or_cap(inode)) { 150 if (!is_owner_or_cap(inode)) {
141 if (f) { 151 error = permission(inode, MAY_WRITE, NULL);
142 if (!(f->f_mode & FMODE_WRITE)) 152 if (error)
143 goto mnt_drop_write_and_out; 153 goto mnt_drop_write_and_out;
144 } else {
145 error = vfs_permission(&nd, MAY_WRITE);
146 if (error)
147 goto mnt_drop_write_and_out;
148 }
149 } 154 }
150 } 155 }
151 mutex_lock(&inode->i_mutex); 156 mutex_lock(&inode->i_mutex);
@@ -169,14 +174,6 @@ asmlinkage long sys_utimensat(int dfd, char __user *filename, struct timespec __
169 if (utimes) { 174 if (utimes) {
170 if (copy_from_user(&tstimes, utimes, sizeof(tstimes))) 175 if (copy_from_user(&tstimes, utimes, sizeof(tstimes)))
171 return -EFAULT; 176 return -EFAULT;
172 if ((tstimes[0].tv_nsec == UTIME_OMIT ||
173 tstimes[0].tv_nsec == UTIME_NOW) &&
174 tstimes[0].tv_sec != 0)
175 return -EINVAL;
176 if ((tstimes[1].tv_nsec == UTIME_OMIT ||
177 tstimes[1].tv_nsec == UTIME_NOW) &&
178 tstimes[1].tv_sec != 0)
179 return -EINVAL;
180 177
181 /* Nothing to do, we must not even check the path. */ 178 /* Nothing to do, we must not even check the path. */
182 if (tstimes[0].tv_nsec == UTIME_OMIT && 179 if (tstimes[0].tv_nsec == UTIME_OMIT &&
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c
index 5105015a75ad..98e0e86093b4 100644
--- a/fs/xfs/linux-2.6/xfs_buf.c
+++ b/fs/xfs/linux-2.6/xfs_buf.c
@@ -387,6 +387,8 @@ _xfs_buf_lookup_pages(
387 if (unlikely(page == NULL)) { 387 if (unlikely(page == NULL)) {
388 if (flags & XBF_READ_AHEAD) { 388 if (flags & XBF_READ_AHEAD) {
389 bp->b_page_count = i; 389 bp->b_page_count = i;
390 for (i = 0; i < bp->b_page_count; i++)
391 unlock_page(bp->b_pages[i]);
390 return -ENOMEM; 392 return -ENOMEM;
391 } 393 }
392 394
@@ -416,17 +418,24 @@ _xfs_buf_lookup_pages(
416 ASSERT(!PagePrivate(page)); 418 ASSERT(!PagePrivate(page));
417 if (!PageUptodate(page)) { 419 if (!PageUptodate(page)) {
418 page_count--; 420 page_count--;
419 if (blocksize < PAGE_CACHE_SIZE && !PagePrivate(page)) { 421 if (blocksize >= PAGE_CACHE_SIZE) {
422 if (flags & XBF_READ)
423 bp->b_flags |= _XBF_PAGE_LOCKED;
424 } else if (!PagePrivate(page)) {
420 if (test_page_region(page, offset, nbytes)) 425 if (test_page_region(page, offset, nbytes))
421 page_count++; 426 page_count++;
422 } 427 }
423 } 428 }
424 429
425 unlock_page(page);
426 bp->b_pages[i] = page; 430 bp->b_pages[i] = page;
427 offset = 0; 431 offset = 0;
428 } 432 }
429 433
434 if (!(bp->b_flags & _XBF_PAGE_LOCKED)) {
435 for (i = 0; i < bp->b_page_count; i++)
436 unlock_page(bp->b_pages[i]);
437 }
438
430 if (page_count == bp->b_page_count) 439 if (page_count == bp->b_page_count)
431 bp->b_flags |= XBF_DONE; 440 bp->b_flags |= XBF_DONE;
432 441
@@ -746,6 +755,7 @@ xfs_buf_associate_memory(
746 bp->b_count_desired = len; 755 bp->b_count_desired = len;
747 bp->b_buffer_length = buflen; 756 bp->b_buffer_length = buflen;
748 bp->b_flags |= XBF_MAPPED; 757 bp->b_flags |= XBF_MAPPED;
758 bp->b_flags &= ~_XBF_PAGE_LOCKED;
749 759
750 return 0; 760 return 0;
751} 761}
@@ -1093,8 +1103,10 @@ _xfs_buf_ioend(
1093 xfs_buf_t *bp, 1103 xfs_buf_t *bp,
1094 int schedule) 1104 int schedule)
1095{ 1105{
1096 if (atomic_dec_and_test(&bp->b_io_remaining) == 1) 1106 if (atomic_dec_and_test(&bp->b_io_remaining) == 1) {
1107 bp->b_flags &= ~_XBF_PAGE_LOCKED;
1097 xfs_buf_ioend(bp, schedule); 1108 xfs_buf_ioend(bp, schedule);
1109 }
1098} 1110}
1099 1111
1100STATIC void 1112STATIC void
@@ -1125,6 +1137,9 @@ xfs_buf_bio_end_io(
1125 1137
1126 if (--bvec >= bio->bi_io_vec) 1138 if (--bvec >= bio->bi_io_vec)
1127 prefetchw(&bvec->bv_page->flags); 1139 prefetchw(&bvec->bv_page->flags);
1140
1141 if (bp->b_flags & _XBF_PAGE_LOCKED)
1142 unlock_page(page);
1128 } while (bvec >= bio->bi_io_vec); 1143 } while (bvec >= bio->bi_io_vec);
1129 1144
1130 _xfs_buf_ioend(bp, 1); 1145 _xfs_buf_ioend(bp, 1);
@@ -1163,7 +1178,8 @@ _xfs_buf_ioapply(
1163 * filesystem block size is not smaller than the page size. 1178 * filesystem block size is not smaller than the page size.
1164 */ 1179 */
1165 if ((bp->b_buffer_length < PAGE_CACHE_SIZE) && 1180 if ((bp->b_buffer_length < PAGE_CACHE_SIZE) &&
1166 (bp->b_flags & XBF_READ) && 1181 ((bp->b_flags & (XBF_READ|_XBF_PAGE_LOCKED)) ==
1182 (XBF_READ|_XBF_PAGE_LOCKED)) &&
1167 (blocksize >= PAGE_CACHE_SIZE)) { 1183 (blocksize >= PAGE_CACHE_SIZE)) {
1168 bio = bio_alloc(GFP_NOIO, 1); 1184 bio = bio_alloc(GFP_NOIO, 1);
1169 1185
diff --git a/fs/xfs/linux-2.6/xfs_buf.h b/fs/xfs/linux-2.6/xfs_buf.h
index 841d7883528d..f948ec7ba9a4 100644
--- a/fs/xfs/linux-2.6/xfs_buf.h
+++ b/fs/xfs/linux-2.6/xfs_buf.h
@@ -66,6 +66,25 @@ typedef enum {
66 _XBF_PAGES = (1 << 18), /* backed by refcounted pages */ 66 _XBF_PAGES = (1 << 18), /* backed by refcounted pages */
67 _XBF_RUN_QUEUES = (1 << 19),/* run block device task queue */ 67 _XBF_RUN_QUEUES = (1 << 19),/* run block device task queue */
68 _XBF_DELWRI_Q = (1 << 21), /* buffer on delwri queue */ 68 _XBF_DELWRI_Q = (1 << 21), /* buffer on delwri queue */
69
70 /*
71 * Special flag for supporting metadata blocks smaller than a FSB.
72 *
73 * In this case we can have multiple xfs_buf_t on a single page and
74 * need to lock out concurrent xfs_buf_t readers as they only
75 * serialise access to the buffer.
76 *
77 * If the FSB size >= PAGE_CACHE_SIZE case, we have no serialisation
78 * between reads of the page. Hence we can have one thread read the
79 * page and modify it, but then race with another thread that thinks
80 * the page is not up-to-date and hence reads it again.
81 *
82 * The result is that the first modifcation to the page is lost.
83 * This sort of AGF/AGI reading race can happen when unlinking inodes
84 * that require truncation and results in the AGI unlinked list
85 * modifications being lost.
86 */
87 _XBF_PAGE_LOCKED = (1 << 22),
69} xfs_buf_flags_t; 88} xfs_buf_flags_t;
70 89
71typedef enum { 90typedef enum {
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c
index 65e78c13d4ae..5f60363b9343 100644
--- a/fs/xfs/linux-2.6/xfs_file.c
+++ b/fs/xfs/linux-2.6/xfs_file.c
@@ -184,19 +184,24 @@ xfs_file_release(
184 return -xfs_release(XFS_I(inode)); 184 return -xfs_release(XFS_I(inode));
185} 185}
186 186
187/*
188 * We ignore the datasync flag here because a datasync is effectively
189 * identical to an fsync. That is, datasync implies that we need to write
190 * only the metadata needed to be able to access the data that is written
191 * if we crash after the call completes. Hence if we are writing beyond
192 * EOF we have to log the inode size change as well, which makes it a
193 * full fsync. If we don't write beyond EOF, the inode core will be
194 * clean in memory and so we don't need to log the inode, just like
195 * fsync.
196 */
187STATIC int 197STATIC int
188xfs_file_fsync( 198xfs_file_fsync(
189 struct file *filp, 199 struct file *filp,
190 struct dentry *dentry, 200 struct dentry *dentry,
191 int datasync) 201 int datasync)
192{ 202{
193 int flags = FSYNC_WAIT;
194
195 if (datasync)
196 flags |= FSYNC_DATA;
197 xfs_iflags_clear(XFS_I(dentry->d_inode), XFS_ITRUNCATED); 203 xfs_iflags_clear(XFS_I(dentry->d_inode), XFS_ITRUNCATED);
198 return -xfs_fsync(XFS_I(dentry->d_inode), flags, 204 return -xfs_fsync(XFS_I(dentry->d_inode));
199 (xfs_off_t)0, (xfs_off_t)-1);
200} 205}
201 206
202/* 207/*
diff --git a/fs/xfs/linux-2.6/xfs_vnode.h b/fs/xfs/linux-2.6/xfs_vnode.h
index 9d73cb5c0fc7..25eb2a9e8d9b 100644
--- a/fs/xfs/linux-2.6/xfs_vnode.h
+++ b/fs/xfs/linux-2.6/xfs_vnode.h
@@ -230,14 +230,6 @@ static inline void vn_atime_to_time_t(bhv_vnode_t *vp, time_t *tt)
230#define ATTR_NOSIZETOK 0x400 /* Don't get the SIZE token */ 230#define ATTR_NOSIZETOK 0x400 /* Don't get the SIZE token */
231 231
232/* 232/*
233 * Flags to vop_fsync/reclaim.
234 */
235#define FSYNC_NOWAIT 0 /* asynchronous flush */
236#define FSYNC_WAIT 0x1 /* synchronous fsync or forced reclaim */
237#define FSYNC_INVAL 0x2 /* flush and invalidate cached data */
238#define FSYNC_DATA 0x4 /* synchronous fsync of data only */
239
240/*
241 * Tracking vnode activity. 233 * Tracking vnode activity.
242 */ 234 */
243#if defined(XFS_INODE_TRACE) 235#if defined(XFS_INODE_TRACE)
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index cf0bb9c1d621..e569bf5d6cf0 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -2974,6 +2974,7 @@ xfs_iflush_cluster(
2974 xfs_mount_t *mp = ip->i_mount; 2974 xfs_mount_t *mp = ip->i_mount;
2975 xfs_perag_t *pag = xfs_get_perag(mp, ip->i_ino); 2975 xfs_perag_t *pag = xfs_get_perag(mp, ip->i_ino);
2976 unsigned long first_index, mask; 2976 unsigned long first_index, mask;
2977 unsigned long inodes_per_cluster;
2977 int ilist_size; 2978 int ilist_size;
2978 xfs_inode_t **ilist; 2979 xfs_inode_t **ilist;
2979 xfs_inode_t *iq; 2980 xfs_inode_t *iq;
@@ -2985,8 +2986,9 @@ xfs_iflush_cluster(
2985 ASSERT(pag->pagi_inodeok); 2986 ASSERT(pag->pagi_inodeok);
2986 ASSERT(pag->pag_ici_init); 2987 ASSERT(pag->pag_ici_init);
2987 2988
2988 ilist_size = XFS_INODE_CLUSTER_SIZE(mp) * sizeof(xfs_inode_t *); 2989 inodes_per_cluster = XFS_INODE_CLUSTER_SIZE(mp) >> mp->m_sb.sb_inodelog;
2989 ilist = kmem_alloc(ilist_size, KM_MAYFAIL); 2990 ilist_size = inodes_per_cluster * sizeof(xfs_inode_t *);
2991 ilist = kmem_alloc(ilist_size, KM_MAYFAIL|KM_NOFS);
2990 if (!ilist) 2992 if (!ilist)
2991 return 0; 2993 return 0;
2992 2994
@@ -2995,8 +2997,7 @@ xfs_iflush_cluster(
2995 read_lock(&pag->pag_ici_lock); 2997 read_lock(&pag->pag_ici_lock);
2996 /* really need a gang lookup range call here */ 2998 /* really need a gang lookup range call here */
2997 nr_found = radix_tree_gang_lookup(&pag->pag_ici_root, (void**)ilist, 2999 nr_found = radix_tree_gang_lookup(&pag->pag_ici_root, (void**)ilist,
2998 first_index, 3000 first_index, inodes_per_cluster);
2999 XFS_INODE_CLUSTER_SIZE(mp));
3000 if (nr_found == 0) 3001 if (nr_found == 0)
3001 goto out_free; 3002 goto out_free;
3002 3003
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index 70702a60b4bb..e475e3717eb3 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -856,18 +856,14 @@ xfs_readlink(
856/* 856/*
857 * xfs_fsync 857 * xfs_fsync
858 * 858 *
859 * This is called to sync the inode and its data out to disk. 859 * This is called to sync the inode and its data out to disk. We need to hold
860 * We need to hold the I/O lock while flushing the data, and 860 * the I/O lock while flushing the data, and the inode lock while flushing the
861 * the inode lock while flushing the inode. The inode lock CANNOT 861 * inode. The inode lock CANNOT be held while flushing the data, so acquire
862 * be held while flushing the data, so acquire after we're done 862 * after we're done with that.
863 * with that.
864 */ 863 */
865int 864int
866xfs_fsync( 865xfs_fsync(
867 xfs_inode_t *ip, 866 xfs_inode_t *ip)
868 int flag,
869 xfs_off_t start,
870 xfs_off_t stop)
871{ 867{
872 xfs_trans_t *tp; 868 xfs_trans_t *tp;
873 int error; 869 int error;
@@ -875,103 +871,79 @@ xfs_fsync(
875 871
876 xfs_itrace_entry(ip); 872 xfs_itrace_entry(ip);
877 873
878 ASSERT(start >= 0 && stop >= -1);
879
880 if (XFS_FORCED_SHUTDOWN(ip->i_mount)) 874 if (XFS_FORCED_SHUTDOWN(ip->i_mount))
881 return XFS_ERROR(EIO); 875 return XFS_ERROR(EIO);
882 876
883 if (flag & FSYNC_DATA) 877 /* capture size updates in I/O completion before writing the inode. */
884 filemap_fdatawait(vn_to_inode(XFS_ITOV(ip))->i_mapping); 878 error = filemap_fdatawait(vn_to_inode(XFS_ITOV(ip))->i_mapping);
879 if (error)
880 return XFS_ERROR(error);
885 881
886 /* 882 /*
887 * We always need to make sure that the required inode state 883 * We always need to make sure that the required inode state is safe on
888 * is safe on disk. The vnode might be clean but because 884 * disk. The vnode might be clean but we still might need to force the
889 * of committed transactions that haven't hit the disk yet. 885 * log because of committed transactions that haven't hit the disk yet.
890 * Likewise, there could be unflushed non-transactional 886 * Likewise, there could be unflushed non-transactional changes to the
891 * changes to the inode core that have to go to disk. 887 * inode core that have to go to disk and this requires us to issue
888 * a synchronous transaction to capture these changes correctly.
892 * 889 *
893 * The following code depends on one assumption: that 890 * This code relies on the assumption that if the update_* fields
894 * any transaction that changes an inode logs the core 891 * of the inode are clear and the inode is unpinned then it is clean
895 * because it has to change some field in the inode core 892 * and no action is required.
896 * (typically nextents or nblocks). That assumption
897 * implies that any transactions against an inode will
898 * catch any non-transactional updates. If inode-altering
899 * transactions exist that violate this assumption, the
900 * code breaks. Right now, it figures that if the involved
901 * update_* field is clear and the inode is unpinned, the
902 * inode is clean. Either it's been flushed or it's been
903 * committed and the commit has hit the disk unpinning the inode.
904 * (Note that xfs_inode_item_format() called at commit clears
905 * the update_* fields.)
906 */ 893 */
907 xfs_ilock(ip, XFS_ILOCK_SHARED); 894 xfs_ilock(ip, XFS_ILOCK_SHARED);
908 895
909 /* If we are flushing data then we care about update_size 896 if (!(ip->i_update_size || ip->i_update_core)) {
910 * being set, otherwise we care about update_core
911 */
912 if ((flag & FSYNC_DATA) ?
913 (ip->i_update_size == 0) :
914 (ip->i_update_core == 0)) {
915 /* 897 /*
916 * Timestamps/size haven't changed since last inode 898 * Timestamps/size haven't changed since last inode flush or
917 * flush or inode transaction commit. That means 899 * inode transaction commit. That means either nothing got
918 * either nothing got written or a transaction 900 * written or a transaction committed which caught the updates.
919 * committed which caught the updates. If the 901 * If the latter happened and the transaction hasn't hit the
920 * latter happened and the transaction hasn't 902 * disk yet, the inode will be still be pinned. If it is,
921 * hit the disk yet, the inode will be still 903 * force the log.
922 * be pinned. If it is, force the log.
923 */ 904 */
924 905
925 xfs_iunlock(ip, XFS_ILOCK_SHARED); 906 xfs_iunlock(ip, XFS_ILOCK_SHARED);
926 907
927 if (xfs_ipincount(ip)) { 908 if (xfs_ipincount(ip)) {
928 _xfs_log_force(ip->i_mount, (xfs_lsn_t)0, 909 error = _xfs_log_force(ip->i_mount, (xfs_lsn_t)0,
929 XFS_LOG_FORCE | 910 XFS_LOG_FORCE | XFS_LOG_SYNC,
930 ((flag & FSYNC_WAIT)
931 ? XFS_LOG_SYNC : 0),
932 &log_flushed); 911 &log_flushed);
933 } else { 912 } else {
934 /* 913 /*
935 * If the inode is not pinned and nothing 914 * If the inode is not pinned and nothing has changed
936 * has changed we don't need to flush the 915 * we don't need to flush the cache.
937 * cache.
938 */ 916 */
939 changed = 0; 917 changed = 0;
940 } 918 }
941 error = 0;
942 } else { 919 } else {
943 /* 920 /*
944 * Kick off a transaction to log the inode 921 * Kick off a transaction to log the inode core to get the
945 * core to get the updates. Make it 922 * updates. The sync transaction will also force the log.
946 * sync if FSYNC_WAIT is passed in (which
947 * is done by everybody but specfs). The
948 * sync transaction will also force the log.
949 */ 923 */
950 xfs_iunlock(ip, XFS_ILOCK_SHARED); 924 xfs_iunlock(ip, XFS_ILOCK_SHARED);
951 tp = xfs_trans_alloc(ip->i_mount, XFS_TRANS_FSYNC_TS); 925 tp = xfs_trans_alloc(ip->i_mount, XFS_TRANS_FSYNC_TS);
952 if ((error = xfs_trans_reserve(tp, 0, 926 error = xfs_trans_reserve(tp, 0,
953 XFS_FSYNC_TS_LOG_RES(ip->i_mount), 927 XFS_FSYNC_TS_LOG_RES(ip->i_mount), 0, 0, 0);
954 0, 0, 0))) { 928 if (error) {
955 xfs_trans_cancel(tp, 0); 929 xfs_trans_cancel(tp, 0);
956 return error; 930 return error;
957 } 931 }
958 xfs_ilock(ip, XFS_ILOCK_EXCL); 932 xfs_ilock(ip, XFS_ILOCK_EXCL);
959 933
960 /* 934 /*
961 * Note - it's possible that we might have pushed 935 * Note - it's possible that we might have pushed ourselves out
962 * ourselves out of the way during trans_reserve 936 * of the way during trans_reserve which would flush the inode.
963 * which would flush the inode. But there's no 937 * But there's no guarantee that the inode buffer has actually
964 * guarantee that the inode buffer has actually 938 * gone out yet (it's delwri). Plus the buffer could be pinned
965 * gone out yet (it's delwri). Plus the buffer 939 * anyway if it's part of an inode in another recent
966 * could be pinned anyway if it's part of an 940 * transaction. So we play it safe and fire off the
967 * inode in another recent transaction. So we 941 * transaction anyway.
968 * play it safe and fire off the transaction anyway.
969 */ 942 */
970 xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); 943 xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
971 xfs_trans_ihold(tp, ip); 944 xfs_trans_ihold(tp, ip);
972 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); 945 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
973 if (flag & FSYNC_WAIT) 946 xfs_trans_set_sync(tp);
974 xfs_trans_set_sync(tp);
975 error = _xfs_trans_commit(tp, 0, &log_flushed); 947 error = _xfs_trans_commit(tp, 0, &log_flushed);
976 948
977 xfs_iunlock(ip, XFS_ILOCK_EXCL); 949 xfs_iunlock(ip, XFS_ILOCK_EXCL);
diff --git a/fs/xfs/xfs_vnodeops.h b/fs/xfs/xfs_vnodeops.h
index 8abe8f186e20..57335ba4ce53 100644
--- a/fs/xfs/xfs_vnodeops.h
+++ b/fs/xfs/xfs_vnodeops.h
@@ -18,8 +18,7 @@ int xfs_open(struct xfs_inode *ip);
18int xfs_setattr(struct xfs_inode *ip, struct bhv_vattr *vap, int flags, 18int xfs_setattr(struct xfs_inode *ip, struct bhv_vattr *vap, int flags,
19 struct cred *credp); 19 struct cred *credp);
20int xfs_readlink(struct xfs_inode *ip, char *link); 20int xfs_readlink(struct xfs_inode *ip, char *link);
21int xfs_fsync(struct xfs_inode *ip, int flag, xfs_off_t start, 21int xfs_fsync(struct xfs_inode *ip);
22 xfs_off_t stop);
23int xfs_release(struct xfs_inode *ip); 22int xfs_release(struct xfs_inode *ip);
24int xfs_inactive(struct xfs_inode *ip); 23int xfs_inactive(struct xfs_inode *ip);
25int xfs_lookup(struct xfs_inode *dp, struct xfs_name *name, 24int xfs_lookup(struct xfs_inode *dp, struct xfs_name *name,
diff --git a/include/acpi/processor.h b/include/acpi/processor.h
index 06480bcabfdc..06ebb6ef72aa 100644
--- a/include/acpi/processor.h
+++ b/include/acpi/processor.h
@@ -319,6 +319,7 @@ static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr)
319#endif /* CONFIG_CPU_FREQ */ 319#endif /* CONFIG_CPU_FREQ */
320 320
321/* in processor_throttling.c */ 321/* in processor_throttling.c */
322int acpi_processor_tstate_has_changed(struct acpi_processor *pr);
322int acpi_processor_get_throttling_info(struct acpi_processor *pr); 323int acpi_processor_get_throttling_info(struct acpi_processor *pr);
323extern int acpi_processor_set_throttling(struct acpi_processor *pr, int state); 324extern int acpi_processor_set_throttling(struct acpi_processor *pr, int state);
324extern struct file_operations acpi_processor_throttling_fops; 325extern struct file_operations acpi_processor_throttling_fops;
diff --git a/include/asm-alpha/core_mcpcia.h b/include/asm-alpha/core_mcpcia.h
index 525b4f6a7ace..acf55b483472 100644
--- a/include/asm-alpha/core_mcpcia.h
+++ b/include/asm-alpha/core_mcpcia.h
@@ -261,7 +261,7 @@ struct el_MCPCIA_uncorrected_frame_mcheck {
261 } 261 }
262#endif 262#endif
263 263
264static inline int __mcpcia_is_mmio(unsigned long addr) 264extern inline int __mcpcia_is_mmio(unsigned long addr)
265{ 265{
266 return (addr & 0x80000000UL) == 0; 266 return (addr & 0x80000000UL) == 0;
267} 267}
diff --git a/include/asm-alpha/core_t2.h b/include/asm-alpha/core_t2.h
index 90e6b5d6c214..46bfff58f670 100644
--- a/include/asm-alpha/core_t2.h
+++ b/include/asm-alpha/core_t2.h
@@ -356,13 +356,13 @@ struct el_t2_frame_corrected {
356#define vip volatile int * 356#define vip volatile int *
357#define vuip volatile unsigned int * 357#define vuip volatile unsigned int *
358 358
359static inline u8 t2_inb(unsigned long addr) 359extern inline u8 t2_inb(unsigned long addr)
360{ 360{
361 long result = *(vip) ((addr << 5) + T2_IO + 0x00); 361 long result = *(vip) ((addr << 5) + T2_IO + 0x00);
362 return __kernel_extbl(result, addr & 3); 362 return __kernel_extbl(result, addr & 3);
363} 363}
364 364
365static inline void t2_outb(u8 b, unsigned long addr) 365extern inline void t2_outb(u8 b, unsigned long addr)
366{ 366{
367 unsigned long w; 367 unsigned long w;
368 368
@@ -371,13 +371,13 @@ static inline void t2_outb(u8 b, unsigned long addr)
371 mb(); 371 mb();
372} 372}
373 373
374static inline u16 t2_inw(unsigned long addr) 374extern inline u16 t2_inw(unsigned long addr)
375{ 375{
376 long result = *(vip) ((addr << 5) + T2_IO + 0x08); 376 long result = *(vip) ((addr << 5) + T2_IO + 0x08);
377 return __kernel_extwl(result, addr & 3); 377 return __kernel_extwl(result, addr & 3);
378} 378}
379 379
380static inline void t2_outw(u16 b, unsigned long addr) 380extern inline void t2_outw(u16 b, unsigned long addr)
381{ 381{
382 unsigned long w; 382 unsigned long w;
383 383
@@ -386,12 +386,12 @@ static inline void t2_outw(u16 b, unsigned long addr)
386 mb(); 386 mb();
387} 387}
388 388
389static inline u32 t2_inl(unsigned long addr) 389extern inline u32 t2_inl(unsigned long addr)
390{ 390{
391 return *(vuip) ((addr << 5) + T2_IO + 0x18); 391 return *(vuip) ((addr << 5) + T2_IO + 0x18);
392} 392}
393 393
394static inline void t2_outl(u32 b, unsigned long addr) 394extern inline void t2_outl(u32 b, unsigned long addr)
395{ 395{
396 *(vuip) ((addr << 5) + T2_IO + 0x18) = b; 396 *(vuip) ((addr << 5) + T2_IO + 0x18) = b;
397 mb(); 397 mb();
@@ -435,7 +435,7 @@ static inline void t2_outl(u32 b, unsigned long addr)
435 set_hae(msb); \ 435 set_hae(msb); \
436} 436}
437 437
438static DEFINE_SPINLOCK(t2_hae_lock); 438extern spinlock_t t2_hae_lock;
439 439
440/* 440/*
441 * NOTE: take T2_DENSE_MEM off in each readX/writeX routine, since 441 * NOTE: take T2_DENSE_MEM off in each readX/writeX routine, since
diff --git a/include/asm-alpha/io.h b/include/asm-alpha/io.h
index 38f18cf18c9d..e971ab000f95 100644
--- a/include/asm-alpha/io.h
+++ b/include/asm-alpha/io.h
@@ -35,7 +35,7 @@
35 * register not being up-to-date with respect to the hardware 35 * register not being up-to-date with respect to the hardware
36 * value. 36 * value.
37 */ 37 */
38static inline void __set_hae(unsigned long new_hae) 38extern inline void __set_hae(unsigned long new_hae)
39{ 39{
40 unsigned long flags; 40 unsigned long flags;
41 local_irq_save(flags); 41 local_irq_save(flags);
@@ -49,7 +49,7 @@ static inline void __set_hae(unsigned long new_hae)
49 local_irq_restore(flags); 49 local_irq_restore(flags);
50} 50}
51 51
52static inline void set_hae(unsigned long new_hae) 52extern inline void set_hae(unsigned long new_hae)
53{ 53{
54 if (new_hae != alpha_mv.hae_cache) 54 if (new_hae != alpha_mv.hae_cache)
55 __set_hae(new_hae); 55 __set_hae(new_hae);
@@ -176,7 +176,7 @@ REMAP2(u64, writeq, volatile)
176#undef REMAP1 176#undef REMAP1
177#undef REMAP2 177#undef REMAP2
178 178
179static inline void __iomem *generic_ioportmap(unsigned long a) 179extern inline void __iomem *generic_ioportmap(unsigned long a)
180{ 180{
181 return alpha_mv.mv_ioportmap(a); 181 return alpha_mv.mv_ioportmap(a);
182} 182}
diff --git a/include/asm-alpha/mmu_context.h b/include/asm-alpha/mmu_context.h
index 6a5be1f7debf..86c08a02d239 100644
--- a/include/asm-alpha/mmu_context.h
+++ b/include/asm-alpha/mmu_context.h
@@ -23,7 +23,7 @@
23#endif 23#endif
24 24
25 25
26extern inline unsigned long 26static inline unsigned long
27__reload_thread(struct pcb_struct *pcb) 27__reload_thread(struct pcb_struct *pcb)
28{ 28{
29 register unsigned long a0 __asm__("$16"); 29 register unsigned long a0 __asm__("$16");
@@ -114,7 +114,7 @@ extern unsigned long last_asn;
114#define __MMU_EXTERN_INLINE 114#define __MMU_EXTERN_INLINE
115#endif 115#endif
116 116
117static inline unsigned long 117extern inline unsigned long
118__get_new_mm_context(struct mm_struct *mm, long cpu) 118__get_new_mm_context(struct mm_struct *mm, long cpu)
119{ 119{
120 unsigned long asn = cpu_last_asn(cpu); 120 unsigned long asn = cpu_last_asn(cpu);
@@ -226,7 +226,7 @@ ev4_activate_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm)
226# endif 226# endif
227#endif 227#endif
228 228
229extern inline int 229static inline int
230init_new_context(struct task_struct *tsk, struct mm_struct *mm) 230init_new_context(struct task_struct *tsk, struct mm_struct *mm)
231{ 231{
232 int i; 232 int i;
diff --git a/include/asm-alpha/percpu.h b/include/asm-alpha/percpu.h
index 48348fe34c19..3495e8e00d70 100644
--- a/include/asm-alpha/percpu.h
+++ b/include/asm-alpha/percpu.h
@@ -1,6 +1,78 @@
1#ifndef __ALPHA_PERCPU_H 1#ifndef __ALPHA_PERCPU_H
2#define __ALPHA_PERCPU_H 2#define __ALPHA_PERCPU_H
3#include <linux/compiler.h>
4#include <linux/threads.h>
3 5
4#include <asm-generic/percpu.h> 6/*
7 * Determine the real variable name from the name visible in the
8 * kernel sources.
9 */
10#define per_cpu_var(var) per_cpu__##var
11
12#ifdef CONFIG_SMP
13
14/*
15 * per_cpu_offset() is the offset that has to be added to a
16 * percpu variable to get to the instance for a certain processor.
17 */
18extern unsigned long __per_cpu_offset[NR_CPUS];
19
20#define per_cpu_offset(x) (__per_cpu_offset[x])
21
22#define __my_cpu_offset per_cpu_offset(raw_smp_processor_id())
23#ifdef CONFIG_DEBUG_PREEMPT
24#define my_cpu_offset per_cpu_offset(smp_processor_id())
25#else
26#define my_cpu_offset __my_cpu_offset
27#endif
28
29#ifndef MODULE
30#define SHIFT_PERCPU_PTR(var, offset) RELOC_HIDE(&per_cpu_var(var), (offset))
31#define PER_CPU_ATTRIBUTES
32#else
33/*
34 * To calculate addresses of locally defined variables, GCC uses 32-bit
35 * displacement from the GP. Which doesn't work for per cpu variables in
36 * modules, as an offset to the kernel per cpu area is way above 4G.
37 *
38 * This forces allocation of a GOT entry for per cpu variable using
39 * ldq instruction with a 'literal' relocation.
40 */
41#define SHIFT_PERCPU_PTR(var, offset) ({ \
42 extern int simple_identifier_##var(void); \
43 unsigned long __ptr, tmp_gp; \
44 asm ( "br %1, 1f \n\
45 1: ldgp %1, 0(%1) \n\
46 ldq %0, per_cpu__" #var"(%1)\t!literal" \
47 : "=&r"(__ptr), "=&r"(tmp_gp)); \
48 (typeof(&per_cpu_var(var)))(__ptr + (offset)); })
49
50#define PER_CPU_ATTRIBUTES __used
51
52#endif /* MODULE */
53
54/*
55 * A percpu variable may point to a discarded regions. The following are
56 * established ways to produce a usable pointer from the percpu variable
57 * offset.
58 */
59#define per_cpu(var, cpu) \
60 (*SHIFT_PERCPU_PTR(var, per_cpu_offset(cpu)))
61#define __get_cpu_var(var) \
62 (*SHIFT_PERCPU_PTR(var, my_cpu_offset))
63#define __raw_get_cpu_var(var) \
64 (*SHIFT_PERCPU_PTR(var, __my_cpu_offset))
65
66#else /* ! SMP */
67
68#define per_cpu(var, cpu) (*((void)(cpu), &per_cpu_var(var)))
69#define __get_cpu_var(var) per_cpu_var(var)
70#define __raw_get_cpu_var(var) per_cpu_var(var)
71
72#define PER_CPU_ATTRIBUTES
73
74#endif /* SMP */
75
76#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu_var(name)
5 77
6#endif /* __ALPHA_PERCPU_H */ 78#endif /* __ALPHA_PERCPU_H */
diff --git a/include/asm-alpha/system.h b/include/asm-alpha/system.h
index ed221d6408fc..afe20fa58c99 100644
--- a/include/asm-alpha/system.h
+++ b/include/asm-alpha/system.h
@@ -184,7 +184,7 @@ enum amask_enum {
184 __amask; }) 184 __amask; })
185 185
186#define __CALL_PAL_R0(NAME, TYPE) \ 186#define __CALL_PAL_R0(NAME, TYPE) \
187static inline TYPE NAME(void) \ 187extern inline TYPE NAME(void) \
188{ \ 188{ \
189 register TYPE __r0 __asm__("$0"); \ 189 register TYPE __r0 __asm__("$0"); \
190 __asm__ __volatile__( \ 190 __asm__ __volatile__( \
@@ -196,7 +196,7 @@ static inline TYPE NAME(void) \
196} 196}
197 197
198#define __CALL_PAL_W1(NAME, TYPE0) \ 198#define __CALL_PAL_W1(NAME, TYPE0) \
199static inline void NAME(TYPE0 arg0) \ 199extern inline void NAME(TYPE0 arg0) \
200{ \ 200{ \
201 register TYPE0 __r16 __asm__("$16") = arg0; \ 201 register TYPE0 __r16 __asm__("$16") = arg0; \
202 __asm__ __volatile__( \ 202 __asm__ __volatile__( \
@@ -207,7 +207,7 @@ static inline void NAME(TYPE0 arg0) \
207} 207}
208 208
209#define __CALL_PAL_W2(NAME, TYPE0, TYPE1) \ 209#define __CALL_PAL_W2(NAME, TYPE0, TYPE1) \
210static inline void NAME(TYPE0 arg0, TYPE1 arg1) \ 210extern inline void NAME(TYPE0 arg0, TYPE1 arg1) \
211{ \ 211{ \
212 register TYPE0 __r16 __asm__("$16") = arg0; \ 212 register TYPE0 __r16 __asm__("$16") = arg0; \
213 register TYPE1 __r17 __asm__("$17") = arg1; \ 213 register TYPE1 __r17 __asm__("$17") = arg1; \
@@ -219,7 +219,7 @@ static inline void NAME(TYPE0 arg0, TYPE1 arg1) \
219} 219}
220 220
221#define __CALL_PAL_RW1(NAME, RTYPE, TYPE0) \ 221#define __CALL_PAL_RW1(NAME, RTYPE, TYPE0) \
222static inline RTYPE NAME(TYPE0 arg0) \ 222extern inline RTYPE NAME(TYPE0 arg0) \
223{ \ 223{ \
224 register RTYPE __r0 __asm__("$0"); \ 224 register RTYPE __r0 __asm__("$0"); \
225 register TYPE0 __r16 __asm__("$16") = arg0; \ 225 register TYPE0 __r16 __asm__("$16") = arg0; \
@@ -232,7 +232,7 @@ static inline RTYPE NAME(TYPE0 arg0) \
232} 232}
233 233
234#define __CALL_PAL_RW2(NAME, RTYPE, TYPE0, TYPE1) \ 234#define __CALL_PAL_RW2(NAME, RTYPE, TYPE0, TYPE1) \
235static inline RTYPE NAME(TYPE0 arg0, TYPE1 arg1) \ 235extern inline RTYPE NAME(TYPE0 arg0, TYPE1 arg1) \
236{ \ 236{ \
237 register RTYPE __r0 __asm__("$0"); \ 237 register RTYPE __r0 __asm__("$0"); \
238 register TYPE0 __r16 __asm__("$16") = arg0; \ 238 register TYPE0 __r16 __asm__("$16") = arg0; \
diff --git a/include/asm-alpha/vga.h b/include/asm-alpha/vga.h
index e8df1e7aae6b..c00106bac521 100644
--- a/include/asm-alpha/vga.h
+++ b/include/asm-alpha/vga.h
@@ -13,7 +13,7 @@
13#define VT_BUF_HAVE_MEMSETW 13#define VT_BUF_HAVE_MEMSETW
14#define VT_BUF_HAVE_MEMCPYW 14#define VT_BUF_HAVE_MEMCPYW
15 15
16extern inline void scr_writew(u16 val, volatile u16 *addr) 16static inline void scr_writew(u16 val, volatile u16 *addr)
17{ 17{
18 if (__is_ioaddr(addr)) 18 if (__is_ioaddr(addr))
19 __raw_writew(val, (volatile u16 __iomem *) addr); 19 __raw_writew(val, (volatile u16 __iomem *) addr);
@@ -21,7 +21,7 @@ extern inline void scr_writew(u16 val, volatile u16 *addr)
21 *addr = val; 21 *addr = val;
22} 22}
23 23
24extern inline u16 scr_readw(volatile const u16 *addr) 24static inline u16 scr_readw(volatile const u16 *addr)
25{ 25{
26 if (__is_ioaddr(addr)) 26 if (__is_ioaddr(addr))
27 return __raw_readw((volatile const u16 __iomem *) addr); 27 return __raw_readw((volatile const u16 __iomem *) addr);
@@ -29,7 +29,7 @@ extern inline u16 scr_readw(volatile const u16 *addr)
29 return *addr; 29 return *addr;
30} 30}
31 31
32extern inline void scr_memsetw(u16 *s, u16 c, unsigned int count) 32static inline void scr_memsetw(u16 *s, u16 c, unsigned int count)
33{ 33{
34 if (__is_ioaddr(s)) 34 if (__is_ioaddr(s))
35 memsetw_io((u16 __iomem *) s, c, count); 35 memsetw_io((u16 __iomem *) s, c, count);
diff --git a/include/asm-arm/arch-at91/io.h b/include/asm-arm/arch-at91/io.h
index 80073fd36b8e..f8beaa228467 100644
--- a/include/asm-arm/arch-at91/io.h
+++ b/include/asm-arm/arch-at91/io.h
@@ -21,8 +21,6 @@
21#ifndef __ASM_ARCH_IO_H 21#ifndef __ASM_ARCH_IO_H
22#define __ASM_ARCH_IO_H 22#define __ASM_ARCH_IO_H
23 23
24#include <asm/io.h>
25
26#define IO_SPACE_LIMIT 0xFFFFFFFF 24#define IO_SPACE_LIMIT 0xFFFFFFFF
27 25
28#define __io(a) ((void __iomem *)(a)) 26#define __io(a) ((void __iomem *)(a))
diff --git a/include/asm-arm/arch-omap/board-palmte.h b/include/asm-arm/arch-omap/board-palmte.h
index cd22035a7160..6fac2c8935be 100644
--- a/include/asm-arm/arch-omap/board-palmte.h
+++ b/include/asm-arm/arch-omap/board-palmte.h
@@ -14,8 +14,6 @@
14#ifndef __OMAP_BOARD_PALMTE_H 14#ifndef __OMAP_BOARD_PALMTE_H
15#define __OMAP_BOARD_PALMTE_H 15#define __OMAP_BOARD_PALMTE_H
16 16
17#include <asm/arch/gpio.h>
18
19#define PALMTE_USBDETECT_GPIO 0 17#define PALMTE_USBDETECT_GPIO 0
20#define PALMTE_USB_OR_DC_GPIO 1 18#define PALMTE_USB_OR_DC_GPIO 1
21#define PALMTE_TSC_GPIO 4 19#define PALMTE_TSC_GPIO 4
diff --git a/include/asm-arm/arch-omap/clock.h b/include/asm-arm/arch-omap/clock.h
index 57523bdb642b..12a5e4de9518 100644
--- a/include/asm-arm/arch-omap/clock.h
+++ b/include/asm-arm/arch-omap/clock.h
@@ -73,6 +73,8 @@ struct clk {
73#endif 73#endif
74}; 74};
75 75
76struct cpufreq_frequency_table;
77
76struct clk_functions { 78struct clk_functions {
77 int (*clk_enable)(struct clk *clk); 79 int (*clk_enable)(struct clk *clk);
78 void (*clk_disable)(struct clk *clk); 80 void (*clk_disable)(struct clk *clk);
@@ -83,6 +85,9 @@ struct clk_functions {
83 void (*clk_allow_idle)(struct clk *clk); 85 void (*clk_allow_idle)(struct clk *clk);
84 void (*clk_deny_idle)(struct clk *clk); 86 void (*clk_deny_idle)(struct clk *clk);
85 void (*clk_disable_unused)(struct clk *clk); 87 void (*clk_disable_unused)(struct clk *clk);
88#ifdef CONFIG_CPU_FREQ
89 void (*clk_init_cpufreq_table)(struct cpufreq_frequency_table **);
90#endif
86}; 91};
87 92
88extern unsigned int mpurate; 93extern unsigned int mpurate;
diff --git a/include/asm-arm/arch-omap/entry-macro.S b/include/asm-arm/arch-omap/entry-macro.S
index 74cd57221c8e..369093a45fcf 100644
--- a/include/asm-arm/arch-omap/entry-macro.S
+++ b/include/asm-arm/arch-omap/entry-macro.S
@@ -8,6 +8,7 @@
8 * warranty of any kind, whether express or implied. 8 * warranty of any kind, whether express or implied.
9 */ 9 */
10#include <asm/hardware.h> 10#include <asm/hardware.h>
11#include <asm/arch/io.h>
11#include <asm/arch/irqs.h> 12#include <asm/arch/irqs.h>
12 13
13#if defined(CONFIG_ARCH_OMAP1) 14#if defined(CONFIG_ARCH_OMAP1)
diff --git a/include/asm-arm/arch-omap/gpio.h b/include/asm-arm/arch-omap/gpio.h
index 86621a04cd8f..5ee6a49864c3 100644
--- a/include/asm-arm/arch-omap/gpio.h
+++ b/include/asm-arm/arch-omap/gpio.h
@@ -26,7 +26,6 @@
26#ifndef __ASM_ARCH_OMAP_GPIO_H 26#ifndef __ASM_ARCH_OMAP_GPIO_H
27#define __ASM_ARCH_OMAP_GPIO_H 27#define __ASM_ARCH_OMAP_GPIO_H
28 28
29#include <asm/hardware.h>
30#include <asm/arch/irqs.h> 29#include <asm/arch/irqs.h>
31#include <asm/io.h> 30#include <asm/io.h>
32 31
diff --git a/include/asm-arm/arch-omap/hardware.h b/include/asm-arm/arch-omap/hardware.h
index da572092e255..91d85b3417b7 100644
--- a/include/asm-arm/arch-omap/hardware.h
+++ b/include/asm-arm/arch-omap/hardware.h
@@ -41,7 +41,6 @@
41#include <asm/types.h> 41#include <asm/types.h>
42#include <asm/arch/cpu.h> 42#include <asm/arch/cpu.h>
43#endif 43#endif
44#include <asm/arch/io.h>
45#include <asm/arch/serial.h> 44#include <asm/arch/serial.h>
46 45
47/* 46/*
diff --git a/include/asm-arm/arch-pxa/mfp-pxa27x.h b/include/asm-arm/arch-pxa/mfp-pxa27x.h
index eb6eaa174f8d..bc73ab84167c 100644
--- a/include/asm-arm/arch-pxa/mfp-pxa27x.h
+++ b/include/asm-arm/arch-pxa/mfp-pxa27x.h
@@ -112,6 +112,7 @@
112#define GPIO57_nIOIS16 MFP_CFG_IN(GPIO57, AF1) 112#define GPIO57_nIOIS16 MFP_CFG_IN(GPIO57, AF1)
113#define GPIO56_nPWAIT MFP_CFG_IN(GPIO56, AF1) 113#define GPIO56_nPWAIT MFP_CFG_IN(GPIO56, AF1)
114#define GPIO79_PSKTSEL MFP_CFG_OUT(GPIO79, AF1, DRIVE_HIGH) 114#define GPIO79_PSKTSEL MFP_CFG_OUT(GPIO79, AF1, DRIVE_HIGH)
115#define GPIO104_PSKTSEL MFP_CFG_OUT(GPIO104, AF1, DRIVE_HIGH)
115 116
116/* I2C */ 117/* I2C */
117#define GPIO117_I2C_SCL MFP_CFG_IN(GPIO117, AF1) 118#define GPIO117_I2C_SCL MFP_CFG_IN(GPIO117, AF1)
diff --git a/include/asm-arm/arch-pxa/pxa2xx-gpio.h b/include/asm-arm/arch-pxa/pxa2xx-gpio.h
index 763313c5e6be..b81cd63cb2eb 100644
--- a/include/asm-arm/arch-pxa/pxa2xx-gpio.h
+++ b/include/asm-arm/arch-pxa/pxa2xx-gpio.h
@@ -134,7 +134,11 @@
134#define GPIO93_CIF_DD_6 93 /* Camera data pin 6 */ 134#define GPIO93_CIF_DD_6 93 /* Camera data pin 6 */
135#define GPIO94_CIF_DD_5 94 /* Camera data pin 5 */ 135#define GPIO94_CIF_DD_5 94 /* Camera data pin 5 */
136#define GPIO95_CIF_DD_4 95 /* Camera data pin 4 */ 136#define GPIO95_CIF_DD_4 95 /* Camera data pin 4 */
137#define GPIO96_FFRXD 96 /* FFUART recieve */
138#define GPIO98_FFRTS 98 /* FFUART request to send */
137#define GPIO98_CIF_DD_0 98 /* Camera data pin 0 */ 139#define GPIO98_CIF_DD_0 98 /* Camera data pin 0 */
140#define GPIO99_FFTXD 99 /* FFUART transmit data */
141#define GPIO100_FFCTS 100 /* FFUART Clear to send */
138#define GPIO102_nPCE_1 102 /* PCMCIA (PXA27x) */ 142#define GPIO102_nPCE_1 102 /* PCMCIA (PXA27x) */
139#define GPIO103_CIF_DD_3 103 /* Camera data pin 3 */ 143#define GPIO103_CIF_DD_3 103 /* Camera data pin 3 */
140#define GPIO104_CIF_DD_2 104 /* Camera data pin 2 */ 144#define GPIO104_CIF_DD_2 104 /* Camera data pin 2 */
@@ -316,6 +320,8 @@
316#define GPIO85_nPCE_1_MD (85 | GPIO_ALT_FN_1_OUT) 320#define GPIO85_nPCE_1_MD (85 | GPIO_ALT_FN_1_OUT)
317#define GPIO85_CIF_LV_MD (85 | GPIO_ALT_FN_3_IN) 321#define GPIO85_CIF_LV_MD (85 | GPIO_ALT_FN_3_IN)
318#define GPIO86_nPCE_1_MD (86 | GPIO_ALT_FN_1_OUT) 322#define GPIO86_nPCE_1_MD (86 | GPIO_ALT_FN_1_OUT)
323#define GPIO88_USBH1_PWR_MD (88 | GPIO_ALT_FN_1_IN)
324#define GPIO89_USBH1_PEN_MD (89 | GPIO_ALT_FN_2_OUT)
319#define GPIO90_CIF_DD_4_MD (90 | GPIO_ALT_FN_3_IN) 325#define GPIO90_CIF_DD_4_MD (90 | GPIO_ALT_FN_3_IN)
320#define GPIO91_CIF_DD_5_MD (91 | GPIO_ALT_FN_3_IN) 326#define GPIO91_CIF_DD_5_MD (91 | GPIO_ALT_FN_3_IN)
321#define GPIO92_MMCDAT0_MD (92 | GPIO_ALT_FN_1_OUT) 327#define GPIO92_MMCDAT0_MD (92 | GPIO_ALT_FN_1_OUT)
@@ -324,8 +330,11 @@
324#define GPIO95_CIF_DD_4_MD (95 | GPIO_ALT_FN_2_IN) 330#define GPIO95_CIF_DD_4_MD (95 | GPIO_ALT_FN_2_IN)
325#define GPIO95_KP_MKIN6_MD (95 | GPIO_ALT_FN_3_IN) 331#define GPIO95_KP_MKIN6_MD (95 | GPIO_ALT_FN_3_IN)
326#define GPIO96_KP_DKIN3_MD (96 | GPIO_ALT_FN_1_IN) 332#define GPIO96_KP_DKIN3_MD (96 | GPIO_ALT_FN_1_IN)
333#define GPIO96_FFRXD_MD (96 | GPIO_ALT_FN_3_IN)
327#define GPIO97_KP_MKIN3_MD (97 | GPIO_ALT_FN_3_IN) 334#define GPIO97_KP_MKIN3_MD (97 | GPIO_ALT_FN_3_IN)
328#define GPIO98_CIF_DD_0_MD (98 | GPIO_ALT_FN_2_IN) 335#define GPIO98_CIF_DD_0_MD (98 | GPIO_ALT_FN_2_IN)
336#define GPIO98_FFRTS_MD (98 | GPIO_ALT_FN_3_OUT)
337#define GPIO99_FFTXD_MD (99 | GPIO_ALT_FN_3_OUT)
329#define GPIO100_KP_MKIN0_MD (100 | GPIO_ALT_FN_1_IN) 338#define GPIO100_KP_MKIN0_MD (100 | GPIO_ALT_FN_1_IN)
330#define GPIO101_KP_MKIN1_MD (101 | GPIO_ALT_FN_1_IN) 339#define GPIO101_KP_MKIN1_MD (101 | GPIO_ALT_FN_1_IN)
331#define GPIO102_nPCE_1_MD (102 | GPIO_ALT_FN_1_OUT) 340#define GPIO102_nPCE_1_MD (102 | GPIO_ALT_FN_1_OUT)
diff --git a/include/asm-arm/arch-pxa/regs-lcd.h b/include/asm-arm/arch-pxa/regs-lcd.h
index f762493f5141..3ba464c913a5 100644
--- a/include/asm-arm/arch-pxa/regs-lcd.h
+++ b/include/asm-arm/arch-pxa/regs-lcd.h
@@ -1,5 +1,8 @@
1#ifndef __ASM_ARCH_REGS_LCD_H 1#ifndef __ASM_ARCH_REGS_LCD_H
2#define __ASM_ARCH_REGS_LCD_H 2#define __ASM_ARCH_REGS_LCD_H
3
4#include <asm/arch/bitfield.h>
5
3/* 6/*
4 * LCD Controller Registers and Bits Definitions 7 * LCD Controller Registers and Bits Definitions
5 */ 8 */
@@ -69,7 +72,7 @@
69#define LCCR0_QDM (1 << 11) /* LCD Quick Disable mask */ 72#define LCCR0_QDM (1 << 11) /* LCD Quick Disable mask */
70#define LCCR0_PDD (0xff << 12) /* Palette DMA request delay */ 73#define LCCR0_PDD (0xff << 12) /* Palette DMA request delay */
71#define LCCR0_PDD_S 12 74#define LCCR0_PDD_S 12
72#define LCCR0_BM (1 << 20) /* Branch mask */ 75#define LCCR0_BM (1 << 20) /* Branch mask */
73#define LCCR0_OUM (1 << 21) /* Output FIFO underrun mask */ 76#define LCCR0_OUM (1 << 21) /* Output FIFO underrun mask */
74#define LCCR0_LCDT (1 << 22) /* LCD panel type */ 77#define LCCR0_LCDT (1 << 22) /* LCD panel type */
75#define LCCR0_RDSTM (1 << 23) /* Read status interrupt mask */ 78#define LCCR0_RDSTM (1 << 23) /* Read status interrupt mask */
diff --git a/include/asm-arm/arch-sa1100/collie.h b/include/asm-arm/arch-sa1100/collie.h
index 14a344aa3cc7..762eba535813 100644
--- a/include/asm-arm/arch-sa1100/collie.h
+++ b/include/asm-arm/arch-sa1100/collie.h
@@ -34,9 +34,12 @@
34 34
35#define COLLIE_GPIO_ON_KEY GPIO_GPIO (0) 35#define COLLIE_GPIO_ON_KEY GPIO_GPIO (0)
36#define COLLIE_GPIO_AC_IN GPIO_GPIO (1) 36#define COLLIE_GPIO_AC_IN GPIO_GPIO (1)
37#define COLLIE_GPIO_SDIO_INT GPIO_GPIO (11)
37#define COLLIE_GPIO_CF_IRQ GPIO_GPIO (14) 38#define COLLIE_GPIO_CF_IRQ GPIO_GPIO (14)
38#define COLLIE_GPIO_nREMOCON_INT GPIO_GPIO (15) 39#define COLLIE_GPIO_nREMOCON_INT GPIO_GPIO (15)
39#define COLLIE_GPIO_UCB1x00_RESET GPIO_GPIO (16) 40#define COLLIE_GPIO_UCB1x00_RESET GPIO_GPIO (16)
41#define COLLIE_GPIO_nMIC_ON GPIO_GPIO (17)
42#define COLLIE_GPIO_nREMOCON_ON GPIO_GPIO (18)
40#define COLLIE_GPIO_CO GPIO_GPIO (20) 43#define COLLIE_GPIO_CO GPIO_GPIO (20)
41#define COLLIE_GPIO_MCP_CLK GPIO_GPIO (21) 44#define COLLIE_GPIO_MCP_CLK GPIO_GPIO (21)
42#define COLLIE_GPIO_CF_CD GPIO_GPIO (22) 45#define COLLIE_GPIO_CF_CD GPIO_GPIO (22)
@@ -49,6 +52,7 @@
49 52
50#define COLLIE_IRQ_GPIO_ON_KEY IRQ_GPIO0 53#define COLLIE_IRQ_GPIO_ON_KEY IRQ_GPIO0
51#define COLLIE_IRQ_GPIO_AC_IN IRQ_GPIO1 54#define COLLIE_IRQ_GPIO_AC_IN IRQ_GPIO1
55#define COLLIE_IRQ_GPIO_SDIO_IRQ IRQ_GPIO11
52#define COLLIE_IRQ_GPIO_CF_IRQ IRQ_GPIO14 56#define COLLIE_IRQ_GPIO_CF_IRQ IRQ_GPIO14
53#define COLLIE_IRQ_GPIO_nREMOCON_INT IRQ_GPIO15 57#define COLLIE_IRQ_GPIO_nREMOCON_INT IRQ_GPIO15
54#define COLLIE_IRQ_GPIO_CO IRQ_GPIO20 58#define COLLIE_IRQ_GPIO_CO IRQ_GPIO20
diff --git a/include/asm-arm/page.h b/include/asm-arm/page.h
index 5c22b0112106..8e05bdb5f12f 100644
--- a/include/asm-arm/page.h
+++ b/include/asm-arm/page.h
@@ -179,10 +179,10 @@ typedef unsigned long pgprot_t;
179 179
180#endif /* STRICT_MM_TYPECHECKS */ 180#endif /* STRICT_MM_TYPECHECKS */
181 181
182typedef struct page *pgtable_t;
183
184#endif /* CONFIG_MMU */ 182#endif /* CONFIG_MMU */
185 183
184typedef struct page *pgtable_t;
185
186#include <asm/memory.h> 186#include <asm/memory.h>
187 187
188#endif /* !__ASSEMBLY__ */ 188#endif /* !__ASSEMBLY__ */
diff --git a/include/asm-arm/pgtable-nommu.h b/include/asm-arm/pgtable-nommu.h
index 2e5868bbe03b..386fcc10a973 100644
--- a/include/asm-arm/pgtable-nommu.h
+++ b/include/asm-arm/pgtable-nommu.h
@@ -16,7 +16,6 @@
16#include <linux/slab.h> 16#include <linux/slab.h>
17#include <asm/processor.h> 17#include <asm/processor.h>
18#include <asm/page.h> 18#include <asm/page.h>
19#include <asm/io.h>
20 19
21/* 20/*
22 * Trivial page table functions. 21 * Trivial page table functions.
diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h
index 800ba5254daf..2b41ebbfa7ff 100644
--- a/include/asm-arm/spinlock.h
+++ b/include/asm-arm/spinlock.h
@@ -142,7 +142,7 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw)
142} 142}
143 143
144/* write_can_lock - would write_trylock() succeed? */ 144/* write_can_lock - would write_trylock() succeed? */
145#define __raw_write_can_lock(x) ((x)->lock == 0x80000000) 145#define __raw_write_can_lock(x) ((x)->lock == 0)
146 146
147/* 147/*
148 * Read locks are a bit more hairy: 148 * Read locks are a bit more hairy:
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h
index 6335de9a2bb3..514af792a598 100644
--- a/include/asm-arm/system.h
+++ b/include/asm-arm/system.h
@@ -48,20 +48,6 @@
48#define CPUID_TCM 2 48#define CPUID_TCM 2
49#define CPUID_TLBTYPE 3 49#define CPUID_TLBTYPE 3
50 50
51#ifdef CONFIG_CPU_CP15
52#define read_cpuid(reg) \
53 ({ \
54 unsigned int __val; \
55 asm("mrc p15, 0, %0, c0, c0, " __stringify(reg) \
56 : "=r" (__val) \
57 : \
58 : "cc"); \
59 __val; \
60 })
61#else
62#define read_cpuid(reg) (processor_id)
63#endif
64
65/* 51/*
66 * This is used to ensure the compiler did actually allocate the register we 52 * This is used to ensure the compiler did actually allocate the register we
67 * asked it for some inline assembly sequences. Apparently we can't trust 53 * asked it for some inline assembly sequences. Apparently we can't trust
@@ -78,6 +64,21 @@
78#include <linux/stringify.h> 64#include <linux/stringify.h>
79#include <linux/irqflags.h> 65#include <linux/irqflags.h>
80 66
67#ifdef CONFIG_CPU_CP15
68#define read_cpuid(reg) \
69 ({ \
70 unsigned int __val; \
71 asm("mrc p15, 0, %0, c0, c0, " __stringify(reg) \
72 : "=r" (__val) \
73 : \
74 : "cc"); \
75 __val; \
76 })
77#else
78extern unsigned int processor_id;
79#define read_cpuid(reg) (processor_id)
80#endif
81
81/* 82/*
82 * The CPU ID never changes at run time, so we might as well tell the 83 * The CPU ID never changes at run time, so we might as well tell the
83 * compiler that it's constant. Use this function to read the CPU ID 84 * compiler that it's constant. Use this function to read the CPU ID
diff --git a/include/asm-blackfin/bfin-global.h b/include/asm-blackfin/bfin-global.h
index a9248d883675..76033831eb35 100644
--- a/include/asm-blackfin/bfin-global.h
+++ b/include/asm-blackfin/bfin-global.h
@@ -105,13 +105,6 @@ extern int sram_free(const void*);
105extern void *sram_alloc_with_lsl(size_t, unsigned long); 105extern void *sram_alloc_with_lsl(size_t, unsigned long);
106extern int sram_free_with_lsl(const void*); 106extern int sram_free_with_lsl(const void*);
107 107
108extern void led_on(int);
109extern void led_off(int);
110extern void led_toggle(int);
111extern void led_disp_num(int);
112extern void led_toggle_num(int);
113extern void init_leds(void);
114
115extern const char bfin_board_name[]; 108extern const char bfin_board_name[];
116extern unsigned long wall_jiffies; 109extern unsigned long wall_jiffies;
117 110
diff --git a/include/asm-blackfin/mach-bf527/anomaly.h b/include/asm-blackfin/mach-bf527/anomaly.h
index 735fa02fafb2..4725268a5ada 100644
--- a/include/asm-blackfin/mach-bf527/anomaly.h
+++ b/include/asm-blackfin/mach-bf527/anomaly.h
@@ -15,12 +15,16 @@
15 15
16/* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot2 Not Supported */ 16/* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot2 Not Supported */
17#define ANOMALY_05000074 (1) 17#define ANOMALY_05000074 (1)
18/* DMA_RUN Bit Is Not Valid after a Peripheral Receive Channel DMA Stops */
19#define ANOMALY_05000119 (1)
18/* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */ 20/* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */
19#define ANOMALY_05000122 (1) 21#define ANOMALY_05000122 (1)
20/* Spurious Hardware Error from an Access in the Shadow of a Conditional Branch */ 22/* Spurious Hardware Error from an Access in the Shadow of a Conditional Branch */
21#define ANOMALY_05000245 (1) 23#define ANOMALY_05000245 (1)
22/* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */ 24/* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */
23#define ANOMALY_05000265 (1) 25#define ANOMALY_05000265 (1)
26/* Errors when SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted */
27#define ANOMALY_05000312 (1)
24/* Incorrect Access of OTP_STATUS During otp_write() Function */ 28/* Incorrect Access of OTP_STATUS During otp_write() Function */
25#define ANOMALY_05000328 (1) 29#define ANOMALY_05000328 (1)
26/* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */ 30/* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */
@@ -92,7 +96,6 @@
92#define ANOMALY_05000266 (0) 96#define ANOMALY_05000266 (0)
93#define ANOMALY_05000273 (0) 97#define ANOMALY_05000273 (0)
94#define ANOMALY_05000311 (0) 98#define ANOMALY_05000311 (0)
95#define ANOMALY_05000312 (0)
96#define ANOMALY_05000323 (0) 99#define ANOMALY_05000323 (0)
97#define ANOMALY_05000363 (0) 100#define ANOMALY_05000363 (0)
98 101
diff --git a/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h
index 26e3c8076b4e..2526b6ed6faa 100644
--- a/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf527/bfin_serial_5xx.h
@@ -53,6 +53,12 @@
53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) 53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) 54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
55 55
56#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
57#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
58#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
60#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
61
56#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) 62#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS)
57# define CONFIG_SERIAL_BFIN_CTSRTS 63# define CONFIG_SERIAL_BFIN_CTSRTS
58 64
@@ -90,7 +96,7 @@ struct bfin_serial_port {
90 struct work_struct tx_dma_workqueue; 96 struct work_struct tx_dma_workqueue;
91#endif 97#endif
92#ifdef CONFIG_SERIAL_BFIN_CTSRTS 98#ifdef CONFIG_SERIAL_BFIN_CTSRTS
93 struct work_struct cts_workqueue; 99 struct timer_list cts_timer;
94 int cts_pin; 100 int cts_pin;
95 int rts_pin; 101 int rts_pin;
96#endif 102#endif
diff --git a/include/asm-blackfin/mach-bf533/anomaly.h b/include/asm-blackfin/mach-bf533/anomaly.h
index 5a6dcc5fa36c..8f7ea112fd3a 100644
--- a/include/asm-blackfin/mach-bf533/anomaly.h
+++ b/include/asm-blackfin/mach-bf533/anomaly.h
@@ -2,7 +2,7 @@
2 * File: include/asm-blackfin/mach-bf533/anomaly.h 2 * File: include/asm-blackfin/mach-bf533/anomaly.h
3 * Bugs: Enter bugs at http://blackfin.uclinux.org/ 3 * Bugs: Enter bugs at http://blackfin.uclinux.org/
4 * 4 *
5 * Copyright (C) 2004-2007 Analog Devices Inc. 5 * Copyright (C) 2004-2008 Analog Devices Inc.
6 * Licensed under the GPL-2 or later. 6 * Licensed under the GPL-2 or later.
7 */ 7 */
8 8
@@ -176,6 +176,21 @@
176#define ANOMALY_05000315 (1) 176#define ANOMALY_05000315 (1)
177/* Internal Voltage Regulator Values of 1.05V, 1.10V and 1.15V Not Allowed for LQFP Packages */ 177/* Internal Voltage Regulator Values of 1.05V, 1.10V and 1.15V Not Allowed for LQFP Packages */
178#define ANOMALY_05000319 (ANOMALY_BF531 || ANOMALY_BF532) 178#define ANOMALY_05000319 (ANOMALY_BF531 || ANOMALY_BF532)
179/* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */
180#define ANOMALY_05000357 (1)
181/* UART Break Signal Issues */
182#define ANOMALY_05000363 (__SILICON_REVISION__ < 5)
183/* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */
184#define ANOMALY_05000366 (1)
185/* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */
186#define ANOMALY_05000371 (1)
187/* PPI Does Not Start Properly In Specific Mode */
188#define ANOMALY_05000400 (__SILICON_REVISION__ >= 5)
189/* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */
190#define ANOMALY_05000402 (__SILICON_REVISION__ >= 5)
191/* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */
192#define ANOMALY_05000403 (1)
193
179 194
180/* These anomalies have been "phased" out of analog.com anomaly sheets and are 195/* These anomalies have been "phased" out of analog.com anomaly sheets and are
181 * here to show running on older silicon just isn't feasible. 196 * here to show running on older silicon just isn't feasible.
@@ -249,20 +264,6 @@
249#define ANOMALY_05000192 (__SILICON_REVISION__ < 3) 264#define ANOMALY_05000192 (__SILICON_REVISION__ < 3)
250/* Internal Voltage Regulator may not start up */ 265/* Internal Voltage Regulator may not start up */
251#define ANOMALY_05000206 (__SILICON_REVISION__ < 3) 266#define ANOMALY_05000206 (__SILICON_REVISION__ < 3)
252/* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */
253#define ANOMALY_05000357 (1)
254/* UART Break Signal Issues */
255#define ANOMALY_05000363 (__SILICON_REVISION__ < 5)
256/* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */
257#define ANOMALY_05000366 (1)
258/* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */
259#define ANOMALY_05000371 (1)
260/* PPI Does Not Start Properly In Specific Mode */
261#define ANOMALY_05000400 (__SILICON_REVISION__ == 5)
262/* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */
263#define ANOMALY_05000402 (__SILICON_REVISION__ == 5)
264/* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */
265#define ANOMALY_05000403 (1)
266 267
267/* Anomalies that don't exist on this proc */ 268/* Anomalies that don't exist on this proc */
268#define ANOMALY_05000266 (0) 269#define ANOMALY_05000266 (0)
diff --git a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h
index d016603b6615..ebf592b59aab 100644
--- a/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf533/bfin_serial_5xx.h
@@ -53,6 +53,12 @@
53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) 53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) 54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
55 55
56#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
57#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
58#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
60#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
61
56#ifdef CONFIG_BFIN_UART0_CTSRTS 62#ifdef CONFIG_BFIN_UART0_CTSRTS
57# define CONFIG_SERIAL_BFIN_CTSRTS 63# define CONFIG_SERIAL_BFIN_CTSRTS
58# ifndef CONFIG_UART0_CTS_PIN 64# ifndef CONFIG_UART0_CTS_PIN
@@ -82,7 +88,7 @@ struct bfin_serial_port {
82# endif 88# endif
83#endif 89#endif
84#ifdef CONFIG_SERIAL_BFIN_CTSRTS 90#ifdef CONFIG_SERIAL_BFIN_CTSRTS
85 struct work_struct cts_workqueue; 91 struct timer_list cts_timer;
86 int cts_pin; 92 int cts_pin;
87 int rts_pin; 93 int rts_pin;
88#endif 94#endif
diff --git a/include/asm-blackfin/mach-bf537/anomaly.h b/include/asm-blackfin/mach-bf537/anomaly.h
index a6b08facb242..8460ab9c324f 100644
--- a/include/asm-blackfin/mach-bf537/anomaly.h
+++ b/include/asm-blackfin/mach-bf537/anomaly.h
@@ -2,7 +2,7 @@
2 * File: include/asm-blackfin/mach-bf537/anomaly.h 2 * File: include/asm-blackfin/mach-bf537/anomaly.h
3 * Bugs: Enter bugs at http://blackfin.uclinux.org/ 3 * Bugs: Enter bugs at http://blackfin.uclinux.org/
4 * 4 *
5 * Copyright (C) 2004-2007 Analog Devices Inc. 5 * Copyright (C) 2004-2008 Analog Devices Inc.
6 * Licensed under the GPL-2 or later. 6 * Licensed under the GPL-2 or later.
7 */ 7 */
8 8
@@ -132,8 +132,8 @@
132#define ANOMALY_05000322 (1) 132#define ANOMALY_05000322 (1)
133/* Ethernet MAC MDIO Reads Do Not Meet IEEE Specification */ 133/* Ethernet MAC MDIO Reads Do Not Meet IEEE Specification */
134#define ANOMALY_05000341 (__SILICON_REVISION__ >= 3) 134#define ANOMALY_05000341 (__SILICON_REVISION__ >= 3)
135/* New Feature: UART Remains Enabled after UART Boot (Not Available on Older Silicon) */ 135/* New Feature: UART Remains Enabled after UART Boot */
136#define ANOMALY_05000350 (__SILICON_REVISION__ < 3) 136#define ANOMALY_05000350 (__SILICON_REVISION__ >= 3)
137/* Regulator Programming Blocked when Hibernate Wakeup Source Remains Active */ 137/* Regulator Programming Blocked when Hibernate Wakeup Source Remains Active */
138#define ANOMALY_05000355 (1) 138#define ANOMALY_05000355 (1)
139/* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ 139/* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */
@@ -145,12 +145,10 @@
145/* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ 145/* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */
146#define ANOMALY_05000371 (1) 146#define ANOMALY_05000371 (1)
147/* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */ 147/* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */
148#define ANOMALY_05000402 (__SILICON_REVISION__ >= 3) 148#define ANOMALY_05000402 (__SILICON_REVISION__ >= 5)
149/* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */ 149/* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */
150#define ANOMALY_05000403 (1) 150#define ANOMALY_05000403 (1)
151 151
152
153
154/* Anomalies that don't exist on this proc */ 152/* Anomalies that don't exist on this proc */
155#define ANOMALY_05000125 (0) 153#define ANOMALY_05000125 (0)
156#define ANOMALY_05000158 (0) 154#define ANOMALY_05000158 (0)
diff --git a/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h
index f79d1a0e9129..1bf56ffa22f9 100644
--- a/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf537/bfin_serial_5xx.h
@@ -53,6 +53,12 @@
53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) 53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) 54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
55 55
56#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
57#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
58#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
60#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
61
56#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) 62#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS)
57# define CONFIG_SERIAL_BFIN_CTSRTS 63# define CONFIG_SERIAL_BFIN_CTSRTS
58 64
@@ -90,7 +96,7 @@ struct bfin_serial_port {
90 struct work_struct tx_dma_workqueue; 96 struct work_struct tx_dma_workqueue;
91#endif 97#endif
92#ifdef CONFIG_SERIAL_BFIN_CTSRTS 98#ifdef CONFIG_SERIAL_BFIN_CTSRTS
93 struct work_struct cts_workqueue; 99 struct timer_list cts_timer;
94 int cts_pin; 100 int cts_pin;
95 int rts_pin; 101 int rts_pin;
96#endif 102#endif
diff --git a/include/asm-blackfin/mach-bf548/anomaly.h b/include/asm-blackfin/mach-bf548/anomaly.h
index 49d3cebc5293..3ad59655881a 100644
--- a/include/asm-blackfin/mach-bf548/anomaly.h
+++ b/include/asm-blackfin/mach-bf548/anomaly.h
@@ -75,6 +75,8 @@
75#define ANOMALY_05000365 (1) 75#define ANOMALY_05000365 (1)
76/* Addressing Conflict between Boot ROM and Asynchronous Memory */ 76/* Addressing Conflict between Boot ROM and Asynchronous Memory */
77#define ANOMALY_05000369 (1) 77#define ANOMALY_05000369 (1)
78/* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */
79#define ANOMALY_05000371 (1)
78/* Mobile DDR Operation Not Functional */ 80/* Mobile DDR Operation Not Functional */
79#define ANOMALY_05000377 (1) 81#define ANOMALY_05000377 (1)
80/* Security/Authentication Speedpath Causes Authentication To Fail To Initiate */ 82/* Security/Authentication Speedpath Causes Authentication To Fail To Initiate */
diff --git a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h
index 5eb46a77d919..5e29446a8e03 100644
--- a/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf548/bfin_serial_5xx.h
@@ -57,6 +57,12 @@
57#define UART_SET_DLAB(uart) /* MMRs not muxed on BF54x */ 57#define UART_SET_DLAB(uart) /* MMRs not muxed on BF54x */
58#define UART_CLEAR_DLAB(uart) /* MMRs not muxed on BF54x */ 58#define UART_CLEAR_DLAB(uart) /* MMRs not muxed on BF54x */
59 59
60#define UART_GET_CTS(x) (UART_GET_MSR(x) & CTS)
61#define UART_SET_RTS(x) (UART_PUT_MCR(x, UART_GET_MCR(x) | MRTS))
62#define UART_CLEAR_RTS(x) (UART_PUT_MCR(x, UART_GET_MCR(x) & ~MRTS))
63#define UART_ENABLE_INTS(x, v) UART_SET_IER(x, v)
64#define UART_DISABLE_INTS(x) UART_CLEAR_IER(x, 0xF)
65
60#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS) 66#if defined(CONFIG_BFIN_UART0_CTSRTS) || defined(CONFIG_BFIN_UART1_CTSRTS)
61# define CONFIG_SERIAL_BFIN_CTSRTS 67# define CONFIG_SERIAL_BFIN_CTSRTS
62 68
@@ -93,7 +99,7 @@ struct bfin_serial_port {
93 struct work_struct tx_dma_workqueue; 99 struct work_struct tx_dma_workqueue;
94#endif 100#endif
95#ifdef CONFIG_SERIAL_BFIN_CTSRTS 101#ifdef CONFIG_SERIAL_BFIN_CTSRTS
96 struct work_struct cts_workqueue; 102 struct timer_list cts_timer;
97 int cts_pin; 103 int cts_pin;
98 int rts_pin; 104 int rts_pin;
99#endif 105#endif
@@ -181,7 +187,7 @@ static void bfin_serial_hw_init(struct bfin_serial_port *uart)
181 187
182#ifdef CONFIG_BFIN_UART1_CTSRTS 188#ifdef CONFIG_BFIN_UART1_CTSRTS
183 peripheral_request(P_UART1_RTS, DRIVER_NAME); 189 peripheral_request(P_UART1_RTS, DRIVER_NAME);
184 peripheral_request(P_UART1_CTS DRIVER_NAME); 190 peripheral_request(P_UART1_CTS, DRIVER_NAME);
185#endif 191#endif
186#endif 192#endif
187 193
@@ -196,7 +202,7 @@ static void bfin_serial_hw_init(struct bfin_serial_port *uart)
196 202
197#ifdef CONFIG_BFIN_UART3_CTSRTS 203#ifdef CONFIG_BFIN_UART3_CTSRTS
198 peripheral_request(P_UART3_RTS, DRIVER_NAME); 204 peripheral_request(P_UART3_RTS, DRIVER_NAME);
199 peripheral_request(P_UART3_CTS DRIVER_NAME); 205 peripheral_request(P_UART3_CTS, DRIVER_NAME);
200#endif 206#endif
201#endif 207#endif
202 SSYNC(); 208 SSYNC();
diff --git a/include/asm-blackfin/mach-bf561/anomaly.h b/include/asm-blackfin/mach-bf561/anomaly.h
index 82157caa96a2..5c5d7d7d695f 100644
--- a/include/asm-blackfin/mach-bf561/anomaly.h
+++ b/include/asm-blackfin/mach-bf561/anomaly.h
@@ -2,7 +2,7 @@
2 * File: include/asm-blackfin/mach-bf561/anomaly.h 2 * File: include/asm-blackfin/mach-bf561/anomaly.h
3 * Bugs: Enter bugs at http://blackfin.uclinux.org/ 3 * Bugs: Enter bugs at http://blackfin.uclinux.org/
4 * 4 *
5 * Copyright (C) 2004-2007 Analog Devices Inc. 5 * Copyright (C) 2004-2008 Analog Devices Inc.
6 * Licensed under the GPL-2 or later. 6 * Licensed under the GPL-2 or later.
7 */ 7 */
8 8
diff --git a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h
index 7a9628769296..8aa02780e642 100644
--- a/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h
+++ b/include/asm-blackfin/mach-bf561/bfin_serial_5xx.h
@@ -53,6 +53,12 @@
53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0) 53#define UART_SET_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) | DLAB); SSYNC(); } while (0)
54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0) 54#define UART_CLEAR_DLAB(uart) do { UART_PUT_LCR(uart, UART_GET_LCR(uart) & ~DLAB); SSYNC(); } while (0)
55 55
56#define UART_GET_CTS(x) gpio_get_value(x->cts_pin)
57#define UART_SET_RTS(x) gpio_set_value(x->rts_pin, 1)
58#define UART_CLEAR_RTS(x) gpio_set_value(x->rts_pin, 0)
59#define UART_ENABLE_INTS(x, v) UART_PUT_IER(x, v)
60#define UART_DISABLE_INTS(x) UART_PUT_IER(x, 0)
61
56#ifdef CONFIG_BFIN_UART0_CTSRTS 62#ifdef CONFIG_BFIN_UART0_CTSRTS
57# define CONFIG_SERIAL_BFIN_CTSRTS 63# define CONFIG_SERIAL_BFIN_CTSRTS
58# ifndef CONFIG_UART0_CTS_PIN 64# ifndef CONFIG_UART0_CTS_PIN
@@ -82,7 +88,7 @@ struct bfin_serial_port {
82# endif 88# endif
83#endif 89#endif
84#ifdef CONFIG_SERIAL_BFIN_CTSRTS 90#ifdef CONFIG_SERIAL_BFIN_CTSRTS
85 struct work_struct cts_workqueue; 91 struct timer_list cts_timer;
86 int cts_pin; 92 int cts_pin;
87 int rts_pin; 93 int rts_pin;
88#endif 94#endif
diff --git a/include/asm-frv/checksum.h b/include/asm-frv/checksum.h
index 9b1689850187..269da09ff637 100644
--- a/include/asm-frv/checksum.h
+++ b/include/asm-frv/checksum.h
@@ -75,7 +75,7 @@ __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
75 : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (inc), "=&r"(tmp) 75 : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (inc), "=&r"(tmp)
76 : "0" (sum), "1" (iph), "2" (ihl), "3" (4), 76 : "0" (sum), "1" (iph), "2" (ihl), "3" (4),
77 "m"(*(volatile struct { int _[100]; } *)iph) 77 "m"(*(volatile struct { int _[100]; } *)iph)
78 : "icc0", "icc1" 78 : "icc0", "icc1", "memory"
79 ); 79 );
80 80
81 return (__force __sum16)~sum; 81 return (__force __sum16)~sum;
diff --git a/include/asm-frv/mem-layout.h b/include/asm-frv/mem-layout.h
index 734a1d0583b6..2947764fc0e0 100644
--- a/include/asm-frv/mem-layout.h
+++ b/include/asm-frv/mem-layout.h
@@ -31,6 +31,13 @@
31 31
32#define PAGE_MASK (~(PAGE_SIZE-1)) 32#define PAGE_MASK (~(PAGE_SIZE-1))
33 33
34/*
35 * the slab must be aligned such that load- and store-double instructions don't
36 * fault if used
37 */
38#define ARCH_KMALLOC_MINALIGN 8
39#define ARCH_SLAB_MINALIGN 8
40
34/*****************************************************************************/ 41/*****************************************************************************/
35/* 42/*
36 * virtual memory layout from kernel's point of view 43 * virtual memory layout from kernel's point of view
diff --git a/include/asm-generic/Kbuild.asm b/include/asm-generic/Kbuild.asm
index 92a6d91d0c1a..7cd25b8e7c9a 100644
--- a/include/asm-generic/Kbuild.asm
+++ b/include/asm-generic/Kbuild.asm
@@ -1,6 +1,6 @@
1header-y += kvm.h 1header-y += kvm.h
2 2
3ifeq ($(wildcard include/asm-$(SRCARCH)/a.out.h),include/asm-$(SRCARCH)/a.out.h) 3ifneq ($(wildcard $(srctree)/include/asm-$(SRCARCH)/a.out.h),)
4unifdef-y += a.out.h 4unifdef-y += a.out.h
5endif 5endif
6unifdef-y += auxvec.h 6unifdef-y += auxvec.h
diff --git a/include/asm-generic/atomic.h b/include/asm-generic/atomic.h
index 85fd0aa27a8c..4ec0a296bdec 100644
--- a/include/asm-generic/atomic.h
+++ b/include/asm-generic/atomic.h
@@ -2,7 +2,7 @@
2#define _ASM_GENERIC_ATOMIC_H 2#define _ASM_GENERIC_ATOMIC_H
3/* 3/*
4 * Copyright (C) 2005 Silicon Graphics, Inc. 4 * Copyright (C) 2005 Silicon Graphics, Inc.
5 * Christoph Lameter <clameter@sgi.com> 5 * Christoph Lameter
6 * 6 *
7 * Allows to provide arch independent atomic definitions without the need to 7 * Allows to provide arch independent atomic definitions without the need to
8 * edit all arch specific atomic.h files. 8 * edit all arch specific atomic.h files.
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index ecf675a59d21..6be061d09da9 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -1,8 +1,12 @@
1#ifndef _ASM_GENERIC_GPIO_H 1#ifndef _ASM_GENERIC_GPIO_H
2#define _ASM_GENERIC_GPIO_H 2#define _ASM_GENERIC_GPIO_H
3 3
4#include <linux/types.h>
5
4#ifdef CONFIG_HAVE_GPIO_LIB 6#ifdef CONFIG_HAVE_GPIO_LIB
5 7
8#include <linux/compiler.h>
9
6/* Platforms may implement their GPIO interface with library code, 10/* Platforms may implement their GPIO interface with library code,
7 * at a small performance cost for non-inlined operations and some 11 * at a small performance cost for non-inlined operations and some
8 * extra memory (for code and for per-GPIO table entries). 12 * extra memory (for code and for per-GPIO table entries).
@@ -74,7 +78,7 @@ struct gpio_chip {
74 78
75extern const char *gpiochip_is_requested(struct gpio_chip *chip, 79extern const char *gpiochip_is_requested(struct gpio_chip *chip,
76 unsigned offset); 80 unsigned offset);
77extern int __init __must_check gpiochip_reserve(int start, int ngpio); 81extern int __must_check gpiochip_reserve(int start, int ngpio);
78 82
79/* add/remove chips */ 83/* add/remove chips */
80extern int gpiochip_add(struct gpio_chip *chip); 84extern int gpiochip_add(struct gpio_chip *chip);
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index 44ef329531c3..4fce3db2cecc 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -197,6 +197,63 @@ static inline int pmd_none_or_clear_bad(pmd_t *pmd)
197} 197}
198#endif /* CONFIG_MMU */ 198#endif /* CONFIG_MMU */
199 199
200static inline pte_t __ptep_modify_prot_start(struct mm_struct *mm,
201 unsigned long addr,
202 pte_t *ptep)
203{
204 /*
205 * Get the current pte state, but zero it out to make it
206 * non-present, preventing the hardware from asynchronously
207 * updating it.
208 */
209 return ptep_get_and_clear(mm, addr, ptep);
210}
211
212static inline void __ptep_modify_prot_commit(struct mm_struct *mm,
213 unsigned long addr,
214 pte_t *ptep, pte_t pte)
215{
216 /*
217 * The pte is non-present, so there's no hardware state to
218 * preserve.
219 */
220 set_pte_at(mm, addr, ptep, pte);
221}
222
223#ifndef __HAVE_ARCH_PTEP_MODIFY_PROT_TRANSACTION
224/*
225 * Start a pte protection read-modify-write transaction, which
226 * protects against asynchronous hardware modifications to the pte.
227 * The intention is not to prevent the hardware from making pte
228 * updates, but to prevent any updates it may make from being lost.
229 *
230 * This does not protect against other software modifications of the
231 * pte; the appropriate pte lock must be held over the transation.
232 *
233 * Note that this interface is intended to be batchable, meaning that
234 * ptep_modify_prot_commit may not actually update the pte, but merely
235 * queue the update to be done at some later time. The update must be
236 * actually committed before the pte lock is released, however.
237 */
238static inline pte_t ptep_modify_prot_start(struct mm_struct *mm,
239 unsigned long addr,
240 pte_t *ptep)
241{
242 return __ptep_modify_prot_start(mm, addr, ptep);
243}
244
245/*
246 * Commit an update to a pte, leaving any hardware-controlled bits in
247 * the PTE unmodified.
248 */
249static inline void ptep_modify_prot_commit(struct mm_struct *mm,
250 unsigned long addr,
251 pte_t *ptep, pte_t pte)
252{
253 __ptep_modify_prot_commit(mm, addr, ptep, pte);
254}
255#endif /* __HAVE_ARCH_PTEP_MODIFY_PROT_TRANSACTION */
256
200/* 257/*
201 * A facility to provide lazy MMU batching. This allows PTE updates and 258 * A facility to provide lazy MMU batching. This allows PTE updates and
202 * page invalidations to be delayed until a call to leave lazy MMU mode 259 * page invalidations to be delayed until a call to leave lazy MMU mode
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index f054778e916c..f1992dc5c424 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -93,6 +93,8 @@
93 VMLINUX_SYMBOL(__end_rio_route_ops) = .; \ 93 VMLINUX_SYMBOL(__end_rio_route_ops) = .; \
94 } \ 94 } \
95 \ 95 \
96 TRACEDATA \
97 \
96 /* Kernel symbol table: Normal symbols */ \ 98 /* Kernel symbol table: Normal symbols */ \
97 __ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \ 99 __ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \
98 VMLINUX_SYMBOL(__start___ksymtab) = .; \ 100 VMLINUX_SYMBOL(__start___ksymtab) = .; \
@@ -318,6 +320,18 @@
318 __stop___bug_table = .; \ 320 __stop___bug_table = .; \
319 } 321 }
320 322
323#ifdef CONFIG_PM_TRACE
324#define TRACEDATA \
325 . = ALIGN(4); \
326 .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) { \
327 __tracedata_start = .; \
328 *(.tracedata) \
329 __tracedata_end = .; \
330 }
331#else
332#define TRACEDATA
333#endif
334
321#define NOTES \ 335#define NOTES \
322 .notes : AT(ADDR(.notes) - LOAD_OFFSET) { \ 336 .notes : AT(ADDR(.notes) - LOAD_OFFSET) { \
323 VMLINUX_SYMBOL(__start_notes) = .; \ 337 VMLINUX_SYMBOL(__start_notes) = .; \
diff --git a/include/asm-h8300/cacheflush.h b/include/asm-h8300/cacheflush.h
index 71210d141b64..5ffdca217b95 100644
--- a/include/asm-h8300/cacheflush.h
+++ b/include/asm-h8300/cacheflush.h
@@ -3,7 +3,7 @@
3 */ 3 */
4 4
5#ifndef _ASM_H8300_CACHEFLUSH_H 5#ifndef _ASM_H8300_CACHEFLUSH_H
6#define _AMS_H8300_CACHEFLUSH_H 6#define _ASM_H8300_CACHEFLUSH_H
7 7
8/* 8/*
9 * Cache handling functions 9 * Cache handling functions
diff --git a/include/asm-ia64/patch.h b/include/asm-ia64/patch.h
index a71543084fb4..295fe6ab4584 100644
--- a/include/asm-ia64/patch.h
+++ b/include/asm-ia64/patch.h
@@ -21,6 +21,7 @@ extern void ia64_patch_imm60 (u64 insn_addr, u64 val); /* patch "brl" w/ip-rel
21extern void ia64_patch_mckinley_e9 (unsigned long start, unsigned long end); 21extern void ia64_patch_mckinley_e9 (unsigned long start, unsigned long end);
22extern void ia64_patch_vtop (unsigned long start, unsigned long end); 22extern void ia64_patch_vtop (unsigned long start, unsigned long end);
23extern void ia64_patch_phys_stack_reg(unsigned long val); 23extern void ia64_patch_phys_stack_reg(unsigned long val);
24extern void ia64_patch_rse (unsigned long start, unsigned long end);
24extern void ia64_patch_gate (void); 25extern void ia64_patch_gate (void);
25 26
26#endif /* _ASM_IA64_PATCH_H */ 27#endif /* _ASM_IA64_PATCH_H */
diff --git a/include/asm-ia64/ptrace.h b/include/asm-ia64/ptrace.h
index 4b2a8d40ebc5..15f8dcfe6eee 100644
--- a/include/asm-ia64/ptrace.h
+++ b/include/asm-ia64/ptrace.h
@@ -76,7 +76,7 @@
76# define KERNEL_STACK_SIZE_ORDER 0 76# define KERNEL_STACK_SIZE_ORDER 0
77#endif 77#endif
78 78
79#define IA64_RBS_OFFSET ((IA64_TASK_SIZE + IA64_THREAD_INFO_SIZE + 15) & ~15) 79#define IA64_RBS_OFFSET ((IA64_TASK_SIZE + IA64_THREAD_INFO_SIZE + 31) & ~31)
80#define IA64_STK_OFFSET ((1 << KERNEL_STACK_SIZE_ORDER)*PAGE_SIZE) 80#define IA64_STK_OFFSET ((1 << KERNEL_STACK_SIZE_ORDER)*PAGE_SIZE)
81 81
82#define KERNEL_STACK_SIZE IA64_STK_OFFSET 82#define KERNEL_STACK_SIZE IA64_STK_OFFSET
diff --git a/include/asm-ia64/sections.h b/include/asm-ia64/sections.h
index dc42a359894f..7286e4a9fe84 100644
--- a/include/asm-ia64/sections.h
+++ b/include/asm-ia64/sections.h
@@ -10,6 +10,7 @@
10 10
11extern char __per_cpu_start[], __per_cpu_end[], __phys_per_cpu_start[]; 11extern char __per_cpu_start[], __per_cpu_end[], __phys_per_cpu_start[];
12extern char __start___vtop_patchlist[], __end___vtop_patchlist[]; 12extern char __start___vtop_patchlist[], __end___vtop_patchlist[];
13extern char __start___rse_patchlist[], __end___rse_patchlist[];
13extern char __start___mckinley_e9_bundles[], __end___mckinley_e9_bundles[]; 14extern char __start___mckinley_e9_bundles[], __end___mckinley_e9_bundles[];
14extern char __start___phys_stack_reg_patchlist[], __end___phys_stack_reg_patchlist[]; 15extern char __start___phys_stack_reg_patchlist[], __end___phys_stack_reg_patchlist[];
15extern char __start_gate_section[]; 16extern char __start_gate_section[];
diff --git a/include/asm-ia64/sn/simulator.h b/include/asm-ia64/sn/simulator.h
index c3fd3eb25768..c2611f6cfe33 100644
--- a/include/asm-ia64/sn/simulator.h
+++ b/include/asm-ia64/sn/simulator.h
@@ -8,7 +8,7 @@
8#ifndef _ASM_IA64_SN_SIMULATOR_H 8#ifndef _ASM_IA64_SN_SIMULATOR_H
9#define _ASM_IA64_SN_SIMULATOR_H 9#define _ASM_IA64_SN_SIMULATOR_H
10 10
11 11#if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_SGI_SN2) || defined(CONFIG_IA64_SGI_UV)
12#define SNMAGIC 0xaeeeeeee8badbeefL 12#define SNMAGIC 0xaeeeeeee8badbeefL
13#define IS_MEDUSA() ({long sn; asm("mov %0=cpuid[%1]" : "=r"(sn) : "r"(2)); sn == SNMAGIC;}) 13#define IS_MEDUSA() ({long sn; asm("mov %0=cpuid[%1]" : "=r"(sn) : "r"(2)); sn == SNMAGIC;})
14 14
@@ -16,5 +16,10 @@
16#define IS_RUNNING_ON_SIMULATOR() (sn_prom_type) 16#define IS_RUNNING_ON_SIMULATOR() (sn_prom_type)
17#define IS_RUNNING_ON_FAKE_PROM() (sn_prom_type == 2) 17#define IS_RUNNING_ON_FAKE_PROM() (sn_prom_type == 2)
18extern int sn_prom_type; /* 0=hardware, 1=medusa/realprom, 2=medusa/fakeprom */ 18extern int sn_prom_type; /* 0=hardware, 1=medusa/realprom, 2=medusa/fakeprom */
19#else
20#define IS_MEDUSA() 0
21#define SIMULATOR_SLEEP()
22#define IS_RUNNING_ON_SIMULATOR() 0
23#endif
19 24
20#endif /* _ASM_IA64_SN_SIMULATOR_H */ 25#endif /* _ASM_IA64_SN_SIMULATOR_H */
diff --git a/include/asm-m32r/uaccess.h b/include/asm-m32r/uaccess.h
index bd8c83765a5c..1c7047bea200 100644
--- a/include/asm-m32r/uaccess.h
+++ b/include/asm-m32r/uaccess.h
@@ -14,6 +14,7 @@
14#include <linux/errno.h> 14#include <linux/errno.h>
15#include <linux/thread_info.h> 15#include <linux/thread_info.h>
16#include <asm/page.h> 16#include <asm/page.h>
17#include <asm/setup.h>
17 18
18#define VERIFY_READ 0 19#define VERIFY_READ 0
19#define VERIFY_WRITE 1 20#define VERIFY_WRITE 1
@@ -106,7 +107,6 @@ static inline void set_fs(mm_segment_t s)
106#else 107#else
107static inline int access_ok(int type, const void *addr, unsigned long size) 108static inline int access_ok(int type, const void *addr, unsigned long size)
108{ 109{
109 extern unsigned long memory_start, memory_end;
110 unsigned long val = (unsigned long)addr; 110 unsigned long val = (unsigned long)addr;
111 111
112 return ((val >= memory_start) && ((val + size) < memory_end)); 112 return ((val >= memory_start) && ((val + size) < memory_end));
diff --git a/include/asm-m68k/bitops.h b/include/asm-m68k/bitops.h
index 83d1f286230b..3e8106442d5a 100644
--- a/include/asm-m68k/bitops.h
+++ b/include/asm-m68k/bitops.h
@@ -410,8 +410,49 @@ static inline int ext2_find_next_zero_bit(const void *vaddr, unsigned size,
410 res = ext2_find_first_zero_bit (p, size - 32 * (p - addr)); 410 res = ext2_find_first_zero_bit (p, size - 32 * (p - addr));
411 return (p - addr) * 32 + res; 411 return (p - addr) * 32 + res;
412} 412}
413#define ext2_find_next_bit(addr, size, off) \ 413
414 generic_find_next_le_bit((unsigned long *)(addr), (size), (off)) 414static inline int ext2_find_first_bit(const void *vaddr, unsigned size)
415{
416 const unsigned long *p = vaddr, *addr = vaddr;
417 int res;
418
419 if (!size)
420 return 0;
421
422 size = (size >> 5) + ((size & 31) > 0);
423 while (*p++ == 0UL) {
424 if (--size == 0)
425 return (p - addr) << 5;
426 }
427
428 --p;
429 for (res = 0; res < 32; res++)
430 if (ext2_test_bit(res, p))
431 break;
432 return (p - addr) * 32 + res;
433}
434
435static inline int ext2_find_next_bit(const void *vaddr, unsigned size,
436 unsigned offset)
437{
438 const unsigned long *addr = vaddr;
439 const unsigned long *p = addr + (offset >> 5);
440 int bit = offset & 31UL, res;
441
442 if (offset >= size)
443 return size;
444
445 if (bit) {
446 /* Look for one in first longword */
447 for (res = bit; res < 32; res++)
448 if (ext2_test_bit(res, p))
449 return (p - addr) * 32 + res;
450 p++;
451 }
452 /* No set bit yet, search remaining full bytes for a set bit */
453 res = ext2_find_first_bit(p, size - 32 * (p - addr));
454 return (p - addr) * 32 + res;
455}
415 456
416#endif /* __KERNEL__ */ 457#endif /* __KERNEL__ */
417 458
diff --git a/include/asm-mips/atomic.h b/include/asm-mips/atomic.h
index a798d6299a79..1232be3885b0 100644
--- a/include/asm-mips/atomic.h
+++ b/include/asm-mips/atomic.h
@@ -283,10 +283,10 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v)
283 " beqz %0, 2f \n" 283 " beqz %0, 2f \n"
284 " subu %0, %1, %3 \n" 284 " subu %0, %1, %3 \n"
285 " .set reorder \n" 285 " .set reorder \n"
286 "1: \n"
287 " .subsection 2 \n" 286 " .subsection 2 \n"
288 "2: b 1b \n" 287 "2: b 1b \n"
289 " .previous \n" 288 " .previous \n"
289 "1: \n"
290 " .set mips0 \n" 290 " .set mips0 \n"
291 : "=&r" (result), "=&r" (temp), "=m" (v->counter) 291 : "=&r" (result), "=&r" (temp), "=m" (v->counter)
292 : "Ir" (i), "m" (v->counter) 292 : "Ir" (i), "m" (v->counter)
@@ -664,10 +664,10 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v)
664 " beqz %0, 2f \n" 664 " beqz %0, 2f \n"
665 " dsubu %0, %1, %3 \n" 665 " dsubu %0, %1, %3 \n"
666 " .set reorder \n" 666 " .set reorder \n"
667 "1: \n"
668 " .subsection 2 \n" 667 " .subsection 2 \n"
669 "2: b 1b \n" 668 "2: b 1b \n"
670 " .previous \n" 669 " .previous \n"
670 "1: \n"
671 " .set mips0 \n" 671 " .set mips0 \n"
672 : "=&r" (result), "=&r" (temp), "=m" (v->counter) 672 : "=&r" (result), "=&r" (temp), "=m" (v->counter)
673 : "Ir" (i), "m" (v->counter) 673 : "Ir" (i), "m" (v->counter)
diff --git a/include/asm-mips/cpu-info.h b/include/asm-mips/cpu-info.h
index 0c5a358863f3..2de73dbb2e9e 100644
--- a/include/asm-mips/cpu-info.h
+++ b/include/asm-mips/cpu-info.h
@@ -56,7 +56,7 @@ struct cpuinfo_mips {
56 struct cache_desc tcache; /* Tertiary/split secondary cache */ 56 struct cache_desc tcache; /* Tertiary/split secondary cache */
57 int srsets; /* Shadow register sets */ 57 int srsets; /* Shadow register sets */
58 int core; /* physical core number */ 58 int core; /* physical core number */
59#if defined(CONFIG_MIPS_MT_SMTC) 59#if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_MIPS_MT_SMTC)
60 /* 60 /*
61 * In the MIPS MT "SMTC" model, each TC is considered 61 * In the MIPS MT "SMTC" model, each TC is considered
62 * to be a "CPU" for the purposes of scheduling, but 62 * to be a "CPU" for the purposes of scheduling, but
@@ -64,7 +64,7 @@ struct cpuinfo_mips {
64 * to all TCs within the same VPE. 64 * to all TCs within the same VPE.
65 */ 65 */
66 int vpe_id; /* Virtual Processor number */ 66 int vpe_id; /* Virtual Processor number */
67#endif /* CONFIG_MIPS_MT */ 67#endif
68#ifdef CONFIG_MIPS_MT_SMTC 68#ifdef CONFIG_MIPS_MT_SMTC
69 int tc_id; /* Thread Context number */ 69 int tc_id; /* Thread Context number */
70#endif 70#endif
diff --git a/include/asm-mips/gic.h b/include/asm-mips/gic.h
index 01b2f92dc33d..954807d9d66a 100644
--- a/include/asm-mips/gic.h
+++ b/include/asm-mips/gic.h
@@ -24,8 +24,8 @@
24 24
25#define MSK(n) ((1 << (n)) - 1) 25#define MSK(n) ((1 << (n)) - 1)
26#define REG32(addr) (*(volatile unsigned int *) (addr)) 26#define REG32(addr) (*(volatile unsigned int *) (addr))
27#define REG(base, offs) REG32((unsigned int)(base) + offs##_##OFS) 27#define REG(base, offs) REG32((unsigned long)(base) + offs##_##OFS)
28#define REGP(base, phys) REG32((unsigned int)(base) + (phys)) 28#define REGP(base, phys) REG32((unsigned long)(base) + (phys))
29 29
30/* Accessors */ 30/* Accessors */
31#define GIC_REG(segment, offset) \ 31#define GIC_REG(segment, offset) \
@@ -330,7 +330,7 @@
330 330
331#define GIC_SH_RMASK_OFS 0x0300 331#define GIC_SH_RMASK_OFS 0x0300
332#define GIC_CLR_INTR_MASK(intr, val) \ 332#define GIC_CLR_INTR_MASK(intr, val) \
333 GICWRITE(GIC_REG_ADDR(SHARED, GIC_SH_RMASK_OFS + 4 + (((((intr) / 32) ^ 1) - 1) * 4)), ((val) << ((intr) % 32)) 333 GICWRITE(GIC_REG_ADDR(SHARED, GIC_SH_RMASK_OFS + 4 + (((((intr) / 32) ^ 1) - 1) * 4)), ((val) << ((intr) % 32)))
334 334
335/* Register Map for Local Section */ 335/* Register Map for Local Section */
336#define GIC_VPE_CTL_OFS 0x0000 336#define GIC_VPE_CTL_OFS 0x0000
diff --git a/include/asm-mips/lasat/serial.h b/include/asm-mips/lasat/serial.h
index bafe68b10614..1c37d70579b8 100644
--- a/include/asm-mips/lasat/serial.h
+++ b/include/asm-mips/lasat/serial.h
@@ -4,10 +4,10 @@
4#define LASAT_BASE_BAUD_100 (7372800 / 16) 4#define LASAT_BASE_BAUD_100 (7372800 / 16)
5#define LASAT_UART_REGS_BASE_100 0x1c8b0000 5#define LASAT_UART_REGS_BASE_100 0x1c8b0000
6#define LASAT_UART_REGS_SHIFT_100 2 6#define LASAT_UART_REGS_SHIFT_100 2
7#define LASATINT_UART_100 8 7#define LASATINT_UART_100 16
8 8
9/* * LASAT 200 boards serial configuration */ 9/* * LASAT 200 boards serial configuration */
10#define LASAT_BASE_BAUD_200 (100000000 / 16 / 12) 10#define LASAT_BASE_BAUD_200 (100000000 / 16 / 12)
11#define LASAT_UART_REGS_BASE_200 (Vrc5074_PHYS_BASE + 0x0300) 11#define LASAT_UART_REGS_BASE_200 (Vrc5074_PHYS_BASE + 0x0300)
12#define LASAT_UART_REGS_SHIFT_200 3 12#define LASAT_UART_REGS_SHIFT_200 3
13#define LASATINT_UART_200 13 13#define LASATINT_UART_200 21
diff --git a/include/asm-mips/mach-au1x00/au1000.h b/include/asm-mips/mach-au1x00/au1000.h
index 363a14ee0ae5..0d302bad4492 100644
--- a/include/asm-mips/mach-au1x00/au1000.h
+++ b/include/asm-mips/mach-au1x00/au1000.h
@@ -615,6 +615,7 @@ enum soc_au1500_ints {
615 AU1000_RTC_MATCH1_INT, 615 AU1000_RTC_MATCH1_INT,
616 AU1000_RTC_MATCH2_INT, 616 AU1000_RTC_MATCH2_INT,
617 AU1500_PCI_ERR_INT, 617 AU1500_PCI_ERR_INT,
618 AU1500_RESERVED_INT,
618 AU1000_USB_DEV_REQ_INT, 619 AU1000_USB_DEV_REQ_INT,
619 AU1000_USB_DEV_SUS_INT, 620 AU1000_USB_DEV_SUS_INT,
620 AU1000_USB_HOST_INT, 621 AU1000_USB_HOST_INT,
@@ -1036,7 +1037,7 @@ enum soc_au1200_ints {
1036#define USBD_INTSTAT 0xB020001C 1037#define USBD_INTSTAT 0xB020001C
1037# define USBDEV_INT_SOF (1 << 12) 1038# define USBDEV_INT_SOF (1 << 12)
1038# define USBDEV_INT_HF_BIT 6 1039# define USBDEV_INT_HF_BIT 6
1039# define USBDEV_INT_HF_MASK 0x3f << USBDEV_INT_HF_BIT) 1040# define USBDEV_INT_HF_MASK (0x3f << USBDEV_INT_HF_BIT)
1040# define USBDEV_INT_CMPLT_BIT 0 1041# define USBDEV_INT_CMPLT_BIT 0
1041# define USBDEV_INT_CMPLT_MASK (0x3f << USBDEV_INT_CMPLT_BIT) 1042# define USBDEV_INT_CMPLT_MASK (0x3f << USBDEV_INT_CMPLT_BIT)
1042#define USBD_CONFIG 0xB0200020 1043#define USBD_CONFIG 0xB0200020
diff --git a/include/asm-mips/mach-au1x00/au1xxx_dbdma.h b/include/asm-mips/mach-au1x00/au1xxx_dbdma.h
index ad17d7ce516a..44a67bf05dc1 100644
--- a/include/asm-mips/mach-au1x00/au1xxx_dbdma.h
+++ b/include/asm-mips/mach-au1x00/au1xxx_dbdma.h
@@ -355,6 +355,7 @@ void au1xxx_dbdma_dump(u32 chanid);
355u32 au1xxx_dbdma_put_dscr(u32 chanid, au1x_ddma_desc_t *dscr); 355u32 au1xxx_dbdma_put_dscr(u32 chanid, au1x_ddma_desc_t *dscr);
356 356
357u32 au1xxx_ddma_add_device(dbdev_tab_t *dev); 357u32 au1xxx_ddma_add_device(dbdev_tab_t *dev);
358extern void au1xxx_ddma_del_device(u32 devid);
358void *au1xxx_ddma_get_nextptr_virt(au1x_ddma_desc_t *dp); 359void *au1xxx_ddma_get_nextptr_virt(au1x_ddma_desc_t *dp);
359 360
360/* 361/*
diff --git a/include/asm-mips/mipsregs.h b/include/asm-mips/mipsregs.h
index aa17f658f73c..a46f8e258e6b 100644
--- a/include/asm-mips/mipsregs.h
+++ b/include/asm-mips/mipsregs.h
@@ -765,6 +765,9 @@ do { \
765#define read_c0_index() __read_32bit_c0_register($0, 0) 765#define read_c0_index() __read_32bit_c0_register($0, 0)
766#define write_c0_index(val) __write_32bit_c0_register($0, 0, val) 766#define write_c0_index(val) __write_32bit_c0_register($0, 0, val)
767 767
768#define read_c0_random() __read_32bit_c0_register($1, 0)
769#define write_c0_random(val) __write_32bit_c0_register($1, 0, val)
770
768#define read_c0_entrylo0() __read_ulong_c0_register($2, 0) 771#define read_c0_entrylo0() __read_ulong_c0_register($2, 0)
769#define write_c0_entrylo0(val) __write_ulong_c0_register($2, 0, val) 772#define write_c0_entrylo0(val) __write_ulong_c0_register($2, 0, val)
770 773
diff --git a/include/asm-mips/pgtable-bits.h b/include/asm-mips/pgtable-bits.h
index 60e2f9338fcd..51b34a48c84a 100644
--- a/include/asm-mips/pgtable-bits.h
+++ b/include/asm-mips/pgtable-bits.h
@@ -134,6 +134,4 @@
134 134
135#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_MODIFIED | _CACHE_MASK) 135#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_MODIFIED | _CACHE_MASK)
136 136
137#define CONF_CM_DEFAULT (PAGE_CACHABLE_DEFAULT>>_CACHE_SHIFT)
138
139#endif /* _ASM_PGTABLE_BITS_H */ 137#endif /* _ASM_PGTABLE_BITS_H */
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h
index 2f597eea4448..6a0edf72ffbc 100644
--- a/include/asm-mips/pgtable.h
+++ b/include/asm-mips/pgtable.h
@@ -239,9 +239,10 @@ static inline pte_t pte_mkdirty(pte_t pte)
239static inline pte_t pte_mkyoung(pte_t pte) 239static inline pte_t pte_mkyoung(pte_t pte)
240{ 240{
241 pte.pte_low |= _PAGE_ACCESSED; 241 pte.pte_low |= _PAGE_ACCESSED;
242 if (pte.pte_low & _PAGE_READ) 242 if (pte.pte_low & _PAGE_READ) {
243 pte.pte_low |= _PAGE_SILENT_READ; 243 pte.pte_low |= _PAGE_SILENT_READ;
244 pte.pte_high |= _PAGE_SILENT_READ; 244 pte.pte_high |= _PAGE_SILENT_READ;
245 }
245 return pte; 246 return pte;
246} 247}
247#else 248#else
diff --git a/include/asm-mips/rtlx.h b/include/asm-mips/rtlx.h
index 20b666022dcb..4ca3063ed2ce 100644
--- a/include/asm-mips/rtlx.h
+++ b/include/asm-mips/rtlx.h
@@ -3,7 +3,7 @@
3 * 3 *
4 */ 4 */
5 5
6#ifndef __ASM_RTLX_H 6#ifndef __ASM_RTLX_H_
7#define __ASM_RTLX_H_ 7#define __ASM_RTLX_H_
8 8
9#include <irq.h> 9#include <irq.h>
diff --git a/include/asm-mn10300/ipcbuf.h b/include/asm-mn10300/ipcbuf.h
index efbbef8d1c69..f6f63d448272 100644
--- a/include/asm-mn10300/ipcbuf.h
+++ b/include/asm-mn10300/ipcbuf.h
@@ -1,4 +1,4 @@
1#ifndef _ASM_IPCBUF_H_ 1#ifndef _ASM_IPCBUF_H
2#define _ASM_IPCBUF_H 2#define _ASM_IPCBUF_H
3 3
4/* 4/*
diff --git a/include/asm-parisc/checksum.h b/include/asm-parisc/checksum.h
index cc3ec1bd8919..e9639ccc3fce 100644
--- a/include/asm-parisc/checksum.h
+++ b/include/asm-parisc/checksum.h
@@ -65,7 +65,7 @@ static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
65"2:\n" 65"2:\n"
66 : "=r" (sum), "=r" (iph), "=r" (ihl) 66 : "=r" (sum), "=r" (iph), "=r" (ihl)
67 : "1" (iph), "2" (ihl) 67 : "1" (iph), "2" (ihl)
68 : "r19", "r20", "r21" ); 68 : "r19", "r20", "r21", "memory");
69 69
70 return (__force __sum16)sum; 70 return (__force __sum16)sum;
71} 71}
diff --git a/include/asm-powerpc/Kbuild b/include/asm-powerpc/Kbuild
index 7381916dfcbb..bca352e033c3 100644
--- a/include/asm-powerpc/Kbuild
+++ b/include/asm-powerpc/Kbuild
@@ -1,6 +1,5 @@
1include include/asm-generic/Kbuild.asm 1include include/asm-generic/Kbuild.asm
2 2
3header-y += a.out.h
4header-y += auxvec.h 3header-y += auxvec.h
5header-y += ioctls.h 4header-y += ioctls.h
6header-y += mman.h 5header-y += mman.h
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h
index e0062d73db1c..89189488e286 100644
--- a/include/asm-powerpc/io.h
+++ b/include/asm-powerpc/io.h
@@ -100,7 +100,7 @@ static inline type name(const volatile type __iomem *addr) \
100{ \ 100{ \
101 type ret; \ 101 type ret; \
102 __asm__ __volatile__("sync;" insn ";twi 0,%0,0;isync" \ 102 __asm__ __volatile__("sync;" insn ";twi 0,%0,0;isync" \
103 : "=r" (ret) : "r" (addr), "m" (*addr)); \ 103 : "=r" (ret) : "r" (addr), "m" (*addr) : "memory"); \
104 return ret; \ 104 return ret; \
105} 105}
106 106
@@ -108,8 +108,8 @@ static inline type name(const volatile type __iomem *addr) \
108static inline void name(volatile type __iomem *addr, type val) \ 108static inline void name(volatile type __iomem *addr, type val) \
109{ \ 109{ \
110 __asm__ __volatile__("sync;" insn \ 110 __asm__ __volatile__("sync;" insn \
111 : "=m" (*addr) : "r" (val), "r" (addr)); \ 111 : "=m" (*addr) : "r" (val), "r" (addr) : "memory"); \
112 IO_SET_SYNC_FLAG(); \ 112 IO_SET_SYNC_FLAG(); \
113} 113}
114 114
115 115
@@ -333,7 +333,8 @@ static inline unsigned int name(unsigned int port) \
333 " .long 3b,5b\n" \ 333 " .long 3b,5b\n" \
334 ".previous" \ 334 ".previous" \
335 : "=&r" (x) \ 335 : "=&r" (x) \
336 : "r" (port + _IO_BASE)); \ 336 : "r" (port + _IO_BASE) \
337 : "memory"); \
337 return x; \ 338 return x; \
338} 339}
339 340
@@ -350,7 +351,8 @@ static inline void name(unsigned int val, unsigned int port) \
350 " .long 0b,2b\n" \ 351 " .long 0b,2b\n" \
351 " .long 1b,2b\n" \ 352 " .long 1b,2b\n" \
352 ".previous" \ 353 ".previous" \
353 : : "r" (val), "r" (port + _IO_BASE)); \ 354 : : "r" (val), "r" (port + _IO_BASE) \
355 : "memory"); \
354} 356}
355 357
356__do_in_asm(_rec_inb, "lbzx") 358__do_in_asm(_rec_inb, "lbzx")
diff --git a/include/asm-powerpc/kvm_ppc.h b/include/asm-powerpc/kvm_ppc.h
index b35a7e3ef978..5a21115228af 100644
--- a/include/asm-powerpc/kvm_ppc.h
+++ b/include/asm-powerpc/kvm_ppc.h
@@ -57,6 +57,7 @@ extern int kvmppc_handle_store(struct kvm_run *run, struct kvm_vcpu *vcpu,
57 57
58extern int kvmppc_emulate_instruction(struct kvm_run *run, 58extern int kvmppc_emulate_instruction(struct kvm_run *run,
59 struct kvm_vcpu *vcpu); 59 struct kvm_vcpu *vcpu);
60extern int kvmppc_emulate_mmio(struct kvm_run *run, struct kvm_vcpu *vcpu);
60 61
61extern void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 gvaddr, gfn_t gfn, 62extern void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 gvaddr, gfn_t gfn,
62 u64 asid, u32 flags); 63 u64 asid, u32 flags);
diff --git a/include/asm-powerpc/mediabay.h b/include/asm-powerpc/mediabay.h
index df111c362a7f..b2efb3325808 100644
--- a/include/asm-powerpc/mediabay.h
+++ b/include/asm-powerpc/mediabay.h
@@ -17,8 +17,6 @@
17#define MB_POWER 6 /* media bay contains a Power device (???) */ 17#define MB_POWER 6 /* media bay contains a Power device (???) */
18#define MB_NO 7 /* media bay contains nothing */ 18#define MB_NO 7 /* media bay contains nothing */
19 19
20int check_media_bay(struct device_node *which_bay, int what);
21
22/* Number of bays in the machine or 0 */ 20/* Number of bays in the machine or 0 */
23extern int media_bay_count; 21extern int media_bay_count;
24 22
@@ -29,6 +27,16 @@ int check_media_bay_by_base(unsigned long base, int what);
29/* called by IDE PMAC host driver to register IDE controller for media bay */ 27/* called by IDE PMAC host driver to register IDE controller for media bay */
30int media_bay_set_ide_infos(struct device_node *which_bay, unsigned long base, 28int media_bay_set_ide_infos(struct device_node *which_bay, unsigned long base,
31 int irq, ide_hwif_t *hwif); 29 int irq, ide_hwif_t *hwif);
30
31int check_media_bay(struct device_node *which_bay, int what);
32
33#else
34
35static inline int check_media_bay(struct device_node *which_bay, int what)
36{
37 return -ENODEV;
38}
39
32#endif 40#endif
33 41
34#endif /* __KERNEL__ */ 42#endif /* __KERNEL__ */
diff --git a/include/asm-powerpc/mpic.h b/include/asm-powerpc/mpic.h
index 943c5a3fac8a..a4d0f876b427 100644
--- a/include/asm-powerpc/mpic.h
+++ b/include/asm-powerpc/mpic.h
@@ -428,12 +428,11 @@ extern void mpic_init(struct mpic *mpic);
428 */ 428 */
429 429
430 430
431/* Change/Read the priority of an interrupt. Default is 8 for irqs and 431/* Change the priority of an interrupt. Default is 8 for irqs and
432 * 10 for IPIs. You can call this on both IPIs and IRQ numbers, but the 432 * 10 for IPIs. You can call this on both IPIs and IRQ numbers, but the
433 * IPI number is then the offset'ed (linux irq number mapped to the IPI) 433 * IPI number is then the offset'ed (linux irq number mapped to the IPI)
434 */ 434 */
435extern void mpic_irq_set_priority(unsigned int irq, unsigned int pri); 435extern void mpic_irq_set_priority(unsigned int irq, unsigned int pri);
436extern unsigned int mpic_irq_get_priority(unsigned int irq);
437 436
438/* Setup a non-boot CPU */ 437/* Setup a non-boot CPU */
439extern void mpic_setup_this_cpu(void); 438extern void mpic_setup_this_cpu(void);
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h
index 6abead6e681a..99348c1f4cab 100644
--- a/include/asm-powerpc/spu.h
+++ b/include/asm-powerpc/spu.h
@@ -131,7 +131,6 @@ struct spu {
131 u64 flags; 131 u64 flags;
132 u64 class_0_pending; 132 u64 class_0_pending;
133 u64 class_0_dar; 133 u64 class_0_dar;
134 u64 class_0_dsisr;
135 u64 class_1_dar; 134 u64 class_1_dar;
136 u64 class_1_dsisr; 135 u64 class_1_dsisr;
137 size_t ls_size; 136 size_t ls_size;
diff --git a/include/asm-powerpc/spu_csa.h b/include/asm-powerpc/spu_csa.h
index 129ec148d451..a40fd491250c 100644
--- a/include/asm-powerpc/spu_csa.h
+++ b/include/asm-powerpc/spu_csa.h
@@ -254,7 +254,7 @@ struct spu_state {
254 u64 spu_chnldata_RW[32]; 254 u64 spu_chnldata_RW[32];
255 u32 spu_mailbox_data[4]; 255 u32 spu_mailbox_data[4];
256 u32 pu_mailbox_data[1]; 256 u32 pu_mailbox_data[1];
257 u64 class_0_dar, class_0_dsisr, class_0_pending; 257 u64 class_0_dar, class_0_pending;
258 u64 class_1_dar, class_1_dsisr; 258 u64 class_1_dar, class_1_dsisr;
259 unsigned long suspend_time; 259 unsigned long suspend_time;
260 spinlock_t register_lock; 260 spinlock_t register_lock;
diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h
index 2b6559a6d113..5235f875b932 100644
--- a/include/asm-powerpc/system.h
+++ b/include/asm-powerpc/system.h
@@ -34,7 +34,7 @@
34 * SMP since it is only used to order updates to system memory. 34 * SMP since it is only used to order updates to system memory.
35 */ 35 */
36#define mb() __asm__ __volatile__ ("sync" : : : "memory") 36#define mb() __asm__ __volatile__ ("sync" : : : "memory")
37#define rmb() __asm__ __volatile__ (__stringify(LWSYNC) : : : "memory") 37#define rmb() __asm__ __volatile__ ("sync" : : : "memory")
38#define wmb() __asm__ __volatile__ ("sync" : : : "memory") 38#define wmb() __asm__ __volatile__ ("sync" : : : "memory")
39#define read_barrier_depends() do { } while(0) 39#define read_barrier_depends() do { } while(0)
40 40
diff --git a/include/asm-s390/system.h b/include/asm-s390/system.h
index e0d4500d5f95..819e7d99ca0c 100644
--- a/include/asm-s390/system.h
+++ b/include/asm-s390/system.h
@@ -315,14 +315,14 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
315 asm volatile( \ 315 asm volatile( \
316 " lctlg %1,%2,0(%0)\n" \ 316 " lctlg %1,%2,0(%0)\n" \
317 : : "a" (&array), "i" (low), "i" (high), \ 317 : : "a" (&array), "i" (low), "i" (high), \
318 "m" (*(addrtype *)(array))); \ 318 "m" (*(addrtype *)(&array))); \
319 }) 319 })
320 320
321#define __ctl_store(array, low, high) ({ \ 321#define __ctl_store(array, low, high) ({ \
322 typedef struct { char _[sizeof(array)]; } addrtype; \ 322 typedef struct { char _[sizeof(array)]; } addrtype; \
323 asm volatile( \ 323 asm volatile( \
324 " stctg %2,%3,0(%1)\n" \ 324 " stctg %2,%3,0(%1)\n" \
325 : "=m" (*(addrtype *)(array)) \ 325 : "=m" (*(addrtype *)(&array)) \
326 : "a" (&array), "i" (low), "i" (high)); \ 326 : "a" (&array), "i" (low), "i" (high)); \
327 }) 327 })
328 328
@@ -333,14 +333,14 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
333 asm volatile( \ 333 asm volatile( \
334 " lctl %1,%2,0(%0)\n" \ 334 " lctl %1,%2,0(%0)\n" \
335 : : "a" (&array), "i" (low), "i" (high), \ 335 : : "a" (&array), "i" (low), "i" (high), \
336 "m" (*(addrtype *)(array))); \ 336 "m" (*(addrtype *)(&array))); \
337}) 337})
338 338
339#define __ctl_store(array, low, high) ({ \ 339#define __ctl_store(array, low, high) ({ \
340 typedef struct { char _[sizeof(array)]; } addrtype; \ 340 typedef struct { char _[sizeof(array)]; } addrtype; \
341 asm volatile( \ 341 asm volatile( \
342 " stctl %2,%3,0(%1)\n" \ 342 " stctl %2,%3,0(%1)\n" \
343 : "=m" (*(addrtype *)(array)) \ 343 : "=m" (*(addrtype *)(&array)) \
344 : "a" (&array), "i" (low), "i" (high)); \ 344 : "a" (&array), "i" (low), "i" (high)); \
345 }) 345 })
346 346
diff --git a/include/asm-s390/types.h b/include/asm-s390/types.h
index 0e959e20e9a3..41c547656130 100644
--- a/include/asm-s390/types.h
+++ b/include/asm-s390/types.h
@@ -40,7 +40,13 @@ typedef __signed__ long saddr_t;
40 40
41#ifndef __ASSEMBLY__ 41#ifndef __ASSEMBLY__
42 42
43typedef u64 dma64_addr_t;
44#ifdef __s390x__
45/* DMA addresses come in 32-bit and 64-bit flavours. */
46typedef u64 dma_addr_t;
47#else
43typedef u32 dma_addr_t; 48typedef u32 dma_addr_t;
49#endif
44 50
45#ifndef __s390x__ 51#ifndef __s390x__
46typedef union { 52typedef union {
diff --git a/include/asm-sh/checksum_32.h b/include/asm-sh/checksum_32.h
index 4bc8357e8892..14b7ac2f0a07 100644
--- a/include/asm-sh/checksum_32.h
+++ b/include/asm-sh/checksum_32.h
@@ -109,7 +109,7 @@ static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
109 will assume they contain their original values. */ 109 will assume they contain their original values. */
110 : "=r" (sum), "=r" (iph), "=r" (ihl), "=&r" (__dummy0), "=&z" (__dummy1) 110 : "=r" (sum), "=r" (iph), "=r" (ihl), "=&r" (__dummy0), "=&z" (__dummy1)
111 : "1" (iph), "2" (ihl) 111 : "1" (iph), "2" (ihl)
112 : "t"); 112 : "t", "memory");
113 113
114 return csum_fold(sum); 114 return csum_fold(sum);
115} 115}
diff --git a/include/asm-sparc/asi.h b/include/asm-sparc/asi.h
index 58c3754da926..158f9b00d43f 100644
--- a/include/asm-sparc/asi.h
+++ b/include/asm-sparc/asi.h
@@ -1,4 +1,3 @@
1/* $Id: asi.h,v 1.18 1998/03/09 14:04:46 jj Exp $ */
2#ifndef _SPARC_ASI_H 1#ifndef _SPARC_ASI_H
3#define _SPARC_ASI_H 2#define _SPARC_ASI_H
4 3
diff --git a/include/asm-sparc/auxio.h b/include/asm-sparc/auxio.h
index ee83aefb20dc..e552b8d68450 100644
--- a/include/asm-sparc/auxio.h
+++ b/include/asm-sparc/auxio.h
@@ -1,4 +1,4 @@
1/* $Id: auxio.h,v 1.18 1997/11/07 15:01:45 jj Exp $ 1/*
2 * auxio.h: Definitions and code for the Auxiliary I/O register. 2 * auxio.h: Definitions and code for the Auxiliary I/O register.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc/bitops.h b/include/asm-sparc/bitops.h
index cb3cefab6e09..68b98a7e6454 100644
--- a/include/asm-sparc/bitops.h
+++ b/include/asm-sparc/bitops.h
@@ -1,4 +1,4 @@
1/* $Id: bitops.h,v 1.67 2001/11/19 18:36:34 davem Exp $ 1/*
2 * bitops.h: Bit string operations on the Sparc. 2 * bitops.h: Bit string operations on the Sparc.
3 * 3 *
4 * Copyright 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc/btfixup.h b/include/asm-sparc/btfixup.h
index c2868d0f60b6..08277e6fb4cd 100644
--- a/include/asm-sparc/btfixup.h
+++ b/include/asm-sparc/btfixup.h
@@ -1,4 +1,4 @@
1/* $Id: btfixup.h,v 1.4 1998/03/09 14:04:43 jj Exp $ 1/*
2 * asm-sparc/btfixup.h: Macros for boot time linking. 2 * asm-sparc/btfixup.h: Macros for boot time linking.
3 * 3 *
4 * Copyright (C) 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 4 * Copyright (C) 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
diff --git a/include/asm-sparc/checksum.h b/include/asm-sparc/checksum.h
index 34518ea7bf1b..d044ddb5a3cf 100644
--- a/include/asm-sparc/checksum.h
+++ b/include/asm-sparc/checksum.h
@@ -1,4 +1,3 @@
1/* $Id: checksum.h,v 1.33 2002/02/01 22:01:05 davem Exp $ */
2#ifndef __SPARC_CHECKSUM_H 1#ifndef __SPARC_CHECKSUM_H
3#define __SPARC_CHECKSUM_H 2#define __SPARC_CHECKSUM_H
4 3
diff --git a/include/asm-sparc/clock.h b/include/asm-sparc/clock.h
index e708e6b50d2b..2cf99dadec56 100644
--- a/include/asm-sparc/clock.h
+++ b/include/asm-sparc/clock.h
@@ -1,4 +1,4 @@
1/* $Id: clock.h,v 1.3 1995/11/25 02:31:25 davem Exp $ 1/*
2 * clock.h: Definitions for clock operations on the Sparc. 2 * clock.h: Definitions for clock operations on the Sparc.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc/contregs.h b/include/asm-sparc/contregs.h
index 0e05afe02d44..48fa8a4ef357 100644
--- a/include/asm-sparc/contregs.h
+++ b/include/asm-sparc/contregs.h
@@ -1,4 +1,3 @@
1/* $Id: contregs.h,v 1.8 2000/12/28 22:49:11 davem Exp $ */
2#ifndef _SPARC_CONTREGS_H 1#ifndef _SPARC_CONTREGS_H
3#define _SPARC_CONTREGS_H 2#define _SPARC_CONTREGS_H
4 3
diff --git a/include/asm-sparc/cypress.h b/include/asm-sparc/cypress.h
index 99599533efbc..95e9772ea394 100644
--- a/include/asm-sparc/cypress.h
+++ b/include/asm-sparc/cypress.h
@@ -1,4 +1,4 @@
1/* $Id: cypress.h,v 1.6 1996/08/29 09:48:09 davem Exp $ 1/*
2 * cypress.h: Cypress module specific definitions and defines. 2 * cypress.h: Cypress module specific definitions and defines.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc/delay.h b/include/asm-sparc/delay.h
index 48aa70eef997..bc9aba2bead6 100644
--- a/include/asm-sparc/delay.h
+++ b/include/asm-sparc/delay.h
@@ -1,4 +1,4 @@
1/* $Id: delay.h,v 1.11 2001/01/01 01:46:15 davem Exp $ 1/*
2 * delay.h: Linux delay routines on the Sparc. 2 * delay.h: Linux delay routines on the Sparc.
3 * 3 *
4 * Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu). 4 * Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu).
diff --git a/include/asm-sparc/ebus.h b/include/asm-sparc/ebus.h
index 54652887c127..491f85d662df 100644
--- a/include/asm-sparc/ebus.h
+++ b/include/asm-sparc/ebus.h
@@ -1,4 +1,4 @@
1/* $Id: ebus.h,v 1.2 1999/09/11 23:05:55 zaitcev Exp $ 1/*
2 * ebus.h: PCI to Ebus pseudo driver software state. 2 * ebus.h: PCI to Ebus pseudo driver software state.
3 * 3 *
4 * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) 4 * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be)
diff --git a/include/asm-sparc/ecc.h b/include/asm-sparc/ecc.h
index 8e27ceccb76d..ccb84b66fef1 100644
--- a/include/asm-sparc/ecc.h
+++ b/include/asm-sparc/ecc.h
@@ -1,4 +1,4 @@
1/* $Id: ecc.h,v 1.3 1996/04/25 06:12:57 davem Exp $ 1/*
2 * ecc.h: Definitions and defines for the external cache/memory 2 * ecc.h: Definitions and defines for the external cache/memory
3 * controller on the sun4m. 3 * controller on the sun4m.
4 * 4 *
diff --git a/include/asm-sparc/eeprom.h b/include/asm-sparc/eeprom.h
index a8ff7496ddf5..e17beeceb405 100644
--- a/include/asm-sparc/eeprom.h
+++ b/include/asm-sparc/eeprom.h
@@ -1,4 +1,4 @@
1/* $Id: eeprom.h,v 1.3 1995/11/25 02:31:38 davem Exp $ 1/*
2 * eeprom.h: Definitions for the Sun eeprom. 2 * eeprom.h: Definitions for the Sun eeprom.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc/elf.h b/include/asm-sparc/elf.h
index d2516eed3a38..d043f80bc2fd 100644
--- a/include/asm-sparc/elf.h
+++ b/include/asm-sparc/elf.h
@@ -1,4 +1,3 @@
1/* $Id: elf.h,v 1.22 2000/07/12 01:27:08 davem Exp $ */
2#ifndef __ASMSPARC_ELF_H 1#ifndef __ASMSPARC_ELF_H
3#define __ASMSPARC_ELF_H 2#define __ASMSPARC_ELF_H
4 3
diff --git a/include/asm-sparc/fcntl.h b/include/asm-sparc/fcntl.h
index 5ec546349fc8..07bd2d80257f 100644
--- a/include/asm-sparc/fcntl.h
+++ b/include/asm-sparc/fcntl.h
@@ -1,4 +1,3 @@
1/* $Id: fcntl.h,v 1.16 2001/09/20 00:35:33 davem Exp $ */
2#ifndef _SPARC_FCNTL_H 1#ifndef _SPARC_FCNTL_H
3#define _SPARC_FCNTL_H 2#define _SPARC_FCNTL_H
4 3
diff --git a/include/asm-sparc/head.h b/include/asm-sparc/head.h
index e6532c3e09c9..7c35491a8b53 100644
--- a/include/asm-sparc/head.h
+++ b/include/asm-sparc/head.h
@@ -1,4 +1,3 @@
1/* $Id: head.h,v 1.39 2000/05/26 22:18:45 ecd Exp $ */
2#ifndef __SPARC_HEAD_H 1#ifndef __SPARC_HEAD_H
3#define __SPARC_HEAD_H 2#define __SPARC_HEAD_H
4 3
diff --git a/include/asm-sparc/idprom.h b/include/asm-sparc/idprom.h
index 59083ed85232..41adb417a4e5 100644
--- a/include/asm-sparc/idprom.h
+++ b/include/asm-sparc/idprom.h
@@ -1,4 +1,4 @@
1/* $Id: idprom.h,v 1.6 1996/08/04 10:35:07 ecd Exp $ 1/*
2 * idprom.h: Macros and defines for idprom routines 2 * idprom.h: Macros and defines for idprom routines
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc/io.h b/include/asm-sparc/io.h
index 243bf8e9a058..3a3e7bdb06b3 100644
--- a/include/asm-sparc/io.h
+++ b/include/asm-sparc/io.h
@@ -1,6 +1,3 @@
1/*
2 * $Id: io.h,v 1.30 2001/12/21 01:23:21 davem Exp $
3 */
4#ifndef __SPARC_IO_H 1#ifndef __SPARC_IO_H
5#define __SPARC_IO_H 2#define __SPARC_IO_H
6 3
diff --git a/include/asm-sparc/ioctl.h b/include/asm-sparc/ioctl.h
index e6fc4de19940..7d6bd51321b9 100644
--- a/include/asm-sparc/ioctl.h
+++ b/include/asm-sparc/ioctl.h
@@ -1,4 +1,3 @@
1/* $Id: ioctl.h,v 1.6 1999/12/01 23:58:36 davem Exp $ */
2#ifndef _SPARC_IOCTL_H 1#ifndef _SPARC_IOCTL_H
3#define _SPARC_IOCTL_H 2#define _SPARC_IOCTL_H
4 3
diff --git a/include/asm-sparc/kdebug.h b/include/asm-sparc/kdebug.h
index 631f15ffef73..f69fe7d84b3c 100644
--- a/include/asm-sparc/kdebug.h
+++ b/include/asm-sparc/kdebug.h
@@ -1,4 +1,4 @@
1/* $Id: kdebug.h,v 1.11 2000/06/04 06:23:53 anton Exp $ 1/*
2 * kdebug.h: Defines and definitions for debugging the Linux kernel 2 * kdebug.h: Defines and definitions for debugging the Linux kernel
3 * under various kernel debuggers. 3 * under various kernel debuggers.
4 * 4 *
diff --git a/include/asm-sparc/machines.h b/include/asm-sparc/machines.h
index d831350f5428..d6c6bf836206 100644
--- a/include/asm-sparc/machines.h
+++ b/include/asm-sparc/machines.h
@@ -1,4 +1,4 @@
1/* $Id: machines.h,v 1.4 1995/11/25 02:31:58 davem Exp $ 1/*
2 * machines.h: Defines for taking apart the machine type value in the 2 * machines.h: Defines for taking apart the machine type value in the
3 * idprom and determining the kind of machine we are on. 3 * idprom and determining the kind of machine we are on.
4 * 4 *
diff --git a/include/asm-sparc/mbus.h b/include/asm-sparc/mbus.h
index ecacdf4075d7..bb5ae614b166 100644
--- a/include/asm-sparc/mbus.h
+++ b/include/asm-sparc/mbus.h
@@ -1,4 +1,4 @@
1/* $Id: mbus.h,v 1.9 1997/06/24 15:48:12 jj Exp $ 1/*
2 * mbus.h: Various defines for MBUS modules. 2 * mbus.h: Various defines for MBUS modules.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc/memreg.h b/include/asm-sparc/memreg.h
index 5fb95c828da6..845ad2b39183 100644
--- a/include/asm-sparc/memreg.h
+++ b/include/asm-sparc/memreg.h
@@ -1,4 +1,3 @@
1/* $Id: memreg.h,v 1.8 1996/08/29 09:48:23 davem Exp $ */
2#ifndef _SPARC_MEMREG_H 1#ifndef _SPARC_MEMREG_H
3#define _SPARC_MEMREG_H 2#define _SPARC_MEMREG_H
4/* memreg.h: Definitions of the values found in the synchronous 3/* memreg.h: Definitions of the values found in the synchronous
diff --git a/include/asm-sparc/mman.h b/include/asm-sparc/mman.h
index 3d16b40bb8ef..fdfbbf0a4736 100644
--- a/include/asm-sparc/mman.h
+++ b/include/asm-sparc/mman.h
@@ -1,4 +1,3 @@
1/* $Id: mman.h,v 1.9 2000/03/15 02:44:23 davem Exp $ */
2#ifndef __SPARC_MMAN_H__ 1#ifndef __SPARC_MMAN_H__
3#define __SPARC_MMAN_H__ 2#define __SPARC_MMAN_H__
4 3
diff --git a/include/asm-sparc/mostek.h b/include/asm-sparc/mostek.h
index 958d0513a6d4..29aad11b8f00 100644
--- a/include/asm-sparc/mostek.h
+++ b/include/asm-sparc/mostek.h
@@ -1,4 +1,4 @@
1/* $Id: mostek.h,v 1.13 2001/01/11 15:07:09 davem Exp $ 1/*
2 * mostek.h: Describes the various Mostek time of day clock registers. 2 * mostek.h: Describes the various Mostek time of day clock registers.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc/mpmbox.h b/include/asm-sparc/mpmbox.h
index 0e1bc5801d8a..f8423039b242 100644
--- a/include/asm-sparc/mpmbox.h
+++ b/include/asm-sparc/mpmbox.h
@@ -1,4 +1,4 @@
1/* $Id: mpmbox.h,v 1.4 1996/04/25 06:13:19 davem Exp $ 1/*
2 * mpmbox.h: Interface and defines for the OpenProm mailbox 2 * mpmbox.h: Interface and defines for the OpenProm mailbox
3 * facilities for MP machines under Linux. 3 * facilities for MP machines under Linux.
4 * 4 *
diff --git a/include/asm-sparc/msi.h b/include/asm-sparc/msi.h
index ff72cbd946a4..724ca5667052 100644
--- a/include/asm-sparc/msi.h
+++ b/include/asm-sparc/msi.h
@@ -1,4 +1,4 @@
1/* $Id: msi.h,v 1.3 1996/08/29 09:48:25 davem Exp $ 1/*
2 * msi.h: Defines specific to the MBus - Sbus - Interface. 2 * msi.h: Defines specific to the MBus - Sbus - Interface.
3 * 3 *
4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc/mxcc.h b/include/asm-sparc/mxcc.h
index 128fe9708135..c0517bd05bde 100644
--- a/include/asm-sparc/mxcc.h
+++ b/include/asm-sparc/mxcc.h
@@ -1,4 +1,4 @@
1/* $Id: mxcc.h,v 1.7 1997/04/20 14:11:46 ecd Exp $ 1/*
2 * mxcc.h: Definitions of the Viking MXCC registers 2 * mxcc.h: Definitions of the Viking MXCC registers
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc/namei.h b/include/asm-sparc/namei.h
index 618344d89cc4..0646102fb020 100644
--- a/include/asm-sparc/namei.h
+++ b/include/asm-sparc/namei.h
@@ -1,4 +1,4 @@
1/* $Id: namei.h,v 1.16 2000/04/13 00:55:54 davem Exp $ 1/*
2 * linux/include/asm-sparc/namei.h 2 * linux/include/asm-sparc/namei.h
3 * 3 *
4 * Routines to handle famous /usr/gnemul/s*. 4 * Routines to handle famous /usr/gnemul/s*.
diff --git a/include/asm-sparc/obio.h b/include/asm-sparc/obio.h
index 47854a2a12cf..1a7544ceb574 100644
--- a/include/asm-sparc/obio.h
+++ b/include/asm-sparc/obio.h
@@ -1,4 +1,4 @@
1/* $Id: obio.h,v 1.4 1998/03/09 14:04:55 jj Exp $ 1/*
2 * obio.h: Some useful locations in 0xFXXXXXXXX PA obio space on sun4d. 2 * obio.h: Some useful locations in 0xFXXXXXXXX PA obio space on sun4d.
3 * 3 *
4 * Copyright (C) 1997 Jakub Jelinek <jj@sunsite.mff.cuni.cz> 4 * Copyright (C) 1997 Jakub Jelinek <jj@sunsite.mff.cuni.cz>
diff --git a/include/asm-sparc/openprom.h b/include/asm-sparc/openprom.h
index 12929a20f536..ed4b6bc2b102 100644
--- a/include/asm-sparc/openprom.h
+++ b/include/asm-sparc/openprom.h
@@ -1,4 +1,3 @@
1/* $Id: openprom.h,v 1.24 2000/06/04 06:23:53 anton Exp $ */
2#ifndef __SPARC_OPENPROM_H 1#ifndef __SPARC_OPENPROM_H
3#define __SPARC_OPENPROM_H 2#define __SPARC_OPENPROM_H
4 3
diff --git a/include/asm-sparc/oplib.h b/include/asm-sparc/oplib.h
index 7becc846544a..61c3ca6a8ac3 100644
--- a/include/asm-sparc/oplib.h
+++ b/include/asm-sparc/oplib.h
@@ -1,4 +1,4 @@
1/* $Id: oplib.h,v 1.23 2001/12/21 00:54:31 davem Exp $ 1/*
2 * oplib.h: Describes the interface and available routines in the 2 * oplib.h: Describes the interface and available routines in the
3 * Linux Prom library. 3 * Linux Prom library.
4 * 4 *
diff --git a/include/asm-sparc/page.h b/include/asm-sparc/page.h
index 1625a8c3e0d2..6aa9e4c910cf 100644
--- a/include/asm-sparc/page.h
+++ b/include/asm-sparc/page.h
@@ -1,4 +1,4 @@
1/* $Id: page.h,v 1.55 2000/10/30 21:01:41 davem Exp $ 1/*
2 * page.h: Various defines and such for MMU operations on the Sparc for 2 * page.h: Various defines and such for MMU operations on the Sparc for
3 * the Linux kernel. 3 * the Linux kernel.
4 * 4 *
diff --git a/include/asm-sparc/param.h b/include/asm-sparc/param.h
index 86ba59af9d2c..9836d9a3cb9a 100644
--- a/include/asm-sparc/param.h
+++ b/include/asm-sparc/param.h
@@ -1,4 +1,3 @@
1/* $Id: param.h,v 1.4 2000/10/30 21:01:41 davem Exp $ */
2#ifndef _ASMSPARC_PARAM_H 1#ifndef _ASMSPARC_PARAM_H
3#define _ASMSPARC_PARAM_H 2#define _ASMSPARC_PARAM_H
4 3
diff --git a/include/asm-sparc/pbm.h b/include/asm-sparc/pbm.h
index fedd9c6e875c..458a4916d14d 100644
--- a/include/asm-sparc/pbm.h
+++ b/include/asm-sparc/pbm.h
@@ -1,4 +1,4 @@
1/* $Id: pbm.h,v 1.3 1999/12/20 17:06:35 zaitcev Exp $ 1/*
2 * 2 *
3 * pbm.h: PCI bus module pseudo driver software state 3 * pbm.h: PCI bus module pseudo driver software state
4 * Adopted from sparc64 by V. Roganov and G. Raiko 4 * Adopted from sparc64 by V. Roganov and G. Raiko
diff --git a/include/asm-sparc/pcic.h b/include/asm-sparc/pcic.h
index dedea14d87c8..f20ef562b265 100644
--- a/include/asm-sparc/pcic.h
+++ b/include/asm-sparc/pcic.h
@@ -1,4 +1,4 @@
1/* $Id: pcic.h,v 1.4 1999/11/17 07:34:20 zaitcev Exp $ 1/*
2 * pcic.h: JavaEngine 1 specific PCI definitions. 2 * pcic.h: JavaEngine 1 specific PCI definitions.
3 * 3 *
4 * Copyright (C) 1998 V. Roganov and G. Raiko 4 * Copyright (C) 1998 V. Roganov and G. Raiko
diff --git a/include/asm-sparc/pgalloc.h b/include/asm-sparc/pgalloc.h
index 6292cd00e5af..681582d26969 100644
--- a/include/asm-sparc/pgalloc.h
+++ b/include/asm-sparc/pgalloc.h
@@ -1,4 +1,3 @@
1/* $Id: pgalloc.h,v 1.16 2001/12/21 04:56:17 davem Exp $ */
2#ifndef _SPARC_PGALLOC_H 1#ifndef _SPARC_PGALLOC_H
3#define _SPARC_PGALLOC_H 2#define _SPARC_PGALLOC_H
4 3
diff --git a/include/asm-sparc/pgtable.h b/include/asm-sparc/pgtable.h
index d84af6d95f5c..60512296b2ca 100644
--- a/include/asm-sparc/pgtable.h
+++ b/include/asm-sparc/pgtable.h
@@ -1,4 +1,3 @@
1/* $Id: pgtable.h,v 1.110 2001/12/21 04:56:17 davem Exp $ */
2#ifndef _SPARC_PGTABLE_H 1#ifndef _SPARC_PGTABLE_H
3#define _SPARC_PGTABLE_H 2#define _SPARC_PGTABLE_H
4 3
diff --git a/include/asm-sparc/pgtsrmmu.h b/include/asm-sparc/pgtsrmmu.h
index edeb9811e728..808555fc1d58 100644
--- a/include/asm-sparc/pgtsrmmu.h
+++ b/include/asm-sparc/pgtsrmmu.h
@@ -1,4 +1,4 @@
1/* $Id: pgtsrmmu.h,v 1.31 2000/07/16 21:48:52 anton Exp $ 1/*
2 * pgtsrmmu.h: SRMMU page table defines and code. 2 * pgtsrmmu.h: SRMMU page table defines and code.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc/pgtsun4.h b/include/asm-sparc/pgtsun4.h
index 60bda107f206..5a0d661fb82e 100644
--- a/include/asm-sparc/pgtsun4.h
+++ b/include/asm-sparc/pgtsun4.h
@@ -1,4 +1,4 @@
1/* $Id: pgtsun4.h,v 1.5 2000/06/05 06:08:46 anton Exp $ 1/*
2 * pgtsun4.h: Sun4 specific pgtable.h defines and code. 2 * pgtsun4.h: Sun4 specific pgtable.h defines and code.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc/pgtsun4c.h b/include/asm-sparc/pgtsun4c.h
index f53b6dbc5fe3..aeb25e912179 100644
--- a/include/asm-sparc/pgtsun4c.h
+++ b/include/asm-sparc/pgtsun4c.h
@@ -1,4 +1,4 @@
1/* $Id: pgtsun4c.h,v 1.37 2000/06/05 06:08:46 anton Exp $ 1/*
2 * pgtsun4c.h: Sun4c specific pgtable.h defines and code. 2 * pgtsun4c.h: Sun4c specific pgtable.h defines and code.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc/psr.h b/include/asm-sparc/psr.h
index 213970477a24..b8c0e5f0a66b 100644
--- a/include/asm-sparc/psr.h
+++ b/include/asm-sparc/psr.h
@@ -1,4 +1,4 @@
1/* $Id: psr.h,v 1.15 1997/10/04 08:54:22 ecd Exp $ 1/*
2 * psr.h: This file holds the macros for masking off various parts of 2 * psr.h: This file holds the macros for masking off various parts of
3 * the processor status register on the Sparc. This is valid 3 * the processor status register on the Sparc. This is valid
4 * for Version 8. On the V9 this is renamed to the PSTATE 4 * for Version 8. On the V9 this is renamed to the PSTATE
diff --git a/include/asm-sparc/ptrace.h b/include/asm-sparc/ptrace.h
index 0afb867d6c1b..11f3bc2bb3f5 100644
--- a/include/asm-sparc/ptrace.h
+++ b/include/asm-sparc/ptrace.h
@@ -1,4 +1,3 @@
1/* $Id: ptrace.h,v 1.25 1997/03/04 16:27:25 jj Exp $ */
2#ifndef _SPARC_PTRACE_H 1#ifndef _SPARC_PTRACE_H
3#define _SPARC_PTRACE_H 2#define _SPARC_PTRACE_H
4 3
diff --git a/include/asm-sparc/resource.h b/include/asm-sparc/resource.h
index 0514c304e130..985948a41299 100644
--- a/include/asm-sparc/resource.h
+++ b/include/asm-sparc/resource.h
@@ -1,4 +1,4 @@
1/* $Id: resource.h,v 1.12 2000/09/23 02:09:21 davem Exp $ 1/*
2 * resource.h: Resource definitions. 2 * resource.h: Resource definitions.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc/ross.h b/include/asm-sparc/ross.h
index f2c14b5080ed..ecb6e81786a6 100644
--- a/include/asm-sparc/ross.h
+++ b/include/asm-sparc/ross.h
@@ -1,4 +1,4 @@
1/* $Id: ross.h,v 1.13 1998/01/07 06:49:11 baccala Exp $ 1/*
2 * ross.h: Ross module specific definitions and defines. 2 * ross.h: Ross module specific definitions and defines.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc/rtc.h b/include/asm-sparc/rtc.h
index f4f261dde699..f9ecb1fe2ecd 100644
--- a/include/asm-sparc/rtc.h
+++ b/include/asm-sparc/rtc.h
@@ -1,5 +1,4 @@
1/* $Id: rtc.h,v 1.2 1996/08/21 23:17:39 ecd Exp $ 1/*
2 *
3 * rtc.h: Definitions for access to the Mostek real time clock 2 * rtc.h: Definitions for access to the Mostek real time clock
4 * 3 *
5 * Copyright (C) 1996 Thomas K. Dyas (tdyas@eden.rutgers.edu) 4 * Copyright (C) 1996 Thomas K. Dyas (tdyas@eden.rutgers.edu)
diff --git a/include/asm-sparc/sbi.h b/include/asm-sparc/sbi.h
index 86a603ac7b20..5eb7f1965d33 100644
--- a/include/asm-sparc/sbi.h
+++ b/include/asm-sparc/sbi.h
@@ -1,4 +1,4 @@
1/* $Id: sbi.h,v 1.2 1998/03/09 14:04:48 jj Exp $ 1/*
2 * sbi.h: SBI (Sbus Interface on sun4d) definitions 2 * sbi.h: SBI (Sbus Interface on sun4d) definitions
3 * 3 *
4 * Copyright (C) 1997 Jakub Jelinek <jj@sunsite.mff.cuni.cz> 4 * Copyright (C) 1997 Jakub Jelinek <jj@sunsite.mff.cuni.cz>
diff --git a/include/asm-sparc/sbus.h b/include/asm-sparc/sbus.h
index 27d076c46964..f1d2fe1c9a30 100644
--- a/include/asm-sparc/sbus.h
+++ b/include/asm-sparc/sbus.h
@@ -1,4 +1,4 @@
1/* $Id: sbus.h,v 1.22 2000/02/18 13:50:50 davem Exp $ 1/*
2 * sbus.h: Defines for the Sun SBus. 2 * sbus.h: Defines for the Sun SBus.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc/scatterlist.h b/include/asm-sparc/scatterlist.h
index e08d3d775b08..c82609ca1d0f 100644
--- a/include/asm-sparc/scatterlist.h
+++ b/include/asm-sparc/scatterlist.h
@@ -1,4 +1,3 @@
1/* $Id: scatterlist.h,v 1.8 2001/12/17 07:05:15 davem Exp $ */
2#ifndef _SPARC_SCATTERLIST_H 1#ifndef _SPARC_SCATTERLIST_H
3#define _SPARC_SCATTERLIST_H 2#define _SPARC_SCATTERLIST_H
4 3
diff --git a/include/asm-sparc/shmparam.h b/include/asm-sparc/shmparam.h
index bb93a6f74a38..59a1243c12f3 100644
--- a/include/asm-sparc/shmparam.h
+++ b/include/asm-sparc/shmparam.h
@@ -1,4 +1,3 @@
1/* $Id: shmparam.h,v 1.6 1999/12/09 10:32:41 davem Exp $ */
2#ifndef _ASMSPARC_SHMPARAM_H 1#ifndef _ASMSPARC_SHMPARAM_H
3#define _ASMSPARC_SHMPARAM_H 2#define _ASMSPARC_SHMPARAM_H
4 3
diff --git a/include/asm-sparc/sigcontext.h b/include/asm-sparc/sigcontext.h
index 7fa2c7d01ab4..c5fb60dcbd75 100644
--- a/include/asm-sparc/sigcontext.h
+++ b/include/asm-sparc/sigcontext.h
@@ -1,4 +1,3 @@
1/* $Id: sigcontext.h,v 1.14 1999/09/06 08:22:05 jj Exp $ */
2#ifndef __SPARC_SIGCONTEXT_H 1#ifndef __SPARC_SIGCONTEXT_H
3#define __SPARC_SIGCONTEXT_H 2#define __SPARC_SIGCONTEXT_H
4 3
diff --git a/include/asm-sparc/siginfo.h b/include/asm-sparc/siginfo.h
index 2c3ea8b22448..3c71af135c52 100644
--- a/include/asm-sparc/siginfo.h
+++ b/include/asm-sparc/siginfo.h
@@ -1,7 +1,3 @@
1/* $Id: siginfo.h,v 1.9 2002/02/08 03:57:18 davem Exp $
2 * siginfo.c:
3 */
4
5#ifndef _SPARC_SIGINFO_H 1#ifndef _SPARC_SIGINFO_H
6#define _SPARC_SIGINFO_H 2#define _SPARC_SIGINFO_H
7 3
diff --git a/include/asm-sparc/signal.h b/include/asm-sparc/signal.h
index 94071c75701f..683657d6e685 100644
--- a/include/asm-sparc/signal.h
+++ b/include/asm-sparc/signal.h
@@ -1,4 +1,3 @@
1/* $Id: signal.h,v 1.35 1999/09/06 08:22:04 jj Exp $ */
2#ifndef _ASMSPARC_SIGNAL_H 1#ifndef _ASMSPARC_SIGNAL_H
3#define _ASMSPARC_SIGNAL_H 2#define _ASMSPARC_SIGNAL_H
4 3
diff --git a/include/asm-sparc/smpprim.h b/include/asm-sparc/smpprim.h
index e7b6d346ae10..eb849d862c64 100644
--- a/include/asm-sparc/smpprim.h
+++ b/include/asm-sparc/smpprim.h
@@ -1,4 +1,4 @@
1/* $Id: smpprim.h,v 1.5 1996/08/29 09:48:49 davem Exp $ 1/*
2 * smpprim.h: SMP locking primitives on the Sparc 2 * smpprim.h: SMP locking primitives on the Sparc
3 * 3 *
4 * God knows we won't be actually using this code for some time 4 * God knows we won't be actually using this code for some time
diff --git a/include/asm-sparc/socket.h b/include/asm-sparc/socket.h
index a00e15df227c..bf50d0c2d583 100644
--- a/include/asm-sparc/socket.h
+++ b/include/asm-sparc/socket.h
@@ -1,4 +1,3 @@
1/* $Id: socket.h,v 1.17 2001/06/13 16:25:03 davem Exp $ */
2#ifndef _ASM_SOCKET_H 1#ifndef _ASM_SOCKET_H
3#define _ASM_SOCKET_H 2#define _ASM_SOCKET_H
4 3
diff --git a/include/asm-sparc/stat.h b/include/asm-sparc/stat.h
index a5b4272f2894..2299e1d5d94c 100644
--- a/include/asm-sparc/stat.h
+++ b/include/asm-sparc/stat.h
@@ -1,4 +1,3 @@
1/* $Id: stat.h,v 1.12 2000/08/04 05:35:55 davem Exp $ */
2#ifndef _SPARC_STAT_H 1#ifndef _SPARC_STAT_H
3#define _SPARC_STAT_H 2#define _SPARC_STAT_H
4 3
diff --git a/include/asm-sparc/statfs.h b/include/asm-sparc/statfs.h
index d623f144247d..304520fa8863 100644
--- a/include/asm-sparc/statfs.h
+++ b/include/asm-sparc/statfs.h
@@ -1,4 +1,3 @@
1/* $Id: statfs.h,v 1.4 1996/06/07 00:41:05 ecd Exp $ */
2#ifndef _SPARC_STATFS_H 1#ifndef _SPARC_STATFS_H
3#define _SPARC_STATFS_H 2#define _SPARC_STATFS_H
4 3
diff --git a/include/asm-sparc/string.h b/include/asm-sparc/string.h
index cb1e923356c6..8d7c0dd4f299 100644
--- a/include/asm-sparc/string.h
+++ b/include/asm-sparc/string.h
@@ -1,4 +1,4 @@
1/* $Id: string.h,v 1.36 2001/12/21 00:54:31 davem Exp $ 1/*
2 * string.h: External definitions for optimized assembly string 2 * string.h: External definitions for optimized assembly string
3 * routines for the Linux Kernel. 3 * routines for the Linux Kernel.
4 * 4 *
diff --git a/include/asm-sparc/sun4paddr.h b/include/asm-sparc/sun4paddr.h
index d863bfd5f09a..d52985f19f42 100644
--- a/include/asm-sparc/sun4paddr.h
+++ b/include/asm-sparc/sun4paddr.h
@@ -1,4 +1,4 @@
1/* $Id: sun4paddr.h,v 1.3 1998/07/28 16:53:27 jj Exp $ 1/*
2 * sun4paddr.h: Various physical addresses on sun4 machines 2 * sun4paddr.h: Various physical addresses on sun4 machines
3 * 3 *
4 * Copyright (C) 1997 Anton Blanchard (anton@progsoc.uts.edu.au) 4 * Copyright (C) 1997 Anton Blanchard (anton@progsoc.uts.edu.au)
diff --git a/include/asm-sparc/sunbpp.h b/include/asm-sparc/sunbpp.h
index 568db79b730d..92ee1a8ff3a2 100644
--- a/include/asm-sparc/sunbpp.h
+++ b/include/asm-sparc/sunbpp.h
@@ -1,4 +1,4 @@
1/* $Id: sunbpp.h,v 1.1 1999/08/08 14:09:49 shadow Exp $ 1/*
2 * include/asm-sparc/sunbpp.h 2 * include/asm-sparc/sunbpp.h
3 */ 3 */
4 4
diff --git a/include/asm-sparc/sysen.h b/include/asm-sparc/sysen.h
index 692fa6f2296a..6af34abde6e7 100644
--- a/include/asm-sparc/sysen.h
+++ b/include/asm-sparc/sysen.h
@@ -1,4 +1,4 @@
1/* $Id: sysen.h,v 1.3 1995/11/25 02:32:58 davem Exp $ 1/*
2 * sysen.h: Bit fields within the "System Enable" register accessed via 2 * sysen.h: Bit fields within the "System Enable" register accessed via
3 * the ASI_CONTROL address space at address AC_SYSENABLE. 3 * the ASI_CONTROL address space at address AC_SYSENABLE.
4 * 4 *
diff --git a/include/asm-sparc/termios.h b/include/asm-sparc/termios.h
index 733d40504e1e..f7b4409c35ff 100644
--- a/include/asm-sparc/termios.h
+++ b/include/asm-sparc/termios.h
@@ -1,4 +1,3 @@
1/* $Id: termios.h,v 1.32 2001/06/01 08:12:11 davem Exp $ */
2#ifndef _SPARC_TERMIOS_H 1#ifndef _SPARC_TERMIOS_H
3#define _SPARC_TERMIOS_H 2#define _SPARC_TERMIOS_H
4 3
diff --git a/include/asm-sparc/timer.h b/include/asm-sparc/timer.h
index cb1fa1d1f184..d909565f9410 100644
--- a/include/asm-sparc/timer.h
+++ b/include/asm-sparc/timer.h
@@ -1,4 +1,4 @@
1/* $Id: timer.h,v 1.21 1999/04/20 13:22:51 anton Exp $ 1/*
2 * timer.h: Definitions for the timer chips on the Sparc. 2 * timer.h: Definitions for the timer chips on the Sparc.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc/traps.h b/include/asm-sparc/traps.h
index f62c7f878ee1..bebdbf8f43a8 100644
--- a/include/asm-sparc/traps.h
+++ b/include/asm-sparc/traps.h
@@ -1,4 +1,4 @@
1/* $Id: traps.h,v 1.9 1998/03/09 14:04:53 jj Exp $ 1/*
2 * traps.h: Format of entries for the Sparc trap table. 2 * traps.h: Format of entries for the Sparc trap table.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc/tsunami.h b/include/asm-sparc/tsunami.h
index 887add5c466b..5bbd1d523baa 100644
--- a/include/asm-sparc/tsunami.h
+++ b/include/asm-sparc/tsunami.h
@@ -1,4 +1,4 @@
1/* $Id: tsunami.h,v 1.5 1996/08/29 09:49:03 davem Exp $ 1/*
2 * tsunami.h: Module specific definitions for Tsunami V8 Sparcs 2 * tsunami.h: Module specific definitions for Tsunami V8 Sparcs
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc/turbosparc.h b/include/asm-sparc/turbosparc.h
index 31d2350a5818..17c73282db0a 100644
--- a/include/asm-sparc/turbosparc.h
+++ b/include/asm-sparc/turbosparc.h
@@ -1,4 +1,4 @@
1/* $Id: turbosparc.h,v 1.4 1998/08/16 16:02:42 ecd Exp $ 1/*
2 * turbosparc.h: Defines specific to the TurboSparc module. 2 * turbosparc.h: Defines specific to the TurboSparc module.
3 * This is SRMMU stuff. 3 * This is SRMMU stuff.
4 * 4 *
diff --git a/include/asm-sparc/types.h b/include/asm-sparc/types.h
index 1b08ef860a66..07734f942405 100644
--- a/include/asm-sparc/types.h
+++ b/include/asm-sparc/types.h
@@ -1,4 +1,3 @@
1/* $Id: types.h,v 1.13 2001/12/21 01:22:59 davem Exp $ */
2#ifndef _SPARC_TYPES_H 1#ifndef _SPARC_TYPES_H
3#define _SPARC_TYPES_H 2#define _SPARC_TYPES_H
4 3
diff --git a/include/asm-sparc/uaccess.h b/include/asm-sparc/uaccess.h
index 366b11696ee3..47d5619d43fa 100644
--- a/include/asm-sparc/uaccess.h
+++ b/include/asm-sparc/uaccess.h
@@ -1,4 +1,4 @@
1/* $Id: uaccess.h,v 1.24 2001/10/30 04:32:24 davem Exp $ 1/*
2 * uaccess.h: User space memore access functions. 2 * uaccess.h: User space memore access functions.
3 * 3 *
4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc/vac-ops.h b/include/asm-sparc/vac-ops.h
index ab6f53b913ea..d10527611f11 100644
--- a/include/asm-sparc/vac-ops.h
+++ b/include/asm-sparc/vac-ops.h
@@ -1,4 +1,3 @@
1/* $Id: vac-ops.h,v 1.13 1998/01/30 10:59:59 jj Exp $ */
2#ifndef _SPARC_VAC_OPS_H 1#ifndef _SPARC_VAC_OPS_H
3#define _SPARC_VAC_OPS_H 2#define _SPARC_VAC_OPS_H
4 3
diff --git a/include/asm-sparc/vaddrs.h b/include/asm-sparc/vaddrs.h
index 91097392c8cc..f6ca4779056c 100644
--- a/include/asm-sparc/vaddrs.h
+++ b/include/asm-sparc/vaddrs.h
@@ -1,4 +1,3 @@
1/* $Id: vaddrs.h,v 1.27 2001/07/04 00:18:18 davem Exp $ */
2#ifndef _SPARC_VADDRS_H 1#ifndef _SPARC_VADDRS_H
3#define _SPARC_VADDRS_H 2#define _SPARC_VADDRS_H
4 3
diff --git a/include/asm-sparc/viking.h b/include/asm-sparc/viking.h
index 7541da71b9d6..989930aeb093 100644
--- a/include/asm-sparc/viking.h
+++ b/include/asm-sparc/viking.h
@@ -1,4 +1,4 @@
1/* $Id: viking.h,v 1.19 1997/04/20 14:11:48 ecd Exp $ 1/*
2 * viking.h: Defines specific to the GNU/Viking MBUS module. 2 * viking.h: Defines specific to the GNU/Viking MBUS module.
3 * This is SRMMU stuff. 3 * This is SRMMU stuff.
4 * 4 *
diff --git a/include/asm-sparc/winmacro.h b/include/asm-sparc/winmacro.h
index 096f3d3d90c3..5b0a06dc3bcb 100644
--- a/include/asm-sparc/winmacro.h
+++ b/include/asm-sparc/winmacro.h
@@ -1,4 +1,4 @@
1/* $Id: winmacro.h,v 1.22 2000/05/09 17:40:15 davem Exp $ 1/*
2 * winmacro.h: Window loading-unloading macros. 2 * winmacro.h: Window loading-unloading macros.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc64/apb.h b/include/asm-sparc64/apb.h
index 80f0df289a66..8f3b57db810f 100644
--- a/include/asm-sparc64/apb.h
+++ b/include/asm-sparc64/apb.h
@@ -1,4 +1,4 @@
1/* $Id: apb.h,v 1.2 1998/04/01 20:41:49 ecd Exp $ 1/*
2 * apb.h: Advanced PCI Bridge Configuration Registers and Bits 2 * apb.h: Advanced PCI Bridge Configuration Registers and Bits
3 * 3 *
4 * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be) 4 * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be)
diff --git a/include/asm-sparc64/asi.h b/include/asm-sparc64/asi.h
index 662a21107ae6..bc57c405e7d3 100644
--- a/include/asm-sparc64/asi.h
+++ b/include/asm-sparc64/asi.h
@@ -1,4 +1,3 @@
1/* $Id: asi.h,v 1.5 2001/03/29 11:47:47 davem Exp $ */
2#ifndef _SPARC64_ASI_H 1#ifndef _SPARC64_ASI_H
3#define _SPARC64_ASI_H 2#define _SPARC64_ASI_H
4 3
diff --git a/include/asm-sparc64/auxio.h b/include/asm-sparc64/auxio.h
index 81a590a50a1f..c4100494c7a5 100644
--- a/include/asm-sparc64/auxio.h
+++ b/include/asm-sparc64/auxio.h
@@ -1,4 +1,4 @@
1/* $Id: auxio.h,v 1.3 2001/06/05 08:16:34 davem Exp $ 1/*
2 * auxio.h: Definitions and code for the Auxiliary I/O registers. 2 * auxio.h: Definitions and code for the Auxiliary I/O registers.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc64/bbc.h b/include/asm-sparc64/bbc.h
index 368fce4eedba..423a85800aae 100644
--- a/include/asm-sparc64/bbc.h
+++ b/include/asm-sparc64/bbc.h
@@ -1,4 +1,4 @@
1/* $Id: bbc.h,v 1.2 2001/03/26 23:47:18 davem Exp $ 1/*
2 * bbc.h: Defines for BootBus Controller found on UltraSPARC-III 2 * bbc.h: Defines for BootBus Controller found on UltraSPARC-III
3 * systems. 3 * systems.
4 * 4 *
diff --git a/include/asm-sparc64/bitops.h b/include/asm-sparc64/bitops.h
index 11f9d8146cdf..bb87b8080220 100644
--- a/include/asm-sparc64/bitops.h
+++ b/include/asm-sparc64/bitops.h
@@ -1,4 +1,4 @@
1/* $Id: bitops.h,v 1.39 2002/01/30 01:40:00 davem Exp $ 1/*
2 * bitops.h: Bit string operations on the V9. 2 * bitops.h: Bit string operations on the V9.
3 * 3 *
4 * Copyright 1996, 1997 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright 1996, 1997 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc64/chafsr.h b/include/asm-sparc64/chafsr.h
index fd1688335ace..85c69b38220b 100644
--- a/include/asm-sparc64/chafsr.h
+++ b/include/asm-sparc64/chafsr.h
@@ -1,4 +1,3 @@
1/* $Id: chafsr.h,v 1.1 2001/03/28 10:56:34 davem Exp $ */
2#ifndef _SPARC64_CHAFSR_H 1#ifndef _SPARC64_CHAFSR_H
3#define _SPARC64_CHAFSR_H 2#define _SPARC64_CHAFSR_H
4 3
diff --git a/include/asm-sparc64/checksum.h b/include/asm-sparc64/checksum.h
index 70a006da7634..b290564c8ce0 100644
--- a/include/asm-sparc64/checksum.h
+++ b/include/asm-sparc64/checksum.h
@@ -1,4 +1,3 @@
1/* $Id: checksum.h,v 1.19 2002/02/09 19:49:31 davem Exp $ */
2#ifndef __SPARC64_CHECKSUM_H 1#ifndef __SPARC64_CHECKSUM_H
3#define __SPARC64_CHECKSUM_H 2#define __SPARC64_CHECKSUM_H
4 3
diff --git a/include/asm-sparc64/chmctrl.h b/include/asm-sparc64/chmctrl.h
index 53047f9f6423..859b4a4b0d30 100644
--- a/include/asm-sparc64/chmctrl.h
+++ b/include/asm-sparc64/chmctrl.h
@@ -1,4 +1,3 @@
1/* $Id: chmctrl.h,v 1.1 2001/03/29 11:43:28 davem Exp $ */
2#ifndef _SPARC64_CHMCTRL_H 1#ifndef _SPARC64_CHMCTRL_H
3#define _SPARC64_CHMCTRL_H 2#define _SPARC64_CHMCTRL_H
4 3
diff --git a/include/asm-sparc64/dcr.h b/include/asm-sparc64/dcr.h
index e9a3f305815d..620c9ba642e9 100644
--- a/include/asm-sparc64/dcr.h
+++ b/include/asm-sparc64/dcr.h
@@ -1,4 +1,3 @@
1/* $Id: dcr.h,v 1.4 2001/03/09 17:56:37 davem Exp $ */
2#ifndef _SPARC64_DCR_H 1#ifndef _SPARC64_DCR_H
3#define _SPARC64_DCR_H 2#define _SPARC64_DCR_H
4 3
diff --git a/include/asm-sparc64/display7seg.h b/include/asm-sparc64/display7seg.h
index 955a3502218e..c066a8964eab 100644
--- a/include/asm-sparc64/display7seg.h
+++ b/include/asm-sparc64/display7seg.h
@@ -1,4 +1,4 @@
1/* $Id: display7seg.h,v 1.2 2000/08/02 06:22:35 davem Exp $ 1/*
2 * 2 *
3 * display7seg - Driver interface for the 7-segment display 3 * display7seg - Driver interface for the 7-segment display
4 * present on Sun Microsystems CP1400 and CP1500 4 * present on Sun Microsystems CP1400 and CP1500
diff --git a/include/asm-sparc64/dma.h b/include/asm-sparc64/dma.h
index a9fd06183972..9d4c024bd3b3 100644
--- a/include/asm-sparc64/dma.h
+++ b/include/asm-sparc64/dma.h
@@ -1,4 +1,4 @@
1/* $Id: dma.h,v 1.21 2001/12/13 04:16:52 davem Exp $ 1/*
2 * include/asm-sparc64/dma.h 2 * include/asm-sparc64/dma.h
3 * 3 *
4 * Copyright 1996 (C) David S. Miller (davem@caip.rutgers.edu) 4 * Copyright 1996 (C) David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc64/ebus.h b/include/asm-sparc64/ebus.h
index 9c1c6db2a790..fcc62b97ced5 100644
--- a/include/asm-sparc64/ebus.h
+++ b/include/asm-sparc64/ebus.h
@@ -1,4 +1,4 @@
1/* $Id: ebus.h,v 1.10 2001/03/14 05:00:55 davem Exp $ 1/*
2 * ebus.h: PCI to Ebus pseudo driver software state. 2 * ebus.h: PCI to Ebus pseudo driver software state.
3 * 3 *
4 * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) 4 * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be)
diff --git a/include/asm-sparc64/elf.h b/include/asm-sparc64/elf.h
index 11c8e68d712a..0818a1308f4e 100644
--- a/include/asm-sparc64/elf.h
+++ b/include/asm-sparc64/elf.h
@@ -1,4 +1,3 @@
1/* $Id: elf.h,v 1.32 2002/02/09 19:49:31 davem Exp $ */
2#ifndef __ASM_SPARC64_ELF_H 1#ifndef __ASM_SPARC64_ELF_H
3#define __ASM_SPARC64_ELF_H 2#define __ASM_SPARC64_ELF_H
4 3
diff --git a/include/asm-sparc64/envctrl.h b/include/asm-sparc64/envctrl.h
index 53a6653815eb..a5668a082b14 100644
--- a/include/asm-sparc64/envctrl.h
+++ b/include/asm-sparc64/envctrl.h
@@ -1,4 +1,4 @@
1/* $Id: envctrl.h,v 1.3 2000/11/03 00:37:40 davem Exp $ 1/*
2 * 2 *
3 * envctrl.h: Definitions for access to the i2c environment 3 * envctrl.h: Definitions for access to the i2c environment
4 * monitoring on Ultrasparc systems. 4 * monitoring on Ultrasparc systems.
diff --git a/include/asm-sparc64/estate.h b/include/asm-sparc64/estate.h
index a719c3d2f6b1..520c08560d1b 100644
--- a/include/asm-sparc64/estate.h
+++ b/include/asm-sparc64/estate.h
@@ -1,4 +1,3 @@
1/* $Id: estate.h,v 1.1 2001/03/28 10:56:34 davem Exp $ */
2#ifndef _SPARC64_ESTATE_H 1#ifndef _SPARC64_ESTATE_H
3#define _SPARC64_ESTATE_H 2#define _SPARC64_ESTATE_H
4 3
diff --git a/include/asm-sparc64/fcntl.h b/include/asm-sparc64/fcntl.h
index 111f6b3b8925..8a09ca7aa2f2 100644
--- a/include/asm-sparc64/fcntl.h
+++ b/include/asm-sparc64/fcntl.h
@@ -1,4 +1,3 @@
1/* $Id: fcntl.h,v 1.12 2001/09/20 00:35:34 davem Exp $ */
2#ifndef _SPARC64_FCNTL_H 1#ifndef _SPARC64_FCNTL_H
3#define _SPARC64_FCNTL_H 2#define _SPARC64_FCNTL_H
4 3
diff --git a/include/asm-sparc64/fhc.h b/include/asm-sparc64/fhc.h
index 9e7f1b0d78b9..ddffcdfbc984 100644
--- a/include/asm-sparc64/fhc.h
+++ b/include/asm-sparc64/fhc.h
@@ -1,4 +1,4 @@
1/* $Id: fhc.h,v 1.5 1999/09/21 14:39:29 davem Exp $ 1/*
2 * fhc.h: Structures for central/fhc pseudo driver on Sunfire/Starfire/Wildfire. 2 * fhc.h: Structures for central/fhc pseudo driver on Sunfire/Starfire/Wildfire.
3 * 3 *
4 * Copyright (C) 1997, 1999 David S. Miller (davem@redhat.com) 4 * Copyright (C) 1997, 1999 David S. Miller (davem@redhat.com)
diff --git a/include/asm-sparc64/head.h b/include/asm-sparc64/head.h
index 67960a751f4d..10e9dabc4c41 100644
--- a/include/asm-sparc64/head.h
+++ b/include/asm-sparc64/head.h
@@ -1,4 +1,3 @@
1/* $Id: head.h,v 1.30 1997/08/08 08:34:33 jj Exp $ */
2#ifndef _SPARC64_HEAD_H 1#ifndef _SPARC64_HEAD_H
3#define _SPARC64_HEAD_H 2#define _SPARC64_HEAD_H
4 3
diff --git a/include/asm-sparc64/ide.h b/include/asm-sparc64/ide.h
index c5fdabe0b42d..1282676da1cd 100644
--- a/include/asm-sparc64/ide.h
+++ b/include/asm-sparc64/ide.h
@@ -1,4 +1,4 @@
1/* $Id: ide.h,v 1.21 2001/09/25 20:21:48 kanoj Exp $ 1/*
2 * ide.h: Ultra/PCI specific IDE glue. 2 * ide.h: Ultra/PCI specific IDE glue.
3 * 3 *
4 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc64/idprom.h b/include/asm-sparc64/idprom.h
index 77fbf987385f..a363fa0a112a 100644
--- a/include/asm-sparc64/idprom.h
+++ b/include/asm-sparc64/idprom.h
@@ -1,4 +1,4 @@
1/* $Id: idprom.h,v 1.2 1997/04/04 00:50:16 davem Exp $ 1/*
2 * idprom.h: Macros and defines for idprom routines 2 * idprom.h: Macros and defines for idprom routines
3 * 3 *
4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc64/io.h b/include/asm-sparc64/io.h
index c299b853b5ba..3158960f3eb5 100644
--- a/include/asm-sparc64/io.h
+++ b/include/asm-sparc64/io.h
@@ -24,7 +24,8 @@ static inline u8 _inb(unsigned long addr)
24 24
25 __asm__ __volatile__("lduba\t[%1] %2, %0\t/* pci_inb */" 25 __asm__ __volatile__("lduba\t[%1] %2, %0\t/* pci_inb */"
26 : "=r" (ret) 26 : "=r" (ret)
27 : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); 27 : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)
28 : "memory");
28 29
29 return ret; 30 return ret;
30} 31}
@@ -35,7 +36,8 @@ static inline u16 _inw(unsigned long addr)
35 36
36 __asm__ __volatile__("lduha\t[%1] %2, %0\t/* pci_inw */" 37 __asm__ __volatile__("lduha\t[%1] %2, %0\t/* pci_inw */"
37 : "=r" (ret) 38 : "=r" (ret)
38 : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); 39 : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)
40 : "memory");
39 41
40 return ret; 42 return ret;
41} 43}
@@ -46,7 +48,8 @@ static inline u32 _inl(unsigned long addr)
46 48
47 __asm__ __volatile__("lduwa\t[%1] %2, %0\t/* pci_inl */" 49 __asm__ __volatile__("lduwa\t[%1] %2, %0\t/* pci_inl */"
48 : "=r" (ret) 50 : "=r" (ret)
49 : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); 51 : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)
52 : "memory");
50 53
51 return ret; 54 return ret;
52} 55}
@@ -55,21 +58,24 @@ static inline void _outb(u8 b, unsigned long addr)
55{ 58{
56 __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_outb */" 59 __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_outb */"
57 : /* no outputs */ 60 : /* no outputs */
58 : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); 61 : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)
62 : "memory");
59} 63}
60 64
61static inline void _outw(u16 w, unsigned long addr) 65static inline void _outw(u16 w, unsigned long addr)
62{ 66{
63 __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_outw */" 67 __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_outw */"
64 : /* no outputs */ 68 : /* no outputs */
65 : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); 69 : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)
70 : "memory");
66} 71}
67 72
68static inline void _outl(u32 l, unsigned long addr) 73static inline void _outl(u32 l, unsigned long addr)
69{ 74{
70 __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_outl */" 75 __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_outl */"
71 : /* no outputs */ 76 : /* no outputs */
72 : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); 77 : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)
78 : "memory");
73} 79}
74 80
75#define inb(__addr) (_inb((unsigned long)(__addr))) 81#define inb(__addr) (_inb((unsigned long)(__addr)))
@@ -128,7 +134,8 @@ static inline u8 _readb(const volatile void __iomem *addr)
128 134
129 __asm__ __volatile__("lduba\t[%1] %2, %0\t/* pci_readb */" 135 __asm__ __volatile__("lduba\t[%1] %2, %0\t/* pci_readb */"
130 : "=r" (ret) 136 : "=r" (ret)
131 : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); 137 : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)
138 : "memory");
132 return ret; 139 return ret;
133} 140}
134 141
@@ -137,7 +144,8 @@ static inline u16 _readw(const volatile void __iomem *addr)
137 144
138 __asm__ __volatile__("lduha\t[%1] %2, %0\t/* pci_readw */" 145 __asm__ __volatile__("lduha\t[%1] %2, %0\t/* pci_readw */"
139 : "=r" (ret) 146 : "=r" (ret)
140 : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); 147 : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)
148 : "memory");
141 149
142 return ret; 150 return ret;
143} 151}
@@ -147,7 +155,8 @@ static inline u32 _readl(const volatile void __iomem *addr)
147 155
148 __asm__ __volatile__("lduwa\t[%1] %2, %0\t/* pci_readl */" 156 __asm__ __volatile__("lduwa\t[%1] %2, %0\t/* pci_readl */"
149 : "=r" (ret) 157 : "=r" (ret)
150 : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); 158 : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)
159 : "memory");
151 160
152 return ret; 161 return ret;
153} 162}
@@ -157,7 +166,8 @@ static inline u64 _readq(const volatile void __iomem *addr)
157 166
158 __asm__ __volatile__("ldxa\t[%1] %2, %0\t/* pci_readq */" 167 __asm__ __volatile__("ldxa\t[%1] %2, %0\t/* pci_readq */"
159 : "=r" (ret) 168 : "=r" (ret)
160 : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); 169 : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)
170 : "memory");
161 171
162 return ret; 172 return ret;
163} 173}
@@ -166,28 +176,32 @@ static inline void _writeb(u8 b, volatile void __iomem *addr)
166{ 176{
167 __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_writeb */" 177 __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_writeb */"
168 : /* no outputs */ 178 : /* no outputs */
169 : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); 179 : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)
180 : "memory");
170} 181}
171 182
172static inline void _writew(u16 w, volatile void __iomem *addr) 183static inline void _writew(u16 w, volatile void __iomem *addr)
173{ 184{
174 __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_writew */" 185 __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_writew */"
175 : /* no outputs */ 186 : /* no outputs */
176 : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); 187 : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)
188 : "memory");
177} 189}
178 190
179static inline void _writel(u32 l, volatile void __iomem *addr) 191static inline void _writel(u32 l, volatile void __iomem *addr)
180{ 192{
181 __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_writel */" 193 __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_writel */"
182 : /* no outputs */ 194 : /* no outputs */
183 : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); 195 : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)
196 : "memory");
184} 197}
185 198
186static inline void _writeq(u64 q, volatile void __iomem *addr) 199static inline void _writeq(u64 q, volatile void __iomem *addr)
187{ 200{
188 __asm__ __volatile__("stxa\t%r0, [%1] %2\t/* pci_writeq */" 201 __asm__ __volatile__("stxa\t%r0, [%1] %2\t/* pci_writeq */"
189 : /* no outputs */ 202 : /* no outputs */
190 : "Jr" (q), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)); 203 : "Jr" (q), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E_L)
204 : "memory");
191} 205}
192 206
193#define readb(__addr) _readb(__addr) 207#define readb(__addr) _readb(__addr)
@@ -299,7 +313,8 @@ static inline u8 _sbus_readb(const volatile void __iomem *addr)
299 313
300 __asm__ __volatile__("lduba\t[%1] %2, %0\t/* sbus_readb */" 314 __asm__ __volatile__("lduba\t[%1] %2, %0\t/* sbus_readb */"
301 : "=r" (ret) 315 : "=r" (ret)
302 : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); 316 : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)
317 : "memory");
303 318
304 return ret; 319 return ret;
305} 320}
@@ -310,7 +325,8 @@ static inline u16 _sbus_readw(const volatile void __iomem *addr)
310 325
311 __asm__ __volatile__("lduha\t[%1] %2, %0\t/* sbus_readw */" 326 __asm__ __volatile__("lduha\t[%1] %2, %0\t/* sbus_readw */"
312 : "=r" (ret) 327 : "=r" (ret)
313 : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); 328 : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)
329 : "memory");
314 330
315 return ret; 331 return ret;
316} 332}
@@ -321,7 +337,8 @@ static inline u32 _sbus_readl(const volatile void __iomem *addr)
321 337
322 __asm__ __volatile__("lduwa\t[%1] %2, %0\t/* sbus_readl */" 338 __asm__ __volatile__("lduwa\t[%1] %2, %0\t/* sbus_readl */"
323 : "=r" (ret) 339 : "=r" (ret)
324 : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); 340 : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)
341 : "memory");
325 342
326 return ret; 343 return ret;
327} 344}
@@ -332,7 +349,8 @@ static inline u64 _sbus_readq(const volatile void __iomem *addr)
332 349
333 __asm__ __volatile__("ldxa\t[%1] %2, %0\t/* sbus_readq */" 350 __asm__ __volatile__("ldxa\t[%1] %2, %0\t/* sbus_readq */"
334 : "=r" (ret) 351 : "=r" (ret)
335 : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); 352 : "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)
353 : "memory");
336 354
337 return ret; 355 return ret;
338} 356}
@@ -341,28 +359,32 @@ static inline void _sbus_writeb(u8 b, volatile void __iomem *addr)
341{ 359{
342 __asm__ __volatile__("stba\t%r0, [%1] %2\t/* sbus_writeb */" 360 __asm__ __volatile__("stba\t%r0, [%1] %2\t/* sbus_writeb */"
343 : /* no outputs */ 361 : /* no outputs */
344 : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); 362 : "Jr" (b), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)
363 : "memory");
345} 364}
346 365
347static inline void _sbus_writew(u16 w, volatile void __iomem *addr) 366static inline void _sbus_writew(u16 w, volatile void __iomem *addr)
348{ 367{
349 __asm__ __volatile__("stha\t%r0, [%1] %2\t/* sbus_writew */" 368 __asm__ __volatile__("stha\t%r0, [%1] %2\t/* sbus_writew */"
350 : /* no outputs */ 369 : /* no outputs */
351 : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); 370 : "Jr" (w), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)
371 : "memory");
352} 372}
353 373
354static inline void _sbus_writel(u32 l, volatile void __iomem *addr) 374static inline void _sbus_writel(u32 l, volatile void __iomem *addr)
355{ 375{
356 __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* sbus_writel */" 376 __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* sbus_writel */"
357 : /* no outputs */ 377 : /* no outputs */
358 : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); 378 : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)
379 : "memory");
359} 380}
360 381
361static inline void _sbus_writeq(u64 l, volatile void __iomem *addr) 382static inline void _sbus_writeq(u64 l, volatile void __iomem *addr)
362{ 383{
363 __asm__ __volatile__("stxa\t%r0, [%1] %2\t/* sbus_writeq */" 384 __asm__ __volatile__("stxa\t%r0, [%1] %2\t/* sbus_writeq */"
364 : /* no outputs */ 385 : /* no outputs */
365 : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)); 386 : "Jr" (l), "r" (addr), "i" (ASI_PHYS_BYPASS_EC_E)
387 : "memory");
366} 388}
367 389
368#define sbus_readb(__addr) _sbus_readb(__addr) 390#define sbus_readb(__addr) _sbus_readb(__addr)
diff --git a/include/asm-sparc64/ioctl.h b/include/asm-sparc64/ioctl.h
index 253d0b57b316..d634c21b4724 100644
--- a/include/asm-sparc64/ioctl.h
+++ b/include/asm-sparc64/ioctl.h
@@ -1,4 +1,3 @@
1/* $Id: ioctl.h,v 1.2 1998/10/15 05:40:38 jj Exp $ */
2#ifndef _SPARC64_IOCTL_H 1#ifndef _SPARC64_IOCTL_H
3#define _SPARC64_IOCTL_H 2#define _SPARC64_IOCTL_H
4 3
diff --git a/include/asm-sparc64/ioctls.h b/include/asm-sparc64/ioctls.h
index c1be40647c99..94d1b75e512b 100644
--- a/include/asm-sparc64/ioctls.h
+++ b/include/asm-sparc64/ioctls.h
@@ -1,4 +1,3 @@
1/* $Id: ioctls.h,v 1.7 1998/02/23 02:49:41 davem Exp $ */
2#ifndef _ASM_SPARC64_IOCTLS_H 1#ifndef _ASM_SPARC64_IOCTLS_H
3#define _ASM_SPARC64_IOCTLS_H 2#define _ASM_SPARC64_IOCTLS_H
4 3
diff --git a/include/asm-sparc64/lsu.h b/include/asm-sparc64/lsu.h
index 79f109840c39..7190f8de90a0 100644
--- a/include/asm-sparc64/lsu.h
+++ b/include/asm-sparc64/lsu.h
@@ -1,4 +1,3 @@
1/* $Id: lsu.h,v 1.2 1997/04/04 00:50:22 davem Exp $ */
2#ifndef _SPARC64_LSU_H 1#ifndef _SPARC64_LSU_H
3#define _SPARC64_LSU_H 2#define _SPARC64_LSU_H
4 3
diff --git a/include/asm-sparc64/mman.h b/include/asm-sparc64/mman.h
index 625be4d61baf..d2ae67cd1bdc 100644
--- a/include/asm-sparc64/mman.h
+++ b/include/asm-sparc64/mman.h
@@ -1,4 +1,3 @@
1/* $Id: mman.h,v 1.2 2000/03/15 02:44:26 davem Exp $ */
2#ifndef __SPARC64_MMAN_H__ 1#ifndef __SPARC64_MMAN_H__
3#define __SPARC64_MMAN_H__ 2#define __SPARC64_MMAN_H__
4 3
diff --git a/include/asm-sparc64/mmu_context.h b/include/asm-sparc64/mmu_context.h
index 9fc225ed5500..5693ab482606 100644
--- a/include/asm-sparc64/mmu_context.h
+++ b/include/asm-sparc64/mmu_context.h
@@ -1,4 +1,3 @@
1/* $Id: mmu_context.h,v 1.54 2002/02/09 19:49:31 davem Exp $ */
2#ifndef __SPARC64_MMU_CONTEXT_H 1#ifndef __SPARC64_MMU_CONTEXT_H
3#define __SPARC64_MMU_CONTEXT_H 2#define __SPARC64_MMU_CONTEXT_H
4 3
diff --git a/include/asm-sparc64/namei.h b/include/asm-sparc64/namei.h
index 275161f21213..cbc1b4c06891 100644
--- a/include/asm-sparc64/namei.h
+++ b/include/asm-sparc64/namei.h
@@ -1,4 +1,4 @@
1/* $Id: namei.h,v 1.17 2000/04/13 00:55:54 davem Exp $ 1/*
2 * linux/include/asm-sparc64/namei.h 2 * linux/include/asm-sparc64/namei.h
3 * 3 *
4 * Routines to handle famous /usr/gnemul/s*. 4 * Routines to handle famous /usr/gnemul/s*.
diff --git a/include/asm-sparc64/openprom.h b/include/asm-sparc64/openprom.h
index 26ec046715c8..b69e4a8c9170 100644
--- a/include/asm-sparc64/openprom.h
+++ b/include/asm-sparc64/openprom.h
@@ -1,4 +1,3 @@
1/* $Id: openprom.h,v 1.9 2001/03/16 10:22:02 davem Exp $ */
2#ifndef __SPARC64_OPENPROM_H 1#ifndef __SPARC64_OPENPROM_H
3#define __SPARC64_OPENPROM_H 2#define __SPARC64_OPENPROM_H
4 3
diff --git a/include/asm-sparc64/page.h b/include/asm-sparc64/page.h
index 618117def0dc..93f0881b766e 100644
--- a/include/asm-sparc64/page.h
+++ b/include/asm-sparc64/page.h
@@ -1,5 +1,3 @@
1/* $Id: page.h,v 1.39 2002/02/09 19:49:31 davem Exp $ */
2
3#ifndef _SPARC64_PAGE_H 1#ifndef _SPARC64_PAGE_H
4#define _SPARC64_PAGE_H 2#define _SPARC64_PAGE_H
5 3
diff --git a/include/asm-sparc64/pgalloc.h b/include/asm-sparc64/pgalloc.h
index 3ee2d406373b..326de104d014 100644
--- a/include/asm-sparc64/pgalloc.h
+++ b/include/asm-sparc64/pgalloc.h
@@ -1,4 +1,3 @@
1/* $Id: pgalloc.h,v 1.30 2001/12/21 04:56:17 davem Exp $ */
2#ifndef _SPARC64_PGALLOC_H 1#ifndef _SPARC64_PGALLOC_H
3#define _SPARC64_PGALLOC_H 2#define _SPARC64_PGALLOC_H
4 3
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h
index 0e200e7acec7..b87017747b5d 100644
--- a/include/asm-sparc64/pgtable.h
+++ b/include/asm-sparc64/pgtable.h
@@ -1,4 +1,4 @@
1/* $Id: pgtable.h,v 1.156 2002/02/09 19:49:31 davem Exp $ 1/*
2 * pgtable.h: SpitFire page table operations. 2 * pgtable.h: SpitFire page table operations.
3 * 3 *
4 * Copyright 1996,1997 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright 1996,1997 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc64/pil.h b/include/asm-sparc64/pil.h
index 2f5d126f7163..eaac842d88c3 100644
--- a/include/asm-sparc64/pil.h
+++ b/include/asm-sparc64/pil.h
@@ -1,4 +1,3 @@
1/* $Id: pil.h,v 1.1 2002/01/23 11:27:36 davem Exp $ */
2#ifndef _SPARC64_PIL_H 1#ifndef _SPARC64_PIL_H
3#define _SPARC64_PIL_H 2#define _SPARC64_PIL_H
4 3
diff --git a/include/asm-sparc64/processor.h b/include/asm-sparc64/processor.h
index 885b6a1dcae4..26b4e5255761 100644
--- a/include/asm-sparc64/processor.h
+++ b/include/asm-sparc64/processor.h
@@ -1,4 +1,4 @@
1/* $Id: processor.h,v 1.83 2002/02/10 06:04:33 davem Exp $ 1/*
2 * include/asm-sparc64/processor.h 2 * include/asm-sparc64/processor.h
3 * 3 *
4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc64/psrcompat.h b/include/asm-sparc64/psrcompat.h
index 3614ca04753f..44b6327dbbf5 100644
--- a/include/asm-sparc64/psrcompat.h
+++ b/include/asm-sparc64/psrcompat.h
@@ -1,4 +1,3 @@
1/* $Id: psrcompat.h,v 1.5 1998/10/06 09:28:39 jj Exp $ */
2#ifndef _SPARC64_PSRCOMPAT_H 1#ifndef _SPARC64_PSRCOMPAT_H
3#define _SPARC64_PSRCOMPAT_H 2#define _SPARC64_PSRCOMPAT_H
4 3
diff --git a/include/asm-sparc64/pstate.h b/include/asm-sparc64/pstate.h
index 949aebaf991d..a26a53777bb0 100644
--- a/include/asm-sparc64/pstate.h
+++ b/include/asm-sparc64/pstate.h
@@ -1,4 +1,3 @@
1/* $Id: pstate.h,v 1.6 1997/06/25 07:39:45 jj Exp $ */
2#ifndef _SPARC64_PSTATE_H 1#ifndef _SPARC64_PSTATE_H
3#define _SPARC64_PSTATE_H 2#define _SPARC64_PSTATE_H
4 3
diff --git a/include/asm-sparc64/ptrace.h b/include/asm-sparc64/ptrace.h
index 90972a5ada59..b163da79bb6d 100644
--- a/include/asm-sparc64/ptrace.h
+++ b/include/asm-sparc64/ptrace.h
@@ -128,6 +128,17 @@ struct sparc_trapf {
128 128
129#ifdef __KERNEL__ 129#ifdef __KERNEL__
130 130
131struct global_reg_snapshot {
132 unsigned long tstate;
133 unsigned long tpc;
134 unsigned long tnpc;
135 unsigned long o7;
136 unsigned long i7;
137 struct thread_info *thread;
138 unsigned long pad1;
139 unsigned long pad2;
140};
141
131#define __ARCH_WANT_COMPAT_SYS_PTRACE 142#define __ARCH_WANT_COMPAT_SYS_PTRACE
132 143
133#define force_successful_syscall_return() \ 144#define force_successful_syscall_return() \
@@ -295,6 +306,20 @@ extern void __show_regs(struct pt_regs *);
295#define SF_XARG5 0x58 306#define SF_XARG5 0x58
296#define SF_XXARG 0x5c 307#define SF_XXARG 0x5c
297 308
309#ifdef __KERNEL__
310
311/* global_reg_snapshot offsets */
312#define GR_SNAP_TSTATE 0x00
313#define GR_SNAP_TPC 0x08
314#define GR_SNAP_TNPC 0x10
315#define GR_SNAP_O7 0x18
316#define GR_SNAP_I7 0x20
317#define GR_SNAP_THREAD 0x28
318#define GR_SNAP_PAD1 0x30
319#define GR_SNAP_PAD2 0x38
320
321#endif /* __KERNEL__ */
322
298/* Stuff for the ptrace system call */ 323/* Stuff for the ptrace system call */
299#define PTRACE_SPARC_DETACH 11 324#define PTRACE_SPARC_DETACH 11
300#define PTRACE_GETREGS 12 325#define PTRACE_GETREGS 12
diff --git a/include/asm-sparc64/reg.h b/include/asm-sparc64/reg.h
index fc68f90181b3..77aa4804a60d 100644
--- a/include/asm-sparc64/reg.h
+++ b/include/asm-sparc64/reg.h
@@ -1,4 +1,4 @@
1/* $Id: reg.h,v 1.6 1999/09/06 08:22:10 jj Exp $ 1/*
2 * linux/asm-sparc64/reg.h 2 * linux/asm-sparc64/reg.h
3 * Layout of the registers as expected by gdb on the Sparc 3 * Layout of the registers as expected by gdb on the Sparc
4 * we should replace the user.h definitions with those in 4 * we should replace the user.h definitions with those in
diff --git a/include/asm-sparc64/resource.h b/include/asm-sparc64/resource.h
index aa469795a6b0..4f08fb5e4ca4 100644
--- a/include/asm-sparc64/resource.h
+++ b/include/asm-sparc64/resource.h
@@ -1,4 +1,4 @@
1/* $Id: resource.h,v 1.8 2000/09/23 02:09:21 davem Exp $ 1/*
2 * resource.h: Resource definitions. 2 * resource.h: Resource definitions.
3 * 3 *
4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc64/rtc.h b/include/asm-sparc64/rtc.h
index cb17334595c9..f9ecb1fe2ecd 100644
--- a/include/asm-sparc64/rtc.h
+++ b/include/asm-sparc64/rtc.h
@@ -1,5 +1,4 @@
1/* $Id: rtc.h,v 1.1 1996/12/26 14:22:35 davem Exp $ 1/*
2 *
3 * rtc.h: Definitions for access to the Mostek real time clock 2 * rtc.h: Definitions for access to the Mostek real time clock
4 * 3 *
5 * Copyright (C) 1996 Thomas K. Dyas (tdyas@eden.rutgers.edu) 4 * Copyright (C) 1996 Thomas K. Dyas (tdyas@eden.rutgers.edu)
diff --git a/include/asm-sparc64/rwsem.h b/include/asm-sparc64/rwsem.h
index 1294b7ce5d06..1dc129ac2feb 100644
--- a/include/asm-sparc64/rwsem.h
+++ b/include/asm-sparc64/rwsem.h
@@ -1,4 +1,4 @@
1/* $Id: rwsem.h,v 1.5 2001/11/18 00:12:56 davem Exp $ 1/*
2 * rwsem.h: R/W semaphores implemented using CAS 2 * rwsem.h: R/W semaphores implemented using CAS
3 * 3 *
4 * Written by David S. Miller (davem@redhat.com), 2001. 4 * Written by David S. Miller (davem@redhat.com), 2001.
diff --git a/include/asm-sparc64/scatterlist.h b/include/asm-sparc64/scatterlist.h
index 6df23f070b1a..81bd058f9382 100644
--- a/include/asm-sparc64/scatterlist.h
+++ b/include/asm-sparc64/scatterlist.h
@@ -1,4 +1,3 @@
1/* $Id: scatterlist.h,v 1.11 2001/12/17 07:05:15 davem Exp $ */
2#ifndef _SPARC64_SCATTERLIST_H 1#ifndef _SPARC64_SCATTERLIST_H
3#define _SPARC64_SCATTERLIST_H 2#define _SPARC64_SCATTERLIST_H
4 3
diff --git a/include/asm-sparc64/shmparam.h b/include/asm-sparc64/shmparam.h
index 8c66fded8a32..1ed0d6701a9b 100644
--- a/include/asm-sparc64/shmparam.h
+++ b/include/asm-sparc64/shmparam.h
@@ -1,4 +1,3 @@
1/* $Id: shmparam.h,v 1.5 2001/09/24 21:17:57 kanoj Exp $ */
2#ifndef _ASMSPARC64_SHMPARAM_H 1#ifndef _ASMSPARC64_SHMPARAM_H
3#define _ASMSPARC64_SHMPARAM_H 2#define _ASMSPARC64_SHMPARAM_H
4 3
diff --git a/include/asm-sparc64/sigcontext.h b/include/asm-sparc64/sigcontext.h
index d8073373db8c..1c868d680cfc 100644
--- a/include/asm-sparc64/sigcontext.h
+++ b/include/asm-sparc64/sigcontext.h
@@ -1,4 +1,3 @@
1/* $Id: sigcontext.h,v 1.12 1999/09/06 08:22:09 jj Exp $ */
2#ifndef __SPARC64_SIGCONTEXT_H 1#ifndef __SPARC64_SIGCONTEXT_H
3#define __SPARC64_SIGCONTEXT_H 2#define __SPARC64_SIGCONTEXT_H
4 3
diff --git a/include/asm-sparc64/signal.h b/include/asm-sparc64/signal.h
index c49f32d38707..2a7c7934ac0a 100644
--- a/include/asm-sparc64/signal.h
+++ b/include/asm-sparc64/signal.h
@@ -1,4 +1,3 @@
1/* $Id: signal.h,v 1.9 1999/09/06 08:22:11 jj Exp $ */
2#ifndef _ASMSPARC64_SIGNAL_H 1#ifndef _ASMSPARC64_SIGNAL_H
3#define _ASMSPARC64_SIGNAL_H 2#define _ASMSPARC64_SIGNAL_H
4 3
diff --git a/include/asm-sparc64/smp.h b/include/asm-sparc64/smp.h
index 1c1c5ea5cea5..cd0311b2e19d 100644
--- a/include/asm-sparc64/smp.h
+++ b/include/asm-sparc64/smp.h
@@ -1,6 +1,6 @@
1/* smp.h: Sparc64 specific SMP stuff. 1/* smp.h: Sparc64 specific SMP stuff.
2 * 2 *
3 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) 3 * Copyright (C) 1996, 2008 David S. Miller (davem@davemloft.net)
4 */ 4 */
5 5
6#ifndef _SPARC64_SMP_H 6#ifndef _SPARC64_SMP_H
@@ -44,6 +44,8 @@ extern int hard_smp_processor_id(void);
44extern void smp_fill_in_sib_core_maps(void); 44extern void smp_fill_in_sib_core_maps(void);
45extern void cpu_play_dead(void); 45extern void cpu_play_dead(void);
46 46
47extern void smp_fetch_global_regs(void);
48
47#ifdef CONFIG_HOTPLUG_CPU 49#ifdef CONFIG_HOTPLUG_CPU
48extern int __cpu_disable(void); 50extern int __cpu_disable(void);
49extern void __cpu_die(unsigned int cpu); 51extern void __cpu_die(unsigned int cpu);
@@ -55,6 +57,7 @@ extern void __cpu_die(unsigned int cpu);
55 57
56#define hard_smp_processor_id() 0 58#define hard_smp_processor_id() 0
57#define smp_fill_in_sib_core_maps() do { } while (0) 59#define smp_fill_in_sib_core_maps() do { } while (0)
60#define smp_fetch_global_regs() do { } while (0)
58 61
59#endif /* !(CONFIG_SMP) */ 62#endif /* !(CONFIG_SMP) */
60 63
diff --git a/include/asm-sparc64/socket.h b/include/asm-sparc64/socket.h
index 8cf071fae3eb..5af688f56716 100644
--- a/include/asm-sparc64/socket.h
+++ b/include/asm-sparc64/socket.h
@@ -1,4 +1,3 @@
1/* $Id: socket.h,v 1.10 2001/06/13 16:25:03 davem Exp $ */
2#ifndef _ASM_SOCKET_H 1#ifndef _ASM_SOCKET_H
3#define _ASM_SOCKET_H 2#define _ASM_SOCKET_H
4 3
diff --git a/include/asm-sparc64/starfire.h b/include/asm-sparc64/starfire.h
index 48b50b5e35b0..07bafd31e33c 100644
--- a/include/asm-sparc64/starfire.h
+++ b/include/asm-sparc64/starfire.h
@@ -1,4 +1,4 @@
1/* $Id: starfire.h,v 1.2 2001/07/04 00:18:18 davem Exp $ 1/*
2 * starfire.h: Group all starfire specific code together. 2 * starfire.h: Group all starfire specific code together.
3 * 3 *
4 * Copyright (C) 2000 Anton Blanchard (anton@samba.org) 4 * Copyright (C) 2000 Anton Blanchard (anton@samba.org)
diff --git a/include/asm-sparc64/stat.h b/include/asm-sparc64/stat.h
index 128c27e57f0b..9650fdea847f 100644
--- a/include/asm-sparc64/stat.h
+++ b/include/asm-sparc64/stat.h
@@ -1,4 +1,3 @@
1/* $Id: stat.h,v 1.7 2000/08/04 05:35:55 davem Exp $ */
2#ifndef _SPARC64_STAT_H 1#ifndef _SPARC64_STAT_H
3#define _SPARC64_STAT_H 2#define _SPARC64_STAT_H
4 3
diff --git a/include/asm-sparc64/statfs.h b/include/asm-sparc64/statfs.h
index 185b6c481b24..79b3c890a5fa 100644
--- a/include/asm-sparc64/statfs.h
+++ b/include/asm-sparc64/statfs.h
@@ -1,4 +1,3 @@
1/* $Id: statfs.h,v 1.2 1997/04/14 17:05:22 jj Exp $ */
2#ifndef _SPARC64_STATFS_H 1#ifndef _SPARC64_STATFS_H
3#define _SPARC64_STATFS_H 2#define _SPARC64_STATFS_H
4 3
diff --git a/include/asm-sparc64/string.h b/include/asm-sparc64/string.h
index c7d88622cb27..43161f2d17eb 100644
--- a/include/asm-sparc64/string.h
+++ b/include/asm-sparc64/string.h
@@ -1,4 +1,4 @@
1/* $Id: string.h,v 1.20 2001/09/27 04:36:24 kanoj Exp $ 1/*
2 * string.h: External definitions for optimized assembly string 2 * string.h: External definitions for optimized assembly string
3 * routines for the Linux Kernel. 3 * routines for the Linux Kernel.
4 * 4 *
diff --git a/include/asm-sparc64/sunbpp.h b/include/asm-sparc64/sunbpp.h
index b441cc9c426c..8e171b7a9f4f 100644
--- a/include/asm-sparc64/sunbpp.h
+++ b/include/asm-sparc64/sunbpp.h
@@ -1,4 +1,4 @@
1/* $Id: sunbpp.h,v 1.1 1999/08/13 06:21:44 shadow Exp $ 1/*
2 * include/asm-sparc64/sunbpp.h 2 * include/asm-sparc64/sunbpp.h
3 */ 3 */
4 4
diff --git a/include/asm-sparc64/termios.h b/include/asm-sparc64/termios.h
index cacbea171ad7..1f5dab25dda5 100644
--- a/include/asm-sparc64/termios.h
+++ b/include/asm-sparc64/termios.h
@@ -1,4 +1,3 @@
1/* $Id: termios.h,v 1.11 2001/06/01 08:12:11 davem Exp $ */
2#ifndef _SPARC64_TERMIOS_H 1#ifndef _SPARC64_TERMIOS_H
3#define _SPARC64_TERMIOS_H 2#define _SPARC64_TERMIOS_H
4 3
diff --git a/include/asm-sparc64/ttable.h b/include/asm-sparc64/ttable.h
index 52d67d394107..0ba199587e07 100644
--- a/include/asm-sparc64/ttable.h
+++ b/include/asm-sparc64/ttable.h
@@ -1,4 +1,3 @@
1/* $Id: ttable.h,v 1.18 2002/02/09 19:49:32 davem Exp $ */
2#ifndef _SPARC64_TTABLE_H 1#ifndef _SPARC64_TTABLE_H
3#define _SPARC64_TTABLE_H 2#define _SPARC64_TTABLE_H
4 3
diff --git a/include/asm-sparc64/types.h b/include/asm-sparc64/types.h
index 5dbe04f4044a..b27ccc85202f 100644
--- a/include/asm-sparc64/types.h
+++ b/include/asm-sparc64/types.h
@@ -1,4 +1,3 @@
1/* $Id: types.h,v 1.4 2001/10/09 02:24:35 davem Exp $ */
2#ifndef _SPARC64_TYPES_H 1#ifndef _SPARC64_TYPES_H
3#define _SPARC64_TYPES_H 2#define _SPARC64_TYPES_H
4 3
diff --git a/include/asm-sparc64/uaccess.h b/include/asm-sparc64/uaccess.h
index d8547b87e730..5fcbaf68c3f6 100644
--- a/include/asm-sparc64/uaccess.h
+++ b/include/asm-sparc64/uaccess.h
@@ -1,4 +1,3 @@
1/* $Id: uaccess.h,v 1.35 2002/02/09 19:49:31 davem Exp $ */
2#ifndef _ASM_UACCESS_H 1#ifndef _ASM_UACCESS_H
3#define _ASM_UACCESS_H 2#define _ASM_UACCESS_H
4 3
diff --git a/include/asm-sparc64/uctx.h b/include/asm-sparc64/uctx.h
index 6eaf16ef23f6..dc937c75ffdd 100644
--- a/include/asm-sparc64/uctx.h
+++ b/include/asm-sparc64/uctx.h
@@ -1,4 +1,4 @@
1/* $Id: uctx.h,v 1.1 1997/06/18 16:51:58 davem Exp $ 1/*
2 * uctx.h: Sparc64 {set,get}context() register state layouts. 2 * uctx.h: Sparc64 {set,get}context() register state layouts.
3 * 3 *
4 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
diff --git a/include/asm-sparc64/utrap.h b/include/asm-sparc64/utrap.h
index 81b0ebf3736c..e49e5c46ad68 100644
--- a/include/asm-sparc64/utrap.h
+++ b/include/asm-sparc64/utrap.h
@@ -1,4 +1,4 @@
1/* $Id: utrap.h,v 1.1 1997/10/14 16:21:31 jj Exp $ 1/*
2 * include/asm-sparc64/utrap.h 2 * include/asm-sparc64/utrap.h
3 * 3 *
4 * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 4 * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
diff --git a/include/asm-sparc64/watchdog.h b/include/asm-sparc64/watchdog.h
index 4d5b03b60e4d..5baf2d3919cf 100644
--- a/include/asm-sparc64/watchdog.h
+++ b/include/asm-sparc64/watchdog.h
@@ -1,4 +1,4 @@
1/* $Id: watchdog.h,v 1.1 2001/01/18 04:47:44 davem Exp $ 1/*
2 * 2 *
3 * watchdog - Driver interface for the hardware watchdog timers 3 * watchdog - Driver interface for the hardware watchdog timers
4 * present on Sun Microsystems boardsets 4 * present on Sun Microsystems boardsets
diff --git a/include/asm-um/mmu_context.h b/include/asm-um/mmu_context.h
index 6686fc524ca1..54f42e8b0105 100644
--- a/include/asm-um/mmu_context.h
+++ b/include/asm-um/mmu_context.h
@@ -22,16 +22,10 @@ extern void force_flush_all(void);
22static inline void activate_mm(struct mm_struct *old, struct mm_struct *new) 22static inline void activate_mm(struct mm_struct *old, struct mm_struct *new)
23{ 23{
24 /* 24 /*
25 * This is called by fs/exec.c and fs/aio.c. In the first case, for an 25 * This is called by fs/exec.c and sys_unshare()
26 * exec, we don't need to do anything as we're called from userspace 26 * when the new ->mm is used for the first time.
27 * and thus going to use a new host PID. In the second, we're called
28 * from a kernel thread, and thus need to go doing the mmap's on the
29 * host. Since they're very expensive, we want to avoid that as far as
30 * possible.
31 */ 27 */
32 if (old != new && (current->flags & PF_BORROWED_MM)) 28 __switch_mm(&new->context.id);
33 __switch_mm(&new->context.id);
34
35 arch_dup_mmap(old, new); 29 arch_dup_mmap(old, new);
36} 30}
37 31
diff --git a/include/asm-v850/clinkage.h b/include/asm-v850/clinkage.h
index 2b622adccae5..c389691d6f86 100644
--- a/include/asm-v850/clinkage.h
+++ b/include/asm-v850/clinkage.h
@@ -11,7 +11,7 @@
11 * Written by Miles Bader <miles@gnu.org> 11 * Written by Miles Bader <miles@gnu.org>
12 */ 12 */
13 13
14#ifndef __CLINKAGE_H__ 14#ifndef __V850_CLINKAGE_H__
15#define __V850_CLINKAGE_H__ 15#define __V850_CLINKAGE_H__
16 16
17#include <asm/macrology.h> 17#include <asm/macrology.h>
diff --git a/include/asm-x86/apic.h b/include/asm-x86/apic.h
index be9639a9a186..313bcaf4b6c3 100644
--- a/include/asm-x86/apic.h
+++ b/include/asm-x86/apic.h
@@ -36,14 +36,10 @@ extern void generic_apic_probe(void);
36#ifdef CONFIG_X86_LOCAL_APIC 36#ifdef CONFIG_X86_LOCAL_APIC
37 37
38extern int apic_verbosity; 38extern int apic_verbosity;
39extern int timer_over_8254;
40extern int local_apic_timer_c2_ok; 39extern int local_apic_timer_c2_ok;
41extern int local_apic_timer_disabled;
42 40
43extern int apic_runs_main_timer;
44extern int ioapic_force; 41extern int ioapic_force;
45extern int disable_apic; 42extern int disable_apic;
46extern int disable_apic_timer;
47 43
48/* 44/*
49 * Basic functions accessing APICs. 45 * Basic functions accessing APICs.
diff --git a/include/asm-x86/asm.h b/include/asm-x86/asm.h
index 90dec0c23646..70939820c55f 100644
--- a/include/asm-x86/asm.h
+++ b/include/asm-x86/asm.h
@@ -1,33 +1,29 @@
1#ifndef _ASM_X86_ASM_H 1#ifndef _ASM_X86_ASM_H
2#define _ASM_X86_ASM_H 2#define _ASM_X86_ASM_H
3 3
4#ifdef CONFIG_X86_32 4#ifdef __ASSEMBLY__
5/* 32 bits */ 5# define __ASM_FORM(x) x
6 6#else
7# define _ASM_PTR " .long " 7# define __ASM_FORM(x) " " #x " "
8# define _ASM_ALIGN " .balign 4 " 8#endif
9# define _ASM_MOV_UL " movl "
10
11# define _ASM_INC " incl "
12# define _ASM_DEC " decl "
13# define _ASM_ADD " addl "
14# define _ASM_SUB " subl "
15# define _ASM_XADD " xaddl "
16 9
10#ifdef CONFIG_X86_32
11# define __ASM_SEL(a,b) __ASM_FORM(a)
17#else 12#else
18/* 64 bits */ 13# define __ASM_SEL(a,b) __ASM_FORM(b)
14#endif
19 15
20# define _ASM_PTR " .quad " 16#define __ASM_SIZE(inst) __ASM_SEL(inst##l, inst##q)
21# define _ASM_ALIGN " .balign 8 "
22# define _ASM_MOV_UL " movq "
23 17
24# define _ASM_INC " incq " 18#define _ASM_PTR __ASM_SEL(.long, .quad)
25# define _ASM_DEC " decq " 19#define _ASM_ALIGN __ASM_SEL(.balign 4, .balign 8)
26# define _ASM_ADD " addq " 20#define _ASM_MOV_UL __ASM_SIZE(mov)
27# define _ASM_SUB " subq "
28# define _ASM_XADD " xaddq "
29 21
30#endif /* CONFIG_X86_32 */ 22#define _ASM_INC __ASM_SIZE(inc)
23#define _ASM_DEC __ASM_SIZE(dec)
24#define _ASM_ADD __ASM_SIZE(add)
25#define _ASM_SUB __ASM_SIZE(sub)
26#define _ASM_XADD __ASM_SIZE(xadd)
31 27
32/* Exception table entry */ 28/* Exception table entry */
33# define _ASM_EXTABLE(from,to) \ 29# define _ASM_EXTABLE(from,to) \
diff --git a/include/asm-x86/atomic_64.h b/include/asm-x86/atomic_64.h
index 3e0cd7d38335..fe589c153db8 100644
--- a/include/asm-x86/atomic_64.h
+++ b/include/asm-x86/atomic_64.h
@@ -11,12 +11,6 @@
11 * resource counting etc.. 11 * resource counting etc..
12 */ 12 */
13 13
14#ifdef CONFIG_SMP
15#define LOCK "lock ; "
16#else
17#define LOCK ""
18#endif
19
20/* 14/*
21 * Make sure gcc doesn't try to be clever and move things around 15 * Make sure gcc doesn't try to be clever and move things around
22 * on us. We need to use _exactly_ the address the user gave us, 16 * on us. We need to use _exactly_ the address the user gave us,
diff --git a/include/asm-x86/bitops.h b/include/asm-x86/bitops.h
index ee4b3ead6a43..96b1829cea15 100644
--- a/include/asm-x86/bitops.h
+++ b/include/asm-x86/bitops.h
@@ -23,11 +23,21 @@
23#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 1) 23#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 1)
24/* Technically wrong, but this avoids compilation errors on some gcc 24/* Technically wrong, but this avoids compilation errors on some gcc
25 versions. */ 25 versions. */
26#define ADDR "=m" (*(volatile long *) addr) 26#define BITOP_ADDR(x) "=m" (*(volatile long *) (x))
27#else 27#else
28#define ADDR "+m" (*(volatile long *) addr) 28#define BITOP_ADDR(x) "+m" (*(volatile long *) (x))
29#endif 29#endif
30 30
31#define ADDR BITOP_ADDR(addr)
32
33/*
34 * We do the locked ops that don't return the old value as
35 * a mask operation on a byte.
36 */
37#define IS_IMMEDIATE(nr) (__builtin_constant_p(nr))
38#define CONST_MASK_ADDR(nr, addr) BITOP_ADDR((void *)(addr) + ((nr)>>3))
39#define CONST_MASK(nr) (1 << ((nr) & 7))
40
31/** 41/**
32 * set_bit - Atomically set a bit in memory 42 * set_bit - Atomically set a bit in memory
33 * @nr: the bit to set 43 * @nr: the bit to set
@@ -43,9 +53,17 @@
43 * Note that @nr may be almost arbitrarily large; this function is not 53 * Note that @nr may be almost arbitrarily large; this function is not
44 * restricted to acting on a single-word quantity. 54 * restricted to acting on a single-word quantity.
45 */ 55 */
46static inline void set_bit(int nr, volatile void *addr) 56static inline void set_bit(unsigned int nr, volatile unsigned long *addr)
47{ 57{
48 asm volatile(LOCK_PREFIX "bts %1,%0" : ADDR : "Ir" (nr) : "memory"); 58 if (IS_IMMEDIATE(nr)) {
59 asm volatile(LOCK_PREFIX "orb %1,%0"
60 : CONST_MASK_ADDR(nr, addr)
61 : "iq" ((u8)CONST_MASK(nr))
62 : "memory");
63 } else {
64 asm volatile(LOCK_PREFIX "bts %1,%0"
65 : BITOP_ADDR(addr) : "Ir" (nr) : "memory");
66 }
49} 67}
50 68
51/** 69/**
@@ -57,7 +75,7 @@ static inline void set_bit(int nr, volatile void *addr)
57 * If it's called on the same region of memory simultaneously, the effect 75 * If it's called on the same region of memory simultaneously, the effect
58 * may be that only one operation succeeds. 76 * may be that only one operation succeeds.
59 */ 77 */
60static inline void __set_bit(int nr, volatile void *addr) 78static inline void __set_bit(int nr, volatile unsigned long *addr)
61{ 79{
62 asm volatile("bts %1,%0" : ADDR : "Ir" (nr) : "memory"); 80 asm volatile("bts %1,%0" : ADDR : "Ir" (nr) : "memory");
63} 81}
@@ -72,9 +90,17 @@ static inline void __set_bit(int nr, volatile void *addr)
72 * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit() 90 * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit()
73 * in order to ensure changes are visible on other processors. 91 * in order to ensure changes are visible on other processors.
74 */ 92 */
75static inline void clear_bit(int nr, volatile void *addr) 93static inline void clear_bit(int nr, volatile unsigned long *addr)
76{ 94{
77 asm volatile(LOCK_PREFIX "btr %1,%0" : ADDR : "Ir" (nr)); 95 if (IS_IMMEDIATE(nr)) {
96 asm volatile(LOCK_PREFIX "andb %1,%0"
97 : CONST_MASK_ADDR(nr, addr)
98 : "iq" ((u8)~CONST_MASK(nr)));
99 } else {
100 asm volatile(LOCK_PREFIX "btr %1,%0"
101 : BITOP_ADDR(addr)
102 : "Ir" (nr));
103 }
78} 104}
79 105
80/* 106/*
@@ -85,13 +111,13 @@ static inline void clear_bit(int nr, volatile void *addr)
85 * clear_bit() is atomic and implies release semantics before the memory 111 * clear_bit() is atomic and implies release semantics before the memory
86 * operation. It can be used for an unlock. 112 * operation. It can be used for an unlock.
87 */ 113 */
88static inline void clear_bit_unlock(unsigned nr, volatile void *addr) 114static inline void clear_bit_unlock(unsigned nr, volatile unsigned long *addr)
89{ 115{
90 barrier(); 116 barrier();
91 clear_bit(nr, addr); 117 clear_bit(nr, addr);
92} 118}
93 119
94static inline void __clear_bit(int nr, volatile void *addr) 120static inline void __clear_bit(int nr, volatile unsigned long *addr)
95{ 121{
96 asm volatile("btr %1,%0" : ADDR : "Ir" (nr)); 122 asm volatile("btr %1,%0" : ADDR : "Ir" (nr));
97} 123}
@@ -108,7 +134,7 @@ static inline void __clear_bit(int nr, volatile void *addr)
108 * No memory barrier is required here, because x86 cannot reorder stores past 134 * No memory barrier is required here, because x86 cannot reorder stores past
109 * older loads. Same principle as spin_unlock. 135 * older loads. Same principle as spin_unlock.
110 */ 136 */
111static inline void __clear_bit_unlock(unsigned nr, volatile void *addr) 137static inline void __clear_bit_unlock(unsigned nr, volatile unsigned long *addr)
112{ 138{
113 barrier(); 139 barrier();
114 __clear_bit(nr, addr); 140 __clear_bit(nr, addr);
@@ -126,7 +152,7 @@ static inline void __clear_bit_unlock(unsigned nr, volatile void *addr)
126 * If it's called on the same region of memory simultaneously, the effect 152 * If it's called on the same region of memory simultaneously, the effect
127 * may be that only one operation succeeds. 153 * may be that only one operation succeeds.
128 */ 154 */
129static inline void __change_bit(int nr, volatile void *addr) 155static inline void __change_bit(int nr, volatile unsigned long *addr)
130{ 156{
131 asm volatile("btc %1,%0" : ADDR : "Ir" (nr)); 157 asm volatile("btc %1,%0" : ADDR : "Ir" (nr));
132} 158}
@@ -140,7 +166,7 @@ static inline void __change_bit(int nr, volatile void *addr)
140 * Note that @nr may be almost arbitrarily large; this function is not 166 * Note that @nr may be almost arbitrarily large; this function is not
141 * restricted to acting on a single-word quantity. 167 * restricted to acting on a single-word quantity.
142 */ 168 */
143static inline void change_bit(int nr, volatile void *addr) 169static inline void change_bit(int nr, volatile unsigned long *addr)
144{ 170{
145 asm volatile(LOCK_PREFIX "btc %1,%0" : ADDR : "Ir" (nr)); 171 asm volatile(LOCK_PREFIX "btc %1,%0" : ADDR : "Ir" (nr));
146} 172}
@@ -153,7 +179,7 @@ static inline void change_bit(int nr, volatile void *addr)
153 * This operation is atomic and cannot be reordered. 179 * This operation is atomic and cannot be reordered.
154 * It also implies a memory barrier. 180 * It also implies a memory barrier.
155 */ 181 */
156static inline int test_and_set_bit(int nr, volatile void *addr) 182static inline int test_and_set_bit(int nr, volatile unsigned long *addr)
157{ 183{
158 int oldbit; 184 int oldbit;
159 185
@@ -170,7 +196,7 @@ static inline int test_and_set_bit(int nr, volatile void *addr)
170 * 196 *
171 * This is the same as test_and_set_bit on x86. 197 * This is the same as test_and_set_bit on x86.
172 */ 198 */
173static inline int test_and_set_bit_lock(int nr, volatile void *addr) 199static inline int test_and_set_bit_lock(int nr, volatile unsigned long *addr)
174{ 200{
175 return test_and_set_bit(nr, addr); 201 return test_and_set_bit(nr, addr);
176} 202}
@@ -184,7 +210,7 @@ static inline int test_and_set_bit_lock(int nr, volatile void *addr)
184 * If two examples of this operation race, one can appear to succeed 210 * If two examples of this operation race, one can appear to succeed
185 * but actually fail. You must protect multiple accesses with a lock. 211 * but actually fail. You must protect multiple accesses with a lock.
186 */ 212 */
187static inline int __test_and_set_bit(int nr, volatile void *addr) 213static inline int __test_and_set_bit(int nr, volatile unsigned long *addr)
188{ 214{
189 int oldbit; 215 int oldbit;
190 216
@@ -203,7 +229,7 @@ static inline int __test_and_set_bit(int nr, volatile void *addr)
203 * This operation is atomic and cannot be reordered. 229 * This operation is atomic and cannot be reordered.
204 * It also implies a memory barrier. 230 * It also implies a memory barrier.
205 */ 231 */
206static inline int test_and_clear_bit(int nr, volatile void *addr) 232static inline int test_and_clear_bit(int nr, volatile unsigned long *addr)
207{ 233{
208 int oldbit; 234 int oldbit;
209 235
@@ -223,7 +249,7 @@ static inline int test_and_clear_bit(int nr, volatile void *addr)
223 * If two examples of this operation race, one can appear to succeed 249 * If two examples of this operation race, one can appear to succeed
224 * but actually fail. You must protect multiple accesses with a lock. 250 * but actually fail. You must protect multiple accesses with a lock.
225 */ 251 */
226static inline int __test_and_clear_bit(int nr, volatile void *addr) 252static inline int __test_and_clear_bit(int nr, volatile unsigned long *addr)
227{ 253{
228 int oldbit; 254 int oldbit;
229 255
@@ -235,7 +261,7 @@ static inline int __test_and_clear_bit(int nr, volatile void *addr)
235} 261}
236 262
237/* WARNING: non atomic and it can be reordered! */ 263/* WARNING: non atomic and it can be reordered! */
238static inline int __test_and_change_bit(int nr, volatile void *addr) 264static inline int __test_and_change_bit(int nr, volatile unsigned long *addr)
239{ 265{
240 int oldbit; 266 int oldbit;
241 267
@@ -255,7 +281,7 @@ static inline int __test_and_change_bit(int nr, volatile void *addr)
255 * This operation is atomic and cannot be reordered. 281 * This operation is atomic and cannot be reordered.
256 * It also implies a memory barrier. 282 * It also implies a memory barrier.
257 */ 283 */
258static inline int test_and_change_bit(int nr, volatile void *addr) 284static inline int test_and_change_bit(int nr, volatile unsigned long *addr)
259{ 285{
260 int oldbit; 286 int oldbit;
261 287
@@ -266,13 +292,13 @@ static inline int test_and_change_bit(int nr, volatile void *addr)
266 return oldbit; 292 return oldbit;
267} 293}
268 294
269static inline int constant_test_bit(int nr, const volatile void *addr) 295static inline int constant_test_bit(int nr, const volatile unsigned long *addr)
270{ 296{
271 return ((1UL << (nr % BITS_PER_LONG)) & 297 return ((1UL << (nr % BITS_PER_LONG)) &
272 (((unsigned long *)addr)[nr / BITS_PER_LONG])) != 0; 298 (((unsigned long *)addr)[nr / BITS_PER_LONG])) != 0;
273} 299}
274 300
275static inline int variable_test_bit(int nr, volatile const void *addr) 301static inline int variable_test_bit(int nr, volatile const unsigned long *addr)
276{ 302{
277 int oldbit; 303 int oldbit;
278 304
diff --git a/include/asm-x86/cpufeature.h b/include/asm-x86/cpufeature.h
index 0d609c837a41..78b47e7404eb 100644
--- a/include/asm-x86/cpufeature.h
+++ b/include/asm-x86/cpufeature.h
@@ -142,11 +142,11 @@ extern const char * const x86_power_flags[32];
142#define clear_cpu_cap(c, bit) clear_bit(bit, (unsigned long *)((c)->x86_capability)) 142#define clear_cpu_cap(c, bit) clear_bit(bit, (unsigned long *)((c)->x86_capability))
143#define setup_clear_cpu_cap(bit) do { \ 143#define setup_clear_cpu_cap(bit) do { \
144 clear_cpu_cap(&boot_cpu_data, bit); \ 144 clear_cpu_cap(&boot_cpu_data, bit); \
145 set_bit(bit, cleared_cpu_caps); \ 145 set_bit(bit, (unsigned long *)cleared_cpu_caps); \
146} while (0) 146} while (0)
147#define setup_force_cpu_cap(bit) do { \ 147#define setup_force_cpu_cap(bit) do { \
148 set_cpu_cap(&boot_cpu_data, bit); \ 148 set_cpu_cap(&boot_cpu_data, bit); \
149 clear_bit(bit, cleared_cpu_caps); \ 149 clear_bit(bit, (unsigned long *)cleared_cpu_caps); \
150} while (0) 150} while (0)
151 151
152#define cpu_has_fpu boot_cpu_has(X86_FEATURE_FPU) 152#define cpu_has_fpu boot_cpu_has(X86_FEATURE_FPU)
diff --git a/include/asm-x86/current.h b/include/asm-x86/current.h
index d2526d3f7346..7515c19d4988 100644
--- a/include/asm-x86/current.h
+++ b/include/asm-x86/current.h
@@ -1,5 +1,39 @@
1#ifndef _X86_CURRENT_H
2#define _X86_CURRENT_H
3
1#ifdef CONFIG_X86_32 4#ifdef CONFIG_X86_32
2# include "current_32.h" 5#include <linux/compiler.h>
3#else 6#include <asm/percpu.h>
4# include "current_64.h" 7
5#endif 8struct task_struct;
9
10DECLARE_PER_CPU(struct task_struct *, current_task);
11static __always_inline struct task_struct *get_current(void)
12{
13 return x86_read_percpu(current_task);
14}
15
16#else /* X86_32 */
17
18#ifndef __ASSEMBLY__
19#include <asm/pda.h>
20
21struct task_struct;
22
23static __always_inline struct task_struct *get_current(void)
24{
25 return read_pda(pcurrent);
26}
27
28#else /* __ASSEMBLY__ */
29
30#include <asm/asm-offsets.h>
31#define GET_CURRENT(reg) movq %gs:(pda_pcurrent),reg
32
33#endif /* __ASSEMBLY__ */
34
35#endif /* X86_32 */
36
37#define current get_current()
38
39#endif /* X86_CURRENT_H */
diff --git a/include/asm-x86/current_32.h b/include/asm-x86/current_32.h
deleted file mode 100644
index 5af9bdb97a16..000000000000
--- a/include/asm-x86/current_32.h
+++ /dev/null
@@ -1,17 +0,0 @@
1#ifndef _I386_CURRENT_H
2#define _I386_CURRENT_H
3
4#include <linux/compiler.h>
5#include <asm/percpu.h>
6
7struct task_struct;
8
9DECLARE_PER_CPU(struct task_struct *, current_task);
10static __always_inline struct task_struct *get_current(void)
11{
12 return x86_read_percpu(current_task);
13}
14
15#define current get_current()
16
17#endif /* !(_I386_CURRENT_H) */
diff --git a/include/asm-x86/current_64.h b/include/asm-x86/current_64.h
deleted file mode 100644
index 2d368ede2fc1..000000000000
--- a/include/asm-x86/current_64.h
+++ /dev/null
@@ -1,27 +0,0 @@
1#ifndef _X86_64_CURRENT_H
2#define _X86_64_CURRENT_H
3
4#if !defined(__ASSEMBLY__)
5struct task_struct;
6
7#include <asm/pda.h>
8
9static inline struct task_struct *get_current(void)
10{
11 struct task_struct *t = read_pda(pcurrent);
12 return t;
13}
14
15#define current get_current()
16
17#else
18
19#ifndef ASM_OFFSET_H
20#include <asm/asm-offsets.h>
21#endif
22
23#define GET_CURRENT(reg) movq %gs:(pda_pcurrent),reg
24
25#endif
26
27#endif /* !(_X86_64_CURRENT_H) */
diff --git a/include/asm-x86/e820.h b/include/asm-x86/e820.h
index 7004251fc66b..5103d0b2c46c 100644
--- a/include/asm-x86/e820.h
+++ b/include/asm-x86/e820.h
@@ -24,6 +24,7 @@ struct e820map {
24 24
25#define ISA_START_ADDRESS 0xa0000 25#define ISA_START_ADDRESS 0xa0000
26#define ISA_END_ADDRESS 0x100000 26#define ISA_END_ADDRESS 0x100000
27#define is_ISA_range(s, e) ((s) >= ISA_START_ADDRESS && (e) < ISA_END_ADDRESS)
27 28
28#define BIOS_BEGIN 0x000a0000 29#define BIOS_BEGIN 0x000a0000
29#define BIOS_END 0x00100000 30#define BIOS_END 0x00100000
diff --git a/include/asm-x86/fixmap_32.h b/include/asm-x86/fixmap_32.h
index 4b96148e90c1..f0df7ee96816 100644
--- a/include/asm-x86/fixmap_32.h
+++ b/include/asm-x86/fixmap_32.h
@@ -79,10 +79,6 @@ enum fixed_addresses {
79 FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */ 79 FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */
80 FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1, 80 FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1,
81#endif 81#endif
82#ifdef CONFIG_ACPI
83 FIX_ACPI_BEGIN,
84 FIX_ACPI_END = FIX_ACPI_BEGIN + FIX_ACPI_PAGES - 1,
85#endif
86#ifdef CONFIG_PCI_MMCONFIG 82#ifdef CONFIG_PCI_MMCONFIG
87 FIX_PCIE_MCFG, 83 FIX_PCIE_MCFG,
88#endif 84#endif
@@ -103,6 +99,10 @@ enum fixed_addresses {
103 (__end_of_permanent_fixed_addresses & 511), 99 (__end_of_permanent_fixed_addresses & 511),
104 FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS*FIX_BTMAPS_NESTING - 1, 100 FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS*FIX_BTMAPS_NESTING - 1,
105 FIX_WP_TEST, 101 FIX_WP_TEST,
102#ifdef CONFIG_ACPI
103 FIX_ACPI_BEGIN,
104 FIX_ACPI_END = FIX_ACPI_BEGIN + FIX_ACPI_PAGES - 1,
105#endif
106#ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT 106#ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT
107 FIX_OHCI1394_BASE, 107 FIX_OHCI1394_BASE,
108#endif 108#endif
diff --git a/include/asm-x86/gart.h b/include/asm-x86/gart.h
index 90958ed993fa..eeca2f51fd8f 100644
--- a/include/asm-x86/gart.h
+++ b/include/asm-x86/gart.h
@@ -1,16 +1,20 @@
1#ifndef _ASM_X8664_IOMMU_H 1#ifndef _ASM_X8664_IOMMU_H
2#define _ASM_X8664_IOMMU_H 1 2#define _ASM_X8664_IOMMU_H 1
3 3
4#include <asm/e820.h>
5
4extern void pci_iommu_shutdown(void); 6extern void pci_iommu_shutdown(void);
5extern void no_iommu_init(void); 7extern void no_iommu_init(void);
6extern int force_iommu, no_iommu; 8extern int force_iommu, no_iommu;
7extern int iommu_detected; 9extern int iommu_detected;
10extern int agp_amd64_init(void);
8#ifdef CONFIG_GART_IOMMU 11#ifdef CONFIG_GART_IOMMU
9extern void gart_iommu_init(void); 12extern void gart_iommu_init(void);
10extern void gart_iommu_shutdown(void); 13extern void gart_iommu_shutdown(void);
11extern void __init gart_parse_options(char *); 14extern void __init gart_parse_options(char *);
12extern void early_gart_iommu_check(void); 15extern void early_gart_iommu_check(void);
13extern void gart_iommu_hole_init(void); 16extern void gart_iommu_hole_init(void);
17extern void set_up_gart_resume(u32, u32);
14extern int fallback_aper_order; 18extern int fallback_aper_order;
15extern int fallback_aper_force; 19extern int fallback_aper_force;
16extern int gart_iommu_aperture; 20extern int gart_iommu_aperture;
@@ -31,4 +35,63 @@ static inline void gart_iommu_shutdown(void)
31 35
32#endif 36#endif
33 37
38/* PTE bits. */
39#define GPTE_VALID 1
40#define GPTE_COHERENT 2
41
42/* Aperture control register bits. */
43#define GARTEN (1<<0)
44#define DISGARTCPU (1<<4)
45#define DISGARTIO (1<<5)
46
47/* GART cache control register bits. */
48#define INVGART (1<<0)
49#define GARTPTEERR (1<<1)
50
51/* K8 On-cpu GART registers */
52#define AMD64_GARTAPERTURECTL 0x90
53#define AMD64_GARTAPERTUREBASE 0x94
54#define AMD64_GARTTABLEBASE 0x98
55#define AMD64_GARTCACHECTL 0x9c
56#define AMD64_GARTEN (1<<0)
57
58static inline void enable_gart_translation(struct pci_dev *dev, u64 addr)
59{
60 u32 tmp, ctl;
61
62 /* address of the mappings table */
63 addr >>= 12;
64 tmp = (u32) addr<<4;
65 tmp &= ~0xf;
66 pci_write_config_dword(dev, AMD64_GARTTABLEBASE, tmp);
67
68 /* Enable GART translation for this hammer. */
69 pci_read_config_dword(dev, AMD64_GARTAPERTURECTL, &ctl);
70 ctl |= GARTEN;
71 ctl &= ~(DISGARTCPU | DISGARTIO);
72 pci_write_config_dword(dev, AMD64_GARTAPERTURECTL, ctl);
73}
74
75static inline int aperture_valid(u64 aper_base, u32 aper_size, u32 min_size)
76{
77 if (!aper_base)
78 return 0;
79
80 if (aper_base + aper_size > 0x100000000ULL) {
81 printk(KERN_ERR "Aperture beyond 4GB. Ignoring.\n");
82 return 0;
83 }
84 if (e820_any_mapped(aper_base, aper_base + aper_size, E820_RAM)) {
85 printk(KERN_ERR "Aperture pointing to e820 RAM. Ignoring.\n");
86 return 0;
87 }
88 if (aper_size < min_size) {
89 printk(KERN_ERR "Aperture too small (%d MB) than (%d MB)\n",
90 aper_size>>20, min_size>>20);
91 return 0;
92 }
93
94 return 1;
95}
96
34#endif 97#endif
diff --git a/include/asm-x86/geode.h b/include/asm-x86/geode.h
index 6e6458853a36..bb06027fc83e 100644
--- a/include/asm-x86/geode.h
+++ b/include/asm-x86/geode.h
@@ -112,8 +112,8 @@ extern int geode_get_dev_base(unsigned int dev);
112#define VSA_VR_UNLOCK 0xFC53 /* unlock virtual register */ 112#define VSA_VR_UNLOCK 0xFC53 /* unlock virtual register */
113#define VSA_VR_SIGNATURE 0x0003 113#define VSA_VR_SIGNATURE 0x0003
114#define VSA_VR_MEM_SIZE 0x0200 114#define VSA_VR_MEM_SIZE 0x0200
115#define VSA_SIG 0x4132 /* signature is ascii 'VSA2' */ 115#define AMD_VSA_SIG 0x4132 /* signature is ascii 'VSA2' */
116 116#define GSW_VSA_SIG 0x534d /* General Software signature */
117/* GPIO */ 117/* GPIO */
118 118
119#define GPIO_OUTPUT_VAL 0x00 119#define GPIO_OUTPUT_VAL 0x00
diff --git a/include/asm-x86/hardirq.h b/include/asm-x86/hardirq.h
index 314434d664e7..000787df66e6 100644
--- a/include/asm-x86/hardirq.h
+++ b/include/asm-x86/hardirq.h
@@ -3,3 +3,9 @@
3#else 3#else
4# include "hardirq_64.h" 4# include "hardirq_64.h"
5#endif 5#endif
6
7extern u64 arch_irq_stat_cpu(unsigned int cpu);
8#define arch_irq_stat_cpu arch_irq_stat_cpu
9
10extern u64 arch_irq_stat(void);
11#define arch_irq_stat arch_irq_stat
diff --git a/include/asm-x86/i387.h b/include/asm-x86/i387.h
index 6b722d315936..37672f79dcc8 100644
--- a/include/asm-x86/i387.h
+++ b/include/asm-x86/i387.h
@@ -193,6 +193,8 @@ static inline int restore_i387(struct _fpstate __user *buf)
193 193
194#else /* CONFIG_X86_32 */ 194#else /* CONFIG_X86_32 */
195 195
196extern void finit(void);
197
196static inline void tolerant_fwait(void) 198static inline void tolerant_fwait(void)
197{ 199{
198 asm volatile("fnclex ; fwait"); 200 asm volatile("fnclex ; fwait");
diff --git a/include/asm-x86/i8259.h b/include/asm-x86/i8259.h
index 45d4df3e51e6..2f98df91f1f2 100644
--- a/include/asm-x86/i8259.h
+++ b/include/asm-x86/i8259.h
@@ -55,4 +55,6 @@ static inline void outb_pic(unsigned char value, unsigned int port)
55 udelay(2); 55 udelay(2);
56} 56}
57 57
58extern struct irq_chip i8259A_chip;
59
58#endif /* __ASM_I8259_H__ */ 60#endif /* __ASM_I8259_H__ */
diff --git a/include/asm-x86/io_apic.h b/include/asm-x86/io_apic.h
index d593e14f0341..dc0f55f2b034 100644
--- a/include/asm-x86/io_apic.h
+++ b/include/asm-x86/io_apic.h
@@ -11,6 +11,15 @@
11 * Copyright (C) 1997, 1998, 1999, 2000 Ingo Molnar 11 * Copyright (C) 1997, 1998, 1999, 2000 Ingo Molnar
12 */ 12 */
13 13
14/* I/O Unit Redirection Table */
15#define IO_APIC_REDIR_VECTOR_MASK 0x000FF
16#define IO_APIC_REDIR_DEST_LOGICAL 0x00800
17#define IO_APIC_REDIR_DEST_PHYSICAL 0x00000
18#define IO_APIC_REDIR_SEND_PENDING (1 << 12)
19#define IO_APIC_REDIR_REMOTE_IRR (1 << 14)
20#define IO_APIC_REDIR_LEVEL_TRIGGER (1 << 15)
21#define IO_APIC_REDIR_MASKED (1 << 16)
22
14/* 23/*
15 * The structure of the IO-APIC: 24 * The structure of the IO-APIC:
16 */ 25 */
@@ -137,6 +146,9 @@ extern int sis_apic_bug;
137/* 1 if "noapic" boot option passed */ 146/* 1 if "noapic" boot option passed */
138extern int skip_ioapic_setup; 147extern int skip_ioapic_setup;
139 148
149/* 1 if the timer IRQ uses the '8259A Virtual Wire' mode */
150extern int timer_through_8259;
151
140static inline void disable_ioapic_setup(void) 152static inline void disable_ioapic_setup(void)
141{ 153{
142 skip_ioapic_setup = 1; 154 skip_ioapic_setup = 1;
@@ -162,6 +174,7 @@ extern void ioapic_init_mappings(void);
162 174
163#else /* !CONFIG_X86_IO_APIC */ 175#else /* !CONFIG_X86_IO_APIC */
164#define io_apic_assign_pci_irqs 0 176#define io_apic_assign_pci_irqs 0
177static const int timer_through_8259 = 0;
165#endif 178#endif
166 179
167#endif 180#endif
diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h
index 1d8cd01fa514..844f2a89afbc 100644
--- a/include/asm-x86/kvm_host.h
+++ b/include/asm-x86/kvm_host.h
@@ -18,6 +18,7 @@
18#include <linux/kvm_para.h> 18#include <linux/kvm_para.h>
19#include <linux/kvm_types.h> 19#include <linux/kvm_types.h>
20 20
21#include <asm/pvclock-abi.h>
21#include <asm/desc.h> 22#include <asm/desc.h>
22 23
23#define KVM_MAX_VCPUS 16 24#define KVM_MAX_VCPUS 16
@@ -282,7 +283,8 @@ struct kvm_vcpu_arch {
282 struct x86_emulate_ctxt emulate_ctxt; 283 struct x86_emulate_ctxt emulate_ctxt;
283 284
284 gpa_t time; 285 gpa_t time;
285 struct kvm_vcpu_time_info hv_clock; 286 struct pvclock_vcpu_time_info hv_clock;
287 unsigned int hv_clock_tsc_khz;
286 unsigned int time_offset; 288 unsigned int time_offset;
287 struct page *time_page; 289 struct page *time_page;
288}; 290};
diff --git a/include/asm-x86/kvm_para.h b/include/asm-x86/kvm_para.h
index 509845942070..76f392146daa 100644
--- a/include/asm-x86/kvm_para.h
+++ b/include/asm-x86/kvm_para.h
@@ -48,24 +48,6 @@ struct kvm_mmu_op_release_pt {
48#ifdef __KERNEL__ 48#ifdef __KERNEL__
49#include <asm/processor.h> 49#include <asm/processor.h>
50 50
51/* xen binary-compatible interface. See xen headers for details */
52struct kvm_vcpu_time_info {
53 uint32_t version;
54 uint32_t pad0;
55 uint64_t tsc_timestamp;
56 uint64_t system_time;
57 uint32_t tsc_to_system_mul;
58 int8_t tsc_shift;
59 int8_t pad[3];
60} __attribute__((__packed__)); /* 32 bytes */
61
62struct kvm_wall_clock {
63 uint32_t wc_version;
64 uint32_t wc_sec;
65 uint32_t wc_nsec;
66} __attribute__((__packed__));
67
68
69extern void kvmclock_init(void); 51extern void kvmclock_init(void);
70 52
71 53
@@ -89,7 +71,8 @@ static inline long kvm_hypercall0(unsigned int nr)
89 long ret; 71 long ret;
90 asm volatile(KVM_HYPERCALL 72 asm volatile(KVM_HYPERCALL
91 : "=a"(ret) 73 : "=a"(ret)
92 : "a"(nr)); 74 : "a"(nr)
75 : "memory");
93 return ret; 76 return ret;
94} 77}
95 78
@@ -98,7 +81,8 @@ static inline long kvm_hypercall1(unsigned int nr, unsigned long p1)
98 long ret; 81 long ret;
99 asm volatile(KVM_HYPERCALL 82 asm volatile(KVM_HYPERCALL
100 : "=a"(ret) 83 : "=a"(ret)
101 : "a"(nr), "b"(p1)); 84 : "a"(nr), "b"(p1)
85 : "memory");
102 return ret; 86 return ret;
103} 87}
104 88
@@ -108,7 +92,8 @@ static inline long kvm_hypercall2(unsigned int nr, unsigned long p1,
108 long ret; 92 long ret;
109 asm volatile(KVM_HYPERCALL 93 asm volatile(KVM_HYPERCALL
110 : "=a"(ret) 94 : "=a"(ret)
111 : "a"(nr), "b"(p1), "c"(p2)); 95 : "a"(nr), "b"(p1), "c"(p2)
96 : "memory");
112 return ret; 97 return ret;
113} 98}
114 99
@@ -118,7 +103,8 @@ static inline long kvm_hypercall3(unsigned int nr, unsigned long p1,
118 long ret; 103 long ret;
119 asm volatile(KVM_HYPERCALL 104 asm volatile(KVM_HYPERCALL
120 : "=a"(ret) 105 : "=a"(ret)
121 : "a"(nr), "b"(p1), "c"(p2), "d"(p3)); 106 : "a"(nr), "b"(p1), "c"(p2), "d"(p3)
107 : "memory");
122 return ret; 108 return ret;
123} 109}
124 110
@@ -129,7 +115,8 @@ static inline long kvm_hypercall4(unsigned int nr, unsigned long p1,
129 long ret; 115 long ret;
130 asm volatile(KVM_HYPERCALL 116 asm volatile(KVM_HYPERCALL
131 : "=a"(ret) 117 : "=a"(ret)
132 : "a"(nr), "b"(p1), "c"(p2), "d"(p3), "S"(p4)); 118 : "a"(nr), "b"(p1), "c"(p2), "d"(p3), "S"(p4)
119 : "memory");
133 return ret; 120 return ret;
134} 121}
135 122
diff --git a/include/asm-x86/mach-default/smpboot_hooks.h b/include/asm-x86/mach-default/smpboot_hooks.h
index 56d0e1fa0258..b63c52182006 100644
--- a/include/asm-x86/mach-default/smpboot_hooks.h
+++ b/include/asm-x86/mach-default/smpboot_hooks.h
@@ -41,8 +41,10 @@ static inline void __init smpboot_setup_io_apic(void)
41 */ 41 */
42 if (!skip_ioapic_setup && nr_ioapics) 42 if (!skip_ioapic_setup && nr_ioapics)
43 setup_IO_APIC(); 43 setup_IO_APIC();
44 else 44 else {
45 nr_ioapics = 0; 45 nr_ioapics = 0;
46 localise_nmi_watchdog();
47 }
46} 48}
47 49
48static inline void smpboot_clear_io_apic(void) 50static inline void smpboot_clear_io_apic(void)
diff --git a/include/asm-x86/mmconfig.h b/include/asm-x86/mmconfig.h
new file mode 100644
index 000000000000..95beda07c6fa
--- /dev/null
+++ b/include/asm-x86/mmconfig.h
@@ -0,0 +1,12 @@
1#ifndef _ASM_MMCONFIG_H
2#define _ASM_MMCONFIG_H
3
4#ifdef CONFIG_PCI_MMCONFIG
5extern void __cpuinit fam10h_check_enable_mmcfg(void);
6extern void __init check_enable_amd_mmconf_dmi(void);
7#else
8static inline void fam10h_check_enable_mmcfg(void) { }
9static inline void check_enable_amd_mmconf_dmi(void) { }
10#endif
11
12#endif
diff --git a/include/asm-x86/msr-index.h b/include/asm-x86/msr-index.h
index 09413ad39d3c..44bce773012e 100644
--- a/include/asm-x86/msr-index.h
+++ b/include/asm-x86/msr-index.h
@@ -111,7 +111,9 @@
111#define MSR_K8_TOP_MEM2 0xc001001d 111#define MSR_K8_TOP_MEM2 0xc001001d
112#define MSR_K8_SYSCFG 0xc0010010 112#define MSR_K8_SYSCFG 0xc0010010
113#define MSR_K8_HWCR 0xc0010015 113#define MSR_K8_HWCR 0xc0010015
114#define MSR_K8_ENABLE_C1E 0xc0010055 114#define MSR_K8_INT_PENDING_MSG 0xc0010055
115/* C1E active bits in int pending message */
116#define K8_INTP_C1E_ACTIVE_MASK 0x18000000
115#define MSR_K8_TSEG_ADDR 0xc0010112 117#define MSR_K8_TSEG_ADDR 0xc0010112
116#define K8_MTRRFIXRANGE_DRAM_ENABLE 0x00040000 /* MtrrFixDramEn bit */ 118#define K8_MTRRFIXRANGE_DRAM_ENABLE 0x00040000 /* MtrrFixDramEn bit */
117#define K8_MTRRFIXRANGE_DRAM_MODIFY 0x00080000 /* MtrrFixDramModEn bit */ 119#define K8_MTRRFIXRANGE_DRAM_MODIFY 0x00080000 /* MtrrFixDramModEn bit */
diff --git a/include/asm-x86/msr.h b/include/asm-x86/msr.h
index 3707650a169b..2b5f2c91db25 100644
--- a/include/asm-x86/msr.h
+++ b/include/asm-x86/msr.h
@@ -18,7 +18,7 @@ static inline unsigned long long native_read_tscp(unsigned int *aux)
18 unsigned long low, high; 18 unsigned long low, high;
19 asm volatile(".byte 0x0f,0x01,0xf9" 19 asm volatile(".byte 0x0f,0x01,0xf9"
20 : "=a" (low), "=d" (high), "=c" (*aux)); 20 : "=a" (low), "=d" (high), "=c" (*aux));
21 return low | ((u64)high >> 32); 21 return low | ((u64)high << 32);
22} 22}
23 23
24/* 24/*
diff --git a/include/asm-x86/nmi.h b/include/asm-x86/nmi.h
index 1e363021e72f..05449ef830a7 100644
--- a/include/asm-x86/nmi.h
+++ b/include/asm-x86/nmi.h
@@ -15,27 +15,6 @@
15 */ 15 */
16int do_nmi_callback(struct pt_regs *regs, int cpu); 16int do_nmi_callback(struct pt_regs *regs, int cpu);
17 17
18#ifdef CONFIG_PM
19
20/** Replace the PM callback routine for NMI. */
21struct pm_dev *set_nmi_pm_callback(pm_callback callback);
22
23/** Unset the PM callback routine back to the default. */
24void unset_nmi_pm_callback(struct pm_dev *dev);
25
26#else
27
28static inline struct pm_dev *set_nmi_pm_callback(pm_callback callback)
29{
30 return 0;
31}
32
33static inline void unset_nmi_pm_callback(struct pm_dev *dev)
34{
35}
36
37#endif /* CONFIG_PM */
38
39#ifdef CONFIG_X86_64 18#ifdef CONFIG_X86_64
40extern void default_do_nmi(struct pt_regs *); 19extern void default_do_nmi(struct pt_regs *);
41extern void die_nmi(char *str, struct pt_regs *regs, int do_panic); 20extern void die_nmi(char *str, struct pt_regs *regs, int do_panic);
@@ -46,7 +25,6 @@ extern void nmi_watchdog_default(void);
46 25
47extern int check_nmi_watchdog(void); 26extern int check_nmi_watchdog(void);
48extern int nmi_watchdog_enabled; 27extern int nmi_watchdog_enabled;
49extern int unknown_nmi_panic;
50extern int avail_to_resrv_perfctr_nmi_bit(unsigned int); 28extern int avail_to_resrv_perfctr_nmi_bit(unsigned int);
51extern int avail_to_resrv_perfctr_nmi(unsigned int); 29extern int avail_to_resrv_perfctr_nmi(unsigned int);
52extern int reserve_perfctr_nmi(unsigned int); 30extern int reserve_perfctr_nmi(unsigned int);
@@ -78,6 +56,11 @@ extern int unknown_nmi_panic;
78void __trigger_all_cpu_backtrace(void); 56void __trigger_all_cpu_backtrace(void);
79#define trigger_all_cpu_backtrace() __trigger_all_cpu_backtrace() 57#define trigger_all_cpu_backtrace() __trigger_all_cpu_backtrace()
80 58
59static inline void localise_nmi_watchdog(void)
60{
61 if (nmi_watchdog == NMI_IO_APIC)
62 nmi_watchdog = NMI_LOCAL_APIC;
63}
81#endif 64#endif
82 65
83void lapic_watchdog_stop(void); 66void lapic_watchdog_stop(void);
diff --git a/include/asm-x86/page.h b/include/asm-x86/page.h
index b381f4a5a0bd..b52ed85f32f5 100644
--- a/include/asm-x86/page.h
+++ b/include/asm-x86/page.h
@@ -10,8 +10,16 @@
10 10
11#ifdef __KERNEL__ 11#ifdef __KERNEL__
12 12
13#define PHYSICAL_PAGE_MASK (PAGE_MASK & __PHYSICAL_MASK) 13#define __PHYSICAL_MASK ((phys_addr_t)(1ULL << __PHYSICAL_MASK_SHIFT) - 1)
14#define PTE_MASK (_AT(long, PHYSICAL_PAGE_MASK)) 14#define __VIRTUAL_MASK ((1UL << __VIRTUAL_MASK_SHIFT) - 1)
15
16/* Cast PAGE_MASK to a signed type so that it is sign-extended if
17 virtual addresses are 32-bits but physical addresses are larger
18 (ie, 32-bit PAE). */
19#define PHYSICAL_PAGE_MASK (((signed long)PAGE_MASK) & __PHYSICAL_MASK)
20
21/* PTE_MASK extracts the PFN from a (pte|pmd|pud|pgd)val_t */
22#define PTE_MASK ((pteval_t)PHYSICAL_PAGE_MASK)
15 23
16#define PMD_PAGE_SIZE (_AC(1, UL) << PMD_SHIFT) 24#define PMD_PAGE_SIZE (_AC(1, UL) << PMD_SHIFT)
17#define PMD_PAGE_MASK (~(PMD_PAGE_SIZE-1)) 25#define PMD_PAGE_MASK (~(PMD_PAGE_SIZE-1))
@@ -24,9 +32,6 @@
24/* to align the pointer to the (next) page boundary */ 32/* to align the pointer to the (next) page boundary */
25#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) 33#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)
26 34
27#define __PHYSICAL_MASK _AT(phys_addr_t, (_AC(1,ULL) << __PHYSICAL_MASK_SHIFT) - 1)
28#define __VIRTUAL_MASK ((_AC(1,UL) << __VIRTUAL_MASK_SHIFT) - 1)
29
30#ifndef __ASSEMBLY__ 35#ifndef __ASSEMBLY__
31#include <linux/types.h> 36#include <linux/types.h>
32#endif 37#endif
@@ -46,8 +51,15 @@
46 51
47#ifndef __ASSEMBLY__ 52#ifndef __ASSEMBLY__
48 53
54typedef struct { pgdval_t pgd; } pgd_t;
55typedef struct { pgprotval_t pgprot; } pgprot_t;
56
49extern int page_is_ram(unsigned long pagenr); 57extern int page_is_ram(unsigned long pagenr);
50extern int devmem_is_allowed(unsigned long pagenr); 58extern int devmem_is_allowed(unsigned long pagenr);
59extern void map_devmem(unsigned long pfn, unsigned long size,
60 pgprot_t vma_prot);
61extern void unmap_devmem(unsigned long pfn, unsigned long size,
62 pgprot_t vma_prot);
51 63
52extern unsigned long max_pfn_mapped; 64extern unsigned long max_pfn_mapped;
53 65
@@ -69,9 +81,6 @@ static inline void copy_user_page(void *to, void *from, unsigned long vaddr,
69 alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO | movableflags, vma, vaddr) 81 alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO | movableflags, vma, vaddr)
70#define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE 82#define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE
71 83
72typedef struct { pgdval_t pgd; } pgd_t;
73typedef struct { pgprotval_t pgprot; } pgprot_t;
74
75static inline pgd_t native_make_pgd(pgdval_t val) 84static inline pgd_t native_make_pgd(pgdval_t val)
76{ 85{
77 return (pgd_t) { val }; 86 return (pgd_t) { val };
@@ -155,6 +164,7 @@ static inline pteval_t native_pte_val(pte_t pte)
155#endif 164#endif
156 165
157#define pte_val(x) native_pte_val(x) 166#define pte_val(x) native_pte_val(x)
167#define pte_flags(x) native_pte_val(x)
158#define __pte(x) native_make_pte(x) 168#define __pte(x) native_make_pte(x)
159 169
160#endif /* CONFIG_PARAVIRT */ 170#endif /* CONFIG_PARAVIRT */
diff --git a/include/asm-x86/page_32.h b/include/asm-x86/page_32.h
index 424e82f8ae27..73ed2e4ebf95 100644
--- a/include/asm-x86/page_32.h
+++ b/include/asm-x86/page_32.h
@@ -13,8 +13,17 @@
13 */ 13 */
14#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL) 14#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
15 15
16#ifdef CONFIG_4KSTACKS
17#define THREAD_ORDER 0
18#else
19#define THREAD_ORDER 1
20#endif
21#define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER)
22
23
16#ifdef CONFIG_X86_PAE 24#ifdef CONFIG_X86_PAE
17#define __PHYSICAL_MASK_SHIFT 36 25/* 44=32+12, the limit we can fit into an unsigned long pfn */
26#define __PHYSICAL_MASK_SHIFT 44
18#define __VIRTUAL_MASK_SHIFT 32 27#define __VIRTUAL_MASK_SHIFT 32
19#define PAGETABLE_LEVELS 3 28#define PAGETABLE_LEVELS 3
20 29
diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h
index 0f13b945e240..e9ada314dfc1 100644
--- a/include/asm-x86/paravirt.h
+++ b/include/asm-x86/paravirt.h
@@ -238,7 +238,13 @@ struct pv_mmu_ops {
238 void (*pte_update_defer)(struct mm_struct *mm, 238 void (*pte_update_defer)(struct mm_struct *mm,
239 unsigned long addr, pte_t *ptep); 239 unsigned long addr, pte_t *ptep);
240 240
241 pte_t (*ptep_modify_prot_start)(struct mm_struct *mm, unsigned long addr,
242 pte_t *ptep);
243 void (*ptep_modify_prot_commit)(struct mm_struct *mm, unsigned long addr,
244 pte_t *ptep, pte_t pte);
245
241 pteval_t (*pte_val)(pte_t); 246 pteval_t (*pte_val)(pte_t);
247 pteval_t (*pte_flags)(pte_t);
242 pte_t (*make_pte)(pteval_t pte); 248 pte_t (*make_pte)(pteval_t pte);
243 249
244 pgdval_t (*pgd_val)(pgd_t); 250 pgdval_t (*pgd_val)(pgd_t);
@@ -996,6 +1002,20 @@ static inline pteval_t pte_val(pte_t pte)
996 return ret; 1002 return ret;
997} 1003}
998 1004
1005static inline pteval_t pte_flags(pte_t pte)
1006{
1007 pteval_t ret;
1008
1009 if (sizeof(pteval_t) > sizeof(long))
1010 ret = PVOP_CALL2(pteval_t, pv_mmu_ops.pte_flags,
1011 pte.pte, (u64)pte.pte >> 32);
1012 else
1013 ret = PVOP_CALL1(pteval_t, pv_mmu_ops.pte_flags,
1014 pte.pte);
1015
1016 return ret;
1017}
1018
999static inline pgd_t __pgd(pgdval_t val) 1019static inline pgd_t __pgd(pgdval_t val)
1000{ 1020{
1001 pgdval_t ret; 1021 pgdval_t ret;
@@ -1024,6 +1044,29 @@ static inline pgdval_t pgd_val(pgd_t pgd)
1024 return ret; 1044 return ret;
1025} 1045}
1026 1046
1047#define __HAVE_ARCH_PTEP_MODIFY_PROT_TRANSACTION
1048static inline pte_t ptep_modify_prot_start(struct mm_struct *mm, unsigned long addr,
1049 pte_t *ptep)
1050{
1051 pteval_t ret;
1052
1053 ret = PVOP_CALL3(pteval_t, pv_mmu_ops.ptep_modify_prot_start,
1054 mm, addr, ptep);
1055
1056 return (pte_t) { .pte = ret };
1057}
1058
1059static inline void ptep_modify_prot_commit(struct mm_struct *mm, unsigned long addr,
1060 pte_t *ptep, pte_t pte)
1061{
1062 if (sizeof(pteval_t) > sizeof(long))
1063 /* 5 arg words */
1064 pv_mmu_ops.ptep_modify_prot_commit(mm, addr, ptep, pte);
1065 else
1066 PVOP_VCALL4(pv_mmu_ops.ptep_modify_prot_commit,
1067 mm, addr, ptep, pte.pte);
1068}
1069
1027static inline void set_pte(pte_t *ptep, pte_t pte) 1070static inline void set_pte(pte_t *ptep, pte_t pte)
1028{ 1071{
1029 if (sizeof(pteval_t) > sizeof(long)) 1072 if (sizeof(pteval_t) > sizeof(long))
diff --git a/include/asm-x86/pat.h b/include/asm-x86/pat.h
index 88f60cc6a227..7edc47307217 100644
--- a/include/asm-x86/pat.h
+++ b/include/asm-x86/pat.h
@@ -1,14 +1,13 @@
1
2#ifndef _ASM_PAT_H 1#ifndef _ASM_PAT_H
3#define _ASM_PAT_H 1 2#define _ASM_PAT_H
4 3
5#include <linux/types.h> 4#include <linux/types.h>
6 5
7#ifdef CONFIG_X86_PAT 6#ifdef CONFIG_X86_PAT
8extern int pat_wc_enabled; 7extern int pat_enabled;
9extern void validate_pat_support(struct cpuinfo_x86 *c); 8extern void validate_pat_support(struct cpuinfo_x86 *c);
10#else 9#else
11static const int pat_wc_enabled = 0; 10static const int pat_enabled;
12static inline void validate_pat_support(struct cpuinfo_x86 *c) { } 11static inline void validate_pat_support(struct cpuinfo_x86 *c) { }
13#endif 12#endif
14 13
@@ -21,4 +20,3 @@ extern int free_memtype(u64 start, u64 end);
21extern void pat_disable(char *reason); 20extern void pat_disable(char *reason);
22 21
23#endif 22#endif
24
diff --git a/include/asm-x86/pci.h b/include/asm-x86/pci.h
index 30bbde0cb34b..2db14cf17db8 100644
--- a/include/asm-x86/pci.h
+++ b/include/asm-x86/pci.h
@@ -18,6 +18,8 @@ struct pci_sysdata {
18#endif 18#endif
19}; 19};
20 20
21extern int pci_routeirq;
22
21/* scan a bus after allocating a pci_sysdata for it */ 23/* scan a bus after allocating a pci_sysdata for it */
22extern struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops, 24extern struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops,
23 int node); 25 int node);
diff --git a/include/asm-x86/pci_32.h b/include/asm-x86/pci_32.h
index 8c4c3a0368e2..a50d46851285 100644
--- a/include/asm-x86/pci_32.h
+++ b/include/asm-x86/pci_32.h
@@ -18,12 +18,14 @@ struct pci_dev;
18#define PCI_DMA_BUS_IS_PHYS (1) 18#define PCI_DMA_BUS_IS_PHYS (1)
19 19
20/* pci_unmap_{page,single} is a nop so... */ 20/* pci_unmap_{page,single} is a nop so... */
21#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) 21#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME[0];
22#define DECLARE_PCI_UNMAP_LEN(LEN_NAME) 22#define DECLARE_PCI_UNMAP_LEN(LEN_NAME) unsigned LEN_NAME[0];
23#define pci_unmap_addr(PTR, ADDR_NAME) (0) 23#define pci_unmap_addr(PTR, ADDR_NAME) sizeof((PTR)->ADDR_NAME)
24#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0) 24#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) \
25#define pci_unmap_len(PTR, LEN_NAME) (0) 25 do { break; } while (pci_unmap_addr(PTR, ADDR_NAME))
26#define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) 26#define pci_unmap_len(PTR, LEN_NAME) sizeof((PTR)->LEN_NAME)
27#define pci_unmap_len_set(PTR, LEN_NAME, VAL) \
28 do { break; } while (pci_unmap_len(PTR, LEN_NAME))
27 29
28 30
29#endif /* __KERNEL__ */ 31#endif /* __KERNEL__ */
diff --git a/include/asm-x86/pgtable-3level.h b/include/asm-x86/pgtable-3level.h
index 8b4a9d44b7f4..c93dbb6c2624 100644
--- a/include/asm-x86/pgtable-3level.h
+++ b/include/asm-x86/pgtable-3level.h
@@ -120,9 +120,9 @@ static inline void pud_clear(pud_t *pudp)
120 write_cr3(pgd); 120 write_cr3(pgd);
121} 121}
122 122
123#define pud_page(pud) ((struct page *) __va(pud_val(pud) & PAGE_MASK)) 123#define pud_page(pud) ((struct page *) __va(pud_val(pud) & PTE_MASK))
124 124
125#define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PAGE_MASK)) 125#define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PTE_MASK))
126 126
127 127
128/* Find an entry in the second-level page table.. */ 128/* Find an entry in the second-level page table.. */
@@ -160,7 +160,7 @@ static inline int pte_none(pte_t pte)
160 160
161static inline unsigned long pte_pfn(pte_t pte) 161static inline unsigned long pte_pfn(pte_t pte)
162{ 162{
163 return (pte_val(pte) & ~_PAGE_NX) >> PAGE_SHIFT; 163 return (pte_val(pte) & PTE_MASK) >> PAGE_SHIFT;
164} 164}
165 165
166/* 166/*
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h
index 55c3a0e3a8ce..bcb5446a08d1 100644
--- a/include/asm-x86/pgtable.h
+++ b/include/asm-x86/pgtable.h
@@ -20,30 +20,25 @@
20#define _PAGE_BIT_PAT_LARGE 12 /* On 2MB or 1GB pages */ 20#define _PAGE_BIT_PAT_LARGE 12 /* On 2MB or 1GB pages */
21#define _PAGE_BIT_NX 63 /* No execute: only valid after cpuid check */ 21#define _PAGE_BIT_NX 63 /* No execute: only valid after cpuid check */
22 22
23/* 23#define _PAGE_PRESENT (_AT(pteval_t, 1) << _PAGE_BIT_PRESENT)
24 * Note: we use _AC(1, L) instead of _AC(1, UL) so that we get a 24#define _PAGE_RW (_AT(pteval_t, 1) << _PAGE_BIT_RW)
25 * sign-extended value on 32-bit with all 1's in the upper word, 25#define _PAGE_USER (_AT(pteval_t, 1) << _PAGE_BIT_USER)
26 * which preserves the upper pte values on 64-bit ptes: 26#define _PAGE_PWT (_AT(pteval_t, 1) << _PAGE_BIT_PWT)
27 */ 27#define _PAGE_PCD (_AT(pteval_t, 1) << _PAGE_BIT_PCD)
28#define _PAGE_PRESENT (_AC(1, L)<<_PAGE_BIT_PRESENT) 28#define _PAGE_ACCESSED (_AT(pteval_t, 1) << _PAGE_BIT_ACCESSED)
29#define _PAGE_RW (_AC(1, L)<<_PAGE_BIT_RW) 29#define _PAGE_DIRTY (_AT(pteval_t, 1) << _PAGE_BIT_DIRTY)
30#define _PAGE_USER (_AC(1, L)<<_PAGE_BIT_USER) 30#define _PAGE_PSE (_AT(pteval_t, 1) << _PAGE_BIT_PSE)
31#define _PAGE_PWT (_AC(1, L)<<_PAGE_BIT_PWT) 31#define _PAGE_GLOBAL (_AT(pteval_t, 1) << _PAGE_BIT_GLOBAL)
32#define _PAGE_PCD (_AC(1, L)<<_PAGE_BIT_PCD) 32#define _PAGE_UNUSED1 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED1)
33#define _PAGE_ACCESSED (_AC(1, L)<<_PAGE_BIT_ACCESSED) 33#define _PAGE_UNUSED2 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED2)
34#define _PAGE_DIRTY (_AC(1, L)<<_PAGE_BIT_DIRTY) 34#define _PAGE_UNUSED3 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED3)
35#define _PAGE_PSE (_AC(1, L)<<_PAGE_BIT_PSE) /* 2MB page */ 35#define _PAGE_PAT (_AT(pteval_t, 1) << _PAGE_BIT_PAT)
36#define _PAGE_GLOBAL (_AC(1, L)<<_PAGE_BIT_GLOBAL) /* Global TLB entry */ 36#define _PAGE_PAT_LARGE (_AT(pteval_t, 1) << _PAGE_BIT_PAT_LARGE)
37#define _PAGE_UNUSED1 (_AC(1, L)<<_PAGE_BIT_UNUSED1)
38#define _PAGE_UNUSED2 (_AC(1, L)<<_PAGE_BIT_UNUSED2)
39#define _PAGE_UNUSED3 (_AC(1, L)<<_PAGE_BIT_UNUSED3)
40#define _PAGE_PAT (_AC(1, L)<<_PAGE_BIT_PAT)
41#define _PAGE_PAT_LARGE (_AC(1, L)<<_PAGE_BIT_PAT_LARGE)
42 37
43#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE) 38#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
44#define _PAGE_NX (_AC(1, ULL) << _PAGE_BIT_NX) 39#define _PAGE_NX (_AT(pteval_t, 1) << _PAGE_BIT_NX)
45#else 40#else
46#define _PAGE_NX 0 41#define _PAGE_NX (_AT(pteval_t, 0))
47#endif 42#endif
48 43
49/* If _PAGE_PRESENT is clear, we use these: */ 44/* If _PAGE_PRESENT is clear, we use these: */
@@ -57,6 +52,7 @@
57#define _KERNPG_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | \ 52#define _KERNPG_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | \
58 _PAGE_DIRTY) 53 _PAGE_DIRTY)
59 54
55/* Set of bits not changed in pte_modify */
60#define _PAGE_CHG_MASK (PTE_MASK | _PAGE_PCD | _PAGE_PWT | \ 56#define _PAGE_CHG_MASK (PTE_MASK | _PAGE_PCD | _PAGE_PWT | \
61 _PAGE_ACCESSED | _PAGE_DIRTY) 57 _PAGE_ACCESSED | _PAGE_DIRTY)
62 58
@@ -163,37 +159,37 @@ extern struct list_head pgd_list;
163 */ 159 */
164static inline int pte_dirty(pte_t pte) 160static inline int pte_dirty(pte_t pte)
165{ 161{
166 return pte_val(pte) & _PAGE_DIRTY; 162 return pte_flags(pte) & _PAGE_DIRTY;
167} 163}
168 164
169static inline int pte_young(pte_t pte) 165static inline int pte_young(pte_t pte)
170{ 166{
171 return pte_val(pte) & _PAGE_ACCESSED; 167 return pte_flags(pte) & _PAGE_ACCESSED;
172} 168}
173 169
174static inline int pte_write(pte_t pte) 170static inline int pte_write(pte_t pte)
175{ 171{
176 return pte_val(pte) & _PAGE_RW; 172 return pte_flags(pte) & _PAGE_RW;
177} 173}
178 174
179static inline int pte_file(pte_t pte) 175static inline int pte_file(pte_t pte)
180{ 176{
181 return pte_val(pte) & _PAGE_FILE; 177 return pte_flags(pte) & _PAGE_FILE;
182} 178}
183 179
184static inline int pte_huge(pte_t pte) 180static inline int pte_huge(pte_t pte)
185{ 181{
186 return pte_val(pte) & _PAGE_PSE; 182 return pte_flags(pte) & _PAGE_PSE;
187} 183}
188 184
189static inline int pte_global(pte_t pte) 185static inline int pte_global(pte_t pte)
190{ 186{
191 return pte_val(pte) & _PAGE_GLOBAL; 187 return pte_flags(pte) & _PAGE_GLOBAL;
192} 188}
193 189
194static inline int pte_exec(pte_t pte) 190static inline int pte_exec(pte_t pte)
195{ 191{
196 return !(pte_val(pte) & _PAGE_NX); 192 return !(pte_flags(pte) & _PAGE_NX);
197} 193}
198 194
199static inline int pte_special(pte_t pte) 195static inline int pte_special(pte_t pte)
@@ -209,22 +205,22 @@ static inline int pmd_large(pmd_t pte)
209 205
210static inline pte_t pte_mkclean(pte_t pte) 206static inline pte_t pte_mkclean(pte_t pte)
211{ 207{
212 return __pte(pte_val(pte) & ~(pteval_t)_PAGE_DIRTY); 208 return __pte(pte_val(pte) & ~_PAGE_DIRTY);
213} 209}
214 210
215static inline pte_t pte_mkold(pte_t pte) 211static inline pte_t pte_mkold(pte_t pte)
216{ 212{
217 return __pte(pte_val(pte) & ~(pteval_t)_PAGE_ACCESSED); 213 return __pte(pte_val(pte) & ~_PAGE_ACCESSED);
218} 214}
219 215
220static inline pte_t pte_wrprotect(pte_t pte) 216static inline pte_t pte_wrprotect(pte_t pte)
221{ 217{
222 return __pte(pte_val(pte) & ~(pteval_t)_PAGE_RW); 218 return __pte(pte_val(pte) & ~_PAGE_RW);
223} 219}
224 220
225static inline pte_t pte_mkexec(pte_t pte) 221static inline pte_t pte_mkexec(pte_t pte)
226{ 222{
227 return __pte(pte_val(pte) & ~(pteval_t)_PAGE_NX); 223 return __pte(pte_val(pte) & ~_PAGE_NX);
228} 224}
229 225
230static inline pte_t pte_mkdirty(pte_t pte) 226static inline pte_t pte_mkdirty(pte_t pte)
@@ -249,7 +245,7 @@ static inline pte_t pte_mkhuge(pte_t pte)
249 245
250static inline pte_t pte_clrhuge(pte_t pte) 246static inline pte_t pte_clrhuge(pte_t pte)
251{ 247{
252 return __pte(pte_val(pte) & ~(pteval_t)_PAGE_PSE); 248 return __pte(pte_val(pte) & ~_PAGE_PSE);
253} 249}
254 250
255static inline pte_t pte_mkglobal(pte_t pte) 251static inline pte_t pte_mkglobal(pte_t pte)
@@ -259,7 +255,7 @@ static inline pte_t pte_mkglobal(pte_t pte)
259 255
260static inline pte_t pte_clrglobal(pte_t pte) 256static inline pte_t pte_clrglobal(pte_t pte)
261{ 257{
262 return __pte(pte_val(pte) & ~(pteval_t)_PAGE_GLOBAL); 258 return __pte(pte_val(pte) & ~_PAGE_GLOBAL);
263} 259}
264 260
265static inline pte_t pte_mkspecial(pte_t pte) 261static inline pte_t pte_mkspecial(pte_t pte)
@@ -304,7 +300,7 @@ static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
304 return __pgprot(preservebits | addbits); 300 return __pgprot(preservebits | addbits);
305} 301}
306 302
307#define pte_pgprot(x) __pgprot(pte_val(x) & (0xfff | _PAGE_NX)) 303#define pte_pgprot(x) __pgprot(pte_flags(x) & ~PTE_MASK)
308 304
309#define canon_pgprot(p) __pgprot(pgprot_val(p) & __supported_pte_mask) 305#define canon_pgprot(p) __pgprot(pgprot_val(p) & __supported_pte_mask)
310 306
@@ -368,8 +364,15 @@ enum {
368 PG_LEVEL_4K, 364 PG_LEVEL_4K,
369 PG_LEVEL_2M, 365 PG_LEVEL_2M,
370 PG_LEVEL_1G, 366 PG_LEVEL_1G,
367 PG_LEVEL_NUM
371}; 368};
372 369
370#ifdef CONFIG_PROC_FS
371extern void update_page_count(int level, unsigned long pages);
372#else
373static inline void update_page_count(int level, unsigned long pages) { }
374#endif
375
373/* 376/*
374 * Helper function that returns the kernel pagetable entry controlling 377 * Helper function that returns the kernel pagetable entry controlling
375 * the virtual address 'address'. NULL means no pagetable entry present. 378 * the virtual address 'address'. NULL means no pagetable entry present.
diff --git a/include/asm-x86/pgtable_32.h b/include/asm-x86/pgtable_32.h
index d7f0403bbecb..32ca03109a4c 100644
--- a/include/asm-x86/pgtable_32.h
+++ b/include/asm-x86/pgtable_32.h
@@ -88,7 +88,7 @@ extern unsigned long pg0[];
88/* To avoid harmful races, pmd_none(x) should check only the lower when PAE */ 88/* To avoid harmful races, pmd_none(x) should check only the lower when PAE */
89#define pmd_none(x) (!(unsigned long)pmd_val((x))) 89#define pmd_none(x) (!(unsigned long)pmd_val((x)))
90#define pmd_present(x) (pmd_val((x)) & _PAGE_PRESENT) 90#define pmd_present(x) (pmd_val((x)) & _PAGE_PRESENT)
91#define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE) 91#define pmd_bad(x) ((pmd_val(x) & (~PTE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE)
92 92
93#define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) 93#define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT))
94 94
@@ -159,7 +159,7 @@ static inline int pud_large(pud_t pud) { return 0; }
159#define pmd_page(pmd) (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT)) 159#define pmd_page(pmd) (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT))
160 160
161#define pmd_page_vaddr(pmd) \ 161#define pmd_page_vaddr(pmd) \
162 ((unsigned long)__va(pmd_val((pmd)) & PAGE_MASK)) 162 ((unsigned long)__va(pmd_val((pmd)) & PTE_MASK))
163 163
164#if defined(CONFIG_HIGHPTE) 164#if defined(CONFIG_HIGHPTE)
165#define pte_offset_map(dir, address) \ 165#define pte_offset_map(dir, address) \
diff --git a/include/asm-x86/pgtable_64.h b/include/asm-x86/pgtable_64.h
index efe83dcbd412..1cc50d22d735 100644
--- a/include/asm-x86/pgtable_64.h
+++ b/include/asm-x86/pgtable_64.h
@@ -151,19 +151,19 @@ static inline void native_pgd_clear(pgd_t *pgd)
151 151
152#ifndef __ASSEMBLY__ 152#ifndef __ASSEMBLY__
153 153
154static inline unsigned long pgd_bad(pgd_t pgd) 154static inline int pgd_bad(pgd_t pgd)
155{ 155{
156 return pgd_val(pgd) & ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER); 156 return (pgd_val(pgd) & ~(PTE_MASK | _PAGE_USER)) != _KERNPG_TABLE;
157} 157}
158 158
159static inline unsigned long pud_bad(pud_t pud) 159static inline int pud_bad(pud_t pud)
160{ 160{
161 return pud_val(pud) & ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER); 161 return (pud_val(pud) & ~(PTE_MASK | _PAGE_USER)) != _KERNPG_TABLE;
162} 162}
163 163
164static inline unsigned long pmd_bad(pmd_t pmd) 164static inline int pmd_bad(pmd_t pmd)
165{ 165{
166 return pmd_val(pmd) & ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER); 166 return (pmd_val(pmd) & ~(PTE_MASK | _PAGE_USER)) != _KERNPG_TABLE;
167} 167}
168 168
169#define pte_none(x) (!pte_val((x))) 169#define pte_none(x) (!pte_val((x)))
diff --git a/include/asm-x86/processor-flags.h b/include/asm-x86/processor-flags.h
index 199cab107d85..092b39b3a7e6 100644
--- a/include/asm-x86/processor-flags.h
+++ b/include/asm-x86/processor-flags.h
@@ -88,4 +88,10 @@
88#define CX86_ARR_BASE 0xc4 88#define CX86_ARR_BASE 0xc4
89#define CX86_RCR_BASE 0xdc 89#define CX86_RCR_BASE 0xdc
90 90
91#ifdef CONFIG_VM86
92#define X86_VM_MASK X86_EFLAGS_VM
93#else
94#define X86_VM_MASK 0 /* No VM86 support */
95#endif
96
91#endif /* __ASM_I386_PROCESSOR_FLAGS_H */ 97#endif /* __ASM_I386_PROCESSOR_FLAGS_H */
diff --git a/include/asm-x86/processor.h b/include/asm-x86/processor.h
index 559105220a47..4ab2ede6f4b9 100644
--- a/include/asm-x86/processor.h
+++ b/include/asm-x86/processor.h
@@ -263,15 +263,11 @@ struct tss_struct {
263 struct thread_struct *io_bitmap_owner; 263 struct thread_struct *io_bitmap_owner;
264 264
265 /* 265 /*
266 * Pad the TSS to be cacheline-aligned (size is 0x100):
267 */
268 unsigned long __cacheline_filler[35];
269 /*
270 * .. and then another 0x100 bytes for the emergency kernel stack: 266 * .. and then another 0x100 bytes for the emergency kernel stack:
271 */ 267 */
272 unsigned long stack[64]; 268 unsigned long stack[64];
273 269
274} __attribute__((packed)); 270} ____cacheline_aligned;
275 271
276DECLARE_PER_CPU(struct tss_struct, init_tss); 272DECLARE_PER_CPU(struct tss_struct, init_tss);
277 273
diff --git a/include/asm-x86/ptrace.h b/include/asm-x86/ptrace.h
index 9f922b0b95d6..8a71db803da6 100644
--- a/include/asm-x86/ptrace.h
+++ b/include/asm-x86/ptrace.h
@@ -3,7 +3,12 @@
3 3
4#include <linux/compiler.h> /* For __user */ 4#include <linux/compiler.h> /* For __user */
5#include <asm/ptrace-abi.h> 5#include <asm/ptrace-abi.h>
6#include <asm/processor-flags.h>
6 7
8#ifdef __KERNEL__
9#include <asm/ds.h> /* the DS BTS struct is used for ptrace too */
10#include <asm/segment.h>
11#endif
7 12
8#ifndef __ASSEMBLY__ 13#ifndef __ASSEMBLY__
9 14
@@ -55,9 +60,6 @@ struct pt_regs {
55 unsigned long ss; 60 unsigned long ss;
56}; 61};
57 62
58#include <asm/vm86.h>
59#include <asm/segment.h>
60
61#endif /* __KERNEL__ */ 63#endif /* __KERNEL__ */
62 64
63#else /* __i386__ */ 65#else /* __i386__ */
diff --git a/include/asm-x86/pvclock-abi.h b/include/asm-x86/pvclock-abi.h
new file mode 100644
index 000000000000..6857f840b243
--- /dev/null
+++ b/include/asm-x86/pvclock-abi.h
@@ -0,0 +1,42 @@
1#ifndef _ASM_X86_PVCLOCK_ABI_H_
2#define _ASM_X86_PVCLOCK_ABI_H_
3#ifndef __ASSEMBLY__
4
5/*
6 * These structs MUST NOT be changed.
7 * They are the ABI between hypervisor and guest OS.
8 * Both Xen and KVM are using this.
9 *
10 * pvclock_vcpu_time_info holds the system time and the tsc timestamp
11 * of the last update. So the guest can use the tsc delta to get a
12 * more precise system time. There is one per virtual cpu.
13 *
14 * pvclock_wall_clock references the point in time when the system
15 * time was zero (usually boot time), thus the guest calculates the
16 * current wall clock by adding the system time.
17 *
18 * Protocol for the "version" fields is: hypervisor raises it (making
19 * it uneven) before it starts updating the fields and raises it again
20 * (making it even) when it is done. Thus the guest can make sure the
21 * time values it got are consistent by checking the version before
22 * and after reading them.
23 */
24
25struct pvclock_vcpu_time_info {
26 u32 version;
27 u32 pad0;
28 u64 tsc_timestamp;
29 u64 system_time;
30 u32 tsc_to_system_mul;
31 s8 tsc_shift;
32 u8 pad[3];
33} __attribute__((__packed__)); /* 32 bytes */
34
35struct pvclock_wall_clock {
36 u32 version;
37 u32 sec;
38 u32 nsec;
39} __attribute__((__packed__));
40
41#endif /* __ASSEMBLY__ */
42#endif /* _ASM_X86_PVCLOCK_ABI_H_ */
diff --git a/include/asm-x86/pvclock.h b/include/asm-x86/pvclock.h
new file mode 100644
index 000000000000..85b1bba8e0a3
--- /dev/null
+++ b/include/asm-x86/pvclock.h
@@ -0,0 +1,13 @@
1#ifndef _ASM_X86_PVCLOCK_H_
2#define _ASM_X86_PVCLOCK_H_
3
4#include <linux/clocksource.h>
5#include <asm/pvclock-abi.h>
6
7/* some helper functions for xen and kvm pv clock sources */
8cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src);
9void pvclock_read_wallclock(struct pvclock_wall_clock *wall,
10 struct pvclock_vcpu_time_info *vcpu,
11 struct timespec *ts);
12
13#endif /* _ASM_X86_PVCLOCK_H_ */
diff --git a/include/asm-x86/reboot.h b/include/asm-x86/reboot.h
index e63741f19392..206f355786dc 100644
--- a/include/asm-x86/reboot.h
+++ b/include/asm-x86/reboot.h
@@ -14,8 +14,8 @@ struct machine_ops {
14 14
15extern struct machine_ops machine_ops; 15extern struct machine_ops machine_ops;
16 16
17void machine_real_restart(unsigned char *code, int length);
18void native_machine_crash_shutdown(struct pt_regs *regs); 17void native_machine_crash_shutdown(struct pt_regs *regs);
19void native_machine_shutdown(void); 18void native_machine_shutdown(void);
19void machine_real_restart(const unsigned char *code, int length);
20 20
21#endif /* _ASM_REBOOT_H */ 21#endif /* _ASM_REBOOT_H */
diff --git a/include/asm-x86/required-features.h b/include/asm-x86/required-features.h
index 7400d3ad75c6..8c387198ca88 100644
--- a/include/asm-x86/required-features.h
+++ b/include/asm-x86/required-features.h
@@ -19,9 +19,13 @@
19 19
20#if defined(CONFIG_X86_PAE) || defined(CONFIG_X86_64) 20#if defined(CONFIG_X86_PAE) || defined(CONFIG_X86_64)
21# define NEED_PAE (1<<(X86_FEATURE_PAE & 31)) 21# define NEED_PAE (1<<(X86_FEATURE_PAE & 31))
22# define NEED_CX8 (1<<(X86_FEATURE_CX8 & 31))
23#else 22#else
24# define NEED_PAE 0 23# define NEED_PAE 0
24#endif
25
26#ifdef CONFIG_X86_CMPXCHG64
27# define NEED_CX8 (1<<(X86_FEATURE_CX8 & 31))
28#else
25# define NEED_CX8 0 29# define NEED_CX8 0
26#endif 30#endif
27 31
diff --git a/include/asm-x86/resume-trace.h b/include/asm-x86/resume-trace.h
index 2557514d7ef6..8d9f0b41ee86 100644
--- a/include/asm-x86/resume-trace.h
+++ b/include/asm-x86/resume-trace.h
@@ -6,7 +6,7 @@
6#define TRACE_RESUME(user) \ 6#define TRACE_RESUME(user) \
7do { \ 7do { \
8 if (pm_trace_enabled) { \ 8 if (pm_trace_enabled) { \
9 void *tracedata; \ 9 const void *tracedata; \
10 asm volatile(_ASM_MOV_UL " $1f,%0\n" \ 10 asm volatile(_ASM_MOV_UL " $1f,%0\n" \
11 ".section .tracedata,\"a\"\n" \ 11 ".section .tracedata,\"a\"\n" \
12 "1:\t.word %c1\n\t" \ 12 "1:\t.word %c1\n\t" \
diff --git a/include/asm-x86/seccomp_32.h b/include/asm-x86/seccomp_32.h
index 18da19e89bff..36e71c5f306f 100644
--- a/include/asm-x86/seccomp_32.h
+++ b/include/asm-x86/seccomp_32.h
@@ -1,4 +1,5 @@
1#ifndef _ASM_SECCOMP_H 1#ifndef _ASM_SECCOMP_H
2#define _ASM_SECCOMP_H
2 3
3#include <linux/thread_info.h> 4#include <linux/thread_info.h>
4 5
diff --git a/include/asm-x86/seccomp_64.h b/include/asm-x86/seccomp_64.h
index 553af65a2287..76cfe69aa63c 100644
--- a/include/asm-x86/seccomp_64.h
+++ b/include/asm-x86/seccomp_64.h
@@ -1,4 +1,5 @@
1#ifndef _ASM_SECCOMP_H 1#ifndef _ASM_SECCOMP_H
2#define _ASM_SECCOMP_H
2 3
3#include <linux/thread_info.h> 4#include <linux/thread_info.h>
4 5
diff --git a/include/asm-x86/string_32.h b/include/asm-x86/string_32.h
index b49369ad9a61..193578cd1fd9 100644
--- a/include/asm-x86/string_32.h
+++ b/include/asm-x86/string_32.h
@@ -29,81 +29,116 @@ extern char *strchr(const char *s, int c);
29#define __HAVE_ARCH_STRLEN 29#define __HAVE_ARCH_STRLEN
30extern size_t strlen(const char *s); 30extern size_t strlen(const char *s);
31 31
32static __always_inline void * __memcpy(void * to, const void * from, size_t n) 32static __always_inline void *__memcpy(void *to, const void *from, size_t n)
33{ 33{
34int d0, d1, d2; 34 int d0, d1, d2;
35__asm__ __volatile__( 35 asm volatile("rep ; movsl\n\t"
36 "rep ; movsl\n\t" 36 "movl %4,%%ecx\n\t"
37 "movl %4,%%ecx\n\t" 37 "andl $3,%%ecx\n\t"
38 "andl $3,%%ecx\n\t" 38 "jz 1f\n\t"
39 "jz 1f\n\t" 39 "rep ; movsb\n\t"
40 "rep ; movsb\n\t" 40 "1:"
41 "1:" 41 : "=&c" (d0), "=&D" (d1), "=&S" (d2)
42 : "=&c" (d0), "=&D" (d1), "=&S" (d2) 42 : "0" (n / 4), "g" (n), "1" ((long)to), "2" ((long)from)
43 : "0" (n/4), "g" (n), "1" ((long) to), "2" ((long) from) 43 : "memory");
44 : "memory"); 44 return to;
45return (to);
46} 45}
47 46
48/* 47/*
49 * This looks ugly, but the compiler can optimize it totally, 48 * This looks ugly, but the compiler can optimize it totally,
50 * as the count is constant. 49 * as the count is constant.
51 */ 50 */
52static __always_inline void * __constant_memcpy(void * to, const void * from, size_t n) 51static __always_inline void *__constant_memcpy(void *to, const void *from,
52 size_t n)
53{ 53{
54 long esi, edi; 54 long esi, edi;
55 if (!n) return to; 55 if (!n)
56#if 1 /* want to do small copies with non-string ops? */ 56 return to;
57
57 switch (n) { 58 switch (n) {
58 case 1: *(char*)to = *(char*)from; return to; 59 case 1:
59 case 2: *(short*)to = *(short*)from; return to; 60 *(char *)to = *(char *)from;
60 case 4: *(int*)to = *(int*)from; return to; 61 return to;
61#if 1 /* including those doable with two moves? */ 62 case 2:
62 case 3: *(short*)to = *(short*)from; 63 *(short *)to = *(short *)from;
63 *((char*)to+2) = *((char*)from+2); return to; 64 return to;
64 case 5: *(int*)to = *(int*)from; 65 case 4:
65 *((char*)to+4) = *((char*)from+4); return to; 66 *(int *)to = *(int *)from;
66 case 6: *(int*)to = *(int*)from; 67 return to;
67 *((short*)to+2) = *((short*)from+2); return to; 68
68 case 8: *(int*)to = *(int*)from; 69 case 3:
69 *((int*)to+1) = *((int*)from+1); return to; 70 *(short *)to = *(short *)from;
70#endif 71 *((char *)to + 2) = *((char *)from + 2);
72 return to;
73 case 5:
74 *(int *)to = *(int *)from;
75 *((char *)to + 4) = *((char *)from + 4);
76 return to;
77 case 6:
78 *(int *)to = *(int *)from;
79 *((short *)to + 2) = *((short *)from + 2);
80 return to;
81 case 8:
82 *(int *)to = *(int *)from;
83 *((int *)to + 1) = *((int *)from + 1);
84 return to;
71 } 85 }
72#endif 86
73 esi = (long) from; 87 esi = (long)from;
74 edi = (long) to; 88 edi = (long)to;
75 if (n >= 5*4) { 89 if (n >= 5 * 4) {
76 /* large block: use rep prefix */ 90 /* large block: use rep prefix */
77 int ecx; 91 int ecx;
78 __asm__ __volatile__( 92 asm volatile("rep ; movsl"
79 "rep ; movsl" 93 : "=&c" (ecx), "=&D" (edi), "=&S" (esi)
80 : "=&c" (ecx), "=&D" (edi), "=&S" (esi) 94 : "0" (n / 4), "1" (edi), "2" (esi)
81 : "0" (n/4), "1" (edi),"2" (esi) 95 : "memory"
82 : "memory"
83 ); 96 );
84 } else { 97 } else {
85 /* small block: don't clobber ecx + smaller code */ 98 /* small block: don't clobber ecx + smaller code */
86 if (n >= 4*4) __asm__ __volatile__("movsl" 99 if (n >= 4 * 4)
87 :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); 100 asm volatile("movsl"
88 if (n >= 3*4) __asm__ __volatile__("movsl" 101 : "=&D"(edi), "=&S"(esi)
89 :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); 102 : "0"(edi), "1"(esi)
90 if (n >= 2*4) __asm__ __volatile__("movsl" 103 : "memory");
91 :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); 104 if (n >= 3 * 4)
92 if (n >= 1*4) __asm__ __volatile__("movsl" 105 asm volatile("movsl"
93 :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); 106 : "=&D"(edi), "=&S"(esi)
107 : "0"(edi), "1"(esi)
108 : "memory");
109 if (n >= 2 * 4)
110 asm volatile("movsl"
111 : "=&D"(edi), "=&S"(esi)
112 : "0"(edi), "1"(esi)
113 : "memory");
114 if (n >= 1 * 4)
115 asm volatile("movsl"
116 : "=&D"(edi), "=&S"(esi)
117 : "0"(edi), "1"(esi)
118 : "memory");
94 } 119 }
95 switch (n % 4) { 120 switch (n % 4) {
96 /* tail */ 121 /* tail */
97 case 0: return to; 122 case 0:
98 case 1: __asm__ __volatile__("movsb" 123 return to;
99 :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); 124 case 1:
100 return to; 125 asm volatile("movsb"
101 case 2: __asm__ __volatile__("movsw" 126 : "=&D"(edi), "=&S"(esi)
102 :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); 127 : "0"(edi), "1"(esi)
103 return to; 128 : "memory");
104 default: __asm__ __volatile__("movsw\n\tmovsb" 129 return to;
105 :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory"); 130 case 2:
106 return to; 131 asm volatile("movsw"
132 : "=&D"(edi), "=&S"(esi)
133 : "0"(edi), "1"(esi)
134 : "memory");
135 return to;
136 default:
137 asm volatile("movsw\n\tmovsb"
138 : "=&D"(edi), "=&S"(esi)
139 : "0"(edi), "1"(esi)
140 : "memory");
141 return to;
107 } 142 }
108} 143}
109 144
@@ -117,87 +152,86 @@ static __always_inline void * __constant_memcpy(void * to, const void * from, si
117 * This CPU favours 3DNow strongly (eg AMD Athlon) 152 * This CPU favours 3DNow strongly (eg AMD Athlon)
118 */ 153 */
119 154
120static inline void * __constant_memcpy3d(void * to, const void * from, size_t len) 155static inline void *__constant_memcpy3d(void *to, const void *from, size_t len)
121{ 156{
122 if (len < 512) 157 if (len < 512)
123 return __constant_memcpy(to, from, len); 158 return __constant_memcpy(to, from, len);
124 return _mmx_memcpy(to, from, len); 159 return _mmx_memcpy(to, from, len);
125} 160}
126 161
127static __inline__ void *__memcpy3d(void *to, const void *from, size_t len) 162static inline void *__memcpy3d(void *to, const void *from, size_t len)
128{ 163{
129 if (len < 512) 164 if (len < 512)
130 return __memcpy(to, from, len); 165 return __memcpy(to, from, len);
131 return _mmx_memcpy(to, from, len); 166 return _mmx_memcpy(to, from, len);
132} 167}
133 168
134#define memcpy(t, f, n) \ 169#define memcpy(t, f, n) \
135(__builtin_constant_p(n) ? \ 170 (__builtin_constant_p((n)) \
136 __constant_memcpy3d((t),(f),(n)) : \ 171 ? __constant_memcpy3d((t), (f), (n)) \
137 __memcpy3d((t),(f),(n))) 172 : __memcpy3d((t), (f), (n)))
138 173
139#else 174#else
140 175
141/* 176/*
142 * No 3D Now! 177 * No 3D Now!
143 */ 178 */
144 179
145#define memcpy(t, f, n) \ 180#define memcpy(t, f, n) \
146(__builtin_constant_p(n) ? \ 181 (__builtin_constant_p((n)) \
147 __constant_memcpy((t),(f),(n)) : \ 182 ? __constant_memcpy((t), (f), (n)) \
148 __memcpy((t),(f),(n))) 183 : __memcpy((t), (f), (n)))
149 184
150#endif 185#endif
151 186
152#define __HAVE_ARCH_MEMMOVE 187#define __HAVE_ARCH_MEMMOVE
153void *memmove(void * dest,const void * src, size_t n); 188void *memmove(void *dest, const void *src, size_t n);
154 189
155#define memcmp __builtin_memcmp 190#define memcmp __builtin_memcmp
156 191
157#define __HAVE_ARCH_MEMCHR 192#define __HAVE_ARCH_MEMCHR
158extern void *memchr(const void * cs,int c,size_t count); 193extern void *memchr(const void *cs, int c, size_t count);
159 194
160static inline void * __memset_generic(void * s, char c,size_t count) 195static inline void *__memset_generic(void *s, char c, size_t count)
161{ 196{
162int d0, d1; 197 int d0, d1;
163__asm__ __volatile__( 198 asm volatile("rep\n\t"
164 "rep\n\t" 199 "stosb"
165 "stosb" 200 : "=&c" (d0), "=&D" (d1)
166 : "=&c" (d0), "=&D" (d1) 201 : "a" (c), "1" (s), "0" (count)
167 :"a" (c),"1" (s),"0" (count) 202 : "memory");
168 :"memory"); 203 return s;
169return s;
170} 204}
171 205
172/* we might want to write optimized versions of these later */ 206/* we might want to write optimized versions of these later */
173#define __constant_count_memset(s,c,count) __memset_generic((s),(c),(count)) 207#define __constant_count_memset(s, c, count) __memset_generic((s), (c), (count))
174 208
175/* 209/*
176 * memset(x,0,y) is a reasonably common thing to do, so we want to fill 210 * memset(x, 0, y) is a reasonably common thing to do, so we want to fill
177 * things 32 bits at a time even when we don't know the size of the 211 * things 32 bits at a time even when we don't know the size of the
178 * area at compile-time.. 212 * area at compile-time..
179 */ 213 */
180static __always_inline void * __constant_c_memset(void * s, unsigned long c, size_t count) 214static __always_inline
215void *__constant_c_memset(void *s, unsigned long c, size_t count)
181{ 216{
182int d0, d1; 217 int d0, d1;
183__asm__ __volatile__( 218 asm volatile("rep ; stosl\n\t"
184 "rep ; stosl\n\t" 219 "testb $2,%b3\n\t"
185 "testb $2,%b3\n\t" 220 "je 1f\n\t"
186 "je 1f\n\t" 221 "stosw\n"
187 "stosw\n" 222 "1:\ttestb $1,%b3\n\t"
188 "1:\ttestb $1,%b3\n\t" 223 "je 2f\n\t"
189 "je 2f\n\t" 224 "stosb\n"
190 "stosb\n" 225 "2:"
191 "2:" 226 : "=&c" (d0), "=&D" (d1)
192 :"=&c" (d0), "=&D" (d1) 227 : "a" (c), "q" (count), "0" (count/4), "1" ((long)s)
193 :"a" (c), "q" (count), "0" (count/4), "1" ((long) s) 228 : "memory");
194 :"memory"); 229 return s;
195return (s);
196} 230}
197 231
198/* Added by Gertjan van Wingerde to make minix and sysv module work */ 232/* Added by Gertjan van Wingerde to make minix and sysv module work */
199#define __HAVE_ARCH_STRNLEN 233#define __HAVE_ARCH_STRNLEN
200extern size_t strnlen(const char * s, size_t count); 234extern size_t strnlen(const char *s, size_t count);
201/* end of additional stuff */ 235/* end of additional stuff */
202 236
203#define __HAVE_ARCH_STRSTR 237#define __HAVE_ARCH_STRSTR
@@ -207,66 +241,85 @@ extern char *strstr(const char *cs, const char *ct);
207 * This looks horribly ugly, but the compiler can optimize it totally, 241 * This looks horribly ugly, but the compiler can optimize it totally,
208 * as we by now know that both pattern and count is constant.. 242 * as we by now know that both pattern and count is constant..
209 */ 243 */
210static __always_inline void * __constant_c_and_count_memset(void * s, unsigned long pattern, size_t count) 244static __always_inline
245void *__constant_c_and_count_memset(void *s, unsigned long pattern,
246 size_t count)
211{ 247{
212 switch (count) { 248 switch (count) {
249 case 0:
250 return s;
251 case 1:
252 *(unsigned char *)s = pattern & 0xff;
253 return s;
254 case 2:
255 *(unsigned short *)s = pattern & 0xffff;
256 return s;
257 case 3:
258 *(unsigned short *)s = pattern & 0xffff;
259 *((unsigned char *)s + 2) = pattern & 0xff;
260 return s;
261 case 4:
262 *(unsigned long *)s = pattern;
263 return s;
264 }
265
266#define COMMON(x) \
267 asm volatile("rep ; stosl" \
268 x \
269 : "=&c" (d0), "=&D" (d1) \
270 : "a" (eax), "0" (count/4), "1" ((long)s) \
271 : "memory")
272
273 {
274 int d0, d1;
275#if __GNUC__ == 4 && __GNUC_MINOR__ == 0
276 /* Workaround for broken gcc 4.0 */
277 register unsigned long eax asm("%eax") = pattern;
278#else
279 unsigned long eax = pattern;
280#endif
281
282 switch (count % 4) {
213 case 0: 283 case 0:
284 COMMON("");
214 return s; 285 return s;
215 case 1: 286 case 1:
216 *(unsigned char *)s = pattern & 0xff; 287 COMMON("\n\tstosb");
217 return s; 288 return s;
218 case 2: 289 case 2:
219 *(unsigned short *)s = pattern & 0xffff; 290 COMMON("\n\tstosw");
220 return s; 291 return s;
221 case 3: 292 default:
222 *(unsigned short *)s = pattern & 0xffff; 293 COMMON("\n\tstosw\n\tstosb");
223 *(2+(unsigned char *)s) = pattern & 0xff;
224 return s;
225 case 4:
226 *(unsigned long *)s = pattern;
227 return s; 294 return s;
295 }
228 } 296 }
229#define COMMON(x) \ 297
230__asm__ __volatile__( \
231 "rep ; stosl" \
232 x \
233 : "=&c" (d0), "=&D" (d1) \
234 : "a" (pattern),"0" (count/4),"1" ((long) s) \
235 : "memory")
236{
237 int d0, d1;
238 switch (count % 4) {
239 case 0: COMMON(""); return s;
240 case 1: COMMON("\n\tstosb"); return s;
241 case 2: COMMON("\n\tstosw"); return s;
242 default: COMMON("\n\tstosw\n\tstosb"); return s;
243 }
244}
245
246#undef COMMON 298#undef COMMON
247} 299}
248 300
249#define __constant_c_x_memset(s, c, count) \ 301#define __constant_c_x_memset(s, c, count) \
250(__builtin_constant_p(count) ? \ 302 (__builtin_constant_p(count) \
251 __constant_c_and_count_memset((s),(c),(count)) : \ 303 ? __constant_c_and_count_memset((s), (c), (count)) \
252 __constant_c_memset((s),(c),(count))) 304 : __constant_c_memset((s), (c), (count)))
253 305
254#define __memset(s, c, count) \ 306#define __memset(s, c, count) \
255(__builtin_constant_p(count) ? \ 307 (__builtin_constant_p(count) \
256 __constant_count_memset((s),(c),(count)) : \ 308 ? __constant_count_memset((s), (c), (count)) \
257 __memset_generic((s),(c),(count))) 309 : __memset_generic((s), (c), (count)))
258 310
259#define __HAVE_ARCH_MEMSET 311#define __HAVE_ARCH_MEMSET
260#define memset(s, c, count) \ 312#define memset(s, c, count) \
261(__builtin_constant_p(c) ? \ 313 (__builtin_constant_p(c) \
262 __constant_c_x_memset((s),(0x01010101UL*(unsigned char)(c)),(count)) : \ 314 ? __constant_c_x_memset((s), (0x01010101UL * (unsigned char)(c)), \
263 __memset((s),(c),(count))) 315 (count)) \
316 : __memset((s), (c), (count)))
264 317
265/* 318/*
266 * find the first occurrence of byte 'c', or 1 past the area if none 319 * find the first occurrence of byte 'c', or 1 past the area if none
267 */ 320 */
268#define __HAVE_ARCH_MEMSCAN 321#define __HAVE_ARCH_MEMSCAN
269extern void *memscan(void * addr, int c, size_t size); 322extern void *memscan(void *addr, int c, size_t size);
270 323
271#endif /* __KERNEL__ */ 324#endif /* __KERNEL__ */
272 325
diff --git a/include/asm-x86/suspend_32.h b/include/asm-x86/suspend_32.h
index 24e1c080aa8a..8675c6782a7d 100644
--- a/include/asm-x86/suspend_32.h
+++ b/include/asm-x86/suspend_32.h
@@ -3,6 +3,9 @@
3 * Based on code 3 * Based on code
4 * Copyright 2001 Patrick Mochel <mochel@osdl.org> 4 * Copyright 2001 Patrick Mochel <mochel@osdl.org>
5 */ 5 */
6#ifndef __ASM_X86_32_SUSPEND_H
7#define __ASM_X86_32_SUSPEND_H
8
6#include <asm/desc.h> 9#include <asm/desc.h>
7#include <asm/i387.h> 10#include <asm/i387.h>
8 11
@@ -44,3 +47,5 @@ static inline void acpi_save_register_state(unsigned long return_point)
44/* routines for saving/restoring kernel state */ 47/* routines for saving/restoring kernel state */
45extern int acpi_save_state_mem(void); 48extern int acpi_save_state_mem(void);
46#endif 49#endif
50
51#endif /* __ASM_X86_32_SUSPEND_H */
diff --git a/include/asm-x86/system.h b/include/asm-x86/system.h
index a2f04cd79b29..7e4c133795a1 100644
--- a/include/asm-x86/system.h
+++ b/include/asm-x86/system.h
@@ -289,7 +289,7 @@ static inline void native_wbinvd(void)
289 289
290#endif/* CONFIG_PARAVIRT */ 290#endif/* CONFIG_PARAVIRT */
291 291
292#define stts() write_cr0(8 | read_cr0()) 292#define stts() write_cr0(read_cr0() | X86_CR0_TS)
293 293
294#endif /* __KERNEL__ */ 294#endif /* __KERNEL__ */
295 295
diff --git a/include/asm-x86/thread_info.h b/include/asm-x86/thread_info.h
index 77244f17993f..895339d2bc0b 100644
--- a/include/asm-x86/thread_info.h
+++ b/include/asm-x86/thread_info.h
@@ -1,9 +1,253 @@
1/* thread_info.h: low-level thread information
2 *
3 * Copyright (C) 2002 David Howells (dhowells@redhat.com)
4 * - Incorporating suggestions made by Linus Torvalds and Dave Miller
5 */
6
1#ifndef _ASM_X86_THREAD_INFO_H 7#ifndef _ASM_X86_THREAD_INFO_H
8#define _ASM_X86_THREAD_INFO_H
9
10#include <linux/compiler.h>
11#include <asm/page.h>
12#include <asm/types.h>
13
14/*
15 * low level task data that entry.S needs immediate access to
16 * - this struct should fit entirely inside of one cache line
17 * - this struct shares the supervisor stack pages
18 */
19#ifndef __ASSEMBLY__
20struct task_struct;
21struct exec_domain;
22#include <asm/processor.h>
23
24struct thread_info {
25 struct task_struct *task; /* main task structure */
26 struct exec_domain *exec_domain; /* execution domain */
27 unsigned long flags; /* low level flags */
28 __u32 status; /* thread synchronous flags */
29 __u32 cpu; /* current CPU */
30 int preempt_count; /* 0 => preemptable,
31 <0 => BUG */
32 mm_segment_t addr_limit;
33 struct restart_block restart_block;
34 void __user *sysenter_return;
35#ifdef CONFIG_X86_32
36 unsigned long previous_esp; /* ESP of the previous stack in
37 case of nested (IRQ) stacks
38 */
39 __u8 supervisor_stack[0];
40#endif
41};
42
43#define INIT_THREAD_INFO(tsk) \
44{ \
45 .task = &tsk, \
46 .exec_domain = &default_exec_domain, \
47 .flags = 0, \
48 .cpu = 0, \
49 .preempt_count = 1, \
50 .addr_limit = KERNEL_DS, \
51 .restart_block = { \
52 .fn = do_no_restart_syscall, \
53 }, \
54}
55
56#define init_thread_info (init_thread_union.thread_info)
57#define init_stack (init_thread_union.stack)
58
59#else /* !__ASSEMBLY__ */
60
61#include <asm/asm-offsets.h>
62
63#endif
64
65/*
66 * thread information flags
67 * - these are process state flags that various assembly files
68 * may need to access
69 * - pending work-to-be-done flags are in LSW
70 * - other flags in MSW
71 * Warning: layout of LSW is hardcoded in entry.S
72 */
73#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
74#define TIF_SIGPENDING 2 /* signal pending */
75#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
76#define TIF_SINGLESTEP 4 /* reenable singlestep on user return*/
77#define TIF_IRET 5 /* force IRET */
2#ifdef CONFIG_X86_32 78#ifdef CONFIG_X86_32
3# include "thread_info_32.h" 79#define TIF_SYSCALL_EMU 6 /* syscall emulation active */
80#endif
81#define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */
82#define TIF_SECCOMP 8 /* secure computing */
83#define TIF_MCE_NOTIFY 10 /* notify userspace of an MCE */
84#define TIF_HRTICK_RESCHED 11 /* reprogram hrtick timer */
85#define TIF_NOTSC 16 /* TSC is not accessible in userland */
86#define TIF_IA32 17 /* 32bit process */
87#define TIF_FORK 18 /* ret_from_fork */
88#define TIF_ABI_PENDING 19
89#define TIF_MEMDIE 20
90#define TIF_DEBUG 21 /* uses debug registers */
91#define TIF_IO_BITMAP 22 /* uses I/O bitmap */
92#define TIF_FREEZE 23 /* is freezing for suspend */
93#define TIF_FORCED_TF 24 /* true if TF in eflags artificially */
94#define TIF_DEBUGCTLMSR 25 /* uses thread_struct.debugctlmsr */
95#define TIF_DS_AREA_MSR 26 /* uses thread_struct.ds_area_msr */
96#define TIF_BTS_TRACE_TS 27 /* record scheduling event timestamps */
97
98#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
99#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
100#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
101#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
102#define _TIF_IRET (1 << TIF_IRET)
103#ifdef CONFIG_X86_32
104#define _TIF_SYSCALL_EMU (1 << TIF_SYSCALL_EMU)
4#else 105#else
5# include "thread_info_64.h" 106#define _TIF_SYSCALL_EMU 0
6#endif 107#endif
108#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
109#define _TIF_SECCOMP (1 << TIF_SECCOMP)
110#define _TIF_MCE_NOTIFY (1 << TIF_MCE_NOTIFY)
111#define _TIF_HRTICK_RESCHED (1 << TIF_HRTICK_RESCHED)
112#define _TIF_NOTSC (1 << TIF_NOTSC)
113#define _TIF_IA32 (1 << TIF_IA32)
114#define _TIF_FORK (1 << TIF_FORK)
115#define _TIF_ABI_PENDING (1 << TIF_ABI_PENDING)
116#define _TIF_DEBUG (1 << TIF_DEBUG)
117#define _TIF_IO_BITMAP (1 << TIF_IO_BITMAP)
118#define _TIF_FREEZE (1 << TIF_FREEZE)
119#define _TIF_FORCED_TF (1 << TIF_FORCED_TF)
120#define _TIF_DEBUGCTLMSR (1 << TIF_DEBUGCTLMSR)
121#define _TIF_DS_AREA_MSR (1 << TIF_DS_AREA_MSR)
122#define _TIF_BTS_TRACE_TS (1 << TIF_BTS_TRACE_TS)
123
124/* work to do on interrupt/exception return */
125#define _TIF_WORK_MASK \
126 (0x0000FFFF & \
127 ~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP| \
128 _TIF_SECCOMP|_TIF_SYSCALL_EMU))
129
130/* work to do on any return to user space */
131#define _TIF_ALLWORK_MASK (0x0000FFFF & ~_TIF_SECCOMP)
132
133/* Only used for 64 bit */
134#define _TIF_DO_NOTIFY_MASK \
135 (_TIF_SIGPENDING|_TIF_SINGLESTEP|_TIF_MCE_NOTIFY|_TIF_HRTICK_RESCHED)
136
137/* flags to check in __switch_to() */
138#define _TIF_WORK_CTXSW \
139 (_TIF_IO_BITMAP|_TIF_DEBUGCTLMSR|_TIF_DS_AREA_MSR|_TIF_BTS_TRACE_TS| \
140 _TIF_NOTSC)
141
142#define _TIF_WORK_CTXSW_PREV _TIF_WORK_CTXSW
143#define _TIF_WORK_CTXSW_NEXT (_TIF_WORK_CTXSW|_TIF_DEBUG)
144
145#define PREEMPT_ACTIVE 0x10000000
146
147/* thread information allocation */
148#ifdef CONFIG_DEBUG_STACK_USAGE
149#define THREAD_FLAGS (GFP_KERNEL | __GFP_ZERO)
150#else
151#define THREAD_FLAGS GFP_KERNEL
152#endif
153
154#define alloc_thread_info(tsk) \
155 ((struct thread_info *)__get_free_pages(THREAD_FLAGS, THREAD_ORDER))
156
157#ifdef CONFIG_X86_32
158
159#define STACK_WARN (THREAD_SIZE/8)
160/*
161 * macros/functions for gaining access to the thread information structure
162 *
163 * preempt_count needs to be 1 initially, until the scheduler is functional.
164 */
165#ifndef __ASSEMBLY__
166
167
168/* how to get the current stack pointer from C */
169register unsigned long current_stack_pointer asm("esp") __used;
170
171/* how to get the thread information struct from C */
172static inline struct thread_info *current_thread_info(void)
173{
174 return (struct thread_info *)
175 (current_stack_pointer & ~(THREAD_SIZE - 1));
176}
177
178#else /* !__ASSEMBLY__ */
179
180/* how to get the thread information struct from ASM */
181#define GET_THREAD_INFO(reg) \
182 movl $-THREAD_SIZE, reg; \
183 andl %esp, reg
184
185/* use this one if reg already contains %esp */
186#define GET_THREAD_INFO_WITH_ESP(reg) \
187 andl $-THREAD_SIZE, reg
188
189#endif
190
191#else /* X86_32 */
192
193#include <asm/pda.h>
194
195/*
196 * macros/functions for gaining access to the thread information structure
197 * preempt_count needs to be 1 initially, until the scheduler is functional.
198 */
199#ifndef __ASSEMBLY__
200static inline struct thread_info *current_thread_info(void)
201{
202 struct thread_info *ti;
203 ti = (void *)(read_pda(kernelstack) + PDA_STACKOFFSET - THREAD_SIZE);
204 return ti;
205}
206
207/* do not use in interrupt context */
208static inline struct thread_info *stack_thread_info(void)
209{
210 struct thread_info *ti;
211 asm("andq %%rsp,%0; " : "=r" (ti) : "0" (~(THREAD_SIZE - 1)));
212 return ti;
213}
214
215#else /* !__ASSEMBLY__ */
216
217/* how to get the thread information struct from ASM */
218#define GET_THREAD_INFO(reg) \
219 movq %gs:pda_kernelstack,reg ; \
220 subq $(THREAD_SIZE-PDA_STACKOFFSET),reg
221
222#endif
223
224#endif /* !X86_32 */
225
226/*
227 * Thread-synchronous status.
228 *
229 * This is different from the flags in that nobody else
230 * ever touches our thread-synchronous status, so we don't
231 * have to worry about atomic accesses.
232 */
233#define TS_USEDFPU 0x0001 /* FPU was used by this task
234 this quantum (SMP) */
235#define TS_COMPAT 0x0002 /* 32bit syscall active (64BIT)*/
236#define TS_POLLING 0x0004 /* true if in idle loop
237 and not sleeping */
238#define TS_RESTORE_SIGMASK 0x0008 /* restore signal mask in do_signal() */
239
240#define tsk_is_polling(t) (task_thread_info(t)->status & TS_POLLING)
241
242#ifndef __ASSEMBLY__
243#define HAVE_SET_RESTORE_SIGMASK 1
244static inline void set_restore_sigmask(void)
245{
246 struct thread_info *ti = current_thread_info();
247 ti->status |= TS_RESTORE_SIGMASK;
248 set_bit(TIF_SIGPENDING, (unsigned long *)&ti->flags);
249}
250#endif /* !__ASSEMBLY__ */
7 251
8#ifndef __ASSEMBLY__ 252#ifndef __ASSEMBLY__
9extern void arch_task_cache_init(void); 253extern void arch_task_cache_init(void);
diff --git a/include/asm-x86/thread_info_32.h b/include/asm-x86/thread_info_32.h
deleted file mode 100644
index b6338829d1a8..000000000000
--- a/include/asm-x86/thread_info_32.h
+++ /dev/null
@@ -1,205 +0,0 @@
1/* thread_info.h: i386 low-level thread information
2 *
3 * Copyright (C) 2002 David Howells (dhowells@redhat.com)
4 * - Incorporating suggestions made by Linus Torvalds and Dave Miller
5 */
6
7#ifndef _ASM_THREAD_INFO_H
8#define _ASM_THREAD_INFO_H
9
10#ifdef __KERNEL__
11
12#include <linux/compiler.h>
13#include <asm/page.h>
14
15#ifndef __ASSEMBLY__
16#include <asm/processor.h>
17#endif
18
19/*
20 * low level task data that entry.S needs immediate access to
21 * - this struct should fit entirely inside of one cache line
22 * - this struct shares the supervisor stack pages
23 * - if the contents of this structure are changed,
24 * the assembly constants must also be changed
25 */
26#ifndef __ASSEMBLY__
27
28struct thread_info {
29 struct task_struct *task; /* main task structure */
30 struct exec_domain *exec_domain; /* execution domain */
31 unsigned long flags; /* low level flags */
32 unsigned long status; /* thread-synchronous flags */
33 __u32 cpu; /* current CPU */
34 int preempt_count; /* 0 => preemptable,
35 <0 => BUG */
36 mm_segment_t addr_limit; /* thread address space:
37 0-0xBFFFFFFF user-thread
38 0-0xFFFFFFFF kernel-thread
39 */
40 void *sysenter_return;
41 struct restart_block restart_block;
42 unsigned long previous_esp; /* ESP of the previous stack in
43 case of nested (IRQ) stacks
44 */
45 __u8 supervisor_stack[0];
46};
47
48#else /* !__ASSEMBLY__ */
49
50#include <asm/asm-offsets.h>
51
52#endif
53
54#define PREEMPT_ACTIVE 0x10000000
55#ifdef CONFIG_4KSTACKS
56#define THREAD_SIZE (4096)
57#else
58#define THREAD_SIZE (8192)
59#endif
60
61#define STACK_WARN (THREAD_SIZE/8)
62/*
63 * macros/functions for gaining access to the thread information structure
64 *
65 * preempt_count needs to be 1 initially, until the scheduler is functional.
66 */
67#ifndef __ASSEMBLY__
68
69#define INIT_THREAD_INFO(tsk) \
70{ \
71 .task = &tsk, \
72 .exec_domain = &default_exec_domain, \
73 .flags = 0, \
74 .cpu = 0, \
75 .preempt_count = 1, \
76 .addr_limit = KERNEL_DS, \
77 .restart_block = { \
78 .fn = do_no_restart_syscall, \
79 }, \
80}
81
82#define init_thread_info (init_thread_union.thread_info)
83#define init_stack (init_thread_union.stack)
84
85
86/* how to get the current stack pointer from C */
87register unsigned long current_stack_pointer asm("esp") __used;
88
89/* how to get the thread information struct from C */
90static inline struct thread_info *current_thread_info(void)
91{
92 return (struct thread_info *)
93 (current_stack_pointer & ~(THREAD_SIZE - 1));
94}
95
96/* thread information allocation */
97#ifdef CONFIG_DEBUG_STACK_USAGE
98#define alloc_thread_info(tsk) ((struct thread_info *) \
99 __get_free_pages(GFP_KERNEL | __GFP_ZERO, get_order(THREAD_SIZE)))
100#else
101#define alloc_thread_info(tsk) ((struct thread_info *) \
102 __get_free_pages(GFP_KERNEL, get_order(THREAD_SIZE)))
103#endif
104
105#else /* !__ASSEMBLY__ */
106
107/* how to get the thread information struct from ASM */
108#define GET_THREAD_INFO(reg) \
109 movl $-THREAD_SIZE, reg; \
110 andl %esp, reg
111
112/* use this one if reg already contains %esp */
113#define GET_THREAD_INFO_WITH_ESP(reg) \
114 andl $-THREAD_SIZE, reg
115
116#endif
117
118/*
119 * thread information flags
120 * - these are process state flags that various
121 * assembly files may need to access
122 * - pending work-to-be-done flags are in LSW
123 * - other flags in MSW
124 */
125#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
126#define TIF_SIGPENDING 1 /* signal pending */
127#define TIF_NEED_RESCHED 2 /* rescheduling necessary */
128#define TIF_SINGLESTEP 3 /* restore singlestep on return to
129 user mode */
130#define TIF_IRET 4 /* return with iret */
131#define TIF_SYSCALL_EMU 5 /* syscall emulation active */
132#define TIF_SYSCALL_AUDIT 6 /* syscall auditing active */
133#define TIF_SECCOMP 7 /* secure computing */
134#define TIF_HRTICK_RESCHED 9 /* reprogram hrtick timer */
135#define TIF_MEMDIE 16
136#define TIF_DEBUG 17 /* uses debug registers */
137#define TIF_IO_BITMAP 18 /* uses I/O bitmap */
138#define TIF_FREEZE 19 /* is freezing for suspend */
139#define TIF_NOTSC 20 /* TSC is not accessible in userland */
140#define TIF_FORCED_TF 21 /* true if TF in eflags artificially */
141#define TIF_DEBUGCTLMSR 22 /* uses thread_struct.debugctlmsr */
142#define TIF_DS_AREA_MSR 23 /* uses thread_struct.ds_area_msr */
143#define TIF_BTS_TRACE_TS 24 /* record scheduling event timestamps */
144
145#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
146#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
147#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
148#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
149#define _TIF_IRET (1 << TIF_IRET)
150#define _TIF_SYSCALL_EMU (1 << TIF_SYSCALL_EMU)
151#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
152#define _TIF_SECCOMP (1 << TIF_SECCOMP)
153#define _TIF_HRTICK_RESCHED (1 << TIF_HRTICK_RESCHED)
154#define _TIF_DEBUG (1 << TIF_DEBUG)
155#define _TIF_IO_BITMAP (1 << TIF_IO_BITMAP)
156#define _TIF_FREEZE (1 << TIF_FREEZE)
157#define _TIF_NOTSC (1 << TIF_NOTSC)
158#define _TIF_FORCED_TF (1 << TIF_FORCED_TF)
159#define _TIF_DEBUGCTLMSR (1 << TIF_DEBUGCTLMSR)
160#define _TIF_DS_AREA_MSR (1 << TIF_DS_AREA_MSR)
161#define _TIF_BTS_TRACE_TS (1 << TIF_BTS_TRACE_TS)
162
163/* work to do on interrupt/exception return */
164#define _TIF_WORK_MASK \
165 (0x0000FFFF & ~(_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | \
166 _TIF_SECCOMP | _TIF_SYSCALL_EMU))
167/* work to do on any return to u-space */
168#define _TIF_ALLWORK_MASK (0x0000FFFF & ~_TIF_SECCOMP)
169
170/* flags to check in __switch_to() */
171#define _TIF_WORK_CTXSW \
172 (_TIF_IO_BITMAP | _TIF_NOTSC | _TIF_DEBUGCTLMSR | \
173 _TIF_DS_AREA_MSR | _TIF_BTS_TRACE_TS)
174#define _TIF_WORK_CTXSW_PREV _TIF_WORK_CTXSW
175#define _TIF_WORK_CTXSW_NEXT (_TIF_WORK_CTXSW | _TIF_DEBUG)
176
177
178/*
179 * Thread-synchronous status.
180 *
181 * This is different from the flags in that nobody else
182 * ever touches our thread-synchronous status, so we don't
183 * have to worry about atomic accesses.
184 */
185#define TS_USEDFPU 0x0001 /* FPU was used by this task
186 this quantum (SMP) */
187#define TS_POLLING 0x0002 /* True if in idle loop
188 and not sleeping */
189#define TS_RESTORE_SIGMASK 0x0004 /* restore signal mask in do_signal() */
190
191#define tsk_is_polling(t) (task_thread_info(t)->status & TS_POLLING)
192
193#ifndef __ASSEMBLY__
194#define HAVE_SET_RESTORE_SIGMASK 1
195static inline void set_restore_sigmask(void)
196{
197 struct thread_info *ti = current_thread_info();
198 ti->status |= TS_RESTORE_SIGMASK;
199 set_bit(TIF_SIGPENDING, &ti->flags);
200}
201#endif /* !__ASSEMBLY__ */
202
203#endif /* __KERNEL__ */
204
205#endif /* _ASM_THREAD_INFO_H */
diff --git a/include/asm-x86/thread_info_64.h b/include/asm-x86/thread_info_64.h
deleted file mode 100644
index cb69f70abba1..000000000000
--- a/include/asm-x86/thread_info_64.h
+++ /dev/null
@@ -1,195 +0,0 @@
1/* thread_info.h: x86_64 low-level thread information
2 *
3 * Copyright (C) 2002 David Howells (dhowells@redhat.com)
4 * - Incorporating suggestions made by Linus Torvalds and Dave Miller
5 */
6
7#ifndef _ASM_THREAD_INFO_H
8#define _ASM_THREAD_INFO_H
9
10#ifdef __KERNEL__
11
12#include <asm/page.h>
13#include <asm/types.h>
14#include <asm/pda.h>
15
16/*
17 * low level task data that entry.S needs immediate access to
18 * - this struct should fit entirely inside of one cache line
19 * - this struct shares the supervisor stack pages
20 */
21#ifndef __ASSEMBLY__
22struct task_struct;
23struct exec_domain;
24#include <asm/processor.h>
25
26struct thread_info {
27 struct task_struct *task; /* main task structure */
28 struct exec_domain *exec_domain; /* execution domain */
29 __u32 flags; /* low level flags */
30 __u32 status; /* thread synchronous flags */
31 __u32 cpu; /* current CPU */
32 int preempt_count; /* 0 => preemptable,
33 <0 => BUG */
34 mm_segment_t addr_limit;
35 struct restart_block restart_block;
36#ifdef CONFIG_IA32_EMULATION
37 void __user *sysenter_return;
38#endif
39};
40#endif
41
42/*
43 * macros/functions for gaining access to the thread information structure
44 * preempt_count needs to be 1 initially, until the scheduler is functional.
45 */
46#ifndef __ASSEMBLY__
47#define INIT_THREAD_INFO(tsk) \
48{ \
49 .task = &tsk, \
50 .exec_domain = &default_exec_domain, \
51 .flags = 0, \
52 .cpu = 0, \
53 .preempt_count = 1, \
54 .addr_limit = KERNEL_DS, \
55 .restart_block = { \
56 .fn = do_no_restart_syscall, \
57 }, \
58}
59
60#define init_thread_info (init_thread_union.thread_info)
61#define init_stack (init_thread_union.stack)
62
63static inline struct thread_info *current_thread_info(void)
64{
65 struct thread_info *ti;
66 ti = (void *)(read_pda(kernelstack) + PDA_STACKOFFSET - THREAD_SIZE);
67 return ti;
68}
69
70/* do not use in interrupt context */
71static inline struct thread_info *stack_thread_info(void)
72{
73 struct thread_info *ti;
74 asm("andq %%rsp,%0; " : "=r" (ti) : "0" (~(THREAD_SIZE - 1)));
75 return ti;
76}
77
78/* thread information allocation */
79#ifdef CONFIG_DEBUG_STACK_USAGE
80#define THREAD_FLAGS (GFP_KERNEL | __GFP_ZERO)
81#else
82#define THREAD_FLAGS GFP_KERNEL
83#endif
84
85#define alloc_thread_info(tsk) \
86 ((struct thread_info *)__get_free_pages(THREAD_FLAGS, THREAD_ORDER))
87
88#else /* !__ASSEMBLY__ */
89
90/* how to get the thread information struct from ASM */
91#define GET_THREAD_INFO(reg) \
92 movq %gs:pda_kernelstack,reg ; \
93 subq $(THREAD_SIZE-PDA_STACKOFFSET),reg
94
95#endif
96
97/*
98 * thread information flags
99 * - these are process state flags that various assembly files
100 * may need to access
101 * - pending work-to-be-done flags are in LSW
102 * - other flags in MSW
103 * Warning: layout of LSW is hardcoded in entry.S
104 */
105#define TIF_SYSCALL_TRACE 0 /* syscall trace active */
106#define TIF_SIGPENDING 2 /* signal pending */
107#define TIF_NEED_RESCHED 3 /* rescheduling necessary */
108#define TIF_SINGLESTEP 4 /* reenable singlestep on user return*/
109#define TIF_IRET 5 /* force IRET */
110#define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */
111#define TIF_SECCOMP 8 /* secure computing */
112#define TIF_MCE_NOTIFY 10 /* notify userspace of an MCE */
113#define TIF_HRTICK_RESCHED 11 /* reprogram hrtick timer */
114/* 16 free */
115#define TIF_IA32 17 /* 32bit process */
116#define TIF_FORK 18 /* ret_from_fork */
117#define TIF_ABI_PENDING 19
118#define TIF_MEMDIE 20
119#define TIF_DEBUG 21 /* uses debug registers */
120#define TIF_IO_BITMAP 22 /* uses I/O bitmap */
121#define TIF_FREEZE 23 /* is freezing for suspend */
122#define TIF_FORCED_TF 24 /* true if TF in eflags artificially */
123#define TIF_DEBUGCTLMSR 25 /* uses thread_struct.debugctlmsr */
124#define TIF_DS_AREA_MSR 26 /* uses thread_struct.ds_area_msr */
125#define TIF_BTS_TRACE_TS 27 /* record scheduling event timestamps */
126#define TIF_NOTSC 28 /* TSC is not accessible in userland */
127
128#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
129#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
130#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
131#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
132#define _TIF_IRET (1 << TIF_IRET)
133#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
134#define _TIF_SECCOMP (1 << TIF_SECCOMP)
135#define _TIF_MCE_NOTIFY (1 << TIF_MCE_NOTIFY)
136#define _TIF_HRTICK_RESCHED (1 << TIF_HRTICK_RESCHED)
137#define _TIF_IA32 (1 << TIF_IA32)
138#define _TIF_FORK (1 << TIF_FORK)
139#define _TIF_ABI_PENDING (1 << TIF_ABI_PENDING)
140#define _TIF_DEBUG (1 << TIF_DEBUG)
141#define _TIF_IO_BITMAP (1 << TIF_IO_BITMAP)
142#define _TIF_FREEZE (1 << TIF_FREEZE)
143#define _TIF_FORCED_TF (1 << TIF_FORCED_TF)
144#define _TIF_DEBUGCTLMSR (1 << TIF_DEBUGCTLMSR)
145#define _TIF_DS_AREA_MSR (1 << TIF_DS_AREA_MSR)
146#define _TIF_BTS_TRACE_TS (1 << TIF_BTS_TRACE_TS)
147#define _TIF_NOTSC (1 << TIF_NOTSC)
148
149/* work to do on interrupt/exception return */
150#define _TIF_WORK_MASK \
151 (0x0000FFFF & \
152 ~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP|_TIF_SECCOMP))
153/* work to do on any return to user space */
154#define _TIF_ALLWORK_MASK (0x0000FFFF & ~_TIF_SECCOMP)
155
156#define _TIF_DO_NOTIFY_MASK \
157 (_TIF_SIGPENDING|_TIF_SINGLESTEP|_TIF_MCE_NOTIFY|_TIF_HRTICK_RESCHED)
158
159/* flags to check in __switch_to() */
160#define _TIF_WORK_CTXSW \
161 (_TIF_IO_BITMAP|_TIF_DEBUGCTLMSR|_TIF_DS_AREA_MSR|_TIF_BTS_TRACE_TS|_TIF_NOTSC)
162#define _TIF_WORK_CTXSW_PREV _TIF_WORK_CTXSW
163#define _TIF_WORK_CTXSW_NEXT (_TIF_WORK_CTXSW|_TIF_DEBUG)
164
165#define PREEMPT_ACTIVE 0x10000000
166
167/*
168 * Thread-synchronous status.
169 *
170 * This is different from the flags in that nobody else
171 * ever touches our thread-synchronous status, so we don't
172 * have to worry about atomic accesses.
173 */
174#define TS_USEDFPU 0x0001 /* FPU was used by this task
175 this quantum (SMP) */
176#define TS_COMPAT 0x0002 /* 32bit syscall active */
177#define TS_POLLING 0x0004 /* true if in idle loop
178 and not sleeping */
179#define TS_RESTORE_SIGMASK 0x0008 /* restore signal mask in do_signal() */
180
181#define tsk_is_polling(t) (task_thread_info(t)->status & TS_POLLING)
182
183#ifndef __ASSEMBLY__
184#define HAVE_SET_RESTORE_SIGMASK 1
185static inline void set_restore_sigmask(void)
186{
187 struct thread_info *ti = current_thread_info();
188 ti->status |= TS_RESTORE_SIGMASK;
189 set_bit(TIF_SIGPENDING, &ti->flags);
190}
191#endif /* !__ASSEMBLY__ */
192
193#endif /* __KERNEL__ */
194
195#endif /* _ASM_THREAD_INFO_H */
diff --git a/include/asm-x86/tlbflush.h b/include/asm-x86/tlbflush.h
index 0c0674d94255..35c76ceb9f40 100644
--- a/include/asm-x86/tlbflush.h
+++ b/include/asm-x86/tlbflush.h
@@ -22,12 +22,23 @@ static inline void __native_flush_tlb(void)
22 22
23static inline void __native_flush_tlb_global(void) 23static inline void __native_flush_tlb_global(void)
24{ 24{
25 unsigned long cr4 = read_cr4(); 25 unsigned long flags;
26 unsigned long cr4;
26 27
28 /*
29 * Read-modify-write to CR4 - protect it from preemption and
30 * from interrupts. (Use the raw variant because this code can
31 * be called from deep inside debugging code.)
32 */
33 raw_local_irq_save(flags);
34
35 cr4 = read_cr4();
27 /* clear PGE */ 36 /* clear PGE */
28 write_cr4(cr4 & ~X86_CR4_PGE); 37 write_cr4(cr4 & ~X86_CR4_PGE);
29 /* write old PGE again and flush TLBs */ 38 /* write old PGE again and flush TLBs */
30 write_cr4(cr4); 39 write_cr4(cr4);
40
41 raw_local_irq_restore(flags);
31} 42}
32 43
33static inline void __native_flush_tlb_single(unsigned long addr) 44static inline void __native_flush_tlb_single(unsigned long addr)
diff --git a/include/asm-x86/unistd_64.h b/include/asm-x86/unistd_64.h
index fe26e36d0f51..9c1a4a3470d9 100644
--- a/include/asm-x86/unistd_64.h
+++ b/include/asm-x86/unistd_64.h
@@ -290,7 +290,7 @@ __SYSCALL(__NR_rt_sigtimedwait, sys_rt_sigtimedwait)
290#define __NR_rt_sigqueueinfo 129 290#define __NR_rt_sigqueueinfo 129
291__SYSCALL(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo) 291__SYSCALL(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo)
292#define __NR_rt_sigsuspend 130 292#define __NR_rt_sigsuspend 130
293__SYSCALL(__NR_rt_sigsuspend, stub_rt_sigsuspend) 293__SYSCALL(__NR_rt_sigsuspend, sys_rt_sigsuspend)
294#define __NR_sigaltstack 131 294#define __NR_sigaltstack 131
295__SYSCALL(__NR_sigaltstack, stub_sigaltstack) 295__SYSCALL(__NR_sigaltstack, stub_sigaltstack)
296#define __NR_utime 132 296#define __NR_utime 132
diff --git a/include/asm-x86/vm86.h b/include/asm-x86/vm86.h
index 074b357146df..5ce351325e01 100644
--- a/include/asm-x86/vm86.h
+++ b/include/asm-x86/vm86.h
@@ -14,12 +14,6 @@
14 14
15#include <asm/processor-flags.h> 15#include <asm/processor-flags.h>
16 16
17#ifdef CONFIG_VM86
18#define X86_VM_MASK X86_EFLAGS_VM
19#else
20#define X86_VM_MASK 0 /* No VM86 support */
21#endif
22
23#define BIOSSEG 0x0f000 17#define BIOSSEG 0x0f000
24 18
25#define CPU_086 0 19#define CPU_086 0
@@ -121,7 +115,6 @@ struct vm86plus_info_struct {
121 unsigned long is_vm86pus:1; /* for vm86 internal use */ 115 unsigned long is_vm86pus:1; /* for vm86 internal use */
122 unsigned char vm86dbg_intxxtab[32]; /* for debugger */ 116 unsigned char vm86dbg_intxxtab[32]; /* for debugger */
123}; 117};
124
125struct vm86plus_struct { 118struct vm86plus_struct {
126 struct vm86_regs regs; 119 struct vm86_regs regs;
127 unsigned long flags; 120 unsigned long flags;
@@ -133,6 +126,9 @@ struct vm86plus_struct {
133}; 126};
134 127
135#ifdef __KERNEL__ 128#ifdef __KERNEL__
129
130#include <asm/ptrace.h>
131
136/* 132/*
137 * This is the (kernel) stack-layout when we have done a "SAVE_ALL" from vm86 133 * This is the (kernel) stack-layout when we have done a "SAVE_ALL" from vm86
138 * mode - the main change is that the old segment descriptors aren't 134 * mode - the main change is that the old segment descriptors aren't
@@ -141,7 +137,6 @@ struct vm86plus_struct {
141 * at the end of the structure. Look at ptrace.h to see the "normal" 137 * at the end of the structure. Look at ptrace.h to see the "normal"
142 * setup. For user space layout see 'struct vm86_regs' above. 138 * setup. For user space layout see 'struct vm86_regs' above.
143 */ 139 */
144#include <asm/ptrace.h>
145 140
146struct kernel_vm86_regs { 141struct kernel_vm86_regs {
147/* 142/*
diff --git a/include/asm-x86/xen/hypercall.h b/include/asm-x86/xen/hypercall.h
index c2ccd997ed35..2a4f9b41d684 100644
--- a/include/asm-x86/xen/hypercall.h
+++ b/include/asm-x86/xen/hypercall.h
@@ -176,9 +176,9 @@ HYPERVISOR_fpu_taskswitch(int set)
176} 176}
177 177
178static inline int 178static inline int
179HYPERVISOR_sched_op(int cmd, unsigned long arg) 179HYPERVISOR_sched_op(int cmd, void *arg)
180{ 180{
181 return _hypercall2(int, sched_op, cmd, arg); 181 return _hypercall2(int, sched_op_new, cmd, arg);
182} 182}
183 183
184static inline long 184static inline long
@@ -315,6 +315,13 @@ HYPERVISOR_nmi_op(unsigned long op, unsigned long arg)
315} 315}
316 316
317static inline void 317static inline void
318MULTI_fpu_taskswitch(struct multicall_entry *mcl, int set)
319{
320 mcl->op = __HYPERVISOR_fpu_taskswitch;
321 mcl->args[0] = set;
322}
323
324static inline void
318MULTI_update_va_mapping(struct multicall_entry *mcl, unsigned long va, 325MULTI_update_va_mapping(struct multicall_entry *mcl, unsigned long va,
319 pte_t new_val, unsigned long flags) 326 pte_t new_val, unsigned long flags)
320{ 327{
diff --git a/include/asm-x86/xen/page.h b/include/asm-x86/xen/page.h
index 01799305f02a..377c04591c15 100644
--- a/include/asm-x86/xen/page.h
+++ b/include/asm-x86/xen/page.h
@@ -26,15 +26,20 @@ typedef struct xpaddr {
26#define FOREIGN_FRAME_BIT (1UL<<31) 26#define FOREIGN_FRAME_BIT (1UL<<31)
27#define FOREIGN_FRAME(m) ((m) | FOREIGN_FRAME_BIT) 27#define FOREIGN_FRAME(m) ((m) | FOREIGN_FRAME_BIT)
28 28
29extern unsigned long *phys_to_machine_mapping; 29/* Maximum amount of memory we can handle in a domain in pages */
30#define MAX_DOMAIN_PAGES \
31 ((unsigned long)((u64)CONFIG_XEN_MAX_DOMAIN_MEMORY * 1024 * 1024 * 1024 / PAGE_SIZE))
32
33
34extern unsigned long get_phys_to_machine(unsigned long pfn);
35extern void set_phys_to_machine(unsigned long pfn, unsigned long mfn);
30 36
31static inline unsigned long pfn_to_mfn(unsigned long pfn) 37static inline unsigned long pfn_to_mfn(unsigned long pfn)
32{ 38{
33 if (xen_feature(XENFEAT_auto_translated_physmap)) 39 if (xen_feature(XENFEAT_auto_translated_physmap))
34 return pfn; 40 return pfn;
35 41
36 return phys_to_machine_mapping[(unsigned int)(pfn)] & 42 return get_phys_to_machine(pfn) & ~FOREIGN_FRAME_BIT;
37 ~FOREIGN_FRAME_BIT;
38} 43}
39 44
40static inline int phys_to_machine_mapping_valid(unsigned long pfn) 45static inline int phys_to_machine_mapping_valid(unsigned long pfn)
@@ -42,7 +47,7 @@ static inline int phys_to_machine_mapping_valid(unsigned long pfn)
42 if (xen_feature(XENFEAT_auto_translated_physmap)) 47 if (xen_feature(XENFEAT_auto_translated_physmap))
43 return 1; 48 return 1;
44 49
45 return (phys_to_machine_mapping[pfn] != INVALID_P2M_ENTRY); 50 return get_phys_to_machine(pfn) != INVALID_P2M_ENTRY;
46} 51}
47 52
48static inline unsigned long mfn_to_pfn(unsigned long mfn) 53static inline unsigned long mfn_to_pfn(unsigned long mfn)
@@ -106,20 +111,12 @@ static inline unsigned long mfn_to_local_pfn(unsigned long mfn)
106 unsigned long pfn = mfn_to_pfn(mfn); 111 unsigned long pfn = mfn_to_pfn(mfn);
107 if ((pfn < max_mapnr) 112 if ((pfn < max_mapnr)
108 && !xen_feature(XENFEAT_auto_translated_physmap) 113 && !xen_feature(XENFEAT_auto_translated_physmap)
109 && (phys_to_machine_mapping[pfn] != mfn)) 114 && (get_phys_to_machine(pfn) != mfn))
110 return max_mapnr; /* force !pfn_valid() */ 115 return max_mapnr; /* force !pfn_valid() */
116 /* XXX fixme; not true with sparsemem */
111 return pfn; 117 return pfn;
112} 118}
113 119
114static inline void set_phys_to_machine(unsigned long pfn, unsigned long mfn)
115{
116 if (xen_feature(XENFEAT_auto_translated_physmap)) {
117 BUG_ON(pfn != mfn && mfn != INVALID_P2M_ENTRY);
118 return;
119 }
120 phys_to_machine_mapping[pfn] = mfn;
121}
122
123/* VIRT <-> MACHINE conversion */ 120/* VIRT <-> MACHINE conversion */
124#define virt_to_machine(v) (phys_to_machine(XPADDR(__pa(v)))) 121#define virt_to_machine(v) (phys_to_machine(XPADDR(__pa(v))))
125#define virt_to_mfn(v) (pfn_to_mfn(PFN_DOWN(__pa(v)))) 122#define virt_to_mfn(v) (pfn_to_mfn(PFN_DOWN(__pa(v))))
@@ -127,7 +124,7 @@ static inline void set_phys_to_machine(unsigned long pfn, unsigned long mfn)
127 124
128static inline unsigned long pte_mfn(pte_t pte) 125static inline unsigned long pte_mfn(pte_t pte)
129{ 126{
130 return (pte.pte & ~_PAGE_NX) >> PAGE_SHIFT; 127 return (pte.pte & PTE_MASK) >> PAGE_SHIFT;
131} 128}
132 129
133static inline pte_t mfn_pte(unsigned long page_nr, pgprot_t pgprot) 130static inline pte_t mfn_pte(unsigned long page_nr, pgprot_t pgprot)
@@ -150,13 +147,9 @@ static inline pte_t __pte_ma(pteval_t x)
150 return (pte_t) { .pte = x }; 147 return (pte_t) { .pte = x };
151} 148}
152 149
153#ifdef CONFIG_X86_PAE
154#define pmd_val_ma(v) ((v).pmd) 150#define pmd_val_ma(v) ((v).pmd)
155#define pud_val_ma(v) ((v).pgd.pgd) 151#define pud_val_ma(v) ((v).pgd.pgd)
156#define __pmd_ma(x) ((pmd_t) { (x) } ) 152#define __pmd_ma(x) ((pmd_t) { (x) } )
157#else /* !X86_PAE */
158#define pmd_val_ma(v) ((v).pud.pgd.pgd)
159#endif /* CONFIG_X86_PAE */
160 153
161#define pgd_val_ma(x) ((x).pgd) 154#define pgd_val_ma(x) ((x).pgd)
162 155
diff --git a/include/asm-x86/xor_32.h b/include/asm-x86/xor_32.h
index 067b5c1835a3..921b45840449 100644
--- a/include/asm-x86/xor_32.h
+++ b/include/asm-x86/xor_32.h
@@ -1,3 +1,6 @@
1#ifndef ASM_X86__XOR_32_H
2#define ASM_X86__XOR_32_H
3
1/* 4/*
2 * Optimized RAID-5 checksumming functions for MMX and SSE. 5 * Optimized RAID-5 checksumming functions for MMX and SSE.
3 * 6 *
@@ -881,3 +884,5 @@ do { \
881 deals with a load to a line that is being prefetched. */ 884 deals with a load to a line that is being prefetched. */
882#define XOR_SELECT_TEMPLATE(FASTEST) \ 885#define XOR_SELECT_TEMPLATE(FASTEST) \
883 (cpu_has_xmm ? &xor_block_pIII_sse : FASTEST) 886 (cpu_has_xmm ? &xor_block_pIII_sse : FASTEST)
887
888#endif /* ASM_X86__XOR_32_H */
diff --git a/include/asm-x86/xor_64.h b/include/asm-x86/xor_64.h
index 24957e39ac8a..2d3a18de295b 100644
--- a/include/asm-x86/xor_64.h
+++ b/include/asm-x86/xor_64.h
@@ -1,3 +1,6 @@
1#ifndef ASM_X86__XOR_64_H
2#define ASM_X86__XOR_64_H
3
1/* 4/*
2 * Optimized RAID-5 checksumming functions for MMX and SSE. 5 * Optimized RAID-5 checksumming functions for MMX and SSE.
3 * 6 *
@@ -354,3 +357,5 @@ do { \
354 We may also be able to load into the L1 only depending on how the cpu 357 We may also be able to load into the L1 only depending on how the cpu
355 deals with a load to a line that is being prefetched. */ 358 deals with a load to a line that is being prefetched. */
356#define XOR_SELECT_TEMPLATE(FASTEST) (&xor_block_sse) 359#define XOR_SELECT_TEMPLATE(FASTEST) (&xor_block_sse)
360
361#endif /* ASM_X86__XOR_64_H */
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 5dfa739045c8..71d70d1fbce2 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -92,7 +92,6 @@ header-y += if_slip.h
92header-y += if_strip.h 92header-y += if_strip.h
93header-y += if_tun.h 93header-y += if_tun.h
94header-y += if_tunnel.h 94header-y += if_tunnel.h
95header-y += in6.h
96header-y += in_route.h 95header-y += in_route.h
97header-y += ioctl.h 96header-y += ioctl.h
98header-y += ip6_tunnel.h 97header-y += ip6_tunnel.h
@@ -167,6 +166,9 @@ unifdef-y += acct.h
167unifdef-y += adb.h 166unifdef-y += adb.h
168unifdef-y += adfs_fs.h 167unifdef-y += adfs_fs.h
169unifdef-y += agpgart.h 168unifdef-y += agpgart.h
169ifneq ($(wildcard $(srctree)/include/asm-$(SRCARCH)/a.out.h),)
170unifdef-y += a.out.h
171endif
170unifdef-y += apm_bios.h 172unifdef-y += apm_bios.h
171unifdef-y += atalk.h 173unifdef-y += atalk.h
172unifdef-y += atmdev.h 174unifdef-y += atmdev.h
@@ -236,6 +238,7 @@ unifdef-y += if_vlan.h
236unifdef-y += igmp.h 238unifdef-y += igmp.h
237unifdef-y += inet_diag.h 239unifdef-y += inet_diag.h
238unifdef-y += in.h 240unifdef-y += in.h
241unifdef-y += in6.h
239unifdef-y += inotify.h 242unifdef-y += inotify.h
240unifdef-y += input.h 243unifdef-y += input.h
241unifdef-y += ip.h 244unifdef-y += ip.h
diff --git a/include/linux/a.out.h b/include/linux/a.out.h
index 208f4e8ed304..e86dfca44589 100644
--- a/include/linux/a.out.h
+++ b/include/linux/a.out.h
@@ -1,8 +1,6 @@
1#ifndef __A_OUT_GNU_H__ 1#ifndef __A_OUT_GNU_H__
2#define __A_OUT_GNU_H__ 2#define __A_OUT_GNU_H__
3 3
4#ifdef CONFIG_ARCH_SUPPORTS_AOUT
5
6#define __GNU_EXEC_MACROS__ 4#define __GNU_EXEC_MACROS__
7 5
8#ifndef __STRUCT_EXEC_OVERRIDE__ 6#ifndef __STRUCT_EXEC_OVERRIDE__
@@ -277,10 +275,4 @@ struct relocation_info
277#endif /* no N_RELOCATION_INFO_DECLARED. */ 275#endif /* no N_RELOCATION_INFO_DECLARED. */
278 276
279#endif /*__ASSEMBLY__ */ 277#endif /*__ASSEMBLY__ */
280#else /* CONFIG_ARCH_SUPPORTS_AOUT */
281#ifndef __ASSEMBLY__
282struct exec {
283};
284#endif
285#endif /* CONFIG_ARCH_SUPPORTS_AOUT */
286#endif /* __A_OUT_GNU_H__ */ 278#endif /* __A_OUT_GNU_H__ */
diff --git a/include/linux/agp_backend.h b/include/linux/agp_backend.h
index 661d90d6cf7c..972b12bcfb36 100644
--- a/include/linux/agp_backend.h
+++ b/include/linux/agp_backend.h
@@ -30,14 +30,6 @@
30#ifndef _AGP_BACKEND_H 30#ifndef _AGP_BACKEND_H
31#define _AGP_BACKEND_H 1 31#define _AGP_BACKEND_H 1
32 32
33#ifndef TRUE
34#define TRUE 1
35#endif
36
37#ifndef FALSE
38#define FALSE 0
39#endif
40
41enum chipset_type { 33enum chipset_type {
42 NOT_SUPPORTED, 34 NOT_SUPPORTED,
43 SUPPORTED, 35 SUPPORTED,
@@ -57,7 +49,7 @@ struct agp_kern_info {
57 size_t aper_size; 49 size_t aper_size;
58 int max_memory; /* In pages */ 50 int max_memory; /* In pages */
59 int current_memory; 51 int current_memory;
60 int cant_use_aperture; 52 bool cant_use_aperture;
61 unsigned long page_mask; 53 unsigned long page_mask;
62 struct vm_operations_struct *vm_ops; 54 struct vm_operations_struct *vm_ops;
63}; 55};
@@ -83,9 +75,9 @@ struct agp_memory {
83 off_t pg_start; 75 off_t pg_start;
84 u32 type; 76 u32 type;
85 u32 physical; 77 u32 physical;
86 u8 is_bound; 78 bool is_bound;
87 u8 is_flushed; 79 bool is_flushed;
88 u8 vmalloc_flag; 80 bool vmalloc_flag;
89}; 81};
90 82
91#define AGP_NORMAL_MEMORY 0 83#define AGP_NORMAL_MEMORY 0
diff --git a/include/linux/agpgart.h b/include/linux/agpgart.h
index 62aef589eb94..c8fdb6e658e1 100644
--- a/include/linux/agpgart.h
+++ b/include/linux/agpgart.h
@@ -206,8 +206,8 @@ struct agp_front_data {
206 struct agp_controller *current_controller; 206 struct agp_controller *current_controller;
207 struct agp_controller *controllers; 207 struct agp_controller *controllers;
208 struct agp_file_private *file_priv_list; 208 struct agp_file_private *file_priv_list;
209 u8 used_by_controller; 209 bool used_by_controller;
210 u8 backend_acquired; 210 bool backend_acquired;
211}; 211};
212 212
213#endif /* __KERNEL__ */ 213#endif /* __KERNEL__ */
diff --git a/include/linux/atm.h b/include/linux/atm.h
index 60136684e0af..c791ddd96939 100644
--- a/include/linux/atm.h
+++ b/include/linux/atm.h
@@ -16,14 +16,11 @@
16 * documentation. Do not change them. 16 * documentation. Do not change them.
17 */ 17 */
18 18
19#ifdef __KERNEL__
20#include <linux/socket.h>
21#include <linux/types.h>
22#endif
23#include <linux/compiler.h> 19#include <linux/compiler.h>
24#include <linux/atmapi.h> 20#include <linux/atmapi.h>
25#include <linux/atmsap.h> 21#include <linux/atmsap.h>
26#include <linux/atmioc.h> 22#include <linux/atmioc.h>
23#include <linux/types.h>
27 24
28 25
29/* general ATM constants */ 26/* general ATM constants */
@@ -212,7 +209,7 @@ struct sockaddr_atmsvc {
212 char pub[ATM_E164_LEN+1]; /* public address (E.164) */ 209 char pub[ATM_E164_LEN+1]; /* public address (E.164) */
213 /* unused addresses must be bzero'ed */ 210 /* unused addresses must be bzero'ed */
214 char lij_type; /* role in LIJ call; one of ATM_LIJ* */ 211 char lij_type; /* role in LIJ call; one of ATM_LIJ* */
215 uint32_t lij_id; /* LIJ call identifier */ 212 __u32 lij_id; /* LIJ call identifier */
216 } sas_addr __ATM_API_ALIGN; /* SVC address */ 213 } sas_addr __ATM_API_ALIGN; /* SVC address */
217}; 214};
218 215
diff --git a/include/linux/atm_tcp.h b/include/linux/atm_tcp.h
index 18787f9b2f19..375638f8554b 100644
--- a/include/linux/atm_tcp.h
+++ b/include/linux/atm_tcp.h
@@ -8,11 +8,9 @@
8#define LINUX_ATM_TCP_H 8#define LINUX_ATM_TCP_H
9 9
10#include <linux/atmapi.h> 10#include <linux/atmapi.h>
11 11#include <linux/atm.h>
12#ifdef __KERNEL__
13#include <linux/types.h>
14#endif
15#include <linux/atmioc.h> 12#include <linux/atmioc.h>
13#include <linux/types.h>
16 14
17 15
18/* 16/*
@@ -20,9 +18,9 @@
20 */ 18 */
21 19
22struct atmtcp_hdr { 20struct atmtcp_hdr {
23 uint16_t vpi; 21 __u16 vpi;
24 uint16_t vci; 22 __u16 vci;
25 uint32_t length; /* ... of data part */ 23 __u32 length; /* ... of data part */
26}; 24};
27 25
28/* 26/*
diff --git a/include/linux/audit.h b/include/linux/audit.h
index 63c3bb98558f..8b82974bdc12 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -571,7 +571,7 @@ extern void audit_log_lost(const char *message);
571extern int audit_update_lsm_rules(void); 571extern int audit_update_lsm_rules(void);
572 572
573 /* Private API (for audit.c only) */ 573 /* Private API (for audit.c only) */
574extern int audit_filter_user(struct netlink_skb_parms *cb, int type); 574extern int audit_filter_user(struct netlink_skb_parms *cb);
575extern int audit_filter_type(int type); 575extern int audit_filter_type(int type);
576extern int audit_receive_filter(int type, int pid, int uid, int seq, 576extern int audit_receive_filter(int type, int pid, int uid, int seq,
577 void *data, size_t datasz, uid_t loginuid, 577 void *data, size_t datasz, uid_t loginuid,
diff --git a/include/linux/bitrev.h b/include/linux/bitrev.h
index 05e540d6963a..7ffe03f4693d 100644
--- a/include/linux/bitrev.h
+++ b/include/linux/bitrev.h
@@ -10,6 +10,7 @@ static inline u8 bitrev8(u8 byte)
10 return byte_rev_table[byte]; 10 return byte_rev_table[byte];
11} 11}
12 12
13extern u16 bitrev16(u16 in);
13extern u32 bitrev32(u32 in); 14extern u32 bitrev32(u32 in);
14 15
15#endif /* _LINUX_BITREV_H */ 16#endif /* _LINUX_BITREV_H */
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h
index cfc3147e5cf9..e3ef903aae88 100644
--- a/include/linux/blktrace_api.h
+++ b/include/linux/blktrace_api.h
@@ -55,6 +55,7 @@ enum blktrace_act {
55enum blktrace_notify { 55enum blktrace_notify {
56 __BLK_TN_PROCESS = 0, /* establish pid/name mapping */ 56 __BLK_TN_PROCESS = 0, /* establish pid/name mapping */
57 __BLK_TN_TIMESTAMP, /* include system clock */ 57 __BLK_TN_TIMESTAMP, /* include system clock */
58 __BLK_TN_MESSAGE, /* Character string message */
58}; 59};
59 60
60 61
@@ -79,6 +80,7 @@ enum blktrace_notify {
79 80
80#define BLK_TN_PROCESS (__BLK_TN_PROCESS | BLK_TC_ACT(BLK_TC_NOTIFY)) 81#define BLK_TN_PROCESS (__BLK_TN_PROCESS | BLK_TC_ACT(BLK_TC_NOTIFY))
81#define BLK_TN_TIMESTAMP (__BLK_TN_TIMESTAMP | BLK_TC_ACT(BLK_TC_NOTIFY)) 82#define BLK_TN_TIMESTAMP (__BLK_TN_TIMESTAMP | BLK_TC_ACT(BLK_TC_NOTIFY))
83#define BLK_TN_MESSAGE (__BLK_TN_MESSAGE | BLK_TC_ACT(BLK_TC_NOTIFY))
82 84
83#define BLK_IO_TRACE_MAGIC 0x65617400 85#define BLK_IO_TRACE_MAGIC 0x65617400
84#define BLK_IO_TRACE_VERSION 0x07 86#define BLK_IO_TRACE_VERSION 0x07
@@ -119,6 +121,7 @@ struct blk_trace {
119 int trace_state; 121 int trace_state;
120 struct rchan *rchan; 122 struct rchan *rchan;
121 unsigned long *sequence; 123 unsigned long *sequence;
124 unsigned char *msg_data;
122 u16 act_mask; 125 u16 act_mask;
123 u64 start_lba; 126 u64 start_lba;
124 u64 end_lba; 127 u64 end_lba;
@@ -149,7 +152,28 @@ extern void blk_trace_shutdown(struct request_queue *);
149extern void __blk_add_trace(struct blk_trace *, sector_t, int, int, u32, int, int, void *); 152extern void __blk_add_trace(struct blk_trace *, sector_t, int, int, u32, int, int, void *);
150extern int do_blk_trace_setup(struct request_queue *q, 153extern int do_blk_trace_setup(struct request_queue *q,
151 char *name, dev_t dev, struct blk_user_trace_setup *buts); 154 char *name, dev_t dev, struct blk_user_trace_setup *buts);
155extern void __trace_note_message(struct blk_trace *, const char *fmt, ...);
152 156
157/**
158 * blk_add_trace_msg - Add a (simple) message to the blktrace stream
159 * @q: queue the io is for
160 * @fmt: format to print message in
161 * args... Variable argument list for format
162 *
163 * Description:
164 * Records a (simple) message onto the blktrace stream.
165 *
166 * NOTE: BLK_TN_MAX_MSG characters are output at most.
167 * NOTE: Can not use 'static inline' due to presence of var args...
168 *
169 **/
170#define blk_add_trace_msg(q, fmt, ...) \
171 do { \
172 struct blk_trace *bt = (q)->blk_trace; \
173 if (unlikely(bt)) \
174 __trace_note_message(bt, fmt, ##__VA_ARGS__); \
175 } while (0)
176#define BLK_TN_MAX_MSG 128
153 177
154/** 178/**
155 * blk_add_trace_rq - Add a trace for a request oriented action 179 * blk_add_trace_rq - Add a trace for a request oriented action
@@ -299,6 +323,8 @@ extern int blk_trace_remove(struct request_queue *q);
299#define blk_trace_setup(q, name, dev, arg) (-ENOTTY) 323#define blk_trace_setup(q, name, dev, arg) (-ENOTTY)
300#define blk_trace_startstop(q, start) (-ENOTTY) 324#define blk_trace_startstop(q, start) (-ENOTTY)
301#define blk_trace_remove(q) (-ENOTTY) 325#define blk_trace_remove(q) (-ENOTTY)
326#define blk_add_trace_msg(q, fmt, ...) do { } while (0)
327
302#endif /* CONFIG_BLK_DEV_IO_TRACE */ 328#endif /* CONFIG_BLK_DEV_IO_TRACE */
303#endif /* __KERNEL__ */ 329#endif /* __KERNEL__ */
304#endif 330#endif
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h
index 6a5dbdc8a7dc..686895bacd9d 100644
--- a/include/linux/bootmem.h
+++ b/include/linux/bootmem.h
@@ -94,7 +94,7 @@ extern unsigned long init_bootmem_node(pg_data_t *pgdat,
94 unsigned long freepfn, 94 unsigned long freepfn,
95 unsigned long startpfn, 95 unsigned long startpfn,
96 unsigned long endpfn); 96 unsigned long endpfn);
97extern void reserve_bootmem_node(pg_data_t *pgdat, 97extern int reserve_bootmem_node(pg_data_t *pgdat,
98 unsigned long physaddr, 98 unsigned long physaddr,
99 unsigned long size, 99 unsigned long size,
100 int flags); 100 int flags);
diff --git a/include/linux/capability.h b/include/linux/capability.h
index f4ea0dd9a618..02673846d205 100644
--- a/include/linux/capability.h
+++ b/include/linux/capability.h
@@ -31,11 +31,11 @@ struct task_struct;
31#define _LINUX_CAPABILITY_VERSION_1 0x19980330 31#define _LINUX_CAPABILITY_VERSION_1 0x19980330
32#define _LINUX_CAPABILITY_U32S_1 1 32#define _LINUX_CAPABILITY_U32S_1 1
33 33
34#define _LINUX_CAPABILITY_VERSION_2 0x20071026 34#define _LINUX_CAPABILITY_VERSION_2 0x20071026 /* deprecated - use v3 */
35#define _LINUX_CAPABILITY_U32S_2 2 35#define _LINUX_CAPABILITY_U32S_2 2
36 36
37#define _LINUX_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_2 37#define _LINUX_CAPABILITY_VERSION_3 0x20080522
38#define _LINUX_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_2 38#define _LINUX_CAPABILITY_U32S_3 2
39 39
40typedef struct __user_cap_header_struct { 40typedef struct __user_cap_header_struct {
41 __u32 version; 41 __u32 version;
@@ -77,10 +77,23 @@ struct vfs_cap_data {
77 } data[VFS_CAP_U32]; 77 } data[VFS_CAP_U32];
78}; 78};
79 79
80#ifdef __KERNEL__ 80#ifndef __KERNEL__
81
82/*
83 * Backwardly compatible definition for source code - trapped in a
84 * 32-bit world. If you find you need this, please consider using
85 * libcap to untrap yourself...
86 */
87#define _LINUX_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_1
88#define _LINUX_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_1
89
90#else
91
92#define _KERNEL_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_3
93#define _KERNEL_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_3
81 94
82typedef struct kernel_cap_struct { 95typedef struct kernel_cap_struct {
83 __u32 cap[_LINUX_CAPABILITY_U32S]; 96 __u32 cap[_KERNEL_CAPABILITY_U32S];
84} kernel_cap_t; 97} kernel_cap_t;
85 98
86#define _USER_CAP_HEADER_SIZE (sizeof(struct __user_cap_header_struct)) 99#define _USER_CAP_HEADER_SIZE (sizeof(struct __user_cap_header_struct))
@@ -351,7 +364,7 @@ typedef struct kernel_cap_struct {
351 */ 364 */
352 365
353#define CAP_FOR_EACH_U32(__capi) \ 366#define CAP_FOR_EACH_U32(__capi) \
354 for (__capi = 0; __capi < _LINUX_CAPABILITY_U32S; ++__capi) 367 for (__capi = 0; __capi < _KERNEL_CAPABILITY_U32S; ++__capi)
355 368
356# define CAP_FS_MASK_B0 (CAP_TO_MASK(CAP_CHOWN) \ 369# define CAP_FS_MASK_B0 (CAP_TO_MASK(CAP_CHOWN) \
357 | CAP_TO_MASK(CAP_DAC_OVERRIDE) \ 370 | CAP_TO_MASK(CAP_DAC_OVERRIDE) \
@@ -361,7 +374,7 @@ typedef struct kernel_cap_struct {
361 374
362# define CAP_FS_MASK_B1 (CAP_TO_MASK(CAP_MAC_OVERRIDE)) 375# define CAP_FS_MASK_B1 (CAP_TO_MASK(CAP_MAC_OVERRIDE))
363 376
364#if _LINUX_CAPABILITY_U32S != 2 377#if _KERNEL_CAPABILITY_U32S != 2
365# error Fix up hand-coded capability macro initializers 378# error Fix up hand-coded capability macro initializers
366#else /* HAND-CODED capability initializers */ 379#else /* HAND-CODED capability initializers */
367 380
@@ -372,7 +385,7 @@ typedef struct kernel_cap_struct {
372# define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0|CAP_TO_MASK(CAP_SYS_RESOURCE), \ 385# define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0|CAP_TO_MASK(CAP_SYS_RESOURCE), \
373 CAP_FS_MASK_B1 } }) 386 CAP_FS_MASK_B1 } })
374 387
375#endif /* _LINUX_CAPABILITY_U32S != 2 */ 388#endif /* _KERNEL_CAPABILITY_U32S != 2 */
376 389
377#define CAP_INIT_INH_SET CAP_EMPTY_SET 390#define CAP_INIT_INH_SET CAP_EMPTY_SET
378 391
@@ -488,6 +501,8 @@ extern const kernel_cap_t __cap_empty_set;
488extern const kernel_cap_t __cap_full_set; 501extern const kernel_cap_t __cap_full_set;
489extern const kernel_cap_t __cap_init_eff_set; 502extern const kernel_cap_t __cap_init_eff_set;
490 503
504kernel_cap_t cap_set_effective(const kernel_cap_t pE_new);
505
491int capable(int cap); 506int capable(int cap);
492int __capable(struct task_struct *t, int cap); 507int __capable(struct task_struct *t, int cap);
493 508
diff --git a/include/linux/cfag12864b.h b/include/linux/cfag12864b.h
index 1605dd8aa646..6f9f19d66591 100644
--- a/include/linux/cfag12864b.h
+++ b/include/linux/cfag12864b.h
@@ -4,7 +4,7 @@
4 * Description: cfag12864b LCD driver header 4 * Description: cfag12864b LCD driver header
5 * License: GPLv2 5 * License: GPLv2
6 * 6 *
7 * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> 7 * Author: Copyright (C) Miguel Ojeda Sandonis
8 * Date: 2006-10-12 8 * Date: 2006-10-12
9 * 9 *
10 * This program is free software; you can redistribute it and/or modify 10 * This program is free software; you can redistribute it and/or modify
diff --git a/include/linux/console.h b/include/linux/console.h
index a4f27fbdf549..248e6e3b9b73 100644
--- a/include/linux/console.h
+++ b/include/linux/console.h
@@ -108,6 +108,8 @@ struct console {
108 struct console *next; 108 struct console *next;
109}; 109};
110 110
111extern int console_set_on_cmdline;
112
111extern int add_preferred_console(char *name, int idx, char *options); 113extern int add_preferred_console(char *name, int idx, char *options);
112extern int update_console_cmdline(char *name, int idx, char *name_new, int idx_new, char *options); 114extern int update_console_cmdline(char *name, int idx, char *name_new, int idx_new, char *options);
113extern void register_console(struct console *); 115extern void register_console(struct console *);
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index 51e6b1e520e6..dcf77fa826b5 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -82,6 +82,7 @@ struct cpuidle_state_kobj {
82}; 82};
83 83
84struct cpuidle_device { 84struct cpuidle_device {
85 unsigned int registered:1;
85 unsigned int enabled:1; 86 unsigned int enabled:1;
86 unsigned int cpu; 87 unsigned int cpu;
87 88
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index 5df3db58fcc6..c24875bd9c5b 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -353,6 +353,10 @@ static inline void __cpus_fold(cpumask_t *dstp, const cpumask_t *origp,
353 for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask) 353 for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
354#endif /* NR_CPUS */ 354#endif /* NR_CPUS */
355 355
356#define next_cpu_nr(n, src) next_cpu(n, src)
357#define cpus_weight_nr(cpumask) cpus_weight(cpumask)
358#define for_each_cpu_mask_nr(cpu, mask) for_each_cpu_mask(cpu, mask)
359
356/* 360/*
357 * The following particular system cpumasks and operations manage 361 * The following particular system cpumasks and operations manage
358 * possible, present and online cpus. Each of them is a fixed size 362 * possible, present and online cpus. Each of them is a fixed size
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 2a6639407c80..d982eb89c77d 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -300,7 +300,7 @@ extern int d_validate(struct dentry *, struct dentry *);
300extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...); 300extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...);
301 301
302extern char *__d_path(const struct path *path, struct path *root, char *, int); 302extern char *__d_path(const struct path *path, struct path *root, char *, int);
303extern char *d_path(struct path *, char *, int); 303extern char *d_path(const struct path *, char *, int);
304extern char *dentry_path(struct dentry *, char *, int); 304extern char *dentry_path(struct dentry *, char *, int);
305 305
306/* Allocation counts.. */ 306/* Allocation counts.. */
diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h
index f4a5871767f5..4aaa4afb1cb9 100644
--- a/include/linux/debug_locks.h
+++ b/include/linux/debug_locks.h
@@ -1,6 +1,8 @@
1#ifndef __LINUX_DEBUG_LOCKING_H 1#ifndef __LINUX_DEBUG_LOCKING_H
2#define __LINUX_DEBUG_LOCKING_H 2#define __LINUX_DEBUG_LOCKING_H
3 3
4#include <linux/kernel.h>
5
4struct task_struct; 6struct task_struct;
5 7
6extern int debug_locks; 8extern int debug_locks;
@@ -11,14 +13,6 @@ extern int debug_locks_silent;
11 */ 13 */
12extern int debug_locks_off(void); 14extern int debug_locks_off(void);
13 15
14/*
15 * In the debug case we carry the caller's instruction pointer into
16 * other functions, but we dont want the function argument overhead
17 * in the nondebug case - hence these macros:
18 */
19#define _RET_IP_ (unsigned long)__builtin_return_address(0)
20#define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; })
21
22#define DEBUG_LOCKS_WARN_ON(c) \ 16#define DEBUG_LOCKS_WARN_ON(c) \
23({ \ 17({ \
24 int __ret = 0; \ 18 int __ret = 0; \
diff --git a/include/linux/device.h b/include/linux/device.h
index 15e9fa3ad3af..6a2d04c011bc 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -385,6 +385,9 @@ static inline const char *dev_name(struct device *dev)
385 return dev->bus_id; 385 return dev->bus_id;
386} 386}
387 387
388extern int dev_set_name(struct device *dev, const char *name, ...)
389 __attribute__((format(printf, 2, 3)));
390
388#ifdef CONFIG_NUMA 391#ifdef CONFIG_NUMA
389static inline int dev_to_node(struct device *dev) 392static inline int dev_to_node(struct device *dev)
390{ 393{
@@ -449,9 +452,21 @@ extern int __must_check device_reprobe(struct device *dev);
449/* 452/*
450 * Easy functions for dynamically creating devices on the fly 453 * Easy functions for dynamically creating devices on the fly
451 */ 454 */
455extern struct device *device_create_vargs(struct class *cls,
456 struct device *parent,
457 dev_t devt,
458 void *drvdata,
459 const char *fmt,
460 va_list vargs);
452extern struct device *device_create(struct class *cls, struct device *parent, 461extern struct device *device_create(struct class *cls, struct device *parent,
453 dev_t devt, const char *fmt, ...) 462 dev_t devt, const char *fmt, ...)
454 __attribute__((format(printf, 4, 5))); 463 __attribute__((format(printf, 4, 5)));
464extern struct device *device_create_drvdata(struct class *cls,
465 struct device *parent,
466 dev_t devt,
467 void *drvdata,
468 const char *fmt, ...)
469 __attribute__((format(printf, 5, 6)));
455extern void device_destroy(struct class *cls, dev_t devt); 470extern void device_destroy(struct class *cls, dev_t devt);
456 471
457/* 472/*
diff --git a/include/linux/firmware.h b/include/linux/firmware.h
index 4d10c7328d2d..6c7eff2ebada 100644
--- a/include/linux/firmware.h
+++ b/include/linux/firmware.h
@@ -13,7 +13,7 @@ struct firmware {
13 13
14struct device; 14struct device;
15 15
16#if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE) 16#if defined(CONFIG_FW_LOADER) || (defined(CONFIG_FW_LOADER_MODULE) && defined(MODULE))
17int request_firmware(const struct firmware **fw, const char *name, 17int request_firmware(const struct firmware **fw, const char *name,
18 struct device *device); 18 struct device *device);
19int request_firmware_nowait( 19int request_firmware_nowait(
diff --git a/include/linux/fs.h b/include/linux/fs.h
index f413085f748e..d8e2762ed14d 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -83,6 +83,7 @@ extern int dir_notify_enable;
83#define READ_SYNC (READ | (1 << BIO_RW_SYNC)) 83#define READ_SYNC (READ | (1 << BIO_RW_SYNC))
84#define READ_META (READ | (1 << BIO_RW_META)) 84#define READ_META (READ | (1 << BIO_RW_META))
85#define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNC)) 85#define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNC))
86#define SWRITE_SYNC (SWRITE | (1 << BIO_RW_SYNC))
86#define WRITE_BARRIER ((1 << BIO_RW) | (1 << BIO_RW_BARRIER)) 87#define WRITE_BARRIER ((1 << BIO_RW) | (1 << BIO_RW_BARRIER))
87 88
88#define SEL_IN 1 89#define SEL_IN 1
@@ -894,8 +895,6 @@ static inline int file_check_writeable(struct file *filp)
894typedef struct files_struct *fl_owner_t; 895typedef struct files_struct *fl_owner_t;
895 896
896struct file_lock_operations { 897struct file_lock_operations {
897 void (*fl_insert)(struct file_lock *); /* lock insertion callback */
898 void (*fl_remove)(struct file_lock *); /* lock removal callback */
899 void (*fl_copy_lock)(struct file_lock *, struct file_lock *); 898 void (*fl_copy_lock)(struct file_lock *, struct file_lock *);
900 void (*fl_release_private)(struct file_lock *); 899 void (*fl_release_private)(struct file_lock *);
901}; 900};
@@ -2000,7 +1999,10 @@ extern int simple_fill_super(struct super_block *, int, struct tree_descr *);
2000extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count); 1999extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count);
2001extern void simple_release_fs(struct vfsmount **mount, int *count); 2000extern void simple_release_fs(struct vfsmount **mount, int *count);
2002 2001
2003extern ssize_t simple_read_from_buffer(void __user *, size_t, loff_t *, const void *, size_t); 2002extern ssize_t simple_read_from_buffer(void __user *to, size_t count,
2003 loff_t *ppos, const void *from, size_t available);
2004extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos,
2005 const void *from, size_t available);
2004 2006
2005#ifdef CONFIG_MIGRATION 2007#ifdef CONFIG_MIGRATION
2006extern int buffer_migrate_page(struct address_space *, 2008extern int buffer_migrate_page(struct address_space *,
diff --git a/include/linux/gpio.h b/include/linux/gpio.h
index 4987a84078ef..98be6c5762b9 100644
--- a/include/linux/gpio.h
+++ b/include/linux/gpio.h
@@ -8,6 +8,9 @@
8 8
9#else 9#else
10 10
11#include <linux/types.h>
12#include <linux/errno.h>
13
11/* 14/*
12 * Some platforms don't support the GPIO programming interface. 15 * Some platforms don't support the GPIO programming interface.
13 * 16 *
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 4ce3b7a979ba..fe56b86f2c67 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -2,8 +2,6 @@
2#define __HID_H 2#define __HID_H
3 3
4/* 4/*
5 * $Id: hid.h,v 1.24 2001/12/27 10:37:41 vojtech Exp $
6 *
7 * Copyright (c) 1999 Andreas Gal 5 * Copyright (c) 1999 Andreas Gal
8 * Copyright (c) 2000-2001 Vojtech Pavlik 6 * Copyright (c) 2000-2001 Vojtech Pavlik
9 * Copyright (c) 2006-2007 Jiri Kosina 7 * Copyright (c) 2006-2007 Jiri Kosina
@@ -285,6 +283,7 @@ struct hid_item {
285#define HID_QUIRK_HWHEEL_WHEEL_INVERT 0x04000000 283#define HID_QUIRK_HWHEEL_WHEEL_INVERT 0x04000000
286#define HID_QUIRK_MICROSOFT_KEYS 0x08000000 284#define HID_QUIRK_MICROSOFT_KEYS 0x08000000
287#define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000 285#define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000
286#define HID_QUIRK_APPLE_NUMLOCK_EMULATION 0x20000000
288 287
289/* 288/*
290 * Separate quirks for runtime report descriptor fixup 289 * Separate quirks for runtime report descriptor fixup
diff --git a/include/linux/hiddev.h b/include/linux/hiddev.h
index acbdae6d7ae1..a416b904ba90 100644
--- a/include/linux/hiddev.h
+++ b/include/linux/hiddev.h
@@ -2,8 +2,6 @@
2#define _HIDDEV_H 2#define _HIDDEV_H
3 3
4/* 4/*
5 * $Id: hiddev.h,v 1.2 2001/04/26 11:26:09 vojtech Exp $
6 *
7 * Copyright (c) 1999-2000 Vojtech Pavlik 5 * Copyright (c) 1999-2000 Vojtech Pavlik
8 * 6 *
9 * Sponsored by SuSE 7 * Sponsored by SuSE
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index fb9af6a0fe9c..8dc730132192 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -171,7 +171,7 @@ struct i2c_client {
171 struct i2c_adapter *adapter; /* the adapter we sit on */ 171 struct i2c_adapter *adapter; /* the adapter we sit on */
172 struct i2c_driver *driver; /* and our access routines */ 172 struct i2c_driver *driver; /* and our access routines */
173 struct device dev; /* the device structure */ 173 struct device dev; /* the device structure */
174 int irq; /* irq issued by device (or -1) */ 174 int irq; /* irq issued by device */
175 struct list_head list; /* DEPRECATED */ 175 struct list_head list; /* DEPRECATED */
176 struct completion released; 176 struct completion released;
177}; 177};
diff --git a/include/linux/ide.h b/include/linux/ide.h
index f8f195c20da2..9918772bf274 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -153,7 +153,7 @@ enum { ide_unknown, ide_generic, ide_pci,
153 ide_qd65xx, ide_umc8672, ide_ht6560b, 153 ide_qd65xx, ide_umc8672, ide_ht6560b,
154 ide_rz1000, ide_trm290, 154 ide_rz1000, ide_trm290,
155 ide_cmd646, ide_cy82c693, ide_4drives, 155 ide_cmd646, ide_cy82c693, ide_4drives,
156 ide_pmac, ide_etrax100, ide_acorn, 156 ide_pmac, ide_acorn,
157 ide_au1xxx, ide_palm3710 157 ide_au1xxx, ide_palm3710
158}; 158};
159 159
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h
index f1fbe9c930d7..d4efe4014705 100644
--- a/include/linux/if_tunnel.h
+++ b/include/linux/if_tunnel.h
@@ -41,7 +41,7 @@ struct ip_tunnel_prl {
41 __u16 __reserved; 41 __u16 __reserved;
42 __u32 datalen; 42 __u32 datalen;
43 __u32 __reserved2; 43 __u32 __reserved2;
44 void __user *data; 44 /* data follows */
45}; 45};
46 46
47/* PRL flags */ 47/* PRL flags */
diff --git a/include/linux/in_route.h b/include/linux/in_route.h
index 61f25c30a2a0..b261b8c915f0 100644
--- a/include/linux/in_route.h
+++ b/include/linux/in_route.h
@@ -10,19 +10,19 @@
10#define RTCF_NOPMTUDISC RTM_F_NOPMTUDISC 10#define RTCF_NOPMTUDISC RTM_F_NOPMTUDISC
11 11
12#define RTCF_NOTIFY 0x00010000 12#define RTCF_NOTIFY 0x00010000
13#define RTCF_DIRECTDST 0x00020000 13#define RTCF_DIRECTDST 0x00020000 /* unused */
14#define RTCF_REDIRECTED 0x00040000 14#define RTCF_REDIRECTED 0x00040000
15#define RTCF_TPROXY 0x00080000 15#define RTCF_TPROXY 0x00080000 /* unused */
16 16
17#define RTCF_FAST 0x00200000 17#define RTCF_FAST 0x00200000 /* unused */
18#define RTCF_MASQ 0x00400000 18#define RTCF_MASQ 0x00400000 /* unused */
19#define RTCF_SNAT 0x00800000 19#define RTCF_SNAT 0x00800000 /* unused */
20#define RTCF_DOREDIRECT 0x01000000 20#define RTCF_DOREDIRECT 0x01000000
21#define RTCF_DIRECTSRC 0x04000000 21#define RTCF_DIRECTSRC 0x04000000
22#define RTCF_DNAT 0x08000000 22#define RTCF_DNAT 0x08000000
23#define RTCF_BROADCAST 0x10000000 23#define RTCF_BROADCAST 0x10000000
24#define RTCF_MULTICAST 0x20000000 24#define RTCF_MULTICAST 0x20000000
25#define RTCF_REJECT 0x40000000 25#define RTCF_REJECT 0x40000000 /* unused */
26#define RTCF_LOCAL 0x80000000 26#define RTCF_LOCAL 0x80000000
27 27
28#define RTCF_NAT (RTCF_DNAT|RTCF_SNAT) 28#define RTCF_NAT (RTCF_DNAT|RTCF_SNAT)
diff --git a/include/linux/inet_lro.h b/include/linux/inet_lro.h
index 80335b7d77c5..c4335faebb63 100644
--- a/include/linux/inet_lro.h
+++ b/include/linux/inet_lro.h
@@ -84,7 +84,11 @@ struct net_lro_mgr {
84 from received packets and eth protocol 84 from received packets and eth protocol
85 is still ETH_P_8021Q */ 85 is still ETH_P_8021Q */
86 86
87 u32 ip_summed; /* Set in non generated SKBs in page mode */ 87 /*
88 * Set for generated SKBs that are not added to
89 * the frag list in fragmented mode
90 */
91 u32 ip_summed;
88 u32 ip_summed_aggr; /* Set in aggregated SKBs: CHECKSUM_UNNECESSARY 92 u32 ip_summed_aggr; /* Set in aggregated SKBs: CHECKSUM_UNNECESSARY
89 * or CHECKSUM_NONE */ 93 * or CHECKSUM_NONE */
90 94
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h
index 7009b0cdd06f..c6f51ad52d5b 100644
--- a/include/linux/inetdevice.h
+++ b/include/linux/inetdevice.h
@@ -117,7 +117,6 @@ struct in_ifaddr
117 __be32 ifa_address; 117 __be32 ifa_address;
118 __be32 ifa_mask; 118 __be32 ifa_mask;
119 __be32 ifa_broadcast; 119 __be32 ifa_broadcast;
120 __be32 ifa_anycast;
121 unsigned char ifa_scope; 120 unsigned char ifa_scope;
122 unsigned char ifa_flags; 121 unsigned char ifa_flags;
123 unsigned char ifa_prefixlen; 122 unsigned char ifa_prefixlen;
diff --git a/include/linux/input.h b/include/linux/input.h
index 28a094fcfe20..d150c57e5f0a 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -534,8 +534,8 @@ struct input_absinfo {
534 534
535#define KEY_FRAMEBACK 0x1b4 /* Consumer - transport controls */ 535#define KEY_FRAMEBACK 0x1b4 /* Consumer - transport controls */
536#define KEY_FRAMEFORWARD 0x1b5 536#define KEY_FRAMEFORWARD 0x1b5
537
538#define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ 537#define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */
538#define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */
539 539
540#define KEY_DEL_EOL 0x1c0 540#define KEY_DEL_EOL 0x1c0
541#define KEY_DEL_EOS 0x1c1 541#define KEY_DEL_EOS 0x1c1
@@ -637,7 +637,9 @@ struct input_absinfo {
637#define SW_LID 0x00 /* set = lid shut */ 637#define SW_LID 0x00 /* set = lid shut */
638#define SW_TABLET_MODE 0x01 /* set = tablet mode */ 638#define SW_TABLET_MODE 0x01 /* set = tablet mode */
639#define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ 639#define SW_HEADPHONE_INSERT 0x02 /* set = inserted */
640#define SW_RADIO 0x03 /* set = radio enabled */ 640#define SW_RFKILL_ALL 0x03 /* rfkill master switch, type "any"
641 set = radio enabled */
642#define SW_RADIO SW_RFKILL_ALL /* deprecated */
641#define SW_MAX 0x0f 643#define SW_MAX 0x0f
642#define SW_CNT (SW_MAX+1) 644#define SW_CNT (SW_MAX+1)
643 645
diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index d5d40a9f7929..c6801bffe76d 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -53,14 +53,14 @@ struct resource_list {
53#define IORESOURCE_AUTO 0x40000000 53#define IORESOURCE_AUTO 0x40000000
54#define IORESOURCE_BUSY 0x80000000 /* Driver has marked this resource busy */ 54#define IORESOURCE_BUSY 0x80000000 /* Driver has marked this resource busy */
55 55
56/* ISA PnP IRQ specific bits (IORESOURCE_BITS) */ 56/* PnP IRQ specific bits (IORESOURCE_BITS) */
57#define IORESOURCE_IRQ_HIGHEDGE (1<<0) 57#define IORESOURCE_IRQ_HIGHEDGE (1<<0)
58#define IORESOURCE_IRQ_LOWEDGE (1<<1) 58#define IORESOURCE_IRQ_LOWEDGE (1<<1)
59#define IORESOURCE_IRQ_HIGHLEVEL (1<<2) 59#define IORESOURCE_IRQ_HIGHLEVEL (1<<2)
60#define IORESOURCE_IRQ_LOWLEVEL (1<<3) 60#define IORESOURCE_IRQ_LOWLEVEL (1<<3)
61#define IORESOURCE_IRQ_SHAREABLE (1<<4) 61#define IORESOURCE_IRQ_SHAREABLE (1<<4)
62 62
63/* ISA PnP DMA specific bits (IORESOURCE_BITS) */ 63/* PnP DMA specific bits (IORESOURCE_BITS) */
64#define IORESOURCE_DMA_TYPE_MASK (3<<0) 64#define IORESOURCE_DMA_TYPE_MASK (3<<0)
65#define IORESOURCE_DMA_8BIT (0<<0) 65#define IORESOURCE_DMA_8BIT (0<<0)
66#define IORESOURCE_DMA_8AND16BIT (1<<0) 66#define IORESOURCE_DMA_8AND16BIT (1<<0)
@@ -76,7 +76,7 @@ struct resource_list {
76#define IORESOURCE_DMA_TYPEB (2<<6) 76#define IORESOURCE_DMA_TYPEB (2<<6)
77#define IORESOURCE_DMA_TYPEF (3<<6) 77#define IORESOURCE_DMA_TYPEF (3<<6)
78 78
79/* ISA PnP memory I/O specific bits (IORESOURCE_BITS) */ 79/* PnP memory I/O specific bits (IORESOURCE_BITS) */
80#define IORESOURCE_MEM_WRITEABLE (1<<0) /* dup: IORESOURCE_READONLY */ 80#define IORESOURCE_MEM_WRITEABLE (1<<0) /* dup: IORESOURCE_READONLY */
81#define IORESOURCE_MEM_CACHEABLE (1<<1) /* dup: IORESOURCE_CACHEABLE */ 81#define IORESOURCE_MEM_CACHEABLE (1<<1) /* dup: IORESOURCE_CACHEABLE */
82#define IORESOURCE_MEM_RANGELENGTH (1<<2) /* dup: IORESOURCE_RANGELENGTH */ 82#define IORESOURCE_MEM_RANGELENGTH (1<<2) /* dup: IORESOURCE_RANGELENGTH */
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 10b666b61add..cde056e08181 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -396,8 +396,10 @@ static inline struct request_sock *inet6_reqsk_alloc(struct request_sock_ops *op
396{ 396{
397 struct request_sock *req = reqsk_alloc(ops); 397 struct request_sock *req = reqsk_alloc(ops);
398 398
399 if (req != NULL) 399 if (req != NULL) {
400 inet_rsk(req)->inet6_rsk_offset = inet6_rsk_offset(req); 400 inet_rsk(req)->inet6_rsk_offset = inet6_rsk_offset(req);
401 inet6_rsk(req)->pktopts = NULL;
402 }
401 403
402 return req; 404 return req;
403} 405}
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index 05e2b307161a..d147f0f90360 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -919,6 +919,9 @@ struct journal_s
919 struct proc_dir_entry *j_proc_entry; 919 struct proc_dir_entry *j_proc_entry;
920 struct transaction_stats_s j_stats; 920 struct transaction_stats_s j_stats;
921 921
922 /* Failed journal commit ID */
923 unsigned int j_failed_commit;
924
922 /* 925 /*
923 * An opaque pointer to fs-private information. ext3 puts its 926 * An opaque pointer to fs-private information. ext3 puts its
924 * superblock pointer here 927 * superblock pointer here
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 792bf0aa779b..2e70006c7fa8 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -46,6 +46,9 @@ extern const char linux_proc_banner[];
46#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) 46#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
47#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) 47#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
48 48
49#define _RET_IP_ (unsigned long)__builtin_return_address(0)
50#define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; })
51
49#ifdef CONFIG_LBD 52#ifdef CONFIG_LBD
50# include <asm/div64.h> 53# include <asm/div64.h>
51# define sector_div(a, b) do_div(a, b) 54# define sector_div(a, b) do_div(a, b)
diff --git a/include/linux/ks0108.h b/include/linux/ks0108.h
index a2c54acceb4e..cb311798e0bc 100644
--- a/include/linux/ks0108.h
+++ b/include/linux/ks0108.h
@@ -4,7 +4,7 @@
4 * Description: ks0108 LCD Controller driver header 4 * Description: ks0108 LCD Controller driver header
5 * License: GPLv2 5 * License: GPLv2
6 * 6 *
7 * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> 7 * Author: Copyright (C) Miguel Ojeda Sandonis
8 * Date: 2006-10-31 8 * Date: 2006-10-31
9 * 9 *
10 * This program is free software; you can redistribute it and/or modify 10 * This program is free software; you can redistribute it and/or modify
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 398978972b7a..de9d1df4bba2 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -33,6 +33,7 @@
33#define KVM_REQ_REPORT_TPR_ACCESS 2 33#define KVM_REQ_REPORT_TPR_ACCESS 2
34#define KVM_REQ_MMU_RELOAD 3 34#define KVM_REQ_MMU_RELOAD 3
35#define KVM_REQ_TRIPLE_FAULT 4 35#define KVM_REQ_TRIPLE_FAULT 4
36#define KVM_REQ_PENDING_TIMER 5
36 37
37struct kvm_vcpu; 38struct kvm_vcpu;
38extern struct kmem_cache *kvm_vcpu_cache; 39extern struct kmem_cache *kvm_vcpu_cache;
@@ -297,7 +298,7 @@ static inline gpa_t gfn_to_gpa(gfn_t gfn)
297 return (gpa_t)gfn << PAGE_SHIFT; 298 return (gpa_t)gfn << PAGE_SHIFT;
298} 299}
299 300
300static inline void kvm_migrate_apic_timer(struct kvm_vcpu *vcpu) 301static inline void kvm_migrate_timers(struct kvm_vcpu *vcpu)
301{ 302{
302 set_bit(KVM_REQ_MIGRATE_TIMER, &vcpu->requests); 303 set_bit(KVM_REQ_MIGRATE_TIMER, &vcpu->requests);
303} 304}
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 4a92fbafce9d..e57e5d08312d 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -111,13 +111,10 @@ enum {
111 /* various global constants */ 111 /* various global constants */
112 LIBATA_MAX_PRD = ATA_MAX_PRD / 2, 112 LIBATA_MAX_PRD = ATA_MAX_PRD / 2,
113 LIBATA_DUMB_MAX_PRD = ATA_MAX_PRD / 4, /* Worst case */ 113 LIBATA_DUMB_MAX_PRD = ATA_MAX_PRD / 4, /* Worst case */
114 ATA_MAX_PORTS = 8,
115 ATA_DEF_QUEUE = 1, 114 ATA_DEF_QUEUE = 1,
116 /* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */ 115 /* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */
117 ATA_MAX_QUEUE = 32, 116 ATA_MAX_QUEUE = 32,
118 ATA_TAG_INTERNAL = ATA_MAX_QUEUE - 1, 117 ATA_TAG_INTERNAL = ATA_MAX_QUEUE - 1,
119 ATA_MAX_BUS = 2,
120 ATA_DEF_BUSY_WAIT = 10000,
121 ATA_SHORT_PAUSE = (HZ >> 6) + 1, 118 ATA_SHORT_PAUSE = (HZ >> 6) + 1,
122 119
123 ATAPI_MAX_DRAIN = 16 << 10, 120 ATAPI_MAX_DRAIN = 16 << 10,
@@ -1435,7 +1432,8 @@ extern void ata_sff_qc_prep(struct ata_queued_cmd *qc);
1435extern void ata_sff_dumb_qc_prep(struct ata_queued_cmd *qc); 1432extern void ata_sff_dumb_qc_prep(struct ata_queued_cmd *qc);
1436extern void ata_sff_dev_select(struct ata_port *ap, unsigned int device); 1433extern void ata_sff_dev_select(struct ata_port *ap, unsigned int device);
1437extern u8 ata_sff_check_status(struct ata_port *ap); 1434extern u8 ata_sff_check_status(struct ata_port *ap);
1438extern u8 ata_sff_altstatus(struct ata_port *ap); 1435extern void ata_sff_pause(struct ata_port *ap);
1436extern void ata_sff_dma_pause(struct ata_port *ap);
1439extern int ata_sff_busy_sleep(struct ata_port *ap, 1437extern int ata_sff_busy_sleep(struct ata_port *ap,
1440 unsigned long timeout_pat, unsigned long timeout); 1438 unsigned long timeout_pat, unsigned long timeout);
1441extern int ata_sff_wait_ready(struct ata_link *link, unsigned long deadline); 1439extern int ata_sff_wait_ready(struct ata_link *link, unsigned long deadline);
@@ -1496,19 +1494,6 @@ extern int ata_pci_sff_init_one(struct pci_dev *pdev,
1496#endif /* CONFIG_PCI */ 1494#endif /* CONFIG_PCI */
1497 1495
1498/** 1496/**
1499 * ata_sff_pause - Flush writes and pause 400 nanoseconds.
1500 * @ap: Port to wait for.
1501 *
1502 * LOCKING:
1503 * Inherited from caller.
1504 */
1505static inline void ata_sff_pause(struct ata_port *ap)
1506{
1507 ata_sff_altstatus(ap);
1508 ndelay(400);
1509}
1510
1511/**
1512 * ata_sff_busy_wait - Wait for a port status register 1497 * ata_sff_busy_wait - Wait for a port status register
1513 * @ap: Port to wait for. 1498 * @ap: Port to wait for.
1514 * @bits: bits that must be clear 1499 * @bits: bits that must be clear
diff --git a/include/linux/math64.h b/include/linux/math64.h
index c1a5f81501ff..c87f1528703a 100644
--- a/include/linux/math64.h
+++ b/include/linux/math64.h
@@ -81,4 +81,25 @@ static inline s64 div_s64(s64 dividend, s32 divisor)
81} 81}
82#endif 82#endif
83 83
84u32 iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder);
85
86static __always_inline u32
87__iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder)
88{
89 u32 ret = 0;
90
91 while (dividend >= divisor) {
92 /* The following asm() prevents the compiler from
93 optimising this loop into a modulo operation. */
94 asm("" : "+rm"(dividend));
95
96 dividend -= divisor;
97 ret++;
98 }
99
100 *remainder = dividend;
101
102 return ret;
103}
104
84#endif /* _LINUX_MATH64_H */ 105#endif /* _LINUX_MATH64_H */
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index 73e358612eaf..ea9f5ad9ec8e 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -77,14 +77,6 @@ extern int __add_pages(struct zone *zone, unsigned long start_pfn,
77extern int __remove_pages(struct zone *zone, unsigned long start_pfn, 77extern int __remove_pages(struct zone *zone, unsigned long start_pfn,
78 unsigned long nr_pages); 78 unsigned long nr_pages);
79 79
80/*
81 * Walk through all memory which is registered as resource.
82 * arg is (start_pfn, nr_pages, private_arg_pointer)
83 */
84extern int walk_memory_resource(unsigned long start_pfn,
85 unsigned long nr_pages, void *arg,
86 int (*func)(unsigned long, unsigned long, void *));
87
88#ifdef CONFIG_NUMA 80#ifdef CONFIG_NUMA
89extern int memory_add_physaddr_to_nid(u64 start); 81extern int memory_add_physaddr_to_nid(u64 start);
90#else 82#else
@@ -199,6 +191,14 @@ static inline void register_page_bootmem_info_node(struct pglist_data *pgdat)
199 191
200#endif /* ! CONFIG_MEMORY_HOTPLUG */ 192#endif /* ! CONFIG_MEMORY_HOTPLUG */
201 193
194/*
195 * Walk through all memory which is registered as resource.
196 * arg is (start_pfn, nr_pages, private_arg_pointer)
197 */
198extern int walk_memory_resource(unsigned long start_pfn,
199 unsigned long nr_pages, void *arg,
200 int (*func)(unsigned long, unsigned long, void *));
201
202extern int add_memory(int nid, u64 start, u64 size); 202extern int add_memory(int nid, u64 start, u64 size);
203extern int arch_add_memory(int nid, u64 start, u64 size); 203extern int arch_add_memory(int nid, u64 start, u64 size);
204extern int remove_memory(u64 start, u64 size); 204extern int remove_memory(u64 start, u64 size);
diff --git a/include/linux/mm.h b/include/linux/mm.h
index c31a9cd2a30e..586a943cab01 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -760,16 +760,17 @@ unsigned long unmap_vmas(struct mmu_gather **tlb,
760 * (see walk_page_range for more details) 760 * (see walk_page_range for more details)
761 */ 761 */
762struct mm_walk { 762struct mm_walk {
763 int (*pgd_entry)(pgd_t *, unsigned long, unsigned long, void *); 763 int (*pgd_entry)(pgd_t *, unsigned long, unsigned long, struct mm_walk *);
764 int (*pud_entry)(pud_t *, unsigned long, unsigned long, void *); 764 int (*pud_entry)(pud_t *, unsigned long, unsigned long, struct mm_walk *);
765 int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, void *); 765 int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, struct mm_walk *);
766 int (*pte_entry)(pte_t *, unsigned long, unsigned long, void *); 766 int (*pte_entry)(pte_t *, unsigned long, unsigned long, struct mm_walk *);
767 int (*pte_hole)(unsigned long, unsigned long, void *); 767 int (*pte_hole)(unsigned long, unsigned long, struct mm_walk *);
768 struct mm_struct *mm;
769 void *private;
768}; 770};
769 771
770int walk_page_range(const struct mm_struct *, unsigned long addr, 772int walk_page_range(unsigned long addr, unsigned long end,
771 unsigned long end, const struct mm_walk *walk, 773 struct mm_walk *walk);
772 void *private);
773void free_pgd_range(struct mmu_gather **tlb, unsigned long addr, 774void free_pgd_range(struct mmu_gather **tlb, unsigned long addr,
774 unsigned long end, unsigned long floor, unsigned long ceiling); 775 unsigned long end, unsigned long floor, unsigned long ceiling);
775void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *start_vma, 776void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *start_vma,
diff --git a/include/linux/mman.h b/include/linux/mman.h
index 87920a0852a3..dab8892e6ff1 100644
--- a/include/linux/mman.h
+++ b/include/linux/mman.h
@@ -17,14 +17,14 @@
17 17
18extern int sysctl_overcommit_memory; 18extern int sysctl_overcommit_memory;
19extern int sysctl_overcommit_ratio; 19extern int sysctl_overcommit_ratio;
20extern atomic_t vm_committed_space; 20extern atomic_long_t vm_committed_space;
21 21
22#ifdef CONFIG_SMP 22#ifdef CONFIG_SMP
23extern void vm_acct_memory(long pages); 23extern void vm_acct_memory(long pages);
24#else 24#else
25static inline void vm_acct_memory(long pages) 25static inline void vm_acct_memory(long pages)
26{ 26{
27 atomic_add(pages, &vm_committed_space); 27 atomic_long_add(pages, &vm_committed_space);
28} 28}
29#endif 29#endif
30 30
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index c463cd8a15a4..443bc7cd8c62 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -703,7 +703,7 @@ extern struct pglist_data *next_online_pgdat(struct pglist_data *pgdat);
703extern struct zone *next_zone(struct zone *zone); 703extern struct zone *next_zone(struct zone *zone);
704 704
705/** 705/**
706 * for_each_pgdat - helper macro to iterate over all nodes 706 * for_each_online_pgdat - helper macro to iterate over all online nodes
707 * @pgdat - pointer to a pg_data_t variable 707 * @pgdat - pointer to a pg_data_t variable
708 */ 708 */
709#define for_each_online_pgdat(pgdat) \ 709#define for_each_online_pgdat(pgdat) \
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index d73eceaa7afb..69b2342d5ebb 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -375,7 +375,8 @@ struct virtio_device_id {
375 375
376struct i2c_device_id { 376struct i2c_device_id {
377 char name[I2C_NAME_SIZE]; 377 char name[I2C_NAME_SIZE];
378 kernel_ulong_t driver_data; /* Data private to the driver */ 378 kernel_ulong_t driver_data /* Data private to the driver */
379 __attribute__((aligned(sizeof(kernel_ulong_t))));
379}; 380};
380 381
381 382
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h
index b03b27457413..81cd36b735b0 100644
--- a/include/linux/msdos_fs.h
+++ b/include/linux/msdos_fs.h
@@ -57,12 +57,6 @@
57#define MSDOS_DOT ". " /* ".", padded to MSDOS_NAME chars */ 57#define MSDOS_DOT ". " /* ".", padded to MSDOS_NAME chars */
58#define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */ 58#define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */
59 59
60/* media of boot sector */
61static inline int fat_valid_media(u8 media)
62{
63 return 0xf8 <= media || media == 0xf0;
64}
65
66#define FAT_FIRST_ENT(s, x) ((MSDOS_SB(s)->fat_bits == 32 ? 0x0FFFFF00 : \ 60#define FAT_FIRST_ENT(s, x) ((MSDOS_SB(s)->fat_bits == 32 ? 0x0FFFFF00 : \
67 MSDOS_SB(s)->fat_bits == 16 ? 0xFF00 : 0xF00) | (x)) 61 MSDOS_SB(s)->fat_bits == 16 ? 0xFF00 : 0xF00) | (x))
68 62
@@ -334,6 +328,12 @@ static inline void fatwchar_to16(__u8 *dst, const wchar_t *src, size_t len)
334#endif 328#endif
335} 329}
336 330
331/* media of boot sector */
332static inline int fat_valid_media(u8 media)
333{
334 return 0xf8 <= media || media == 0xf0;
335}
336
337/* fat/cache.c */ 337/* fat/cache.c */
338extern void fat_cache_inval_inode(struct inode *inode); 338extern void fat_cache_inval_inode(struct inode *inode);
339extern int fat_get_cluster(struct inode *inode, int cluster, 339extern int fat_get_cluster(struct inode *inode, int cluster,
diff --git a/include/linux/msg.h b/include/linux/msg.h
index 6f3b8e79a991..56abf1558fdd 100644
--- a/include/linux/msg.h
+++ b/include/linux/msg.h
@@ -64,11 +64,11 @@ struct msginfo {
64#define MSGMNB 16384 /* <= INT_MAX */ /* default max size of a message queue */ 64#define MSGMNB 16384 /* <= INT_MAX */ /* default max size of a message queue */
65 65
66/* unused */ 66/* unused */
67#define MSGPOOL (MSGMNI * MSGMNB) /* size in bytes of message pool */ 67#define MSGPOOL (MSGMNI * MSGMNB / 1024) /* size in kbytes of message pool */
68#define MSGTQL MSGMNB /* number of system message headers */ 68#define MSGTQL MSGMNB /* number of system message headers */
69#define MSGMAP MSGMNB /* number of entries in message map */ 69#define MSGMAP MSGMNB /* number of entries in message map */
70#define MSGSSZ 16 /* message segment size */ 70#define MSGSSZ 16 /* message segment size */
71#define __MSGSEG (MSGPOOL / MSGSSZ) /* max no. of segments */ 71#define __MSGSEG ((MSGPOOL * 1024) / MSGSSZ) /* max no. of segments */
72#define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff) 72#define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff)
73 73
74#ifdef __KERNEL__ 74#ifdef __KERNEL__
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index c42bc7f533a5..53ea3dc8b0e8 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * linux/include/linux/mtd/nand.h 2 * linux/include/linux/mtd/nand.h
3 * 3 *
4 * Copyright (c) 2000 David Woodhouse <dwmw2@mvhi.com> 4 * Copyright (c) 2000 David Woodhouse <dwmw2@infradead.org>
5 * Steven J. Hill <sjhill@realitydiluted.com> 5 * Steven J. Hill <sjhill@realitydiluted.com>
6 * Thomas Gleixner <tglx@linutronix.de> 6 * Thomas Gleixner <tglx@linutronix.de>
7 * 7 *
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index b11e6e19e96c..25f87102ab66 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -88,6 +88,8 @@ struct wireless_dev;
88#define NETDEV_TX_BUSY 1 /* driver tx path was busy*/ 88#define NETDEV_TX_BUSY 1 /* driver tx path was busy*/
89#define NETDEV_TX_LOCKED -1 /* driver tx lock was already taken */ 89#define NETDEV_TX_LOCKED -1 /* driver tx lock was already taken */
90 90
91#ifdef __KERNEL__
92
91/* 93/*
92 * Compute the worst case header length according to the protocols 94 * Compute the worst case header length according to the protocols
93 * used. 95 * used.
@@ -114,6 +116,8 @@ struct wireless_dev;
114#define MAX_HEADER (LL_MAX_HEADER + 48) 116#define MAX_HEADER (LL_MAX_HEADER + 48)
115#endif 117#endif
116 118
119#endif /* __KERNEL__ */
120
117struct net_device_subqueue 121struct net_device_subqueue
118{ 122{
119 /* Give a control state for each queue. This struct may contain 123 /* Give a control state for each queue. This struct may contain
@@ -745,6 +749,9 @@ struct net_device
745 /* rtnetlink link ops */ 749 /* rtnetlink link ops */
746 const struct rtnl_link_ops *rtnl_link_ops; 750 const struct rtnl_link_ops *rtnl_link_ops;
747 751
752 /* VLAN feature mask */
753 unsigned long vlan_features;
754
748 /* for setting kernel sock attribute on TCP connection setup */ 755 /* for setting kernel sock attribute on TCP connection setup */
749#define GSO_MAX_SIZE 65536 756#define GSO_MAX_SIZE 65536
750 unsigned int gso_max_size; 757 unsigned int gso_max_size;
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index e4c66593b5c6..0c5eb7ed8b3f 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -3,7 +3,6 @@
3 3
4#ifdef __KERNEL__ 4#ifdef __KERNEL__
5#include <linux/init.h> 5#include <linux/init.h>
6#include <linux/types.h>
7#include <linux/skbuff.h> 6#include <linux/skbuff.h>
8#include <linux/net.h> 7#include <linux/net.h>
9#include <linux/netdevice.h> 8#include <linux/netdevice.h>
@@ -14,6 +13,7 @@
14#include <linux/list.h> 13#include <linux/list.h>
15#include <net/net_namespace.h> 14#include <net/net_namespace.h>
16#endif 15#endif
16#include <linux/types.h>
17#include <linux/compiler.h> 17#include <linux/compiler.h>
18 18
19/* Responses from hook functions. */ 19/* Responses from hook functions. */
diff --git a/include/linux/netfilter_arp/arp_tables.h b/include/linux/netfilter_arp/arp_tables.h
index dd9c97f2d436..590ac3d6d5d6 100644
--- a/include/linux/netfilter_arp/arp_tables.h
+++ b/include/linux/netfilter_arp/arp_tables.h
@@ -11,11 +11,11 @@
11 11
12#ifdef __KERNEL__ 12#ifdef __KERNEL__
13#include <linux/if.h> 13#include <linux/if.h>
14#include <linux/types.h>
15#include <linux/in.h> 14#include <linux/in.h>
16#include <linux/if_arp.h> 15#include <linux/if_arp.h>
17#include <linux/skbuff.h> 16#include <linux/skbuff.h>
18#endif 17#endif
18#include <linux/types.h>
19#include <linux/compiler.h> 19#include <linux/compiler.h>
20#include <linux/netfilter_arp.h> 20#include <linux/netfilter_arp.h>
21 21
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h
index bfc889f90276..092bd50581a9 100644
--- a/include/linux/netfilter_ipv4/ip_tables.h
+++ b/include/linux/netfilter_ipv4/ip_tables.h
@@ -17,11 +17,11 @@
17 17
18#ifdef __KERNEL__ 18#ifdef __KERNEL__
19#include <linux/if.h> 19#include <linux/if.h>
20#include <linux/types.h>
21#include <linux/in.h> 20#include <linux/in.h>
22#include <linux/ip.h> 21#include <linux/ip.h>
23#include <linux/skbuff.h> 22#include <linux/skbuff.h>
24#endif 23#endif
24#include <linux/types.h>
25#include <linux/compiler.h> 25#include <linux/compiler.h>
26#include <linux/netfilter_ipv4.h> 26#include <linux/netfilter_ipv4.h>
27 27
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h
index f2507dcc5750..1089e33cf633 100644
--- a/include/linux/netfilter_ipv6/ip6_tables.h
+++ b/include/linux/netfilter_ipv6/ip6_tables.h
@@ -17,11 +17,11 @@
17 17
18#ifdef __KERNEL__ 18#ifdef __KERNEL__
19#include <linux/if.h> 19#include <linux/if.h>
20#include <linux/types.h>
21#include <linux/in6.h> 20#include <linux/in6.h>
22#include <linux/ipv6.h> 21#include <linux/ipv6.h>
23#include <linux/skbuff.h> 22#include <linux/skbuff.h>
24#endif 23#endif
24#include <linux/types.h>
25#include <linux/compiler.h> 25#include <linux/compiler.h>
26#include <linux/netfilter_ipv6.h> 26#include <linux/netfilter_ipv6.h>
27 27
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 590cff32415d..0d2a4e7012aa 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -157,6 +157,7 @@ PAGEFLAG(Active, active) __CLEARPAGEFLAG(Active, active)
157__PAGEFLAG(Slab, slab) 157__PAGEFLAG(Slab, slab)
158PAGEFLAG(Checked, owner_priv_1) /* Used by some filesystems */ 158PAGEFLAG(Checked, owner_priv_1) /* Used by some filesystems */
159PAGEFLAG(Pinned, owner_priv_1) TESTSCFLAG(Pinned, owner_priv_1) /* Xen */ 159PAGEFLAG(Pinned, owner_priv_1) TESTSCFLAG(Pinned, owner_priv_1) /* Xen */
160PAGEFLAG(SavePinned, dirty); /* Xen */
160PAGEFLAG(Reserved, reserved) __CLEARPAGEFLAG(Reserved, reserved) 161PAGEFLAG(Reserved, reserved) __CLEARPAGEFLAG(Reserved, reserved)
161PAGEFLAG(Private, private) __CLEARPAGEFLAG(Private, private) 162PAGEFLAG(Private, private) __CLEARPAGEFLAG(Private, private)
162 __SETPAGEFLAG(Private, private) 163 __SETPAGEFLAG(Private, private)
@@ -306,5 +307,29 @@ static inline void __ClearPageTail(struct page *page)
306} 307}
307 308
308#endif /* !PAGEFLAGS_EXTENDED */ 309#endif /* !PAGEFLAGS_EXTENDED */
310
311#define PAGE_FLAGS (1 << PG_lru | 1 << PG_private | 1 << PG_locked | \
312 1 << PG_buddy | 1 << PG_writeback | \
313 1 << PG_slab | 1 << PG_swapcache | 1 << PG_active)
314
315/*
316 * Flags checked in bad_page(). Pages on the free list should not have
317 * these flags set. It they are, there is a problem.
318 */
319#define PAGE_FLAGS_CLEAR_WHEN_BAD (PAGE_FLAGS | 1 << PG_reclaim | 1 << PG_dirty)
320
321/*
322 * Flags checked when a page is freed. Pages being freed should not have
323 * these flags set. It they are, there is a problem.
324 */
325#define PAGE_FLAGS_CHECK_AT_FREE (PAGE_FLAGS | 1 << PG_reserved)
326
327/*
328 * Flags checked when a page is prepped for return by the page allocator.
329 * Pages being prepped should not have these flags set. It they are, there
330 * is a problem.
331 */
332#define PAGE_FLAGS_CHECK_AT_PREP (PAGE_FLAGS | 1 << PG_reserved | 1 << PG_dirty)
333
309#endif /* !__GENERATING_BOUNDS_H */ 334#endif /* !__GENERATING_BOUNDS_H */
310#endif /* PAGE_FLAGS_H */ 335#endif /* PAGE_FLAGS_H */
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 509159bcd4e7..d18b1dd49fab 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -206,6 +206,7 @@ struct pci_dev {
206 struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */ 206 struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */
207 int rom_attr_enabled; /* has display of the rom attribute been enabled? */ 207 int rom_attr_enabled; /* has display of the rom attribute been enabled? */
208 struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ 208 struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */
209 struct bin_attribute *res_attr_wc[DEVICE_COUNT_RESOURCE]; /* sysfs file for WC mapping of resources */
209#ifdef CONFIG_PCI_MSI 210#ifdef CONFIG_PCI_MSI
210 struct list_head msi_list; 211 struct list_head msi_list;
211#endif 212#endif
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index cf6dbd759395..65953822c9cb 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -716,6 +716,7 @@
716#define PCI_DEVICE_ID_HP_CISSA 0x3220 716#define PCI_DEVICE_ID_HP_CISSA 0x3220
717#define PCI_DEVICE_ID_HP_CISSC 0x3230 717#define PCI_DEVICE_ID_HP_CISSC 0x3230
718#define PCI_DEVICE_ID_HP_CISSD 0x3238 718#define PCI_DEVICE_ID_HP_CISSD 0x3238
719#define PCI_DEVICE_ID_HP_CISSE 0x323a
719#define PCI_DEVICE_ID_HP_ZX2_IOC 0x4031 720#define PCI_DEVICE_ID_HP_ZX2_IOC 0x4031
720 721
721#define PCI_VENDOR_ID_PCTECH 0x1042 722#define PCI_VENDOR_ID_PCTECH 0x1042
@@ -1519,6 +1520,7 @@
1519#define PCI_DEVICE_ID_MARVELL_GT64260 0x6430 1520#define PCI_DEVICE_ID_MARVELL_GT64260 0x6430
1520#define PCI_DEVICE_ID_MARVELL_MV64360 0x6460 1521#define PCI_DEVICE_ID_MARVELL_MV64360 0x6460
1521#define PCI_DEVICE_ID_MARVELL_MV64460 0x6480 1522#define PCI_DEVICE_ID_MARVELL_MV64460 0x6480
1523#define PCI_DEVICE_ID_MARVELL_CAFE_SD 0x4101
1522 1524
1523#define PCI_VENDOR_ID_V3 0x11b0 1525#define PCI_VENDOR_ID_V3 0x11b0
1524#define PCI_DEVICE_ID_V3_V960 0x0001 1526#define PCI_DEVICE_ID_V3_V960 0x0001
@@ -1761,6 +1763,7 @@
1761 1763
1762#define PCI_VENDOR_ID_INTASHIELD 0x135a 1764#define PCI_VENDOR_ID_INTASHIELD 0x135a
1763#define PCI_DEVICE_ID_INTASHIELD_IS200 0x0d80 1765#define PCI_DEVICE_ID_INTASHIELD_IS200 0x0d80
1766#define PCI_DEVICE_ID_INTASHIELD_IS400 0x0dc0
1764 1767
1765#define PCI_VENDOR_ID_QUATECH 0x135C 1768#define PCI_VENDOR_ID_QUATECH 0x135C
1766#define PCI_DEVICE_ID_QUATECH_QSC100 0x0010 1769#define PCI_DEVICE_ID_QUATECH_QSC100 0x0010
@@ -2383,6 +2386,9 @@
2383#define PCI_DEVICE_ID_INTEL_ICH10_4 0x3a30 2386#define PCI_DEVICE_ID_INTEL_ICH10_4 0x3a30
2384#define PCI_DEVICE_ID_INTEL_ICH10_5 0x3a60 2387#define PCI_DEVICE_ID_INTEL_ICH10_5 0x3a60
2385#define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f 2388#define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f
2389#define PCI_DEVICE_ID_INTEL_5400_ERR 0x4030
2390#define PCI_DEVICE_ID_INTEL_5400_FBD0 0x4035
2391#define PCI_DEVICE_ID_INTEL_5400_FBD1 0x4036
2386#define PCI_DEVICE_ID_INTEL_IOAT_SCNB 0x65ff 2392#define PCI_DEVICE_ID_INTEL_IOAT_SCNB 0x65ff
2387#define PCI_DEVICE_ID_INTEL_TOLAPAI_0 0x5031 2393#define PCI_DEVICE_ID_INTEL_TOLAPAI_0 0x5031
2388#define PCI_DEVICE_ID_INTEL_TOLAPAI_1 0x5032 2394#define PCI_DEVICE_ID_INTEL_TOLAPAI_1 0x5032
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 9883bc942262..fff1d27ddb4c 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -9,6 +9,8 @@
9 9
10struct net; 10struct net;
11struct completion; 11struct completion;
12struct mm_struct;
13
12/* 14/*
13 * The proc filesystem constants/structures 15 * The proc filesystem constants/structures
14 */ 16 */
@@ -101,8 +103,6 @@ extern spinlock_t proc_subdir_lock;
101extern void proc_root_init(void); 103extern void proc_root_init(void);
102extern void proc_misc_init(void); 104extern void proc_misc_init(void);
103 105
104struct mm_struct;
105
106void proc_flush_task(struct task_struct *task); 106void proc_flush_task(struct task_struct *task);
107struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *); 107struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *);
108int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir); 108int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir);
diff --git a/include/linux/raid/bitmap.h b/include/linux/raid/bitmap.h
index 47fbcba11850..78bfdea24a8e 100644
--- a/include/linux/raid/bitmap.h
+++ b/include/linux/raid/bitmap.h
@@ -262,7 +262,6 @@ int bitmap_create(mddev_t *mddev);
262void bitmap_flush(mddev_t *mddev); 262void bitmap_flush(mddev_t *mddev);
263void bitmap_destroy(mddev_t *mddev); 263void bitmap_destroy(mddev_t *mddev);
264 264
265char *file_path(struct file *file, char *buf, int count);
266void bitmap_print_sb(struct bitmap *bitmap); 265void bitmap_print_sb(struct bitmap *bitmap);
267void bitmap_update_sb(struct bitmap *bitmap); 266void bitmap_update_sb(struct bitmap *bitmap);
268 267
diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h
index 81a1a02d4566..b7386ae9d288 100644
--- a/include/linux/raid/md.h
+++ b/include/linux/raid/md.h
@@ -72,6 +72,8 @@
72 */ 72 */
73#define MD_PATCHLEVEL_VERSION 3 73#define MD_PATCHLEVEL_VERSION 3
74 74
75extern int mdp_major;
76
75extern int register_md_personality (struct mdk_personality *p); 77extern int register_md_personality (struct mdk_personality *p);
76extern int unregister_md_personality (struct mdk_personality *p); 78extern int unregister_md_personality (struct mdk_personality *p);
77extern mdk_thread_t * md_register_thread (void (*run) (mddev_t *mddev), 79extern mdk_thread_t * md_register_thread (void (*run) (mddev_t *mddev),
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h
index 812ffa590cff..3dea9f545c8f 100644
--- a/include/linux/raid/md_k.h
+++ b/include/linux/raid/md_k.h
@@ -180,13 +180,15 @@ struct mddev_s
180 int sync_speed_min; 180 int sync_speed_min;
181 int sync_speed_max; 181 int sync_speed_max;
182 182
183 /* resync even though the same disks are shared among md-devices */
184 int parallel_resync;
185
183 int ok_start_degraded; 186 int ok_start_degraded;
184 /* recovery/resync flags 187 /* recovery/resync flags
185 * NEEDED: we might need to start a resync/recover 188 * NEEDED: we might need to start a resync/recover
186 * RUNNING: a thread is running, or about to be started 189 * RUNNING: a thread is running, or about to be started
187 * SYNC: actually doing a resync, not a recovery 190 * SYNC: actually doing a resync, not a recovery
188 * ERR: and IO error was detected - abort the resync/recovery 191 * INTR: resync needs to be aborted for some reason
189 * INTR: someone requested a (clean) early abort.
190 * DONE: thread is done and is waiting to be reaped 192 * DONE: thread is done and is waiting to be reaped
191 * REQUEST: user-space has requested a sync (used with SYNC) 193 * REQUEST: user-space has requested a sync (used with SYNC)
192 * CHECK: user-space request for for check-only, no repair 194 * CHECK: user-space request for for check-only, no repair
@@ -196,7 +198,6 @@ struct mddev_s
196 */ 198 */
197#define MD_RECOVERY_RUNNING 0 199#define MD_RECOVERY_RUNNING 0
198#define MD_RECOVERY_SYNC 1 200#define MD_RECOVERY_SYNC 1
199#define MD_RECOVERY_ERR 2
200#define MD_RECOVERY_INTR 3 201#define MD_RECOVERY_INTR 3
201#define MD_RECOVERY_DONE 4 202#define MD_RECOVERY_DONE 4
202#define MD_RECOVERY_NEEDED 5 203#define MD_RECOVERY_NEEDED 5
diff --git a/include/linux/rculist.h b/include/linux/rculist.h
new file mode 100644
index 000000000000..bde4586f4382
--- /dev/null
+++ b/include/linux/rculist.h
@@ -0,0 +1,6 @@
1#ifndef _LINUX_RCULIST_H
2#define _LINUX_RCULIST_H
3
4#include <linux/list.h>
5
6#endif /* _LINUX_RCULIST_H */
diff --git a/include/linux/resume-trace.h b/include/linux/resume-trace.h
index f3f4f28c6960..c9ba2fdf807d 100644
--- a/include/linux/resume-trace.h
+++ b/include/linux/resume-trace.h
@@ -8,7 +8,7 @@ extern int pm_trace_enabled;
8 8
9struct device; 9struct device;
10extern void set_trace_device(struct device *); 10extern void set_trace_device(struct device *);
11extern void generate_resume_trace(void *tracedata, unsigned int user); 11extern void generate_resume_trace(const void *tracedata, unsigned int user);
12 12
13#define TRACE_DEVICE(dev) do { \ 13#define TRACE_DEVICE(dev) do { \
14 if (pm_trace_enabled) \ 14 if (pm_trace_enabled) \
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index 44c81c744538..b358c704d102 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -246,6 +246,7 @@ enum rt_class_t
246{ 246{
247 RT_TABLE_UNSPEC=0, 247 RT_TABLE_UNSPEC=0,
248/* User defined values */ 248/* User defined values */
249 RT_TABLE_COMPAT=252,
249 RT_TABLE_DEFAULT=253, 250 RT_TABLE_DEFAULT=253,
250 RT_TABLE_MAIN=254, 251 RT_TABLE_MAIN=254,
251 RT_TABLE_LOCAL=255, 252 RT_TABLE_LOCAL=255,
@@ -267,10 +268,10 @@ enum rtattr_type_t
267 RTA_PREFSRC, 268 RTA_PREFSRC,
268 RTA_METRICS, 269 RTA_METRICS,
269 RTA_MULTIPATH, 270 RTA_MULTIPATH,
270 RTA_PROTOINFO, 271 RTA_PROTOINFO, /* no longer used */
271 RTA_FLOW, 272 RTA_FLOW,
272 RTA_CACHEINFO, 273 RTA_CACHEINFO,
273 RTA_SESSION, 274 RTA_SESSION, /* no longer used */
274 RTA_MP_ALGO, /* no longer used */ 275 RTA_MP_ALGO, /* no longer used */
275 RTA_TABLE, 276 RTA_TABLE,
276 __RTA_MAX 277 __RTA_MAX
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 5395a6176f4b..c5d3f847ca8d 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -766,7 +766,6 @@ struct sched_domain {
766 struct sched_domain *child; /* bottom domain must be null terminated */ 766 struct sched_domain *child; /* bottom domain must be null terminated */
767 struct sched_group *groups; /* the balancing groups of the domain */ 767 struct sched_group *groups; /* the balancing groups of the domain */
768 cpumask_t span; /* span of all CPUs in this domain */ 768 cpumask_t span; /* span of all CPUs in this domain */
769 int first_cpu; /* cache of the first cpu in this domain */
770 unsigned long min_interval; /* Minimum balance interval ms */ 769 unsigned long min_interval; /* Minimum balance interval ms */
771 unsigned long max_interval; /* Maximum balance interval ms */ 770 unsigned long max_interval; /* Maximum balance interval ms */
772 unsigned int busy_factor; /* less balancing by factor if busy */ 771 unsigned int busy_factor; /* less balancing by factor if busy */
@@ -1848,7 +1847,9 @@ extern void exit_thread(void);
1848extern void exit_files(struct task_struct *); 1847extern void exit_files(struct task_struct *);
1849extern void __cleanup_signal(struct signal_struct *); 1848extern void __cleanup_signal(struct signal_struct *);
1850extern void __cleanup_sighand(struct sighand_struct *); 1849extern void __cleanup_sighand(struct sighand_struct *);
1850
1851extern void exit_itimers(struct signal_struct *); 1851extern void exit_itimers(struct signal_struct *);
1852extern void flush_itimer_signals(void);
1852 1853
1853extern NORET_TYPE void do_group_exit(int); 1854extern NORET_TYPE void do_group_exit(int);
1854 1855
@@ -2025,6 +2026,19 @@ static inline int fatal_signal_pending(struct task_struct *p)
2025 return signal_pending(p) && __fatal_signal_pending(p); 2026 return signal_pending(p) && __fatal_signal_pending(p);
2026} 2027}
2027 2028
2029static inline int signal_pending_state(long state, struct task_struct *p)
2030{
2031 if (!(state & (TASK_INTERRUPTIBLE | TASK_WAKEKILL)))
2032 return 0;
2033 if (!signal_pending(p))
2034 return 0;
2035
2036 if (state & (__TASK_STOPPED | __TASK_TRACED))
2037 return 0;
2038
2039 return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p);
2040}
2041
2028static inline int need_resched(void) 2042static inline int need_resched(void)
2029{ 2043{
2030 return unlikely(test_thread_flag(TIF_NEED_RESCHED)); 2044 return unlikely(test_thread_flag(TIF_NEED_RESCHED));
diff --git a/include/linux/securebits.h b/include/linux/securebits.h
index c1f19dbceb05..92f09bdf1175 100644
--- a/include/linux/securebits.h
+++ b/include/linux/securebits.h
@@ -7,14 +7,15 @@
7 inheritance of root-permissions and suid-root executable under 7 inheritance of root-permissions and suid-root executable under
8 compatibility mode. We raise the effective and inheritable bitmasks 8 compatibility mode. We raise the effective and inheritable bitmasks
9 *of the executable file* if the effective uid of the new process is 9 *of the executable file* if the effective uid of the new process is
10 0. If the real uid is 0, we raise the inheritable bitmask of the 10 0. If the real uid is 0, we raise the effective (legacy) bit of the
11 executable file. */ 11 executable file. */
12#define SECURE_NOROOT 0 12#define SECURE_NOROOT 0
13#define SECURE_NOROOT_LOCKED 1 /* make bit-0 immutable */ 13#define SECURE_NOROOT_LOCKED 1 /* make bit-0 immutable */
14 14
15/* When set, setuid to/from uid 0 does not trigger capability-"fixes" 15/* When set, setuid to/from uid 0 does not trigger capability-"fixup".
16 to be compatible with old programs relying on set*uid to loose 16 When unset, to provide compatiblility with old programs relying on
17 privileges. When unset, setuid doesn't change privileges. */ 17 set*uid to gain/lose privilege, transitions to/from uid 0 cause
18 capabilities to be gained/lost. */
18#define SECURE_NO_SETUID_FIXUP 2 19#define SECURE_NO_SETUID_FIXUP 2
19#define SECURE_NO_SETUID_FIXUP_LOCKED 3 /* make bit-2 immutable */ 20#define SECURE_NO_SETUID_FIXUP_LOCKED 3 /* make bit-2 immutable */
20 21
@@ -26,10 +27,10 @@
26#define SECURE_KEEP_CAPS 4 27#define SECURE_KEEP_CAPS 4
27#define SECURE_KEEP_CAPS_LOCKED 5 /* make bit-4 immutable */ 28#define SECURE_KEEP_CAPS_LOCKED 5 /* make bit-4 immutable */
28 29
29/* Each securesetting is implemented using two bits. One bit specify 30/* Each securesetting is implemented using two bits. One bit specifies
30 whether the setting is on or off. The other bit specify whether the 31 whether the setting is on or off. The other bit specify whether the
31 setting is fixed or not. A setting which is fixed cannot be changed 32 setting is locked or not. A setting which is locked cannot be
32 from user-level. */ 33 changed from user-level. */
33#define issecure_mask(X) (1 << (X)) 34#define issecure_mask(X) (1 << (X))
34#define issecure(X) (issecure_mask(X) & current->securebits) 35#define issecure(X) (issecure_mask(X) & current->securebits)
35 36
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index d32123ae08ad..d8f31de632c5 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -192,6 +192,7 @@ struct uart_ops {
192 void (*shutdown)(struct uart_port *); 192 void (*shutdown)(struct uart_port *);
193 void (*set_termios)(struct uart_port *, struct ktermios *new, 193 void (*set_termios)(struct uart_port *, struct ktermios *new,
194 struct ktermios *old); 194 struct ktermios *old);
195 void (*set_ldisc)(struct uart_port *);
195 void (*pm)(struct uart_port *, unsigned int state, 196 void (*pm)(struct uart_port *, unsigned int state,
196 unsigned int oldstate); 197 unsigned int oldstate);
197 int (*set_wake)(struct uart_port *, unsigned int state); 198 int (*set_wake)(struct uart_port *, unsigned int state);
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 805ed4b92f9a..9aa90a6f20e0 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Written by Mark Hemment, 1996 (markhe@nextd.demon.co.uk). 2 * Written by Mark Hemment, 1996 (markhe@nextd.demon.co.uk).
3 * 3 *
4 * (C) SGI 2006, Christoph Lameter <clameter@sgi.com> 4 * (C) SGI 2006, Christoph Lameter
5 * Cleaned up and restructured to ease the addition of alternative 5 * Cleaned up and restructured to ease the addition of alternative
6 * implementations of SLAB allocators. 6 * implementations of SLAB allocators.
7 */ 7 */
@@ -276,6 +276,17 @@ static inline void *kzalloc(size_t size, gfp_t flags)
276 return kmalloc(size, flags | __GFP_ZERO); 276 return kmalloc(size, flags | __GFP_ZERO);
277} 277}
278 278
279/**
280 * kzalloc_node - allocate zeroed memory from a particular memory node.
281 * @size: how many bytes of memory are required.
282 * @flags: the type of memory to allocate (see kmalloc).
283 * @node: memory node from which to allocate
284 */
285static inline void *kzalloc_node(size_t size, gfp_t flags, int node)
286{
287 return kmalloc_node(size, flags | __GFP_ZERO, node);
288}
289
279#ifdef CONFIG_SLABINFO 290#ifdef CONFIG_SLABINFO
280extern const struct seq_operations slabinfo_op; 291extern const struct seq_operations slabinfo_op;
281ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *); 292ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *);
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
index 71e43a12ebbb..d117ea2825a9 100644
--- a/include/linux/slub_def.h
+++ b/include/linux/slub_def.h
@@ -4,7 +4,7 @@
4/* 4/*
5 * SLUB : A Slab allocator without object queues. 5 * SLUB : A Slab allocator without object queues.
6 * 6 *
7 * (C) 2007 SGI, Christoph Lameter <clameter@sgi.com> 7 * (C) 2007 SGI, Christoph Lameter
8 */ 8 */
9#include <linux/types.h> 9#include <linux/types.h>
10#include <linux/gfp.h> 10#include <linux/gfp.h>
@@ -137,10 +137,12 @@ static __always_inline int kmalloc_index(size_t size)
137 if (size <= KMALLOC_MIN_SIZE) 137 if (size <= KMALLOC_MIN_SIZE)
138 return KMALLOC_SHIFT_LOW; 138 return KMALLOC_SHIFT_LOW;
139 139
140#if KMALLOC_MIN_SIZE <= 64
140 if (size > 64 && size <= 96) 141 if (size > 64 && size <= 96)
141 return 1; 142 return 1;
142 if (size > 128 && size <= 192) 143 if (size > 128 && size <= 192)
143 return 2; 144 return 2;
145#endif
144 if (size <= 8) return 3; 146 if (size <= 8) return 3;
145 if (size <= 16) return 4; 147 if (size <= 16) return 4;
146 if (size <= 32) return 5; 148 if (size <= 32) return 5;
diff --git a/include/linux/sm501.h b/include/linux/sm501.h
index bca134544700..95c1c39ba445 100644
--- a/include/linux/sm501.h
+++ b/include/linux/sm501.h
@@ -71,8 +71,8 @@ extern unsigned long sm501_gpio_get(struct device *dev,
71#define SM501FB_FLAG_DISABLE_AT_EXIT (1<<1) 71#define SM501FB_FLAG_DISABLE_AT_EXIT (1<<1)
72#define SM501FB_FLAG_USE_HWCURSOR (1<<2) 72#define SM501FB_FLAG_USE_HWCURSOR (1<<2)
73#define SM501FB_FLAG_USE_HWACCEL (1<<3) 73#define SM501FB_FLAG_USE_HWACCEL (1<<3)
74#define SM501FB_FLAG_PANEL_USE_FPEN (1<<4) 74#define SM501FB_FLAG_PANEL_NO_FPEN (1<<4)
75#define SM501FB_FLAG_PANEL_USE_VBIASEN (1<<5) 75#define SM501FB_FLAG_PANEL_NO_VBIASEN (1<<5)
76 76
77struct sm501_platdata_fbsub { 77struct sm501_platdata_fbsub {
78 struct fb_videomode *def_mode; 78 struct fb_videomode *def_mode;
diff --git a/include/linux/spi/mmc_spi.h b/include/linux/spi/mmc_spi.h
index e9bbe3ebd721..d5ca78b93a3b 100644
--- a/include/linux/spi/mmc_spi.h
+++ b/include/linux/spi/mmc_spi.h
@@ -1,6 +1,8 @@
1#ifndef __LINUX_SPI_MMC_SPI_H 1#ifndef __LINUX_SPI_MMC_SPI_H
2#define __LINUX_SPI_MMC_SPI_H 2#define __LINUX_SPI_MMC_SPI_H
3 3
4#include <linux/interrupt.h>
5
4struct device; 6struct device;
5struct mmc_host; 7struct mmc_host;
6 8
diff --git a/include/linux/ssb/ssb_driver_gige.h b/include/linux/ssb/ssb_driver_gige.h
index 01fbdf5fef22..942e38736901 100644
--- a/include/linux/ssb/ssb_driver_gige.h
+++ b/include/linux/ssb/ssb_driver_gige.h
@@ -100,7 +100,7 @@ extern char * nvram_get(const char *name);
100/* Get the device MAC address */ 100/* Get the device MAC address */
101static inline void ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr) 101static inline void ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr)
102{ 102{
103#ifdef CONFIG_BCM947XX 103#ifdef CONFIG_BCM47XX
104 char *res = nvram_get("et0macaddr"); 104 char *res = nvram_get("et0macaddr");
105 if (res) 105 if (res)
106 memcpy(macaddr, res, 6); 106 memcpy(macaddr, res, 6);
diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h
index c11bbcc081f9..05eb4664d0dd 100644
--- a/include/linux/sunrpc/svc_rdma.h
+++ b/include/linux/sunrpc/svc_rdma.h
@@ -71,7 +71,8 @@ extern atomic_t rdma_stat_sq_prod;
71 * completes. 71 * completes.
72 */ 72 */
73struct svc_rdma_op_ctxt { 73struct svc_rdma_op_ctxt {
74 struct svc_rdma_op_ctxt *next; 74 struct svc_rdma_op_ctxt *read_hdr;
75 struct list_head free_list;
75 struct xdr_buf arg; 76 struct xdr_buf arg;
76 struct list_head dto_q; 77 struct list_head dto_q;
77 enum ib_wr_opcode wr_op; 78 enum ib_wr_opcode wr_op;
@@ -85,7 +86,6 @@ struct svc_rdma_op_ctxt {
85 struct page *pages[RPCSVC_MAXPAGES]; 86 struct page *pages[RPCSVC_MAXPAGES];
86}; 87};
87 88
88#define RDMACTXT_F_READ_DONE 1
89#define RDMACTXT_F_LAST_CTXT 2 89#define RDMACTXT_F_LAST_CTXT 2
90 90
91struct svcxprt_rdma { 91struct svcxprt_rdma {
@@ -104,7 +104,8 @@ struct svcxprt_rdma {
104 104
105 struct ib_pd *sc_pd; 105 struct ib_pd *sc_pd;
106 106
107 struct svc_rdma_op_ctxt *sc_ctxt_head; 107 atomic_t sc_ctxt_used;
108 struct list_head sc_ctxt_free;
108 int sc_ctxt_cnt; 109 int sc_ctxt_cnt;
109 int sc_ctxt_bump; 110 int sc_ctxt_bump;
110 int sc_ctxt_max; 111 int sc_ctxt_max;
@@ -123,6 +124,7 @@ struct svcxprt_rdma {
123 struct list_head sc_dto_q; /* DTO tasklet I/O pending Q */ 124 struct list_head sc_dto_q; /* DTO tasklet I/O pending Q */
124 struct list_head sc_read_complete_q; 125 struct list_head sc_read_complete_q;
125 spinlock_t sc_read_complete_lock; 126 spinlock_t sc_read_complete_lock;
127 struct work_struct sc_work;
126}; 128};
127/* sc_flags */ 129/* sc_flags */
128#define RDMAXPRT_RQ_PENDING 1 130#define RDMAXPRT_RQ_PENDING 1
@@ -164,8 +166,8 @@ extern int svc_rdma_sendto(struct svc_rqst *);
164 166
165/* svc_rdma_transport.c */ 167/* svc_rdma_transport.c */
166extern int svc_rdma_send(struct svcxprt_rdma *, struct ib_send_wr *); 168extern int svc_rdma_send(struct svcxprt_rdma *, struct ib_send_wr *);
167extern int svc_rdma_send_error(struct svcxprt_rdma *, struct rpcrdma_msg *, 169extern void svc_rdma_send_error(struct svcxprt_rdma *, struct rpcrdma_msg *,
168 enum rpcrdma_errcode); 170 enum rpcrdma_errcode);
169struct page *svc_rdma_get_page(void); 171struct page *svc_rdma_get_page(void);
170extern int svc_rdma_post_recv(struct svcxprt_rdma *); 172extern int svc_rdma_post_recv(struct svcxprt_rdma *);
171extern int svc_rdma_create_listen(struct svc_serv *, int, struct sockaddr *); 173extern int svc_rdma_create_listen(struct svc_serv *, int, struct sockaddr *);
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index d96d9b122304..b31b6b74aa28 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -239,11 +239,6 @@ static inline struct tcp_request_sock *tcp_rsk(const struct request_sock *req)
239 return (struct tcp_request_sock *)req; 239 return (struct tcp_request_sock *)req;
240} 240}
241 241
242struct tcp_deferred_accept_info {
243 struct sock *listen_sk;
244 struct request_sock *request;
245};
246
247struct tcp_sock { 242struct tcp_sock {
248 /* inet_connection_sock has to be the first member of tcp_sock */ 243 /* inet_connection_sock has to be the first member of tcp_sock */
249 struct inet_connection_sock inet_conn; 244 struct inet_connection_sock inet_conn;
@@ -355,7 +350,7 @@ struct tcp_sock {
355 u32 lost_retrans_low; /* Sent seq after any rxmit (lowest) */ 350 u32 lost_retrans_low; /* Sent seq after any rxmit (lowest) */
356 351
357 u16 advmss; /* Advertised MSS */ 352 u16 advmss; /* Advertised MSS */
358 u16 prior_ssthresh; /* ssthresh saved at recovery start */ 353 u32 prior_ssthresh; /* ssthresh saved at recovery start */
359 u32 lost_out; /* Lost packets */ 354 u32 lost_out; /* Lost packets */
360 u32 sacked_out; /* SACK'd packets */ 355 u32 sacked_out; /* SACK'd packets */
361 u32 fackets_out; /* FACK'd packets */ 356 u32 fackets_out; /* FACK'd packets */
@@ -379,8 +374,6 @@ struct tcp_sock {
379 unsigned int keepalive_intvl; /* time interval between keep alive probes */ 374 unsigned int keepalive_intvl; /* time interval between keep alive probes */
380 int linger2; 375 int linger2;
381 376
382 struct tcp_deferred_accept_info defer_tcp_accept;
383
384 unsigned long last_synq_overflow; 377 unsigned long last_synq_overflow;
385 378
386 u32 tso_deferred; 379 u32 tso_deferred;
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index 06d3e6eb9ca8..917707e6151d 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -66,8 +66,7 @@ struct thermal_cooling_device {
66 ((long)t-2732+5)/10 : ((long)t-2732-5)/10) 66 ((long)t-2732+5)/10 : ((long)t-2732-5)/10)
67#define CELSIUS_TO_KELVIN(t) ((t)*10+2732) 67#define CELSIUS_TO_KELVIN(t) ((t)*10+2732)
68 68
69#if defined(CONFIG_HWMON) || \ 69#if defined(CONFIG_THERMAL_HWMON)
70 (defined(CONFIG_HWMON_MODULE) && defined(CONFIG_THERMAL_MODULE))
71/* thermal zone devices with the same type share one hwmon device */ 70/* thermal zone devices with the same type share one hwmon device */
72struct thermal_hwmon_device { 71struct thermal_hwmon_device {
73 char type[THERMAL_NAME_LENGTH]; 72 char type[THERMAL_NAME_LENGTH];
@@ -94,8 +93,7 @@ struct thermal_zone_device {
94 struct idr idr; 93 struct idr idr;
95 struct mutex lock; /* protect cooling devices list */ 94 struct mutex lock; /* protect cooling devices list */
96 struct list_head node; 95 struct list_head node;
97#if defined(CONFIG_HWMON) || \ 96#if defined(CONFIG_THERMAL_HWMON)
98 (defined(CONFIG_HWMON_MODULE) && defined(CONFIG_THERMAL_MODULE))
99 struct list_head hwmon_node; 97 struct list_head hwmon_node;
100 struct thermal_hwmon_device *hwmon; 98 struct thermal_hwmon_device *hwmon;
101 struct thermal_hwmon_attr temp_input; /* hwmon sys attr */ 99 struct thermal_hwmon_attr temp_input; /* hwmon sys attr */
diff --git a/include/linux/time.h b/include/linux/time.h
index d32ef0ad4c0a..e15206a7e82e 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -6,6 +6,7 @@
6#ifdef __KERNEL__ 6#ifdef __KERNEL__
7# include <linux/cache.h> 7# include <linux/cache.h>
8# include <linux/seqlock.h> 8# include <linux/seqlock.h>
9# include <linux/math64.h>
9#endif 10#endif
10 11
11#ifndef _STRUCT_TIMESPEC 12#ifndef _STRUCT_TIMESPEC
@@ -169,18 +170,13 @@ extern struct timeval ns_to_timeval(const s64 nsec);
169 * timespec_add_ns - Adds nanoseconds to a timespec 170 * timespec_add_ns - Adds nanoseconds to a timespec
170 * @a: pointer to timespec to be incremented 171 * @a: pointer to timespec to be incremented
171 * @ns: unsigned nanoseconds value to be added 172 * @ns: unsigned nanoseconds value to be added
173 *
174 * This must always be inlined because its used from the x86-64 vdso,
175 * which cannot call other kernel functions.
172 */ 176 */
173static inline void timespec_add_ns(struct timespec *a, u64 ns) 177static __always_inline void timespec_add_ns(struct timespec *a, u64 ns)
174{ 178{
175 ns += a->tv_nsec; 179 a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, NSEC_PER_SEC, &ns);
176 while(unlikely(ns >= NSEC_PER_SEC)) {
177 /* The following asm() prevents the compiler from
178 * optimising this loop into a modulo operation. */
179 asm("" : "+r"(ns));
180
181 ns -= NSEC_PER_SEC;
182 a->tv_sec++;
183 }
184 a->tv_nsec = ns; 180 a->tv_nsec = ns;
185} 181}
186#endif /* __KERNEL__ */ 182#endif /* __KERNEL__ */
diff --git a/include/linux/topology.h b/include/linux/topology.h
index 4bb7074a2c3a..24f3d2282e11 100644
--- a/include/linux/topology.h
+++ b/include/linux/topology.h
@@ -166,7 +166,9 @@ void arch_update_cpu_topology(void);
166 .busy_idx = 3, \ 166 .busy_idx = 3, \
167 .idle_idx = 3, \ 167 .idle_idx = 3, \
168 .flags = SD_LOAD_BALANCE \ 168 .flags = SD_LOAD_BALANCE \
169 | SD_SERIALIZE, \ 169 | SD_BALANCE_NEWIDLE \
170 | SD_WAKE_AFFINE \
171 | SD_SERIALIZE, \
170 .last_balance = jiffies, \ 172 .last_balance = jiffies, \
171 .balance_interval = 64, \ 173 .balance_interval = 64, \
172} 174}
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 7f7121f9c968..324a3b231d40 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -36,7 +36,7 @@
36#define N_6PACK 7 36#define N_6PACK 7
37#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ 37#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
38#define N_R3964 9 /* Reserved for Simatic R3964 module */ 38#define N_R3964 9 /* Reserved for Simatic R3964 module */
39#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ 39#define N_PROFIBUS_FDL 10 /* Reserved for Profibus */
40#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ 40#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */
41#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data */ 41#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data */
42 /* cards about SMS messages */ 42 /* cards about SMS messages */
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
index 59f1c0bd8f9c..d2a003586761 100644
--- a/include/linux/tty_driver.h
+++ b/include/linux/tty_driver.h
@@ -27,8 +27,7 @@
27 * This routine is called by the kernel to write a series of 27 * This routine is called by the kernel to write a series of
28 * characters to the tty device. The characters may come from 28 * characters to the tty device. The characters may come from
29 * user space or kernel space. This routine will return the 29 * user space or kernel space. This routine will return the
30 * number of characters actually accepted for writing. This 30 * number of characters actually accepted for writing.
31 * routine is mandatory.
32 * 31 *
33 * Optional: Required for writable devices. 32 * Optional: Required for writable devices.
34 * 33 *
@@ -134,7 +133,7 @@
134 * This routine notifies the tty driver that it should hangup the 133 * This routine notifies the tty driver that it should hangup the
135 * tty device. 134 * tty device.
136 * 135 *
137 * Required: 136 * Optional:
138 * 137 *
139 * void (*break_ctl)(struct tty_stuct *tty, int state); 138 * void (*break_ctl)(struct tty_stuct *tty, int state);
140 * 139 *
diff --git a/include/linux/types.h b/include/linux/types.h
index 9dc2346627b4..d4a9ce6e2760 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -197,8 +197,6 @@ typedef u64 resource_size_t;
197typedef u32 resource_size_t; 197typedef u32 resource_size_t;
198#endif 198#endif
199 199
200#endif /* __KERNEL__ */
201
202struct ustat { 200struct ustat {
203 __kernel_daddr_t f_tfree; 201 __kernel_daddr_t f_tfree;
204 __kernel_ino_t f_tinode; 202 __kernel_ino_t f_tinode;
@@ -206,4 +204,6 @@ struct ustat {
206 char f_fpack[6]; 204 char f_fpack[6];
207}; 205};
208 206
207#endif /* __KERNEL__ */
208
209#endif /* _LINUX_TYPES_H */ 209#endif /* _LINUX_TYPES_H */
diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h
index 71e52f2f6a38..ca228bb94218 100644
--- a/include/linux/usb/cdc.h
+++ b/include/linux/usb/cdc.h
@@ -130,6 +130,15 @@ struct usb_cdc_ether_desc {
130 __u8 bNumberPowerFilters; 130 __u8 bNumberPowerFilters;
131} __attribute__ ((packed)); 131} __attribute__ ((packed));
132 132
133/* "Telephone Control Model Functional Descriptor" from CDC WMC spec 6.3..3 */
134struct usb_cdc_dmm_desc {
135 __u8 bFunctionLength;
136 __u8 bDescriptorType;
137 __u8 bDescriptorSubtype;
138 __u16 bcdVersion;
139 __le16 wMaxCommand;
140} __attribute__ ((packed));
141
133/* "MDLM Functional Descriptor" from CDC WMC spec 6.7.2.3 */ 142/* "MDLM Functional Descriptor" from CDC WMC spec 6.7.2.3 */
134struct usb_cdc_mdlm_desc { 143struct usb_cdc_mdlm_desc {
135 __u8 bLength; 144 __u8 bLength;
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index c1411189ba6c..4a535ea1e123 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -865,9 +865,9 @@ struct v4l2_querymenu
865#define V4L2_CID_HFLIP (V4L2_CID_BASE+20) 865#define V4L2_CID_HFLIP (V4L2_CID_BASE+20)
866#define V4L2_CID_VFLIP (V4L2_CID_BASE+21) 866#define V4L2_CID_VFLIP (V4L2_CID_BASE+21)
867 867
868/* Deprecated, use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */ 868/* Deprecated; use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */
869#define V4L2_CID_HCENTER_DEPRECATED (V4L2_CID_BASE+22) 869#define V4L2_CID_HCENTER (V4L2_CID_BASE+22)
870#define V4L2_CID_VCENTER_DEPRECATED (V4L2_CID_BASE+23) 870#define V4L2_CID_VCENTER (V4L2_CID_BASE+23)
871 871
872#define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24) 872#define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24)
873enum v4l2_power_line_frequency { 873enum v4l2_power_line_frequency {
diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h
index d4695a3356d0..5f79a5f9de79 100644
--- a/include/linux/virtio_blk.h
+++ b/include/linux/virtio_blk.h
@@ -10,18 +10,19 @@
10#define VIRTIO_BLK_F_SIZE_MAX 1 /* Indicates maximum segment size */ 10#define VIRTIO_BLK_F_SIZE_MAX 1 /* Indicates maximum segment size */
11#define VIRTIO_BLK_F_SEG_MAX 2 /* Indicates maximum # of segments */ 11#define VIRTIO_BLK_F_SEG_MAX 2 /* Indicates maximum # of segments */
12#define VIRTIO_BLK_F_GEOMETRY 4 /* Legacy geometry available */ 12#define VIRTIO_BLK_F_GEOMETRY 4 /* Legacy geometry available */
13#define VIRTIO_BLK_F_RO 5 /* Disk is read-only */
13 14
14struct virtio_blk_config 15struct virtio_blk_config
15{ 16{
16 /* The capacity (in 512-byte sectors). */ 17 /* The capacity (in 512-byte sectors). */
17 __le64 capacity; 18 __u64 capacity;
18 /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */ 19 /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */
19 __le32 size_max; 20 __u32 size_max;
20 /* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */ 21 /* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */
21 __le32 seg_max; 22 __u32 seg_max;
22 /* geometry the device (if VIRTIO_BLK_F_GEOMETRY) */ 23 /* geometry the device (if VIRTIO_BLK_F_GEOMETRY) */
23 struct virtio_blk_geometry { 24 struct virtio_blk_geometry {
24 __le16 cylinders; 25 __u16 cylinders;
25 __u8 heads; 26 __u8 heads;
26 __u8 sectors; 27 __u8 sectors;
27 } geometry; 28 } geometry;
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index 50db245c81ad..f364bbf63c34 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -15,6 +15,10 @@
15/* We've given up on this device. */ 15/* We've given up on this device. */
16#define VIRTIO_CONFIG_S_FAILED 0x80 16#define VIRTIO_CONFIG_S_FAILED 0x80
17 17
18/* Do we get callbacks when the ring is completely used, even if we've
19 * suppressed them? */
20#define VIRTIO_F_NOTIFY_ON_EMPTY 24
21
18#ifdef __KERNEL__ 22#ifdef __KERNEL__
19#include <linux/virtio.h> 23#include <linux/virtio.h>
20 24
@@ -99,7 +103,7 @@ static inline bool virtio_has_feature(const struct virtio_device *vdev,
99 * The return value is -ENOENT if the feature doesn't exist. Otherwise 103 * The return value is -ENOENT if the feature doesn't exist. Otherwise
100 * the config value is copied into whatever is pointed to by v. */ 104 * the config value is copied into whatever is pointed to by v. */
101#define virtio_config_val(vdev, fbit, offset, v) \ 105#define virtio_config_val(vdev, fbit, offset, v) \
102 virtio_config_buf((vdev), (fbit), (offset), (v), sizeof(v)) 106 virtio_config_buf((vdev), (fbit), (offset), (v), sizeof(*v))
103 107
104static inline int virtio_config_buf(struct virtio_device *vdev, 108static inline int virtio_config_buf(struct virtio_device *vdev,
105 unsigned int fbit, 109 unsigned int fbit,
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h
index 9405aa6cdf26..38c0571820fb 100644
--- a/include/linux/virtio_net.h
+++ b/include/linux/virtio_net.h
@@ -38,7 +38,7 @@ struct virtio_net_hdr
38#define VIRTIO_NET_HDR_GSO_ECN 0x80 // TCP has ECN set 38#define VIRTIO_NET_HDR_GSO_ECN 0x80 // TCP has ECN set
39 __u8 gso_type; 39 __u8 gso_type;
40 __u16 hdr_len; /* Ethernet + IP + tcp/udp hdrs */ 40 __u16 hdr_len; /* Ethernet + IP + tcp/udp hdrs */
41 __u16 gso_size; /* Bytes to append to gso_hdr_len per frame */ 41 __u16 gso_size; /* Bytes to append to hdr_len per frame */
42 __u16 csum_start; /* Position to start checksumming from */ 42 __u16 csum_start; /* Position to start checksumming from */
43 __u16 csum_offset; /* Offset after that to place checksum */ 43 __u16 csum_offset; /* Offset after that to place checksum */
44}; 44};
diff --git a/include/linux/virtio_rng.h b/include/linux/virtio_rng.h
new file mode 100644
index 000000000000..331afb6c9f62
--- /dev/null
+++ b/include/linux/virtio_rng.h
@@ -0,0 +1,8 @@
1#ifndef _LINUX_VIRTIO_RNG_H
2#define _LINUX_VIRTIO_RNG_H
3#include <linux/virtio_config.h>
4
5/* The ID for virtio_rng */
6#define VIRTIO_ID_RNG 4
7
8#endif /* _LINUX_VIRTIO_RNG_H */
diff --git a/include/linux/wm97xx.h b/include/linux/wm97xx.h
index 4d13732e9cf0..6f69968eab24 100644
--- a/include/linux/wm97xx.h
+++ b/include/linux/wm97xx.h
@@ -100,6 +100,7 @@
100#define WM9713_ADCSEL_Y 0x0004 /* Y measurement */ 100#define WM9713_ADCSEL_Y 0x0004 /* Y measurement */
101#define WM9713_ADCSEL_PRES 0x0008 /* Pressure measurement */ 101#define WM9713_ADCSEL_PRES 0x0008 /* Pressure measurement */
102#define WM9713_COO 0x0001 /* enable coordinate mode */ 102#define WM9713_COO 0x0001 /* enable coordinate mode */
103#define WM9713_45W 0x1000 /* set for 5 wire panel */
103#define WM9713_PDEN 0x0800 /* measure only when pen down */ 104#define WM9713_PDEN 0x0800 /* measure only when pen down */
104#define WM9713_ADCSEL_MASK 0x00fe /* ADC selection mask */ 105#define WM9713_ADCSEL_MASK 0x00fe /* ADC selection mask */
105#define WM9713_WAIT 0x0200 /* coordinate wait */ 106#define WM9713_WAIT 0x0200 /* coordinate wait */
diff --git a/include/media/cx25840.h b/include/media/cx25840.h
index cd599ad29fb2..db431d513f2f 100644
--- a/include/media/cx25840.h
+++ b/include/media/cx25840.h
@@ -32,12 +32,16 @@ enum cx25840_video_input {
32 CX25840_COMPOSITE7, 32 CX25840_COMPOSITE7,
33 CX25840_COMPOSITE8, 33 CX25840_COMPOSITE8,
34 34
35 /* S-Video inputs consist of one luma input (In1-In4) ORed with one 35 /* S-Video inputs consist of one luma input (In1-In8) ORed with one
36 chroma input (In5-In8) */ 36 chroma input (In5-In8) */
37 CX25840_SVIDEO_LUMA1 = 0x10, 37 CX25840_SVIDEO_LUMA1 = 0x10,
38 CX25840_SVIDEO_LUMA2 = 0x20, 38 CX25840_SVIDEO_LUMA2 = 0x20,
39 CX25840_SVIDEO_LUMA3 = 0x30, 39 CX25840_SVIDEO_LUMA3 = 0x30,
40 CX25840_SVIDEO_LUMA4 = 0x40, 40 CX25840_SVIDEO_LUMA4 = 0x40,
41 CX25840_SVIDEO_LUMA5 = 0x50,
42 CX25840_SVIDEO_LUMA6 = 0x60,
43 CX25840_SVIDEO_LUMA7 = 0x70,
44 CX25840_SVIDEO_LUMA8 = 0x80,
41 CX25840_SVIDEO_CHROMA4 = 0x400, 45 CX25840_SVIDEO_CHROMA4 = 0x400,
42 CX25840_SVIDEO_CHROMA5 = 0x500, 46 CX25840_SVIDEO_CHROMA5 = 0x500,
43 CX25840_SVIDEO_CHROMA6 = 0x600, 47 CX25840_SVIDEO_CHROMA6 = 0x600,
diff --git a/include/media/ir-common.h b/include/media/ir-common.h
index bfee8be5d63f..b8e8aa91905a 100644
--- a/include/media/ir-common.h
+++ b/include/media/ir-common.h
@@ -146,6 +146,7 @@ extern IR_KEYTAB_TYPE ir_codes_behold_columbus[IR_KEYTAB_SIZE];
146extern IR_KEYTAB_TYPE ir_codes_pinnacle_pctv_hd[IR_KEYTAB_SIZE]; 146extern IR_KEYTAB_TYPE ir_codes_pinnacle_pctv_hd[IR_KEYTAB_SIZE];
147extern IR_KEYTAB_TYPE ir_codes_genius_tvgo_a11mce[IR_KEYTAB_SIZE]; 147extern IR_KEYTAB_TYPE ir_codes_genius_tvgo_a11mce[IR_KEYTAB_SIZE];
148extern IR_KEYTAB_TYPE ir_codes_powercolor_real_angel[IR_KEYTAB_SIZE]; 148extern IR_KEYTAB_TYPE ir_codes_powercolor_real_angel[IR_KEYTAB_SIZE];
149extern IR_KEYTAB_TYPE ir_codes_avermedia_a16d[IR_KEYTAB_SIZE];
149 150
150#endif 151#endif
151 152
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index a807d2f86ee8..859f7a6f6f67 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -40,10 +40,9 @@
40#define VFL_TYPE_VTX 3 40#define VFL_TYPE_VTX 3
41 41
42/* Video standard functions */ 42/* Video standard functions */
43extern unsigned int v4l2_video_std_fps(struct v4l2_standard *vs); 43extern const char *v4l2_norm_to_name(v4l2_std_id id);
44extern char *v4l2_norm_to_name(v4l2_std_id id);
45extern int v4l2_video_std_construct(struct v4l2_standard *vs, 44extern int v4l2_video_std_construct(struct v4l2_standard *vs,
46 int id, char *name); 45 int id, const char *name);
47/* Prints the ioctl in a human-readable format */ 46/* Prints the ioctl in a human-readable format */
48extern void v4l_printk_ioctl(unsigned int cmd); 47extern void v4l_printk_ioctl(unsigned int cmd);
49 48
diff --git a/include/media/videobuf-core.h b/include/media/videobuf-core.h
index 5b39a22533fe..874f1340d049 100644
--- a/include/media/videobuf-core.h
+++ b/include/media/videobuf-core.h
@@ -237,6 +237,9 @@ unsigned int videobuf_poll_stream(struct file *file,
237int videobuf_mmap_setup(struct videobuf_queue *q, 237int videobuf_mmap_setup(struct videobuf_queue *q,
238 unsigned int bcount, unsigned int bsize, 238 unsigned int bcount, unsigned int bsize,
239 enum v4l2_memory memory); 239 enum v4l2_memory memory);
240int __videobuf_mmap_setup(struct videobuf_queue *q,
241 unsigned int bcount, unsigned int bsize,
242 enum v4l2_memory memory);
240int videobuf_mmap_free(struct videobuf_queue *q); 243int videobuf_mmap_free(struct videobuf_queue *q);
241int videobuf_mmap_mapper(struct videobuf_queue *q, 244int videobuf_mmap_mapper(struct videobuf_queue *q,
242 struct vm_area_struct *vma); 245 struct vm_area_struct *vma);
diff --git a/include/net/addrconf.h b/include/net/addrconf.h
index 0a2f0372df31..bbd3d583c6e6 100644
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -94,6 +94,28 @@ extern void addrconf_join_solict(struct net_device *dev,
94extern void addrconf_leave_solict(struct inet6_dev *idev, 94extern void addrconf_leave_solict(struct inet6_dev *idev,
95 struct in6_addr *addr); 95 struct in6_addr *addr);
96 96
97static inline unsigned long addrconf_timeout_fixup(u32 timeout,
98 unsigned unit)
99{
100 if (timeout == 0xffffffff)
101 return ~0UL;
102
103 /*
104 * Avoid arithmetic overflow.
105 * Assuming unit is constant and non-zero, this "if" statement
106 * will go away on 64bit archs.
107 */
108 if (0xfffffffe > LONG_MAX / unit && timeout > LONG_MAX / unit)
109 return LONG_MAX / unit;
110
111 return timeout;
112}
113
114static inline int addrconf_finite_timeout(unsigned long timeout)
115{
116 return ~timeout;
117}
118
97/* 119/*
98 * IPv6 Address Label subsystem (addrlabel.c) 120 * IPv6 Address Label subsystem (addrlabel.c)
99 */ 121 */
diff --git a/include/net/genetlink.h b/include/net/genetlink.h
index decdda546829..747c255d1df0 100644
--- a/include/net/genetlink.h
+++ b/include/net/genetlink.h
@@ -162,9 +162,9 @@ static inline int genlmsg_end(struct sk_buff *skb, void *hdr)
162 * @skb: socket buffer the message is stored in 162 * @skb: socket buffer the message is stored in
163 * @hdr: generic netlink message header 163 * @hdr: generic netlink message header
164 */ 164 */
165static inline int genlmsg_cancel(struct sk_buff *skb, void *hdr) 165static inline void genlmsg_cancel(struct sk_buff *skb, void *hdr)
166{ 166{
167 return nlmsg_cancel(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN); 167 nlmsg_cancel(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN);
168} 168}
169 169
170/** 170/**
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
index a42cd63d241a..9fabe5b38912 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
@@ -197,4 +197,14 @@ static inline int inet_iif(const struct sk_buff *skb)
197 return skb->rtable->rt_iif; 197 return skb->rtable->rt_iif;
198} 198}
199 199
200static inline struct request_sock *inet_reqsk_alloc(struct request_sock_ops *ops)
201{
202 struct request_sock *req = reqsk_alloc(ops);
203
204 if (req != NULL)
205 inet_rsk(req)->opt = NULL;
206
207 return req;
208}
209
200#endif /* _INET_SOCK_H */ 210#endif /* _INET_SOCK_H */
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index e0a612bc9c4e..f422f7218e1c 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -367,6 +367,12 @@ static inline int ipv6_addr_any(const struct in6_addr *a)
367 a->s6_addr32[2] | a->s6_addr32[3] ) == 0); 367 a->s6_addr32[2] | a->s6_addr32[3] ) == 0);
368} 368}
369 369
370static inline int ipv6_addr_loopback(const struct in6_addr *a)
371{
372 return ((a->s6_addr32[0] | a->s6_addr32[1] |
373 a->s6_addr32[2] | (a->s6_addr32[3] ^ htonl(1))) == 0);
374}
375
370static inline int ipv6_addr_v4mapped(const struct in6_addr *a) 376static inline int ipv6_addr_v4mapped(const struct in6_addr *a)
371{ 377{
372 return ((a->s6_addr32[0] | a->s6_addr32[1] | 378 return ((a->s6_addr32[0] | a->s6_addr32[1] |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 4a80d74975e8..bcd1623245cb 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -595,6 +595,15 @@ enum ieee80211_key_alg {
595 ALG_CCMP, 595 ALG_CCMP,
596}; 596};
597 597
598/**
599 * enum ieee80211_key_len - key length
600 * @WEP40: WEP 5 byte long key
601 * @WEP104: WEP 13 byte long key
602 */
603enum ieee80211_key_len {
604 LEN_WEP40 = 5,
605 LEN_WEP104 = 13,
606};
598 607
599/** 608/**
600 * enum ieee80211_key_flags - key flags 609 * enum ieee80211_key_flags - key flags
@@ -1594,13 +1603,16 @@ void ieee80211_wake_queues(struct ieee80211_hw *hw);
1594void ieee80211_scan_completed(struct ieee80211_hw *hw); 1603void ieee80211_scan_completed(struct ieee80211_hw *hw);
1595 1604
1596/** 1605/**
1597 * ieee80211_iterate_active_interfaces - iterate active interfaces 1606 * ieee80211_iterate_active_interfaces- iterate active interfaces
1598 * 1607 *
1599 * This function iterates over the interfaces associated with a given 1608 * This function iterates over the interfaces associated with a given
1600 * hardware that are currently active and calls the callback for them. 1609 * hardware that are currently active and calls the callback for them.
1610 * This function allows the iterator function to sleep, when the iterator
1611 * function is atomic @ieee80211_iterate_active_interfaces_atomic can
1612 * be used.
1601 * 1613 *
1602 * @hw: the hardware struct of which the interfaces should be iterated over 1614 * @hw: the hardware struct of which the interfaces should be iterated over
1603 * @iterator: the iterator function to call, cannot sleep 1615 * @iterator: the iterator function to call
1604 * @data: first argument of the iterator function 1616 * @data: first argument of the iterator function
1605 */ 1617 */
1606void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw, 1618void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw,
@@ -1609,6 +1621,24 @@ void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw,
1609 void *data); 1621 void *data);
1610 1622
1611/** 1623/**
1624 * ieee80211_iterate_active_interfaces_atomic - iterate active interfaces
1625 *
1626 * This function iterates over the interfaces associated with a given
1627 * hardware that are currently active and calls the callback for them.
1628 * This function requires the iterator callback function to be atomic,
1629 * if that is not desired, use @ieee80211_iterate_active_interfaces instead.
1630 *
1631 * @hw: the hardware struct of which the interfaces should be iterated over
1632 * @iterator: the iterator function to call, cannot sleep
1633 * @data: first argument of the iterator function
1634 */
1635void ieee80211_iterate_active_interfaces_atomic(struct ieee80211_hw *hw,
1636 void (*iterator)(void *data,
1637 u8 *mac,
1638 struct ieee80211_vif *vif),
1639 void *data);
1640
1641/**
1612 * ieee80211_start_tx_ba_session - Start a tx Block Ack session. 1642 * ieee80211_start_tx_ba_session - Start a tx Block Ack session.
1613 * @hw: pointer as obtained from ieee80211_alloc_hw(). 1643 * @hw: pointer as obtained from ieee80211_alloc_hw().
1614 * @ra: receiver address of the BA session recipient 1644 * @ra: receiver address of the BA session recipient
diff --git a/include/net/ndisc.h b/include/net/ndisc.h
index 9c451ff2f4f4..a01b7c4dc763 100644
--- a/include/net/ndisc.h
+++ b/include/net/ndisc.h
@@ -129,6 +129,10 @@ extern int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl,
129 void __user *buffer, 129 void __user *buffer,
130 size_t *lenp, 130 size_t *lenp,
131 loff_t *ppos); 131 loff_t *ppos);
132int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name,
133 int nlen, void __user *oldval,
134 size_t __user *oldlenp,
135 void __user *newval, size_t newlen);
132#endif 136#endif
133 137
134extern void inet6_ifinfo_notify(int event, 138extern void inet6_ifinfo_notify(int event,
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index aa540e6be502..d9dd0f707296 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -95,6 +95,11 @@ extern struct list_head net_namespace_list;
95#ifdef CONFIG_NET_NS 95#ifdef CONFIG_NET_NS
96extern void __put_net(struct net *net); 96extern void __put_net(struct net *net);
97 97
98static inline int net_alive(struct net *net)
99{
100 return net && atomic_read(&net->count);
101}
102
98static inline struct net *get_net(struct net *net) 103static inline struct net *get_net(struct net *net)
99{ 104{
100 atomic_inc(&net->count); 105 atomic_inc(&net->count);
@@ -125,6 +130,12 @@ int net_eq(const struct net *net1, const struct net *net2)
125 return net1 == net2; 130 return net1 == net2;
126} 131}
127#else 132#else
133
134static inline int net_alive(struct net *net)
135{
136 return 1;
137}
138
128static inline struct net *get_net(struct net *net) 139static inline struct net *get_net(struct net *net)
129{ 140{
130 return net; 141 return net;
diff --git a/include/net/netfilter/nf_conntrack_extend.h b/include/net/netfilter/nf_conntrack_extend.h
index f736e842977f..f80c0ed6d870 100644
--- a/include/net/netfilter/nf_conntrack_extend.h
+++ b/include/net/netfilter/nf_conntrack_extend.h
@@ -15,6 +15,7 @@ enum nf_ct_ext_id
15 15
16/* Extensions: optional stuff which isn't permanently in struct. */ 16/* Extensions: optional stuff which isn't permanently in struct. */
17struct nf_ct_ext { 17struct nf_ct_ext {
18 struct rcu_head rcu;
18 u8 offset[NF_CT_EXT_NUM]; 19 u8 offset[NF_CT_EXT_NUM];
19 u8 len; 20 u8 len;
20 char data[0]; 21 char data[0];
diff --git a/include/net/netlink.h b/include/net/netlink.h
index a5506c42f03c..dfc3701dfcc3 100644
--- a/include/net/netlink.h
+++ b/include/net/netlink.h
@@ -556,14 +556,12 @@ static inline void *nlmsg_get_pos(struct sk_buff *skb)
556 * @skb: socket buffer the message is stored in 556 * @skb: socket buffer the message is stored in
557 * @mark: mark to trim to 557 * @mark: mark to trim to
558 * 558 *
559 * Trims the message to the provided mark. Returns -1. 559 * Trims the message to the provided mark.
560 */ 560 */
561static inline int nlmsg_trim(struct sk_buff *skb, const void *mark) 561static inline void nlmsg_trim(struct sk_buff *skb, const void *mark)
562{ 562{
563 if (mark) 563 if (mark)
564 skb_trim(skb, (unsigned char *) mark - skb->data); 564 skb_trim(skb, (unsigned char *) mark - skb->data);
565
566 return -1;
567} 565}
568 566
569/** 567/**
@@ -572,11 +570,11 @@ static inline int nlmsg_trim(struct sk_buff *skb, const void *mark)
572 * @nlh: netlink message header 570 * @nlh: netlink message header
573 * 571 *
574 * Removes the complete netlink message including all 572 * Removes the complete netlink message including all
575 * attributes from the socket buffer again. Returns -1. 573 * attributes from the socket buffer again.
576 */ 574 */
577static inline int nlmsg_cancel(struct sk_buff *skb, struct nlmsghdr *nlh) 575static inline void nlmsg_cancel(struct sk_buff *skb, struct nlmsghdr *nlh)
578{ 576{
579 return nlmsg_trim(skb, nlh); 577 nlmsg_trim(skb, nlh);
580} 578}
581 579
582/** 580/**
@@ -772,12 +770,13 @@ static inline int __nla_parse_nested_compat(struct nlattr *tb[], int maxtype,
772 const struct nla_policy *policy, 770 const struct nla_policy *policy,
773 int len) 771 int len)
774{ 772{
775 if (nla_len(nla) < len) 773 int nested_len = nla_len(nla) - NLA_ALIGN(len);
776 return -1; 774
777 if (nla_len(nla) >= NLA_ALIGN(len) + sizeof(struct nlattr)) 775 if (nested_len < 0)
778 return nla_parse_nested(tb, maxtype, 776 return -EINVAL;
779 nla_data(nla) + NLA_ALIGN(len), 777 if (nested_len >= nla_attr_size(0))
780 policy); 778 return nla_parse(tb, maxtype, nla_data(nla) + NLA_ALIGN(len),
779 nested_len, policy);
781 memset(tb, 0, sizeof(struct nlattr *) * (maxtype + 1)); 780 memset(tb, 0, sizeof(struct nlattr *) * (maxtype + 1));
782 return 0; 781 return 0;
783} 782}
@@ -1079,11 +1078,11 @@ static inline int nla_nest_compat_end(struct sk_buff *skb, struct nlattr *start)
1079 * @start: container attribute 1078 * @start: container attribute
1080 * 1079 *
1081 * Removes the container attribute and including all nested 1080 * Removes the container attribute and including all nested
1082 * attributes. Returns -1. 1081 * attributes. Returns -EMSGSIZE
1083 */ 1082 */
1084static inline int nla_nest_cancel(struct sk_buff *skb, struct nlattr *start) 1083static inline void nla_nest_cancel(struct sk_buff *skb, struct nlattr *start)
1085{ 1084{
1086 return nlmsg_trim(skb, start); 1085 nlmsg_trim(skb, start);
1087} 1086}
1088 1087
1089/** 1088/**
diff --git a/include/net/request_sock.h b/include/net/request_sock.h
index b220b5f624de..0c96e7bed5db 100644
--- a/include/net/request_sock.h
+++ b/include/net/request_sock.h
@@ -115,8 +115,8 @@ struct request_sock_queue {
115 struct request_sock *rskq_accept_head; 115 struct request_sock *rskq_accept_head;
116 struct request_sock *rskq_accept_tail; 116 struct request_sock *rskq_accept_tail;
117 rwlock_t syn_wait_lock; 117 rwlock_t syn_wait_lock;
118 u16 rskq_defer_accept; 118 u8 rskq_defer_accept;
119 /* 2 bytes hole, try to pack */ 119 /* 3 bytes hole, try to pack */
120 struct listen_sock *listen_opt; 120 struct listen_sock *listen_opt;
121}; 121};
122 122
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index ab502ec1c61c..a87fc0312edc 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -178,7 +178,7 @@ extern struct Qdisc *qdisc_alloc(struct net_device *dev, struct Qdisc_ops *ops);
178extern struct Qdisc *qdisc_create_dflt(struct net_device *dev, 178extern struct Qdisc *qdisc_create_dflt(struct net_device *dev,
179 struct Qdisc_ops *ops, u32 parentid); 179 struct Qdisc_ops *ops, u32 parentid);
180extern void tcf_destroy(struct tcf_proto *tp); 180extern void tcf_destroy(struct tcf_proto *tp);
181extern void tcf_destroy_chain(struct tcf_proto *fl); 181extern void tcf_destroy_chain(struct tcf_proto **fl);
182 182
183static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, 183static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch,
184 struct sk_buff_head *list) 184 struct sk_buff_head *list)
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 0ce0443c5b79..7f25195f9855 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -548,7 +548,8 @@ struct sctp_af {
548 struct dst_entry *(*get_dst) (struct sctp_association *asoc, 548 struct dst_entry *(*get_dst) (struct sctp_association *asoc,
549 union sctp_addr *daddr, 549 union sctp_addr *daddr,
550 union sctp_addr *saddr); 550 union sctp_addr *saddr);
551 void (*get_saddr) (struct sctp_association *asoc, 551 void (*get_saddr) (struct sctp_sock *sk,
552 struct sctp_association *asoc,
552 struct dst_entry *dst, 553 struct dst_entry *dst,
553 union sctp_addr *daddr, 554 union sctp_addr *daddr,
554 union sctp_addr *saddr); 555 union sctp_addr *saddr);
@@ -587,6 +588,7 @@ struct sctp_af {
587 int (*is_ce) (const struct sk_buff *sk); 588 int (*is_ce) (const struct sk_buff *sk);
588 void (*seq_dump_addr)(struct seq_file *seq, 589 void (*seq_dump_addr)(struct seq_file *seq,
589 union sctp_addr *addr); 590 union sctp_addr *addr);
591 void (*ecn_capable)(struct sock *sk);
590 __u16 net_header_len; 592 __u16 net_header_len;
591 int sockaddr_len; 593 int sockaddr_len;
592 sa_family_t sa_family; 594 sa_family_t sa_family;
@@ -901,7 +903,10 @@ struct sctp_transport {
901 * calculation completes (i.e. the DATA chunk 903 * calculation completes (i.e. the DATA chunk
902 * is SACK'd) clear this flag. 904 * is SACK'd) clear this flag.
903 */ 905 */
904 int rto_pending; 906 __u8 rto_pending;
907
908 /* Flag to track the current fast recovery state */
909 __u8 fast_recovery;
905 910
906 /* 911 /*
907 * These are the congestion stats. 912 * These are the congestion stats.
@@ -920,6 +925,9 @@ struct sctp_transport {
920 /* Data that has been sent, but not acknowledged. */ 925 /* Data that has been sent, but not acknowledged. */
921 __u32 flight_size; 926 __u32 flight_size;
922 927
928 /* TSN marking the fast recovery exit point */
929 __u32 fast_recovery_exit;
930
923 /* Destination */ 931 /* Destination */
924 struct dst_entry *dst; 932 struct dst_entry *dst;
925 /* Source address. */ 933 /* Source address. */
@@ -1044,7 +1052,7 @@ void sctp_transport_route(struct sctp_transport *, union sctp_addr *,
1044 struct sctp_sock *); 1052 struct sctp_sock *);
1045void sctp_transport_pmtu(struct sctp_transport *); 1053void sctp_transport_pmtu(struct sctp_transport *);
1046void sctp_transport_free(struct sctp_transport *); 1054void sctp_transport_free(struct sctp_transport *);
1047void sctp_transport_reset_timers(struct sctp_transport *); 1055void sctp_transport_reset_timers(struct sctp_transport *, int);
1048void sctp_transport_hold(struct sctp_transport *); 1056void sctp_transport_hold(struct sctp_transport *);
1049void sctp_transport_put(struct sctp_transport *); 1057void sctp_transport_put(struct sctp_transport *);
1050void sctp_transport_update_rto(struct sctp_transport *, __u32); 1058void sctp_transport_update_rto(struct sctp_transport *, __u32);
@@ -1134,6 +1142,9 @@ struct sctp_outq {
1134 /* How many unackd bytes do we have in-flight? */ 1142 /* How many unackd bytes do we have in-flight? */
1135 __u32 outstanding_bytes; 1143 __u32 outstanding_bytes;
1136 1144
1145 /* Are we doing fast-rtx on this queue */
1146 char fast_rtx;
1147
1137 /* Corked? */ 1148 /* Corked? */
1138 char cork; 1149 char cork;
1139 1150
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 633147cb6bbc..cf54034019d9 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -139,7 +139,6 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo);
139#define MAX_TCP_KEEPINTVL 32767 139#define MAX_TCP_KEEPINTVL 32767
140#define MAX_TCP_KEEPCNT 127 140#define MAX_TCP_KEEPCNT 127
141#define MAX_TCP_SYNCNT 127 141#define MAX_TCP_SYNCNT 127
142#define MAX_TCP_ACCEPT_DEFERRED 65535
143 142
144#define TCP_SYNQ_INTERVAL (HZ/5) /* Period of SYNACK timer */ 143#define TCP_SYNQ_INTERVAL (HZ/5) /* Period of SYNACK timer */
145 144
@@ -433,7 +432,6 @@ extern struct sk_buff * tcp_make_synack(struct sock *sk,
433 432
434extern int tcp_disconnect(struct sock *sk, int flags); 433extern int tcp_disconnect(struct sock *sk, int flags);
435 434
436extern void tcp_unhash(struct sock *sk);
437 435
438/* From syncookies.c */ 436/* From syncookies.c */
439extern __u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS]; 437extern __u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS];
diff --git a/include/net/transp_v6.h b/include/net/transp_v6.h
index 27394e0447d8..112934a3288d 100644
--- a/include/net/transp_v6.h
+++ b/include/net/transp_v6.h
@@ -40,7 +40,8 @@ extern int datagram_recv_ctl(struct sock *sk,
40 struct msghdr *msg, 40 struct msghdr *msg,
41 struct sk_buff *skb); 41 struct sk_buff *skb);
42 42
43extern int datagram_send_ctl(struct msghdr *msg, 43extern int datagram_send_ctl(struct net *net,
44 struct msghdr *msg,
44 struct flowi *fl, 45 struct flowi *fl,
45 struct ipv6_txoptions *opt, 46 struct ipv6_txoptions *opt,
46 int *hlimit, int *tclass); 47 int *hlimit, int *tclass);
diff --git a/include/net/udp.h b/include/net/udp.h
index 3e55a99b0ba3..ccce83707046 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -135,6 +135,7 @@ extern void udp_err(struct sk_buff *, u32);
135 135
136extern int udp_sendmsg(struct kiocb *iocb, struct sock *sk, 136extern int udp_sendmsg(struct kiocb *iocb, struct sock *sk,
137 struct msghdr *msg, size_t len); 137 struct msghdr *msg, size_t len);
138extern void udp_flush_pending_frames(struct sock *sk);
138 139
139extern int udp_rcv(struct sk_buff *skb); 140extern int udp_rcv(struct sk_buff *skb);
140extern int udp_ioctl(struct sock *sk, int cmd, unsigned long arg); 141extern int udp_ioctl(struct sock *sk, int cmd, unsigned long arg);
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 911a661b7278..31d30b1852e8 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -105,7 +105,6 @@ enum ib_device_cap_flags {
105 */ 105 */
106 IB_DEVICE_UD_IP_CSUM = (1<<18), 106 IB_DEVICE_UD_IP_CSUM = (1<<18),
107 IB_DEVICE_UD_TSO = (1<<19), 107 IB_DEVICE_UD_TSO = (1<<19),
108 IB_DEVICE_SEND_W_INV = (1<<21),
109}; 108};
110 109
111enum ib_atomic_cap { 110enum ib_atomic_cap {
diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h
index 049edc5e6461..9c309daf492b 100644
--- a/include/sound/ac97_codec.h
+++ b/include/sound/ac97_codec.h
@@ -505,6 +505,7 @@ struct snd_ac97 {
505 unsigned short pcmreg[3]; // PCM registers 505 unsigned short pcmreg[3]; // PCM registers
506 unsigned short codec_cfg[3]; // CODEC_CFG bits 506 unsigned short codec_cfg[3]; // CODEC_CFG bits
507 unsigned char swap_mic_linein; // AD1986/AD1986A only 507 unsigned char swap_mic_linein; // AD1986/AD1986A only
508 unsigned char lo_as_master; /* LO as master */
508 } ad18xx; 509 } ad18xx;
509 unsigned int dev_flags; /* device specific */ 510 unsigned int dev_flags; /* device specific */
510 } spec; 511 } spec;
diff --git a/include/xen/events.h b/include/xen/events.h
index acd8e062c85f..67c4436554a9 100644
--- a/include/xen/events.h
+++ b/include/xen/events.h
@@ -32,6 +32,7 @@ void unbind_from_irqhandler(unsigned int irq, void *dev_id);
32 32
33void xen_send_IPI_one(unsigned int cpu, enum ipi_vector vector); 33void xen_send_IPI_one(unsigned int cpu, enum ipi_vector vector);
34int resend_irq_on_evtchn(unsigned int irq); 34int resend_irq_on_evtchn(unsigned int irq);
35void rebind_evtchn_irq(int evtchn, int irq);
35 36
36static inline void notify_remote_via_evtchn(int port) 37static inline void notify_remote_via_evtchn(int port)
37{ 38{
@@ -40,4 +41,7 @@ static inline void notify_remote_via_evtchn(int port)
40} 41}
41 42
42extern void notify_remote_via_irq(int irq); 43extern void notify_remote_via_irq(int irq);
44
45extern void xen_irq_resume(void);
46
43#endif /* _XEN_EVENTS_H */ 47#endif /* _XEN_EVENTS_H */
diff --git a/include/xen/grant_table.h b/include/xen/grant_table.h
index 466204846121..a40f1cd91be1 100644
--- a/include/xen/grant_table.h
+++ b/include/xen/grant_table.h
@@ -51,6 +51,9 @@ struct gnttab_free_callback {
51 u16 count; 51 u16 count;
52}; 52};
53 53
54int gnttab_suspend(void);
55int gnttab_resume(void);
56
54int gnttab_grant_foreign_access(domid_t domid, unsigned long frame, 57int gnttab_grant_foreign_access(domid_t domid, unsigned long frame,
55 int readonly); 58 int readonly);
56 59
diff --git a/include/xen/hvc-console.h b/include/xen/hvc-console.h
index 21c0ecfd786d..98b79bc404dd 100644
--- a/include/xen/hvc-console.h
+++ b/include/xen/hvc-console.h
@@ -3,4 +3,13 @@
3 3
4extern struct console xenboot_console; 4extern struct console xenboot_console;
5 5
6#ifdef CONFIG_HVC_XEN
7void xen_console_resume(void);
8#else
9static inline void xen_console_resume(void) { }
10#endif
11
12void xen_raw_console_write(const char *str);
13void xen_raw_printk(const char *fmt, ...);
14
6#endif /* XEN_HVC_CONSOLE_H */ 15#endif /* XEN_HVC_CONSOLE_H */
diff --git a/include/xen/interface/elfnote.h b/include/xen/interface/elfnote.h
index a64d3df5bd95..7a8262c375cc 100644
--- a/include/xen/interface/elfnote.h
+++ b/include/xen/interface/elfnote.h
@@ -120,6 +120,26 @@
120 */ 120 */
121#define XEN_ELFNOTE_BSD_SYMTAB 11 121#define XEN_ELFNOTE_BSD_SYMTAB 11
122 122
123/*
124 * The lowest address the hypervisor hole can begin at (numeric).
125 *
126 * This must not be set higher than HYPERVISOR_VIRT_START. Its presence
127 * also indicates to the hypervisor that the kernel can deal with the
128 * hole starting at a higher address.
129 */
130#define XEN_ELFNOTE_HV_START_LOW 12
131
132/*
133 * List of maddr_t-sized mask/value pairs describing how to recognize
134 * (non-present) L1 page table entries carrying valid MFNs (numeric).
135 */
136#define XEN_ELFNOTE_L1_MFN_VALID 13
137
138/*
139 * Whether or not the guest supports cooperative suspend cancellation.
140 */
141#define XEN_ELFNOTE_SUSPEND_CANCEL 14
142
123#endif /* __XEN_PUBLIC_ELFNOTE_H__ */ 143#endif /* __XEN_PUBLIC_ELFNOTE_H__ */
124 144
125/* 145/*
diff --git a/include/xen/interface/features.h b/include/xen/interface/features.h
index d73228d16488..f51b6413b054 100644
--- a/include/xen/interface/features.h
+++ b/include/xen/interface/features.h
@@ -38,6 +38,9 @@
38 */ 38 */
39#define XENFEAT_pae_pgdir_above_4gb 4 39#define XENFEAT_pae_pgdir_above_4gb 4
40 40
41/* x86: Does this Xen host support the MMU_PT_UPDATE_PRESERVE_AD hypercall? */
42#define XENFEAT_mmu_pt_update_preserve_ad 5
43
41#define XENFEAT_NR_SUBMAPS 1 44#define XENFEAT_NR_SUBMAPS 1
42 45
43#endif /* __XEN_PUBLIC_FEATURES_H__ */ 46#endif /* __XEN_PUBLIC_FEATURES_H__ */
diff --git a/include/xen/interface/io/fbif.h b/include/xen/interface/io/fbif.h
index 5a934dd7796d..974a51ed9165 100644
--- a/include/xen/interface/io/fbif.h
+++ b/include/xen/interface/io/fbif.h
@@ -49,11 +49,27 @@ struct xenfb_update {
49 int32_t height; /* rect height */ 49 int32_t height; /* rect height */
50}; 50};
51 51
52/*
53 * Framebuffer resize notification event
54 * Capable backend sets feature-resize in xenstore.
55 */
56#define XENFB_TYPE_RESIZE 3
57
58struct xenfb_resize {
59 uint8_t type; /* XENFB_TYPE_RESIZE */
60 int32_t width; /* width in pixels */
61 int32_t height; /* height in pixels */
62 int32_t stride; /* stride in bytes */
63 int32_t depth; /* depth in bits */
64 int32_t offset; /* start offset within framebuffer */
65};
66
52#define XENFB_OUT_EVENT_SIZE 40 67#define XENFB_OUT_EVENT_SIZE 40
53 68
54union xenfb_out_event { 69union xenfb_out_event {
55 uint8_t type; 70 uint8_t type;
56 struct xenfb_update update; 71 struct xenfb_update update;
72 struct xenfb_resize resize;
57 char pad[XENFB_OUT_EVENT_SIZE]; 73 char pad[XENFB_OUT_EVENT_SIZE];
58}; 74};
59 75
@@ -105,15 +121,18 @@ struct xenfb_page {
105 * Each directory page holds PAGE_SIZE / sizeof(*pd) 121 * Each directory page holds PAGE_SIZE / sizeof(*pd)
106 * framebuffer pages, and can thus map up to PAGE_SIZE * 122 * framebuffer pages, and can thus map up to PAGE_SIZE *
107 * PAGE_SIZE / sizeof(*pd) bytes. With PAGE_SIZE == 4096 and 123 * PAGE_SIZE / sizeof(*pd) bytes. With PAGE_SIZE == 4096 and
108 * sizeof(unsigned long) == 4, that's 4 Megs. Two directory 124 * sizeof(unsigned long) == 4/8, that's 4 Megs 32 bit and 2
109 * pages should be enough for a while. 125 * Megs 64 bit. 256 directories give enough room for a 512
126 * Meg framebuffer with a max resolution of 12,800x10,240.
127 * Should be enough for a while with room leftover for
128 * expansion.
110 */ 129 */
111 unsigned long pd[2]; 130 unsigned long pd[256];
112}; 131};
113 132
114/* 133/*
115 * Wart: xenkbd needs to know resolution. Put it here until a better 134 * Wart: xenkbd needs to know default resolution. Put it here until a
116 * solution is found, but don't leak it to the backend. 135 * better solution is found, but don't leak it to the backend.
117 */ 136 */
118#ifdef __KERNEL__ 137#ifdef __KERNEL__
119#define XENFB_WIDTH 800 138#define XENFB_WIDTH 800
diff --git a/include/xen/interface/io/kbdif.h b/include/xen/interface/io/kbdif.h
index fb97f4284ffd..8066c7849fbe 100644
--- a/include/xen/interface/io/kbdif.h
+++ b/include/xen/interface/io/kbdif.h
@@ -49,6 +49,7 @@ struct xenkbd_motion {
49 uint8_t type; /* XENKBD_TYPE_MOTION */ 49 uint8_t type; /* XENKBD_TYPE_MOTION */
50 int32_t rel_x; /* relative X motion */ 50 int32_t rel_x; /* relative X motion */
51 int32_t rel_y; /* relative Y motion */ 51 int32_t rel_y; /* relative Y motion */
52 int32_t rel_z; /* relative Z motion (wheel) */
52}; 53};
53 54
54struct xenkbd_key { 55struct xenkbd_key {
@@ -61,6 +62,7 @@ struct xenkbd_position {
61 uint8_t type; /* XENKBD_TYPE_POS */ 62 uint8_t type; /* XENKBD_TYPE_POS */
62 int32_t abs_x; /* absolute X position (in FB pixels) */ 63 int32_t abs_x; /* absolute X position (in FB pixels) */
63 int32_t abs_y; /* absolute Y position (in FB pixels) */ 64 int32_t abs_y; /* absolute Y position (in FB pixels) */
65 int32_t rel_z; /* relative Z motion (wheel) */
64}; 66};
65 67
66#define XENKBD_IN_EVENT_SIZE 40 68#define XENKBD_IN_EVENT_SIZE 40
diff --git a/include/xen/interface/memory.h b/include/xen/interface/memory.h
index da768469aa92..af36ead16817 100644
--- a/include/xen/interface/memory.h
+++ b/include/xen/interface/memory.h
@@ -29,7 +29,7 @@ struct xen_memory_reservation {
29 * OUT: GMFN bases of extents that were allocated 29 * OUT: GMFN bases of extents that were allocated
30 * (NB. This command also updates the mach_to_phys translation table) 30 * (NB. This command also updates the mach_to_phys translation table)
31 */ 31 */
32 ulong extent_start; 32 GUEST_HANDLE(ulong) extent_start;
33 33
34 /* Number of extents, and size/alignment of each (2^extent_order pages). */ 34 /* Number of extents, and size/alignment of each (2^extent_order pages). */
35 unsigned long nr_extents; 35 unsigned long nr_extents;
@@ -50,6 +50,7 @@ struct xen_memory_reservation {
50 domid_t domid; 50 domid_t domid;
51 51
52}; 52};
53DEFINE_GUEST_HANDLE_STRUCT(xen_memory_reservation);
53 54
54/* 55/*
55 * Returns the maximum machine frame number of mapped RAM in this system. 56 * Returns the maximum machine frame number of mapped RAM in this system.
@@ -85,7 +86,7 @@ struct xen_machphys_mfn_list {
85 * any large discontiguities in the machine address space, 2MB gaps in 86 * any large discontiguities in the machine address space, 2MB gaps in
86 * the machphys table will be represented by an MFN base of zero. 87 * the machphys table will be represented by an MFN base of zero.
87 */ 88 */
88 ulong extent_start; 89 GUEST_HANDLE(ulong) extent_start;
89 90
90 /* 91 /*
91 * Number of extents written to the above array. This will be smaller 92 * Number of extents written to the above array. This will be smaller
@@ -93,6 +94,7 @@ struct xen_machphys_mfn_list {
93 */ 94 */
94 unsigned int nr_extents; 95 unsigned int nr_extents;
95}; 96};
97DEFINE_GUEST_HANDLE_STRUCT(xen_machphys_mfn_list);
96 98
97/* 99/*
98 * Sets the GPFN at which a particular page appears in the specified guest's 100 * Sets the GPFN at which a particular page appears in the specified guest's
@@ -115,6 +117,7 @@ struct xen_add_to_physmap {
115 /* GPFN where the source mapping page should appear. */ 117 /* GPFN where the source mapping page should appear. */
116 unsigned long gpfn; 118 unsigned long gpfn;
117}; 119};
120DEFINE_GUEST_HANDLE_STRUCT(xen_add_to_physmap);
118 121
119/* 122/*
120 * Translates a list of domain-specific GPFNs into MFNs. Returns a -ve error 123 * Translates a list of domain-specific GPFNs into MFNs. Returns a -ve error
@@ -129,13 +132,14 @@ struct xen_translate_gpfn_list {
129 unsigned long nr_gpfns; 132 unsigned long nr_gpfns;
130 133
131 /* List of GPFNs to translate. */ 134 /* List of GPFNs to translate. */
132 ulong gpfn_list; 135 GUEST_HANDLE(ulong) gpfn_list;
133 136
134 /* 137 /*
135 * Output list to contain MFN translations. May be the same as the input 138 * Output list to contain MFN translations. May be the same as the input
136 * list (in which case each input GPFN is overwritten with the output MFN). 139 * list (in which case each input GPFN is overwritten with the output MFN).
137 */ 140 */
138 ulong mfn_list; 141 GUEST_HANDLE(ulong) mfn_list;
139}; 142};
143DEFINE_GUEST_HANDLE_STRUCT(xen_translate_gpfn_list);
140 144
141#endif /* __XEN_PUBLIC_MEMORY_H__ */ 145#endif /* __XEN_PUBLIC_MEMORY_H__ */
diff --git a/include/xen/interface/xen.h b/include/xen/interface/xen.h
index 9b018da48cf3..2befa3e2f1bc 100644
--- a/include/xen/interface/xen.h
+++ b/include/xen/interface/xen.h
@@ -10,6 +10,7 @@
10#define __XEN_PUBLIC_XEN_H__ 10#define __XEN_PUBLIC_XEN_H__
11 11
12#include <asm/xen/interface.h> 12#include <asm/xen/interface.h>
13#include <asm/pvclock-abi.h>
13 14
14/* 15/*
15 * XEN "SYSTEM CALLS" (a.k.a. HYPERCALLS). 16 * XEN "SYSTEM CALLS" (a.k.a. HYPERCALLS).
@@ -113,9 +114,14 @@
113 * ptr[:2] -- Machine address within the frame whose mapping to modify. 114 * ptr[:2] -- Machine address within the frame whose mapping to modify.
114 * The frame must belong to the FD, if one is specified. 115 * The frame must belong to the FD, if one is specified.
115 * val -- Value to write into the mapping entry. 116 * val -- Value to write into the mapping entry.
117 *
118 * ptr[1:0] == MMU_PT_UPDATE_PRESERVE_AD:
119 * As MMU_NORMAL_PT_UPDATE above, but A/D bits currently in the PTE are ORed
120 * with those in @val.
116 */ 121 */
117#define MMU_NORMAL_PT_UPDATE 0 /* checked '*ptr = val'. ptr is MA. */ 122#define MMU_NORMAL_PT_UPDATE 0 /* checked '*ptr = val'. ptr is MA. */
118#define MMU_MACHPHYS_UPDATE 1 /* ptr = MA of frame to modify entry for */ 123#define MMU_MACHPHYS_UPDATE 1 /* ptr = MA of frame to modify entry for */
124#define MMU_PT_UPDATE_PRESERVE_AD 2 /* atomically: *ptr = val | (*ptr&(A|D)) */
119 125
120/* 126/*
121 * MMU EXTENDED OPERATIONS 127 * MMU EXTENDED OPERATIONS
@@ -336,7 +342,7 @@ struct vcpu_info {
336 uint8_t evtchn_upcall_mask; 342 uint8_t evtchn_upcall_mask;
337 unsigned long evtchn_pending_sel; 343 unsigned long evtchn_pending_sel;
338 struct arch_vcpu_info arch; 344 struct arch_vcpu_info arch;
339 struct vcpu_time_info time; 345 struct pvclock_vcpu_time_info time;
340}; /* 64 bytes (x86) */ 346}; /* 64 bytes (x86) */
341 347
342/* 348/*
@@ -384,9 +390,7 @@ struct shared_info {
384 * Wallclock time: updated only by control software. Guests should base 390 * Wallclock time: updated only by control software. Guests should base
385 * their gettimeofday() syscall on this wallclock-base value. 391 * their gettimeofday() syscall on this wallclock-base value.
386 */ 392 */
387 uint32_t wc_version; /* Version counter: see vcpu_time_info_t. */ 393 struct pvclock_wall_clock wc;
388 uint32_t wc_sec; /* Secs 00:00:00 UTC, Jan 1, 1970. */
389 uint32_t wc_nsec; /* Nsecs 00:00:00 UTC, Jan 1, 1970. */
390 394
391 struct arch_shared_info arch; 395 struct arch_shared_info arch;
392 396
diff --git a/include/xen/xen-ops.h b/include/xen/xen-ops.h
index 10ddfe0142d0..a706d6a78960 100644
--- a/include/xen/xen-ops.h
+++ b/include/xen/xen-ops.h
@@ -5,4 +5,10 @@
5 5
6DECLARE_PER_CPU(struct vcpu_info *, xen_vcpu); 6DECLARE_PER_CPU(struct vcpu_info *, xen_vcpu);
7 7
8void xen_pre_suspend(void);
9void xen_post_suspend(int suspend_cancelled);
10
11void xen_mm_pin_all(void);
12void xen_mm_unpin_all(void);
13
8#endif /* INCLUDE_XEN_OPS_H */ 14#endif /* INCLUDE_XEN_OPS_H */
diff --git a/init/Kconfig b/init/Kconfig
index 6135d07f31ec..6199d1120900 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -13,6 +13,7 @@ config DEFCONFIG_LIST
13 default "/lib/modules/$UNAME_RELEASE/.config" 13 default "/lib/modules/$UNAME_RELEASE/.config"
14 default "/etc/kernel-config" 14 default "/etc/kernel-config"
15 default "/boot/config-$UNAME_RELEASE" 15 default "/boot/config-$UNAME_RELEASE"
16 default "$ARCH_DEFCONFIG"
16 default "arch/$ARCH/defconfig" 17 default "arch/$ARCH/defconfig"
17 18
18menu "General setup" 19menu "General setup"
diff --git a/init/do_mounts_md.c b/init/do_mounts_md.c
index 7473b0c59d4d..693d24694a6c 100644
--- a/init/do_mounts_md.c
+++ b/init/do_mounts_md.c
@@ -24,7 +24,6 @@ static struct {
24 24
25static int md_setup_ents __initdata; 25static int md_setup_ents __initdata;
26 26
27extern int mdp_major;
28/* 27/*
29 * Parse the command-line parameters given our kernel, but do not 28 * Parse the command-line parameters given our kernel, but do not
30 * actually try to invoke the MD device now; that is handled by 29 * actually try to invoke the MD device now; that is handled by
diff --git a/ipc/msg.c b/ipc/msg.c
index 32494e8cc7a5..b4eee1c6101d 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -98,20 +98,15 @@ void recompute_msgmni(struct ipc_namespace *ns)
98 98
99 if (allowed < MSGMNI) { 99 if (allowed < MSGMNI) {
100 ns->msg_ctlmni = MSGMNI; 100 ns->msg_ctlmni = MSGMNI;
101 goto out_callback; 101 return;
102 } 102 }
103 103
104 if (allowed > IPCMNI / nb_ns) { 104 if (allowed > IPCMNI / nb_ns) {
105 ns->msg_ctlmni = IPCMNI / nb_ns; 105 ns->msg_ctlmni = IPCMNI / nb_ns;
106 goto out_callback; 106 return;
107 } 107 }
108 108
109 ns->msg_ctlmni = allowed; 109 ns->msg_ctlmni = allowed;
110
111out_callback:
112
113 printk(KERN_INFO "msgmni has been set to %d for ipc namespace %p\n",
114 ns->msg_ctlmni, ns);
115} 110}
116 111
117void msg_init_ns(struct ipc_namespace *ns) 112void msg_init_ns(struct ipc_namespace *ns)
@@ -136,6 +131,10 @@ void msg_exit_ns(struct ipc_namespace *ns)
136void __init msg_init(void) 131void __init msg_init(void)
137{ 132{
138 msg_init_ns(&init_ipc_ns); 133 msg_init_ns(&init_ipc_ns);
134
135 printk(KERN_INFO "msgmni has been set to %d\n",
136 init_ipc_ns.msg_ctlmni);
137
139 ipc_init_proc_interface("sysvipc/msg", 138 ipc_init_proc_interface("sysvipc/msg",
140 " key msqid perms cbytes qnum lspid lrpid uid gid cuid cgid stime rtime ctime\n", 139 " key msqid perms cbytes qnum lspid lrpid uid gid cuid cgid stime rtime ctime\n",
141 IPC_MSG_IDS, sysvipc_msg_proc_show); 140 IPC_MSG_IDS, sysvipc_msg_proc_show);
diff --git a/ipc/shm.c b/ipc/shm.c
index 554429ade079..790240cd067f 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -894,8 +894,6 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr)
894 if (!sfd) 894 if (!sfd)
895 goto out_put_dentry; 895 goto out_put_dentry;
896 896
897 err = -ENOMEM;
898
899 file = alloc_file(path.mnt, path.dentry, f_mode, &shm_file_operations); 897 file = alloc_file(path.mnt, path.dentry, f_mode, &shm_file_operations);
900 if (!file) 898 if (!file)
901 goto out_free; 899 goto out_free;
@@ -1060,16 +1058,16 @@ asmlinkage long sys_shmdt(char __user *shmaddr)
1060static int sysvipc_shm_proc_show(struct seq_file *s, void *it) 1058static int sysvipc_shm_proc_show(struct seq_file *s, void *it)
1061{ 1059{
1062 struct shmid_kernel *shp = it; 1060 struct shmid_kernel *shp = it;
1063 char *format;
1064 1061
1065#define SMALL_STRING "%10d %10d %4o %10u %5u %5u %5d %5u %5u %5u %5u %10lu %10lu %10lu\n" 1062#if BITS_PER_LONG <= 32
1066#define BIG_STRING "%10d %10d %4o %21u %5u %5u %5d %5u %5u %5u %5u %10lu %10lu %10lu\n" 1063#define SIZE_SPEC "%10lu"
1064#else
1065#define SIZE_SPEC "%21lu"
1066#endif
1067 1067
1068 if (sizeof(size_t) <= sizeof(int)) 1068 return seq_printf(s,
1069 format = SMALL_STRING; 1069 "%10d %10d %4o " SIZE_SPEC " %5u %5u "
1070 else 1070 "%5lu %5u %5u %5u %5u %10lu %10lu %10lu\n",
1071 format = BIG_STRING;
1072 return seq_printf(s, format,
1073 shp->shm_perm.key, 1071 shp->shm_perm.key,
1074 shp->shm_perm.id, 1072 shp->shm_perm.id,
1075 shp->shm_perm.mode, 1073 shp->shm_perm.mode,
diff --git a/kernel/audit.c b/kernel/audit.c
index e8692a5748c2..e092f1c0ce30 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -738,7 +738,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
738 if (!audit_enabled && msg_type != AUDIT_USER_AVC) 738 if (!audit_enabled && msg_type != AUDIT_USER_AVC)
739 return 0; 739 return 0;
740 740
741 err = audit_filter_user(&NETLINK_CB(skb), msg_type); 741 err = audit_filter_user(&NETLINK_CB(skb));
742 if (err == 1) { 742 if (err == 1) {
743 err = 0; 743 err = 0;
744 if (msg_type == AUDIT_USER_TTY) { 744 if (msg_type == AUDIT_USER_TTY) {
@@ -779,7 +779,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
779 } 779 }
780 /* fallthrough */ 780 /* fallthrough */
781 case AUDIT_LIST: 781 case AUDIT_LIST:
782 err = audit_receive_filter(nlh->nlmsg_type, NETLINK_CB(skb).pid, 782 err = audit_receive_filter(msg_type, NETLINK_CB(skb).pid,
783 uid, seq, data, nlmsg_len(nlh), 783 uid, seq, data, nlmsg_len(nlh),
784 loginuid, sessionid, sid); 784 loginuid, sessionid, sid);
785 break; 785 break;
@@ -798,7 +798,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
798 } 798 }
799 /* fallthrough */ 799 /* fallthrough */
800 case AUDIT_LIST_RULES: 800 case AUDIT_LIST_RULES:
801 err = audit_receive_filter(nlh->nlmsg_type, NETLINK_CB(skb).pid, 801 err = audit_receive_filter(msg_type, NETLINK_CB(skb).pid,
802 uid, seq, data, nlmsg_len(nlh), 802 uid, seq, data, nlmsg_len(nlh),
803 loginuid, sessionid, sid); 803 loginuid, sessionid, sid);
804 break; 804 break;
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
index 0e0bd27e6512..98c50cc671bb 100644
--- a/kernel/auditfilter.c
+++ b/kernel/auditfilter.c
@@ -1544,6 +1544,7 @@ static void audit_log_rule_change(uid_t loginuid, u32 sessionid, u32 sid,
1544 * @data: payload data 1544 * @data: payload data
1545 * @datasz: size of payload data 1545 * @datasz: size of payload data
1546 * @loginuid: loginuid of sender 1546 * @loginuid: loginuid of sender
1547 * @sessionid: sessionid for netlink audit message
1547 * @sid: SE Linux Security ID of sender 1548 * @sid: SE Linux Security ID of sender
1548 */ 1549 */
1549int audit_receive_filter(int type, int pid, int uid, int seq, void *data, 1550int audit_receive_filter(int type, int pid, int uid, int seq, void *data,
@@ -1720,7 +1721,7 @@ static int audit_filter_user_rules(struct netlink_skb_parms *cb,
1720 return 1; 1721 return 1;
1721} 1722}
1722 1723
1723int audit_filter_user(struct netlink_skb_parms *cb, int type) 1724int audit_filter_user(struct netlink_skb_parms *cb)
1724{ 1725{
1725 enum audit_state state = AUDIT_DISABLED; 1726 enum audit_state state = AUDIT_DISABLED;
1726 struct audit_entry *e; 1727 struct audit_entry *e;
diff --git a/kernel/capability.c b/kernel/capability.c
index 39e8193b41ea..901e0fdc3fff 100644
--- a/kernel/capability.c
+++ b/kernel/capability.c
@@ -53,11 +53,95 @@ static void warn_legacy_capability_use(void)
53} 53}
54 54
55/* 55/*
56 * Version 2 capabilities worked fine, but the linux/capability.h file
57 * that accompanied their introduction encouraged their use without
58 * the necessary user-space source code changes. As such, we have
59 * created a version 3 with equivalent functionality to version 2, but
60 * with a header change to protect legacy source code from using
61 * version 2 when it wanted to use version 1. If your system has code
62 * that trips the following warning, it is using version 2 specific
63 * capabilities and may be doing so insecurely.
64 *
65 * The remedy is to either upgrade your version of libcap (to 2.10+,
66 * if the application is linked against it), or recompile your
67 * application with modern kernel headers and this warning will go
68 * away.
69 */
70
71static void warn_deprecated_v2(void)
72{
73 static int warned;
74
75 if (!warned) {
76 char name[sizeof(current->comm)];
77
78 printk(KERN_INFO "warning: `%s' uses deprecated v2"
79 " capabilities in a way that may be insecure.\n",
80 get_task_comm(name, current));
81 warned = 1;
82 }
83}
84
85/*
86 * Version check. Return the number of u32s in each capability flag
87 * array, or a negative value on error.
88 */
89static int cap_validate_magic(cap_user_header_t header, unsigned *tocopy)
90{
91 __u32 version;
92
93 if (get_user(version, &header->version))
94 return -EFAULT;
95
96 switch (version) {
97 case _LINUX_CAPABILITY_VERSION_1:
98 warn_legacy_capability_use();
99 *tocopy = _LINUX_CAPABILITY_U32S_1;
100 break;
101 case _LINUX_CAPABILITY_VERSION_2:
102 warn_deprecated_v2();
103 /*
104 * fall through - v3 is otherwise equivalent to v2.
105 */
106 case _LINUX_CAPABILITY_VERSION_3:
107 *tocopy = _LINUX_CAPABILITY_U32S_3;
108 break;
109 default:
110 if (put_user((u32)_KERNEL_CAPABILITY_VERSION, &header->version))
111 return -EFAULT;
112 return -EINVAL;
113 }
114
115 return 0;
116}
117
118/*
56 * For sys_getproccap() and sys_setproccap(), any of the three 119 * For sys_getproccap() and sys_setproccap(), any of the three
57 * capability set pointers may be NULL -- indicating that that set is 120 * capability set pointers may be NULL -- indicating that that set is
58 * uninteresting and/or not to be changed. 121 * uninteresting and/or not to be changed.
59 */ 122 */
60 123
124/*
125 * Atomically modify the effective capabilities returning the original
126 * value. No permission check is performed here - it is assumed that the
127 * caller is permitted to set the desired effective capabilities.
128 */
129kernel_cap_t cap_set_effective(const kernel_cap_t pE_new)
130{
131 kernel_cap_t pE_old;
132
133 spin_lock(&task_capability_lock);
134
135 pE_old = current->cap_effective;
136 current->cap_effective = pE_new;
137
138 spin_unlock(&task_capability_lock);
139
140 return pE_old;
141}
142
143EXPORT_SYMBOL(cap_set_effective);
144
61/** 145/**
62 * sys_capget - get the capabilities of a given process. 146 * sys_capget - get the capabilities of a given process.
63 * @header: pointer to struct that contains capability version and 147 * @header: pointer to struct that contains capability version and
@@ -71,27 +155,13 @@ asmlinkage long sys_capget(cap_user_header_t header, cap_user_data_t dataptr)
71{ 155{
72 int ret = 0; 156 int ret = 0;
73 pid_t pid; 157 pid_t pid;
74 __u32 version;
75 struct task_struct *target; 158 struct task_struct *target;
76 unsigned tocopy; 159 unsigned tocopy;
77 kernel_cap_t pE, pI, pP; 160 kernel_cap_t pE, pI, pP;
78 161
79 if (get_user(version, &header->version)) 162 ret = cap_validate_magic(header, &tocopy);
80 return -EFAULT; 163 if (ret != 0)
81 164 return ret;
82 switch (version) {
83 case _LINUX_CAPABILITY_VERSION_1:
84 warn_legacy_capability_use();
85 tocopy = _LINUX_CAPABILITY_U32S_1;
86 break;
87 case _LINUX_CAPABILITY_VERSION_2:
88 tocopy = _LINUX_CAPABILITY_U32S_2;
89 break;
90 default:
91 if (put_user(_LINUX_CAPABILITY_VERSION, &header->version))
92 return -EFAULT;
93 return -EINVAL;
94 }
95 165
96 if (get_user(pid, &header->pid)) 166 if (get_user(pid, &header->pid))
97 return -EFAULT; 167 return -EFAULT;
@@ -118,7 +188,7 @@ out:
118 spin_unlock(&task_capability_lock); 188 spin_unlock(&task_capability_lock);
119 189
120 if (!ret) { 190 if (!ret) {
121 struct __user_cap_data_struct kdata[_LINUX_CAPABILITY_U32S]; 191 struct __user_cap_data_struct kdata[_KERNEL_CAPABILITY_U32S];
122 unsigned i; 192 unsigned i;
123 193
124 for (i = 0; i < tocopy; i++) { 194 for (i = 0; i < tocopy; i++) {
@@ -128,7 +198,7 @@ out:
128 } 198 }
129 199
130 /* 200 /*
131 * Note, in the case, tocopy < _LINUX_CAPABILITY_U32S, 201 * Note, in the case, tocopy < _KERNEL_CAPABILITY_U32S,
132 * we silently drop the upper capabilities here. This 202 * we silently drop the upper capabilities here. This
133 * has the effect of making older libcap 203 * has the effect of making older libcap
134 * implementations implicitly drop upper capability 204 * implementations implicitly drop upper capability
@@ -240,30 +310,16 @@ static inline int cap_set_all(kernel_cap_t *effective,
240 */ 310 */
241asmlinkage long sys_capset(cap_user_header_t header, const cap_user_data_t data) 311asmlinkage long sys_capset(cap_user_header_t header, const cap_user_data_t data)
242{ 312{
243 struct __user_cap_data_struct kdata[_LINUX_CAPABILITY_U32S]; 313 struct __user_cap_data_struct kdata[_KERNEL_CAPABILITY_U32S];
244 unsigned i, tocopy; 314 unsigned i, tocopy;
245 kernel_cap_t inheritable, permitted, effective; 315 kernel_cap_t inheritable, permitted, effective;
246 __u32 version;
247 struct task_struct *target; 316 struct task_struct *target;
248 int ret; 317 int ret;
249 pid_t pid; 318 pid_t pid;
250 319
251 if (get_user(version, &header->version)) 320 ret = cap_validate_magic(header, &tocopy);
252 return -EFAULT; 321 if (ret != 0)
253 322 return ret;
254 switch (version) {
255 case _LINUX_CAPABILITY_VERSION_1:
256 warn_legacy_capability_use();
257 tocopy = _LINUX_CAPABILITY_U32S_1;
258 break;
259 case _LINUX_CAPABILITY_VERSION_2:
260 tocopy = _LINUX_CAPABILITY_U32S_2;
261 break;
262 default:
263 if (put_user(_LINUX_CAPABILITY_VERSION, &header->version))
264 return -EFAULT;
265 return -EINVAL;
266 }
267 323
268 if (get_user(pid, &header->pid)) 324 if (get_user(pid, &header->pid))
269 return -EFAULT; 325 return -EFAULT;
@@ -281,7 +337,7 @@ asmlinkage long sys_capset(cap_user_header_t header, const cap_user_data_t data)
281 permitted.cap[i] = kdata[i].permitted; 337 permitted.cap[i] = kdata[i].permitted;
282 inheritable.cap[i] = kdata[i].inheritable; 338 inheritable.cap[i] = kdata[i].inheritable;
283 } 339 }
284 while (i < _LINUX_CAPABILITY_U32S) { 340 while (i < _KERNEL_CAPABILITY_U32S) {
285 effective.cap[i] = 0; 341 effective.cap[i] = 0;
286 permitted.cap[i] = 0; 342 permitted.cap[i] = 0;
287 inheritable.cap[i] = 0; 343 inheritable.cap[i] = 0;
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index fbc6fc8949b4..15ac0e1e4f4d 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -2903,7 +2903,7 @@ int cgroup_clone(struct task_struct *tsk, struct cgroup_subsys *subsys)
2903 cg = tsk->cgroups; 2903 cg = tsk->cgroups;
2904 parent = task_cgroup(tsk, subsys->subsys_id); 2904 parent = task_cgroup(tsk, subsys->subsys_id);
2905 2905
2906 snprintf(nodename, MAX_CGROUP_TYPE_NAMELEN, "node_%d", tsk->pid); 2906 snprintf(nodename, MAX_CGROUP_TYPE_NAMELEN, "%d", tsk->pid);
2907 2907
2908 /* Pin the hierarchy */ 2908 /* Pin the hierarchy */
2909 atomic_inc(&parent->root->sb->s_active); 2909 atomic_inc(&parent->root->sb->s_active);
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 86ea9e34e326..9fceb97e989c 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -797,8 +797,10 @@ static int update_cpumask(struct cpuset *cs, char *buf)
797 retval = cpulist_parse(buf, trialcs.cpus_allowed); 797 retval = cpulist_parse(buf, trialcs.cpus_allowed);
798 if (retval < 0) 798 if (retval < 0)
799 return retval; 799 return retval;
800
801 if (!cpus_subset(trialcs.cpus_allowed, cpu_online_map))
802 return -EINVAL;
800 } 803 }
801 cpus_and(trialcs.cpus_allowed, trialcs.cpus_allowed, cpu_online_map);
802 retval = validate_change(cs, &trialcs); 804 retval = validate_change(cs, &trialcs);
803 if (retval < 0) 805 if (retval < 0)
804 return retval; 806 return retval;
@@ -932,9 +934,11 @@ static int update_nodemask(struct cpuset *cs, char *buf)
932 retval = nodelist_parse(buf, trialcs.mems_allowed); 934 retval = nodelist_parse(buf, trialcs.mems_allowed);
933 if (retval < 0) 935 if (retval < 0)
934 goto done; 936 goto done;
937
938 if (!nodes_subset(trialcs.mems_allowed,
939 node_states[N_HIGH_MEMORY]))
940 return -EINVAL;
935 } 941 }
936 nodes_and(trialcs.mems_allowed, trialcs.mems_allowed,
937 node_states[N_HIGH_MEMORY]);
938 oldmem = cs->mems_allowed; 942 oldmem = cs->mems_allowed;
939 if (nodes_equal(oldmem, trialcs.mems_allowed)) { 943 if (nodes_equal(oldmem, trialcs.mems_allowed)) {
940 retval = 0; /* Too easy - nothing to do */ 944 retval = 0; /* Too easy - nothing to do */
@@ -1033,8 +1037,8 @@ int current_cpuset_is_being_rebound(void)
1033 1037
1034static int update_relax_domain_level(struct cpuset *cs, s64 val) 1038static int update_relax_domain_level(struct cpuset *cs, s64 val)
1035{ 1039{
1036 if ((int)val < 0) 1040 if (val < -1 || val >= SD_LV_MAX)
1037 val = -1; 1041 return -EINVAL;
1038 1042
1039 if (val != cs->relax_domain_level) { 1043 if (val != cs->relax_domain_level) {
1040 cs->relax_domain_level = val; 1044 cs->relax_domain_level = val;
@@ -1886,6 +1890,12 @@ static void common_cpu_mem_hotplug_unplug(void)
1886 top_cpuset.mems_allowed = node_states[N_HIGH_MEMORY]; 1890 top_cpuset.mems_allowed = node_states[N_HIGH_MEMORY];
1887 scan_for_empty_cpusets(&top_cpuset); 1891 scan_for_empty_cpusets(&top_cpuset);
1888 1892
1893 /*
1894 * Scheduler destroys domains on hotplug events.
1895 * Rebuild them based on the current settings.
1896 */
1897 rebuild_sched_domains();
1898
1889 cgroup_unlock(); 1899 cgroup_unlock();
1890} 1900}
1891 1901
diff --git a/kernel/exit.c b/kernel/exit.c
index 1510f78a0ffa..8f6185e69b69 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -126,6 +126,12 @@ static void __exit_signal(struct task_struct *tsk)
126 126
127 __unhash_process(tsk); 127 __unhash_process(tsk);
128 128
129 /*
130 * Do this under ->siglock, we can race with another thread
131 * doing sigqueue_free() if we have SIGQUEUE_PREALLOC signals.
132 */
133 flush_sigqueue(&tsk->pending);
134
129 tsk->signal = NULL; 135 tsk->signal = NULL;
130 tsk->sighand = NULL; 136 tsk->sighand = NULL;
131 spin_unlock(&sighand->siglock); 137 spin_unlock(&sighand->siglock);
@@ -133,7 +139,6 @@ static void __exit_signal(struct task_struct *tsk)
133 139
134 __cleanup_sighand(sighand); 140 __cleanup_sighand(sighand);
135 clear_tsk_thread_flag(tsk,TIF_SIGPENDING); 141 clear_tsk_thread_flag(tsk,TIF_SIGPENDING);
136 flush_sigqueue(&tsk->pending);
137 if (sig) { 142 if (sig) {
138 flush_sigqueue(&sig->shared_pending); 143 flush_sigqueue(&sig->shared_pending);
139 taskstats_tgid_free(sig); 144 taskstats_tgid_free(sig);
diff --git a/kernel/futex.c b/kernel/futex.c
index 449def8074fe..7d1136e97c14 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -1096,21 +1096,64 @@ static void unqueue_me_pi(struct futex_q *q)
1096 * private futexes. 1096 * private futexes.
1097 */ 1097 */
1098static int fixup_pi_state_owner(u32 __user *uaddr, struct futex_q *q, 1098static int fixup_pi_state_owner(u32 __user *uaddr, struct futex_q *q,
1099 struct task_struct *newowner) 1099 struct task_struct *newowner,
1100 struct rw_semaphore *fshared)
1100{ 1101{
1101 u32 newtid = task_pid_vnr(newowner) | FUTEX_WAITERS; 1102 u32 newtid = task_pid_vnr(newowner) | FUTEX_WAITERS;
1102 struct futex_pi_state *pi_state = q->pi_state; 1103 struct futex_pi_state *pi_state = q->pi_state;
1104 struct task_struct *oldowner = pi_state->owner;
1103 u32 uval, curval, newval; 1105 u32 uval, curval, newval;
1104 int ret; 1106 int ret, attempt = 0;
1105 1107
1106 /* Owner died? */ 1108 /* Owner died? */
1109 if (!pi_state->owner)
1110 newtid |= FUTEX_OWNER_DIED;
1111
1112 /*
1113 * We are here either because we stole the rtmutex from the
1114 * pending owner or we are the pending owner which failed to
1115 * get the rtmutex. We have to replace the pending owner TID
1116 * in the user space variable. This must be atomic as we have
1117 * to preserve the owner died bit here.
1118 *
1119 * Note: We write the user space value _before_ changing the
1120 * pi_state because we can fault here. Imagine swapped out
1121 * pages or a fork, which was running right before we acquired
1122 * mmap_sem, that marked all the anonymous memory readonly for
1123 * cow.
1124 *
1125 * Modifying pi_state _before_ the user space value would
1126 * leave the pi_state in an inconsistent state when we fault
1127 * here, because we need to drop the hash bucket lock to
1128 * handle the fault. This might be observed in the PID check
1129 * in lookup_pi_state.
1130 */
1131retry:
1132 if (get_futex_value_locked(&uval, uaddr))
1133 goto handle_fault;
1134
1135 while (1) {
1136 newval = (uval & FUTEX_OWNER_DIED) | newtid;
1137
1138 curval = cmpxchg_futex_value_locked(uaddr, uval, newval);
1139
1140 if (curval == -EFAULT)
1141 goto handle_fault;
1142 if (curval == uval)
1143 break;
1144 uval = curval;
1145 }
1146
1147 /*
1148 * We fixed up user space. Now we need to fix the pi_state
1149 * itself.
1150 */
1107 if (pi_state->owner != NULL) { 1151 if (pi_state->owner != NULL) {
1108 spin_lock_irq(&pi_state->owner->pi_lock); 1152 spin_lock_irq(&pi_state->owner->pi_lock);
1109 WARN_ON(list_empty(&pi_state->list)); 1153 WARN_ON(list_empty(&pi_state->list));
1110 list_del_init(&pi_state->list); 1154 list_del_init(&pi_state->list);
1111 spin_unlock_irq(&pi_state->owner->pi_lock); 1155 spin_unlock_irq(&pi_state->owner->pi_lock);
1112 } else 1156 }
1113 newtid |= FUTEX_OWNER_DIED;
1114 1157
1115 pi_state->owner = newowner; 1158 pi_state->owner = newowner;
1116 1159
@@ -1118,26 +1161,35 @@ static int fixup_pi_state_owner(u32 __user *uaddr, struct futex_q *q,
1118 WARN_ON(!list_empty(&pi_state->list)); 1161 WARN_ON(!list_empty(&pi_state->list));
1119 list_add(&pi_state->list, &newowner->pi_state_list); 1162 list_add(&pi_state->list, &newowner->pi_state_list);
1120 spin_unlock_irq(&newowner->pi_lock); 1163 spin_unlock_irq(&newowner->pi_lock);
1164 return 0;
1121 1165
1122 /* 1166 /*
1123 * We own it, so we have to replace the pending owner 1167 * To handle the page fault we need to drop the hash bucket
1124 * TID. This must be atomic as we have preserve the 1168 * lock here. That gives the other task (either the pending
1125 * owner died bit here. 1169 * owner itself or the task which stole the rtmutex) the
1170 * chance to try the fixup of the pi_state. So once we are
1171 * back from handling the fault we need to check the pi_state
1172 * after reacquiring the hash bucket lock and before trying to
1173 * do another fixup. When the fixup has been done already we
1174 * simply return.
1126 */ 1175 */
1127 ret = get_futex_value_locked(&uval, uaddr); 1176handle_fault:
1177 spin_unlock(q->lock_ptr);
1128 1178
1129 while (!ret) { 1179 ret = futex_handle_fault((unsigned long)uaddr, fshared, attempt++);
1130 newval = (uval & FUTEX_OWNER_DIED) | newtid;
1131 1180
1132 curval = cmpxchg_futex_value_locked(uaddr, uval, newval); 1181 spin_lock(q->lock_ptr);
1133 1182
1134 if (curval == -EFAULT) 1183 /*
1135 ret = -EFAULT; 1184 * Check if someone else fixed it for us:
1136 if (curval == uval) 1185 */
1137 break; 1186 if (pi_state->owner != oldowner)
1138 uval = curval; 1187 return 0;
1139 } 1188
1140 return ret; 1189 if (ret)
1190 return ret;
1191
1192 goto retry;
1141} 1193}
1142 1194
1143/* 1195/*
@@ -1507,7 +1559,7 @@ static int futex_lock_pi(u32 __user *uaddr, struct rw_semaphore *fshared,
1507 * that case: 1559 * that case:
1508 */ 1560 */
1509 if (q.pi_state->owner != curr) 1561 if (q.pi_state->owner != curr)
1510 ret = fixup_pi_state_owner(uaddr, &q, curr); 1562 ret = fixup_pi_state_owner(uaddr, &q, curr, fshared);
1511 } else { 1563 } else {
1512 /* 1564 /*
1513 * Catch the rare case, where the lock was released 1565 * Catch the rare case, where the lock was released
@@ -1539,7 +1591,8 @@ static int futex_lock_pi(u32 __user *uaddr, struct rw_semaphore *fshared,
1539 int res; 1591 int res;
1540 1592
1541 owner = rt_mutex_owner(&q.pi_state->pi_mutex); 1593 owner = rt_mutex_owner(&q.pi_state->pi_mutex);
1542 res = fixup_pi_state_owner(uaddr, &q, owner); 1594 res = fixup_pi_state_owner(uaddr, &q, owner,
1595 fshared);
1543 1596
1544 /* propagate -EFAULT, if the fixup failed */ 1597 /* propagate -EFAULT, if the fixup failed */
1545 if (res) 1598 if (res)
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index 421be5fe5cc7..ab80515008f4 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -1003,10 +1003,18 @@ hrtimer_start(struct hrtimer *timer, ktime_t tim, const enum hrtimer_mode mode)
1003 */ 1003 */
1004 raise = timer->state == HRTIMER_STATE_PENDING; 1004 raise = timer->state == HRTIMER_STATE_PENDING;
1005 1005
1006 /*
1007 * We use preempt_disable to prevent this task from migrating after
1008 * setting up the softirq and raising it. Otherwise, if me migrate
1009 * we will raise the softirq on the wrong CPU.
1010 */
1011 preempt_disable();
1012
1006 unlock_hrtimer_base(timer, &flags); 1013 unlock_hrtimer_base(timer, &flags);
1007 1014
1008 if (raise) 1015 if (raise)
1009 hrtimer_raise_softirq(); 1016 hrtimer_raise_softirq();
1017 preempt_enable();
1010 1018
1011 return ret; 1019 return ret;
1012} 1020}
diff --git a/kernel/kgdb.c b/kernel/kgdb.c
index 14787de568b3..3ec23c3ec97f 100644
--- a/kernel/kgdb.c
+++ b/kernel/kgdb.c
@@ -52,6 +52,7 @@
52#include <asm/byteorder.h> 52#include <asm/byteorder.h>
53#include <asm/atomic.h> 53#include <asm/atomic.h>
54#include <asm/system.h> 54#include <asm/system.h>
55#include <asm/unaligned.h>
55 56
56static int kgdb_break_asap; 57static int kgdb_break_asap;
57 58
@@ -227,8 +228,6 @@ void __weak kgdb_disable_hw_debug(struct pt_regs *regs)
227 * GDB remote protocol parser: 228 * GDB remote protocol parser:
228 */ 229 */
229 230
230static const char hexchars[] = "0123456789abcdef";
231
232static int hex(char ch) 231static int hex(char ch)
233{ 232{
234 if ((ch >= 'a') && (ch <= 'f')) 233 if ((ch >= 'a') && (ch <= 'f'))
@@ -316,8 +315,8 @@ static void put_packet(char *buffer)
316 } 315 }
317 316
318 kgdb_io_ops->write_char('#'); 317 kgdb_io_ops->write_char('#');
319 kgdb_io_ops->write_char(hexchars[checksum >> 4]); 318 kgdb_io_ops->write_char(hex_asc_hi(checksum));
320 kgdb_io_ops->write_char(hexchars[checksum & 0xf]); 319 kgdb_io_ops->write_char(hex_asc_lo(checksum));
321 if (kgdb_io_ops->flush) 320 if (kgdb_io_ops->flush)
322 kgdb_io_ops->flush(); 321 kgdb_io_ops->flush();
323 322
@@ -478,8 +477,8 @@ static void error_packet(char *pkt, int error)
478{ 477{
479 error = -error; 478 error = -error;
480 pkt[0] = 'E'; 479 pkt[0] = 'E';
481 pkt[1] = hexchars[(error / 10)]; 480 pkt[1] = hex_asc[(error / 10)];
482 pkt[2] = hexchars[(error % 10)]; 481 pkt[2] = hex_asc[(error % 10)];
483 pkt[3] = '\0'; 482 pkt[3] = '\0';
484} 483}
485 484
@@ -510,10 +509,7 @@ static void int_to_threadref(unsigned char *id, int value)
510 scan = (unsigned char *)id; 509 scan = (unsigned char *)id;
511 while (i--) 510 while (i--)
512 *scan++ = 0; 511 *scan++ = 0;
513 *scan++ = (value >> 24) & 0xff; 512 put_unaligned_be32(value, scan);
514 *scan++ = (value >> 16) & 0xff;
515 *scan++ = (value >> 8) & 0xff;
516 *scan++ = (value & 0xff);
517} 513}
518 514
519static struct task_struct *getthread(struct pt_regs *regs, int tid) 515static struct task_struct *getthread(struct pt_regs *regs, int tid)
@@ -1503,7 +1499,8 @@ int kgdb_nmicallback(int cpu, void *regs)
1503 return 1; 1499 return 1;
1504} 1500}
1505 1501
1506void kgdb_console_write(struct console *co, const char *s, unsigned count) 1502static void kgdb_console_write(struct console *co, const char *s,
1503 unsigned count)
1507{ 1504{
1508 unsigned long flags; 1505 unsigned long flags;
1509 1506
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 1e0250cb9486..d4998f81e229 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -699,8 +699,9 @@ static int __register_kprobes(struct kprobe **kps, int num,
699 return -EINVAL; 699 return -EINVAL;
700 for (i = 0; i < num; i++) { 700 for (i = 0; i < num; i++) {
701 ret = __register_kprobe(kps[i], called_from); 701 ret = __register_kprobe(kps[i], called_from);
702 if (ret < 0 && i > 0) { 702 if (ret < 0) {
703 unregister_kprobes(kps, i); 703 if (i > 0)
704 unregister_kprobes(kps, i);
704 break; 705 break;
705 } 706 }
706 } 707 }
@@ -776,8 +777,9 @@ static int __register_jprobes(struct jprobe **jps, int num,
776 jp->kp.break_handler = longjmp_break_handler; 777 jp->kp.break_handler = longjmp_break_handler;
777 ret = __register_kprobe(&jp->kp, called_from); 778 ret = __register_kprobe(&jp->kp, called_from);
778 } 779 }
779 if (ret < 0 && i > 0) { 780 if (ret < 0) {
780 unregister_jprobes(jps, i); 781 if (i > 0)
782 unregister_jprobes(jps, i);
781 break; 783 break;
782 } 784 }
783 } 785 }
@@ -920,8 +922,9 @@ static int __register_kretprobes(struct kretprobe **rps, int num,
920 return -EINVAL; 922 return -EINVAL;
921 for (i = 0; i < num; i++) { 923 for (i = 0; i < num; i++) {
922 ret = __register_kretprobe(rps[i], called_from); 924 ret = __register_kretprobe(rps[i], called_from);
923 if (ret < 0 && i > 0) { 925 if (ret < 0) {
924 unregister_kretprobes(rps, i); 926 if (i > 0)
927 unregister_kretprobes(rps, i);
925 break; 928 break;
926 } 929 }
927 } 930 }
diff --git a/kernel/module.c b/kernel/module.c
index f5e9491ef7ac..5f80478b746d 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1337,7 +1337,19 @@ out_unreg:
1337 kobject_put(&mod->mkobj.kobj); 1337 kobject_put(&mod->mkobj.kobj);
1338 return err; 1338 return err;
1339} 1339}
1340#endif 1340
1341static void mod_sysfs_fini(struct module *mod)
1342{
1343 kobject_put(&mod->mkobj.kobj);
1344}
1345
1346#else /* CONFIG_SYSFS */
1347
1348static void mod_sysfs_fini(struct module *mod)
1349{
1350}
1351
1352#endif /* CONFIG_SYSFS */
1341 1353
1342static void mod_kobject_remove(struct module *mod) 1354static void mod_kobject_remove(struct module *mod)
1343{ 1355{
@@ -1345,7 +1357,7 @@ static void mod_kobject_remove(struct module *mod)
1345 module_param_sysfs_remove(mod); 1357 module_param_sysfs_remove(mod);
1346 kobject_put(mod->mkobj.drivers_dir); 1358 kobject_put(mod->mkobj.drivers_dir);
1347 kobject_put(mod->holders_dir); 1359 kobject_put(mod->holders_dir);
1348 kobject_put(&mod->mkobj.kobj); 1360 mod_sysfs_fini(mod);
1349} 1361}
1350 1362
1351/* 1363/*
@@ -1780,7 +1792,7 @@ static struct module *load_module(void __user *umod,
1780 1792
1781 /* Sanity checks against insmoding binaries or wrong arch, 1793 /* Sanity checks against insmoding binaries or wrong arch,
1782 weird elf version */ 1794 weird elf version */
1783 if (memcmp(hdr->e_ident, ELFMAG, 4) != 0 1795 if (memcmp(hdr->e_ident, ELFMAG, SELFMAG) != 0
1784 || hdr->e_type != ET_REL 1796 || hdr->e_type != ET_REL
1785 || !elf_check_arch(hdr) 1797 || !elf_check_arch(hdr)
1786 || hdr->e_shentsize != sizeof(*sechdrs)) { 1798 || hdr->e_shentsize != sizeof(*sechdrs)) {
diff --git a/kernel/printk.c b/kernel/printk.c
index 8fb01c32aa3b..028ed75d4864 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -121,6 +121,8 @@ struct console_cmdline
121static struct console_cmdline console_cmdline[MAX_CMDLINECONSOLES]; 121static struct console_cmdline console_cmdline[MAX_CMDLINECONSOLES];
122static int selected_console = -1; 122static int selected_console = -1;
123static int preferred_console = -1; 123static int preferred_console = -1;
124int console_set_on_cmdline;
125EXPORT_SYMBOL(console_set_on_cmdline);
124 126
125/* Flag: console code may call schedule() */ 127/* Flag: console code may call schedule() */
126static int console_may_schedule; 128static int console_may_schedule;
@@ -890,6 +892,7 @@ static int __init console_setup(char *str)
890 *s = 0; 892 *s = 0;
891 893
892 __add_preferred_console(buf, idx, options, brl_options); 894 __add_preferred_console(buf, idx, options, brl_options);
895 console_set_on_cmdline = 1;
893 return 1; 896 return 1;
894} 897}
895__setup("console=", console_setup); 898__setup("console=", console_setup);
diff --git a/kernel/rcuclassic.c b/kernel/rcuclassic.c
index f4ffbd0f306f..a38895a5b8e2 100644
--- a/kernel/rcuclassic.c
+++ b/kernel/rcuclassic.c
@@ -89,8 +89,22 @@ static void force_quiescent_state(struct rcu_data *rdp,
89 /* 89 /*
90 * Don't send IPI to itself. With irqs disabled, 90 * Don't send IPI to itself. With irqs disabled,
91 * rdp->cpu is the current cpu. 91 * rdp->cpu is the current cpu.
92 *
93 * cpu_online_map is updated by the _cpu_down()
94 * using stop_machine_run(). Since we're in irqs disabled
95 * section, stop_machine_run() is not exectuting, hence
96 * the cpu_online_map is stable.
97 *
98 * However, a cpu might have been offlined _just_ before
99 * we disabled irqs while entering here.
100 * And rcu subsystem might not yet have handled the CPU_DEAD
101 * notification, leading to the offlined cpu's bit
102 * being set in the rcp->cpumask.
103 *
104 * Hence cpumask = (rcp->cpumask & cpu_online_map) to prevent
105 * sending smp_reschedule() to an offlined CPU.
92 */ 106 */
93 cpumask = rcp->cpumask; 107 cpus_and(cpumask, rcp->cpumask, cpu_online_map);
94 cpu_clear(rdp->cpu, cpumask); 108 cpu_clear(rdp->cpu, cpumask);
95 for_each_cpu_mask(cpu, cpumask) 109 for_each_cpu_mask(cpu, cpumask)
96 smp_send_reschedule(cpu); 110 smp_send_reschedule(cpu);
diff --git a/kernel/rcupreempt.c b/kernel/rcupreempt.c
index e1cdf196a515..5e02b7740702 100644
--- a/kernel/rcupreempt.c
+++ b/kernel/rcupreempt.c
@@ -217,8 +217,6 @@ long rcu_batches_completed(void)
217} 217}
218EXPORT_SYMBOL_GPL(rcu_batches_completed); 218EXPORT_SYMBOL_GPL(rcu_batches_completed);
219 219
220EXPORT_SYMBOL_GPL(rcu_batches_completed_bh);
221
222void __rcu_read_lock(void) 220void __rcu_read_lock(void)
223{ 221{
224 int idx; 222 int idx;
diff --git a/kernel/relay.c b/kernel/relay.c
index bc24dcdc570f..7de644cdec43 100644
--- a/kernel/relay.c
+++ b/kernel/relay.c
@@ -1191,7 +1191,7 @@ static ssize_t relay_file_splice_read(struct file *in,
1191 ret = 0; 1191 ret = 0;
1192 spliced = 0; 1192 spliced = 0;
1193 1193
1194 while (len) { 1194 while (len && !spliced) {
1195 ret = subbuf_splice_actor(in, ppos, pipe, len, flags, &nonpad_ret); 1195 ret = subbuf_splice_actor(in, ppos, pipe, len, flags, &nonpad_ret);
1196 if (ret < 0) 1196 if (ret < 0)
1197 break; 1197 break;
diff --git a/kernel/sched.c b/kernel/sched.c
index cfa222a91539..94ead43eda62 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -136,7 +136,7 @@ static inline void sg_inc_cpu_power(struct sched_group *sg, u32 val)
136 136
137static inline int rt_policy(int policy) 137static inline int rt_policy(int policy)
138{ 138{
139 if (unlikely(policy == SCHED_FIFO) || unlikely(policy == SCHED_RR)) 139 if (unlikely(policy == SCHED_FIFO || policy == SCHED_RR))
140 return 1; 140 return 1;
141 return 0; 141 return 0;
142} 142}
@@ -312,12 +312,15 @@ static DEFINE_SPINLOCK(task_group_lock);
312#endif 312#endif
313 313
314/* 314/*
315 * A weight of 0, 1 or ULONG_MAX can cause arithmetics problems. 315 * A weight of 0 or 1 can cause arithmetics problems.
316 * A weight of a cfs_rq is the sum of weights of which entities
317 * are queued on this cfs_rq, so a weight of a entity should not be
318 * too large, so as the shares value of a task group.
316 * (The default weight is 1024 - so there's no practical 319 * (The default weight is 1024 - so there's no practical
317 * limitation from this.) 320 * limitation from this.)
318 */ 321 */
319#define MIN_SHARES 2 322#define MIN_SHARES 2
320#define MAX_SHARES (ULONG_MAX - 1) 323#define MAX_SHARES (1UL << 18)
321 324
322static int init_task_group_load = INIT_TASK_GROUP_LOAD; 325static int init_task_group_load = INIT_TASK_GROUP_LOAD;
323#endif 326#endif
@@ -398,43 +401,6 @@ struct cfs_rq {
398 */ 401 */
399 struct list_head leaf_cfs_rq_list; 402 struct list_head leaf_cfs_rq_list;
400 struct task_group *tg; /* group that "owns" this runqueue */ 403 struct task_group *tg; /* group that "owns" this runqueue */
401
402#ifdef CONFIG_SMP
403 unsigned long task_weight;
404 unsigned long shares;
405 /*
406 * We need space to build a sched_domain wide view of the full task
407 * group tree, in order to avoid depending on dynamic memory allocation
408 * during the load balancing we place this in the per cpu task group
409 * hierarchy. This limits the load balancing to one instance per cpu,
410 * but more should not be needed anyway.
411 */
412 struct aggregate_struct {
413 /*
414 * load = weight(cpus) * f(tg)
415 *
416 * Where f(tg) is the recursive weight fraction assigned to
417 * this group.
418 */
419 unsigned long load;
420
421 /*
422 * part of the group weight distributed to this span.
423 */
424 unsigned long shares;
425
426 /*
427 * The sum of all runqueue weights within this span.
428 */
429 unsigned long rq_weight;
430
431 /*
432 * Weight contributed by tasks; this is the part we can
433 * influence by moving tasks around.
434 */
435 unsigned long task_weight;
436 } aggregate;
437#endif
438#endif 404#endif
439}; 405};
440 406
@@ -1161,6 +1127,7 @@ static enum hrtimer_restart hrtick(struct hrtimer *timer)
1161 return HRTIMER_NORESTART; 1127 return HRTIMER_NORESTART;
1162} 1128}
1163 1129
1130#ifdef CONFIG_SMP
1164static void hotplug_hrtick_disable(int cpu) 1131static void hotplug_hrtick_disable(int cpu)
1165{ 1132{
1166 struct rq *rq = cpu_rq(cpu); 1133 struct rq *rq = cpu_rq(cpu);
@@ -1216,6 +1183,7 @@ static void init_hrtick(void)
1216{ 1183{
1217 hotcpu_notifier(hotplug_hrtick, 0); 1184 hotcpu_notifier(hotplug_hrtick, 0);
1218} 1185}
1186#endif /* CONFIG_SMP */
1219 1187
1220static void init_rq_hrtick(struct rq *rq) 1188static void init_rq_hrtick(struct rq *rq)
1221{ 1189{
@@ -1368,17 +1336,19 @@ static void __resched_task(struct task_struct *p, int tif_bit)
1368 */ 1336 */
1369#define SRR(x, y) (((x) + (1UL << ((y) - 1))) >> (y)) 1337#define SRR(x, y) (((x) + (1UL << ((y) - 1))) >> (y))
1370 1338
1371/*
1372 * delta *= weight / lw
1373 */
1374static unsigned long 1339static unsigned long
1375calc_delta_mine(unsigned long delta_exec, unsigned long weight, 1340calc_delta_mine(unsigned long delta_exec, unsigned long weight,
1376 struct load_weight *lw) 1341 struct load_weight *lw)
1377{ 1342{
1378 u64 tmp; 1343 u64 tmp;
1379 1344
1380 if (!lw->inv_weight) 1345 if (!lw->inv_weight) {
1381 lw->inv_weight = 1 + (WMULT_CONST-lw->weight/2)/(lw->weight+1); 1346 if (BITS_PER_LONG > 32 && unlikely(lw->weight >= WMULT_CONST))
1347 lw->inv_weight = 1;
1348 else
1349 lw->inv_weight = 1 + (WMULT_CONST-lw->weight/2)
1350 / (lw->weight+1);
1351 }
1382 1352
1383 tmp = (u64)delta_exec * weight; 1353 tmp = (u64)delta_exec * weight;
1384 /* 1354 /*
@@ -1393,6 +1363,12 @@ calc_delta_mine(unsigned long delta_exec, unsigned long weight,
1393 return (unsigned long)min(tmp, (u64)(unsigned long)LONG_MAX); 1363 return (unsigned long)min(tmp, (u64)(unsigned long)LONG_MAX);
1394} 1364}
1395 1365
1366static inline unsigned long
1367calc_delta_fair(unsigned long delta_exec, struct load_weight *lw)
1368{
1369 return calc_delta_mine(delta_exec, NICE_0_LOAD, lw);
1370}
1371
1396static inline void update_load_add(struct load_weight *lw, unsigned long inc) 1372static inline void update_load_add(struct load_weight *lw, unsigned long inc)
1397{ 1373{
1398 lw->weight += inc; 1374 lw->weight += inc;
@@ -1505,326 +1481,6 @@ static unsigned long source_load(int cpu, int type);
1505static unsigned long target_load(int cpu, int type); 1481static unsigned long target_load(int cpu, int type);
1506static unsigned long cpu_avg_load_per_task(int cpu); 1482static unsigned long cpu_avg_load_per_task(int cpu);
1507static int task_hot(struct task_struct *p, u64 now, struct sched_domain *sd); 1483static int task_hot(struct task_struct *p, u64 now, struct sched_domain *sd);
1508
1509#ifdef CONFIG_FAIR_GROUP_SCHED
1510
1511/*
1512 * Group load balancing.
1513 *
1514 * We calculate a few balance domain wide aggregate numbers; load and weight.
1515 * Given the pictures below, and assuming each item has equal weight:
1516 *
1517 * root 1 - thread
1518 * / | \ A - group
1519 * A 1 B
1520 * /|\ / \
1521 * C 2 D 3 4
1522 * | |
1523 * 5 6
1524 *
1525 * load:
1526 * A and B get 1/3-rd of the total load. C and D get 1/3-rd of A's 1/3-rd,
1527 * which equals 1/9-th of the total load.
1528 *
1529 * shares:
1530 * The weight of this group on the selected cpus.
1531 *
1532 * rq_weight:
1533 * Direct sum of all the cpu's their rq weight, e.g. A would get 3 while
1534 * B would get 2.
1535 *
1536 * task_weight:
1537 * Part of the rq_weight contributed by tasks; all groups except B would
1538 * get 1, B gets 2.
1539 */
1540
1541static inline struct aggregate_struct *
1542aggregate(struct task_group *tg, struct sched_domain *sd)
1543{
1544 return &tg->cfs_rq[sd->first_cpu]->aggregate;
1545}
1546
1547typedef void (*aggregate_func)(struct task_group *, struct sched_domain *);
1548
1549/*
1550 * Iterate the full tree, calling @down when first entering a node and @up when
1551 * leaving it for the final time.
1552 */
1553static
1554void aggregate_walk_tree(aggregate_func down, aggregate_func up,
1555 struct sched_domain *sd)
1556{
1557 struct task_group *parent, *child;
1558
1559 rcu_read_lock();
1560 parent = &root_task_group;
1561down:
1562 (*down)(parent, sd);
1563 list_for_each_entry_rcu(child, &parent->children, siblings) {
1564 parent = child;
1565 goto down;
1566
1567up:
1568 continue;
1569 }
1570 (*up)(parent, sd);
1571
1572 child = parent;
1573 parent = parent->parent;
1574 if (parent)
1575 goto up;
1576 rcu_read_unlock();
1577}
1578
1579/*
1580 * Calculate the aggregate runqueue weight.
1581 */
1582static
1583void aggregate_group_weight(struct task_group *tg, struct sched_domain *sd)
1584{
1585 unsigned long rq_weight = 0;
1586 unsigned long task_weight = 0;
1587 int i;
1588
1589 for_each_cpu_mask(i, sd->span) {
1590 rq_weight += tg->cfs_rq[i]->load.weight;
1591 task_weight += tg->cfs_rq[i]->task_weight;
1592 }
1593
1594 aggregate(tg, sd)->rq_weight = rq_weight;
1595 aggregate(tg, sd)->task_weight = task_weight;
1596}
1597
1598/*
1599 * Compute the weight of this group on the given cpus.
1600 */
1601static
1602void aggregate_group_shares(struct task_group *tg, struct sched_domain *sd)
1603{
1604 unsigned long shares = 0;
1605 int i;
1606
1607 for_each_cpu_mask(i, sd->span)
1608 shares += tg->cfs_rq[i]->shares;
1609
1610 if ((!shares && aggregate(tg, sd)->rq_weight) || shares > tg->shares)
1611 shares = tg->shares;
1612
1613 aggregate(tg, sd)->shares = shares;
1614}
1615
1616/*
1617 * Compute the load fraction assigned to this group, relies on the aggregate
1618 * weight and this group's parent's load, i.e. top-down.
1619 */
1620static
1621void aggregate_group_load(struct task_group *tg, struct sched_domain *sd)
1622{
1623 unsigned long load;
1624
1625 if (!tg->parent) {
1626 int i;
1627
1628 load = 0;
1629 for_each_cpu_mask(i, sd->span)
1630 load += cpu_rq(i)->load.weight;
1631
1632 } else {
1633 load = aggregate(tg->parent, sd)->load;
1634
1635 /*
1636 * shares is our weight in the parent's rq so
1637 * shares/parent->rq_weight gives our fraction of the load
1638 */
1639 load *= aggregate(tg, sd)->shares;
1640 load /= aggregate(tg->parent, sd)->rq_weight + 1;
1641 }
1642
1643 aggregate(tg, sd)->load = load;
1644}
1645
1646static void __set_se_shares(struct sched_entity *se, unsigned long shares);
1647
1648/*
1649 * Calculate and set the cpu's group shares.
1650 */
1651static void
1652__update_group_shares_cpu(struct task_group *tg, struct sched_domain *sd,
1653 int tcpu)
1654{
1655 int boost = 0;
1656 unsigned long shares;
1657 unsigned long rq_weight;
1658
1659 if (!tg->se[tcpu])
1660 return;
1661
1662 rq_weight = tg->cfs_rq[tcpu]->load.weight;
1663
1664 /*
1665 * If there are currently no tasks on the cpu pretend there is one of
1666 * average load so that when a new task gets to run here it will not
1667 * get delayed by group starvation.
1668 */
1669 if (!rq_weight) {
1670 boost = 1;
1671 rq_weight = NICE_0_LOAD;
1672 }
1673
1674 /*
1675 * \Sum shares * rq_weight
1676 * shares = -----------------------
1677 * \Sum rq_weight
1678 *
1679 */
1680 shares = aggregate(tg, sd)->shares * rq_weight;
1681 shares /= aggregate(tg, sd)->rq_weight + 1;
1682
1683 /*
1684 * record the actual number of shares, not the boosted amount.
1685 */
1686 tg->cfs_rq[tcpu]->shares = boost ? 0 : shares;
1687
1688 if (shares < MIN_SHARES)
1689 shares = MIN_SHARES;
1690 else if (shares > MAX_SHARES)
1691 shares = MAX_SHARES;
1692
1693 __set_se_shares(tg->se[tcpu], shares);
1694}
1695
1696/*
1697 * Re-adjust the weights on the cpu the task came from and on the cpu the
1698 * task went to.
1699 */
1700static void
1701__move_group_shares(struct task_group *tg, struct sched_domain *sd,
1702 int scpu, int dcpu)
1703{
1704 unsigned long shares;
1705
1706 shares = tg->cfs_rq[scpu]->shares + tg->cfs_rq[dcpu]->shares;
1707
1708 __update_group_shares_cpu(tg, sd, scpu);
1709 __update_group_shares_cpu(tg, sd, dcpu);
1710
1711 /*
1712 * ensure we never loose shares due to rounding errors in the
1713 * above redistribution.
1714 */
1715 shares -= tg->cfs_rq[scpu]->shares + tg->cfs_rq[dcpu]->shares;
1716 if (shares)
1717 tg->cfs_rq[dcpu]->shares += shares;
1718}
1719
1720/*
1721 * Because changing a group's shares changes the weight of the super-group
1722 * we need to walk up the tree and change all shares until we hit the root.
1723 */
1724static void
1725move_group_shares(struct task_group *tg, struct sched_domain *sd,
1726 int scpu, int dcpu)
1727{
1728 while (tg) {
1729 __move_group_shares(tg, sd, scpu, dcpu);
1730 tg = tg->parent;
1731 }
1732}
1733
1734static
1735void aggregate_group_set_shares(struct task_group *tg, struct sched_domain *sd)
1736{
1737 unsigned long shares = aggregate(tg, sd)->shares;
1738 int i;
1739
1740 for_each_cpu_mask(i, sd->span) {
1741 struct rq *rq = cpu_rq(i);
1742 unsigned long flags;
1743
1744 spin_lock_irqsave(&rq->lock, flags);
1745 __update_group_shares_cpu(tg, sd, i);
1746 spin_unlock_irqrestore(&rq->lock, flags);
1747 }
1748
1749 aggregate_group_shares(tg, sd);
1750
1751 /*
1752 * ensure we never loose shares due to rounding errors in the
1753 * above redistribution.
1754 */
1755 shares -= aggregate(tg, sd)->shares;
1756 if (shares) {
1757 tg->cfs_rq[sd->first_cpu]->shares += shares;
1758 aggregate(tg, sd)->shares += shares;
1759 }
1760}
1761
1762/*
1763 * Calculate the accumulative weight and recursive load of each task group
1764 * while walking down the tree.
1765 */
1766static
1767void aggregate_get_down(struct task_group *tg, struct sched_domain *sd)
1768{
1769 aggregate_group_weight(tg, sd);
1770 aggregate_group_shares(tg, sd);
1771 aggregate_group_load(tg, sd);
1772}
1773
1774/*
1775 * Rebalance the cpu shares while walking back up the tree.
1776 */
1777static
1778void aggregate_get_up(struct task_group *tg, struct sched_domain *sd)
1779{
1780 aggregate_group_set_shares(tg, sd);
1781}
1782
1783static DEFINE_PER_CPU(spinlock_t, aggregate_lock);
1784
1785static void __init init_aggregate(void)
1786{
1787 int i;
1788
1789 for_each_possible_cpu(i)
1790 spin_lock_init(&per_cpu(aggregate_lock, i));
1791}
1792
1793static int get_aggregate(struct sched_domain *sd)
1794{
1795 if (!spin_trylock(&per_cpu(aggregate_lock, sd->first_cpu)))
1796 return 0;
1797
1798 aggregate_walk_tree(aggregate_get_down, aggregate_get_up, sd);
1799 return 1;
1800}
1801
1802static void put_aggregate(struct sched_domain *sd)
1803{
1804 spin_unlock(&per_cpu(aggregate_lock, sd->first_cpu));
1805}
1806
1807static void cfs_rq_set_shares(struct cfs_rq *cfs_rq, unsigned long shares)
1808{
1809 cfs_rq->shares = shares;
1810}
1811
1812#else
1813
1814static inline void init_aggregate(void)
1815{
1816}
1817
1818static inline int get_aggregate(struct sched_domain *sd)
1819{
1820 return 0;
1821}
1822
1823static inline void put_aggregate(struct sched_domain *sd)
1824{
1825}
1826#endif
1827
1828#else /* CONFIG_SMP */ 1484#else /* CONFIG_SMP */
1829 1485
1830#ifdef CONFIG_FAIR_GROUP_SCHED 1486#ifdef CONFIG_FAIR_GROUP_SCHED
@@ -1845,14 +1501,26 @@ static void cfs_rq_set_shares(struct cfs_rq *cfs_rq, unsigned long shares)
1845 1501
1846#define sched_class_highest (&rt_sched_class) 1502#define sched_class_highest (&rt_sched_class)
1847 1503
1848static void inc_nr_running(struct rq *rq) 1504static inline void inc_load(struct rq *rq, const struct task_struct *p)
1505{
1506 update_load_add(&rq->load, p->se.load.weight);
1507}
1508
1509static inline void dec_load(struct rq *rq, const struct task_struct *p)
1510{
1511 update_load_sub(&rq->load, p->se.load.weight);
1512}
1513
1514static void inc_nr_running(struct task_struct *p, struct rq *rq)
1849{ 1515{
1850 rq->nr_running++; 1516 rq->nr_running++;
1517 inc_load(rq, p);
1851} 1518}
1852 1519
1853static void dec_nr_running(struct rq *rq) 1520static void dec_nr_running(struct task_struct *p, struct rq *rq)
1854{ 1521{
1855 rq->nr_running--; 1522 rq->nr_running--;
1523 dec_load(rq, p);
1856} 1524}
1857 1525
1858static void set_load_weight(struct task_struct *p) 1526static void set_load_weight(struct task_struct *p)
@@ -1944,7 +1612,7 @@ static void activate_task(struct rq *rq, struct task_struct *p, int wakeup)
1944 rq->nr_uninterruptible--; 1612 rq->nr_uninterruptible--;
1945 1613
1946 enqueue_task(rq, p, wakeup); 1614 enqueue_task(rq, p, wakeup);
1947 inc_nr_running(rq); 1615 inc_nr_running(p, rq);
1948} 1616}
1949 1617
1950/* 1618/*
@@ -1956,7 +1624,7 @@ static void deactivate_task(struct rq *rq, struct task_struct *p, int sleep)
1956 rq->nr_uninterruptible++; 1624 rq->nr_uninterruptible++;
1957 1625
1958 dequeue_task(rq, p, sleep); 1626 dequeue_task(rq, p, sleep);
1959 dec_nr_running(rq); 1627 dec_nr_running(p, rq);
1960} 1628}
1961 1629
1962/** 1630/**
@@ -2609,7 +2277,7 @@ void wake_up_new_task(struct task_struct *p, unsigned long clone_flags)
2609 * management (if any): 2277 * management (if any):
2610 */ 2278 */
2611 p->sched_class->task_new(rq, p); 2279 p->sched_class->task_new(rq, p);
2612 inc_nr_running(rq); 2280 inc_nr_running(p, rq);
2613 } 2281 }
2614 check_preempt_curr(rq, p); 2282 check_preempt_curr(rq, p);
2615#ifdef CONFIG_SMP 2283#ifdef CONFIG_SMP
@@ -3600,12 +3268,9 @@ static int load_balance(int this_cpu, struct rq *this_rq,
3600 unsigned long imbalance; 3268 unsigned long imbalance;
3601 struct rq *busiest; 3269 struct rq *busiest;
3602 unsigned long flags; 3270 unsigned long flags;
3603 int unlock_aggregate;
3604 3271
3605 cpus_setall(*cpus); 3272 cpus_setall(*cpus);
3606 3273
3607 unlock_aggregate = get_aggregate(sd);
3608
3609 /* 3274 /*
3610 * When power savings policy is enabled for the parent domain, idle 3275 * When power savings policy is enabled for the parent domain, idle
3611 * sibling can pick up load irrespective of busy siblings. In this case, 3276 * sibling can pick up load irrespective of busy siblings. In this case,
@@ -3721,9 +3386,8 @@ redo:
3721 3386
3722 if (!ld_moved && !sd_idle && sd->flags & SD_SHARE_CPUPOWER && 3387 if (!ld_moved && !sd_idle && sd->flags & SD_SHARE_CPUPOWER &&
3723 !test_sd_parent(sd, SD_POWERSAVINGS_BALANCE)) 3388 !test_sd_parent(sd, SD_POWERSAVINGS_BALANCE))
3724 ld_moved = -1; 3389 return -1;
3725 3390 return ld_moved;
3726 goto out;
3727 3391
3728out_balanced: 3392out_balanced:
3729 schedstat_inc(sd, lb_balanced[idle]); 3393 schedstat_inc(sd, lb_balanced[idle]);
@@ -3738,13 +3402,8 @@ out_one_pinned:
3738 3402
3739 if (!sd_idle && sd->flags & SD_SHARE_CPUPOWER && 3403 if (!sd_idle && sd->flags & SD_SHARE_CPUPOWER &&
3740 !test_sd_parent(sd, SD_POWERSAVINGS_BALANCE)) 3404 !test_sd_parent(sd, SD_POWERSAVINGS_BALANCE))
3741 ld_moved = -1; 3405 return -1;
3742 else 3406 return 0;
3743 ld_moved = 0;
3744out:
3745 if (unlock_aggregate)
3746 put_aggregate(sd);
3747 return ld_moved;
3748} 3407}
3749 3408
3750/* 3409/*
@@ -4430,7 +4089,7 @@ static inline void schedule_debug(struct task_struct *prev)
4430 * schedule() atomically, we ignore that path for now. 4089 * schedule() atomically, we ignore that path for now.
4431 * Otherwise, whine if we are scheduling when we should not be. 4090 * Otherwise, whine if we are scheduling when we should not be.
4432 */ 4091 */
4433 if (unlikely(in_atomic_preempt_off()) && unlikely(!prev->exit_state)) 4092 if (unlikely(in_atomic_preempt_off() && !prev->exit_state))
4434 __schedule_bug(prev); 4093 __schedule_bug(prev);
4435 4094
4436 profile_hit(SCHED_PROFILING, __builtin_return_address(0)); 4095 profile_hit(SCHED_PROFILING, __builtin_return_address(0));
@@ -4510,12 +4169,10 @@ need_resched_nonpreemptible:
4510 clear_tsk_need_resched(prev); 4169 clear_tsk_need_resched(prev);
4511 4170
4512 if (prev->state && !(preempt_count() & PREEMPT_ACTIVE)) { 4171 if (prev->state && !(preempt_count() & PREEMPT_ACTIVE)) {
4513 if (unlikely((prev->state & TASK_INTERRUPTIBLE) && 4172 if (unlikely(signal_pending_state(prev->state, prev)))
4514 signal_pending(prev))) {
4515 prev->state = TASK_RUNNING; 4173 prev->state = TASK_RUNNING;
4516 } else { 4174 else
4517 deactivate_task(rq, prev, 1); 4175 deactivate_task(rq, prev, 1);
4518 }
4519 switch_count = &prev->nvcsw; 4176 switch_count = &prev->nvcsw;
4520 } 4177 }
4521 4178
@@ -4741,22 +4398,20 @@ do_wait_for_common(struct completion *x, long timeout, int state)
4741 signal_pending(current)) || 4398 signal_pending(current)) ||
4742 (state == TASK_KILLABLE && 4399 (state == TASK_KILLABLE &&
4743 fatal_signal_pending(current))) { 4400 fatal_signal_pending(current))) {
4744 __remove_wait_queue(&x->wait, &wait); 4401 timeout = -ERESTARTSYS;
4745 return -ERESTARTSYS; 4402 break;
4746 } 4403 }
4747 __set_current_state(state); 4404 __set_current_state(state);
4748 spin_unlock_irq(&x->wait.lock); 4405 spin_unlock_irq(&x->wait.lock);
4749 timeout = schedule_timeout(timeout); 4406 timeout = schedule_timeout(timeout);
4750 spin_lock_irq(&x->wait.lock); 4407 spin_lock_irq(&x->wait.lock);
4751 if (!timeout) { 4408 } while (!x->done && timeout);
4752 __remove_wait_queue(&x->wait, &wait);
4753 return timeout;
4754 }
4755 } while (!x->done);
4756 __remove_wait_queue(&x->wait, &wait); 4409 __remove_wait_queue(&x->wait, &wait);
4410 if (!x->done)
4411 return timeout;
4757 } 4412 }
4758 x->done--; 4413 x->done--;
4759 return timeout; 4414 return timeout ?: 1;
4760} 4415}
4761 4416
4762static long __sched 4417static long __sched
@@ -4931,8 +4586,10 @@ void set_user_nice(struct task_struct *p, long nice)
4931 goto out_unlock; 4586 goto out_unlock;
4932 } 4587 }
4933 on_rq = p->se.on_rq; 4588 on_rq = p->se.on_rq;
4934 if (on_rq) 4589 if (on_rq) {
4935 dequeue_task(rq, p, 0); 4590 dequeue_task(rq, p, 0);
4591 dec_load(rq, p);
4592 }
4936 4593
4937 p->static_prio = NICE_TO_PRIO(nice); 4594 p->static_prio = NICE_TO_PRIO(nice);
4938 set_load_weight(p); 4595 set_load_weight(p);
@@ -4942,6 +4599,7 @@ void set_user_nice(struct task_struct *p, long nice)
4942 4599
4943 if (on_rq) { 4600 if (on_rq) {
4944 enqueue_task(rq, p, 0); 4601 enqueue_task(rq, p, 0);
4602 inc_load(rq, p);
4945 /* 4603 /*
4946 * If the task increased its priority or is running and 4604 * If the task increased its priority or is running and
4947 * lowered its priority, then reschedule its CPU: 4605 * lowered its priority, then reschedule its CPU:
@@ -6229,6 +5887,7 @@ static void migrate_dead_tasks(unsigned int dead_cpu)
6229 next = pick_next_task(rq, rq->curr); 5887 next = pick_next_task(rq, rq->curr);
6230 if (!next) 5888 if (!next)
6231 break; 5889 break;
5890 next->sched_class->put_prev_task(rq, next);
6232 migrate_dead(dead_cpu, next); 5891 migrate_dead(dead_cpu, next);
6233 5892
6234 } 5893 }
@@ -7219,7 +6878,12 @@ static int default_relax_domain_level = -1;
7219 6878
7220static int __init setup_relax_domain_level(char *str) 6879static int __init setup_relax_domain_level(char *str)
7221{ 6880{
7222 default_relax_domain_level = simple_strtoul(str, NULL, 0); 6881 unsigned long val;
6882
6883 val = simple_strtoul(str, NULL, 0);
6884 if (val < SD_LV_MAX)
6885 default_relax_domain_level = val;
6886
7223 return 1; 6887 return 1;
7224} 6888}
7225__setup("relax_domain_level=", setup_relax_domain_level); 6889__setup("relax_domain_level=", setup_relax_domain_level);
@@ -7316,7 +6980,6 @@ static int __build_sched_domains(const cpumask_t *cpu_map,
7316 SD_INIT(sd, ALLNODES); 6980 SD_INIT(sd, ALLNODES);
7317 set_domain_attribute(sd, attr); 6981 set_domain_attribute(sd, attr);
7318 sd->span = *cpu_map; 6982 sd->span = *cpu_map;
7319 sd->first_cpu = first_cpu(sd->span);
7320 cpu_to_allnodes_group(i, cpu_map, &sd->groups, tmpmask); 6983 cpu_to_allnodes_group(i, cpu_map, &sd->groups, tmpmask);
7321 p = sd; 6984 p = sd;
7322 sd_allnodes = 1; 6985 sd_allnodes = 1;
@@ -7327,7 +6990,6 @@ static int __build_sched_domains(const cpumask_t *cpu_map,
7327 SD_INIT(sd, NODE); 6990 SD_INIT(sd, NODE);
7328 set_domain_attribute(sd, attr); 6991 set_domain_attribute(sd, attr);
7329 sched_domain_node_span(cpu_to_node(i), &sd->span); 6992 sched_domain_node_span(cpu_to_node(i), &sd->span);
7330 sd->first_cpu = first_cpu(sd->span);
7331 sd->parent = p; 6993 sd->parent = p;
7332 if (p) 6994 if (p)
7333 p->child = sd; 6995 p->child = sd;
@@ -7339,7 +7001,6 @@ static int __build_sched_domains(const cpumask_t *cpu_map,
7339 SD_INIT(sd, CPU); 7001 SD_INIT(sd, CPU);
7340 set_domain_attribute(sd, attr); 7002 set_domain_attribute(sd, attr);
7341 sd->span = *nodemask; 7003 sd->span = *nodemask;
7342 sd->first_cpu = first_cpu(sd->span);
7343 sd->parent = p; 7004 sd->parent = p;
7344 if (p) 7005 if (p)
7345 p->child = sd; 7006 p->child = sd;
@@ -7351,7 +7012,6 @@ static int __build_sched_domains(const cpumask_t *cpu_map,
7351 SD_INIT(sd, MC); 7012 SD_INIT(sd, MC);
7352 set_domain_attribute(sd, attr); 7013 set_domain_attribute(sd, attr);
7353 sd->span = cpu_coregroup_map(i); 7014 sd->span = cpu_coregroup_map(i);
7354 sd->first_cpu = first_cpu(sd->span);
7355 cpus_and(sd->span, sd->span, *cpu_map); 7015 cpus_and(sd->span, sd->span, *cpu_map);
7356 sd->parent = p; 7016 sd->parent = p;
7357 p->child = sd; 7017 p->child = sd;
@@ -7364,7 +7024,6 @@ static int __build_sched_domains(const cpumask_t *cpu_map,
7364 SD_INIT(sd, SIBLING); 7024 SD_INIT(sd, SIBLING);
7365 set_domain_attribute(sd, attr); 7025 set_domain_attribute(sd, attr);
7366 sd->span = per_cpu(cpu_sibling_map, i); 7026 sd->span = per_cpu(cpu_sibling_map, i);
7367 sd->first_cpu = first_cpu(sd->span);
7368 cpus_and(sd->span, sd->span, *cpu_map); 7027 cpus_and(sd->span, sd->span, *cpu_map);
7369 sd->parent = p; 7028 sd->parent = p;
7370 p->child = sd; 7029 p->child = sd;
@@ -7568,8 +7227,8 @@ static int build_sched_domains(const cpumask_t *cpu_map)
7568 7227
7569static cpumask_t *doms_cur; /* current sched domains */ 7228static cpumask_t *doms_cur; /* current sched domains */
7570static int ndoms_cur; /* number of sched domains in 'doms_cur' */ 7229static int ndoms_cur; /* number of sched domains in 'doms_cur' */
7571static struct sched_domain_attr *dattr_cur; /* attribues of custom domains 7230static struct sched_domain_attr *dattr_cur;
7572 in 'doms_cur' */ 7231 /* attribues of custom domains in 'doms_cur' */
7573 7232
7574/* 7233/*
7575 * Special case: If a kmalloc of a doms_cur partition (array of 7234 * Special case: If a kmalloc of a doms_cur partition (array of
@@ -7583,6 +7242,18 @@ void __attribute__((weak)) arch_update_cpu_topology(void)
7583} 7242}
7584 7243
7585/* 7244/*
7245 * Free current domain masks.
7246 * Called after all cpus are attached to NULL domain.
7247 */
7248static void free_sched_domains(void)
7249{
7250 ndoms_cur = 0;
7251 if (doms_cur != &fallback_doms)
7252 kfree(doms_cur);
7253 doms_cur = &fallback_doms;
7254}
7255
7256/*
7586 * Set up scheduler domains and groups. Callers must hold the hotplug lock. 7257 * Set up scheduler domains and groups. Callers must hold the hotplug lock.
7587 * For now this just excludes isolated cpus, but could be used to 7258 * For now this just excludes isolated cpus, but could be used to
7588 * exclude other special cases in the future. 7259 * exclude other special cases in the future.
@@ -7729,6 +7400,7 @@ int arch_reinit_sched_domains(void)
7729 get_online_cpus(); 7400 get_online_cpus();
7730 mutex_lock(&sched_domains_mutex); 7401 mutex_lock(&sched_domains_mutex);
7731 detach_destroy_domains(&cpu_online_map); 7402 detach_destroy_domains(&cpu_online_map);
7403 free_sched_domains();
7732 err = arch_init_sched_domains(&cpu_online_map); 7404 err = arch_init_sched_domains(&cpu_online_map);
7733 mutex_unlock(&sched_domains_mutex); 7405 mutex_unlock(&sched_domains_mutex);
7734 put_online_cpus(); 7406 put_online_cpus();
@@ -7814,6 +7486,7 @@ static int update_sched_domains(struct notifier_block *nfb,
7814 case CPU_DOWN_PREPARE: 7486 case CPU_DOWN_PREPARE:
7815 case CPU_DOWN_PREPARE_FROZEN: 7487 case CPU_DOWN_PREPARE_FROZEN:
7816 detach_destroy_domains(&cpu_online_map); 7488 detach_destroy_domains(&cpu_online_map);
7489 free_sched_domains();
7817 return NOTIFY_OK; 7490 return NOTIFY_OK;
7818 7491
7819 case CPU_UP_CANCELED: 7492 case CPU_UP_CANCELED:
@@ -7832,8 +7505,16 @@ static int update_sched_domains(struct notifier_block *nfb,
7832 return NOTIFY_DONE; 7505 return NOTIFY_DONE;
7833 } 7506 }
7834 7507
7508#ifndef CONFIG_CPUSETS
7509 /*
7510 * Create default domain partitioning if cpusets are disabled.
7511 * Otherwise we let cpusets rebuild the domains based on the
7512 * current setup.
7513 */
7514
7835 /* The hotplug lock is already held by cpu_up/cpu_down */ 7515 /* The hotplug lock is already held by cpu_up/cpu_down */
7836 arch_init_sched_domains(&cpu_online_map); 7516 arch_init_sched_domains(&cpu_online_map);
7517#endif
7837 7518
7838 return NOTIFY_OK; 7519 return NOTIFY_OK;
7839} 7520}
@@ -7973,7 +7654,6 @@ static void init_tg_rt_entry(struct task_group *tg, struct rt_rq *rt_rq,
7973 else 7654 else
7974 rt_se->rt_rq = parent->my_q; 7655 rt_se->rt_rq = parent->my_q;
7975 7656
7976 rt_se->rt_rq = &rq->rt;
7977 rt_se->my_q = rt_rq; 7657 rt_se->my_q = rt_rq;
7978 rt_se->parent = parent; 7658 rt_se->parent = parent;
7979 INIT_LIST_HEAD(&rt_se->run_list); 7659 INIT_LIST_HEAD(&rt_se->run_list);
@@ -8034,7 +7714,6 @@ void __init sched_init(void)
8034 } 7714 }
8035 7715
8036#ifdef CONFIG_SMP 7716#ifdef CONFIG_SMP
8037 init_aggregate();
8038 init_defrootdomain(); 7717 init_defrootdomain();
8039#endif 7718#endif
8040 7719
@@ -8599,11 +8278,14 @@ void sched_move_task(struct task_struct *tsk)
8599#endif 8278#endif
8600 8279
8601#ifdef CONFIG_FAIR_GROUP_SCHED 8280#ifdef CONFIG_FAIR_GROUP_SCHED
8602static void __set_se_shares(struct sched_entity *se, unsigned long shares) 8281static void set_se_shares(struct sched_entity *se, unsigned long shares)
8603{ 8282{
8604 struct cfs_rq *cfs_rq = se->cfs_rq; 8283 struct cfs_rq *cfs_rq = se->cfs_rq;
8284 struct rq *rq = cfs_rq->rq;
8605 int on_rq; 8285 int on_rq;
8606 8286
8287 spin_lock_irq(&rq->lock);
8288
8607 on_rq = se->on_rq; 8289 on_rq = se->on_rq;
8608 if (on_rq) 8290 if (on_rq)
8609 dequeue_entity(cfs_rq, se, 0); 8291 dequeue_entity(cfs_rq, se, 0);
@@ -8613,17 +8295,8 @@ static void __set_se_shares(struct sched_entity *se, unsigned long shares)
8613 8295
8614 if (on_rq) 8296 if (on_rq)
8615 enqueue_entity(cfs_rq, se, 0); 8297 enqueue_entity(cfs_rq, se, 0);
8616}
8617 8298
8618static void set_se_shares(struct sched_entity *se, unsigned long shares) 8299 spin_unlock_irq(&rq->lock);
8619{
8620 struct cfs_rq *cfs_rq = se->cfs_rq;
8621 struct rq *rq = cfs_rq->rq;
8622 unsigned long flags;
8623
8624 spin_lock_irqsave(&rq->lock, flags);
8625 __set_se_shares(se, shares);
8626 spin_unlock_irqrestore(&rq->lock, flags);
8627} 8300}
8628 8301
8629static DEFINE_MUTEX(shares_mutex); 8302static DEFINE_MUTEX(shares_mutex);
@@ -8662,13 +8335,8 @@ int sched_group_set_shares(struct task_group *tg, unsigned long shares)
8662 * w/o tripping rebalance_share or load_balance_fair. 8335 * w/o tripping rebalance_share or load_balance_fair.
8663 */ 8336 */
8664 tg->shares = shares; 8337 tg->shares = shares;
8665 for_each_possible_cpu(i) { 8338 for_each_possible_cpu(i)
8666 /*
8667 * force a rebalance
8668 */
8669 cfs_rq_set_shares(tg->cfs_rq[i], 0);
8670 set_se_shares(tg->se[i], shares); 8339 set_se_shares(tg->se[i], shares);
8671 }
8672 8340
8673 /* 8341 /*
8674 * Enable load balance activity on this group, by inserting it back on 8342 * Enable load balance activity on this group, by inserting it back on
@@ -8707,7 +8375,7 @@ static unsigned long to_ratio(u64 period, u64 runtime)
8707#ifdef CONFIG_CGROUP_SCHED 8375#ifdef CONFIG_CGROUP_SCHED
8708static int __rt_schedulable(struct task_group *tg, u64 period, u64 runtime) 8376static int __rt_schedulable(struct task_group *tg, u64 period, u64 runtime)
8709{ 8377{
8710 struct task_group *tgi, *parent = tg->parent; 8378 struct task_group *tgi, *parent = tg ? tg->parent : NULL;
8711 unsigned long total = 0; 8379 unsigned long total = 0;
8712 8380
8713 if (!parent) { 8381 if (!parent) {
@@ -8834,6 +8502,9 @@ int sched_group_set_rt_period(struct task_group *tg, long rt_period_us)
8834 rt_period = (u64)rt_period_us * NSEC_PER_USEC; 8502 rt_period = (u64)rt_period_us * NSEC_PER_USEC;
8835 rt_runtime = tg->rt_bandwidth.rt_runtime; 8503 rt_runtime = tg->rt_bandwidth.rt_runtime;
8836 8504
8505 if (rt_period == 0)
8506 return -EINVAL;
8507
8837 return tg_set_bandwidth(tg, rt_period, rt_runtime); 8508 return tg_set_bandwidth(tg, rt_period, rt_runtime);
8838} 8509}
8839 8510
diff --git a/kernel/sched_clock.c b/kernel/sched_clock.c
index 9c597e37f7de..ce05271219ab 100644
--- a/kernel/sched_clock.c
+++ b/kernel/sched_clock.c
@@ -59,22 +59,26 @@ static inline struct sched_clock_data *cpu_sdc(int cpu)
59 return &per_cpu(sched_clock_data, cpu); 59 return &per_cpu(sched_clock_data, cpu);
60} 60}
61 61
62static __read_mostly int sched_clock_running;
63
62void sched_clock_init(void) 64void sched_clock_init(void)
63{ 65{
64 u64 ktime_now = ktime_to_ns(ktime_get()); 66 u64 ktime_now = ktime_to_ns(ktime_get());
65 u64 now = 0; 67 unsigned long now_jiffies = jiffies;
66 int cpu; 68 int cpu;
67 69
68 for_each_possible_cpu(cpu) { 70 for_each_possible_cpu(cpu) {
69 struct sched_clock_data *scd = cpu_sdc(cpu); 71 struct sched_clock_data *scd = cpu_sdc(cpu);
70 72
71 scd->lock = (raw_spinlock_t)__RAW_SPIN_LOCK_UNLOCKED; 73 scd->lock = (raw_spinlock_t)__RAW_SPIN_LOCK_UNLOCKED;
72 scd->prev_jiffies = jiffies; 74 scd->prev_jiffies = now_jiffies;
73 scd->prev_raw = now; 75 scd->prev_raw = 0;
74 scd->tick_raw = now; 76 scd->tick_raw = 0;
75 scd->tick_gtod = ktime_now; 77 scd->tick_gtod = ktime_now;
76 scd->clock = ktime_now; 78 scd->clock = ktime_now;
77 } 79 }
80
81 sched_clock_running = 1;
78} 82}
79 83
80/* 84/*
@@ -136,6 +140,9 @@ u64 sched_clock_cpu(int cpu)
136 struct sched_clock_data *scd = cpu_sdc(cpu); 140 struct sched_clock_data *scd = cpu_sdc(cpu);
137 u64 now, clock; 141 u64 now, clock;
138 142
143 if (unlikely(!sched_clock_running))
144 return 0ull;
145
139 WARN_ON_ONCE(!irqs_disabled()); 146 WARN_ON_ONCE(!irqs_disabled());
140 now = sched_clock(); 147 now = sched_clock();
141 148
@@ -174,6 +181,9 @@ void sched_clock_tick(void)
174 struct sched_clock_data *scd = this_scd(); 181 struct sched_clock_data *scd = this_scd();
175 u64 now, now_gtod; 182 u64 now, now_gtod;
176 183
184 if (unlikely(!sched_clock_running))
185 return;
186
177 WARN_ON_ONCE(!irqs_disabled()); 187 WARN_ON_ONCE(!irqs_disabled());
178 188
179 now = sched_clock(); 189 now = sched_clock();
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index 5f06118fbc31..8bb713040ac9 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -167,11 +167,6 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
167#endif 167#endif
168 SEQ_printf(m, " .%-30s: %ld\n", "nr_spread_over", 168 SEQ_printf(m, " .%-30s: %ld\n", "nr_spread_over",
169 cfs_rq->nr_spread_over); 169 cfs_rq->nr_spread_over);
170#ifdef CONFIG_FAIR_GROUP_SCHED
171#ifdef CONFIG_SMP
172 SEQ_printf(m, " .%-30s: %lu\n", "shares", cfs_rq->shares);
173#endif
174#endif
175} 170}
176 171
177static void print_cpu(struct seq_file *m, int cpu) 172static void print_cpu(struct seq_file *m, int cpu)
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index e24ecd39c4b8..08ae848b71d4 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -334,34 +334,6 @@ int sched_nr_latency_handler(struct ctl_table *table, int write,
334#endif 334#endif
335 335
336/* 336/*
337 * delta *= w / rw
338 */
339static inline unsigned long
340calc_delta_weight(unsigned long delta, struct sched_entity *se)
341{
342 for_each_sched_entity(se) {
343 delta = calc_delta_mine(delta,
344 se->load.weight, &cfs_rq_of(se)->load);
345 }
346
347 return delta;
348}
349
350/*
351 * delta *= rw / w
352 */
353static inline unsigned long
354calc_delta_fair(unsigned long delta, struct sched_entity *se)
355{
356 for_each_sched_entity(se) {
357 delta = calc_delta_mine(delta,
358 cfs_rq_of(se)->load.weight, &se->load);
359 }
360
361 return delta;
362}
363
364/*
365 * The idea is to set a period in which each task runs once. 337 * The idea is to set a period in which each task runs once.
366 * 338 *
367 * When there are too many tasks (sysctl_sched_nr_latency) we have to stretch 339 * When there are too many tasks (sysctl_sched_nr_latency) we have to stretch
@@ -390,54 +362,47 @@ static u64 __sched_period(unsigned long nr_running)
390 */ 362 */
391static u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se) 363static u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se)
392{ 364{
393 return calc_delta_weight(__sched_period(cfs_rq->nr_running), se); 365 u64 slice = __sched_period(cfs_rq->nr_running);
366
367 for_each_sched_entity(se) {
368 cfs_rq = cfs_rq_of(se);
369
370 slice *= se->load.weight;
371 do_div(slice, cfs_rq->load.weight);
372 }
373
374
375 return slice;
394} 376}
395 377
396/* 378/*
397 * We calculate the vruntime slice of a to be inserted task 379 * We calculate the vruntime slice of a to be inserted task
398 * 380 *
399 * vs = s*rw/w = p 381 * vs = s/w = p/rw
400 */ 382 */
401static u64 sched_vslice_add(struct cfs_rq *cfs_rq, struct sched_entity *se) 383static u64 sched_vslice_add(struct cfs_rq *cfs_rq, struct sched_entity *se)
402{ 384{
403 unsigned long nr_running = cfs_rq->nr_running; 385 unsigned long nr_running = cfs_rq->nr_running;
386 unsigned long weight;
387 u64 vslice;
404 388
405 if (!se->on_rq) 389 if (!se->on_rq)
406 nr_running++; 390 nr_running++;
407 391
408 return __sched_period(nr_running); 392 vslice = __sched_period(nr_running);
409}
410
411/*
412 * The goal of calc_delta_asym() is to be asymmetrically around NICE_0_LOAD, in
413 * that it favours >=0 over <0.
414 *
415 * -20 |
416 * |
417 * 0 --------+-------
418 * .'
419 * 19 .'
420 *
421 */
422static unsigned long
423calc_delta_asym(unsigned long delta, struct sched_entity *se)
424{
425 struct load_weight lw = {
426 .weight = NICE_0_LOAD,
427 .inv_weight = 1UL << (WMULT_SHIFT-NICE_0_SHIFT)
428 };
429 393
430 for_each_sched_entity(se) { 394 for_each_sched_entity(se) {
431 struct load_weight *se_lw = &se->load; 395 cfs_rq = cfs_rq_of(se);
432 396
433 if (se->load.weight < NICE_0_LOAD) 397 weight = cfs_rq->load.weight;
434 se_lw = &lw; 398 if (!se->on_rq)
399 weight += se->load.weight;
435 400
436 delta = calc_delta_mine(delta, 401 vslice *= NICE_0_LOAD;
437 cfs_rq_of(se)->load.weight, se_lw); 402 do_div(vslice, weight);
438 } 403 }
439 404
440 return delta; 405 return vslice;
441} 406}
442 407
443/* 408/*
@@ -454,7 +419,11 @@ __update_curr(struct cfs_rq *cfs_rq, struct sched_entity *curr,
454 419
455 curr->sum_exec_runtime += delta_exec; 420 curr->sum_exec_runtime += delta_exec;
456 schedstat_add(cfs_rq, exec_clock, delta_exec); 421 schedstat_add(cfs_rq, exec_clock, delta_exec);
457 delta_exec_weighted = calc_delta_fair(delta_exec, curr); 422 delta_exec_weighted = delta_exec;
423 if (unlikely(curr->load.weight != NICE_0_LOAD)) {
424 delta_exec_weighted = calc_delta_fair(delta_exec_weighted,
425 &curr->load);
426 }
458 curr->vruntime += delta_exec_weighted; 427 curr->vruntime += delta_exec_weighted;
459} 428}
460 429
@@ -541,27 +510,10 @@ update_stats_curr_start(struct cfs_rq *cfs_rq, struct sched_entity *se)
541 * Scheduling class queueing methods: 510 * Scheduling class queueing methods:
542 */ 511 */
543 512
544#if defined CONFIG_SMP && defined CONFIG_FAIR_GROUP_SCHED
545static void
546add_cfs_task_weight(struct cfs_rq *cfs_rq, unsigned long weight)
547{
548 cfs_rq->task_weight += weight;
549}
550#else
551static inline void
552add_cfs_task_weight(struct cfs_rq *cfs_rq, unsigned long weight)
553{
554}
555#endif
556
557static void 513static void
558account_entity_enqueue(struct cfs_rq *cfs_rq, struct sched_entity *se) 514account_entity_enqueue(struct cfs_rq *cfs_rq, struct sched_entity *se)
559{ 515{
560 update_load_add(&cfs_rq->load, se->load.weight); 516 update_load_add(&cfs_rq->load, se->load.weight);
561 if (!parent_entity(se))
562 inc_cpu_load(rq_of(cfs_rq), se->load.weight);
563 if (entity_is_task(se))
564 add_cfs_task_weight(cfs_rq, se->load.weight);
565 cfs_rq->nr_running++; 517 cfs_rq->nr_running++;
566 se->on_rq = 1; 518 se->on_rq = 1;
567 list_add(&se->group_node, &cfs_rq->tasks); 519 list_add(&se->group_node, &cfs_rq->tasks);
@@ -571,10 +523,6 @@ static void
571account_entity_dequeue(struct cfs_rq *cfs_rq, struct sched_entity *se) 523account_entity_dequeue(struct cfs_rq *cfs_rq, struct sched_entity *se)
572{ 524{
573 update_load_sub(&cfs_rq->load, se->load.weight); 525 update_load_sub(&cfs_rq->load, se->load.weight);
574 if (!parent_entity(se))
575 dec_cpu_load(rq_of(cfs_rq), se->load.weight);
576 if (entity_is_task(se))
577 add_cfs_task_weight(cfs_rq, -se->load.weight);
578 cfs_rq->nr_running--; 526 cfs_rq->nr_running--;
579 se->on_rq = 0; 527 se->on_rq = 0;
580 list_del_init(&se->group_node); 528 list_del_init(&se->group_node);
@@ -661,17 +609,8 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
661 609
662 if (!initial) { 610 if (!initial) {
663 /* sleeps upto a single latency don't count. */ 611 /* sleeps upto a single latency don't count. */
664 if (sched_feat(NEW_FAIR_SLEEPERS)) { 612 if (sched_feat(NEW_FAIR_SLEEPERS))
665 unsigned long thresh = sysctl_sched_latency; 613 vruntime -= sysctl_sched_latency;
666
667 /*
668 * convert the sleeper threshold into virtual time
669 */
670 if (sched_feat(NORMALIZED_SLEEPER))
671 thresh = calc_delta_fair(thresh, se);
672
673 vruntime -= thresh;
674 }
675 614
676 /* ensure we never gain time by being placed backwards. */ 615 /* ensure we never gain time by being placed backwards. */
677 vruntime = max_vruntime(se->vruntime, vruntime); 616 vruntime = max_vruntime(se->vruntime, vruntime);
@@ -1057,16 +996,27 @@ wake_affine(struct rq *rq, struct sched_domain *this_sd, struct rq *this_rq,
1057 struct task_struct *curr = this_rq->curr; 996 struct task_struct *curr = this_rq->curr;
1058 unsigned long tl = this_load; 997 unsigned long tl = this_load;
1059 unsigned long tl_per_task; 998 unsigned long tl_per_task;
999 int balanced;
1060 1000
1061 if (!(this_sd->flags & SD_WAKE_AFFINE)) 1001 if (!(this_sd->flags & SD_WAKE_AFFINE) || !sched_feat(AFFINE_WAKEUPS))
1062 return 0; 1002 return 0;
1063 1003
1064 /* 1004 /*
1005 * If sync wakeup then subtract the (maximum possible)
1006 * effect of the currently running task from the load
1007 * of the current CPU:
1008 */
1009 if (sync)
1010 tl -= current->se.load.weight;
1011
1012 balanced = 100*(tl + p->se.load.weight) <= imbalance*load;
1013
1014 /*
1065 * If the currently running task will sleep within 1015 * If the currently running task will sleep within
1066 * a reasonable amount of time then attract this newly 1016 * a reasonable amount of time then attract this newly
1067 * woken task: 1017 * woken task:
1068 */ 1018 */
1069 if (sync && curr->sched_class == &fair_sched_class) { 1019 if (sync && balanced && curr->sched_class == &fair_sched_class) {
1070 if (curr->se.avg_overlap < sysctl_sched_migration_cost && 1020 if (curr->se.avg_overlap < sysctl_sched_migration_cost &&
1071 p->se.avg_overlap < sysctl_sched_migration_cost) 1021 p->se.avg_overlap < sysctl_sched_migration_cost)
1072 return 1; 1022 return 1;
@@ -1075,16 +1025,8 @@ wake_affine(struct rq *rq, struct sched_domain *this_sd, struct rq *this_rq,
1075 schedstat_inc(p, se.nr_wakeups_affine_attempts); 1025 schedstat_inc(p, se.nr_wakeups_affine_attempts);
1076 tl_per_task = cpu_avg_load_per_task(this_cpu); 1026 tl_per_task = cpu_avg_load_per_task(this_cpu);
1077 1027
1078 /*
1079 * If sync wakeup then subtract the (maximum possible)
1080 * effect of the currently running task from the load
1081 * of the current CPU:
1082 */
1083 if (sync)
1084 tl -= current->se.load.weight;
1085
1086 if ((tl <= load && tl + target_load(prev_cpu, idx) <= tl_per_task) || 1028 if ((tl <= load && tl + target_load(prev_cpu, idx) <= tl_per_task) ||
1087 100*(tl + p->se.load.weight) <= imbalance*load) { 1029 balanced) {
1088 /* 1030 /*
1089 * This domain has SD_WAKE_AFFINE and 1031 * This domain has SD_WAKE_AFFINE and
1090 * p is cache cold in this domain, and 1032 * p is cache cold in this domain, and
@@ -1169,10 +1111,11 @@ static unsigned long wakeup_gran(struct sched_entity *se)
1169 unsigned long gran = sysctl_sched_wakeup_granularity; 1111 unsigned long gran = sysctl_sched_wakeup_granularity;
1170 1112
1171 /* 1113 /*
1172 * More easily preempt - nice tasks, while not making it harder for 1114 * More easily preempt - nice tasks, while not making
1173 * + nice tasks. 1115 * it harder for + nice tasks.
1174 */ 1116 */
1175 gran = calc_delta_asym(sysctl_sched_wakeup_granularity, se); 1117 if (unlikely(se->load.weight > NICE_0_LOAD))
1118 gran = calc_delta_fair(gran, &se->load);
1176 1119
1177 return gran; 1120 return gran;
1178} 1121}
@@ -1366,90 +1309,75 @@ static struct task_struct *load_balance_next_fair(void *arg)
1366 return __load_balance_iterator(cfs_rq, cfs_rq->balance_iterator); 1309 return __load_balance_iterator(cfs_rq, cfs_rq->balance_iterator);
1367} 1310}
1368 1311
1369static unsigned long 1312#ifdef CONFIG_FAIR_GROUP_SCHED
1370__load_balance_fair(struct rq *this_rq, int this_cpu, struct rq *busiest, 1313static int cfs_rq_best_prio(struct cfs_rq *cfs_rq)
1371 unsigned long max_load_move, struct sched_domain *sd,
1372 enum cpu_idle_type idle, int *all_pinned, int *this_best_prio,
1373 struct cfs_rq *cfs_rq)
1374{ 1314{
1375 struct rq_iterator cfs_rq_iterator; 1315 struct sched_entity *curr;
1316 struct task_struct *p;
1376 1317
1377 cfs_rq_iterator.start = load_balance_start_fair; 1318 if (!cfs_rq->nr_running || !first_fair(cfs_rq))
1378 cfs_rq_iterator.next = load_balance_next_fair; 1319 return MAX_PRIO;
1379 cfs_rq_iterator.arg = cfs_rq; 1320
1321 curr = cfs_rq->curr;
1322 if (!curr)
1323 curr = __pick_next_entity(cfs_rq);
1324
1325 p = task_of(curr);
1380 1326
1381 return balance_tasks(this_rq, this_cpu, busiest, 1327 return p->prio;
1382 max_load_move, sd, idle, all_pinned,
1383 this_best_prio, &cfs_rq_iterator);
1384} 1328}
1329#endif
1385 1330
1386#ifdef CONFIG_FAIR_GROUP_SCHED
1387static unsigned long 1331static unsigned long
1388load_balance_fair(struct rq *this_rq, int this_cpu, struct rq *busiest, 1332load_balance_fair(struct rq *this_rq, int this_cpu, struct rq *busiest,
1389 unsigned long max_load_move, 1333 unsigned long max_load_move,
1390 struct sched_domain *sd, enum cpu_idle_type idle, 1334 struct sched_domain *sd, enum cpu_idle_type idle,
1391 int *all_pinned, int *this_best_prio) 1335 int *all_pinned, int *this_best_prio)
1392{ 1336{
1337 struct cfs_rq *busy_cfs_rq;
1393 long rem_load_move = max_load_move; 1338 long rem_load_move = max_load_move;
1394 int busiest_cpu = cpu_of(busiest); 1339 struct rq_iterator cfs_rq_iterator;
1395 struct task_group *tg;
1396
1397 rcu_read_lock();
1398 list_for_each_entry(tg, &task_groups, list) {
1399 long imbalance;
1400 unsigned long this_weight, busiest_weight;
1401 long rem_load, max_load, moved_load;
1402
1403 /*
1404 * empty group
1405 */
1406 if (!aggregate(tg, sd)->task_weight)
1407 continue;
1408
1409 rem_load = rem_load_move * aggregate(tg, sd)->rq_weight;
1410 rem_load /= aggregate(tg, sd)->load + 1;
1411
1412 this_weight = tg->cfs_rq[this_cpu]->task_weight;
1413 busiest_weight = tg->cfs_rq[busiest_cpu]->task_weight;
1414 1340
1415 imbalance = (busiest_weight - this_weight) / 2; 1341 cfs_rq_iterator.start = load_balance_start_fair;
1342 cfs_rq_iterator.next = load_balance_next_fair;
1416 1343
1417 if (imbalance < 0) 1344 for_each_leaf_cfs_rq(busiest, busy_cfs_rq) {
1418 imbalance = busiest_weight; 1345#ifdef CONFIG_FAIR_GROUP_SCHED
1346 struct cfs_rq *this_cfs_rq;
1347 long imbalance;
1348 unsigned long maxload;
1419 1349
1420 max_load = max(rem_load, imbalance); 1350 this_cfs_rq = cpu_cfs_rq(busy_cfs_rq, this_cpu);
1421 moved_load = __load_balance_fair(this_rq, this_cpu, busiest,
1422 max_load, sd, idle, all_pinned, this_best_prio,
1423 tg->cfs_rq[busiest_cpu]);
1424 1351
1425 if (!moved_load) 1352 imbalance = busy_cfs_rq->load.weight - this_cfs_rq->load.weight;
1353 /* Don't pull if this_cfs_rq has more load than busy_cfs_rq */
1354 if (imbalance <= 0)
1426 continue; 1355 continue;
1427 1356
1428 move_group_shares(tg, sd, busiest_cpu, this_cpu); 1357 /* Don't pull more than imbalance/2 */
1358 imbalance /= 2;
1359 maxload = min(rem_load_move, imbalance);
1429 1360
1430 moved_load *= aggregate(tg, sd)->load; 1361 *this_best_prio = cfs_rq_best_prio(this_cfs_rq);
1431 moved_load /= aggregate(tg, sd)->rq_weight + 1; 1362#else
1363# define maxload rem_load_move
1364#endif
1365 /*
1366 * pass busy_cfs_rq argument into
1367 * load_balance_[start|next]_fair iterators
1368 */
1369 cfs_rq_iterator.arg = busy_cfs_rq;
1370 rem_load_move -= balance_tasks(this_rq, this_cpu, busiest,
1371 maxload, sd, idle, all_pinned,
1372 this_best_prio,
1373 &cfs_rq_iterator);
1432 1374
1433 rem_load_move -= moved_load; 1375 if (rem_load_move <= 0)
1434 if (rem_load_move < 0)
1435 break; 1376 break;
1436 } 1377 }
1437 rcu_read_unlock();
1438 1378
1439 return max_load_move - rem_load_move; 1379 return max_load_move - rem_load_move;
1440} 1380}
1441#else
1442static unsigned long
1443load_balance_fair(struct rq *this_rq, int this_cpu, struct rq *busiest,
1444 unsigned long max_load_move,
1445 struct sched_domain *sd, enum cpu_idle_type idle,
1446 int *all_pinned, int *this_best_prio)
1447{
1448 return __load_balance_fair(this_rq, this_cpu, busiest,
1449 max_load_move, sd, idle, all_pinned,
1450 this_best_prio, &busiest->cfs);
1451}
1452#endif
1453 1381
1454static int 1382static int
1455move_one_task_fair(struct rq *this_rq, int this_cpu, struct rq *busiest, 1383move_one_task_fair(struct rq *this_rq, int this_cpu, struct rq *busiest,
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index 060e87b0cb1c..0f3c19197fa4 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -250,7 +250,8 @@ static int do_sched_rt_period_timer(struct rt_bandwidth *rt_b, int overrun)
250 if (rt_rq->rt_time || rt_rq->rt_nr_running) 250 if (rt_rq->rt_time || rt_rq->rt_nr_running)
251 idle = 0; 251 idle = 0;
252 spin_unlock(&rt_rq->rt_runtime_lock); 252 spin_unlock(&rt_rq->rt_runtime_lock);
253 } 253 } else if (rt_rq->rt_nr_running)
254 idle = 0;
254 255
255 if (enqueue) 256 if (enqueue)
256 sched_rt_rq_enqueue(rt_rq); 257 sched_rt_rq_enqueue(rt_rq);
@@ -449,13 +450,19 @@ void dec_rt_tasks(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq)
449#endif 450#endif
450} 451}
451 452
452static void enqueue_rt_entity(struct sched_rt_entity *rt_se) 453static void __enqueue_rt_entity(struct sched_rt_entity *rt_se)
453{ 454{
454 struct rt_rq *rt_rq = rt_rq_of_se(rt_se); 455 struct rt_rq *rt_rq = rt_rq_of_se(rt_se);
455 struct rt_prio_array *array = &rt_rq->active; 456 struct rt_prio_array *array = &rt_rq->active;
456 struct rt_rq *group_rq = group_rt_rq(rt_se); 457 struct rt_rq *group_rq = group_rt_rq(rt_se);
457 458
458 if (group_rq && rt_rq_throttled(group_rq)) 459 /*
460 * Don't enqueue the group if its throttled, or when empty.
461 * The latter is a consequence of the former when a child group
462 * get throttled and the current group doesn't have any other
463 * active members.
464 */
465 if (group_rq && (rt_rq_throttled(group_rq) || !group_rq->rt_nr_running))
459 return; 466 return;
460 467
461 list_add_tail(&rt_se->run_list, array->queue + rt_se_prio(rt_se)); 468 list_add_tail(&rt_se->run_list, array->queue + rt_se_prio(rt_se));
@@ -464,7 +471,7 @@ static void enqueue_rt_entity(struct sched_rt_entity *rt_se)
464 inc_rt_tasks(rt_se, rt_rq); 471 inc_rt_tasks(rt_se, rt_rq);
465} 472}
466 473
467static void dequeue_rt_entity(struct sched_rt_entity *rt_se) 474static void __dequeue_rt_entity(struct sched_rt_entity *rt_se)
468{ 475{
469 struct rt_rq *rt_rq = rt_rq_of_se(rt_se); 476 struct rt_rq *rt_rq = rt_rq_of_se(rt_se);
470 struct rt_prio_array *array = &rt_rq->active; 477 struct rt_prio_array *array = &rt_rq->active;
@@ -480,11 +487,10 @@ static void dequeue_rt_entity(struct sched_rt_entity *rt_se)
480 * Because the prio of an upper entry depends on the lower 487 * Because the prio of an upper entry depends on the lower
481 * entries, we must remove entries top - down. 488 * entries, we must remove entries top - down.
482 */ 489 */
483static void dequeue_rt_stack(struct task_struct *p) 490static void dequeue_rt_stack(struct sched_rt_entity *rt_se)
484{ 491{
485 struct sched_rt_entity *rt_se, *back = NULL; 492 struct sched_rt_entity *back = NULL;
486 493
487 rt_se = &p->rt;
488 for_each_sched_rt_entity(rt_se) { 494 for_each_sched_rt_entity(rt_se) {
489 rt_se->back = back; 495 rt_se->back = back;
490 back = rt_se; 496 back = rt_se;
@@ -492,7 +498,26 @@ static void dequeue_rt_stack(struct task_struct *p)
492 498
493 for (rt_se = back; rt_se; rt_se = rt_se->back) { 499 for (rt_se = back; rt_se; rt_se = rt_se->back) {
494 if (on_rt_rq(rt_se)) 500 if (on_rt_rq(rt_se))
495 dequeue_rt_entity(rt_se); 501 __dequeue_rt_entity(rt_se);
502 }
503}
504
505static void enqueue_rt_entity(struct sched_rt_entity *rt_se)
506{
507 dequeue_rt_stack(rt_se);
508 for_each_sched_rt_entity(rt_se)
509 __enqueue_rt_entity(rt_se);
510}
511
512static void dequeue_rt_entity(struct sched_rt_entity *rt_se)
513{
514 dequeue_rt_stack(rt_se);
515
516 for_each_sched_rt_entity(rt_se) {
517 struct rt_rq *rt_rq = group_rt_rq(rt_se);
518
519 if (rt_rq && rt_rq->rt_nr_running)
520 __enqueue_rt_entity(rt_se);
496 } 521 }
497} 522}
498 523
@@ -506,36 +531,15 @@ static void enqueue_task_rt(struct rq *rq, struct task_struct *p, int wakeup)
506 if (wakeup) 531 if (wakeup)
507 rt_se->timeout = 0; 532 rt_se->timeout = 0;
508 533
509 dequeue_rt_stack(p); 534 enqueue_rt_entity(rt_se);
510
511 /*
512 * enqueue everybody, bottom - up.
513 */
514 for_each_sched_rt_entity(rt_se)
515 enqueue_rt_entity(rt_se);
516
517 inc_cpu_load(rq, p->se.load.weight);
518} 535}
519 536
520static void dequeue_task_rt(struct rq *rq, struct task_struct *p, int sleep) 537static void dequeue_task_rt(struct rq *rq, struct task_struct *p, int sleep)
521{ 538{
522 struct sched_rt_entity *rt_se = &p->rt; 539 struct sched_rt_entity *rt_se = &p->rt;
523 struct rt_rq *rt_rq;
524 540
525 update_curr_rt(rq); 541 update_curr_rt(rq);
526 542 dequeue_rt_entity(rt_se);
527 dequeue_rt_stack(p);
528
529 /*
530 * re-enqueue all non-empty rt_rq entities.
531 */
532 for_each_sched_rt_entity(rt_se) {
533 rt_rq = group_rt_rq(rt_se);
534 if (rt_rq && rt_rq->rt_nr_running)
535 enqueue_rt_entity(rt_se);
536 }
537
538 dec_cpu_load(rq, p->se.load.weight);
539} 543}
540 544
541/* 545/*
@@ -546,8 +550,10 @@ static
546void requeue_rt_entity(struct rt_rq *rt_rq, struct sched_rt_entity *rt_se) 550void requeue_rt_entity(struct rt_rq *rt_rq, struct sched_rt_entity *rt_se)
547{ 551{
548 struct rt_prio_array *array = &rt_rq->active; 552 struct rt_prio_array *array = &rt_rq->active;
553 struct list_head *queue = array->queue + rt_se_prio(rt_se);
549 554
550 list_move_tail(&rt_se->run_list, array->queue + rt_se_prio(rt_se)); 555 if (on_rt_rq(rt_se))
556 list_move_tail(&rt_se->run_list, queue);
551} 557}
552 558
553static void requeue_task_rt(struct rq *rq, struct task_struct *p) 559static void requeue_task_rt(struct rq *rq, struct task_struct *p)
diff --git a/kernel/sched_stats.h b/kernel/sched_stats.h
index 5bae2e0c3ff2..80179ef7450e 100644
--- a/kernel/sched_stats.h
+++ b/kernel/sched_stats.h
@@ -67,6 +67,7 @@ static int show_schedstat(struct seq_file *seq, void *v)
67 preempt_enable(); 67 preempt_enable();
68#endif 68#endif
69 } 69 }
70 kfree(mask_str);
70 return 0; 71 return 0;
71} 72}
72 73
@@ -197,6 +198,9 @@ static inline void sched_info_queued(struct task_struct *t)
197/* 198/*
198 * Called when a process ceases being the active-running process, either 199 * Called when a process ceases being the active-running process, either
199 * voluntarily or involuntarily. Now we can calculate how long we ran. 200 * voluntarily or involuntarily. Now we can calculate how long we ran.
201 * Also, if the process is still in the TASK_RUNNING state, call
202 * sched_info_queued() to mark that it has now again started waiting on
203 * the runqueue.
200 */ 204 */
201static inline void sched_info_depart(struct task_struct *t) 205static inline void sched_info_depart(struct task_struct *t)
202{ 206{
@@ -205,6 +209,9 @@ static inline void sched_info_depart(struct task_struct *t)
205 209
206 t->sched_info.cpu_time += delta; 210 t->sched_info.cpu_time += delta;
207 rq_sched_info_depart(task_rq(t), delta); 211 rq_sched_info_depart(task_rq(t), delta);
212
213 if (t->state == TASK_RUNNING)
214 sched_info_queued(t);
208} 215}
209 216
210/* 217/*
diff --git a/kernel/signal.c b/kernel/signal.c
index 72bb4f51f963..6c0958e52ea7 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -231,6 +231,40 @@ void flush_signals(struct task_struct *t)
231 spin_unlock_irqrestore(&t->sighand->siglock, flags); 231 spin_unlock_irqrestore(&t->sighand->siglock, flags);
232} 232}
233 233
234static void __flush_itimer_signals(struct sigpending *pending)
235{
236 sigset_t signal, retain;
237 struct sigqueue *q, *n;
238
239 signal = pending->signal;
240 sigemptyset(&retain);
241
242 list_for_each_entry_safe(q, n, &pending->list, list) {
243 int sig = q->info.si_signo;
244
245 if (likely(q->info.si_code != SI_TIMER)) {
246 sigaddset(&retain, sig);
247 } else {
248 sigdelset(&signal, sig);
249 list_del_init(&q->list);
250 __sigqueue_free(q);
251 }
252 }
253
254 sigorsets(&pending->signal, &signal, &retain);
255}
256
257void flush_itimer_signals(void)
258{
259 struct task_struct *tsk = current;
260 unsigned long flags;
261
262 spin_lock_irqsave(&tsk->sighand->siglock, flags);
263 __flush_itimer_signals(&tsk->pending);
264 __flush_itimer_signals(&tsk->signal->shared_pending);
265 spin_unlock_irqrestore(&tsk->sighand->siglock, flags);
266}
267
234void ignore_signals(struct task_struct *t) 268void ignore_signals(struct task_struct *t)
235{ 269{
236 int i; 270 int i;
@@ -1240,17 +1274,22 @@ void sigqueue_free(struct sigqueue *q)
1240 1274
1241 BUG_ON(!(q->flags & SIGQUEUE_PREALLOC)); 1275 BUG_ON(!(q->flags & SIGQUEUE_PREALLOC));
1242 /* 1276 /*
1243 * If the signal is still pending remove it from the 1277 * We must hold ->siglock while testing q->list
1244 * pending queue. We must hold ->siglock while testing 1278 * to serialize with collect_signal() or with
1245 * q->list to serialize with collect_signal(). 1279 * __exit_signal()->flush_sigqueue().
1246 */ 1280 */
1247 spin_lock_irqsave(lock, flags); 1281 spin_lock_irqsave(lock, flags);
1282 q->flags &= ~SIGQUEUE_PREALLOC;
1283 /*
1284 * If it is queued it will be freed when dequeued,
1285 * like the "regular" sigqueue.
1286 */
1248 if (!list_empty(&q->list)) 1287 if (!list_empty(&q->list))
1249 list_del_init(&q->list); 1288 q = NULL;
1250 spin_unlock_irqrestore(lock, flags); 1289 spin_unlock_irqrestore(lock, flags);
1251 1290
1252 q->flags &= ~SIGQUEUE_PREALLOC; 1291 if (q)
1253 __sigqueue_free(q); 1292 __sigqueue_free(q);
1254} 1293}
1255 1294
1256int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group) 1295int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group)
diff --git a/kernel/softlockup.c b/kernel/softlockup.c
index 01b6522fd92b..a272d78185eb 100644
--- a/kernel/softlockup.c
+++ b/kernel/softlockup.c
@@ -49,12 +49,17 @@ static unsigned long get_timestamp(int this_cpu)
49 return cpu_clock(this_cpu) >> 30LL; /* 2^30 ~= 10^9 */ 49 return cpu_clock(this_cpu) >> 30LL; /* 2^30 ~= 10^9 */
50} 50}
51 51
52void touch_softlockup_watchdog(void) 52static void __touch_softlockup_watchdog(void)
53{ 53{
54 int this_cpu = raw_smp_processor_id(); 54 int this_cpu = raw_smp_processor_id();
55 55
56 __raw_get_cpu_var(touch_timestamp) = get_timestamp(this_cpu); 56 __raw_get_cpu_var(touch_timestamp) = get_timestamp(this_cpu);
57} 57}
58
59void touch_softlockup_watchdog(void)
60{
61 __raw_get_cpu_var(touch_timestamp) = 0;
62}
58EXPORT_SYMBOL(touch_softlockup_watchdog); 63EXPORT_SYMBOL(touch_softlockup_watchdog);
59 64
60void touch_all_softlockup_watchdogs(void) 65void touch_all_softlockup_watchdogs(void)
@@ -80,7 +85,7 @@ void softlockup_tick(void)
80 unsigned long now; 85 unsigned long now;
81 86
82 if (touch_timestamp == 0) { 87 if (touch_timestamp == 0) {
83 touch_softlockup_watchdog(); 88 __touch_softlockup_watchdog();
84 return; 89 return;
85 } 90 }
86 91
@@ -95,7 +100,7 @@ void softlockup_tick(void)
95 100
96 /* do not print during early bootup: */ 101 /* do not print during early bootup: */
97 if (unlikely(system_state != SYSTEM_RUNNING)) { 102 if (unlikely(system_state != SYSTEM_RUNNING)) {
98 touch_softlockup_watchdog(); 103 __touch_softlockup_watchdog();
99 return; 104 return;
100 } 105 }
101 106
@@ -115,6 +120,7 @@ void softlockup_tick(void)
115 printk(KERN_ERR "BUG: soft lockup - CPU#%d stuck for %lus! [%s:%d]\n", 120 printk(KERN_ERR "BUG: soft lockup - CPU#%d stuck for %lus! [%s:%d]\n",
116 this_cpu, now - touch_timestamp, 121 this_cpu, now - touch_timestamp,
117 current->comm, task_pid_nr(current)); 122 current->comm, task_pid_nr(current));
123 print_modules();
118 if (regs) 124 if (regs)
119 show_regs(regs); 125 show_regs(regs);
120 else 126 else
@@ -214,7 +220,7 @@ static int watchdog(void *__bind_cpu)
214 sched_setscheduler(current, SCHED_FIFO, &param); 220 sched_setscheduler(current, SCHED_FIFO, &param);
215 221
216 /* initialize timestamp */ 222 /* initialize timestamp */
217 touch_softlockup_watchdog(); 223 __touch_softlockup_watchdog();
218 224
219 set_current_state(TASK_INTERRUPTIBLE); 225 set_current_state(TASK_INTERRUPTIBLE);
220 /* 226 /*
@@ -223,7 +229,7 @@ static int watchdog(void *__bind_cpu)
223 * debug-printout triggers in softlockup_tick(). 229 * debug-printout triggers in softlockup_tick().
224 */ 230 */
225 while (!kthread_should_stop()) { 231 while (!kthread_should_stop()) {
226 touch_softlockup_watchdog(); 232 __touch_softlockup_watchdog();
227 schedule(); 233 schedule();
228 234
229 if (kthread_should_stop()) 235 if (kthread_should_stop())
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
index 0101aeef7ed7..b7350bbfb076 100644
--- a/kernel/stop_machine.c
+++ b/kernel/stop_machine.c
@@ -62,8 +62,7 @@ static int stopmachine(void *cpu)
62 * help our sisters onto their CPUs. */ 62 * help our sisters onto their CPUs. */
63 if (!prepared && !irqs_disabled) 63 if (!prepared && !irqs_disabled)
64 yield(); 64 yield();
65 else 65 cpu_relax();
66 cpu_relax();
67 } 66 }
68 67
69 /* Ack: we are exiting. */ 68 /* Ack: we are exiting. */
@@ -106,8 +105,10 @@ static int stop_machine(void)
106 } 105 }
107 106
108 /* Wait for them all to come to life. */ 107 /* Wait for them all to come to life. */
109 while (atomic_read(&stopmachine_thread_ack) != stopmachine_num_threads) 108 while (atomic_read(&stopmachine_thread_ack) != stopmachine_num_threads) {
110 yield(); 109 yield();
110 cpu_relax();
111 }
111 112
112 /* If some failed, kill them all. */ 113 /* If some failed, kill them all. */
113 if (ret < 0) { 114 if (ret < 0) {
diff --git a/kernel/sys.c b/kernel/sys.c
index 895d2d4c9493..14e97282eb6c 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -1652,7 +1652,7 @@ asmlinkage long sys_umask(int mask)
1652asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3, 1652asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3,
1653 unsigned long arg4, unsigned long arg5) 1653 unsigned long arg4, unsigned long arg5)
1654{ 1654{
1655 long uninitialized_var(error); 1655 long error = 0;
1656 1656
1657 if (security_task_prctl(option, arg2, arg3, arg4, arg5, &error)) 1657 if (security_task_prctl(option, arg2, arg3, arg4, arg5, &error))
1658 return error; 1658 return error;
@@ -1701,9 +1701,7 @@ asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3,
1701 error = PR_TIMING_STATISTICAL; 1701 error = PR_TIMING_STATISTICAL;
1702 break; 1702 break;
1703 case PR_SET_TIMING: 1703 case PR_SET_TIMING:
1704 if (arg2 == PR_TIMING_STATISTICAL) 1704 if (arg2 != PR_TIMING_STATISTICAL)
1705 error = 0;
1706 else
1707 error = -EINVAL; 1705 error = -EINVAL;
1708 break; 1706 break;
1709 1707
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index 57a1f02e5ec0..67f80c261709 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -30,6 +30,7 @@
30struct tick_device tick_broadcast_device; 30struct tick_device tick_broadcast_device;
31static cpumask_t tick_broadcast_mask; 31static cpumask_t tick_broadcast_mask;
32static DEFINE_SPINLOCK(tick_broadcast_lock); 32static DEFINE_SPINLOCK(tick_broadcast_lock);
33static int tick_broadcast_force;
33 34
34#ifdef CONFIG_TICK_ONESHOT 35#ifdef CONFIG_TICK_ONESHOT
35static void tick_broadcast_clear_oneshot(int cpu); 36static void tick_broadcast_clear_oneshot(int cpu);
@@ -232,10 +233,11 @@ static void tick_do_broadcast_on_off(void *why)
232 CLOCK_EVT_MODE_SHUTDOWN); 233 CLOCK_EVT_MODE_SHUTDOWN);
233 } 234 }
234 if (*reason == CLOCK_EVT_NOTIFY_BROADCAST_FORCE) 235 if (*reason == CLOCK_EVT_NOTIFY_BROADCAST_FORCE)
235 dev->features |= CLOCK_EVT_FEAT_DUMMY; 236 tick_broadcast_force = 1;
236 break; 237 break;
237 case CLOCK_EVT_NOTIFY_BROADCAST_OFF: 238 case CLOCK_EVT_NOTIFY_BROADCAST_OFF:
238 if (cpu_isset(cpu, tick_broadcast_mask)) { 239 if (!tick_broadcast_force &&
240 cpu_isset(cpu, tick_broadcast_mask)) {
239 cpu_clear(cpu, tick_broadcast_mask); 241 cpu_clear(cpu, tick_broadcast_mask);
240 if (td->mode == TICKDEV_MODE_PERIODIC) 242 if (td->mode == TICKDEV_MODE_PERIODIC)
241 tick_setup_periodic(dev, 0); 243 tick_setup_periodic(dev, 0);
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 29fc39f1029c..ce7799540c91 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -13,7 +13,7 @@
13 * Kai Petzke <wpp@marie.physik.tu-berlin.de> 13 * Kai Petzke <wpp@marie.physik.tu-berlin.de>
14 * Theodore Ts'o <tytso@mit.edu> 14 * Theodore Ts'o <tytso@mit.edu>
15 * 15 *
16 * Made to use alloc_percpu by Christoph Lameter <clameter@sgi.com>. 16 * Made to use alloc_percpu by Christoph Lameter.
17 */ 17 */
18 18
19#include <linux/module.h> 19#include <linux/module.h>
diff --git a/lib/bitrev.c b/lib/bitrev.c
index 989aff73f881..3956203456d4 100644
--- a/lib/bitrev.c
+++ b/lib/bitrev.c
@@ -42,10 +42,11 @@ const u8 byte_rev_table[256] = {
42}; 42};
43EXPORT_SYMBOL_GPL(byte_rev_table); 43EXPORT_SYMBOL_GPL(byte_rev_table);
44 44
45static __always_inline u16 bitrev16(u16 x) 45u16 bitrev16(u16 x)
46{ 46{
47 return (bitrev8(x & 0xff) << 8) | bitrev8(x >> 8); 47 return (bitrev8(x & 0xff) << 8) | bitrev8(x >> 8);
48} 48}
49EXPORT_SYMBOL(bitrev16);
49 50
50/** 51/**
51 * bitrev32 - reverse the order of bits in a u32 value 52 * bitrev32 - reverse the order of bits in a u32 value
diff --git a/lib/bug.c b/lib/bug.c
index 530f38f55787..bfeafd60ee9f 100644
--- a/lib/bug.c
+++ b/lib/bug.c
@@ -37,6 +37,7 @@
37 */ 37 */
38#include <linux/list.h> 38#include <linux/list.h>
39#include <linux/module.h> 39#include <linux/module.h>
40#include <linux/kernel.h>
40#include <linux/bug.h> 41#include <linux/bug.h>
41#include <linux/sched.h> 42#include <linux/sched.h>
42 43
@@ -149,6 +150,7 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
149 (void *)bugaddr); 150 (void *)bugaddr);
150 151
151 show_regs(regs); 152 show_regs(regs);
153 add_taint(TAINT_WARN);
152 return BUG_TRAP_TYPE_WARN; 154 return BUG_TRAP_TYPE_WARN;
153 } 155 }
154 156
diff --git a/lib/debugobjects.c b/lib/debugobjects.c
index a76a5e122ae1..85b18d79be89 100644
--- a/lib/debugobjects.c
+++ b/lib/debugobjects.c
@@ -68,6 +68,7 @@ static int fill_pool(void)
68{ 68{
69 gfp_t gfp = GFP_ATOMIC | __GFP_NORETRY | __GFP_NOWARN; 69 gfp_t gfp = GFP_ATOMIC | __GFP_NORETRY | __GFP_NOWARN;
70 struct debug_obj *new; 70 struct debug_obj *new;
71 unsigned long flags;
71 72
72 if (likely(obj_pool_free >= ODEBUG_POOL_MIN_LEVEL)) 73 if (likely(obj_pool_free >= ODEBUG_POOL_MIN_LEVEL))
73 return obj_pool_free; 74 return obj_pool_free;
@@ -81,10 +82,10 @@ static int fill_pool(void)
81 if (!new) 82 if (!new)
82 return obj_pool_free; 83 return obj_pool_free;
83 84
84 spin_lock(&pool_lock); 85 spin_lock_irqsave(&pool_lock, flags);
85 hlist_add_head(&new->node, &obj_pool); 86 hlist_add_head(&new->node, &obj_pool);
86 obj_pool_free++; 87 obj_pool_free++;
87 spin_unlock(&pool_lock); 88 spin_unlock_irqrestore(&pool_lock, flags);
88 } 89 }
89 return obj_pool_free; 90 return obj_pool_free;
90} 91}
@@ -110,16 +111,13 @@ static struct debug_obj *lookup_object(void *addr, struct debug_bucket *b)
110} 111}
111 112
112/* 113/*
113 * Allocate a new object. If the pool is empty and no refill possible, 114 * Allocate a new object. If the pool is empty, switch off the debugger.
114 * switch off the debugger.
115 */ 115 */
116static struct debug_obj * 116static struct debug_obj *
117alloc_object(void *addr, struct debug_bucket *b, struct debug_obj_descr *descr) 117alloc_object(void *addr, struct debug_bucket *b, struct debug_obj_descr *descr)
118{ 118{
119 struct debug_obj *obj = NULL; 119 struct debug_obj *obj = NULL;
120 int retry = 0;
121 120
122repeat:
123 spin_lock(&pool_lock); 121 spin_lock(&pool_lock);
124 if (obj_pool.first) { 122 if (obj_pool.first) {
125 obj = hlist_entry(obj_pool.first, typeof(*obj), node); 123 obj = hlist_entry(obj_pool.first, typeof(*obj), node);
@@ -141,9 +139,6 @@ repeat:
141 } 139 }
142 spin_unlock(&pool_lock); 140 spin_unlock(&pool_lock);
143 141
144 if (fill_pool() && !obj && !retry++)
145 goto repeat;
146
147 return obj; 142 return obj;
148} 143}
149 144
@@ -261,6 +256,8 @@ __debug_object_init(void *addr, struct debug_obj_descr *descr, int onstack)
261 struct debug_obj *obj; 256 struct debug_obj *obj;
262 unsigned long flags; 257 unsigned long flags;
263 258
259 fill_pool();
260
264 db = get_bucket((unsigned long) addr); 261 db = get_bucket((unsigned long) addr);
265 262
266 spin_lock_irqsave(&db->lock, flags); 263 spin_lock_irqsave(&db->lock, flags);
diff --git a/lib/div64.c b/lib/div64.c
index bb5bd0c0f030..a111eb8de9cf 100644
--- a/lib/div64.c
+++ b/lib/div64.c
@@ -98,3 +98,13 @@ EXPORT_SYMBOL(div64_u64);
98#endif 98#endif
99 99
100#endif /* BITS_PER_LONG == 32 */ 100#endif /* BITS_PER_LONG == 32 */
101
102/*
103 * Iterative div/mod for use when dividend is not expected to be much
104 * bigger than divisor.
105 */
106u32 iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder)
107{
108 return __iter_div_u64_rem(dividend, divisor, remainder);
109}
110EXPORT_SYMBOL(iter_div_u64_rem);
diff --git a/lib/lmb.c b/lib/lmb.c
index 867f7b5a8231..5d7b9286503e 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -48,7 +48,8 @@ void lmb_dump_all(void)
48 } 48 }
49 49
50 pr_info(" reserved.cnt = 0x%lx\n", lmb.reserved.cnt); 50 pr_info(" reserved.cnt = 0x%lx\n", lmb.reserved.cnt);
51 pr_info(" reserved.size = 0x%lx\n", lmb.reserved.size); 51 pr_info(" reserved.size = 0x%llx\n",
52 (unsigned long long)lmb.memory.size);
52 for (i=0; i < lmb.reserved.cnt ;i++) { 53 for (i=0; i < lmb.reserved.cnt ;i++) {
53 pr_info(" reserved.region[0x%lx].base = 0x%llx\n", 54 pr_info(" reserved.region[0x%lx].base = 0x%llx\n",
54 i, (unsigned long long)lmb.reserved.region[i].base); 55 i, (unsigned long long)lmb.reserved.region[i].base);
diff --git a/lib/radix-tree.c b/lib/radix-tree.c
index bd521716ab1a..56ec21a7f73d 100644
--- a/lib/radix-tree.c
+++ b/lib/radix-tree.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Copyright (C) 2001 Momchil Velikov 2 * Copyright (C) 2001 Momchil Velikov
3 * Portions Copyright (C) 2001 Christoph Hellwig 3 * Portions Copyright (C) 2001 Christoph Hellwig
4 * Copyright (C) 2005 SGI, Christoph Lameter <clameter@sgi.com> 4 * Copyright (C) 2005 SGI, Christoph Lameter
5 * Copyright (C) 2006 Nick Piggin 5 * Copyright (C) 2006 Nick Piggin
6 * 6 *
7 * This program is free software; you can redistribute it and/or 7 * This program is free software; you can redistribute it and/or
@@ -88,6 +88,57 @@ static inline gfp_t root_gfp_mask(struct radix_tree_root *root)
88 return root->gfp_mask & __GFP_BITS_MASK; 88 return root->gfp_mask & __GFP_BITS_MASK;
89} 89}
90 90
91static inline void tag_set(struct radix_tree_node *node, unsigned int tag,
92 int offset)
93{
94 __set_bit(offset, node->tags[tag]);
95}
96
97static inline void tag_clear(struct radix_tree_node *node, unsigned int tag,
98 int offset)
99{
100 __clear_bit(offset, node->tags[tag]);
101}
102
103static inline int tag_get(struct radix_tree_node *node, unsigned int tag,
104 int offset)
105{
106 return test_bit(offset, node->tags[tag]);
107}
108
109static inline void root_tag_set(struct radix_tree_root *root, unsigned int tag)
110{
111 root->gfp_mask |= (__force gfp_t)(1 << (tag + __GFP_BITS_SHIFT));
112}
113
114static inline void root_tag_clear(struct radix_tree_root *root, unsigned int tag)
115{
116 root->gfp_mask &= (__force gfp_t)~(1 << (tag + __GFP_BITS_SHIFT));
117}
118
119static inline void root_tag_clear_all(struct radix_tree_root *root)
120{
121 root->gfp_mask &= __GFP_BITS_MASK;
122}
123
124static inline int root_tag_get(struct radix_tree_root *root, unsigned int tag)
125{
126 return (__force unsigned)root->gfp_mask & (1 << (tag + __GFP_BITS_SHIFT));
127}
128
129/*
130 * Returns 1 if any slot in the node has this tag set.
131 * Otherwise returns 0.
132 */
133static inline int any_tag_set(struct radix_tree_node *node, unsigned int tag)
134{
135 int idx;
136 for (idx = 0; idx < RADIX_TREE_TAG_LONGS; idx++) {
137 if (node->tags[tag][idx])
138 return 1;
139 }
140 return 0;
141}
91/* 142/*
92 * This assumes that the caller has performed appropriate preallocation, and 143 * This assumes that the caller has performed appropriate preallocation, and
93 * that the caller has pinned this thread of control to the current CPU. 144 * that the caller has pinned this thread of control to the current CPU.
@@ -124,6 +175,17 @@ static void radix_tree_node_rcu_free(struct rcu_head *head)
124{ 175{
125 struct radix_tree_node *node = 176 struct radix_tree_node *node =
126 container_of(head, struct radix_tree_node, rcu_head); 177 container_of(head, struct radix_tree_node, rcu_head);
178
179 /*
180 * must only free zeroed nodes into the slab. radix_tree_shrink
181 * can leave us with a non-NULL entry in the first slot, so clear
182 * that here to make sure.
183 */
184 tag_clear(node, 0, 0);
185 tag_clear(node, 1, 0);
186 node->slots[0] = NULL;
187 node->count = 0;
188
127 kmem_cache_free(radix_tree_node_cachep, node); 189 kmem_cache_free(radix_tree_node_cachep, node);
128} 190}
129 191
@@ -165,59 +227,6 @@ out:
165} 227}
166EXPORT_SYMBOL(radix_tree_preload); 228EXPORT_SYMBOL(radix_tree_preload);
167 229
168static inline void tag_set(struct radix_tree_node *node, unsigned int tag,
169 int offset)
170{
171 __set_bit(offset, node->tags[tag]);
172}
173
174static inline void tag_clear(struct radix_tree_node *node, unsigned int tag,
175 int offset)
176{
177 __clear_bit(offset, node->tags[tag]);
178}
179
180static inline int tag_get(struct radix_tree_node *node, unsigned int tag,
181 int offset)
182{
183 return test_bit(offset, node->tags[tag]);
184}
185
186static inline void root_tag_set(struct radix_tree_root *root, unsigned int tag)
187{
188 root->gfp_mask |= (__force gfp_t)(1 << (tag + __GFP_BITS_SHIFT));
189}
190
191
192static inline void root_tag_clear(struct radix_tree_root *root, unsigned int tag)
193{
194 root->gfp_mask &= (__force gfp_t)~(1 << (tag + __GFP_BITS_SHIFT));
195}
196
197static inline void root_tag_clear_all(struct radix_tree_root *root)
198{
199 root->gfp_mask &= __GFP_BITS_MASK;
200}
201
202static inline int root_tag_get(struct radix_tree_root *root, unsigned int tag)
203{
204 return (__force unsigned)root->gfp_mask & (1 << (tag + __GFP_BITS_SHIFT));
205}
206
207/*
208 * Returns 1 if any slot in the node has this tag set.
209 * Otherwise returns 0.
210 */
211static inline int any_tag_set(struct radix_tree_node *node, unsigned int tag)
212{
213 int idx;
214 for (idx = 0; idx < RADIX_TREE_TAG_LONGS; idx++) {
215 if (node->tags[tag][idx])
216 return 1;
217 }
218 return 0;
219}
220
221/* 230/*
222 * Return the maximum key which can be store into a 231 * Return the maximum key which can be store into a
223 * radix tree with height HEIGHT. 232 * radix tree with height HEIGHT.
@@ -930,11 +939,6 @@ static inline void radix_tree_shrink(struct radix_tree_root *root)
930 newptr = radix_tree_ptr_to_indirect(newptr); 939 newptr = radix_tree_ptr_to_indirect(newptr);
931 root->rnode = newptr; 940 root->rnode = newptr;
932 root->height--; 941 root->height--;
933 /* must only free zeroed nodes into the slab */
934 tag_clear(to_free, 0, 0);
935 tag_clear(to_free, 1, 0);
936 to_free->slots[0] = NULL;
937 to_free->count = 0;
938 radix_tree_node_free(to_free); 942 radix_tree_node_free(to_free);
939 } 943 }
940} 944}
diff --git a/lib/ts_bm.c b/lib/ts_bm.c
index d90822c378a4..4a7fce72898e 100644
--- a/lib/ts_bm.c
+++ b/lib/ts_bm.c
@@ -63,7 +63,7 @@ static unsigned int bm_find(struct ts_config *conf, struct ts_state *state)
63 struct ts_bm *bm = ts_config_priv(conf); 63 struct ts_bm *bm = ts_config_priv(conf);
64 unsigned int i, text_len, consumed = state->offset; 64 unsigned int i, text_len, consumed = state->offset;
65 const u8 *text; 65 const u8 *text;
66 int shift = bm->patlen, bs; 66 int shift = bm->patlen - 1, bs;
67 67
68 for (;;) { 68 for (;;) {
69 text_len = conf->get_next_block(consumed, &text, conf, state); 69 text_len = conf->get_next_block(consumed, &text, conf, state);
diff --git a/mm/allocpercpu.c b/mm/allocpercpu.c
index f4026bae6eed..05f2b4009ccc 100644
--- a/mm/allocpercpu.c
+++ b/mm/allocpercpu.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * linux/mm/allocpercpu.c 2 * linux/mm/allocpercpu.c
3 * 3 *
4 * Separated from slab.c August 11, 2006 Christoph Lameter <clameter@sgi.com> 4 * Separated from slab.c August 11, 2006 Christoph Lameter
5 */ 5 */
6#include <linux/mm.h> 6#include <linux/mm.h>
7#include <linux/module.h> 7#include <linux/module.h>
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index 7c4f9e097095..f2e574dbc300 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -172,30 +172,22 @@ postcore_initcall(bdi_class_init);
172int bdi_register(struct backing_dev_info *bdi, struct device *parent, 172int bdi_register(struct backing_dev_info *bdi, struct device *parent,
173 const char *fmt, ...) 173 const char *fmt, ...)
174{ 174{
175 char *name;
176 va_list args; 175 va_list args;
177 int ret = 0; 176 int ret = 0;
178 struct device *dev; 177 struct device *dev;
179 178
180 va_start(args, fmt); 179 va_start(args, fmt);
181 name = kvasprintf(GFP_KERNEL, fmt, args); 180 dev = device_create_vargs(bdi_class, parent, MKDEV(0, 0), bdi, fmt, args);
182 va_end(args); 181 va_end(args);
183
184 if (!name)
185 return -ENOMEM;
186
187 dev = device_create(bdi_class, parent, MKDEV(0, 0), name);
188 if (IS_ERR(dev)) { 182 if (IS_ERR(dev)) {
189 ret = PTR_ERR(dev); 183 ret = PTR_ERR(dev);
190 goto exit; 184 goto exit;
191 } 185 }
192 186
193 bdi->dev = dev; 187 bdi->dev = dev;
194 dev_set_drvdata(bdi->dev, bdi); 188 bdi_debug_register(bdi, dev_name(dev));
195 bdi_debug_register(bdi, name);
196 189
197exit: 190exit:
198 kfree(name);
199 return ret; 191 return ret;
200} 192}
201EXPORT_SYMBOL(bdi_register); 193EXPORT_SYMBOL(bdi_register);
diff --git a/mm/bootmem.c b/mm/bootmem.c
index e8fb927392b9..8d9f60e06f62 100644
--- a/mm/bootmem.c
+++ b/mm/bootmem.c
@@ -442,15 +442,17 @@ unsigned long __init init_bootmem_node(pg_data_t *pgdat, unsigned long freepfn,
442 return init_bootmem_core(pgdat, freepfn, startpfn, endpfn); 442 return init_bootmem_core(pgdat, freepfn, startpfn, endpfn);
443} 443}
444 444
445void __init reserve_bootmem_node(pg_data_t *pgdat, unsigned long physaddr, 445int __init reserve_bootmem_node(pg_data_t *pgdat, unsigned long physaddr,
446 unsigned long size, int flags) 446 unsigned long size, int flags)
447{ 447{
448 int ret; 448 int ret;
449 449
450 ret = can_reserve_bootmem_core(pgdat->bdata, physaddr, size, flags); 450 ret = can_reserve_bootmem_core(pgdat->bdata, physaddr, size, flags);
451 if (ret < 0) 451 if (ret < 0)
452 return; 452 return -ENOMEM;
453 reserve_bootmem_core(pgdat->bdata, physaddr, size, flags); 453 reserve_bootmem_core(pgdat->bdata, physaddr, size, flags);
454
455 return 0;
454} 456}
455 457
456void __init free_bootmem_node(pg_data_t *pgdat, unsigned long physaddr, 458void __init free_bootmem_node(pg_data_t *pgdat, unsigned long physaddr,
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index bbf953eeb58b..ab171274ef21 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -785,7 +785,7 @@ int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src,
785 continue; 785 continue;
786 786
787 spin_lock(&dst->page_table_lock); 787 spin_lock(&dst->page_table_lock);
788 spin_lock(&src->page_table_lock); 788 spin_lock_nested(&src->page_table_lock, SINGLE_DEPTH_NESTING);
789 if (!huge_pte_none(huge_ptep_get(src_pte))) { 789 if (!huge_pte_none(huge_ptep_get(src_pte))) {
790 if (cow) 790 if (cow)
791 huge_ptep_set_wrprotect(src, addr, src_pte); 791 huge_ptep_set_wrprotect(src, addr, src_pte);
diff --git a/mm/memory.c b/mm/memory.c
index fb5608a120ed..2302d228fe04 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -999,17 +999,15 @@ struct page *follow_page(struct vm_area_struct *vma, unsigned long address,
999 goto no_page_table; 999 goto no_page_table;
1000 1000
1001 ptep = pte_offset_map_lock(mm, pmd, address, &ptl); 1001 ptep = pte_offset_map_lock(mm, pmd, address, &ptl);
1002 if (!ptep)
1003 goto out;
1004 1002
1005 pte = *ptep; 1003 pte = *ptep;
1006 if (!pte_present(pte)) 1004 if (!pte_present(pte))
1007 goto unlock; 1005 goto no_page;
1008 if ((flags & FOLL_WRITE) && !pte_write(pte)) 1006 if ((flags & FOLL_WRITE) && !pte_write(pte))
1009 goto unlock; 1007 goto unlock;
1010 page = vm_normal_page(vma, address, pte); 1008 page = vm_normal_page(vma, address, pte);
1011 if (unlikely(!page)) 1009 if (unlikely(!page))
1012 goto unlock; 1010 goto bad_page;
1013 1011
1014 if (flags & FOLL_GET) 1012 if (flags & FOLL_GET)
1015 get_page(page); 1013 get_page(page);
@@ -1024,6 +1022,15 @@ unlock:
1024out: 1022out:
1025 return page; 1023 return page;
1026 1024
1025bad_page:
1026 pte_unmap_unlock(ptep, ptl);
1027 return ERR_PTR(-EFAULT);
1028
1029no_page:
1030 pte_unmap_unlock(ptep, ptl);
1031 if (!pte_none(pte))
1032 return page;
1033 /* Fall through to ZERO_PAGE handling */
1027no_page_table: 1034no_page_table:
1028 /* 1035 /*
1029 * When core dumping an enormous anonymous area that nobody 1036 * When core dumping an enormous anonymous area that nobody
@@ -1038,6 +1045,26 @@ no_page_table:
1038 return page; 1045 return page;
1039} 1046}
1040 1047
1048/* Can we do the FOLL_ANON optimization? */
1049static inline int use_zero_page(struct vm_area_struct *vma)
1050{
1051 /*
1052 * We don't want to optimize FOLL_ANON for make_pages_present()
1053 * when it tries to page in a VM_LOCKED region. As to VM_SHARED,
1054 * we want to get the page from the page tables to make sure
1055 * that we serialize and update with any other user of that
1056 * mapping.
1057 */
1058 if (vma->vm_flags & (VM_LOCKED | VM_SHARED))
1059 return 0;
1060 /*
1061 * And if we have a fault or a nopfn routine, it's not an
1062 * anonymous region.
1063 */
1064 return !vma->vm_ops ||
1065 (!vma->vm_ops->fault && !vma->vm_ops->nopfn);
1066}
1067
1041int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, 1068int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
1042 unsigned long start, int len, int write, int force, 1069 unsigned long start, int len, int write, int force,
1043 struct page **pages, struct vm_area_struct **vmas) 1070 struct page **pages, struct vm_area_struct **vmas)
@@ -1112,8 +1139,7 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
1112 foll_flags = FOLL_TOUCH; 1139 foll_flags = FOLL_TOUCH;
1113 if (pages) 1140 if (pages)
1114 foll_flags |= FOLL_GET; 1141 foll_flags |= FOLL_GET;
1115 if (!write && !(vma->vm_flags & VM_LOCKED) && 1142 if (!write && use_zero_page(vma))
1116 (!vma->vm_ops || !vma->vm_ops->fault))
1117 foll_flags |= FOLL_ANON; 1143 foll_flags |= FOLL_ANON;
1118 1144
1119 do { 1145 do {
@@ -1125,7 +1151,7 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
1125 * be processed until returning to user space. 1151 * be processed until returning to user space.
1126 */ 1152 */
1127 if (unlikely(test_tsk_thread_flag(tsk, TIF_MEMDIE))) 1153 if (unlikely(test_tsk_thread_flag(tsk, TIF_MEMDIE)))
1128 return -ENOMEM; 1154 return i ? i : -ENOMEM;
1129 1155
1130 if (write) 1156 if (write)
1131 foll_flags |= FOLL_WRITE; 1157 foll_flags |= FOLL_WRITE;
@@ -1159,6 +1185,8 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
1159 1185
1160 cond_resched(); 1186 cond_resched();
1161 } 1187 }
1188 if (IS_ERR(page))
1189 return i ? i : PTR_ERR(page);
1162 if (pages) { 1190 if (pages) {
1163 pages[i] = page; 1191 pages[i] = page;
1164 1192
@@ -1669,8 +1697,19 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
1669 struct page *dirty_page = NULL; 1697 struct page *dirty_page = NULL;
1670 1698
1671 old_page = vm_normal_page(vma, address, orig_pte); 1699 old_page = vm_normal_page(vma, address, orig_pte);
1672 if (!old_page) 1700 if (!old_page) {
1701 /*
1702 * VM_MIXEDMAP !pfn_valid() case
1703 *
1704 * We should not cow pages in a shared writeable mapping.
1705 * Just mark the pages writable as we can't do any dirty
1706 * accounting on raw pfn maps.
1707 */
1708 if ((vma->vm_flags & (VM_WRITE|VM_SHARED)) ==
1709 (VM_WRITE|VM_SHARED))
1710 goto reuse;
1673 goto gotten; 1711 goto gotten;
1712 }
1674 1713
1675 /* 1714 /*
1676 * Take out anonymous pages first, anonymous shared vmas are 1715 * Take out anonymous pages first, anonymous shared vmas are
@@ -1723,6 +1762,7 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
1723 } 1762 }
1724 1763
1725 if (reuse) { 1764 if (reuse) {
1765reuse:
1726 flush_cache_page(vma, address, pte_pfn(orig_pte)); 1766 flush_cache_page(vma, address, pte_pfn(orig_pte));
1727 entry = pte_mkyoung(orig_pte); 1767 entry = pte_mkyoung(orig_pte);
1728 entry = maybe_mkwrite(pte_mkdirty(entry), vma); 1768 entry = maybe_mkwrite(pte_mkdirty(entry), vma);
@@ -1757,7 +1797,6 @@ gotten:
1757 page_table = pte_offset_map_lock(mm, pmd, address, &ptl); 1797 page_table = pte_offset_map_lock(mm, pmd, address, &ptl);
1758 if (likely(pte_same(*page_table, orig_pte))) { 1798 if (likely(pte_same(*page_table, orig_pte))) {
1759 if (old_page) { 1799 if (old_page) {
1760 page_remove_rmap(old_page, vma);
1761 if (!PageAnon(old_page)) { 1800 if (!PageAnon(old_page)) {
1762 dec_mm_counter(mm, file_rss); 1801 dec_mm_counter(mm, file_rss);
1763 inc_mm_counter(mm, anon_rss); 1802 inc_mm_counter(mm, anon_rss);
@@ -1779,6 +1818,32 @@ gotten:
1779 lru_cache_add_active(new_page); 1818 lru_cache_add_active(new_page);
1780 page_add_new_anon_rmap(new_page, vma, address); 1819 page_add_new_anon_rmap(new_page, vma, address);
1781 1820
1821 if (old_page) {
1822 /*
1823 * Only after switching the pte to the new page may
1824 * we remove the mapcount here. Otherwise another
1825 * process may come and find the rmap count decremented
1826 * before the pte is switched to the new page, and
1827 * "reuse" the old page writing into it while our pte
1828 * here still points into it and can be read by other
1829 * threads.
1830 *
1831 * The critical issue is to order this
1832 * page_remove_rmap with the ptp_clear_flush above.
1833 * Those stores are ordered by (if nothing else,)
1834 * the barrier present in the atomic_add_negative
1835 * in page_remove_rmap.
1836 *
1837 * Then the TLB flush in ptep_clear_flush ensures that
1838 * no process can access the old page before the
1839 * decremented mapcount is visible. And the old page
1840 * cannot be reused until after the decremented
1841 * mapcount is visible. So transitively, TLBs to
1842 * old page will be flushed before it can be reused.
1843 */
1844 page_remove_rmap(old_page, vma);
1845 }
1846
1782 /* Free the old page.. */ 1847 /* Free the old page.. */
1783 new_page = old_page; 1848 new_page = old_page;
1784 ret |= VM_FAULT_WRITE; 1849 ret |= VM_FAULT_WRITE;
@@ -2295,8 +2360,6 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
2295 vmf.flags = flags; 2360 vmf.flags = flags;
2296 vmf.page = NULL; 2361 vmf.page = NULL;
2297 2362
2298 BUG_ON(vma->vm_flags & VM_PFNMAP);
2299
2300 ret = vma->vm_ops->fault(vma, &vmf); 2363 ret = vma->vm_ops->fault(vma, &vmf);
2301 if (unlikely(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE))) 2364 if (unlikely(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE)))
2302 return ret; 2365 return ret;
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index a37a5034f63d..c94e58b192c3 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -729,7 +729,11 @@ static long do_get_mempolicy(int *policy, nodemask_t *nmask,
729 } else { 729 } else {
730 *policy = pol == &default_policy ? MPOL_DEFAULT : 730 *policy = pol == &default_policy ? MPOL_DEFAULT :
731 pol->mode; 731 pol->mode;
732 *policy |= pol->flags; 732 /*
733 * Internal mempolicy flags must be masked off before exposing
734 * the policy to userspace.
735 */
736 *policy |= (pol->flags & MPOL_MODE_FLAGS);
733 } 737 }
734 738
735 if (vma) { 739 if (vma) {
diff --git a/mm/migrate.c b/mm/migrate.c
index 449d77d409f5..55bd355d170d 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -9,7 +9,7 @@
9 * IWAMOTO Toshihiro <iwamoto@valinux.co.jp> 9 * IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
10 * Hirokazu Takahashi <taka@valinux.co.jp> 10 * Hirokazu Takahashi <taka@valinux.co.jp>
11 * Dave Hansen <haveblue@us.ibm.com> 11 * Dave Hansen <haveblue@us.ibm.com>
12 * Christoph Lameter <clameter@sgi.com> 12 * Christoph Lameter
13 */ 13 */
14 14
15#include <linux/migrate.h> 15#include <linux/migrate.h>
@@ -865,6 +865,11 @@ static int do_move_pages(struct mm_struct *mm, struct page_to_node *pm,
865 goto set_status; 865 goto set_status;
866 866
867 page = follow_page(vma, pp->addr, FOLL_GET); 867 page = follow_page(vma, pp->addr, FOLL_GET);
868
869 err = PTR_ERR(page);
870 if (IS_ERR(page))
871 goto set_status;
872
868 err = -ENOENT; 873 err = -ENOENT;
869 if (!page) 874 if (!page)
870 goto set_status; 875 goto set_status;
@@ -928,6 +933,11 @@ static int do_pages_stat(struct mm_struct *mm, struct page_to_node *pm)
928 goto set_status; 933 goto set_status;
929 934
930 page = follow_page(vma, pm->addr, 0); 935 page = follow_page(vma, pm->addr, 0);
936
937 err = PTR_ERR(page);
938 if (IS_ERR(page))
939 goto set_status;
940
931 err = -ENOENT; 941 err = -ENOENT;
932 /* Use PageReserved to check for zero page */ 942 /* Use PageReserved to check for zero page */
933 if (!page || PageReserved(page)) 943 if (!page || PageReserved(page))
diff --git a/mm/mmap.c b/mm/mmap.c
index fac66337da2a..3354fdd83d4b 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -80,7 +80,7 @@ EXPORT_SYMBOL(vm_get_page_prot);
80int sysctl_overcommit_memory = OVERCOMMIT_GUESS; /* heuristic overcommit */ 80int sysctl_overcommit_memory = OVERCOMMIT_GUESS; /* heuristic overcommit */
81int sysctl_overcommit_ratio = 50; /* default is 50% */ 81int sysctl_overcommit_ratio = 50; /* default is 50% */
82int sysctl_max_map_count __read_mostly = DEFAULT_MAX_MAP_COUNT; 82int sysctl_max_map_count __read_mostly = DEFAULT_MAX_MAP_COUNT;
83atomic_t vm_committed_space = ATOMIC_INIT(0); 83atomic_long_t vm_committed_space = ATOMIC_LONG_INIT(0);
84 84
85/* 85/*
86 * Check that a process has enough memory to allocate a new virtual 86 * Check that a process has enough memory to allocate a new virtual
@@ -177,7 +177,7 @@ int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin)
177 * cast `allowed' as a signed long because vm_committed_space 177 * cast `allowed' as a signed long because vm_committed_space
178 * sometimes has a negative value 178 * sometimes has a negative value
179 */ 179 */
180 if (atomic_read(&vm_committed_space) < (long)allowed) 180 if (atomic_long_read(&vm_committed_space) < (long)allowed)
181 return 0; 181 return 0;
182error: 182error:
183 vm_unacct_memory(pages); 183 vm_unacct_memory(pages);
@@ -245,10 +245,16 @@ asmlinkage unsigned long sys_brk(unsigned long brk)
245 unsigned long rlim, retval; 245 unsigned long rlim, retval;
246 unsigned long newbrk, oldbrk; 246 unsigned long newbrk, oldbrk;
247 struct mm_struct *mm = current->mm; 247 struct mm_struct *mm = current->mm;
248 unsigned long min_brk;
248 249
249 down_write(&mm->mmap_sem); 250 down_write(&mm->mmap_sem);
250 251
251 if (brk < mm->start_brk) 252#ifdef CONFIG_COMPAT_BRK
253 min_brk = mm->end_code;
254#else
255 min_brk = mm->start_brk;
256#endif
257 if (brk < min_brk)
252 goto out; 258 goto out;
253 259
254 /* 260 /*
diff --git a/mm/mprotect.c b/mm/mprotect.c
index a5bf31c27375..acfe7c8d72fc 100644
--- a/mm/mprotect.c
+++ b/mm/mprotect.c
@@ -47,19 +47,17 @@ static void change_pte_range(struct mm_struct *mm, pmd_t *pmd,
47 if (pte_present(oldpte)) { 47 if (pte_present(oldpte)) {
48 pte_t ptent; 48 pte_t ptent;
49 49
50 /* Avoid an SMP race with hardware updated dirty/clean 50 ptent = ptep_modify_prot_start(mm, addr, pte);
51 * bits by wiping the pte and then setting the new pte
52 * into place.
53 */
54 ptent = ptep_get_and_clear(mm, addr, pte);
55 ptent = pte_modify(ptent, newprot); 51 ptent = pte_modify(ptent, newprot);
52
56 /* 53 /*
57 * Avoid taking write faults for pages we know to be 54 * Avoid taking write faults for pages we know to be
58 * dirty. 55 * dirty.
59 */ 56 */
60 if (dirty_accountable && pte_dirty(ptent)) 57 if (dirty_accountable && pte_dirty(ptent))
61 ptent = pte_mkwrite(ptent); 58 ptent = pte_mkwrite(ptent);
62 set_pte_at(mm, addr, pte, ptent); 59
60 ptep_modify_prot_commit(mm, addr, pte, ptent);
63#ifdef CONFIG_MIGRATION 61#ifdef CONFIG_MIGRATION
64 } else if (!pte_file(oldpte)) { 62 } else if (!pte_file(oldpte)) {
65 swp_entry_t entry = pte_to_swp_entry(oldpte); 63 swp_entry_t entry = pte_to_swp_entry(oldpte);
diff --git a/mm/nommu.c b/mm/nommu.c
index ef8c62cec697..4462b6a3fcb9 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -39,7 +39,7 @@ struct page *mem_map;
39unsigned long max_mapnr; 39unsigned long max_mapnr;
40unsigned long num_physpages; 40unsigned long num_physpages;
41unsigned long askedalloc, realalloc; 41unsigned long askedalloc, realalloc;
42atomic_t vm_committed_space = ATOMIC_INIT(0); 42atomic_long_t vm_committed_space = ATOMIC_LONG_INIT(0);
43int sysctl_overcommit_memory = OVERCOMMIT_GUESS; /* heuristic overcommit */ 43int sysctl_overcommit_memory = OVERCOMMIT_GUESS; /* heuristic overcommit */
44int sysctl_overcommit_ratio = 50; /* default is 50% */ 44int sysctl_overcommit_ratio = 50; /* default is 50% */
45int sysctl_max_map_count = DEFAULT_MAX_MAP_COUNT; 45int sysctl_max_map_count = DEFAULT_MAX_MAP_COUNT;
@@ -109,16 +109,23 @@ unsigned int kobjsize(const void *objp)
109 * If the object we have should not have ksize performed on it, 109 * If the object we have should not have ksize performed on it,
110 * return size of 0 110 * return size of 0
111 */ 111 */
112 if (!objp || (unsigned long)objp >= memory_end || !((page = virt_to_page(objp)))) 112 if (!objp || !virt_addr_valid(objp))
113 return 0; 113 return 0;
114 114
115 page = virt_to_head_page(objp);
116
117 /*
118 * If the allocator sets PageSlab, we know the pointer came from
119 * kmalloc().
120 */
115 if (PageSlab(page)) 121 if (PageSlab(page))
116 return ksize(objp); 122 return ksize(objp);
117 123
118 BUG_ON(page->index < 0); 124 /*
119 BUG_ON(page->index >= MAX_ORDER); 125 * The ksize() function is only guaranteed to work for pointers
120 126 * returned by kmalloc(). So handle arbitrary pointers here.
121 return (PAGE_SIZE << page->index); 127 */
128 return PAGE_SIZE << compound_order(page);
122} 129}
123 130
124/* 131/*
@@ -1410,7 +1417,7 @@ int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin)
1410 * cast `allowed' as a signed long because vm_committed_space 1417 * cast `allowed' as a signed long because vm_committed_space
1411 * sometimes has a negative value 1418 * sometimes has a negative value
1412 */ 1419 */
1413 if (atomic_read(&vm_committed_space) < (long)allowed) 1420 if (atomic_long_read(&vm_committed_space) < (long)allowed)
1414 return 0; 1421 return 0;
1415error: 1422error:
1416 vm_unacct_memory(pages); 1423 vm_unacct_memory(pages);
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 63835579323a..f32fae3121f0 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -237,16 +237,7 @@ static void bad_page(struct page *page)
237 printk(KERN_EMERG "Trying to fix it up, but a reboot is needed\n" 237 printk(KERN_EMERG "Trying to fix it up, but a reboot is needed\n"
238 KERN_EMERG "Backtrace:\n"); 238 KERN_EMERG "Backtrace:\n");
239 dump_stack(); 239 dump_stack();
240 page->flags &= ~(1 << PG_lru | 240 page->flags &= ~PAGE_FLAGS_CLEAR_WHEN_BAD;
241 1 << PG_private |
242 1 << PG_locked |
243 1 << PG_active |
244 1 << PG_dirty |
245 1 << PG_reclaim |
246 1 << PG_slab |
247 1 << PG_swapcache |
248 1 << PG_writeback |
249 1 << PG_buddy );
250 set_page_count(page, 0); 241 set_page_count(page, 0);
251 reset_page_mapcount(page); 242 reset_page_mapcount(page);
252 page->mapping = NULL; 243 page->mapping = NULL;
@@ -463,16 +454,7 @@ static inline int free_pages_check(struct page *page)
463 (page->mapping != NULL) | 454 (page->mapping != NULL) |
464 (page_get_page_cgroup(page) != NULL) | 455 (page_get_page_cgroup(page) != NULL) |
465 (page_count(page) != 0) | 456 (page_count(page) != 0) |
466 (page->flags & ( 457 (page->flags & PAGE_FLAGS_CHECK_AT_FREE)))
467 1 << PG_lru |
468 1 << PG_private |
469 1 << PG_locked |
470 1 << PG_active |
471 1 << PG_slab |
472 1 << PG_swapcache |
473 1 << PG_writeback |
474 1 << PG_reserved |
475 1 << PG_buddy ))))
476 bad_page(page); 458 bad_page(page);
477 if (PageDirty(page)) 459 if (PageDirty(page))
478 __ClearPageDirty(page); 460 __ClearPageDirty(page);
@@ -616,17 +598,7 @@ static int prep_new_page(struct page *page, int order, gfp_t gfp_flags)
616 (page->mapping != NULL) | 598 (page->mapping != NULL) |
617 (page_get_page_cgroup(page) != NULL) | 599 (page_get_page_cgroup(page) != NULL) |
618 (page_count(page) != 0) | 600 (page_count(page) != 0) |
619 (page->flags & ( 601 (page->flags & PAGE_FLAGS_CHECK_AT_PREP)))
620 1 << PG_lru |
621 1 << PG_private |
622 1 << PG_locked |
623 1 << PG_active |
624 1 << PG_dirty |
625 1 << PG_slab |
626 1 << PG_swapcache |
627 1 << PG_writeback |
628 1 << PG_reserved |
629 1 << PG_buddy ))))
630 bad_page(page); 602 bad_page(page);
631 603
632 /* 604 /*
@@ -1396,6 +1368,9 @@ get_page_from_freelist(gfp_t gfp_mask, nodemask_t *nodemask, unsigned int order,
1396 1368
1397 (void)first_zones_zonelist(zonelist, high_zoneidx, nodemask, 1369 (void)first_zones_zonelist(zonelist, high_zoneidx, nodemask,
1398 &preferred_zone); 1370 &preferred_zone);
1371 if (!preferred_zone)
1372 return NULL;
1373
1399 classzone_idx = zone_idx(preferred_zone); 1374 classzone_idx = zone_idx(preferred_zone);
1400 1375
1401zonelist_scan: 1376zonelist_scan:
@@ -2353,7 +2328,6 @@ static void build_zonelists(pg_data_t *pgdat)
2353static void build_zonelist_cache(pg_data_t *pgdat) 2328static void build_zonelist_cache(pg_data_t *pgdat)
2354{ 2329{
2355 pgdat->node_zonelists[0].zlcache_ptr = NULL; 2330 pgdat->node_zonelists[0].zlcache_ptr = NULL;
2356 pgdat->node_zonelists[1].zlcache_ptr = NULL;
2357} 2331}
2358 2332
2359#endif /* CONFIG_NUMA */ 2333#endif /* CONFIG_NUMA */
@@ -2804,7 +2778,7 @@ int zone_wait_table_init(struct zone *zone, unsigned long zone_size_pages)
2804 alloc_size = zone->wait_table_hash_nr_entries 2778 alloc_size = zone->wait_table_hash_nr_entries
2805 * sizeof(wait_queue_head_t); 2779 * sizeof(wait_queue_head_t);
2806 2780
2807 if (system_state == SYSTEM_BOOTING) { 2781 if (!slab_is_available()) {
2808 zone->wait_table = (wait_queue_head_t *) 2782 zone->wait_table = (wait_queue_head_t *)
2809 alloc_bootmem_node(pgdat, alloc_size); 2783 alloc_bootmem_node(pgdat, alloc_size);
2810 } else { 2784 } else {
@@ -3378,7 +3352,8 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat,
3378 * is used by this zone for memmap. This affects the watermark 3352 * is used by this zone for memmap. This affects the watermark
3379 * and per-cpu initialisations 3353 * and per-cpu initialisations
3380 */ 3354 */
3381 memmap_pages = (size * sizeof(struct page)) >> PAGE_SHIFT; 3355 memmap_pages =
3356 PAGE_ALIGN(size * sizeof(struct page)) >> PAGE_SHIFT;
3382 if (realsize >= memmap_pages) { 3357 if (realsize >= memmap_pages) {
3383 realsize -= memmap_pages; 3358 realsize -= memmap_pages;
3384 printk(KERN_DEBUG 3359 printk(KERN_DEBUG
diff --git a/mm/pagewalk.c b/mm/pagewalk.c
index 0afd2387e507..d5878bed7841 100644
--- a/mm/pagewalk.c
+++ b/mm/pagewalk.c
@@ -3,14 +3,14 @@
3#include <linux/sched.h> 3#include <linux/sched.h>
4 4
5static int walk_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, 5static int walk_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
6 const struct mm_walk *walk, void *private) 6 struct mm_walk *walk)
7{ 7{
8 pte_t *pte; 8 pte_t *pte;
9 int err = 0; 9 int err = 0;
10 10
11 pte = pte_offset_map(pmd, addr); 11 pte = pte_offset_map(pmd, addr);
12 for (;;) { 12 for (;;) {
13 err = walk->pte_entry(pte, addr, addr + PAGE_SIZE, private); 13 err = walk->pte_entry(pte, addr, addr + PAGE_SIZE, walk);
14 if (err) 14 if (err)
15 break; 15 break;
16 addr += PAGE_SIZE; 16 addr += PAGE_SIZE;
@@ -24,7 +24,7 @@ static int walk_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
24} 24}
25 25
26static int walk_pmd_range(pud_t *pud, unsigned long addr, unsigned long end, 26static int walk_pmd_range(pud_t *pud, unsigned long addr, unsigned long end,
27 const struct mm_walk *walk, void *private) 27 struct mm_walk *walk)
28{ 28{
29 pmd_t *pmd; 29 pmd_t *pmd;
30 unsigned long next; 30 unsigned long next;
@@ -35,15 +35,15 @@ static int walk_pmd_range(pud_t *pud, unsigned long addr, unsigned long end,
35 next = pmd_addr_end(addr, end); 35 next = pmd_addr_end(addr, end);
36 if (pmd_none_or_clear_bad(pmd)) { 36 if (pmd_none_or_clear_bad(pmd)) {
37 if (walk->pte_hole) 37 if (walk->pte_hole)
38 err = walk->pte_hole(addr, next, private); 38 err = walk->pte_hole(addr, next, walk);
39 if (err) 39 if (err)
40 break; 40 break;
41 continue; 41 continue;
42 } 42 }
43 if (walk->pmd_entry) 43 if (walk->pmd_entry)
44 err = walk->pmd_entry(pmd, addr, next, private); 44 err = walk->pmd_entry(pmd, addr, next, walk);
45 if (!err && walk->pte_entry) 45 if (!err && walk->pte_entry)
46 err = walk_pte_range(pmd, addr, next, walk, private); 46 err = walk_pte_range(pmd, addr, next, walk);
47 if (err) 47 if (err)
48 break; 48 break;
49 } while (pmd++, addr = next, addr != end); 49 } while (pmd++, addr = next, addr != end);
@@ -52,7 +52,7 @@ static int walk_pmd_range(pud_t *pud, unsigned long addr, unsigned long end,
52} 52}
53 53
54static int walk_pud_range(pgd_t *pgd, unsigned long addr, unsigned long end, 54static int walk_pud_range(pgd_t *pgd, unsigned long addr, unsigned long end,
55 const struct mm_walk *walk, void *private) 55 struct mm_walk *walk)
56{ 56{
57 pud_t *pud; 57 pud_t *pud;
58 unsigned long next; 58 unsigned long next;
@@ -63,15 +63,15 @@ static int walk_pud_range(pgd_t *pgd, unsigned long addr, unsigned long end,
63 next = pud_addr_end(addr, end); 63 next = pud_addr_end(addr, end);
64 if (pud_none_or_clear_bad(pud)) { 64 if (pud_none_or_clear_bad(pud)) {
65 if (walk->pte_hole) 65 if (walk->pte_hole)
66 err = walk->pte_hole(addr, next, private); 66 err = walk->pte_hole(addr, next, walk);
67 if (err) 67 if (err)
68 break; 68 break;
69 continue; 69 continue;
70 } 70 }
71 if (walk->pud_entry) 71 if (walk->pud_entry)
72 err = walk->pud_entry(pud, addr, next, private); 72 err = walk->pud_entry(pud, addr, next, walk);
73 if (!err && (walk->pmd_entry || walk->pte_entry)) 73 if (!err && (walk->pmd_entry || walk->pte_entry))
74 err = walk_pmd_range(pud, addr, next, walk, private); 74 err = walk_pmd_range(pud, addr, next, walk);
75 if (err) 75 if (err)
76 break; 76 break;
77 } while (pud++, addr = next, addr != end); 77 } while (pud++, addr = next, addr != end);
@@ -85,15 +85,15 @@ static int walk_pud_range(pgd_t *pgd, unsigned long addr, unsigned long end,
85 * @addr: starting address 85 * @addr: starting address
86 * @end: ending address 86 * @end: ending address
87 * @walk: set of callbacks to invoke for each level of the tree 87 * @walk: set of callbacks to invoke for each level of the tree
88 * @private: private data passed to the callback function
89 * 88 *
90 * Recursively walk the page table for the memory area in a VMA, 89 * Recursively walk the page table for the memory area in a VMA,
91 * calling supplied callbacks. Callbacks are called in-order (first 90 * calling supplied callbacks. Callbacks are called in-order (first
92 * PGD, first PUD, first PMD, first PTE, second PTE... second PMD, 91 * PGD, first PUD, first PMD, first PTE, second PTE... second PMD,
93 * etc.). If lower-level callbacks are omitted, walking depth is reduced. 92 * etc.). If lower-level callbacks are omitted, walking depth is reduced.
94 * 93 *
95 * Each callback receives an entry pointer, the start and end of the 94 * Each callback receives an entry pointer and the start and end of the
96 * associated range, and a caller-supplied private data pointer. 95 * associated range, and a copy of the original mm_walk for access to
96 * the ->private or ->mm fields.
97 * 97 *
98 * No locks are taken, but the bottom level iterator will map PTE 98 * No locks are taken, but the bottom level iterator will map PTE
99 * directories from highmem if necessary. 99 * directories from highmem if necessary.
@@ -101,9 +101,8 @@ static int walk_pud_range(pgd_t *pgd, unsigned long addr, unsigned long end,
101 * If any callback returns a non-zero value, the walk is aborted and 101 * If any callback returns a non-zero value, the walk is aborted and
102 * the return value is propagated back to the caller. Otherwise 0 is returned. 102 * the return value is propagated back to the caller. Otherwise 0 is returned.
103 */ 103 */
104int walk_page_range(const struct mm_struct *mm, 104int walk_page_range(unsigned long addr, unsigned long end,
105 unsigned long addr, unsigned long end, 105 struct mm_walk *walk)
106 const struct mm_walk *walk, void *private)
107{ 106{
108 pgd_t *pgd; 107 pgd_t *pgd;
109 unsigned long next; 108 unsigned long next;
@@ -112,21 +111,24 @@ int walk_page_range(const struct mm_struct *mm,
112 if (addr >= end) 111 if (addr >= end)
113 return err; 112 return err;
114 113
115 pgd = pgd_offset(mm, addr); 114 if (!walk->mm)
115 return -EINVAL;
116
117 pgd = pgd_offset(walk->mm, addr);
116 do { 118 do {
117 next = pgd_addr_end(addr, end); 119 next = pgd_addr_end(addr, end);
118 if (pgd_none_or_clear_bad(pgd)) { 120 if (pgd_none_or_clear_bad(pgd)) {
119 if (walk->pte_hole) 121 if (walk->pte_hole)
120 err = walk->pte_hole(addr, next, private); 122 err = walk->pte_hole(addr, next, walk);
121 if (err) 123 if (err)
122 break; 124 break;
123 continue; 125 continue;
124 } 126 }
125 if (walk->pgd_entry) 127 if (walk->pgd_entry)
126 err = walk->pgd_entry(pgd, addr, next, private); 128 err = walk->pgd_entry(pgd, addr, next, walk);
127 if (!err && 129 if (!err &&
128 (walk->pud_entry || walk->pmd_entry || walk->pte_entry)) 130 (walk->pud_entry || walk->pmd_entry || walk->pte_entry))
129 err = walk_pud_range(pgd, addr, next, walk, private); 131 err = walk_pud_range(pgd, addr, next, walk);
130 if (err) 132 if (err)
131 break; 133 break;
132 } while (pgd++, addr = next, addr != end); 134 } while (pgd++, addr = next, addr != end);
diff --git a/mm/slab.c b/mm/slab.c
index 06236e4ddc1b..046607f05f3e 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3263,9 +3263,12 @@ retry:
3263 3263
3264 if (cpuset_zone_allowed_hardwall(zone, flags) && 3264 if (cpuset_zone_allowed_hardwall(zone, flags) &&
3265 cache->nodelists[nid] && 3265 cache->nodelists[nid] &&
3266 cache->nodelists[nid]->free_objects) 3266 cache->nodelists[nid]->free_objects) {
3267 obj = ____cache_alloc_node(cache, 3267 obj = ____cache_alloc_node(cache,
3268 flags | GFP_THISNODE, nid); 3268 flags | GFP_THISNODE, nid);
3269 if (obj)
3270 break;
3271 }
3269 } 3272 }
3270 3273
3271 if (!obj) { 3274 if (!obj) {
diff --git a/mm/slob.c b/mm/slob.c
index 6038cbadf796..a3ad6671adf1 100644
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -469,8 +469,9 @@ void *__kmalloc_node(size_t size, gfp_t gfp, int node)
469 return ZERO_SIZE_PTR; 469 return ZERO_SIZE_PTR;
470 470
471 m = slob_alloc(size + align, gfp, align, node); 471 m = slob_alloc(size + align, gfp, align, node);
472 if (m) 472 if (!m)
473 *m = size; 473 return NULL;
474 *m = size;
474 return (void *)m + align; 475 return (void *)m + align;
475 } else { 476 } else {
476 void *ret; 477 void *ret;
diff --git a/mm/slub.c b/mm/slub.c
index a505a828ef41..1a427c0ae83b 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -5,7 +5,7 @@
5 * The allocator synchronizes using per slab locks and only 5 * The allocator synchronizes using per slab locks and only
6 * uses a centralized lock to manage a pool of partial slabs. 6 * uses a centralized lock to manage a pool of partial slabs.
7 * 7 *
8 * (C) 2007 SGI, Christoph Lameter <clameter@sgi.com> 8 * (C) 2007 SGI, Christoph Lameter
9 */ 9 */
10 10
11#include <linux/mm.h> 11#include <linux/mm.h>
@@ -2726,9 +2726,10 @@ size_t ksize(const void *object)
2726 2726
2727 page = virt_to_head_page(object); 2727 page = virt_to_head_page(object);
2728 2728
2729 if (unlikely(!PageSlab(page))) 2729 if (unlikely(!PageSlab(page))) {
2730 WARN_ON(!PageCompound(page));
2730 return PAGE_SIZE << compound_order(page); 2731 return PAGE_SIZE << compound_order(page);
2731 2732 }
2732 s = page->slab; 2733 s = page->slab;
2733 2734
2734#ifdef CONFIG_SLUB_DEBUG 2735#ifdef CONFIG_SLUB_DEBUG
@@ -2994,8 +2995,6 @@ void __init kmem_cache_init(void)
2994 create_kmalloc_cache(&kmalloc_caches[1], 2995 create_kmalloc_cache(&kmalloc_caches[1],
2995 "kmalloc-96", 96, GFP_KERNEL); 2996 "kmalloc-96", 96, GFP_KERNEL);
2996 caches++; 2997 caches++;
2997 }
2998 if (KMALLOC_MIN_SIZE <= 128) {
2999 create_kmalloc_cache(&kmalloc_caches[2], 2998 create_kmalloc_cache(&kmalloc_caches[2],
3000 "kmalloc-192", 192, GFP_KERNEL); 2999 "kmalloc-192", 192, GFP_KERNEL);
3001 caches++; 3000 caches++;
@@ -3025,6 +3024,16 @@ void __init kmem_cache_init(void)
3025 for (i = 8; i < KMALLOC_MIN_SIZE; i += 8) 3024 for (i = 8; i < KMALLOC_MIN_SIZE; i += 8)
3026 size_index[(i - 1) / 8] = KMALLOC_SHIFT_LOW; 3025 size_index[(i - 1) / 8] = KMALLOC_SHIFT_LOW;
3027 3026
3027 if (KMALLOC_MIN_SIZE == 128) {
3028 /*
3029 * The 192 byte sized cache is not used if the alignment
3030 * is 128 byte. Redirect kmalloc to use the 256 byte cache
3031 * instead.
3032 */
3033 for (i = 128 + 8; i <= 192; i += 8)
3034 size_index[(i - 1) / 8] = 8;
3035 }
3036
3028 slab_state = UP; 3037 slab_state = UP;
3029 3038
3030 /* Provide the correct kmalloc names now that the caches are up */ 3039 /* Provide the correct kmalloc names now that the caches are up */
diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c
index 99c4f36eb8a3..a91b5f8fcaf6 100644
--- a/mm/sparse-vmemmap.c
+++ b/mm/sparse-vmemmap.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Virtual Memory Map support 2 * Virtual Memory Map support
3 * 3 *
4 * (C) 2007 sgi. Christoph Lameter <clameter@sgi.com>. 4 * (C) 2007 sgi. Christoph Lameter.
5 * 5 *
6 * Virtual memory maps allow VM primitives pfn_to_page, page_to_pfn, 6 * Virtual memory maps allow VM primitives pfn_to_page, page_to_pfn,
7 * virt_to_page, page_address() to be implemented as a base offset 7 * virt_to_page, page_address() to be implemented as a base offset
diff --git a/mm/swap.c b/mm/swap.c
index 91e194445a5e..45c9f25a8a3b 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -503,7 +503,7 @@ void vm_acct_memory(long pages)
503 local = &__get_cpu_var(committed_space); 503 local = &__get_cpu_var(committed_space);
504 *local += pages; 504 *local += pages;
505 if (*local > ACCT_THRESHOLD || *local < -ACCT_THRESHOLD) { 505 if (*local > ACCT_THRESHOLD || *local < -ACCT_THRESHOLD) {
506 atomic_add(*local, &vm_committed_space); 506 atomic_long_add(*local, &vm_committed_space);
507 *local = 0; 507 *local = 0;
508 } 508 }
509 preempt_enable(); 509 preempt_enable();
@@ -520,7 +520,7 @@ static int cpu_swap_callback(struct notifier_block *nfb,
520 520
521 committed = &per_cpu(committed_space, (long)hcpu); 521 committed = &per_cpu(committed_space, (long)hcpu);
522 if (action == CPU_DEAD || action == CPU_DEAD_FROZEN) { 522 if (action == CPU_DEAD || action == CPU_DEAD_FROZEN) {
523 atomic_add(*committed, &vm_committed_space); 523 atomic_long_add(*committed, &vm_committed_space);
524 *committed = 0; 524 *committed = 0;
525 drain_cpu_pagevecs((long)hcpu); 525 drain_cpu_pagevecs((long)hcpu);
526 } 526 }
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 9a29901ad3b3..967d30ccd92b 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1307,7 +1307,7 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
1307 struct scan_control *sc) 1307 struct scan_control *sc)
1308{ 1308{
1309 int priority; 1309 int priority;
1310 int ret = 0; 1310 unsigned long ret = 0;
1311 unsigned long total_scanned = 0; 1311 unsigned long total_scanned = 0;
1312 unsigned long nr_reclaimed = 0; 1312 unsigned long nr_reclaimed = 0;
1313 struct reclaim_state *reclaim_state = current->reclaim_state; 1313 struct reclaim_state *reclaim_state = current->reclaim_state;
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 2a739adaa92b..ab2225da0ee2 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -382,6 +382,18 @@ static void vlan_sync_address(struct net_device *dev,
382 memcpy(vlan->real_dev_addr, dev->dev_addr, ETH_ALEN); 382 memcpy(vlan->real_dev_addr, dev->dev_addr, ETH_ALEN);
383} 383}
384 384
385static void vlan_transfer_features(struct net_device *dev,
386 struct net_device *vlandev)
387{
388 unsigned long old_features = vlandev->features;
389
390 vlandev->features &= ~dev->vlan_features;
391 vlandev->features |= dev->features & dev->vlan_features;
392
393 if (old_features != vlandev->features)
394 netdev_features_change(vlandev);
395}
396
385static void __vlan_device_event(struct net_device *dev, unsigned long event) 397static void __vlan_device_event(struct net_device *dev, unsigned long event)
386{ 398{
387 switch (event) { 399 switch (event) {
@@ -410,10 +422,8 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
410 int i, flgs; 422 int i, flgs;
411 struct net_device *vlandev; 423 struct net_device *vlandev;
412 424
413 if (is_vlan_dev(dev)) { 425 if (is_vlan_dev(dev))
414 __vlan_device_event(dev, event); 426 __vlan_device_event(dev, event);
415 goto out;
416 }
417 427
418 grp = __vlan_find_group(dev); 428 grp = __vlan_find_group(dev);
419 if (!grp) 429 if (!grp)
@@ -450,6 +460,18 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
450 } 460 }
451 break; 461 break;
452 462
463 case NETDEV_FEAT_CHANGE:
464 /* Propagate device features to underlying device */
465 for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) {
466 vlandev = vlan_group_get_device(grp, i);
467 if (!vlandev)
468 continue;
469
470 vlan_transfer_features(dev, vlandev);
471 }
472
473 break;
474
453 case NETDEV_DOWN: 475 case NETDEV_DOWN:
454 /* Put all VLANs for this dev in the down state too. */ 476 /* Put all VLANs for this dev in the down state too. */
455 for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) { 477 for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) {
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index c961f0826005..5d055c242ed8 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -663,6 +663,8 @@ static int vlan_dev_init(struct net_device *dev)
663 (1<<__LINK_STATE_DORMANT))) | 663 (1<<__LINK_STATE_DORMANT))) |
664 (1<<__LINK_STATE_PRESENT); 664 (1<<__LINK_STATE_PRESENT);
665 665
666 dev->features |= real_dev->features & real_dev->vlan_features;
667
666 /* ipv6 shared card related stuff */ 668 /* ipv6 shared card related stuff */
667 dev->dev_id = real_dev->dev_id; 669 dev->dev_id = real_dev->dev_id;
668 670
diff --git a/net/atm/br2684.c b/net/atm/br2684.c
index 9d52ebfc1962..05fafdc2eea3 100644
--- a/net/atm/br2684.c
+++ b/net/atm/br2684.c
@@ -188,10 +188,13 @@ static int br2684_xmit_vcc(struct sk_buff *skb, struct br2684_dev *brdev,
188 return 0; 188 return 0;
189 } 189 }
190 } 190 }
191 } else { 191 } else { /* e_vc */
192 skb_push(skb, 2); 192 if (brdev->payload == p_bridged) {
193 if (brdev->payload == p_bridged) 193 skb_push(skb, 2);
194 memset(skb->data, 0, 2); 194 memset(skb->data, 0, 2);
195 } else { /* p_routed */
196 skb_pull(skb, ETH_HLEN);
197 }
195 } 198 }
196 skb_debug(skb); 199 skb_debug(skb);
197 200
@@ -377,11 +380,8 @@ static void br2684_push(struct atm_vcc *atmvcc, struct sk_buff *skb)
377 (skb->data + 6, ethertype_ipv4, 380 (skb->data + 6, ethertype_ipv4,
378 sizeof(ethertype_ipv4)) == 0) 381 sizeof(ethertype_ipv4)) == 0)
379 skb->protocol = __constant_htons(ETH_P_IP); 382 skb->protocol = __constant_htons(ETH_P_IP);
380 else { 383 else
381 brdev->stats.rx_errors++; 384 goto error;
382 dev_kfree_skb(skb);
383 return;
384 }
385 skb_pull(skb, sizeof(llc_oui_ipv4)); 385 skb_pull(skb, sizeof(llc_oui_ipv4));
386 skb_reset_network_header(skb); 386 skb_reset_network_header(skb);
387 skb->pkt_type = PACKET_HOST; 387 skb->pkt_type = PACKET_HOST;
@@ -394,44 +394,56 @@ static void br2684_push(struct atm_vcc *atmvcc, struct sk_buff *skb)
394 (memcmp(skb->data, llc_oui_pid_pad, 7) == 0)) { 394 (memcmp(skb->data, llc_oui_pid_pad, 7) == 0)) {
395 skb_pull(skb, sizeof(llc_oui_pid_pad)); 395 skb_pull(skb, sizeof(llc_oui_pid_pad));
396 skb->protocol = eth_type_trans(skb, net_dev); 396 skb->protocol = eth_type_trans(skb, net_dev);
397 } else { 397 } else
398 brdev->stats.rx_errors++; 398 goto error;
399 dev_kfree_skb(skb);
400 return;
401 }
402 399
403 } else { 400 } else { /* e_vc */
404 /* first 2 chars should be 0 */ 401 if (brdev->payload == p_routed) {
405 if (*((u16 *) (skb->data)) != 0) { 402 struct iphdr *iph;
406 brdev->stats.rx_errors++; 403
407 dev_kfree_skb(skb); 404 skb_reset_network_header(skb);
408 return; 405 iph = ip_hdr(skb);
406 if (iph->version == 4)
407 skb->protocol = __constant_htons(ETH_P_IP);
408 else if (iph->version == 6)
409 skb->protocol = __constant_htons(ETH_P_IPV6);
410 else
411 goto error;
412 skb->pkt_type = PACKET_HOST;
413 } else { /* p_bridged */
414 /* first 2 chars should be 0 */
415 if (*((u16 *) (skb->data)) != 0)
416 goto error;
417 skb_pull(skb, BR2684_PAD_LEN);
418 skb->protocol = eth_type_trans(skb, net_dev);
409 } 419 }
410 skb_pull(skb, BR2684_PAD_LEN + ETH_HLEN); /* pad, dstmac, srcmac, ethtype */
411 skb->protocol = eth_type_trans(skb, net_dev);
412 } 420 }
413 421
414#ifdef CONFIG_ATM_BR2684_IPFILTER 422#ifdef CONFIG_ATM_BR2684_IPFILTER
415 if (unlikely(packet_fails_filter(skb->protocol, brvcc, skb))) { 423 if (unlikely(packet_fails_filter(skb->protocol, brvcc, skb)))
416 brdev->stats.rx_dropped++; 424 goto dropped;
417 dev_kfree_skb(skb);
418 return;
419 }
420#endif /* CONFIG_ATM_BR2684_IPFILTER */ 425#endif /* CONFIG_ATM_BR2684_IPFILTER */
421 skb->dev = net_dev; 426 skb->dev = net_dev;
422 ATM_SKB(skb)->vcc = atmvcc; /* needed ? */ 427 ATM_SKB(skb)->vcc = atmvcc; /* needed ? */
423 pr_debug("received packet's protocol: %x\n", ntohs(skb->protocol)); 428 pr_debug("received packet's protocol: %x\n", ntohs(skb->protocol));
424 skb_debug(skb); 429 skb_debug(skb);
425 if (unlikely(!(net_dev->flags & IFF_UP))) { 430 /* sigh, interface is down? */
426 /* sigh, interface is down */ 431 if (unlikely(!(net_dev->flags & IFF_UP)))
427 brdev->stats.rx_dropped++; 432 goto dropped;
428 dev_kfree_skb(skb);
429 return;
430 }
431 brdev->stats.rx_packets++; 433 brdev->stats.rx_packets++;
432 brdev->stats.rx_bytes += skb->len; 434 brdev->stats.rx_bytes += skb->len;
433 memset(ATM_SKB(skb), 0, sizeof(struct atm_skb_data)); 435 memset(ATM_SKB(skb), 0, sizeof(struct atm_skb_data));
434 netif_rx(skb); 436 netif_rx(skb);
437 return;
438
439dropped:
440 brdev->stats.rx_dropped++;
441 goto free_skb;
442error:
443 brdev->stats.rx_errors++;
444free_skb:
445 dev_kfree_skb(skb);
446 return;
435} 447}
436 448
437/* 449/*
@@ -518,9 +530,9 @@ static int br2684_regvcc(struct atm_vcc *atmvcc, void __user * arg)
518 struct sk_buff *next = skb->next; 530 struct sk_buff *next = skb->next;
519 531
520 skb->next = skb->prev = NULL; 532 skb->next = skb->prev = NULL;
533 br2684_push(atmvcc, skb);
521 BRPRIV(skb->dev)->stats.rx_bytes -= skb->len; 534 BRPRIV(skb->dev)->stats.rx_bytes -= skb->len;
522 BRPRIV(skb->dev)->stats.rx_packets--; 535 BRPRIV(skb->dev)->stats.rx_packets--;
523 br2684_push(atmvcc, skb);
524 536
525 skb = next; 537 skb = next;
526 } 538 }
diff --git a/net/ax25/ax25_subr.c b/net/ax25/ax25_subr.c
index d8f215733175..034aa10a5198 100644
--- a/net/ax25/ax25_subr.c
+++ b/net/ax25/ax25_subr.c
@@ -64,20 +64,15 @@ void ax25_frames_acked(ax25_cb *ax25, unsigned short nr)
64 64
65void ax25_requeue_frames(ax25_cb *ax25) 65void ax25_requeue_frames(ax25_cb *ax25)
66{ 66{
67 struct sk_buff *skb, *skb_prev = NULL; 67 struct sk_buff *skb;
68 68
69 /* 69 /*
70 * Requeue all the un-ack-ed frames on the output queue to be picked 70 * Requeue all the un-ack-ed frames on the output queue to be picked
71 * up by ax25_kick called from the timer. This arrangement handles the 71 * up by ax25_kick called from the timer. This arrangement handles the
72 * possibility of an empty output queue. 72 * possibility of an empty output queue.
73 */ 73 */
74 while ((skb = skb_dequeue(&ax25->ack_queue)) != NULL) { 74 while ((skb = skb_dequeue_tail(&ax25->ack_queue)) != NULL)
75 if (skb_prev == NULL) 75 skb_queue_head(&ax25->write_queue, skb);
76 skb_queue_head(&ax25->write_queue, skb);
77 else
78 skb_append(skb_prev, skb, &ax25->write_queue);
79 skb_prev = skb;
80 }
81} 76}
82 77
83/* 78/*
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
index eb62558e9b09..0c2c93735e93 100644
--- a/net/bluetooth/rfcomm/core.c
+++ b/net/bluetooth/rfcomm/core.c
@@ -423,8 +423,8 @@ static int __rfcomm_dlc_close(struct rfcomm_dlc *d, int err)
423 423
424 rfcomm_dlc_lock(d); 424 rfcomm_dlc_lock(d);
425 d->state = BT_CLOSED; 425 d->state = BT_CLOSED;
426 rfcomm_dlc_unlock(d);
427 d->state_change(d, err); 426 d->state_change(d, err);
427 rfcomm_dlc_unlock(d);
428 428
429 skb_queue_purge(&d->tx_queue); 429 skb_queue_purge(&d->tx_queue);
430 rfcomm_dlc_unlink(d); 430 rfcomm_dlc_unlink(d);
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
index c3f749abb2d0..c9191871c1e0 100644
--- a/net/bluetooth/rfcomm/tty.c
+++ b/net/bluetooth/rfcomm/tty.c
@@ -566,11 +566,22 @@ static void rfcomm_dev_state_change(struct rfcomm_dlc *dlc, int err)
566 if (dlc->state == BT_CLOSED) { 566 if (dlc->state == BT_CLOSED) {
567 if (!dev->tty) { 567 if (!dev->tty) {
568 if (test_bit(RFCOMM_RELEASE_ONHUP, &dev->flags)) { 568 if (test_bit(RFCOMM_RELEASE_ONHUP, &dev->flags)) {
569 if (rfcomm_dev_get(dev->id) == NULL) 569 /* Drop DLC lock here to avoid deadlock
570 * 1. rfcomm_dev_get will take rfcomm_dev_lock
571 * but in rfcomm_dev_add there's lock order:
572 * rfcomm_dev_lock -> dlc lock
573 * 2. rfcomm_dev_put will deadlock if it's
574 * the last reference
575 */
576 rfcomm_dlc_unlock(dlc);
577 if (rfcomm_dev_get(dev->id) == NULL) {
578 rfcomm_dlc_lock(dlc);
570 return; 579 return;
580 }
571 581
572 rfcomm_dev_del(dev); 582 rfcomm_dev_del(dev);
573 rfcomm_dev_put(dev); 583 rfcomm_dev_put(dev);
584 rfcomm_dlc_lock(dlc);
574 } 585 }
575 } else 586 } else
576 tty_hangup(dev->tty); 587 tty_hangup(dev->tty);
diff --git a/net/core/dev.c b/net/core/dev.c
index a1607bc0cd4c..fca23a3bf12c 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -119,6 +119,7 @@
119#include <linux/err.h> 119#include <linux/err.h>
120#include <linux/ctype.h> 120#include <linux/ctype.h>
121#include <linux/if_arp.h> 121#include <linux/if_arp.h>
122#include <linux/if_vlan.h>
122 123
123#include "net-sysfs.h" 124#include "net-sysfs.h"
124 125
@@ -453,7 +454,7 @@ static int netdev_boot_setup_add(char *name, struct ifmap *map)
453 for (i = 0; i < NETDEV_BOOT_SETUP_MAX; i++) { 454 for (i = 0; i < NETDEV_BOOT_SETUP_MAX; i++) {
454 if (s[i].name[0] == '\0' || s[i].name[0] == ' ') { 455 if (s[i].name[0] == '\0' || s[i].name[0] == ' ') {
455 memset(s[i].name, 0, sizeof(s[i].name)); 456 memset(s[i].name, 0, sizeof(s[i].name));
456 strcpy(s[i].name, name); 457 strlcpy(s[i].name, name, IFNAMSIZ);
457 memcpy(&s[i].map, map, sizeof(s[i].map)); 458 memcpy(&s[i].map, map, sizeof(s[i].map));
458 break; 459 break;
459 } 460 }
@@ -478,7 +479,7 @@ int netdev_boot_setup_check(struct net_device *dev)
478 479
479 for (i = 0; i < NETDEV_BOOT_SETUP_MAX; i++) { 480 for (i = 0; i < NETDEV_BOOT_SETUP_MAX; i++) {
480 if (s[i].name[0] != '\0' && s[i].name[0] != ' ' && 481 if (s[i].name[0] != '\0' && s[i].name[0] != ' ' &&
481 !strncmp(dev->name, s[i].name, strlen(s[i].name))) { 482 !strcmp(dev->name, s[i].name)) {
482 dev->irq = s[i].map.irq; 483 dev->irq = s[i].map.irq;
483 dev->base_addr = s[i].map.base_addr; 484 dev->base_addr = s[i].map.base_addr;
484 dev->mem_start = s[i].map.mem_start; 485 dev->mem_start = s[i].map.mem_start;
@@ -903,7 +904,11 @@ int dev_change_name(struct net_device *dev, char *newname)
903 strlcpy(dev->name, newname, IFNAMSIZ); 904 strlcpy(dev->name, newname, IFNAMSIZ);
904 905
905rollback: 906rollback:
906 device_rename(&dev->dev, dev->name); 907 err = device_rename(&dev->dev, dev->name);
908 if (err) {
909 memcpy(dev->name, oldname, IFNAMSIZ);
910 return err;
911 }
907 912
908 write_lock_bh(&dev_base_lock); 913 write_lock_bh(&dev_base_lock);
909 hlist_del(&dev->name_hlist); 914 hlist_del(&dev->name_hlist);
@@ -1358,6 +1363,29 @@ void netif_device_attach(struct net_device *dev)
1358} 1363}
1359EXPORT_SYMBOL(netif_device_attach); 1364EXPORT_SYMBOL(netif_device_attach);
1360 1365
1366static bool can_checksum_protocol(unsigned long features, __be16 protocol)
1367{
1368 return ((features & NETIF_F_GEN_CSUM) ||
1369 ((features & NETIF_F_IP_CSUM) &&
1370 protocol == htons(ETH_P_IP)) ||
1371 ((features & NETIF_F_IPV6_CSUM) &&
1372 protocol == htons(ETH_P_IPV6)));
1373}
1374
1375static bool dev_can_checksum(struct net_device *dev, struct sk_buff *skb)
1376{
1377 if (can_checksum_protocol(dev->features, skb->protocol))
1378 return true;
1379
1380 if (skb->protocol == htons(ETH_P_8021Q)) {
1381 struct vlan_ethhdr *veh = (struct vlan_ethhdr *)skb->data;
1382 if (can_checksum_protocol(dev->features & dev->vlan_features,
1383 veh->h_vlan_encapsulated_proto))
1384 return true;
1385 }
1386
1387 return false;
1388}
1361 1389
1362/* 1390/*
1363 * Invalidate hardware checksum when packet is to be mangled, and 1391 * Invalidate hardware checksum when packet is to be mangled, and
@@ -1636,14 +1664,8 @@ int dev_queue_xmit(struct sk_buff *skb)
1636 if (skb->ip_summed == CHECKSUM_PARTIAL) { 1664 if (skb->ip_summed == CHECKSUM_PARTIAL) {
1637 skb_set_transport_header(skb, skb->csum_start - 1665 skb_set_transport_header(skb, skb->csum_start -
1638 skb_headroom(skb)); 1666 skb_headroom(skb));
1639 1667 if (!dev_can_checksum(dev, skb) && skb_checksum_help(skb))
1640 if (!(dev->features & NETIF_F_GEN_CSUM) && 1668 goto out_kfree_skb;
1641 !((dev->features & NETIF_F_IP_CSUM) &&
1642 skb->protocol == htons(ETH_P_IP)) &&
1643 !((dev->features & NETIF_F_IPV6_CSUM) &&
1644 skb->protocol == htons(ETH_P_IPV6)))
1645 if (skb_checksum_help(skb))
1646 goto out_kfree_skb;
1647 } 1669 }
1648 1670
1649gso: 1671gso:
@@ -2055,6 +2077,10 @@ int netif_receive_skb(struct sk_buff *skb)
2055 2077
2056 rcu_read_lock(); 2078 rcu_read_lock();
2057 2079
2080 /* Don't receive packets in an exiting network namespace */
2081 if (!net_alive(dev_net(skb->dev)))
2082 goto out;
2083
2058#ifdef CONFIG_NET_CLS_ACT 2084#ifdef CONFIG_NET_CLS_ACT
2059 if (skb->tc_verd & TC_NCLS) { 2085 if (skb->tc_verd & TC_NCLS) {
2060 skb->tc_verd = CLR_TC_NCLS(skb->tc_verd); 2086 skb->tc_verd = CLR_TC_NCLS(skb->tc_verd);
@@ -2947,7 +2973,7 @@ EXPORT_SYMBOL(dev_unicast_delete);
2947/** 2973/**
2948 * dev_unicast_add - add a secondary unicast address 2974 * dev_unicast_add - add a secondary unicast address
2949 * @dev: device 2975 * @dev: device
2950 * @addr: address to delete 2976 * @addr: address to add
2951 * @alen: length of @addr 2977 * @alen: length of @addr
2952 * 2978 *
2953 * Add a secondary unicast address to the device or increase 2979 * Add a secondary unicast address to the device or increase
@@ -3137,7 +3163,7 @@ int dev_change_flags(struct net_device *dev, unsigned flags)
3137 * Load in the correct multicast list now the flags have changed. 3163 * Load in the correct multicast list now the flags have changed.
3138 */ 3164 */
3139 3165
3140 if (dev->change_rx_flags && (dev->flags ^ flags) & IFF_MULTICAST) 3166 if (dev->change_rx_flags && (old_flags ^ flags) & IFF_MULTICAST)
3141 dev->change_rx_flags(dev, IFF_MULTICAST); 3167 dev->change_rx_flags(dev, IFF_MULTICAST);
3142 3168
3143 dev_set_rx_mode(dev); 3169 dev_set_rx_mode(dev);
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index e3e9ab0f74e3..277a2302eb3a 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -226,7 +226,7 @@ static int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
226 226
227 ops = lookup_rules_ops(net, frh->family); 227 ops = lookup_rules_ops(net, frh->family);
228 if (ops == NULL) { 228 if (ops == NULL) {
229 err = EAFNOSUPPORT; 229 err = -EAFNOSUPPORT;
230 goto errout; 230 goto errout;
231 } 231 }
232 232
@@ -365,7 +365,7 @@ static int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
365 365
366 ops = lookup_rules_ops(net, frh->family); 366 ops = lookup_rules_ops(net, frh->family);
367 if (ops == NULL) { 367 if (ops == NULL) {
368 err = EAFNOSUPPORT; 368 err = -EAFNOSUPPORT;
369 goto errout; 369 goto errout;
370 } 370 }
371 371
diff --git a/net/core/filter.c b/net/core/filter.c
index 4f8369729a4e..df3744355839 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -68,7 +68,6 @@ static inline void *load_pointer(struct sk_buff *skb, int k,
68 * sk_filter - run a packet through a socket filter 68 * sk_filter - run a packet through a socket filter
69 * @sk: sock associated with &sk_buff 69 * @sk: sock associated with &sk_buff
70 * @skb: buffer to filter 70 * @skb: buffer to filter
71 * @needlock: set to 1 if the sock is not locked by caller.
72 * 71 *
73 * Run the filter code and then cut skb->data to correct size returned by 72 * Run the filter code and then cut skb->data to correct size returned by
74 * sk_run_filter. If pkt_len is 0 we toss packet. If skb->len is smaller 73 * sk_run_filter. If pkt_len is 0 we toss packet. If skb->len is smaller
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 5d9d7130bd6e..65f01f71b3f3 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1714,7 +1714,8 @@ static int neightbl_fill_parms(struct sk_buff *skb, struct neigh_parms *parms)
1714 return nla_nest_end(skb, nest); 1714 return nla_nest_end(skb, nest);
1715 1715
1716nla_put_failure: 1716nla_put_failure:
1717 return nla_nest_cancel(skb, nest); 1717 nla_nest_cancel(skb, nest);
1718 return -EMSGSIZE;
1718} 1719}
1719 1720
1720static int neightbl_fill_info(struct sk_buff *skb, struct neigh_table *tbl, 1721static int neightbl_fill_info(struct sk_buff *skb, struct neigh_table *tbl,
@@ -2057,9 +2058,9 @@ static int neigh_fill_info(struct sk_buff *skb, struct neighbour *neigh,
2057 goto nla_put_failure; 2058 goto nla_put_failure;
2058 } 2059 }
2059 2060
2060 ci.ndm_used = now - neigh->used; 2061 ci.ndm_used = jiffies_to_clock_t(now - neigh->used);
2061 ci.ndm_confirmed = now - neigh->confirmed; 2062 ci.ndm_confirmed = jiffies_to_clock_t(now - neigh->confirmed);
2062 ci.ndm_updated = now - neigh->updated; 2063 ci.ndm_updated = jiffies_to_clock_t(now - neigh->updated);
2063 ci.ndm_refcnt = atomic_read(&neigh->refcnt) - 1; 2064 ci.ndm_refcnt = atomic_read(&neigh->refcnt) - 1;
2064 read_unlock_bh(&neigh->lock); 2065 read_unlock_bh(&neigh->lock);
2065 2066
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 72b4c184dd84..7c52fe277b62 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -140,6 +140,9 @@ static void cleanup_net(struct work_struct *work)
140 struct pernet_operations *ops; 140 struct pernet_operations *ops;
141 struct net *net; 141 struct net *net;
142 142
143 /* Be very certain incoming network packets will not find us */
144 rcu_barrier();
145
143 net = container_of(work, struct net, work); 146 net = container_of(work, struct net, work);
144 147
145 mutex_lock(&net_mutex); 148 mutex_lock(&net_mutex);
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 8dca21110493..fdf537707e51 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -390,6 +390,7 @@ struct pktgen_thread {
390 int cpu; 390 int cpu;
391 391
392 wait_queue_head_t queue; 392 wait_queue_head_t queue;
393 struct completion start_done;
393}; 394};
394 395
395#define REMOVE 1 396#define REMOVE 1
@@ -3414,6 +3415,7 @@ static int pktgen_thread_worker(void *arg)
3414 BUG_ON(smp_processor_id() != cpu); 3415 BUG_ON(smp_processor_id() != cpu);
3415 3416
3416 init_waitqueue_head(&t->queue); 3417 init_waitqueue_head(&t->queue);
3418 complete(&t->start_done);
3417 3419
3418 pr_debug("pktgen: starting pktgen/%d: pid=%d\n", cpu, task_pid_nr(current)); 3420 pr_debug("pktgen: starting pktgen/%d: pid=%d\n", cpu, task_pid_nr(current));
3419 3421
@@ -3615,6 +3617,7 @@ static int __init pktgen_create_thread(int cpu)
3615 INIT_LIST_HEAD(&t->if_list); 3617 INIT_LIST_HEAD(&t->if_list);
3616 3618
3617 list_add_tail(&t->th_list, &pktgen_threads); 3619 list_add_tail(&t->th_list, &pktgen_threads);
3620 init_completion(&t->start_done);
3618 3621
3619 p = kthread_create(pktgen_thread_worker, t, "kpktgend_%d", cpu); 3622 p = kthread_create(pktgen_thread_worker, t, "kpktgend_%d", cpu);
3620 if (IS_ERR(p)) { 3623 if (IS_ERR(p)) {
@@ -3639,6 +3642,7 @@ static int __init pktgen_create_thread(int cpu)
3639 } 3642 }
3640 3643
3641 wake_up_process(p); 3644 wake_up_process(p);
3645 wait_for_completion(&t->start_done);
3642 3646
3643 return 0; 3647 return 0;
3644} 3648}
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index cf857c4dc7b1..a9a77216310e 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -498,7 +498,8 @@ int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics)
498 return nla_nest_end(skb, mx); 498 return nla_nest_end(skb, mx);
499 499
500nla_put_failure: 500nla_put_failure:
501 return nla_nest_cancel(skb, mx); 501 nla_nest_cancel(skb, mx);
502 return -EMSGSIZE;
502} 503}
503 504
504int rtnl_put_cacheinfo(struct sk_buff *skb, struct dst_entry *dst, u32 id, 505int rtnl_put_cacheinfo(struct sk_buff *skb, struct dst_entry *dst, u32 id,
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 5c459f2b7985..366621610e76 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -1292,12 +1292,14 @@ static int __skb_splice_bits(struct sk_buff *skb, unsigned int *offset,
1292{ 1292{
1293 unsigned int nr_pages = spd->nr_pages; 1293 unsigned int nr_pages = spd->nr_pages;
1294 unsigned int poff, plen, len, toff, tlen; 1294 unsigned int poff, plen, len, toff, tlen;
1295 int headlen, seg; 1295 int headlen, seg, error = 0;
1296 1296
1297 toff = *offset; 1297 toff = *offset;
1298 tlen = *total_len; 1298 tlen = *total_len;
1299 if (!tlen) 1299 if (!tlen) {
1300 error = 1;
1300 goto err; 1301 goto err;
1302 }
1301 1303
1302 /* 1304 /*
1303 * if the offset is greater than the linear part, go directly to 1305 * if the offset is greater than the linear part, go directly to
@@ -1339,7 +1341,8 @@ static int __skb_splice_bits(struct sk_buff *skb, unsigned int *offset,
1339 * just jump directly to update and return, no point 1341 * just jump directly to update and return, no point
1340 * in going over fragments when the output is full. 1342 * in going over fragments when the output is full.
1341 */ 1343 */
1342 if (spd_fill_page(spd, virt_to_page(p), plen, poff, skb)) 1344 error = spd_fill_page(spd, virt_to_page(p), plen, poff, skb);
1345 if (error)
1343 goto done; 1346 goto done;
1344 1347
1345 tlen -= plen; 1348 tlen -= plen;
@@ -1369,7 +1372,8 @@ map_frag:
1369 if (!plen) 1372 if (!plen)
1370 break; 1373 break;
1371 1374
1372 if (spd_fill_page(spd, f->page, plen, poff, skb)) 1375 error = spd_fill_page(spd, f->page, plen, poff, skb);
1376 if (error)
1373 break; 1377 break;
1374 1378
1375 tlen -= plen; 1379 tlen -= plen;
@@ -1382,7 +1386,10 @@ done:
1382 return 0; 1386 return 0;
1383 } 1387 }
1384err: 1388err:
1385 return 1; 1389 /* update the offset to reflect the linear part skip, if any */
1390 if (!error)
1391 *offset = toff;
1392 return error;
1386} 1393}
1387 1394
1388/* 1395/*
@@ -1445,6 +1452,7 @@ done:
1445 1452
1446 if (spd.nr_pages) { 1453 if (spd.nr_pages) {
1447 int ret; 1454 int ret;
1455 struct sock *sk = __skb->sk;
1448 1456
1449 /* 1457 /*
1450 * Drop the socket lock, otherwise we have reverse 1458 * Drop the socket lock, otherwise we have reverse
@@ -1455,9 +1463,9 @@ done:
1455 * we call into ->sendpage() with the i_mutex lock held 1463 * we call into ->sendpage() with the i_mutex lock held
1456 * and networking will grab the socket lock. 1464 * and networking will grab the socket lock.
1457 */ 1465 */
1458 release_sock(__skb->sk); 1466 release_sock(sk);
1459 ret = splice_to_pipe(pipe, &spd); 1467 ret = splice_to_pipe(pipe, &spd);
1460 lock_sock(__skb->sk); 1468 lock_sock(sk);
1461 return ret; 1469 return ret;
1462 } 1470 }
1463 1471
diff --git a/net/core/user_dma.c b/net/core/user_dma.c
index 0ad1cd57bc39..c77aff9c6eb3 100644
--- a/net/core/user_dma.c
+++ b/net/core/user_dma.c
@@ -75,7 +75,7 @@ int dma_skb_copy_datagram_iovec(struct dma_chan *chan,
75 75
76 end = start + skb_shinfo(skb)->frags[i].size; 76 end = start + skb_shinfo(skb)->frags[i].size;
77 copy = end - offset; 77 copy = end - offset;
78 if ((copy = end - offset) > 0) { 78 if (copy > 0) {
79 skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; 79 skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
80 struct page *page = frag->page; 80 struct page *page = frag->page;
81 81
diff --git a/net/dccp/ackvec.c b/net/dccp/ackvec.c
index 6de4bd195d28..1e8be246ad15 100644
--- a/net/dccp/ackvec.c
+++ b/net/dccp/ackvec.c
@@ -290,12 +290,12 @@ int dccp_ackvec_add(struct dccp_ackvec *av, const struct sock *sk,
290 290
291 while (1) { 291 while (1) {
292 const u8 len = dccp_ackvec_len(av, index); 292 const u8 len = dccp_ackvec_len(av, index);
293 const u8 state = dccp_ackvec_state(av, index); 293 const u8 av_state = dccp_ackvec_state(av, index);
294 /* 294 /*
295 * valid packets not yet in av_buf have a reserved 295 * valid packets not yet in av_buf have a reserved
296 * entry, with a len equal to 0. 296 * entry, with a len equal to 0.
297 */ 297 */
298 if (state == DCCP_ACKVEC_STATE_NOT_RECEIVED && 298 if (av_state == DCCP_ACKVEC_STATE_NOT_RECEIVED &&
299 len == 0 && delta == 0) { /* Found our 299 len == 0 && delta == 0) { /* Found our
300 reserved seat! */ 300 reserved seat! */
301 dccp_pr_debug("Found %llu reserved seat!\n", 301 dccp_pr_debug("Found %llu reserved seat!\n",
@@ -325,31 +325,6 @@ out_duplicate:
325 return -EILSEQ; 325 return -EILSEQ;
326} 326}
327 327
328#ifdef CONFIG_IP_DCCP_DEBUG
329void dccp_ackvector_print(const u64 ackno, const unsigned char *vector, int len)
330{
331 dccp_pr_debug_cat("ACK vector len=%d, ackno=%llu |", len,
332 (unsigned long long)ackno);
333
334 while (len--) {
335 const u8 state = (*vector & DCCP_ACKVEC_STATE_MASK) >> 6;
336 const u8 rl = *vector & DCCP_ACKVEC_LEN_MASK;
337
338 dccp_pr_debug_cat("%d,%d|", state, rl);
339 ++vector;
340 }
341
342 dccp_pr_debug_cat("\n");
343}
344
345void dccp_ackvec_print(const struct dccp_ackvec *av)
346{
347 dccp_ackvector_print(av->av_buf_ackno,
348 av->av_buf + av->av_buf_head,
349 av->av_vec_len);
350}
351#endif
352
353static void dccp_ackvec_throw_record(struct dccp_ackvec *av, 328static void dccp_ackvec_throw_record(struct dccp_ackvec *av,
354 struct dccp_ackvec_record *avr) 329 struct dccp_ackvec_record *avr)
355{ 330{
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index cd61dea2eea1..a1929f33d703 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -159,8 +159,8 @@ static void ccid3_hc_tx_update_x(struct sock *sk, ktime_t *stamp)
159 } else if (ktime_us_delta(now, hctx->ccid3hctx_t_ld) 159 } else if (ktime_us_delta(now, hctx->ccid3hctx_t_ld)
160 - (s64)hctx->ccid3hctx_rtt >= 0) { 160 - (s64)hctx->ccid3hctx_rtt >= 0) {
161 161
162 hctx->ccid3hctx_x = 162 hctx->ccid3hctx_x = min(2 * hctx->ccid3hctx_x, min_rate);
163 max(min(2 * hctx->ccid3hctx_x, min_rate), 163 hctx->ccid3hctx_x = max(hctx->ccid3hctx_x,
164 scaled_div(((__u64)hctx->ccid3hctx_s) << 6, 164 scaled_div(((__u64)hctx->ccid3hctx_s) << 6,
165 hctx->ccid3hctx_rtt)); 165 hctx->ccid3hctx_rtt));
166 hctx->ccid3hctx_t_ld = now; 166 hctx->ccid3hctx_t_ld = now;
@@ -193,22 +193,17 @@ static inline void ccid3_hc_tx_update_s(struct ccid3_hc_tx_sock *hctx, int len)
193 193
194/* 194/*
195 * Update Window Counter using the algorithm from [RFC 4342, 8.1]. 195 * Update Window Counter using the algorithm from [RFC 4342, 8.1].
196 * The algorithm is not applicable if RTT < 4 microseconds. 196 * As elsewhere, RTT > 0 is assumed by using dccp_sample_rtt().
197 */ 197 */
198static inline void ccid3_hc_tx_update_win_count(struct ccid3_hc_tx_sock *hctx, 198static inline void ccid3_hc_tx_update_win_count(struct ccid3_hc_tx_sock *hctx,
199 ktime_t now) 199 ktime_t now)
200{ 200{
201 u32 quarter_rtts; 201 u32 delta = ktime_us_delta(now, hctx->ccid3hctx_t_last_win_count),
202 202 quarter_rtts = (4 * delta) / hctx->ccid3hctx_rtt;
203 if (unlikely(hctx->ccid3hctx_rtt < 4)) /* avoid divide-by-zero */
204 return;
205
206 quarter_rtts = ktime_us_delta(now, hctx->ccid3hctx_t_last_win_count);
207 quarter_rtts /= hctx->ccid3hctx_rtt / 4;
208 203
209 if (quarter_rtts > 0) { 204 if (quarter_rtts > 0) {
210 hctx->ccid3hctx_t_last_win_count = now; 205 hctx->ccid3hctx_t_last_win_count = now;
211 hctx->ccid3hctx_last_win_count += min_t(u32, quarter_rtts, 5); 206 hctx->ccid3hctx_last_win_count += min(quarter_rtts, 5U);
212 hctx->ccid3hctx_last_win_count &= 0xF; /* mod 16 */ 207 hctx->ccid3hctx_last_win_count &= 0xF; /* mod 16 */
213 } 208 }
214} 209}
@@ -334,8 +329,14 @@ static int ccid3_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb)
334 hctx->ccid3hctx_x = rfc3390_initial_rate(sk); 329 hctx->ccid3hctx_x = rfc3390_initial_rate(sk);
335 hctx->ccid3hctx_t_ld = now; 330 hctx->ccid3hctx_t_ld = now;
336 } else { 331 } else {
337 /* Sender does not have RTT sample: X_pps = 1 pkt/sec */ 332 /*
338 hctx->ccid3hctx_x = hctx->ccid3hctx_s; 333 * Sender does not have RTT sample:
334 * - set fallback RTT (RFC 4340, 3.4) since a RTT value
335 * is needed in several parts (e.g. window counter);
336 * - set sending rate X_pps = 1pps as per RFC 3448, 4.2.
337 */
338 hctx->ccid3hctx_rtt = DCCP_FALLBACK_RTT;
339 hctx->ccid3hctx_x = hctx->ccid3hctx_s;
339 hctx->ccid3hctx_x <<= 6; 340 hctx->ccid3hctx_x <<= 6;
340 } 341 }
341 ccid3_update_send_interval(hctx); 342 ccid3_update_send_interval(hctx);
diff --git a/net/dccp/ccids/lib/tfrc.c b/net/dccp/ccids/lib/tfrc.c
index d1dfbb8de64c..97ecec0a8e76 100644
--- a/net/dccp/ccids/lib/tfrc.c
+++ b/net/dccp/ccids/lib/tfrc.c
@@ -14,14 +14,6 @@ module_param(tfrc_debug, bool, 0444);
14MODULE_PARM_DESC(tfrc_debug, "Enable debug messages"); 14MODULE_PARM_DESC(tfrc_debug, "Enable debug messages");
15#endif 15#endif
16 16
17extern int tfrc_tx_packet_history_init(void);
18extern void tfrc_tx_packet_history_exit(void);
19extern int tfrc_rx_packet_history_init(void);
20extern void tfrc_rx_packet_history_exit(void);
21
22extern int tfrc_li_init(void);
23extern void tfrc_li_exit(void);
24
25static int __init tfrc_module_init(void) 17static int __init tfrc_module_init(void)
26{ 18{
27 int rc = tfrc_li_init(); 19 int rc = tfrc_li_init();
diff --git a/net/dccp/ccids/lib/tfrc.h b/net/dccp/ccids/lib/tfrc.h
index 1fb1187bbf1c..ed9857527acf 100644
--- a/net/dccp/ccids/lib/tfrc.h
+++ b/net/dccp/ccids/lib/tfrc.h
@@ -15,7 +15,7 @@
15 * (at your option) any later version. 15 * (at your option) any later version.
16 */ 16 */
17#include <linux/types.h> 17#include <linux/types.h>
18#include <asm/div64.h> 18#include <linux/math64.h>
19#include "../../dccp.h" 19#include "../../dccp.h"
20/* internal includes that this module exports: */ 20/* internal includes that this module exports: */
21#include "loss_interval.h" 21#include "loss_interval.h"
@@ -29,21 +29,19 @@ extern int tfrc_debug;
29#endif 29#endif
30 30
31/* integer-arithmetic divisions of type (a * 1000000)/b */ 31/* integer-arithmetic divisions of type (a * 1000000)/b */
32static inline u64 scaled_div(u64 a, u32 b) 32static inline u64 scaled_div(u64 a, u64 b)
33{ 33{
34 BUG_ON(b==0); 34 BUG_ON(b==0);
35 a *= 1000000; 35 return div64_u64(a * 1000000, b);
36 do_div(a, b);
37 return a;
38} 36}
39 37
40static inline u32 scaled_div32(u64 a, u32 b) 38static inline u32 scaled_div32(u64 a, u64 b)
41{ 39{
42 u64 result = scaled_div(a, b); 40 u64 result = scaled_div(a, b);
43 41
44 if (result > UINT_MAX) { 42 if (result > UINT_MAX) {
45 DCCP_CRIT("Overflow: a(%llu)/b(%u) > ~0U", 43 DCCP_CRIT("Overflow: %llu/%llu > UINT_MAX",
46 (unsigned long long)a, b); 44 (unsigned long long)a, (unsigned long long)b);
47 return UINT_MAX; 45 return UINT_MAX;
48 } 46 }
49 return result; 47 return result;
@@ -58,7 +56,14 @@ static inline u32 tfrc_ewma(const u32 avg, const u32 newval, const u8 weight)
58 return avg ? (weight * avg + (10 - weight) * newval) / 10 : newval; 56 return avg ? (weight * avg + (10 - weight) * newval) / 10 : newval;
59} 57}
60 58
61extern u32 tfrc_calc_x(u16 s, u32 R, u32 p); 59extern u32 tfrc_calc_x(u16 s, u32 R, u32 p);
62extern u32 tfrc_calc_x_reverse_lookup(u32 fvalue); 60extern u32 tfrc_calc_x_reverse_lookup(u32 fvalue);
63 61
62extern int tfrc_tx_packet_history_init(void);
63extern void tfrc_tx_packet_history_exit(void);
64extern int tfrc_rx_packet_history_init(void);
65extern void tfrc_rx_packet_history_exit(void);
66
67extern int tfrc_li_init(void);
68extern void tfrc_li_exit(void);
64#endif /* _TFRC_H_ */ 69#endif /* _TFRC_H_ */
diff --git a/net/dccp/ccids/lib/tfrc_equation.c b/net/dccp/ccids/lib/tfrc_equation.c
index e4e64b76c10c..2f20a29cffe4 100644
--- a/net/dccp/ccids/lib/tfrc_equation.c
+++ b/net/dccp/ccids/lib/tfrc_equation.c
@@ -661,7 +661,7 @@ u32 tfrc_calc_x(u16 s, u32 R, u32 p)
661 661
662EXPORT_SYMBOL_GPL(tfrc_calc_x); 662EXPORT_SYMBOL_GPL(tfrc_calc_x);
663 663
664/* 664/**
665 * tfrc_calc_x_reverse_lookup - try to find p given f(p) 665 * tfrc_calc_x_reverse_lookup - try to find p given f(p)
666 * 666 *
667 * @fvalue: function value to match, scaled by 1000000 667 * @fvalue: function value to match, scaled by 1000000
@@ -676,11 +676,11 @@ u32 tfrc_calc_x_reverse_lookup(u32 fvalue)
676 676
677 /* Error cases. */ 677 /* Error cases. */
678 if (fvalue < tfrc_calc_x_lookup[0][1]) { 678 if (fvalue < tfrc_calc_x_lookup[0][1]) {
679 DCCP_WARN("fvalue %d smaller than resolution\n", fvalue); 679 DCCP_WARN("fvalue %u smaller than resolution\n", fvalue);
680 return tfrc_calc_x_lookup[0][1]; 680 return TFRC_SMALLEST_P;
681 } 681 }
682 if (fvalue > tfrc_calc_x_lookup[TFRC_CALC_X_ARRSIZE - 1][0]) { 682 if (fvalue > tfrc_calc_x_lookup[TFRC_CALC_X_ARRSIZE - 1][0]) {
683 DCCP_WARN("fvalue %d exceeds bounds!\n", fvalue); 683 DCCP_WARN("fvalue %u exceeds bounds!\n", fvalue);
684 return 1000000; 684 return 1000000;
685 } 685 }
686 686
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index b348dd70c685..37d27bcb361f 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -589,7 +589,7 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
589 if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) 589 if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1)
590 goto drop; 590 goto drop;
591 591
592 req = reqsk_alloc(&dccp_request_sock_ops); 592 req = inet_reqsk_alloc(&dccp_request_sock_ops);
593 if (req == NULL) 593 if (req == NULL)
594 goto drop; 594 goto drop;
595 595
@@ -605,7 +605,6 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
605 ireq = inet_rsk(req); 605 ireq = inet_rsk(req);
606 ireq->loc_addr = ip_hdr(skb)->daddr; 606 ireq->loc_addr = ip_hdr(skb)->daddr;
607 ireq->rmt_addr = ip_hdr(skb)->saddr; 607 ireq->rmt_addr = ip_hdr(skb)->saddr;
608 ireq->opt = NULL;
609 608
610 /* 609 /*
611 * Step 3: Process LISTEN state 610 * Step 3: Process LISTEN state
@@ -739,8 +738,8 @@ int dccp_invalid_packet(struct sk_buff *skb)
739 * If P.type is not Data, Ack, or DataAck and P.X == 0 (the packet 738 * If P.type is not Data, Ack, or DataAck and P.X == 0 (the packet
740 * has short sequence numbers), drop packet and return 739 * has short sequence numbers), drop packet and return
741 */ 740 */
742 if (dh->dccph_type >= DCCP_PKT_DATA && 741 if ((dh->dccph_type < DCCP_PKT_DATA ||
743 dh->dccph_type <= DCCP_PKT_DATAACK && dh->dccph_x == 0) { 742 dh->dccph_type > DCCP_PKT_DATAACK) && dh->dccph_x == 0) {
744 DCCP_WARN("P.type (%s) not Data || [Data]Ack, while P.X == 0\n", 743 DCCP_WARN("P.type (%s) not Data || [Data]Ack, while P.X == 0\n",
745 dccp_packet_name(dh->dccph_type)); 744 dccp_packet_name(dh->dccph_type));
746 return 1; 745 return 1;
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index 9b1129bb7ece..f7fe2a572d7b 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -421,7 +421,6 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
421 ireq6 = inet6_rsk(req); 421 ireq6 = inet6_rsk(req);
422 ipv6_addr_copy(&ireq6->rmt_addr, &ipv6_hdr(skb)->saddr); 422 ipv6_addr_copy(&ireq6->rmt_addr, &ipv6_hdr(skb)->saddr);
423 ipv6_addr_copy(&ireq6->loc_addr, &ipv6_hdr(skb)->daddr); 423 ipv6_addr_copy(&ireq6->loc_addr, &ipv6_hdr(skb)->daddr);
424 ireq6->pktopts = NULL;
425 424
426 if (ipv6_opt_accepted(sk, skb) || 425 if (ipv6_opt_accepted(sk, skb) ||
427 np->rxopt.bits.rxinfo || np->rxopt.bits.rxoinfo || 426 np->rxopt.bits.rxinfo || np->rxopt.bits.rxoinfo ||
diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c
index 33ad48321b08..66dca5bba858 100644
--- a/net/dccp/minisocks.c
+++ b/net/dccp/minisocks.c
@@ -165,12 +165,12 @@ out_free:
165 /* See dccp_v4_conn_request */ 165 /* See dccp_v4_conn_request */
166 newdmsk->dccpms_sequence_window = req->rcv_wnd; 166 newdmsk->dccpms_sequence_window = req->rcv_wnd;
167 167
168 newdp->dccps_gar = newdp->dccps_isr = dreq->dreq_isr; 168 newdp->dccps_gar = newdp->dccps_iss = dreq->dreq_iss;
169 dccp_update_gsr(newsk, dreq->dreq_isr);
170
171 newdp->dccps_iss = dreq->dreq_iss;
172 dccp_update_gss(newsk, dreq->dreq_iss); 169 dccp_update_gss(newsk, dreq->dreq_iss);
173 170
171 newdp->dccps_isr = dreq->dreq_isr;
172 dccp_update_gsr(newsk, dreq->dreq_isr);
173
174 /* 174 /*
175 * SWL and AWL are initially adjusted so that they are not less than 175 * SWL and AWL are initially adjusted so that they are not less than
176 * the initial Sequence Numbers received and sent, respectively: 176 * the initial Sequence Numbers received and sent, respectively:
diff --git a/net/dccp/options.c b/net/dccp/options.c
index d2a84a2fecee..43bc24e761d0 100644
--- a/net/dccp/options.c
+++ b/net/dccp/options.c
@@ -107,9 +107,11 @@ int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq,
107 * 107 *
108 * CCID-specific options are ignored during connection setup, as 108 * CCID-specific options are ignored during connection setup, as
109 * negotiation may still be in progress (see RFC 4340, 10.3). 109 * negotiation may still be in progress (see RFC 4340, 10.3).
110 * The same applies to Ack Vectors, as these depend on the CCID.
110 * 111 *
111 */ 112 */
112 if (dreq != NULL && opt >= 128) 113 if (dreq != NULL && (opt >= 128 ||
114 opt == DCCPO_ACK_VECTOR_0 || opt == DCCPO_ACK_VECTOR_1))
113 goto ignore_option; 115 goto ignore_option;
114 116
115 switch (opt) { 117 switch (opt) {
diff --git a/net/dccp/output.c b/net/dccp/output.c
index 1f8a9b64c083..fe20068c5d8e 100644
--- a/net/dccp/output.c
+++ b/net/dccp/output.c
@@ -508,6 +508,7 @@ void dccp_send_ack(struct sock *sk)
508 508
509EXPORT_SYMBOL_GPL(dccp_send_ack); 509EXPORT_SYMBOL_GPL(dccp_send_ack);
510 510
511#if 0
511/* FIXME: Is this still necessary (11.3) - currently nowhere used by DCCP. */ 512/* FIXME: Is this still necessary (11.3) - currently nowhere used by DCCP. */
512void dccp_send_delayed_ack(struct sock *sk) 513void dccp_send_delayed_ack(struct sock *sk)
513{ 514{
@@ -538,6 +539,7 @@ void dccp_send_delayed_ack(struct sock *sk)
538 icsk->icsk_ack.timeout = timeout; 539 icsk->icsk_ack.timeout = timeout;
539 sk_reset_timer(sk, &icsk->icsk_delack_timer, timeout); 540 sk_reset_timer(sk, &icsk->icsk_delack_timer, timeout);
540} 541}
542#endif
541 543
542void dccp_send_sync(struct sock *sk, const u64 ackno, 544void dccp_send_sync(struct sock *sk, const u64 ackno,
543 const enum dccp_pkt_type pkt_type) 545 const enum dccp_pkt_type pkt_type)
diff --git a/net/dccp/probe.c b/net/dccp/probe.c
index 0bcdc9250279..81368a7f5379 100644
--- a/net/dccp/probe.c
+++ b/net/dccp/probe.c
@@ -42,7 +42,7 @@ static int bufsize = 64 * 1024;
42 42
43static const char procname[] = "dccpprobe"; 43static const char procname[] = "dccpprobe";
44 44
45struct { 45static struct {
46 struct kfifo *fifo; 46 struct kfifo *fifo;
47 spinlock_t lock; 47 spinlock_t lock;
48 wait_queue_head_t wait; 48 wait_queue_head_t wait;
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 418862f1bf22..9b539fa9fe18 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -1288,7 +1288,6 @@ static void arp_format_neigh_entry(struct seq_file *seq,
1288 struct neighbour *n) 1288 struct neighbour *n)
1289{ 1289{
1290 char hbuffer[HBUFFERLEN]; 1290 char hbuffer[HBUFFERLEN];
1291 const char hexbuf[] = "0123456789ABCDEF";
1292 int k, j; 1291 int k, j;
1293 char tbuf[16]; 1292 char tbuf[16];
1294 struct net_device *dev = n->dev; 1293 struct net_device *dev = n->dev;
@@ -1302,8 +1301,8 @@ static void arp_format_neigh_entry(struct seq_file *seq,
1302 else { 1301 else {
1303#endif 1302#endif
1304 for (k = 0, j = 0; k < HBUFFERLEN - 3 && j < dev->addr_len; j++) { 1303 for (k = 0, j = 0; k < HBUFFERLEN - 3 && j < dev->addr_len; j++) {
1305 hbuffer[k++] = hexbuf[(n->ha[j] >> 4) & 15]; 1304 hbuffer[k++] = hex_asc_hi(n->ha[j]);
1306 hbuffer[k++] = hexbuf[n->ha[j] & 15]; 1305 hbuffer[k++] = hex_asc_lo(n->ha[j]);
1307 hbuffer[k++] = ':'; 1306 hbuffer[k++] = ':';
1308 } 1307 }
1309 hbuffer[--k] = 0; 1308 hbuffer[--k] = 0;
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 6848e4760f34..79a7ef6209ff 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -90,7 +90,6 @@ static const struct nla_policy ifa_ipv4_policy[IFA_MAX+1] = {
90 [IFA_LOCAL] = { .type = NLA_U32 }, 90 [IFA_LOCAL] = { .type = NLA_U32 },
91 [IFA_ADDRESS] = { .type = NLA_U32 }, 91 [IFA_ADDRESS] = { .type = NLA_U32 },
92 [IFA_BROADCAST] = { .type = NLA_U32 }, 92 [IFA_BROADCAST] = { .type = NLA_U32 },
93 [IFA_ANYCAST] = { .type = NLA_U32 },
94 [IFA_LABEL] = { .type = NLA_STRING, .len = IFNAMSIZ - 1 }, 93 [IFA_LABEL] = { .type = NLA_STRING, .len = IFNAMSIZ - 1 },
95}; 94};
96 95
@@ -536,9 +535,6 @@ static struct in_ifaddr *rtm_to_ifaddr(struct net *net, struct nlmsghdr *nlh)
536 if (tb[IFA_BROADCAST]) 535 if (tb[IFA_BROADCAST])
537 ifa->ifa_broadcast = nla_get_be32(tb[IFA_BROADCAST]); 536 ifa->ifa_broadcast = nla_get_be32(tb[IFA_BROADCAST]);
538 537
539 if (tb[IFA_ANYCAST])
540 ifa->ifa_anycast = nla_get_be32(tb[IFA_ANYCAST]);
541
542 if (tb[IFA_LABEL]) 538 if (tb[IFA_LABEL])
543 nla_strlcpy(ifa->ifa_label, tb[IFA_LABEL], IFNAMSIZ); 539 nla_strlcpy(ifa->ifa_label, tb[IFA_LABEL], IFNAMSIZ);
544 else 540 else
@@ -745,7 +741,6 @@ int devinet_ioctl(struct net *net, unsigned int cmd, void __user *arg)
745 break; 741 break;
746 inet_del_ifa(in_dev, ifap, 0); 742 inet_del_ifa(in_dev, ifap, 0);
747 ifa->ifa_broadcast = 0; 743 ifa->ifa_broadcast = 0;
748 ifa->ifa_anycast = 0;
749 ifa->ifa_scope = 0; 744 ifa->ifa_scope = 0;
750 } 745 }
751 746
@@ -1113,7 +1108,6 @@ static inline size_t inet_nlmsg_size(void)
1113 + nla_total_size(4) /* IFA_ADDRESS */ 1108 + nla_total_size(4) /* IFA_ADDRESS */
1114 + nla_total_size(4) /* IFA_LOCAL */ 1109 + nla_total_size(4) /* IFA_LOCAL */
1115 + nla_total_size(4) /* IFA_BROADCAST */ 1110 + nla_total_size(4) /* IFA_BROADCAST */
1116 + nla_total_size(4) /* IFA_ANYCAST */
1117 + nla_total_size(IFNAMSIZ); /* IFA_LABEL */ 1111 + nla_total_size(IFNAMSIZ); /* IFA_LABEL */
1118} 1112}
1119 1113
@@ -1143,9 +1137,6 @@ static int inet_fill_ifaddr(struct sk_buff *skb, struct in_ifaddr *ifa,
1143 if (ifa->ifa_broadcast) 1137 if (ifa->ifa_broadcast)
1144 NLA_PUT_BE32(skb, IFA_BROADCAST, ifa->ifa_broadcast); 1138 NLA_PUT_BE32(skb, IFA_BROADCAST, ifa->ifa_broadcast);
1145 1139
1146 if (ifa->ifa_anycast)
1147 NLA_PUT_BE32(skb, IFA_ANYCAST, ifa->ifa_anycast);
1148
1149 if (ifa->ifa_label[0]) 1140 if (ifa->ifa_label[0])
1150 NLA_PUT_STRING(skb, IFA_LABEL, ifa->ifa_label); 1141 NLA_PUT_STRING(skb, IFA_LABEL, ifa->ifa_label);
1151 1142
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index 0f1557a4ac7a..0b2ac6a3d903 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -506,7 +506,6 @@ const struct nla_policy rtm_ipv4_policy[RTA_MAX+1] = {
506 [RTA_PREFSRC] = { .type = NLA_U32 }, 506 [RTA_PREFSRC] = { .type = NLA_U32 },
507 [RTA_METRICS] = { .type = NLA_NESTED }, 507 [RTA_METRICS] = { .type = NLA_NESTED },
508 [RTA_MULTIPATH] = { .len = sizeof(struct rtnexthop) }, 508 [RTA_MULTIPATH] = { .len = sizeof(struct rtnexthop) },
509 [RTA_PROTOINFO] = { .type = NLA_U32 },
510 [RTA_FLOW] = { .type = NLA_U32 }, 509 [RTA_FLOW] = { .type = NLA_U32 },
511}; 510};
512 511
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index 3b83c34019fc..0d4d72827e4b 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -960,7 +960,10 @@ int fib_dump_info(struct sk_buff *skb, u32 pid, u32 seq, int event,
960 rtm->rtm_dst_len = dst_len; 960 rtm->rtm_dst_len = dst_len;
961 rtm->rtm_src_len = 0; 961 rtm->rtm_src_len = 0;
962 rtm->rtm_tos = tos; 962 rtm->rtm_tos = tos;
963 rtm->rtm_table = tb_id; 963 if (tb_id < 256)
964 rtm->rtm_table = tb_id;
965 else
966 rtm->rtm_table = RT_TABLE_COMPAT;
964 NLA_PUT_U32(skb, RTA_TABLE, tb_id); 967 NLA_PUT_U32(skb, RTA_TABLE, tb_id);
965 rtm->rtm_type = type; 968 rtm->rtm_type = type;
966 rtm->rtm_flags = fi->fib_flags; 969 rtm->rtm_flags = fi->fib_flags;
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index 828ea211ff21..ec834480abe7 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -419,7 +419,8 @@ void inet_csk_reqsk_queue_prune(struct sock *parent,
419 struct inet_connection_sock *icsk = inet_csk(parent); 419 struct inet_connection_sock *icsk = inet_csk(parent);
420 struct request_sock_queue *queue = &icsk->icsk_accept_queue; 420 struct request_sock_queue *queue = &icsk->icsk_accept_queue;
421 struct listen_sock *lopt = queue->listen_opt; 421 struct listen_sock *lopt = queue->listen_opt;
422 int thresh = icsk->icsk_syn_retries ? : sysctl_tcp_synack_retries; 422 int max_retries = icsk->icsk_syn_retries ? : sysctl_tcp_synack_retries;
423 int thresh = max_retries;
423 unsigned long now = jiffies; 424 unsigned long now = jiffies;
424 struct request_sock **reqp, *req; 425 struct request_sock **reqp, *req;
425 int i, budget; 426 int i, budget;
@@ -455,6 +456,9 @@ void inet_csk_reqsk_queue_prune(struct sock *parent,
455 } 456 }
456 } 457 }
457 458
459 if (queue->rskq_defer_accept)
460 max_retries = queue->rskq_defer_accept;
461
458 budget = 2 * (lopt->nr_table_entries / (timeout / interval)); 462 budget = 2 * (lopt->nr_table_entries / (timeout / interval));
459 i = lopt->clock_hand; 463 i = lopt->clock_hand;
460 464
@@ -462,8 +466,9 @@ void inet_csk_reqsk_queue_prune(struct sock *parent,
462 reqp=&lopt->syn_table[i]; 466 reqp=&lopt->syn_table[i];
463 while ((req = *reqp) != NULL) { 467 while ((req = *reqp) != NULL) {
464 if (time_after_eq(now, req->expires)) { 468 if (time_after_eq(now, req->expires)) {
465 if (req->retrans < thresh && 469 if ((req->retrans < thresh ||
466 !req->rsk_ops->rtx_syn_ack(parent, req)) { 470 (inet_rsk(req)->acked && req->retrans < max_retries))
471 && !req->rsk_ops->rtx_syn_ack(parent, req)) {
467 unsigned long timeo; 472 unsigned long timeo;
468 473
469 if (req->retrans++ == 0) 474 if (req->retrans++ == 0)
diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c
index 4ed429bd5951..0546a0bc97ea 100644
--- a/net/ipv4/inet_fragment.c
+++ b/net/ipv4/inet_fragment.c
@@ -192,14 +192,21 @@ EXPORT_SYMBOL(inet_frag_evictor);
192 192
193static struct inet_frag_queue *inet_frag_intern(struct netns_frags *nf, 193static struct inet_frag_queue *inet_frag_intern(struct netns_frags *nf,
194 struct inet_frag_queue *qp_in, struct inet_frags *f, 194 struct inet_frag_queue *qp_in, struct inet_frags *f,
195 unsigned int hash, void *arg) 195 void *arg)
196{ 196{
197 struct inet_frag_queue *qp; 197 struct inet_frag_queue *qp;
198#ifdef CONFIG_SMP 198#ifdef CONFIG_SMP
199 struct hlist_node *n; 199 struct hlist_node *n;
200#endif 200#endif
201 unsigned int hash;
201 202
202 write_lock(&f->lock); 203 write_lock(&f->lock);
204 /*
205 * While we stayed w/o the lock other CPU could update
206 * the rnd seed, so we need to re-calculate the hash
207 * chain. Fortunatelly the qp_in can be used to get one.
208 */
209 hash = f->hashfn(qp_in);
203#ifdef CONFIG_SMP 210#ifdef CONFIG_SMP
204 /* With SMP race we have to recheck hash table, because 211 /* With SMP race we have to recheck hash table, because
205 * such entry could be created on other cpu, while we 212 * such entry could be created on other cpu, while we
@@ -247,7 +254,7 @@ static struct inet_frag_queue *inet_frag_alloc(struct netns_frags *nf,
247} 254}
248 255
249static struct inet_frag_queue *inet_frag_create(struct netns_frags *nf, 256static struct inet_frag_queue *inet_frag_create(struct netns_frags *nf,
250 struct inet_frags *f, void *arg, unsigned int hash) 257 struct inet_frags *f, void *arg)
251{ 258{
252 struct inet_frag_queue *q; 259 struct inet_frag_queue *q;
253 260
@@ -255,7 +262,7 @@ static struct inet_frag_queue *inet_frag_create(struct netns_frags *nf,
255 if (q == NULL) 262 if (q == NULL)
256 return NULL; 263 return NULL;
257 264
258 return inet_frag_intern(nf, q, f, hash, arg); 265 return inet_frag_intern(nf, q, f, arg);
259} 266}
260 267
261struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, 268struct inet_frag_queue *inet_frag_find(struct netns_frags *nf,
@@ -264,7 +271,6 @@ struct inet_frag_queue *inet_frag_find(struct netns_frags *nf,
264 struct inet_frag_queue *q; 271 struct inet_frag_queue *q;
265 struct hlist_node *n; 272 struct hlist_node *n;
266 273
267 read_lock(&f->lock);
268 hlist_for_each_entry(q, n, &f->hash[hash], list) { 274 hlist_for_each_entry(q, n, &f->hash[hash], list) {
269 if (q->net == nf && f->match(q, key)) { 275 if (q->net == nf && f->match(q, key)) {
270 atomic_inc(&q->refcnt); 276 atomic_inc(&q->refcnt);
@@ -274,6 +280,6 @@ struct inet_frag_queue *inet_frag_find(struct netns_frags *nf,
274 } 280 }
275 read_unlock(&f->lock); 281 read_unlock(&f->lock);
276 282
277 return inet_frag_create(nf, f, key, hash); 283 return inet_frag_create(nf, f, key);
278} 284}
279EXPORT_SYMBOL(inet_frag_find); 285EXPORT_SYMBOL(inet_frag_find);
diff --git a/net/ipv4/inet_lro.c b/net/ipv4/inet_lro.c
index 4a4d49fca1f2..cfd034a2b96e 100644
--- a/net/ipv4/inet_lro.c
+++ b/net/ipv4/inet_lro.c
@@ -383,8 +383,7 @@ static int __lro_proc_skb(struct net_lro_mgr *lro_mgr, struct sk_buff *skb,
383out2: /* send aggregated SKBs to stack */ 383out2: /* send aggregated SKBs to stack */
384 lro_flush(lro_mgr, lro_desc); 384 lro_flush(lro_mgr, lro_desc);
385 385
386out: /* Original SKB has to be posted to stack */ 386out:
387 skb->ip_summed = lro_mgr->ip_summed;
388 return 1; 387 return 1;
389} 388}
390 389
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
index cd6ce6ac6358..37221f659159 100644
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -229,6 +229,8 @@ static inline struct ipq *ip_find(struct net *net, struct iphdr *iph, u32 user)
229 229
230 arg.iph = iph; 230 arg.iph = iph;
231 arg.user = user; 231 arg.user = user;
232
233 read_lock(&ip4_frags.lock);
232 hash = ipqhashfn(iph->id, iph->saddr, iph->daddr, iph->protocol); 234 hash = ipqhashfn(iph->id, iph->saddr, iph->daddr, iph->protocol);
233 235
234 q = inet_frag_find(&net->ipv4.frags, &ip4_frags, &arg, hash); 236 q = inet_frag_find(&net->ipv4.frags, &ip4_frags, &arg, hash);
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 2ada033406de..4342cba4ff82 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -313,9 +313,8 @@ static void ipgre_tunnel_uninit(struct net_device *dev)
313 313
314static void ipgre_err(struct sk_buff *skb, u32 info) 314static void ipgre_err(struct sk_buff *skb, u32 info)
315{ 315{
316#ifndef I_WISH_WORLD_WERE_PERFECT
317 316
318/* It is not :-( All the routers (except for Linux) return only 317/* All the routers (except for Linux) return only
319 8 bytes of packet payload. It means, that precise relaying of 318 8 bytes of packet payload. It means, that precise relaying of
320 ICMP in the real Internet is absolutely infeasible. 319 ICMP in the real Internet is absolutely infeasible.
321 320
@@ -398,149 +397,6 @@ static void ipgre_err(struct sk_buff *skb, u32 info)
398out: 397out:
399 read_unlock(&ipgre_lock); 398 read_unlock(&ipgre_lock);
400 return; 399 return;
401#else
402 struct iphdr *iph = (struct iphdr*)dp;
403 struct iphdr *eiph;
404 __be16 *p = (__be16*)(dp+(iph->ihl<<2));
405 const int type = icmp_hdr(skb)->type;
406 const int code = icmp_hdr(skb)->code;
407 int rel_type = 0;
408 int rel_code = 0;
409 __be32 rel_info = 0;
410 __u32 n = 0;
411 __be16 flags;
412 int grehlen = (iph->ihl<<2) + 4;
413 struct sk_buff *skb2;
414 struct flowi fl;
415 struct rtable *rt;
416
417 if (p[1] != htons(ETH_P_IP))
418 return;
419
420 flags = p[0];
421 if (flags&(GRE_CSUM|GRE_KEY|GRE_SEQ|GRE_ROUTING|GRE_VERSION)) {
422 if (flags&(GRE_VERSION|GRE_ROUTING))
423 return;
424 if (flags&GRE_CSUM)
425 grehlen += 4;
426 if (flags&GRE_KEY)
427 grehlen += 4;
428 if (flags&GRE_SEQ)
429 grehlen += 4;
430 }
431 if (len < grehlen + sizeof(struct iphdr))
432 return;
433 eiph = (struct iphdr*)(dp + grehlen);
434
435 switch (type) {
436 default:
437 return;
438 case ICMP_PARAMETERPROB:
439 n = ntohl(icmp_hdr(skb)->un.gateway) >> 24;
440 if (n < (iph->ihl<<2))
441 return;
442
443 /* So... This guy found something strange INSIDE encapsulated
444 packet. Well, he is fool, but what can we do ?
445 */
446 rel_type = ICMP_PARAMETERPROB;
447 n -= grehlen;
448 rel_info = htonl(n << 24);
449 break;
450
451 case ICMP_DEST_UNREACH:
452 switch (code) {
453 case ICMP_SR_FAILED:
454 case ICMP_PORT_UNREACH:
455 /* Impossible event. */
456 return;
457 case ICMP_FRAG_NEEDED:
458 /* And it is the only really necessary thing :-) */
459 n = ntohs(icmp_hdr(skb)->un.frag.mtu);
460 if (n < grehlen+68)
461 return;
462 n -= grehlen;
463 /* BSD 4.2 MORE DOES NOT EXIST IN NATURE. */
464 if (n > ntohs(eiph->tot_len))
465 return;
466 rel_info = htonl(n);
467 break;
468 default:
469 /* All others are translated to HOST_UNREACH.
470 rfc2003 contains "deep thoughts" about NET_UNREACH,
471 I believe, it is just ether pollution. --ANK
472 */
473 rel_type = ICMP_DEST_UNREACH;
474 rel_code = ICMP_HOST_UNREACH;
475 break;
476 }
477 break;
478 case ICMP_TIME_EXCEEDED:
479 if (code != ICMP_EXC_TTL)
480 return;
481 break;
482 }
483
484 /* Prepare fake skb to feed it to icmp_send */
485 skb2 = skb_clone(skb, GFP_ATOMIC);
486 if (skb2 == NULL)
487 return;
488 dst_release(skb2->dst);
489 skb2->dst = NULL;
490 skb_pull(skb2, skb->data - (u8*)eiph);
491 skb_reset_network_header(skb2);
492
493 /* Try to guess incoming interface */
494 memset(&fl, 0, sizeof(fl));
495 fl.fl4_dst = eiph->saddr;
496 fl.fl4_tos = RT_TOS(eiph->tos);
497 fl.proto = IPPROTO_GRE;
498 if (ip_route_output_key(dev_net(skb->dev), &rt, &fl)) {
499 kfree_skb(skb2);
500 return;
501 }
502 skb2->dev = rt->u.dst.dev;
503
504 /* route "incoming" packet */
505 if (rt->rt_flags&RTCF_LOCAL) {
506 ip_rt_put(rt);
507 rt = NULL;
508 fl.fl4_dst = eiph->daddr;
509 fl.fl4_src = eiph->saddr;
510 fl.fl4_tos = eiph->tos;
511 if (ip_route_output_key(dev_net(skb->dev), &rt, &fl) ||
512 rt->u.dst.dev->type != ARPHRD_IPGRE) {
513 ip_rt_put(rt);
514 kfree_skb(skb2);
515 return;
516 }
517 } else {
518 ip_rt_put(rt);
519 if (ip_route_input(skb2, eiph->daddr, eiph->saddr, eiph->tos, skb2->dev) ||
520 skb2->dst->dev->type != ARPHRD_IPGRE) {
521 kfree_skb(skb2);
522 return;
523 }
524 }
525
526 /* change mtu on this route */
527 if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) {
528 if (n > dst_mtu(skb2->dst)) {
529 kfree_skb(skb2);
530 return;
531 }
532 skb2->dst->ops->update_pmtu(skb2->dst, n);
533 } else if (type == ICMP_TIME_EXCEEDED) {
534 struct ip_tunnel *t = netdev_priv(skb2->dev);
535 if (t->parms.iph.ttl) {
536 rel_type = ICMP_DEST_UNREACH;
537 rel_code = ICMP_HOST_UNREACH;
538 }
539 }
540
541 icmp_send(skb2, rel_type, rel_code, rel_info);
542 kfree_skb(skb2);
543#endif
544} 400}
545 401
546static inline void ipgre_ecn_decapsulate(struct iphdr *iph, struct sk_buff *skb) 402static inline void ipgre_ecn_decapsulate(struct iphdr *iph, struct sk_buff *skb)
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index 149111f08e8d..af5cb53da5cc 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -278,9 +278,8 @@ static void ipip_tunnel_uninit(struct net_device *dev)
278 278
279static int ipip_err(struct sk_buff *skb, u32 info) 279static int ipip_err(struct sk_buff *skb, u32 info)
280{ 280{
281#ifndef I_WISH_WORLD_WERE_PERFECT
282 281
283/* It is not :-( All the routers (except for Linux) return only 282/* All the routers (except for Linux) return only
284 8 bytes of packet payload. It means, that precise relaying of 283 8 bytes of packet payload. It means, that precise relaying of
285 ICMP in the real Internet is absolutely infeasible. 284 ICMP in the real Internet is absolutely infeasible.
286 */ 285 */
@@ -337,133 +336,6 @@ static int ipip_err(struct sk_buff *skb, u32 info)
337out: 336out:
338 read_unlock(&ipip_lock); 337 read_unlock(&ipip_lock);
339 return err; 338 return err;
340#else
341 struct iphdr *iph = (struct iphdr*)dp;
342 int hlen = iph->ihl<<2;
343 struct iphdr *eiph;
344 const int type = icmp_hdr(skb)->type;
345 const int code = icmp_hdr(skb)->code;
346 int rel_type = 0;
347 int rel_code = 0;
348 __be32 rel_info = 0;
349 __u32 n = 0;
350 struct sk_buff *skb2;
351 struct flowi fl;
352 struct rtable *rt;
353
354 if (len < hlen + sizeof(struct iphdr))
355 return 0;
356 eiph = (struct iphdr*)(dp + hlen);
357
358 switch (type) {
359 default:
360 return 0;
361 case ICMP_PARAMETERPROB:
362 n = ntohl(icmp_hdr(skb)->un.gateway) >> 24;
363 if (n < hlen)
364 return 0;
365
366 /* So... This guy found something strange INSIDE encapsulated
367 packet. Well, he is fool, but what can we do ?
368 */
369 rel_type = ICMP_PARAMETERPROB;
370 rel_info = htonl((n - hlen) << 24);
371 break;
372
373 case ICMP_DEST_UNREACH:
374 switch (code) {
375 case ICMP_SR_FAILED:
376 case ICMP_PORT_UNREACH:
377 /* Impossible event. */
378 return 0;
379 case ICMP_FRAG_NEEDED:
380 /* And it is the only really necessary thing :-) */
381 n = ntohs(icmp_hdr(skb)->un.frag.mtu);
382 if (n < hlen+68)
383 return 0;
384 n -= hlen;
385 /* BSD 4.2 MORE DOES NOT EXIST IN NATURE. */
386 if (n > ntohs(eiph->tot_len))
387 return 0;
388 rel_info = htonl(n);
389 break;
390 default:
391 /* All others are translated to HOST_UNREACH.
392 rfc2003 contains "deep thoughts" about NET_UNREACH,
393 I believe, it is just ether pollution. --ANK
394 */
395 rel_type = ICMP_DEST_UNREACH;
396 rel_code = ICMP_HOST_UNREACH;
397 break;
398 }
399 break;
400 case ICMP_TIME_EXCEEDED:
401 if (code != ICMP_EXC_TTL)
402 return 0;
403 break;
404 }
405
406 /* Prepare fake skb to feed it to icmp_send */
407 skb2 = skb_clone(skb, GFP_ATOMIC);
408 if (skb2 == NULL)
409 return 0;
410 dst_release(skb2->dst);
411 skb2->dst = NULL;
412 skb_pull(skb2, skb->data - (u8*)eiph);
413 skb_reset_network_header(skb2);
414
415 /* Try to guess incoming interface */
416 memset(&fl, 0, sizeof(fl));
417 fl.fl4_daddr = eiph->saddr;
418 fl.fl4_tos = RT_TOS(eiph->tos);
419 fl.proto = IPPROTO_IPIP;
420 if (ip_route_output_key(dev_net(skb->dev), &rt, &key)) {
421 kfree_skb(skb2);
422 return 0;
423 }
424 skb2->dev = rt->u.dst.dev;
425
426 /* route "incoming" packet */
427 if (rt->rt_flags&RTCF_LOCAL) {
428 ip_rt_put(rt);
429 rt = NULL;
430 fl.fl4_daddr = eiph->daddr;
431 fl.fl4_src = eiph->saddr;
432 fl.fl4_tos = eiph->tos;
433 if (ip_route_output_key(dev_net(skb->dev), &rt, &fl) ||
434 rt->u.dst.dev->type != ARPHRD_TUNNEL) {
435 ip_rt_put(rt);
436 kfree_skb(skb2);
437 return 0;
438 }
439 } else {
440 ip_rt_put(rt);
441 if (ip_route_input(skb2, eiph->daddr, eiph->saddr, eiph->tos, skb2->dev) ||
442 skb2->dst->dev->type != ARPHRD_TUNNEL) {
443 kfree_skb(skb2);
444 return 0;
445 }
446 }
447
448 /* change mtu on this route */
449 if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) {
450 if (n > dst_mtu(skb2->dst)) {
451 kfree_skb(skb2);
452 return 0;
453 }
454 skb2->dst->ops->update_pmtu(skb2->dst, n);
455 } else if (type == ICMP_TIME_EXCEEDED) {
456 struct ip_tunnel *t = netdev_priv(skb2->dev);
457 if (t->parms.iph.ttl) {
458 rel_type = ICMP_DEST_UNREACH;
459 rel_code = ICMP_HOST_UNREACH;
460 }
461 }
462
463 icmp_send(skb2, rel_type, rel_code, rel_info);
464 kfree_skb(skb2);
465 return 0;
466#endif
467} 339}
468 340
469static inline void ipip_ecn_decapsulate(const struct iphdr *outer_iph, 341static inline void ipip_ecn_decapsulate(const struct iphdr *outer_iph,
diff --git a/net/ipv4/netfilter/nf_nat_core.c b/net/ipv4/netfilter/nf_nat_core.c
index 04578593e100..d2a887fc8d9b 100644
--- a/net/ipv4/netfilter/nf_nat_core.c
+++ b/net/ipv4/netfilter/nf_nat_core.c
@@ -556,7 +556,6 @@ static void nf_nat_cleanup_conntrack(struct nf_conn *ct)
556 556
557 spin_lock_bh(&nf_nat_lock); 557 spin_lock_bh(&nf_nat_lock);
558 hlist_del_rcu(&nat->bysource); 558 hlist_del_rcu(&nat->bysource);
559 nat->ct = NULL;
560 spin_unlock_bh(&nf_nat_lock); 559 spin_unlock_bh(&nf_nat_lock);
561} 560}
562 561
@@ -570,8 +569,8 @@ static void nf_nat_move_storage(void *new, void *old)
570 return; 569 return;
571 570
572 spin_lock_bh(&nf_nat_lock); 571 spin_lock_bh(&nf_nat_lock);
573 hlist_replace_rcu(&old_nat->bysource, &new_nat->bysource);
574 new_nat->ct = ct; 572 new_nat->ct = ct;
573 hlist_replace_rcu(&old_nat->bysource, &new_nat->bysource);
575 spin_unlock_bh(&nf_nat_lock); 574 spin_unlock_bh(&nf_nat_lock);
576} 575}
577 576
diff --git a/net/ipv4/netfilter/nf_nat_snmp_basic.c b/net/ipv4/netfilter/nf_nat_snmp_basic.c
index 5daefad3d193..7750c97fde7b 100644
--- a/net/ipv4/netfilter/nf_nat_snmp_basic.c
+++ b/net/ipv4/netfilter/nf_nat_snmp_basic.c
@@ -232,6 +232,11 @@ static unsigned char asn1_length_decode(struct asn1_ctx *ctx,
232 } 232 }
233 } 233 }
234 } 234 }
235
236 /* don't trust len bigger than ctx buffer */
237 if (*len > ctx->end - ctx->pointer)
238 return 0;
239
235 return 1; 240 return 1;
236} 241}
237 242
@@ -250,6 +255,10 @@ static unsigned char asn1_header_decode(struct asn1_ctx *ctx,
250 if (!asn1_length_decode(ctx, &def, &len)) 255 if (!asn1_length_decode(ctx, &def, &len))
251 return 0; 256 return 0;
252 257
258 /* primitive shall be definite, indefinite shall be constructed */
259 if (*con == ASN1_PRI && !def)
260 return 0;
261
253 if (def) 262 if (def)
254 *eoc = ctx->pointer + len; 263 *eoc = ctx->pointer + len;
255 else 264 else
@@ -434,6 +443,11 @@ static unsigned char asn1_oid_decode(struct asn1_ctx *ctx,
434 unsigned long *optr; 443 unsigned long *optr;
435 444
436 size = eoc - ctx->pointer + 1; 445 size = eoc - ctx->pointer + 1;
446
447 /* first subid actually encodes first two subids */
448 if (size < 2 || size > ULONG_MAX/sizeof(unsigned long))
449 return 0;
450
437 *oid = kmalloc(size * sizeof(unsigned long), GFP_ATOMIC); 451 *oid = kmalloc(size * sizeof(unsigned long), GFP_ATOMIC);
438 if (*oid == NULL) { 452 if (*oid == NULL) {
439 if (net_ratelimit()) 453 if (net_ratelimit())
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index fead049daf43..37a1ecd9d600 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -608,6 +608,14 @@ static void raw_close(struct sock *sk, long timeout)
608 sk_common_release(sk); 608 sk_common_release(sk);
609} 609}
610 610
611static int raw_destroy(struct sock *sk)
612{
613 lock_sock(sk);
614 ip_flush_pending_frames(sk);
615 release_sock(sk);
616 return 0;
617}
618
611/* This gets rid of all the nasties in af_inet. -DaveM */ 619/* This gets rid of all the nasties in af_inet. -DaveM */
612static int raw_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len) 620static int raw_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
613{ 621{
@@ -820,6 +828,7 @@ struct proto raw_prot = {
820 .name = "RAW", 828 .name = "RAW",
821 .owner = THIS_MODULE, 829 .owner = THIS_MODULE,
822 .close = raw_close, 830 .close = raw_close,
831 .destroy = raw_destroy,
823 .connect = ip4_datagram_connect, 832 .connect = ip4_datagram_connect,
824 .disconnect = udp_disconnect, 833 .disconnect = udp_disconnect,
825 .ioctl = raw_ioctl, 834 .ioctl = raw_ioctl,
@@ -925,7 +934,7 @@ static void raw_sock_seq_show(struct seq_file *seq, struct sock *sp, int i)
925 srcp = inet->num; 934 srcp = inet->num;
926 935
927 seq_printf(seq, "%4d: %08X:%04X %08X:%04X" 936 seq_printf(seq, "%4d: %08X:%04X %08X:%04X"
928 " %02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p %d", 937 " %02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p %d\n",
929 i, src, srcp, dest, destp, sp->sk_state, 938 i, src, srcp, dest, destp, sp->sk_state,
930 atomic_read(&sp->sk_wmem_alloc), 939 atomic_read(&sp->sk_wmem_alloc),
931 atomic_read(&sp->sk_rmem_alloc), 940 atomic_read(&sp->sk_rmem_alloc),
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 92f90ae46f4a..96be336064fb 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -160,7 +160,7 @@ static struct dst_ops ipv4_dst_ops = {
160 .negative_advice = ipv4_negative_advice, 160 .negative_advice = ipv4_negative_advice,
161 .link_failure = ipv4_link_failure, 161 .link_failure = ipv4_link_failure,
162 .update_pmtu = ip_rt_update_pmtu, 162 .update_pmtu = ip_rt_update_pmtu,
163 .local_out = ip_local_out, 163 .local_out = __ip_local_out,
164 .entry_size = sizeof(struct rtable), 164 .entry_size = sizeof(struct rtable),
165 .entries = ATOMIC_INIT(0), 165 .entries = ATOMIC_INIT(0),
166}; 166};
@@ -1792,7 +1792,7 @@ static int __mkroute_input(struct sk_buff *skb,
1792 if (err) 1792 if (err)
1793 flags |= RTCF_DIRECTSRC; 1793 flags |= RTCF_DIRECTSRC;
1794 1794
1795 if (out_dev == in_dev && err && !(flags & RTCF_MASQ) && 1795 if (out_dev == in_dev && err &&
1796 (IN_DEV_SHARED_MEDIA(out_dev) || 1796 (IN_DEV_SHARED_MEDIA(out_dev) ||
1797 inet_addr_onlink(out_dev, saddr, FIB_RES_GW(*res)))) 1797 inet_addr_onlink(out_dev, saddr, FIB_RES_GW(*res))))
1798 flags |= RTCF_DOREDIRECT; 1798 flags |= RTCF_DOREDIRECT;
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c
index 73ba98921d64..d182a2a26291 100644
--- a/net/ipv4/syncookies.c
+++ b/net/ipv4/syncookies.c
@@ -285,7 +285,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
285 cookie_check_timestamp(&tcp_opt); 285 cookie_check_timestamp(&tcp_opt);
286 286
287 ret = NULL; 287 ret = NULL;
288 req = reqsk_alloc(&tcp_request_sock_ops); /* for safety */ 288 req = inet_reqsk_alloc(&tcp_request_sock_ops); /* for safety */
289 if (!req) 289 if (!req)
290 goto out; 290 goto out;
291 291
@@ -301,7 +301,6 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
301 ireq->rmt_port = th->source; 301 ireq->rmt_port = th->source;
302 ireq->loc_addr = ip_hdr(skb)->daddr; 302 ireq->loc_addr = ip_hdr(skb)->daddr;
303 ireq->rmt_addr = ip_hdr(skb)->saddr; 303 ireq->rmt_addr = ip_hdr(skb)->saddr;
304 ireq->opt = NULL;
305 ireq->snd_wscale = tcp_opt.snd_wscale; 304 ireq->snd_wscale = tcp_opt.snd_wscale;
306 ireq->rcv_wscale = tcp_opt.rcv_wscale; 305 ireq->rcv_wscale = tcp_opt.rcv_wscale;
307 ireq->sack_ok = tcp_opt.sack_ok; 306 ireq->sack_ok = tcp_opt.sack_ok;
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index f88653138621..850825dc86e6 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -260,6 +260,8 @@
260#include <linux/socket.h> 260#include <linux/socket.h>
261#include <linux/random.h> 261#include <linux/random.h>
262#include <linux/bootmem.h> 262#include <linux/bootmem.h>
263#include <linux/highmem.h>
264#include <linux/swap.h>
263#include <linux/cache.h> 265#include <linux/cache.h>
264#include <linux/err.h> 266#include <linux/err.h>
265#include <linux/crypto.h> 267#include <linux/crypto.h>
@@ -1227,7 +1229,14 @@ int tcp_read_sock(struct sock *sk, read_descriptor_t *desc,
1227 copied += used; 1229 copied += used;
1228 offset += used; 1230 offset += used;
1229 } 1231 }
1230 if (offset != skb->len) 1232 /*
1233 * If recv_actor drops the lock (e.g. TCP splice
1234 * receive) the skb pointer might be invalid when
1235 * getting here: tcp_collapse might have deleted it
1236 * while aggregating skbs from the socket queue.
1237 */
1238 skb = tcp_recv_skb(sk, seq-1, &offset);
1239 if (!skb || (offset+1 != skb->len))
1231 break; 1240 break;
1232 } 1241 }
1233 if (tcp_hdr(skb)->fin) { 1242 if (tcp_hdr(skb)->fin) {
@@ -2105,12 +2114,15 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
2105 break; 2114 break;
2106 2115
2107 case TCP_DEFER_ACCEPT: 2116 case TCP_DEFER_ACCEPT:
2108 if (val < 0) { 2117 icsk->icsk_accept_queue.rskq_defer_accept = 0;
2109 err = -EINVAL; 2118 if (val > 0) {
2110 } else { 2119 /* Translate value in seconds to number of
2111 if (val > MAX_TCP_ACCEPT_DEFERRED) 2120 * retransmits */
2112 val = MAX_TCP_ACCEPT_DEFERRED; 2121 while (icsk->icsk_accept_queue.rskq_defer_accept < 32 &&
2113 icsk->icsk_accept_queue.rskq_defer_accept = val; 2122 val > ((TCP_TIMEOUT_INIT / HZ) <<
2123 icsk->icsk_accept_queue.rskq_defer_accept))
2124 icsk->icsk_accept_queue.rskq_defer_accept++;
2125 icsk->icsk_accept_queue.rskq_defer_accept++;
2114 } 2126 }
2115 break; 2127 break;
2116 2128
@@ -2292,7 +2304,8 @@ static int do_tcp_getsockopt(struct sock *sk, int level,
2292 val = (val ? : sysctl_tcp_fin_timeout) / HZ; 2304 val = (val ? : sysctl_tcp_fin_timeout) / HZ;
2293 break; 2305 break;
2294 case TCP_DEFER_ACCEPT: 2306 case TCP_DEFER_ACCEPT:
2295 val = icsk->icsk_accept_queue.rskq_defer_accept; 2307 val = !icsk->icsk_accept_queue.rskq_defer_accept ? 0 :
2308 ((TCP_TIMEOUT_INIT / HZ) << (icsk->icsk_accept_queue.rskq_defer_accept - 1));
2296 break; 2309 break;
2297 case TCP_WINDOW_CLAMP: 2310 case TCP_WINDOW_CLAMP:
2298 val = tp->window_clamp; 2311 val = tp->window_clamp;
@@ -2609,7 +2622,7 @@ __setup("thash_entries=", set_thash_entries);
2609void __init tcp_init(void) 2622void __init tcp_init(void)
2610{ 2623{
2611 struct sk_buff *skb = NULL; 2624 struct sk_buff *skb = NULL;
2612 unsigned long limit; 2625 unsigned long nr_pages, limit;
2613 int order, i, max_share; 2626 int order, i, max_share;
2614 2627
2615 BUILD_BUG_ON(sizeof(struct tcp_skb_cb) > sizeof(skb->cb)); 2628 BUILD_BUG_ON(sizeof(struct tcp_skb_cb) > sizeof(skb->cb));
@@ -2678,8 +2691,9 @@ void __init tcp_init(void)
2678 * is up to 1/2 at 256 MB, decreasing toward zero with the amount of 2691 * is up to 1/2 at 256 MB, decreasing toward zero with the amount of
2679 * memory, with a floor of 128 pages. 2692 * memory, with a floor of 128 pages.
2680 */ 2693 */
2681 limit = min(nr_all_pages, 1UL<<(28-PAGE_SHIFT)) >> (20-PAGE_SHIFT); 2694 nr_pages = totalram_pages - totalhigh_pages;
2682 limit = (limit * (nr_all_pages >> (20-PAGE_SHIFT))) >> (PAGE_SHIFT-11); 2695 limit = min(nr_pages, 1UL<<(28-PAGE_SHIFT)) >> (20-PAGE_SHIFT);
2696 limit = (limit * (nr_pages >> (20-PAGE_SHIFT))) >> (PAGE_SHIFT-11);
2683 limit = max(limit, 128UL); 2697 limit = max(limit, 128UL);
2684 sysctl_tcp_mem[0] = limit / 4 * 3; 2698 sysctl_tcp_mem[0] = limit / 4 * 3;
2685 sysctl_tcp_mem[1] = limit; 2699 sysctl_tcp_mem[1] = limit;
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index b54d9d37b636..cad73b7dfef0 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1392,9 +1392,9 @@ static struct sk_buff *tcp_maybe_skipping_dsack(struct sk_buff *skb,
1392 1392
1393 if (before(next_dup->start_seq, skip_to_seq)) { 1393 if (before(next_dup->start_seq, skip_to_seq)) {
1394 skb = tcp_sacktag_skip(skb, sk, next_dup->start_seq, fack_count); 1394 skb = tcp_sacktag_skip(skb, sk, next_dup->start_seq, fack_count);
1395 tcp_sacktag_walk(skb, sk, NULL, 1395 skb = tcp_sacktag_walk(skb, sk, NULL,
1396 next_dup->start_seq, next_dup->end_seq, 1396 next_dup->start_seq, next_dup->end_seq,
1397 1, fack_count, reord, flag); 1397 1, fack_count, reord, flag);
1398 } 1398 }
1399 1399
1400 return skb; 1400 return skb;
@@ -2483,6 +2483,20 @@ static inline void tcp_complete_cwr(struct sock *sk)
2483 tcp_ca_event(sk, CA_EVENT_COMPLETE_CWR); 2483 tcp_ca_event(sk, CA_EVENT_COMPLETE_CWR);
2484} 2484}
2485 2485
2486static void tcp_try_keep_open(struct sock *sk)
2487{
2488 struct tcp_sock *tp = tcp_sk(sk);
2489 int state = TCP_CA_Open;
2490
2491 if (tcp_left_out(tp) || tp->retrans_out || tp->undo_marker)
2492 state = TCP_CA_Disorder;
2493
2494 if (inet_csk(sk)->icsk_ca_state != state) {
2495 tcp_set_ca_state(sk, state);
2496 tp->high_seq = tp->snd_nxt;
2497 }
2498}
2499
2486static void tcp_try_to_open(struct sock *sk, int flag) 2500static void tcp_try_to_open(struct sock *sk, int flag)
2487{ 2501{
2488 struct tcp_sock *tp = tcp_sk(sk); 2502 struct tcp_sock *tp = tcp_sk(sk);
@@ -2496,15 +2510,7 @@ static void tcp_try_to_open(struct sock *sk, int flag)
2496 tcp_enter_cwr(sk, 1); 2510 tcp_enter_cwr(sk, 1);
2497 2511
2498 if (inet_csk(sk)->icsk_ca_state != TCP_CA_CWR) { 2512 if (inet_csk(sk)->icsk_ca_state != TCP_CA_CWR) {
2499 int state = TCP_CA_Open; 2513 tcp_try_keep_open(sk);
2500
2501 if (tcp_left_out(tp) || tp->retrans_out || tp->undo_marker)
2502 state = TCP_CA_Disorder;
2503
2504 if (inet_csk(sk)->icsk_ca_state != state) {
2505 tcp_set_ca_state(sk, state);
2506 tp->high_seq = tp->snd_nxt;
2507 }
2508 tcp_moderate_cwnd(tp); 2514 tcp_moderate_cwnd(tp);
2509 } else { 2515 } else {
2510 tcp_cwnd_down(sk, flag); 2516 tcp_cwnd_down(sk, flag);
@@ -3310,8 +3316,11 @@ no_queue:
3310 return 1; 3316 return 1;
3311 3317
3312old_ack: 3318old_ack:
3313 if (TCP_SKB_CB(skb)->sacked) 3319 if (TCP_SKB_CB(skb)->sacked) {
3314 tcp_sacktag_write_queue(sk, skb, prior_snd_una); 3320 tcp_sacktag_write_queue(sk, skb, prior_snd_una);
3321 if (icsk->icsk_ca_state == TCP_CA_Open)
3322 tcp_try_keep_open(sk);
3323 }
3315 3324
3316uninteresting_ack: 3325uninteresting_ack:
3317 SOCK_DEBUG(sk, "Ack %u out of %u:%u\n", ack, tp->snd_una, tp->snd_nxt); 3326 SOCK_DEBUG(sk, "Ack %u out of %u:%u\n", ack, tp->snd_una, tp->snd_nxt);
@@ -4532,49 +4541,6 @@ static void tcp_urg(struct sock *sk, struct sk_buff *skb, struct tcphdr *th)
4532 } 4541 }
4533} 4542}
4534 4543
4535static int tcp_defer_accept_check(struct sock *sk)
4536{
4537 struct tcp_sock *tp = tcp_sk(sk);
4538
4539 if (tp->defer_tcp_accept.request) {
4540 int queued_data = tp->rcv_nxt - tp->copied_seq;
4541 int hasfin = !skb_queue_empty(&sk->sk_receive_queue) ?
4542 tcp_hdr((struct sk_buff *)
4543 sk->sk_receive_queue.prev)->fin : 0;
4544
4545 if (queued_data && hasfin)
4546 queued_data--;
4547
4548 if (queued_data &&
4549 tp->defer_tcp_accept.listen_sk->sk_state == TCP_LISTEN) {
4550 if (sock_flag(sk, SOCK_KEEPOPEN)) {
4551 inet_csk_reset_keepalive_timer(sk,
4552 keepalive_time_when(tp));
4553 } else {
4554 inet_csk_delete_keepalive_timer(sk);
4555 }
4556
4557 inet_csk_reqsk_queue_add(
4558 tp->defer_tcp_accept.listen_sk,
4559 tp->defer_tcp_accept.request,
4560 sk);
4561
4562 tp->defer_tcp_accept.listen_sk->sk_data_ready(
4563 tp->defer_tcp_accept.listen_sk, 0);
4564
4565 sock_put(tp->defer_tcp_accept.listen_sk);
4566 sock_put(sk);
4567 tp->defer_tcp_accept.listen_sk = NULL;
4568 tp->defer_tcp_accept.request = NULL;
4569 } else if (hasfin ||
4570 tp->defer_tcp_accept.listen_sk->sk_state != TCP_LISTEN) {
4571 tcp_reset(sk);
4572 return -1;
4573 }
4574 }
4575 return 0;
4576}
4577
4578static int tcp_copy_to_iovec(struct sock *sk, struct sk_buff *skb, int hlen) 4544static int tcp_copy_to_iovec(struct sock *sk, struct sk_buff *skb, int hlen)
4579{ 4545{
4580 struct tcp_sock *tp = tcp_sk(sk); 4546 struct tcp_sock *tp = tcp_sk(sk);
@@ -4935,8 +4901,6 @@ step5:
4935 4901
4936 tcp_data_snd_check(sk); 4902 tcp_data_snd_check(sk);
4937 tcp_ack_snd_check(sk); 4903 tcp_ack_snd_check(sk);
4938
4939 tcp_defer_accept_check(sk);
4940 return 0; 4904 return 0;
4941 4905
4942csum_error: 4906csum_error:
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index cd601a866c2f..ffe869ac1bcf 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -85,10 +85,6 @@
85int sysctl_tcp_tw_reuse __read_mostly; 85int sysctl_tcp_tw_reuse __read_mostly;
86int sysctl_tcp_low_latency __read_mostly; 86int sysctl_tcp_low_latency __read_mostly;
87 87
88/* Check TCP sequence numbers in ICMP packets. */
89#define ICMP_MIN_LENGTH 8
90
91void tcp_v4_send_check(struct sock *sk, int len, struct sk_buff *skb);
92 88
93#ifdef CONFIG_TCP_MD5SIG 89#ifdef CONFIG_TCP_MD5SIG
94static struct tcp_md5sig_key *tcp_v4_md5_do_lookup(struct sock *sk, 90static struct tcp_md5sig_key *tcp_v4_md5_do_lookup(struct sock *sk,
@@ -1285,7 +1281,7 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
1285 if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) 1281 if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1)
1286 goto drop; 1282 goto drop;
1287 1283
1288 req = reqsk_alloc(&tcp_request_sock_ops); 1284 req = inet_reqsk_alloc(&tcp_request_sock_ops);
1289 if (!req) 1285 if (!req)
1290 goto drop; 1286 goto drop;
1291 1287
@@ -1918,14 +1914,6 @@ int tcp_v4_destroy_sock(struct sock *sk)
1918 sk->sk_sndmsg_page = NULL; 1914 sk->sk_sndmsg_page = NULL;
1919 } 1915 }
1920 1916
1921 if (tp->defer_tcp_accept.request) {
1922 reqsk_free(tp->defer_tcp_accept.request);
1923 sock_put(tp->defer_tcp_accept.listen_sk);
1924 sock_put(sk);
1925 tp->defer_tcp_accept.listen_sk = NULL;
1926 tp->defer_tcp_accept.request = NULL;
1927 }
1928
1929 atomic_dec(&tcp_sockets_allocated); 1917 atomic_dec(&tcp_sockets_allocated);
1930 1918
1931 return 0; 1919 return 0;
@@ -2303,7 +2291,7 @@ static void get_tcp4_sock(struct sock *sk, struct seq_file *f, int i, int *len)
2303 } 2291 }
2304 2292
2305 seq_printf(f, "%4d: %08X:%04X %08X:%04X %02X %08X:%08X %02X:%08lX " 2293 seq_printf(f, "%4d: %08X:%04X %08X:%04X %02X %08X:%08X %02X:%08lX "
2306 "%08X %5d %8d %lu %d %p %u %u %u %u %d%n", 2294 "%08X %5d %8d %lu %d %p %lu %lu %u %u %d%n",
2307 i, src, srcp, dest, destp, sk->sk_state, 2295 i, src, srcp, dest, destp, sk->sk_state,
2308 tp->write_seq - tp->snd_una, 2296 tp->write_seq - tp->snd_una,
2309 sk->sk_state == TCP_LISTEN ? sk->sk_ack_backlog : 2297 sk->sk_state == TCP_LISTEN ? sk->sk_ack_backlog :
@@ -2315,8 +2303,8 @@ static void get_tcp4_sock(struct sock *sk, struct seq_file *f, int i, int *len)
2315 icsk->icsk_probes_out, 2303 icsk->icsk_probes_out,
2316 sock_i_ino(sk), 2304 sock_i_ino(sk),
2317 atomic_read(&sk->sk_refcnt), sk, 2305 atomic_read(&sk->sk_refcnt), sk,
2318 icsk->icsk_rto, 2306 jiffies_to_clock_t(icsk->icsk_rto),
2319 icsk->icsk_ack.ato, 2307 jiffies_to_clock_t(icsk->icsk_ack.ato),
2320 (icsk->icsk_ack.quick << 1) | icsk->icsk_ack.pingpong, 2308 (icsk->icsk_ack.quick << 1) | icsk->icsk_ack.pingpong,
2321 tp->snd_cwnd, 2309 tp->snd_cwnd,
2322 tp->snd_ssthresh >= 0xFFFF ? -1 : tp->snd_ssthresh, 2310 tp->snd_ssthresh >= 0xFFFF ? -1 : tp->snd_ssthresh,
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
index 019c8c16e5cc..8245247a6ceb 100644
--- a/net/ipv4/tcp_minisocks.c
+++ b/net/ipv4/tcp_minisocks.c
@@ -571,8 +571,10 @@ struct sock *tcp_check_req(struct sock *sk,struct sk_buff *skb,
571 does sequence test, SYN is truncated, and thus we consider 571 does sequence test, SYN is truncated, and thus we consider
572 it a bare ACK. 572 it a bare ACK.
573 573
574 Both ends (listening sockets) accept the new incoming 574 If icsk->icsk_accept_queue.rskq_defer_accept, we silently drop this
575 connection and try to talk to each other. 8-) 575 bare ACK. Otherwise, we create an established connection. Both
576 ends (listening sockets) accept the new incoming connection and try
577 to talk to each other. 8-)
576 578
577 Note: This case is both harmless, and rare. Possibility is about the 579 Note: This case is both harmless, and rare. Possibility is about the
578 same as us discovering intelligent life on another plant tomorrow. 580 same as us discovering intelligent life on another plant tomorrow.
@@ -640,6 +642,13 @@ struct sock *tcp_check_req(struct sock *sk,struct sk_buff *skb,
640 if (!(flg & TCP_FLAG_ACK)) 642 if (!(flg & TCP_FLAG_ACK))
641 return NULL; 643 return NULL;
642 644
645 /* If TCP_DEFER_ACCEPT is set, drop bare ACK. */
646 if (inet_csk(sk)->icsk_accept_queue.rskq_defer_accept &&
647 TCP_SKB_CB(skb)->end_seq == tcp_rsk(req)->rcv_isn + 1) {
648 inet_rsk(req)->acked = 1;
649 return NULL;
650 }
651
643 /* OK, ACK is valid, create big socket and 652 /* OK, ACK is valid, create big socket and
644 * feed this segment to it. It will repeat all 653 * feed this segment to it. It will repeat all
645 * the tests. THIS SEGMENT MUST MOVE SOCKET TO 654 * the tests. THIS SEGMENT MUST MOVE SOCKET TO
@@ -678,24 +687,7 @@ struct sock *tcp_check_req(struct sock *sk,struct sk_buff *skb,
678 inet_csk_reqsk_queue_unlink(sk, req, prev); 687 inet_csk_reqsk_queue_unlink(sk, req, prev);
679 inet_csk_reqsk_queue_removed(sk, req); 688 inet_csk_reqsk_queue_removed(sk, req);
680 689
681 if (inet_csk(sk)->icsk_accept_queue.rskq_defer_accept && 690 inet_csk_reqsk_queue_add(sk, req, child);
682 TCP_SKB_CB(skb)->end_seq == tcp_rsk(req)->rcv_isn + 1) {
683
684 /* the accept queue handling is done is est recv slow
685 * path so lets make sure to start there
686 */
687 tcp_sk(child)->pred_flags = 0;
688 sock_hold(sk);
689 sock_hold(child);
690 tcp_sk(child)->defer_tcp_accept.listen_sk = sk;
691 tcp_sk(child)->defer_tcp_accept.request = req;
692
693 inet_csk_reset_keepalive_timer(child,
694 inet_csk(sk)->icsk_accept_queue.rskq_defer_accept * HZ);
695 } else {
696 inet_csk_reqsk_queue_add(sk, req, child);
697 }
698
699 return child; 691 return child;
700 692
701 listen_overflow: 693 listen_overflow:
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index debf23581606..ad993ecb4810 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1836,7 +1836,7 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb)
1836{ 1836{
1837 struct tcp_sock *tp = tcp_sk(sk); 1837 struct tcp_sock *tp = tcp_sk(sk);
1838 struct inet_connection_sock *icsk = inet_csk(sk); 1838 struct inet_connection_sock *icsk = inet_csk(sk);
1839 unsigned int cur_mss = tcp_current_mss(sk, 0); 1839 unsigned int cur_mss;
1840 int err; 1840 int err;
1841 1841
1842 /* Inconslusive MTU probe */ 1842 /* Inconslusive MTU probe */
@@ -1858,6 +1858,11 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb)
1858 return -ENOMEM; 1858 return -ENOMEM;
1859 } 1859 }
1860 1860
1861 if (inet_csk(sk)->icsk_af_ops->rebuild_header(sk))
1862 return -EHOSTUNREACH; /* Routing failure or similar. */
1863
1864 cur_mss = tcp_current_mss(sk, 0);
1865
1861 /* If receiver has shrunk his window, and skb is out of 1866 /* If receiver has shrunk his window, and skb is out of
1862 * new window, do not retransmit it. The exception is the 1867 * new window, do not retransmit it. The exception is the
1863 * case, when window is shrunk to zero. In this case 1868 * case, when window is shrunk to zero. In this case
@@ -1884,9 +1889,6 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb)
1884 (sysctl_tcp_retrans_collapse != 0)) 1889 (sysctl_tcp_retrans_collapse != 0))
1885 tcp_retrans_try_collapse(sk, skb, cur_mss); 1890 tcp_retrans_try_collapse(sk, skb, cur_mss);
1886 1891
1887 if (inet_csk(sk)->icsk_af_ops->rebuild_header(sk))
1888 return -EHOSTUNREACH; /* Routing failure or similar. */
1889
1890 /* Some Solaris stacks overoptimize and ignore the FIN on a 1892 /* Some Solaris stacks overoptimize and ignore the FIN on a
1891 * retransmit when old data is attached. So strip it off 1893 * retransmit when old data is attached. So strip it off
1892 * since it is cheap to do so and saves bytes on the network. 1894 * since it is cheap to do so and saves bytes on the network.
@@ -2129,6 +2131,8 @@ void tcp_send_active_reset(struct sock *sk, gfp_t priority)
2129 TCP_SKB_CB(skb)->when = tcp_time_stamp; 2131 TCP_SKB_CB(skb)->when = tcp_time_stamp;
2130 if (tcp_transmit_skb(sk, skb, 0, priority)) 2132 if (tcp_transmit_skb(sk, skb, 0, priority))
2131 NET_INC_STATS(LINUX_MIB_TCPABORTFAILED); 2133 NET_INC_STATS(LINUX_MIB_TCPABORTFAILED);
2134
2135 TCP_INC_STATS(TCP_MIB_OUTRSTS);
2132} 2136}
2133 2137
2134/* WARNING: This routine must only be called when we have already sent 2138/* WARNING: This routine must only be called when we have already sent
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index 4de68cf5f2aa..63ed9d6830e7 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -489,11 +489,6 @@ static void tcp_keepalive_timer (unsigned long data)
489 goto death; 489 goto death;
490 } 490 }
491 491
492 if (tp->defer_tcp_accept.request && sk->sk_state == TCP_ESTABLISHED) {
493 tcp_send_active_reset(sk, GFP_ATOMIC);
494 goto death;
495 }
496
497 if (!sock_flag(sk, SOCK_KEEPOPEN) || sk->sk_state == TCP_CLOSE) 492 if (!sock_flag(sk, SOCK_KEEPOPEN) || sk->sk_state == TCP_CLOSE)
498 goto out; 493 goto out;
499 494
diff --git a/net/ipv4/tunnel4.c b/net/ipv4/tunnel4.c
index d3b709a6f264..cb1f0e83830b 100644
--- a/net/ipv4/tunnel4.c
+++ b/net/ipv4/tunnel4.c
@@ -97,7 +97,7 @@ static int tunnel64_rcv(struct sk_buff *skb)
97{ 97{
98 struct xfrm_tunnel *handler; 98 struct xfrm_tunnel *handler;
99 99
100 if (!pskb_may_pull(skb, sizeof(struct iphdr))) 100 if (!pskb_may_pull(skb, sizeof(struct ipv6hdr)))
101 goto drop; 101 goto drop;
102 102
103 for (handler = tunnel64_handlers; handler; handler = handler->next) 103 for (handler = tunnel64_handlers; handler; handler = handler->next)
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index db1cb7c96d63..56fcda3694ba 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -420,7 +420,7 @@ void udp_err(struct sk_buff *skb, u32 info)
420/* 420/*
421 * Throw away all pending data and cancel the corking. Socket is locked. 421 * Throw away all pending data and cancel the corking. Socket is locked.
422 */ 422 */
423static void udp_flush_pending_frames(struct sock *sk) 423void udp_flush_pending_frames(struct sock *sk)
424{ 424{
425 struct udp_sock *up = udp_sk(sk); 425 struct udp_sock *up = udp_sk(sk);
426 426
@@ -430,6 +430,7 @@ static void udp_flush_pending_frames(struct sock *sk)
430 ip_flush_pending_frames(sk); 430 ip_flush_pending_frames(sk);
431 } 431 }
432} 432}
433EXPORT_SYMBOL(udp_flush_pending_frames);
433 434
434/** 435/**
435 * udp4_hwcsum_outgoing - handle outgoing HW checksumming 436 * udp4_hwcsum_outgoing - handle outgoing HW checksumming
diff --git a/net/ipv4/xfrm4_mode_tunnel.c b/net/ipv4/xfrm4_mode_tunnel.c
index 584e6d74e3a9..7135279f3f84 100644
--- a/net/ipv4/xfrm4_mode_tunnel.c
+++ b/net/ipv4/xfrm4_mode_tunnel.c
@@ -52,7 +52,7 @@ static int xfrm4_mode_tunnel_output(struct xfrm_state *x, struct sk_buff *skb)
52 IP_ECN_clear(top_iph); 52 IP_ECN_clear(top_iph);
53 53
54 top_iph->frag_off = (flags & XFRM_STATE_NOPMTUDISC) ? 54 top_iph->frag_off = (flags & XFRM_STATE_NOPMTUDISC) ?
55 0 : XFRM_MODE_SKB_CB(skb)->frag_off; 55 0 : (XFRM_MODE_SKB_CB(skb)->frag_off & htons(IP_DF));
56 ip_select_ident(top_iph, dst->child, NULL); 56 ip_select_ident(top_iph, dst->child, NULL);
57 57
58 top_iph->ttl = dst_metric(dst->child, RTAX_HOPLIMIT); 58 top_iph->ttl = dst_metric(dst->child, RTAX_HOPLIMIT);
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index e591e09e5e4e..147588f4c7c0 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -731,8 +731,13 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)
731 onlink = -1; 731 onlink = -1;
732 732
733 spin_lock(&ifa->lock); 733 spin_lock(&ifa->lock);
734 lifetime = min_t(unsigned long, 734
735 ifa->valid_lft, 0x7fffffffUL/HZ); 735 lifetime = addrconf_timeout_fixup(ifa->valid_lft, HZ);
736 /*
737 * Note: Because this address is
738 * not permanent, lifetime <
739 * LONG_MAX / HZ here.
740 */
736 if (time_before(expires, 741 if (time_before(expires,
737 ifa->tstamp + lifetime * HZ)) 742 ifa->tstamp + lifetime * HZ))
738 expires = ifa->tstamp + lifetime * HZ; 743 expires = ifa->tstamp + lifetime * HZ;
@@ -1722,7 +1727,6 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len)
1722 __u32 valid_lft; 1727 __u32 valid_lft;
1723 __u32 prefered_lft; 1728 __u32 prefered_lft;
1724 int addr_type; 1729 int addr_type;
1725 unsigned long rt_expires;
1726 struct inet6_dev *in6_dev; 1730 struct inet6_dev *in6_dev;
1727 1731
1728 pinfo = (struct prefix_info *) opt; 1732 pinfo = (struct prefix_info *) opt;
@@ -1764,41 +1768,49 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len)
1764 * 2) Configure prefixes with the auto flag set 1768 * 2) Configure prefixes with the auto flag set
1765 */ 1769 */
1766 1770
1767 /* Avoid arithmetic overflow. Really, we could
1768 save rt_expires in seconds, likely valid_lft,
1769 but it would require division in fib gc, that it
1770 not good.
1771 */
1772 if (valid_lft >= 0x7FFFFFFF/HZ)
1773 rt_expires = 0x7FFFFFFF - (0x7FFFFFFF % HZ);
1774 else
1775 rt_expires = valid_lft * HZ;
1776
1777 /*
1778 * We convert this (in jiffies) to clock_t later.
1779 * Avoid arithmetic overflow there as well.
1780 * Overflow can happen only if HZ < USER_HZ.
1781 */
1782 if (HZ < USER_HZ && rt_expires > 0x7FFFFFFF / USER_HZ)
1783 rt_expires = 0x7FFFFFFF / USER_HZ;
1784
1785 if (pinfo->onlink) { 1771 if (pinfo->onlink) {
1786 struct rt6_info *rt; 1772 struct rt6_info *rt;
1773 unsigned long rt_expires;
1774
1775 /* Avoid arithmetic overflow. Really, we could
1776 * save rt_expires in seconds, likely valid_lft,
1777 * but it would require division in fib gc, that it
1778 * not good.
1779 */
1780 if (HZ > USER_HZ)
1781 rt_expires = addrconf_timeout_fixup(valid_lft, HZ);
1782 else
1783 rt_expires = addrconf_timeout_fixup(valid_lft, USER_HZ);
1784
1785 if (addrconf_finite_timeout(rt_expires))
1786 rt_expires *= HZ;
1787
1787 rt = rt6_lookup(dev_net(dev), &pinfo->prefix, NULL, 1788 rt = rt6_lookup(dev_net(dev), &pinfo->prefix, NULL,
1788 dev->ifindex, 1); 1789 dev->ifindex, 1);
1789 1790
1790 if (rt && ((rt->rt6i_flags & (RTF_GATEWAY | RTF_DEFAULT)) == 0)) { 1791 if (rt && ((rt->rt6i_flags & (RTF_GATEWAY | RTF_DEFAULT)) == 0)) {
1791 if (rt->rt6i_flags&RTF_EXPIRES) { 1792 /* Autoconf prefix route */
1792 if (valid_lft == 0) { 1793 if (valid_lft == 0) {
1793 ip6_del_rt(rt); 1794 ip6_del_rt(rt);
1794 rt = NULL; 1795 rt = NULL;
1795 } else { 1796 } else if (addrconf_finite_timeout(rt_expires)) {
1796 rt->rt6i_expires = jiffies + rt_expires; 1797 /* not infinity */
1797 } 1798 rt->rt6i_expires = jiffies + rt_expires;
1799 rt->rt6i_flags |= RTF_EXPIRES;
1800 } else {
1801 rt->rt6i_flags &= ~RTF_EXPIRES;
1802 rt->rt6i_expires = 0;
1798 } 1803 }
1799 } else if (valid_lft) { 1804 } else if (valid_lft) {
1805 clock_t expires = 0;
1806 int flags = RTF_ADDRCONF | RTF_PREFIX_RT;
1807 if (addrconf_finite_timeout(rt_expires)) {
1808 /* not infinity */
1809 flags |= RTF_EXPIRES;
1810 expires = jiffies_to_clock_t(rt_expires);
1811 }
1800 addrconf_prefix_route(&pinfo->prefix, pinfo->prefix_len, 1812 addrconf_prefix_route(&pinfo->prefix, pinfo->prefix_len,
1801 dev, jiffies_to_clock_t(rt_expires), RTF_ADDRCONF|RTF_EXPIRES|RTF_PREFIX_RT); 1813 dev, expires, flags);
1802 } 1814 }
1803 if (rt) 1815 if (rt)
1804 dst_release(&rt->u.dst); 1816 dst_release(&rt->u.dst);
@@ -2014,17 +2026,22 @@ err_exit:
2014 * Manual configuration of address on an interface 2026 * Manual configuration of address on an interface
2015 */ 2027 */
2016static int inet6_addr_add(struct net *net, int ifindex, struct in6_addr *pfx, 2028static int inet6_addr_add(struct net *net, int ifindex, struct in6_addr *pfx,
2017 int plen, __u8 ifa_flags, __u32 prefered_lft, 2029 unsigned int plen, __u8 ifa_flags, __u32 prefered_lft,
2018 __u32 valid_lft) 2030 __u32 valid_lft)
2019{ 2031{
2020 struct inet6_ifaddr *ifp; 2032 struct inet6_ifaddr *ifp;
2021 struct inet6_dev *idev; 2033 struct inet6_dev *idev;
2022 struct net_device *dev; 2034 struct net_device *dev;
2023 int scope; 2035 int scope;
2024 u32 flags = RTF_EXPIRES; 2036 u32 flags;
2037 clock_t expires;
2038 unsigned long timeout;
2025 2039
2026 ASSERT_RTNL(); 2040 ASSERT_RTNL();
2027 2041
2042 if (plen > 128)
2043 return -EINVAL;
2044
2028 /* check the lifetime */ 2045 /* check the lifetime */
2029 if (!valid_lft || prefered_lft > valid_lft) 2046 if (!valid_lft || prefered_lft > valid_lft)
2030 return -EINVAL; 2047 return -EINVAL;
@@ -2038,17 +2055,23 @@ static int inet6_addr_add(struct net *net, int ifindex, struct in6_addr *pfx,
2038 2055
2039 scope = ipv6_addr_scope(pfx); 2056 scope = ipv6_addr_scope(pfx);
2040 2057
2041 if (valid_lft == INFINITY_LIFE_TIME) { 2058 timeout = addrconf_timeout_fixup(valid_lft, HZ);
2042 ifa_flags |= IFA_F_PERMANENT; 2059 if (addrconf_finite_timeout(timeout)) {
2060 expires = jiffies_to_clock_t(timeout * HZ);
2061 valid_lft = timeout;
2062 flags = RTF_EXPIRES;
2063 } else {
2064 expires = 0;
2043 flags = 0; 2065 flags = 0;
2044 } else if (valid_lft >= 0x7FFFFFFF/HZ) 2066 ifa_flags |= IFA_F_PERMANENT;
2045 valid_lft = 0x7FFFFFFF/HZ; 2067 }
2046 2068
2047 if (prefered_lft == 0) 2069 timeout = addrconf_timeout_fixup(prefered_lft, HZ);
2048 ifa_flags |= IFA_F_DEPRECATED; 2070 if (addrconf_finite_timeout(timeout)) {
2049 else if ((prefered_lft >= 0x7FFFFFFF/HZ) && 2071 if (timeout == 0)
2050 (prefered_lft != INFINITY_LIFE_TIME)) 2072 ifa_flags |= IFA_F_DEPRECATED;
2051 prefered_lft = 0x7FFFFFFF/HZ; 2073 prefered_lft = timeout;
2074 }
2052 2075
2053 ifp = ipv6_add_addr(idev, pfx, plen, scope, ifa_flags); 2076 ifp = ipv6_add_addr(idev, pfx, plen, scope, ifa_flags);
2054 2077
@@ -2060,7 +2083,7 @@ static int inet6_addr_add(struct net *net, int ifindex, struct in6_addr *pfx,
2060 spin_unlock_bh(&ifp->lock); 2083 spin_unlock_bh(&ifp->lock);
2061 2084
2062 addrconf_prefix_route(&ifp->addr, ifp->prefix_len, dev, 2085 addrconf_prefix_route(&ifp->addr, ifp->prefix_len, dev,
2063 jiffies_to_clock_t(valid_lft * HZ), flags); 2086 expires, flags);
2064 /* 2087 /*
2065 * Note that section 3.1 of RFC 4429 indicates 2088 * Note that section 3.1 of RFC 4429 indicates
2066 * that the Optimistic flag should not be set for 2089 * that the Optimistic flag should not be set for
@@ -2076,12 +2099,15 @@ static int inet6_addr_add(struct net *net, int ifindex, struct in6_addr *pfx,
2076} 2099}
2077 2100
2078static int inet6_addr_del(struct net *net, int ifindex, struct in6_addr *pfx, 2101static int inet6_addr_del(struct net *net, int ifindex, struct in6_addr *pfx,
2079 int plen) 2102 unsigned int plen)
2080{ 2103{
2081 struct inet6_ifaddr *ifp; 2104 struct inet6_ifaddr *ifp;
2082 struct inet6_dev *idev; 2105 struct inet6_dev *idev;
2083 struct net_device *dev; 2106 struct net_device *dev;
2084 2107
2108 if (plen > 128)
2109 return -EINVAL;
2110
2085 dev = __dev_get_by_index(net, ifindex); 2111 dev = __dev_get_by_index(net, ifindex);
2086 if (!dev) 2112 if (!dev)
2087 return -ENODEV; 2113 return -ENODEV;
@@ -3148,22 +3174,30 @@ inet6_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
3148static int inet6_addr_modify(struct inet6_ifaddr *ifp, u8 ifa_flags, 3174static int inet6_addr_modify(struct inet6_ifaddr *ifp, u8 ifa_flags,
3149 u32 prefered_lft, u32 valid_lft) 3175 u32 prefered_lft, u32 valid_lft)
3150{ 3176{
3151 u32 flags = RTF_EXPIRES; 3177 u32 flags;
3178 clock_t expires;
3179 unsigned long timeout;
3152 3180
3153 if (!valid_lft || (prefered_lft > valid_lft)) 3181 if (!valid_lft || (prefered_lft > valid_lft))
3154 return -EINVAL; 3182 return -EINVAL;
3155 3183
3156 if (valid_lft == INFINITY_LIFE_TIME) { 3184 timeout = addrconf_timeout_fixup(valid_lft, HZ);
3157 ifa_flags |= IFA_F_PERMANENT; 3185 if (addrconf_finite_timeout(timeout)) {
3186 expires = jiffies_to_clock_t(timeout * HZ);
3187 valid_lft = timeout;
3188 flags = RTF_EXPIRES;
3189 } else {
3190 expires = 0;
3158 flags = 0; 3191 flags = 0;
3159 } else if (valid_lft >= 0x7FFFFFFF/HZ) 3192 ifa_flags |= IFA_F_PERMANENT;
3160 valid_lft = 0x7FFFFFFF/HZ; 3193 }
3161 3194
3162 if (prefered_lft == 0) 3195 timeout = addrconf_timeout_fixup(prefered_lft, HZ);
3163 ifa_flags |= IFA_F_DEPRECATED; 3196 if (addrconf_finite_timeout(timeout)) {
3164 else if ((prefered_lft >= 0x7FFFFFFF/HZ) && 3197 if (timeout == 0)
3165 (prefered_lft != INFINITY_LIFE_TIME)) 3198 ifa_flags |= IFA_F_DEPRECATED;
3166 prefered_lft = 0x7FFFFFFF/HZ; 3199 prefered_lft = timeout;
3200 }
3167 3201
3168 spin_lock_bh(&ifp->lock); 3202 spin_lock_bh(&ifp->lock);
3169 ifp->flags = (ifp->flags & ~(IFA_F_DEPRECATED | IFA_F_PERMANENT | IFA_F_NODAD | IFA_F_HOMEADDRESS)) | ifa_flags; 3203 ifp->flags = (ifp->flags & ~(IFA_F_DEPRECATED | IFA_F_PERMANENT | IFA_F_NODAD | IFA_F_HOMEADDRESS)) | ifa_flags;
@@ -3176,7 +3210,7 @@ static int inet6_addr_modify(struct inet6_ifaddr *ifp, u8 ifa_flags,
3176 ipv6_ifa_notify(0, ifp); 3210 ipv6_ifa_notify(0, ifp);
3177 3211
3178 addrconf_prefix_route(&ifp->addr, ifp->prefix_len, ifp->idev->dev, 3212 addrconf_prefix_route(&ifp->addr, ifp->prefix_len, ifp->idev->dev,
3179 jiffies_to_clock_t(valid_lft * HZ), flags); 3213 expires, flags);
3180 addrconf_verify(0); 3214 addrconf_verify(0);
3181 3215
3182 return 0; 3216 return 0;
@@ -4242,7 +4276,7 @@ static void addrconf_sysctl_register(struct inet6_dev *idev)
4242 neigh_sysctl_register(idev->dev, idev->nd_parms, NET_IPV6, 4276 neigh_sysctl_register(idev->dev, idev->nd_parms, NET_IPV6,
4243 NET_IPV6_NEIGH, "ipv6", 4277 NET_IPV6_NEIGH, "ipv6",
4244 &ndisc_ifinfo_sysctl_change, 4278 &ndisc_ifinfo_sysctl_change,
4245 NULL); 4279 ndisc_ifinfo_sysctl_strategy);
4246 __addrconf_sysctl_register(dev_net(idev->dev), idev->dev->name, 4280 __addrconf_sysctl_register(dev_net(idev->dev), idev->dev->name,
4247 idev->dev->ifindex, idev, &idev->cnf); 4281 idev->dev->ifindex, idev, &idev->cnf);
4248} 4282}
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 3c6aafb02183..e84b3fd17fb4 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -191,7 +191,7 @@ lookup_protocol:
191 np->mcast_hops = -1; 191 np->mcast_hops = -1;
192 np->mc_loop = 1; 192 np->mc_loop = 1;
193 np->pmtudisc = IPV6_PMTUDISC_WANT; 193 np->pmtudisc = IPV6_PMTUDISC_WANT;
194 np->ipv6only = init_net.ipv6.sysctl.bindv6only; 194 np->ipv6only = net->ipv6.sysctl.bindv6only;
195 195
196 /* Init the ipv4 part of the socket since we can have sockets 196 /* Init the ipv4 part of the socket since we can have sockets
197 * using v6 API for ipv4. 197 * using v6 API for ipv4.
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c
index 94fa6ae77cfe..0f0f94a40335 100644
--- a/net/ipv6/datagram.c
+++ b/net/ipv6/datagram.c
@@ -496,7 +496,8 @@ int datagram_recv_ctl(struct sock *sk, struct msghdr *msg, struct sk_buff *skb)
496 return 0; 496 return 0;
497} 497}
498 498
499int datagram_send_ctl(struct msghdr *msg, struct flowi *fl, 499int datagram_send_ctl(struct net *net,
500 struct msghdr *msg, struct flowi *fl,
500 struct ipv6_txoptions *opt, 501 struct ipv6_txoptions *opt,
501 int *hlimit, int *tclass) 502 int *hlimit, int *tclass)
502{ 503{
@@ -509,7 +510,6 @@ int datagram_send_ctl(struct msghdr *msg, struct flowi *fl,
509 510
510 for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) { 511 for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) {
511 int addr_type; 512 int addr_type;
512 struct net_device *dev = NULL;
513 513
514 if (!CMSG_OK(msg, cmsg)) { 514 if (!CMSG_OK(msg, cmsg)) {
515 err = -EINVAL; 515 err = -EINVAL;
@@ -522,6 +522,9 @@ int datagram_send_ctl(struct msghdr *msg, struct flowi *fl,
522 switch (cmsg->cmsg_type) { 522 switch (cmsg->cmsg_type) {
523 case IPV6_PKTINFO: 523 case IPV6_PKTINFO:
524 case IPV6_2292PKTINFO: 524 case IPV6_2292PKTINFO:
525 {
526 struct net_device *dev = NULL;
527
525 if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct in6_pktinfo))) { 528 if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct in6_pktinfo))) {
526 err = -EINVAL; 529 err = -EINVAL;
527 goto exit_f; 530 goto exit_f;
@@ -535,32 +538,32 @@ int datagram_send_ctl(struct msghdr *msg, struct flowi *fl,
535 fl->oif = src_info->ipi6_ifindex; 538 fl->oif = src_info->ipi6_ifindex;
536 } 539 }
537 540
538 addr_type = ipv6_addr_type(&src_info->ipi6_addr); 541 addr_type = __ipv6_addr_type(&src_info->ipi6_addr);
539 542
540 if (addr_type == IPV6_ADDR_ANY) 543 if (fl->oif) {
541 break; 544 dev = dev_get_by_index(net, fl->oif);
545 if (!dev)
546 return -ENODEV;
547 } else if (addr_type & IPV6_ADDR_LINKLOCAL)
548 return -EINVAL;
542 549
543 if (addr_type & IPV6_ADDR_LINKLOCAL) { 550 if (addr_type != IPV6_ADDR_ANY) {
544 if (!src_info->ipi6_ifindex) 551 int strict = __ipv6_addr_src_scope(addr_type) <= IPV6_ADDR_SCOPE_LINKLOCAL;
545 return -EINVAL; 552 if (!ipv6_chk_addr(net, &src_info->ipi6_addr,
546 else { 553 strict ? dev : NULL, 0))
547 dev = dev_get_by_index(&init_net, src_info->ipi6_ifindex); 554 err = -EINVAL;
548 if (!dev) 555 else
549 return -ENODEV; 556 ipv6_addr_copy(&fl->fl6_src, &src_info->ipi6_addr);
550 }
551 }
552 if (!ipv6_chk_addr(&init_net, &src_info->ipi6_addr,
553 dev, 0)) {
554 if (dev)
555 dev_put(dev);
556 err = -EINVAL;
557 goto exit_f;
558 } 557 }
558
559 if (dev) 559 if (dev)
560 dev_put(dev); 560 dev_put(dev);
561 561
562 ipv6_addr_copy(&fl->fl6_src, &src_info->ipi6_addr); 562 if (err)
563 goto exit_f;
564
563 break; 565 break;
566 }
564 567
565 case IPV6_FLOWINFO: 568 case IPV6_FLOWINFO:
566 if (cmsg->cmsg_len < CMSG_LEN(4)) { 569 if (cmsg->cmsg_len < CMSG_LEN(4)) {
@@ -702,6 +705,11 @@ int datagram_send_ctl(struct msghdr *msg, struct flowi *fl,
702 } 705 }
703 706
704 *hlimit = *(int *)CMSG_DATA(cmsg); 707 *hlimit = *(int *)CMSG_DATA(cmsg);
708 if (*hlimit < -1 || *hlimit > 0xff) {
709 err = -EINVAL;
710 goto exit_f;
711 }
712
705 break; 713 break;
706 714
707 case IPV6_TCLASS: 715 case IPV6_TCLASS:
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c
index eb7a940310f4..37a4e777e347 100644
--- a/net/ipv6/ip6_flowlabel.c
+++ b/net/ipv6/ip6_flowlabel.c
@@ -354,7 +354,7 @@ fl_create(struct net *net, struct in6_flowlabel_req *freq, char __user *optval,
354 msg.msg_control = (void*)(fl->opt+1); 354 msg.msg_control = (void*)(fl->opt+1);
355 flowi.oif = 0; 355 flowi.oif = 0;
356 356
357 err = datagram_send_ctl(&msg, &flowi, fl->opt, &junk, &junk); 357 err = datagram_send_ctl(net, &msg, &flowi, fl->opt, &junk, &junk);
358 if (err) 358 if (err)
359 goto done; 359 goto done;
360 err = -EINVAL; 360 err = -EINVAL;
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c
index 4e5c8615832c..17eb48b8e329 100644
--- a/net/ipv6/ip6_input.c
+++ b/net/ipv6/ip6_input.c
@@ -102,6 +102,15 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt
102 if (hdr->version != 6) 102 if (hdr->version != 6)
103 goto err; 103 goto err;
104 104
105 /*
106 * RFC4291 2.5.3
107 * A packet received on an interface with a destination address
108 * of loopback must be dropped.
109 */
110 if (!(dev->flags & IFF_LOOPBACK) &&
111 ipv6_addr_loopback(&hdr->daddr))
112 goto err;
113
105 skb->transport_header = skb->network_header + sizeof(*hdr); 114 skb->transport_header = skb->network_header + sizeof(*hdr);
106 IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr); 115 IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr);
107 116
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 2de3c464fe75..14796181e8b5 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -197,7 +197,7 @@ static int ip6mr_vif_seq_show(struct seq_file *seq, void *v)
197 const char *name = vif->dev ? vif->dev->name : "none"; 197 const char *name = vif->dev ? vif->dev->name : "none";
198 198
199 seq_printf(seq, 199 seq_printf(seq,
200 "%2Zd %-10s %8ld %7ld %8ld %7ld %05X\n", 200 "%2td %-10s %8ld %7ld %8ld %7ld %05X\n",
201 vif - vif6_table, 201 vif - vif6_table,
202 name, vif->bytes_in, vif->pkt_in, 202 name, vif->bytes_in, vif->pkt_in,
203 vif->bytes_out, vif->pkt_out, 203 vif->bytes_out, vif->pkt_out,
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index 56d55fecf8ec..86e28a75267f 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -67,7 +67,7 @@ int ip6_ra_control(struct sock *sk, int sel, void (*destructor)(struct sock *))
67 67
68 /* RA packet may be delivered ONLY to IPPROTO_RAW socket */ 68 /* RA packet may be delivered ONLY to IPPROTO_RAW socket */
69 if (sk->sk_type != SOCK_RAW || inet_sk(sk)->num != IPPROTO_RAW) 69 if (sk->sk_type != SOCK_RAW || inet_sk(sk)->num != IPPROTO_RAW)
70 return -EINVAL; 70 return -ENOPROTOOPT;
71 71
72 new_ra = (sel>=0) ? kmalloc(sizeof(*new_ra), GFP_KERNEL) : NULL; 72 new_ra = (sel>=0) ? kmalloc(sizeof(*new_ra), GFP_KERNEL) : NULL;
73 73
@@ -161,9 +161,17 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
161 struct ipv6_txoptions *opt; 161 struct ipv6_txoptions *opt;
162 struct sk_buff *pktopt; 162 struct sk_buff *pktopt;
163 163
164 if (sk->sk_protocol != IPPROTO_UDP && 164 if (sk->sk_type == SOCK_RAW)
165 sk->sk_protocol != IPPROTO_UDPLITE && 165 break;
166 sk->sk_protocol != IPPROTO_TCP) 166
167 if (sk->sk_protocol == IPPROTO_UDP ||
168 sk->sk_protocol == IPPROTO_UDPLITE) {
169 struct udp_sock *up = udp_sk(sk);
170 if (up->pending == AF_INET6) {
171 retv = -EBUSY;
172 break;
173 }
174 } else if (sk->sk_protocol != IPPROTO_TCP)
167 break; 175 break;
168 176
169 if (sk->sk_state != TCP_ESTABLISHED) { 177 if (sk->sk_state != TCP_ESTABLISHED) {
@@ -337,18 +345,21 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
337 case IPV6_DSTOPTS: 345 case IPV6_DSTOPTS:
338 { 346 {
339 struct ipv6_txoptions *opt; 347 struct ipv6_txoptions *opt;
348
349 /* remove any sticky options header with a zero option
350 * length, per RFC3542.
351 */
340 if (optlen == 0) 352 if (optlen == 0)
341 optval = NULL; 353 optval = NULL;
354 else if (optlen < sizeof(struct ipv6_opt_hdr) ||
355 optlen & 0x7 || optlen > 8 * 255)
356 goto e_inval;
342 357
343 /* hop-by-hop / destination options are privileged option */ 358 /* hop-by-hop / destination options are privileged option */
344 retv = -EPERM; 359 retv = -EPERM;
345 if (optname != IPV6_RTHDR && !capable(CAP_NET_RAW)) 360 if (optname != IPV6_RTHDR && !capable(CAP_NET_RAW))
346 break; 361 break;
347 362
348 if (optlen < sizeof(struct ipv6_opt_hdr) ||
349 optlen & 0x7 || optlen > 8 * 255)
350 goto e_inval;
351
352 opt = ipv6_renew_options(sk, np->opt, optname, 363 opt = ipv6_renew_options(sk, np->opt, optname,
353 (struct ipv6_opt_hdr __user *)optval, 364 (struct ipv6_opt_hdr __user *)optval,
354 optlen); 365 optlen);
@@ -416,7 +427,7 @@ sticky_done:
416 msg.msg_controllen = optlen; 427 msg.msg_controllen = optlen;
417 msg.msg_control = (void*)(opt+1); 428 msg.msg_control = (void*)(opt+1);
418 429
419 retv = datagram_send_ctl(&msg, &fl, opt, &junk, &junk); 430 retv = datagram_send_ctl(net, &msg, &fl, opt, &junk, &junk);
420 if (retv) 431 if (retv)
421 goto done; 432 goto done;
422update: 433update:
@@ -438,7 +449,7 @@ done:
438 449
439 case IPV6_MULTICAST_HOPS: 450 case IPV6_MULTICAST_HOPS:
440 if (sk->sk_type == SOCK_STREAM) 451 if (sk->sk_type == SOCK_STREAM)
441 goto e_inval; 452 break;
442 if (optlen < sizeof(int)) 453 if (optlen < sizeof(int))
443 goto e_inval; 454 goto e_inval;
444 if (val > 255 || val < -1) 455 if (val > 255 || val < -1)
@@ -450,13 +461,15 @@ done:
450 case IPV6_MULTICAST_LOOP: 461 case IPV6_MULTICAST_LOOP:
451 if (optlen < sizeof(int)) 462 if (optlen < sizeof(int))
452 goto e_inval; 463 goto e_inval;
464 if (val != valbool)
465 goto e_inval;
453 np->mc_loop = valbool; 466 np->mc_loop = valbool;
454 retv = 0; 467 retv = 0;
455 break; 468 break;
456 469
457 case IPV6_MULTICAST_IF: 470 case IPV6_MULTICAST_IF:
458 if (sk->sk_type == SOCK_STREAM) 471 if (sk->sk_type == SOCK_STREAM)
459 goto e_inval; 472 break;
460 if (optlen < sizeof(int)) 473 if (optlen < sizeof(int))
461 goto e_inval; 474 goto e_inval;
462 475
@@ -832,7 +845,7 @@ static int ipv6_getsockopt_sticky(struct sock *sk, struct ipv6_txoptions *opt,
832 len = min_t(unsigned int, len, ipv6_optlen(hdr)); 845 len = min_t(unsigned int, len, ipv6_optlen(hdr));
833 if (copy_to_user(optval, hdr, len)) 846 if (copy_to_user(optval, hdr, len))
834 return -EFAULT; 847 return -EFAULT;
835 return ipv6_optlen(hdr); 848 return len;
836} 849}
837 850
838static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, 851static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
@@ -852,7 +865,7 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
852 if (sk->sk_protocol != IPPROTO_UDP && 865 if (sk->sk_protocol != IPPROTO_UDP &&
853 sk->sk_protocol != IPPROTO_UDPLITE && 866 sk->sk_protocol != IPPROTO_UDPLITE &&
854 sk->sk_protocol != IPPROTO_TCP) 867 sk->sk_protocol != IPPROTO_TCP)
855 return -EINVAL; 868 return -ENOPROTOOPT;
856 if (sk->sk_state != TCP_ESTABLISHED) 869 if (sk->sk_state != TCP_ESTABLISHED)
857 return -ENOTCONN; 870 return -ENOTCONN;
858 val = sk->sk_family; 871 val = sk->sk_family;
@@ -866,6 +879,8 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
866 return -EINVAL; 879 return -EINVAL;
867 if (copy_from_user(&gsf, optval, GROUP_FILTER_SIZE(0))) 880 if (copy_from_user(&gsf, optval, GROUP_FILTER_SIZE(0)))
868 return -EFAULT; 881 return -EFAULT;
882 if (gsf.gf_group.ss_family != AF_INET6)
883 return -EADDRNOTAVAIL;
869 lock_sock(sk); 884 lock_sock(sk);
870 err = ip6_mc_msfget(sk, &gsf, 885 err = ip6_mc_msfget(sk, &gsf,
871 (struct group_filter __user *)optval, optlen); 886 (struct group_filter __user *)optval, optlen);
@@ -975,6 +990,9 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
975 len = ipv6_getsockopt_sticky(sk, np->opt, 990 len = ipv6_getsockopt_sticky(sk, np->opt,
976 optname, optval, len); 991 optname, optval, len);
977 release_sock(sk); 992 release_sock(sk);
993 /* check if ipv6_getsockopt_sticky() returns err code */
994 if (len < 0)
995 return len;
978 return put_user(len, optlen); 996 return put_user(len, optlen);
979 } 997 }
980 998
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index a55fc05b8125..282fdb31f8ed 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -1727,10 +1727,10 @@ int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, struct file * f
1727 return ret; 1727 return ret;
1728} 1728}
1729 1729
1730static int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name, 1730int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name,
1731 int nlen, void __user *oldval, 1731 int nlen, void __user *oldval,
1732 size_t __user *oldlenp, 1732 size_t __user *oldlenp,
1733 void __user *newval, size_t newlen) 1733 void __user *newval, size_t newlen)
1734{ 1734{
1735 struct net_device *dev = ctl->extra1; 1735 struct net_device *dev = ctl->extra1;
1736 struct inet6_dev *idev; 1736 struct inet6_dev *idev;
diff --git a/net/ipv6/netfilter/ip6table_mangle.c b/net/ipv6/netfilter/ip6table_mangle.c
index 27a5e8b48d93..f405cea21a8b 100644
--- a/net/ipv6/netfilter/ip6table_mangle.c
+++ b/net/ipv6/netfilter/ip6table_mangle.c
@@ -129,7 +129,7 @@ static struct nf_hook_ops ip6t_ops[] __read_mostly = {
129 .priority = NF_IP6_PRI_MANGLE, 129 .priority = NF_IP6_PRI_MANGLE,
130 }, 130 },
131 { 131 {
132 .hook = ip6t_local_hook, 132 .hook = ip6t_route_hook,
133 .owner = THIS_MODULE, 133 .owner = THIS_MODULE,
134 .pf = PF_INET6, 134 .pf = PF_INET6,
135 .hooknum = NF_INET_LOCAL_IN, 135 .hooknum = NF_INET_LOCAL_IN,
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
index 2dccad48058c..cf20bc4fd60d 100644
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -207,9 +207,12 @@ fq_find(__be32 id, struct in6_addr *src, struct in6_addr *dst)
207 arg.id = id; 207 arg.id = id;
208 arg.src = src; 208 arg.src = src;
209 arg.dst = dst; 209 arg.dst = dst;
210
211 read_lock_bh(&nf_frags.lock);
210 hash = ip6qhashfn(id, src, dst); 212 hash = ip6qhashfn(id, src, dst);
211 213
212 q = inet_frag_find(&nf_init_frags, &nf_frags, &arg, hash); 214 q = inet_frag_find(&nf_init_frags, &nf_frags, &arg, hash);
215 local_bh_enable();
213 if (q == NULL) 216 if (q == NULL)
214 goto oom; 217 goto oom;
215 218
@@ -638,10 +641,10 @@ struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb)
638 goto ret_orig; 641 goto ret_orig;
639 } 642 }
640 643
641 spin_lock(&fq->q.lock); 644 spin_lock_bh(&fq->q.lock);
642 645
643 if (nf_ct_frag6_queue(fq, clone, fhdr, nhoff) < 0) { 646 if (nf_ct_frag6_queue(fq, clone, fhdr, nhoff) < 0) {
644 spin_unlock(&fq->q.lock); 647 spin_unlock_bh(&fq->q.lock);
645 pr_debug("Can't insert skb to queue\n"); 648 pr_debug("Can't insert skb to queue\n");
646 fq_put(fq); 649 fq_put(fq);
647 goto ret_orig; 650 goto ret_orig;
@@ -653,7 +656,7 @@ struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb)
653 if (ret_skb == NULL) 656 if (ret_skb == NULL)
654 pr_debug("Can't reassemble fragmented packets\n"); 657 pr_debug("Can't reassemble fragmented packets\n");
655 } 658 }
656 spin_unlock(&fq->q.lock); 659 spin_unlock_bh(&fq->q.lock);
657 660
658 fq_put(fq); 661 fq_put(fq);
659 return ret_skb; 662 return ret_skb;
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index 232e0dc45bf5..3aee12310d94 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -813,7 +813,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
813 memset(opt, 0, sizeof(struct ipv6_txoptions)); 813 memset(opt, 0, sizeof(struct ipv6_txoptions));
814 opt->tot_len = sizeof(struct ipv6_txoptions); 814 opt->tot_len = sizeof(struct ipv6_txoptions);
815 815
816 err = datagram_send_ctl(msg, &fl, opt, &hlimit, &tclass); 816 err = datagram_send_ctl(sock_net(sk), msg, &fl, opt, &hlimit, &tclass);
817 if (err < 0) { 817 if (err < 0) {
818 fl6_sock_release(flowlabel); 818 fl6_sock_release(flowlabel);
819 return err; 819 return err;
@@ -1164,6 +1164,15 @@ static void rawv6_close(struct sock *sk, long timeout)
1164 sk_common_release(sk); 1164 sk_common_release(sk);
1165} 1165}
1166 1166
1167static int raw6_destroy(struct sock *sk)
1168{
1169 lock_sock(sk);
1170 ip6_flush_pending_frames(sk);
1171 release_sock(sk);
1172
1173 return inet6_destroy_sock(sk);
1174}
1175
1167static int rawv6_init_sk(struct sock *sk) 1176static int rawv6_init_sk(struct sock *sk)
1168{ 1177{
1169 struct raw6_sock *rp = raw6_sk(sk); 1178 struct raw6_sock *rp = raw6_sk(sk);
@@ -1187,11 +1196,11 @@ struct proto rawv6_prot = {
1187 .name = "RAWv6", 1196 .name = "RAWv6",
1188 .owner = THIS_MODULE, 1197 .owner = THIS_MODULE,
1189 .close = rawv6_close, 1198 .close = rawv6_close,
1199 .destroy = raw6_destroy,
1190 .connect = ip6_datagram_connect, 1200 .connect = ip6_datagram_connect,
1191 .disconnect = udp_disconnect, 1201 .disconnect = udp_disconnect,
1192 .ioctl = rawv6_ioctl, 1202 .ioctl = rawv6_ioctl,
1193 .init = rawv6_init_sk, 1203 .init = rawv6_init_sk,
1194 .destroy = inet6_destroy_sock,
1195 .setsockopt = rawv6_setsockopt, 1204 .setsockopt = rawv6_setsockopt,
1196 .getsockopt = rawv6_getsockopt, 1205 .getsockopt = rawv6_getsockopt,
1197 .sendmsg = rawv6_sendmsg, 1206 .sendmsg = rawv6_sendmsg,
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c
index 798cabc7535b..a60d7d129713 100644
--- a/net/ipv6/reassembly.c
+++ b/net/ipv6/reassembly.c
@@ -247,6 +247,8 @@ fq_find(struct net *net, __be32 id, struct in6_addr *src, struct in6_addr *dst,
247 arg.id = id; 247 arg.id = id;
248 arg.src = src; 248 arg.src = src;
249 arg.dst = dst; 249 arg.dst = dst;
250
251 read_lock(&ip6_frags.lock);
250 hash = ip6qhashfn(id, src, dst); 252 hash = ip6qhashfn(id, src, dst);
251 253
252 q = inet_frag_find(&net->ipv6.frags, &ip6_frags, &arg, hash); 254 q = inet_frag_find(&net->ipv6.frags, &ip6_frags, &arg, hash);
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 12bba0880345..7ff687020fa9 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -109,7 +109,7 @@ static struct dst_ops ip6_dst_ops_template = {
109 .negative_advice = ip6_negative_advice, 109 .negative_advice = ip6_negative_advice,
110 .link_failure = ip6_link_failure, 110 .link_failure = ip6_link_failure,
111 .update_pmtu = ip6_rt_update_pmtu, 111 .update_pmtu = ip6_rt_update_pmtu,
112 .local_out = ip6_local_out, 112 .local_out = __ip6_local_out,
113 .entry_size = sizeof(struct rt6_info), 113 .entry_size = sizeof(struct rt6_info),
114 .entries = ATOMIC_INIT(0), 114 .entries = ATOMIC_INIT(0),
115}; 115};
@@ -240,7 +240,7 @@ static inline int rt6_need_strict(struct in6_addr *daddr)
240static inline struct rt6_info *rt6_device_match(struct net *net, 240static inline struct rt6_info *rt6_device_match(struct net *net,
241 struct rt6_info *rt, 241 struct rt6_info *rt,
242 int oif, 242 int oif,
243 int strict) 243 int flags)
244{ 244{
245 struct rt6_info *local = NULL; 245 struct rt6_info *local = NULL;
246 struct rt6_info *sprt; 246 struct rt6_info *sprt;
@@ -253,7 +253,7 @@ static inline struct rt6_info *rt6_device_match(struct net *net,
253 if (dev->flags & IFF_LOOPBACK) { 253 if (dev->flags & IFF_LOOPBACK) {
254 if (sprt->rt6i_idev == NULL || 254 if (sprt->rt6i_idev == NULL ||
255 sprt->rt6i_idev->dev->ifindex != oif) { 255 sprt->rt6i_idev->dev->ifindex != oif) {
256 if (strict && oif) 256 if (flags & RT6_LOOKUP_F_IFACE && oif)
257 continue; 257 continue;
258 if (local && (!oif || 258 if (local && (!oif ||
259 local->rt6i_idev->dev->ifindex == oif)) 259 local->rt6i_idev->dev->ifindex == oif))
@@ -266,7 +266,7 @@ static inline struct rt6_info *rt6_device_match(struct net *net,
266 if (local) 266 if (local)
267 return local; 267 return local;
268 268
269 if (strict) 269 if (flags & RT6_LOOKUP_F_IFACE)
270 return net->ipv6.ip6_null_entry; 270 return net->ipv6.ip6_null_entry;
271 } 271 }
272 return rt; 272 return rt;
@@ -446,7 +446,7 @@ int rt6_route_rcv(struct net_device *dev, u8 *opt, int len,
446 struct route_info *rinfo = (struct route_info *) opt; 446 struct route_info *rinfo = (struct route_info *) opt;
447 struct in6_addr prefix_buf, *prefix; 447 struct in6_addr prefix_buf, *prefix;
448 unsigned int pref; 448 unsigned int pref;
449 u32 lifetime; 449 unsigned long lifetime;
450 struct rt6_info *rt; 450 struct rt6_info *rt;
451 451
452 if (len < sizeof(struct route_info)) { 452 if (len < sizeof(struct route_info)) {
@@ -472,13 +472,7 @@ int rt6_route_rcv(struct net_device *dev, u8 *opt, int len,
472 if (pref == ICMPV6_ROUTER_PREF_INVALID) 472 if (pref == ICMPV6_ROUTER_PREF_INVALID)
473 pref = ICMPV6_ROUTER_PREF_MEDIUM; 473 pref = ICMPV6_ROUTER_PREF_MEDIUM;
474 474
475 lifetime = ntohl(rinfo->lifetime); 475 lifetime = addrconf_timeout_fixup(ntohl(rinfo->lifetime), HZ);
476 if (lifetime == 0xffffffff) {
477 /* infinity */
478 } else if (lifetime > 0x7fffffff/HZ) {
479 /* Avoid arithmetic overflow */
480 lifetime = 0x7fffffff/HZ - 1;
481 }
482 476
483 if (rinfo->length == 3) 477 if (rinfo->length == 3)
484 prefix = (struct in6_addr *)rinfo->prefix; 478 prefix = (struct in6_addr *)rinfo->prefix;
@@ -506,7 +500,7 @@ int rt6_route_rcv(struct net_device *dev, u8 *opt, int len,
506 (rt->rt6i_flags & ~RTF_PREF_MASK) | RTF_PREF(pref); 500 (rt->rt6i_flags & ~RTF_PREF_MASK) | RTF_PREF(pref);
507 501
508 if (rt) { 502 if (rt) {
509 if (lifetime == 0xffffffff) { 503 if (!addrconf_finite_timeout(lifetime)) {
510 rt->rt6i_flags &= ~RTF_EXPIRES; 504 rt->rt6i_flags &= ~RTF_EXPIRES;
511 } else { 505 } else {
512 rt->rt6i_expires = jiffies + HZ * lifetime; 506 rt->rt6i_expires = jiffies + HZ * lifetime;
@@ -1106,7 +1100,9 @@ int ip6_route_add(struct fib6_config *cfg)
1106 } 1100 }
1107 1101
1108 rt->u.dst.obsolete = -1; 1102 rt->u.dst.obsolete = -1;
1109 rt->rt6i_expires = jiffies + clock_t_to_jiffies(cfg->fc_expires); 1103 rt->rt6i_expires = (cfg->fc_flags & RTF_EXPIRES) ?
1104 jiffies + clock_t_to_jiffies(cfg->fc_expires) :
1105 0;
1110 1106
1111 if (cfg->fc_protocol == RTPROT_UNSPEC) 1107 if (cfg->fc_protocol == RTPROT_UNSPEC)
1112 cfg->fc_protocol = RTPROT_BOOT; 1108 cfg->fc_protocol = RTPROT_BOOT;
@@ -2200,7 +2196,13 @@ static int rt6_fill_node(struct sk_buff *skb, struct rt6_info *rt,
2200 2196
2201 NLA_PUT_U32(skb, RTA_PRIORITY, rt->rt6i_metric); 2197 NLA_PUT_U32(skb, RTA_PRIORITY, rt->rt6i_metric);
2202 2198
2203 expires = rt->rt6i_expires ? rt->rt6i_expires - jiffies : 0; 2199 if (!(rt->rt6i_flags & RTF_EXPIRES))
2200 expires = 0;
2201 else if (rt->rt6i_expires - jiffies < INT_MAX)
2202 expires = rt->rt6i_expires - jiffies;
2203 else
2204 expires = INT_MAX;
2205
2204 if (rtnl_put_cacheinfo(skb, &rt->u.dst, 0, 0, 0, 2206 if (rtnl_put_cacheinfo(skb, &rt->u.dst, 0, 0, 0,
2205 expires, rt->u.dst.error) < 0) 2207 expires, rt->u.dst.error) < 0)
2206 goto nla_put_failure; 2208 goto nla_put_failure;
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 5a6fab95569f..32e871a6c25a 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -222,15 +222,18 @@ __ipip6_tunnel_locate_prl(struct ip_tunnel *t, __be32 addr)
222 222
223} 223}
224 224
225static int ipip6_tunnel_get_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a) 225static int ipip6_tunnel_get_prl(struct ip_tunnel *t,
226 struct ip_tunnel_prl __user *a)
226{ 227{
227 struct ip_tunnel_prl *kp; 228 struct ip_tunnel_prl kprl, *kp;
228 struct ip_tunnel_prl_entry *prl; 229 struct ip_tunnel_prl_entry *prl;
229 unsigned int cmax, c = 0, ca, len; 230 unsigned int cmax, c = 0, ca, len;
230 int ret = 0; 231 int ret = 0;
231 232
232 cmax = a->datalen / sizeof(*a); 233 if (copy_from_user(&kprl, a, sizeof(kprl)))
233 if (cmax > 1 && a->addr != htonl(INADDR_ANY)) 234 return -EFAULT;
235 cmax = kprl.datalen / sizeof(kprl);
236 if (cmax > 1 && kprl.addr != htonl(INADDR_ANY))
234 cmax = 1; 237 cmax = 1;
235 238
236 /* For simple GET or for root users, 239 /* For simple GET or for root users,
@@ -261,26 +264,25 @@ static int ipip6_tunnel_get_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a)
261 for (prl = t->prl; prl; prl = prl->next) { 264 for (prl = t->prl; prl; prl = prl->next) {
262 if (c > cmax) 265 if (c > cmax)
263 break; 266 break;
264 if (a->addr != htonl(INADDR_ANY) && prl->addr != a->addr) 267 if (kprl.addr != htonl(INADDR_ANY) && prl->addr != kprl.addr)
265 continue; 268 continue;
266 kp[c].addr = prl->addr; 269 kp[c].addr = prl->addr;
267 kp[c].flags = prl->flags; 270 kp[c].flags = prl->flags;
268 c++; 271 c++;
269 if (a->addr != htonl(INADDR_ANY)) 272 if (kprl.addr != htonl(INADDR_ANY))
270 break; 273 break;
271 } 274 }
272out: 275out:
273 read_unlock(&ipip6_lock); 276 read_unlock(&ipip6_lock);
274 277
275 len = sizeof(*kp) * c; 278 len = sizeof(*kp) * c;
276 ret = len ? copy_to_user(a->data, kp, len) : 0; 279 ret = 0;
280 if ((len && copy_to_user(a + 1, kp, len)) || put_user(len, &a->datalen))
281 ret = -EFAULT;
277 282
278 kfree(kp); 283 kfree(kp);
279 if (ret)
280 return -EFAULT;
281 284
282 a->datalen = len; 285 return ret;
283 return 0;
284} 286}
285 287
286static int 288static int
@@ -403,9 +405,8 @@ static void ipip6_tunnel_uninit(struct net_device *dev)
403 405
404static int ipip6_err(struct sk_buff *skb, u32 info) 406static int ipip6_err(struct sk_buff *skb, u32 info)
405{ 407{
406#ifndef I_WISH_WORLD_WERE_PERFECT
407 408
408/* It is not :-( All the routers (except for Linux) return only 409/* All the routers (except for Linux) return only
409 8 bytes of packet payload. It means, that precise relaying of 410 8 bytes of packet payload. It means, that precise relaying of
410 ICMP in the real Internet is absolutely infeasible. 411 ICMP in the real Internet is absolutely infeasible.
411 */ 412 */
@@ -462,92 +463,6 @@ static int ipip6_err(struct sk_buff *skb, u32 info)
462out: 463out:
463 read_unlock(&ipip6_lock); 464 read_unlock(&ipip6_lock);
464 return err; 465 return err;
465#else
466 struct iphdr *iph = (struct iphdr*)dp;
467 int hlen = iph->ihl<<2;
468 struct ipv6hdr *iph6;
469 const int type = icmp_hdr(skb)->type;
470 const int code = icmp_hdr(skb)->code;
471 int rel_type = 0;
472 int rel_code = 0;
473 int rel_info = 0;
474 struct sk_buff *skb2;
475 struct rt6_info *rt6i;
476
477 if (len < hlen + sizeof(struct ipv6hdr))
478 return;
479 iph6 = (struct ipv6hdr*)(dp + hlen);
480
481 switch (type) {
482 default:
483 return;
484 case ICMP_PARAMETERPROB:
485 if (icmp_hdr(skb)->un.gateway < hlen)
486 return;
487
488 /* So... This guy found something strange INSIDE encapsulated
489 packet. Well, he is fool, but what can we do ?
490 */
491 rel_type = ICMPV6_PARAMPROB;
492 rel_info = icmp_hdr(skb)->un.gateway - hlen;
493 break;
494
495 case ICMP_DEST_UNREACH:
496 switch (code) {
497 case ICMP_SR_FAILED:
498 case ICMP_PORT_UNREACH:
499 /* Impossible event. */
500 return;
501 case ICMP_FRAG_NEEDED:
502 /* Too complicated case ... */
503 return;
504 default:
505 /* All others are translated to HOST_UNREACH.
506 rfc2003 contains "deep thoughts" about NET_UNREACH,
507 I believe, it is just ether pollution. --ANK
508 */
509 rel_type = ICMPV6_DEST_UNREACH;
510 rel_code = ICMPV6_ADDR_UNREACH;
511 break;
512 }
513 break;
514 case ICMP_TIME_EXCEEDED:
515 if (code != ICMP_EXC_TTL)
516 return;
517 rel_type = ICMPV6_TIME_EXCEED;
518 rel_code = ICMPV6_EXC_HOPLIMIT;
519 break;
520 }
521
522 /* Prepare fake skb to feed it to icmpv6_send */
523 skb2 = skb_clone(skb, GFP_ATOMIC);
524 if (skb2 == NULL)
525 return 0;
526 dst_release(skb2->dst);
527 skb2->dst = NULL;
528 skb_pull(skb2, skb->data - (u8*)iph6);
529 skb_reset_network_header(skb2);
530
531 /* Try to guess incoming interface */
532 rt6i = rt6_lookup(dev_net(skb->dev), &iph6->saddr, NULL, NULL, 0);
533 if (rt6i && rt6i->rt6i_dev) {
534 skb2->dev = rt6i->rt6i_dev;
535
536 rt6i = rt6_lookup(dev_net(skb->dev),
537 &iph6->daddr, &iph6->saddr, NULL, 0);
538
539 if (rt6i && rt6i->rt6i_dev && rt6i->rt6i_dev->type == ARPHRD_SIT) {
540 struct ip_tunnel *t = netdev_priv(rt6i->rt6i_dev);
541 if (rel_type == ICMPV6_TIME_EXCEED && t->parms.iph.ttl) {
542 rel_type = ICMPV6_DEST_UNREACH;
543 rel_code = ICMPV6_ADDR_UNREACH;
544 }
545 icmpv6_send(skb2, rel_type, rel_code, rel_info, skb2->dev);
546 }
547 }
548 kfree_skb(skb2);
549 return 0;
550#endif
551} 466}
552 467
553static inline void ipip6_ecn_decapsulate(struct iphdr *iph, struct sk_buff *skb) 468static inline void ipip6_ecn_decapsulate(struct iphdr *iph, struct sk_buff *skb)
@@ -960,11 +875,20 @@ ipip6_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
960 break; 875 break;
961 876
962 case SIOCGETPRL: 877 case SIOCGETPRL:
878 err = -EINVAL;
879 if (dev == sitn->fb_tunnel_dev)
880 goto done;
881 err = -ENOENT;
882 if (!(t = netdev_priv(dev)))
883 goto done;
884 err = ipip6_tunnel_get_prl(t, ifr->ifr_ifru.ifru_data);
885 break;
886
963 case SIOCADDPRL: 887 case SIOCADDPRL:
964 case SIOCDELPRL: 888 case SIOCDELPRL:
965 case SIOCCHGPRL: 889 case SIOCCHGPRL:
966 err = -EPERM; 890 err = -EPERM;
967 if (cmd != SIOCGETPRL && !capable(CAP_NET_ADMIN)) 891 if (!capable(CAP_NET_ADMIN))
968 goto done; 892 goto done;
969 err = -EINVAL; 893 err = -EINVAL;
970 if (dev == sitn->fb_tunnel_dev) 894 if (dev == sitn->fb_tunnel_dev)
@@ -977,12 +901,6 @@ ipip6_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
977 goto done; 901 goto done;
978 902
979 switch (cmd) { 903 switch (cmd) {
980 case SIOCGETPRL:
981 err = ipip6_tunnel_get_prl(t, &prl);
982 if (!err && copy_to_user(ifr->ifr_ifru.ifru_data,
983 &prl, sizeof(prl)))
984 err = -EFAULT;
985 break;
986 case SIOCDELPRL: 904 case SIOCDELPRL:
987 err = ipip6_tunnel_del_prl(t, &prl); 905 err = ipip6_tunnel_del_prl(t, &prl);
988 break; 906 break;
@@ -991,8 +909,7 @@ ipip6_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
991 err = ipip6_tunnel_add_prl(t, &prl, cmd == SIOCCHGPRL); 909 err = ipip6_tunnel_add_prl(t, &prl, cmd == SIOCCHGPRL);
992 break; 910 break;
993 } 911 }
994 if (cmd != SIOCGETPRL) 912 netdev_state_change(dev);
995 netdev_state_change(dev);
996 break; 913 break;
997 914
998 default: 915 default:
diff --git a/net/ipv6/syncookies.c b/net/ipv6/syncookies.c
index 938ce4ecde55..3ecc1157994e 100644
--- a/net/ipv6/syncookies.c
+++ b/net/ipv6/syncookies.c
@@ -198,7 +198,6 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb)
198 ireq = inet_rsk(req); 198 ireq = inet_rsk(req);
199 ireq6 = inet6_rsk(req); 199 ireq6 = inet6_rsk(req);
200 treq = tcp_rsk(req); 200 treq = tcp_rsk(req);
201 ireq6->pktopts = NULL;
202 201
203 if (security_inet_conn_request(sk, skb, req)) { 202 if (security_inet_conn_request(sk, skb, req)) {
204 reqsk_free(req); 203 reqsk_free(req);
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 715965f0fac0..40ea9c36d24b 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1299,7 +1299,6 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
1299 treq = inet6_rsk(req); 1299 treq = inet6_rsk(req);
1300 ipv6_addr_copy(&treq->rmt_addr, &ipv6_hdr(skb)->saddr); 1300 ipv6_addr_copy(&treq->rmt_addr, &ipv6_hdr(skb)->saddr);
1301 ipv6_addr_copy(&treq->loc_addr, &ipv6_hdr(skb)->daddr); 1301 ipv6_addr_copy(&treq->loc_addr, &ipv6_hdr(skb)->daddr);
1302 treq->pktopts = NULL;
1303 if (!want_cookie) 1302 if (!want_cookie)
1304 TCP_ECN_create_request(req, tcp_hdr(skb)); 1303 TCP_ECN_create_request(req, tcp_hdr(skb));
1305 1304
@@ -2037,7 +2036,7 @@ static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i)
2037 2036
2038 seq_printf(seq, 2037 seq_printf(seq,
2039 "%4d: %08X%08X%08X%08X:%04X %08X%08X%08X%08X:%04X " 2038 "%4d: %08X%08X%08X%08X:%04X %08X%08X%08X%08X:%04X "
2040 "%02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p %u %u %u %u %d\n", 2039 "%02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p %lu %lu %u %u %d\n",
2041 i, 2040 i,
2042 src->s6_addr32[0], src->s6_addr32[1], 2041 src->s6_addr32[0], src->s6_addr32[1],
2043 src->s6_addr32[2], src->s6_addr32[3], srcp, 2042 src->s6_addr32[2], src->s6_addr32[3], srcp,
@@ -2053,8 +2052,8 @@ static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i)
2053 icsk->icsk_probes_out, 2052 icsk->icsk_probes_out,
2054 sock_i_ino(sp), 2053 sock_i_ino(sp),
2055 atomic_read(&sp->sk_refcnt), sp, 2054 atomic_read(&sp->sk_refcnt), sp,
2056 icsk->icsk_rto, 2055 jiffies_to_clock_t(icsk->icsk_rto),
2057 icsk->icsk_ack.ato, 2056 jiffies_to_clock_t(icsk->icsk_ack.ato),
2058 (icsk->icsk_ack.quick << 1 ) | icsk->icsk_ack.pingpong, 2057 (icsk->icsk_ack.quick << 1 ) | icsk->icsk_ack.pingpong,
2059 tp->snd_cwnd, tp->snd_ssthresh>=0xFFFF?-1:tp->snd_ssthresh 2058 tp->snd_cwnd, tp->snd_ssthresh>=0xFFFF?-1:tp->snd_ssthresh
2060 ); 2059 );
diff --git a/net/ipv6/tunnel6.c b/net/ipv6/tunnel6.c
index 6323921b40be..669f280989c3 100644
--- a/net/ipv6/tunnel6.c
+++ b/net/ipv6/tunnel6.c
@@ -109,7 +109,7 @@ static int tunnel46_rcv(struct sk_buff *skb)
109{ 109{
110 struct xfrm6_tunnel *handler; 110 struct xfrm6_tunnel *handler;
111 111
112 if (!pskb_may_pull(skb, sizeof(struct ipv6hdr))) 112 if (!pskb_may_pull(skb, sizeof(struct iphdr)))
113 goto drop; 113 goto drop;
114 114
115 for (handler = tunnel46_handlers; handler; handler = handler->next) 115 for (handler = tunnel46_handlers; handler; handler = handler->next)
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 1fd784f3e2ec..dd309626ae9a 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -534,7 +534,9 @@ static void udp_v6_flush_pending_frames(struct sock *sk)
534{ 534{
535 struct udp_sock *up = udp_sk(sk); 535 struct udp_sock *up = udp_sk(sk);
536 536
537 if (up->pending) { 537 if (up->pending == AF_INET)
538 udp_flush_pending_frames(sk);
539 else if (up->pending) {
538 up->len = 0; 540 up->len = 0;
539 up->pending = 0; 541 up->pending = 0;
540 ip6_flush_pending_frames(sk); 542 ip6_flush_pending_frames(sk);
@@ -731,7 +733,7 @@ do_udp_sendmsg:
731 memset(opt, 0, sizeof(struct ipv6_txoptions)); 733 memset(opt, 0, sizeof(struct ipv6_txoptions));
732 opt->tot_len = sizeof(*opt); 734 opt->tot_len = sizeof(*opt);
733 735
734 err = datagram_send_ctl(msg, &fl, opt, &hlimit, &tclass); 736 err = datagram_send_ctl(sock_net(sk), msg, &fl, opt, &hlimit, &tclass);
735 if (err < 0) { 737 if (err < 0) {
736 fl6_sock_release(flowlabel); 738 fl6_sock_release(flowlabel);
737 return err; 739 return err;
@@ -848,12 +850,14 @@ do_append_data:
848 } else { 850 } else {
849 dst_release(dst); 851 dst_release(dst);
850 } 852 }
853 dst = NULL;
851 } 854 }
852 855
853 if (err > 0) 856 if (err > 0)
854 err = np->recverr ? net_xmit_errno(err) : 0; 857 err = np->recverr ? net_xmit_errno(err) : 0;
855 release_sock(sk); 858 release_sock(sk);
856out: 859out:
860 dst_release(dst);
857 fl6_sock_release(flowlabel); 861 fl6_sock_release(flowlabel);
858 if (!err) 862 if (!err)
859 return len; 863 return len;
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index ae54b20d0470..3eb5bcc75f99 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -1093,11 +1093,6 @@ static int irda_create(struct net *net, struct socket *sock, int protocol)
1093 1093
1094 init_waitqueue_head(&self->query_wait); 1094 init_waitqueue_head(&self->query_wait);
1095 1095
1096 /* Initialise networking socket struct */
1097 sock_init_data(sock, sk); /* Note : set sk->sk_refcnt to 1 */
1098 sk->sk_family = PF_IRDA;
1099 sk->sk_protocol = protocol;
1100
1101 switch (sock->type) { 1096 switch (sock->type) {
1102 case SOCK_STREAM: 1097 case SOCK_STREAM:
1103 sock->ops = &irda_stream_ops; 1098 sock->ops = &irda_stream_ops;
@@ -1124,13 +1119,20 @@ static int irda_create(struct net *net, struct socket *sock, int protocol)
1124 self->max_sdu_size_rx = TTP_SAR_UNBOUND; 1119 self->max_sdu_size_rx = TTP_SAR_UNBOUND;
1125 break; 1120 break;
1126 default: 1121 default:
1122 sk_free(sk);
1127 return -ESOCKTNOSUPPORT; 1123 return -ESOCKTNOSUPPORT;
1128 } 1124 }
1129 break; 1125 break;
1130 default: 1126 default:
1127 sk_free(sk);
1131 return -ESOCKTNOSUPPORT; 1128 return -ESOCKTNOSUPPORT;
1132 } 1129 }
1133 1130
1131 /* Initialise networking socket struct */
1132 sock_init_data(sock, sk); /* Note : set sk->sk_refcnt to 1 */
1133 sk->sk_family = PF_IRDA;
1134 sk->sk_protocol = protocol;
1135
1134 /* Register as a client with IrLMP */ 1136 /* Register as a client with IrLMP */
1135 self->ckey = irlmp_register_client(0, NULL, NULL, NULL); 1137 self->ckey = irlmp_register_client(0, NULL, NULL, NULL);
1136 self->mask.word = 0xffff; 1138 self->mask.word = 0xffff;
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 9e7236ff6bcc..7470e367272b 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -1251,7 +1251,7 @@ static struct xfrm_state * pfkey_msg2xfrm_state(struct sadb_msg *hdr,
1251 x->sel.prefixlen_s = addr->sadb_address_prefixlen; 1251 x->sel.prefixlen_s = addr->sadb_address_prefixlen;
1252 } 1252 }
1253 1253
1254 if (x->props.mode == XFRM_MODE_TRANSPORT) 1254 if (!x->sel.family)
1255 x->sel.family = x->props.family; 1255 x->sel.family = x->props.family;
1256 1256
1257 if (ext_hdrs[SADB_X_EXT_NAT_T_TYPE-1]) { 1257 if (ext_hdrs[SADB_X_EXT_NAT_T_TYPE-1]) {
@@ -3030,6 +3030,9 @@ static int key_notify_sa_expire(struct xfrm_state *x, struct km_event *c)
3030 3030
3031static int pfkey_send_notify(struct xfrm_state *x, struct km_event *c) 3031static int pfkey_send_notify(struct xfrm_state *x, struct km_event *c)
3032{ 3032{
3033 if (atomic_read(&pfkey_socks_nr) == 0)
3034 return 0;
3035
3033 switch (c->event) { 3036 switch (c->event) {
3034 case XFRM_MSG_EXPIRE: 3037 case XFRM_MSG_EXPIRE:
3035 return key_notify_sa_expire(x, c); 3038 return key_notify_sa_expire(x, c);
diff --git a/net/llc/llc_sap.c b/net/llc/llc_sap.c
index e2ddde755019..008de1fc42ca 100644
--- a/net/llc/llc_sap.c
+++ b/net/llc/llc_sap.c
@@ -286,12 +286,14 @@ void llc_build_and_send_xid_pkt(struct llc_sap *sap, struct sk_buff *skb,
286 * 286 *
287 * Sends received pdus to the sap state machine. 287 * Sends received pdus to the sap state machine.
288 */ 288 */
289static void llc_sap_rcv(struct llc_sap *sap, struct sk_buff *skb) 289static void llc_sap_rcv(struct llc_sap *sap, struct sk_buff *skb,
290 struct sock *sk)
290{ 291{
291 struct llc_sap_state_ev *ev = llc_sap_ev(skb); 292 struct llc_sap_state_ev *ev = llc_sap_ev(skb);
292 293
293 ev->type = LLC_SAP_EV_TYPE_PDU; 294 ev->type = LLC_SAP_EV_TYPE_PDU;
294 ev->reason = 0; 295 ev->reason = 0;
296 skb->sk = sk;
295 llc_sap_state_process(sap, skb); 297 llc_sap_state_process(sap, skb);
296} 298}
297 299
@@ -360,8 +362,7 @@ static void llc_sap_mcast(struct llc_sap *sap,
360 break; 362 break;
361 363
362 sock_hold(sk); 364 sock_hold(sk);
363 skb_set_owner_r(skb1, sk); 365 llc_sap_rcv(sap, skb1, sk);
364 llc_sap_rcv(sap, skb1);
365 sock_put(sk); 366 sock_put(sk);
366 } 367 }
367 read_unlock_bh(&sap->sk_list.lock); 368 read_unlock_bh(&sap->sk_list.lock);
@@ -381,8 +382,7 @@ void llc_sap_handler(struct llc_sap *sap, struct sk_buff *skb)
381 } else { 382 } else {
382 struct sock *sk = llc_lookup_dgram(sap, &laddr); 383 struct sock *sk = llc_lookup_dgram(sap, &laddr);
383 if (sk) { 384 if (sk) {
384 skb_set_owner_r(skb, sk); 385 llc_sap_rcv(sap, skb, sk);
385 llc_sap_rcv(sap, skb);
386 sock_put(sk); 386 sock_put(sk);
387 } else 387 } else
388 kfree_skb(skb); 388 kfree_skb(skb);
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 699d97b8de5e..a9fce4afdf21 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -672,7 +672,7 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
672 if (params->vlan) { 672 if (params->vlan) {
673 sdata = IEEE80211_DEV_TO_SUB_IF(params->vlan); 673 sdata = IEEE80211_DEV_TO_SUB_IF(params->vlan);
674 674
675 if (sdata->vif.type != IEEE80211_IF_TYPE_VLAN || 675 if (sdata->vif.type != IEEE80211_IF_TYPE_VLAN &&
676 sdata->vif.type != IEEE80211_IF_TYPE_AP) 676 sdata->vif.type != IEEE80211_IF_TYPE_AP)
677 return -EINVAL; 677 return -EINVAL;
678 } else 678 } else
@@ -760,7 +760,7 @@ static int ieee80211_change_station(struct wiphy *wiphy,
760 if (params->vlan && params->vlan != sta->sdata->dev) { 760 if (params->vlan && params->vlan != sta->sdata->dev) {
761 vlansdata = IEEE80211_DEV_TO_SUB_IF(params->vlan); 761 vlansdata = IEEE80211_DEV_TO_SUB_IF(params->vlan);
762 762
763 if (vlansdata->vif.type != IEEE80211_IF_TYPE_VLAN || 763 if (vlansdata->vif.type != IEEE80211_IF_TYPE_VLAN &&
764 vlansdata->vif.type != IEEE80211_IF_TYPE_AP) { 764 vlansdata->vif.type != IEEE80211_IF_TYPE_AP) {
765 rcu_read_unlock(); 765 rcu_read_unlock();
766 return -EINVAL; 766 return -EINVAL;
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index c7314bf4bec2..006486b26726 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -899,7 +899,7 @@ extern const struct iw_handler_def ieee80211_iw_handler_def;
899 899
900 900
901/* ieee80211_ioctl.c */ 901/* ieee80211_ioctl.c */
902int ieee80211_set_freq(struct ieee80211_local *local, int freq); 902int ieee80211_set_freq(struct net_device *dev, int freq);
903/* ieee80211_sta.c */ 903/* ieee80211_sta.c */
904void ieee80211_sta_timer(unsigned long data); 904void ieee80211_sta_timer(unsigned long data);
905void ieee80211_sta_work(struct work_struct *work); 905void ieee80211_sta_work(struct work_struct *work);
diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index 150d66dbda9d..220e83be3ef4 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -380,6 +380,15 @@ void ieee80211_key_free(struct ieee80211_key *key)
380 if (!key) 380 if (!key)
381 return; 381 return;
382 382
383 if (!key->sdata) {
384 /* The key has not been linked yet, simply free it
385 * and don't Oops */
386 if (key->conf.alg == ALG_CCMP)
387 ieee80211_aes_key_free(key->u.ccmp.tfm);
388 kfree(key);
389 return;
390 }
391
383 spin_lock_irqsave(&key->sdata->local->key_lock, flags); 392 spin_lock_irqsave(&key->sdata->local->key_lock, flags);
384 __ieee80211_key_free(key); 393 __ieee80211_key_free(key);
385 spin_unlock_irqrestore(&key->sdata->local->key_lock, flags); 394 spin_unlock_irqrestore(&key->sdata->local->key_lock, flags);
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 915afadb0602..98c0b5e56ecc 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -511,6 +511,7 @@ static int ieee80211_stop(struct net_device *dev)
511 case IEEE80211_IF_TYPE_STA: 511 case IEEE80211_IF_TYPE_STA:
512 case IEEE80211_IF_TYPE_IBSS: 512 case IEEE80211_IF_TYPE_IBSS:
513 sdata->u.sta.state = IEEE80211_DISABLED; 513 sdata->u.sta.state = IEEE80211_DISABLED;
514 memset(sdata->u.sta.bssid, 0, ETH_ALEN);
514 del_timer_sync(&sdata->u.sta.timer); 515 del_timer_sync(&sdata->u.sta.timer);
515 /* 516 /*
516 * When we get here, the interface is marked down. 517 * When we get here, the interface is marked down.
@@ -1313,7 +1314,7 @@ static void ieee80211_handle_filtered_frame(struct ieee80211_local *local,
1313 /* 1314 /*
1314 * Clear the TX filter mask for this STA when sending the next 1315 * Clear the TX filter mask for this STA when sending the next
1315 * packet. If the STA went to power save mode, this will happen 1316 * packet. If the STA went to power save mode, this will happen
1316 * happen when it wakes up for the next time. 1317 * when it wakes up for the next time.
1317 */ 1318 */
1318 sta->flags |= WLAN_STA_CLEAR_PS_FILT; 1319 sta->flags |= WLAN_STA_CLEAR_PS_FILT;
1319 1320
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 4adba09e80ca..4d2b582dd055 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -44,7 +44,7 @@
44#define IEEE80211_RETRY_AUTH_INTERVAL (1 * HZ) 44#define IEEE80211_RETRY_AUTH_INTERVAL (1 * HZ)
45#define IEEE80211_SCAN_INTERVAL (2 * HZ) 45#define IEEE80211_SCAN_INTERVAL (2 * HZ)
46#define IEEE80211_SCAN_INTERVAL_SLOW (15 * HZ) 46#define IEEE80211_SCAN_INTERVAL_SLOW (15 * HZ)
47#define IEEE80211_IBSS_JOIN_TIMEOUT (20 * HZ) 47#define IEEE80211_IBSS_JOIN_TIMEOUT (7 * HZ)
48 48
49#define IEEE80211_PROBE_DELAY (HZ / 33) 49#define IEEE80211_PROBE_DELAY (HZ / 33)
50#define IEEE80211_CHANNEL_TIME (HZ / 33) 50#define IEEE80211_CHANNEL_TIME (HZ / 33)
@@ -730,7 +730,17 @@ static void ieee80211_send_assoc(struct net_device *dev,
730 if (bss->wmm_ie) { 730 if (bss->wmm_ie) {
731 wmm = 1; 731 wmm = 1;
732 } 732 }
733
734 /* get all rates supported by the device and the AP as
735 * some APs don't like getting a superset of their rates
736 * in the association request (e.g. D-Link DAP 1353 in
737 * b-only mode) */
738 rates_len = ieee80211_compatible_rates(bss, sband, &rates);
739
733 ieee80211_rx_bss_put(dev, bss); 740 ieee80211_rx_bss_put(dev, bss);
741 } else {
742 rates = ~0;
743 rates_len = sband->n_bitrates;
734 } 744 }
735 745
736 mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24); 746 mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24);
@@ -761,10 +771,7 @@ static void ieee80211_send_assoc(struct net_device *dev,
761 *pos++ = ifsta->ssid_len; 771 *pos++ = ifsta->ssid_len;
762 memcpy(pos, ifsta->ssid, ifsta->ssid_len); 772 memcpy(pos, ifsta->ssid, ifsta->ssid_len);
763 773
764 /* all supported rates should be added here but some APs 774 /* add all rates which were marked to be used above */
765 * (e.g. D-Link DAP 1353 in b-only mode) don't like that
766 * Therefore only add rates the AP supports */
767 rates_len = ieee80211_compatible_rates(bss, sband, &rates);
768 supp_rates_len = rates_len; 775 supp_rates_len = rates_len;
769 if (supp_rates_len > 8) 776 if (supp_rates_len > 8)
770 supp_rates_len = 8; 777 supp_rates_len = 8;
@@ -1318,7 +1325,7 @@ static void ieee80211_sta_process_addba_request(struct net_device *dev,
1318 1325
1319 /* prepare reordering buffer */ 1326 /* prepare reordering buffer */
1320 tid_agg_rx->reorder_buf = 1327 tid_agg_rx->reorder_buf =
1321 kmalloc(buf_size * sizeof(struct sk_buf *), GFP_ATOMIC); 1328 kmalloc(buf_size * sizeof(struct sk_buff *), GFP_ATOMIC);
1322 if (!tid_agg_rx->reorder_buf) { 1329 if (!tid_agg_rx->reorder_buf) {
1323 if (net_ratelimit()) 1330 if (net_ratelimit())
1324 printk(KERN_ERR "can not allocate reordering buffer " 1331 printk(KERN_ERR "can not allocate reordering buffer "
@@ -1327,7 +1334,7 @@ static void ieee80211_sta_process_addba_request(struct net_device *dev,
1327 goto end; 1334 goto end;
1328 } 1335 }
1329 memset(tid_agg_rx->reorder_buf, 0, 1336 memset(tid_agg_rx->reorder_buf, 0,
1330 buf_size * sizeof(struct sk_buf *)); 1337 buf_size * sizeof(struct sk_buff *));
1331 1338
1332 if (local->ops->ampdu_action) 1339 if (local->ops->ampdu_action)
1333 ret = local->ops->ampdu_action(hw, IEEE80211_AMPDU_RX_START, 1340 ret = local->ops->ampdu_action(hw, IEEE80211_AMPDU_RX_START,
@@ -1607,7 +1614,7 @@ void sta_addba_resp_timer_expired(unsigned long data)
1607 * only one argument, and both sta_info and TID are needed, so init 1614 * only one argument, and both sta_info and TID are needed, so init
1608 * flow in sta_info_create gives the TID as data, while the timer_to_id 1615 * flow in sta_info_create gives the TID as data, while the timer_to_id
1609 * array gives the sta through container_of */ 1616 * array gives the sta through container_of */
1610 u16 tid = *(int *)data; 1617 u16 tid = *(u8 *)data;
1611 struct sta_info *temp_sta = container_of((void *)data, 1618 struct sta_info *temp_sta = container_of((void *)data,
1612 struct sta_info, timer_to_tid[tid]); 1619 struct sta_info, timer_to_tid[tid]);
1613 1620
@@ -1655,7 +1662,7 @@ timer_expired_exit:
1655void sta_rx_agg_session_timer_expired(unsigned long data) 1662void sta_rx_agg_session_timer_expired(unsigned long data)
1656{ 1663{
1657 /* not an elegant detour, but there is no choice as the timer passes 1664 /* not an elegant detour, but there is no choice as the timer passes
1658 * only one argument, and verious sta_info are needed here, so init 1665 * only one argument, and various sta_info are needed here, so init
1659 * flow in sta_info_create gives the TID as data, while the timer_to_id 1666 * flow in sta_info_create gives the TID as data, while the timer_to_id
1660 * array gives the sta through container_of */ 1667 * array gives the sta through container_of */
1661 u8 *ptid = (u8 *)data; 1668 u8 *ptid = (u8 *)data;
@@ -2329,6 +2336,7 @@ static int ieee80211_sta_join_ibss(struct net_device *dev,
2329 u8 *pos; 2336 u8 *pos;
2330 struct ieee80211_sub_if_data *sdata; 2337 struct ieee80211_sub_if_data *sdata;
2331 struct ieee80211_supported_band *sband; 2338 struct ieee80211_supported_band *sband;
2339 union iwreq_data wrqu;
2332 2340
2333 sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; 2341 sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
2334 2342
@@ -2351,13 +2359,10 @@ static int ieee80211_sta_join_ibss(struct net_device *dev,
2351 sdata->drop_unencrypted = bss->capability & 2359 sdata->drop_unencrypted = bss->capability &
2352 WLAN_CAPABILITY_PRIVACY ? 1 : 0; 2360 WLAN_CAPABILITY_PRIVACY ? 1 : 0;
2353 2361
2354 res = ieee80211_set_freq(local, bss->freq); 2362 res = ieee80211_set_freq(dev, bss->freq);
2355 2363
2356 if (local->oper_channel->flags & IEEE80211_CHAN_NO_IBSS) { 2364 if (res)
2357 printk(KERN_DEBUG "%s: IBSS not allowed on frequency " 2365 return res;
2358 "%d MHz\n", dev->name, local->oper_channel->center_freq);
2359 return -1;
2360 }
2361 2366
2362 /* Set beacon template */ 2367 /* Set beacon template */
2363 skb = dev_alloc_skb(local->hw.extra_tx_headroom + 400); 2368 skb = dev_alloc_skb(local->hw.extra_tx_headroom + 400);
@@ -2472,7 +2477,9 @@ static int ieee80211_sta_join_ibss(struct net_device *dev,
2472 ifsta->state = IEEE80211_IBSS_JOINED; 2477 ifsta->state = IEEE80211_IBSS_JOINED;
2473 mod_timer(&ifsta->timer, jiffies + IEEE80211_IBSS_MERGE_INTERVAL); 2478 mod_timer(&ifsta->timer, jiffies + IEEE80211_IBSS_MERGE_INTERVAL);
2474 2479
2475 ieee80211_rx_bss_put(dev, bss); 2480 memset(&wrqu, 0, sizeof(wrqu));
2481 memcpy(wrqu.ap_addr.sa_data, bss->bssid, ETH_ALEN);
2482 wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL);
2476 2483
2477 return res; 2484 return res;
2478} 2485}
@@ -3446,21 +3453,17 @@ static int ieee80211_sta_config_auth(struct net_device *dev,
3446 struct ieee80211_sta_bss *bss, *selected = NULL; 3453 struct ieee80211_sta_bss *bss, *selected = NULL;
3447 int top_rssi = 0, freq; 3454 int top_rssi = 0, freq;
3448 3455
3449 if (!(ifsta->flags & (IEEE80211_STA_AUTO_SSID_SEL |
3450 IEEE80211_STA_AUTO_BSSID_SEL | IEEE80211_STA_AUTO_CHANNEL_SEL))) {
3451 ifsta->state = IEEE80211_AUTHENTICATE;
3452 ieee80211_sta_reset_auth(dev, ifsta);
3453 return 0;
3454 }
3455
3456 spin_lock_bh(&local->sta_bss_lock); 3456 spin_lock_bh(&local->sta_bss_lock);
3457 freq = local->oper_channel->center_freq; 3457 freq = local->oper_channel->center_freq;
3458 list_for_each_entry(bss, &local->sta_bss_list, list) { 3458 list_for_each_entry(bss, &local->sta_bss_list, list) {
3459 if (!(bss->capability & WLAN_CAPABILITY_ESS)) 3459 if (!(bss->capability & WLAN_CAPABILITY_ESS))
3460 continue; 3460 continue;
3461 3461
3462 if (!!(bss->capability & WLAN_CAPABILITY_PRIVACY) ^ 3462 if ((ifsta->flags & (IEEE80211_STA_AUTO_SSID_SEL |
3463 !!sdata->default_key) 3463 IEEE80211_STA_AUTO_BSSID_SEL |
3464 IEEE80211_STA_AUTO_CHANNEL_SEL)) &&
3465 (!!(bss->capability & WLAN_CAPABILITY_PRIVACY) ^
3466 !!sdata->default_key))
3464 continue; 3467 continue;
3465 3468
3466 if (!(ifsta->flags & IEEE80211_STA_AUTO_CHANNEL_SEL) && 3469 if (!(ifsta->flags & IEEE80211_STA_AUTO_CHANNEL_SEL) &&
@@ -3485,7 +3488,7 @@ static int ieee80211_sta_config_auth(struct net_device *dev,
3485 spin_unlock_bh(&local->sta_bss_lock); 3488 spin_unlock_bh(&local->sta_bss_lock);
3486 3489
3487 if (selected) { 3490 if (selected) {
3488 ieee80211_set_freq(local, selected->freq); 3491 ieee80211_set_freq(dev, selected->freq);
3489 if (!(ifsta->flags & IEEE80211_STA_SSID_SET)) 3492 if (!(ifsta->flags & IEEE80211_STA_SSID_SET))
3490 ieee80211_sta_set_ssid(dev, selected->ssid, 3493 ieee80211_sta_set_ssid(dev, selected->ssid,
3491 selected->ssid_len); 3494 selected->ssid_len);
@@ -3520,6 +3523,7 @@ static int ieee80211_sta_create_ibss(struct net_device *dev,
3520 struct ieee80211_supported_band *sband; 3523 struct ieee80211_supported_band *sband;
3521 u8 bssid[ETH_ALEN], *pos; 3524 u8 bssid[ETH_ALEN], *pos;
3522 int i; 3525 int i;
3526 int ret;
3523 DECLARE_MAC_BUF(mac); 3527 DECLARE_MAC_BUF(mac);
3524 3528
3525#if 0 3529#if 0
@@ -3564,7 +3568,9 @@ static int ieee80211_sta_create_ibss(struct net_device *dev,
3564 *pos++ = (u8) (rate / 5); 3568 *pos++ = (u8) (rate / 5);
3565 } 3569 }
3566 3570
3567 return ieee80211_sta_join_ibss(dev, ifsta, bss); 3571 ret = ieee80211_sta_join_ibss(dev, ifsta, bss);
3572 ieee80211_rx_bss_put(dev, bss);
3573 return ret;
3568} 3574}
3569 3575
3570 3576
@@ -3612,10 +3618,13 @@ static int ieee80211_sta_find_ibss(struct net_device *dev,
3612 (bss = ieee80211_rx_bss_get(dev, bssid, 3618 (bss = ieee80211_rx_bss_get(dev, bssid,
3613 local->hw.conf.channel->center_freq, 3619 local->hw.conf.channel->center_freq,
3614 ifsta->ssid, ifsta->ssid_len))) { 3620 ifsta->ssid, ifsta->ssid_len))) {
3621 int ret;
3615 printk(KERN_DEBUG "%s: Selected IBSS BSSID %s" 3622 printk(KERN_DEBUG "%s: Selected IBSS BSSID %s"
3616 " based on configured SSID\n", 3623 " based on configured SSID\n",
3617 dev->name, print_mac(mac, bssid)); 3624 dev->name, print_mac(mac, bssid));
3618 return ieee80211_sta_join_ibss(dev, ifsta, bss); 3625 ret = ieee80211_sta_join_ibss(dev, ifsta, bss);
3626 ieee80211_rx_bss_put(dev, bss);
3627 return ret;
3619 } 3628 }
3620#ifdef CONFIG_MAC80211_IBSS_DEBUG 3629#ifdef CONFIG_MAC80211_IBSS_DEBUG
3621 printk(KERN_DEBUG " did not try to join ibss\n"); 3630 printk(KERN_DEBUG " did not try to join ibss\n");
@@ -4092,18 +4101,17 @@ ieee80211_sta_scan_result(struct net_device *dev,
4092 4101
4093 memset(&iwe, 0, sizeof(iwe)); 4102 memset(&iwe, 0, sizeof(iwe));
4094 iwe.cmd = SIOCGIWFREQ; 4103 iwe.cmd = SIOCGIWFREQ;
4095 iwe.u.freq.m = bss->freq; 4104 iwe.u.freq.m = ieee80211_frequency_to_channel(bss->freq);
4096 iwe.u.freq.e = 6; 4105 iwe.u.freq.e = 0;
4097 current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, 4106 current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe,
4098 IW_EV_FREQ_LEN); 4107 IW_EV_FREQ_LEN);
4099 4108
4100 memset(&iwe, 0, sizeof(iwe)); 4109 memset(&iwe, 0, sizeof(iwe));
4101 iwe.cmd = SIOCGIWFREQ; 4110 iwe.cmd = SIOCGIWFREQ;
4102 iwe.u.freq.m = ieee80211_frequency_to_channel(bss->freq); 4111 iwe.u.freq.m = bss->freq;
4103 iwe.u.freq.e = 0; 4112 iwe.u.freq.e = 6;
4104 current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, 4113 current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe,
4105 IW_EV_FREQ_LEN); 4114 IW_EV_FREQ_LEN);
4106
4107 memset(&iwe, 0, sizeof(iwe)); 4115 memset(&iwe, 0, sizeof(iwe));
4108 iwe.cmd = IWEVQUAL; 4116 iwe.cmd = IWEVQUAL;
4109 iwe.u.qual.qual = bss->signal; 4117 iwe.u.qual.qual = bss->signal;
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 1958bfb361c6..0941e5d6a522 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1091,7 +1091,7 @@ ieee80211_data_to_8023(struct ieee80211_rx_data *rx)
1091 u16 fc, hdrlen, ethertype; 1091 u16 fc, hdrlen, ethertype;
1092 u8 *payload; 1092 u8 *payload;
1093 u8 dst[ETH_ALEN]; 1093 u8 dst[ETH_ALEN];
1094 u8 src[ETH_ALEN]; 1094 u8 src[ETH_ALEN] __aligned(2);
1095 struct sk_buff *skb = rx->skb; 1095 struct sk_buff *skb = rx->skb;
1096 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 1096 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
1097 DECLARE_MAC_BUF(mac); 1097 DECLARE_MAC_BUF(mac);
@@ -1234,7 +1234,7 @@ ieee80211_data_to_8023(struct ieee80211_rx_data *rx)
1234 */ 1234 */
1235static bool ieee80211_frame_allowed(struct ieee80211_rx_data *rx) 1235static bool ieee80211_frame_allowed(struct ieee80211_rx_data *rx)
1236{ 1236{
1237 static const u8 pae_group_addr[ETH_ALEN] 1237 static const u8 pae_group_addr[ETH_ALEN] __aligned(2)
1238 = { 0x01, 0x80, 0xC2, 0x00, 0x00, 0x03 }; 1238 = { 0x01, 0x80, 0xC2, 0x00, 0x00, 0x03 };
1239 struct ethhdr *ehdr = (struct ethhdr *) rx->skb->data; 1239 struct ethhdr *ehdr = (struct ethhdr *) rx->skb->data;
1240 1240
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 1d7dd54aacef..c80d5899f279 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1132,7 +1132,7 @@ static int ieee80211_tx(struct net_device *dev, struct sk_buff *skb,
1132 ieee80211_tx_handler *handler; 1132 ieee80211_tx_handler *handler;
1133 struct ieee80211_tx_data tx; 1133 struct ieee80211_tx_data tx;
1134 ieee80211_tx_result res = TX_DROP, res_prepare; 1134 ieee80211_tx_result res = TX_DROP, res_prepare;
1135 int ret, i; 1135 int ret, i, retries = 0;
1136 1136
1137 WARN_ON(__ieee80211_queue_pending(local, control->queue)); 1137 WARN_ON(__ieee80211_queue_pending(local, control->queue));
1138 1138
@@ -1216,6 +1216,13 @@ retry:
1216 if (!__ieee80211_queue_stopped(local, control->queue)) { 1216 if (!__ieee80211_queue_stopped(local, control->queue)) {
1217 clear_bit(IEEE80211_LINK_STATE_PENDING, 1217 clear_bit(IEEE80211_LINK_STATE_PENDING,
1218 &local->state[control->queue]); 1218 &local->state[control->queue]);
1219 retries++;
1220 /*
1221 * Driver bug, it's rejecting packets but
1222 * not stopping queues.
1223 */
1224 if (WARN_ON_ONCE(retries > 5))
1225 goto drop;
1219 goto retry; 1226 goto retry;
1220 } 1227 }
1221 memcpy(&store->control, control, 1228 memcpy(&store->control, control,
@@ -1562,13 +1569,13 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb,
1562 * be cloned. This could happen, e.g., with Linux bridge code passing 1569 * be cloned. This could happen, e.g., with Linux bridge code passing
1563 * us broadcast frames. */ 1570 * us broadcast frames. */
1564 1571
1565 if (head_need > 0 || skb_header_cloned(skb)) { 1572 if (head_need > 0 || skb_cloned(skb)) {
1566#if 0 1573#if 0
1567 printk(KERN_DEBUG "%s: need to reallocate buffer for %d bytes " 1574 printk(KERN_DEBUG "%s: need to reallocate buffer for %d bytes "
1568 "of headroom\n", dev->name, head_need); 1575 "of headroom\n", dev->name, head_need);
1569#endif 1576#endif
1570 1577
1571 if (skb_header_cloned(skb)) 1578 if (skb_cloned(skb))
1572 I802_DEBUG_INC(local->tx_expand_skb_head_cloned); 1579 I802_DEBUG_INC(local->tx_expand_skb_head_cloned);
1573 else 1580 else
1574 I802_DEBUG_INC(local->tx_expand_skb_head); 1581 I802_DEBUG_INC(local->tx_expand_skb_head);
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 24a465c4df09..4e97b266f907 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -34,11 +34,11 @@ void *mac80211_wiphy_privid = &mac80211_wiphy_privid;
34 34
35/* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */ 35/* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */
36/* Ethernet-II snap header (RFC1042 for most EtherTypes) */ 36/* Ethernet-II snap header (RFC1042 for most EtherTypes) */
37const unsigned char rfc1042_header[] = 37const unsigned char rfc1042_header[] __aligned(2) =
38 { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 }; 38 { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 };
39 39
40/* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */ 40/* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */
41const unsigned char bridge_tunnel_header[] = 41const unsigned char bridge_tunnel_header[] __aligned(2) =
42 { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 }; 42 { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 };
43 43
44 44
@@ -389,6 +389,41 @@ void ieee80211_iterate_active_interfaces(
389 struct ieee80211_local *local = hw_to_local(hw); 389 struct ieee80211_local *local = hw_to_local(hw);
390 struct ieee80211_sub_if_data *sdata; 390 struct ieee80211_sub_if_data *sdata;
391 391
392 rtnl_lock();
393
394 list_for_each_entry(sdata, &local->interfaces, list) {
395 switch (sdata->vif.type) {
396 case IEEE80211_IF_TYPE_INVALID:
397 case IEEE80211_IF_TYPE_MNTR:
398 case IEEE80211_IF_TYPE_VLAN:
399 continue;
400 case IEEE80211_IF_TYPE_AP:
401 case IEEE80211_IF_TYPE_STA:
402 case IEEE80211_IF_TYPE_IBSS:
403 case IEEE80211_IF_TYPE_WDS:
404 case IEEE80211_IF_TYPE_MESH_POINT:
405 break;
406 }
407 if (sdata->dev == local->mdev)
408 continue;
409 if (netif_running(sdata->dev))
410 iterator(data, sdata->dev->dev_addr,
411 &sdata->vif);
412 }
413
414 rtnl_unlock();
415}
416EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces);
417
418void ieee80211_iterate_active_interfaces_atomic(
419 struct ieee80211_hw *hw,
420 void (*iterator)(void *data, u8 *mac,
421 struct ieee80211_vif *vif),
422 void *data)
423{
424 struct ieee80211_local *local = hw_to_local(hw);
425 struct ieee80211_sub_if_data *sdata;
426
392 rcu_read_lock(); 427 rcu_read_lock();
393 428
394 list_for_each_entry_rcu(sdata, &local->interfaces, list) { 429 list_for_each_entry_rcu(sdata, &local->interfaces, list) {
@@ -413,4 +448,4 @@ void ieee80211_iterate_active_interfaces(
413 448
414 rcu_read_unlock(); 449 rcu_read_unlock();
415} 450}
416EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces); 451EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces_atomic);
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
index 76e1de1dc735..e8404212ad57 100644
--- a/net/mac80211/wext.c
+++ b/net/mac80211/wext.c
@@ -95,6 +95,13 @@ static int ieee80211_set_encryption(struct net_device *dev, u8 *sta_addr,
95 } 95 }
96 } 96 }
97 97
98 if (alg == ALG_WEP &&
99 key_len != LEN_WEP40 && key_len != LEN_WEP104) {
100 ieee80211_key_free(key);
101 err = -EINVAL;
102 goto out_unlock;
103 }
104
98 ieee80211_key_link(key, sdata, sta); 105 ieee80211_key_link(key, sdata, sta);
99 106
100 if (set_tx_key || (!sta && !sdata->default_key && key)) 107 if (set_tx_key || (!sta && !sdata->default_key && key))
@@ -209,7 +216,6 @@ static int ieee80211_ioctl_giwrange(struct net_device *dev,
209 range->num_frequency = c; 216 range->num_frequency = c;
210 217
211 IW_EVENT_CAPA_SET_KERNEL(range->event_capa); 218 IW_EVENT_CAPA_SET_KERNEL(range->event_capa);
212 IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWTHRSPY);
213 IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWAP); 219 IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWAP);
214 IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWSCAN); 220 IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWSCAN);
215 221
@@ -291,14 +297,22 @@ static int ieee80211_ioctl_giwmode(struct net_device *dev,
291 return 0; 297 return 0;
292} 298}
293 299
294int ieee80211_set_freq(struct ieee80211_local *local, int freqMHz) 300int ieee80211_set_freq(struct net_device *dev, int freqMHz)
295{ 301{
296 int ret = -EINVAL; 302 int ret = -EINVAL;
297 struct ieee80211_channel *chan; 303 struct ieee80211_channel *chan;
304 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
305 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
298 306
299 chan = ieee80211_get_channel(local->hw.wiphy, freqMHz); 307 chan = ieee80211_get_channel(local->hw.wiphy, freqMHz);
300 308
301 if (chan && !(chan->flags & IEEE80211_CHAN_DISABLED)) { 309 if (chan && !(chan->flags & IEEE80211_CHAN_DISABLED)) {
310 if (sdata->vif.type == IEEE80211_IF_TYPE_IBSS &&
311 chan->flags & IEEE80211_CHAN_NO_IBSS) {
312 printk(KERN_DEBUG "%s: IBSS not allowed on frequency "
313 "%d MHz\n", dev->name, chan->center_freq);
314 return ret;
315 }
302 local->oper_channel = chan; 316 local->oper_channel = chan;
303 317
304 if (local->sta_sw_scanning || local->sta_hw_scanning) 318 if (local->sta_sw_scanning || local->sta_hw_scanning)
@@ -316,7 +330,6 @@ static int ieee80211_ioctl_siwfreq(struct net_device *dev,
316 struct iw_request_info *info, 330 struct iw_request_info *info,
317 struct iw_freq *freq, char *extra) 331 struct iw_freq *freq, char *extra)
318{ 332{
319 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
320 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 333 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
321 334
322 if (sdata->vif.type == IEEE80211_IF_TYPE_STA) 335 if (sdata->vif.type == IEEE80211_IF_TYPE_STA)
@@ -330,14 +343,14 @@ static int ieee80211_ioctl_siwfreq(struct net_device *dev,
330 IEEE80211_STA_AUTO_CHANNEL_SEL; 343 IEEE80211_STA_AUTO_CHANNEL_SEL;
331 return 0; 344 return 0;
332 } else 345 } else
333 return ieee80211_set_freq(local, 346 return ieee80211_set_freq(dev,
334 ieee80211_channel_to_frequency(freq->m)); 347 ieee80211_channel_to_frequency(freq->m));
335 } else { 348 } else {
336 int i, div = 1000000; 349 int i, div = 1000000;
337 for (i = 0; i < freq->e; i++) 350 for (i = 0; i < freq->e; i++)
338 div /= 10; 351 div /= 10;
339 if (div > 0) 352 if (div > 0)
340 return ieee80211_set_freq(local, freq->m / div); 353 return ieee80211_set_freq(dev, freq->m / div);
341 else 354 else
342 return -EINVAL; 355 return -EINVAL;
343 } 356 }
@@ -490,9 +503,15 @@ static int ieee80211_ioctl_giwap(struct net_device *dev,
490 sdata = IEEE80211_DEV_TO_SUB_IF(dev); 503 sdata = IEEE80211_DEV_TO_SUB_IF(dev);
491 if (sdata->vif.type == IEEE80211_IF_TYPE_STA || 504 if (sdata->vif.type == IEEE80211_IF_TYPE_STA ||
492 sdata->vif.type == IEEE80211_IF_TYPE_IBSS) { 505 sdata->vif.type == IEEE80211_IF_TYPE_IBSS) {
493 ap_addr->sa_family = ARPHRD_ETHER; 506 if (sdata->u.sta.state == IEEE80211_ASSOCIATED ||
494 memcpy(&ap_addr->sa_data, sdata->u.sta.bssid, ETH_ALEN); 507 sdata->u.sta.state == IEEE80211_IBSS_JOINED) {
495 return 0; 508 ap_addr->sa_family = ARPHRD_ETHER;
509 memcpy(&ap_addr->sa_data, sdata->u.sta.bssid, ETH_ALEN);
510 return 0;
511 } else {
512 memset(&ap_addr->sa_data, 0, ETH_ALEN);
513 return 0;
514 }
496 } else if (sdata->vif.type == IEEE80211_IF_TYPE_WDS) { 515 } else if (sdata->vif.type == IEEE80211_IF_TYPE_WDS) {
497 ap_addr->sa_family = ARPHRD_ETHER; 516 ap_addr->sa_family = ARPHRD_ETHER;
498 memcpy(&ap_addr->sa_data, sdata->u.wds.remote_addr, ETH_ALEN); 517 memcpy(&ap_addr->sa_data, sdata->u.wds.remote_addr, ETH_ALEN);
diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c
index dc1598b86004..5d09e8698b57 100644
--- a/net/mac80211/wme.c
+++ b/net/mac80211/wme.c
@@ -323,8 +323,7 @@ static void wme_qdiscop_destroy(struct Qdisc* qd)
323 struct ieee80211_hw *hw = &local->hw; 323 struct ieee80211_hw *hw = &local->hw;
324 int queue; 324 int queue;
325 325
326 tcf_destroy_chain(q->filter_list); 326 tcf_destroy_chain(&q->filter_list);
327 q->filter_list = NULL;
328 327
329 for (queue=0; queue < hw->queues; queue++) { 328 for (queue=0; queue < hw->queues; queue++) {
330 skb_queue_purge(&q->requeued[queue]); 329 skb_queue_purge(&q->requeued[queue]);
@@ -673,7 +672,7 @@ int ieee80211_ht_agg_queue_add(struct ieee80211_local *local,
673#ifdef CONFIG_MAC80211_HT_DEBUG 672#ifdef CONFIG_MAC80211_HT_DEBUG
674 if (net_ratelimit()) 673 if (net_ratelimit())
675 printk(KERN_DEBUG "allocated aggregation queue" 674 printk(KERN_DEBUG "allocated aggregation queue"
676 " %d tid %d addr %s pool=0x%lX", 675 " %d tid %d addr %s pool=0x%lX\n",
677 i, tid, print_mac(mac, sta->addr), 676 i, tid, print_mac(mac, sta->addr),
678 q->qdisc_pool[0]); 677 q->qdisc_pool[0]);
679#endif /* CONFIG_MAC80211_HT_DEBUG */ 678#endif /* CONFIG_MAC80211_HT_DEBUG */
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index c4b1799da5d7..662c1ccfee26 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -196,8 +196,6 @@ destroy_conntrack(struct nf_conntrack *nfct)
196 if (l4proto && l4proto->destroy) 196 if (l4proto && l4proto->destroy)
197 l4proto->destroy(ct); 197 l4proto->destroy(ct);
198 198
199 nf_ct_ext_destroy(ct);
200
201 rcu_read_unlock(); 199 rcu_read_unlock();
202 200
203 spin_lock_bh(&nf_conntrack_lock); 201 spin_lock_bh(&nf_conntrack_lock);
@@ -520,6 +518,7 @@ static void nf_conntrack_free_rcu(struct rcu_head *head)
520 518
521void nf_conntrack_free(struct nf_conn *ct) 519void nf_conntrack_free(struct nf_conn *ct)
522{ 520{
521 nf_ct_ext_destroy(ct);
523 call_rcu(&ct->rcu, nf_conntrack_free_rcu); 522 call_rcu(&ct->rcu, nf_conntrack_free_rcu);
524} 523}
525EXPORT_SYMBOL_GPL(nf_conntrack_free); 524EXPORT_SYMBOL_GPL(nf_conntrack_free);
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c
index e31beeb33b2b..e8f0dead267f 100644
--- a/net/netfilter/nf_conntrack_expect.c
+++ b/net/netfilter/nf_conntrack_expect.c
@@ -587,10 +587,10 @@ int __init nf_conntrack_expect_init(void)
587 return 0; 587 return 0;
588 588
589err3: 589err3:
590 kmem_cache_destroy(nf_ct_expect_cachep);
591err2:
590 nf_ct_free_hashtable(nf_ct_expect_hash, nf_ct_expect_vmalloc, 592 nf_ct_free_hashtable(nf_ct_expect_hash, nf_ct_expect_vmalloc,
591 nf_ct_expect_hsize); 593 nf_ct_expect_hsize);
592err2:
593 kmem_cache_destroy(nf_ct_expect_cachep);
594err1: 594err1:
595 return err; 595 return err;
596} 596}
diff --git a/net/netfilter/nf_conntrack_extend.c b/net/netfilter/nf_conntrack_extend.c
index bcc19fa4ed1e..8a3f8b34e466 100644
--- a/net/netfilter/nf_conntrack_extend.c
+++ b/net/netfilter/nf_conntrack_extend.c
@@ -59,12 +59,19 @@ nf_ct_ext_create(struct nf_ct_ext **ext, enum nf_ct_ext_id id, gfp_t gfp)
59 if (!*ext) 59 if (!*ext)
60 return NULL; 60 return NULL;
61 61
62 INIT_RCU_HEAD(&(*ext)->rcu);
62 (*ext)->offset[id] = off; 63 (*ext)->offset[id] = off;
63 (*ext)->len = len; 64 (*ext)->len = len;
64 65
65 return (void *)(*ext) + off; 66 return (void *)(*ext) + off;
66} 67}
67 68
69static void __nf_ct_ext_free_rcu(struct rcu_head *head)
70{
71 struct nf_ct_ext *ext = container_of(head, struct nf_ct_ext, rcu);
72 kfree(ext);
73}
74
68void *__nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp) 75void *__nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp)
69{ 76{
70 struct nf_ct_ext *new; 77 struct nf_ct_ext *new;
@@ -106,7 +113,7 @@ void *__nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp)
106 (void *)ct->ext + ct->ext->offset[i]); 113 (void *)ct->ext + ct->ext->offset[i]);
107 rcu_read_unlock(); 114 rcu_read_unlock();
108 } 115 }
109 kfree(ct->ext); 116 call_rcu(&ct->ext->rcu, __nf_ct_ext_free_rcu);
110 ct->ext = new; 117 ct->ext = new;
111 } 118 }
112 119
diff --git a/net/netfilter/nf_conntrack_h323_main.c b/net/netfilter/nf_conntrack_h323_main.c
index 95da1a24aab7..2f83c158934d 100644
--- a/net/netfilter/nf_conntrack_h323_main.c
+++ b/net/netfilter/nf_conntrack_h323_main.c
@@ -619,6 +619,7 @@ static const struct nf_conntrack_expect_policy h245_exp_policy = {
619static struct nf_conntrack_helper nf_conntrack_helper_h245 __read_mostly = { 619static struct nf_conntrack_helper nf_conntrack_helper_h245 __read_mostly = {
620 .name = "H.245", 620 .name = "H.245",
621 .me = THIS_MODULE, 621 .me = THIS_MODULE,
622 .tuple.src.l3num = AF_UNSPEC,
622 .tuple.dst.protonum = IPPROTO_UDP, 623 .tuple.dst.protonum = IPPROTO_UDP,
623 .help = h245_help, 624 .help = h245_help,
624 .expect_policy = &h245_exp_policy, 625 .expect_policy = &h245_exp_policy,
@@ -1765,6 +1766,7 @@ static void __exit nf_conntrack_h323_fini(void)
1765 nf_conntrack_helper_unregister(&nf_conntrack_helper_ras[0]); 1766 nf_conntrack_helper_unregister(&nf_conntrack_helper_ras[0]);
1766 nf_conntrack_helper_unregister(&nf_conntrack_helper_q931[1]); 1767 nf_conntrack_helper_unregister(&nf_conntrack_helper_q931[1]);
1767 nf_conntrack_helper_unregister(&nf_conntrack_helper_q931[0]); 1768 nf_conntrack_helper_unregister(&nf_conntrack_helper_q931[0]);
1769 nf_conntrack_helper_unregister(&nf_conntrack_helper_h245);
1768 kfree(h323_buffer); 1770 kfree(h323_buffer);
1769 pr_debug("nf_ct_h323: fini\n"); 1771 pr_debug("nf_ct_h323: fini\n");
1770} 1772}
@@ -1777,28 +1779,34 @@ static int __init nf_conntrack_h323_init(void)
1777 h323_buffer = kmalloc(65536, GFP_KERNEL); 1779 h323_buffer = kmalloc(65536, GFP_KERNEL);
1778 if (!h323_buffer) 1780 if (!h323_buffer)
1779 return -ENOMEM; 1781 return -ENOMEM;
1780 ret = nf_conntrack_helper_register(&nf_conntrack_helper_q931[0]); 1782 ret = nf_conntrack_helper_register(&nf_conntrack_helper_h245);
1781 if (ret < 0) 1783 if (ret < 0)
1782 goto err1; 1784 goto err1;
1783 ret = nf_conntrack_helper_register(&nf_conntrack_helper_q931[1]); 1785 ret = nf_conntrack_helper_register(&nf_conntrack_helper_q931[0]);
1784 if (ret < 0) 1786 if (ret < 0)
1785 goto err2; 1787 goto err2;
1786 ret = nf_conntrack_helper_register(&nf_conntrack_helper_ras[0]); 1788 ret = nf_conntrack_helper_register(&nf_conntrack_helper_q931[1]);
1787 if (ret < 0) 1789 if (ret < 0)
1788 goto err3; 1790 goto err3;
1789 ret = nf_conntrack_helper_register(&nf_conntrack_helper_ras[1]); 1791 ret = nf_conntrack_helper_register(&nf_conntrack_helper_ras[0]);
1790 if (ret < 0) 1792 if (ret < 0)
1791 goto err4; 1793 goto err4;
1794 ret = nf_conntrack_helper_register(&nf_conntrack_helper_ras[1]);
1795 if (ret < 0)
1796 goto err5;
1792 pr_debug("nf_ct_h323: init success\n"); 1797 pr_debug("nf_ct_h323: init success\n");
1793 return 0; 1798 return 0;
1794 1799
1795err4: 1800err5:
1796 nf_conntrack_helper_unregister(&nf_conntrack_helper_ras[0]); 1801 nf_conntrack_helper_unregister(&nf_conntrack_helper_ras[0]);
1797err3: 1802err4:
1798 nf_conntrack_helper_unregister(&nf_conntrack_helper_q931[1]); 1803 nf_conntrack_helper_unregister(&nf_conntrack_helper_q931[1]);
1799err2: 1804err3:
1800 nf_conntrack_helper_unregister(&nf_conntrack_helper_q931[0]); 1805 nf_conntrack_helper_unregister(&nf_conntrack_helper_q931[0]);
1806err2:
1807 nf_conntrack_helper_unregister(&nf_conntrack_helper_h245);
1801err1: 1808err1:
1809 kfree(h323_buffer);
1802 return ret; 1810 return ret;
1803} 1811}
1804 1812
diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c
index ba94004fe323..271cd01d57ae 100644
--- a/net/netfilter/nf_conntrack_proto_tcp.c
+++ b/net/netfilter/nf_conntrack_proto_tcp.c
@@ -331,12 +331,13 @@ static unsigned int get_conntrack_index(const struct tcphdr *tcph)
331 331
332 I. Upper bound for valid data: seq <= sender.td_maxend 332 I. Upper bound for valid data: seq <= sender.td_maxend
333 II. Lower bound for valid data: seq + len >= sender.td_end - receiver.td_maxwin 333 II. Lower bound for valid data: seq + len >= sender.td_end - receiver.td_maxwin
334 III. Upper bound for valid ack: sack <= receiver.td_end 334 III. Upper bound for valid (s)ack: sack <= receiver.td_end
335 IV. Lower bound for valid ack: ack >= receiver.td_end - MAXACKWINDOW 335 IV. Lower bound for valid (s)ack: sack >= receiver.td_end - MAXACKWINDOW
336 336
337 where sack is the highest right edge of sack block found in the packet. 337 where sack is the highest right edge of sack block found in the packet
338 or ack in the case of packet without SACK option.
338 339
339 The upper bound limit for a valid ack is not ignored - 340 The upper bound limit for a valid (s)ack is not ignored -
340 we doesn't have to deal with fragments. 341 we doesn't have to deal with fragments.
341*/ 342*/
342 343
@@ -606,12 +607,12 @@ static bool tcp_in_window(const struct nf_conn *ct,
606 before(seq, sender->td_maxend + 1), 607 before(seq, sender->td_maxend + 1),
607 after(end, sender->td_end - receiver->td_maxwin - 1), 608 after(end, sender->td_end - receiver->td_maxwin - 1),
608 before(sack, receiver->td_end + 1), 609 before(sack, receiver->td_end + 1),
609 after(ack, receiver->td_end - MAXACKWINDOW(sender))); 610 after(sack, receiver->td_end - MAXACKWINDOW(sender) - 1));
610 611
611 if (before(seq, sender->td_maxend + 1) && 612 if (before(seq, sender->td_maxend + 1) &&
612 after(end, sender->td_end - receiver->td_maxwin - 1) && 613 after(end, sender->td_end - receiver->td_maxwin - 1) &&
613 before(sack, receiver->td_end + 1) && 614 before(sack, receiver->td_end + 1) &&
614 after(ack, receiver->td_end - MAXACKWINDOW(sender))) { 615 after(sack, receiver->td_end - MAXACKWINDOW(sender) - 1)) {
615 /* 616 /*
616 * Take into account window scaling (RFC 1323). 617 * Take into account window scaling (RFC 1323).
617 */ 618 */
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c
index bc11d7092032..9fda6ee95a31 100644
--- a/net/netfilter/nf_log.c
+++ b/net/netfilter/nf_log.c
@@ -92,10 +92,6 @@ void nf_log_packet(int pf,
92 vsnprintf(prefix, sizeof(prefix), fmt, args); 92 vsnprintf(prefix, sizeof(prefix), fmt, args);
93 va_end(args); 93 va_end(args);
94 logger->logfn(pf, hooknum, skb, in, out, loginfo, prefix); 94 logger->logfn(pf, hooknum, skb, in, out, loginfo, prefix);
95 } else if (net_ratelimit()) {
96 printk(KERN_WARNING "nf_log_packet: can\'t log since "
97 "no backend logging module loaded in! Please either "
98 "load one, or disable logging explicitly\n");
99 } 95 }
100 rcu_read_unlock(); 96 rcu_read_unlock();
101} 97}
diff --git a/net/netfilter/xt_connlimit.c b/net/netfilter/xt_connlimit.c
index 2e89a00df92c..70907f6baac3 100644
--- a/net/netfilter/xt_connlimit.c
+++ b/net/netfilter/xt_connlimit.c
@@ -73,7 +73,8 @@ connlimit_iphash6(const union nf_inet_addr *addr,
73static inline bool already_closed(const struct nf_conn *conn) 73static inline bool already_closed(const struct nf_conn *conn)
74{ 74{
75 if (nf_ct_protonum(conn) == IPPROTO_TCP) 75 if (nf_ct_protonum(conn) == IPPROTO_TCP)
76 return conn->proto.tcp.state == TCP_CONNTRACK_TIME_WAIT; 76 return conn->proto.tcp.state == TCP_CONNTRACK_TIME_WAIT ||
77 conn->proto.tcp.state == TCP_CONNTRACK_CLOSE;
77 else 78 else
78 return 0; 79 return 0;
79} 80}
diff --git a/net/netlabel/netlabel_unlabeled.c b/net/netlabel/netlabel_unlabeled.c
index 0099da5b2591..52b2611a6eb6 100644
--- a/net/netlabel/netlabel_unlabeled.c
+++ b/net/netlabel/netlabel_unlabeled.c
@@ -1534,7 +1534,7 @@ static int netlbl_unlabel_staticlistdef(struct sk_buff *skb,
1534 } 1534 }
1535 } 1535 }
1536 list_for_each_entry_rcu(addr6, &iface->addr6_list, list) { 1536 list_for_each_entry_rcu(addr6, &iface->addr6_list, list) {
1537 if (addr6->valid || iter_addr6++ < skip_addr6) 1537 if (!addr6->valid || iter_addr6++ < skip_addr6)
1538 continue; 1538 continue;
1539 if (netlbl_unlabel_staticlist_gen(NLBL_UNLABEL_C_STATICLISTDEF, 1539 if (netlbl_unlabel_staticlist_gen(NLBL_UNLABEL_C_STATICLISTDEF,
1540 iface, 1540 iface,
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 9b97f8006c9c..349aba189558 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -886,7 +886,7 @@ retry:
886 return netlink_unicast_kernel(sk, skb); 886 return netlink_unicast_kernel(sk, skb);
887 887
888 if (sk_filter(sk, skb)) { 888 if (sk_filter(sk, skb)) {
889 int err = skb->len; 889 err = skb->len;
890 kfree_skb(skb); 890 kfree_skb(skb);
891 sock_put(sk); 891 sock_put(sk);
892 return err; 892 return err;
diff --git a/net/netlink/attr.c b/net/netlink/attr.c
index feb326f4a752..2d106cfe1d27 100644
--- a/net/netlink/attr.c
+++ b/net/netlink/attr.c
@@ -132,6 +132,7 @@ errout:
132 * @maxtype: maximum attribute type to be expected 132 * @maxtype: maximum attribute type to be expected
133 * @head: head of attribute stream 133 * @head: head of attribute stream
134 * @len: length of attribute stream 134 * @len: length of attribute stream
135 * @policy: validation policy
135 * 136 *
136 * Parses a stream of attributes and stores a pointer to each attribute in 137 * Parses a stream of attributes and stores a pointer to each attribute in
137 * the tb array accessable via the attribute type. Attributes with a type 138 * the tb array accessable via the attribute type. Attributes with a type
@@ -194,7 +195,7 @@ struct nlattr *nla_find(struct nlattr *head, int len, int attrtype)
194/** 195/**
195 * nla_strlcpy - Copy string attribute payload into a sized buffer 196 * nla_strlcpy - Copy string attribute payload into a sized buffer
196 * @dst: where to copy the string to 197 * @dst: where to copy the string to
197 * @src: attribute to copy the string from 198 * @nla: attribute to copy the string from
198 * @dstsize: size of destination buffer 199 * @dstsize: size of destination buffer
199 * 200 *
200 * Copies at most dstsize - 1 bytes into the destination buffer. 201 * Copies at most dstsize - 1 bytes into the destination buffer.
@@ -340,9 +341,9 @@ struct nlattr *nla_reserve(struct sk_buff *skb, int attrtype, int attrlen)
340} 341}
341 342
342/** 343/**
343 * nla_reserve - reserve room for attribute without header 344 * nla_reserve_nohdr - reserve room for attribute without header
344 * @skb: socket buffer to reserve room on 345 * @skb: socket buffer to reserve room on
345 * @len: length of attribute payload 346 * @attrlen: length of attribute payload
346 * 347 *
347 * Reserves room for attribute payload without a header. 348 * Reserves room for attribute payload without a header.
348 * 349 *
@@ -400,13 +401,13 @@ void __nla_put_nohdr(struct sk_buff *skb, int attrlen, const void *data)
400 * @attrlen: length of attribute payload 401 * @attrlen: length of attribute payload
401 * @data: head of attribute payload 402 * @data: head of attribute payload
402 * 403 *
403 * Returns -1 if the tailroom of the skb is insufficient to store 404 * Returns -EMSGSIZE if the tailroom of the skb is insufficient to store
404 * the attribute header and payload. 405 * the attribute header and payload.
405 */ 406 */
406int nla_put(struct sk_buff *skb, int attrtype, int attrlen, const void *data) 407int nla_put(struct sk_buff *skb, int attrtype, int attrlen, const void *data)
407{ 408{
408 if (unlikely(skb_tailroom(skb) < nla_total_size(attrlen))) 409 if (unlikely(skb_tailroom(skb) < nla_total_size(attrlen)))
409 return -1; 410 return -EMSGSIZE;
410 411
411 __nla_put(skb, attrtype, attrlen, data); 412 __nla_put(skb, attrtype, attrlen, data);
412 return 0; 413 return 0;
@@ -418,13 +419,13 @@ int nla_put(struct sk_buff *skb, int attrtype, int attrlen, const void *data)
418 * @attrlen: length of attribute payload 419 * @attrlen: length of attribute payload
419 * @data: head of attribute payload 420 * @data: head of attribute payload
420 * 421 *
421 * Returns -1 if the tailroom of the skb is insufficient to store 422 * Returns -EMSGSIZE if the tailroom of the skb is insufficient to store
422 * the attribute payload. 423 * the attribute payload.
423 */ 424 */
424int nla_put_nohdr(struct sk_buff *skb, int attrlen, const void *data) 425int nla_put_nohdr(struct sk_buff *skb, int attrlen, const void *data)
425{ 426{
426 if (unlikely(skb_tailroom(skb) < NLA_ALIGN(attrlen))) 427 if (unlikely(skb_tailroom(skb) < NLA_ALIGN(attrlen)))
427 return -1; 428 return -EMSGSIZE;
428 429
429 __nla_put_nohdr(skb, attrlen, data); 430 __nla_put_nohdr(skb, attrlen, data);
430 return 0; 431 return 0;
@@ -436,13 +437,13 @@ int nla_put_nohdr(struct sk_buff *skb, int attrlen, const void *data)
436 * @attrlen: length of attribute payload 437 * @attrlen: length of attribute payload
437 * @data: head of attribute payload 438 * @data: head of attribute payload
438 * 439 *
439 * Returns -1 if the tailroom of the skb is insufficient to store 440 * Returns -EMSGSIZE if the tailroom of the skb is insufficient to store
440 * the attribute payload. 441 * the attribute payload.
441 */ 442 */
442int nla_append(struct sk_buff *skb, int attrlen, const void *data) 443int nla_append(struct sk_buff *skb, int attrlen, const void *data)
443{ 444{
444 if (unlikely(skb_tailroom(skb) < NLA_ALIGN(attrlen))) 445 if (unlikely(skb_tailroom(skb) < NLA_ALIGN(attrlen)))
445 return -1; 446 return -EMSGSIZE;
446 447
447 memcpy(skb_put(skb, attrlen), data, attrlen); 448 memcpy(skb_put(skb, attrlen), data, attrlen);
448 return 0; 449 return 0;
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index d16929c9b4bc..3e1191cecaf0 100644
--- a/net/netlink/genetlink.c
+++ b/net/netlink/genetlink.c
@@ -444,8 +444,11 @@ static int genl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
444 if (ops->dumpit == NULL) 444 if (ops->dumpit == NULL)
445 return -EOPNOTSUPP; 445 return -EOPNOTSUPP;
446 446
447 return netlink_dump_start(genl_sock, skb, nlh, 447 genl_unlock();
448 ops->dumpit, ops->done); 448 err = netlink_dump_start(genl_sock, skb, nlh,
449 ops->dumpit, ops->done);
450 genl_lock();
451 return err;
449 } 452 }
450 453
451 if (ops->doit == NULL) 454 if (ops->doit == NULL)
@@ -554,7 +557,8 @@ static int ctrl_fill_info(struct genl_family *family, u32 pid, u32 seq,
554 return genlmsg_end(skb, hdr); 557 return genlmsg_end(skb, hdr);
555 558
556nla_put_failure: 559nla_put_failure:
557 return genlmsg_cancel(skb, hdr); 560 genlmsg_cancel(skb, hdr);
561 return -EMSGSIZE;
558} 562}
559 563
560static int ctrl_fill_mcgrp_info(struct genl_multicast_group *grp, u32 pid, 564static int ctrl_fill_mcgrp_info(struct genl_multicast_group *grp, u32 pid,
@@ -590,7 +594,8 @@ static int ctrl_fill_mcgrp_info(struct genl_multicast_group *grp, u32 pid,
590 return genlmsg_end(skb, hdr); 594 return genlmsg_end(skb, hdr);
591 595
592nla_put_failure: 596nla_put_failure:
593 return genlmsg_cancel(skb, hdr); 597 genlmsg_cancel(skb, hdr);
598 return -EMSGSIZE;
594} 599}
595 600
596static int ctrl_dumpfamily(struct sk_buff *skb, struct netlink_callback *cb) 601static int ctrl_dumpfamily(struct sk_buff *skb, struct netlink_callback *cb)
@@ -601,9 +606,6 @@ static int ctrl_dumpfamily(struct sk_buff *skb, struct netlink_callback *cb)
601 int chains_to_skip = cb->args[0]; 606 int chains_to_skip = cb->args[0];
602 int fams_to_skip = cb->args[1]; 607 int fams_to_skip = cb->args[1];
603 608
604 if (chains_to_skip != 0)
605 genl_lock();
606
607 for (i = 0; i < GENL_FAM_TAB_SIZE; i++) { 609 for (i = 0; i < GENL_FAM_TAB_SIZE; i++) {
608 if (i < chains_to_skip) 610 if (i < chains_to_skip)
609 continue; 611 continue;
@@ -621,9 +623,6 @@ static int ctrl_dumpfamily(struct sk_buff *skb, struct netlink_callback *cb)
621 } 623 }
622 624
623errout: 625errout:
624 if (chains_to_skip != 0)
625 genl_unlock();
626
627 cb->args[0] = i; 626 cb->args[0] = i;
628 cb->args[1] = n; 627 cb->args[1] = n;
629 628
@@ -768,7 +767,7 @@ static int __init genl_init(void)
768 767
769 /* we'll bump the group number right afterwards */ 768 /* we'll bump the group number right afterwards */
770 genl_sock = netlink_kernel_create(&init_net, NETLINK_GENERIC, 0, 769 genl_sock = netlink_kernel_create(&init_net, NETLINK_GENERIC, 0,
771 genl_rcv, NULL, THIS_MODULE); 770 genl_rcv, &genl_mutex, THIS_MODULE);
772 if (genl_sock == NULL) 771 if (genl_sock == NULL)
773 panic("GENL: Cannot initialize generic netlink\n"); 772 panic("GENL: Cannot initialize generic netlink\n");
774 773
diff --git a/net/sched/Kconfig b/net/sched/Kconfig
index 82adfe6447d7..9437b27ff84d 100644
--- a/net/sched/Kconfig
+++ b/net/sched/Kconfig
@@ -106,17 +106,6 @@ config NET_SCH_PRIO
106 To compile this code as a module, choose M here: the 106 To compile this code as a module, choose M here: the
107 module will be called sch_prio. 107 module will be called sch_prio.
108 108
109config NET_SCH_RR
110 tristate "Multi Band Round Robin Queuing (RR)"
111 select NET_SCH_PRIO
112 ---help---
113 Say Y here if you want to use an n-band round robin packet
114 scheduler.
115
116 The module uses sch_prio for its framework and is aliased as
117 sch_rr, so it will load sch_prio, although it is referred
118 to using sch_rr.
119
120config NET_SCH_RED 109config NET_SCH_RED
121 tristate "Random Early Detection (RED)" 110 tristate "Random Early Detection (RED)"
122 ---help--- 111 ---help---
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 1086df7478bc..9360fc81e8c7 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -220,7 +220,7 @@ replay:
220 tp = kzalloc(sizeof(*tp), GFP_KERNEL); 220 tp = kzalloc(sizeof(*tp), GFP_KERNEL);
221 if (tp == NULL) 221 if (tp == NULL)
222 goto errout; 222 goto errout;
223 err = -EINVAL; 223 err = -ENOENT;
224 tp_ops = tcf_proto_lookup_ops(tca[TCA_KIND]); 224 tp_ops = tcf_proto_lookup_ops(tca[TCA_KIND]);
225 if (tp_ops == NULL) { 225 if (tp_ops == NULL) {
226#ifdef CONFIG_KMOD 226#ifdef CONFIG_KMOD
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index c40773cdbe45..10f01ad04380 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -1252,12 +1252,12 @@ void tcf_destroy(struct tcf_proto *tp)
1252 kfree(tp); 1252 kfree(tp);
1253} 1253}
1254 1254
1255void tcf_destroy_chain(struct tcf_proto *fl) 1255void tcf_destroy_chain(struct tcf_proto **fl)
1256{ 1256{
1257 struct tcf_proto *tp; 1257 struct tcf_proto *tp;
1258 1258
1259 while ((tp = fl) != NULL) { 1259 while ((tp = *fl) != NULL) {
1260 fl = tp->next; 1260 *fl = tp->next;
1261 tcf_destroy(tp); 1261 tcf_destroy(tp);
1262 } 1262 }
1263} 1263}
diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c
index 335273416384..db0e23ae85f8 100644
--- a/net/sched/sch_atm.c
+++ b/net/sched/sch_atm.c
@@ -160,7 +160,7 @@ static void atm_tc_put(struct Qdisc *sch, unsigned long cl)
160 *prev = flow->next; 160 *prev = flow->next;
161 pr_debug("atm_tc_put: qdisc %p\n", flow->q); 161 pr_debug("atm_tc_put: qdisc %p\n", flow->q);
162 qdisc_destroy(flow->q); 162 qdisc_destroy(flow->q);
163 tcf_destroy_chain(flow->filter_list); 163 tcf_destroy_chain(&flow->filter_list);
164 if (flow->sock) { 164 if (flow->sock) {
165 pr_debug("atm_tc_put: f_count %d\n", 165 pr_debug("atm_tc_put: f_count %d\n",
166 file_count(flow->sock->file)); 166 file_count(flow->sock->file));
@@ -586,10 +586,11 @@ static void atm_tc_destroy(struct Qdisc *sch)
586 struct atm_flow_data *flow; 586 struct atm_flow_data *flow;
587 587
588 pr_debug("atm_tc_destroy(sch %p,[qdisc %p])\n", sch, p); 588 pr_debug("atm_tc_destroy(sch %p,[qdisc %p])\n", sch, p);
589 for (flow = p->flows; flow; flow = flow->next)
590 tcf_destroy_chain(&flow->filter_list);
591
589 /* races ? */ 592 /* races ? */
590 while ((flow = p->flows)) { 593 while ((flow = p->flows)) {
591 tcf_destroy_chain(flow->filter_list);
592 flow->filter_list = NULL;
593 if (flow->ref > 1) 594 if (flow->ref > 1)
594 printk(KERN_ERR "atm_destroy: %p->ref = %d\n", flow, 595 printk(KERN_ERR "atm_destroy: %p->ref = %d\n", flow,
595 flow->ref); 596 flow->ref);
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
index 09969c1fbc08..2a3c97f7dc63 100644
--- a/net/sched/sch_cbq.c
+++ b/net/sched/sch_cbq.c
@@ -1704,7 +1704,7 @@ static void cbq_destroy_class(struct Qdisc *sch, struct cbq_class *cl)
1704 1704
1705 BUG_TRAP(!cl->filters); 1705 BUG_TRAP(!cl->filters);
1706 1706
1707 tcf_destroy_chain(cl->filter_list); 1707 tcf_destroy_chain(&cl->filter_list);
1708 qdisc_destroy(cl->q); 1708 qdisc_destroy(cl->q);
1709 qdisc_put_rtab(cl->R_tab); 1709 qdisc_put_rtab(cl->R_tab);
1710 gen_kill_estimator(&cl->bstats, &cl->rate_est); 1710 gen_kill_estimator(&cl->bstats, &cl->rate_est);
@@ -1728,10 +1728,8 @@ cbq_destroy(struct Qdisc* sch)
1728 * be bound to classes which have been destroyed already. --TGR '04 1728 * be bound to classes which have been destroyed already. --TGR '04
1729 */ 1729 */
1730 for (h = 0; h < 16; h++) { 1730 for (h = 0; h < 16; h++) {
1731 for (cl = q->classes[h]; cl; cl = cl->next) { 1731 for (cl = q->classes[h]; cl; cl = cl->next)
1732 tcf_destroy_chain(cl->filter_list); 1732 tcf_destroy_chain(&cl->filter_list);
1733 cl->filter_list = NULL;
1734 }
1735 } 1733 }
1736 for (h = 0; h < 16; h++) { 1734 for (h = 0; h < 16; h++) {
1737 struct cbq_class *next; 1735 struct cbq_class *next;
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c
index 0df911fd67b1..c4c1317cd47d 100644
--- a/net/sched/sch_dsmark.c
+++ b/net/sched/sch_dsmark.c
@@ -416,7 +416,7 @@ static void dsmark_destroy(struct Qdisc *sch)
416 416
417 pr_debug("dsmark_destroy(sch %p,[qdisc %p])\n", sch, p); 417 pr_debug("dsmark_destroy(sch %p,[qdisc %p])\n", sch, p);
418 418
419 tcf_destroy_chain(p->filter_list); 419 tcf_destroy_chain(&p->filter_list);
420 qdisc_destroy(p->q); 420 qdisc_destroy(p->q);
421 kfree(p->mask); 421 kfree(p->mask);
422} 422}
@@ -444,7 +444,8 @@ static int dsmark_dump_class(struct Qdisc *sch, unsigned long cl,
444 return nla_nest_end(skb, opts); 444 return nla_nest_end(skb, opts);
445 445
446nla_put_failure: 446nla_put_failure:
447 return nla_nest_cancel(skb, opts); 447 nla_nest_cancel(skb, opts);
448 return -EMSGSIZE;
448} 449}
449 450
450static int dsmark_dump(struct Qdisc *sch, struct sk_buff *skb) 451static int dsmark_dump(struct Qdisc *sch, struct sk_buff *skb)
@@ -466,7 +467,8 @@ static int dsmark_dump(struct Qdisc *sch, struct sk_buff *skb)
466 return nla_nest_end(skb, opts); 467 return nla_nest_end(skb, opts);
467 468
468nla_put_failure: 469nla_put_failure:
469 return nla_nest_cancel(skb, opts); 470 nla_nest_cancel(skb, opts);
471 return -EMSGSIZE;
470} 472}
471 473
472static const struct Qdisc_class_ops dsmark_class_ops = { 474static const struct Qdisc_class_ops dsmark_class_ops = {
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index d355e5e47fe3..13afa7214392 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -468,7 +468,7 @@ struct Qdisc *qdisc_alloc(struct net_device *dev, struct Qdisc_ops *ops)
468 468
469 return sch; 469 return sch;
470errout: 470errout:
471 return ERR_PTR(-err); 471 return ERR_PTR(err);
472} 472}
473 473
474struct Qdisc * qdisc_create_dflt(struct net_device *dev, struct Qdisc_ops *ops, 474struct Qdisc * qdisc_create_dflt(struct net_device *dev, struct Qdisc_ops *ops,
diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c
index 3a9d226ff1e4..c89fba56db56 100644
--- a/net/sched/sch_gred.c
+++ b/net/sched/sch_gred.c
@@ -582,7 +582,8 @@ append_opt:
582 return nla_nest_end(skb, opts); 582 return nla_nest_end(skb, opts);
583 583
584nla_put_failure: 584nla_put_failure:
585 return nla_nest_cancel(skb, opts); 585 nla_nest_cancel(skb, opts);
586 return -EMSGSIZE;
586} 587}
587 588
588static void gred_destroy(struct Qdisc *sch) 589static void gred_destroy(struct Qdisc *sch)
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index 87293d0db1d7..e817aa00441d 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -1123,7 +1123,7 @@ hfsc_destroy_class(struct Qdisc *sch, struct hfsc_class *cl)
1123{ 1123{
1124 struct hfsc_sched *q = qdisc_priv(sch); 1124 struct hfsc_sched *q = qdisc_priv(sch);
1125 1125
1126 tcf_destroy_chain(cl->filter_list); 1126 tcf_destroy_chain(&cl->filter_list);
1127 qdisc_destroy(cl->qdisc); 1127 qdisc_destroy(cl->qdisc);
1128 gen_kill_estimator(&cl->bstats, &cl->rate_est); 1128 gen_kill_estimator(&cl->bstats, &cl->rate_est);
1129 if (cl != &q->root) 1129 if (cl != &q->root)
@@ -1360,7 +1360,7 @@ hfsc_dump_class(struct Qdisc *sch, unsigned long arg, struct sk_buff *skb,
1360 1360
1361 nla_put_failure: 1361 nla_put_failure:
1362 nla_nest_cancel(skb, nest); 1362 nla_nest_cancel(skb, nest);
1363 return -1; 1363 return -EMSGSIZE;
1364} 1364}
1365 1365
1366static int 1366static int
@@ -1541,6 +1541,10 @@ hfsc_destroy_qdisc(struct Qdisc *sch)
1541 unsigned int i; 1541 unsigned int i;
1542 1542
1543 for (i = 0; i < HFSC_HSIZE; i++) { 1543 for (i = 0; i < HFSC_HSIZE; i++) {
1544 list_for_each_entry(cl, &q->clhash[i], hlist)
1545 tcf_destroy_chain(&cl->filter_list);
1546 }
1547 for (i = 0; i < HFSC_HSIZE; i++) {
1544 list_for_each_entry_safe(cl, next, &q->clhash[i], hlist) 1548 list_for_each_entry_safe(cl, next, &q->clhash[i], hlist)
1545 hfsc_destroy_class(sch, cl); 1549 hfsc_destroy_class(sch, cl);
1546 } 1550 }
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 5bc1ed490180..3fb58f428f72 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -28,6 +28,7 @@
28 * $Id: sch_htb.c,v 1.25 2003/12/07 11:08:25 devik Exp devik $ 28 * $Id: sch_htb.c,v 1.25 2003/12/07 11:08:25 devik Exp devik $
29 */ 29 */
30#include <linux/module.h> 30#include <linux/module.h>
31#include <linux/moduleparam.h>
31#include <linux/types.h> 32#include <linux/types.h>
32#include <linux/kernel.h> 33#include <linux/kernel.h>
33#include <linux/string.h> 34#include <linux/string.h>
@@ -53,13 +54,17 @@
53*/ 54*/
54 55
55#define HTB_HSIZE 16 /* classid hash size */ 56#define HTB_HSIZE 16 /* classid hash size */
56#define HTB_HYSTERESIS 1 /* whether to use mode hysteresis for speedup */ 57static int htb_hysteresis __read_mostly = 0; /* whether to use mode hysteresis for speedup */
57#define HTB_VER 0x30011 /* major must be matched with number suplied by TC as version */ 58#define HTB_VER 0x30011 /* major must be matched with number suplied by TC as version */
58 59
59#if HTB_VER >> 16 != TC_HTB_PROTOVER 60#if HTB_VER >> 16 != TC_HTB_PROTOVER
60#error "Mismatched sch_htb.c and pkt_sch.h" 61#error "Mismatched sch_htb.c and pkt_sch.h"
61#endif 62#endif
62 63
64/* Module parameter and sysfs export */
65module_param (htb_hysteresis, int, 0640);
66MODULE_PARM_DESC(htb_hysteresis, "Hysteresis mode, less CPU load, less accurate");
67
63/* used internaly to keep status of single class */ 68/* used internaly to keep status of single class */
64enum htb_cmode { 69enum htb_cmode {
65 HTB_CANT_SEND, /* class can't send and can't borrow */ 70 HTB_CANT_SEND, /* class can't send and can't borrow */
@@ -462,19 +467,21 @@ static void htb_deactivate_prios(struct htb_sched *q, struct htb_class *cl)
462 htb_remove_class_from_row(q, cl, mask); 467 htb_remove_class_from_row(q, cl, mask);
463} 468}
464 469
465#if HTB_HYSTERESIS
466static inline long htb_lowater(const struct htb_class *cl) 470static inline long htb_lowater(const struct htb_class *cl)
467{ 471{
468 return cl->cmode != HTB_CANT_SEND ? -cl->cbuffer : 0; 472 if (htb_hysteresis)
473 return cl->cmode != HTB_CANT_SEND ? -cl->cbuffer : 0;
474 else
475 return 0;
469} 476}
470static inline long htb_hiwater(const struct htb_class *cl) 477static inline long htb_hiwater(const struct htb_class *cl)
471{ 478{
472 return cl->cmode == HTB_CAN_SEND ? -cl->buffer : 0; 479 if (htb_hysteresis)
480 return cl->cmode == HTB_CAN_SEND ? -cl->buffer : 0;
481 else
482 return 0;
473} 483}
474#else 484
475#define htb_lowater(cl) (0)
476#define htb_hiwater(cl) (0)
477#endif
478 485
479/** 486/**
480 * htb_class_mode - computes and returns current class mode 487 * htb_class_mode - computes and returns current class mode
@@ -1231,7 +1238,7 @@ static void htb_destroy_class(struct Qdisc *sch, struct htb_class *cl)
1231 qdisc_put_rtab(cl->rate); 1238 qdisc_put_rtab(cl->rate);
1232 qdisc_put_rtab(cl->ceil); 1239 qdisc_put_rtab(cl->ceil);
1233 1240
1234 tcf_destroy_chain(cl->filter_list); 1241 tcf_destroy_chain(&cl->filter_list);
1235 1242
1236 while (!list_empty(&cl->children)) 1243 while (!list_empty(&cl->children))
1237 htb_destroy_class(sch, list_entry(cl->children.next, 1244 htb_destroy_class(sch, list_entry(cl->children.next,
@@ -1260,7 +1267,7 @@ static void htb_destroy(struct Qdisc *sch)
1260 and surprisingly it worked in 2.4. But it must precede it 1267 and surprisingly it worked in 2.4. But it must precede it
1261 because filter need its target class alive to be able to call 1268 because filter need its target class alive to be able to call
1262 unbind_filter on it (without Oops). */ 1269 unbind_filter on it (without Oops). */
1263 tcf_destroy_chain(q->filter_list); 1270 tcf_destroy_chain(&q->filter_list);
1264 1271
1265 while (!list_empty(&q->root)) 1272 while (!list_empty(&q->root))
1266 htb_destroy_class(sch, list_entry(q->root.next, 1273 htb_destroy_class(sch, list_entry(q->root.next,
diff --git a/net/sched/sch_ingress.c b/net/sched/sch_ingress.c
index 274b1ddb160c..956c80ad5965 100644
--- a/net/sched/sch_ingress.c
+++ b/net/sched/sch_ingress.c
@@ -104,7 +104,7 @@ static void ingress_destroy(struct Qdisc *sch)
104{ 104{
105 struct ingress_qdisc_data *p = qdisc_priv(sch); 105 struct ingress_qdisc_data *p = qdisc_priv(sch);
106 106
107 tcf_destroy_chain(p->filter_list); 107 tcf_destroy_chain(&p->filter_list);
108} 108}
109 109
110static int ingress_dump(struct Qdisc *sch, struct sk_buff *skb) 110static int ingress_dump(struct Qdisc *sch, struct sk_buff *skb)
diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c
index 4aa2b45dad0a..5532f1031ab5 100644
--- a/net/sched/sch_prio.c
+++ b/net/sched/sch_prio.c
@@ -219,7 +219,7 @@ prio_destroy(struct Qdisc* sch)
219 int prio; 219 int prio;
220 struct prio_sched_data *q = qdisc_priv(sch); 220 struct prio_sched_data *q = qdisc_priv(sch);
221 221
222 tcf_destroy_chain(q->filter_list); 222 tcf_destroy_chain(&q->filter_list);
223 for (prio=0; prio<q->bands; prio++) 223 for (prio=0; prio<q->bands; prio++)
224 qdisc_destroy(q->queues[prio]); 224 qdisc_destroy(q->queues[prio]);
225} 225}
diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c
index 3dcd493f4f4a..5c569853b9c0 100644
--- a/net/sched/sch_red.c
+++ b/net/sched/sch_red.c
@@ -281,7 +281,8 @@ static int red_dump(struct Qdisc *sch, struct sk_buff *skb)
281 return nla_nest_end(skb, opts); 281 return nla_nest_end(skb, opts);
282 282
283nla_put_failure: 283nla_put_failure:
284 return nla_nest_cancel(skb, opts); 284 nla_nest_cancel(skb, opts);
285 return -EMSGSIZE;
285} 286}
286 287
287static int red_dump_stats(struct Qdisc *sch, struct gnet_dump *d) 288static int red_dump_stats(struct Qdisc *sch, struct gnet_dump *d)
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c
index f0463d757a98..6a97afbfb952 100644
--- a/net/sched/sch_sfq.c
+++ b/net/sched/sch_sfq.c
@@ -520,7 +520,7 @@ static void sfq_destroy(struct Qdisc *sch)
520{ 520{
521 struct sfq_sched_data *q = qdisc_priv(sch); 521 struct sfq_sched_data *q = qdisc_priv(sch);
522 522
523 tcf_destroy_chain(q->filter_list); 523 tcf_destroy_chain(&q->filter_list);
524 q->perturb_period = 0; 524 q->perturb_period = 0;
525 del_timer_sync(&q->perturb_timer); 525 del_timer_sync(&q->perturb_timer);
526} 526}
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index b4cd2b71953f..024c3ebd9661 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -474,6 +474,15 @@ static void sctp_association_destroy(struct sctp_association *asoc)
474void sctp_assoc_set_primary(struct sctp_association *asoc, 474void sctp_assoc_set_primary(struct sctp_association *asoc,
475 struct sctp_transport *transport) 475 struct sctp_transport *transport)
476{ 476{
477 int changeover = 0;
478
479 /* it's a changeover only if we already have a primary path
480 * that we are changing
481 */
482 if (asoc->peer.primary_path != NULL &&
483 asoc->peer.primary_path != transport)
484 changeover = 1 ;
485
477 asoc->peer.primary_path = transport; 486 asoc->peer.primary_path = transport;
478 487
479 /* Set a default msg_name for events. */ 488 /* Set a default msg_name for events. */
@@ -499,12 +508,12 @@ void sctp_assoc_set_primary(struct sctp_association *asoc,
499 * double switch to the same destination address. 508 * double switch to the same destination address.
500 */ 509 */
501 if (transport->cacc.changeover_active) 510 if (transport->cacc.changeover_active)
502 transport->cacc.cycling_changeover = 1; 511 transport->cacc.cycling_changeover = changeover;
503 512
504 /* 2) The sender MUST set CHANGEOVER_ACTIVE to indicate that 513 /* 2) The sender MUST set CHANGEOVER_ACTIVE to indicate that
505 * a changeover has occurred. 514 * a changeover has occurred.
506 */ 515 */
507 transport->cacc.changeover_active = 1; 516 transport->cacc.changeover_active = changeover;
508 517
509 /* 3) The sender MUST store the next TSN to be sent in 518 /* 3) The sender MUST store the next TSN to be sent in
510 * next_tsn_at_change. 519 * next_tsn_at_change.
@@ -1203,6 +1212,9 @@ void sctp_assoc_update_retran_path(struct sctp_association *asoc)
1203 struct list_head *head = &asoc->peer.transport_addr_list; 1212 struct list_head *head = &asoc->peer.transport_addr_list;
1204 struct list_head *pos; 1213 struct list_head *pos;
1205 1214
1215 if (asoc->peer.transport_count == 1)
1216 return;
1217
1206 /* Find the next transport in a round-robin fashion. */ 1218 /* Find the next transport in a round-robin fashion. */
1207 t = asoc->peer.retran_path; 1219 t = asoc->peer.retran_path;
1208 pos = &t->transports; 1220 pos = &t->transports;
@@ -1217,6 +1229,15 @@ void sctp_assoc_update_retran_path(struct sctp_association *asoc)
1217 1229
1218 t = list_entry(pos, struct sctp_transport, transports); 1230 t = list_entry(pos, struct sctp_transport, transports);
1219 1231
1232 /* We have exhausted the list, but didn't find any
1233 * other active transports. If so, use the next
1234 * transport.
1235 */
1236 if (t == asoc->peer.retran_path) {
1237 t = next;
1238 break;
1239 }
1240
1220 /* Try to find an active transport. */ 1241 /* Try to find an active transport. */
1221 1242
1222 if ((t->state == SCTP_ACTIVE) || 1243 if ((t->state == SCTP_ACTIVE) ||
@@ -1229,15 +1250,6 @@ void sctp_assoc_update_retran_path(struct sctp_association *asoc)
1229 if (!next) 1250 if (!next)
1230 next = t; 1251 next = t;
1231 } 1252 }
1232
1233 /* We have exhausted the list, but didn't find any
1234 * other active transports. If so, use the next
1235 * transport.
1236 */
1237 if (t == asoc->peer.retran_path) {
1238 t = next;
1239 break;
1240 }
1241 } 1253 }
1242 1254
1243 asoc->peer.retran_path = t; 1255 asoc->peer.retran_path = t;
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index e45e44c60635..a2f4d4d51593 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -299,7 +299,8 @@ static inline int sctp_v6_addr_match_len(union sctp_addr *s1,
299/* Fills in the source address(saddr) based on the destination address(daddr) 299/* Fills in the source address(saddr) based on the destination address(daddr)
300 * and asoc's bind address list. 300 * and asoc's bind address list.
301 */ 301 */
302static void sctp_v6_get_saddr(struct sctp_association *asoc, 302static void sctp_v6_get_saddr(struct sctp_sock *sk,
303 struct sctp_association *asoc,
303 struct dst_entry *dst, 304 struct dst_entry *dst,
304 union sctp_addr *daddr, 305 union sctp_addr *daddr,
305 union sctp_addr *saddr) 306 union sctp_addr *saddr)
@@ -318,7 +319,7 @@ static void sctp_v6_get_saddr(struct sctp_association *asoc,
318 if (!asoc) { 319 if (!asoc) {
319 ipv6_dev_get_saddr(dst ? ip6_dst_idev(dst)->dev : NULL, 320 ipv6_dev_get_saddr(dst ? ip6_dst_idev(dst)->dev : NULL,
320 &daddr->v6.sin6_addr, 321 &daddr->v6.sin6_addr,
321 inet6_sk(asoc->base.sk)->srcprefs, 322 inet6_sk(&sk->inet.sk)->srcprefs,
322 &saddr->v6.sin6_addr); 323 &saddr->v6.sin6_addr);
323 SCTP_DEBUG_PRINTK("saddr from ipv6_get_saddr: " NIP6_FMT "\n", 324 SCTP_DEBUG_PRINTK("saddr from ipv6_get_saddr: " NIP6_FMT "\n",
324 NIP6(saddr->v6.sin6_addr)); 325 NIP6(saddr->v6.sin6_addr));
@@ -726,6 +727,11 @@ static void sctp_v6_seq_dump_addr(struct seq_file *seq, union sctp_addr *addr)
726 seq_printf(seq, NIP6_FMT " ", NIP6(addr->v6.sin6_addr)); 727 seq_printf(seq, NIP6_FMT " ", NIP6(addr->v6.sin6_addr));
727} 728}
728 729
730static void sctp_v6_ecn_capable(struct sock *sk)
731{
732 inet6_sk(sk)->tclass |= INET_ECN_ECT_0;
733}
734
729/* Initialize a PF_INET6 socket msg_name. */ 735/* Initialize a PF_INET6 socket msg_name. */
730static void sctp_inet6_msgname(char *msgname, int *addr_len) 736static void sctp_inet6_msgname(char *msgname, int *addr_len)
731{ 737{
@@ -996,6 +1002,7 @@ static struct sctp_af sctp_af_inet6 = {
996 .skb_iif = sctp_v6_skb_iif, 1002 .skb_iif = sctp_v6_skb_iif,
997 .is_ce = sctp_v6_is_ce, 1003 .is_ce = sctp_v6_is_ce,
998 .seq_dump_addr = sctp_v6_seq_dump_addr, 1004 .seq_dump_addr = sctp_v6_seq_dump_addr,
1005 .ecn_capable = sctp_v6_ecn_capable,
999 .net_header_len = sizeof(struct ipv6hdr), 1006 .net_header_len = sizeof(struct ipv6hdr),
1000 .sockaddr_len = sizeof(struct sockaddr_in6), 1007 .sockaddr_len = sizeof(struct sockaddr_in6),
1001#ifdef CONFIG_COMPAT 1008#ifdef CONFIG_COMPAT
diff --git a/net/sctp/output.c b/net/sctp/output.c
index cf4f9fb6819d..6d45bae93b46 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -548,7 +548,7 @@ int sctp_packet_transmit(struct sctp_packet *packet)
548 * Note: The works for IPv6 layer checks this bit too later 548 * Note: The works for IPv6 layer checks this bit too later
549 * in transmission. See IP6_ECN_flow_xmit(). 549 * in transmission. See IP6_ECN_flow_xmit().
550 */ 550 */
551 INET_ECN_xmit(nskb->sk); 551 (*tp->af_specific->ecn_capable)(nskb->sk);
552 552
553 /* Set up the IP options. */ 553 /* Set up the IP options. */
554 /* BUG: not implemented 554 /* BUG: not implemented
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
index 59edfd25a19c..ace6770e9048 100644
--- a/net/sctp/outqueue.c
+++ b/net/sctp/outqueue.c
@@ -208,6 +208,7 @@ void sctp_outq_init(struct sctp_association *asoc, struct sctp_outq *q)
208 INIT_LIST_HEAD(&q->sacked); 208 INIT_LIST_HEAD(&q->sacked);
209 INIT_LIST_HEAD(&q->abandoned); 209 INIT_LIST_HEAD(&q->abandoned);
210 210
211 q->fast_rtx = 0;
211 q->outstanding_bytes = 0; 212 q->outstanding_bytes = 0;
212 q->empty = 1; 213 q->empty = 1;
213 q->cork = 0; 214 q->cork = 0;
@@ -500,6 +501,7 @@ void sctp_retransmit(struct sctp_outq *q, struct sctp_transport *transport,
500 case SCTP_RTXR_FAST_RTX: 501 case SCTP_RTXR_FAST_RTX:
501 SCTP_INC_STATS(SCTP_MIB_FAST_RETRANSMITS); 502 SCTP_INC_STATS(SCTP_MIB_FAST_RETRANSMITS);
502 sctp_transport_lower_cwnd(transport, SCTP_LOWER_CWND_FAST_RTX); 503 sctp_transport_lower_cwnd(transport, SCTP_LOWER_CWND_FAST_RTX);
504 q->fast_rtx = 1;
503 break; 505 break;
504 case SCTP_RTXR_PMTUD: 506 case SCTP_RTXR_PMTUD:
505 SCTP_INC_STATS(SCTP_MIB_PMTUD_RETRANSMITS); 507 SCTP_INC_STATS(SCTP_MIB_PMTUD_RETRANSMITS);
@@ -518,9 +520,15 @@ void sctp_retransmit(struct sctp_outq *q, struct sctp_transport *transport,
518 * the sender SHOULD try to advance the "Advanced.Peer.Ack.Point" by 520 * the sender SHOULD try to advance the "Advanced.Peer.Ack.Point" by
519 * following the procedures outlined in C1 - C5. 521 * following the procedures outlined in C1 - C5.
520 */ 522 */
521 sctp_generate_fwdtsn(q, q->asoc->ctsn_ack_point); 523 if (reason == SCTP_RTXR_T3_RTX)
524 sctp_generate_fwdtsn(q, q->asoc->ctsn_ack_point);
522 525
523 error = sctp_outq_flush(q, /* rtx_timeout */ 1); 526 /* Flush the queues only on timeout, since fast_rtx is only
527 * triggered during sack processing and the queue
528 * will be flushed at the end.
529 */
530 if (reason != SCTP_RTXR_FAST_RTX)
531 error = sctp_outq_flush(q, /* rtx_timeout */ 1);
524 532
525 if (error) 533 if (error)
526 q->asoc->base.sk->sk_err = -error; 534 q->asoc->base.sk->sk_err = -error;
@@ -538,17 +546,23 @@ static int sctp_outq_flush_rtx(struct sctp_outq *q, struct sctp_packet *pkt,
538 int rtx_timeout, int *start_timer) 546 int rtx_timeout, int *start_timer)
539{ 547{
540 struct list_head *lqueue; 548 struct list_head *lqueue;
541 struct list_head *lchunk;
542 struct sctp_transport *transport = pkt->transport; 549 struct sctp_transport *transport = pkt->transport;
543 sctp_xmit_t status; 550 sctp_xmit_t status;
544 struct sctp_chunk *chunk, *chunk1; 551 struct sctp_chunk *chunk, *chunk1;
545 struct sctp_association *asoc; 552 struct sctp_association *asoc;
553 int fast_rtx;
546 int error = 0; 554 int error = 0;
555 int timer = 0;
556 int done = 0;
547 557
548 asoc = q->asoc; 558 asoc = q->asoc;
549 lqueue = &q->retransmit; 559 lqueue = &q->retransmit;
560 fast_rtx = q->fast_rtx;
550 561
551 /* RFC 2960 6.3.3 Handle T3-rtx Expiration 562 /* This loop handles time-out retransmissions, fast retransmissions,
563 * and retransmissions due to opening of whindow.
564 *
565 * RFC 2960 6.3.3 Handle T3-rtx Expiration
552 * 566 *
553 * E3) Determine how many of the earliest (i.e., lowest TSN) 567 * E3) Determine how many of the earliest (i.e., lowest TSN)
554 * outstanding DATA chunks for the address for which the 568 * outstanding DATA chunks for the address for which the
@@ -563,12 +577,12 @@ static int sctp_outq_flush_rtx(struct sctp_outq *q, struct sctp_packet *pkt,
563 * [Just to be painfully clear, if we are retransmitting 577 * [Just to be painfully clear, if we are retransmitting
564 * because a timeout just happened, we should send only ONE 578 * because a timeout just happened, we should send only ONE
565 * packet of retransmitted data.] 579 * packet of retransmitted data.]
580 *
581 * For fast retransmissions we also send only ONE packet. However,
582 * if we are just flushing the queue due to open window, we'll
583 * try to send as much as possible.
566 */ 584 */
567 lchunk = sctp_list_dequeue(lqueue); 585 list_for_each_entry_safe(chunk, chunk1, lqueue, transmitted_list) {
568
569 while (lchunk) {
570 chunk = list_entry(lchunk, struct sctp_chunk,
571 transmitted_list);
572 586
573 /* Make sure that Gap Acked TSNs are not retransmitted. A 587 /* Make sure that Gap Acked TSNs are not retransmitted. A
574 * simple approach is just to move such TSNs out of the 588 * simple approach is just to move such TSNs out of the
@@ -576,58 +590,60 @@ static int sctp_outq_flush_rtx(struct sctp_outq *q, struct sctp_packet *pkt,
576 * next chunk. 590 * next chunk.
577 */ 591 */
578 if (chunk->tsn_gap_acked) { 592 if (chunk->tsn_gap_acked) {
579 list_add_tail(lchunk, &transport->transmitted); 593 list_del(&chunk->transmitted_list);
580 lchunk = sctp_list_dequeue(lqueue); 594 list_add_tail(&chunk->transmitted_list,
595 &transport->transmitted);
581 continue; 596 continue;
582 } 597 }
583 598
599 /* If we are doing fast retransmit, ignore non-fast_rtransmit
600 * chunks
601 */
602 if (fast_rtx && !chunk->fast_retransmit)
603 continue;
604
584 /* Attempt to append this chunk to the packet. */ 605 /* Attempt to append this chunk to the packet. */
585 status = sctp_packet_append_chunk(pkt, chunk); 606 status = sctp_packet_append_chunk(pkt, chunk);
586 607
587 switch (status) { 608 switch (status) {
588 case SCTP_XMIT_PMTU_FULL: 609 case SCTP_XMIT_PMTU_FULL:
589 /* Send this packet. */ 610 /* Send this packet. */
590 if ((error = sctp_packet_transmit(pkt)) == 0) 611 error = sctp_packet_transmit(pkt);
591 *start_timer = 1;
592 612
593 /* If we are retransmitting, we should only 613 /* If we are retransmitting, we should only
594 * send a single packet. 614 * send a single packet.
595 */ 615 */
596 if (rtx_timeout) { 616 if (rtx_timeout || fast_rtx)
597 list_add(lchunk, lqueue); 617 done = 1;
598 lchunk = NULL;
599 }
600 618
601 /* Bundle lchunk in the next round. */ 619 /* Bundle next chunk in the next round. */
602 break; 620 break;
603 621
604 case SCTP_XMIT_RWND_FULL: 622 case SCTP_XMIT_RWND_FULL:
605 /* Send this packet. */ 623 /* Send this packet. */
606 if ((error = sctp_packet_transmit(pkt)) == 0) 624 error = sctp_packet_transmit(pkt);
607 *start_timer = 1;
608 625
609 /* Stop sending DATA as there is no more room 626 /* Stop sending DATA as there is no more room
610 * at the receiver. 627 * at the receiver.
611 */ 628 */
612 list_add(lchunk, lqueue); 629 done = 1;
613 lchunk = NULL;
614 break; 630 break;
615 631
616 case SCTP_XMIT_NAGLE_DELAY: 632 case SCTP_XMIT_NAGLE_DELAY:
617 /* Send this packet. */ 633 /* Send this packet. */
618 if ((error = sctp_packet_transmit(pkt)) == 0) 634 error = sctp_packet_transmit(pkt);
619 *start_timer = 1;
620 635
621 /* Stop sending DATA because of nagle delay. */ 636 /* Stop sending DATA because of nagle delay. */
622 list_add(lchunk, lqueue); 637 done = 1;
623 lchunk = NULL;
624 break; 638 break;
625 639
626 default: 640 default:
627 /* The append was successful, so add this chunk to 641 /* The append was successful, so add this chunk to
628 * the transmitted list. 642 * the transmitted list.
629 */ 643 */
630 list_add_tail(lchunk, &transport->transmitted); 644 list_del(&chunk->transmitted_list);
645 list_add_tail(&chunk->transmitted_list,
646 &transport->transmitted);
631 647
632 /* Mark the chunk as ineligible for fast retransmit 648 /* Mark the chunk as ineligible for fast retransmit
633 * after it is retransmitted. 649 * after it is retransmitted.
@@ -635,27 +651,44 @@ static int sctp_outq_flush_rtx(struct sctp_outq *q, struct sctp_packet *pkt,
635 if (chunk->fast_retransmit > 0) 651 if (chunk->fast_retransmit > 0)
636 chunk->fast_retransmit = -1; 652 chunk->fast_retransmit = -1;
637 653
638 *start_timer = 1; 654 /* Force start T3-rtx timer when fast retransmitting
639 q->empty = 0; 655 * the earliest outstanding TSN
656 */
657 if (!timer && fast_rtx &&
658 ntohl(chunk->subh.data_hdr->tsn) ==
659 asoc->ctsn_ack_point + 1)
660 timer = 2;
640 661
641 /* Retrieve a new chunk to bundle. */ 662 q->empty = 0;
642 lchunk = sctp_list_dequeue(lqueue);
643 break; 663 break;
644 } 664 }
645 665
646 /* If we are here due to a retransmit timeout or a fast 666 /* Set the timer if there were no errors */
647 * retransmit and if there are any chunks left in the retransmit 667 if (!error && !timer)
648 * queue that could not fit in the PMTU sized packet, they need 668 timer = 1;
649 * to be marked as ineligible for a subsequent fast retransmit. 669
650 */ 670 if (done)
651 if (rtx_timeout && !lchunk) { 671 break;
652 list_for_each_entry(chunk1, lqueue, transmitted_list) { 672 }
653 if (chunk1->fast_retransmit > 0) 673
654 chunk1->fast_retransmit = -1; 674 /* If we are here due to a retransmit timeout or a fast
655 } 675 * retransmit and if there are any chunks left in the retransmit
676 * queue that could not fit in the PMTU sized packet, they need
677 * to be marked as ineligible for a subsequent fast retransmit.
678 */
679 if (rtx_timeout || fast_rtx) {
680 list_for_each_entry(chunk1, lqueue, transmitted_list) {
681 if (chunk1->fast_retransmit > 0)
682 chunk1->fast_retransmit = -1;
656 } 683 }
657 } 684 }
658 685
686 *start_timer = timer;
687
688 /* Clear fast retransmit hint */
689 if (fast_rtx)
690 q->fast_rtx = 0;
691
659 return error; 692 return error;
660} 693}
661 694
@@ -862,7 +895,8 @@ int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout)
862 rtx_timeout, &start_timer); 895 rtx_timeout, &start_timer);
863 896
864 if (start_timer) 897 if (start_timer)
865 sctp_transport_reset_timers(transport); 898 sctp_transport_reset_timers(transport,
899 start_timer-1);
866 900
867 /* This can happen on COOKIE-ECHO resend. Only 901 /* This can happen on COOKIE-ECHO resend. Only
868 * one chunk can get bundled with a COOKIE-ECHO. 902 * one chunk can get bundled with a COOKIE-ECHO.
@@ -977,7 +1011,7 @@ int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout)
977 list_add_tail(&chunk->transmitted_list, 1011 list_add_tail(&chunk->transmitted_list,
978 &transport->transmitted); 1012 &transport->transmitted);
979 1013
980 sctp_transport_reset_timers(transport); 1014 sctp_transport_reset_timers(transport, start_timer-1);
981 1015
982 q->empty = 0; 1016 q->empty = 0;
983 1017
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index 0ec234b762c2..9258dfe784ae 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -108,14 +108,23 @@ static __init int sctp_proc_init(void)
108 } 108 }
109 109
110 if (sctp_snmp_proc_init()) 110 if (sctp_snmp_proc_init())
111 goto out_nomem; 111 goto out_snmp_proc_init;
112 if (sctp_eps_proc_init()) 112 if (sctp_eps_proc_init())
113 goto out_nomem; 113 goto out_eps_proc_init;
114 if (sctp_assocs_proc_init()) 114 if (sctp_assocs_proc_init())
115 goto out_nomem; 115 goto out_assocs_proc_init;
116 116
117 return 0; 117 return 0;
118 118
119out_assocs_proc_init:
120 sctp_eps_proc_exit();
121out_eps_proc_init:
122 sctp_snmp_proc_exit();
123out_snmp_proc_init:
124 if (proc_net_sctp) {
125 proc_net_sctp = NULL;
126 remove_proc_entry("sctp", init_net.proc_net);
127 }
119out_nomem: 128out_nomem:
120 return -ENOMEM; 129 return -ENOMEM;
121} 130}
@@ -470,11 +479,11 @@ static struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc,
470 /* Walk through the bind address list and look for a bind 479 /* Walk through the bind address list and look for a bind
471 * address that matches the source address of the returned dst. 480 * address that matches the source address of the returned dst.
472 */ 481 */
482 sctp_v4_dst_saddr(&dst_saddr, dst, htons(bp->port));
473 rcu_read_lock(); 483 rcu_read_lock();
474 list_for_each_entry_rcu(laddr, &bp->address_list, list) { 484 list_for_each_entry_rcu(laddr, &bp->address_list, list) {
475 if (!laddr->valid || (laddr->state != SCTP_ADDR_SRC)) 485 if (!laddr->valid || (laddr->state != SCTP_ADDR_SRC))
476 continue; 486 continue;
477 sctp_v4_dst_saddr(&dst_saddr, dst, htons(bp->port));
478 if (sctp_v4_cmp_addr(&dst_saddr, &laddr->a)) 487 if (sctp_v4_cmp_addr(&dst_saddr, &laddr->a))
479 goto out_unlock; 488 goto out_unlock;
480 } 489 }
@@ -519,7 +528,8 @@ out:
519/* For v4, the source address is cached in the route entry(dst). So no need 528/* For v4, the source address is cached in the route entry(dst). So no need
520 * to cache it separately and hence this is an empty routine. 529 * to cache it separately and hence this is an empty routine.
521 */ 530 */
522static void sctp_v4_get_saddr(struct sctp_association *asoc, 531static void sctp_v4_get_saddr(struct sctp_sock *sk,
532 struct sctp_association *asoc,
523 struct dst_entry *dst, 533 struct dst_entry *dst,
524 union sctp_addr *daddr, 534 union sctp_addr *daddr,
525 union sctp_addr *saddr) 535 union sctp_addr *saddr)
@@ -616,6 +626,11 @@ static void sctp_v4_seq_dump_addr(struct seq_file *seq, union sctp_addr *addr)
616 seq_printf(seq, "%d.%d.%d.%d ", NIPQUAD(addr->v4.sin_addr)); 626 seq_printf(seq, "%d.%d.%d.%d ", NIPQUAD(addr->v4.sin_addr));
617} 627}
618 628
629static void sctp_v4_ecn_capable(struct sock *sk)
630{
631 INET_ECN_xmit(sk);
632}
633
619/* Event handler for inet address addition/deletion events. 634/* Event handler for inet address addition/deletion events.
620 * The sctp_local_addr_list needs to be protocted by a spin lock since 635 * The sctp_local_addr_list needs to be protocted by a spin lock since
621 * multiple notifiers (say IPv4 and IPv6) may be running at the same 636 * multiple notifiers (say IPv4 and IPv6) may be running at the same
@@ -934,6 +949,7 @@ static struct sctp_af sctp_af_inet = {
934 .skb_iif = sctp_v4_skb_iif, 949 .skb_iif = sctp_v4_skb_iif,
935 .is_ce = sctp_v4_is_ce, 950 .is_ce = sctp_v4_is_ce,
936 .seq_dump_addr = sctp_v4_seq_dump_addr, 951 .seq_dump_addr = sctp_v4_seq_dump_addr,
952 .ecn_capable = sctp_v4_ecn_capable,
937 .net_header_len = sizeof(struct iphdr), 953 .net_header_len = sizeof(struct iphdr),
938 .sockaddr_len = sizeof(struct sockaddr_in), 954 .sockaddr_len = sizeof(struct sockaddr_in),
939#ifdef CONFIG_COMPAT 955#ifdef CONFIG_COMPAT
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index e7e3baf7009e..0dbcde6758ea 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -4401,7 +4401,9 @@ static int sctp_getsockopt_local_addrs_old(struct sock *sk, int len,
4401 if (copy_from_user(&getaddrs, optval, len)) 4401 if (copy_from_user(&getaddrs, optval, len))
4402 return -EFAULT; 4402 return -EFAULT;
4403 4403
4404 if (getaddrs.addr_num <= 0) return -EINVAL; 4404 if (getaddrs.addr_num <= 0 ||
4405 getaddrs.addr_num >= (INT_MAX / sizeof(union sctp_addr)))
4406 return -EINVAL;
4405 /* 4407 /*
4406 * For UDP-style sockets, id specifies the association to query. 4408 * For UDP-style sockets, id specifies the association to query.
4407 * If the id field is set to the value '0' then the locally bound 4409 * If the id field is set to the value '0' then the locally bound
diff --git a/net/sctp/transport.c b/net/sctp/transport.c
index f4938f6c5abe..3f34f61221ec 100644
--- a/net/sctp/transport.c
+++ b/net/sctp/transport.c
@@ -79,6 +79,7 @@ static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer,
79 peer->rttvar = 0; 79 peer->rttvar = 0;
80 peer->srtt = 0; 80 peer->srtt = 0;
81 peer->rto_pending = 0; 81 peer->rto_pending = 0;
82 peer->fast_recovery = 0;
82 83
83 peer->last_time_heard = jiffies; 84 peer->last_time_heard = jiffies;
84 peer->last_time_used = jiffies; 85 peer->last_time_used = jiffies;
@@ -190,7 +191,7 @@ static void sctp_transport_destroy(struct sctp_transport *transport)
190/* Start T3_rtx timer if it is not already running and update the heartbeat 191/* Start T3_rtx timer if it is not already running and update the heartbeat
191 * timer. This routine is called every time a DATA chunk is sent. 192 * timer. This routine is called every time a DATA chunk is sent.
192 */ 193 */
193void sctp_transport_reset_timers(struct sctp_transport *transport) 194void sctp_transport_reset_timers(struct sctp_transport *transport, int force)
194{ 195{
195 /* RFC 2960 6.3.2 Retransmission Timer Rules 196 /* RFC 2960 6.3.2 Retransmission Timer Rules
196 * 197 *
@@ -200,7 +201,7 @@ void sctp_transport_reset_timers(struct sctp_transport *transport)
200 * address. 201 * address.
201 */ 202 */
202 203
203 if (!timer_pending(&transport->T3_rtx_timer)) 204 if (force || !timer_pending(&transport->T3_rtx_timer))
204 if (!mod_timer(&transport->T3_rtx_timer, 205 if (!mod_timer(&transport->T3_rtx_timer,
205 jiffies + transport->rto)) 206 jiffies + transport->rto))
206 sctp_transport_hold(transport); 207 sctp_transport_hold(transport);
@@ -291,7 +292,7 @@ void sctp_transport_route(struct sctp_transport *transport,
291 if (saddr) 292 if (saddr)
292 memcpy(&transport->saddr, saddr, sizeof(union sctp_addr)); 293 memcpy(&transport->saddr, saddr, sizeof(union sctp_addr));
293 else 294 else
294 af->get_saddr(asoc, dst, daddr, &transport->saddr); 295 af->get_saddr(opt, asoc, dst, daddr, &transport->saddr);
295 296
296 transport->dst = dst; 297 transport->dst = dst;
297 if ((transport->param_flags & SPP_PMTUD_DISABLE) && transport->pathmtu) { 298 if ((transport->param_flags & SPP_PMTUD_DISABLE) && transport->pathmtu) {
@@ -403,11 +404,16 @@ void sctp_transport_raise_cwnd(struct sctp_transport *transport,
403 cwnd = transport->cwnd; 404 cwnd = transport->cwnd;
404 flight_size = transport->flight_size; 405 flight_size = transport->flight_size;
405 406
407 /* See if we need to exit Fast Recovery first */
408 if (transport->fast_recovery &&
409 TSN_lte(transport->fast_recovery_exit, sack_ctsn))
410 transport->fast_recovery = 0;
411
406 /* The appropriate cwnd increase algorithm is performed if, and only 412 /* The appropriate cwnd increase algorithm is performed if, and only
407 * if the cumulative TSN has advanced and the congestion window is 413 * if the cumulative TSN whould advanced and the congestion window is
408 * being fully utilized. 414 * being fully utilized.
409 */ 415 */
410 if ((transport->asoc->ctsn_ack_point >= sack_ctsn) || 416 if (TSN_lte(sack_ctsn, transport->asoc->ctsn_ack_point) ||
411 (flight_size < cwnd)) 417 (flight_size < cwnd))
412 return; 418 return;
413 419
@@ -416,17 +422,23 @@ void sctp_transport_raise_cwnd(struct sctp_transport *transport,
416 pmtu = transport->asoc->pathmtu; 422 pmtu = transport->asoc->pathmtu;
417 423
418 if (cwnd <= ssthresh) { 424 if (cwnd <= ssthresh) {
419 /* RFC 2960 7.2.1, sctpimpguide-05 2.14.2 When cwnd is less 425 /* RFC 4960 7.2.1
420 * than or equal to ssthresh an SCTP endpoint MUST use the 426 * o When cwnd is less than or equal to ssthresh, an SCTP
421 * slow start algorithm to increase cwnd only if the current 427 * endpoint MUST use the slow-start algorithm to increase
422 * congestion window is being fully utilized and an incoming 428 * cwnd only if the current congestion window is being fully
423 * SACK advances the Cumulative TSN Ack Point. Only when these 429 * utilized, an incoming SACK advances the Cumulative TSN
424 * two conditions are met can the cwnd be increased otherwise 430 * Ack Point, and the data sender is not in Fast Recovery.
425 * the cwnd MUST not be increased. If these conditions are met 431 * Only when these three conditions are met can the cwnd be
426 * then cwnd MUST be increased by at most the lesser of 432 * increased; otherwise, the cwnd MUST not be increased.
427 * 1) the total size of the previously outstanding DATA 433 * If these conditions are met, then cwnd MUST be increased
428 * chunk(s) acknowledged, and 2) the destination's path MTU. 434 * by, at most, the lesser of 1) the total size of the
435 * previously outstanding DATA chunk(s) acknowledged, and
436 * 2) the destination's path MTU. This upper bound protects
437 * against the ACK-Splitting attack outlined in [SAVAGE99].
429 */ 438 */
439 if (transport->fast_recovery)
440 return;
441
430 if (bytes_acked > pmtu) 442 if (bytes_acked > pmtu)
431 cwnd += pmtu; 443 cwnd += pmtu;
432 else 444 else
@@ -502,6 +514,13 @@ void sctp_transport_lower_cwnd(struct sctp_transport *transport,
502 * cwnd = ssthresh 514 * cwnd = ssthresh
503 * partial_bytes_acked = 0 515 * partial_bytes_acked = 0
504 */ 516 */
517 if (transport->fast_recovery)
518 return;
519
520 /* Mark Fast recovery */
521 transport->fast_recovery = 1;
522 transport->fast_recovery_exit = transport->asoc->next_tsn - 1;
523
505 transport->ssthresh = max(transport->cwnd/2, 524 transport->ssthresh = max(transport->cwnd/2,
506 4*transport->asoc->pathmtu); 525 4*transport->asoc->pathmtu);
507 transport->cwnd = transport->ssthresh; 526 transport->cwnd = transport->ssthresh;
@@ -586,6 +605,7 @@ void sctp_transport_reset(struct sctp_transport *t)
586 t->flight_size = 0; 605 t->flight_size = 0;
587 t->error_count = 0; 606 t->error_count = 0;
588 t->rto_pending = 0; 607 t->rto_pending = 0;
608 t->fast_recovery = 0;
589 609
590 /* Initialize the state information for SFR-CACC */ 610 /* Initialize the state information for SFR-CACC */
591 t->cacc.changeover_active = 0; 611 t->cacc.changeover_active = 0;
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c
index 5905d56737d6..81ae3d62a0cc 100644
--- a/net/sunrpc/auth_gss/svcauth_gss.c
+++ b/net/sunrpc/auth_gss/svcauth_gss.c
@@ -1144,20 +1144,20 @@ svcauth_gss_accept(struct svc_rqst *rqstp, __be32 *authp)
1144 case RPC_GSS_SVC_NONE: 1144 case RPC_GSS_SVC_NONE:
1145 break; 1145 break;
1146 case RPC_GSS_SVC_INTEGRITY: 1146 case RPC_GSS_SVC_INTEGRITY:
1147 /* placeholders for length and seq. number: */
1148 svc_putnl(resv, 0);
1149 svc_putnl(resv, 0);
1147 if (unwrap_integ_data(&rqstp->rq_arg, 1150 if (unwrap_integ_data(&rqstp->rq_arg,
1148 gc->gc_seq, rsci->mechctx)) 1151 gc->gc_seq, rsci->mechctx))
1149 goto garbage_args; 1152 goto garbage_args;
1153 break;
1154 case RPC_GSS_SVC_PRIVACY:
1150 /* placeholders for length and seq. number: */ 1155 /* placeholders for length and seq. number: */
1151 svc_putnl(resv, 0); 1156 svc_putnl(resv, 0);
1152 svc_putnl(resv, 0); 1157 svc_putnl(resv, 0);
1153 break;
1154 case RPC_GSS_SVC_PRIVACY:
1155 if (unwrap_priv_data(rqstp, &rqstp->rq_arg, 1158 if (unwrap_priv_data(rqstp, &rqstp->rq_arg,
1156 gc->gc_seq, rsci->mechctx)) 1159 gc->gc_seq, rsci->mechctx))
1157 goto garbage_args; 1160 goto garbage_args;
1158 /* placeholders for length and seq. number: */
1159 svc_putnl(resv, 0);
1160 svc_putnl(resv, 0);
1161 break; 1161 break;
1162 default: 1162 default:
1163 goto auth_err; 1163 goto auth_err;
@@ -1170,8 +1170,6 @@ svcauth_gss_accept(struct svc_rqst *rqstp, __be32 *authp)
1170 goto out; 1170 goto out;
1171 } 1171 }
1172garbage_args: 1172garbage_args:
1173 /* Restore write pointer to its original value: */
1174 xdr_ressize_check(rqstp, reject_stat);
1175 ret = SVC_GARBAGE; 1173 ret = SVC_GARBAGE;
1176 goto out; 1174 goto out;
1177auth_err: 1175auth_err:
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
index d8e8d79a8451..e46c825f4954 100644
--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@ -6,30 +6,9 @@
6 6
7#include <linux/sched.h> 7#include <linux/sched.h>
8#include <linux/errno.h> 8#include <linux/errno.h>
9#include <linux/fcntl.h>
10#include <linux/net.h>
11#include <linux/in.h>
12#include <linux/inet.h>
13#include <linux/udp.h>
14#include <linux/tcp.h>
15#include <linux/unistd.h>
16#include <linux/slab.h>
17#include <linux/netdevice.h>
18#include <linux/skbuff.h>
19#include <linux/file.h>
20#include <linux/freezer.h> 9#include <linux/freezer.h>
21#include <linux/kthread.h> 10#include <linux/kthread.h>
22#include <net/sock.h> 11#include <net/sock.h>
23#include <net/checksum.h>
24#include <net/ip.h>
25#include <net/ipv6.h>
26#include <net/tcp_states.h>
27#include <linux/uaccess.h>
28#include <asm/ioctls.h>
29
30#include <linux/sunrpc/types.h>
31#include <linux/sunrpc/clnt.h>
32#include <linux/sunrpc/xdr.h>
33#include <linux/sunrpc/stats.h> 12#include <linux/sunrpc/stats.h>
34#include <linux/sunrpc/svc_xprt.h> 13#include <linux/sunrpc/svc_xprt.h>
35 14
@@ -296,8 +275,6 @@ void svc_xprt_enqueue(struct svc_xprt *xprt)
296 if (!(xprt->xpt_flags & 275 if (!(xprt->xpt_flags &
297 ((1<<XPT_CONN)|(1<<XPT_DATA)|(1<<XPT_CLOSE)|(1<<XPT_DEFERRED)))) 276 ((1<<XPT_CONN)|(1<<XPT_DATA)|(1<<XPT_CLOSE)|(1<<XPT_DEFERRED))))
298 return; 277 return;
299 if (test_bit(XPT_DEAD, &xprt->xpt_flags))
300 return;
301 278
302 cpu = get_cpu(); 279 cpu = get_cpu();
303 pool = svc_pool_for_cpu(xprt->xpt_server, cpu); 280 pool = svc_pool_for_cpu(xprt->xpt_server, cpu);
diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c
index 3f30ee6006ae..f24800f2c098 100644
--- a/net/sunrpc/svcauth_unix.c
+++ b/net/sunrpc/svcauth_unix.c
@@ -278,7 +278,7 @@ static int ip_map_show(struct seq_file *m,
278 dom = im->m_client->h.name; 278 dom = im->m_client->h.name;
279 279
280 if (ipv6_addr_v4mapped(&addr)) { 280 if (ipv6_addr_v4mapped(&addr)) {
281 seq_printf(m, "%s" NIPQUAD_FMT "%s\n", 281 seq_printf(m, "%s " NIPQUAD_FMT " %s\n",
282 im->m_class, 282 im->m_class,
283 ntohl(addr.s6_addr32[3]) >> 24 & 0xff, 283 ntohl(addr.s6_addr32[3]) >> 24 & 0xff,
284 ntohl(addr.s6_addr32[3]) >> 16 & 0xff, 284 ntohl(addr.s6_addr32[3]) >> 16 & 0xff,
@@ -286,7 +286,7 @@ static int ip_map_show(struct seq_file *m,
286 ntohl(addr.s6_addr32[3]) >> 0 & 0xff, 286 ntohl(addr.s6_addr32[3]) >> 0 & 0xff,
287 dom); 287 dom);
288 } else { 288 } else {
289 seq_printf(m, "%s" NIP6_FMT "%s\n", 289 seq_printf(m, "%s " NIP6_FMT " %s\n",
290 im->m_class, NIP6(addr), dom); 290 im->m_class, NIP6(addr), dom);
291 } 291 }
292 return 0; 292 return 0;
diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
index c22d6b6f2db4..06ab4841537b 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
@@ -260,11 +260,16 @@ static int rdma_read_max_sge(struct svcxprt_rdma *xprt, int sge_count)
260 * On our side, we need to read into a pagelist. The first page immediately 260 * On our side, we need to read into a pagelist. The first page immediately
261 * follows the RPC header. 261 * follows the RPC header.
262 * 262 *
263 * This function returns 1 to indicate success. The data is not yet in 263 * This function returns:
264 * 0 - No error and no read-list found.
265 *
266 * 1 - Successful read-list processing. The data is not yet in
264 * the pagelist and therefore the RPC request must be deferred. The 267 * the pagelist and therefore the RPC request must be deferred. The
265 * I/O completion will enqueue the transport again and 268 * I/O completion will enqueue the transport again and
266 * svc_rdma_recvfrom will complete the request. 269 * svc_rdma_recvfrom will complete the request.
267 * 270 *
271 * <0 - Error processing/posting read-list.
272 *
268 * NOTE: The ctxt must not be touched after the last WR has been posted 273 * NOTE: The ctxt must not be touched after the last WR has been posted
269 * because the I/O completion processing may occur on another 274 * because the I/O completion processing may occur on another
270 * processor and free / modify the context. Ne touche pas! 275 * processor and free / modify the context. Ne touche pas!
@@ -284,7 +289,6 @@ static int rdma_read_xdr(struct svcxprt_rdma *xprt,
284 u64 sgl_offset; 289 u64 sgl_offset;
285 struct rpcrdma_read_chunk *ch; 290 struct rpcrdma_read_chunk *ch;
286 struct svc_rdma_op_ctxt *ctxt = NULL; 291 struct svc_rdma_op_ctxt *ctxt = NULL;
287 struct svc_rdma_op_ctxt *head;
288 struct svc_rdma_op_ctxt *tmp_sge_ctxt; 292 struct svc_rdma_op_ctxt *tmp_sge_ctxt;
289 struct svc_rdma_op_ctxt *tmp_ch_ctxt; 293 struct svc_rdma_op_ctxt *tmp_ch_ctxt;
290 struct chunk_sge *ch_sge_ary; 294 struct chunk_sge *ch_sge_ary;
@@ -302,25 +306,19 @@ static int rdma_read_xdr(struct svcxprt_rdma *xprt,
302 ch_sge_ary = (struct chunk_sge *)tmp_ch_ctxt->sge; 306 ch_sge_ary = (struct chunk_sge *)tmp_ch_ctxt->sge;
303 307
304 svc_rdma_rcl_chunk_counts(ch, &ch_count, &byte_count); 308 svc_rdma_rcl_chunk_counts(ch, &ch_count, &byte_count);
309 if (ch_count > RPCSVC_MAXPAGES)
310 return -EINVAL;
305 sge_count = rdma_rcl_to_sge(xprt, rqstp, hdr_ctxt, rmsgp, 311 sge_count = rdma_rcl_to_sge(xprt, rqstp, hdr_ctxt, rmsgp,
306 sge, ch_sge_ary, 312 sge, ch_sge_ary,
307 ch_count, byte_count); 313 ch_count, byte_count);
308 head = svc_rdma_get_context(xprt);
309 sgl_offset = 0; 314 sgl_offset = 0;
310 ch_no = 0; 315 ch_no = 0;
311 316
312 for (ch = (struct rpcrdma_read_chunk *)&rmsgp->rm_body.rm_chunks[0]; 317 for (ch = (struct rpcrdma_read_chunk *)&rmsgp->rm_body.rm_chunks[0];
313 ch->rc_discrim != 0; ch++, ch_no++) { 318 ch->rc_discrim != 0; ch++, ch_no++) {
314next_sge: 319next_sge:
315 if (!ctxt) 320 ctxt = svc_rdma_get_context(xprt);
316 ctxt = head;
317 else {
318 ctxt->next = svc_rdma_get_context(xprt);
319 ctxt = ctxt->next;
320 }
321 ctxt->next = NULL;
322 ctxt->direction = DMA_FROM_DEVICE; 321 ctxt->direction = DMA_FROM_DEVICE;
323 clear_bit(RDMACTXT_F_READ_DONE, &ctxt->flags);
324 clear_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags); 322 clear_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags);
325 323
326 /* Prepare READ WR */ 324 /* Prepare READ WR */
@@ -347,20 +345,15 @@ next_sge:
347 * the client and the RPC needs to be enqueued. 345 * the client and the RPC needs to be enqueued.
348 */ 346 */
349 set_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags); 347 set_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags);
350 ctxt->next = hdr_ctxt; 348 ctxt->read_hdr = hdr_ctxt;
351 hdr_ctxt->next = head;
352 } 349 }
353 /* Post the read */ 350 /* Post the read */
354 err = svc_rdma_send(xprt, &read_wr); 351 err = svc_rdma_send(xprt, &read_wr);
355 if (err) { 352 if (err) {
356 printk(KERN_ERR "svcrdma: Error posting send = %d\n", 353 printk(KERN_ERR "svcrdma: Error %d posting RDMA_READ\n",
357 err); 354 err);
358 /* 355 set_bit(XPT_CLOSE, &xprt->sc_xprt.xpt_flags);
359 * Break the circular list so free knows when 356 svc_rdma_put_context(ctxt, 0);
360 * to stop if the error happened to occur on
361 * the last read
362 */
363 ctxt->next = NULL;
364 goto out; 357 goto out;
365 } 358 }
366 atomic_inc(&rdma_stat_read); 359 atomic_inc(&rdma_stat_read);
@@ -371,7 +364,7 @@ next_sge:
371 goto next_sge; 364 goto next_sge;
372 } 365 }
373 sgl_offset = 0; 366 sgl_offset = 0;
374 err = 0; 367 err = 1;
375 } 368 }
376 369
377 out: 370 out:
@@ -389,25 +382,12 @@ next_sge:
389 while (rqstp->rq_resused) 382 while (rqstp->rq_resused)
390 rqstp->rq_respages[--rqstp->rq_resused] = NULL; 383 rqstp->rq_respages[--rqstp->rq_resused] = NULL;
391 384
392 if (err) { 385 return err;
393 printk(KERN_ERR "svcrdma : RDMA_READ error = %d\n", err);
394 set_bit(XPT_CLOSE, &xprt->sc_xprt.xpt_flags);
395 /* Free the linked list of read contexts */
396 while (head != NULL) {
397 ctxt = head->next;
398 svc_rdma_put_context(head, 1);
399 head = ctxt;
400 }
401 return 0;
402 }
403
404 return 1;
405} 386}
406 387
407static int rdma_read_complete(struct svc_rqst *rqstp, 388static int rdma_read_complete(struct svc_rqst *rqstp,
408 struct svc_rdma_op_ctxt *data) 389 struct svc_rdma_op_ctxt *head)
409{ 390{
410 struct svc_rdma_op_ctxt *head = data->next;
411 int page_no; 391 int page_no;
412 int ret; 392 int ret;
413 393
@@ -433,21 +413,12 @@ static int rdma_read_complete(struct svc_rqst *rqstp,
433 rqstp->rq_arg.len = head->arg.len; 413 rqstp->rq_arg.len = head->arg.len;
434 rqstp->rq_arg.buflen = head->arg.buflen; 414 rqstp->rq_arg.buflen = head->arg.buflen;
435 415
416 /* Free the context */
417 svc_rdma_put_context(head, 0);
418
436 /* XXX: What should this be? */ 419 /* XXX: What should this be? */
437 rqstp->rq_prot = IPPROTO_MAX; 420 rqstp->rq_prot = IPPROTO_MAX;
438 421 svc_xprt_copy_addrs(rqstp, rqstp->rq_xprt);
439 /*
440 * Free the contexts we used to build the RDMA_READ. We have
441 * to be careful here because the context list uses the same
442 * next pointer used to chain the contexts associated with the
443 * RDMA_READ
444 */
445 data->next = NULL; /* terminate circular list */
446 do {
447 data = head->next;
448 svc_rdma_put_context(head, 0);
449 head = data;
450 } while (head != NULL);
451 422
452 ret = rqstp->rq_arg.head[0].iov_len 423 ret = rqstp->rq_arg.head[0].iov_len
453 + rqstp->rq_arg.page_len 424 + rqstp->rq_arg.page_len
@@ -457,8 +428,6 @@ static int rdma_read_complete(struct svc_rqst *rqstp,
457 ret, rqstp->rq_arg.len, rqstp->rq_arg.head[0].iov_base, 428 ret, rqstp->rq_arg.len, rqstp->rq_arg.head[0].iov_base,
458 rqstp->rq_arg.head[0].iov_len); 429 rqstp->rq_arg.head[0].iov_len);
459 430
460 /* Indicate that we've consumed an RQ credit */
461 rqstp->rq_xprt_ctxt = rqstp->rq_xprt;
462 svc_xprt_received(rqstp->rq_xprt); 431 svc_xprt_received(rqstp->rq_xprt);
463 return ret; 432 return ret;
464} 433}
@@ -480,13 +449,6 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp)
480 449
481 dprintk("svcrdma: rqstp=%p\n", rqstp); 450 dprintk("svcrdma: rqstp=%p\n", rqstp);
482 451
483 /*
484 * The rq_xprt_ctxt indicates if we've consumed an RQ credit
485 * or not. It is used in the rdma xpo_release_rqst function to
486 * determine whether or not to return an RQ WQE to the RQ.
487 */
488 rqstp->rq_xprt_ctxt = NULL;
489
490 spin_lock_bh(&rdma_xprt->sc_read_complete_lock); 452 spin_lock_bh(&rdma_xprt->sc_read_complete_lock);
491 if (!list_empty(&rdma_xprt->sc_read_complete_q)) { 453 if (!list_empty(&rdma_xprt->sc_read_complete_q)) {
492 ctxt = list_entry(rdma_xprt->sc_read_complete_q.next, 454 ctxt = list_entry(rdma_xprt->sc_read_complete_q.next,
@@ -537,21 +499,22 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp)
537 /* If the request is invalid, reply with an error */ 499 /* If the request is invalid, reply with an error */
538 if (len < 0) { 500 if (len < 0) {
539 if (len == -ENOSYS) 501 if (len == -ENOSYS)
540 (void)svc_rdma_send_error(rdma_xprt, rmsgp, ERR_VERS); 502 svc_rdma_send_error(rdma_xprt, rmsgp, ERR_VERS);
541 goto close_out; 503 goto close_out;
542 } 504 }
543 505
544 /* Read read-list data. If we would need to wait, defer 506 /* Read read-list data. */
545 * it. Not that in this case, we don't return the RQ credit 507 ret = rdma_read_xdr(rdma_xprt, rmsgp, rqstp, ctxt);
546 * until after the read completes. 508 if (ret > 0) {
547 */ 509 /* read-list posted, defer until data received from client. */
548 if (rdma_read_xdr(rdma_xprt, rmsgp, rqstp, ctxt)) {
549 svc_xprt_received(xprt); 510 svc_xprt_received(xprt);
550 return 0; 511 return 0;
551 } 512 }
552 513 if (ret < 0) {
553 /* Indicate we've consumed an RQ credit */ 514 /* Post of read-list failed, free context. */
554 rqstp->rq_xprt_ctxt = rqstp->rq_xprt; 515 svc_rdma_put_context(ctxt, 1);
516 return 0;
517 }
555 518
556 ret = rqstp->rq_arg.head[0].iov_len 519 ret = rqstp->rq_arg.head[0].iov_len
557 + rqstp->rq_arg.page_len 520 + rqstp->rq_arg.page_len
@@ -569,11 +532,8 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp)
569 return ret; 532 return ret;
570 533
571 close_out: 534 close_out:
572 if (ctxt) { 535 if (ctxt)
573 svc_rdma_put_context(ctxt, 1); 536 svc_rdma_put_context(ctxt, 1);
574 /* Indicate we've consumed an RQ credit */
575 rqstp->rq_xprt_ctxt = rqstp->rq_xprt;
576 }
577 dprintk("svcrdma: transport %p is closing\n", xprt); 537 dprintk("svcrdma: transport %p is closing\n", xprt);
578 /* 538 /*
579 * Set the close bit and enqueue it. svc_recv will see the 539 * Set the close bit and enqueue it. svc_recv will see the
diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
index 981f190c1b39..fb82b1b683f8 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
@@ -389,6 +389,17 @@ static int send_reply(struct svcxprt_rdma *rdma,
389 int page_no; 389 int page_no;
390 int ret; 390 int ret;
391 391
392 /* Post a recv buffer to handle another request. */
393 ret = svc_rdma_post_recv(rdma);
394 if (ret) {
395 printk(KERN_INFO
396 "svcrdma: could not post a receive buffer, err=%d."
397 "Closing transport %p.\n", ret, rdma);
398 set_bit(XPT_CLOSE, &rdma->sc_xprt.xpt_flags);
399 svc_rdma_put_context(ctxt, 0);
400 return -ENOTCONN;
401 }
402
392 /* Prepare the context */ 403 /* Prepare the context */
393 ctxt->pages[0] = page; 404 ctxt->pages[0] = page;
394 ctxt->count = 1; 405 ctxt->count = 1;
diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
index af408fc12634..e132509d1db0 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
@@ -103,8 +103,8 @@ static int rdma_bump_context_cache(struct svcxprt_rdma *xprt)
103 spin_lock_bh(&xprt->sc_ctxt_lock); 103 spin_lock_bh(&xprt->sc_ctxt_lock);
104 if (ctxt) { 104 if (ctxt) {
105 at_least_one = 1; 105 at_least_one = 1;
106 ctxt->next = xprt->sc_ctxt_head; 106 INIT_LIST_HEAD(&ctxt->free_list);
107 xprt->sc_ctxt_head = ctxt; 107 list_add(&ctxt->free_list, &xprt->sc_ctxt_free);
108 } else { 108 } else {
109 /* kmalloc failed...give up for now */ 109 /* kmalloc failed...give up for now */
110 xprt->sc_ctxt_cnt--; 110 xprt->sc_ctxt_cnt--;
@@ -123,7 +123,7 @@ struct svc_rdma_op_ctxt *svc_rdma_get_context(struct svcxprt_rdma *xprt)
123 123
124 while (1) { 124 while (1) {
125 spin_lock_bh(&xprt->sc_ctxt_lock); 125 spin_lock_bh(&xprt->sc_ctxt_lock);
126 if (unlikely(xprt->sc_ctxt_head == NULL)) { 126 if (unlikely(list_empty(&xprt->sc_ctxt_free))) {
127 /* Try to bump my cache. */ 127 /* Try to bump my cache. */
128 spin_unlock_bh(&xprt->sc_ctxt_lock); 128 spin_unlock_bh(&xprt->sc_ctxt_lock);
129 129
@@ -136,12 +136,15 @@ struct svc_rdma_op_ctxt *svc_rdma_get_context(struct svcxprt_rdma *xprt)
136 schedule_timeout_uninterruptible(msecs_to_jiffies(500)); 136 schedule_timeout_uninterruptible(msecs_to_jiffies(500));
137 continue; 137 continue;
138 } 138 }
139 ctxt = xprt->sc_ctxt_head; 139 ctxt = list_entry(xprt->sc_ctxt_free.next,
140 xprt->sc_ctxt_head = ctxt->next; 140 struct svc_rdma_op_ctxt,
141 free_list);
142 list_del_init(&ctxt->free_list);
141 spin_unlock_bh(&xprt->sc_ctxt_lock); 143 spin_unlock_bh(&xprt->sc_ctxt_lock);
142 ctxt->xprt = xprt; 144 ctxt->xprt = xprt;
143 INIT_LIST_HEAD(&ctxt->dto_q); 145 INIT_LIST_HEAD(&ctxt->dto_q);
144 ctxt->count = 0; 146 ctxt->count = 0;
147 atomic_inc(&xprt->sc_ctxt_used);
145 break; 148 break;
146 } 149 }
147 return ctxt; 150 return ctxt;
@@ -159,14 +162,15 @@ void svc_rdma_put_context(struct svc_rdma_op_ctxt *ctxt, int free_pages)
159 put_page(ctxt->pages[i]); 162 put_page(ctxt->pages[i]);
160 163
161 for (i = 0; i < ctxt->count; i++) 164 for (i = 0; i < ctxt->count; i++)
162 dma_unmap_single(xprt->sc_cm_id->device->dma_device, 165 ib_dma_unmap_single(xprt->sc_cm_id->device,
163 ctxt->sge[i].addr, 166 ctxt->sge[i].addr,
164 ctxt->sge[i].length, 167 ctxt->sge[i].length,
165 ctxt->direction); 168 ctxt->direction);
169
166 spin_lock_bh(&xprt->sc_ctxt_lock); 170 spin_lock_bh(&xprt->sc_ctxt_lock);
167 ctxt->next = xprt->sc_ctxt_head; 171 list_add(&ctxt->free_list, &xprt->sc_ctxt_free);
168 xprt->sc_ctxt_head = ctxt;
169 spin_unlock_bh(&xprt->sc_ctxt_lock); 172 spin_unlock_bh(&xprt->sc_ctxt_lock);
173 atomic_dec(&xprt->sc_ctxt_used);
170} 174}
171 175
172/* ib_cq event handler */ 176/* ib_cq event handler */
@@ -228,23 +232,8 @@ static void dto_tasklet_func(unsigned long data)
228 list_del_init(&xprt->sc_dto_q); 232 list_del_init(&xprt->sc_dto_q);
229 spin_unlock_irqrestore(&dto_lock, flags); 233 spin_unlock_irqrestore(&dto_lock, flags);
230 234
231 if (test_and_clear_bit(RDMAXPRT_RQ_PENDING, &xprt->sc_flags)) { 235 rq_cq_reap(xprt);
232 ib_req_notify_cq(xprt->sc_rq_cq, IB_CQ_NEXT_COMP); 236 sq_cq_reap(xprt);
233 rq_cq_reap(xprt);
234 set_bit(XPT_DATA, &xprt->sc_xprt.xpt_flags);
235 /*
236 * If data arrived before established event,
237 * don't enqueue. This defers RPC I/O until the
238 * RDMA connection is complete.
239 */
240 if (!test_bit(RDMAXPRT_CONN_PENDING, &xprt->sc_flags))
241 svc_xprt_enqueue(&xprt->sc_xprt);
242 }
243
244 if (test_and_clear_bit(RDMAXPRT_SQ_PENDING, &xprt->sc_flags)) {
245 ib_req_notify_cq(xprt->sc_sq_cq, IB_CQ_NEXT_COMP);
246 sq_cq_reap(xprt);
247 }
248 237
249 svc_xprt_put(&xprt->sc_xprt); 238 svc_xprt_put(&xprt->sc_xprt);
250 spin_lock_irqsave(&dto_lock, flags); 239 spin_lock_irqsave(&dto_lock, flags);
@@ -263,11 +252,15 @@ static void rq_comp_handler(struct ib_cq *cq, void *cq_context)
263 struct svcxprt_rdma *xprt = cq_context; 252 struct svcxprt_rdma *xprt = cq_context;
264 unsigned long flags; 253 unsigned long flags;
265 254
255 /* Guard against unconditional flush call for destroyed QP */
256 if (atomic_read(&xprt->sc_xprt.xpt_ref.refcount)==0)
257 return;
258
266 /* 259 /*
267 * Set the bit regardless of whether or not it's on the list 260 * Set the bit regardless of whether or not it's on the list
268 * because it may be on the list already due to an SQ 261 * because it may be on the list already due to an SQ
269 * completion. 262 * completion.
270 */ 263 */
271 set_bit(RDMAXPRT_RQ_PENDING, &xprt->sc_flags); 264 set_bit(RDMAXPRT_RQ_PENDING, &xprt->sc_flags);
272 265
273 /* 266 /*
@@ -290,6 +283,8 @@ static void rq_comp_handler(struct ib_cq *cq, void *cq_context)
290 * 283 *
291 * Take all completing WC off the CQE and enqueue the associated DTO 284 * Take all completing WC off the CQE and enqueue the associated DTO
292 * context on the dto_q for the transport. 285 * context on the dto_q for the transport.
286 *
287 * Note that caller must hold a transport reference.
293 */ 288 */
294static void rq_cq_reap(struct svcxprt_rdma *xprt) 289static void rq_cq_reap(struct svcxprt_rdma *xprt)
295{ 290{
@@ -297,29 +292,47 @@ static void rq_cq_reap(struct svcxprt_rdma *xprt)
297 struct ib_wc wc; 292 struct ib_wc wc;
298 struct svc_rdma_op_ctxt *ctxt = NULL; 293 struct svc_rdma_op_ctxt *ctxt = NULL;
299 294
295 if (!test_and_clear_bit(RDMAXPRT_RQ_PENDING, &xprt->sc_flags))
296 return;
297
298 ib_req_notify_cq(xprt->sc_rq_cq, IB_CQ_NEXT_COMP);
300 atomic_inc(&rdma_stat_rq_poll); 299 atomic_inc(&rdma_stat_rq_poll);
301 300
302 spin_lock_bh(&xprt->sc_rq_dto_lock);
303 while ((ret = ib_poll_cq(xprt->sc_rq_cq, 1, &wc)) > 0) { 301 while ((ret = ib_poll_cq(xprt->sc_rq_cq, 1, &wc)) > 0) {
304 ctxt = (struct svc_rdma_op_ctxt *)(unsigned long)wc.wr_id; 302 ctxt = (struct svc_rdma_op_ctxt *)(unsigned long)wc.wr_id;
305 ctxt->wc_status = wc.status; 303 ctxt->wc_status = wc.status;
306 ctxt->byte_len = wc.byte_len; 304 ctxt->byte_len = wc.byte_len;
307 if (wc.status != IB_WC_SUCCESS) { 305 if (wc.status != IB_WC_SUCCESS) {
308 /* Close the transport */ 306 /* Close the transport */
307 dprintk("svcrdma: transport closing putting ctxt %p\n", ctxt);
309 set_bit(XPT_CLOSE, &xprt->sc_xprt.xpt_flags); 308 set_bit(XPT_CLOSE, &xprt->sc_xprt.xpt_flags);
310 svc_rdma_put_context(ctxt, 1); 309 svc_rdma_put_context(ctxt, 1);
310 svc_xprt_put(&xprt->sc_xprt);
311 continue; 311 continue;
312 } 312 }
313 spin_lock_bh(&xprt->sc_rq_dto_lock);
313 list_add_tail(&ctxt->dto_q, &xprt->sc_rq_dto_q); 314 list_add_tail(&ctxt->dto_q, &xprt->sc_rq_dto_q);
315 spin_unlock_bh(&xprt->sc_rq_dto_lock);
316 svc_xprt_put(&xprt->sc_xprt);
314 } 317 }
315 spin_unlock_bh(&xprt->sc_rq_dto_lock);
316 318
317 if (ctxt) 319 if (ctxt)
318 atomic_inc(&rdma_stat_rq_prod); 320 atomic_inc(&rdma_stat_rq_prod);
321
322 set_bit(XPT_DATA, &xprt->sc_xprt.xpt_flags);
323 /*
324 * If data arrived before established event,
325 * don't enqueue. This defers RPC I/O until the
326 * RDMA connection is complete.
327 */
328 if (!test_bit(RDMAXPRT_CONN_PENDING, &xprt->sc_flags))
329 svc_xprt_enqueue(&xprt->sc_xprt);
319} 330}
320 331
321/* 332/*
322 * Send Queue Completion Handler - potentially called on interrupt context. 333 * Send Queue Completion Handler - potentially called on interrupt context.
334 *
335 * Note that caller must hold a transport reference.
323 */ 336 */
324static void sq_cq_reap(struct svcxprt_rdma *xprt) 337static void sq_cq_reap(struct svcxprt_rdma *xprt)
325{ 338{
@@ -328,6 +341,11 @@ static void sq_cq_reap(struct svcxprt_rdma *xprt)
328 struct ib_cq *cq = xprt->sc_sq_cq; 341 struct ib_cq *cq = xprt->sc_sq_cq;
329 int ret; 342 int ret;
330 343
344
345 if (!test_and_clear_bit(RDMAXPRT_SQ_PENDING, &xprt->sc_flags))
346 return;
347
348 ib_req_notify_cq(xprt->sc_sq_cq, IB_CQ_NEXT_COMP);
331 atomic_inc(&rdma_stat_sq_poll); 349 atomic_inc(&rdma_stat_sq_poll);
332 while ((ret = ib_poll_cq(cq, 1, &wc)) > 0) { 350 while ((ret = ib_poll_cq(cq, 1, &wc)) > 0) {
333 ctxt = (struct svc_rdma_op_ctxt *)(unsigned long)wc.wr_id; 351 ctxt = (struct svc_rdma_op_ctxt *)(unsigned long)wc.wr_id;
@@ -349,14 +367,16 @@ static void sq_cq_reap(struct svcxprt_rdma *xprt)
349 367
350 case IB_WR_RDMA_READ: 368 case IB_WR_RDMA_READ:
351 if (test_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags)) { 369 if (test_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags)) {
370 struct svc_rdma_op_ctxt *read_hdr = ctxt->read_hdr;
371 BUG_ON(!read_hdr);
352 set_bit(XPT_DATA, &xprt->sc_xprt.xpt_flags); 372 set_bit(XPT_DATA, &xprt->sc_xprt.xpt_flags);
353 set_bit(RDMACTXT_F_READ_DONE, &ctxt->flags);
354 spin_lock_bh(&xprt->sc_read_complete_lock); 373 spin_lock_bh(&xprt->sc_read_complete_lock);
355 list_add_tail(&ctxt->dto_q, 374 list_add_tail(&read_hdr->dto_q,
356 &xprt->sc_read_complete_q); 375 &xprt->sc_read_complete_q);
357 spin_unlock_bh(&xprt->sc_read_complete_lock); 376 spin_unlock_bh(&xprt->sc_read_complete_lock);
358 svc_xprt_enqueue(&xprt->sc_xprt); 377 svc_xprt_enqueue(&xprt->sc_xprt);
359 } 378 }
379 svc_rdma_put_context(ctxt, 0);
360 break; 380 break;
361 381
362 default: 382 default:
@@ -365,6 +385,7 @@ static void sq_cq_reap(struct svcxprt_rdma *xprt)
365 wc.opcode, wc.status); 385 wc.opcode, wc.status);
366 break; 386 break;
367 } 387 }
388 svc_xprt_put(&xprt->sc_xprt);
368 } 389 }
369 390
370 if (ctxt) 391 if (ctxt)
@@ -376,11 +397,15 @@ static void sq_comp_handler(struct ib_cq *cq, void *cq_context)
376 struct svcxprt_rdma *xprt = cq_context; 397 struct svcxprt_rdma *xprt = cq_context;
377 unsigned long flags; 398 unsigned long flags;
378 399
400 /* Guard against unconditional flush call for destroyed QP */
401 if (atomic_read(&xprt->sc_xprt.xpt_ref.refcount)==0)
402 return;
403
379 /* 404 /*
380 * Set the bit regardless of whether or not it's on the list 405 * Set the bit regardless of whether or not it's on the list
381 * because it may be on the list already due to an RQ 406 * because it may be on the list already due to an RQ
382 * completion. 407 * completion.
383 */ 408 */
384 set_bit(RDMAXPRT_SQ_PENDING, &xprt->sc_flags); 409 set_bit(RDMAXPRT_SQ_PENDING, &xprt->sc_flags);
385 410
386 /* 411 /*
@@ -407,28 +432,29 @@ static void create_context_cache(struct svcxprt_rdma *xprt,
407 xprt->sc_ctxt_max = ctxt_max; 432 xprt->sc_ctxt_max = ctxt_max;
408 xprt->sc_ctxt_bump = ctxt_bump; 433 xprt->sc_ctxt_bump = ctxt_bump;
409 xprt->sc_ctxt_cnt = 0; 434 xprt->sc_ctxt_cnt = 0;
410 xprt->sc_ctxt_head = NULL; 435 atomic_set(&xprt->sc_ctxt_used, 0);
436
437 INIT_LIST_HEAD(&xprt->sc_ctxt_free);
411 for (i = 0; i < ctxt_count; i++) { 438 for (i = 0; i < ctxt_count; i++) {
412 ctxt = kmalloc(sizeof(*ctxt), GFP_KERNEL); 439 ctxt = kmalloc(sizeof(*ctxt), GFP_KERNEL);
413 if (ctxt) { 440 if (ctxt) {
414 ctxt->next = xprt->sc_ctxt_head; 441 INIT_LIST_HEAD(&ctxt->free_list);
415 xprt->sc_ctxt_head = ctxt; 442 list_add(&ctxt->free_list, &xprt->sc_ctxt_free);
416 xprt->sc_ctxt_cnt++; 443 xprt->sc_ctxt_cnt++;
417 } 444 }
418 } 445 }
419} 446}
420 447
421static void destroy_context_cache(struct svc_rdma_op_ctxt *ctxt) 448static void destroy_context_cache(struct svcxprt_rdma *xprt)
422{ 449{
423 struct svc_rdma_op_ctxt *next; 450 while (!list_empty(&xprt->sc_ctxt_free)) {
424 if (!ctxt) 451 struct svc_rdma_op_ctxt *ctxt;
425 return; 452 ctxt = list_entry(xprt->sc_ctxt_free.next,
426 453 struct svc_rdma_op_ctxt,
427 do { 454 free_list);
428 next = ctxt->next; 455 list_del_init(&ctxt->free_list);
429 kfree(ctxt); 456 kfree(ctxt);
430 ctxt = next; 457 }
431 } while (next);
432} 458}
433 459
434static struct svcxprt_rdma *rdma_create_xprt(struct svc_serv *serv, 460static struct svcxprt_rdma *rdma_create_xprt(struct svc_serv *serv,
@@ -465,7 +491,7 @@ static struct svcxprt_rdma *rdma_create_xprt(struct svc_serv *serv,
465 reqs + 491 reqs +
466 cma_xprt->sc_sq_depth + 492 cma_xprt->sc_sq_depth +
467 RPCRDMA_MAX_THREADS + 1); /* max */ 493 RPCRDMA_MAX_THREADS + 1); /* max */
468 if (!cma_xprt->sc_ctxt_head) { 494 if (list_empty(&cma_xprt->sc_ctxt_free)) {
469 kfree(cma_xprt); 495 kfree(cma_xprt);
470 return NULL; 496 return NULL;
471 } 497 }
@@ -520,7 +546,12 @@ int svc_rdma_post_recv(struct svcxprt_rdma *xprt)
520 recv_wr.num_sge = ctxt->count; 546 recv_wr.num_sge = ctxt->count;
521 recv_wr.wr_id = (u64)(unsigned long)ctxt; 547 recv_wr.wr_id = (u64)(unsigned long)ctxt;
522 548
549 svc_xprt_get(&xprt->sc_xprt);
523 ret = ib_post_recv(xprt->sc_qp, &recv_wr, &bad_recv_wr); 550 ret = ib_post_recv(xprt->sc_qp, &recv_wr, &bad_recv_wr);
551 if (ret) {
552 svc_xprt_put(&xprt->sc_xprt);
553 svc_rdma_put_context(ctxt, 1);
554 }
524 return ret; 555 return ret;
525} 556}
526 557
@@ -539,6 +570,7 @@ static void handle_connect_req(struct rdma_cm_id *new_cma_id)
539{ 570{
540 struct svcxprt_rdma *listen_xprt = new_cma_id->context; 571 struct svcxprt_rdma *listen_xprt = new_cma_id->context;
541 struct svcxprt_rdma *newxprt; 572 struct svcxprt_rdma *newxprt;
573 struct sockaddr *sa;
542 574
543 /* Create a new transport */ 575 /* Create a new transport */
544 newxprt = rdma_create_xprt(listen_xprt->sc_xprt.xpt_server, 0); 576 newxprt = rdma_create_xprt(listen_xprt->sc_xprt.xpt_server, 0);
@@ -551,6 +583,12 @@ static void handle_connect_req(struct rdma_cm_id *new_cma_id)
551 dprintk("svcrdma: Creating newxprt=%p, cm_id=%p, listenxprt=%p\n", 583 dprintk("svcrdma: Creating newxprt=%p, cm_id=%p, listenxprt=%p\n",
552 newxprt, newxprt->sc_cm_id, listen_xprt); 584 newxprt, newxprt->sc_cm_id, listen_xprt);
553 585
586 /* Set the local and remote addresses in the transport */
587 sa = (struct sockaddr *)&newxprt->sc_cm_id->route.addr.dst_addr;
588 svc_xprt_set_remote(&newxprt->sc_xprt, sa, svc_addr_len(sa));
589 sa = (struct sockaddr *)&newxprt->sc_cm_id->route.addr.src_addr;
590 svc_xprt_set_local(&newxprt->sc_xprt, sa, svc_addr_len(sa));
591
554 /* 592 /*
555 * Enqueue the new transport on the accept queue of the listening 593 * Enqueue the new transport on the accept queue of the listening
556 * transport 594 * transport
@@ -627,6 +665,7 @@ static int rdma_cma_handler(struct rdma_cm_id *cma_id,
627 if (xprt) { 665 if (xprt) {
628 set_bit(XPT_CLOSE, &xprt->xpt_flags); 666 set_bit(XPT_CLOSE, &xprt->xpt_flags);
629 svc_xprt_enqueue(xprt); 667 svc_xprt_enqueue(xprt);
668 svc_xprt_put(xprt);
630 } 669 }
631 break; 670 break;
632 case RDMA_CM_EVENT_DEVICE_REMOVAL: 671 case RDMA_CM_EVENT_DEVICE_REMOVAL:
@@ -661,31 +700,27 @@ static struct svc_xprt *svc_rdma_create(struct svc_serv *serv,
661 700
662 cma_xprt = rdma_create_xprt(serv, 1); 701 cma_xprt = rdma_create_xprt(serv, 1);
663 if (!cma_xprt) 702 if (!cma_xprt)
664 return ERR_PTR(ENOMEM); 703 return ERR_PTR(-ENOMEM);
665 xprt = &cma_xprt->sc_xprt; 704 xprt = &cma_xprt->sc_xprt;
666 705
667 listen_id = rdma_create_id(rdma_listen_handler, cma_xprt, RDMA_PS_TCP); 706 listen_id = rdma_create_id(rdma_listen_handler, cma_xprt, RDMA_PS_TCP);
668 if (IS_ERR(listen_id)) { 707 if (IS_ERR(listen_id)) {
669 svc_xprt_put(&cma_xprt->sc_xprt); 708 ret = PTR_ERR(listen_id);
670 dprintk("svcrdma: rdma_create_id failed = %ld\n", 709 dprintk("svcrdma: rdma_create_id failed = %d\n", ret);
671 PTR_ERR(listen_id)); 710 goto err0;
672 return (void *)listen_id;
673 } 711 }
712
674 ret = rdma_bind_addr(listen_id, sa); 713 ret = rdma_bind_addr(listen_id, sa);
675 if (ret) { 714 if (ret) {
676 rdma_destroy_id(listen_id);
677 svc_xprt_put(&cma_xprt->sc_xprt);
678 dprintk("svcrdma: rdma_bind_addr failed = %d\n", ret); 715 dprintk("svcrdma: rdma_bind_addr failed = %d\n", ret);
679 return ERR_PTR(ret); 716 goto err1;
680 } 717 }
681 cma_xprt->sc_cm_id = listen_id; 718 cma_xprt->sc_cm_id = listen_id;
682 719
683 ret = rdma_listen(listen_id, RPCRDMA_LISTEN_BACKLOG); 720 ret = rdma_listen(listen_id, RPCRDMA_LISTEN_BACKLOG);
684 if (ret) { 721 if (ret) {
685 rdma_destroy_id(listen_id);
686 svc_xprt_put(&cma_xprt->sc_xprt);
687 dprintk("svcrdma: rdma_listen failed = %d\n", ret); 722 dprintk("svcrdma: rdma_listen failed = %d\n", ret);
688 return ERR_PTR(ret); 723 goto err1;
689 } 724 }
690 725
691 /* 726 /*
@@ -696,6 +731,12 @@ static struct svc_xprt *svc_rdma_create(struct svc_serv *serv,
696 svc_xprt_set_local(&cma_xprt->sc_xprt, sa, salen); 731 svc_xprt_set_local(&cma_xprt->sc_xprt, sa, salen);
697 732
698 return &cma_xprt->sc_xprt; 733 return &cma_xprt->sc_xprt;
734
735 err1:
736 rdma_destroy_id(listen_id);
737 err0:
738 kfree(cma_xprt);
739 return ERR_PTR(ret);
699} 740}
700 741
701/* 742/*
@@ -716,7 +757,6 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
716 struct rdma_conn_param conn_param; 757 struct rdma_conn_param conn_param;
717 struct ib_qp_init_attr qp_attr; 758 struct ib_qp_init_attr qp_attr;
718 struct ib_device_attr devattr; 759 struct ib_device_attr devattr;
719 struct sockaddr *sa;
720 int ret; 760 int ret;
721 int i; 761 int i;
722 762
@@ -826,7 +866,6 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
826 newxprt->sc_sq_depth = qp_attr.cap.max_send_wr; 866 newxprt->sc_sq_depth = qp_attr.cap.max_send_wr;
827 newxprt->sc_max_requests = qp_attr.cap.max_recv_wr; 867 newxprt->sc_max_requests = qp_attr.cap.max_recv_wr;
828 } 868 }
829 svc_xprt_get(&newxprt->sc_xprt);
830 newxprt->sc_qp = newxprt->sc_cm_id->qp; 869 newxprt->sc_qp = newxprt->sc_cm_id->qp;
831 870
832 /* Register all of physical memory */ 871 /* Register all of physical memory */
@@ -850,6 +889,13 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
850 /* Swap out the handler */ 889 /* Swap out the handler */
851 newxprt->sc_cm_id->event_handler = rdma_cma_handler; 890 newxprt->sc_cm_id->event_handler = rdma_cma_handler;
852 891
892 /*
893 * Arm the CQs for the SQ and RQ before accepting so we can't
894 * miss the first message
895 */
896 ib_req_notify_cq(newxprt->sc_sq_cq, IB_CQ_NEXT_COMP);
897 ib_req_notify_cq(newxprt->sc_rq_cq, IB_CQ_NEXT_COMP);
898
853 /* Accept Connection */ 899 /* Accept Connection */
854 set_bit(RDMAXPRT_CONN_PENDING, &newxprt->sc_flags); 900 set_bit(RDMAXPRT_CONN_PENDING, &newxprt->sc_flags);
855 memset(&conn_param, 0, sizeof conn_param); 901 memset(&conn_param, 0, sizeof conn_param);
@@ -886,58 +932,26 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
886 newxprt->sc_max_requests, 932 newxprt->sc_max_requests,
887 newxprt->sc_ord); 933 newxprt->sc_ord);
888 934
889 /* Set the local and remote addresses in the transport */
890 sa = (struct sockaddr *)&newxprt->sc_cm_id->route.addr.dst_addr;
891 svc_xprt_set_remote(&newxprt->sc_xprt, sa, svc_addr_len(sa));
892 sa = (struct sockaddr *)&newxprt->sc_cm_id->route.addr.src_addr;
893 svc_xprt_set_local(&newxprt->sc_xprt, sa, svc_addr_len(sa));
894
895 ib_req_notify_cq(newxprt->sc_sq_cq, IB_CQ_NEXT_COMP);
896 ib_req_notify_cq(newxprt->sc_rq_cq, IB_CQ_NEXT_COMP);
897 return &newxprt->sc_xprt; 935 return &newxprt->sc_xprt;
898 936
899 errout: 937 errout:
900 dprintk("svcrdma: failure accepting new connection rc=%d.\n", ret); 938 dprintk("svcrdma: failure accepting new connection rc=%d.\n", ret);
901 /* Take a reference in case the DTO handler runs */ 939 /* Take a reference in case the DTO handler runs */
902 svc_xprt_get(&newxprt->sc_xprt); 940 svc_xprt_get(&newxprt->sc_xprt);
903 if (newxprt->sc_qp && !IS_ERR(newxprt->sc_qp)) { 941 if (newxprt->sc_qp && !IS_ERR(newxprt->sc_qp))
904 ib_destroy_qp(newxprt->sc_qp); 942 ib_destroy_qp(newxprt->sc_qp);
905 svc_xprt_put(&newxprt->sc_xprt);
906 }
907 rdma_destroy_id(newxprt->sc_cm_id); 943 rdma_destroy_id(newxprt->sc_cm_id);
908 /* This call to put will destroy the transport */ 944 /* This call to put will destroy the transport */
909 svc_xprt_put(&newxprt->sc_xprt); 945 svc_xprt_put(&newxprt->sc_xprt);
910 return NULL; 946 return NULL;
911} 947}
912 948
913/*
914 * Post an RQ WQE to the RQ when the rqst is being released. This
915 * effectively returns an RQ credit to the client. The rq_xprt_ctxt
916 * will be null if the request is deferred due to an RDMA_READ or the
917 * transport had no data ready (EAGAIN). Note that an RPC deferred in
918 * svc_process will still return the credit, this is because the data
919 * is copied and no longer consume a WQE/WC.
920 */
921static void svc_rdma_release_rqst(struct svc_rqst *rqstp) 949static void svc_rdma_release_rqst(struct svc_rqst *rqstp)
922{ 950{
923 int err;
924 struct svcxprt_rdma *rdma =
925 container_of(rqstp->rq_xprt, struct svcxprt_rdma, sc_xprt);
926 if (rqstp->rq_xprt_ctxt) {
927 BUG_ON(rqstp->rq_xprt_ctxt != rdma);
928 err = svc_rdma_post_recv(rdma);
929 if (err)
930 dprintk("svcrdma: failed to post an RQ WQE error=%d\n",
931 err);
932 }
933 rqstp->rq_xprt_ctxt = NULL;
934} 951}
935 952
936/* 953/*
937 * When connected, an svc_xprt has at least three references: 954 * When connected, an svc_xprt has at least two references:
938 *
939 * - A reference held by the QP. We still hold that here because this
940 * code deletes the QP and puts the reference.
941 * 955 *
942 * - A reference held by the cm_id between the ESTABLISHED and 956 * - A reference held by the cm_id between the ESTABLISHED and
943 * DISCONNECTED events. If the remote peer disconnected first, this 957 * DISCONNECTED events. If the remote peer disconnected first, this
@@ -946,7 +960,7 @@ static void svc_rdma_release_rqst(struct svc_rqst *rqstp)
946 * - A reference held by the svc_recv code that called this function 960 * - A reference held by the svc_recv code that called this function
947 * as part of close processing. 961 * as part of close processing.
948 * 962 *
949 * At a minimum two references should still be held. 963 * At a minimum one references should still be held.
950 */ 964 */
951static void svc_rdma_detach(struct svc_xprt *xprt) 965static void svc_rdma_detach(struct svc_xprt *xprt)
952{ 966{
@@ -956,23 +970,53 @@ static void svc_rdma_detach(struct svc_xprt *xprt)
956 970
957 /* Disconnect and flush posted WQE */ 971 /* Disconnect and flush posted WQE */
958 rdma_disconnect(rdma->sc_cm_id); 972 rdma_disconnect(rdma->sc_cm_id);
959
960 /* Destroy the QP if present (not a listener) */
961 if (rdma->sc_qp && !IS_ERR(rdma->sc_qp)) {
962 ib_destroy_qp(rdma->sc_qp);
963 svc_xprt_put(xprt);
964 }
965
966 /* Destroy the CM ID */
967 rdma_destroy_id(rdma->sc_cm_id);
968} 973}
969 974
970static void svc_rdma_free(struct svc_xprt *xprt) 975static void __svc_rdma_free(struct work_struct *work)
971{ 976{
972 struct svcxprt_rdma *rdma = (struct svcxprt_rdma *)xprt; 977 struct svcxprt_rdma *rdma =
978 container_of(work, struct svcxprt_rdma, sc_work);
973 dprintk("svcrdma: svc_rdma_free(%p)\n", rdma); 979 dprintk("svcrdma: svc_rdma_free(%p)\n", rdma);
980
974 /* We should only be called from kref_put */ 981 /* We should only be called from kref_put */
975 BUG_ON(atomic_read(&xprt->xpt_ref.refcount) != 0); 982 BUG_ON(atomic_read(&rdma->sc_xprt.xpt_ref.refcount) != 0);
983
984 /*
985 * Destroy queued, but not processed read completions. Note
986 * that this cleanup has to be done before destroying the
987 * cm_id because the device ptr is needed to unmap the dma in
988 * svc_rdma_put_context.
989 */
990 spin_lock_bh(&rdma->sc_read_complete_lock);
991 while (!list_empty(&rdma->sc_read_complete_q)) {
992 struct svc_rdma_op_ctxt *ctxt;
993 ctxt = list_entry(rdma->sc_read_complete_q.next,
994 struct svc_rdma_op_ctxt,
995 dto_q);
996 list_del_init(&ctxt->dto_q);
997 svc_rdma_put_context(ctxt, 1);
998 }
999 spin_unlock_bh(&rdma->sc_read_complete_lock);
1000
1001 /* Destroy queued, but not processed recv completions */
1002 spin_lock_bh(&rdma->sc_rq_dto_lock);
1003 while (!list_empty(&rdma->sc_rq_dto_q)) {
1004 struct svc_rdma_op_ctxt *ctxt;
1005 ctxt = list_entry(rdma->sc_rq_dto_q.next,
1006 struct svc_rdma_op_ctxt,
1007 dto_q);
1008 list_del_init(&ctxt->dto_q);
1009 svc_rdma_put_context(ctxt, 1);
1010 }
1011 spin_unlock_bh(&rdma->sc_rq_dto_lock);
1012
1013 /* Warn if we leaked a resource or under-referenced */
1014 WARN_ON(atomic_read(&rdma->sc_ctxt_used) != 0);
1015
1016 /* Destroy the QP if present (not a listener) */
1017 if (rdma->sc_qp && !IS_ERR(rdma->sc_qp))
1018 ib_destroy_qp(rdma->sc_qp);
1019
976 if (rdma->sc_sq_cq && !IS_ERR(rdma->sc_sq_cq)) 1020 if (rdma->sc_sq_cq && !IS_ERR(rdma->sc_sq_cq))
977 ib_destroy_cq(rdma->sc_sq_cq); 1021 ib_destroy_cq(rdma->sc_sq_cq);
978 1022
@@ -985,10 +1029,21 @@ static void svc_rdma_free(struct svc_xprt *xprt)
985 if (rdma->sc_pd && !IS_ERR(rdma->sc_pd)) 1029 if (rdma->sc_pd && !IS_ERR(rdma->sc_pd))
986 ib_dealloc_pd(rdma->sc_pd); 1030 ib_dealloc_pd(rdma->sc_pd);
987 1031
988 destroy_context_cache(rdma->sc_ctxt_head); 1032 /* Destroy the CM ID */
1033 rdma_destroy_id(rdma->sc_cm_id);
1034
1035 destroy_context_cache(rdma);
989 kfree(rdma); 1036 kfree(rdma);
990} 1037}
991 1038
1039static void svc_rdma_free(struct svc_xprt *xprt)
1040{
1041 struct svcxprt_rdma *rdma =
1042 container_of(xprt, struct svcxprt_rdma, sc_xprt);
1043 INIT_WORK(&rdma->sc_work, __svc_rdma_free);
1044 schedule_work(&rdma->sc_work);
1045}
1046
992static int svc_rdma_has_wspace(struct svc_xprt *xprt) 1047static int svc_rdma_has_wspace(struct svc_xprt *xprt)
993{ 1048{
994 struct svcxprt_rdma *rdma = 1049 struct svcxprt_rdma *rdma =
@@ -1018,7 +1073,7 @@ int svc_rdma_send(struct svcxprt_rdma *xprt, struct ib_send_wr *wr)
1018 int ret; 1073 int ret;
1019 1074
1020 if (test_bit(XPT_CLOSE, &xprt->sc_xprt.xpt_flags)) 1075 if (test_bit(XPT_CLOSE, &xprt->sc_xprt.xpt_flags))
1021 return 0; 1076 return -ENOTCONN;
1022 1077
1023 BUG_ON(wr->send_flags != IB_SEND_SIGNALED); 1078 BUG_ON(wr->send_flags != IB_SEND_SIGNALED);
1024 BUG_ON(((struct svc_rdma_op_ctxt *)(unsigned long)wr->wr_id)->wr_op != 1079 BUG_ON(((struct svc_rdma_op_ctxt *)(unsigned long)wr->wr_id)->wr_op !=
@@ -1029,7 +1084,8 @@ int svc_rdma_send(struct svcxprt_rdma *xprt, struct ib_send_wr *wr)
1029 if (xprt->sc_sq_depth == atomic_read(&xprt->sc_sq_count)) { 1084 if (xprt->sc_sq_depth == atomic_read(&xprt->sc_sq_count)) {
1030 spin_unlock_bh(&xprt->sc_lock); 1085 spin_unlock_bh(&xprt->sc_lock);
1031 atomic_inc(&rdma_stat_sq_starve); 1086 atomic_inc(&rdma_stat_sq_starve);
1032 /* See if we can reap some SQ WR */ 1087
1088 /* See if we can opportunistically reap SQ WR to make room */
1033 sq_cq_reap(xprt); 1089 sq_cq_reap(xprt);
1034 1090
1035 /* Wait until SQ WR available if SQ still full */ 1091 /* Wait until SQ WR available if SQ still full */
@@ -1041,22 +1097,25 @@ int svc_rdma_send(struct svcxprt_rdma *xprt, struct ib_send_wr *wr)
1041 continue; 1097 continue;
1042 } 1098 }
1043 /* Bumped used SQ WR count and post */ 1099 /* Bumped used SQ WR count and post */
1100 svc_xprt_get(&xprt->sc_xprt);
1044 ret = ib_post_send(xprt->sc_qp, wr, &bad_wr); 1101 ret = ib_post_send(xprt->sc_qp, wr, &bad_wr);
1045 if (!ret) 1102 if (!ret)
1046 atomic_inc(&xprt->sc_sq_count); 1103 atomic_inc(&xprt->sc_sq_count);
1047 else 1104 else {
1105 svc_xprt_put(&xprt->sc_xprt);
1048 dprintk("svcrdma: failed to post SQ WR rc=%d, " 1106 dprintk("svcrdma: failed to post SQ WR rc=%d, "
1049 "sc_sq_count=%d, sc_sq_depth=%d\n", 1107 "sc_sq_count=%d, sc_sq_depth=%d\n",
1050 ret, atomic_read(&xprt->sc_sq_count), 1108 ret, atomic_read(&xprt->sc_sq_count),
1051 xprt->sc_sq_depth); 1109 xprt->sc_sq_depth);
1110 }
1052 spin_unlock_bh(&xprt->sc_lock); 1111 spin_unlock_bh(&xprt->sc_lock);
1053 break; 1112 break;
1054 } 1113 }
1055 return ret; 1114 return ret;
1056} 1115}
1057 1116
1058int svc_rdma_send_error(struct svcxprt_rdma *xprt, struct rpcrdma_msg *rmsgp, 1117void svc_rdma_send_error(struct svcxprt_rdma *xprt, struct rpcrdma_msg *rmsgp,
1059 enum rpcrdma_errcode err) 1118 enum rpcrdma_errcode err)
1060{ 1119{
1061 struct ib_send_wr err_wr; 1120 struct ib_send_wr err_wr;
1062 struct ib_sge sge; 1121 struct ib_sge sge;
@@ -1094,9 +1153,8 @@ int svc_rdma_send_error(struct svcxprt_rdma *xprt, struct rpcrdma_msg *rmsgp,
1094 /* Post It */ 1153 /* Post It */
1095 ret = svc_rdma_send(xprt, &err_wr); 1154 ret = svc_rdma_send(xprt, &err_wr);
1096 if (ret) { 1155 if (ret) {
1097 dprintk("svcrdma: Error posting send = %d\n", ret); 1156 dprintk("svcrdma: Error %d posting send for protocol error\n",
1157 ret);
1098 svc_rdma_put_context(ctxt, 1); 1158 svc_rdma_put_context(ctxt, 1);
1099 } 1159 }
1100
1101 return ret;
1102} 1160}
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index e18cd3628db4..783317dacd30 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -169,6 +169,11 @@ static inline int unix_may_send(struct sock *sk, struct sock *osk)
169 return (unix_peer(osk) == NULL || unix_our_peer(sk, osk)); 169 return (unix_peer(osk) == NULL || unix_our_peer(sk, osk));
170} 170}
171 171
172static inline int unix_recvq_full(struct sock const *sk)
173{
174 return skb_queue_len(&sk->sk_receive_queue) > sk->sk_max_ack_backlog;
175}
176
172static struct sock *unix_peer_get(struct sock *s) 177static struct sock *unix_peer_get(struct sock *s)
173{ 178{
174 struct sock *peer; 179 struct sock *peer;
@@ -482,6 +487,8 @@ static int unix_socketpair(struct socket *, struct socket *);
482static int unix_accept(struct socket *, struct socket *, int); 487static int unix_accept(struct socket *, struct socket *, int);
483static int unix_getname(struct socket *, struct sockaddr *, int *, int); 488static int unix_getname(struct socket *, struct sockaddr *, int *, int);
484static unsigned int unix_poll(struct file *, struct socket *, poll_table *); 489static unsigned int unix_poll(struct file *, struct socket *, poll_table *);
490static unsigned int unix_dgram_poll(struct file *, struct socket *,
491 poll_table *);
485static int unix_ioctl(struct socket *, unsigned int, unsigned long); 492static int unix_ioctl(struct socket *, unsigned int, unsigned long);
486static int unix_shutdown(struct socket *, int); 493static int unix_shutdown(struct socket *, int);
487static int unix_stream_sendmsg(struct kiocb *, struct socket *, 494static int unix_stream_sendmsg(struct kiocb *, struct socket *,
@@ -527,7 +534,7 @@ static const struct proto_ops unix_dgram_ops = {
527 .socketpair = unix_socketpair, 534 .socketpair = unix_socketpair,
528 .accept = sock_no_accept, 535 .accept = sock_no_accept,
529 .getname = unix_getname, 536 .getname = unix_getname,
530 .poll = datagram_poll, 537 .poll = unix_dgram_poll,
531 .ioctl = unix_ioctl, 538 .ioctl = unix_ioctl,
532 .listen = sock_no_listen, 539 .listen = sock_no_listen,
533 .shutdown = unix_shutdown, 540 .shutdown = unix_shutdown,
@@ -548,7 +555,7 @@ static const struct proto_ops unix_seqpacket_ops = {
548 .socketpair = unix_socketpair, 555 .socketpair = unix_socketpair,
549 .accept = unix_accept, 556 .accept = unix_accept,
550 .getname = unix_getname, 557 .getname = unix_getname,
551 .poll = datagram_poll, 558 .poll = unix_dgram_poll,
552 .ioctl = unix_ioctl, 559 .ioctl = unix_ioctl,
553 .listen = unix_listen, 560 .listen = unix_listen,
554 .shutdown = unix_shutdown, 561 .shutdown = unix_shutdown,
@@ -983,8 +990,7 @@ static long unix_wait_for_peer(struct sock *other, long timeo)
983 990
984 sched = !sock_flag(other, SOCK_DEAD) && 991 sched = !sock_flag(other, SOCK_DEAD) &&
985 !(other->sk_shutdown & RCV_SHUTDOWN) && 992 !(other->sk_shutdown & RCV_SHUTDOWN) &&
986 (skb_queue_len(&other->sk_receive_queue) > 993 unix_recvq_full(other);
987 other->sk_max_ack_backlog);
988 994
989 unix_state_unlock(other); 995 unix_state_unlock(other);
990 996
@@ -1058,8 +1064,7 @@ restart:
1058 if (other->sk_state != TCP_LISTEN) 1064 if (other->sk_state != TCP_LISTEN)
1059 goto out_unlock; 1065 goto out_unlock;
1060 1066
1061 if (skb_queue_len(&other->sk_receive_queue) > 1067 if (unix_recvq_full(other)) {
1062 other->sk_max_ack_backlog) {
1063 err = -EAGAIN; 1068 err = -EAGAIN;
1064 if (!timeo) 1069 if (!timeo)
1065 goto out_unlock; 1070 goto out_unlock;
@@ -1428,9 +1433,7 @@ restart:
1428 goto out_unlock; 1433 goto out_unlock;
1429 } 1434 }
1430 1435
1431 if (unix_peer(other) != sk && 1436 if (unix_peer(other) != sk && unix_recvq_full(other)) {
1432 (skb_queue_len(&other->sk_receive_queue) >
1433 other->sk_max_ack_backlog)) {
1434 if (!timeo) { 1437 if (!timeo) {
1435 err = -EAGAIN; 1438 err = -EAGAIN;
1436 goto out_unlock; 1439 goto out_unlock;
@@ -1991,6 +1994,60 @@ static unsigned int unix_poll(struct file * file, struct socket *sock, poll_tabl
1991 return mask; 1994 return mask;
1992} 1995}
1993 1996
1997static unsigned int unix_dgram_poll(struct file *file, struct socket *sock,
1998 poll_table *wait)
1999{
2000 struct sock *sk = sock->sk, *other;
2001 unsigned int mask, writable;
2002
2003 poll_wait(file, sk->sk_sleep, wait);
2004 mask = 0;
2005
2006 /* exceptional events? */
2007 if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue))
2008 mask |= POLLERR;
2009 if (sk->sk_shutdown & RCV_SHUTDOWN)
2010 mask |= POLLRDHUP;
2011 if (sk->sk_shutdown == SHUTDOWN_MASK)
2012 mask |= POLLHUP;
2013
2014 /* readable? */
2015 if (!skb_queue_empty(&sk->sk_receive_queue) ||
2016 (sk->sk_shutdown & RCV_SHUTDOWN))
2017 mask |= POLLIN | POLLRDNORM;
2018
2019 /* Connection-based need to check for termination and startup */
2020 if (sk->sk_type == SOCK_SEQPACKET) {
2021 if (sk->sk_state == TCP_CLOSE)
2022 mask |= POLLHUP;
2023 /* connection hasn't started yet? */
2024 if (sk->sk_state == TCP_SYN_SENT)
2025 return mask;
2026 }
2027
2028 /* writable? */
2029 writable = unix_writable(sk);
2030 if (writable) {
2031 other = unix_peer_get(sk);
2032 if (other) {
2033 if (unix_peer(other) != sk) {
2034 poll_wait(file, &unix_sk(other)->peer_wait,
2035 wait);
2036 if (unix_recvq_full(other))
2037 writable = 0;
2038 }
2039
2040 sock_put(other);
2041 }
2042 }
2043
2044 if (writable)
2045 mask |= POLLOUT | POLLWRNORM | POLLWRBAND;
2046 else
2047 set_bit(SOCK_ASYNC_NOSPACE, &sk->sk_socket->flags);
2048
2049 return mask;
2050}
1994 2051
1995#ifdef CONFIG_PROC_FS 2052#ifdef CONFIG_PROC_FS
1996static struct sock *first_unix_socket(int *i) 2053static struct sock *first_unix_socket(int *i)
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 2bdd4dddc0e1..fb75f265b39c 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -187,7 +187,8 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 pid, u32 seq, int flags,
187 return genlmsg_end(msg, hdr); 187 return genlmsg_end(msg, hdr);
188 188
189 nla_put_failure: 189 nla_put_failure:
190 return genlmsg_cancel(msg, hdr); 190 genlmsg_cancel(msg, hdr);
191 return -EMSGSIZE;
191} 192}
192 193
193static int nl80211_dump_wiphy(struct sk_buff *skb, struct netlink_callback *cb) 194static int nl80211_dump_wiphy(struct sk_buff *skb, struct netlink_callback *cb)
@@ -273,7 +274,8 @@ static int nl80211_send_iface(struct sk_buff *msg, u32 pid, u32 seq, int flags,
273 return genlmsg_end(msg, hdr); 274 return genlmsg_end(msg, hdr);
274 275
275 nla_put_failure: 276 nla_put_failure:
276 return genlmsg_cancel(msg, hdr); 277 genlmsg_cancel(msg, hdr);
278 return -EMSGSIZE;
277} 279}
278 280
279static int nl80211_dump_interface(struct sk_buff *skb, struct netlink_callback *cb) 281static int nl80211_dump_interface(struct sk_buff *skb, struct netlink_callback *cb)
@@ -928,7 +930,8 @@ static int nl80211_send_station(struct sk_buff *msg, u32 pid, u32 seq,
928 return genlmsg_end(msg, hdr); 930 return genlmsg_end(msg, hdr);
929 931
930 nla_put_failure: 932 nla_put_failure:
931 return genlmsg_cancel(msg, hdr); 933 genlmsg_cancel(msg, hdr);
934 return -EMSGSIZE;
932} 935}
933 936
934static int nl80211_dump_station(struct sk_buff *skb, 937static int nl80211_dump_station(struct sk_buff *skb,
@@ -1267,7 +1270,8 @@ static int nl80211_send_mpath(struct sk_buff *msg, u32 pid, u32 seq,
1267 return genlmsg_end(msg, hdr); 1270 return genlmsg_end(msg, hdr);
1268 1271
1269 nla_put_failure: 1272 nla_put_failure:
1270 return genlmsg_cancel(msg, hdr); 1273 genlmsg_cancel(msg, hdr);
1274 return -EMSGSIZE;
1271} 1275}
1272 1276
1273static int nl80211_dump_mpath(struct sk_buff *skb, 1277static int nl80211_dump_mpath(struct sk_buff *skb,
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 185488da2466..855bff4b3250 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -80,6 +80,23 @@ static const struct ieee80211_channel_range ieee80211_JP_channels[] = {
80 IEEE80211_CHAN_RADAR), 80 IEEE80211_CHAN_RADAR),
81}; 81};
82 82
83static const struct ieee80211_channel_range ieee80211_EU_channels[] = {
84 /* IEEE 802.11b/g, channels 1..13 */
85 RANGE_PWR(2412, 2472, 20, 6, 0),
86 /* IEEE 802.11a, channel 36*/
87 RANGE_PWR(5180, 5180, 23, 6, IEEE80211_CHAN_PASSIVE_SCAN),
88 /* IEEE 802.11a, channel 40*/
89 RANGE_PWR(5200, 5200, 23, 6, IEEE80211_CHAN_PASSIVE_SCAN),
90 /* IEEE 802.11a, channel 44*/
91 RANGE_PWR(5220, 5220, 23, 6, IEEE80211_CHAN_PASSIVE_SCAN),
92 /* IEEE 802.11a, channels 48..64 */
93 RANGE_PWR(5240, 5320, 23, 6, IEEE80211_CHAN_NO_IBSS |
94 IEEE80211_CHAN_RADAR),
95 /* IEEE 802.11a, channels 100..140 */
96 RANGE_PWR(5500, 5700, 30, 6, IEEE80211_CHAN_NO_IBSS |
97 IEEE80211_CHAN_RADAR),
98};
99
83#define REGDOM(_code) \ 100#define REGDOM(_code) \
84 { \ 101 { \
85 .code = __stringify(_code), \ 102 .code = __stringify(_code), \
@@ -90,6 +107,7 @@ static const struct ieee80211_channel_range ieee80211_JP_channels[] = {
90static const struct ieee80211_regdomain ieee80211_regdoms[] = { 107static const struct ieee80211_regdomain ieee80211_regdoms[] = {
91 REGDOM(US), 108 REGDOM(US),
92 REGDOM(JP), 109 REGDOM(JP),
110 REGDOM(EU),
93}; 111};
94 112
95 113
diff --git a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c
index ac765dd9c7f5..23a2cc04b8cd 100644
--- a/net/xfrm/xfrm_algo.c
+++ b/net/xfrm/xfrm_algo.c
@@ -200,8 +200,8 @@ static struct xfrm_algo_desc aalg_list[] = {
200 } 200 }
201}, 201},
202{ 202{
203 .name = "hmac(ripemd160)", 203 .name = "hmac(rmd160)",
204 .compat = "ripemd160", 204 .compat = "rmd160",
205 205
206 .uinfo = { 206 .uinfo = {
207 .auth = { 207 .auth = {
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index a1b0fbe3ea35..b976d9ed10e4 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -50,19 +50,8 @@ static int verify_one_alg(struct nlattr **attrs, enum xfrm_attr_type_t type)
50 50
51 switch (type) { 51 switch (type) {
52 case XFRMA_ALG_AUTH: 52 case XFRMA_ALG_AUTH:
53 if (!algp->alg_key_len &&
54 strcmp(algp->alg_name, "digest_null") != 0)
55 return -EINVAL;
56 break;
57
58 case XFRMA_ALG_CRYPT: 53 case XFRMA_ALG_CRYPT:
59 if (!algp->alg_key_len &&
60 strcmp(algp->alg_name, "cipher_null") != 0)
61 return -EINVAL;
62 break;
63
64 case XFRMA_ALG_COMP: 54 case XFRMA_ALG_COMP:
65 /* Zero length keys are legal. */
66 break; 55 break;
67 56
68 default: 57 default:
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index a098a0454dc8..17092d6c7db3 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -43,7 +43,13 @@ _modpost: __modpost
43include include/config/auto.conf 43include include/config/auto.conf
44include scripts/Kbuild.include 44include scripts/Kbuild.include
45 45
46# When building external modules load the Kbuild file to retreive EXTRA_SYMBOLS info
46ifneq ($(KBUILD_EXTMOD),) 47ifneq ($(KBUILD_EXTMOD),)
48
49# set src + obj - they may be used when building the .mod.c file
50obj := $(KBUILD_EXTMOD)
51src := $(obj)
52
47# Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS 53# Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS
48include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \ 54include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \
49 $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile) 55 $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index b6bbbcdc557e..6971bf078d13 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -9,7 +9,7 @@ use strict;
9my $P = $0; 9my $P = $0;
10$P =~ s@.*/@@g; 10$P =~ s@.*/@@g;
11 11
12my $V = '0.18'; 12my $V = '0.19';
13 13
14use Getopt::Long qw(:config no_auto_abbrev); 14use Getopt::Long qw(:config no_auto_abbrev);
15 15
@@ -115,6 +115,7 @@ our $Attribute = qr{
115 __kprobes| 115 __kprobes|
116 __(?:mem|cpu|dev|)(?:initdata|init) 116 __(?:mem|cpu|dev|)(?:initdata|init)
117 }x; 117 }x;
118our $Modifier;
118our $Inline = qr{inline|__always_inline|noinline}; 119our $Inline = qr{inline|__always_inline|noinline};
119our $Member = qr{->$Ident|\.$Ident|\[[^]]*\]}; 120our $Member = qr{->$Ident|\.$Ident|\[[^]]*\]};
120our $Lval = qr{$Ident(?:$Member)*}; 121our $Lval = qr{$Ident(?:$Member)*};
@@ -144,17 +145,17 @@ our $UTF8 = qr {
144 145
145our @typeList = ( 146our @typeList = (
146 qr{void}, 147 qr{void},
147 qr{char}, 148 qr{(?:unsigned\s+)?char},
148 qr{short}, 149 qr{(?:unsigned\s+)?short},
149 qr{int}, 150 qr{(?:unsigned\s+)?int},
150 qr{long}, 151 qr{(?:unsigned\s+)?long},
152 qr{(?:unsigned\s+)?long\s+int},
153 qr{(?:unsigned\s+)?long\s+long},
154 qr{(?:unsigned\s+)?long\s+long\s+int},
151 qr{unsigned}, 155 qr{unsigned},
152 qr{float}, 156 qr{float},
153 qr{double}, 157 qr{double},
154 qr{bool}, 158 qr{bool},
155 qr{long\s+int},
156 qr{long\s+long},
157 qr{long\s+long\s+int},
158 qr{(?:__)?(?:u|s|be|le)(?:8|16|32|64)}, 159 qr{(?:__)?(?:u|s|be|le)(?:8|16|32|64)},
159 qr{struct\s+$Ident}, 160 qr{struct\s+$Ident},
160 qr{union\s+$Ident}, 161 qr{union\s+$Ident},
@@ -163,26 +164,29 @@ our @typeList = (
163 qr{${Ident}_handler}, 164 qr{${Ident}_handler},
164 qr{${Ident}_handler_fn}, 165 qr{${Ident}_handler_fn},
165); 166);
167our @modifierList = (
168 qr{fastcall},
169);
166 170
167sub build_types { 171sub build_types {
172 my $mods = "(?: \n" . join("|\n ", @modifierList) . "\n)";
168 my $all = "(?: \n" . join("|\n ", @typeList) . "\n)"; 173 my $all = "(?: \n" . join("|\n ", @typeList) . "\n)";
169 $NonptrType = qr{ 174 $NonptrType = qr{
170 \b
171 (?:const\s+)? 175 (?:const\s+)?
172 (?:unsigned\s+)? 176 (?:$mods\s+)?
173 (?: 177 (?:
174 $all| 178 (?:typeof|__typeof__)\s*\(\s*\**\s*$Ident\s*\)|
175 (?:typeof|__typeof__)\s*\(\s*\**\s*$Ident\s*\) 179 (?:${all}\b)
176 ) 180 )
177 (?:\s+$Sparse|\s+const)* 181 (?:\s+$Sparse|\s+const)*
178 \b
179 }x; 182 }x;
180 $Type = qr{ 183 $Type = qr{
181 \b$NonptrType\b 184 $NonptrType
182 (?:\s*\*+\s*const|\s*\*+|(?:\s*\[\s*\])+)? 185 (?:\s*\*+\s*const|\s*\*+|(?:\s*\[\s*\])+)?
183 (?:\s+$Inline|\s+$Sparse|\s+$Attribute)* 186 (?:\s+$Inline|\s+$Sparse|\s+$Attribute|\s+$mods)*
184 }x; 187 }x;
185 $Declare = qr{(?:$Storage\s+)?$Type}; 188 $Declare = qr{(?:$Storage\s+)?$Type};
189 $Modifier = qr{(?:$Attribute|$Sparse|$mods)};
186} 190}
187build_types(); 191build_types();
188 192
@@ -329,7 +333,7 @@ sub sanitise_line {
329 $off++; 333 $off++;
330 next; 334 next;
331 } 335 }
332 if (substr($line, $off, 2) eq $sanitise_quote) { 336 if (substr($line, $off, 2) eq '*/') {
333 $sanitise_quote = ''; 337 $sanitise_quote = '';
334 substr($res, $off, 2, "$;$;"); 338 substr($res, $off, 2, "$;$;");
335 $off++; 339 $off++;
@@ -366,14 +370,14 @@ sub sanitise_line {
366 } 370 }
367 371
368 # The pathname on a #include may be surrounded by '<' and '>'. 372 # The pathname on a #include may be surrounded by '<' and '>'.
369 if ($res =~ /^.#\s*include\s+\<(.*)\>/) { 373 if ($res =~ /^.\s*\#\s*include\s+\<(.*)\>/) {
370 my $clean = 'X' x length($1); 374 my $clean = 'X' x length($1);
371 $res =~ s@\<.*\>@<$clean>@; 375 $res =~ s@\<.*\>@<$clean>@;
372 376
373 # The whole of a #error is a string. 377 # The whole of a #error is a string.
374 } elsif ($res =~ /^.#\s*(?:error|warning)\s+(.*)\b/) { 378 } elsif ($res =~ /^.\s*\#\s*(?:error|warning)\s+(.*)\b/) {
375 my $clean = 'X' x length($1); 379 my $clean = 'X' x length($1);
376 $res =~ s@(#\s*(?:error|warning)\s+).*@$1$clean@; 380 $res =~ s@(\#\s*(?:error|warning)\s+).*@$1$clean@;
377 } 381 }
378 382
379 return $res; 383 return $res;
@@ -715,7 +719,7 @@ sub annotate_values {
715 print "DECLARE($1)\n" if ($dbg_values > 1); 719 print "DECLARE($1)\n" if ($dbg_values > 1);
716 $type = 'T'; 720 $type = 'T';
717 721
718 } elsif ($cur =~ /^(#\s*define\s*$Ident)(\(?)/o) { 722 } elsif ($cur =~ /^(\#\s*define\s*$Ident)(\(?)/o) {
719 print "DEFINE($1,$2)\n" if ($dbg_values > 1); 723 print "DEFINE($1,$2)\n" if ($dbg_values > 1);
720 $av_preprocessor = 1; 724 $av_preprocessor = 1;
721 push(@av_paren_type, $type); 725 push(@av_paren_type, $type);
@@ -724,12 +728,12 @@ sub annotate_values {
724 } 728 }
725 $type = 'E'; 729 $type = 'E';
726 730
727 } elsif ($cur =~ /^(#\s*undef\s*$Ident)/o) { 731 } elsif ($cur =~ /^(\#\s*(?:undef\s*$Ident|include\b))/o) {
728 print "UNDEF($1)\n" if ($dbg_values > 1); 732 print "UNDEF($1)\n" if ($dbg_values > 1);
729 $av_preprocessor = 1; 733 $av_preprocessor = 1;
730 push(@av_paren_type, $type); 734 push(@av_paren_type, $type);
731 735
732 } elsif ($cur =~ /^(#\s*(?:ifdef|ifndef|if))/o) { 736 } elsif ($cur =~ /^(\#\s*(?:ifdef|ifndef|if))/o) {
733 print "PRE_START($1)\n" if ($dbg_values > 1); 737 print "PRE_START($1)\n" if ($dbg_values > 1);
734 $av_preprocessor = 1; 738 $av_preprocessor = 1;
735 739
@@ -737,7 +741,7 @@ sub annotate_values {
737 push(@av_paren_type, $type); 741 push(@av_paren_type, $type);
738 $type = 'E'; 742 $type = 'E';
739 743
740 } elsif ($cur =~ /^(#\s*(?:else|elif))/o) { 744 } elsif ($cur =~ /^(\#\s*(?:else|elif))/o) {
741 print "PRE_RESTART($1)\n" if ($dbg_values > 1); 745 print "PRE_RESTART($1)\n" if ($dbg_values > 1);
742 $av_preprocessor = 1; 746 $av_preprocessor = 1;
743 747
@@ -745,7 +749,7 @@ sub annotate_values {
745 749
746 $type = 'E'; 750 $type = 'E';
747 751
748 } elsif ($cur =~ /^(#\s*(?:endif))/o) { 752 } elsif ($cur =~ /^(\#\s*(?:endif))/o) {
749 print "PRE_END($1)\n" if ($dbg_values > 1); 753 print "PRE_END($1)\n" if ($dbg_values > 1);
750 754
751 $av_preprocessor = 1; 755 $av_preprocessor = 1;
@@ -837,14 +841,26 @@ sub annotate_values {
837sub possible { 841sub possible {
838 my ($possible, $line) = @_; 842 my ($possible, $line) = @_;
839 843
840 #print "CHECK<$possible>\n"; 844 print "CHECK<$possible> ($line)\n" if ($dbg_possible > 1);
841 if ($possible !~ /^(?:$Storage|$Type|DEFINE_\S+)$/ && 845 if ($possible !~ /^(?:$Storage|$Type|DEFINE_\S+)$/ &&
842 $possible ne 'goto' && $possible ne 'return' && 846 $possible ne 'goto' && $possible ne 'return' &&
843 $possible ne 'struct' && $possible ne 'enum' &&
844 $possible ne 'case' && $possible ne 'else' && 847 $possible ne 'case' && $possible ne 'else' &&
845 $possible ne 'typedef') { 848 $possible ne 'asm' &&
846 warn "POSSIBLE: $possible ($line)\n" if ($dbg_possible); 849 $possible !~ /^(typedef|struct|enum)\b/) {
847 push(@typeList, $possible); 850 # Check for modifiers.
851 $possible =~ s/\s*$Storage\s*//g;
852 $possible =~ s/\s*$Sparse\s*//g;
853 if ($possible =~ /^\s*$/) {
854
855 } elsif ($possible =~ /\s/) {
856 $possible =~ s/\s*$Type\s*//g;
857 warn "MODIFIER: $possible ($line)\n" if ($dbg_possible);
858 push(@modifierList, $possible);
859
860 } else {
861 warn "POSSIBLE: $possible ($line)\n" if ($dbg_possible);
862 push(@typeList, $possible);
863 }
848 build_types(); 864 build_types();
849 } 865 }
850} 866}
@@ -949,6 +965,7 @@ sub process {
949 } else { 965 } else {
950 $realcnt=1+1; 966 $realcnt=1+1;
951 } 967 }
968 $in_comment = 0;
952 969
953 # Guestimate if this is a continuing comment. Run 970 # Guestimate if this is a continuing comment. Run
954 # the context looking for a comment "edge". If this 971 # the context looking for a comment "edge". If this
@@ -1117,7 +1134,9 @@ sub process {
1117 ERROR("trailing whitespace\n" . $herevet); 1134 ERROR("trailing whitespace\n" . $herevet);
1118 } 1135 }
1119#80 column limit 1136#80 column limit
1120 if ($line =~ /^\+/ && !($prevrawline=~/\/\*\*/) && $length > 80) { 1137 if ($line =~ /^\+/ && $prevrawline !~ /\/\*\*/ &&
1138 $rawline !~ /^.\s*\*\s*\@$Ident\s/ && $length > 80)
1139 {
1121 WARN("line over 80 characters\n" . $herecurr); 1140 WARN("line over 80 characters\n" . $herecurr);
1122 } 1141 }
1123 1142
@@ -1159,18 +1178,20 @@ sub process {
1159 # Ignore functions being called 1178 # Ignore functions being called
1160 } elsif ($s =~ /^.\s*$Ident\s*\(/s) { 1179 } elsif ($s =~ /^.\s*$Ident\s*\(/s) {
1161 1180
1181 # declarations always start with types
1182 } elsif ($prev_values eq 'E' && $s =~ /^.\s*(?:$Storage\s+)?(?:$Inline\s+)?(?:const\s+)?((?:\s*$Ident)+)\b(?:\s+$Sparse)?\s*\**\s*(?:$Ident|\(\*[^\)]*\))\s*(?:;|=|,|\()/s) {
1183 my $type = $1;
1184 $type =~ s/\s+/ /g;
1185 possible($type, "A:" . $s);
1186
1162 # definitions in global scope can only start with types 1187 # definitions in global scope can only start with types
1163 } elsif ($s =~ /^.(?:$Storage\s+)?(?:$Inline\s+)?(?:const\s+)?($Ident)\b/s) { 1188 } elsif ($s =~ /^.(?:$Storage\s+)?(?:$Inline\s+)?(?:const\s+)?($Ident)\b/s) {
1164 possible($1, $s); 1189 possible($1, "B:" . $s);
1165
1166 # declarations always start with types
1167 } elsif ($prev_values eq 'E' && $s =~ /^.\s*(?:$Storage\s+)?(?:const\s+)?($Ident)\b(:?\s+$Sparse)?\s*\**\s*$Ident\s*(?:;|=|,)/s) {
1168 possible($1, $s);
1169 } 1190 }
1170 1191
1171 # any (foo ... *) is a pointer cast, and foo is a type 1192 # any (foo ... *) is a pointer cast, and foo is a type
1172 while ($s =~ /\(($Ident)(?:\s+$Sparse)*\s*\*+\s*\)/sg) { 1193 while ($s =~ /\(($Ident)(?:\s+$Sparse)*\s*\*+\s*\)/sg) {
1173 possible($1, $s); 1194 possible($1, "C:" . $s);
1174 } 1195 }
1175 1196
1176 # Check for any sort of function declaration. 1197 # Check for any sort of function declaration.
@@ -1184,9 +1205,9 @@ sub process {
1184 $ctx =~ s/\)[^\)]*$//; 1205 $ctx =~ s/\)[^\)]*$//;
1185 1206
1186 for my $arg (split(/\s*,\s*/, $ctx)) { 1207 for my $arg (split(/\s*,\s*/, $ctx)) {
1187 if ($arg =~ /^(?:const\s+)?($Ident)(?:\s+$Sparse)*\s*\**\s*(:?\b$Ident)?$/ || $arg =~ /^($Ident)$/) { 1208 if ($arg =~ /^(?:const\s+)?($Ident)(?:\s+$Sparse)*\s*\**\s*(:?\b$Ident)?$/s || $arg =~ /^($Ident)$/s) {
1188 1209
1189 possible($1, $s); 1210 possible($1, "D:" . $s);
1190 } 1211 }
1191 } 1212 }
1192 } 1213 }
@@ -1221,7 +1242,7 @@ sub process {
1221 1242
1222# if/while/etc brace do not go on next line, unless defining a do while loop, 1243# if/while/etc brace do not go on next line, unless defining a do while loop,
1223# or if that brace on the next line is for something else 1244# or if that brace on the next line is for something else
1224 if ($line =~ /(.*)\b((?:if|while|for|switch)\s*\(|do\b|else\b)/ && $line !~ /^.#/) { 1245 if ($line =~ /(.*)\b((?:if|while|for|switch)\s*\(|do\b|else\b)/ && $line !~ /^.\s*\#/) {
1225 my $pre_ctx = "$1$2"; 1246 my $pre_ctx = "$1$2";
1226 1247
1227 my ($level, @ctx) = ctx_statement_level($linenr, $realcnt, 0); 1248 my ($level, @ctx) = ctx_statement_level($linenr, $realcnt, 0);
@@ -1239,7 +1260,7 @@ sub process {
1239 1260
1240 if ($ctx !~ /{\s*/ && defined($lines[$ctx_ln -1]) && $lines[$ctx_ln - 1] =~ /^\+\s*{/) { 1261 if ($ctx !~ /{\s*/ && defined($lines[$ctx_ln -1]) && $lines[$ctx_ln - 1] =~ /^\+\s*{/) {
1241 ERROR("that open brace { should be on the previous line\n" . 1262 ERROR("that open brace { should be on the previous line\n" .
1242 "$here\n$ctx\n$lines[$ctx_ln - 1]"); 1263 "$here\n$ctx\n$lines[$ctx_ln - 1]\n");
1243 } 1264 }
1244 if ($level == 0 && $pre_ctx !~ /}\s*while\s*\($/ && 1265 if ($level == 0 && $pre_ctx !~ /}\s*while\s*\($/ &&
1245 $ctx =~ /\)\s*\;\s*$/ && 1266 $ctx =~ /\)\s*\;\s*$/ &&
@@ -1248,7 +1269,7 @@ sub process {
1248 my ($nlength, $nindent) = line_stats($lines[$ctx_ln - 1]); 1269 my ($nlength, $nindent) = line_stats($lines[$ctx_ln - 1]);
1249 if ($nindent > $indent) { 1270 if ($nindent > $indent) {
1250 WARN("trailing semicolon indicates no statements, indent implies otherwise\n" . 1271 WARN("trailing semicolon indicates no statements, indent implies otherwise\n" .
1251 "$here\n$ctx\n$lines[$ctx_ln - 1]"); 1272 "$here\n$ctx\n$lines[$ctx_ln - 1]\n");
1252 } 1273 }
1253 } 1274 }
1254 } 1275 }
@@ -1284,7 +1305,7 @@ sub process {
1284# 1305#
1285 1306
1286# check for malformed paths in #include statements (uses RAW line) 1307# check for malformed paths in #include statements (uses RAW line)
1287 if ($rawline =~ m{^.#\s*include\s+[<"](.*)[">]}) { 1308 if ($rawline =~ m{^.\s*\#\s*include\s+[<"](.*)[">]}) {
1288 my $path = $1; 1309 my $path = $1;
1289 if ($path =~ m{//}) { 1310 if ($path =~ m{//}) {
1290 ERROR("malformed #include filename\n" . 1311 ERROR("malformed #include filename\n" .
@@ -1316,7 +1337,7 @@ sub process {
1316 } 1337 }
1317 1338
1318# check for external initialisers. 1339# check for external initialisers.
1319 if ($line =~ /^.$Type\s*$Ident\s*=\s*(0|NULL|false)\s*;/) { 1340 if ($line =~ /^.$Type\s*$Ident\s*(?:\s+$Modifier)*\s*=\s*(0|NULL|false)\s*;/) {
1320 ERROR("do not initialise externals to 0 or NULL\n" . 1341 ERROR("do not initialise externals to 0 or NULL\n" .
1321 $herecurr); 1342 $herecurr);
1322 } 1343 }
@@ -1330,6 +1351,7 @@ sub process {
1330# make sense. 1351# make sense.
1331 if ($line =~ /\btypedef\s/ && 1352 if ($line =~ /\btypedef\s/ &&
1332 $line !~ /\btypedef\s+$Type\s+\(\s*\*?$Ident\s*\)\s*\(/ && 1353 $line !~ /\btypedef\s+$Type\s+\(\s*\*?$Ident\s*\)\s*\(/ &&
1354 $line !~ /\btypedef\s+$Type\s+$Ident\s*\(/ &&
1333 $line !~ /\b__bitwise(?:__|)\b/) { 1355 $line !~ /\b__bitwise(?:__|)\b/) {
1334 WARN("do not add new typedefs\n" . $herecurr); 1356 WARN("do not add new typedefs\n" . $herecurr);
1335 } 1357 }
@@ -1388,8 +1410,8 @@ sub process {
1388 1410
1389# function brace can't be on same line, except for #defines of do while, 1411# function brace can't be on same line, except for #defines of do while,
1390# or if closed on same line 1412# or if closed on same line
1391 if (($line=~/$Type\s*[A-Za-z\d_]+\(.*\).*\s{/) and 1413 if (($line=~/$Type\s*$Ident\(.*\).*\s{/) and
1392 !($line=~/\#define.*do\s{/) and !($line=~/}/)) { 1414 !($line=~/\#\s*define.*do\s{/) and !($line=~/}/)) {
1393 ERROR("open brace '{' following function declarations go on the next line\n" . $herecurr); 1415 ERROR("open brace '{' following function declarations go on the next line\n" . $herecurr);
1394 } 1416 }
1395 1417
@@ -1416,10 +1438,10 @@ sub process {
1416 # cpp #define statements have non-optional spaces, ie 1438 # cpp #define statements have non-optional spaces, ie
1417 # if there is a space between the name and the open 1439 # if there is a space between the name and the open
1418 # parenthesis it is simply not a parameter group. 1440 # parenthesis it is simply not a parameter group.
1419 } elsif ($ctx_before =~ /^.\#\s*define\s*$/) { 1441 } elsif ($ctx_before =~ /^.\s*\#\s*define\s*$/) {
1420 1442
1421 # cpp #elif statement condition may start with a ( 1443 # cpp #elif statement condition may start with a (
1422 } elsif ($ctx =~ /^.\#\s*elif\s*$/) { 1444 } elsif ($ctx =~ /^.\s*\#\s*elif\s*$/) {
1423 1445
1424 # If this whole things ends with a type its most 1446 # If this whole things ends with a type its most
1425 # likely a typedef for a function. 1447 # likely a typedef for a function.
@@ -1625,13 +1647,14 @@ sub process {
1625 ERROR("space prohibited before that close square bracket ']'\n" . $herecurr); 1647 ERROR("space prohibited before that close square bracket ']'\n" . $herecurr);
1626 } 1648 }
1627 1649
1628# check spacing on paretheses 1650# check spacing on parentheses
1629 if ($line =~ /\(\s/ && $line !~ /\(\s*(?:\\)?$/ && 1651 if ($line =~ /\(\s/ && $line !~ /\(\s*(?:\\)?$/ &&
1630 $line !~ /for\s*\(\s+;/) { 1652 $line !~ /for\s*\(\s+;/) {
1631 ERROR("space prohibited after that open parenthesis '('\n" . $herecurr); 1653 ERROR("space prohibited after that open parenthesis '('\n" . $herecurr);
1632 } 1654 }
1633 if ($line =~ /(\s+)\)/ && $line !~ /^.\s*\)/ && 1655 if ($line =~ /(\s+)\)/ && $line !~ /^.\s*\)/ &&
1634 $line !~ /for\s*\(.*;\s+\)/) { 1656 $line !~ /for\s*\(.*;\s+\)/ &&
1657 $line !~ /:\s+\)/) {
1635 ERROR("space prohibited before that close parenthesis ')'\n" . $herecurr); 1658 ERROR("space prohibited before that close parenthesis ')'\n" . $herecurr);
1636 } 1659 }
1637 1660
@@ -1641,6 +1664,23 @@ sub process {
1641 WARN("labels should not be indented\n" . $herecurr); 1664 WARN("labels should not be indented\n" . $herecurr);
1642 } 1665 }
1643 1666
1667# Return is not a function.
1668 if (defined($stat) && $stat =~ /^.\s*return(\s*)(\(.*);/s) {
1669 my $spacing = $1;
1670 my $value = $2;
1671
1672 # Flatten any parentheses and braces
1673 while ($value =~ s/\([^\(\)]*\)/1/) {
1674 }
1675
1676 if ($value =~ /^(?:$Ident|-?$Constant)$/) {
1677 ERROR("return is not a function, parentheses are not required\n" . $herecurr);
1678
1679 } elsif ($spacing !~ /\s+/) {
1680 ERROR("space required before the open parenthesis '('\n" . $herecurr);
1681 }
1682 }
1683
1644# Need a space before open parenthesis after if, while etc 1684# Need a space before open parenthesis after if, while etc
1645 if ($line=~/\b(if|while|for|switch)\(/) { 1685 if ($line=~/\b(if|while|for|switch)\(/) {
1646 ERROR("space required before the open parenthesis '('\n" . $herecurr); 1686 ERROR("space required before the open parenthesis '('\n" . $herecurr);
@@ -1660,7 +1700,7 @@ sub process {
1660 $s =~ s/\n.*//g; 1700 $s =~ s/\n.*//g;
1661 $s =~ s/$;//g; # Remove any comments 1701 $s =~ s/$;//g; # Remove any comments
1662 if (length($c) && $s !~ /^\s*({|;|)\s*\\*\s*$/ && 1702 if (length($c) && $s !~ /^\s*({|;|)\s*\\*\s*$/ &&
1663 $c !~ /^.\#\s*if/) 1703 $c !~ /^.\s*\#\s*if/)
1664 { 1704 {
1665 ERROR("trailing statements should be on next line\n" . $herecurr); 1705 ERROR("trailing statements should be on next line\n" . $herecurr);
1666 } 1706 }
@@ -1719,14 +1759,16 @@ sub process {
1719# } 1759# }
1720 1760
1721#no spaces allowed after \ in define 1761#no spaces allowed after \ in define
1722 if ($line=~/\#define.*\\\s$/) { 1762 if ($line=~/\#\s*define.*\\\s$/) {
1723 WARN("Whitepspace after \\ makes next lines useless\n" . $herecurr); 1763 WARN("Whitepspace after \\ makes next lines useless\n" . $herecurr);
1724 } 1764 }
1725 1765
1726#warn if <asm/foo.h> is #included and <linux/foo.h> is available (uses RAW line) 1766#warn if <asm/foo.h> is #included and <linux/foo.h> is available (uses RAW line)
1727 if ($tree && $rawline =~ m{^.\#\s*include\s*\<asm\/(.*)\.h\>}) { 1767 if ($tree && $rawline =~ m{^.\s*\#\s*include\s*\<asm\/(.*)\.h\>}) {
1728 my $checkfile = "$root/include/linux/$1.h"; 1768 my $checkfile = "include/linux/$1.h";
1729 if (-f $checkfile && $1 ne 'irq') { 1769 if (-f "$root/$checkfile" && $realfile ne $checkfile &&
1770 $1 ne 'irq')
1771 {
1730 WARN("Use #include <linux/$1.h> instead of <asm/$1.h>\n" . 1772 WARN("Use #include <linux/$1.h> instead of <asm/$1.h>\n" .
1731 $herecurr); 1773 $herecurr);
1732 } 1774 }
@@ -1735,45 +1777,87 @@ sub process {
1735# multi-statement macros should be enclosed in a do while loop, grab the 1777# multi-statement macros should be enclosed in a do while loop, grab the
1736# first statement and ensure its the whole macro if its not enclosed 1778# first statement and ensure its the whole macro if its not enclosed
1737# in a known good container 1779# in a known good container
1738 if ($prevline =~ /\#define.*\\/ && 1780 if ($line =~ /^.\s*\#\s*define\s*$Ident(\()?/) {
1739 $prevline !~/(?:do\s+{|\(\{|\{)/ &&
1740 $line !~ /(?:do\s+{|\(\{|\{)/ &&
1741 $line !~ /^.\s*$Declare\s/) {
1742 # Grab the first statement, if that is the entire macro
1743 # its ok. This may start either on the #define line
1744 # or the one below.
1745 my $ln = $linenr; 1781 my $ln = $linenr;
1746 my $cnt = $realcnt; 1782 my $cnt = $realcnt;
1747 my $off = 0; 1783 my ($off, $dstat, $dcond, $rest);
1784 my $ctx = '';
1748 1785
1749 # If the macro starts on the define line start 1786 my $args = defined($1);
1750 # grabbing the statement after the identifier 1787
1751 $prevline =~ m{^(.#\s*define\s*$Ident(?:\([^\)]*\))?\s*)(.*)\\\s*$}; 1788 # Find the end of the macro and limit our statement
1752 ##print "1<$1> 2<$2>\n"; 1789 # search to that.
1753 if (defined $2 && $2 ne '') { 1790 while ($cnt > 0 && defined $lines[$ln - 1] &&
1754 $off = length($1); 1791 $lines[$ln - 1] =~ /^(?:-|..*\\$)/)
1755 $ln--; 1792 {
1756 $cnt++; 1793 $ctx .= $rawlines[$ln - 1] . "\n";
1757 while ($lines[$ln - 1] =~ /^-/) { 1794 $ln++;
1758 $ln--; 1795 $cnt--;
1759 $cnt++; 1796 }
1760 } 1797 $ctx .= $rawlines[$ln - 1];
1798
1799 ($dstat, $dcond, $ln, $cnt, $off) =
1800 ctx_statement_block($linenr, $ln - $linenr + 1, 0);
1801 #print "dstat<$dstat> dcond<$dcond> cnt<$cnt> off<$off>\n";
1802 #print "LINE<$lines[$ln]> len<" . length($lines[$ln]) . "\n";
1803
1804 # Extract the remainder of the define (if any) and
1805 # rip off surrounding spaces, and trailing \'s.
1806 $rest = '';
1807 if (defined $lines[$ln - 1] &&
1808 $off > length($lines[$ln - 1]))
1809 {
1810 $ln++;
1811 $cnt--;
1812 $off = 0;
1813 }
1814 while ($cnt > 0) {
1815 $rest .= substr($lines[$ln - 1], $off) . "\n";
1816 $ln++;
1817 $cnt--;
1818 $off = 0;
1819 }
1820 $rest =~ s/\\\n.//g;
1821 $rest =~ s/^\s*//s;
1822 $rest =~ s/\s*$//s;
1823
1824 # Clean up the original statement.
1825 if ($args) {
1826 substr($dstat, 0, length($dcond), '');
1827 } else {
1828 $dstat =~ s/^.\s*\#\s*define\s+$Ident\s*//;
1761 } 1829 }
1762 my @ctx = ctx_statement($ln, $cnt, $off); 1830 $dstat =~ s/\\\n.//g;
1763 my $ctx_ln = $ln + $#ctx + 1; 1831 $dstat =~ s/^\s*//s;
1764 my $ctx = join("\n", @ctx); 1832 $dstat =~ s/\s*$//s;
1765 1833
1766 # Pull in any empty extension lines. 1834 # Flatten any parentheses and braces
1767 while ($ctx =~ /\\$/ && 1835 while ($dstat =~ s/\([^\(\)]*\)/1/) {
1768 $lines[$ctx_ln - 1] =~ /^.\s*(?:\\)?$/) { 1836 }
1769 $ctx .= $lines[$ctx_ln - 1]; 1837 while ($dstat =~ s/\{[^\{\}]*\}/1/) {
1770 $ctx_ln++;
1771 } 1838 }
1772 1839
1773 if ($ctx =~ /\\$/) { 1840 my $exceptions = qr{
1774 if ($ctx =~ /;/) { 1841 $Declare|
1842 module_param_named|
1843 MODULE_PARAM_DESC|
1844 DECLARE_PER_CPU|
1845 DEFINE_PER_CPU|
1846 __typeof__\(
1847 }x;
1848 if ($rest ne '') {
1849 if ($rest !~ /while\s*\(/ &&
1850 $dstat !~ /$exceptions/)
1851 {
1775 ERROR("Macros with multiple statements should be enclosed in a do - while loop\n" . "$here\n$ctx\n"); 1852 ERROR("Macros with multiple statements should be enclosed in a do - while loop\n" . "$here\n$ctx\n");
1776 } else { 1853 }
1854
1855 } elsif ($ctx !~ /;/) {
1856 if ($dstat ne '' &&
1857 $dstat !~ /^(?:$Ident|-?$Constant)$/ &&
1858 $dstat !~ /$exceptions/ &&
1859 $dstat =~ /$Operators/)
1860 {
1777 ERROR("Macros with complex values should be enclosed in parenthesis\n" . "$here\n$ctx\n"); 1861 ERROR("Macros with complex values should be enclosed in parenthesis\n" . "$here\n$ctx\n");
1778 } 1862 }
1779 } 1863 }
@@ -1884,7 +1968,7 @@ sub process {
1884 1968
1885# don't include deprecated include files (uses RAW line) 1969# don't include deprecated include files (uses RAW line)
1886 for my $inc (@dep_includes) { 1970 for my $inc (@dep_includes) {
1887 if ($rawline =~ m@\#\s*include\s*\<$inc>@) { 1971 if ($rawline =~ m@^.\s*\#\s*include\s*\<$inc>@) {
1888 ERROR("Don't use <$inc>: see Documentation/feature-removal-schedule.txt\n" . $herecurr); 1972 ERROR("Don't use <$inc>: see Documentation/feature-removal-schedule.txt\n" . $herecurr);
1889 } 1973 }
1890 } 1974 }
@@ -1908,7 +1992,7 @@ sub process {
1908 } 1992 }
1909 1993
1910# warn about #if 0 1994# warn about #if 0
1911 if ($line =~ /^.#\s*if\s+0\b/) { 1995 if ($line =~ /^.\s*\#\s*if\s+0\b/) {
1912 CHK("if this code is redundant consider removing it\n" . 1996 CHK("if this code is redundant consider removing it\n" .
1913 $herecurr); 1997 $herecurr);
1914 } 1998 }
@@ -1920,23 +2004,16 @@ sub process {
1920 WARN("kfree(NULL) is safe this check is probabally not required\n" . $hereprev); 2004 WARN("kfree(NULL) is safe this check is probabally not required\n" . $hereprev);
1921 } 2005 }
1922 } 2006 }
1923# check for needless usb_free_urb() checks
1924 if ($prevline =~ /\bif\s*\(([^\)]*)\)/) {
1925 my $expr = $1;
1926 if ($line =~ /\busb_free_urb\(\Q$expr\E\);/) {
1927 WARN("usb_free_urb(NULL) is safe this check is probabally not required\n" . $hereprev);
1928 }
1929 }
1930 2007
1931# warn about #ifdefs in C files 2008# warn about #ifdefs in C files
1932# if ($line =~ /^.#\s*if(|n)def/ && ($realfile =~ /\.c$/)) { 2009# if ($line =~ /^.\s*\#\s*if(|n)def/ && ($realfile =~ /\.c$/)) {
1933# print "#ifdef in C files should be avoided\n"; 2010# print "#ifdef in C files should be avoided\n";
1934# print "$herecurr"; 2011# print "$herecurr";
1935# $clean = 0; 2012# $clean = 0;
1936# } 2013# }
1937 2014
1938# warn about spacing in #ifdefs 2015# warn about spacing in #ifdefs
1939 if ($line =~ /^.#\s*(ifdef|ifndef|elif)\s\s+/) { 2016 if ($line =~ /^.\s*\#\s*(ifdef|ifndef|elif)\s\s+/) {
1940 ERROR("exactly one space required after that #$1\n" . $herecurr); 2017 ERROR("exactly one space required after that #$1\n" . $herecurr);
1941 } 2018 }
1942 2019
@@ -1955,7 +2032,7 @@ sub process {
1955 } 2032 }
1956 } 2033 }
1957# check of hardware specific defines 2034# check of hardware specific defines
1958 if ($line =~ m@^.#\s*if.*\b(__i386__|__powerpc64__|__sun__|__s390x__)\b@ && $realfile !~ m@include/asm-@) { 2035 if ($line =~ m@^.\s*\#\s*if.*\b(__i386__|__powerpc64__|__sun__|__s390x__)\b@ && $realfile !~ m@include/asm-@) {
1959 CHK("architecture specific defines should be avoided\n" . $herecurr); 2036 CHK("architecture specific defines should be avoided\n" . $herecurr);
1960 } 2037 }
1961 2038
@@ -1973,15 +2050,18 @@ sub process {
1973 2050
1974# check for new externs in .c files. 2051# check for new externs in .c files.
1975 if ($realfile =~ /\.c$/ && defined $stat && 2052 if ($realfile =~ /\.c$/ && defined $stat &&
1976 $stat =~ /^.\s*(?:extern\s+)?$Type\s+$Ident(\s*)\(/s) 2053 $stat =~ /^.\s*(?:extern\s+)?$Type\s+($Ident)(\s*)\(/s)
1977 { 2054 {
1978 my $paren_space = $1; 2055 my $function_name = $1;
2056 my $paren_space = $2;
1979 2057
1980 my $s = $stat; 2058 my $s = $stat;
1981 if (defined $cond) { 2059 if (defined $cond) {
1982 substr($s, 0, length($cond), ''); 2060 substr($s, 0, length($cond), '');
1983 } 2061 }
1984 if ($s =~ /^\s*;/) { 2062 if ($s =~ /^\s*;/ &&
2063 $function_name ne 'uninitialized_var')
2064 {
1985 WARN("externs should be avoided in .c files\n" . $herecurr); 2065 WARN("externs should be avoided in .c files\n" . $herecurr);
1986 } 2066 }
1987 2067
@@ -2030,8 +2110,8 @@ sub process {
2030# use of NR_CPUS is usually wrong 2110# use of NR_CPUS is usually wrong
2031# ignore definitions of NR_CPUS and usage to define arrays as likely right 2111# ignore definitions of NR_CPUS and usage to define arrays as likely right
2032 if ($line =~ /\bNR_CPUS\b/ && 2112 if ($line =~ /\bNR_CPUS\b/ &&
2033 $line !~ /^.#\s*if\b.*\bNR_CPUS\b/ && 2113 $line !~ /^.\s*\s*#\s*if\b.*\bNR_CPUS\b/ &&
2034 $line !~ /^.#\s*define\b.*\bNR_CPUS\b/ && 2114 $line !~ /^.\s*\s*#\s*define\b.*\bNR_CPUS\b/ &&
2035 $line !~ /^.\s*$Declare\s.*\[[^\]]*NR_CPUS[^\]]*\]/ && 2115 $line !~ /^.\s*$Declare\s.*\[[^\]]*NR_CPUS[^\]]*\]/ &&
2036 $line !~ /\[[^\]]*\.\.\.[^\]]*NR_CPUS[^\]]*\]/ && 2116 $line !~ /\[[^\]]*\.\.\.[^\]]*NR_CPUS[^\]]*\]/ &&
2037 $line !~ /\[[^\]]*NR_CPUS[^\]]*\.\.\.[^\]]*\]/) 2117 $line !~ /\[[^\]]*NR_CPUS[^\]]*\.\.\.[^\]]*\]/)
diff --git a/scripts/decodecode b/scripts/decodecode
index 235d3938529d..235d3938529d 100644..100755
--- a/scripts/decodecode
+++ b/scripts/decodecode
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 508c5895c680..a07f91aac920 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -467,6 +467,25 @@ static void parse_elf_finish(struct elf_info *info)
467 release_file(info->hdr, info->size); 467 release_file(info->hdr, info->size);
468} 468}
469 469
470static int ignore_undef_symbol(struct elf_info *info, const char *symname)
471{
472 /* ignore __this_module, it will be resolved shortly */
473 if (strcmp(symname, MODULE_SYMBOL_PREFIX "__this_module") == 0)
474 return 1;
475 /* ignore global offset table */
476 if (strcmp(symname, "_GLOBAL_OFFSET_TABLE_") == 0)
477 return 1;
478 if (info->hdr->e_machine == EM_PPC)
479 /* Special register function linked on all modules during final link of .ko */
480 if (strncmp(symname, "_restgpr_", sizeof("_restgpr_") - 1) == 0 ||
481 strncmp(symname, "_savegpr_", sizeof("_savegpr_") - 1) == 0 ||
482 strncmp(symname, "_rest32gpr_", sizeof("_rest32gpr_") - 1) == 0 ||
483 strncmp(symname, "_save32gpr_", sizeof("_save32gpr_") - 1) == 0)
484 return 1;
485 /* Do not ignore this symbol */
486 return 0;
487}
488
470#define CRC_PFX MODULE_SYMBOL_PREFIX "__crc_" 489#define CRC_PFX MODULE_SYMBOL_PREFIX "__crc_"
471#define KSYMTAB_PFX MODULE_SYMBOL_PREFIX "__ksymtab_" 490#define KSYMTAB_PFX MODULE_SYMBOL_PREFIX "__ksymtab_"
472 491
@@ -493,11 +512,7 @@ static void handle_modversions(struct module *mod, struct elf_info *info,
493 if (ELF_ST_BIND(sym->st_info) != STB_GLOBAL && 512 if (ELF_ST_BIND(sym->st_info) != STB_GLOBAL &&
494 ELF_ST_BIND(sym->st_info) != STB_WEAK) 513 ELF_ST_BIND(sym->st_info) != STB_WEAK)
495 break; 514 break;
496 /* ignore global offset table */ 515 if (ignore_undef_symbol(info, symname))
497 if (strcmp(symname, "_GLOBAL_OFFSET_TABLE_") == 0)
498 break;
499 /* ignore __this_module, it will be resolved shortly */
500 if (strcmp(symname, MODULE_SYMBOL_PREFIX "__this_module") == 0)
501 break; 516 break;
502/* cope with newer glibc (2.3.4 or higher) STT_ definition in elf.h */ 517/* cope with newer glibc (2.3.4 or higher) STT_ definition in elf.h */
503#if defined(STT_REGISTER) || defined(STT_SPARC_REGISTER) 518#if defined(STT_REGISTER) || defined(STT_SPARC_REGISTER)
diff --git a/scripts/ver_linux b/scripts/ver_linux
index ab69ecefedbd..7ac0e309be09 100755
--- a/scripts/ver_linux
+++ b/scripts/ver_linux
@@ -12,12 +12,9 @@ echo ' '
12uname -a 12uname -a
13echo ' ' 13echo ' '
14 14
15gcc --version 2>&1| head -n 1 | grep -v gcc | awk \ 15gcc -dumpversion 2>&1| awk \
16'NR==1{print "Gnu C ", $1}' 16'NR==1{print "Gnu C ", $1}'
17 17
18gcc --version 2>&1| grep gcc | awk \
19'NR==1{print "Gnu C ", $3}'
20
21make --version 2>&1 | awk -F, '{print $1}' | awk \ 18make --version 2>&1 | awk -F, '{print $1}' | awk \
22 '/GNU Make/{print "Gnu make ",$NF}' 19 '/GNU Make/{print "Gnu make ",$NF}'
23 20
diff --git a/security/commoncap.c b/security/commoncap.c
index 5edabc7542ae..33d343308413 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -103,10 +103,16 @@ static inline int cap_inh_is_capped(void)
103 return (cap_capable(current, CAP_SETPCAP) != 0); 103 return (cap_capable(current, CAP_SETPCAP) != 0);
104} 104}
105 105
106static inline int cap_limit_ptraced_target(void) { return 1; }
107
106#else /* ie., ndef CONFIG_SECURITY_FILE_CAPABILITIES */ 108#else /* ie., ndef CONFIG_SECURITY_FILE_CAPABILITIES */
107 109
108static inline int cap_block_setpcap(struct task_struct *t) { return 0; } 110static inline int cap_block_setpcap(struct task_struct *t) { return 0; }
109static inline int cap_inh_is_capped(void) { return 1; } 111static inline int cap_inh_is_capped(void) { return 1; }
112static inline int cap_limit_ptraced_target(void)
113{
114 return !capable(CAP_SETPCAP);
115}
110 116
111#endif /* def CONFIG_SECURITY_FILE_CAPABILITIES */ 117#endif /* def CONFIG_SECURITY_FILE_CAPABILITIES */
112 118
@@ -342,9 +348,10 @@ void cap_bprm_apply_creds (struct linux_binprm *bprm, int unsafe)
342 bprm->e_uid = current->uid; 348 bprm->e_uid = current->uid;
343 bprm->e_gid = current->gid; 349 bprm->e_gid = current->gid;
344 } 350 }
345 if (!capable (CAP_SETPCAP)) { 351 if (cap_limit_ptraced_target()) {
346 new_permitted = cap_intersect (new_permitted, 352 new_permitted =
347 current->cap_permitted); 353 cap_intersect(new_permitted,
354 current->cap_permitted);
348 } 355 }
349 } 356 }
350 } 357 }
diff --git a/security/device_cgroup.c b/security/device_cgroup.c
index 4ea583689eec..fd764a0858d0 100644
--- a/security/device_cgroup.c
+++ b/security/device_cgroup.c
@@ -49,10 +49,14 @@ struct dev_cgroup {
49 spinlock_t lock; 49 spinlock_t lock;
50}; 50};
51 51
52static inline struct dev_cgroup *css_to_devcgroup(struct cgroup_subsys_state *s)
53{
54 return container_of(s, struct dev_cgroup, css);
55}
56
52static inline struct dev_cgroup *cgroup_to_devcgroup(struct cgroup *cgroup) 57static inline struct dev_cgroup *cgroup_to_devcgroup(struct cgroup *cgroup)
53{ 58{
54 return container_of(cgroup_subsys_state(cgroup, devices_subsys_id), 59 return css_to_devcgroup(cgroup_subsys_state(cgroup, devices_subsys_id));
55 struct dev_cgroup, css);
56} 60}
57 61
58struct cgroup_subsys devices_subsys; 62struct cgroup_subsys devices_subsys;
@@ -102,7 +106,7 @@ free_and_exit:
102static int dev_whitelist_add(struct dev_cgroup *dev_cgroup, 106static int dev_whitelist_add(struct dev_cgroup *dev_cgroup,
103 struct dev_whitelist_item *wh) 107 struct dev_whitelist_item *wh)
104{ 108{
105 struct dev_whitelist_item *whcopy; 109 struct dev_whitelist_item *whcopy, *walk;
106 110
107 whcopy = kmalloc(sizeof(*whcopy), GFP_KERNEL); 111 whcopy = kmalloc(sizeof(*whcopy), GFP_KERNEL);
108 if (!whcopy) 112 if (!whcopy)
@@ -110,7 +114,21 @@ static int dev_whitelist_add(struct dev_cgroup *dev_cgroup,
110 114
111 memcpy(whcopy, wh, sizeof(*whcopy)); 115 memcpy(whcopy, wh, sizeof(*whcopy));
112 spin_lock(&dev_cgroup->lock); 116 spin_lock(&dev_cgroup->lock);
113 list_add_tail(&whcopy->list, &dev_cgroup->whitelist); 117 list_for_each_entry(walk, &dev_cgroup->whitelist, list) {
118 if (walk->type != wh->type)
119 continue;
120 if (walk->major != wh->major)
121 continue;
122 if (walk->minor != wh->minor)
123 continue;
124
125 walk->access |= wh->access;
126 kfree(whcopy);
127 whcopy = NULL;
128 }
129
130 if (whcopy != NULL)
131 list_add_tail(&whcopy->list, &dev_cgroup->whitelist);
114 spin_unlock(&dev_cgroup->lock); 132 spin_unlock(&dev_cgroup->lock);
115 return 0; 133 return 0;
116} 134}
@@ -364,6 +382,8 @@ static ssize_t devcgroup_access_write(struct cgroup *cgroup, struct cftype *cft,
364 case 'a': 382 case 'a':
365 wh.type = DEV_ALL; 383 wh.type = DEV_ALL;
366 wh.access = ACC_MASK; 384 wh.access = ACC_MASK;
385 wh.major = ~0;
386 wh.minor = ~0;
367 goto handle; 387 goto handle;
368 case 'b': 388 case 'b':
369 wh.type = DEV_BLOCK; 389 wh.type = DEV_BLOCK;
@@ -502,7 +522,6 @@ struct cgroup_subsys devices_subsys = {
502 522
503int devcgroup_inode_permission(struct inode *inode, int mask) 523int devcgroup_inode_permission(struct inode *inode, int mask)
504{ 524{
505 struct cgroup *cgroup;
506 struct dev_cgroup *dev_cgroup; 525 struct dev_cgroup *dev_cgroup;
507 struct dev_whitelist_item *wh; 526 struct dev_whitelist_item *wh;
508 527
@@ -511,8 +530,8 @@ int devcgroup_inode_permission(struct inode *inode, int mask)
511 return 0; 530 return 0;
512 if (!S_ISBLK(inode->i_mode) && !S_ISCHR(inode->i_mode)) 531 if (!S_ISBLK(inode->i_mode) && !S_ISCHR(inode->i_mode))
513 return 0; 532 return 0;
514 cgroup = task_cgroup(current, devices_subsys.subsys_id); 533 dev_cgroup = css_to_devcgroup(task_subsys_state(current,
515 dev_cgroup = cgroup_to_devcgroup(cgroup); 534 devices_subsys_id));
516 if (!dev_cgroup) 535 if (!dev_cgroup)
517 return 0; 536 return 0;
518 537
@@ -543,12 +562,11 @@ acc_check:
543 562
544int devcgroup_inode_mknod(int mode, dev_t dev) 563int devcgroup_inode_mknod(int mode, dev_t dev)
545{ 564{
546 struct cgroup *cgroup;
547 struct dev_cgroup *dev_cgroup; 565 struct dev_cgroup *dev_cgroup;
548 struct dev_whitelist_item *wh; 566 struct dev_whitelist_item *wh;
549 567
550 cgroup = task_cgroup(current, devices_subsys.subsys_id); 568 dev_cgroup = css_to_devcgroup(task_subsys_state(current,
551 dev_cgroup = cgroup_to_devcgroup(cgroup); 569 devices_subsys_id));
552 if (!dev_cgroup) 570 if (!dev_cgroup)
553 return 0; 571 return 0;
554 572
diff --git a/security/dummy.c b/security/dummy.c
index f50c6c3c32c9..b8916883b77f 100644
--- a/security/dummy.c
+++ b/security/dummy.c
@@ -27,6 +27,8 @@
27#include <linux/hugetlb.h> 27#include <linux/hugetlb.h>
28#include <linux/ptrace.h> 28#include <linux/ptrace.h>
29#include <linux/file.h> 29#include <linux/file.h>
30#include <linux/prctl.h>
31#include <linux/securebits.h>
30 32
31static int dummy_ptrace (struct task_struct *parent, struct task_struct *child) 33static int dummy_ptrace (struct task_struct *parent, struct task_struct *child)
32{ 34{
@@ -607,7 +609,27 @@ static int dummy_task_kill (struct task_struct *p, struct siginfo *info,
607static int dummy_task_prctl (int option, unsigned long arg2, unsigned long arg3, 609static int dummy_task_prctl (int option, unsigned long arg2, unsigned long arg3,
608 unsigned long arg4, unsigned long arg5, long *rc_p) 610 unsigned long arg4, unsigned long arg5, long *rc_p)
609{ 611{
610 return 0; 612 switch (option) {
613 case PR_CAPBSET_READ:
614 *rc_p = (cap_valid(arg2) ? 1 : -EINVAL);
615 break;
616 case PR_GET_KEEPCAPS:
617 *rc_p = issecure(SECURE_KEEP_CAPS);
618 break;
619 case PR_SET_KEEPCAPS:
620 if (arg2 > 1)
621 *rc_p = -EINVAL;
622 else if (arg2)
623 current->securebits |= issecure_mask(SECURE_KEEP_CAPS);
624 else
625 current->securebits &=
626 ~issecure_mask(SECURE_KEEP_CAPS);
627 break;
628 default:
629 return 0;
630 }
631
632 return 1;
611} 633}
612 634
613static void dummy_task_reparent_to_init (struct task_struct *p) 635static void dummy_task_reparent_to_init (struct task_struct *p)
diff --git a/security/keys/internal.h b/security/keys/internal.h
index 8c05587f5018..b39f5c2e2c4b 100644
--- a/security/keys/internal.h
+++ b/security/keys/internal.h
@@ -78,7 +78,6 @@ extern unsigned key_quota_maxbytes;
78 78
79extern struct rb_root key_serial_tree; 79extern struct rb_root key_serial_tree;
80extern spinlock_t key_serial_lock; 80extern spinlock_t key_serial_lock;
81extern struct semaphore key_alloc_sem;
82extern struct mutex key_construction_mutex; 81extern struct mutex key_construction_mutex;
83extern wait_queue_head_t request_key_conswq; 82extern wait_queue_head_t request_key_conswq;
84 83
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index b5c8f9237008..4a09293efa00 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -1881,6 +1881,18 @@ static void smack_d_instantiate(struct dentry *opt_dentry, struct inode *inode)
1881 final = sbsp->smk_default; 1881 final = sbsp->smk_default;
1882 1882
1883 /* 1883 /*
1884 * If this is the root inode the superblock
1885 * may be in the process of initialization.
1886 * If that is the case use the root value out
1887 * of the superblock.
1888 */
1889 if (opt_dentry->d_parent == opt_dentry) {
1890 isp->smk_inode = sbsp->smk_root;
1891 isp->smk_flags |= SMK_INODE_INSTANT;
1892 goto unlockandout;
1893 }
1894
1895 /*
1884 * This is pretty hackish. 1896 * This is pretty hackish.
1885 * Casey says that we shouldn't have to do 1897 * Casey says that we shouldn't have to do
1886 * file system specific code, but it does help 1898 * file system specific code, but it does help
diff --git a/sound/core/sound.c b/sound/core/sound.c
index 812f91b3de5b..6c8ab48c689a 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -259,8 +259,9 @@ int snd_register_device_for_dev(int type, struct snd_card *card, int dev,
259 return minor; 259 return minor;
260 } 260 }
261 snd_minors[minor] = preg; 261 snd_minors[minor] = preg;
262 preg->dev = device_create(sound_class, device, MKDEV(major, minor), 262 preg->dev = device_create_drvdata(sound_class, device,
263 "%s", name); 263 MKDEV(major, minor),
264 private_data, "%s", name);
264 if (IS_ERR(preg->dev)) { 265 if (IS_ERR(preg->dev)) {
265 snd_minors[minor] = NULL; 266 snd_minors[minor] = NULL;
266 mutex_unlock(&sound_mutex); 267 mutex_unlock(&sound_mutex);
@@ -269,9 +270,6 @@ int snd_register_device_for_dev(int type, struct snd_card *card, int dev,
269 return minor; 270 return minor;
270 } 271 }
271 272
272 if (preg->dev)
273 dev_set_drvdata(preg->dev, private_data);
274
275 mutex_unlock(&sound_mutex); 273 mutex_unlock(&sound_mutex);
276 return 0; 274 return 0;
277} 275}
diff --git a/sound/drivers/pcsp/pcsp.c b/sound/drivers/pcsp/pcsp.c
index 54a1f9036c66..1899cf0685bc 100644
--- a/sound/drivers/pcsp/pcsp.c
+++ b/sound/drivers/pcsp/pcsp.c
@@ -96,7 +96,7 @@ static int __devinit snd_card_pcsp_probe(int devnum, struct device *dev)
96 return -EINVAL; 96 return -EINVAL;
97 97
98 hrtimer_init(&pcsp_chip.timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); 98 hrtimer_init(&pcsp_chip.timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
99 pcsp_chip.timer.cb_mode = HRTIMER_CB_IRQSAFE; 99 pcsp_chip.timer.cb_mode = HRTIMER_CB_SOFTIRQ;
100 pcsp_chip.timer.function = pcsp_do_timer; 100 pcsp_chip.timer.function = pcsp_do_timer;
101 101
102 card = snd_card_new(index, id, THIS_MODULE, 0); 102 card = snd_card_new(index, id, THIS_MODULE, 0);
diff --git a/sound/drivers/pcsp/pcsp.h b/sound/drivers/pcsp/pcsp.h
index f07cc1ee1fe7..1d661f795e8c 100644
--- a/sound/drivers/pcsp/pcsp.h
+++ b/sound/drivers/pcsp/pcsp.h
@@ -24,7 +24,8 @@ static DEFINE_SPINLOCK(i8253_lock);
24/* default timer freq for PC-Speaker: 18643 Hz */ 24/* default timer freq for PC-Speaker: 18643 Hz */
25#define DIV_18KHZ 64 25#define DIV_18KHZ 64
26#define MAX_DIV DIV_18KHZ 26#define MAX_DIV DIV_18KHZ
27#define CUR_DIV() (MAX_DIV >> chip->treble) 27#define CALC_DIV(d) (MAX_DIV >> (d))
28#define CUR_DIV() CALC_DIV(chip->treble)
28#define PCSP_MAX_TREBLE 1 29#define PCSP_MAX_TREBLE 1
29 30
30/* unfortunately, with hrtimers 37KHz does not work very well :( */ 31/* unfortunately, with hrtimers 37KHz does not work very well :( */
@@ -36,7 +37,8 @@ static DEFINE_SPINLOCK(i8253_lock);
36#define PCSP_DEFAULT_SDIV (DIV_18KHZ >> 1) 37#define PCSP_DEFAULT_SDIV (DIV_18KHZ >> 1)
37#define PCSP_DEFAULT_SRATE (PIT_TICK_RATE / PCSP_DEFAULT_SDIV) 38#define PCSP_DEFAULT_SRATE (PIT_TICK_RATE / PCSP_DEFAULT_SDIV)
38#define PCSP_INDEX_INC() (1 << (PCSP_MAX_TREBLE - chip->treble)) 39#define PCSP_INDEX_INC() (1 << (PCSP_MAX_TREBLE - chip->treble))
39#define PCSP_RATE() (PIT_TICK_RATE / CUR_DIV()) 40#define PCSP_CALC_RATE(i) (PIT_TICK_RATE / CALC_DIV(i))
41#define PCSP_RATE() PCSP_CALC_RATE(chip->treble)
40#define PCSP_MIN_RATE__1 MAX_DIV/PIT_TICK_RATE 42#define PCSP_MIN_RATE__1 MAX_DIV/PIT_TICK_RATE
41#define PCSP_MAX_RATE__1 MIN_DIV/PIT_TICK_RATE 43#define PCSP_MAX_RATE__1 MIN_DIV/PIT_TICK_RATE
42#define PCSP_MAX_PERIOD_NS (1000000000ULL * PCSP_MIN_RATE__1) 44#define PCSP_MAX_PERIOD_NS (1000000000ULL * PCSP_MIN_RATE__1)
diff --git a/sound/drivers/pcsp/pcsp_lib.c b/sound/drivers/pcsp/pcsp_lib.c
index 7ad4a1534b2b..e341f3f83b6a 100644
--- a/sound/drivers/pcsp/pcsp_lib.c
+++ b/sound/drivers/pcsp/pcsp_lib.c
@@ -9,7 +9,6 @@
9#include <linux/module.h> 9#include <linux/module.h>
10#include <linux/moduleparam.h> 10#include <linux/moduleparam.h>
11#include <sound/pcm.h> 11#include <sound/pcm.h>
12#include <linux/interrupt.h>
13#include <asm/io.h> 12#include <asm/io.h>
14#include "pcsp.h" 13#include "pcsp.h"
15 14
@@ -20,34 +19,8 @@ MODULE_PARM_DESC(nforce_wa, "Apply NForce chipset workaround "
20 19
21#define DMIX_WANTS_S16 1 20#define DMIX_WANTS_S16 1
22 21
23static void pcsp_start_timer(unsigned long dummy)
24{
25 hrtimer_start(&pcsp_chip.timer, ktime_set(0, 0), HRTIMER_MODE_REL);
26}
27
28/*
29 * We need the hrtimer_start as a tasklet to avoid
30 * the nasty locking problem. :(
31 * The problem:
32 * - The timer handler is called with the cpu_base->lock
33 * already held by hrtimer code.
34 * - snd_pcm_period_elapsed() takes the
35 * substream->self_group.lock.
36 * So far so good.
37 * But the snd_pcsp_trigger() is called with the
38 * substream->self_group.lock held, and it calls
39 * hrtimer_start(), which takes the cpu_base->lock.
40 * You see the problem. We have the code pathes
41 * which take two locks in a reverse order. This
42 * can deadlock and the lock validator complains.
43 * The only solution I could find was to move the
44 * hrtimer_start() into a tasklet. -stsp
45 */
46static DECLARE_TASKLET(pcsp_start_timer_tasklet, pcsp_start_timer, 0);
47
48enum hrtimer_restart pcsp_do_timer(struct hrtimer *handle) 22enum hrtimer_restart pcsp_do_timer(struct hrtimer *handle)
49{ 23{
50 unsigned long flags;
51 unsigned char timer_cnt, val; 24 unsigned char timer_cnt, val;
52 int fmt_size, periods_elapsed; 25 int fmt_size, periods_elapsed;
53 u64 ns; 26 u64 ns;
@@ -66,9 +39,7 @@ enum hrtimer_restart pcsp_do_timer(struct hrtimer *handle)
66 return HRTIMER_RESTART; 39 return HRTIMER_RESTART;
67 } 40 }
68 41
69 /* hrtimer calls us from both hardirq and softirq contexts, 42 spin_lock_irq(&chip->substream_lock);
70 * so irqsave :( */
71 spin_lock_irqsave(&chip->substream_lock, flags);
72 /* Takashi Iwai says regarding this extra lock: 43 /* Takashi Iwai says regarding this extra lock:
73 44
74 If the irq handler handles some data on the DMA buffer, it should 45 If the irq handler handles some data on the DMA buffer, it should
@@ -139,7 +110,7 @@ enum hrtimer_restart pcsp_do_timer(struct hrtimer *handle)
139 chip->period_ptr %= buffer_bytes; 110 chip->period_ptr %= buffer_bytes;
140 } 111 }
141 112
142 spin_unlock_irqrestore(&chip->substream_lock, flags); 113 spin_unlock_irq(&chip->substream_lock);
143 114
144 if (!atomic_read(&chip->timer_active)) 115 if (!atomic_read(&chip->timer_active))
145 return HRTIMER_NORESTART; 116 return HRTIMER_NORESTART;
@@ -153,7 +124,7 @@ enum hrtimer_restart pcsp_do_timer(struct hrtimer *handle)
153exit_nr_unlock2: 124exit_nr_unlock2:
154 snd_pcm_stream_unlock(substream); 125 snd_pcm_stream_unlock(substream);
155exit_nr_unlock1: 126exit_nr_unlock1:
156 spin_unlock_irqrestore(&chip->substream_lock, flags); 127 spin_unlock_irq(&chip->substream_lock);
157 return HRTIMER_NORESTART; 128 return HRTIMER_NORESTART;
158} 129}
159 130
@@ -174,7 +145,7 @@ static void pcsp_start_playing(struct snd_pcsp *chip)
174 atomic_set(&chip->timer_active, 1); 145 atomic_set(&chip->timer_active, 1);
175 chip->thalf = 0; 146 chip->thalf = 0;
176 147
177 tasklet_schedule(&pcsp_start_timer_tasklet); 148 hrtimer_start(&pcsp_chip.timer, ktime_set(0, 0), HRTIMER_MODE_REL);
178} 149}
179 150
180static void pcsp_stop_playing(struct snd_pcsp *chip) 151static void pcsp_stop_playing(struct snd_pcsp *chip)
diff --git a/sound/drivers/pcsp/pcsp_mixer.c b/sound/drivers/pcsp/pcsp_mixer.c
index 64a695fef74e..caeb0f57fcca 100644
--- a/sound/drivers/pcsp/pcsp_mixer.c
+++ b/sound/drivers/pcsp/pcsp_mixer.c
@@ -50,7 +50,8 @@ static int pcsp_treble_info(struct snd_kcontrol *kcontrol,
50 uinfo->value.enumerated.items = chip->max_treble + 1; 50 uinfo->value.enumerated.items = chip->max_treble + 1;
51 if (uinfo->value.enumerated.item > chip->max_treble) 51 if (uinfo->value.enumerated.item > chip->max_treble)
52 uinfo->value.enumerated.item = chip->max_treble; 52 uinfo->value.enumerated.item = chip->max_treble;
53 sprintf(uinfo->value.enumerated.name, "%d", PCSP_RATE()); 53 sprintf(uinfo->value.enumerated.name, "%d",
54 PCSP_CALC_RATE(uinfo->value.enumerated.item));
54 return 0; 55 return 0;
55} 56}
56 57
diff --git a/sound/isa/sb/sb_mixer.c b/sound/isa/sb/sb_mixer.c
index 91d14224f6b3..73d4572d136b 100644
--- a/sound/isa/sb/sb_mixer.c
+++ b/sound/isa/sb/sb_mixer.c
@@ -925,7 +925,7 @@ static unsigned char als4000_saved_regs[] = {
925static void save_mixer(struct snd_sb *chip, unsigned char *regs, int num_regs) 925static void save_mixer(struct snd_sb *chip, unsigned char *regs, int num_regs)
926{ 926{
927 unsigned char *val = chip->saved_regs; 927 unsigned char *val = chip->saved_regs;
928 snd_assert(num_regs > ARRAY_SIZE(chip->saved_regs), return); 928 snd_assert(num_regs <= ARRAY_SIZE(chip->saved_regs), return);
929 for (; num_regs; num_regs--) 929 for (; num_regs; num_regs--)
930 *val++ = snd_sbmixer_read(chip, *regs++); 930 *val++ = snd_sbmixer_read(chip, *regs++);
931} 931}
@@ -933,7 +933,7 @@ static void save_mixer(struct snd_sb *chip, unsigned char *regs, int num_regs)
933static void restore_mixer(struct snd_sb *chip, unsigned char *regs, int num_regs) 933static void restore_mixer(struct snd_sb *chip, unsigned char *regs, int num_regs)
934{ 934{
935 unsigned char *val = chip->saved_regs; 935 unsigned char *val = chip->saved_regs;
936 snd_assert(num_regs > ARRAY_SIZE(chip->saved_regs), return); 936 snd_assert(num_regs <= ARRAY_SIZE(chip->saved_regs), return);
937 for (; num_regs; num_regs--) 937 for (; num_regs; num_regs--)
938 snd_sbmixer_write(chip, *regs++, *val++); 938 snd_sbmixer_write(chip, *regs++, *val++);
939} 939}
diff --git a/sound/oss/Kconfig b/sound/oss/Kconfig
index 857008bb7167..3be2dc1025b5 100644
--- a/sound/oss/Kconfig
+++ b/sound/oss/Kconfig
@@ -79,7 +79,7 @@ config SOUND_TRIDENT
79 79
80config SOUND_MSNDCLAS 80config SOUND_MSNDCLAS
81 tristate "Support for Turtle Beach MultiSound Classic, Tahiti, Monterey" 81 tristate "Support for Turtle Beach MultiSound Classic, Tahiti, Monterey"
82 depends on SOUND_PRIME && (m || !STANDALONE) 82 depends on SOUND_PRIME && (m || !STANDALONE) && ISA
83 help 83 help
84 Say M here if you have a Turtle Beach MultiSound Classic, Tahiti or 84 Say M here if you have a Turtle Beach MultiSound Classic, Tahiti or
85 Monterey (not for the Pinnacle or Fiji). 85 Monterey (not for the Pinnacle or Fiji).
@@ -143,7 +143,7 @@ config MSNDCLAS_IO
143 143
144config SOUND_MSNDPIN 144config SOUND_MSNDPIN
145 tristate "Support for Turtle Beach MultiSound Pinnacle, Fiji" 145 tristate "Support for Turtle Beach MultiSound Pinnacle, Fiji"
146 depends on SOUND_PRIME && (m || !STANDALONE) 146 depends on SOUND_PRIME && (m || !STANDALONE) && ISA
147 help 147 help
148 Say M here if you have a Turtle Beach MultiSound Pinnacle or Fiji. 148 Say M here if you have a Turtle Beach MultiSound Pinnacle or Fiji.
149 See <file:Documentation/sound/oss/MultiSound> for important information 149 See <file:Documentation/sound/oss/MultiSound> for important information
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c
index 2da89810ca10..1292dcee072d 100644
--- a/sound/pci/ac97/ac97_patch.c
+++ b/sound/pci/ac97/ac97_patch.c
@@ -1971,6 +1971,9 @@ static int snd_ac97_ad1888_lohpsel_get(struct snd_kcontrol *kcontrol, struct snd
1971 1971
1972 val = ac97->regs[AC97_AD_MISC]; 1972 val = ac97->regs[AC97_AD_MISC];
1973 ucontrol->value.integer.value[0] = !(val & AC97_AD198X_LOSEL); 1973 ucontrol->value.integer.value[0] = !(val & AC97_AD198X_LOSEL);
1974 if (ac97->spec.ad18xx.lo_as_master)
1975 ucontrol->value.integer.value[0] =
1976 !ucontrol->value.integer.value[0];
1974 return 0; 1977 return 0;
1975} 1978}
1976 1979
@@ -1979,8 +1982,10 @@ static int snd_ac97_ad1888_lohpsel_put(struct snd_kcontrol *kcontrol, struct snd
1979 struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol); 1982 struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
1980 unsigned short val; 1983 unsigned short val;
1981 1984
1982 val = !ucontrol->value.integer.value[0] 1985 val = !ucontrol->value.integer.value[0];
1983 ? (AC97_AD198X_LOSEL | AC97_AD198X_HPSEL) : 0; 1986 if (ac97->spec.ad18xx.lo_as_master)
1987 val = !val;
1988 val = val ? (AC97_AD198X_LOSEL | AC97_AD198X_HPSEL) : 0;
1984 return snd_ac97_update_bits(ac97, AC97_AD_MISC, 1989 return snd_ac97_update_bits(ac97, AC97_AD_MISC,
1985 AC97_AD198X_LOSEL | AC97_AD198X_HPSEL, val); 1990 AC97_AD198X_LOSEL | AC97_AD198X_HPSEL, val);
1986} 1991}
@@ -2031,7 +2036,7 @@ static void ad1888_update_jacks(struct snd_ac97 *ac97)
2031{ 2036{
2032 unsigned short val = 0; 2037 unsigned short val = 0;
2033 /* clear LODIS if shared jack is to be used for Surround out */ 2038 /* clear LODIS if shared jack is to be used for Surround out */
2034 if (is_shared_linein(ac97)) 2039 if (!ac97->spec.ad18xx.lo_as_master && is_shared_linein(ac97))
2035 val |= (1 << 12); 2040 val |= (1 << 12);
2036 /* clear CLDIS if shared jack is to be used for C/LFE out */ 2041 /* clear CLDIS if shared jack is to be used for C/LFE out */
2037 if (is_shared_micin(ac97)) 2042 if (is_shared_micin(ac97))
@@ -2067,9 +2072,13 @@ static const struct snd_kcontrol_new snd_ac97_ad1888_controls[] = {
2067 2072
2068static int patch_ad1888_specific(struct snd_ac97 *ac97) 2073static int patch_ad1888_specific(struct snd_ac97 *ac97)
2069{ 2074{
2070 /* rename 0x04 as "Master" and 0x02 as "Master Surround" */ 2075 if (!ac97->spec.ad18xx.lo_as_master) {
2071 snd_ac97_rename_vol_ctl(ac97, "Master Playback", "Master Surround Playback"); 2076 /* rename 0x04 as "Master" and 0x02 as "Master Surround" */
2072 snd_ac97_rename_vol_ctl(ac97, "Headphone Playback", "Master Playback"); 2077 snd_ac97_rename_vol_ctl(ac97, "Master Playback",
2078 "Master Surround Playback");
2079 snd_ac97_rename_vol_ctl(ac97, "Headphone Playback",
2080 "Master Playback");
2081 }
2073 return patch_build_controls(ac97, snd_ac97_ad1888_controls, ARRAY_SIZE(snd_ac97_ad1888_controls)); 2082 return patch_build_controls(ac97, snd_ac97_ad1888_controls, ARRAY_SIZE(snd_ac97_ad1888_controls));
2074} 2083}
2075 2084
@@ -2088,16 +2097,27 @@ static int patch_ad1888(struct snd_ac97 * ac97)
2088 2097
2089 patch_ad1881(ac97); 2098 patch_ad1881(ac97);
2090 ac97->build_ops = &patch_ad1888_build_ops; 2099 ac97->build_ops = &patch_ad1888_build_ops;
2091 /* Switch FRONT/SURROUND LINE-OUT/HP-OUT default connection */ 2100
2092 /* it seems that most vendors connect line-out connector to headphone out of AC'97 */ 2101 /*
2102 * LO can be used as a real line-out on some devices,
2103 * and we need to revert the front/surround mixer switches
2104 */
2105 if (ac97->subsystem_vendor == 0x1043 &&
2106 ac97->subsystem_device == 0x1193) /* ASUS A9T laptop */
2107 ac97->spec.ad18xx.lo_as_master = 1;
2108
2109 misc = snd_ac97_read(ac97, AC97_AD_MISC);
2093 /* AD-compatible mode */ 2110 /* AD-compatible mode */
2094 /* Stereo mutes enabled */ 2111 /* Stereo mutes enabled */
2095 misc = snd_ac97_read(ac97, AC97_AD_MISC); 2112 misc |= AC97_AD198X_MSPLT | AC97_AD198X_AC97NC;
2096 snd_ac97_write_cache(ac97, AC97_AD_MISC, misc | 2113 if (!ac97->spec.ad18xx.lo_as_master)
2097 AC97_AD198X_LOSEL | 2114 /* Switch FRONT/SURROUND LINE-OUT/HP-OUT default connection */
2098 AC97_AD198X_HPSEL | 2115 /* it seems that most vendors connect line-out connector to
2099 AC97_AD198X_MSPLT | 2116 * headphone out of AC'97
2100 AC97_AD198X_AC97NC); 2117 */
2118 misc |= AC97_AD198X_LOSEL | AC97_AD198X_HPSEL;
2119
2120 snd_ac97_write_cache(ac97, AC97_AD_MISC, misc);
2101 ac97->flags |= AC97_STEREO_MUTES; 2121 ac97->flags |= AC97_STEREO_MUTES;
2102 return 0; 2122 return 0;
2103} 2123}
diff --git a/sound/pci/aw2/aw2-alsa.c b/sound/pci/aw2/aw2-alsa.c
index 56f87cd33c19..3f00ddf450f8 100644
--- a/sound/pci/aw2/aw2-alsa.c
+++ b/sound/pci/aw2/aw2-alsa.c
@@ -316,6 +316,8 @@ static int __devinit snd_aw2_create(struct snd_card *card,
316 return -ENOMEM; 316 return -ENOMEM;
317 } 317 }
318 318
319 /* (2) initialization of the chip hardware */
320 snd_aw2_saa7146_setup(&chip->saa7146, chip->iobase_virt);
319 321
320 if (request_irq(pci->irq, snd_aw2_saa7146_interrupt, 322 if (request_irq(pci->irq, snd_aw2_saa7146_interrupt,
321 IRQF_SHARED, "Audiowerk2", chip)) { 323 IRQF_SHARED, "Audiowerk2", chip)) {
@@ -329,8 +331,6 @@ static int __devinit snd_aw2_create(struct snd_card *card,
329 } 331 }
330 chip->irq = pci->irq; 332 chip->irq = pci->irq;
331 333
332 /* (2) initialization of the chip hardware */
333 snd_aw2_saa7146_setup(&chip->saa7146, chip->iobase_virt);
334 err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops); 334 err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops);
335 if (err < 0) { 335 if (err < 0) {
336 free_irq(chip->irq, (void *)chip); 336 free_irq(chip->irq, (void *)chip);
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c
index abde5b901884..548c9cc81af5 100644
--- a/sound/pci/emu10k1/emu10k1_main.c
+++ b/sound/pci/emu10k1/emu10k1_main.c
@@ -1818,13 +1818,6 @@ int __devinit snd_emu10k1_create(struct snd_card *card,
1818 } 1818 }
1819 emu->port = pci_resource_start(pci, 0); 1819 emu->port = pci_resource_start(pci, 0);
1820 1820
1821 if (request_irq(pci->irq, snd_emu10k1_interrupt, IRQF_SHARED,
1822 "EMU10K1", emu)) {
1823 err = -EBUSY;
1824 goto error;
1825 }
1826 emu->irq = pci->irq;
1827
1828 emu->max_cache_pages = max_cache_bytes >> PAGE_SHIFT; 1821 emu->max_cache_pages = max_cache_bytes >> PAGE_SHIFT;
1829 if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), 1822 if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci),
1830 32 * 1024, &emu->ptb_pages) < 0) { 1823 32 * 1024, &emu->ptb_pages) < 0) {
@@ -1887,6 +1880,14 @@ int __devinit snd_emu10k1_create(struct snd_card *card,
1887 emu->fx8010.etram_pages.area = NULL; 1880 emu->fx8010.etram_pages.area = NULL;
1888 emu->fx8010.etram_pages.bytes = 0; 1881 emu->fx8010.etram_pages.bytes = 0;
1889 1882
1883 /* irq handler must be registered after I/O ports are activated */
1884 if (request_irq(pci->irq, snd_emu10k1_interrupt, IRQF_SHARED,
1885 "EMU10K1", emu)) {
1886 err = -EBUSY;
1887 goto error;
1888 }
1889 emu->irq = pci->irq;
1890
1890 /* 1891 /*
1891 * Init to 0x02109204 : 1892 * Init to 0x02109204 :
1892 * Clock accuracy = 0 (1000ppm) 1893 * Clock accuracy = 0 (1000ppm)
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index e0a605adde42..a99e86d74278 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -2858,6 +2858,7 @@ static const char *ad1988_models[AD1988_MODEL_LAST] = {
2858static struct snd_pci_quirk ad1988_cfg_tbl[] = { 2858static struct snd_pci_quirk ad1988_cfg_tbl[] = {
2859 SND_PCI_QUIRK(0x1043, 0x81ec, "Asus P5B-DLX", AD1988_6STACK_DIG), 2859 SND_PCI_QUIRK(0x1043, 0x81ec, "Asus P5B-DLX", AD1988_6STACK_DIG),
2860 SND_PCI_QUIRK(0x1043, 0x81f6, "Asus M2N-SLI", AD1988_6STACK_DIG), 2860 SND_PCI_QUIRK(0x1043, 0x81f6, "Asus M2N-SLI", AD1988_6STACK_DIG),
2861 SND_PCI_QUIRK(0x1043, 0x8277, "Asus P5K-E/WIFI-AP", AD1988_6STACK_DIG),
2861 {} 2862 {}
2862}; 2863};
2863 2864
@@ -3643,33 +3644,17 @@ static struct snd_kcontrol_new ad1884a_laptop_mixers[] = {
3643 { } /* end */ 3644 { } /* end */
3644}; 3645};
3645 3646
3646static struct hda_input_mux ad1884a_mobile_capture_source = {
3647 .num_items = 2,
3648 .items = {
3649 { "Mic", 0x1 }, /* port-C */
3650 { "Mix", 0x3 },
3651 },
3652};
3653
3654static struct snd_kcontrol_new ad1884a_mobile_mixers[] = { 3647static struct snd_kcontrol_new ad1884a_mobile_mixers[] = {
3655 HDA_CODEC_VOLUME("Master Playback Volume", 0x21, 0x0, HDA_OUTPUT), 3648 HDA_CODEC_VOLUME("Master Playback Volume", 0x21, 0x0, HDA_OUTPUT),
3656 HDA_CODEC_MUTE("Master Playback Switch", 0x21, 0x0, HDA_OUTPUT), 3649 HDA_CODEC_MUTE("Master Playback Switch", 0x21, 0x0, HDA_OUTPUT),
3657 HDA_CODEC_VOLUME("PCM Playback Volume", 0x20, 0x5, HDA_INPUT), 3650 HDA_CODEC_VOLUME("PCM Playback Volume", 0x20, 0x5, HDA_INPUT),
3658 HDA_CODEC_MUTE("PCM Playback Switch", 0x20, 0x5, HDA_INPUT), 3651 HDA_CODEC_MUTE("PCM Playback Switch", 0x20, 0x5, HDA_INPUT),
3659 HDA_CODEC_VOLUME("Mic Playback Volume", 0x20, 0x01, HDA_INPUT),
3660 HDA_CODEC_MUTE("Mic Playback Switch", 0x20, 0x01, HDA_INPUT),
3661 HDA_CODEC_VOLUME("Beep Playback Volume", 0x20, 0x03, HDA_INPUT), 3652 HDA_CODEC_VOLUME("Beep Playback Volume", 0x20, 0x03, HDA_INPUT),
3662 HDA_CODEC_MUTE("Beep Playback Switch", 0x20, 0x03, HDA_INPUT), 3653 HDA_CODEC_MUTE("Beep Playback Switch", 0x20, 0x03, HDA_INPUT),
3663 HDA_CODEC_VOLUME("Mic Boost", 0x15, 0x0, HDA_INPUT), 3654 HDA_CODEC_VOLUME("Mic Capture Volume", 0x14, 0x0, HDA_INPUT),
3655 HDA_CODEC_VOLUME("Internal Mic Capture Volume", 0x15, 0x0, HDA_INPUT),
3664 HDA_CODEC_VOLUME("Capture Volume", 0x0c, 0x0, HDA_OUTPUT), 3656 HDA_CODEC_VOLUME("Capture Volume", 0x0c, 0x0, HDA_OUTPUT),
3665 HDA_CODEC_MUTE("Capture Switch", 0x0c, 0x0, HDA_OUTPUT), 3657 HDA_CODEC_MUTE("Capture Switch", 0x0c, 0x0, HDA_OUTPUT),
3666 {
3667 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
3668 .name = "Capture Source",
3669 .info = ad198x_mux_enum_info,
3670 .get = ad198x_mux_enum_get,
3671 .put = ad198x_mux_enum_put,
3672 },
3673 { } /* end */ 3658 { } /* end */
3674}; 3659};
3675 3660
@@ -3686,14 +3671,31 @@ static void ad1884a_hp_automute(struct hda_codec *codec)
3686 present ? 0x00 : 0x02); 3671 present ? 0x00 : 0x02);
3687} 3672}
3688 3673
3674/* switch to external mic if plugged */
3675static void ad1884a_hp_automic(struct hda_codec *codec)
3676{
3677 unsigned int present;
3678
3679 present = snd_hda_codec_read(codec, 0x14, 0,
3680 AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
3681 snd_hda_codec_write(codec, 0x0c, 0, AC_VERB_SET_CONNECT_SEL,
3682 present ? 0 : 1);
3683}
3684
3689#define AD1884A_HP_EVENT 0x37 3685#define AD1884A_HP_EVENT 0x37
3686#define AD1884A_MIC_EVENT 0x36
3690 3687
3691/* unsolicited event for HP jack sensing */ 3688/* unsolicited event for HP jack sensing */
3692static void ad1884a_hp_unsol_event(struct hda_codec *codec, unsigned int res) 3689static void ad1884a_hp_unsol_event(struct hda_codec *codec, unsigned int res)
3693{ 3690{
3694 if ((res >> 26) != AD1884A_HP_EVENT) 3691 switch (res >> 26) {
3695 return; 3692 case AD1884A_HP_EVENT:
3696 ad1884a_hp_automute(codec); 3693 ad1884a_hp_automute(codec);
3694 break;
3695 case AD1884A_MIC_EVENT:
3696 ad1884a_hp_automic(codec);
3697 break;
3698 }
3697} 3699}
3698 3700
3699/* initialize jack-sensing, too */ 3701/* initialize jack-sensing, too */
@@ -3701,6 +3703,7 @@ static int ad1884a_hp_init(struct hda_codec *codec)
3701{ 3703{
3702 ad198x_init(codec); 3704 ad198x_init(codec);
3703 ad1884a_hp_automute(codec); 3705 ad1884a_hp_automute(codec);
3706 ad1884a_hp_automic(codec);
3704 return 0; 3707 return 0;
3705} 3708}
3706 3709
@@ -3714,10 +3717,15 @@ static struct hda_verb ad1884a_laptop_verbs[] = {
3714 /* Port-F pin */ 3717 /* Port-F pin */
3715 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, 3718 {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
3716 {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, 3719 {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
3720 /* Port-C pin - internal mic-in */
3721 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
3722 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0x7002}, /* raise mic as default */
3723 {0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0x7002}, /* raise mic as default */
3717 /* analog mix */ 3724 /* analog mix */
3718 {0x20, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)}, 3725 {0x20, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
3719 /* unsolicited event for pin-sense */ 3726 /* unsolicited event for pin-sense */
3720 {0x11, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1884A_HP_EVENT}, 3727 {0x11, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1884A_HP_EVENT},
3728 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1884A_MIC_EVENT},
3721 { } /* end */ 3729 { } /* end */
3722}; 3730};
3723 3731
@@ -3877,7 +3885,6 @@ static int patch_ad1884a(struct hda_codec *codec)
3877 spec->mixers[0] = ad1884a_mobile_mixers; 3885 spec->mixers[0] = ad1884a_mobile_mixers;
3878 spec->init_verbs[spec->num_init_verbs++] = ad1884a_laptop_verbs; 3886 spec->init_verbs[spec->num_init_verbs++] = ad1884a_laptop_verbs;
3879 spec->multiout.dig_out_nid = 0; 3887 spec->multiout.dig_out_nid = 0;
3880 spec->input_mux = &ad1884a_mobile_capture_source;
3881 codec->patch_ops.unsol_event = ad1884a_hp_unsol_event; 3888 codec->patch_ops.unsol_event = ad1884a_hp_unsol_event;
3882 codec->patch_ops.init = ad1884a_hp_init; 3889 codec->patch_ops.init = ad1884a_hp_init;
3883 break; 3890 break;
diff --git a/sound/pci/hda/patch_cmedia.c b/sound/pci/hda/patch_cmedia.c
index c73ce074a6ea..6ef57fbfb6eb 100644
--- a/sound/pci/hda/patch_cmedia.c
+++ b/sound/pci/hda/patch_cmedia.c
@@ -611,6 +611,7 @@ static const char *cmi9880_models[CMI_MODELS] = {
611 611
612static struct snd_pci_quirk cmi9880_cfg_tbl[] = { 612static struct snd_pci_quirk cmi9880_cfg_tbl[] = {
613 SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", CMI_FULL_DIG), 613 SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", CMI_FULL_DIG),
614 SND_PCI_QUIRK(0x1854, 0x002b, "LG LS75", CMI_MINIMAL),
614 SND_PCI_QUIRK(0x1854, 0x0032, "LG", CMI_FULL_DIG), 615 SND_PCI_QUIRK(0x1854, 0x0032, "LG", CMI_FULL_DIG),
615 {} /* terminator */ 616 {} /* terminator */
616}; 617};
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 6d4df45e81e0..b0a2a262ece2 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -853,6 +853,7 @@ do_sku:
853 case 0x10ec0269: 853 case 0x10ec0269:
854 case 0x10ec0862: 854 case 0x10ec0862:
855 case 0x10ec0662: 855 case 0x10ec0662:
856 case 0x10ec0889:
856 snd_hda_codec_write(codec, 0x14, 0, 857 snd_hda_codec_write(codec, 0x14, 0,
857 AC_VERB_SET_EAPD_BTLENABLE, 2); 858 AC_VERB_SET_EAPD_BTLENABLE, 2);
858 snd_hda_codec_write(codec, 0x15, 0, 859 snd_hda_codec_write(codec, 0x15, 0,
@@ -877,6 +878,7 @@ do_sku:
877 case 0x10ec0883: 878 case 0x10ec0883:
878 case 0x10ec0885: 879 case 0x10ec0885:
879 case 0x10ec0888: 880 case 0x10ec0888:
881 case 0x10ec0889:
880 snd_hda_codec_write(codec, 0x20, 0, 882 snd_hda_codec_write(codec, 0x20, 0,
881 AC_VERB_SET_COEF_INDEX, 7); 883 AC_VERB_SET_COEF_INDEX, 7);
882 tmp = snd_hda_codec_read(codec, 0x20, 0, 884 tmp = snd_hda_codec_read(codec, 0x20, 0,
@@ -940,7 +942,6 @@ do_sku:
940 AC_VERB_SET_UNSOLICITED_ENABLE, 942 AC_VERB_SET_UNSOLICITED_ENABLE,
941 AC_USRSP_EN | ALC880_HP_EVENT); 943 AC_USRSP_EN | ALC880_HP_EVENT);
942 spec->unsol_event = alc_sku_unsol_event; 944 spec->unsol_event = alc_sku_unsol_event;
943 spec->init_hook = alc_sku_automute;
944} 945}
945 946
946/* 947/*
@@ -2981,7 +2982,7 @@ static struct snd_pci_quirk alc880_cfg_tbl[] = {
2981 /* SND_PCI_QUIRK(0x1043, 0x1964, "ASUS", ALC880_ASUS_DIG), */ 2982 /* SND_PCI_QUIRK(0x1043, 0x1964, "ASUS", ALC880_ASUS_DIG), */
2982 SND_PCI_QUIRK(0x1043, 0x1973, "ASUS", ALC880_ASUS_DIG), 2983 SND_PCI_QUIRK(0x1043, 0x1973, "ASUS", ALC880_ASUS_DIG),
2983 SND_PCI_QUIRK(0x1043, 0x19b3, "ASUS", ALC880_ASUS_DIG), 2984 SND_PCI_QUIRK(0x1043, 0x19b3, "ASUS", ALC880_ASUS_DIG),
2984 SND_PCI_QUIRK(0x1043, 0x814e, "ASUS", ALC880_ASUS), 2985 SND_PCI_QUIRK(0x1043, 0x814e, "ASUS P5GD1 w/SPDIF", ALC880_6ST_DIG),
2985 SND_PCI_QUIRK(0x1043, 0x8181, "ASUS P4GPL", ALC880_ASUS_DIG), 2986 SND_PCI_QUIRK(0x1043, 0x8181, "ASUS P4GPL", ALC880_ASUS_DIG),
2986 SND_PCI_QUIRK(0x1043, 0x8196, "ASUS P5GD1", ALC880_6ST), 2987 SND_PCI_QUIRK(0x1043, 0x8196, "ASUS P5GD1", ALC880_6ST),
2987 SND_PCI_QUIRK(0x1043, 0x81b4, "ASUS", ALC880_6ST), 2988 SND_PCI_QUIRK(0x1043, 0x81b4, "ASUS", ALC880_6ST),
@@ -7743,6 +7744,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = {
7743 SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP), 7744 SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP),
7744 SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC883_6ST_DIG), 7745 SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC883_6ST_DIG),
7745 SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG), 7746 SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG),
7747 SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG),
7746 SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG), 7748 SND_PCI_QUIRK(0x105b, 0x6668, "Foxconn", ALC883_6ST_DIG),
7747 SND_PCI_QUIRK(0x1071, 0x8253, "Mitac 8252d", ALC883_MITAC), 7749 SND_PCI_QUIRK(0x1071, 0x8253, "Mitac 8252d", ALC883_MITAC),
7748 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD), 7750 SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD),
@@ -8640,6 +8642,7 @@ static struct hda_verb alc262_sony_unsol_verbs[] = {
8640 8642
8641 {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT}, 8643 {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
8642 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, 8644 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
8645 {}
8643}; 8646};
8644 8647
8645/* mute/unmute internal speaker according to the hp jack and mute state */ 8648/* mute/unmute internal speaker according to the hp jack and mute state */
@@ -8757,35 +8760,39 @@ static struct hda_input_mux alc262_HP_D7000_capture_source = {
8757 }, 8760 },
8758}; 8761};
8759 8762
8760/* mute/unmute internal speaker according to the hp jack and mute state */ 8763/* mute/unmute internal speaker according to the hp jacks and mute state */
8761static void alc262_fujitsu_automute(struct hda_codec *codec, int force) 8764static void alc262_fujitsu_automute(struct hda_codec *codec, int force)
8762{ 8765{
8763 struct alc_spec *spec = codec->spec; 8766 struct alc_spec *spec = codec->spec;
8764 unsigned int mute; 8767 unsigned int mute;
8765 8768
8766 if (force || !spec->sense_updated) { 8769 if (force || !spec->sense_updated) {
8767 unsigned int present_int_hp, present_dock_hp; 8770 unsigned int present;
8768 /* need to execute and sync at first */ 8771 /* need to execute and sync at first */
8769 snd_hda_codec_read(codec, 0x14, 0, AC_VERB_SET_PIN_SENSE, 0); 8772 snd_hda_codec_read(codec, 0x14, 0, AC_VERB_SET_PIN_SENSE, 0);
8770 present_int_hp = snd_hda_codec_read(codec, 0x14, 0, 8773 /* check laptop HP jack */
8771 AC_VERB_GET_PIN_SENSE, 0); 8774 present = snd_hda_codec_read(codec, 0x14, 0,
8772 snd_hda_codec_read(codec, 0x1B, 0, AC_VERB_SET_PIN_SENSE, 0); 8775 AC_VERB_GET_PIN_SENSE, 0);
8773 present_dock_hp = snd_hda_codec_read(codec, 0x1b, 0, 8776 /* need to execute and sync at first */
8774 AC_VERB_GET_PIN_SENSE, 0); 8777 snd_hda_codec_read(codec, 0x1b, 0, AC_VERB_SET_PIN_SENSE, 0);
8775 spec->jack_present = (present_int_hp & 0x80000000) != 0; 8778 /* check docking HP jack */
8776 spec->jack_present |= (present_dock_hp & 0x80000000) != 0; 8779 present |= snd_hda_codec_read(codec, 0x1b, 0,
8780 AC_VERB_GET_PIN_SENSE, 0);
8781 if (present & AC_PINSENSE_PRESENCE)
8782 spec->jack_present = 1;
8783 else
8784 spec->jack_present = 0;
8777 spec->sense_updated = 1; 8785 spec->sense_updated = 1;
8778 } 8786 }
8779 if (spec->jack_present) { 8787 /* unmute internal speaker only if both HPs are unplugged and
8780 /* mute internal speaker */ 8788 * master switch is on
8781 snd_hda_codec_amp_stereo(codec, 0x15, HDA_OUTPUT, 0, 8789 */
8782 HDA_AMP_MUTE, HDA_AMP_MUTE); 8790 if (spec->jack_present)
8783 } else { 8791 mute = HDA_AMP_MUTE;
8784 /* unmute internal speaker if necessary */ 8792 else
8785 mute = snd_hda_codec_amp_read(codec, 0x14, 0, HDA_OUTPUT, 0); 8793 mute = snd_hda_codec_amp_read(codec, 0x14, 0, HDA_OUTPUT, 0);
8786 snd_hda_codec_amp_stereo(codec, 0x15, HDA_OUTPUT, 0, 8794 snd_hda_codec_amp_stereo(codec, 0x15, HDA_OUTPUT, 0,
8787 HDA_AMP_MUTE, mute); 8795 HDA_AMP_MUTE, mute);
8788 }
8789} 8796}
8790 8797
8791/* unsolicited event for HP jack sensing */ 8798/* unsolicited event for HP jack sensing */
@@ -8797,6 +8804,11 @@ static void alc262_fujitsu_unsol_event(struct hda_codec *codec,
8797 alc262_fujitsu_automute(codec, 1); 8804 alc262_fujitsu_automute(codec, 1);
8798} 8805}
8799 8806
8807static void alc262_fujitsu_init_hook(struct hda_codec *codec)
8808{
8809 alc262_fujitsu_automute(codec, 1);
8810}
8811
8800/* bind volumes of both NID 0x0c and 0x0d */ 8812/* bind volumes of both NID 0x0c and 0x0d */
8801static struct hda_bind_ctls alc262_fujitsu_bind_master_vol = { 8813static struct hda_bind_ctls alc262_fujitsu_bind_master_vol = {
8802 .ops = &snd_hda_bind_vol, 8814 .ops = &snd_hda_bind_vol,
@@ -9570,6 +9582,7 @@ static struct alc_config_preset alc262_presets[] = {
9570 .channel_mode = alc262_modes, 9582 .channel_mode = alc262_modes,
9571 .input_mux = &alc262_fujitsu_capture_source, 9583 .input_mux = &alc262_fujitsu_capture_source,
9572 .unsol_event = alc262_fujitsu_unsol_event, 9584 .unsol_event = alc262_fujitsu_unsol_event,
9585 .init_hook = alc262_fujitsu_init_hook,
9573 }, 9586 },
9574 [ALC262_HP_BPC] = { 9587 [ALC262_HP_BPC] = {
9575 .mixers = { alc262_HP_BPC_mixer }, 9588 .mixers = { alc262_HP_BPC_mixer },
@@ -10500,6 +10513,7 @@ static struct snd_pci_quirk alc268_cfg_tbl[] = {
10500 SND_PCI_QUIRK(0x1043, 0x1205, "ASUS W7J", ALC268_3ST), 10513 SND_PCI_QUIRK(0x1043, 0x1205, "ASUS W7J", ALC268_3ST),
10501 SND_PCI_QUIRK(0x1179, 0xff10, "TOSHIBA A205", ALC268_TOSHIBA), 10514 SND_PCI_QUIRK(0x1179, 0xff10, "TOSHIBA A205", ALC268_TOSHIBA),
10502 SND_PCI_QUIRK(0x1179, 0xff50, "TOSHIBA A305", ALC268_TOSHIBA), 10515 SND_PCI_QUIRK(0x1179, 0xff50, "TOSHIBA A305", ALC268_TOSHIBA),
10516 SND_PCI_QUIRK(0x14c0, 0x0025, "COMPAL IFL90/JFL-92", ALC268_TOSHIBA),
10503 SND_PCI_QUIRK(0x152d, 0x0763, "Diverse (CPR2000)", ALC268_ACER), 10517 SND_PCI_QUIRK(0x152d, 0x0763, "Diverse (CPR2000)", ALC268_ACER),
10504 SND_PCI_QUIRK(0x152d, 0x0771, "Quanta IL1", ALC267_QUANTA_IL1), 10518 SND_PCI_QUIRK(0x152d, 0x0771, "Quanta IL1", ALC267_QUANTA_IL1),
10505 SND_PCI_QUIRK(0x1170, 0x0040, "ZEPTO", ALC268_ZEPTO), 10519 SND_PCI_QUIRK(0x1170, 0x0040, "ZEPTO", ALC268_ZEPTO),
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 393f7fd2b1be..a4f44a00bae8 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -840,7 +840,7 @@ static struct snd_kcontrol_new stac92hd71bxx_mixer[] = {
840static struct snd_kcontrol_new stac925x_mixer[] = { 840static struct snd_kcontrol_new stac925x_mixer[] = {
841 STAC_INPUT_SOURCE(1), 841 STAC_INPUT_SOURCE(1),
842 HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_OUTPUT), 842 HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_OUTPUT),
843 HDA_CODEC_MUTE("Capture Switch", 0x09, 0, HDA_OUTPUT), 843 HDA_CODEC_MUTE("Capture Switch", 0x14, 0, HDA_OUTPUT),
844 HDA_CODEC_VOLUME("Capture Mux Volume", 0x0f, 0, HDA_OUTPUT), 844 HDA_CODEC_VOLUME("Capture Mux Volume", 0x0f, 0, HDA_OUTPUT),
845 { } /* end */ 845 { } /* end */
846}; 846};
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index 52b1d81a26f7..e7e43524f8c7 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -447,6 +447,23 @@ static struct hda_pcm_stream vt1708_pcm_analog_playback = {
447 }, 447 },
448}; 448};
449 449
450static struct hda_pcm_stream vt1708_pcm_analog_s16_playback = {
451 .substreams = 1,
452 .channels_min = 2,
453 .channels_max = 8,
454 .nid = 0x10, /* NID to query formats and rates */
455 /* We got noisy outputs on the right channel on VT1708 when
456 * 24bit samples are used. Until any workaround is found,
457 * disable the 24bit format, so far.
458 */
459 .formats = SNDRV_PCM_FMTBIT_S16_LE,
460 .ops = {
461 .open = via_playback_pcm_open,
462 .prepare = via_playback_pcm_prepare,
463 .cleanup = via_playback_pcm_cleanup
464 },
465};
466
450static struct hda_pcm_stream vt1708_pcm_analog_capture = { 467static struct hda_pcm_stream vt1708_pcm_analog_capture = {
451 .substreams = 2, 468 .substreams = 2,
452 .channels_min = 2, 469 .channels_min = 2,
@@ -899,6 +916,9 @@ static int patch_vt1708(struct hda_codec *codec)
899 916
900 spec->stream_name_analog = "VT1708 Analog"; 917 spec->stream_name_analog = "VT1708 Analog";
901 spec->stream_analog_playback = &vt1708_pcm_analog_playback; 918 spec->stream_analog_playback = &vt1708_pcm_analog_playback;
919 /* disable 32bit format on VT1708 */
920 if (codec->vendor_id == 0x11061708)
921 spec->stream_analog_playback = &vt1708_pcm_analog_s16_playback;
902 spec->stream_analog_capture = &vt1708_pcm_analog_capture; 922 spec->stream_analog_capture = &vt1708_pcm_analog_capture;
903 923
904 spec->stream_name_digital = "VT1708 Digital"; 924 spec->stream_name_digital = "VT1708 Digital";
diff --git a/sound/pci/oxygen/oxygen_mixer.c b/sound/pci/oxygen/oxygen_mixer.c
index cc0cddadd589..6facac5aed90 100644
--- a/sound/pci/oxygen/oxygen_mixer.c
+++ b/sound/pci/oxygen/oxygen_mixer.c
@@ -936,11 +936,13 @@ static int add_controls(struct oxygen *chip,
936 936
937 for (i = 0; i < count; ++i) { 937 for (i = 0; i < count; ++i) {
938 template = controls[i]; 938 template = controls[i];
939 err = chip->model->control_filter(&template); 939 if (chip->model->control_filter) {
940 if (err < 0) 940 err = chip->model->control_filter(&template);
941 return err; 941 if (err < 0)
942 if (err == 1) 942 return err;
943 continue; 943 if (err == 1)
944 continue;
945 }
944 if (!strcmp(template.name, "Master Playback Volume") && 946 if (!strcmp(template.name, "Master Playback Volume") &&
945 chip->model->dac_tlv) { 947 chip->model->dac_tlv) {
946 template.tlv.p = chip->model->dac_tlv; 948 template.tlv.p = chip->model->dac_tlv;
diff --git a/sound/usb/caiaq/caiaq-device.c b/sound/usb/caiaq/caiaq-device.c
index e97d8b2ac16a..a972f77bd785 100644
--- a/sound/usb/caiaq/caiaq-device.c
+++ b/sound/usb/caiaq/caiaq-device.c
@@ -351,8 +351,8 @@ static struct snd_card* create_card(struct usb_device* usb_dev)
351 dev = caiaqdev(card); 351 dev = caiaqdev(card);
352 dev->chip.dev = usb_dev; 352 dev->chip.dev = usb_dev;
353 dev->chip.card = card; 353 dev->chip.card = card;
354 dev->chip.usb_id = USB_ID(usb_dev->descriptor.idVendor, 354 dev->chip.usb_id = USB_ID(le16_to_cpu(usb_dev->descriptor.idVendor),
355 usb_dev->descriptor.idProduct); 355 le16_to_cpu(usb_dev->descriptor.idProduct));
356 spin_lock_init(&dev->spinlock); 356 spin_lock_init(&dev->spinlock);
357 snd_card_set_dev(card, &usb_dev->dev); 357 snd_card_set_dev(card, &usb_dev->dev);
358 358
diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c
index 4232fd75dd20..44589088941f 100644
--- a/virt/kvm/ioapic.c
+++ b/virt/kvm/ioapic.c
@@ -45,7 +45,7 @@
45#else 45#else
46#define ioapic_debug(fmt, arg...) 46#define ioapic_debug(fmt, arg...)
47#endif 47#endif
48static void ioapic_deliver(struct kvm_ioapic *vioapic, int irq); 48static int ioapic_deliver(struct kvm_ioapic *vioapic, int irq);
49 49
50static unsigned long ioapic_read_indirect(struct kvm_ioapic *ioapic, 50static unsigned long ioapic_read_indirect(struct kvm_ioapic *ioapic,
51 unsigned long addr, 51 unsigned long addr,
@@ -89,8 +89,8 @@ static void ioapic_service(struct kvm_ioapic *ioapic, unsigned int idx)
89 pent = &ioapic->redirtbl[idx]; 89 pent = &ioapic->redirtbl[idx];
90 90
91 if (!pent->fields.mask) { 91 if (!pent->fields.mask) {
92 ioapic_deliver(ioapic, idx); 92 int injected = ioapic_deliver(ioapic, idx);
93 if (pent->fields.trig_mode == IOAPIC_LEVEL_TRIG) 93 if (injected && pent->fields.trig_mode == IOAPIC_LEVEL_TRIG)
94 pent->fields.remote_irr = 1; 94 pent->fields.remote_irr = 1;
95 } 95 }
96 if (!pent->fields.trig_mode) 96 if (!pent->fields.trig_mode)
@@ -133,7 +133,7 @@ static void ioapic_write_indirect(struct kvm_ioapic *ioapic, u32 val)
133 } 133 }
134} 134}
135 135
136static void ioapic_inj_irq(struct kvm_ioapic *ioapic, 136static int ioapic_inj_irq(struct kvm_ioapic *ioapic,
137 struct kvm_vcpu *vcpu, 137 struct kvm_vcpu *vcpu,
138 u8 vector, u8 trig_mode, u8 delivery_mode) 138 u8 vector, u8 trig_mode, u8 delivery_mode)
139{ 139{
@@ -143,7 +143,7 @@ static void ioapic_inj_irq(struct kvm_ioapic *ioapic,
143 ASSERT((delivery_mode == IOAPIC_FIXED) || 143 ASSERT((delivery_mode == IOAPIC_FIXED) ||
144 (delivery_mode == IOAPIC_LOWEST_PRIORITY)); 144 (delivery_mode == IOAPIC_LOWEST_PRIORITY));
145 145
146 kvm_apic_set_irq(vcpu, vector, trig_mode); 146 return kvm_apic_set_irq(vcpu, vector, trig_mode);
147} 147}
148 148
149static u32 ioapic_get_delivery_bitmask(struct kvm_ioapic *ioapic, u8 dest, 149static u32 ioapic_get_delivery_bitmask(struct kvm_ioapic *ioapic, u8 dest,
@@ -186,7 +186,7 @@ static u32 ioapic_get_delivery_bitmask(struct kvm_ioapic *ioapic, u8 dest,
186 return mask; 186 return mask;
187} 187}
188 188
189static void ioapic_deliver(struct kvm_ioapic *ioapic, int irq) 189static int ioapic_deliver(struct kvm_ioapic *ioapic, int irq)
190{ 190{
191 u8 dest = ioapic->redirtbl[irq].fields.dest_id; 191 u8 dest = ioapic->redirtbl[irq].fields.dest_id;
192 u8 dest_mode = ioapic->redirtbl[irq].fields.dest_mode; 192 u8 dest_mode = ioapic->redirtbl[irq].fields.dest_mode;
@@ -195,7 +195,7 @@ static void ioapic_deliver(struct kvm_ioapic *ioapic, int irq)
195 u8 trig_mode = ioapic->redirtbl[irq].fields.trig_mode; 195 u8 trig_mode = ioapic->redirtbl[irq].fields.trig_mode;
196 u32 deliver_bitmask; 196 u32 deliver_bitmask;
197 struct kvm_vcpu *vcpu; 197 struct kvm_vcpu *vcpu;
198 int vcpu_id; 198 int vcpu_id, r = 0;
199 199
200 ioapic_debug("dest=%x dest_mode=%x delivery_mode=%x " 200 ioapic_debug("dest=%x dest_mode=%x delivery_mode=%x "
201 "vector=%x trig_mode=%x\n", 201 "vector=%x trig_mode=%x\n",
@@ -204,7 +204,7 @@ static void ioapic_deliver(struct kvm_ioapic *ioapic, int irq)
204 deliver_bitmask = ioapic_get_delivery_bitmask(ioapic, dest, dest_mode); 204 deliver_bitmask = ioapic_get_delivery_bitmask(ioapic, dest, dest_mode);
205 if (!deliver_bitmask) { 205 if (!deliver_bitmask) {
206 ioapic_debug("no target on destination\n"); 206 ioapic_debug("no target on destination\n");
207 return; 207 return 0;
208 } 208 }
209 209
210 switch (delivery_mode) { 210 switch (delivery_mode) {
@@ -216,7 +216,7 @@ static void ioapic_deliver(struct kvm_ioapic *ioapic, int irq)
216 vcpu = ioapic->kvm->vcpus[0]; 216 vcpu = ioapic->kvm->vcpus[0];
217#endif 217#endif
218 if (vcpu != NULL) 218 if (vcpu != NULL)
219 ioapic_inj_irq(ioapic, vcpu, vector, 219 r = ioapic_inj_irq(ioapic, vcpu, vector,
220 trig_mode, delivery_mode); 220 trig_mode, delivery_mode);
221 else 221 else
222 ioapic_debug("null lowest prio vcpu: " 222 ioapic_debug("null lowest prio vcpu: "
@@ -234,7 +234,7 @@ static void ioapic_deliver(struct kvm_ioapic *ioapic, int irq)
234 deliver_bitmask &= ~(1 << vcpu_id); 234 deliver_bitmask &= ~(1 << vcpu_id);
235 vcpu = ioapic->kvm->vcpus[vcpu_id]; 235 vcpu = ioapic->kvm->vcpus[vcpu_id];
236 if (vcpu) { 236 if (vcpu) {
237 ioapic_inj_irq(ioapic, vcpu, vector, 237 r = ioapic_inj_irq(ioapic, vcpu, vector,
238 trig_mode, delivery_mode); 238 trig_mode, delivery_mode);
239 } 239 }
240 } 240 }
@@ -246,6 +246,7 @@ static void ioapic_deliver(struct kvm_ioapic *ioapic, int irq)
246 delivery_mode); 246 delivery_mode);
247 break; 247 break;
248 } 248 }
249 return r;
249} 250}
250 251
251void kvm_ioapic_set_irq(struct kvm_ioapic *ioapic, int irq, int level) 252void kvm_ioapic_set_irq(struct kvm_ioapic *ioapic, int irq, int level)
@@ -268,35 +269,26 @@ void kvm_ioapic_set_irq(struct kvm_ioapic *ioapic, int irq, int level)
268 } 269 }
269} 270}
270 271
271static int get_eoi_gsi(struct kvm_ioapic *ioapic, int vector) 272static void __kvm_ioapic_update_eoi(struct kvm_ioapic *ioapic, int gsi)
272{ 273{
273 int i;
274
275 for (i = 0; i < IOAPIC_NUM_PINS; i++)
276 if (ioapic->redirtbl[i].fields.vector == vector)
277 return i;
278 return -1;
279}
280
281void kvm_ioapic_update_eoi(struct kvm *kvm, int vector)
282{
283 struct kvm_ioapic *ioapic = kvm->arch.vioapic;
284 union ioapic_redir_entry *ent; 274 union ioapic_redir_entry *ent;
285 int gsi;
286
287 gsi = get_eoi_gsi(ioapic, vector);
288 if (gsi == -1) {
289 printk(KERN_WARNING "Can't find redir item for %d EOI\n",
290 vector);
291 return;
292 }
293 275
294 ent = &ioapic->redirtbl[gsi]; 276 ent = &ioapic->redirtbl[gsi];
295 ASSERT(ent->fields.trig_mode == IOAPIC_LEVEL_TRIG); 277 ASSERT(ent->fields.trig_mode == IOAPIC_LEVEL_TRIG);
296 278
297 ent->fields.remote_irr = 0; 279 ent->fields.remote_irr = 0;
298 if (!ent->fields.mask && (ioapic->irr & (1 << gsi))) 280 if (!ent->fields.mask && (ioapic->irr & (1 << gsi)))
299 ioapic_deliver(ioapic, gsi); 281 ioapic_service(ioapic, gsi);
282}
283
284void kvm_ioapic_update_eoi(struct kvm *kvm, int vector)
285{
286 struct kvm_ioapic *ioapic = kvm->arch.vioapic;
287 int i;
288
289 for (i = 0; i < IOAPIC_NUM_PINS; i++)
290 if (ioapic->redirtbl[i].fields.vector == vector)
291 __kvm_ioapic_update_eoi(ioapic, i);
300} 292}
301 293
302static int ioapic_in_range(struct kvm_io_device *this, gpa_t addr) 294static int ioapic_in_range(struct kvm_io_device *this, gpa_t addr)